@adyen/bento-vue2 2.0.1 → 2.1.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 (320) hide show
  1. package/README.md +2 -2
  2. package/dist/@types/index.d.ts +114 -82
  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/button.css +1 -1
  13. package/dist/assets/calendar.css +1 -1
  14. package/dist/assets/card.css +1 -1
  15. package/dist/assets/checkbox.css +1 -1
  16. package/dist/assets/chip.css +1 -1
  17. package/dist/assets/currency.css +1 -1
  18. package/dist/assets/data-grid.css +1 -1
  19. package/dist/assets/date-range-picker.css +1 -1
  20. package/dist/assets/dialog-page.css +1 -1
  21. package/dist/assets/draggable.css +1 -1
  22. package/dist/assets/dropdown.css +1 -1
  23. package/dist/assets/file-uploader.css +1 -1
  24. package/dist/assets/filter-bar.css +1 -1
  25. package/dist/assets/header-with-views.css +1 -1
  26. package/dist/assets/input-field.css +1 -1
  27. package/dist/assets/input-time.css +1 -1
  28. package/dist/assets/inspector.css +1 -1
  29. package/dist/assets/modal-fullscreen.css +1 -1
  30. package/dist/assets/navigation-menu-group.css +1 -1
  31. package/dist/assets/pagination.css +1 -1
  32. package/dist/assets/rich-text-editor.css +1 -1
  33. package/dist/assets/search-bar.css +1 -1
  34. package/dist/assets/secondary-nav.css +1 -1
  35. package/dist/assets/selection-card-group.css +1 -1
  36. package/dist/assets/sidepanel.css +1 -1
  37. package/dist/assets/step.css +1 -1
  38. package/dist/assets/structured-list-item.css +1 -1
  39. package/dist/assets/tab.css +1 -1
  40. package/dist/assets/textarea.css +1 -1
  41. package/dist/assets/toggle.css +1 -1
  42. package/dist/assets/typography.css +1 -1
  43. package/dist/avatar.js +1 -1
  44. package/dist/button.js +3 -3
  45. package/dist/card.js +1 -1
  46. package/dist/checkbox.js +2 -2
  47. package/dist/chip.js +1 -1
  48. package/dist/chunks/{accordion-item.B7lteJBu.js → accordion-item.C158YxId.js} +5 -5
  49. package/dist/chunks/{accordion-item.B7lteJBu.js.map → accordion-item.C158YxId.js.map} +1 -1
  50. package/dist/chunks/{action-bar.BsXW7BI2.js → action-bar.D29UQHoA.js} +15 -15
  51. package/dist/chunks/{action-bar.BsXW7BI2.js.map → action-bar.D29UQHoA.js.map} +1 -1
  52. package/dist/chunks/{ai-button.BnFk5CzK.js → ai-button.qEaHYybv.js} +3 -3
  53. package/dist/chunks/{ai-button.BnFk5CzK.js.map → ai-button.qEaHYybv.js.map} +1 -1
  54. package/dist/chunks/{ai-tag.D2Q0xhFK.js → ai-tag.BLi-Xoh_.js} +3 -3
  55. package/dist/chunks/{ai-tag.D2Q0xhFK.js.map → ai-tag.BLi-Xoh_.js.map} +1 -1
  56. package/dist/chunks/{alert.DJDHwVeR.js → alert.BddJPWMN.js} +3 -3
  57. package/dist/chunks/{alert.DJDHwVeR.js.map → alert.BddJPWMN.js.map} +1 -1
  58. package/dist/chunks/{anchor-scroller.BbvghQxZ.js → anchor-scroller.Clb_9RNz.js} +5 -5
  59. package/dist/chunks/{anchor-scroller.BbvghQxZ.js.map → anchor-scroller.Clb_9RNz.js.map} +1 -1
  60. package/dist/chunks/{avatar.CxPKc8Gy.js → avatar.BN4MI-42.js} +2 -2
  61. package/dist/chunks/{avatar.CxPKc8Gy.js.map → avatar.BN4MI-42.js.map} +1 -1
  62. package/dist/chunks/{base-button.DOhHyU7x.js → base-button.DYroENBg.js} +3 -3
  63. package/dist/chunks/{base-button.DOhHyU7x.js.map → base-button.DYroENBg.js.map} +1 -1
  64. package/dist/chunks/{base-modal.CcmoTJdc.js → base-modal._-Cc6jfi.js} +6 -6
  65. package/dist/chunks/{base-modal.CcmoTJdc.js.map → base-modal._-Cc6jfi.js.map} +1 -1
  66. package/dist/chunks/{button-actions-with-menu.BY394ars.js → button-actions-with-menu.1vZJWN1K.js} +2 -2
  67. package/dist/chunks/{button-actions-with-menu.BY394ars.js.map → button-actions-with-menu.1vZJWN1K.js.map} +1 -1
  68. package/dist/chunks/{button-actions.bkcLUE1G.js → button-actions.CdetBz3J.js} +8 -8
  69. package/dist/chunks/button-actions.CdetBz3J.js.map +1 -0
  70. package/dist/chunks/button-actions.types.BptAXjD8.js.map +1 -1
  71. package/dist/chunks/{button.DII5Ifwa.js → button.tsTeQRcP.js} +3 -3
  72. package/dist/chunks/{button.DII5Ifwa.js.map → button.tsTeQRcP.js.map} +1 -1
  73. package/dist/chunks/{calendar.CXdLEeN4.js → calendar.BalfhApP.js} +293 -290
  74. package/dist/chunks/calendar.BalfhApP.js.map +1 -0
  75. package/dist/chunks/{card.BmpB0VbL.js → card.BhhC01dV.js} +7 -7
  76. package/dist/chunks/{card.BmpB0VbL.js.map → card.BhhC01dV.js.map} +1 -1
  77. package/dist/chunks/{checkbox-group.D1uyc3z3.js → checkbox-group.C-1v4X3c.js} +4 -4
  78. package/dist/chunks/{checkbox-group.D1uyc3z3.js.map → checkbox-group.C-1v4X3c.js.map} +1 -1
  79. package/dist/chunks/{checkbox.D5xZ5Nnh.js → checkbox.CnuIUi4-.js} +6 -6
  80. package/dist/chunks/{checkbox.D5xZ5Nnh.js.map → checkbox.CnuIUi4-.js.map} +1 -1
  81. package/dist/chunks/{chip.DRsJylWl.js → chip.Cc4f2vws.js} +14 -12
  82. package/dist/chunks/{chip.DRsJylWl.js.map → chip.Cc4f2vws.js.map} +1 -1
  83. package/dist/chunks/{code-snippet.CnThWqVb.js → code-snippet.Bkd8R0vf.js} +6 -6
  84. package/dist/chunks/{code-snippet.CnThWqVb.js.map → code-snippet.Bkd8R0vf.js.map} +1 -1
  85. package/dist/chunks/{controls-group.fdGc6epa.js → controls-group.Bku83Fm_.js} +3 -3
  86. package/dist/chunks/{controls-group.fdGc6epa.js.map → controls-group.Bku83Fm_.js.map} +1 -1
  87. package/dist/chunks/{copy.CSk1rCRo.js → copy.B12-P_8A.js} +3 -3
  88. package/dist/chunks/{copy.CSk1rCRo.js.map → copy.B12-P_8A.js.map} +1 -1
  89. package/dist/chunks/{country.UZbwr635.js → country._NpkT-91.js} +2 -2
  90. package/dist/chunks/{country.UZbwr635.js.map → country._NpkT-91.js.map} +1 -1
  91. package/dist/chunks/country.types.BCOrkmVK.js.map +1 -1
  92. package/dist/chunks/{currency.POwX-Trj.js → currency.BXsSGoWa.js} +4 -4
  93. package/dist/chunks/{currency.POwX-Trj.js.map → currency.BXsSGoWa.js.map} +1 -1
  94. package/dist/chunks/{dashboard-section.CYEoNH9Q.js → dashboard-section.yS2FNoIV.js} +3 -3
  95. package/dist/chunks/{dashboard-section.CYEoNH9Q.js.map → dashboard-section.yS2FNoIV.js.map} +1 -1
  96. package/dist/chunks/{dashed-underline.CzKc-fJW.js → dashed-underline.RcRbre03.js} +4 -4
  97. package/dist/chunks/{dashed-underline.CzKc-fJW.js.map → dashed-underline.RcRbre03.js.map} +1 -1
  98. package/dist/chunks/{data-grid-template.DCwzh2G7.js → data-grid-template.B5A9whlD.js} +4 -4
  99. package/dist/chunks/{data-grid-template.DCwzh2G7.js.map → data-grid-template.B5A9whlD.js.map} +1 -1
  100. package/dist/chunks/{data-grid.CMxQpfrY.js → data-grid.Pg5iM8CJ.js} +25 -25
  101. package/dist/chunks/{data-grid.CMxQpfrY.js.map → data-grid.Pg5iM8CJ.js.map} +1 -1
  102. package/dist/chunks/{date-picker.gDsw8bn1.js → date-picker.RFus1MVJ.js} +9 -9
  103. package/dist/chunks/{date-picker.gDsw8bn1.js.map → date-picker.RFus1MVJ.js.map} +1 -1
  104. package/dist/chunks/date-picker.types.Ckt7zxGy.js.map +1 -1
  105. package/dist/chunks/{date-range-picker.CqixIJxG.js → date-range-picker.B2B4hO6R.js} +411 -370
  106. package/dist/chunks/date-range-picker.B2B4hO6R.js.map +1 -0
  107. package/dist/chunks/date-range-picker.types.Ckt7zxGy.js.map +1 -1
  108. package/dist/chunks/{date-time-picker.Bktntun4.js → date-time-picker.DJxDa81N.js} +6 -6
  109. package/dist/chunks/{date-time-picker.Bktntun4.js.map → date-time-picker.DJxDa81N.js.map} +1 -1
  110. package/dist/chunks/{date.CPo8t1n9.js → date.P3Xx7JdV.js} +2 -2
  111. package/dist/chunks/{date.CPo8t1n9.js.map → date.P3Xx7JdV.js.map} +1 -1
  112. package/dist/chunks/{dialog-page.Bct3zOQO.js → dialog-page.DORdXmEm.js} +3 -3
  113. package/dist/chunks/{dialog-page.Bct3zOQO.js.map → dialog-page.DORdXmEm.js.map} +1 -1
  114. package/dist/chunks/{draggable-handle.DgVdGC1V.js → draggable-handle.BM07OVdH.js} +2 -2
  115. package/dist/chunks/{draggable-handle.DgVdGC1V.js.map → draggable-handle.BM07OVdH.js.map} +1 -1
  116. package/dist/chunks/{draggable.DYKdXdbj.js → draggable.BczXedk7.js} +59 -56
  117. package/dist/chunks/draggable.BczXedk7.js.map +1 -0
  118. package/dist/chunks/{dropdown-tag.Dk7SooVv.js → dropdown-tag.BmUNKoNw.js} +7 -7
  119. package/dist/chunks/{dropdown-tag.Dk7SooVv.js.map → dropdown-tag.BmUNKoNw.js.map} +1 -1
  120. package/dist/chunks/{dropdown.Bnq4kP7k.js → dropdown.CpZQYisR.js} +9 -9
  121. package/dist/chunks/{dropdown.Bnq4kP7k.js.map → dropdown.CpZQYisR.js.map} +1 -1
  122. package/dist/chunks/{empty-state.C2wjdE3y.js → empty-state.L3DTfiY7.js} +4 -4
  123. package/dist/chunks/{empty-state.C2wjdE3y.js.map → empty-state.L3DTfiY7.js.map} +1 -1
  124. package/dist/chunks/{error-message.DKnoUezI.js → error-message.B-n8wzFo.js} +2 -2
  125. package/dist/chunks/{error-message.DKnoUezI.js.map → error-message.B-n8wzFo.js.map} +1 -1
  126. package/dist/chunks/es6.yPcTMnSH.js.map +1 -1
  127. package/dist/chunks/{field-label.C7BCsofY.js → field-label.BQaDr37D.js} +3 -3
  128. package/dist/chunks/{field-label.C7BCsofY.js.map → field-label.BQaDr37D.js.map} +1 -1
  129. package/dist/chunks/{file-uploader.DllKBmP8.js → file-uploader.Bo17jWtf.js} +11 -11
  130. package/dist/chunks/{file-uploader.DllKBmP8.js.map → file-uploader.Bo17jWtf.js.map} +1 -1
  131. package/dist/chunks/{filter-bar.D7Lk7wlq.js → filter-bar.Bio9nf9V.js} +28 -27
  132. package/dist/chunks/filter-bar.Bio9nf9V.js.map +1 -0
  133. package/dist/chunks/{fixed-scroller.YC4bZifw.js → fixed-scroller.CHmrgoTQ.js} +2 -2
  134. package/dist/chunks/{fixed-scroller.YC4bZifw.js.map → fixed-scroller.CHmrgoTQ.js.map} +1 -1
  135. package/dist/chunks/{footer-actions.C9STwwcv.js → footer-actions.B8f-gEQV.js} +4 -4
  136. package/dist/chunks/{footer-actions.C9STwwcv.js.map → footer-actions.B8f-gEQV.js.map} +1 -1
  137. package/dist/chunks/{form-layout-group.D4T0Z5xk.js → form-layout-group.BSC2esG8.js} +2 -2
  138. package/dist/chunks/{form-layout-group.D4T0Z5xk.js.map → form-layout-group.BSC2esG8.js.map} +1 -1
  139. package/dist/chunks/{form-layout-title.C0lwzPZz.js → form-layout-title.b2BMYjnl.js} +3 -3
  140. package/dist/chunks/{form-layout-title.C0lwzPZz.js.map → form-layout-title.b2BMYjnl.js.map} +1 -1
  141. package/dist/chunks/{header-with-views.BqobE7IF.js → header-with-views.BJCjvhem.js} +16 -16
  142. package/dist/chunks/{header-with-views.BqobE7IF.js.map → header-with-views.BJCjvhem.js.map} +1 -1
  143. package/dist/chunks/{header.CmyqVXuG.js → header.CDiold9n.js} +5 -5
  144. package/dist/chunks/{header.CmyqVXuG.js.map → header.CDiold9n.js.map} +1 -1
  145. package/dist/chunks/{info-icon-with-popover.BvYyGm4D.js → info-icon-with-popover.BzGVcMqy.js} +3 -3
  146. package/dist/chunks/{info-icon-with-popover.BvYyGm4D.js.map → info-icon-with-popover.BzGVcMqy.js.map} +1 -1
  147. package/dist/chunks/{info-icon.B-FAeceD.js → info-icon.D11usblr.js} +2 -2
  148. package/dist/chunks/{info-icon.B-FAeceD.js.map → info-icon.D11usblr.js.map} +1 -1
  149. package/dist/chunks/{input-field-password.9bWhLud0.js → input-field-password.D4Jn2yCi.js} +6 -6
  150. package/dist/chunks/{input-field-password.9bWhLud0.js.map → input-field-password.D4Jn2yCi.js.map} +1 -1
  151. package/dist/chunks/{input-field-phone-number.CCn1N9St.js → input-field-phone-number.lV7yePoJ.js} +3 -3
  152. package/dist/chunks/{input-field-phone-number.CCn1N9St.js.map → input-field-phone-number.lV7yePoJ.js.map} +1 -1
  153. package/dist/chunks/{input-field.D912rZS_.js → input-field.90DWNO1a.js} +7 -7
  154. package/dist/chunks/{input-field.D912rZS_.js.map → input-field.90DWNO1a.js.map} +1 -1
  155. package/dist/chunks/input-time.D7IsprlH.js +157 -0
  156. package/dist/chunks/input-time.D7IsprlH.js.map +1 -0
  157. package/dist/chunks/{inspector-page.BRC_7uro.js → inspector-page.IoC9naSV.js} +4 -4
  158. package/dist/chunks/{inspector-page.BRC_7uro.js.map → inspector-page.IoC9naSV.js.map} +1 -1
  159. package/dist/chunks/{inspector.IOtNex1r.js → inspector.BwtV4rE9.js} +5 -5
  160. package/dist/chunks/{inspector.IOtNex1r.js.map → inspector.BwtV4rE9.js.map} +1 -1
  161. package/dist/chunks/{layout-row.LBn6aJv4.js → layout-row.DYx7F4cb.js} +2 -2
  162. package/dist/chunks/{layout-row.LBn6aJv4.js.map → layout-row.DYx7F4cb.js.map} +1 -1
  163. package/dist/chunks/{link.Cls8XShm.js → link.iNnolG9W.js} +2 -2
  164. package/dist/chunks/{link.Cls8XShm.js.map → link.iNnolG9W.js.map} +1 -1
  165. package/dist/chunks/{list-item.HjabBEb8.js → list-item.ByyA5h1d.js} +5 -5
  166. package/dist/chunks/{list-item.HjabBEb8.js.map → list-item.ByyA5h1d.js.map} +1 -1
  167. package/dist/chunks/{listbox-option-tag.DhNxvqRO.js → listbox-option-tag.Cp_W_p4z.js} +3 -3
  168. package/dist/chunks/{listbox-option-tag.DhNxvqRO.js.map → listbox-option-tag.Cp_W_p4z.js.map} +1 -1
  169. package/dist/chunks/{modal-fullscreen.Bi1bQs4Z.js → modal-fullscreen.DG8Q-jHL.js} +9 -9
  170. package/dist/chunks/modal-fullscreen.DG8Q-jHL.js.map +1 -0
  171. package/dist/chunks/{modal.B3-pmL5s.js → modal.UkzON4bz.js} +7 -7
  172. package/dist/chunks/{modal.B3-pmL5s.js.map → modal.UkzON4bz.js.map} +1 -1
  173. package/dist/chunks/{navigation-menu-group.BnHdXODQ.js → navigation-menu-group.BzKRuhrd.js} +8 -8
  174. package/dist/chunks/navigation-menu-group.BzKRuhrd.js.map +1 -0
  175. package/dist/chunks/{pagination.cI_pc6oE.js → pagination.DZEVT-CA.js} +8 -7
  176. package/dist/chunks/{pagination.cI_pc6oE.js.map → pagination.DZEVT-CA.js.map} +1 -1
  177. package/dist/chunks/{payment-method.DcAITDcK.js → payment-method.meF6XN_X.js} +2 -2
  178. package/dist/chunks/{payment-method.DcAITDcK.js.map → payment-method.meF6XN_X.js.map} +1 -1
  179. package/dist/chunks/payment-method.types.BqtH7RM2.js.map +1 -1
  180. package/dist/chunks/popover.types.DvIwSAAp.js.map +1 -1
  181. package/dist/chunks/popper-container.Cj3AWXSd.js.map +1 -1
  182. package/dist/chunks/{progress-bar.RlF3a0Gb.js → progress-bar.CaurNYsc.js} +4 -4
  183. package/dist/chunks/{progress-bar.RlF3a0Gb.js.map → progress-bar.CaurNYsc.js.map} +1 -1
  184. package/dist/chunks/{promo-banner.B5szTysj.js → promo-banner.CcYpFY9b.js} +3 -3
  185. package/dist/chunks/{promo-banner.B5szTysj.js.map → promo-banner.CcYpFY9b.js.map} +1 -1
  186. package/dist/chunks/{radio-group.CvsQDlHi.js → radio-group.CLbYlzD7.js} +5 -5
  187. package/dist/chunks/{radio-group.CvsQDlHi.js.map → radio-group.CLbYlzD7.js.map} +1 -1
  188. package/dist/chunks/{rich-text-editor.rXoS7KGY.js → rich-text-editor.5SMm2BbC.js} +11 -11
  189. package/dist/chunks/{rich-text-editor.rXoS7KGY.js.map → rich-text-editor.5SMm2BbC.js.map} +1 -1
  190. package/dist/chunks/{scroll-to-section.DhW8SFy0.js → scroll-to-section.CzeBpNj4.js} +2 -2
  191. package/dist/chunks/{scroll-to-section.DhW8SFy0.js.map → scroll-to-section.CzeBpNj4.js.map} +1 -1
  192. package/dist/chunks/{search-bar.--4KVNkf.js → search-bar.DrIwlAQj.js} +8 -8
  193. package/dist/chunks/{search-bar.--4KVNkf.js.map → search-bar.DrIwlAQj.js.map} +1 -1
  194. package/dist/chunks/{secondary-nav.CgdV0QwZ.js → secondary-nav.DRs5yAve.js} +16 -16
  195. package/dist/chunks/{secondary-nav.CgdV0QwZ.js.map → secondary-nav.DRs5yAve.js.map} +1 -1
  196. package/dist/chunks/{segmented-control.nYpRQTGc.js → segmented-control.CcQoBTfT.js} +3 -3
  197. package/dist/chunks/{segmented-control.nYpRQTGc.js.map → segmented-control.CcQoBTfT.js.map} +1 -1
  198. package/dist/chunks/segmented-control.types.BHRLV8KU.js.map +1 -1
  199. package/dist/chunks/{selection-card-group.CmDuj1c7.js → selection-card-group.BYBAG8ig.js} +49 -48
  200. package/dist/chunks/{selection-card-group.CmDuj1c7.js.map → selection-card-group.BYBAG8ig.js.map} +1 -1
  201. package/dist/chunks/{sidepanel.CntIcmx-.js → sidepanel.CLbVkH7v.js} +14 -14
  202. package/dist/chunks/{sidepanel.CntIcmx-.js.map → sidepanel.CLbVkH7v.js.map} +1 -1
  203. package/dist/chunks/{status.DJ1Dfh5s.js → status.BdWYs5MK.js} +2 -2
  204. package/dist/chunks/{status.DJ1Dfh5s.js.map → status.BdWYs5MK.js.map} +1 -1
  205. package/dist/chunks/status.types.Dx8MDhEH.js.map +1 -1
  206. package/dist/chunks/{step.BCa9IOWB.js → step.SkRHgSxN.js} +5 -5
  207. package/dist/chunks/step.SkRHgSxN.js.map +1 -0
  208. package/dist/chunks/{structured-list-item.Bhe0CH1M.js → structured-list-item.BgcR0XlO.js} +10 -9
  209. package/dist/chunks/structured-list-item.BgcR0XlO.js.map +1 -0
  210. package/dist/chunks/{summary-grid.types.C70ED6WD.js → summary-grid.types.Do2PZQGm.js} +6 -6
  211. package/dist/chunks/{summary-grid.types.C70ED6WD.js.map → summary-grid.types.Do2PZQGm.js.map} +1 -1
  212. package/dist/chunks/{tab.BK1sIJAJ.js → tab.zeRxc-3T.js} +49 -48
  213. package/dist/chunks/tab.zeRxc-3T.js.map +1 -0
  214. package/dist/chunks/{table-of-contents.BTy95Rrs.js → table-of-contents.D4sF13f8.js} +3 -3
  215. package/dist/chunks/{table-of-contents.BTy95Rrs.js.map → table-of-contents.D4sF13f8.js.map} +1 -1
  216. package/dist/chunks/{tag.Dz1FQSZb.js → tag.CgsX8v2m.js} +3 -3
  217. package/dist/chunks/{tag.Dz1FQSZb.js.map → tag.CgsX8v2m.js.map} +1 -1
  218. package/dist/chunks/{textarea.CcV9U3I7.js → textarea.DMBnJaB1.js} +7 -7
  219. package/dist/chunks/textarea.DMBnJaB1.js.map +1 -0
  220. package/dist/chunks/{timeline-item.BG2by0xf.js → timeline-item.CS7TCdoU.js} +10 -10
  221. package/dist/chunks/{timeline-item.BG2by0xf.js.map → timeline-item.CS7TCdoU.js.map} +1 -1
  222. package/dist/chunks/{title-details.ChwPP7C5.js → title-details.BhR2nis-.js} +4 -4
  223. package/dist/chunks/{title-details.ChwPP7C5.js.map → title-details.BhR2nis-.js.map} +1 -1
  224. package/dist/chunks/{toast.CO6ByH3n.js → toast.CjDkuh2x.js} +4 -4
  225. package/dist/chunks/{toast.CO6ByH3n.js.map → toast.CjDkuh2x.js.map} +1 -1
  226. package/dist/chunks/{toggle.Dgh7aw1D.js → toggle.BL_w2xUm.js} +4 -4
  227. package/dist/chunks/{toggle.Dgh7aw1D.js.map → toggle.BL_w2xUm.js.map} +1 -1
  228. package/dist/chunks/{tooltip.DFYc5NKM.js → tooltip.BOe7LOfD.js} +2 -2
  229. package/dist/chunks/{tooltip.DFYc5NKM.js.map → tooltip.BOe7LOfD.js.map} +1 -1
  230. package/dist/chunks/{tutorial.K0aOQWIg.js → tutorial.DSbBx_2h.js} +3 -3
  231. package/dist/chunks/{tutorial.K0aOQWIg.js.map → tutorial.DSbBx_2h.js.map} +1 -1
  232. package/dist/chunks/{typography.D1OZJbEa.js → typography.Cd386LC_.js} +5 -5
  233. package/dist/chunks/{typography.D1OZJbEa.js.map → typography.Cd386LC_.js.map} +1 -1
  234. package/dist/chunks/{use-bento-toast-controller.A5xraVqa.js → use-bento-toast-controller.DMA9d_oD.js} +2 -2
  235. package/dist/chunks/{use-bento-toast-controller.A5xraVqa.js.map → use-bento-toast-controller.DMA9d_oD.js.map} +1 -1
  236. package/dist/chunks/{use-date-input-formatter.MgbFwUqJ.js → use-date-input-formatter.CouOE5tF.js} +2 -2
  237. package/dist/chunks/{use-date-input-formatter.MgbFwUqJ.js.map → use-date-input-formatter.CouOE5tF.js.map} +1 -1
  238. package/dist/chunks/{use-dynamic-date-fns-locale.Bpb2DeYR.js → use-dynamic-date-fns-locale.DGqfz_nF.js} +2 -2
  239. package/dist/chunks/{use-dynamic-date-fns-locale.Bpb2DeYR.js.map → use-dynamic-date-fns-locale.DGqfz_nF.js.map} +1 -1
  240. package/dist/code-snippet.js +1 -1
  241. package/dist/country.js +1 -1
  242. package/dist/currency.js +1 -1
  243. package/dist/dashboard-template.js +1 -1
  244. package/dist/dashed-underline.js +1 -1
  245. package/dist/data-grid-template.js +1 -1
  246. package/dist/data-grid.js +1 -1
  247. package/dist/date-picker.js +2 -2
  248. package/dist/date-range-picker.js +2 -2
  249. package/dist/date-time-picker.js +1 -1
  250. package/dist/date.js +1 -1
  251. package/dist/draggable.js +2 -2
  252. package/dist/dropdown.js +2 -2
  253. package/dist/empty-state.js +1 -1
  254. package/dist/file-uploader.js +1 -1
  255. package/dist/filter-bar.js +1 -1
  256. package/dist/form-layout.js +2 -2
  257. package/dist/header-with-views.js +1 -1
  258. package/dist/header.js +1 -1
  259. package/dist/index.js +177 -152
  260. package/dist/index.js.map +1 -1
  261. package/dist/info-icon.js +1 -1
  262. package/dist/input-field-password.js +1 -1
  263. package/dist/input-field-phone-number.js +1 -1
  264. package/dist/input-field.js +1 -1
  265. package/dist/input-time.js +1 -1
  266. package/dist/inspector.js +2 -2
  267. package/dist/internal.js +14 -14
  268. package/dist/layout.js +1 -1
  269. package/dist/link.js +1 -1
  270. package/dist/list.js +1 -1
  271. package/dist/menu.js +1 -1
  272. package/dist/modal-fullscreen.js +1 -1
  273. package/dist/modal.js +2 -2
  274. package/dist/navigation-menu.js +1 -1
  275. package/dist/pagination.js +1 -1
  276. package/dist/payment-method.js +1 -1
  277. package/dist/popover.js +1 -1
  278. package/dist/progress-bar.js +1 -1
  279. package/dist/promo-banner.js +1 -1
  280. package/dist/radio-group.js +1 -1
  281. package/dist/rich-text-editor.js +1 -1
  282. package/dist/search-bar.js +2 -2
  283. package/dist/secondary-nav.js +1 -1
  284. package/dist/segmented-control.js +1 -1
  285. package/dist/selection-card.js +1 -1
  286. package/dist/sidepanel.js +1 -1
  287. package/dist/status.js +1 -1
  288. package/dist/stepper.js +1 -1
  289. package/dist/structured-list.js +1 -1
  290. package/dist/styles/bento-dark.css +3 -0
  291. package/dist/styles/bento-light.css +3 -0
  292. package/dist/styles/bento.css +3 -0
  293. package/dist/styles/legacy.css +3 -0
  294. package/dist/styles/styleguide.css +3 -0
  295. package/dist/styles/utility.css +9 -0
  296. package/dist/summary-grid.js +1 -1
  297. package/dist/table-of-contents.js +1 -1
  298. package/dist/tabs.js +1 -1
  299. package/dist/tag.js +1 -1
  300. package/dist/textarea.js +1 -1
  301. package/dist/timeline.js +1 -1
  302. package/dist/toast.js +1 -1
  303. package/dist/toggle.js +1 -1
  304. package/dist/tutorial.js +1 -1
  305. package/dist/typography.js +1 -1
  306. package/dist/web-types.json +1278 -46
  307. package/package.json +9 -9
  308. package/dist/chunks/button-actions.bkcLUE1G.js.map +0 -1
  309. package/dist/chunks/calendar.CXdLEeN4.js.map +0 -1
  310. package/dist/chunks/date-range-picker.CqixIJxG.js.map +0 -1
  311. package/dist/chunks/draggable.DYKdXdbj.js.map +0 -1
  312. package/dist/chunks/filter-bar.D7Lk7wlq.js.map +0 -1
  313. package/dist/chunks/input-time.CXMuvF9N.js +0 -105
  314. package/dist/chunks/input-time.CXMuvF9N.js.map +0 -1
  315. package/dist/chunks/modal-fullscreen.Bi1bQs4Z.js.map +0 -1
  316. package/dist/chunks/navigation-menu-group.BnHdXODQ.js.map +0 -1
  317. package/dist/chunks/step.BCa9IOWB.js.map +0 -1
  318. package/dist/chunks/structured-list-item.Bhe0CH1M.js.map +0 -1
  319. package/dist/chunks/tab.BK1sIJAJ.js.map +0 -1
  320. package/dist/chunks/textarea.CcV9U3I7.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"date-range-picker.B2B4hO6R.js","sources":["../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/getYear.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/isEqual.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/isSameQuarter.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/startOfSecond.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/isSameSecond.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/isToday.js","../../src/components/date-range-picker/components/date-time-input/date-time-input.vue","../../src/components/internal/calendar/components/calendar-month/composables/granular-min-max-date.ts","../../src/components/date-range-picker/composables/use-granularity-memory.ts","../../src/components/date-range-picker/components/date-range-picker-calendar/date-range-picker-calendar.types.ts","../../src/components/date-range-picker/components/date-range-picker-calendar/date-range-picker-calendar.vue","../../src/components/date-range-picker/composables/use-date-range-picker-calendar-text.ts","../../src/components/date-range-picker/date-range-picker.vue"],"sourcesContent":["import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getYear} function options.\n */\n\n/**\n * @name getYear\n * @category Year Helpers\n * @summary Get the year of the given date.\n *\n * @description\n * Get the year of the given date.\n *\n * @param date - The given date\n * @param options - An object with options\n *\n * @returns The year\n *\n * @example\n * // Which year is 2 July 2014?\n * const result = getYear(new Date(2014, 6, 2))\n * //=> 2014\n */\nexport function getYear(date, options) {\n return toDate(date, options?.in).getFullYear();\n}\n\n// Fallback for modularized imports:\nexport default getYear;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * @name isEqual\n * @category Common Helpers\n * @summary Are the given dates equal?\n *\n * @description\n * Are the given dates equal?\n *\n * @param dateLeft - The first date to compare\n * @param dateRight - The second date to compare\n *\n * @returns The dates are equal\n *\n * @example\n * // Are 2 July 2014 06:30:45.000 and 2 July 2014 06:30:45.500 equal?\n * const result = isEqual(\n * new Date(2014, 6, 2, 6, 30, 45, 0),\n * new Date(2014, 6, 2, 6, 30, 45, 500)\n * )\n * //=> false\n */\nexport function isEqual(leftDate, rightDate) {\n return +toDate(leftDate) === +toDate(rightDate);\n}\n\n// Fallback for modularized imports:\nexport default isEqual;\n","import { normalizeDates } from \"./_lib/normalizeDates.js\";\nimport { startOfQuarter } from \"./startOfQuarter.js\";\n\n/**\n * The {@link isSameQuarter} function options.\n */\n\n/**\n * @name isSameQuarter\n * @category Quarter Helpers\n * @summary Are the given dates in the same quarter (and year)?\n *\n * @description\n * Are the given dates in the same quarter (and year)?\n *\n * @param laterDate - The first date to check\n * @param earlierDate - The second date to check\n * @param options - An object with options\n *\n * @returns The dates are in the same quarter (and year)\n *\n * @example\n * // Are 1 January 2014 and 8 March 2014 in the same quarter?\n * const result = isSameQuarter(new Date(2014, 0, 1), new Date(2014, 2, 8))\n * //=> true\n *\n * @example\n * // Are 1 January 2014 and 1 January 2015 in the same quarter?\n * const result = isSameQuarter(new Date(2014, 0, 1), new Date(2015, 0, 1))\n * //=> false\n */\nexport function isSameQuarter(laterDate, earlierDate, options) {\n const [dateLeft_, dateRight_] = normalizeDates(\n options?.in,\n laterDate,\n earlierDate,\n );\n return +startOfQuarter(dateLeft_) === +startOfQuarter(dateRight_);\n}\n\n// Fallback for modularized imports:\nexport default isSameQuarter;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link startOfSecond} function options.\n */\n\n/**\n * @name startOfSecond\n * @category Second Helpers\n * @summary Return the start of a second for the given date.\n *\n * @description\n * Return the start of a second for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - The options\n *\n * @returns The start of a second\n *\n * @example\n * // The start of a second for 1 December 2014 22:15:45.400:\n * const result = startOfSecond(new Date(2014, 11, 1, 22, 15, 45, 400))\n * //=> Mon Dec 01 2014 22:15:45.000\n */\nexport function startOfSecond(date, options) {\n const date_ = toDate(date, options?.in);\n date_.setMilliseconds(0);\n return date_;\n}\n\n// Fallback for modularized imports:\nexport default startOfSecond;\n","import { startOfSecond } from \"./startOfSecond.js\";\n\n/**\n * @name isSameSecond\n * @category Second Helpers\n * @summary Are the given dates in the same second (and hour and day)?\n *\n * @description\n * Are the given dates in the same second (and hour and day)?\n *\n * @param laterDate - The first date to check\n * @param earlierDate - The second date to check\n *\n * @returns The dates are in the same second (and hour and day)\n *\n * @example\n * // Are 4 September 2014 06:30:15.000 and 4 September 2014 06:30.15.500 in the same second?\n * const result = isSameSecond(\n * new Date(2014, 8, 4, 6, 30, 15),\n * new Date(2014, 8, 4, 6, 30, 15, 500)\n * )\n * //=> true\n *\n * @example\n * // Are 4 September 2014 06:00:15.000 and 4 September 2014 06:01.15.000 in the same second?\n * const result = isSameSecond(\n * new Date(2014, 8, 4, 6, 0, 15),\n * new Date(2014, 8, 4, 6, 1, 15)\n * )\n * //=> false\n *\n * @example\n * // Are 4 September 2014 06:00:15.000 and 5 September 2014 06:00.15.000 in the same second?\n * const result = isSameSecond(\n * new Date(2014, 8, 4, 6, 0, 15),\n * new Date(2014, 8, 5, 6, 0, 15)\n * )\n * //=> false\n */\nexport function isSameSecond(laterDate, earlierDate) {\n return +startOfSecond(laterDate) === +startOfSecond(earlierDate);\n}\n\n// Fallback for modularized imports:\nexport default isSameSecond;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { constructNow } from \"./constructNow.js\";\nimport { isSameDay } from \"./isSameDay.js\";\n\n/**\n * The {@link isToday} function options.\n */\n\n/**\n * @name isToday\n * @category Day Helpers\n * @summary Is the given date today?\n * @pure false\n *\n * @description\n * Is the given date today?\n *\n * @param date - The date to check\n * @param options - An object with options\n *\n * @returns The date is today\n *\n * @example\n * // If today is 6 October 2014, is 6 October 14:00:00 today?\n * const result = isToday(new Date(2014, 9, 6, 14, 0))\n * //=> true\n */\nexport function isToday(date, options) {\n return isSameDay(\n constructFrom(options?.in || date, date),\n constructNow(options?.in || date),\n );\n}\n\n// Fallback for modularized imports:\nexport default isToday;\n","<template>\n <bento-form-layout-group :layout=\"showTimeInput ? '50-50' : '100'\" :error-message=\"errorMessage\">\n <bento-input-field\n v-bind=\"resolvedDateProps\"\n :model-value=\"dateModelValue\"\n @click=\"$emit('click')\"\n @update:model-value=\"$emit('update:date-model-value', $event)\"\n @keydown=\"$emit('date:keydown', $event)\"\n />\n\n <bento-input-time\n v-if=\"showTimeInput\"\n v-bind=\"resolvedTimeProps\"\n :model-value=\"timeModelValue\"\n @click=\"$emit('click')\"\n @update:model-value=\"$emit('update:time-model-value', $event)\"\n @input:error=\"$emit('time:error')\"\n @input:valid=\"$emit('time:valid')\"\n />\n </bento-form-layout-group>\n</template>\n\n<script setup lang=\"ts\">\n import { computed } from 'vue';\n import { BentoFormLayoutGroup } from '@/components/form-layout';\n import { BentoInputField } from '@/components/input-field';\n import { BentoInputTime } from '@/components/input-time';\n\n import type { BentoDateTimeInputEmits, BentoDateTimeInputProps } from './date-time-input.types';\n\n const props = defineProps({\n dateModelValue: { default: '' },\n dateProps: { default: () => ({}) },\n errorMessage: { default: null },\n showTimeInput: { type: Boolean, default: false },\n timeModelValue: { default: '' },\n timeProps: { default: () => ({}) }\n});\n\n defineEmits([\"click\", \"update:date-model-value\", \"date:keydown\", \"update:time-model-value\", \"time:error\", \"time:valid\"]);\n\n const resolvedDateProps = computed(() => ({\n errorMessage: props.errorMessage,\n ...props.dateProps,\n }));\n\n const resolvedTimeProps = computed(() => ({\n errorMessage: props.errorMessage,\n ...props.timeProps,\n }));\n</script>\n\n<script lang=\"ts\">\n /**\n * Internal component that combines a date input field and an optional time input\n * within a form layout group, providing a shared error message pattern.\n *\n * @example\n * import { DateTimeInput } from '@/internal';\n *\n * export default {\n * components: { DateTimeInput },\n * template: `\n * <date-time-input\n * date-aria-label=\"Date from\"\n * :date-model-value=\"dateValue\"\n * :show-time-input=\"true\"\n * time-aria-label=\"Time from\"\n * :time-model-value=\"timeValue\"\n * :error-message=\"errorMsg\"\n * @update:date-model-value=\"onDateChange\"\n * @update:time-model-value=\"onTimeChange\"\n * />\n * `\n * }\n */\n export default {\n name: 'date-time-input',\n };\n</script>\n","import { addDays } from 'date-fns/addDays';\nimport { addMonths } from 'date-fns/addMonths';\nimport { addQuarters } from 'date-fns/addQuarters';\nimport { endOfDay } from 'date-fns/endOfDay';\nimport { endOfMonth } from 'date-fns/endOfMonth';\nimport { endOfQuarter } from 'date-fns/endOfQuarter';\nimport { endOfWeek } from 'date-fns/endOfWeek';\nimport { isSameDay } from 'date-fns/isSameDay';\nimport { startOfDay } from 'date-fns/startOfDay';\nimport { startOfMonth } from 'date-fns/startOfMonth';\nimport { startOfQuarter } from 'date-fns/startOfQuarter';\nimport { startOfWeek } from 'date-fns/startOfWeek';\nimport { subDays } from 'date-fns/subDays';\nimport { subMonths } from 'date-fns/subMonths';\nimport { subQuarters } from 'date-fns/subQuarters';\n\nimport type { CalendarGranularityConfig } from '../../../calendar.types';\nimport type { UseGranularMinMaxDate } from './granular-min-max-date.types';\n\n/**\n * Provides utility function to set calendar min/max dates based on the granularity selected.\n * @param props Configured min/max dates, and the day the week starts on.\n * @returns Function to calculate calendar limits.\n */\nexport const useGranularMinMaxDate: UseGranularMinMaxDate = ({\n firstDayOfWeek,\n min: minimumDate,\n max: maximumDate,\n}) => {\n const getGranularCalendarLimits = (granularity: CalendarGranularityConfig) => {\n if (!minimumDate && !maximumDate) {\n return { min: null, max: null };\n }\n\n let min = minimumDate ? startOfDay(minimumDate) : null;\n let max = maximumDate ? endOfDay(maximumDate) : null;\n\n if (granularity?.type === 'weekly') {\n if (granularity.earliest) {\n min = startOfDay(granularity.earliest);\n } else if (min) {\n const startOfMin = startOfWeek(min, { weekStartsOn: firstDayOfWeek });\n\n // If the minimum is in the middle of a week, set to the end (only allow full weeks)\n if (!isSameDay(min, startOfMin)) {\n min = startOfDay(addDays(endOfWeek(min, { weekStartsOn: firstDayOfWeek }), 1));\n }\n }\n\n if (granularity.latest) {\n max = endOfDay(granularity.latest);\n } else if (max) {\n const endOfMax = endOfWeek(max, { weekStartsOn: firstDayOfWeek });\n\n // If the maximum is in the middle of a week, set to the end of last week (only allow full weeks)\n if (!isSameDay(max, endOfMax)) {\n max = endOfDay(subDays(startOfWeek(max, { weekStartsOn: firstDayOfWeek }), 1));\n }\n }\n }\n\n if (granularity?.type === 'monthly') {\n if (granularity.earliest) {\n min = startOfDay(granularity.earliest);\n } else if (min) {\n const startOfMin = startOfMonth(min);\n\n // If the minimum is in the middle of a month, set to the start of next month (only allow full month)\n if (!isSameDay(min, startOfMin)) {\n min = startOfMonth(addMonths(min, 1));\n }\n }\n\n if (granularity.latest) {\n max = endOfDay(granularity.latest);\n } else if (max) {\n const endOfMax = endOfMonth(max);\n\n // If the maximum is in the middle of a month, set to the end of last month (only allow full months)\n if (!isSameDay(max, endOfMax)) {\n max = endOfMonth(subMonths(max, 1));\n }\n }\n }\n\n if (granularity?.type === 'quarterly') {\n if (granularity.earliest) {\n min = startOfQuarter(granularity.earliest);\n } else if (min) {\n const startOfMin = startOfQuarter(min);\n\n // If the minimum is in the middle of a quarter, set to the start of next quarter (only allow full fiscal quarters)\n if (!isSameDay(min, startOfMin)) {\n min = startOfQuarter(addQuarters(min, 1));\n }\n }\n\n if (granularity.latest) {\n max = endOfDay(granularity.latest);\n } else if (max) {\n const endOfMax = endOfQuarter(max);\n\n // If the maximum is in the middle of a quarter, set to the end of last quarter (only allow full fiscal quarters)\n if (!isSameDay(max, endOfMax)) {\n max = endOfQuarter(subQuarters(max, 1));\n }\n }\n }\n\n return { min, max };\n };\n\n return { getGranularCalendarLimits };\n};\n","import { reactive } from 'vue';\n\nimport type { CalendarGranularityType } from '../../internal/calendar/calendar.types';\nimport type { UseGranularityMemory } from './use-granularity-memory.types';\n\n/**\n * Provides utility property and functions to store date ranges based on granularity.\n * This is used to revert back to the previously selected range when users switch between granularities\n * @returns Saved date ranges per granularity, and functions to save/reset ranges.\n */\nexport const useGranularityMemory: UseGranularityMemory = () => {\n const savedRanges = reactive<{\n daily: { startDate: Date; endDate: Date } | null;\n weekly: { startDate: Date; endDate: Date } | null;\n monthly: { startDate: Date; endDate: Date } | null;\n quarterly: { startDate: Date; endDate: Date } | null;\n }>({\n daily: null,\n weekly: null,\n monthly: null,\n quarterly: null,\n });\n\n const saveRange = (type: CalendarGranularityType, range: { startDate: Date; endDate: Date }) => {\n savedRanges[type] = range;\n };\n\n const resetSavedRanges = () => {\n savedRanges.daily = null;\n savedRanges.weekly = null;\n savedRanges.monthly = null;\n savedRanges.quarterly = null;\n };\n\n return {\n savedRanges,\n\n saveRange,\n resetSavedRanges,\n };\n};\n","import { type CalendarGranularityType } from '@/internal/calendar/calendar.types';\n\nexport interface DateRangePickerCalendarFormData {\n startDate: string;\n endDate: string;\n startTime?: string;\n endTime?: string;\n granularity?: CalendarGranularityType;\n}\n\nexport enum DateRangePickerCalendarEvent {\n CUSTOM_RANGE = 'custom-range',\n INPUT = 'input',\n ERROR = 'error',\n FORM_DATE = 'form-date',\n START_DATE_SELECTED = 'start-date-selected',\n}\n\nexport interface DateRangePickerCalendarRangeSelectorItem {\n label: string;\n value: string;\n data: {\n startDate: Date;\n endDate?: Date;\n granularity?: CalendarGranularityType;\n isRelativeToNow?: boolean;\n timeDifference?: number;\n };\n}\n\nexport type DateRangePickerCalendarRangeSelectorItems = Array<DateRangePickerCalendarRangeSelectorItem>;\n","<template>\n <div class=\"b-date-range-picker-calendar\">\n <!-- Form -->\n <div\n class=\"b-date-range-picker-calendar__form-container\"\n :class=\"computedFormContainerClasses\"\n data-testid=\"date-range-picker-calendar-form-container\"\n >\n <div class=\"b-date-range-picker-calendar__form\">\n <template v-if=\"hasSlot('title')\">\n <slot name=\"title\" />\n </template>\n\n <bento-dropdown\n v-if=\"quickSelectRanges\"\n :aria-label=\"t('customRange')\"\n :items=\"quickSelectRangeDefaultItems\"\n :model-value=\"selectedRangeSelectorValue\"\n @update:model-value=\"onRangeSelectorInput\"\n />\n\n <bento-segmented-control\n v-if=\"granularities\"\n :items=\"granularityItems\"\n :model-value=\"internalRangeDate.granularity\"\n full-width\n @update:model-value=\"onGranularityInput\"\n >\n </bento-segmented-control>\n\n <bento-alert v-if=\"maxRangeMessage\" variant=\"tip\">\n <template #description>\n {{ maxRangeMessage }}\n </template>\n </bento-alert>\n\n <div>\n <bento-typography stronger el=\"span\" class=\"b-date-range-picker-calendar__label\">\n {{ t('from') }}\n </bento-typography>\n\n <date-time-input\n :date-model-value=\"startDateValue\"\n :date-props=\"{\n 'aria-label': t('dateFrom'),\n type: dateInputType,\n description: !isTouchDevice ? t(dateFormat) : undefined,\n errorMessage: startDateErrorText,\n }\"\n :error-message=\"startSharedError\"\n :show-time-input=\"allowTimeInput\"\n :time-model-value=\"dateTextInput.startTime\"\n :time-props=\"{\n 'aria-label': t('timeFrom'),\n errorMessage: startSharedError,\n interval: timeInterval,\n }\"\n class=\"b-date-range-picker-calendar__form-input\"\n @click=\"finalizeHoveredRange\"\n @update:date-model-value=\"onStartDateInput\"\n @date:keydown=\"onDateInputKeyDown\"\n @update:time-model-value=\"onStartTimeInput\"\n @time:error=\"onStartTimeError\"\n @time:valid=\"onStartTimeValid\"\n />\n </div>\n\n <div>\n <bento-typography stronger el=\"span\" class=\"b-date-range-picker-calendar__label\">\n {{ t('to') }}\n </bento-typography>\n\n <date-time-input\n :date-model-value=\"endDateValue\"\n :date-props=\"{\n 'aria-label': t('dateTo'),\n type: dateInputType,\n description: !isTouchDevice ? t(dateFormat) : undefined,\n errorMessage: endDateErrorText,\n }\"\n :error-message=\"endSharedError\"\n :show-time-input=\"allowTimeInput\"\n :time-model-value=\"dateTextInput.endTime\"\n :time-props=\"{\n 'aria-label': t('timeTo'),\n errorMessage: endSharedError,\n interval: timeInterval,\n }\"\n class=\"b-date-range-picker-calendar__form-input\"\n @click=\"finalizeHoveredRange\"\n @update:date-model-value=\"onEndDateInput\"\n @date:keydown=\"onDateInputKeyDown\"\n @update:time-model-value=\"onEndTimeInput\"\n @time:error=\"onEndTimeError\"\n @time:valid=\"onEndTimeValid\"\n />\n </div>\n </div>\n\n <div v-if=\"hasSlot('actions')\">\n <slot name=\"actions\" />\n </div>\n </div>\n\n <!-- Calendar -->\n <div\n v-if=\"!hasNoCalendars && !isTouchDevice\"\n class=\"b-date-range-picker-calendar__calendars-container\"\n data-testid=\"date-range-picker-calendar-calendar-container\"\n >\n <calendar\n ref=\"calendarRef\"\n :value=\"internalRangeDate\"\n :first-day-of-week=\"firstDayOfWeek\"\n :is-date-disabled=\"isDateDisabled\"\n :max-range=\"maxRange\"\n :min=\"computedMinMax.min\"\n :max=\"computedMinMax.max\"\n :number-of-months=\"numberOfMonths\"\n :show-end-date-on-open=\"showEndDateOnOpen\"\n :granularity=\"selectedGranularity\"\n :variant=\"variant\"\n :year-range=\"yearRange\"\n is-range\n @input=\"onDateInput\"\n @start-date-selected=\"onStartDateSelected\"\n @end-date-selected=\"onEndDateSelected\"\n />\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, onMounted, type PropType, reactive, ref, toRaw, useSlots } from 'vue';\n import { Calendar, type CalendarGranularityType } from '@/internal';\n import { DateTimeInput } from '../date-time-input';\n import { BentoAlert } from '@/components/alert';\n import { BentoTypography } from '@/components/typography';\n import BentoDropdown from '@/components/dropdown/dropdown.vue';\n import { BentoSegmentedControl, type BentoSegmentedControlItem } from '@/components/segmented-control';\n import { useI18n } from '@/utils/ts/i18n';\n import { debounce } from '@/utils/ts/debounce';\n import { useDateInputFormatter, useHasSlot, useTouchDevice } from '@/composables';\n import { useGranularityAdjustments } from '@/components/internal/calendar/composables/use-granularity-adjustments';\n import { useGranularMinMaxDate } from '@/components/internal/calendar/components/calendar-month/composables/granular-min-max-date';\n import { useGranularityMemory } from '../../composables/use-granularity-memory';\n import {\n DateRangePickerCalendarEvent,\n type DateRangePickerCalendarFormData,\n type DateRangePickerCalendarRangeSelectorItems,\n } from './date-range-picker-calendar.types';\n import type {\n BentoDateRangePickerGranularityConfig,\n BentoDateRangePickerValue,\n } from '../../date-range-picker.types';\n import { endOfDay } from 'date-fns/endOfDay';\n import { startOfDay } from 'date-fns/startOfDay';\n import { isSameSecond } from 'date-fns/isSameSecond';\n import { isSameDay } from 'date-fns/isSameDay';\n import { isEqual } from 'date-fns/isEqual';\n import { isToday } from 'date-fns/isToday';\n import { setMilliseconds } from 'date-fns/setMilliseconds';\n import {\n dateToNativeDateString,\n dateToNativeMonthString,\n dateToTimeInputString,\n parseNativeMonthString,\n } from '@/utils/ts/format-date/format-date';\n import { isValidTimeString, snapTimeToInterval } from '@/utils/ts/time-input';\n import { setTimeInDateObject } from '@/utils/ts/format-date';\n import type { BentoRangeEndpoint } from '@/components/internal/calendar/composables/use-granularity-adjustments.types';\n\n import messages from './messages.json';\n\n const FORM_INPUT_DEBOUNCE_TIME = 300;\n const RANGE_SELECTOR_CUSTOM_RANGE_KEY = 'customRange';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const maxRangeMessageKeyMap: Record<CalendarGranularityType, keyof MessageSchema> = {\n daily: 'maxRangeDays',\n weekly: 'maxRangeWeeks',\n monthly: 'maxRangeMonths',\n quarterly: 'maxRangeQuarters',\n };\n\n const props = defineProps({\n /**\n * Allows user to enter time values in the form\n */\n allowTimeInput: { type: Boolean, default: false },\n\n /**\n * Ranges form persistance data\n */\n dateFormData: {\n type: Object as PropType<DateRangePickerCalendarFormData>,\n default: () => ({ startDate: undefined, endDate: undefined, startTime: undefined, endTime: undefined }),\n },\n\n /**\n * Allows you to set the first day of the week. 0 is sunday, 1 is monday, 6 is saturday\n */\n firstDayOfWeek: Calendar.props.firstDayOfWeek,\n\n /**\n * A list of available granularities.\n * If present, the date picker will display a segmented control to change granularity.\n */\n granularities: {\n type: Array as PropType<Array<BentoDateRangePickerGranularityConfig>>,\n default: null,\n },\n\n /**\n * Indicate if a date should be disabled or not\n */\n isDateDisabled: Calendar.props.isDateDisabled,\n\n /**\n * Set a maximum number of dates to be selectable by the range.\n */\n maxRange: Calendar.props.maxRange,\n\n /**\n * Sets a minimum limit for selectable dates - dates before `min` will not be selectable\n */\n min: Calendar.props.min,\n\n /**\n * Sets a maximum limit for selectable dates - dates after `max` will not be selectable\n */\n max: Calendar.props.max,\n\n /**\n * Number of months rendered on pane\n */\n numberOfMonths: {\n type: Calendar.props.numberOfMonths.type,\n default: Calendar.props.numberOfMonths.default,\n validator: (n: number) => n >= 0,\n },\n\n /**\n * Displays the end date's month when the calendar is opened. Defaults to false i.e. the start date's month is displayed.\n */\n showEndDateOnOpen: { type: Boolean, default: false },\n\n /**\n * Limits the selectable times to a fixed interval, expressed in minutes.\n */\n timeInterval: { type: Number, default: null },\n\n /**\n * Enables the custom range selector.\n * If provided, must be an array that sets the custom range dropdown items. Items are of the structure:\n * `label` - label of custom range item.\n * `value` - a unique key of the custom range item.\n * `data` - an object `{ startDate: Date; endDate: Date }` to set the date picker range to upon selecting.\n */\n quickSelectRanges: {\n type: Array as PropType<DateRangePickerCalendarRangeSelectorItems>,\n default: undefined,\n },\n\n /**\n * Selected date\n */\n value: { type: Object as PropType<BentoDateRangePickerValue>, default: undefined },\n\n /**\n * The type of calendar to display. Defaults to showing days.\n */\n variant: Calendar.props.variant,\n\n /**\n * Range of years to be selectable from the year dropdown\n */\n yearRange: Calendar.props.yearRange,\n });\n\n const emit = defineEmits([\n DateRangePickerCalendarEvent.CUSTOM_RANGE,\n DateRangePickerCalendarEvent.INPUT,\n DateRangePickerCalendarEvent.ERROR,\n DateRangePickerCalendarEvent.FORM_DATE,\n DateRangePickerCalendarEvent.START_DATE_SELECTED,\n ]);\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const { t, tc } = useI18n<{ message: MessageSchema }>({ messages });\n const { isTouchDevice } = useTouchDevice();\n const {\n dateFormat,\n isFormatValid,\n parseDate,\n onKeyDown,\n autoFormat,\n formatDate: formatDateUtil,\n } = useDateInputFormatter();\n const calculatedIsRelativeToNowQuickSelectRanges = ref({});\n const calendarRef = ref<InstanceType<typeof Calendar> | null>(null);\n\n const defaultGranularity = computed(() => (props.variant === 'month' ? 'monthly' : 'daily'));\n const hasNoCalendars = computed(() => props.numberOfMonths === 0);\n\n /**\n * Snaps a time to the closest time selectable through the time interval, if one is set.\n * @param time The time string to snap\n * @param direction Whether to round the time down or up\n */\n const snapTime = (time: string, direction: 'down' | 'up') =>\n props.timeInterval ? snapTimeToInterval(time, props.timeInterval, direction) : time;\n\n /**\n * Returns the latest selectable moment of the day the given date falls on,\n * which is the last time offered by the time interval when one is set.\n * @param date The date to resolve the end of the day for\n */\n const resolveEndOfSelectableDay = (date: Date) => {\n const dayEnd = endOfDay(date);\n\n return props.timeInterval ? setTimeInDateObject(dayEnd, snapTime(dateToTimeInputString(dayEnd), 'up')) : dayEnd;\n };\n\n const internalRangeDate = reactive<BentoDateRangePickerValue>({\n startDate: props.value?.startDate,\n endDate: props.value?.endDate,\n range: props.value?.range,\n ...(props.granularities\n ? {\n granularity: props.value?.granularity || defaultGranularity.value,\n }\n : {}),\n });\n\n /**\n * Currently range selector dropdown item that is selected.\n * The logic will try and find in each range item:\n * - If an endDate does not exist, then only check if the startDate day matches and if today's day matches.\n * - if time input has been enabled, then check if the seconds match.\n * - if an endDate does exist then just check if the startDate day and the endDate day match.\n *\n * Note: All date comparisons use local time consistently. Both sides of each comparison\n * originate from the same timezone context, so no UTC normalization is needed.\n */\n const selectedRangeSelectorValue = computed(() => {\n return (\n // eslint-disable-next-line consistent-return\n props?.quickSelectRanges?.find(({ value, data }) => {\n if (!data.endDate) {\n // Check if this quick select range is explicitly marked as \"relative to now\"\n if (data.isRelativeToNow) {\n // Retrieve previously calculated start/end dates for this relative range.\n // We use these if the user has already clicked on this time of quick range\n const newlyCalculatedQuickSelectDates =\n calculatedIsRelativeToNowQuickSelectRanges.value?.[value];\n return newlyCalculatedQuickSelectDates\n ? isEqual(newlyCalculatedQuickSelectDates.startDate, internalRangeDate.startDate) &&\n isEqual(newlyCalculatedQuickSelectDates.endDate, internalRangeDate.endDate)\n : // If not stored calculated dates, fall back to comparing the quick select item's value\n // with the internal range's stored range identifier.\n value === internalRangeDate.range;\n }\n // This block handles quick select ranges that do not have an endDate\n // AND are NOT explicitly marked as 'isRelativeToNow'.\n // This means the endDate will be today at the end of the day.\n // Uses isEqual for startDate to prevent false matches (e.g. same-day selection\n // accidentally matching a \"This week\" range). When time input is enabled,\n // also verify the end time is at end of day so that manual time changes\n // correctly fall back to \"Custom range\".\n return (\n isEqual(data.startDate, internalRangeDate.startDate) &&\n isToday(internalRangeDate.endDate) &&\n (!props.allowTimeInput ||\n isSameSecond(\n internalRangeDate.endDate,\n resolveEndOfSelectableDay(internalRangeDate.endDate)\n )) &&\n (props.granularities ? data.granularity === internalRangeDate.granularity : true)\n );\n }\n\n if (props.allowTimeInput) {\n const res =\n isSameSecond(data.startDate, internalRangeDate.startDate) &&\n isSameSecond(data.endDate, internalRangeDate.endDate) &&\n (props.granularities ? data.granularity === internalRangeDate.granularity : true);\n return res;\n }\n\n if (data.endDate) {\n return (\n isSameDay(data.startDate, internalRangeDate.startDate) &&\n isSameDay(data.endDate, internalRangeDate.endDate) &&\n (props.granularities ? data.granularity === internalRangeDate.granularity : true)\n );\n }\n })?.value ?? RANGE_SELECTOR_CUSTOM_RANGE_KEY\n );\n });\n const quickSelectRangeDefaultItems = computed(() => [\n { label: t('customRange'), value: RANGE_SELECTOR_CUSTOM_RANGE_KEY },\n ...(props.quickSelectRanges ? props.quickSelectRanges : []),\n ]);\n\n const selectedGranularity = computed(\n () => props.granularities?.find(({ type }) => type === internalRangeDate.granularity) || null\n );\n\n const granularityItems = computed<Array<BentoSegmentedControlItem>>(\n () =>\n props.granularities?.map(({ type, disabled }) => ({\n label: t(type),\n value: type,\n disabled,\n })) ?? []\n );\n\n const { getGranularCalendarLimits } = useGranularMinMaxDate(props);\n\n const computedMinMax = computed(() =>\n props.granularities\n ? getGranularCalendarLimits(selectedGranularity.value)\n : { min: props.min ? startOfDay(props.min) : null, max: props.max ? endOfDay(props.max) : null }\n );\n\n const { normalizeRange } = useGranularityAdjustments(props.firstDayOfWeek);\n const { savedRanges, saveRange, resetSavedRanges } = useGranularityMemory();\n\n /**\n * Format date to a string value in current format\n * @param dateToFormat - Date to be formatted\n */\n const formatDate = (dateToFormat?: Date) => {\n if (!dateToFormat) {\n return '';\n }\n return formatDateUtil(dateToFormat);\n };\n\n /**\n * Applies all active range constraints to the current value.\n * @param fixedEndpoint - Endpoint to keep unchanged when maxRange shortens the range.\n * @param alignToGranularity - Whether to expand dates to complete granularity units.\n */\n const normalizeInternalRange = (fixedEndpoint: BentoRangeEndpoint, alignToGranularity = true) => {\n if (!internalRangeDate.startDate || !internalRangeDate.endDate) {\n return;\n }\n\n const normalizedRange = normalizeRange({\n startDate: internalRangeDate.startDate,\n endDate: internalRangeDate.endDate,\n fixedEndpoint,\n granularity: selectedGranularity.value,\n alignToGranularity,\n fallbackMaxRange: props.maxRange,\n min: computedMinMax.value.min,\n max: computedMinMax.value.max,\n });\n if (\n isEqual(normalizedRange.startDate, internalRangeDate.startDate) &&\n isEqual(normalizedRange.endDate, internalRangeDate.endDate)\n ) {\n return;\n }\n\n internalRangeDate.startDate = normalizedRange.startDate;\n internalRangeDate.endDate = normalizedRange.endDate;\n dateTextInput.startDate = formatDate(normalizedRange.startDate);\n dateTextInput.endDate = formatDate(normalizedRange.endDate);\n };\n\n // Form error keys\n const startDateError = ref<keyof MessageSchema | null>(null);\n const endDateError = ref<keyof MessageSchema | null>(null);\n\n // Translated error messages for the template\n const startDateErrorText = computed(() => (startDateError.value ? t(startDateError.value) : null));\n const endDateErrorText = computed(() => (endDateError.value ? t(endDateError.value) : null));\n\n // Shared errors exclude format errors since those only concern the date input\n const startSharedError = computed(() =>\n startDateError.value === 'invalidDateFormat' ? null : startDateErrorText.value\n );\n const endSharedError = computed(() => (endDateError.value === 'invalidDateFormat' ? null : endDateErrorText.value));\n\n /**\n * Returns a translated error message for a given date string, or null if valid.\n * @param dateText The date string to validate.\n * @param counterpartDate Optional date to compare against for range order validation.\n * @param role Whether the date being validated is the 'start' or 'end' of the range.\n */\n const getDateErrorMessage = (\n dateText: string,\n counterpartDate?: Date,\n role?: 'start' | 'end',\n resolvedDateTime?: Date\n ): keyof MessageSchema | null => {\n if (!dateText || !isFormatValid(dateText)) {\n return 'invalidDateFormat';\n }\n\n const date = parseDate(dateText);\n const dayDate = startOfDay(date);\n\n if ((props.min && dayDate < startOfDay(props.min)) || (props.max && dayDate > startOfDay(props.max))) {\n return 'selectedDateIsNotAvailable';\n }\n\n if (props.isDateDisabled && props.isDateDisabled(dayDate)) {\n return 'selectedDateIsNotAvailable';\n }\n\n if (counterpartDate) {\n // When time input is enabled and we have a resolved datetime, compare full datetimes;\n // otherwise fall back to day-level comparison.\n const current = resolvedDateTime ? setMilliseconds(resolvedDateTime, 0).getTime() : dayDate.getTime();\n const counterpart = resolvedDateTime\n ? setMilliseconds(counterpartDate, 0).getTime()\n : startOfDay(counterpartDate).getTime();\n\n const isInvalid = role === 'start' ? current >= counterpart : current <= counterpart;\n\n if (isInvalid) {\n return 'startDateMustPrecedeEndDate';\n }\n }\n\n return null;\n };\n\n // Form input text used in range variant\n const dateTextInput = reactive({\n startDate: props.dateFormData.startDate,\n endDate: props.dateFormData.endDate,\n startTime: snapTime(props.dateFormData.startTime, 'down'),\n endTime: snapTime(props.dateFormData.endTime, 'up'),\n });\n\n /**\n * Checks if a time string is valid and within the min/max bounds if a date is provided.\n * @param timeText The time string to validate.\n * @param date The date string to check the time against.\n * @returns True if the time is valid, false otherwise.\n */\n const isValidTime = (timeText: string, date?: string) => {\n const isTimeAllowed = () => {\n if (date && isValidDate(date)) {\n const dateToCheckWithTime = setTimeInDateObject(parseDate(date), timeText);\n // Check if date is between min/max bounds, if there are any\n if (\n (props.min && dateToCheckWithTime < setMilliseconds(props.min, 0)) ||\n (props.max && dateToCheckWithTime > setMilliseconds(props.max, 0))\n ) {\n return false;\n }\n }\n\n return true;\n };\n\n return isValidTimeString(timeText) && isTimeAllowed();\n };\n\n const isMonthVariant = computed(() => props.variant === 'month');\n\n const formatNativeDate = (date: Date): string => {\n if (!date) {\n return '';\n }\n\n return isMonthVariant.value ? dateToNativeMonthString(date) : dateToNativeDateString(date);\n };\n\n const nativeStartDate = computed(() => formatNativeDate(internalRangeDate.startDate));\n const nativeEndDate = computed(() => formatNativeDate(internalRangeDate.endDate));\n const dateInputType = computed(() => (isTouchDevice.value ? (isMonthVariant.value ? 'month' : 'date') : 'text'));\n\n const startDateValue = computed(() => (isTouchDevice.value ? nativeStartDate.value : dateTextInput.startDate));\n const endDateValue = computed(() => (isTouchDevice.value ? nativeEndDate.value : dateTextInput.endDate));\n\n /**\n * Sets the time in a date object if the time is valid and the variant is not 'month'.\n * @param date The date object to modify.\n * @param time The time string to set.\n * @returns The modified date object or the original if time is not set.\n */\n const setTimeInDateRef = (date: Date, time: string) => {\n // Do not set time if month variant\n if (!time || !isValidTimeString(time) || props.variant === 'month') {\n return date;\n }\n\n return setTimeInDateObject(new Date(date), time);\n };\n\n const updateSelectedRange = (selectedRange: BentoDateRangePickerValue, preserveInputTimes = false) => {\n if (!preserveInputTimes) {\n const isStartLimitedByMin =\n props.min && props.allowTimeInput && isSameDay(props.min, selectedRange.startDate);\n const isEndLimitedByMax = props.max && props.allowTimeInput && isSameDay(props.max, selectedRange.endDate);\n\n // Times taken from `min`/`max` are snapped towards the middle of the range to stay within bounds\n dateTextInput.startTime = isStartLimitedByMin\n ? snapTime(dateToTimeInputString(props.min), 'up')\n : snapTime(dateToTimeInputString(startOfDay(selectedRange.startDate)), 'down');\n dateTextInput.endTime = isEndLimitedByMax\n ? snapTime(dateToTimeInputString(props.max), 'down')\n : snapTime(dateToTimeInputString(endOfDay(selectedRange.endDate)), 'up');\n }\n\n internalRangeDate.startDate = setTimeInDateRef(selectedRange.startDate, dateTextInput.startTime);\n internalRangeDate.endDate = setTimeInDateRef(selectedRange.endDate, dateTextInput.endTime);\n // Resetting internal range date when selecting a custom range through the calendar\n internalRangeDate.range = null;\n\n if (props.granularities) {\n // Reset saved ranges on input\n resetSavedRanges();\n }\n\n emit(DateRangePickerCalendarEvent.INPUT, {\n ...internalRangeDate,\n range: selectedRangeSelectorValue.value,\n });\n };\n\n const onDateInput = (selectedRange: BentoDateRangePickerValue) => {\n updateSelectedRange(selectedRange);\n };\n\n const finalizeHoveredRange = () => {\n const selectedRange = calendarRef.value?.finalizeRangeSelection();\n\n if (selectedRange) {\n updateSelectedRange(selectedRange, true);\n }\n };\n\n /**\n * Checks if a date string is in current format and if the date is enabled.\n * @param dateText The date string to validate.\n * @returns True if the date is valid and enabled, false otherwise.\n */\n const isValidDate = (dateText: string): boolean => !!dateText && !getDateErrorMessage(dateText);\n\n /**\n * When mounted, set the input error states to true if the values are not valid\n */\n onMounted(() => {\n // Start date validation\n startDateError.value = props.dateFormData.startDate ? getDateErrorMessage(props.dateFormData.startDate) : null;\n\n // Start time validation is delegated to bento-input-time via events\n\n // End date validation\n endDateError.value = props.dateFormData.endDate ? getDateErrorMessage(props.dateFormData.endDate) : null;\n\n // End time validation is delegated to bento-input-time via events\n });\n\n const onStartDateSelected = (newStartDate: Date) => {\n dateTextInput.startDate = formatDate(newStartDate);\n if (!dateTextInput.startTime) {\n // Set the time to the beginning of the day\n dateTextInput.startTime = snapTime(dateToTimeInputString(newStartDate), 'down');\n }\n\n startDateError.value = null;\n\n if (endDateError.value === 'startDateMustPrecedeEndDate') {\n endDateError.value = null;\n }\n\n emit(DateRangePickerCalendarEvent.START_DATE_SELECTED, newStartDate);\n };\n\n const onEndDateSelected = (newEndDate: Date) => {\n dateTextInput.endDate = formatDate(newEndDate);\n if (!dateTextInput.endTime) {\n // Set the time to the end of the day\n dateTextInput.endTime = snapTime(dateToTimeInputString(endOfDay(newEndDate)), 'up');\n }\n\n endDateError.value = null;\n\n if (startDateError.value === 'startDateMustPrecedeEndDate') {\n startDateError.value = null;\n }\n };\n\n const getDate = (keyName: 'startDate' | 'endDate') => {\n const dateProp = props.value?.[keyName];\n if (dateProp) {\n return dateProp;\n }\n\n if (props.dateFormData[keyName] && isValidDate(props.dateFormData[keyName])) {\n return parseDate(props.dateFormData[keyName]);\n }\n\n return undefined;\n };\n\n const validateStartDate = (startDateText: string, alignToGranularity = false) => {\n if (isValidDate(startDateText)) {\n const dateText = startDateText;\n\n startDateError.value = null;\n\n dateTextInput.startDate = dateText;\n\n const startDate = startOfDay(parseDate(dateText));\n internalRangeDate.startDate = setTimeInDateRef(startDate, dateTextInput.startTime);\n\n if (isValidDate(dateTextInput.endDate)) {\n internalRangeDate.endDate = setTimeInDateRef(\n startOfDay(parseDate(dateTextInput.endDate)),\n dateTextInput.endTime\n );\n }\n\n const endDate = getDate('endDate');\n const rangeError = getDateErrorMessage(\n dateText,\n props.allowTimeInput ? internalRangeDate.endDate : endDate,\n 'start',\n props.allowTimeInput ? internalRangeDate.startDate : undefined\n );\n\n if (rangeError) {\n startDateError.value = rangeError;\n emit(DateRangePickerCalendarEvent.ERROR, { ...dateTextInput });\n return;\n }\n\n if (endDateError.value === 'startDateMustPrecedeEndDate') {\n endDateError.value = null;\n }\n\n // The user changed the start date, so preserve the existing end date.\n normalizeInternalRange('end', alignToGranularity);\n\n // Resetting internal range date when selecting a custom range through the calendar\n internalRangeDate.range = null;\n\n emit(DateRangePickerCalendarEvent.FORM_DATE, {\n startDate: internalRangeDate.startDate,\n endDate: internalRangeDate.endDate,\n });\n\n emit(DateRangePickerCalendarEvent.INPUT, {\n ...internalRangeDate,\n range: selectedRangeSelectorValue.value,\n });\n } else {\n // Indicate form error\n startDateError.value = getDateErrorMessage(startDateText);\n // Emit Date picker calendar error\n emit(DateRangePickerCalendarEvent.ERROR, { ...dateTextInput });\n }\n };\n\n const validateStartDateDebounced = debounce(validateStartDate, FORM_INPUT_DEBOUNCE_TIME);\n\n const onStartDateInput = (startDateText: string) => {\n // Set the date as string when input through the form\n // Bypassing autoFormat for native month input since it doesn't support YYYY-MM\n dateTextInput.startDate =\n isTouchDevice.value && isMonthVariant.value ? startDateText : autoFormat(startDateText);\n\n if (isTouchDevice.value) {\n if (isMonthVariant.value && startDateText) {\n validateStartDate(formatDate(parseNativeMonthString(startDateText)), true);\n } else if (dateTextInput.startDate) {\n validateStartDate(dateTextInput.startDate);\n } else {\n // on touch devices, skip the any intermediate values e.g. pressing zero first\n startDateError.value = null;\n }\n } else {\n validateStartDateDebounced(dateTextInput.startDate);\n }\n };\n\n const validateEndDate = (endDateText: string, alignToGranularity = false) => {\n if (isValidDate(endDateText)) {\n const dateText = endDateText;\n\n endDateError.value = null;\n\n dateTextInput.endDate = dateText;\n\n // Format date string to Date object\n const endDate = startOfDay(parseDate(dateText));\n internalRangeDate.endDate = setTimeInDateRef(endDate, dateTextInput.endTime);\n if (isValidDate(dateTextInput.startDate)) {\n internalRangeDate.startDate = setTimeInDateRef(\n startOfDay(parseDate(dateTextInput.startDate)),\n dateTextInput.startTime\n );\n }\n\n const startDate = getDate('startDate');\n const rangeError = getDateErrorMessage(\n dateText,\n props.allowTimeInput ? internalRangeDate.startDate : startDate,\n 'end',\n props.allowTimeInput ? internalRangeDate.endDate : undefined\n );\n\n if (rangeError) {\n endDateError.value = rangeError;\n emit(DateRangePickerCalendarEvent.ERROR, { ...dateTextInput });\n return;\n }\n\n if (startDateError.value === 'startDateMustPrecedeEndDate') {\n startDateError.value = null;\n }\n\n // The user changed the end date, so preserve the existing start date.\n normalizeInternalRange('start', alignToGranularity);\n\n // Resetting internal range date when selecting a custom range through the calendar\n internalRangeDate.range = null;\n\n emit(DateRangePickerCalendarEvent.FORM_DATE, {\n startDate: internalRangeDate.startDate,\n endDate: internalRangeDate.endDate,\n });\n\n emit(DateRangePickerCalendarEvent.INPUT, {\n ...internalRangeDate,\n range: selectedRangeSelectorValue.value,\n });\n } else {\n // Indicate form error\n endDateError.value = getDateErrorMessage(endDateText);\n // Emit Date picker calendar error\n emit(DateRangePickerCalendarEvent.ERROR, { ...dateTextInput });\n }\n };\n\n const validateEndDateDebounced = debounce(validateEndDate, FORM_INPUT_DEBOUNCE_TIME);\n\n const onEndDateInput = (endDateText: string) => {\n // Set the date as string when input through the form\n // Bypassing autoFormat for native month input since it doesn't support YYYY-MM\n dateTextInput.endDate = isTouchDevice.value && isMonthVariant.value ? endDateText : autoFormat(endDateText);\n\n if (isTouchDevice.value) {\n if (isMonthVariant.value && endDateText) {\n validateEndDate(formatDate(parseNativeMonthString(endDateText)), true);\n } else if (dateTextInput.endDate) {\n validateEndDate(dateTextInput.endDate);\n } else {\n // on touch devices, skip the any intermediate values e.g. pressing zero first\n endDateError.value = null;\n }\n } else {\n validateEndDateDebounced(dateTextInput.endDate);\n }\n };\n\n const onDateInputKeyDown = (event: KeyboardEvent) => {\n onKeyDown(event);\n };\n\n const onStartTimeError = () => {\n emit(DateRangePickerCalendarEvent.ERROR, { ...dateTextInput });\n };\n\n const onStartTimeValid = () => {\n const startTimeText = dateTextInput.startTime;\n if (!isValidTime(startTimeText, dateTextInput.startDate)) {\n emit(DateRangePickerCalendarEvent.ERROR, { ...dateTextInput });\n return;\n }\n internalRangeDate.startDate = setTimeInDateRef(internalRangeDate.startDate, startTimeText);\n\n // Validate range order with updated time\n if (dateTextInput.startDate && internalRangeDate.endDate) {\n const rangeError = getDateErrorMessage(\n dateTextInput.startDate,\n internalRangeDate.endDate,\n 'start',\n internalRangeDate.startDate\n );\n\n if (rangeError) {\n startDateError.value = rangeError;\n emit(DateRangePickerCalendarEvent.ERROR, { ...dateTextInput });\n return;\n }\n }\n\n startDateError.value = null;\n if (endDateError.value === 'startDateMustPrecedeEndDate') {\n endDateError.value = null;\n }\n\n const endDate = getDate('endDate');\n\n emit(DateRangePickerCalendarEvent.FORM_DATE, {\n startDate: internalRangeDate.startDate,\n endDate,\n startTime: startTimeText,\n endTime: dateTextInput.endTime ?? props.dateFormData.endTime,\n });\n\n emit(DateRangePickerCalendarEvent.INPUT, {\n ...internalRangeDate,\n range: selectedRangeSelectorValue.value,\n });\n };\n\n const onEndTimeError = () => {\n emit(DateRangePickerCalendarEvent.ERROR, { ...dateTextInput });\n };\n\n const onEndTimeValid = () => {\n const endTimeText = dateTextInput.endTime;\n if (!isValidTime(endTimeText, dateTextInput.endDate)) {\n emit(DateRangePickerCalendarEvent.ERROR, { ...dateTextInput });\n return;\n }\n internalRangeDate.endDate = setTimeInDateRef(internalRangeDate.endDate, endTimeText);\n\n // Validate range order with updated time\n if (dateTextInput.endDate && internalRangeDate.startDate) {\n const rangeError = getDateErrorMessage(\n dateTextInput.endDate,\n internalRangeDate.startDate,\n 'end',\n internalRangeDate.endDate\n );\n\n if (rangeError) {\n endDateError.value = rangeError;\n emit(DateRangePickerCalendarEvent.ERROR, { ...dateTextInput });\n return;\n }\n }\n\n endDateError.value = null;\n if (startDateError.value === 'startDateMustPrecedeEndDate') {\n startDateError.value = null;\n }\n\n emit(DateRangePickerCalendarEvent.FORM_DATE, {\n startDate: internalRangeDate.startDate,\n endDate: internalRangeDate.endDate,\n startTime: dateTextInput.startTime ?? props.dateFormData.startTime,\n endTime: endTimeText,\n });\n emit(DateRangePickerCalendarEvent.INPUT, {\n ...internalRangeDate,\n range: selectedRangeSelectorValue.value,\n });\n };\n\n const onStartTimeInput = (startTimeText: string) => {\n dateTextInput.startTime = startTimeText;\n };\n\n const onEndTimeInput = (endTimeText: string) => {\n dateTextInput.endTime = endTimeText;\n };\n\n const setInternalRange = (\n startDate: Date,\n endDate: Date,\n granularity?: CalendarGranularityType,\n range?: string\n ) => {\n internalRangeDate.startDate = startDate;\n internalRangeDate.endDate = endDate;\n\n if (granularity) {\n internalRangeDate.granularity = granularity;\n }\n\n if (range) {\n internalRangeDate.range = range;\n }\n };\n\n const onRangeSelectorInput = (newCustomRangeValue: string) => {\n const foundResult = props.quickSelectRanges?.find(({ value }) => value === newCustomRangeValue);\n\n if (foundResult) {\n resetSavedRanges();\n const date = foundResult.data;\n const rangeEndDate =\n date.endDate || (date.isRelativeToNow ? new Date(Date.now()) : endOfDay(new Date(Date.now())));\n // If the time difference between start and end dates is available,\n // calculating start date dynamically\n const rangeStartDate =\n date.isRelativeToNow && date.timeDifference\n ? new Date(rangeEndDate.getTime() - date.timeDifference)\n : date.startDate;\n\n // Set Form input time to quick select range time\n const startTime = snapTime(dateToTimeInputString(rangeStartDate), 'down');\n const endTime = snapTime(dateToTimeInputString(rangeEndDate), 'up');\n\n // A quick select range can hold times the time dropdowns do not offer, so the range follows the snapped times\n const shouldSnapRange = props.allowTimeInput && !!props.timeInterval;\n const newStartDate = shouldSnapRange ? setTimeInDateRef(rangeStartDate, startTime) : rangeStartDate;\n const newEndDate = shouldSnapRange ? setTimeInDateRef(rangeEndDate, endTime) : rangeEndDate;\n\n // Set Form input Dates\n dateTextInput.endDate = formatDate(newEndDate);\n dateTextInput.startDate = formatDate(newStartDate);\n dateTextInput.startTime = startTime;\n dateTextInput.endTime = endTime;\n\n setInternalRange(newStartDate, newEndDate, null, newCustomRangeValue);\n\n if (props.granularities) {\n internalRangeDate.granularity = date.granularity || defaultGranularity.value;\n }\n\n if (date.isRelativeToNow) {\n // Store this calculated start and end dates to be used in the selectedRangeSelectorValue logic\n calculatedIsRelativeToNowQuickSelectRanges.value = {\n ...calculatedIsRelativeToNowQuickSelectRanges.value,\n [newCustomRangeValue]: {\n startDate: newStartDate,\n endDate: newEndDate,\n },\n };\n }\n\n // Emit everytime the date range changes\n emit(DateRangePickerCalendarEvent.CUSTOM_RANGE, {\n ...foundResult.data,\n startDate: newStartDate,\n endDate: newEndDate,\n range: foundResult.value,\n });\n }\n };\n\n const onGranularityInput = (value: CalendarGranularityType) => {\n const previousValue = internalRangeDate.granularity;\n\n internalRangeDate.granularity = value;\n\n // Save previously selected range\n if (previousValue) {\n saveRange(previousValue, structuredClone(toRaw(internalRangeDate)));\n }\n\n if (internalRangeDate.startDate && internalRangeDate.endDate) {\n if (savedRanges[value]) {\n setInternalRange(savedRanges[value].startDate, savedRanges[value].endDate, value);\n }\n\n // Keep the most recent endpoint when the new granularity shortens the range.\n normalizeInternalRange('end');\n\n dateTextInput.startDate = formatDate(internalRangeDate.startDate);\n dateTextInput.endDate = formatDate(internalRangeDate.endDate);\n\n emit(DateRangePickerCalendarEvent.INPUT, {\n ...internalRangeDate,\n range: selectedRangeSelectorValue.value,\n });\n }\n };\n\n const computedFormContainerClasses = computed(() => ({\n 'b-date-range-picker-calendar__form-container--no-calendars': hasNoCalendars.value || isTouchDevice.value,\n }));\n\n const maxRangeMessage = computed(() => {\n const granularity = selectedGranularity.value;\n const count = granularity?.maxRange || props.maxRange;\n if (!count) {\n return null;\n }\n const key = maxRangeMessageKeyMap[granularity?.type ?? 'daily'];\n return tc(key, count, { count });\n });\n\n /**\n * Aligns the initial range with the times the time dropdowns offer, so that\n * any change emits a range the time interval can actually represent.\n */\n const alignInitialRangeWithTimeInterval = () => {\n if (!props.allowTimeInput || !props.timeInterval) {\n return;\n }\n\n if (internalRangeDate.startDate) {\n internalRangeDate.startDate = setTimeInDateRef(internalRangeDate.startDate, dateTextInput.startTime);\n }\n\n if (internalRangeDate.endDate) {\n internalRangeDate.endDate = setTimeInDateRef(internalRangeDate.endDate, dateTextInput.endTime);\n }\n };\n\n alignInitialRangeWithTimeInterval();\n</script>\n\n<script lang=\"ts\">\n /**\n * Calendar for range dates. Contains the logic to handle the range forms.\n *\n * @example\n * import DatePickerCalendarRange from './date-range-picker-calendar.vue';\n *\n * export default {\n * components: { DatePickerCalendarRange },\n * template: `\n * <date-range-picker-calendar\n * :value=\"{startDate: new Date(), endDate: new Date() }\"\n * :first-day-of-week=\"BentoDatePickerFirstDayOfWeek.MONDAY\"\n * :is-date-disabled=\"(date: Date) => boolean\"\n * :number-of-months=\"2\"\n * @input=\"({ startDate, endDate }) => void\"\n * />\n * `\n * }\n */\n export default {\n name: 'date-range-picker-calendar',\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./date-range-picker-calendar.scss\" />\n","import { computed, reactive, watch } from 'vue';\nimport { useI18n } from '@/utils/ts/i18n';\nimport { type UseDateDisplayText } from './use-date-range-picker-calendar-text.types';\nimport { type CalendarRangeDateValue } from '@/internal';\nimport { type DateRangePickerCalendarFormData } from '../components/date-range-picker-calendar/date-range-picker-calendar.types';\nimport { getQuarter } from 'date-fns/getQuarter';\nimport { getYear } from 'date-fns/getYear';\nimport { isSameQuarter } from 'date-fns/isSameQuarter';\nimport { dateToTimeInputString, getDateTimeFormatter } from '@/utils/ts/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 Date Range Picker\n * @param {Ref<Date>} option.datePickerValue Ref to the datePickerValue set in the DateRangePicker component\n * @param {Ref<boolean>} option.isDateIncorrect Indicates if the date is correct or not\n * @param {Ref<DateRangePickerCalendarRangeSelectorItems>} option.quickSelectRanges Ref to the quick select date ranges (optional)\n * @param {?Ref<boolean>} option.isMonthVariant Indicates if the date range picker has variant \"month\"\n */\nexport const useDateRangePickerCalendarText: UseDateDisplayText<CalendarRangeDateValue> = ({\n datePickerValue,\n isDateIncorrect,\n quickSelectRanges,\n isMonthVariant,\n withTimeInput,\n placeholder,\n}) => {\n const { locale, t } = useI18n<{ message: MessageSchema }>({ messages });\n const { dateToInputDateString } = useDateInputFormatter();\n\n const isValidDate = date => !!date && !isNaN(date.getTime());\n\n // Handle the form input text\n const textInputDisplayValue = reactive<DateRangePickerCalendarFormData>({\n startDate: null,\n endDate: null,\n startTime: null,\n endTime: null,\n });\n\n watch(\n datePickerValue,\n newDatePickerValue => {\n textInputDisplayValue.startDate = dateToInputDateString(newDatePickerValue?.startDate);\n textInputDisplayValue.endDate = dateToInputDateString(newDatePickerValue?.endDate);\n textInputDisplayValue.startTime = dateToTimeInputString(newDatePickerValue?.startDate);\n textInputDisplayValue.endTime = dateToTimeInputString(newDatePickerValue?.endDate);\n },\n { immediate: true }\n );\n\n const dateDisplayValue = computed(() => {\n // Display incorrect date when there's an error with the input\n if (isDateIncorrect.value) {\n return `${textInputDisplayValue.startDate || ''} - ${textInputDisplayValue.endDate || ''}`;\n }\n\n // Display \"Select a date\" when there's no date selected or input\n if (!datePickerValue.value || (!datePickerValue.value.startDate && !datePickerValue.value.endDate)) {\n return placeholder?.value || (t('selectDateRange') as string);\n }\n\n if (quickSelectRanges.value?.length) {\n const customRangeSelected = quickSelectRanges.value.find(({ value }) => {\n return value === datePickerValue.value?.range;\n });\n\n if (customRangeSelected) {\n return customRangeSelected.label;\n }\n }\n\n if (datePickerValue.value.granularity === 'quarterly') {\n const { startDate, endDate } = datePickerValue.value;\n const startQuarter = t('quarter', { quarter: getQuarter(startDate), year: getYear(startDate) });\n\n // If a single quarter is selected, show it only (e.g.: `Q2 2024`)\n if (isSameQuarter(startDate, endDate)) {\n return startQuarter;\n }\n\n const endQuarter = t('quarter', { quarter: getQuarter(endDate), year: getYear(endDate) });\n return `${startQuarter} - ${endQuarter}`;\n }\n\n if (!isValidDate(datePickerValue.value.startDate) || !isValidDate(datePickerValue.value.endDate)) {\n return `${textInputDisplayValue.startDate || ''} - ${textInputDisplayValue.endDate || ''}`;\n }\n\n let formatRangeOptions: Intl.DateTimeFormatOptions = isMonthVariant?.value\n ? { month: 'long', year: 'numeric' }\n : { month: 'short', day: '2-digit', year: 'numeric' };\n\n if (withTimeInput.value) {\n formatRangeOptions = {\n ...formatRangeOptions,\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric',\n hour12: false,\n };\n }\n\n return getDateTimeFormatter(locale.value, formatRangeOptions).formatRange(\n datePickerValue.value.startDate,\n datePickerValue.value.endDate\n );\n });\n\n const formatTextInputDisplayValue = () => '';\n\n return {\n // Values\n dateDisplayValue,\n textInputDisplayValue,\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 v-bento-click-outside-directive=\"closeDateRangePicker\" class=\"b-date-range-picker\">\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 ref=\"inputWrapperRef\" @keydown.enter=\"onEnterPressedOverInput\">\n <dropdown-input-default\n ref=\"inputContainerRef\"\n always-combobox-is-input\n :ariaControls=\"datePickerContainerId\"\n :ariaExpanded=\"isDateRangePickerOpen\"\n :aria-labelledby=\"dropdownInputAriaLabelledBy\"\n :aria-describedby=\"ariaDescribedBy\"\n :aria-required=\"required\"\n :disabled=\"disabled\"\n :is-invalid=\"!!errorMessage || shouldDisplayError\"\n :open=\"isDateRangePickerOpen\"\n :display-value=\"localDateDisplayValue\"\n :readonly=\"isReadOnly\"\n @open=\"openDateRangePicker\"\n @clear=\"clearDateRangePickerValue\"\n @close=\"closeDateRangePicker\"\n />\n </div>\n\n <!-- Error Messages -->\n <error-message\n v-if=\"shouldDisplayError\"\n :id=\"dateErrorId\"\n :error-message=\"t('invalidDateFormat')\"\n class=\"b-date-range-picker__error-message\"\n />\n <error-message\n v-if=\"!!errorMessage\"\n :id=\"errorId\"\n :error-message=\"errorMessage\"\n class=\"b-date-range-picker__error-message\"\n />\n\n <!-- Description -->\n <bento-typography\n v-if=\"description\"\n :id=\"descriptionId\"\n class=\"b-date-range-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-range-picker__container\"\n :open=\"isDateRangePickerOpen\"\n :target-element=\"inputContainerRef\"\n :aria-label=\"popoverAriaLabel\"\n position=\"bottom-start\"\n fallback-strategy=\"initialPlacement\"\n without-space\n fit-content\n :match-width=\"shouldMatchPopoverWidth\"\n trap-all\n overflow-visible\n :trap-all-options=\"trapAllOptions\"\n @keydown.esc.native=\"closeDateRangePicker\"\n >\n <date-range-picker-calendar\n :allow-time-input=\"withTimeInput\"\n :quick-select-ranges=\"adjustedQuickSelectRanges\"\n :value=\"selectedDate\"\n :first-day-of-week=\"resolvedFirstDayOfWeek\"\n :granularities=\"granularities\"\n :is-date-disabled=\"isDateDisabled\"\n :max-range=\"maxRange\"\n :min=\"min\"\n :max=\"max\"\n :number-of-months=\"computedNumberOfMonths\"\n :show-end-date-on-open=\"showEndDateOnOpen\"\n :time-interval=\"resolvedTimeInterval\"\n :date-form-data=\"displayedTextInputValue\"\n :variant=\"variant\"\n :year-range=\"yearRange\"\n @custom-range=\"onRangeSelectorInput\"\n @input=\"onDateRangePickerInput\"\n @error=\"onDateRangePickerError\"\n @form-date=\"onDateRangePickerFormDateInputUpdate\"\n >\n <template #actions>\n <bento-divider />\n\n <div class=\"b-date-range-picker__footer\">\n <bento-button-actions\n :actions=\"rangePickerButtonActions\"\n :layout=\"BentoButtonActionsLayout.SPACE_BETWEEN\"\n />\n </div>\n </template>\n </date-range-picker-calendar>\n </bento-popover>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, type HTMLAttributes, onMounted, ref, toRaw, toRef, useAttrs, watch } from 'vue';\n import { useBreakpoints, useElementSize } from '@vueuse/core';\n\n // Components\n import { BentoButtonActions, BentoButtonActionsLayout } from '../button';\n import { BentoDivider } from '@/components/divider';\n import { BentoPopover } from '@/components/popover';\n import { BentoTypography } from '../typography';\n import { DateRangePickerCalendar } from './components/date-range-picker-calendar';\n import { DropdownInputDefault } from '@/components/dropdown/components';\n import { ErrorMessage, FieldLabel } from '@/internal';\n\n // Utils\n import { generateUid } from '@/utils/ts/generate-uid';\n import { useI18n } from '@/utils/ts/i18n';\n import { printDevelopmentWarning } from '@/utils/ts/print-development-warning';\n import { snapTimeToInterval } from '@/utils/ts/time-input';\n import { dateToTimeInputString, setTimeInDateObject } from '@/utils/ts/format-date';\n import { useDateInputFormatter } from '@/composables/use-date-input-formatter/use-date-input-formatter';\n\n // Composables\n import { useDateRangePickerCalendarText } from './composables/use-date-range-picker-calendar-text';\n import { useFirstDayOfWeek, useFormLayoutFieldLoading } from '@/composables';\n\n // Directives\n import { BentoClickOutsideDirective as vBentoClickOutsideDirective } from '@/directives';\n\n // Types\n import {\n type BentoDateRangePickerEmits,\n type BentoDateRangePickerProps,\n type BentoDateRangePickerValue,\n } from './date-range-picker.types';\n import type { MaybeElement } from '@/types/elements';\n import {\n type DateRangePickerCalendarFormData,\n type DateRangePickerCalendarRangeSelectorItem,\n } from './components/date-range-picker-calendar/date-range-picker-calendar.types';\n\n import messages from './messages.json';\n import { useFormFieldEmits } from '@/utils/ts/form-field/form-field';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const emit = defineEmits([\"update:model-value\"]);\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 allowTimeInput: { type: Boolean },\n firstDayOfWeek: { default: undefined },\n granularities: null,\n isDateDisabled: { default: undefined },\n showEndDateOnOpen: { type: Boolean, default: false },\n quickSelectRanges: { default: undefined },\n maxRange: { default: null },\n min: { default: null },\n max: { default: null },\n numberOfMonths: { default: undefined },\n timeInterval: { default: undefined },\n modelValue: { default: null },\n variant: { default: undefined },\n yearRange: { default: undefined }\n});\n const attrs: HTMLAttributes = useAttrs();\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const { dateToInputDateString } = useDateInputFormatter();\n const datePickerContainerId = generateUid('bento-date-range-picker-container');\n const labelId = generateUid('bento-date-range-picker-label');\n const descriptionId = generateUid('bento-date-range-picker-description');\n const errorId = generateUid('bento-date-range-picker-error');\n const dateErrorId = generateUid('bento-date-range-picker-date-error');\n const popoverAriaLabel = computed(() => props.label || t('dateRangePicker', { name: datePickerContainerId }));\n const { resolvedFirstDayOfWeek } = useFirstDayOfWeek(toRef(props, 'firstDayOfWeek'));\n const breakpoints = useBreakpoints({\n none: 0,\n one: 710, // width of date range picker with one panes\n two: 1030, // width of date range picker with two panes\n three: 1290, // width of date range picker with three panes\n });\n const computedNumberOfMonths = computed(() => {\n const activeBreakpoint = breakpoints.active().value;\n const breakpointToCalendarPanesMap = {\n none: 0,\n one: 1,\n two: 2,\n };\n\n if (activeBreakpoint in breakpointToCalendarPanesMap) {\n const maxPanes =\n breakpointToCalendarPanesMap[activeBreakpoint as keyof typeof breakpointToCalendarPanesMap];\n // If numberOfMonths is not provided, use the max panes for the breakpoint.\n // Otherwise, use the smaller of the two values.\n return props.numberOfMonths === undefined ? maxPanes : Math.min(props.numberOfMonths, maxPanes);\n }\n\n // Default case for 'three' and larger breakpoints, respect user-provided numberOfMonths.\n return props.numberOfMonths;\n });\n\n /**\n * Snaps the time of a date to the closest time selectable through the time interval.\n * @param date Date whose time is snapped\n * @param direction Whether to round the time down or up\n */\n const snapDateTime = (date: Date, direction: 'down' | 'up') =>\n setTimeInDateObject(\n date,\n snapTimeToInterval(dateToTimeInputString(date), resolvedTimeInterval.value, direction)\n );\n\n const adjustedQuickSelectRanges = computed<Array<DateRangePickerCalendarRangeSelectorItem>>(() => {\n return (\n props?.quickSelectRanges &&\n props.quickSelectRanges.map((range: DateRangePickerCalendarRangeSelectorItem) => {\n const timeDiff = !range.data.endDate\n ? new Date(Date.now()).getTime() - range.data.startDate.getTime()\n : undefined;\n // Quick select ranges can hold times the time dropdowns do not offer, so they are\n // snapped to keep matching the range that gets selected from them\n const snappedDates = resolvedTimeInterval.value\n ? {\n startDate: snapDateTime(range.data.startDate, 'down'),\n ...(range.data.endDate ? { endDate: snapDateTime(range.data.endDate, 'up') } : {}),\n }\n : {};\n\n return {\n ...range,\n data: {\n ...range.data,\n ...snappedDates,\n // Adding timeDifference to calculate an up-to-date endDate on range selection\n timeDifference: timeDiff,\n },\n };\n })\n );\n });\n\n const dropdownInputAriaLabelledBy = computed(() => (props.label ? labelId : (attrs?.['aria-labelledby'] ?? null)));\n\n const isDateIncorrect = ref(false);\n const inputContainerRef = ref<MaybeElement>(null);\n const inputWrapperRef = ref<HTMLElement | null>(null);\n const isDateRangePickerOpen = ref(false);\n\n const { width: inputWrapperWidth } = useElementSize(inputWrapperRef);\n const { isReadOnly } = useFormLayoutFieldLoading(toRef(props, 'readonly'));\n const { emitValue } = useFormFieldEmits(emit);\n\n watch(\n () => props.disabled,\n () => {\n // Close date picker popover if it's opened when it's disabled\n if (props.disabled && isDateRangePickerOpen.value) {\n isDateRangePickerOpen.value = false;\n }\n }\n );\n\n const shouldMatchPopoverWidth = computed(\n () => computedNumberOfMonths.value === 0 && inputWrapperWidth.value > 0 && inputWrapperWidth.value < 332 // size of date range picker form\n );\n\n const internalModelValue = computed(() => props.modelValue);\n\n const shouldDisplayError = computed(() => !isApplyDisabled.value && isDateIncorrect.value);\n\n const descriptionConditionalClasses = computed(() => ({\n 'b-date-range-picker__description--error': !!props.errorMessage || shouldDisplayError.value,\n }));\n\n const isMonthVariant = computed(() => props.variant === 'month');\n const withTimeInput = computed(() => props.allowTimeInput && props.variant !== 'month');\n const resolvedTimeInterval = computed(() => (withTimeInput.value ? props.timeInterval : null));\n\n watch(\n [() => props.timeInterval, () => props.allowTimeInput],\n ([timeInterval, allowTimeInput]) => {\n if (timeInterval && !allowTimeInput) {\n printDevelopmentWarning(\n '\"bento-date-range-picker\" ignores the \"timeInterval\" prop unless \"allowTimeInput\" is enabled.'\n );\n }\n },\n { immediate: true }\n );\n\n const { dateDisplayValue, textInputDisplayValue, formatTextInputDisplayValue } = useDateRangePickerCalendarText({\n datePickerValue: internalModelValue,\n isDateIncorrect,\n quickSelectRanges: adjustedQuickSelectRanges,\n isMonthVariant,\n withTimeInput,\n placeholder: toRef(props, 'placeholder'),\n });\n\n const ariaDescribedBy = computed(\n () =>\n `${props.description ? descriptionId : ''} ${props.errorMessage ? errorId : ''} ${\n isDateIncorrect.value ? dateErrorId : ''\n }`.trim() || null\n );\n\n const closeDateRangePicker = () => {\n isDateRangePickerOpen.value = false;\n };\n\n const openDateRangePicker = () => {\n isDateRangePickerOpen.value = true;\n formatTextInputDisplayValue();\n };\n\n const localDateDisplayValue = ref(dateDisplayValue.value);\n const localTextInputDisplayValue = ref<DateRangePickerCalendarFormData>(\n // textInputDisplayValue is a reactive object\n structuredClone(toRaw(textInputDisplayValue))\n );\n const selectedDate = ref<BentoDateRangePickerValue>(props.modelValue);\n const isApplyDisabled = ref(true);\n\n const displayedTextInputValue = ref<DateRangePickerCalendarFormData>(localTextInputDisplayValue.value);\n\n const trapAllOptions = {\n allowOutsideClick: true,\n };\n\n onMounted(() => {\n if (\n props.granularities &&\n props.variant !== 'month' &&\n props.granularities.find(({ type }) => type === 'quarterly')\n ) {\n throw new Error('Quarterly granularity is only supported by BentoDateRangePicker with variant: \"month\"');\n }\n });\n\n // Sync the local draft display state back to the committed model value.\n // Since `displayedTextInputValue` is a mutable ref, it must point to the new cloned draft object.\n const syncLocalDisplayStateFromCommittedValue = () => {\n localDateDisplayValue.value = dateDisplayValue.value;\n localTextInputDisplayValue.value = structuredClone(toRaw(textInputDisplayValue));\n displayedTextInputValue.value = localTextInputDisplayValue.value;\n selectedDate.value = internalModelValue.value;\n };\n\n // On update for the model value we need to update all the locally stored data\n watch(\n () => props.modelValue,\n () => {\n syncLocalDisplayStateFromCommittedValue();\n }\n );\n\n const cancelDateRangePicker = () => {\n // Reset local date range picker state\n syncLocalDisplayStateFromCommittedValue();\n isDateIncorrect.value = false;\n isApplyDisabled.value = true;\n\n closeDateRangePicker();\n };\n\n const rangePickerButtonActions = computed(() => [\n {\n title: t('apply'),\n event: () => {\n emitValue(selectedDate.value);\n closeDateRangePicker();\n\n isApplyDisabled.value = true;\n },\n disabled: isApplyDisabled.value,\n },\n {\n title: t('cancel'),\n event: cancelDateRangePicker,\n },\n ]);\n\n watch(selectedDate, date => {\n isApplyDisabled.value = isDateIncorrect.value || date === internalModelValue.value;\n });\n\n const onDateRangePickerInput = (selectedRange: BentoDateRangePickerValue) => {\n // Reset the errors when the date is correct\n isDateIncorrect.value = false;\n\n displayedTextInputValue.value.startDate = dateToInputDateString(selectedRange.startDate);\n displayedTextInputValue.value.endDate = dateToInputDateString(selectedRange.endDate);\n displayedTextInputValue.value.startTime = dateToTimeInputString(selectedRange.startDate);\n displayedTextInputValue.value.endTime = dateToTimeInputString(selectedRange.endDate);\n\n selectedDate.value = selectedRange;\n };\n\n const clearDateRangePickerValue = async () => {\n if (isDateIncorrect.value) {\n isDateIncorrect.value = false;\n }\n\n selectedDate.value = null;\n };\n\n const onEnterPressedOverInput = () => {\n // open the datepicker\n if (!isDateRangePickerOpen.value) {\n isDateRangePickerOpen.value = true;\n\n return;\n }\n\n // Close the date picker if the date is correct and it is open\n if (!isDateIncorrect.value) {\n isDateRangePickerOpen.value = false;\n }\n };\n\n const onDateRangePickerFormDateInputUpdate = (dateFormDate: DateRangePickerCalendarFormData) => {\n isDateIncorrect.value = false;\n\n if (dateFormDate.startTime) {\n displayedTextInputValue.value.startTime = dateFormDate.startTime;\n }\n\n if (dateFormDate.endTime) {\n displayedTextInputValue.value.endTime = dateFormDate.endTime;\n }\n };\n\n const onDateRangePickerError = dateTextInput => {\n isDateIncorrect.value = true;\n displayedTextInputValue.value.startDate = dateTextInput.startDate;\n displayedTextInputValue.value.endDate = dateTextInput.endDate;\n\n // Remove current date range selection\n selectedDate.value = { startDate: null, endDate: null };\n };\n\n const onRangeSelectorInput = (quickSelectRanges?: BentoDateRangePickerValue) => {\n if (quickSelectRanges) {\n displayedTextInputValue.value.startDate = dateToInputDateString(quickSelectRanges.startDate);\n displayedTextInputValue.value.endDate = dateToInputDateString(quickSelectRanges.endDate);\n displayedTextInputValue.value.startTime = dateToTimeInputString(quickSelectRanges.startDate);\n displayedTextInputValue.value.endTime = dateToTimeInputString(quickSelectRanges.endDate);\n\n selectedDate.value = quickSelectRanges;\n }\n };\n</script>\n\n<script lang=\"ts\">\n /**\n * Date range picker selector.\n *\n * @example\n * import { BentoDateRangePicker } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoDateRangePicker },\n * template: `\n * <bento-date-range-picker\n * label=\"Label\"\n * description=\"Supporting text\"\n * required\n * optional\n * disabled\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-range-picker',\n model: { prop: 'modelValue', event: 'update:model-value' },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./date-range-picker.scss\" />\n"],"names":["getYear","date","options","toDate","isEqual","leftDate","rightDate","isSameQuarter","laterDate","earlierDate","dateLeft_","dateRight_","normalizeDates","startOfQuarter","startOfSecond","date_","isSameSecond","isToday","isSameDay","constructFrom","constructNow","__default__$2","resolvedDateProps","computed","props","resolvedTimeProps","useGranularMinMaxDate","firstDayOfWeek","minimumDate","maximumDate","granularity","min","startOfDay","max","endOfDay","startOfMin","startOfWeek","addDays","endOfWeek","endOfMax","subDays","startOfMonth","addMonths","endOfMonth","subMonths","addQuarters","endOfQuarter","subQuarters","useGranularityMemory","savedRanges","reactive","type","range","DateRangePickerCalendarEvent","DateRangePickerCalendarEvent2","__default__$1","messages$1","FORM_INPUT_DEBOUNCE_TIME","RANGE_SELECTOR_CUSTOM_RANGE_KEY","maxRangeMessageKeyMap","slots","useSlots","hasSlot","useHasSlot","t","tc","useI18n","isTouchDevice","useTouchDevice","dateFormat","isFormatValid","parseDate","onKeyDown","autoFormat","formatDateUtil","useDateInputFormatter","calculatedIsRelativeToNowQuickSelectRanges","ref","calendarRef","defaultGranularity","hasNoCalendars","snapTime","time","direction","snapTimeToInterval","resolveEndOfSelectableDay","dayEnd","setTimeInDateObject","dateToTimeInputString","internalRangeDate","selectedRangeSelectorValue","value","data","newlyCalculatedQuickSelectDates","quickSelectRangeDefaultItems","selectedGranularity","granularityItems","disabled","getGranularCalendarLimits","computedMinMax","normalizeRange","useGranularityAdjustments","saveRange","resetSavedRanges","formatDate","dateToFormat","normalizeInternalRange","fixedEndpoint","alignToGranularity","normalizedRange","dateTextInput","startDateError","endDateError","startDateErrorText","endDateErrorText","startSharedError","endSharedError","getDateErrorMessage","dateText","counterpartDate","role","resolvedDateTime","dayDate","current","setMilliseconds","counterpart","isValidTime","timeText","isTimeAllowed","isValidDate","dateToCheckWithTime","isValidTimeString","isMonthVariant","formatNativeDate","dateToNativeMonthString","dateToNativeDateString","nativeStartDate","nativeEndDate","dateInputType","startDateValue","endDateValue","setTimeInDateRef","updateSelectedRange","selectedRange","preserveInputTimes","isStartLimitedByMin","isEndLimitedByMax","emit","onDateInput","finalizeHoveredRange","onMounted","onStartDateSelected","newStartDate","onEndDateSelected","newEndDate","getDate","keyName","dateProp","validateStartDate","startDateText","startDate","endDate","rangeError","validateStartDateDebounced","debounce","onStartDateInput","parseNativeMonthString","validateEndDate","endDateText","validateEndDateDebounced","onEndDateInput","onDateInputKeyDown","event","onStartTimeError","onStartTimeValid","startTimeText","onEndTimeError","onEndTimeValid","endTimeText","onStartTimeInput","onEndTimeInput","setInternalRange","onRangeSelectorInput","newCustomRangeValue","foundResult","rangeEndDate","rangeStartDate","startTime","endTime","shouldSnapRange","onGranularityInput","previousValue","toRaw","computedFormContainerClasses","maxRangeMessage","count","key","alignInitialRangeWithTimeInterval","useDateRangePickerCalendarText","datePickerValue","isDateIncorrect","quickSelectRanges","withTimeInput","placeholder","locale","dateToInputDateString","textInputDisplayValue","watch","newDatePickerValue","customRangeSelected","startQuarter","getQuarter","endQuarter","formatRangeOptions","getDateTimeFormatter","__default__","messages","attrs","useAttrs","datePickerContainerId","generateUid","labelId","descriptionId","errorId","dateErrorId","popoverAriaLabel","resolvedFirstDayOfWeek","useFirstDayOfWeek","toRef","breakpoints","useBreakpoints","computedNumberOfMonths","activeBreakpoint","breakpointToCalendarPanesMap","maxPanes","snapDateTime","resolvedTimeInterval","adjustedQuickSelectRanges","timeDiff","snappedDates","dropdownInputAriaLabelledBy","inputContainerRef","inputWrapperRef","isDateRangePickerOpen","inputWrapperWidth","useElementSize","isReadOnly","useFormLayoutFieldLoading","emitValue","useFormFieldEmits","shouldMatchPopoverWidth","internalModelValue","shouldDisplayError","isApplyDisabled","descriptionConditionalClasses","timeInterval","allowTimeInput","printDevelopmentWarning","dateDisplayValue","formatTextInputDisplayValue","ariaDescribedBy","closeDateRangePicker","openDateRangePicker","localDateDisplayValue","localTextInputDisplayValue","selectedDate","displayedTextInputValue","trapAllOptions","syncLocalDisplayStateFromCommittedValue","cancelDateRangePicker","rangePickerButtonActions","dateFormDate"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBO,SAAAA,GAAAC,GAAAC,GAAA;AACP,SAAAC,GAAAF,GAAAC,GAAA,EAAA,EAAA,YAAA;AACA;ACHO,SAAAE,GAAAC,GAAAC,GAAA;AACP,SAAA,CAAAH,GAAA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3C,EAAA,UACI2C,EAAA,QAAA;AAAA,IACJ,yCAGJ,CAAA4B,MAAA;AACI,MAAAvE,EAAA,QAAA,IAEAuE,EAAA,cACIL,EAAA,MAAA,YAAAK,EAAA,YAGJA,EAAA,YACIL,EAAA,MAAA,UAAAK,EAAA;AAAA,IACJ,2BAGJ,CAAAjK,MAAA;AACI,MAAA0F,EAAA,QAAA,IACAkE,EAAA,MAAA,YAAA5J,EAAA,WACA4J,EAAA,MAAA,UAAA5J,EAAA,SAGA2J,EAAA,QAAA,EAAA,WAAA,MAAA,SAAA,KAAA;AAAA,IAAsD,yBAG1D,CAAAhE,MAAA;AACI,MAAAA,MACIiE,EAAA,MAAA,YAAA7D,EAAAJ,EAAA,SAAA,GACAiE,EAAA,MAAA,UAAA7D,EAAAJ,EAAA,OAAA,GACAiE,EAAA,MAAA,YAAAlL,EAAAiH,EAAA,SAAA,GACAiE,EAAA,MAAA,UAAAlL,EAAAiH,EAAA,OAAA,GAEAgE,EAAA,QAAAhE;AAAA,IACJ;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0,1,2,3,4,5]}
