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