@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,885 +0,0 @@
1
- import { reactive as se, defineComponent as we, computed as _, ref as S, onMounted as Ce, toRaw as de, toRef as le, watch as ue } from "vue";
2
- import { B as je } from "./divider.Cc4JFWG_.js";
3
- import { B as qe } from "./popover.3sHql3nd.js";
4
- import { B as Ae, d as Ke } from "./typography.J1v_SPG3.js";
5
- import { r as V, t as z, g as ce } from "./get-date-locale.BN8xEjY0.js";
6
- import { g as X } from "./generate-uid.NJ8tVoha.js";
7
- import { u as De } from "./i18n.BQkEbtPM.js";
8
- import { t as me, f as Z } from "./date.YLIcAerL.js";
9
- import { i as Y, s as K, c as Te, d as ze, e as _e, f as Je, g as Re, h as Qe, j as Xe, a as L, u as Ze } from "./calendar.YJTNpmzh.js";
10
- import { f as be, v as et, D as I } from "./date-input.BqBdAO1E.js";
11
- import { u as tt } from "./use-form-layout-loading.D3lALhtC.js";
12
- import "./index.Cl4_42j5.js";
13
- import { B as at } from "./input-field.Dl2lXZda.js";
14
- import { B as nt } from "./dropdown.DFEGHxjw.js";
15
- import { B as rt } from "./segmented-control.CW6v1rDg.js";
16
- import { d as ne } from "./debounce.DUTu11PS.js";
17
- import { u as st } from "./use-has-slot.C9lQZ6nz.js";
18
- import { e as F } from "./index.DPafeRJa.js";
19
- import { e as Ie } from "./index.CrhTVr5J.js";
20
- import { n as xe } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
21
- import { D as ot } from "./dropdown-default-textbox.DzPBw4CV.js";
22
- import { B as it } from "./directive.O3yEdalv.js";
23
- import { F as lt, E as ut } from "./error-message.B3oWB_HM.js";
24
- import { B as dt, c as ct } from "./button-actions.GhdYBSwt.js";
25
- import "../assets/date-range-picker.css";
26
- function Dt(t, e) {
27
- V(2, arguments);
28
- var n = z(t), u = z(e);
29
- return n.getTime() === u.getTime();
30
- }
31
- function ke(t) {
32
- V(1, arguments);
33
- var e = z(t);
34
- return e.setMilliseconds(0), e;
35
- }
36
- function Se(t, e) {
37
- V(2, arguments);
38
- var n = ke(t), u = ke(e);
39
- return n.getTime() === u.getTime();
40
- }
41
- function mt(t) {
42
- return V(1, arguments), Y(t, Date.now());
43
- }
44
- function ft(t, e) {
45
- V(2, arguments);
46
- var n = z(t), u = me(e);
47
- return n.setHours(u), n;
48
- }
49
- function pt(t, e) {
50
- V(2, arguments);
51
- var n = z(t), u = me(e);
52
- return n.setMinutes(u), n;
53
- }
54
- function vt(t, e) {
55
- V(2, arguments);
56
- var n = z(t), u = me(e);
57
- return n.setSeconds(u), n;
58
- }
59
- function oe(t) {
60
- if (t == null)
61
- return K(/* @__PURE__ */ new Date());
62
- const [e, n, u] = t.split("-").map((d) => parseInt(d, 10));
63
- return new Date(e, n - 1, u);
64
- }
65
- const gt = ({
66
- firstDayOfWeek: t,
67
- min: e,
68
- max: n
69
- }) => ({ getGranularCalendarLimits: (d) => {
70
- let f = K(e), r = F(n);
71
- if ((d == null ? void 0 : d.type) === "weekly") {
72
- if (d.earliest)
73
- f = K(d.earliest);
74
- else {
75
- const D = Te(f, { weekStartsOn: t });
76
- Y(f, D) || (f = K(ze(_e(f, { weekStartsOn: t }), 1)));
77
- }
78
- if (d.latest)
79
- r = F(d.latest);
80
- else {
81
- const D = _e(r, { weekStartsOn: t });
82
- Y(r, D) || (r = F(Je(Te(r, { weekStartsOn: t }), 1)));
83
- }
84
- }
85
- if ((d == null ? void 0 : d.type) === "monthly") {
86
- if (d.earliest)
87
- f = K(d.earliest);
88
- else {
89
- const D = Re(f);
90
- Y(f, D) || (f = Re(Qe(f, 1)));
91
- }
92
- if (d.latest)
93
- r = F(d.latest);
94
- else {
95
- const D = Ie(r);
96
- Y(r, D) || (r = Ie(Xe(r, 1)));
97
- }
98
- }
99
- return { min: f, max: r };
100
- } }), yt = () => {
101
- const t = se({
102
- daily: null,
103
- weekly: null,
104
- monthly: null
105
- });
106
- return {
107
- savedRanges: t,
108
- saveRange: (u, d) => {
109
- t[u] = d;
110
- },
111
- resetSavedRanges: () => {
112
- t.daily = null, t.weekly = null, t.monthly = null;
113
- }
114
- };
115
- };
116
- var p = /* @__PURE__ */ ((t) => (t.CUSTOM_RANGE = "custom-range", t.INPUT = "input", t.ERROR = "error", t.FORM_DATE = "form-date", t.START_DATE_SELECTED = "start-date-selected", t))(p || {});
117
- const Tt = /[\d]/, _t = /^\d{2}$/, Rt = /^\d{2}:\d{2}$/, bt = (t) => {
118
- const { selectionStart: e } = t.target, n = Tt.test(t.key) || t.key === "Backspace", u = [1, 2, 4, 5].includes(e) && t.key === ":";
119
- !n && !u && t.preventDefault();
120
- }, Ee = (t) => {
121
- if (!t)
122
- return t;
123
- let e = t;
124
- if (e.length === 1 && parseInt(t, 10) > 2)
125
- return `0${e}:`;
126
- const [n, u] = e.slice(-2);
127
- return [2, 5].includes(e.length) && u === ":" && (e = `${e.slice(0, e.length - 2)}0${n}`), (_t.test(e) || Rt.test(e)) && (e += ":"), e;
128
- }, It = {
129
- "en-US": {
130
- customRange: "Custom range",
131
- daily: "Daily",
132
- dateFrom: "Date from",
133
- dateTo: "Date to",
134
- lastMonth: "Last month",
135
- lastSevenDays: "Last 7 days",
136
- lastThreeMonths: "Last three months",
137
- monthly: "Monthly",
138
- timeFrom: "Time from",
139
- timeTo: "Time to",
140
- weekly: "Weekly"
141
- },
142
- "ja-JP": {
143
- customRange: "カスタム範囲を選択",
144
- daily: "毎日",
145
- lastMonth: "先月",
146
- lastSevenDays: "過去7日間",
147
- monthly: "毎月",
148
- weekly: "毎週"
149
- },
150
- "pt-BR": {
151
- customRange: "Selecione um intervalo personalizado",
152
- daily: "Diário",
153
- lastMonth: "Último mês",
154
- lastSevenDays: "Últimos 7 dias",
155
- monthly: "Mensal",
156
- weekly: "Semanal"
157
- }
158
- }, he = 300, Me = "customRange", Oe = "daily", kt = we({
159
- i18n: { messages: It },
160
- name: "date-range-picker-calendar",
161
- components: {
162
- BentoDropdown: nt,
163
- BentoInputField: at,
164
- BentoSegmentedControl: rt,
165
- BentoTypography: Ae,
166
- Calendar: L
167
- },
168
- props: {
169
- /**
170
- * Allows user to enter time values in the form
171
- */
172
- allowTimeInput: { type: Boolean, default: !1 },
173
- /**
174
- * Ranges form persistance data
175
- */
176
- dateFormData: {
177
- type: Object,
178
- default: () => ({ startDate: void 0, endDate: void 0, startTime: void 0, endTime: void 0 })
179
- },
180
- /**
181
- * Allows you to set the first day of the week. 0 is sunday, 1 is monday, 6 is saturday
182
- */
183
- firstDayOfWeek: L.props.firstDayOfWeek,
184
- /**
185
- * A list of available granularities.
186
- * If present, the date picker will display a segmented control to change granularity.
187
- */
188
- granularities: {
189
- type: Array,
190
- default: null
191
- },
192
- /**
193
- * Indicate if a date should be disabled or not
194
- */
195
- isDateDisabled: L.props.isDateDisabled,
196
- /**
197
- * Set a maximum number of dates to be selectable by the range.
198
- */
199
- maxRange: L.props.maxRange,
200
- /**
201
- * Sets a minimum limit for selectable dates - dates before `min` will not be selectable
202
- */
203
- min: L.props.min,
204
- /**
205
- * Sets a maximum limit for selectable dates - dates after `max` will not be selectable
206
- */
207
- max: L.props.max,
208
- /**
209
- * Number of months rendered on pane
210
- */
211
- numberOfMonths: L.props.numberOfMonths,
212
- /**
213
- * Displays the end date's month when the calendar is opened. Defaults to false i.e. the start date's month is displayed.
214
- */
215
- showEndDateOnOpen: { type: Boolean, default: !1 },
216
- /**
217
- * Enables the custom range selector.
218
- * If provided, must be an array that sets the custom range dropdown items. Items are of the structure:
219
- * `label` - label of custom range item.
220
- * `value` - a unique key of the custom range item.
221
- * `data` - an object `{ startDate: Date; endDate: Date }` to set the date picker range to upon selecting.
222
- */
223
- quickSelectRanges: {
224
- type: Array,
225
- default: void 0
226
- },
227
- /**
228
- * Selected date
229
- */
230
- value: { type: Object, default: void 0 }
231
- },
232
- emits: [
233
- p.CUSTOM_RANGE,
234
- p.INPUT,
235
- p.ERROR,
236
- p.FORM_DATE,
237
- p.START_DATE_SELECTED
238
- ],
239
- setup(t, { emit: e, slots: n }) {
240
- var pe, ve, ge, ye;
241
- const { locale: u, t: d } = De(), f = ce(), r = se({
242
- startDate: (pe = t.value) == null ? void 0 : pe.startDate,
243
- endDate: (ve = t.value) == null ? void 0 : ve.endDate,
244
- range: (ge = t.value) == null ? void 0 : ge.range,
245
- ...t.granularities ? {
246
- granularity: ((ye = t.value) == null ? void 0 : ye.granularity) || Oe
247
- } : {}
248
- });
249
- function D(a) {
250
- return new Date(
251
- a.getUTCFullYear(),
252
- a.getUTCMonth(),
253
- a.getUTCDate(),
254
- a.getUTCHours(),
255
- a.getUTCMinutes(),
256
- a.getUTCSeconds()
257
- );
258
- }
259
- const y = _(() => {
260
- var a, s;
261
- return ((s = (a = t == null ? void 0 : t.quickSelectRanges) == null ? void 0 : a.find(({ value: i, data: l }) => {
262
- if (!l.endDate)
263
- return i === r.range || Dt(
264
- D(l.startDate),
265
- D(r.startDate)
266
- ) && mt(r.endDate);
267
- if (t.allowTimeInput)
268
- return Se(
269
- D(l.startDate),
270
- D(r.startDate)
271
- ) && Se(D(l.endDate), D(r.endDate));
272
- if (l.endDate)
273
- return Y(l.startDate, r.startDate) && Y(l.endDate, r.endDate);
274
- })) == null ? void 0 : s.value) ?? Me;
275
- }), J = _(() => ({
276
- "b-date-range-picker-calendar__form-input-wrapper": t.allowTimeInput
277
- })), ee = _(() => [
278
- { label: d("customRange"), value: Me },
279
- ...R.value ? R.value : []
280
- ]), v = _(
281
- () => {
282
- var a;
283
- return ((a = t.granularities) == null ? void 0 : a.find(({ type: s }) => s === r.granularity)) || null;
284
- }
285
- ), $ = _(
286
- () => {
287
- var a;
288
- return ((a = t.granularities) == null ? void 0 : a.map(({ type: s, disabled: i }) => ({
289
- label: d(s),
290
- value: s,
291
- disabled: i
292
- }))) ?? [];
293
- }
294
- ), R = _(
295
- () => t.quickSelectRanges && t.quickSelectRanges.map((a) => ({
296
- ...a,
297
- data: {
298
- ...a.data,
299
- // Adding timeDifference to calculate an up-to-date endDate on range selection
300
- timeDifference: a.data.endDate ? void 0 : new Date(Date.now()).getTime() - a.data.startDate.getTime()
301
- }
302
- }))
303
- ), { getGranularCalendarLimits: G } = gt(t), m = _(
304
- () => t.granularities ? G(v.value) : { min: K(t.min), max: F(t.max) }
305
- ), {
306
- adjustDateForMonthly: U,
307
- adjustDateForWeekly: E,
308
- adjustStartDateInputForWeekly: g,
309
- adjustEndDateInputForWeekly: Q,
310
- adjustStartDateInputForMonthly: C,
311
- adjustEndDateInputForMonthly: ie
312
- } = Ze(t.firstDayOfWeek), { savedRanges: k, saveRange: te, resetSavedRanges: h } = yt(), T = (a) => a ? Z(a, I.NUMERIC_DATE_YEAR_FIRST, {
313
- locale: f[u.value.substring(0, 2)] || f.enUS
314
- }) : "", H = (a) => a ? Z(a, I.HOUR_MINUTE_SECONDS, {
315
- locale: f[u.value.substring(0, 2)] || f.enUS
316
- }) : "", A = S(!1), x = S(!1), P = S(!1), B = S(!1), o = se({
317
- startDate: t.dateFormData.startDate,
318
- endDate: t.dateFormData.endDate,
319
- startTime: t.dateFormData.startTime,
320
- endTime: t.dateFormData.endTime
321
- }), ae = (a) => /^(?:[01]\d|2[01234]):(?:[012345]\d):(?:[012345]\d)$/.test(a), M = (a, s) => {
322
- if (!s || !ae(s))
323
- return a;
324
- let i = new Date(a);
325
- const [l, b, N] = s.split(":");
326
- return i = ft(i, parseInt(l, 10)), i = pt(i, parseInt(b, 10)), i = vt(i, parseInt(N, 10)), i;
327
- }, fe = (a) => {
328
- r.startDate = M(a.startDate, o.startTime), r.endDate = M(a.endDate, o.endTime), r.range = null, t.granularities && h(), e(p.INPUT, {
329
- ...r,
330
- range: y.value
331
- });
332
- }, c = (a) => {
333
- const s = (l) => t.min && l <= t.min || t.max && l >= t.max ? !1 : t.isDateDisabled ? !t.isDateDisabled(l) : !0;
334
- return /^\d{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])$/.test(a) && s(new Date(a));
335
- };
336
- Ce(() => {
337
- t.dateFormData.startDate && !c(t.dateFormData.startDate) ? A.value = !0 : (A.value = !1, P.value = !1), t.dateFormData.endDate && !c(t.dateFormData.endDate) ? x.value = !0 : (x.value = !1, B.value = !1);
338
- });
339
- const O = (a) => {
340
- var s;
341
- o.startDate = T(a), o.startTime ? P.value && (o.startTime = (s = t.dateFormData) == null ? void 0 : s.startTime) : o.startTime = H(a), A.value = !1, P.value = !1, e(p.START_DATE_SELECTED, a);
342
- }, W = (a) => {
343
- var s;
344
- o.endDate = T(a), o.endTime ? B.value && (o.endTime = (s = t.dateFormData) == null ? void 0 : s.endTime) : o.endTime = H(F(a)), x.value = !1, B.value = !1;
345
- }, j = (a) => {
346
- const s = t.value[a];
347
- if (s)
348
- return s;
349
- if (t.dateFormData[a] && c(t.dateFormData[a]))
350
- return new Date(t.dateFormData[a]);
351
- }, Fe = ne((a) => {
352
- var s;
353
- if (c(a)) {
354
- let i = a;
355
- switch (A.value = !1, (s = v.value) == null ? void 0 : s.type) {
356
- case "weekly":
357
- i = g(
358
- a,
359
- T,
360
- m.value.min,
361
- m.value.max
362
- ), o.startDate = i;
363
- break;
364
- case "monthly":
365
- i = C(
366
- a,
367
- T,
368
- m.value.min,
369
- m.value.max
370
- ), o.startDate = i;
371
- break;
372
- }
373
- const l = oe(i);
374
- r.startDate = M(l, o.startTime);
375
- const b = j("endDate");
376
- e(p.FORM_DATE, {
377
- startDate: l,
378
- endDate: b
379
- }), e(p.INPUT, {
380
- ...r,
381
- range: y.value
382
- });
383
- } else
384
- A.value = !0, e(p.ERROR, { ...o });
385
- }, he), Ue = (a) => {
386
- o.startDate = be(a), Fe(o.startDate);
387
- }, Pe = ne((a) => {
388
- var s;
389
- if (c(a)) {
390
- let i = a;
391
- switch (x.value = !1, (s = v.value) == null ? void 0 : s.type) {
392
- case "weekly":
393
- i = Q(
394
- a,
395
- T,
396
- m.value.min,
397
- m.value.max
398
- ), o.endDate = i;
399
- break;
400
- case "monthly":
401
- i = ie(
402
- a,
403
- T,
404
- m.value.min,
405
- m.value.max
406
- ), o.endDate = i;
407
- break;
408
- }
409
- const l = oe(i);
410
- r.endDate = M(l, o.endTime);
411
- const b = j("startDate");
412
- e(p.FORM_DATE, {
413
- startDate: b,
414
- endDate: l
415
- }), e(p.INPUT, {
416
- ...r,
417
- range: y.value
418
- });
419
- } else
420
- x.value = !0, e(p.ERROR, { ...o });
421
- }, he), Be = (a) => {
422
- o.endDate = be(a), Pe(o.endDate);
423
- }, Ne = (a) => {
424
- et(a);
425
- }, Le = ne((a) => {
426
- if (ae(a)) {
427
- P.value = !1, r.startDate = M(r.startDate, a);
428
- const s = j("endDate");
429
- e(p.FORM_DATE, {
430
- startDate: new Date(r.startDate),
431
- endDate: s,
432
- startTime: a,
433
- endTime: t.dateFormData.endTime
434
- }), e(p.INPUT, {
435
- ...r,
436
- range: y.value
437
- });
438
- } else
439
- P.value = !0, e(p.ERROR, { ...o });
440
- }), Ye = ne((a) => {
441
- if (ae(a)) {
442
- B.value = !1, r.endDate = M(r.endDate, a);
443
- const s = j("startDate");
444
- r.startDate = M(new Date(s), t.dateFormData.startTime), e(p.FORM_DATE, {
445
- startDate: M(new Date(s), t.dateFormData.startTime),
446
- endDate: new Date(r.endDate),
447
- startTime: t.dateFormData.startTime,
448
- endTime: a
449
- }), e(p.INPUT, {
450
- ...r,
451
- range: y.value
452
- });
453
- } else
454
- B.value = !0, e(p.ERROR, { ...o });
455
- }), Ve = (a) => {
456
- o.startTime = Ee(a), Le(o.startTime);
457
- }, $e = (a) => {
458
- o.endTime = Ee(a), Ye(o.endTime);
459
- }, Ge = (a) => {
460
- bt(a);
461
- }, q = (a, s, i, l) => {
462
- r.startDate = a, r.endDate = s, i && (r.granularity = i), l && (r.range = l);
463
- }, He = (a) => {
464
- var i;
465
- const s = (i = R.value) == null ? void 0 : i.find(({ value: l }) => l === a);
466
- if (s) {
467
- h();
468
- const l = s.data, b = l.endDate || new Date(Date.now()), N = l.timeDifference ? new Date(b.getTime() - l.timeDifference) : l.startDate;
469
- o.endDate = T(b), o.startDate = T(N), q(N, b, null, a), t.granularities && (r.granularity = l.granularity || Oe), o.startTime || (o.startTime = H(F(N))), o.endTime || (o.endTime = H(F(b))), r.startDate = N, r.endDate = b, e(p.CUSTOM_RANGE, {
470
- ...s.data,
471
- startDate: N,
472
- endDate: b,
473
- range: s.value
474
- });
475
- }
476
- }, We = (a) => {
477
- const s = r.granularity;
478
- if (r.granularity = a, s && te(s, structuredClone(de(r))), r.startDate && r.endDate) {
479
- switch (a) {
480
- case "monthly": {
481
- if (k.monthly) {
482
- q(k.monthly.startDate, k.monthly.endDate, a);
483
- break;
484
- }
485
- const { startDate: i, endDate: l } = U(
486
- r.startDate,
487
- r.endDate,
488
- m.value.min,
489
- m.value.max
490
- );
491
- q(i, l, a);
492
- break;
493
- }
494
- case "weekly": {
495
- if (k.weekly) {
496
- q(k.weekly.startDate, k.weekly.endDate, a);
497
- break;
498
- }
499
- const { startDate: i, endDate: l } = E(
500
- r.startDate,
501
- r.endDate,
502
- m.value.min,
503
- m.value.max
504
- );
505
- q(i, l, a);
506
- break;
507
- }
508
- case "daily":
509
- k.daily && q(k.daily.startDate, k.daily.endDate, a);
510
- break;
511
- }
512
- o.startDate = T(r.startDate), o.endDate = T(r.endDate), e(p.INPUT, {
513
- ...r,
514
- range: y.value
515
- });
516
- }
517
- };
518
- return {
519
- // Values
520
- internalRangeDate: r,
521
- dateTextInput: o,
522
- endDateError: x,
523
- endTimeError: B,
524
- granularityItems: $,
525
- selectedGranularity: v,
526
- computedMinMax: m,
527
- selectedRangeSelectorValue: y,
528
- startDateError: A,
529
- startTimeError: P,
530
- adjustedQuickSelectRanges: R,
531
- quickSelectRangeDefaultItems: ee,
532
- formInputWrapperConditionalClasses: J,
533
- // Methods
534
- hasSlot: st(n),
535
- t: d,
536
- // Events
537
- onDateInput: fe,
538
- onDateInputKeyDown: Ne,
539
- onEndDateInput: Be,
540
- onEndDateSelected: W,
541
- onEndTimeInput: $e,
542
- onGranularityInput: We,
543
- onRangeSelectorInput: He,
544
- onStartDateInput: Ue,
545
- onStartDateSelected: O,
546
- onStartTimeInput: Ve,
547
- onTimeInputKeyDown: Ge
548
- };
549
- }
550
- });
551
- var St = function() {
552
- var e = this, n = e._self._c;
553
- return e._self._setupProxy, n("div", { staticClass: "b-date-range-picker-calendar" }, [n("div", { staticClass: "b-date-range-picker-calendar__form-container" }, [n("div", { staticClass: "b-date-range-picker-calendar__form" }, [e.hasSlot("title") ? [e._t("title")] : e._e(), e.adjustedQuickSelectRanges ? n("bento-dropdown", { attrs: { "aria-label": e.t("customRange"), items: e.quickSelectRangeDefaultItems, value: e.selectedRangeSelectorValue }, on: { input: e.onRangeSelectorInput } }) : e._e(), e.granularities ? n("bento-segmented-control", { attrs: { items: e.granularityItems, "model-value": e.internalRangeDate.granularity, "full-width": "" }, on: { "update:model-value": e.onGranularityInput } }) : e._e(), n("div", [n("bento-typography", { staticClass: "b-date-range-picker-calendar__label", attrs: { stronger: "", el: "span" } }, [e._v(" From ")]), n("div", { class: e.formInputWrapperConditionalClasses }, [n("bento-input-field", { staticClass: "b-date-range-picker-calendar__form-input", attrs: { "aria-label": e.t("dateFrom"), value: e.dateTextInput.startDate, error: e.startDateError }, on: { input: e.onStartDateInput, keydown: e.onDateInputKeyDown }, scopedSlots: e._u([{ key: "description", fn: function() {
554
- return [e._v("YYYY-MM-DD")];
555
- }, proxy: !0 }]) }), e.allowTimeInput ? n("bento-input-field", { staticClass: "b-date-range-picker-calendar__form-input", attrs: { "aria-label": e.t("timeFrom"), value: e.dateTextInput.startTime, error: e.startTimeError }, on: { input: e.onStartTimeInput, keydown: e.onTimeInputKeyDown }, scopedSlots: e._u([{ key: "description", fn: function() {
556
- return [e._v("HH:MM:SS")];
557
- }, proxy: !0 }], null, !1, 3442289499) }) : e._e()], 1)], 1), n("div", [n("bento-typography", { staticClass: "b-date-range-picker-calendar__label", attrs: { stronger: "", el: "span" } }, [e._v(" To ")]), n("div", { class: e.formInputWrapperConditionalClasses }, [n("bento-input-field", { staticClass: "b-date-range-picker-calendar__form-input", attrs: { "aria-label": e.t("dateTo"), value: e.dateTextInput.endDate, error: e.endDateError }, on: { input: e.onEndDateInput, keydown: e.onDateInputKeyDown }, scopedSlots: e._u([{ key: "description", fn: function() {
558
- return [e._v("YYYY-MM-DD")];
559
- }, proxy: !0 }]) }), e.allowTimeInput ? n("bento-input-field", { staticClass: "b-date-range-picker-calendar__form-input", attrs: { "aria-label": e.t("timeTo"), value: e.dateTextInput.endTime, error: e.endTimeError }, on: { input: e.onEndTimeInput, keydown: e.onTimeInputKeyDown }, scopedSlots: e._u([{ key: "description", fn: function() {
560
- return [e._v("HH:MM:SS")];
561
- }, proxy: !0 }], null, !1, 3442289499) }) : e._e()], 1)], 1)], 2), e.hasSlot("actions") ? n("div", [e._t("actions")], 2) : e._e()]), n("div", { staticClass: "b-date-range-picker-calendar__calendars-container" }, [n("calendar", { attrs: { value: e.internalRangeDate, "first-day-of-week": e.firstDayOfWeek, "is-date-disabled": e.isDateDisabled, "max-range": e.maxRange, min: e.computedMinMax.min, max: e.computedMinMax.max, "number-of-months": e.numberOfMonths, "show-end-date-on-open": e.showEndDateOnOpen, granularity: e.selectedGranularity, "is-range": "" }, on: { input: e.onDateInput, "start-date-selected": e.onStartDateSelected, "end-date-selected": e.onEndDateSelected } })], 1)]);
562
- }, Et = [], ht = /* @__PURE__ */ xe(
563
- kt,
564
- St,
565
- Et,
566
- !1,
567
- null,
568
- "8f0cabe9"
569
- );
570
- const w = ht.exports, Mt = ({
571
- datePickerValue: t,
572
- isDateIncorrect: e,
573
- quickSelectRanges: n
574
- }) => {
575
- var v, $, R, G;
576
- const { locale: u, t: d } = De(), f = ce(), r = (m) => !!m && !isNaN(m.getTime()), D = (m, U) => r(m) ? Z(m, U, {
577
- locale: f[u.value.substring(0, 2)] || f.enUS
578
- }) : void 0, y = se({
579
- startDate: D((v = t.value) == null ? void 0 : v.startDate, I.NUMERIC_DATE_YEAR_FIRST),
580
- endDate: D(($ = t.value) == null ? void 0 : $.endDate, I.NUMERIC_DATE_YEAR_FIRST),
581
- startTime: D((R = t.value) == null ? void 0 : R.startDate, I.HOUR_MINUTE_SECONDS),
582
- endTime: D((G = t.value) == null ? void 0 : G.endDate, I.HOUR_MINUTE_SECONDS)
583
- });
584
- return {
585
- // Values
586
- dateDisplayValue: _(() => {
587
- var E;
588
- if (e.value)
589
- return `${y.startDate || ""} - ${y.endDate || ""}`;
590
- if (!t.value || !t.value.startDate && !t.value.endDate)
591
- return d("selectDateRange");
592
- if ((E = n.value) != null && E.length) {
593
- const g = n.value.find(({ value: Q }) => {
594
- var C;
595
- return Q === ((C = t.value) == null ? void 0 : C.range);
596
- });
597
- if (g)
598
- return g.label;
599
- }
600
- const { startDate: m, endDate: U } = y;
601
- return `${D(oe(m), I.FULL_DATE_MONTH_FIRST)} - ${D(
602
- oe(U),
603
- I.FULL_DATE_MONTH_FIRST
604
- )}`;
605
- }),
606
- textInputDisplayValue: y,
607
- // Methods
608
- formatTextInputDisplayValue: () => ""
609
- };
610
- };
611
- var re = /* @__PURE__ */ ((t) => (t.INPUT = "input", t))(re || {});
612
- const Ot = {
613
- "en-US": {
614
- apply: "Apply",
615
- cancel: "Cancel",
616
- dateRangePicker: "Date range picker {name}",
617
- provideDateInAFormat: "Provide date in a YYYY-MM-DD format",
618
- selectDate: "Select a date",
619
- selectDateRange: "Select a date range",
620
- selectedDateIsNotAvailable: "Selected date is not available"
621
- },
622
- "ja-JP": {
623
- apply: "適用",
624
- cancel: "キャンセル",
625
- selectDate: "日付を選択"
626
- },
627
- "pt-BR": {
628
- apply: "Aplicar",
629
- cancel: "Cancelar",
630
- selectDate: "Selecione uma data"
631
- }
632
- }, wt = we({
633
- i18n: { messages: Ot },
634
- name: "bento-date-range-picker",
635
- components: {
636
- BentoButtonActions: dt,
637
- BentoDivider: je,
638
- BentoTypography: Ae,
639
- BentoPopover: qe,
640
- DateRangePickerCalendar: w,
641
- DropdownInputDefault: ot,
642
- ErrorMessage: ut,
643
- FieldLabel: lt
644
- },
645
- directives: { BentoClickOutsideDirective: it },
646
- props: {
647
- /**
648
- * Allows user to enter time values in the form
649
- */
650
- allowTimeInput: { type: Boolean, default: !1 },
651
- /**
652
- * Descriptive supporting text visbile underneath the dropdown.
653
- */
654
- description: { type: String, default: void 0 },
655
- /**
656
- * Disables dropdown functionality.
657
- */
658
- disabled: { type: Boolean, default: !1 },
659
- /**
660
- * Displays component in an error state with an error message
661
- */
662
- errorMessage: { type: String, default: null },
663
- /**
664
- * Allows user to set the first day of the week. 0 is sunday, 1 is monday, 6 is saturday
665
- */
666
- firstDayOfWeek: w.props.firstDayOfWeek,
667
- /**
668
- * A list of available granularities.
669
- * If present, the date picker will display a segmented control to change granularity.
670
- */
671
- granularities: w.props.granularities,
672
- /**
673
- * Indicate if a date should be disabled or not
674
- */
675
- isDateDisabled: w.props.isDateDisabled,
676
- /**
677
- * Text that is displayed as a label above the element.
678
- */
679
- label: { type: String, default: void 0 },
680
- /**
681
- * Upon opening date range picker, end date's month will be pre-selected.
682
- */
683
- showEndDateOnOpen: { type: Boolean, default: !1 },
684
- /**
685
- * Highlights the dropdown is optional.
686
- */
687
- optional: { type: Boolean, default: !1 },
688
- /**
689
- * The Boolean readonly property, when present, makes the element not mutable, meaning the user can not edit the date range picker.
690
- */
691
- readonly: { type: Boolean, default: !1 },
692
- /**
693
- * Highlights the dropdown is required.
694
- */
695
- required: { type: Boolean, default: !1 },
696
- /**
697
- * Adds a info icon next to the label to display the passed tooltip message.
698
- */
699
- tooltipText: { type: String, default: null },
700
- /**
701
- * Enables the range selector.
702
- * If provided, must be an array that sets the custom range dropdown items. Items are of the structure:
703
- * `label` - label of custom range item.
704
- * `value` - a unique key of the custom range item.
705
- * `data` - an object `{ startDate: Date; endDate: Date }` to set the date picker range to upon selecting.
706
- */
707
- quickSelectRanges: {
708
- type: Array,
709
- default: void 0
710
- },
711
- /**
712
- * Set a maximum number of dates to be selectable by the range.
713
- */
714
- maxRange: w.props.maxRange,
715
- /**
716
- * Sets a minimum limit for selectable dates - dates before `min` will not be selectable
717
- */
718
- min: w.props.min,
719
- /**
720
- * Sets a maximum limit for selectable dates - dates after `max` will not be selectable
721
- */
722
- max: w.props.max,
723
- /**
724
- * Number of months rendered on pane
725
- */
726
- numberOfMonths: w.props.numberOfMonths,
727
- /**
728
- * Selected date
729
- */
730
- value: w.props.value,
731
- /**
732
- * Enables the date picker selection to persist until it is explicitly applied.
733
- * Displays a set of buttons: Apply and Cancel.
734
- *
735
- * @deprecated This will be the default behaviour in v2.0.0.
736
- */
737
- hasActions: { type: Boolean, default: !1 }
738
- },
739
- emits: [re.INPUT],
740
- setup(t, { emit: e }) {
741
- const { locale: n, t: u } = De(), d = ce(), f = X("bento-date-range-picker-container"), r = X("bento-date-range-picker-label"), D = X("bento-date-range-picker-description"), y = X("bento-date-range-picker-error"), J = X("bento-date-range-picker-date-error"), ee = _(
742
- () => t.label || u("dateRangePicker", { name: f })
743
- ), v = S(!1), $ = S(null), R = S(!1), { isReadOnly: G } = tt(le(t, "readonly"));
744
- ue(
745
- () => t.disabled,
746
- () => {
747
- t.disabled && R.value && (R.value = !1);
748
- }
749
- );
750
- const m = _(() => t.hasActions ? !T.value && v.value : v.value), U = _(() => ({
751
- "b-date-range-picker__description--error": !!t.errorMessage || m.value
752
- })), { dateDisplayValue: E, textInputDisplayValue: g } = Mt({
753
- datePickerValue: le(t, "value"),
754
- isDateIncorrect: v,
755
- quickSelectRanges: le(t, "quickSelectRanges")
756
- }), Q = _(
757
- () => `${t.description ? D : ""} ${t.errorMessage ? y : ""} ${v.value ? J : ""}`.trim() || null
758
- ), C = () => {
759
- R.value = !1;
760
- }, ie = () => {
761
- R.value = !0;
762
- }, k = S(E.value), te = S(
763
- // textInputDisplayValue is a reactive object
764
- structuredClone(de(g))
765
- ), h = S(t.value), T = S(!0), H = _(
766
- () => t.hasActions ? te.value : g
767
- ), A = _(
768
- () => t.hasActions ? k.value : E.value
769
- );
770
- Ce(() => {
771
- t.hasActions || Ke(
772
- 'BentoDateRangePicker "hasActions" property',
773
- `Set the BentoDateRangePicker "hasActions" property true which will display the "Apply" and "Cancel" buttons.
774
- This will be the default behavior in the v2 and "hasActions" will be removed.`,
775
- "2.0.0"
776
- );
777
- }), ue(
778
- () => t.value,
779
- () => {
780
- k.value = E.value, te.value = structuredClone(de(g));
781
- }
782
- );
783
- const x = _(() => [
784
- {
785
- title: u("apply"),
786
- event: () => {
787
- e(re.INPUT, h.value), C(), T.value = !0;
788
- },
789
- disabled: T.value
790
- },
791
- {
792
- title: u("cancel"),
793
- event: C
794
- }
795
- ]);
796
- return ue(h, (c) => {
797
- if (t.hasActions) {
798
- T.value = v.value;
799
- return;
800
- }
801
- e(re.INPUT, c);
802
- }), {
803
- // Refs
804
- inputContainerRef: $,
805
- // Values,
806
- dateDisplayValue: E,
807
- datePickerContainerId: f,
808
- descriptionConditionalClasses: U,
809
- displayedTextInputValue: H,
810
- displayedDateValue: A,
811
- isDateIncorrect: v,
812
- isDateRangePickerOpen: R,
813
- isReadOnly: G,
814
- labelId: r,
815
- descriptionId: D,
816
- dateErrorId: J,
817
- errorId: y,
818
- popoverAriaLabel: ee,
819
- shouldDisplayError: m,
820
- ariaDescribedBy: Q,
821
- textInputDisplayValue: g,
822
- rangePickerButtonActions: x,
823
- BentoButtonActionsLayout: ct,
824
- // Events
825
- closeDateRangePicker: C,
826
- clearDateRangePickerValue: async () => {
827
- v.value && (v.value = !1), h.value = null;
828
- },
829
- openDateRangePicker: ie,
830
- onRangeSelectorInput: (c) => {
831
- if (c) {
832
- const O = (W) => Z(W, I.NUMERIC_DATE_YEAR_FIRST, {
833
- locale: d[n.value.substring(0, 2)] || d.enUS
834
- });
835
- g.startDate = O(c.startDate), g.endDate = O(c.endDate), h.value = c;
836
- }
837
- },
838
- onEnterPressedOverInput: () => {
839
- v.value || (R.value = !1);
840
- },
841
- onDateRangePickerInput: (c) => {
842
- v.value = !1;
843
- const O = (W, j) => W ? Z(W, j, {
844
- locale: d[n.value.substring(0, 2)] || d.enUS
845
- }) : void 0;
846
- g.startDate = O(
847
- c.startDate,
848
- I.NUMERIC_DATE_YEAR_FIRST
849
- ), g.endDate = O(c.endDate, I.NUMERIC_DATE_YEAR_FIRST), g.startTime = O(c.startDate, I.HOUR_MINUTE_SECONDS), g.endTime = O(c.endDate, I.HOUR_MINUTE_SECONDS), h.value = c;
850
- },
851
- onDateRangePickerError: (c) => {
852
- v.value = !0, g.startDate = c.startDate, g.endDate = c.endDate, h.value = { startDate: null, endDate: null };
853
- },
854
- onDateRangePickerFormDateInputUpdate: (c) => {
855
- v.value = !1, c.startTime && (g.startTime = c.startTime), c.endTime && (g.endTime = c.endTime);
856
- },
857
- // Translations
858
- t: u
859
- };
860
- }
861
- });
862
- var Ct = function() {
863
- var e = this, n = e._self._c;
864
- return e._self._setupProxy, n("div", { directives: [{ name: "bento-click-outside-directive", rawName: "v-bento-click-outside-directive", value: e.closeDateRangePicker, expression: "closeDateRangePicker" }], staticClass: "b-date-range-picker" }, [e.label ? n("field-label", { attrs: { id: e.labelId, label: e.label, "tooltip-text": e.tooltipText, optional: e.optional, required: e.required } }) : e._e(), n("div", { on: { keydown: function(u) {
865
- return !u.type.indexOf("key") && e._k(u.keyCode, "enter", 13, u.key, "Enter") ? null : e.onEnterPressedOverInput.apply(null, arguments);
866
- } } }, [n("dropdown-input-default", { ref: "inputContainerRef", attrs: { "always-combobox-is-input": "", ariaControls: e.datePickerContainerId, ariaExpanded: e.isDateRangePickerOpen, "aria-labelledby": e.label ? e.labelId : null, "aria-describedby": e.ariaDescribedBy, disabled: e.disabled, "is-invalid": !!e.errorMessage || e.shouldDisplayError, open: e.isDateRangePickerOpen, "display-value": e.displayedDateValue, readonly: e.isReadOnly }, on: { open: e.openDateRangePicker, clear: e.clearDateRangePickerValue, close: e.closeDateRangePicker } })], 1), e.shouldDisplayError ? n("error-message", { staticClass: "b-date-range-picker__error-message", attrs: { id: e.dateErrorId, "error-message": e.t("provideDateInAFormat") } }) : e._e(), e.errorMessage ? n("error-message", { staticClass: "b-date-range-picker__error-message", attrs: { id: e.errorId, "error-message": e.errorMessage } }) : e._e(), e.description ? n("bento-typography", { staticClass: "b-date-range-picker__description", class: e.descriptionConditionalClasses, attrs: { id: e.descriptionId, el: "span" } }, [e._v(" " + e._s(e.description) + " ")]) : e._e(), e.inputContainerRef ? n("bento-popover", { staticClass: "b-date-range-picker__container", attrs: { id: e.datePickerContainerId, open: e.isDateRangePickerOpen, "target-element": e.inputContainerRef, "disable-focus-trap": !0, "aria-label": e.popoverAriaLabel, position: "bottom-start", "without-space": "", "fit-content": "" } }, [n("date-range-picker-calendar", { attrs: { "allow-time-input": e.allowTimeInput, "quick-select-ranges": e.quickSelectRanges, value: e.value, "first-day-of-week": e.firstDayOfWeek, granularities: e.granularities, "is-date-disabled": e.isDateDisabled, "max-range": e.maxRange, min: e.min, max: e.max, "number-of-months": e.numberOfMonths, "show-end-date-on-open": e.showEndDateOnOpen, "date-form-data": e.displayedTextInputValue }, on: { "custom-range": e.onRangeSelectorInput, input: e.onDateRangePickerInput, error: e.onDateRangePickerError, "form-date": e.onDateRangePickerFormDateInputUpdate }, scopedSlots: e._u([e.hasActions ? { key: "actions", fn: function() {
867
- return [n("bento-divider"), n("div", { staticClass: "b-date-range-picker__footer" }, [n("bento-button-actions", { attrs: { actions: e.rangePickerButtonActions, layout: e.BentoButtonActionsLayout.SPACE_BETWEEN } })], 1)];
868
- }, proxy: !0 } : null], null, !0) })], 1) : e._e()], 1);
869
- }, At = [], xt = /* @__PURE__ */ xe(
870
- wt,
871
- Ct,
872
- At,
873
- !1,
874
- null,
875
- "b5846f51"
876
- );
877
- const ra = xt.exports;
878
- export {
879
- ra as B,
880
- w as D,
881
- re as a,
882
- mt as b,
883
- Dt as i
884
- };
885
- //# sourceMappingURL=date-range-picker.Jysfo6h3.js.map