@@ -1 +1 @@
1
- {"version":3,"file":"date-range-picker.types.Ckt7zxGy.js","sources":["../../src/components/date-range-picker/date-range-picker.types.ts"],"sourcesContent":["import type { FormField, FormFieldEmits } from '../../types/form-field';\n\nimport {\n CalendarFirstDayOfWeek as BentoDateRangePickerFirstDayOfWeek,\n type CalendarGranularityConfig as BentoDateRangePickerGranularityConfig,\n type CalendarIsDateDisabled as BentoDateRangePickerIsDateDisabled,\n type CalendarRangeDateValue as BentoDateRangePickerValue,\n CalendarVariant as BentoDateRangePickerVariant,\n type CalendarYearRange,\n} from '@/internal/calendar/calendar.types';\nimport type { DateRangePickerCalendarRangeSelectorItems as BentoDateRangePickerQuickSelectRanges } from './components/date-range-picker-calendar/date-range-picker-calendar.types';\n\nexport {\n BentoDateRangePickerFirstDayOfWeek,\n type BentoDateRangePickerIsDateDisabled,\n type BentoDateRangePickerValue,\n type BentoDateRangePickerGranularityConfig,\n type BentoDateRangePickerQuickSelectRanges,\n BentoDateRangePickerVariant,\n};\n\n/**\n * @deprecated Since v2.0.0. Use string literal instead.\n */\nexport enum BentoDateRangePickerEvent {\n INPUT = 'input',\n}\n\nexport type BentoDateRangePickerEmits = FormFieldEmits<any>;\n\nexport type BentoDateRangePickerYearRange = CalendarYearRange;\n\nexport interface BentoDateRangePickerProps extends FormField {\n /**\n * Allows user to enter time values in the form\n * @default false\n */\n allowTimeInput?: boolean;\n\n /**\n * Allows user to set the first day of the week. 0 is sunday, 1 is monday, 6 is saturday\n * @default undefined\n */\n firstDayOfWeek?: BentoDateRangePickerFirstDayOfWeek | number;\n\n /**\n * A list of available granularities.\n * If present, the date picker will display a segmented control to change granularity.\n */\n granularities?: Array<BentoDateRangePickerGranularityConfig>;\n\n /**\n * Indicate if a date should be disabled or not\n */\n isDateDisabled?: BentoDateRangePickerIsDateDisabled;\n\n /**\n * Upon opening date range picker, end date's month will be pre-selected.\n * @default false\n */\n showEndDateOnOpen?: boolean;\n\n /**\n * Enables the range selector.\n * If provided, must be an array that sets the custom range dropdown items.\n */\n quickSelectRanges?: BentoDateRangePickerQuickSelectRanges;\n\n /**\n * Set a maximum number of dates to be selectable by the range.\n */\n maxRange?: number;\n\n /**\n * Sets a minimum limit for selectable dates - dates before `min` will not be selectable\n */\n min?: Date;\n\n /**\n * Sets a maximum limit for selectable dates - dates after `max` will not be selectable\n */\n max?: Date;\n\n /**\n * Number of months rendered on pane\n */\n numberOfMonths?: number;\n\n /**\n * Selected date\n */\n modelValue?: BentoDateRangePickerValue | null;\n\n /**\n * The type of calendar to display. Defaults to showing days.\n */\n variant?: `${BentoDateRangePickerVariant}`;\n\n /**\n * Range of years to be selectable from the year dropdown\n */\n yearRange?: BentoDateRangePickerYearRange;\n}\n"],"names":["BentoDateRangePickerEvent"],"mappings":"AAwBO,IAAKA,sBAAAA,OACRA,EAAA,QAAQ,SADAA,IAAAA,KAAA,CAAA,CAAA;"}
1
+ {"version":3,"file":"date-range-picker.types.Ckt7zxGy.js","sources":["../../src/components/date-range-picker/date-range-picker.types.ts"],"sourcesContent":["import type { FormField, FormFieldEmits } from '../../types/form-field';\n\nimport {\n CalendarFirstDayOfWeek as BentoDateRangePickerFirstDayOfWeek,\n type CalendarGranularityConfig as BentoDateRangePickerGranularityConfig,\n type CalendarIsDateDisabled as BentoDateRangePickerIsDateDisabled,\n type CalendarRangeDateValue as BentoDateRangePickerValue,\n CalendarVariant as BentoDateRangePickerVariant,\n type CalendarYearRange,\n} from '@/internal/calendar/calendar.types';\nimport type { DateRangePickerCalendarRangeSelectorItems as BentoDateRangePickerQuickSelectRanges } from './components/date-range-picker-calendar/date-range-picker-calendar.types';\n\nexport {\n BentoDateRangePickerFirstDayOfWeek,\n type BentoDateRangePickerIsDateDisabled,\n type BentoDateRangePickerValue,\n type BentoDateRangePickerGranularityConfig,\n type BentoDateRangePickerQuickSelectRanges,\n BentoDateRangePickerVariant,\n};\n\n/**\n * @deprecated Since v3.0.0. Use string literal instead.\n */\nexport enum BentoDateRangePickerEvent {\n INPUT = 'input',\n}\n\nexport type BentoDateRangePickerEmits = FormFieldEmits<any>;\n\nexport type BentoDateRangePickerYearRange = CalendarYearRange;\n\nexport interface BentoDateRangePickerProps extends FormField {\n /**\n * Allows user to enter time values in the form\n * @default false\n */\n allowTimeInput?: boolean;\n\n /**\n * Allows user to set the first day of the week. 0 is sunday, 1 is monday, 6 is saturday\n * @default undefined\n */\n firstDayOfWeek?: BentoDateRangePickerFirstDayOfWeek | number;\n\n /**\n * A list of available granularities.\n * If present, the date picker will display a segmented control to change granularity.\n */\n granularities?: Array<BentoDateRangePickerGranularityConfig>;\n\n /**\n * Indicate if a date should be disabled or not\n */\n isDateDisabled?: BentoDateRangePickerIsDateDisabled;\n\n /**\n * Upon opening date range picker, end date's month will be pre-selected.\n * @default false\n */\n showEndDateOnOpen?: boolean;\n\n /**\n * Enables the range selector.\n * If provided, must be an array that sets the custom range dropdown items.\n */\n quickSelectRanges?: BentoDateRangePickerQuickSelectRanges;\n\n /**\n * Set a maximum number of dates to be selectable by the range.\n */\n maxRange?: number;\n\n /**\n * Sets a minimum limit for selectable dates - dates before `min` will not be selectable\n */\n min?: Date;\n\n /**\n * Sets a maximum limit for selectable dates - dates after `max` will not be selectable\n */\n max?: Date;\n\n /**\n * Number of months rendered on pane\n */\n numberOfMonths?: number;\n\n /**\n * Limits the selectable times to a fixed interval, expressed in minutes.\n * Requires `allowTimeInput` and is not supported by the `month` variant.\n * @default undefined\n */\n timeInterval?: number;\n\n /**\n * Selected date\n */\n modelValue?: BentoDateRangePickerValue | null;\n\n /**\n * The type of calendar to display. Defaults to showing days.\n */\n variant?: `${BentoDateRangePickerVariant}`;\n\n /**\n * Range of years to be selectable from the year dropdown\n */\n yearRange?: BentoDateRangePickerYearRange;\n}\n"],"names":["BentoDateRangePickerEvent"],"mappings":"AAwBO,IAAKA,sBAAAA,OACRA,EAAA,QAAQ,SADAA,IAAAA,KAAA,CAAA,CAAA;"}
@@ -1,13 +1,13 @@
1
1
  import { defineComponent as k, ref as d, computed as n, watch as x, nextTick as E } from "vue";
