@adyen/bento-vue2 1.51.0 → 1.52.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 (255) hide show
  1. package/dist/@types/index.d.ts +109 -4
  2. package/dist/action-bar.js +1 -1
  3. package/dist/alert.js +1 -1
  4. package/dist/assets/accordion-item.css +1 -1
  5. package/dist/assets/action-bar.css +1 -1
  6. package/dist/assets/base-modal.css +1 -1
  7. package/dist/assets/button-actions-with-menu.css +1 -1
  8. package/dist/assets/calendar.css +1 -1
  9. package/dist/assets/card.css +1 -1
  10. package/dist/assets/checkbox-input.css +1 -1
  11. package/dist/assets/checkbox.css +1 -1
  12. package/dist/assets/data-grid.css +1 -1
  13. package/dist/assets/date-picker.css +1 -1
  14. package/dist/assets/date-range-picker.css +1 -1
  15. package/dist/assets/dialog-page.css +1 -1
  16. package/dist/assets/file-uploader.css +1 -1
  17. package/dist/assets/filter-bar.css +1 -1
  18. package/dist/assets/form-layout-title.css +1 -1
  19. package/dist/assets/input-field-password.css +1 -1
  20. package/dist/assets/input-field-phone-number.css +1 -1
  21. package/dist/assets/input-field.css +1 -1
  22. package/dist/assets/inspector.css +1 -1
  23. package/dist/assets/menu.css +1 -1
  24. package/dist/assets/modal-fullscreen.css +1 -1
  25. package/dist/assets/popover.css +1 -1
  26. package/dist/assets/sidepanel.css +1 -1
  27. package/dist/button.js +1 -1
  28. package/dist/card.js +1 -1
  29. package/dist/checkbox.js +3 -3
  30. package/dist/chunks/{action-bar.DGhojWpe.js → action-bar.DuJkjAt1.js} +5 -5
  31. package/dist/chunks/{action-bar.DGhojWpe.js.map → action-bar.DuJkjAt1.js.map} +1 -1
  32. package/dist/chunks/{alert.BSBLkXkM.js → alert.BkMKX9wD.js} +9 -9
  33. package/dist/chunks/alert.BkMKX9wD.js.map +1 -0
  34. package/dist/chunks/{base-modal.Dan5WQin.js → base-modal.CiTysydg.js} +3 -3
  35. package/dist/chunks/{base-modal.Dan5WQin.js.map → base-modal.CiTysydg.js.map} +1 -1
  36. package/dist/chunks/button-actions-with-menu.B9oXYIgo.js +166 -0
  37. package/dist/chunks/button-actions-with-menu.B9oXYIgo.js.map +1 -0
  38. package/dist/chunks/{button-actions.GhdYBSwt.js → button-actions.DAvSJtOB.js} +3 -3
  39. package/dist/chunks/{button-actions.GhdYBSwt.js.map → button-actions.DAvSJtOB.js.map} +1 -1
  40. package/dist/chunks/calendar.Bq67h02Z.js +1130 -0
  41. package/dist/chunks/calendar.Bq67h02Z.js.map +1 -0
  42. package/dist/chunks/{card.Csazj5Qz.js → card.AQO_BjGb.js} +2 -2
  43. package/dist/chunks/{card.Csazj5Qz.js.map → card.AQO_BjGb.js.map} +1 -1
  44. package/dist/chunks/{checkbox-group.DcJ31aLq.js → checkbox-group.CqSIn-lG.js} +4 -4
  45. package/dist/chunks/{checkbox-group.DcJ31aLq.js.map → checkbox-group.CqSIn-lG.js.map} +1 -1
  46. package/dist/chunks/checkbox-input.CMhyJDdo.js +129 -0
  47. package/dist/chunks/checkbox-input.CMhyJDdo.js.map +1 -0
  48. package/dist/chunks/checkbox.BeYtbfPv.js +170 -0
  49. package/dist/chunks/checkbox.BeYtbfPv.js.map +1 -0
  50. package/dist/chunks/checkmark-circle-fill.DZBl7CeY.js +24 -0
  51. package/dist/chunks/checkmark-circle-fill.DZBl7CeY.js.map +1 -0
  52. package/dist/chunks/{code-snippet.z_G2UXVT.js → code-snippet.CW42FdpP.js} +5 -5
  53. package/dist/chunks/{code-snippet.z_G2UXVT.js.map → code-snippet.CW42FdpP.js.map} +1 -1
  54. package/dist/chunks/{controls-group.ghJ7a8PY.js → controls-group.D0_cJaFF.js} +2 -2
  55. package/dist/chunks/{controls-group.ghJ7a8PY.js.map → controls-group.D0_cJaFF.js.map} +1 -1
  56. package/dist/chunks/{copy.BNOiinIt.js → copy.2iD8aI5a.js} +3 -3
  57. package/dist/chunks/{copy.BNOiinIt.js.map → copy.2iD8aI5a.js.map} +1 -1
  58. package/dist/chunks/cross-circle-fill.Ra0-PIUo.js +24 -0
  59. package/dist/chunks/cross-circle-fill.Ra0-PIUo.js.map +1 -0
  60. package/dist/chunks/{dashboard-section.Db_E382r.js → dashboard-section.Cmulh6WM.js} +3 -3
  61. package/dist/chunks/{dashboard-section.Db_E382r.js.map → dashboard-section.Cmulh6WM.js.map} +1 -1
  62. package/dist/chunks/{dashed-underline.CAhDrAG_.js → dashed-underline.eMF75SuT.js} +3 -3
  63. package/dist/chunks/{dashed-underline.CAhDrAG_.js.map → dashed-underline.eMF75SuT.js.map} +1 -1
  64. package/dist/chunks/{data-grid-template.DG5IWdLG.js → data-grid-template.CdHnPE1-.js} +2 -2
  65. package/dist/chunks/{data-grid-template.DG5IWdLG.js.map → data-grid-template.CdHnPE1-.js.map} +1 -1
  66. package/dist/chunks/{data-grid.CHV-FvBB.js → data-grid.DedjAz4_.js} +23 -23
  67. package/dist/chunks/data-grid.DedjAz4_.js.map +1 -0
  68. package/dist/chunks/date-picker.BdMr3Sn2.js +235 -0
  69. package/dist/chunks/date-picker.BdMr3Sn2.js.map +1 -0
  70. package/dist/chunks/date-range-picker.BHfvD0GK.js +903 -0
  71. package/dist/chunks/date-range-picker.BHfvD0GK.js.map +1 -0
  72. package/dist/chunks/{date.YLIcAerL.js → date.dYFFEunA.js} +12 -12
  73. package/dist/chunks/{date.YLIcAerL.js.map → date.dYFFEunA.js.map} +1 -1
  74. package/dist/chunks/{dropdown-default-textbox.DzPBw4CV.js → dropdown-default-textbox.CDTdHfTv.js} +2 -2
  75. package/dist/chunks/{dropdown-default-textbox.DzPBw4CV.js.map → dropdown-default-textbox.CDTdHfTv.js.map} +1 -1
  76. package/dist/chunks/{dropdown-tag.K4idCLeu.js → dropdown-tag.CvZ1jckk.js} +4 -4
  77. package/dist/chunks/{dropdown-tag.K4idCLeu.js.map → dropdown-tag.CvZ1jckk.js.map} +1 -1
  78. package/dist/chunks/{dropdown.DFEGHxjw.js → dropdown.CcHoKbLz.js} +108 -107
  79. package/dist/chunks/dropdown.CcHoKbLz.js.map +1 -0
  80. package/dist/chunks/{error-message.B3oWB_HM.js → error-message.B1-ekAMa.js} +3 -3
  81. package/dist/chunks/{error-message.B3oWB_HM.js.map → error-message.B1-ekAMa.js.map} +1 -1
  82. package/dist/chunks/es6.BtaxuP0b.js.map +1 -1
  83. package/dist/chunks/{file-uploader.DaBMZSsB.js → file-uploader.Dlfzh5QQ.js} +7 -7
  84. package/dist/chunks/file-uploader.Dlfzh5QQ.js.map +1 -0
  85. package/dist/chunks/{filter-bar.DClIG9aP.js → filter-bar.CwqoJGiK.js} +568 -618
  86. package/dist/chunks/{filter-bar.DClIG9aP.js.map → filter-bar.CwqoJGiK.js.map} +1 -1
  87. package/dist/chunks/{focus-trap._RrLaKlq.js → focus-trap.CWlKh48z.js} +2 -2
  88. package/dist/chunks/{focus-trap._RrLaKlq.js.map → focus-trap.CWlKh48z.js.map} +1 -1
  89. package/dist/chunks/{footer-actions.D0SuJroc.js → footer-actions.BkHpWa7A.js} +2 -2
  90. package/dist/chunks/{footer-actions.D0SuJroc.js.map → footer-actions.BkHpWa7A.js.map} +1 -1
  91. package/dist/chunks/{form-layout-title.C1n2S73_.js → form-layout-title.DK1-01RH.js} +50 -47
  92. package/dist/chunks/form-layout-title.DK1-01RH.js.map +1 -0
  93. package/dist/chunks/header.BAKjEGmH.js +183 -0
  94. package/dist/chunks/header.BAKjEGmH.js.map +1 -0
  95. package/dist/chunks/{index.CU8GKq4C.js → index.-wO_BQCb.js} +2 -1
  96. package/dist/chunks/{index.CU8GKq4C.js.map → index.-wO_BQCb.js.map} +1 -1
  97. package/dist/chunks/index.BDuTpjD8.js +40 -0
  98. package/dist/chunks/index.BDuTpjD8.js.map +1 -0
  99. package/dist/chunks/index.BxBB1rsx.js +15 -0
  100. package/dist/chunks/index.BxBB1rsx.js.map +1 -0
  101. package/dist/chunks/index.DD7TppDb.js +10 -0
  102. package/dist/chunks/index.DD7TppDb.js.map +1 -0
  103. package/dist/chunks/{info-icon-with-popover.C29aZ1Vh.js → info-icon-with-popover.CxXWP4TR.js} +3 -3
  104. package/dist/chunks/{info-icon-with-popover.C29aZ1Vh.js.map → info-icon-with-popover.CxXWP4TR.js.map} +1 -1
  105. package/dist/chunks/{info-icon.bXR5eo6I.js → info-icon.D3neDWqH.js} +4 -4
  106. package/dist/chunks/{info-icon.bXR5eo6I.js.map → info-icon.D3neDWqH.js.map} +1 -1
  107. package/dist/chunks/info.4d_mJHvT.js +24 -0
  108. package/dist/chunks/info.4d_mJHvT.js.map +1 -0
  109. package/dist/chunks/{input-field-password.DsIpkc_9.js → input-field-password.CO0lAgMh.js} +75 -72
  110. package/dist/chunks/input-field-password.CO0lAgMh.js.map +1 -0
  111. package/dist/chunks/{input-field-phone-number.Bmugk7fI.js → input-field-phone-number.TXnK0dch.js} +324 -321
  112. package/dist/chunks/{input-field-phone-number.Bmugk7fI.js.map → input-field-phone-number.TXnK0dch.js.map} +1 -1
  113. package/dist/chunks/input-field.De4sp76g.js +152 -0
  114. package/dist/chunks/input-field.De4sp76g.js.map +1 -0
  115. package/dist/chunks/{inspector.types.C9Oc8FgA.js → inspector.types.ClnPOYmb.js} +3 -3
  116. package/dist/chunks/{inspector.types.C9Oc8FgA.js.map → inspector.types.ClnPOYmb.js.map} +1 -1
  117. package/dist/chunks/{layout-row.CHwDU8yK.js → layout-row.dh2VyGoD.js} +2 -2
  118. package/dist/chunks/{layout-row.CHwDU8yK.js.map → layout-row.dh2VyGoD.js.map} +1 -1
  119. package/dist/chunks/{listbox-option-tag.bPRcATJK.js → listbox-option-tag.xGQr3Su1.js} +2 -2
  120. package/dist/chunks/{listbox-option-tag.bPRcATJK.js.map → listbox-option-tag.xGQr3Su1.js.map} +1 -1
  121. package/dist/chunks/{menu.CzbkunwY.js → menu.li3Kg9Uq.js} +29 -29
  122. package/dist/chunks/menu.li3Kg9Uq.js.map +1 -0
  123. package/dist/chunks/{modal-fullscreen.C4D3Rkdg.js → modal-fullscreen.C4eL63TC.js} +3 -3
  124. package/dist/chunks/{modal-fullscreen.C4D3Rkdg.js.map → modal-fullscreen.C4eL63TC.js.map} +1 -1
  125. package/dist/chunks/{modal.DgCmKjQC.js → modal.BpDz0Dhc.js} +4 -4
  126. package/dist/chunks/{modal.DgCmKjQC.js.map → modal.BpDz0Dhc.js.map} +1 -1
  127. package/dist/chunks/{pagination.CdOxfZW2.js → pagination.FuELftBG.js} +2 -2
  128. package/dist/chunks/{pagination.CdOxfZW2.js.map → pagination.FuELftBG.js.map} +1 -1
  129. package/dist/chunks/payment-method.NZKiNOmM.js +76 -0
  130. package/dist/chunks/payment-method.NZKiNOmM.js.map +1 -0
  131. package/dist/chunks/{popover.3sHql3nd.js → popover.Cb6utVhS.js} +3 -3
  132. package/dist/chunks/{popover.3sHql3nd.js.map → popover.Cb6utVhS.js.map} +1 -1
  133. package/dist/chunks/{popper-container.Bqy3oVj6.js → popper-container.CiEkF7eb.js} +2 -2
  134. package/dist/chunks/{popper-container.Bqy3oVj6.js.map → popper-container.CiEkF7eb.js.map} +1 -1
  135. package/dist/chunks/{promo-banner.BIICM7FC.js → promo-banner.PnHud5Wi.js} +2 -2
  136. package/dist/chunks/{promo-banner.BIICM7FC.js.map → promo-banner.PnHud5Wi.js.map} +1 -1
  137. package/dist/chunks/{radio-group.L-XokgwC.js → radio-group._8PsjPCZ.js} +4 -4
  138. package/dist/chunks/{radio-group.L-XokgwC.js.map → radio-group._8PsjPCZ.js.map} +1 -1
  139. package/dist/chunks/{search-bar.CDTWPjG1.js → search-bar.CVY2e8_B.js} +5 -5
  140. package/dist/chunks/{search-bar.CDTWPjG1.js.map → search-bar.CVY2e8_B.js.map} +1 -1
  141. package/dist/chunks/search.DLtglc02.js +24 -0
  142. package/dist/chunks/search.DLtglc02.js.map +1 -0
  143. package/dist/chunks/{secondary-nav.BwmBTvl5.js → secondary-nav.LxcuTR16.js} +3 -3
  144. package/dist/chunks/{secondary-nav.BwmBTvl5.js.map → secondary-nav.LxcuTR16.js.map} +1 -1
  145. package/dist/chunks/{segmented-control.CW6v1rDg.js → segmented-control.D69WXQGh.js} +2 -2
  146. package/dist/chunks/{segmented-control.CW6v1rDg.js.map → segmented-control.D69WXQGh.js.map} +1 -1
  147. package/dist/chunks/{selection-card-group.CURxGbd9.js → selection-card-group.MTKkCBeK.js} +11 -11
  148. package/dist/chunks/{selection-card-group.CURxGbd9.js.map → selection-card-group.MTKkCBeK.js.map} +1 -1
  149. package/dist/chunks/{sidepanel.MBArfd4a.js → sidepanel.BStCbRqN.js} +3 -3
  150. package/dist/chunks/{sidepanel.MBArfd4a.js.map → sidepanel.BStCbRqN.js.map} +1 -1
  151. package/dist/chunks/{structured-list-item.CYYZ1Fil.js → structured-list-item.CeosjL40.js} +5 -5
  152. package/dist/chunks/{structured-list-item.CYYZ1Fil.js.map → structured-list-item.CeosjL40.js.map} +1 -1
  153. package/dist/chunks/{summary-grid-item-custom.CVEhwKNM.js → summary-grid-item-custom.CF_TS7oA.js} +4 -4
  154. package/dist/chunks/{summary-grid-item-custom.CVEhwKNM.js.map → summary-grid-item-custom.CF_TS7oA.js.map} +1 -1
  155. package/dist/chunks/{tag.BxmageRW.js → tag.OgtZ3-ql.js} +2 -2
  156. package/dist/chunks/{tag.BxmageRW.js.map → tag.OgtZ3-ql.js.map} +1 -1
  157. package/dist/chunks/{textarea.DmjhRupr.js → textarea.BEISPJua.js} +2 -2
  158. package/dist/chunks/{textarea.DmjhRupr.js.map → textarea.BEISPJua.js.map} +1 -1
  159. package/dist/chunks/{timeline-item.CLbS-cEf.js → timeline-item.BeWMuM8A.js} +12 -11
  160. package/dist/chunks/{timeline-item.CLbS-cEf.js.map → timeline-item.BeWMuM8A.js.map} +1 -1
  161. package/dist/chunks/{tooltip.Vgoc41cI.js → tooltip.RPURZd36.js} +2 -2
  162. package/dist/chunks/{tooltip.Vgoc41cI.js.map → tooltip.RPURZd36.js.map} +1 -1
  163. package/dist/chunks/{tutorial.CmLMgXDK.js → tutorial.Ba8PTa0x.js} +42 -42
  164. package/dist/chunks/tutorial.Ba8PTa0x.js.map +1 -0
  165. package/dist/chunks/{use-cached-selected-values.DVcpkFV3.js → use-cached-selected-values.CxlYYUbd.js} +3 -3
  166. package/dist/chunks/{use-cached-selected-values.DVcpkFV3.js.map → use-cached-selected-values.CxlYYUbd.js.map} +1 -1
  167. package/dist/code-snippet.js +1 -1
  168. package/dist/dashboard-template.js +1 -1
  169. package/dist/dashed-underline.js +1 -1
  170. package/dist/data-grid-template.js +1 -1
  171. package/dist/data-grid.js +1 -1
  172. package/dist/date-picker.js +2 -2
  173. package/dist/date-range-picker.js +2 -2
  174. package/dist/date.js +1 -1
  175. package/dist/dropdown.js +4 -4
  176. package/dist/file-uploader.js +1 -1
  177. package/dist/filter-bar.js +1 -1
  178. package/dist/focus-trap.js +1 -1
  179. package/dist/form-layout.js +1 -1
  180. package/dist/header.js +1 -1
  181. package/dist/index.js +51 -51
  182. package/dist/info-icon.js +1 -1
  183. package/dist/input-field-password.js +1 -1
  184. package/dist/input-field-phone-number.js +1 -1
  185. package/dist/input-field.js +1 -1
  186. package/dist/inspector.js +1 -1
  187. package/dist/internal.js +35 -33
  188. package/dist/layout.js +1 -1
  189. package/dist/menu.js +1 -1
  190. package/dist/modal-fullscreen.js +1 -1
  191. package/dist/modal.js +2 -2
  192. package/dist/pagination.js +1 -1
  193. package/dist/payment-method.js +1 -1
  194. package/dist/popover.js +1 -1
  195. package/dist/popper-container.js +1 -1
  196. package/dist/promo-banner.js +1 -1
  197. package/dist/radio-group.js +1 -1
  198. package/dist/search-bar.js +2 -2
  199. package/dist/secondary-nav.js +1 -1
  200. package/dist/segmented-control.js +1 -1
  201. package/dist/selection-card.js +1 -1
  202. package/dist/sidepanel.js +1 -1
  203. package/dist/structured-list.js +1 -1
  204. package/dist/styles/bento-dark.css +26 -0
  205. package/dist/styles/bento-light.css +26 -0
  206. package/dist/styles/bento.css +26 -0
  207. package/dist/styles/legacy.css +28 -2
  208. package/dist/styles/styleguide.css +26 -0
  209. package/dist/summary-grid.js +1 -1
  210. package/dist/tag.js +1 -1
  211. package/dist/textarea.js +1 -1
  212. package/dist/timeline.js +1 -1
  213. package/dist/tutorial.js +1 -1
  214. package/dist/web-types.json +370 -86
  215. package/package.json +6 -6
  216. package/dist/chunks/alert.BSBLkXkM.js.map +0 -1
  217. package/dist/chunks/button-actions-with-menu.B5gcSgRQ.js +0 -112
  218. package/dist/chunks/button-actions-with-menu.B5gcSgRQ.js.map +0 -1
  219. package/dist/chunks/calendar.YJTNpmzh.js +0 -888
  220. package/dist/chunks/calendar.YJTNpmzh.js.map +0 -1
  221. package/dist/chunks/checkbox-input.B4A_gL2b.js +0 -128
  222. package/dist/chunks/checkbox-input.B4A_gL2b.js.map +0 -1
  223. package/dist/chunks/checkbox.BpF0HY7C.js +0 -162
  224. package/dist/chunks/checkbox.BpF0HY7C.js.map +0 -1
  225. package/dist/chunks/checkmark-circle-fill.C46dV1Rf.js +0 -24
  226. package/dist/chunks/checkmark-circle-fill.C46dV1Rf.js.map +0 -1
  227. package/dist/chunks/cross-circle-fill.BawVYNw7.js +0 -24
  228. package/dist/chunks/cross-circle-fill.BawVYNw7.js.map +0 -1
  229. package/dist/chunks/data-grid.CHV-FvBB.js.map +0 -1
  230. package/dist/chunks/date-picker.CMj5-RQl.js +0 -213
  231. package/dist/chunks/date-picker.CMj5-RQl.js.map +0 -1
  232. package/dist/chunks/date-range-picker.Jysfo6h3.js +0 -885
  233. package/dist/chunks/date-range-picker.Jysfo6h3.js.map +0 -1
  234. package/dist/chunks/dropdown.DFEGHxjw.js.map +0 -1
  235. package/dist/chunks/file-uploader.DaBMZSsB.js.map +0 -1
  236. package/dist/chunks/form-layout-title.C1n2S73_.js.map +0 -1
  237. package/dist/chunks/header.CRlxEGHb.js +0 -205
  238. package/dist/chunks/header.CRlxEGHb.js.map +0 -1
  239. package/dist/chunks/index.CrhTVr5J.js +0 -10
  240. package/dist/chunks/index.CrhTVr5J.js.map +0 -1
  241. package/dist/chunks/index.DDnf1O9p.js +0 -22
  242. package/dist/chunks/index.DDnf1O9p.js.map +0 -1
  243. package/dist/chunks/index.DPafeRJa.js +0 -10
  244. package/dist/chunks/index.DPafeRJa.js.map +0 -1
  245. package/dist/chunks/info.D4SG-AIm.js +0 -24
  246. package/dist/chunks/info.D4SG-AIm.js.map +0 -1
  247. package/dist/chunks/input-field-password.DsIpkc_9.js.map +0 -1
  248. package/dist/chunks/input-field.Dl2lXZda.js +0 -146
  249. package/dist/chunks/input-field.Dl2lXZda.js.map +0 -1
  250. package/dist/chunks/menu.CzbkunwY.js.map +0 -1
  251. package/dist/chunks/payment-method.BudFG3aC.js +0 -76
  252. package/dist/chunks/payment-method.BudFG3aC.js.map +0 -1
  253. package/dist/chunks/search.pVu-JVAN.js +0 -24
  254. package/dist/chunks/search.pVu-JVAN.js.map +0 -1
  255. package/dist/chunks/tutorial.CmLMgXDK.js.map +0 -1
