@adyen/bento-vue3 1.47.0 → 1.48.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 (249) hide show
  1. package/dist/@types/components.d.ts +4 -0
  2. package/dist/@types/index.d.ts +347 -111
  3. package/dist/accordion.js +1 -1
  4. package/dist/action-bar.js +1 -1
  5. package/dist/alert.js +1 -1
  6. package/dist/assets/accordion-item.css +1 -1
  7. package/dist/assets/action-bar.css +1 -1
  8. package/dist/assets/base-modal.css +1 -1
  9. package/dist/assets/card.css +1 -1
  10. package/dist/assets/chip.css +1 -0
  11. package/dist/assets/data-grid.css +1 -1
  12. package/dist/assets/date-range-picker.css +1 -1
  13. package/dist/assets/dialog-page.css +1 -1
  14. package/dist/assets/file-uploader.css +1 -1
  15. package/dist/assets/input-field-password.css +1 -1
  16. package/dist/assets/input-field-phone-number.css +1 -0
  17. package/dist/assets/input-field.css +1 -1
  18. package/dist/assets/inspector.css +1 -1
  19. package/dist/assets/link.css +1 -1
  20. package/dist/assets/menu.css +1 -1
  21. package/dist/assets/modal-fullscreen.css +1 -1
  22. package/dist/assets/popover.css +1 -1
  23. package/dist/assets/segmented-control.css +1 -1
  24. package/dist/assets/sidepanel.css +1 -1
  25. package/dist/assets/summary-grid-item-custom.css +1 -1
  26. package/dist/button.js +1 -1
  27. package/dist/card.js +1 -1
  28. package/dist/checkbox.js +2 -2
  29. package/dist/chip.js +5 -0
  30. package/dist/chip.js.map +1 -0
  31. package/dist/chunks/{accordion-item.LeB4jteX.js → accordion-item.Cf184uiI.js} +2 -2
  32. package/dist/chunks/{accordion-item.LeB4jteX.js.map → accordion-item.Cf184uiI.js.map} +1 -1
  33. package/dist/chunks/{action-bar.BN-AoRn0.js → action-bar.DWekSxPr.js} +5 -5
  34. package/dist/chunks/{action-bar.BN-AoRn0.js.map → action-bar.DWekSxPr.js.map} +1 -1
  35. package/dist/chunks/{alert.DTX7XqPC.js → alert.Dd2DYCZ1.js} +2 -2
  36. package/dist/chunks/{alert.DTX7XqPC.js.map → alert.Dd2DYCZ1.js.map} +1 -1
  37. package/dist/chunks/{base-modal.BsD3EOCY.js → base-modal.DOrcARK1.js} +4 -4
  38. package/dist/chunks/{base-modal.BsD3EOCY.js.map → base-modal.DOrcARK1.js.map} +1 -1
  39. package/dist/chunks/{button-actions-with-menu.CUL1q1Ca.js → button-actions-with-menu.BRdRrr4J.js} +4 -4
  40. package/dist/chunks/{button-actions-with-menu.CUL1q1Ca.js.map → button-actions-with-menu.BRdRrr4J.js.map} +1 -1
  41. package/dist/chunks/{button-actions.DBgK5Qwo.js → button-actions.ncthaz2m.js} +2 -2
  42. package/dist/chunks/{button-actions.DBgK5Qwo.js.map → button-actions.ncthaz2m.js.map} +1 -1
  43. package/dist/chunks/{calendar.CKY08nCx.js → calendar.BdLQOioy.js} +4 -4
  44. package/dist/chunks/{calendar.CKY08nCx.js.map → calendar.BdLQOioy.js.map} +1 -1
  45. package/dist/chunks/{card.BUBXMpP5.js → card.BAg7yMMT.js} +3 -3
  46. package/dist/chunks/{card.BUBXMpP5.js.map → card.BAg7yMMT.js.map} +1 -1
  47. package/dist/chunks/{checkbox-group.DOAFzAX-.js → checkbox-group.C-EmVp5t.js} +4 -4
  48. package/dist/chunks/{checkbox-group.DOAFzAX-.js.map → checkbox-group.C-EmVp5t.js.map} +1 -1
  49. package/dist/chunks/{checkbox.J51-tG4g.js → checkbox.BOtqaTUl.js} +18 -18
  50. package/dist/chunks/{checkbox.J51-tG4g.js.map → checkbox.BOtqaTUl.js.map} +1 -1
  51. package/dist/chunks/chip.sG_6gh3Z.js +71 -0
  52. package/dist/chunks/chip.sG_6gh3Z.js.map +1 -0
  53. package/dist/chunks/{code-snippet.CUzz3c-V.js → code-snippet.C9fCiM5V.js} +6 -6
  54. package/dist/chunks/{code-snippet.CUzz3c-V.js.map → code-snippet.C9fCiM5V.js.map} +1 -1
  55. package/dist/chunks/{codemirror.0fz2cWJS.js → codemirror.Zv80n3Z2.js} +13 -14
  56. package/dist/chunks/{codemirror.0fz2cWJS.js.map → codemirror.Zv80n3Z2.js.map} +1 -1
  57. package/dist/chunks/{controls-group.CjqybvY2.js → controls-group.BeK9igGT.js} +2 -2
  58. package/dist/chunks/{controls-group.CjqybvY2.js.map → controls-group.BeK9igGT.js.map} +1 -1
  59. package/dist/chunks/{copy.VRsofU-g.js → copy.HpUjy6OL.js} +2 -2
  60. package/dist/chunks/{copy.VRsofU-g.js.map → copy.HpUjy6OL.js.map} +1 -1
  61. package/dist/chunks/{country.D2t_VEYd.js → country.D0WFfaql.js} +14 -13
  62. package/dist/chunks/{country.D2t_VEYd.js.map → country.D0WFfaql.js.map} +1 -1
  63. package/dist/chunks/country.types.C0Q_hhgJ.js +269 -0
  64. package/dist/chunks/country.types.C0Q_hhgJ.js.map +1 -0
  65. package/dist/chunks/{currency.DGX-aejv.js → currency.DagWnTry.js} +2 -2
  66. package/dist/chunks/{currency.DGX-aejv.js.map → currency.DagWnTry.js.map} +1 -1
  67. package/dist/chunks/{dashboard-section.BAJgkMXW.js → dashboard-section.DoGuJKz_.js} +3 -3
  68. package/dist/chunks/{dashboard-section.BAJgkMXW.js.map → dashboard-section.DoGuJKz_.js.map} +1 -1
  69. package/dist/chunks/{dashed-underline.B_eVv1aB.js → dashed-underline.DZuyR-N7.js} +2 -2
  70. package/dist/chunks/{dashed-underline.B_eVv1aB.js.map → dashed-underline.DZuyR-N7.js.map} +1 -1
  71. package/dist/chunks/{data-grid-template.DrwGj6Yq.js → data-grid-template.BpJbblNT.js} +3 -3
  72. package/dist/chunks/{data-grid-template.DrwGj6Yq.js.map → data-grid-template.BpJbblNT.js.map} +1 -1
  73. package/dist/chunks/{data-grid.V4b5UdXZ.js → data-grid.CdTcZ3DP.js} +846 -841
  74. package/dist/chunks/data-grid.CdTcZ3DP.js.map +1 -0
  75. package/dist/chunks/{date-picker.DjuQyWzZ.js → date-picker.CjbhJWGH.js} +19 -19
  76. package/dist/chunks/{date-picker.DjuQyWzZ.js.map → date-picker.CjbhJWGH.js.map} +1 -1
  77. package/dist/chunks/date-range-picker.CoonfpYT.js +1086 -0
  78. package/dist/chunks/date-range-picker.CoonfpYT.js.map +1 -0
  79. package/dist/chunks/{date.DeaBl297.js → date.Cvfyq77s.js} +70 -2
  80. package/dist/chunks/{date.DeaBl297.js.map → date.Cvfyq77s.js.map} +1 -1
  81. package/dist/chunks/{dialog-page.CJBSluwk.js → dialog-page.D_r_CbyD.js} +2 -2
  82. package/dist/chunks/{dialog-page.CJBSluwk.js.map → dialog-page.D_r_CbyD.js.map} +1 -1
  83. package/dist/chunks/{dropdown-default-textbox.Dl8Jv2bS.js → dropdown-default-textbox.BpvVMlcX.js} +2 -2
  84. package/dist/chunks/{dropdown-default-textbox.Dl8Jv2bS.js.map → dropdown-default-textbox.BpvVMlcX.js.map} +1 -1
  85. package/dist/chunks/{dropdown-tag.D8hXRrMj.js → dropdown-tag.B5QFkTl_.js} +6 -6
  86. package/dist/chunks/{dropdown-tag.D8hXRrMj.js.map → dropdown-tag.B5QFkTl_.js.map} +1 -1
  87. package/dist/chunks/{dropdown.BWu3fV-K.js → dropdown.BN6DALZa.js} +29 -29
  88. package/dist/chunks/{dropdown.BWu3fV-K.js.map → dropdown.BN6DALZa.js.map} +1 -1
  89. package/dist/chunks/{error-message.qsc0nOWT.js → error-message.X-gxnQcx.js} +2 -2
  90. package/dist/chunks/{error-message.qsc0nOWT.js.map → error-message.X-gxnQcx.js.map} +1 -1
  91. package/dist/chunks/es6.BtaxuP0b.js.map +1 -1
  92. package/dist/chunks/{file-uploader.BNGBBltW.js → file-uploader.CLZ1rPz0.js} +4 -4
  93. package/dist/chunks/{file-uploader.BNGBBltW.js.map → file-uploader.CLZ1rPz0.js.map} +1 -1
  94. package/dist/chunks/{filter-bar.Db-KfD-S.js → filter-bar.zvHeHs9B.js} +277 -279
  95. package/dist/chunks/filter-bar.zvHeHs9B.js.map +1 -0
  96. package/dist/chunks/{fixed-scroller.XaGPUsUO.js → fixed-scroller.BZwgM5Io.js} +2 -2
  97. package/dist/chunks/{fixed-scroller.XaGPUsUO.js.map → fixed-scroller.BZwgM5Io.js.map} +1 -1
  98. package/dist/chunks/{footer-actions.BG8-pOU-.js → footer-actions.X_RokrtM.js} +2 -2
  99. package/dist/chunks/{footer-actions.BG8-pOU-.js.map → footer-actions.X_RokrtM.js.map} +1 -1
  100. package/dist/chunks/{form-layout-title._25l9_Xm.js → form-layout-title.xkALokzl.js} +2 -2
  101. package/dist/chunks/{form-layout-title._25l9_Xm.js.map → form-layout-title.xkALokzl.js.map} +1 -1
  102. package/dist/chunks/get-slot-text.DQlZEsId.js +12 -0
  103. package/dist/chunks/get-slot-text.DQlZEsId.js.map +1 -0
  104. package/dist/chunks/{header.vPx_0dwO.js → header.CUhyy9NL.js} +5 -5
  105. package/dist/chunks/{header.vPx_0dwO.js.map → header.CUhyy9NL.js.map} +1 -1
  106. package/dist/chunks/{i18n.WMYWtwxB.js → i18n.D9azDLPe.js} +14 -1
  107. package/dist/chunks/{i18n.WMYWtwxB.js.map → i18n.D9azDLPe.js.map} +1 -1
  108. package/dist/chunks/{info-icon-with-popover.CieLDo3g.js → info-icon-with-popover.NzQciGvf.js} +3 -3
  109. package/dist/chunks/{info-icon-with-popover.CieLDo3g.js.map → info-icon-with-popover.NzQciGvf.js.map} +1 -1
  110. package/dist/chunks/{input-field-password.CS7rxMCK.js → input-field-password.B4HgGilX.js} +4 -4
  111. package/dist/chunks/{input-field-password.CS7rxMCK.js.map → input-field-password.B4HgGilX.js.map} +1 -1
  112. package/dist/chunks/input-field-phone-number.CpY2BLfO.js +3107 -0
  113. package/dist/chunks/input-field-phone-number.CpY2BLfO.js.map +1 -0
  114. package/dist/chunks/{input-field.Cx4fMIb7.js → input-field.DQKiMtZo.js} +30 -25
  115. package/dist/chunks/input-field.DQKiMtZo.js.map +1 -0
  116. package/dist/chunks/{inspector.types.DQQN1eqF.js → inspector.types.C-Qos3dV.js} +2 -2
  117. package/dist/chunks/{inspector.types.DQQN1eqF.js.map → inspector.types.C-Qos3dV.js.map} +1 -1
  118. package/dist/chunks/{keyboard-navigation.C3QMVRKY.js → keyboard-navigation.CqgGzfZQ.js} +2 -1
  119. package/dist/chunks/{keyboard-navigation.C3QMVRKY.js.map → keyboard-navigation.CqgGzfZQ.js.map} +1 -1
  120. package/dist/chunks/{listbox-option-tag.zYn_kSFz.js → listbox-option-tag.CFNRfAtf.js} +2 -2
  121. package/dist/chunks/{listbox-option-tag.zYn_kSFz.js.map → listbox-option-tag.CFNRfAtf.js.map} +1 -1
  122. package/dist/chunks/{menu.CihQsfY6.js → menu.DIKy_Pyt.js} +3 -3
  123. package/dist/chunks/{menu.CihQsfY6.js.map → menu.DIKy_Pyt.js.map} +1 -1
  124. package/dist/chunks/{modal-fullscreen.D39_mhdY.js → modal-fullscreen.Fqcd3B6-.js} +4 -4
  125. package/dist/chunks/{modal-fullscreen.D39_mhdY.js.map → modal-fullscreen.Fqcd3B6-.js.map} +1 -1
  126. package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.BHd_MGgH.js → modal.vue_vue_type_script_setup_true_lang.PEGJemgc.js} +5 -5
  127. package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.BHd_MGgH.js.map → modal.vue_vue_type_script_setup_true_lang.PEGJemgc.js.map} +1 -1
  128. package/dist/chunks/{pagination.CbzgV2xT.js → pagination.DogGVwa2.js} +3 -3
  129. package/dist/chunks/{pagination.CbzgV2xT.js.map → pagination.DogGVwa2.js.map} +1 -1
  130. package/dist/chunks/{payment-method.2IeC7f4x.js → payment-method.NguqkTwG.js} +2 -2
  131. package/dist/chunks/{payment-method.2IeC7f4x.js.map → payment-method.NguqkTwG.js.map} +1 -1
  132. package/dist/chunks/{popover.Bzb-pzfB.js → popover.NEP6wuPa.js} +2 -2
  133. package/dist/chunks/{popover.Bzb-pzfB.js.map → popover.NEP6wuPa.js.map} +1 -1
  134. package/dist/chunks/{promo-banner.BjLfDhBq.js → promo-banner.DTH4CZ_2.js} +2 -2
  135. package/dist/chunks/{promo-banner.BjLfDhBq.js.map → promo-banner.DTH4CZ_2.js.map} +1 -1
  136. package/dist/chunks/{radio-group.DkfCMh_u.js → radio-group.BLHcC22p.js} +5 -5
  137. package/dist/chunks/{radio-group.DkfCMh_u.js.map → radio-group.BLHcC22p.js.map} +1 -1
  138. package/dist/chunks/{search-bar.BTu1j3Ll.js → search-bar.CatznIEM.js} +4 -4
  139. package/dist/chunks/{search-bar.BTu1j3Ll.js.map → search-bar.CatznIEM.js.map} +1 -1
  140. package/dist/chunks/{secondary-nav.Bqvz5hjH.js → secondary-nav.LIzkbQY1.js} +3 -3
  141. package/dist/chunks/{secondary-nav.Bqvz5hjH.js.map → secondary-nav.LIzkbQY1.js.map} +1 -1
  142. package/dist/chunks/{segmented-control.BIwBQ8i3.js → segmented-control.DOxyrdMz.js} +33 -32
  143. package/dist/chunks/segmented-control.DOxyrdMz.js.map +1 -0
  144. package/dist/chunks/segmented-control.types.BHRLV8KU.js.map +1 -1
  145. package/dist/chunks/{selection-card-group.BHYvAL-T.js → selection-card-group.BKatprYB.js} +11 -11
  146. package/dist/chunks/{selection-card-group.BHYvAL-T.js.map → selection-card-group.BKatprYB.js.map} +1 -1
  147. package/dist/chunks/{sidepanel.Bk35AAFF.js → sidepanel.Be3uyOVd.js} +4 -4
  148. package/dist/chunks/{sidepanel.Bk35AAFF.js.map → sidepanel.Be3uyOVd.js.map} +1 -1
  149. package/dist/chunks/status.types.Bdv2zuuh.js +44 -0
  150. package/dist/chunks/{status.types.DsYAH3RM.js.map → status.types.Bdv2zuuh.js.map} +1 -1
  151. package/dist/chunks/{step.DAB8h_4u.js → step.DsfmsUU6.js} +3 -3
  152. package/dist/chunks/{step.DAB8h_4u.js.map → step.DsfmsUU6.js.map} +1 -1
  153. package/dist/chunks/{structured-list-item.wpnBS69h.js → structured-list-item.BwgEJywb.js} +3 -3
  154. package/dist/chunks/{structured-list-item.wpnBS69h.js.map → structured-list-item.BwgEJywb.js.map} +1 -1
  155. package/dist/chunks/{summary-grid-item-custom.C8AD1NAh.js → summary-grid-item-custom.Vx_YxH7S.js} +97 -92
  156. package/dist/chunks/summary-grid-item-custom.Vx_YxH7S.js.map +1 -0
  157. package/dist/chunks/summary-grid.keys.CxTf_FOc.js +6 -0
  158. package/dist/chunks/summary-grid.keys.CxTf_FOc.js.map +1 -0
  159. package/dist/chunks/{tabs.B5-PZCxc.js → tabs.CR2tWuz3.js} +2 -2
  160. package/dist/chunks/{tabs.B5-PZCxc.js.map → tabs.CR2tWuz3.js.map} +1 -1
  161. package/dist/chunks/{tag.BuUbvgok.js → tag.Chr4TP7d.js} +2 -2
  162. package/dist/chunks/{tag.BuUbvgok.js.map → tag.Chr4TP7d.js.map} +1 -1
  163. package/dist/chunks/{textarea.C0k8by9A.js → textarea.BLhKC_iw.js} +3 -3
  164. package/dist/chunks/{textarea.C0k8by9A.js.map → textarea.BLhKC_iw.js.map} +1 -1
  165. package/dist/chunks/{timeline-item.CYw68jQr.js → timeline-item.BVm2YscV.js} +7 -7
  166. package/dist/chunks/{timeline-item.CYw68jQr.js.map → timeline-item.BVm2YscV.js.map} +1 -1
  167. package/dist/chunks/{toast.CVy2sf_5.js → toast.A5f1_NqV.js} +2 -2
  168. package/dist/chunks/{toast.CVy2sf_5.js.map → toast.A5f1_NqV.js.map} +1 -1
  169. package/dist/chunks/{toggle.Dl82VpiQ.js → toggle.BmwlaQon.js} +2 -2
  170. package/dist/chunks/{toggle.Dl82VpiQ.js.map → toggle.BmwlaQon.js.map} +1 -1
  171. package/dist/chunks/truncate.BfIl_-71.js +8 -0
  172. package/dist/chunks/truncate.BfIl_-71.js.map +1 -0
  173. package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.CjlNffBI.js → tutorial.vue_vue_type_script_setup_true_lang.D4ifiOTn.js} +5 -5
  174. package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.CjlNffBI.js.map → tutorial.vue_vue_type_script_setup_true_lang.D4ifiOTn.js.map} +1 -1
  175. package/dist/chunks/{use-cached-selected-values.YAg3m-Af.js → use-cached-selected-values.CoelUIEy.js} +5 -5
  176. package/dist/chunks/{use-cached-selected-values.YAg3m-Af.js.map → use-cached-selected-values.CoelUIEy.js.map} +1 -1
  177. package/dist/chunks/use-country-items.BMhCqIWd.js +30 -0
  178. package/dist/chunks/{use-country-items.DJn6gU4P.js.map → use-country-items.BMhCqIWd.js.map} +1 -1
  179. package/dist/chunks/{country.types.CLjbulKL.js → use-country-phon-code.DVgE19zT.js} +497 -761
  180. package/dist/chunks/use-country-phon-code.DVgE19zT.js.map +1 -0
  181. package/dist/code-snippet.js +1 -1
  182. package/dist/country.js +7 -6
  183. package/dist/country.js.map +1 -1
  184. package/dist/currency.js +1 -1
  185. package/dist/dashboard-template.js +1 -1
  186. package/dist/dashed-underline.js +1 -1
  187. package/dist/data-grid-template.js +1 -1
  188. package/dist/data-grid.js +1 -1
  189. package/dist/date-picker.js +2 -2
  190. package/dist/date-range-picker.js +2 -2
  191. package/dist/date.js +1 -1
  192. package/dist/dropdown.js +4 -4
  193. package/dist/file-uploader.js +1 -1
  194. package/dist/filter-bar.js +1 -1
  195. package/dist/form-layout.js +1 -1
  196. package/dist/header.js +1 -1
  197. package/dist/index.js +196 -191
  198. package/dist/index.js.map +1 -1
  199. package/dist/input-field-password.js +1 -1
  200. package/dist/input-field-phone-number.js +5 -0
  201. package/dist/input-field-phone-number.js.map +1 -0
  202. package/dist/input-field.js +1 -1
  203. package/dist/inspector.js +1 -1
  204. package/dist/internal.js +11 -11
  205. package/dist/menu.js +1 -1
  206. package/dist/modal-fullscreen.js +1 -1
  207. package/dist/modal.js +2 -2
  208. package/dist/pagination.js +1 -1
  209. package/dist/payment-method.js +1 -1
  210. package/dist/popover.js +1 -1
  211. package/dist/promo-banner.js +1 -1
  212. package/dist/radio-group.js +1 -1
  213. package/dist/search-bar.js +2 -2
  214. package/dist/secondary-nav.js +1 -1
  215. package/dist/segmented-control.js +1 -1
  216. package/dist/selection-card.js +1 -1
  217. package/dist/sidepanel.js +1 -1
  218. package/dist/status.js +1 -1
  219. package/dist/stepper.js +1 -1
  220. package/dist/structured-list.js +1 -1
  221. package/dist/styles/bento-dark.css +15 -1
  222. package/dist/styles/bento-light.css +15 -1
  223. package/dist/styles/bento.css +15 -1
  224. package/dist/styles/legacy.css +14 -0
  225. package/dist/styles/styleguide.css +15 -1
  226. package/dist/summary-grid.js +1 -1
  227. package/dist/tabs.js +1 -1
  228. package/dist/tag.js +1 -1
  229. package/dist/textarea.js +1 -1
  230. package/dist/timeline.js +1 -1
  231. package/dist/toast.js +1 -1
  232. package/dist/toggle.js +1 -1
  233. package/dist/tutorial.js +1 -1
  234. package/dist/web-types.json +1 -1
  235. package/package.json +4 -3
  236. package/dist/chunks/country.types.CLjbulKL.js.map +0 -1
  237. package/dist/chunks/data-grid.V4b5UdXZ.js.map +0 -1
  238. package/dist/chunks/date-range-picker.CmxXWnBc.js +0 -1042
  239. package/dist/chunks/date-range-picker.CmxXWnBc.js.map +0 -1
  240. package/dist/chunks/filter-bar.Db-KfD-S.js.map +0 -1
  241. package/dist/chunks/get-slot-text.D5WBGjic.js +0 -9
  242. package/dist/chunks/get-slot-text.D5WBGjic.js.map +0 -1
  243. package/dist/chunks/input-field.Cx4fMIb7.js.map +0 -1
  244. package/dist/chunks/segmented-control.BIwBQ8i3.js.map +0 -1
  245. package/dist/chunks/status.types.DsYAH3RM.js +0 -45
  246. package/dist/chunks/summary-grid-item-custom.C8AD1NAh.js.map +0 -1
  247. package/dist/chunks/summary-grid.keys.BBbFrFGF.js +0 -5
  248. package/dist/chunks/summary-grid.keys.BBbFrFGF.js.map +0 -1
  249. package/dist/chunks/use-country-items.DJn6gU4P.js +0 -29