2
2
  import { s as J, a as I } from "./set-time-in-date.B3K4C7CB.js";
3
- import { e as G, s as S } from "./calendar.CXdLEeN4.js";
4
- import { B as q } from "./date-picker.gDsw8bn1.js";
5
- import { B as z, i as P } from "./input-time.CXMuvF9N.js";
3
+ import { e as G, s as S } from "./calendar.BalfhApP.js";
4
+ import { B as q } from "./date-picker.RFus1MVJ.js";
5
+ import { B as z, i as P } from "./input-time.D7IsprlH.js";
6
6
  import "./index.Cl4_42j5.js";
7
- import { u as U } from "./use-date-input-formatter.MgbFwUqJ.js";
7
+ import { u as U } from "./use-date-input-formatter.CouOE5tF.js";
8
8
  import { u as R } from "./use-touch-device.DTqFAbXh.js";
9
9
  import { u as j } from "./index.CPOlyau9.js";
10
- import { B as L } from "./form-layout-group.D4T0Z5xk.js";
10
+ import { B as L } from "./form-layout-group.BSC2esG8.js";
11
11
  import { n as O } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
12
12
  import "../assets/date-time-picker.css";
13
13
  const $ = {
@@ -124,4 +124,4 @@ const De = K.exports;
124
124
  export {
125
125
  De as d
126
126
  };
127
- //# sourceMappingURL=date-time-picker.Bktntun4.js.map
127
+ //# sourceMappingURL=date-time-picker.DJxDa81N.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"date-time-picker.Bktntun4.js","sources":["../../src/components/date-time-picker/date-time-picker.vue"],"sourcesContent":["<template>\n <div class=\"b-date-time-picker\">\n <bento-form-layout-group class=\"b-date-time-picker__inputs\" layout=\"50-50\" :error-message=\"props.errorMessage\">\n <bento-date-picker\n class=\"b-date-time-picker__date-input\"\n v-bind=\"resolvedDateProps\"\n :model-value=\"dateValue\"\n @update:model-value=\"onDateChanged\"\n />\n <bento-input-time\n class=\"b-date-time-picker__time-input\"\n v-bind=\"resolvedTimeProps\"\n :model-value=\"timeValue\"\n @update:model-value=\"onTimeChanged\"\n />\n </bento-form-layout-group>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, nextTick, ref, watch } from 'vue';\n import { setMilliseconds } from 'date-fns/setMilliseconds';\n import { startOfDay } from 'date-fns/startOfDay';\n\n // Components\n import { BentoDatePicker } from '@/components/date-picker';\n import { BentoFormLayoutGroup } from '@/components/form-layout';\n import { BentoInputTime } from '@/components/input-time';\n\n // Utils\n import { useDateInputFormatter, useTouchDevice } from '@/composables';\n import { useI18n } from '@/utils/ts/i18n';\n import { dateToTimeInputString, setTimeInDateObject } from '@/utils/ts/format-date';\n import { isValidTimeString } from '@/utils/ts/time-input';\n\n // Types\n import type {\n BentoDateTimePickerEmits,\n BentoDateTimePickerProps,\n BentoDateTimePickerValue,\n } from './date-time-picker.types';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const props = defineProps({\n modelValue: { default: null },\n disabled: { type: Boolean, default: false },\n errorMessage: { default: null },\n isDateDisabled: { default: undefined },\n max: { default: null },\n min: { default: null },\n readonly: { type: Boolean, default: false },\n required: { type: Boolean, default: false },\n dateProps: { default: () => ({}) },\n timeProps: { default: () => ({}) }\n});\n\n const emit = defineEmits([\"update:model-value\", \"input:valid\", \"input:error\"]);\n const currentDate = ref<Date | null>(null);\n const currentTimeText = ref('');\n const dateError = ref<keyof MessageSchema | null>(null);\n const timeError = ref<keyof MessageSchema | null>(null);\n const { dateFormat } = useDateInputFormatter();\n const { isTouchDevice } = useTouchDevice();\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const dateValue = computed(() => currentDate.value);\n const timeValue = computed(() => currentTimeText.value);\n const resolvedIsDateDisabled = computed(() => props.dateProps?.isDateDisabled ?? props.isDateDisabled);\n const dateDescription = computed(() => {\n if (isTouchDevice.value) {\n return props.dateProps?.description;\n } else {\n return props.dateProps?.description\n ? `${props.dateProps.description} ${t(dateFormat.value)}`\n : t(dateFormat.value);\n }\n });\n\n const isMergedDateInBounds = (date: Date) => {\n if (resolvedIsDateDisabled.value?.(startOfDay(date))) {\n return false;\n }\n\n if (props.min && date < setMilliseconds(props.min, 0)) {\n return false;\n }\n\n if (props.max && date > setMilliseconds(props.max, 0)) {\n return false;\n }\n\n return true;\n };\n\n const resolvedDateProps = computed(() => ({\n disabled: props.disabled,\n isDateDisabled: props.isDateDisabled,\n max: props.max,\n min: props.min,\n readonly: props.readonly,\n required: props.required,\n errorMessage: dateErrorMessage.value,\n ...props.dateProps,\n description: dateDescription.value,\n }));\n\n const resolvedTimeProps = computed(() => ({\n disabled: props.disabled,\n errorMessage: timeErrorMessage.value,\n readonly: props.readonly,\n required: props.required,\n ...props.timeProps,\n }));\n\n const dateErrorMessage = computed(() => {\n if (props.errorMessage) {\n return props.errorMessage;\n }\n return dateError.value ? t(dateError.value) : null;\n });\n\n const timeErrorMessage = computed(() => {\n if (props.errorMessage) {\n return props.errorMessage;\n }\n return timeError.value ? t(timeError.value) : null;\n });\n\n const clearErrors = () => {\n dateError.value = null;\n timeError.value = null;\n };\n\n /**\n * Guards the modelValue watcher from clearing user input when the null was emitted\n * by our own validation logic (e.g. partial/invalid input). Without this flag,\n * the parent's v-model round-trip would trigger the watcher and wipe the fields.\n * Reset on nextTick so that genuine external resets (e.g. a form clear button)\n * still clear the UI.\n */\n const isSelfEmittedUpdate = ref(false);\n\n watch(\n () => props.modelValue,\n newValue => {\n if (isSelfEmittedUpdate.value) {\n return;\n }\n\n if (newValue) {\n // Sync internal state when a valid Date is set (e.g. programmatic update from parent)\n currentDate.value = newValue;\n currentTimeText.value = dateToTimeInputString(newValue);\n } else {\n // External reset (e.g. parent sets modelValue to null via a form clear button):\n // clear all internal state so the UI resets fully.\n currentDate.value = null;\n currentTimeText.value = '';\n clearErrors();\n }\n },\n { immediate: true }\n );\n\n const validateBounds = (value: BentoDateTimePickerValue) => !value || isMergedDateInBounds(value);\n\n const emitValidationState = (isValid: boolean) => {\n if (isValid) {\n emit('input:valid');\n } else {\n emit('input:error');\n }\n };\n\n const emitModelValue = (value: BentoDateTimePickerValue) => {\n isSelfEmittedUpdate.value = true;\n emit('update:model-value', value);\n nextTick(() => {\n isSelfEmittedUpdate.value = false;\n });\n };\n\n const emitValidatedValue = (value: BentoDateTimePickerValue) => {\n emitModelValue(value);\n emitValidationState(validateBounds(value));\n };\n\n const emitInvalidModelValue = (value: BentoDateTimePickerValue) => {\n emitModelValue(value);\n emitValidationState(false);\n };\n\n const onDateChanged = (date: Date | null) => {\n currentDate.value = date;\n\n // Date invalid/cleared: error if time is populated, valid if both empty\n if (!date) {\n if (currentTimeText.value) {\n dateError.value = 'invalidDateFormat';\n emitInvalidModelValue(null);\n } else {\n clearErrors();\n emitValidatedValue(null);\n }\n return;\n }\n\n clearErrors();\n\n // Prefill time with midnight when empty so the user sees a value\n if (!currentTimeText.value) {\n currentTimeText.value = '00:00:00';\n }\n\n const time = currentTimeText.value;\n\n // Date valid but time invalid: preserve date, signal error\n if (!isValidTimeString(time)) {\n emitInvalidModelValue(null);\n return;\n }\n\n // Both valid: merge and emit\n emitValidatedValue(setTimeInDateObject(date, time));\n };\n\n const onTimeChanged = (time: string) => {\n currentTimeText.value = time;\n\n // Time cleared: error if date is set (time is required once prefilled), valid-null if both empty\n if (!time) {\n if (currentDate.value) {\n timeError.value = 'enterTimeForDate';\n emitInvalidModelValue(null);\n } else {\n clearErrors();\n emitValidatedValue(null);\n }\n return;\n }\n\n timeError.value = null;\n\n // Time invalid: preserve date, signal error\n if (!isValidTimeString(time)) {\n emitInvalidModelValue(null);\n return;\n }\n\n // Time valid but no date: signal error\n if (!currentDate.value) {\n dateError.value = 'invalidDateFormat';\n emitInvalidModelValue(null);\n return;\n }\n\n // Both valid: merge and emit\n emitValidatedValue(setTimeInDateObject(currentDate.value, time));\n };\n</script>\n\n<script lang=\"ts\">\n /**\n * Date time picker that combines a date picker (single date) with a time input.\n *\n * @example\n * import { BentoDateTimePicker } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoDateTimePicker },\n * template: `\n * <bento-date-time-picker\n * :date-props=\"{ label: 'Date' }\"\n * :time-props=\"{ label: 'Time' }\"\n * required\n * :model-value=\"dateTimeValue\"\n * @update:model-value=\"newValue => dateTimeValue = newValue\"\n * />\n * `\n * }\n */\n export default {\n i18n: { messages },\n name: 'bento-date-time-picker',\n inheritAttrs: false,\n model: { prop: 'modelValue', event: 'update:model-value' },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./date-time-picker.scss\" />\n"],"names":["__default__","messages","currentDate","ref","currentTimeText","dateError","timeError","dateFormat","useDateInputFormatter","isTouchDevice","useTouchDevice","t","useI18n","dateValue","computed","timeValue","resolvedIsDateDisabled","props","dateDescription","isMergedDateInBounds","date","startOfDay","setMilliseconds","resolvedDateProps","dateErrorMessage","resolvedTimeProps","timeErrorMessage","clearErrors","isSelfEmittedUpdate","watch","newValue","dateToTimeInputString","validateBounds","value","emitValidationState","isValid","emit","emitModelValue","nextTick","emitValidatedValue","emitInvalidModelValue","time","isValidTimeString","setTimeInDateObject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,QAAA,qBACAmC,EAAA,IAAA,MAEAb,EAAA,GACAY,EAAA,IAAA;AAEJ;AAAA,MAAA;AAGJ,MAAAZ,EAAA,GAGAvB,EAAA,UACIA,EAAA,QAAA;AAGJ,YAAAqC,IAAArC,EAAA;AAGA,UAAA,CAAAsC,EAAAD,CAAA,GAAA;AACI,QAAAD,EAAA,IAAA;AACA;AAAA,MAAA;AAIJ,MAAAD,EAAAI,EAAAvB,GAAAqB,CAAA,CAAA;AAAA,IAAkD,kBAGtD,CAAAA,MAAA;AAII,UAHArC,EAAA,QAAAqC,GAGA,CAAAA,GAAA;AACI,QAAAvC,EAAA,SACII,EAAA,QAAA,oBACAkC,EAAA,IAAA,MAEAb,EAAA,GACAY,EAAA,IAAA;AAEJ;AAAA,MAAA;AAMJ,UAHAjC,EAAA,QAAA,MAGA,CAAAoC,EAAAD,CAAA,GAAA;AACI,QAAAD,EAAA,IAAA;AACA;AAAA,MAAA;AAIJ,UAAA,CAAAtC,EAAA,OAAA;AACI,QAAAG,EAAA,QAAA,qBACAmC,EAAA,IAAA;AACA;AAAA,MAAA;AAIJ,MAAAD,EAAAI,EAAAzC,EAAA,OAAAuC,CAAA,CAAA;AAAA,IAA+D;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"date-time-picker.DJxDa81N.js","sources":["../../src/components/date-time-picker/date-time-picker.vue"],"sourcesContent":["<template>\n <div class=\"b-date-time-picker\">\n <bento-form-layout-group class=\"b-date-time-picker__inputs\" layout=\"50-50\" :error-message=\"props.errorMessage\">\n <bento-date-picker\n class=\"b-date-time-picker__date-input\"\n v-bind=\"resolvedDateProps\"\n :model-value=\"dateValue\"\n @update:model-value=\"onDateChanged\"\n />\n <bento-input-time\n class=\"b-date-time-picker__time-input\"\n v-bind=\"resolvedTimeProps\"\n :model-value=\"timeValue\"\n @update:model-value=\"onTimeChanged\"\n />\n </bento-form-layout-group>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, nextTick, ref, watch } from 'vue';\n import { setMilliseconds } from 'date-fns/setMilliseconds';\n import { startOfDay } from 'date-fns/startOfDay';\n\n // Components\n import { BentoDatePicker } from '@/components/date-picker';\n import { BentoFormLayoutGroup } from '@/components/form-layout';\n import { BentoInputTime } from '@/components/input-time';\n\n // Utils\n import { useDateInputFormatter, useTouchDevice } from '@/composables';\n import { useI18n } from '@/utils/ts/i18n';\n import { dateToTimeInputString, setTimeInDateObject } from '@/utils/ts/format-date';\n import { isValidTimeString } from '@/utils/ts/time-input';\n\n // Types\n import type {\n BentoDateTimePickerEmits,\n BentoDateTimePickerProps,\n BentoDateTimePickerValue,\n } from './date-time-picker.types';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const props = defineProps({\n modelValue: { default: null },\n disabled: { type: Boolean, default: false },\n errorMessage: { default: null },\n isDateDisabled: { default: undefined },\n max: { default: null },\n min: { default: null },\n readonly: { type: Boolean, default: false },\n required: { type: Boolean, default: false },\n dateProps: { default: () => ({}) },\n timeProps: { default: () => ({}) }\n});\n\n const emit = defineEmits([\"update:model-value\", \"input:valid\", \"input:error\"]);\n const currentDate = ref<Date | null>(null);\n const currentTimeText = ref('');\n const dateError = ref<keyof MessageSchema | null>(null);\n const timeError = ref<keyof MessageSchema | null>(null);\n const { dateFormat } = useDateInputFormatter();\n const { isTouchDevice } = useTouchDevice();\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const dateValue = computed(() => currentDate.value);\n const timeValue = computed(() => currentTimeText.value);\n const resolvedIsDateDisabled = computed(() => props.dateProps?.isDateDisabled ?? props.isDateDisabled);\n const dateDescription = computed(() => {\n if (isTouchDevice.value) {\n return props.dateProps?.description;\n } else {\n return props.dateProps?.description\n ? `${props.dateProps.description} ${t(dateFormat.value)}`\n : t(dateFormat.value);\n }\n });\n\n const isMergedDateInBounds = (date: Date) => {\n if (resolvedIsDateDisabled.value?.(startOfDay(date))) {\n return false;\n }\n\n if (props.min && date < setMilliseconds(props.min, 0)) {\n return false;\n }\n\n if (props.max && date > setMilliseconds(props.max, 0)) {\n return false;\n }\n\n return true;\n };\n\n const resolvedDateProps = computed(() => ({\n disabled: props.disabled,\n isDateDisabled: props.isDateDisabled,\n max: props.max,\n min: props.min,\n readonly: props.readonly,\n required: props.required,\n errorMessage: dateErrorMessage.value,\n ...props.dateProps,\n description: dateDescription.value,\n }));\n\n const resolvedTimeProps = computed(() => ({\n disabled: props.disabled,\n errorMessage: timeErrorMessage.value,\n readonly: props.readonly,\n required: props.required,\n ...props.timeProps,\n }));\n\n const dateErrorMessage = computed(() => {\n if (props.errorMessage) {\n return props.errorMessage;\n }\n return dateError.value ? t(dateError.value) : null;\n });\n\n const timeErrorMessage = computed(() => {\n if (props.errorMessage) {\n return props.errorMessage;\n }\n return timeError.value ? t(timeError.value) : null;\n });\n\n const clearErrors = () => {\n dateError.value = null;\n timeError.value = null;\n };\n\n /**\n * Guards the modelValue watcher from clearing user input when the null was emitted\n * by our own validation logic (e.g. partial/invalid input). Without this flag,\n * the parent's v-model round-trip would trigger the watcher and wipe the fields.\n * Reset on nextTick so that genuine external resets (e.g. a form clear button)\n * still clear the UI.\n */\n const isSelfEmittedUpdate = ref(false);\n\n watch(\n () => props.modelValue,\n newValue => {\n if (isSelfEmittedUpdate.value) {\n return;\n }\n\n if (newValue) {\n // Sync internal state when a valid Date is set (e.g. programmatic update from parent)\n currentDate.value = newValue;\n currentTimeText.value = dateToTimeInputString(newValue);\n } else {\n // External reset (e.g. parent sets modelValue to null via a form clear button):\n // clear all internal state so the UI resets fully.\n currentDate.value = null;\n currentTimeText.value = '';\n clearErrors();\n }\n },\n { immediate: true }\n );\n\n const validateBounds = (value: BentoDateTimePickerValue) => !value || isMergedDateInBounds(value);\n\n const emitValidationState = (isValid: boolean) => {\n if (isValid) {\n emit('input:valid');\n } else {\n emit('input:error');\n }\n };\n\n const emitModelValue = (value: BentoDateTimePickerValue) => {\n isSelfEmittedUpdate.value = true;\n emit('update:model-value', value);\n nextTick(() => {\n isSelfEmittedUpdate.value = false;\n });\n };\n\n const emitValidatedValue = (value: BentoDateTimePickerValue) => {\n emitModelValue(value);\n emitValidationState(validateBounds(value));\n };\n\n const emitInvalidModelValue = (value: BentoDateTimePickerValue) => {\n emitModelValue(value);\n emitValidationState(false);\n };\n\n const onDateChanged = (date: Date | null) => {\n currentDate.value = date;\n\n // Date invalid/cleared: error if time is populated, valid if both empty\n if (!date) {\n if (currentTimeText.value) {\n dateError.value = 'invalidDateFormat';\n emitInvalidModelValue(null);\n } else {\n clearErrors();\n emitValidatedValue(null);\n }\n return;\n }\n\n clearErrors();\n\n // Prefill time with midnight when empty so the user sees a value\n if (!currentTimeText.value) {\n currentTimeText.value = '00:00:00';\n }\n\n const time = currentTimeText.value;\n\n // Date valid but time invalid: preserve date, signal error\n if (!isValidTimeString(time)) {\n emitInvalidModelValue(null);\n return;\n }\n\n // Both valid: merge and emit\n emitValidatedValue(setTimeInDateObject(date, time));\n };\n\n const onTimeChanged = (time: string) => {\n currentTimeText.value = time;\n\n // Time cleared: error if date is set (time is required once prefilled), valid-null if both empty\n if (!time) {\n if (currentDate.value) {\n timeError.value = 'enterTimeForDate';\n emitInvalidModelValue(null);\n } else {\n clearErrors();\n emitValidatedValue(null);\n }\n return;\n }\n\n timeError.value = null;\n\n // Time invalid: preserve date, signal error\n if (!isValidTimeString(time)) {\n emitInvalidModelValue(null);\n return;\n }\n\n // Time valid but no date: signal error\n if (!currentDate.value) {\n dateError.value = 'invalidDateFormat';\n emitInvalidModelValue(null);\n return;\n }\n\n // Both valid: merge and emit\n emitValidatedValue(setTimeInDateObject(currentDate.value, time));\n };\n</script>\n\n<script lang=\"ts\">\n /**\n * Date time picker that combines a date picker (single date) with a time input.\n *\n * @example\n * import { BentoDateTimePicker } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoDateTimePicker },\n * template: `\n * <bento-date-time-picker\n * :date-props=\"{ label: 'Date' }\"\n * :time-props=\"{ label: 'Time' }\"\n * required\n * :model-value=\"dateTimeValue\"\n * @update:model-value=\"newValue => dateTimeValue = newValue\"\n * />\n * `\n * }\n */\n export default {\n i18n: { messages },\n name: 'bento-date-time-picker',\n inheritAttrs: false,\n model: { prop: 'modelValue', event: 'update:model-value' },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./date-time-picker.scss\" />\n"],"names":["__default__","messages","currentDate","ref","currentTimeText","dateError","timeError","dateFormat","useDateInputFormatter","isTouchDevice","useTouchDevice","t","useI18n","dateValue","computed","timeValue","resolvedIsDateDisabled","props","dateDescription","isMergedDateInBounds","date","startOfDay","setMilliseconds","resolvedDateProps","dateErrorMessage","resolvedTimeProps","timeErrorMessage","clearErrors","isSelfEmittedUpdate","watch","newValue","dateToTimeInputString","validateBounds","value","emitValidationState","isValid","emit","emitModelValue","nextTick","emitValidatedValue","emitInvalidModelValue","time","isValidTimeString","setTimeInDateObject"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;GA2RIA,IAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,EAAA;AAAA,EACM,MAAA;AAAA,EACX,cAAA;AAAA,EACQ,OAAA,EAAA,MAAA,cAAA,OAAA,qBAAA;AAElB;;;;;;;;;;;;;;;;iBArOAC,IAAAC,EAAA,IAAA,GACAC,IAAAD,EAAA,EAAA,GACAE,IAAAF,EAAA,IAAA,GACAG,IAAAH,EAAA,IAAA,GACA,EAAA,YAAAI,EAAA,IAAAC,EAAA,GACA,EAAA,eAAAC,EAAA,IAAAC,EAAA,GACA,EAAA,GAAAC,EAAA,IAAAC,EAAA,GAEAC,IAAAC,EAAA,MAAAZ,EAAA,KAAA,GACAa,IAAAD,EAAA,MAAAV,EAAA,KAAA,GACAY,IAAAF,EAAA,MAAAG,EAAA,WAAA,kBAAAA,EAAA,cAAA,GACAC,IAAAJ,EAAA,MACIL,EAAA,QACIQ,EAAA,WAAA,cAEAA,EAAA,WAAA,cAAA,GAAAA,EAAA,UAAA,WAAA,IAAAN,EAAAJ,EAAA,KAAA,CAAA,KAAAI,EAAAJ,EAAA,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EAAA,OAAAuC,CAAA,CAAA;AAAA,IAA+D;;;;;;;;;;;;;;;"}
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as I, computed as t } from "vue";
2
2
  import { u as c } from "./index.CPOlyau9.js";