@@ -1,888 +0,0 @@
1
- import { defineComponent as ue, computed as T, ref as F, watch as H, nextTick as we, toRef as U, reactive as he } from "vue";
2
- import { r as w, t as S, a as fe, g as Ee } from "./get-date-locale.BN8xEjY0.js";
3
- import { t as I, B as Ne, a as Me, f as ve } from "./date.YLIcAerL.js";
4
- import { e as te } from "./index.CrhTVr5J.js";
5
- import { B as Te } from "./button.D-3uUhuG.js";
6
- import { B as ke } from "./typography.J1v_SPG3.js";
7
- import { u as be } from "./i18n.BQkEbtPM.js";
8
- import { g as Ie } from "./generate-uid.NJ8tVoha.js";
9
- import { C as xe, a as pe } from "./chevron-left.DOMTgGel.js";
10
- import { a as Re } from "./keyboard-navigation.pB8weElW.js";
11
- import { n as le } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
12
- import "../assets/calendar.css";
13
- function q(e, t) {
14
- w(2, arguments);
15
- var n = S(e), a = I(t);
16
- return isNaN(a) ? /* @__PURE__ */ new Date(NaN) : (a && n.setDate(n.getDate() + a), n);
17
- }
18
- function $(e, t) {
19
- w(2, arguments);
20
- var n = S(e), a = I(t);
21
- if (isNaN(a))
22
- return /* @__PURE__ */ new Date(NaN);
23
- if (!a)
24
- return n;
25
- var o = n.getDate(), r = new Date(n.getTime());
26
- r.setMonth(n.getMonth() + a + 1, 0);
27
- var u = r.getDate();
28
- return o >= u ? r : (n.setFullYear(r.getFullYear(), r.getMonth(), o), n);
29
- }
30
- function z(e, t) {
31
- w(1, arguments);
32
- var n = t || {}, a = n.locale, o = a && a.options && a.options.weekStartsOn, r = o == null ? 0 : I(o), u = n.weekStartsOn == null ? r : I(n.weekStartsOn);
33
- if (!(u >= 0 && u <= 6))
34
- throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
35
- var s = S(e), v = s.getDay(), d = (v < u ? 7 : 0) + v - u;
36
- return s.setDate(s.getDate() - d), s.setHours(0, 0, 0, 0), s;
37
- }
38
- function W(e) {
39
- w(1, arguments);
40
- var t = S(e);
41
- return t.setHours(0, 0, 0, 0), t;
42
- }
43
- var Pe = 864e5;
44
- function Ae(e, t) {
45
- w(2, arguments);
46
- var n = W(e), a = W(t), o = n.getTime() - fe(n), r = a.getTime() - fe(a);
47
- return Math.round((o - r) / Pe);
48
- }
49
- function X(e, t) {
50
- w(2, arguments);
51
- var n = W(e), a = W(t);
52
- return n.getTime() === a.getTime();
53
- }
54
- function De(e, t) {
55
- var n = e.getFullYear() - t.getFullYear() || e.getMonth() - t.getMonth() || e.getDate() - t.getDate() || e.getHours() - t.getHours() || e.getMinutes() - t.getMinutes() || e.getSeconds() - t.getSeconds() || e.getMilliseconds() - t.getMilliseconds();
56
- return n < 0 ? -1 : n > 0 ? 1 : n;
57
- }
58
- function Le(e, t) {
59
- w(2, arguments);
60
- var n = S(e), a = S(t), o = De(n, a), r = Math.abs(Ae(n, a));
61
- n.setDate(n.getDate() - o * r);
62
- var u = +(De(n, a) === -o), s = o * (r - u);
63
- return s === 0 ? 0 : s;
64
- }
65
- function J(e) {
66
- w(1, arguments);
67
- var t = S(e);
68
- return t.setDate(1), t.setHours(0, 0, 0, 0), t;
69
- }
70
- function Z(e, t) {
71
- w(1, arguments);
72
- var n = t || {}, a = n.locale, o = a && a.options && a.options.weekStartsOn, r = o == null ? 0 : I(o), u = n.weekStartsOn == null ? r : I(n.weekStartsOn);
73
- if (!(u >= 0 && u <= 6))
74
- throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
75
- var s = S(e), v = s.getDay(), d = (v < u ? -7 : 0) + 6 - (v - u);
76
- return s.setDate(s.getDate() + d), s.setHours(23, 59, 59, 999), s;
77
- }
78
- function Ue(e, t) {
79
- w(2, arguments);
80
- var n = I(t);
81
- return q(e, -n);
82
- }
83
- function V(e, t) {
84
- w(2, arguments);
85
- var n = I(t);
86
- return $(e, -n);
87
- }
88
- function Ce(e, t) {
89
- w(2, arguments);
90
- var n = S(e), a = S(t);
91
- return n.getTime() > a.getTime();
92
- }
93
- function We(e, t) {
94
- w(2, arguments);
95
- var n = S(e), a = S(t);
96
- return n.getTime() < a.getTime();
97
- }
98
- function me(e, t) {
99
- w(2, arguments);
100
- var n = S(e).getTime(), a = S(t.start).getTime(), o = S(t.end).getTime();
101
- if (!(a <= o))
102
- throw new RangeError("Invalid interval");
103
- return n >= a && n <= o;
104
- }
105
- function Ye(e, t, n) {
106
- w(2, arguments);
107
- var a = {}, o = a.locale, r = o && o.options && o.options.weekStartsOn, u = r == null ? 0 : I(r), s = a.weekStartsOn == null ? u : I(a.weekStartsOn);
108
- if (!(s >= 0 && s <= 6))
109
- throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
110
- var v = S(e), d = I(t), D = v.getDay(), f = d % 7, i = (f + 7) % 7, c = 7 - s, m = d < 0 || d > 6 ? d - (D + c) % 7 : (i + c) % 7 - (D + c) % 7;
111
- return q(v, m);
112
- }
113
- var b = /* @__PURE__ */ ((e) => (e.SINGLE = "single", e.MIDDLE = "middle", e.BEGINNING = "beginning", e.END = "end", e))(b || {}), A = /* @__PURE__ */ ((e) => (e.SINGLE = "single", e.MIDDLE = "middle", e.BEGINNING = "beginning", e.END = "end", e.SELECTED = "selected", e.UNSELECTED = "unselected", e.CURRENT_DAY = "current-day", e.DISABLED = "disabled", e))(A || {}), B = /* @__PURE__ */ ((e) => (e.CLICK = "click", e.MOUSE_OVER = "mouseover", e))(B || {});
114
- const Fe = {
115
- /**
116
- * Date to be displayed as the calendar day. From 1st to 31st (or end of the month defined in the date)
117
- */
118
- day: { type: Date, required: !0 },
119
- /**
120
- * Indicate if a date should be disabled or not
121
- */
122
- disabled: { type: Boolean, default: !1 },
123
- /**
124
- * Changes the state of the calendar day to selected.
125
- */
126
- selected: { type: Boolean, default: !1 },
127
- /**
128
- * When the day is selected, this indicates if the selection is a single date or part of a range.
129
- * If it's a range it can be at the beginning, middle or end of the selection.
130
- */
131
- variant: {
132
- type: String,
133
- default: b.SINGLE,
134
- validator: (e) => Object.values(b).includes(e)
135
- }
136
- }, $e = ue({
137
- name: "calendar-month-day",
138
- components: { BentoDate: Ne },
139
- inheritAttrs: !0,
140
- props: Fe,
141
- emits: [B.CLICK, B.MOUSE_OVER],
142
- setup(e, { emit: t }) {
143
- const n = T(() => {
144
- const r = /* @__PURE__ */ new Date();
145
- return e.day.getDate() === r.getDate() && e.day.getMonth() === r.getMonth() && e.day.getFullYear() === r.getFullYear();
146
- });
147
- return {
148
- // Values
149
- conditionalClasses: T(() => ({
150
- // Variants
151
- [`b-calendar-month-day--${A.BEGINNING}`]: e.variant === b.BEGINNING,
152
- [`b-calendar-month-day--${A.MIDDLE}`]: e.variant === b.MIDDLE,
153
- [`b-calendar-month-day--${A.END}`]: e.variant === b.END,
154
- [`b-calendar-month-day--${A.SINGLE}`]: e.variant === b.SINGLE,
155
- // Selected
156
- [`b-calendar-month-day--${A.UNSELECTED}`]: !e.selected,
157
- [`b-calendar-month-day--${A.SELECTED}`]: e.selected,
158
- // Current Day
159
- [`b-calendar-month-day--${A.CURRENT_DAY}`]: n.value,
160
- // Disabled
161
- [`b-calendar-month-day--${A.DISABLED}`]: e.disabled
162
- })),
163
- // Enums
164
- BentoDateFormat: Me,
165
- CalendarMonthDayEvent: B,
166
- // Events
167
- onClick: (r, u) => {
168
- e.disabled ? (r.preventDefault(), r.stopPropagation()) : t(B.CLICK, u, e.day);
169
- }
170
- };
171
- }
172
- });
173
- var je = function() {
174
- var t = this, n = t._self._c;
175
- return t._self._setupProxy, n("td", { staticClass: "b-calendar-month-day", class: t.conditionalClasses, attrs: { tabindex: t.selected ? "0" : "-1", "aria-selected": t.selected ? t.selected : void 0 }, on: { click: (a) => t.onClick(a, t.day), mouseover: function(a) {
176
- return t.$emit(t.CalendarMonthDayEvent.MOUSE_OVER);
177
- }, keydown: function(a) {
178
- return !a.type.indexOf("key") && t._k(a.keyCode, "space", 32, a.key, [" ", "Spacebar"]) && t._k(a.keyCode, "enter", 13, a.key, "Enter") ? null : ((o) => t.onClick(o, t.day)).apply(null, arguments);
179
- } } }, [n("div", { staticClass: "b-calendar-month-day__wrapper" }, [n("bento-date", { staticClass: "b-calendar-month-day__label", attrs: { date: t.day, format: t.BentoDateFormat.DAY_OF_MONTH } })], 1)]);
180
- }, Be = [], Ge = /* @__PURE__ */ le(
181
- $e,
182
- je,
183
- Be,
184
- !1,
185
- null,
186
- "41eecb2a"
187
- );
188
- const Ve = Ge.exports;
189
- var P = /* @__PURE__ */ ((e) => (e.INPUT = "input", e.MOUSE_OVER = "mouseover", e.NEXT_MONTH = "nextMonth", e.PREVIOUS_MONTH = "previousMonth", e))(P || {}), k = /* @__PURE__ */ ((e) => (e.FIRST = "first", e.LAST = "last", e.MIDDLE = "middle", e.UNIQUE = "unique", e))(k || {}), G = /* @__PURE__ */ ((e) => (e[e.MONDAY = 1] = "MONDAY", e[e.SATURDAY = 6] = "SATURDAY", e[e.SUNDAY = 0] = "SUNDAY", e))(G || {});
190
- function He(e) {
191
- return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
192
- }
193
- var ae = { exports: {} }, ne = { exports: {} };
194
- (function(e, t) {
195
- Object.defineProperty(t, "__esModule", {
196
- value: !0
197
- }), t.default = n;
198
- function n(a) {
199
- if (a === null || a === !0 || a === !1)
200
- return NaN;
201
- var o = Number(a);
202
- return isNaN(o) ? o : o < 0 ? Math.ceil(o) : Math.floor(o);
203
- }
204
- e.exports = t.default;
205
- })(ne, ne.exports);
206
- var ge = ne.exports, re = { exports: {} }, oe = { exports: {} }, se = { exports: {} };
207
- (function(e, t) {
208
- Object.defineProperty(t, "__esModule", {
209
- value: !0
210
- }), t.default = n;
211
- function n(a, o) {
212
- if (o.length < a)
213
- throw new TypeError(a + " argument" + (a > 1 ? "s" : "") + " required, but only " + o.length + " present");
214
- }
215
- e.exports = t.default;
216
- })(se, se.exports);
217
- var ie = se.exports;
218
- (function(e, t) {
219
- Object.defineProperty(t, "__esModule", {
220
- value: !0
221
- }), t.default = o;
222
- var n = a(ie);
223
- function a(r) {
224
- return r && r.__esModule ? r : { default: r };
225
- }
226
- function o(r) {
227
- (0, n.default)(1, arguments);
228
- var u = Object.prototype.toString.call(r);
229
- return r instanceof Date || typeof r == "object" && u === "[object Date]" ? new Date(r.getTime()) : typeof r == "number" || u === "[object Number]" ? new Date(r) : ((typeof r == "string" || u === "[object String]") && typeof console < "u" && (console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule"), console.warn(new Error().stack)), /* @__PURE__ */ new Date(NaN));
230
- }
231
- e.exports = t.default;
232
- })(oe, oe.exports);
233
- var qe = oe.exports;
234
- (function(e, t) {
235
- Object.defineProperty(t, "__esModule", {
236
- value: !0
237
- }), t.default = u;
238
- var n = r(ge), a = r(qe), o = r(ie);
239
- function r(s) {
240
- return s && s.__esModule ? s : { default: s };
241
- }
242
- function u(s, v) {
243
- (0, o.default)(2, arguments);
244
- var d = (0, a.default)(s), D = (0, n.default)(v);
245
- return isNaN(D) ? /* @__PURE__ */ new Date(NaN) : (D && d.setDate(d.getDate() + D), d);
246
- }
247
- e.exports = t.default;
248
- })(re, re.exports);
249
- var Qe = re.exports;
250
- (function(e, t) {
251
- Object.defineProperty(t, "__esModule", {
252
- value: !0
253
- }), t.default = u;
254
- var n = r(ge), a = r(Qe), o = r(ie);
255
- function r(s) {
256
- return s && s.__esModule ? s : { default: s };
257
- }
258
- function u(s, v) {
259
- (0, o.default)(2, arguments);
260
- var d = (0, n.default)(v);
261
- return (0, a.default)(s, -d);
262
- }
263
- e.exports = t.default;
264
- })(ae, ae.exports);
265
- var Ke = ae.exports;
266
- const ye = /* @__PURE__ */ He(Ke), Xe = ({ currentSelectedDate: e, month: t, isDateDisabled: n, firstDayOfWeek: a }, o) => {
267
- const r = F(new Date(t.value));
268
- H(
269
- t,
270
- () => {
271
- r.value = t.value;
272
- },
273
- { immediate: !0 }
274
- );
275
- const u = F(new Date(e.value));
276
- H(e, () => {
277
- u.value = new Date(e.value);
278
- });
279
- const s = F({}), v = (l) => (g) => {
280
- s.value[l.toDateString()] = g;
281
- }, d = () => {
282
- s.value = {};
283
- }, D = (l = 1) => {
284
- r.value = $(r.value, l), o(P.NEXT_MONTH, l), d();
285
- }, f = (l = 1) => {
286
- r.value = V(r.value, l), o(P.PREVIOUS_MONTH, l), d();
287
- }, i = (l) => {
288
- const g = !!s.value[l == null ? void 0 : l.toDateString()];
289
- l && g && s.value[l.toDateString()].$el.focus();
290
- }, c = (l) => {
291
- l.preventDefault(), l.stopImmediatePropagation(), l.stopPropagation();
292
- }, m = ({ nextDate: l, isIncreasingDays: g, amountOfMonths: p, isCalendarButtonsNav: K }) => {
293
- if (!K && n && n(l))
294
- return;
295
- l.getMonth() === u.value.getMonth() && l.getFullYear() === u.value.getFullYear() ? (u.value = l, i(l)) : (g ? D(p) : f(p), we(() => {
296
- const ee = l.getMonth() === r.value.getMonth() && l.getFullYear() === r.value.getFullYear();
297
- n && n(l) || !ee || K || (u.value = l, i(l));
298
- }));
299
- };
300
- return {
301
- // Calendar days ref
302
- calendarRef: s,
303
- addDayRef: v,
304
- /**
305
- * Month navigation
306
- */
307
- showNextMonth: D,
308
- showPreviousMonth: f,
309
- /**
310
- * Focus method
311
- */
312
- focusOnDate: i,
313
- /**
314
- * Day navigation
315
- */
316
- // ArrowRight
317
- moveToNextDay: (l) => {
318
- c(l), m({ nextDate: q(u.value, 1), isIncreasingDays: !0 });
319
- },
320
- // ArrowLeft
321
- moveToPreviousDay: (l) => {
322
- c(l), m({ nextDate: ye(u.value, 1), isIncreasingDays: !1 });
323
- },
324
- // ArrowUp
325
- moveToPreviousWeek: (l) => {
326
- c(l), m({ nextDate: ye(u.value, 7), isIncreasingDays: !1 });
327
- },
328
- // ArrowDown
329
- moveToNextWeek: (l) => {
330
- c(l), m({ nextDate: q(u.value, 7), isIncreasingDays: !0 });
331
- },
332
- // Home
333
- moveToFirstDayOfWeek: (l) => {
334
- c(l), m({
335
- nextDate: z(u.value, { weekStartsOn: a }),
336
- isIncreasingDays: !1
337
- });
338
- },
339
- // End
340
- moveToLastDayOfWeek: (l) => {
341
- c(l), m({
342
- nextDate: Z(u.value, { weekStartsOn: a }),
343
- isIncreasingDays: !0
344
- });
345
- },
346
- // PageUp
347
- moveToPreviousMonth: (l, g = !1) => {
348
- c(l);
349
- const p = 1;
350
- m({
351
- nextDate: V(u.value, p),
352
- isIncreasingDays: !1,
353
- amountOfMonths: p,
354
- isCalendarButtonsNav: g
355
- });
356
- },
357
- // Shift+PageUp
358
- moveToPreviousYear: (l) => {
359
- c(l);
360
- const g = 12;
361
- m({
362
- nextDate: V(u.value, g),
363
- isIncreasingDays: !1,
364
- amountOfMonths: g
365
- });
366
- },
367
- // PageDown
368
- moveToNextMonth: (l, g = !1) => {
369
- c(l);
370
- const p = 1;
371
- m({
372
- nextDate: $(u.value, p),
373
- isIncreasingDays: !0,
374
- amountOfMonths: p,
375
- isCalendarButtonsNav: g
376
- });
377
- },
378
- // Shift-PageDown
379
- moveToNextYear: (l) => {
380
- c(l);
381
- const g = 12;
382
- m({
383
- nextDate: $(u.value, g),
384
- isIncreasingDays: !0,
385
- amountOfMonths: g
386
- });
387
- },
388
- // Values
389
- internalDate: u,
390
- baseDate: r
391
- };
392
- }, ze = {
393
- "en-US": {
394
- nextMonth: "Next month",
395
- previousMonth: "Previous month"
396
- }
397
- }, Je = ue({
398
- i18n: { messages: ze },
399
- name: "calendar-month",
400
- components: {
401
- BentoButton: Te,
402
- BentoTypography: ke,
403
- CalendarMonthDay: Ve,
404
- ChevronLeftIcon: pe,
405
- ChevronRightIcon: xe
406
- },
407
- directives: { BentoKeyboardNavigationDirective: Re },
408
- props: {
409
- /**
410
- * end of the selected range
411
- */
412
- endDate: { type: Date, default: null },
413
- /**
414
- * Allows you to set the first day of the week. 0 is sunday, 1 is monday, 6 is saturday
415
- */
416
- firstDayOfWeek: {
417
- type: Number,
418
- default: G.MONDAY,
419
- validator: (e) => Object.values(G).includes(e)
420
- },
421
- /**
422
- * Indicate if a date should be disabled or not
423
- */
424
- isDateDisabled: { type: Function, default: void 0 },
425
- /**
426
- * Indicates if the calendar is part of a range date picker or a sigle date picker
427
- */
428
- isRange: { type: Boolean, default: !1 },
429
- /**
430
- * Sets a minimum limit for selectable dates - dates before `min` will not be selectable
431
- */
432
- min: { type: Date, default: null },
433
- /**
434
- * Sets a maximum limit for selectable dates - dates after `max` will not be selectable
435
- */
436
- max: { type: Date, default: null },
437
- /**
438
- * Month of the year to be displayed in the calendar
439
- */
440
- month: { type: Date, required: !0 },
441
- /**
442
- * When rendering multiple calendars, this property allows to render the
443
- * Next and Previous calendar buttons to the right, left or not at all
444
- * depending on the position: Unique (only 1), First, Middle or Last
445
- */
446
- position: {
447
- type: String,
448
- default: k.UNIQUE,
449
- validator: (e) => Object.values(k).includes(e)
450
- },
451
- /**
452
- * start of the selected range
453
- */
454
- startDate: { type: Date, default: null }
455
- // can be undefined, eslint complains without default
456
- },
457
- emits: [
458
- P.INPUT,
459
- P.NEXT_MONTH,
460
- P.PREVIOUS_MONTH,
461
- P.MOUSE_OVER
462
- ],
463
- setup(e, { emit: t }) {
464
- const { locale: n, t: a } = be(), o = Ee(), r = Ie("bento-date-picker-month-label"), u = T(
465
- () => (_) => {
466
- var R;
467
- return e.min && _ < e.min || e.max && _ > e.max || ((R = e.isDateDisabled) == null ? void 0 : R.call(e, _));
468
- }
469
- ), {
470
- internalDate: s,
471
- baseDate: v,
472
- // Calendar refs
473
- addDayRef: d,
474
- // Month navigation
475
- showNextMonth: D,
476
- showPreviousMonth: f,
477
- // Day navigation
478
- moveToNextDay: i,
479
- moveToPreviousDay: c,
480
- moveToPreviousWeek: m,
481
- moveToNextWeek: L,
482
- moveToFirstDayOfWeek: Q,
483
- moveToLastDayOfWeek: y,
484
- moveToPreviousMonth: h,
485
- moveToPreviousYear: N,
486
- moveToNextMonth: O,
487
- moveToNextYear: x,
488
- focusOnDate: E
489
- } = Xe(
490
- {
491
- currentSelectedDate: U(e, "startDate"),
492
- month: U(e, "month"),
493
- isDateDisabled: u.value,
494
- firstDayOfWeek: e.firstDayOfWeek
495
- },
496
- t
497
- ), M = T(
498
- () => Object.values(G).includes(e.firstDayOfWeek) ? e.firstDayOfWeek : G.MONDAY
499
- ), ce = T(
500
- () => [k.FIRST, k.UNIQUE].includes(e.position)
501
- ), l = T(
502
- () => [k.LAST, k.UNIQUE].includes(e.position)
503
- ), g = T(
504
- () => ve(v.value, "MMMM yyyy", {
505
- locale: o[n.value.substring(0, 2)] || o.enUS
506
- })
507
- ), p = T(
508
- () => new Array(7).fill(/* @__PURE__ */ new Date()).map((_, R) => {
509
- const j = Ye(_, M.value + R);
510
- return ve(j, "EEE", {
511
- locale: o[n.value.substring(0, 2)] || o.enUS
512
- });
513
- })
514
- ), K = T(() => {
515
- const _ = [], R = J(e.month);
516
- let j = _[_.push([]) - 1];
517
- for (; R.getMonth() === e.month.getMonth(); )
518
- R.getDay() - M.value === 0 && j.length > 0 && (j = _[_.push([]) - 1]), j.push(W(R)), R.setDate(R.getDate() + 1);
519
- return _;
520
- }), de = (_) => {
521
- t(P.INPUT, _);
522
- }, ee = (_) => {
523
- if (!e.isRange || X(e.startDate, e.endDate))
524
- return b.SINGLE;
525
- if (e.startDate && X(e.startDate, _))
526
- return b.BEGINNING;
527
- if (e.endDate && X(e.endDate, _))
528
- return b.END;
529
- if (e.startDate && e.endDate && me(_, { start: e.startDate, end: e.endDate }))
530
- return b.MIDDLE;
531
- }, _e = (_) => s.value && X(s.value, _) ? !0 : e.startDate && e.endDate && me(_, { start: e.startDate, end: e.endDate }), Oe = () => {
532
- t(P.INPUT, s);
533
- }, Se = e.isRange ? {} : {
534
- "keydown:arrow-right": i,
535
- "keydown:arrow-left": c,
536
- "keydown:arrow-up": m,
537
- "keydown:arrow-down": L,
538
- "keydown:home": Q,
539
- "keydown:end": y,
540
- "keydown:page-up": h,
541
- "keydown:shift-page-up": N,
542
- "keydown:page-down": O,
543
- "keydown:shift-page-down": x
544
- };
545
- return {
546
- // Refs
547
- addDayRef: d,
548
- // Values
549
- computedIsDateDisabled: u,
550
- daysOfWeek: p,
551
- weeksOfMonth: K,
552
- formattedMonthDate: g,
553
- shouldShowNextMonthButton: l,
554
- shouldShowPreviousMonthButton: ce,
555
- monthLabelId: r,
556
- // Enums
557
- CalendarMonthEvent: P,
558
- // Functions
559
- isSelectedDate: _e,
560
- showNextMonth: D,
561
- showPreviousMonth: f,
562
- dayVariant: ee,
563
- confirmNavigationDate: Oe,
564
- // Events
565
- onDayClicked: de,
566
- listeners: Se,
567
- // Exposed methods
568
- focusOnDate: E,
569
- moveToNextDay: i,
570
- moveToPreviousDay: c,
571
- moveToPreviousWeek: m,
572
- moveToNextWeek: L,
573
- moveToFirstDayOfWeek: Q,
574
- moveToLastDayOfWeek: y,
575
- moveToPreviousMonth: h,
576
- moveToPreviousYear: N,
577
- moveToNextMonth: O,
578
- moveToNextYear: x,
579
- // Translations
580
- t: a
581
- };
582
- }
583
- });
584
- var Ze = function() {
585
- var t = this, n = t._self._c;
586
- return t._self._setupProxy, n("div", t._g({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], staticClass: "b-calendar-month" }, t.listeners), [n("div", { staticClass: "b-calendar-month__month-selector" }, [n("div", { staticClass: "b-calendar-month__previous" }, [t.shouldShowPreviousMonthButton ? n("bento-button", { attrs: { variant: "tertiary" }, on: { click: function(a) {
587
- return t.moveToPreviousMonth(a, !0);
588
- } }, scopedSlots: t._u([{ key: "iconLeft", fn: function() {
589
- return [n("chevron-left-icon", { attrs: { "svg-title": t.t("previousMonth") } })];
590
- }, proxy: !0 }], null, !1, 1806090420) }) : t._e()], 1), n("bento-typography", { attrs: { id: t.monthLabelId, el: "h2", variant: "title", "aria-live": "polite" } }, [t._v(" " + t._s(t.formattedMonthDate) + " ")]), n("div", { staticClass: "b-calendar-month__next" }, [t.shouldShowNextMonthButton ? n("bento-button", { attrs: { variant: "tertiary" }, on: { click: function(a) {
591
- return t.moveToNextMonth(a, !0);
592
- } }, scopedSlots: t._u([{ key: "iconLeft", fn: function() {
593
- return [n("chevron-right-icon", { attrs: { "svg-title": t.t("nextMonth") } })];
594
- }, proxy: !0 }], null, !1, 1041540377) }) : t._e()], 1)], 1), n("table", { staticClass: "b-calendar-month__month-container", attrs: { role: "grid", "aria-labelledby": t.monthLabelId } }, [n("thead", [n("tr", { staticClass: "b-calendar-month__week-header" }, t._l(t.daysOfWeek, function(a, o) {
595
- return n("th", { key: o, staticClass: "b-calendar-month__day-of-week" }, [n("bento-typography", { staticClass: "b-calendar-month__day-of-week-font", attrs: { el: "span", variant: "caption" } }, [t._v(" " + t._s(a) + " ")])], 1);
596
- }), 0)]), n("tbody", t._l(t.weeksOfMonth, function(a, o) {
597
- return n("tr", { key: o }, [o === 0 && a.length < 7 ? n("td", { attrs: { colspan: 7 - a.length } }) : t._e(), t._l(a, function(r, u) {
598
- return n("calendar-month-day", { key: `calendar-day-${u}`, ref: t.addDayRef(r), refInFor: !0, attrs: { day: r, disabled: t.computedIsDateDisabled(r), selected: t.isSelectedDate(r), variant: t.dayVariant(r) }, on: { click: t.onDayClicked, mouseover: function(s) {
599
- return t.$emit(t.CalendarMonthEvent.MOUSE_OVER, r);
600
- } } });
601
- })], 2);
602
- }), 0)])]);
603
- }, et = [], tt = /* @__PURE__ */ le(
604
- Je,
605
- Ze,
606
- et,
607
- !1,
608
- null,
609
- "d597875d"
610
- );
611
- const Y = tt.exports;
612
- var C = /* @__PURE__ */ ((e) => (e.INPUT = "input", e.START_DATE_SELECTED = "start-date-selected", e.END_DATE_SELECTED = "end-date-selected", e))(C || {});
613
- const at = ({ selectedDate: e }, t) => {
614
- const n = he({
615
- startDate: null,
616
- endDate: null
617
- });
618
- return H(
619
- () => e.value,
620
- () => {
621
- n.startDate = e.value, n.endDate = void 0;
622
- },
623
- { immediate: !0 }
624
- ), {
625
- internalValue: n,
626
- onDateInput: (o) => {
627
- t(C.INPUT, o);
628
- },
629
- // Empty function to prevent the listeners from throwing a warning
630
- // eslint-disable-next-line @typescript-eslint/no-empty-function
631
- onMouseOver: () => {
632
- }
633
- };
634
- }, nt = (e) => {
635
- const t = (s, v, d, D) => {
636
- let f = z(s, { weekStartsOn: e }), i = Z(v || s, { weekStartsOn: e });
637
- const c = d && f < d, m = D && i > D;
638
- return c && (f = z(d, { weekStartsOn: e })), m && (i = Z(D, { weekStartsOn: e })), f > i && (c ? i = Z(f, { weekStartsOn: e }) : f = z(i, { weekStartsOn: e })), { startDate: f, endDate: i };
639
- }, n = (s, v, d, D) => {
640
- let f = J(s), i = te(v || s);
641
- const c = f < d, m = i > D;
642
- return c && (f = J(d)), m && (i = te(D)), f > i && (c ? i = te(f) : f = J(i)), { startDate: f, endDate: i };
643
- };
644
- return {
645
- adjustDateForWeekly: t,
646
- adjustDateForMonthly: n,
647
- adjustStartDateInputForWeekly: (s, v, d, D) => {
648
- const { startDate: f } = t(new Date(s), null, d, D);
649
- return v(f);
650
- },
651
- adjustEndDateInputForWeekly: (s, v, d, D) => {
652
- const { endDate: f } = t(new Date(s), null, d, D);
653
- return v(f);
654
- },
655
- adjustStartDateInputForMonthly: (s, v, d, D) => {
656
- const { startDate: f } = n(new Date(s), null, d, D);
657
- return v(f);
658
- },
659
- adjustEndDateInputForMonthly: (s, v, d, D) => {
660
- const { endDate: f } = n(new Date(s), null, d, D);
661
- return v(f);
662
- }
663
- };
664
- }, rt = ({ selectedDate: e, isDateDisabled: t, maxRange: n, granularity: a, firstDayOfWeek: o, min: r, max: u }, s) => {
665
- const { adjustDateForWeekly: D, adjustDateForMonthly: f } = nt(o), i = he({
666
- startDate: null,
667
- endDate: null
668
- }), c = F(null);
669
- H(
670
- () => e.value,
671
- () => {
672
- let { startDate: y = null, endDate: h = null } = e.value || {};
673
- y && (y = W(y)), h && (h = W(h)), !(y && t && t(y) || h && t && t(h) || y && h && Ce(y, h)) && (i.startDate = y, i.endDate = h);
674
- },
675
- { immediate: !0, deep: !0 }
676
- );
677
- const m = (y, h, N) => {
678
- if (i.startDate = y, i.endDate = h, n.value) {
679
- const O = Le(h, y) - n.value;
680
- O > 0 && (N < 1 ? (i.startDate = y, i.endDate = Ue(h, O)) : (i.startDate = q(y, O), i.endDate = h));
681
- }
682
- s(C.START_DATE_SELECTED, i.startDate), s(C.END_DATE_SELECTED, i.endDate);
683
- }, L = (y) => {
684
- var h, N, O, x;
685
- if (!(!c.value || t && t(y)))
686
- if (We(y, c.value)) {
687
- if (((h = a == null ? void 0 : a.value) == null ? void 0 : h.type) === "weekly") {
688
- const { startDate: E, endDate: M } = D(y, c.value, r.value, u.value);
689
- m(E, M, -1);
690
- return;
691
- }
692
- if (((N = a == null ? void 0 : a.value) == null ? void 0 : N.type) === "monthly") {
693
- const { startDate: E, endDate: M } = f(y, c.value, r.value, u.value);
694
- m(E, M, -1);
695
- return;
696
- }
697
- m(y, c.value, -1);
698
- } else {
699
- if (((O = a == null ? void 0 : a.value) == null ? void 0 : O.type) === "weekly") {
700
- const { startDate: E, endDate: M } = D(c.value, y, r.value, u.value);
701
- m(E, M, 1);
702
- return;
703
- }
704
- if (((x = a == null ? void 0 : a.value) == null ? void 0 : x.type) === "monthly") {
705
- const { startDate: E, endDate: M } = f(c.value, y, r.value, u.value);
706
- m(E, M, 1);
707
- return;
708
- }
709
- m(c.value, y, 1);
710
- }
711
- };
712
- return {
713
- internalValue: i,
714
- onDateInput: (y) => {
715
- var h, N;
716
- if (c.value)
717
- c.value = null, s(C.INPUT, i);
718
- else {
719
- let O = y;
720
- if (((h = a == null ? void 0 : a.value) == null ? void 0 : h.type) === "weekly") {
721
- const { startDate: x, endDate: E } = D(y);
722
- O = x, m(O, E);
723
- }
724
- if (((N = a == null ? void 0 : a.value) == null ? void 0 : N.type) === "monthly") {
725
- const { startDate: x, endDate: E } = f(y);
726
- O = x, m(O, E);
727
- }
728
- c.value = O, L(O);
729
- }
730
- },
731
- onMouseOver: L
732
- };
733
- }, ot = ue({
734
- name: "calendar",
735
- components: { CalendarMonth: Y },
736
- props: {
737
- /**
738
- * Allows you to set the first day of the week. 0 is sunday, 1 is monday, 6 is saturday
739
- */
740
- firstDayOfWeek: Y.props.firstDayOfWeek,
741
- /**
742
- * The selected granularity configuration
743
- */
744
- granularity: {
745
- type: Object,
746
- default: null
747
- },
748
- /**
749
- * Indicate if a date should be disabled or not
750
- */
751
- isDateDisabled: Y.props.isDateDisabled,
752
- /**
753
- * Enables the Date Range calendar
754
- */
755
- isRange: Y.props.isRange,
756
- /**
757
- * Set a maximum number of dates to be selectable by the range.
758
- */
759
- maxRange: { type: Number, default: null, validator: (e) => !e || e > 0 },
760
- /**
761
- * Sets a minimum limit for selectable dates - dates before `min` will not be selectable
762
- */
763
- min: Y.props.min,
764
- /**
765
- * Sets a maximum limit for selectable dates - dates after `max` will not be selectable
766
- */
767
- max: Y.props.max,
768
- /**
769
- * Number of months rendered on pane
770
- */
771
- numberOfMonths: {
772
- type: Number,
773
- default: 3,
774
- validator: (e) => e >= 1
775
- },
776
- /**
777
- * Upon opening date range picker, end date's month will be pre-selected.
778
- */
779
- showEndDateOnOpen: { type: Boolean, default: !1 },
780
- /**
781
- * Selected date. Can be a single Date or a CalendarRangeDate
782
- * instance that contains startDate and endDate attributes.
783
- */
784
- value: { type: [Date, Object], default: void 0 },
785
- /**
786
- * Default start date for the calendar pane
787
- */
788
- defaultDisplayMonth: {
789
- type: String,
790
- default: null,
791
- validator: (e) => /^\d{4}-(0?[1-9]|1[012])(-(0?[1-9]|[12][0-9]|3[01]))?$/.test(e)
792
- }
793
- },
794
- emit: [C.INPUT, C.START_DATE_SELECTED, C.END_DATE_SELECTED],
795
- setup(e, { emit: t }) {
796
- const n = F(null), a = F();
797
- H(
798
- () => e.value,
799
- () => {
800
- var i, c, m;
801
- if (e.isRange)
802
- a.value = e != null && e.showEndDateOnOpen && ((i = e.value) != null && i.endDate) ? (c = e.value) == null ? void 0 : c.endDate : ((m = e.value) == null ? void 0 : m.startDate) || /* @__PURE__ */ new Date();
803
- else {
804
- const L = e.defaultDisplayMonth && new Date(e.defaultDisplayMonth).getTime() ? new Date(e.defaultDisplayMonth) : /* @__PURE__ */ new Date();
805
- a.value = e.value || L;
806
- }
807
- },
808
- { immediate: !0 }
809
- );
810
- const o = T(() => ({
811
- "b-calendar__range": e.isRange
812
- })), {
813
- internalValue: r,
814
- onDateInput: u,
815
- onMouseOver: s
816
- } = e.isRange ? rt(
817
- {
818
- selectedDate: U(e, "value"),
819
- isDateDisabled: e.isDateDisabled,
820
- maxRange: U(e, "maxRange"),
821
- granularity: U(e, "granularity"),
822
- firstDayOfWeek: e.firstDayOfWeek,
823
- min: U(e, "min"),
824
- max: U(e, "max")
825
- },
826
- t
827
- ) : at(
828
- {
829
- selectedDate: U(e, "value"),
830
- firstDayOfWeek: e.firstDayOfWeek
831
- },
832
- t
833
- ), v = (i) => e.numberOfMonths === 1 ? k.UNIQUE : i === 0 ? k.FIRST : i === e.numberOfMonths - 1 ? k.LAST : k.MIDDLE, d = T(() => (i) => {
834
- const c = e != null && e.showEndDateOnOpen && e.isRange ? V(a.value, e.numberOfMonths - 1) : a.value;
835
- return $(c, i);
836
- });
837
- return {
838
- // Refs
839
- calendarRef: n,
840
- // Values
841
- baseDate: a,
842
- conditionalClasses: o,
843
- internalValue: r,
844
- // Methods
845
- calculateOffsetMonth: d,
846
- calendarPosition: v,
847
- // Events
848
- onDateInput: u,
849
- onMouseOver: s,
850
- calculateNextMonths: (i = 1) => {
851
- a.value = $(a.value, i);
852
- },
853
- calculatePreviousMonths: (i = 1) => {
854
- a.value = V(a.value, i);
855
- }
856
- };
857
- }
858
- });
859
- var st = function() {
860
- var t = this, n = t._self._c;
861
- return t._self._setupProxy, n("div", { staticClass: "b-calendar", class: t.conditionalClasses }, t._l(t.numberOfMonths, function(a, o) {
862
- return n("calendar-month", { key: `calendar-${o}`, ref: t.numberOfMonths === 1 ? "calendarRef" : null, refInFor: !0, attrs: { "first-day-of-week": t.firstDayOfWeek, "is-date-disabled": t.isDateDisabled, month: t.calculateOffsetMonth(o), position: t.calendarPosition(o), min: t.min, max: t.max, "is-range": t.isRange, "start-date": t.internalValue.startDate, "end-date": t.internalValue.endDate, granularity: t.granularity }, on: { input: t.onDateInput, mouseover: t.onMouseOver, nextMonth: t.calculateNextMonths, previousMonth: t.calculatePreviousMonths } });
863
- }), 1);
864
- }, ut = [], lt = /* @__PURE__ */ le(
865
- ot,
866
- st,
867
- ut,
868
- !1,
869
- null,
870
- "267f7f0c"
871
- );
872
- const Ot = lt.exports;
873
- export {
874
- G as C,
875
- Ot as a,
876
- C as b,
877
- z as c,
878
- q as d,
879
- Z as e,
880
- Ue as f,
881
- J as g,
882
- $ as h,
883
- X as i,
884
- V as j,
885
- W as s,
886
- nt as u
887
- };
888
- //# sourceMappingURL=calendar.YJTNpmzh.js.map