@@ -0,0 +1,1086 @@
1
+ import { reactive as De, defineComponent as Ge, computed as I, ref as O, onMounted as He, toRaw as ye, resolveComponent as R, createElementBlock as Te, openBlock as w, createElementVNode as B, createCommentVNode as M, renderSlot as Me, createBlock as N, createVNode as $, withCtx as P, createTextVNode as X, normalizeClass as be, toRef as ge, watch as ve, resolveDirective as ot, withDirectives as st, withKeys as lt, toDisplayString as it, createSlots as dt } from "vue";
2
+ import { B as ut } from "./divider.qUOSAbU6.js";
3
+ import { B as mt } from "./popover.NEP6wuPa.js";
4
+ import { B as We, d as ct } from "./typography.DN5eC5ch.js";
5
+ import { D as Dt } from "./dropdown-default-textbox.BpvVMlcX.js";
6
+ import { r as x, t as oe, g as Ie } from "./get-date-locale.BN8xEjY0.js";
7
+ import { g as le } from "./generate-uid.NJ8tVoha.js";
8
+ import { u as Re } from "./i18n.D9azDLPe.js";
9
+ import { t as ke, f as ie } from "./date.Cvfyq77s.js";
10
+ import { i as Z, s as re, c as Ce, d as pt, e as Ae, f as ft, g as _e, h as gt, j as vt, a as Q, u as yt } from "./calendar.BdLQOioy.js";
11
+ import { f as Ue, v as Tt, D as k } from "./date-input.BqBdAO1E.js";
12
+ import { u as bt } from "./use-form-layout-loading.D3lALhtC.js";
13
+ import { B as It } from "./directive.O3yEdalv.js";
14
+ import "./events.FNmSWp_P.js";
15
+ import { B as Rt } from "./input-field.DQKiMtZo.js";
16
+ import { B as kt } from "./dropdown.BN6DALZa.js";
17
+ import { B as St } from "./segmented-control.DOxyrdMz.js";
18
+ import { d as me } from "./debounce.DUTu11PS.js";
19
+ import { u as Et } from "./use-has-slot.B7eQSabc.js";
20
+ import { e as W } from "./index.DPafeRJa.js";
21
+ import { e as Fe } from "./index.CrhTVr5J.js";
22
+ import { _ as je } from "./_plugin-vue_export-helper.CHgC5LLL.js";
23
+ import { F as ht, E as wt } from "./error-message.X-gxnQcx.js";
24
+ import { B as Ot, c as Mt } from "./button-actions.ncthaz2m.js";
25
+ import "../assets/date-range-picker.css";
26
+ function Ct(e, a) {
27
+ x(2, arguments);
28
+ var l = oe(e), d = oe(a);
29
+ return l.getTime() === d.getTime();
30
+ }
31
+ function Be(e) {
32
+ x(1, arguments);
33
+ var a = oe(e);
34
+ return a.setMilliseconds(0), a;
35
+ }
36
+ function Pe(e, a) {
37
+ x(2, arguments);
38
+ var l = Be(e), d = Be(a);
39
+ return l.getTime() === d.getTime();
40
+ }
41
+ function At(e) {
42
+ return x(1, arguments), Z(e, Date.now());
43
+ }
44
+ function _t(e, a) {
45
+ x(2, arguments);
46
+ var l = oe(e), d = ke(a);
47
+ return l.setHours(d), l;
48
+ }
49
+ function Ut(e, a) {
50
+ x(2, arguments);
51
+ var l = oe(e), d = ke(a);
52
+ return l.setMinutes(d), l;
53
+ }
54
+ function Ft(e, a) {
55
+ x(2, arguments);
56
+ var l = oe(e), d = ke(a);
57
+ return l.setSeconds(d), l;
58
+ }
59
+ function pe(e) {
60
+ if (e == null)
61
+ return re(/* @__PURE__ */ new Date());
62
+ const [a, l, d] = e.split("-").map((i) => parseInt(i, 10));
63
+ return new Date(a, l - 1, d);
64
+ }
65
+ const Bt = ({
66
+ firstDayOfWeek: e,
67
+ min: a,
68
+ max: l
69
+ }) => ({ getGranularCalendarLimits: (i) => {
70
+ let p = re(a), n = W(l);
71
+ if ((i == null ? void 0 : i.type) === "weekly") {
72
+ if (i.earliest)
73
+ p = re(i.earliest);
74
+ else {
75
+ const u = Ce(p, { weekStartsOn: e });
76
+ Z(p, u) || (p = re(pt(Ae(p, { weekStartsOn: e }), 1)));
77
+ }
78
+ if (i.latest)
79
+ n = W(i.latest);
80
+ else {
81
+ const u = Ae(n, { weekStartsOn: e });
82
+ Z(n, u) || (n = W(ft(Ce(n, { weekStartsOn: e }), 1)));
83
+ }
84
+ }
85
+ if ((i == null ? void 0 : i.type) === "monthly") {
86
+ if (i.earliest)
87
+ p = re(i.earliest);
88
+ else {
89
+ const u = _e(p);
90
+ Z(p, u) || (p = _e(gt(p, 1)));
91
+ }
92
+ if (i.latest)
93
+ n = W(i.latest);
94
+ else {
95
+ const u = Fe(n);
96
+ Z(n, u) || (n = Fe(vt(n, 1)));
97
+ }
98
+ }
99
+ return { min: p, max: n };
100
+ } }), Pt = () => {
101
+ const e = De({
102
+ daily: null,
103
+ weekly: null,
104
+ monthly: null
105
+ });
106
+ return {
107
+ savedRanges: e,
108
+ saveRange: (d, i) => {
109
+ e[d] = i;
110
+ },
111
+ resetSavedRanges: () => {
112
+ e.daily = null, e.weekly = null, e.monthly = null;
113
+ }
114
+ };
115
+ };
116
+ var g = /* @__PURE__ */ ((e) => (e.CUSTOM_RANGE = "custom-range", e.INPUT = "input", e.ERROR = "error", e.FORM_DATE = "form-date", e.START_DATE_SELECTED = "start-date-selected", e))(g || {});
117
+ const Nt = /[\d]/, $t = /^\d{2}$/, Lt = /^\d{2}:\d{2}$/, Vt = (e) => {
118
+ const { selectionStart: a } = e.target, l = Nt.test(e.key) || e.key === "Backspace", d = [1, 2, 4, 5].includes(a) && e.key === ":";
119
+ !l && !d && e.preventDefault();
120
+ }, Ne = (e) => {
121
+ if (!e)
122
+ return e;
123
+ let a = e;
124
+ if (a.length === 1 && parseInt(e, 10) > 2)
125
+ return `0${a}:`;
126
+ const [l, d] = a.slice(-2);
127
+ return [2, 5].includes(a.length) && d === ":" && (a = `${a.slice(0, a.length - 2)}0${l}`), ($t.test(a) || Lt.test(a)) && (a += ":"), a;
128
+ }, $e = {
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
+ }, Le = 300, Ve = "customRange", Ye = "daily", Yt = Ge({
159
+ i18n: { messages: $e },
160
+ name: "date-range-picker-calendar",
161
+ components: {
162
+ BentoDropdown: kt,
163
+ BentoInputField: Rt,
164
+ BentoSegmentedControl: St,
165
+ BentoTypography: We,
166
+ Calendar: Q
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: Q.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: Q.props.isDateDisabled,
196
+ /**
197
+ * Set a maximum number of dates to be selectable by the range.
198
+ */
199
+ maxRange: Q.props.maxRange,
200
+ /**
201
+ * Sets a minimum limit for selectable dates - dates before `min` will not be selectable
202
+ */
203
+ min: Q.props.min,
204
+ /**
205
+ * Sets a maximum limit for selectable dates - dates after `max` will not be selectable
206
+ */
207
+ max: Q.props.max,
208
+ /**
209
+ * Number of months rendered on pane
210
+ */
211
+ numberOfMonths: Q.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
+ g.CUSTOM_RANGE,
234
+ g.INPUT,
235
+ g.ERROR,
236
+ g.FORM_DATE,
237
+ g.START_DATE_SELECTED
238
+ ],
239
+ setup(e, { emit: a, slots: l }) {
240
+ var Ee, he, we, Oe;
241
+ const { locale: d, t: i } = Re({ messages: $e }), p = Ie(), n = De({
242
+ startDate: (Ee = e.value) == null ? void 0 : Ee.startDate,
243
+ endDate: (he = e.value) == null ? void 0 : he.endDate,
244
+ range: (we = e.value) == null ? void 0 : we.range,
245
+ ...e.granularities ? {
246
+ granularity: ((Oe = e.value) == null ? void 0 : Oe.granularity) || Ye
247
+ } : {}
248
+ });
249
+ function u(t) {
250
+ return new Date(
251
+ t.getUTCFullYear(),
252
+ t.getUTCMonth(),
253
+ t.getUTCDate(),
254
+ t.getUTCHours(),
255
+ t.getUTCMinutes(),
256
+ t.getUTCSeconds()
257
+ );
258
+ }
259
+ const v = I(() => {
260
+ var t, r;
261
+ return ((r = (t = e == null ? void 0 : e.quickSelectRanges) == null ? void 0 : t.find(({ data: o }) => {
262
+ if (!o.endDate)
263
+ return Ct(
264
+ u(o.startDate),
265
+ u(n.startDate)
266
+ ) && At(n.endDate);
267
+ if (e.allowTimeInput)
268
+ return Pe(
269
+ u(o.startDate),
270
+ u(n.startDate)
271
+ ) && Pe(u(o.endDate), u(n.endDate));
272
+ if (o.endDate)
273
+ return Z(o.startDate, n.startDate) && Z(o.endDate, n.endDate);
274
+ })) == null ? void 0 : r.value) ?? Ve;
275
+ }), S = I(() => ({
276
+ "b-date-range-picker-calendar__form-input-wrapper": e.allowTimeInput
277
+ })), L = I(() => [
278
+ { label: i("customRange"), value: Ve },
279
+ ...T.value ? T.value : []
280
+ ]), f = I(
281
+ () => {
282
+ var t;
283
+ return ((t = e.granularities) == null ? void 0 : t.find(({ type: r }) => r === n.granularity)) || null;
284
+ }
285
+ ), V = I(
286
+ () => {
287
+ var t;
288
+ return ((t = e.granularities) == null ? void 0 : t.map(({ type: r, disabled: o }) => ({
289
+ label: i(r),
290
+ value: r,
291
+ disabled: o
292
+ }))) ?? [];
293
+ }
294
+ ), T = I(
295
+ () => e.quickSelectRanges && e.quickSelectRanges.map((t) => ({
296
+ ...t,
297
+ data: {
298
+ ...t.data,
299
+ // Adding timeDifference to calculate an up-to-date endDate on range selection
300
+ timeDifference: t.data.endDate ? void 0 : new Date(Date.now()).getTime() - t.data.startDate.getTime()
301
+ }
302
+ }))
303
+ ), { getGranularCalendarLimits: Y } = Bt(e), c = I(
304
+ () => e.granularities ? Y(f.value) : { min: re(e.min), max: W(e.max) }
305
+ ), {
306
+ adjustDateForMonthly: j,
307
+ adjustDateForWeekly: C,
308
+ adjustStartDateInputForWeekly: y,
309
+ adjustEndDateInputForWeekly: se,
310
+ adjustStartDateInputForMonthly: K,
311
+ adjustEndDateInputForMonthly: fe
312
+ } = yt(e.firstDayOfWeek), { savedRanges: E, saveRange: de, resetSavedRanges: A } = Pt(), b = (t) => t ? ie(t, k.NUMERIC_DATE_YEAR_FIRST, {
313
+ locale: p[d.value.substring(0, 2)] || p.enUS
314
+ }) : "", ee = (t) => t ? ie(t, k.HOUR_MINUTE_SECONDS, {
315
+ locale: p[d.value.substring(0, 2)] || p.enUS
316
+ }) : "", G = O(!1), H = O(!1), q = O(!1), z = O(!1), s = De({
317
+ startDate: e.dateFormData.startDate,
318
+ endDate: e.dateFormData.endDate,
319
+ startTime: e.dateFormData.startTime,
320
+ endTime: e.dateFormData.endTime
321
+ }), ue = (t) => /^(?:[01]\d|2[01234]):(?:[012345]\d):(?:[012345]\d)$/.test(t), _ = (t, r) => {
322
+ if (!r || !ue(r))
323
+ return t;
324
+ let o = new Date(t);
325
+ const [m, h, J] = r.split(":");
326
+ return o = _t(o, parseInt(m, 10)), o = Ut(o, parseInt(h, 10)), o = Ft(o, parseInt(J, 10)), o;
327
+ }, Se = (t) => {
328
+ n.startDate = _(t.startDate, s.startTime), n.endDate = _(t.endDate, s.endTime), e.granularities && A(), a(g.INPUT, {
329
+ ...n,
330
+ range: v.value
331
+ });
332
+ }, D = (t) => {
333
+ const r = (m) => e.min && m <= e.min || e.max && m >= e.max ? !1 : e.isDateDisabled ? !e.isDateDisabled(m) : !0;
334
+ return /^\d{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])$/.test(t) && r(new Date(t));
335
+ };
336
+ He(() => {
337
+ e.dateFormData.startDate && !D(e.dateFormData.startDate) ? G.value = !0 : (G.value = !1, q.value = !1), e.dateFormData.endDate && !D(e.dateFormData.endDate) ? H.value = !0 : (H.value = !1, z.value = !1);
338
+ });
339
+ const U = (t) => {
340
+ var r;
341
+ s.startDate = b(t), s.startTime ? q.value && (s.startTime = (r = e.dateFormData) == null ? void 0 : r.startTime) : s.startTime = ee(t), G.value = !1, q.value = !1, a(g.START_DATE_SELECTED, t);
342
+ }, te = (t) => {
343
+ var r;
344
+ s.endDate = b(t), s.endTime ? z.value && (s.endTime = (r = e.dateFormData) == null ? void 0 : r.endTime) : s.endTime = ee(W(t)), H.value = !1, z.value = !1;
345
+ }, ae = (t) => {
346
+ const r = e.value[t];
347
+ if (r)
348
+ return r;
349
+ if (e.dateFormData[t] && D(e.dateFormData[t]))
350
+ return new Date(e.dateFormData[t]);
351
+ }, qe = me((t) => {
352
+ var r;
353
+ if (D(t)) {
354
+ let o = t;
355
+ switch (G.value = !1, (r = f.value) == null ? void 0 : r.type) {
356
+ case "weekly":
357
+ o = y(
358
+ t,
359
+ b,
360
+ c.value.min,
361
+ c.value.max
362
+ ), s.startDate = o;
363
+ break;
364
+ case "monthly":
365
+ o = K(
366
+ t,
367
+ b,
368
+ c.value.min,
369
+ c.value.max
370
+ ), s.startDate = o;
371
+ break;
372
+ }
373
+ const m = pe(o);
374
+ n.startDate = _(m, s.startTime);
375
+ const h = ae("endDate");
376
+ a(g.FORM_DATE, {
377
+ startDate: m,
378
+ endDate: h
379
+ }), a(g.INPUT, {
380
+ ...n,
381
+ range: v.value
382
+ });
383
+ } else
384
+ G.value = !0, a(g.ERROR, { ...s });
385
+ }, Le), ze = (t) => {
386
+ s.startDate = Ue(t), qe(s.startDate);
387
+ }, Je = me((t) => {
388
+ var r;
389
+ if (D(t)) {
390
+ let o = t;
391
+ switch (H.value = !1, (r = f.value) == null ? void 0 : r.type) {
392
+ case "weekly":
393
+ o = se(
394
+ t,
395
+ b,
396
+ c.value.min,
397
+ c.value.max
398
+ ), s.endDate = o;
399
+ break;
400
+ case "monthly":
401
+ o = fe(
402
+ t,
403
+ b,
404
+ c.value.min,
405
+ c.value.max
406
+ ), s.endDate = o;
407
+ break;
408
+ }
409
+ const m = pe(o);
410
+ n.endDate = _(m, s.endTime);
411
+ const h = ae("startDate");
412
+ a(g.FORM_DATE, {
413
+ startDate: h,
414
+ endDate: m
415
+ }), a(g.INPUT, {
416
+ ...n,
417
+ range: v.value
418
+ });
419
+ } else
420
+ H.value = !0, a(g.ERROR, { ...s });
421
+ }, Le), Qe = (t) => {
422
+ s.endDate = Ue(t), Je(s.endDate);
423
+ }, Xe = (t) => {
424
+ Tt(t);
425
+ }, Ze = me((t) => {
426
+ if (ue(t)) {
427
+ q.value = !1, n.startDate = _(n.startDate, t);
428
+ const r = ae("endDate");
429
+ a(g.FORM_DATE, {
430
+ startDate: new Date(n.startDate),
431
+ endDate: r,
432
+ startTime: t,
433
+ endTime: e.dateFormData.endTime
434
+ }), a(g.INPUT, {
435
+ ...n,
436
+ range: v.value
437
+ });
438
+ } else
439
+ q.value = !0, a(g.ERROR, { ...s });
440
+ }), xe = me((t) => {
441
+ if (ue(t)) {
442
+ z.value = !1, n.endDate = _(n.endDate, t);
443
+ const r = ae("startDate");
444
+ n.startDate = _(new Date(r), e.dateFormData.startTime), a(g.FORM_DATE, {
445
+ startDate: _(new Date(r), e.dateFormData.startTime),
446
+ endDate: new Date(n.endDate),
447
+ startTime: e.dateFormData.startTime,
448
+ endTime: t
449
+ }), a(g.INPUT, {
450
+ ...n,
451
+ range: v.value
452
+ });
453
+ } else
454
+ z.value = !0, a(g.ERROR, { ...s });
455
+ }), et = (t) => {
456
+ s.startTime = Ne(t), Ze(s.startTime);
457
+ }, tt = (t) => {
458
+ s.endTime = Ne(t), xe(s.endTime);
459
+ }, at = (t) => {
460
+ Vt(t);
461
+ }, ne = (t, r, o, m) => {
462
+ n.startDate = t, n.endDate = r, o && (n.granularity = o), m && (n.range = m);
463
+ }, nt = (t) => {
464
+ var o;
465
+ const r = (o = T.value) == null ? void 0 : o.find(({ value: m }) => m === t);
466
+ if (r) {
467
+ A();
468
+ const m = r.data, h = m.endDate || new Date(Date.now()), J = m.timeDifference ? new Date(h.getTime() - m.timeDifference) : m.startDate;
469
+ s.endDate = b(h), s.startDate = b(J), ne(J, h, null, t), e.granularities && (n.granularity = m.granularity || Ye), s.startTime || (s.startTime = ee(W(J))), s.endTime || (s.endTime = ee(W(h))), n.startDate = J, n.endDate = h, a(g.CUSTOM_RANGE, {
470
+ ...r.data,
471
+ startDate: J,
472
+ endDate: h,
473
+ range: r.value
474
+ });
475
+ }
476
+ }, rt = (t) => {
477
+ const r = n.granularity;
478
+ if (n.granularity = t, r && de(r, structuredClone(ye(n))), n.startDate && n.endDate) {
479
+ switch (t) {
480
+ case "monthly": {
481
+ if (E.monthly) {
482
+ ne(E.monthly.startDate, E.monthly.endDate, t);
483
+ break;
484
+ }
485
+ const { startDate: o, endDate: m } = j(
486
+ n.startDate,
487
+ n.endDate,
488
+ c.value.min,
489
+ c.value.max
490
+ );
491
+ ne(o, m, t);
492
+ break;
493
+ }
494
+ case "weekly": {
495
+ if (E.weekly) {
496
+ ne(E.weekly.startDate, E.weekly.endDate, t);
497
+ break;
498
+ }
499
+ const { startDate: o, endDate: m } = C(
500
+ n.startDate,
501
+ n.endDate,
502
+ c.value.min,
503
+ c.value.max
504
+ );
505
+ ne(o, m, t);
506
+ break;
507
+ }
508
+ case "daily":
509
+ E.daily && ne(E.daily.startDate, E.daily.endDate, t);
510
+ break;
511
+ }
512
+ s.startDate = b(n.startDate), s.endDate = b(n.endDate), a(g.INPUT, {
513
+ ...n,
514
+ range: v.value
515
+ });
516
+ }
517
+ };
518
+ return {
519
+ // Values
520
+ internalRangeDate: n,
521
+ dateTextInput: s,
522
+ endDateError: H,
523
+ endTimeError: z,
524
+ granularityItems: V,
525
+ selectedGranularity: f,
526
+ computedMinMax: c,
527
+ selectedRangeSelectorValue: v,
528
+ startDateError: G,
529
+ startTimeError: q,
530
+ adjustedQuickSelectRanges: T,
531
+ quickSelectRangeDefaultItems: L,
532
+ formInputWrapperConditionalClasses: S,
533
+ // Methods
534
+ hasSlot: Et(l),
535
+ t: i,
536
+ // Events
537
+ onDateInput: Se,
538
+ onDateInputKeyDown: Xe,
539
+ onEndDateInput: Qe,
540
+ onEndDateSelected: te,
541
+ onEndTimeInput: tt,
542
+ onGranularityInput: rt,
543
+ onRangeSelectorInput: nt,
544
+ onStartDateInput: ze,
545
+ onStartDateSelected: U,
546
+ onStartTimeInput: et,
547
+ onTimeInputKeyDown: at
548
+ };
549
+ }
550
+ }), Kt = { class: "b-date-range-picker-calendar" }, Gt = { class: "b-date-range-picker-calendar__form-container" }, Ht = { class: "b-date-range-picker-calendar__form" }, Wt = { key: 0 }, jt = { class: "b-date-range-picker-calendar__calendars-container" };
551
+ function qt(e, a, l, d, i, p) {
552
+ const n = R("bento-dropdown"), u = R("bento-segmented-control"), v = R("bento-typography"), S = R("bento-input-field"), L = R("calendar");
553
+ return w(), Te("div", Kt, [
554
+ B("div", Gt, [
555
+ B("div", Ht, [
556
+ e.hasSlot("title") ? Me(e.$slots, "title", { key: 0 }, void 0, !0) : M("", !0),
557
+ e.adjustedQuickSelectRanges ? (w(), N(n, {
558
+ key: 1,
559
+ "aria-label": e.t("customRange"),
560
+ items: e.quickSelectRangeDefaultItems,
561
+ value: e.selectedRangeSelectorValue,
562
+ onInput: e.onRangeSelectorInput
563
+ }, null, 8, ["aria-label", "items", "value", "onInput"])) : M("", !0),
564
+ e.granularities ? (w(), N(u, {
565
+ key: 2,
566
+ items: e.granularityItems,
567
+ "model-value": e.internalRangeDate.granularity,
568
+ "full-width": "",
569
+ "onUpdate:modelValue": e.onGranularityInput
570
+ }, null, 8, ["items", "model-value", "onUpdate:modelValue"])) : M("", !0),
571
+ B("div", null, [
572
+ $(v, {
573
+ stronger: "",
574
+ el: "span",
575
+ class: "b-date-range-picker-calendar__label"
576
+ }, {
577
+ default: P(() => a[0] || (a[0] = [
578
+ X(" From ")
579
+ ])),
580
+ _: 1
581
+ }),
582
+ B("div", {
583
+ class: be(e.formInputWrapperConditionalClasses)
584
+ }, [
585
+ $(S, {
586
+ "aria-label": e.t("dateFrom"),
587
+ value: e.dateTextInput.startDate,
588
+ error: e.startDateError,
589
+ class: "b-date-range-picker-calendar__form-input",
590
+ onInput: e.onStartDateInput,
591
+ onKeydown: e.onDateInputKeyDown
592
+ }, {
593
+ description: P(() => a[1] || (a[1] = [
594
+ X("YYYY-MM-DD")
595
+ ])),
596
+ _: 1
597
+ }, 8, ["aria-label", "value", "error", "onInput", "onKeydown"]),
598
+ e.allowTimeInput ? (w(), N(S, {
599
+ key: 0,
600
+ "aria-label": e.t("timeFrom"),
601
+ value: e.dateTextInput.startTime,
602
+ error: e.startTimeError,
603
+ class: "b-date-range-picker-calendar__form-input",
604
+ onInput: e.onStartTimeInput,
605
+ onKeydown: e.onTimeInputKeyDown
606
+ }, {
607
+ description: P(() => a[2] || (a[2] = [
608
+ X("HH:MM:SS")
609
+ ])),
610
+ _: 1
611
+ }, 8, ["aria-label", "value", "error", "onInput", "onKeydown"])) : M("", !0)
612
+ ], 2)
613
+ ]),
614
+ B("div", null, [
615
+ $(v, {
616
+ stronger: "",
617
+ el: "span",
618
+ class: "b-date-range-picker-calendar__label"
619
+ }, {
620
+ default: P(() => a[3] || (a[3] = [
621
+ X(" To ")
622
+ ])),
623
+ _: 1
624
+ }),
625
+ B("div", {
626
+ class: be(e.formInputWrapperConditionalClasses)
627
+ }, [
628
+ $(S, {
629
+ class: "b-date-range-picker-calendar__form-input",
630
+ "aria-label": e.t("dateTo"),
631
+ value: e.dateTextInput.endDate,
632
+ error: e.endDateError,
633
+ onInput: e.onEndDateInput,
634
+ onKeydown: e.onDateInputKeyDown
635
+ }, {
636
+ description: P(() => a[4] || (a[4] = [
637
+ X("YYYY-MM-DD")
638
+ ])),
639
+ _: 1
640
+ }, 8, ["aria-label", "value", "error", "onInput", "onKeydown"]),
641
+ e.allowTimeInput ? (w(), N(S, {
642
+ key: 0,
643
+ "aria-label": e.t("timeTo"),
644
+ value: e.dateTextInput.endTime,
645
+ error: e.endTimeError,
646
+ class: "b-date-range-picker-calendar__form-input",
647
+ onInput: e.onEndTimeInput,
648
+ onKeydown: e.onTimeInputKeyDown
649
+ }, {
650
+ description: P(() => a[5] || (a[5] = [
651
+ X("HH:MM:SS")
652
+ ])),
653
+ _: 1
654
+ }, 8, ["aria-label", "value", "error", "onInput", "onKeydown"])) : M("", !0)
655
+ ], 2)
656
+ ])
657
+ ]),
658
+ e.hasSlot("actions") ? (w(), Te("div", Wt, [
659
+ Me(e.$slots, "actions", {}, void 0, !0)
660
+ ])) : M("", !0)
661
+ ]),
662
+ B("div", jt, [
663
+ $(L, {
664
+ value: e.internalRangeDate,
665
+ "first-day-of-week": e.firstDayOfWeek,
666
+ "is-date-disabled": e.isDateDisabled,
667
+ "max-range": e.maxRange,
668
+ min: e.computedMinMax.min,
669
+ max: e.computedMinMax.max,
670
+ "number-of-months": e.numberOfMonths,
671
+ "show-end-date-on-open": e.showEndDateOnOpen,
672
+ granularity: e.selectedGranularity,
673
+ "is-range": "",
674
+ onInput: e.onDateInput,
675
+ onStartDateSelected: e.onStartDateSelected,
676
+ onEndDateSelected: e.onEndDateSelected
677
+ }, null, 8, ["value", "first-day-of-week", "is-date-disabled", "max-range", "min", "max", "number-of-months", "show-end-date-on-open", "granularity", "onInput", "onStartDateSelected", "onEndDateSelected"])
678
+ ])
679
+ ]);
680
+ }
681
+ const F = /* @__PURE__ */ je(Yt, [["render", qt], ["__scopeId", "data-v-1873f648"]]), zt = ({
682
+ datePickerValue: e,
683
+ isDateIncorrect: a,
684
+ quickSelectRanges: l
685
+ }) => {
686
+ var f, V, T, Y;
687
+ const { locale: d, t: i } = Re(), p = Ie(), n = (c) => !!c && !isNaN(c.getTime()), u = (c, j) => n(c) ? ie(c, j, {
688
+ locale: p[d.value.substring(0, 2)] || p.enUS
689
+ }) : void 0, v = De({
690
+ startDate: u((f = e.value) == null ? void 0 : f.startDate, k.NUMERIC_DATE_YEAR_FIRST),
691
+ endDate: u((V = e.value) == null ? void 0 : V.endDate, k.NUMERIC_DATE_YEAR_FIRST),
692
+ startTime: u((T = e.value) == null ? void 0 : T.startDate, k.HOUR_MINUTE_SECONDS),
693
+ endTime: u((Y = e.value) == null ? void 0 : Y.endDate, k.HOUR_MINUTE_SECONDS)
694
+ });
695
+ return {
696
+ // Values
697
+ dateDisplayValue: I(() => {
698
+ var C;
699
+ if (a.value)
700
+ return `${v.startDate || ""} - ${v.endDate || ""}`;
701
+ if (!e.value || !e.value.startDate && !e.value.endDate)
702
+ return i("selectDateRange");
703
+ if ((C = l.value) != null && C.length) {
704
+ const y = l.value.find(({ value: se }) => {
705
+ var K;
706
+ return se === ((K = e.value) == null ? void 0 : K.range);
707
+ });
708
+ if (y)
709
+ return y.label;
710
+ }
711
+ const { startDate: c, endDate: j } = v;
712
+ return `${u(pe(c), k.FULL_DATE_MONTH_FIRST)} - ${u(
713
+ pe(j),
714
+ k.FULL_DATE_MONTH_FIRST
715
+ )}`;
716
+ }),
717
+ textInputDisplayValue: v,
718
+ // Methods
719
+ formatTextInputDisplayValue: () => ""
720
+ };
721
+ };
722
+ var ce = /* @__PURE__ */ ((e) => (e.INPUT = "input", e))(ce || {});
723
+ const Ke = {
724
+ "en-US": {
725
+ apply: "Apply",
726
+ cancel: "Cancel",
727
+ dateRangePicker: "Date range picker {name}",
728
+ provideDateInAFormat: "Provide date in a YYYY-MM-DD format",
729
+ selectDate: "Select a date",
730
+ selectDateRange: "Select a date range",
731
+ selectedDateIsNotAvailable: "Selected date is not available"
732
+ },
733
+ "ja-JP": {
734
+ apply: "適用",
735
+ cancel: "キャンセル",
736
+ selectDate: "日付を選択"
737
+ },
738
+ "pt-BR": {
739
+ apply: "Aplicar",
740
+ cancel: "Cancelar",
741
+ selectDate: "Selecione uma data"
742
+ }
743
+ }, Jt = Ge({
744
+ i18n: { messages: Ke },
745
+ name: "bento-date-range-picker",
746
+ components: {
747
+ BentoButtonActions: Ot,
748
+ BentoDivider: ut,
749
+ BentoTypography: We,
750
+ BentoPopover: mt,
751
+ DateRangePickerCalendar: F,
752
+ DropdownInputDefault: Dt,
753
+ ErrorMessage: wt,
754
+ FieldLabel: ht
755
+ },
756
+ directives: { BentoClickOutsideDirective: It },
757
+ props: {
758
+ /**
759
+ * Allows user to enter time values in the form
760
+ */
761
+ allowTimeInput: { type: Boolean, default: !1 },
762
+ /**
763
+ * Descriptive supporting text visbile underneath the dropdown.
764
+ */
765
+ description: { type: String, default: void 0 },
766
+ /**
767
+ * Disables dropdown functionality.
768
+ */
769
+ disabled: { type: Boolean, default: !1 },
770
+ /**
771
+ * Displays component in an error state with an error message
772
+ */
773
+ errorMessage: { type: String, default: null },
774
+ /**
775
+ * Allows user to set the first day of the week. 0 is sunday, 1 is monday, 6 is saturday
776
+ */
777
+ firstDayOfWeek: F.props.firstDayOfWeek,
778
+ /**
779
+ * A list of available granularities.
780
+ * If present, the date picker will display a segmented control to change granularity.
781
+ */
782
+ granularities: F.props.granularities,
783
+ /**
784
+ * Indicate if a date should be disabled or not
785
+ */
786
+ isDateDisabled: F.props.isDateDisabled,
787
+ /**
788
+ * Text that is displayed as a label above the element.
789
+ */
790
+ label: { type: String, default: void 0 },
791
+ /**
792
+ * Upon opening date range picker, end date's month will be pre-selected.
793
+ */
794
+ showEndDateOnOpen: { type: Boolean, default: !1 },
795
+ /**
796
+ * Highlights the dropdown is optional.
797
+ */
798
+ optional: { type: Boolean, default: !1 },
799
+ /**
800
+ * The Boolean readonly property, when present, makes the element not mutable, meaning the user can not edit the date range picker.
801
+ */
802
+ readonly: { type: Boolean, default: !1 },
803
+ /**
804
+ * Highlights the dropdown is required.
805
+ */
806
+ required: { type: Boolean, default: !1 },
807
+ /**
808
+ * Adds a info icon next to the label to display the passed tooltip message.
809
+ */
810
+ tooltipText: { type: String, default: null },
811
+ /**
812
+ * Enables the range selector.
813
+ * If provided, must be an array that sets the custom range dropdown items. Items are of the structure:
814
+ * `label` - label of custom range item.
815
+ * `value` - a unique key of the custom range item.
816
+ * `data` - an object `{ startDate: Date; endDate: Date }` to set the date picker range to upon selecting.
817
+ */
818
+ quickSelectRanges: {
819
+ type: Array,
820
+ default: void 0
821
+ },
822
+ /**
823
+ * Set a maximum number of dates to be selectable by the range.
824
+ */
825
+ maxRange: F.props.maxRange,
826
+ /**
827
+ * Sets a minimum limit for selectable dates - dates before `min` will not be selectable
828
+ */
829
+ min: F.props.min,
830
+ /**
831
+ * Sets a maximum limit for selectable dates - dates after `max` will not be selectable
832
+ */
833
+ max: F.props.max,
834
+ /**
835
+ * Number of months rendered on pane
836
+ */
837
+ numberOfMonths: F.props.numberOfMonths,
838
+ /**
839
+ * Selected date
840
+ */
841
+ value: F.props.value,
842
+ /**
843
+ * Enables the date picker selection to persist until it is explicitly applied.
844
+ * Displays a set of buttons: Apply and Cancel.
845
+ *
846
+ * @deprecated This will be the default behaviour in v2.0.0.
847
+ */
848
+ hasActions: { type: Boolean, default: !1 }
849
+ },
850
+ emits: [ce.INPUT],
851
+ setup(e, { emit: a }) {
852
+ const { locale: l, t: d } = Re({ messages: Ke }), i = Ie(), p = le("bento-date-range-picker-container"), n = le("bento-date-range-picker-label"), u = le("bento-date-range-picker-description"), v = le("bento-date-range-picker-error"), S = le("bento-date-range-picker-date-error"), L = I(
853
+ () => e.label || d("dateRangePicker", { name: p })
854
+ ), f = O(!1), V = O(null), T = O(!1), { isReadOnly: Y } = bt(ge(e, "readonly"));
855
+ ve(
856
+ () => e.disabled,
857
+ () => {
858
+ e.disabled && T.value && (T.value = !1);
859
+ }
860
+ );
861
+ const c = I(() => e.hasActions ? !b.value && f.value : f.value), j = I(() => ({
862
+ "b-date-range-picker__description--error": !!e.errorMessage || c.value
863
+ })), { dateDisplayValue: C, textInputDisplayValue: y } = zt({
864
+ datePickerValue: ge(e, "value"),
865
+ isDateIncorrect: f,
866
+ quickSelectRanges: ge(e, "quickSelectRanges")
867
+ }), se = I(
868
+ () => `${e.description ? u : ""} ${e.errorMessage ? v : ""} ${f.value ? S : ""}`.trim() || null
869
+ ), K = () => {
870
+ T.value = !1;
871
+ }, fe = () => {
872
+ T.value = !0;
873
+ }, E = O(C.value), de = O(
874
+ // textInputDisplayValue is a reactive object
875
+ structuredClone(ye(y))
876
+ ), A = O(e.value), b = O(!0), ee = I(
877
+ () => e.hasActions ? de.value : y
878
+ ), G = I(
879
+ () => e.hasActions ? E.value : C.value
880
+ );
881
+ He(() => {
882
+ e.hasActions || ct(
883
+ 'BentoDateRangePicker "hasActions" property',
884
+ `Set the BentoDateRangePicker "hasActions" property true which will display the "Apply" and "Cancel" buttons.
885
+ This will be the default behavior in the v2 and "hasActions" will be removed.`,
886
+ "2.0.0"
887
+ );
888
+ }), ve(
889
+ () => e.value,
890
+ () => {
891
+ E.value = C.value, de.value = structuredClone(ye(y));
892
+ }
893
+ );
894
+ const H = I(() => [
895
+ {
896
+ title: d("apply"),
897
+ event: () => {
898
+ a(ce.INPUT, A.value), K(), b.value = !0;
899
+ },
900
+ disabled: b.value
901
+ },
902
+ {
903
+ title: d("cancel"),
904
+ event: K
905
+ }
906
+ ]);
907
+ return ve(A, (D) => {
908
+ if (e.hasActions) {
909
+ b.value = f.value;
910
+ return;
911
+ }
912
+ a(ce.INPUT, D);
913
+ }), {
914
+ // Refs
915
+ inputContainerRef: V,
916
+ // Values,
917
+ dateDisplayValue: C,
918
+ datePickerContainerId: p,
919
+ descriptionConditionalClasses: j,
920
+ displayedTextInputValue: ee,
921
+ displayedDateValue: G,
922
+ isDateIncorrect: f,
923
+ isDateRangePickerOpen: T,
924
+ isReadOnly: Y,
925
+ labelId: n,
926
+ descriptionId: u,
927
+ dateErrorId: S,
928
+ errorId: v,
929
+ popoverAriaLabel: L,
930
+ shouldDisplayError: c,
931
+ ariaDescribedBy: se,
932
+ textInputDisplayValue: y,
933
+ rangePickerButtonActions: H,
934
+ BentoButtonActionsLayout: Mt,
935
+ // Events
936
+ closeDateRangePicker: K,
937
+ clearDateRangePickerValue: async () => {
938
+ f.value && (f.value = !1), A.value = null;
939
+ },
940
+ openDateRangePicker: fe,
941
+ onRangeSelectorInput: (D) => {
942
+ if (D) {
943
+ const U = (te) => ie(te, k.NUMERIC_DATE_YEAR_FIRST, {
944
+ locale: i[l.value.substring(0, 2)] || i.enUS
945
+ });
946
+ y.startDate = U(D.startDate), y.endDate = U(D.endDate), A.value = D;
947
+ }
948
+ },
949
+ onEnterPressedOverInput: () => {
950
+ f.value || (T.value = !1);
951
+ },
952
+ onDateRangePickerInput: (D) => {
953
+ f.value = !1;
954
+ const U = (te, ae) => te ? ie(te, ae, {
955
+ locale: i[l.value.substring(0, 2)] || i.enUS
956
+ }) : void 0;
957
+ y.startDate = U(
958
+ D.startDate,
959
+ k.NUMERIC_DATE_YEAR_FIRST
960
+ ), y.endDate = U(D.endDate, k.NUMERIC_DATE_YEAR_FIRST), y.startTime = U(D.startDate, k.HOUR_MINUTE_SECONDS), y.endTime = U(D.endDate, k.HOUR_MINUTE_SECONDS), A.value = D;
961
+ },
962
+ onDateRangePickerError: (D) => {
963
+ f.value = !0, y.startDate = D.startDate, y.endDate = D.endDate, A.value = { startDate: null, endDate: null };
964
+ },
965
+ onDateRangePickerFormDateInputUpdate: (D) => {
966
+ f.value = !1, D.startTime && (y.startTime = D.startTime), D.endTime && (y.endTime = D.endTime);
967
+ },
968
+ // Translations
969
+ t: d
970
+ };
971
+ }
972
+ }), Qt = { class: "b-date-range-picker" }, Xt = { class: "b-date-range-picker__footer" };
973
+ function Zt(e, a, l, d, i, p) {
974
+ const n = R("field-label"), u = R("dropdown-input-default"), v = R("error-message"), S = R("bento-typography"), L = R("bento-divider"), f = R("bento-button-actions"), V = R("date-range-picker-calendar"), T = R("bento-popover"), Y = ot("bento-click-outside-directive");
975
+ return st((w(), Te("div", Qt, [
976
+ e.label ? (w(), N(n, {
977
+ key: 0,
978
+ id: e.labelId,
979
+ label: e.label,
980
+ "tooltip-text": e.tooltipText,
981
+ optional: e.optional,
982
+ required: e.required
983
+ }, null, 8, ["id", "label", "tooltip-text", "optional", "required"])) : M("", !0),
984
+ B("div", {
985
+ onKeydown: a[0] || (a[0] = lt((...c) => e.onEnterPressedOverInput && e.onEnterPressedOverInput(...c), ["enter"]))
986
+ }, [
987
+ $(u, {
988
+ ref: "inputContainerRef",
989
+ "always-combobox-is-input": "",
990
+ ariaControls: e.datePickerContainerId,
991
+ ariaExpanded: e.isDateRangePickerOpen,
992
+ "aria-labelledby": e.label ? e.labelId : null,
993
+ "aria-describedby": e.ariaDescribedBy,
994
+ disabled: e.disabled,
995
+ "is-invalid": !!e.errorMessage || e.shouldDisplayError,
996
+ open: e.isDateRangePickerOpen,
997
+ "display-value": e.displayedDateValue,
998
+ readonly: e.isReadOnly,
999
+ onOpen: e.openDateRangePicker,
1000
+ onClear: e.clearDateRangePickerValue,
1001
+ onClose: e.closeDateRangePicker
1002
+ }, null, 8, ["ariaControls", "ariaExpanded", "aria-labelledby", "aria-describedby", "disabled", "is-invalid", "open", "display-value", "readonly", "onOpen", "onClear", "onClose"])
1003
+ ], 32),
1004
+ e.shouldDisplayError ? (w(), N(v, {
1005
+ key: 1,
1006
+ id: e.dateErrorId,
1007
+ "error-message": e.t("provideDateInAFormat"),
1008
+ class: "b-date-range-picker__error-message"
1009
+ }, null, 8, ["id", "error-message"])) : M("", !0),
1010
+ e.errorMessage ? (w(), N(v, {
1011
+ key: 2,
1012
+ id: e.errorId,
1013
+ "error-message": e.errorMessage,
1014
+ class: "b-date-range-picker__error-message"
1015
+ }, null, 8, ["id", "error-message"])) : M("", !0),
1016
+ e.description ? (w(), N(S, {
1017
+ key: 3,
1018
+ id: e.descriptionId,
1019
+ class: be(["b-date-range-picker__description", e.descriptionConditionalClasses]),
1020
+ el: "span"
1021
+ }, {
1022
+ default: P(() => [
1023
+ X(it(e.description), 1)
1024
+ ]),
1025
+ _: 1
1026
+ }, 8, ["id", "class"])) : M("", !0),
1027
+ e.inputContainerRef ? (w(), N(T, {
1028
+ key: 4,
1029
+ id: e.datePickerContainerId,
1030
+ class: "b-date-range-picker__container",
1031
+ open: e.isDateRangePickerOpen,
1032
+ "target-element": e.inputContainerRef,
1033
+ "disable-focus-trap": !0,
1034
+ "aria-label": e.popoverAriaLabel,
1035
+ position: "bottom-start",
1036
+ "without-space": "",
1037
+ "fit-content": ""
1038
+ }, {
1039
+ default: P(() => [
1040
+ $(V, {
1041
+ "allow-time-input": e.allowTimeInput,
1042
+ "quick-select-ranges": e.quickSelectRanges,
1043
+ value: e.value,
1044
+ "first-day-of-week": e.firstDayOfWeek,
1045
+ granularities: e.granularities,
1046
+ "is-date-disabled": e.isDateDisabled,
1047
+ "max-range": e.maxRange,
1048
+ min: e.min,
1049
+ max: e.max,
1050
+ "number-of-months": e.numberOfMonths,
1051
+ "show-end-date-on-open": e.showEndDateOnOpen,
1052
+ "date-form-data": e.displayedTextInputValue,
1053
+ onCustomRange: e.onRangeSelectorInput,
1054
+ onInput: e.onDateRangePickerInput,
1055
+ onError: e.onDateRangePickerError,
1056
+ onFormDate: e.onDateRangePickerFormDateInputUpdate
1057
+ }, dt({ _: 2 }, [
1058
+ e.hasActions ? {
1059
+ name: "actions",
1060
+ fn: P(() => [
1061
+ $(L),
1062
+ B("div", Xt, [
1063
+ $(f, {
1064
+ actions: e.rangePickerButtonActions,
1065
+ layout: e.BentoButtonActionsLayout.SPACE_BETWEEN
1066
+ }, null, 8, ["actions", "layout"])
1067
+ ])
1068
+ ]),
1069
+ key: "0"
1070
+ } : void 0
1071
+ ]), 1032, ["allow-time-input", "quick-select-ranges", "value", "first-day-of-week", "granularities", "is-date-disabled", "max-range", "min", "max", "number-of-months", "show-end-date-on-open", "date-form-data", "onCustomRange", "onInput", "onError", "onFormDate"])
1072
+ ]),
1073
+ _: 1
1074
+ }, 8, ["id", "open", "target-element", "aria-label"])) : M("", !0)
1075
+ ])), [
1076
+ [Y, e.closeDateRangePicker]
1077
+ ]);
1078
+ }
1079
+ const ka = /* @__PURE__ */ je(Jt, [["render", Zt], ["__scopeId", "data-v-d4f9424a"]]);
1080
+ export {
1081
+ ka as B,
1082
+ F as D,
1083
+ ce as a,
1084
+ Ct as i
1085
+ };
1086
+ //# sourceMappingURL=date-range-picker.CoonfpYT.js.map