3
- import { B as d } from "./typography.D1OZJbEa.js";
3
+ import { B as d } from "./typography.Cd386LC_.js";
4
4
  import { n as y } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
5
5
  import "../assets/date.css";
6
6
  var E = /* @__PURE__ */ ((e) => (e.SHORT_MONTH = "LLL", e.DAY_OF_MONTH = "d", e.LONG_WEEKDAY = "EEEE", e.SHORT_TIME_WITH_PERIOD = "h:mm aa", e.SHORT_TIME_WITHOUT_PERIOD = "H:mm", e.EXACT_TIME_WITH_PERIOD = "h:mm:ss aa", e.EXACT_TIME_WITHOUT_PERIOD = "H:mm:ss", e.LONG_DATE = "LLLL dd, yyyy", e.SHORT_DATE = "LLL dd, yyyy", e.FULL_DATE_EXACT_TIME_WITH_PERIOD = "LLL dd, yyyy, h:mm:ss aa", e.FULL_DATE_EXACT_TIME_WITHOUT_PERIOD = "LLL dd, yyyy, H:mm:ss", e.FULL_DATE_EXACT_TIME_WITH_TIMEZONE_AND_PERIOD = "LLL dd, yyyy, h:mm:ss aa O", e.FULL_DATE_EXACT_TIME_WITH_TIMEZONE_AND_WITHOUT_PERIOD = "LLL dd, yyyy, H:mm:ss O", e.FULL_DATE_TIME_WITH_PERIOD = "LLL dd, yyyy, h:mm aa", e.FULL_DATE_TIME_WITH_TIMEZONE_AND_PERIOD = "LLL dd, yyyy, h:mm aa O", e.FULL_DATE_TIME_WITHOUT_PERIOD = "LLL dd, yyyy, H:mm", e.FULL_DATE_TIME_WITH_TIMEZONE_AND_WITHOUT_PERIOD = "LLL dd, yyyy, H:mm O", e))(E || {});
@@ -159,4 +159,4 @@ export {
159
159
  N as B,
160
160
  E as a
161
161
  };
162
- //# sourceMappingURL=date.CPo8t1n9.js.map
162
+ //# sourceMappingURL=date.P3Xx7JdV.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"date.CPo8t1n9.js","sources":["../../src/components/date/date.types.ts","../../src/components/date/date.vue"],"sourcesContent":["export enum BentoDateFormat {\n // MONTH\n SHORT_MONTH = 'LLL', // Jun\n\n // DAY\n DAY_OF_MONTH = 'd', // 1, 2, ..., 31,\n LONG_WEEKDAY = 'EEEE', // Friday\n\n // TIME\n SHORT_TIME_WITH_PERIOD = `h:mm aa`, // 2:44 PM\n SHORT_TIME_WITHOUT_PERIOD = 'H:mm', // 14:45\n EXACT_TIME_WITH_PERIOD = 'h:mm:ss aa', // 2:05:11 PM\n EXACT_TIME_WITHOUT_PERIOD = 'H:mm:ss', // 14:05:11\n\n // DATE\n LONG_DATE = 'LLLL dd, yyyy', // June 30, 2023\n SHORT_DATE = 'LLL dd, yyyy', // Jun 30, 2023\n FULL_DATE_EXACT_TIME_WITH_PERIOD = `${SHORT_DATE}, h:mm:ss aa`, // June 30, 2023, 2:54:10 PM\n FULL_DATE_EXACT_TIME_WITHOUT_PERIOD = `${SHORT_DATE}, H:mm:ss`, // June 30, 2023, 14:54:42\n FULL_DATE_EXACT_TIME_WITH_TIMEZONE_AND_PERIOD = `${SHORT_DATE}, h:mm:ss aa O`, // June 30, 2023, 2:56:07 PM GMT+2\n FULL_DATE_EXACT_TIME_WITH_TIMEZONE_AND_WITHOUT_PERIOD = `${SHORT_DATE}, H:mm:ss O`, // June 30, 2023, 14:56:28 GMT+2\n FULL_DATE_TIME_WITH_PERIOD = `${SHORT_DATE}, h:mm aa`, // Jun 30, 2023, 2:48 PM\n FULL_DATE_TIME_WITH_TIMEZONE_AND_PERIOD = `${SHORT_DATE}, h:mm aa O`, // Jun 30, 2023, 2:44 PM GMT+2\n FULL_DATE_TIME_WITHOUT_PERIOD = `${SHORT_DATE}, H:mm`, // Jun 30, 2023, 14:48\n FULL_DATE_TIME_WITH_TIMEZONE_AND_WITHOUT_PERIOD = `${SHORT_DATE}, H:mm O`, // Jun 30, 2023, 14:43 GMT+2\n}\n\nexport interface BentoDateProps {\n /**\n * The date to format. The data can be supplied as:\n * - a Date object.\n * - a number of milliseconds elapsed since the epoch.\n * - a date string e.g. '2023-07-31T10:55:22+02:00'.\n */\n date?: Date | number | string | null;\n /**\n * The string format of the date to be displayed\n */\n format?: BentoDateFormat | `${BentoDateFormat}`;\n /**\n * Disable the default typography for the component. Only use this when the component is inside another typography\n */\n disableTypography?: boolean;\n}\n","<template>\n <div class=\"b-date\">\n <bento-typography v-if=\"!disableTypography\" class=\"b-date__label\" el=\"span\" variant=\"body\" strong>\n <time :datetime=\"dateTime\">{{ formattedDate }}</time>\n </bento-typography>\n <time v-else :datetime=\"dateTime\">{{ formattedDate }}</time>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed } from 'vue';\n import { BentoDateFormat, type BentoDateProps } from './date.types';\n import { useI18n } from '@/utils/ts/i18n';\n import { BentoTypography } from '@/components/typography';\n\n const props = defineProps({\n date: { default: null },\n format: { default: BentoDateFormat.FULL_DATE_EXACT_TIME_WITHOUT_PERIOD },\n disableTypography: { type: Boolean, default: false }\n});\n\n const { locale } = useI18n(undefined, true);\n\n /**\n * This is a reverse mapping of the BentoDateFormat enum.\n * It allows us to get the key of the enum by its value, which is then used to look up the\n * corresponding formatting options in `BentoDateFormatPresets`.\n */\n const bentoDateFormatKeyValuePairs = Object.entries(BentoDateFormat).reduce<\n Record<BentoDateFormat, keyof typeof BentoDateFormat>\n >(\n (acc, [key, value]) => {\n acc[value.toString()] = key;\n return acc;\n },\n {} as Record<BentoDateFormat, keyof typeof BentoDateFormat>\n );\n\n const datePropAsDateObject = computed(() => {\n if (!props.date) {\n return null;\n }\n\n return props.date instanceof Date ? props.date : new Date(props.date);\n });\n\n const dateTime = computed(() =>\n datePropAsDateObject.value && !Number.isNaN(datePropAsDateObject.value.getTime())\n ? datePropAsDateObject.value.toISOString()\n : undefined\n );\n\n const formattedDate = computed(() => {\n if (!datePropAsDateObject.value || Number.isNaN(datePropAsDateObject.value.getTime())) {\n return '';\n }\n\n const formatKeyEntry = bentoDateFormatKeyValuePairs?.[props.format];\n\n let dateFormat: Intl.DateTimeFormatOptions | undefined = undefined;\n // Translate the key of the enum to the Intl.DateTimeFormatOptions configuration object\n if (formatKeyEntry && BentoDateFormatPresets?.[formatKeyEntry]) {\n dateFormat = BentoDateFormatPresets?.[formatKeyEntry];\n }\n return new Intl.DateTimeFormat(locale.value, dateFormat).format(datePropAsDateObject.value);\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * The format presets to use when being supplied with a key name in BentoDateFormat.\n * They translate to configuration options that are used in the Intl.DateTimeFormat function\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat#using_options\n */\n const BentoDateFormatPresets: { [key in keyof typeof BentoDateFormat]: Intl.DateTimeFormatOptions } = {\n SHORT_MONTH: {\n month: 'short',\n },\n DAY_OF_MONTH: {\n day: 'numeric',\n },\n LONG_WEEKDAY: {\n weekday: 'long',\n },\n SHORT_TIME_WITH_PERIOD: {\n hour: 'numeric',\n minute: 'numeric',\n hour12: true,\n },\n SHORT_TIME_WITHOUT_PERIOD: {\n hour: 'numeric',\n minute: 'numeric',\n hour12: false,\n },\n EXACT_TIME_WITH_PERIOD: {\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric',\n hour12: true,\n },\n EXACT_TIME_WITHOUT_PERIOD: {\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric',\n hour12: false,\n },\n LONG_DATE: {\n year: 'numeric',\n month: 'long',\n day: 'numeric',\n },\n SHORT_DATE: {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n },\n FULL_DATE_TIME_WITH_PERIOD: {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n hour: 'numeric',\n minute: 'numeric',\n hour12: true,\n },\n FULL_DATE_TIME_WITHOUT_PERIOD: {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n hour: 'numeric',\n minute: 'numeric',\n hour12: false,\n },\n FULL_DATE_EXACT_TIME_WITH_PERIOD: {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric',\n hour12: true,\n },\n FULL_DATE_EXACT_TIME_WITHOUT_PERIOD: {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n hour: '2-digit',\n minute: '2-digit',\n second: '2-digit',\n hour12: false,\n },\n FULL_DATE_TIME_WITH_TIMEZONE_AND_PERIOD: {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n hour: 'numeric',\n minute: 'numeric',\n hour12: true,\n timeZoneName: 'short',\n },\n FULL_DATE_TIME_WITH_TIMEZONE_AND_WITHOUT_PERIOD: {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n hour: 'numeric',\n minute: 'numeric',\n hour12: false,\n timeZoneName: 'short',\n },\n FULL_DATE_EXACT_TIME_WITH_TIMEZONE_AND_PERIOD: {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric',\n hour12: true,\n timeZoneName: 'short',\n },\n FULL_DATE_EXACT_TIME_WITH_TIMEZONE_AND_WITHOUT_PERIOD: {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric',\n hour12: false,\n timeZoneName: 'short',\n },\n };\n\n /**\n * A Date component is used to display a formatted date value.\n *\n * @example\n * import { BentoDate } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoDate },\n * template: `\n * <bento-date :date=\"dateObject\" :format=\"BentoDateFormat.LONG_DATE\"/>\n * `\n * }\n */\n export default {\n name: 'bento-date',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./date.scss\" />\n"],"names":["BentoDateFormat","BentoDateFormat2","BentoDateFormatPresets","__default__","locale","useI18n","bentoDateFormatKeyValuePairs","acc","key","value","datePropAsDateObject","computed","props","dateTime","formattedDate","formatKeyEntry","dateFormat"],"mappings":";;;;;AAAO,IAAAA,IAAA,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7DF,EAAAE,EAAA,SAAA,CAAA,IAAAD,GACAD;AAAA,MACJ,CAAA;AAAA,IACC,GAGLG,IAAAC,EAAA,MACIC,EAAA,OAIAA,EAAA,gBAAA,OAAAA,EAAA,OAAA,IAAA,KAAAA,EAAA,IAAA,IAHI,IAGgE,GAGxEC,IAAAF;AAAA,MAAiB,MAAAD,EAAA,SAAA,CAAA,OAAA,MAAAA,EAAA,MAAA,QAAA,CAAA,IAAAA,EAAA,MAAA,YAAA,IAAA;AAAA,IAGP,GAGVI,IAAAH,EAAA,MAAA;AACI,UAAA,CAAAD,EAAA,SAAA,OAAA,MAAAA,EAAA,MAAA,QAAA,CAAA;AACI,eAAA;AAGJ,YAAAK,IAAAT,IAAAM,EAAA,MAAA;AAEA,UAAAI;AAEA,aAAAD,KAAAb,IAAAa,CAAA,MACIC,IAAAd,IAAAa,CAAA,IAEJ,IAAA,KAAA,eAAAX,EAAA,OAAAY,CAAA,EAAA,OAAAN,EAAA,KAAA;AAAA,IAA0F,CAAA;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"date.P3Xx7JdV.js","sources":["../../src/components/date/date.types.ts","../../src/components/date/date.vue"],"sourcesContent":["export enum BentoDateFormat {\n // MONTH\n SHORT_MONTH = 'LLL', // Jun\n\n // DAY\n DAY_OF_MONTH = 'd', // 1, 2, ..., 31,\n LONG_WEEKDAY = 'EEEE', // Friday\n\n // TIME\n SHORT_TIME_WITH_PERIOD = `h:mm aa`, // 2:44 PM\n SHORT_TIME_WITHOUT_PERIOD = 'H:mm', // 14:45\n EXACT_TIME_WITH_PERIOD = 'h:mm:ss aa', // 2:05:11 PM\n EXACT_TIME_WITHOUT_PERIOD = 'H:mm:ss', // 14:05:11\n\n // DATE\n LONG_DATE = 'LLLL dd, yyyy', // June 30, 2023\n SHORT_DATE = 'LLL dd, yyyy', // Jun 30, 2023\n FULL_DATE_EXACT_TIME_WITH_PERIOD = `${SHORT_DATE}, h:mm:ss aa`, // June 30, 2023, 2:54:10 PM\n FULL_DATE_EXACT_TIME_WITHOUT_PERIOD = `${SHORT_DATE}, H:mm:ss`, // June 30, 2023, 14:54:42\n FULL_DATE_EXACT_TIME_WITH_TIMEZONE_AND_PERIOD = `${SHORT_DATE}, h:mm:ss aa O`, // June 30, 2023, 2:56:07 PM GMT+2\n FULL_DATE_EXACT_TIME_WITH_TIMEZONE_AND_WITHOUT_PERIOD = `${SHORT_DATE}, H:mm:ss O`, // June 30, 2023, 14:56:28 GMT+2\n FULL_DATE_TIME_WITH_PERIOD = `${SHORT_DATE}, h:mm aa`, // Jun 30, 2023, 2:48 PM\n FULL_DATE_TIME_WITH_TIMEZONE_AND_PERIOD = `${SHORT_DATE}, h:mm aa O`, // Jun 30, 2023, 2:44 PM GMT+2\n FULL_DATE_TIME_WITHOUT_PERIOD = `${SHORT_DATE}, H:mm`, // Jun 30, 2023, 14:48\n FULL_DATE_TIME_WITH_TIMEZONE_AND_WITHOUT_PERIOD = `${SHORT_DATE}, H:mm O`, // Jun 30, 2023, 14:43 GMT+2\n}\n\nexport interface BentoDateProps {\n /**\n * The date to format. The data can be supplied as:\n * - a Date object.\n * - a number of milliseconds elapsed since the epoch.\n * - a date string e.g. '2023-07-31T10:55:22+02:00'.\n */\n date?: Date | number | string | null;\n /**\n * The string format of the date to be displayed\n */\n format?: BentoDateFormat | `${BentoDateFormat}`;\n /**\n * Disable the default typography for the component. Only use this when the component is inside another typography\n */\n disableTypography?: boolean;\n}\n","<template>\n <div class=\"b-date\">\n <bento-typography v-if=\"!disableTypography\" class=\"b-date__label\" el=\"span\" variant=\"body\" strong>\n <time :datetime=\"dateTime\">{{ formattedDate }}</time>\n </bento-typography>\n <time v-else :datetime=\"dateTime\">{{ formattedDate }}</time>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed } from 'vue';\n import { BentoDateFormat, type BentoDateProps } from './date.types';\n import { useI18n } from '@/utils/ts/i18n';\n import { BentoTypography } from '@/components/typography';\n\n const props = defineProps({\n date: { default: null },\n format: { default: BentoDateFormat.FULL_DATE_EXACT_TIME_WITHOUT_PERIOD },\n disableTypography: { type: Boolean, default: false }\n});\n\n const { locale } = useI18n(undefined, true);\n\n /**\n * This is a reverse mapping of the BentoDateFormat enum.\n * It allows us to get the key of the enum by its value, which is then used to look up the\n * corresponding formatting options in `BentoDateFormatPresets`.\n */\n const bentoDateFormatKeyValuePairs = Object.entries(BentoDateFormat).reduce<\n Record<BentoDateFormat, keyof typeof BentoDateFormat>\n >(\n (acc, [key, value]) => {\n acc[value.toString()] = key;\n return acc;\n },\n {} as Record<BentoDateFormat, keyof typeof BentoDateFormat>\n );\n\n const datePropAsDateObject = computed(() => {\n if (!props.date) {\n return null;\n }\n\n return props.date instanceof Date ? props.date : new Date(props.date);\n });\n\n const dateTime = computed(() =>\n datePropAsDateObject.value && !Number.isNaN(datePropAsDateObject.value.getTime())\n ? datePropAsDateObject.value.toISOString()\n : undefined\n );\n\n const formattedDate = computed(() => {\n if (!datePropAsDateObject.value || Number.isNaN(datePropAsDateObject.value.getTime())) {\n return '';\n }\n\n const formatKeyEntry = bentoDateFormatKeyValuePairs?.[props.format];\n\n let dateFormat: Intl.DateTimeFormatOptions | undefined = undefined;\n // Translate the key of the enum to the Intl.DateTimeFormatOptions configuration object\n if (formatKeyEntry && BentoDateFormatPresets?.[formatKeyEntry]) {\n dateFormat = BentoDateFormatPresets?.[formatKeyEntry];\n }\n return new Intl.DateTimeFormat(locale.value, dateFormat).format(datePropAsDateObject.value);\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * The format presets to use when being supplied with a key name in BentoDateFormat.\n * They translate to configuration options that are used in the Intl.DateTimeFormat function\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat#using_options\n */\n const BentoDateFormatPresets: { [key in keyof typeof BentoDateFormat]: Intl.DateTimeFormatOptions } = {\n SHORT_MONTH: {\n month: 'short',\n },\n DAY_OF_MONTH: {\n day: 'numeric',\n },\n LONG_WEEKDAY: {\n weekday: 'long',\n },\n SHORT_TIME_WITH_PERIOD: {\n hour: 'numeric',\n minute: 'numeric',\n hour12: true,\n },\n SHORT_TIME_WITHOUT_PERIOD: {\n hour: 'numeric',\n minute: 'numeric',\n hour12: false,\n },\n EXACT_TIME_WITH_PERIOD: {\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric',\n hour12: true,\n },\n EXACT_TIME_WITHOUT_PERIOD: {\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric',\n hour12: false,\n },\n LONG_DATE: {\n year: 'numeric',\n month: 'long',\n day: 'numeric',\n },\n SHORT_DATE: {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n },\n FULL_DATE_TIME_WITH_PERIOD: {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n hour: 'numeric',\n minute: 'numeric',\n hour12: true,\n },\n FULL_DATE_TIME_WITHOUT_PERIOD: {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n hour: 'numeric',\n minute: 'numeric',\n hour12: false,\n },\n FULL_DATE_EXACT_TIME_WITH_PERIOD: {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric',\n hour12: true,\n },\n FULL_DATE_EXACT_TIME_WITHOUT_PERIOD: {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n hour: '2-digit',\n minute: '2-digit',\n second: '2-digit',\n hour12: false,\n },\n FULL_DATE_TIME_WITH_TIMEZONE_AND_PERIOD: {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n hour: 'numeric',\n minute: 'numeric',\n hour12: true,\n timeZoneName: 'short',\n },\n FULL_DATE_TIME_WITH_TIMEZONE_AND_WITHOUT_PERIOD: {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n hour: 'numeric',\n minute: 'numeric',\n hour12: false,\n timeZoneName: 'short',\n },\n FULL_DATE_EXACT_TIME_WITH_TIMEZONE_AND_PERIOD: {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric',\n hour12: true,\n timeZoneName: 'short',\n },\n FULL_DATE_EXACT_TIME_WITH_TIMEZONE_AND_WITHOUT_PERIOD: {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric',\n hour12: false,\n timeZoneName: 'short',\n },\n };\n\n /**\n * A Date component is used to display a formatted date value.\n *\n * @example\n * import { BentoDate } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoDate },\n * template: `\n * <bento-date :date=\"dateObject\" :format=\"BentoDateFormat.LONG_DATE\"/>\n * `\n * }\n */\n export default {\n name: 'bento-date',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./date.scss\" />\n"],"names":["BentoDateFormat","BentoDateFormat2","BentoDateFormatPresets","__default__","locale","useI18n","bentoDateFormatKeyValuePairs","acc","key","value","datePropAsDateObject","computed","props","dateTime","formattedDate","formatKeyEntry","dateFormat"],"mappings":";;;;;AAAO,IAAAA,IAAA,kBAAAC,OAEHA,EAAA,cAAA,OAGAA,EAAA,eAAA,KACAA,EAAA,eAAA,QAGAA,EAAA,yBAAA,WACAA,EAAA,4BAAA,QACAA,EAAA,yBAAA,cACAA,EAAA,4BAAA,WAGAA,EAAA,YAAA,iBACAA,EAAA,aAAA,gBACAA,EAAA,mCAAA,4BACAA,EAAA,sCAAA,yBACAA,EAAA,gDAAA,8BACAA,EAAA,wDAAA,2BACAA,EAAA,6BAAA,yBACAA,EAAA,0CAAA,2BACAA,EAAA,gCAAA,sBACAA,EAAA,kDAAA,wBAxBQA,IAAAD,KAAA,CAAA,CAAA;AC2ER,MAAAE,IAAA;AAAA,EAAsG,aAAA;AAAA,IACrF,OAAA;AAAA,EACF;AAAA,EACX,cAAA;AAAA,IACc,KAAA;AAAA,EACL;AAAA,EACT,cAAA;AAAA,IACc,SAAA;AAAA,EACD;AAAA,EACb,wBAAA;AAAA,IACwB,MAAA;AAAA,IACd,QAAA;AAAA,IAC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A,KAAA;AAAA,IAA0F,CAAA;;;;;;;;;;;;;;;;"}
@@ -1,9 +1,9 @@
1
1
  import { defineComponent as J, useSlots as M, ref as _, computed as n, inject as O, watch as P, nextTick as h, onMounted as U, onUnmounted as z } from "vue";
2
- import { B as K } from "./button.DII5Ifwa.js";
2
+ import { B as K } from "./button.tsTeQRcP.js";
3
3
  import { A as Y } from "./arrow-left.BBflhjQa.js";
4
4
  import { u as $ } from "./use-has-slot.C9lQZ6nz.js";
5
5
  import { u as X } from "./index.CPOlyau9.js";
6
- import { i as Z } from "./typography.D1OZJbEa.js";
6
+ import { i as Z } from "./typography.Cd386LC_.js";
7
7
  import { D as q, a as Q, B as G } from "./dialog-page.keys.Dym9e6k3.js";
8
8
  import { c as W } from "./index.CL3TXc0a.js";
9
9
  import { n as ee } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
@@ -130,4 +130,4 @@ const me = ie.exports;
130
130
  export {
131
131
  me as D
132
132
  };
133
- //# sourceMappingURL=dialog-page.Bct3zOQO.js.map
133
+ //# sourceMappingURL=dialog-page.DORdXmEm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dialog-page.Bct3zOQO.js","sources":["../../src/components/internal/dialog-page/dialog-page.vue"],"sourcesContent":["<template>\n <Transition :name=\"animation\" mode=\"out-in\" @after-leave=\"updateAnimation\" @leave=\"startAnimation\">\n <div v-if=\"isOpen && showPage\" class=\"b-dialog-page\" :class=\"computedClasses\">\n <div v-if=\"hasSlot('header')\" class=\"b-dialog-page__header\" :class=\"headerConditionalClasses\">\n <div\n v-if=\"showBackButton\"\n class=\"b-dialog-page__back-button\"\n :style=\"backButtonStyling\"\n data-testid=\"back-button\"\n >\n <bento-button variant=\"tertiary\" @click=\"goToPreviousPage(previousPage)\">\n <arrow-left-icon :svg-title=\"t('goToPreviousPage')\" />\n </bento-button>\n </div>\n <slot name=\"header\"></slot>\n </div>\n <div\n v-if=\"hasSlot('content')\"\n ref=\"contentElement\"\n class=\"b-dialog-page__content\"\n :tabindex=\"isScrollable ? 0 : null\"\n @scroll=\"onScroll\"\n >\n <slot name=\"content\" />\n </div>\n <div v-if=\"hasSlot('footer')\" class=\"b-dialog-page__footer\" :class=\"footerConditionalClasses\">\n <slot name=\"footer\" />\n </div>\n </div>\n </Transition>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, inject, nextTick, onMounted, onUnmounted, type PropType, ref, useSlots, watch } from 'vue';\n\n import { BentoButton } from '@/components/button';\n import ArrowLeftIcon from '@adyen/ui-assets-icons-16/vue/arrow-left';\n\n import { useHasSlot } from '@/composables/use-has-slot/use-has-slot';\n import { useI18n } from '@/utils/ts/i18n';\n import { isDevelopmentEnviroment } from '@/utils/ts/dev-environment';\n\n import {\n BentoDialogPageAnimation,\n type BentoDialogPageConfigData,\n type BentoDialogPageRegisterPage,\n } from './dialog-page.types';\n import type { CSSProperties } from 'vue/types/jsx.d.ts';\n\n import { DIALOG_PAGE_CONFIG_INJECTION_KEY, DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY } from './dialog-page.keys';\n\n import messages from './messages.json';\n import { useScroll } from '@vueuse/core';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const props = defineProps({\n /**\n * Sets `position: absolute` on the dialog page root element.\n * Enabled by default as it is used by default in most places.\n * Inspector requires it to not be absolute positioned.\n * @default true\n */\n absolutePosition: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Show header and actions border\n */\n alwaysShowBorder: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Pass custom styling to the back button to position it correctly with the header slot\n */\n backButtonStyling: { type: Object as PropType<CSSProperties>, default: null },\n\n /**\n * Identifier of the page, used with activePage prop to handle navigation\n */\n pageId: {\n type: String,\n default: undefined,\n },\n\n /**\n * ID of the page for the back button to navigate to. Only use it to overwrite the default back behavior\n * Used when the back button should not take the user to the natural previous page\n * Set to `null` to hide back button in the page\n */\n previousPage: {\n type: String,\n default: undefined,\n },\n });\n\n const emit = defineEmits([\"animationend\"]);\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n // Refs\n const contentElement = ref<HTMLDivElement>(null);\n const hasScroll = ref(false);\n const isMounted = ref(false);\n\n const { arrivedState, measure } = useScroll(contentElement);\n\n // Logic to choose which page is active/shown\n const showPage = computed(() => (activePage.value ? activePage.value === props.pageId : true));\n\n const computedClasses = computed(() => ({\n 'b-dialog-page--absolute-position': props.absolutePosition,\n }));\n\n // Scrolling styling logic\n const headerConditionalClasses = computed(() => ({\n 'b-dialog-page__header--with-border': props.alwaysShowBorder || (hasScroll.value && !arrivedState.top),\n }));\n\n const footerConditionalClasses = computed(() => ({\n 'b-dialog-page__footer--with-border': props.alwaysShowBorder || (hasScroll.value && !arrivedState.bottom),\n }));\n\n const isScrollable = computed(() => !(arrivedState.bottom && arrivedState.top));\n\n const onScroll = () => {\n if (!contentElement.value) {\n return;\n }\n };\n\n const calculateScroll = async watchedValue => {\n if (!watchedValue) {\n return;\n }\n // Wait for content to be rendered to be able to calculate the height\n await nextTick();\n if (!isMounted.value) {\n return;\n }\n // Refresh the scroll position after the content is rendered so isScrollable can apply tabindex to the content.\n measure();\n hasScroll.value = contentElement.value && contentElement.value.scrollHeight > contentElement.value.clientHeight;\n };\n\n const { activePage, animation, isAnimationActive, isOpen, pages, previousPages, updatePage } =\n inject<BentoDialogPageConfigData>(DIALOG_PAGE_CONFIG_INJECTION_KEY);\n\n watch(() => isOpen.value, calculateScroll, { immediate: true });\n watch(() => showPage.value, calculateScroll, { immediate: true });\n\n // Logic to determine whether the back button should be shown on the page\n const showBackButton = computed(() => {\n if (props.previousPage) {\n return true;\n }\n if (props.previousPage === null) {\n return false;\n }\n return hasPreviousPages.value && showPage.value;\n });\n\n // Animation\n const updateAnimation = () => {\n animation.value = BentoDialogPageAnimation.TRANSITION_LEVEL_DEEPER;\n if (isAnimationActive) {\n isAnimationActive.value = false;\n }\n\n emit('animationend');\n };\n\n const startAnimation = () => {\n if (isAnimationActive) {\n isAnimationActive.value = true;\n }\n };\n\n // Previous page logic\n const hasPreviousPages = computed(() => previousPages.value.length > 1);\n const lastPage = computed(() => previousPages.value[previousPages.value.length - 1]);\n const isActivePageValid = computed(() => pages.value.some(page => page === activePage.value));\n\n const goToPreviousPage = async (page: string) => {\n if (page) {\n const index = previousPages.value.indexOf(page);\n if (index !== -1) {\n previousPages.value = previousPages.value.slice(0, index + 1);\n } else {\n previousPages.value = [page];\n }\n } else {\n previousPages.value.pop();\n }\n\n animation.value = BentoDialogPageAnimation.TRANSITION_LEVEL_UPPER;\n await nextTick();\n if (!isMounted.value) {\n return;\n }\n updatePage(lastPage.value);\n };\n\n // Add new page to the previousPage array to keep track of user navigation\n watch(\n () => activePage.value,\n async () => {\n await nextTick();\n if (!isMounted.value || !isOpen.value) {\n return;\n }\n\n if (!!activePage.value && !isActivePageValid.value) {\n if (isDevelopmentEnviroment) {\n // eslint-disable-next-line no-console\n console.error(\n `The activePage passed \"${activePage.value}\" does not match the id of any of the pages`\n );\n return;\n }\n }\n\n if (activePage.value !== lastPage.value) {\n previousPages.value.push(activePage.value);\n }\n },\n { immediate: true }\n );\n\n // Register page to parent component and inject data from parent component\n const registerPage = inject<BentoDialogPageRegisterPage>(DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY);\n const { unregisterPage } = registerPage(props.pageId);\n\n onMounted(() => {\n isMounted.value = true;\n // Recalculate on mount because the initial useScroll measurement can run before the content is fully sized.\n // Without this, a scrollable content container does not receive tabindex until the user scrolls.\n calculateScroll(true);\n });\n\n // Unregister page on unmounting the page\n onUnmounted(() => {\n isMounted.value = false;\n unregisterPage();\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * DialogPage is an internal component used to render different pages of dialog components (Modal, ModalFullscreen and Sidepanel)\n *\n * @example\n * import { DialogPage } from '@/internal';\n *\n * export default {\n * components: { DialogPage },\n * template: `\n * <dialog-page pageId='step1' always-show-border>\n * <template #header>Header</template>\n * <template #content>Content</template>\n * <template #footer>Footer</template>\n * </dialog-page>\n * `\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./dialog-page.scss\" />\n"],"names":["__default__","messages","slots","useSlots","hasSlot","useHasSlot","t","useI18n","contentElement","ref","hasScroll","isMounted","arrivedState","measure","useScroll","showPage","computed","activePage","props","computedClasses","headerConditionalClasses","footerConditionalClasses","isScrollable","onScroll","calculateScroll","watchedValue","nextTick","animation","isAnimationActive","isOpen","pages","previousPages","updatePage","inject","DIALOG_PAGE_CONFIG_INJECTION_KEY","watch","showBackButton","hasPreviousPages","updateAnimation","BentoDialogPageAnimation","emit","startAnimation","lastPage","isActivePageValid","page","goToPreviousPage","index","isDevelopmentEnviroment","registerPage","DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY","unregisterPage","onMounted","onUnmounted"],"mappings":";;;;;;;;;;;;;;;;;;;;;;GA+QIA,KAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,GAAA;AAEf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA3KAC,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA,GACA,EAAA,GAAAI,EAAA,IAAAC,EAAA,GAGAC,IAAAC,EAAA,IAAA,GACAC,IAAAD,EAAA,EAAA,GACAE,IAAAF,EAAA,EAAA,GAEA,EAAA,cAAAG,GAAA,SAAAC,EAAA,IAAAC,EAAAN,CAAA,GAGAO,IAAAC,EAAA,MAAAC,EAAA,QAAAA,EAAA,UAAAC,EAAA,SAAA,EAAA,GAEAC,IAAAH,EAAA,OAAA;AAAA,MAAwC,oCAAAE,EAAA;AAAA,IACM,EAAA,GAI9CE,IAAAJ,EAAA,OAAA;AAAA,MAAiD,sCAAAE,EAAA,oBAAAR,EAAA,SAAA,CAAAE,EAAA;AAAA,IACqD,EAAA,GAGtGS,IAAAL,EAAA,OAAA;AAAA,MAAiD,sCAAAE,EAAA,oBAAAR,EAAA,SAAA,CAAAE,EAAA;AAAA,IACqD,EAAA,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A,QAAAb,EAAA,MAAA,IAAA;AAKJ,MAFAJ,EAAA,QAAAY,EAAA,wBACA,MAAAb,EAAA,GACAf,EAAA,SAGAqB,EAAAU,EAAA,KAAA;AAAA,IAAyB;AAI7B,IAAAP;AAAA,MAAA,MAAAlB,EAAA;AAAA,MACqB,YAAA;AAGb,YADA,MAAAS,EAAA,GACA,GAAAf,EAAA,SAAA,CAAAkB,EAAA,QAIA;AAAA,cAAAZ,EAAA,SAAA,CAAA0B,EAAA,SACII,GAAA;AAEI,oBAAA;AAAA,cAAQ,0BAAA9B,EAAA,KAAA;AAAA,YACsC;AAE9C;AAAA,UAAA;AAIR,UAAAA,EAAA,UAAAyB,EAAA,SACIX,EAAA,MAAA,KAAAd,EAAA,KAAA;AAAA;AAAA,MACJ;AAAA,MACJ,EAAA,WAAA,GAAA;AAAA,IACkB;AAItB,UAAA+B,IAAAf,EAAAgB,CAAA,GACA,EAAA,gBAAAC,EAAA,IAAAF,EAAA9B,EAAA,MAAA;AAEA,WAAAiC,EAAA,MAAA;AACI,MAAAxC,EAAA,QAAA,IAGAa,EAAA,EAAA;AAAA,IAAoB,CAAA,GAIxB4B,EAAA,MAAA;AACI,MAAAzC,EAAA,QAAA,IACAuC,EAAA;AAAA,IAAe,CAAA;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"dialog-page.DORdXmEm.js","sources":["../../src/components/internal/dialog-page/dialog-page.vue"],"sourcesContent":["<template>\n <Transition :name=\"animation\" mode=\"out-in\" @after-leave=\"updateAnimation\" @leave=\"startAnimation\">\n <div v-if=\"isOpen && showPage\" class=\"b-dialog-page\" :class=\"computedClasses\">\n <div v-if=\"hasSlot('header')\" class=\"b-dialog-page__header\" :class=\"headerConditionalClasses\">\n <div\n v-if=\"showBackButton\"\n class=\"b-dialog-page__back-button\"\n :style=\"backButtonStyling\"\n data-testid=\"back-button\"\n >\n <bento-button variant=\"tertiary\" @click=\"goToPreviousPage(previousPage)\">\n <arrow-left-icon :svg-title=\"t('goToPreviousPage')\" />\n </bento-button>\n </div>\n <slot name=\"header\"></slot>\n </div>\n <div\n v-if=\"hasSlot('content')\"\n ref=\"contentElement\"\n class=\"b-dialog-page__content\"\n :tabindex=\"isScrollable ? 0 : null\"\n @scroll=\"onScroll\"\n >\n <slot name=\"content\" />\n </div>\n <div v-if=\"hasSlot('footer')\" class=\"b-dialog-page__footer\" :class=\"footerConditionalClasses\">\n <slot name=\"footer\" />\n </div>\n </div>\n </Transition>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, inject, nextTick, onMounted, onUnmounted, type PropType, ref, useSlots, watch } from 'vue';\n\n import { BentoButton } from '@/components/button';\n import ArrowLeftIcon from '@adyen/ui-assets-icons-16/vue/arrow-left';\n\n import { useHasSlot } from '@/composables/use-has-slot/use-has-slot';\n import { useI18n } from '@/utils/ts/i18n';\n import { isDevelopmentEnviroment } from '@/utils/ts/dev-environment';\n\n import {\n BentoDialogPageAnimation,\n type BentoDialogPageConfigData,\n type BentoDialogPageRegisterPage,\n } from './dialog-page.types';\n import type { CSSProperties } from 'vue/types/jsx.d.ts';\n\n import { DIALOG_PAGE_CONFIG_INJECTION_KEY, DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY } from './dialog-page.keys';\n\n import messages from './messages.json';\n import { useScroll } from '@vueuse/core';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const props = defineProps({\n /**\n * Sets `position: absolute` on the dialog page root element.\n * Enabled by default as it is used by default in most places.\n * Inspector requires it to not be absolute positioned.\n * @default true\n */\n absolutePosition: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Show header and actions border\n */\n alwaysShowBorder: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Pass custom styling to the back button to position it correctly with the header slot\n */\n backButtonStyling: { type: Object as PropType<CSSProperties>, default: null },\n\n /**\n * Identifier of the page, used with activePage prop to handle navigation\n */\n pageId: {\n type: String,\n default: undefined,\n },\n\n /**\n * ID of the page for the back button to navigate to. Only use it to overwrite the default back behavior\n * Used when the back button should not take the user to the natural previous page\n * Set to `null` to hide back button in the page\n */\n previousPage: {\n type: String,\n default: undefined,\n },\n });\n\n const emit = defineEmits([\"animationend\"]);\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n // Refs\n const contentElement = ref<HTMLDivElement>(null);\n const hasScroll = ref(false);\n const isMounted = ref(false);\n\n const { arrivedState, measure } = useScroll(contentElement);\n\n // Logic to choose which page is active/shown\n const showPage = computed(() => (activePage.value ? activePage.value === props.pageId : true));\n\n const computedClasses = computed(() => ({\n 'b-dialog-page--absolute-position': props.absolutePosition,\n }));\n\n // Scrolling styling logic\n const headerConditionalClasses = computed(() => ({\n 'b-dialog-page__header--with-border': props.alwaysShowBorder || (hasScroll.value && !arrivedState.top),\n }));\n\n const footerConditionalClasses = computed(() => ({\n 'b-dialog-page__footer--with-border': props.alwaysShowBorder || (hasScroll.value && !arrivedState.bottom),\n }));\n\n const isScrollable = computed(() => !(arrivedState.bottom && arrivedState.top));\n\n const onScroll = () => {\n if (!contentElement.value) {\n return;\n }\n };\n\n const calculateScroll = async watchedValue => {\n if (!watchedValue) {\n return;\n }\n // Wait for content to be rendered to be able to calculate the height\n await nextTick();\n if (!isMounted.value) {\n return;\n }\n // Refresh the scroll position after the content is rendered so isScrollable can apply tabindex to the content.\n measure();\n hasScroll.value = contentElement.value && contentElement.value.scrollHeight > contentElement.value.clientHeight;\n };\n\n const { activePage, animation, isAnimationActive, isOpen, pages, previousPages, updatePage } =\n inject<BentoDialogPageConfigData>(DIALOG_PAGE_CONFIG_INJECTION_KEY);\n\n watch(() => isOpen.value, calculateScroll, { immediate: true });\n watch(() => showPage.value, calculateScroll, { immediate: true });\n\n // Logic to determine whether the back button should be shown on the page\n const showBackButton = computed(() => {\n if (props.previousPage) {\n return true;\n }\n if (props.previousPage === null) {\n return false;\n }\n return hasPreviousPages.value && showPage.value;\n });\n\n // Animation\n const updateAnimation = () => {\n animation.value = BentoDialogPageAnimation.TRANSITION_LEVEL_DEEPER;\n if (isAnimationActive) {\n isAnimationActive.value = false;\n }\n\n emit('animationend');\n };\n\n const startAnimation = () => {\n if (isAnimationActive) {\n isAnimationActive.value = true;\n }\n };\n\n // Previous page logic\n const hasPreviousPages = computed(() => previousPages.value.length > 1);\n const lastPage = computed(() => previousPages.value[previousPages.value.length - 1]);\n const isActivePageValid = computed(() => pages.value.some(page => page === activePage.value));\n\n const goToPreviousPage = async (page: string) => {\n if (page) {\n const index = previousPages.value.indexOf(page);\n if (index !== -1) {\n previousPages.value = previousPages.value.slice(0, index + 1);\n } else {\n previousPages.value = [page];\n }\n } else {\n previousPages.value.pop();\n }\n\n animation.value = BentoDialogPageAnimation.TRANSITION_LEVEL_UPPER;\n await nextTick();\n if (!isMounted.value) {\n return;\n }\n updatePage(lastPage.value);\n };\n\n // Add new page to the previousPage array to keep track of user navigation\n watch(\n () => activePage.value,\n async () => {\n await nextTick();\n if (!isMounted.value || !isOpen.value) {\n return;\n }\n\n if (!!activePage.value && !isActivePageValid.value) {\n if (isDevelopmentEnviroment) {\n // eslint-disable-next-line no-console\n console.error(\n `The activePage passed \"${activePage.value}\" does not match the id of any of the pages`\n );\n return;\n }\n }\n\n if (activePage.value !== lastPage.value) {\n previousPages.value.push(activePage.value);\n }\n },\n { immediate: true }\n );\n\n // Register page to parent component and inject data from parent component\n const registerPage = inject<BentoDialogPageRegisterPage>(DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY);\n const { unregisterPage } = registerPage(props.pageId);\n\n onMounted(() => {\n isMounted.value = true;\n // Recalculate on mount because the initial useScroll measurement can run before the content is fully sized.\n // Without this, a scrollable content container does not receive tabindex until the user scrolls.\n calculateScroll(true);\n });\n\n // Unregister page on unmounting the page\n onUnmounted(() => {\n isMounted.value = false;\n unregisterPage();\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * DialogPage is an internal component used to render different pages of dialog components (Modal, ModalFullscreen and Sidepanel)\n *\n * @example\n * import { DialogPage } from '@/internal';\n *\n * export default {\n * components: { DialogPage },\n * template: `\n * <dialog-page pageId='step1' always-show-border>\n * <template #header>Header</template>\n * <template #content>Content</template>\n * <template #footer>Footer</template>\n * </dialog-page>\n * `\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./dialog-page.scss\" />\n"],"names":["__default__","messages","slots","useSlots","hasSlot","useHasSlot","t","useI18n","contentElement","ref","hasScroll","isMounted","arrivedState","measure","useScroll","showPage","computed","activePage","props","computedClasses","headerConditionalClasses","footerConditionalClasses","isScrollable","onScroll","calculateScroll","watchedValue","nextTick","animation","isAnimationActive","isOpen","pages","previousPages","updatePage","inject","DIALOG_PAGE_CONFIG_INJECTION_KEY","watch","showBackButton","hasPreviousPages","updateAnimation","BentoDialogPageAnimation","emit","startAnimation","lastPage","isActivePageValid","page","goToPreviousPage","index","isDevelopmentEnviroment","registerPage","DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY","unregisterPage","onMounted","onUnmounted"],"mappings":";;;;;;;;;;;;;;;;;;;;;;GA+QIA,KAAA;AAAA,EAAe,MAAA,EAAA,UAAAC,GAAA;AAEf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA3KAC,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA,GACA,EAAA,GAAAI,EAAA,IAAAC,EAAA,GAGAC,IAAAC,EAAA,IAAA,GACAC,IAAAD,EAAA,EAAA,GACAE,IAAAF,EAAA,EAAA,GAEA,EAAA,cAAAG,GAAA,SAAAC,EAAA,IAAAC,EAAAN,CAAA,GAGAO,IAAAC,EAAA,MAAAC,EAAA,QAAAA,EAAA,UAAAC,EAAA,SAAA,EAAA,GAEAC,IAAAH,EAAA,OAAA;AAAA,MAAwC,oCAAAE,EAAA;AAAA,IACM,EAAA,GAI9CE,IAAAJ,EAAA,OAAA;AAAA,MAAiD,sCAAAE,EAAA,oBAAAR,EAAA,SAAA,CAAAE,EAAA;AAAA,IAC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