@adyen/bento-vue2 1.68.2 → 1.69.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 (428) hide show
  1. package/dist/@types/components.d.ts +1 -0
  2. package/dist/@types/index.d.ts +625 -1274
  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-button.css +1 -1
  9. package/dist/assets/base-modal.css +1 -1
  10. package/dist/assets/button-actions-with-menu.css +1 -1
  11. package/dist/assets/button.css +1 -1
  12. package/dist/assets/calendar.css +1 -1
  13. package/dist/assets/card.css +1 -1
  14. package/dist/assets/checkbox-group.css +1 -1
  15. package/dist/assets/checkbox-input.css +1 -1
  16. package/dist/assets/checkbox.css +1 -1
  17. package/dist/assets/chip.css +1 -1
  18. package/dist/assets/copy.css +1 -1
  19. package/dist/assets/country.css +1 -1
  20. package/dist/assets/currency.css +1 -1
  21. package/dist/assets/dashed-underline.css +1 -1
  22. package/dist/assets/data-grid-template.css +1 -1
  23. package/dist/assets/data-grid.css +1 -1
  24. package/dist/assets/date-picker.css +1 -1
  25. package/dist/assets/date-range-picker.css +1 -1
  26. package/dist/assets/dialog-page.css +1 -1
  27. package/dist/assets/divider.css +1 -1
  28. package/dist/assets/dropdown-default-textbox.css +1 -1
  29. package/dist/assets/dropdown-tag.css +1 -1
  30. package/dist/assets/dropdown.css +1 -1
  31. package/dist/assets/empty-state.css +1 -1
  32. package/dist/assets/file-uploader.css +1 -1
  33. package/dist/assets/filter-bar.css +1 -1
  34. package/dist/assets/focus-trap.css +1 -1
  35. package/dist/assets/footer-actions.css +1 -1
  36. package/dist/assets/form-layout-title.css +1 -1
  37. package/dist/assets/grid-layout.css +1 -1
  38. package/dist/assets/header-meta.css +1 -1
  39. package/dist/assets/header-with-views.css +1 -1
  40. package/dist/assets/header.css +1 -1
  41. package/dist/assets/info-icon.css +1 -1
  42. package/dist/assets/input-field-password.css +1 -1
  43. package/dist/assets/input-field-phone-number.css +1 -1
  44. package/dist/assets/input-field.css +1 -1
  45. package/dist/assets/inspector.css +1 -1
  46. package/dist/assets/layout-row.css +1 -1
  47. package/dist/assets/link.css +1 -1
  48. package/dist/assets/listbox-option-tag.css +1 -1
  49. package/dist/assets/loading-indicator.css +1 -1
  50. package/dist/assets/modal-fullscreen.css +1 -1
  51. package/dist/assets/pagination.css +1 -1
  52. package/dist/assets/payment-method.css +1 -1
  53. package/dist/assets/popper-container.css +1 -1
  54. package/dist/assets/promo-banner.css +1 -1
  55. package/dist/assets/radio-group.css +1 -1
  56. package/dist/assets/radio-input.css +1 -1
  57. package/dist/assets/rich-text-editor.css +1 -1
  58. package/dist/assets/search-bar.css +1 -1
  59. package/dist/assets/secondary-nav.css +1 -1
  60. package/dist/assets/segmented-control.css +1 -1
  61. package/dist/assets/selection-card-group.css +1 -1
  62. package/dist/assets/sidepanel.css +1 -1
  63. package/dist/assets/status.css +1 -1
  64. package/dist/assets/step.css +1 -1
  65. package/dist/assets/structured-list-item.css +1 -1
  66. package/dist/assets/tab.css +1 -1
  67. package/dist/assets/tag.css +1 -1
  68. package/dist/assets/textarea.css +1 -1
  69. package/dist/assets/timeline-item.css +1 -1
  70. package/dist/assets/toast.css +1 -1
  71. package/dist/assets/toggle-button.css +1 -1
  72. package/dist/assets/toggle.css +1 -1
  73. package/dist/assets/tooltip.css +1 -1
  74. package/dist/assets/tutorial.css +1 -1
  75. package/dist/assets/typography.css +1 -1
  76. package/dist/assets/use-cached-selected-values.css +1 -1
  77. package/dist/avatar.js +1 -1
  78. package/dist/button.js +9 -9
  79. package/dist/card.js +1 -1
  80. package/dist/checkbox.js +2 -2
  81. package/dist/chip.js +1 -1
  82. package/dist/chunks/{accordion-item.BNtdoVto.js → accordion-item.NSQ50RyR.js} +3 -3
  83. package/dist/chunks/accordion-item.NSQ50RyR.js.map +1 -0
  84. package/dist/chunks/{action-bar.DQb7WVVd.js → action-bar.Dhi6k0CP.js} +18 -19
  85. package/dist/chunks/action-bar.Dhi6k0CP.js.map +1 -0
  86. package/dist/chunks/{alert.c1rhDDrU.js → alert.Dx9P_L2k.js} +3 -3
  87. package/dist/chunks/{alert.c1rhDDrU.js.map → alert.Dx9P_L2k.js.map} +1 -1
  88. package/dist/chunks/aria-label.CaUURpnB.js.map +1 -1
  89. package/dist/chunks/{avatar.BgwjpLQO.js → avatar.CWmZ2n1W.js} +2 -2
  90. package/dist/chunks/avatar.CWmZ2n1W.js.map +1 -0
  91. package/dist/chunks/{base-button.-gx_u8Bd.js → base-button.BPZ_qSAu.js} +6 -6
  92. package/dist/chunks/base-button.BPZ_qSAu.js.map +1 -0
  93. package/dist/chunks/{base-modal.CkkfT6r6.js → base-modal.Cehud1uW.js} +19 -19
  94. package/dist/chunks/base-modal.Cehud1uW.js.map +1 -0
  95. package/dist/chunks/button-actions-with-menu.DIpUg6BF.js +85 -0
  96. package/dist/chunks/button-actions-with-menu.DIpUg6BF.js.map +1 -0
  97. package/dist/chunks/button-actions.types.BptAXjD8.js +8 -0
  98. package/dist/chunks/button-actions.types.BptAXjD8.js.map +1 -0
  99. package/dist/chunks/{button.hF-nD1Og.js → button.B0hSQWOR.js} +4 -4
  100. package/dist/chunks/button.B0hSQWOR.js.map +1 -0
  101. package/dist/chunks/{calendar.DvIQEYwN.js → calendar.BuAVH2aU.js} +8 -8
  102. package/dist/chunks/calendar.BuAVH2aU.js.map +1 -0
  103. package/dist/chunks/{card.CASAAsuJ.js → card.DLRC9V0Q.js} +20 -19
  104. package/dist/chunks/card.DLRC9V0Q.js.map +1 -0
  105. package/dist/chunks/{checkbox-group.QdX-NrSG.js → checkbox-group.Cdt2Ik2_.js} +6 -6
  106. package/dist/chunks/checkbox-group.Cdt2Ik2_.js.map +1 -0
  107. package/dist/chunks/{checkbox-input.CNWigbX4.js → checkbox-input.C9vmlMZe.js} +7 -7
  108. package/dist/chunks/checkbox-input.C9vmlMZe.js.map +1 -0
  109. package/dist/chunks/{checkbox.DCD6SSXC.js → checkbox.JhfbjDfJ.js} +6 -6
  110. package/dist/chunks/checkbox.JhfbjDfJ.js.map +1 -0
  111. package/dist/chunks/{chip.OV0EWIP3.js → chip.Cn68PNxA.js} +10 -10
  112. package/dist/chunks/chip.Cn68PNxA.js.map +1 -0
  113. package/dist/chunks/{code-snippet.dIKi0D7d.js → code-snippet.hYghglvk.js} +8 -8
  114. package/dist/chunks/code-snippet.hYghglvk.js.map +1 -0
  115. package/dist/chunks/{controls-group.CccuLkgP.js → controls-group.B1cxRdIA.js} +3 -3
  116. package/dist/chunks/{controls-group.CccuLkgP.js.map → controls-group.B1cxRdIA.js.map} +1 -1
  117. package/dist/chunks/{copy.CF8Fzu2Y.js → copy.UbMV4m6b.js} +14 -14
  118. package/dist/chunks/copy.UbMV4m6b.js.map +1 -0
  119. package/dist/chunks/{country.melpzEsY.js → country.CZQYhKpE.js} +6 -6
  120. package/dist/chunks/country.CZQYhKpE.js.map +1 -0
  121. package/dist/chunks/country.types.C0Q_hhgJ.js.map +1 -1
  122. package/dist/chunks/{currency.BM9OXTqe.js → currency.Oq7zcRM5.js} +3 -3
  123. package/dist/chunks/currency.Oq7zcRM5.js.map +1 -0
  124. package/dist/chunks/{dashboard-section.BIe6eVHq.js → dashboard-section.BRnRO3AZ.js} +4 -4
  125. package/dist/chunks/{dashboard-section.BIe6eVHq.js.map → dashboard-section.BRnRO3AZ.js.map} +1 -1
  126. package/dist/chunks/{dashed-underline.BbH6Lnd2.js → dashed-underline.BN_whJrR.js} +12 -13
  127. package/dist/chunks/dashed-underline.BN_whJrR.js.map +1 -0
  128. package/dist/chunks/{data-grid-template.Co0Ecr79.js → data-grid-template.BlRKgkX6.js} +5 -5
  129. package/dist/chunks/data-grid-template.BlRKgkX6.js.map +1 -0
  130. package/dist/chunks/{data-grid.erxjh5TN.js → data-grid.B0bOXr4p.js} +1218 -1166
  131. package/dist/chunks/data-grid.B0bOXr4p.js.map +1 -0
  132. package/dist/chunks/{date-picker.DGIS6Pp-.js → date-picker.Dyf6HJwP.js} +11 -11
  133. package/dist/chunks/date-picker.Dyf6HJwP.js.map +1 -0
  134. package/dist/chunks/date-range-picker.-FSh7RLm.js +967 -0
  135. package/dist/chunks/date-range-picker.-FSh7RLm.js.map +1 -0
  136. package/dist/chunks/{date.BfyWX2PY.js → date.w2Ya6_lp.js} +2 -2
  137. package/dist/chunks/{date.BfyWX2PY.js.map → date.w2Ya6_lp.js.map} +1 -1
  138. package/dist/chunks/{dialog-page.CLHZqQeU.js → dialog-page.CdJloGXQ.js} +9 -9
  139. package/dist/chunks/dialog-page.CdJloGXQ.js.map +1 -0
  140. package/dist/chunks/{divider.Cc4JFWG_.js → divider.CFbtmKeQ.js} +6 -6
  141. package/dist/chunks/divider.CFbtmKeQ.js.map +1 -0
  142. package/dist/chunks/{dropdown-default-textbox.94q6opSD.js → dropdown-default-textbox.DzpZoK-P.js} +81 -80
  143. package/dist/chunks/dropdown-default-textbox.DzpZoK-P.js.map +1 -0
  144. package/dist/chunks/dropdown-tag.CRbOHBPK.js +273 -0
  145. package/dist/chunks/dropdown-tag.CRbOHBPK.js.map +1 -0
  146. package/dist/chunks/{dropdown.DazYAy4B.js → dropdown.DB_MlO1F.js} +43 -43
  147. package/dist/chunks/dropdown.DB_MlO1F.js.map +1 -0
  148. package/dist/chunks/{empty-state.mtXfb1BB.js → empty-state.BqMgiQAu.js} +6 -6
  149. package/dist/chunks/empty-state.BqMgiQAu.js.map +1 -0
  150. package/dist/chunks/{error-message.BgxnwPLF.js → error-message.PWgUfpvo.js} +3 -3
  151. package/dist/chunks/{error-message.BgxnwPLF.js.map → error-message.PWgUfpvo.js.map} +1 -1
  152. package/dist/chunks/es6.MoTTyETW.js +12 -0
  153. package/dist/chunks/es6.MoTTyETW.js.map +1 -0
  154. package/dist/chunks/events.CMzGybJJ.js.map +1 -1
  155. package/dist/chunks/{file-uploader.BPslxGI8.js → file-uploader.llBOTc1s.js} +41 -41
  156. package/dist/chunks/file-uploader.llBOTc1s.js.map +1 -0
  157. package/dist/chunks/{filter-bar.DL19SXF1.js → filter-bar.8rNB7K2X.js} +189 -192
  158. package/dist/chunks/filter-bar.8rNB7K2X.js.map +1 -0
  159. package/dist/chunks/{fixed-scroller.XN-jvWqb.js → fixed-scroller.CRnBrXfk.js} +2 -2
  160. package/dist/chunks/{fixed-scroller.XN-jvWqb.js.map → fixed-scroller.CRnBrXfk.js.map} +1 -1
  161. package/dist/chunks/{focus-trap.C-wIQqpO.js → focus-trap.B4C5TXxl.js} +2 -2
  162. package/dist/chunks/focus-trap.B4C5TXxl.js.map +1 -0
  163. package/dist/chunks/{footer-actions.BE_zzX-e.js → footer-actions.C9ZYDWNU.js} +12 -12
  164. package/dist/chunks/footer-actions.C9ZYDWNU.js.map +1 -0
  165. package/dist/chunks/{form-layout-title.CIynHgCF.js → form-layout-title.CboZDCN9.js} +5 -5
  166. package/dist/chunks/form-layout-title.CboZDCN9.js.map +1 -0
  167. package/dist/chunks/{grid-layout.HvTAa4to.js → grid-layout.1aIiz2N_.js} +4 -4
  168. package/dist/chunks/grid-layout.1aIiz2N_.js.map +1 -0
  169. package/dist/chunks/{header-meta.CfloYa86.js → header-meta.C75OXHwb.js} +26 -27
  170. package/dist/chunks/{header-meta.CfloYa86.js.map → header-meta.C75OXHwb.js.map} +1 -1
  171. package/dist/chunks/{header-with-views.BUQ-MlAq.js → header-with-views.Dzifal09.js} +129 -133
  172. package/dist/chunks/header-with-views.Dzifal09.js.map +1 -0
  173. package/dist/chunks/{header.uyxNdQa3.js → header.DAcRpRch.js} +8 -8
  174. package/dist/chunks/header.DAcRpRch.js.map +1 -0
  175. package/dist/chunks/image.C2D2hKat.js.map +1 -1
  176. package/dist/chunks/{info-icon.CYOXx8CL.js → info-icon.B4P_Zi58.js} +10 -10
  177. package/dist/chunks/info-icon.B4P_Zi58.js.map +1 -0
  178. package/dist/chunks/{input-field-password.C1zTapiN.js → input-field-password.DsslmTb_.js} +29 -29
  179. package/dist/chunks/input-field-password.DsslmTb_.js.map +1 -0
  180. package/dist/chunks/{input-field-phone-number.K8BYjWfa.js → input-field-phone-number.D2T8jzAr.js} +8 -7
  181. package/dist/chunks/{input-field-phone-number.K8BYjWfa.js.map → input-field-phone-number.D2T8jzAr.js.map} +1 -1
  182. package/dist/chunks/{input-field.5S-pUNxA.js → input-field.DnnXXill.js} +5 -5
  183. package/dist/chunks/input-field.DnnXXill.js.map +1 -0
  184. package/dist/chunks/{inspector.BI28vKQz.js → inspector.H05UI3LY.js} +6 -6
  185. package/dist/chunks/inspector.H05UI3LY.js.map +1 -0
  186. package/dist/chunks/keyboard-navigation.pB8weElW.js.map +1 -1
  187. package/dist/chunks/{layout-row.C_F2wX6d.js → layout-row.BWxn-eQ-.js} +12 -12
  188. package/dist/chunks/layout-row.BWxn-eQ-.js.map +1 -0
  189. package/dist/chunks/{link.CXy_LoFI.js → link.B3F22FTY.js} +3 -3
  190. package/dist/chunks/link.B3F22FTY.js.map +1 -0
  191. package/dist/chunks/{listbox-option-tag.D0Cql_R3.js → listbox-option-tag.On3eD2RE.js} +4 -4
  192. package/dist/chunks/listbox-option-tag.On3eD2RE.js.map +1 -0
  193. package/dist/chunks/{loading-indicator.z8COalOc.js → loading-indicator.Iy1CVr_T.js} +2 -2
  194. package/dist/chunks/loading-indicator.Iy1CVr_T.js.map +1 -0
  195. package/dist/chunks/minus-small.DJacLGTw.js.map +1 -1
  196. package/dist/chunks/{modal-fullscreen.DHotw1RI.js → modal-fullscreen.BgmKDCl4.js} +31 -32
  197. package/dist/chunks/modal-fullscreen.BgmKDCl4.js.map +1 -0
  198. package/dist/chunks/{modal.eoNQ6E3U.js → modal.DMqbIDcX.js} +6 -6
  199. package/dist/chunks/modal.DMqbIDcX.js.map +1 -0
  200. package/dist/chunks/{pagination.4J7ZMyf5.js → pagination.38ahUAk8.js} +5 -5
  201. package/dist/chunks/pagination.38ahUAk8.js.map +1 -0
  202. package/dist/chunks/{payment-method.Cx4nPDtE.js → payment-method.CRluCp_L.js} +3 -3
  203. package/dist/chunks/payment-method.CRluCp_L.js.map +1 -0
  204. package/dist/chunks/popover.types.B1HUQoCG.js +6 -0
  205. package/dist/chunks/popover.types.B1HUQoCG.js.map +1 -0
  206. package/dist/chunks/{popper-container.DIFqmRsp.js → popper-container.Bu75g2nc.js} +3 -3
  207. package/dist/chunks/popper-container.Bu75g2nc.js.map +1 -0
  208. package/dist/chunks/{promo-banner.Bbc2U3S3.js → promo-banner.BGMV3nRn.js} +6 -6
  209. package/dist/chunks/promo-banner.BGMV3nRn.js.map +1 -0
  210. package/dist/chunks/{radio-group.4_KKjvAm.js → radio-group.BVLoYrgU.js} +8 -8
  211. package/dist/chunks/radio-group.BVLoYrgU.js.map +1 -0
  212. package/dist/chunks/{radio-input.uJAhxKRs.js → radio-input.BRceOAA4.js} +7 -7
  213. package/dist/chunks/radio-input.BRceOAA4.js.map +1 -0
  214. package/dist/chunks/{rich-text-editor.BUKLdRkN.js → rich-text-editor.BZ6CyBsK.js} +8 -8
  215. package/dist/chunks/rich-text-editor.BZ6CyBsK.js.map +1 -0
  216. package/dist/chunks/{search-bar.CuBj5FAE.js → search-bar.VfZoy5FX.js} +6 -5
  217. package/dist/chunks/search-bar.VfZoy5FX.js.map +1 -0
  218. package/dist/chunks/{secondary-nav.C6usurfD.js → secondary-nav.BXXKo5HE.js} +9 -9
  219. package/dist/chunks/secondary-nav.BXXKo5HE.js.map +1 -0
  220. package/dist/chunks/{segmented-control.DHZEfmT-.js → segmented-control.CGBrRBLL.js} +11 -11
  221. package/dist/chunks/segmented-control.CGBrRBLL.js.map +1 -0
  222. package/dist/chunks/{selection-card-group.0o5T4tab.js → selection-card-group.DgQLQ4Wo.js} +10 -10
  223. package/dist/chunks/selection-card-group.DgQLQ4Wo.js.map +1 -0
  224. package/dist/chunks/{sidepanel.DyThBUgV.js → sidepanel.BR0coAJl.js} +9 -9
  225. package/dist/chunks/sidepanel.BR0coAJl.js.map +1 -0
  226. package/dist/chunks/{status.types.p_TCvoo0.js → status.types.DBYsEsiT.js} +3 -3
  227. package/dist/chunks/status.types.DBYsEsiT.js.map +1 -0
  228. package/dist/chunks/{step.DMMofD4B.js → step.DJkLl2s4.js} +5 -5
  229. package/dist/chunks/step.DJkLl2s4.js.map +1 -0
  230. package/dist/chunks/{structured-list-item.Bnn6-Z3q.js → structured-list-item.CACpjdy4.js} +7 -7
  231. package/dist/chunks/structured-list-item.CACpjdy4.js.map +1 -0
  232. package/dist/chunks/{summary-grid.types.D_FU3sUq.js → summary-grid.types.CVuvqM3p.js} +7 -7
  233. package/dist/chunks/{summary-grid.types.D_FU3sUq.js.map → summary-grid.types.CVuvqM3p.js.map} +1 -1
  234. package/dist/chunks/{tab.BhWPBxcB.js → tab.D33__imf.js} +5 -5
  235. package/dist/chunks/tab.D33__imf.js.map +1 -0
  236. package/dist/chunks/{tag.CGkclKVL.js → tag.DfHE26ZN.js} +4 -4
  237. package/dist/chunks/tag.DfHE26ZN.js.map +1 -0
  238. package/dist/chunks/textarea.D7uQzuRr.js +214 -0
  239. package/dist/chunks/textarea.D7uQzuRr.js.map +1 -0
  240. package/dist/chunks/{timeline-item.DqLhj0Lb.js → timeline-item.QOBiWKEL.js} +11 -11
  241. package/dist/chunks/timeline-item.QOBiWKEL.js.map +1 -0
  242. package/dist/chunks/{toast.BOyeuS19.js → toast.CZxRRsPl.js} +5 -5
  243. package/dist/chunks/toast.CZxRRsPl.js.map +1 -0
  244. package/dist/chunks/toggle-button.DeECoGRn.js +1031 -0
  245. package/dist/chunks/toggle-button.DeECoGRn.js.map +1 -0
  246. package/dist/chunks/{toggle.DyXL09-x.js → toggle.hylSNOmz.js} +8 -8
  247. package/dist/chunks/toggle.hylSNOmz.js.map +1 -0
  248. package/dist/chunks/{tooltip.wQsyAwkC.js → tooltip.BYj8cc9F.js} +66 -62
  249. package/dist/chunks/tooltip.BYj8cc9F.js.map +1 -0
  250. package/dist/chunks/{tutorial.CxrGhLS7.js → tutorial.BkAXmyzV.js} +29 -31
  251. package/dist/chunks/tutorial.BkAXmyzV.js.map +1 -0
  252. package/dist/chunks/{typography.J1v_SPG3.js → typography.w3m-EY4E.js} +7 -7
  253. package/dist/chunks/typography.w3m-EY4E.js.map +1 -0
  254. package/dist/chunks/{use-bento-toast-controller.Cn_2Eogn.js → use-bento-toast-controller.uglKlMjv.js} +2 -2
  255. package/dist/chunks/{use-bento-toast-controller.Cn_2Eogn.js.map → use-bento-toast-controller.uglKlMjv.js.map} +1 -1
  256. package/dist/chunks/{use-cached-selected-values.0EeyFfyF.js → use-cached-selected-values.CI9xi8dE.js} +12 -12
  257. package/dist/chunks/use-cached-selected-values.CI9xi8dE.js.map +1 -0
  258. package/dist/chunks/use-country-items.BllTb5MK.js.map +1 -1
  259. package/dist/chunks/use-country-phon-code.BOaJ9PDl.js.map +1 -1
  260. package/dist/chunks/use-has-slot.C9lQZ6nz.js.map +1 -1
  261. package/dist/code-snippet.js +1 -1
  262. package/dist/country.js +1 -1
  263. package/dist/currency.js +1 -1
  264. package/dist/dashboard-template.js +1 -1
  265. package/dist/dashed-underline.js +1 -1
  266. package/dist/data-grid-template.js +1 -1
  267. package/dist/data-grid.js +1 -1
  268. package/dist/date-picker.js +2 -2
  269. package/dist/date-range-picker.js +2 -2
  270. package/dist/date.js +1 -1
  271. package/dist/divider.js +1 -1
  272. package/dist/dropdown.js +4 -4
  273. package/dist/empty-state.js +1 -1
  274. package/dist/file-uploader.js +1 -1
  275. package/dist/filter-bar.js +1 -1
  276. package/dist/focus-trap.js +1 -1
  277. package/dist/form-layout.js +1 -1
  278. package/dist/header-with-views.js +1 -1
  279. package/dist/header.js +1 -1
  280. package/dist/index.js +175 -177
  281. package/dist/index.js.map +1 -1
  282. package/dist/info-icon.js +1 -1
  283. package/dist/input-field-password.js +1 -1
  284. package/dist/input-field-phone-number.js +3 -2
  285. package/dist/input-field.js +1 -1
  286. package/dist/inspector.js +1 -1
  287. package/dist/internal.js +33 -32
  288. package/dist/internal.js.map +1 -1
  289. package/dist/layout.js +1 -1
  290. package/dist/link.js +1 -1
  291. package/dist/loading-indicator.js +1 -1
  292. package/dist/menu.js +1 -1
  293. package/dist/modal-fullscreen.js +1 -1
  294. package/dist/modal.js +2 -2
  295. package/dist/pagination.js +1 -1
  296. package/dist/payment-method.js +1 -1
  297. package/dist/popover.js +2 -2
  298. package/dist/popper-container.js +1 -1
  299. package/dist/promo-banner.js +1 -1
  300. package/dist/radio-group.js +2 -2
  301. package/dist/rich-text-editor.js +1 -1
  302. package/dist/search-bar.js +2 -2
  303. package/dist/secondary-nav.js +1 -1
  304. package/dist/segmented-control.js +1 -1
  305. package/dist/selection-card.js +1 -1
  306. package/dist/sidepanel.js +1 -1
  307. package/dist/status.js +1 -1
  308. package/dist/stepper.js +1 -1
  309. package/dist/structured-list.js +1 -1
  310. package/dist/styles/bento-dark.css +17 -4
  311. package/dist/styles/bento-light.css +17 -4
  312. package/dist/styles/bento.css +17 -4
  313. package/dist/styles/legacy.css +17 -4
  314. package/dist/styles/styleguide.css +17 -4
  315. package/dist/styles/utility.css +3 -0
  316. package/dist/summary-grid.js +1 -1
  317. package/dist/tabs.js +1 -1
  318. package/dist/tag.js +1 -1
  319. package/dist/textarea.js +1 -1
  320. package/dist/timeline.js +1 -1
  321. package/dist/toast.js +1 -1
  322. package/dist/toggle.js +1 -1
  323. package/dist/tutorial.js +1 -1
  324. package/dist/typography.js +1 -1
  325. package/dist/use-form-v4.js.map +1 -1
  326. package/dist/web-types.json +934 -363
  327. package/package.json +7 -7
  328. package/dist/assets/button-actions.css +0 -1
  329. package/dist/assets/menu.css +0 -1
  330. package/dist/assets/popover.css +0 -1
  331. package/dist/assets/teleport.css +0 -1
  332. package/dist/chunks/accordion-item.BNtdoVto.js.map +0 -1
  333. package/dist/chunks/action-bar.DQb7WVVd.js.map +0 -1
  334. package/dist/chunks/avatar.BgwjpLQO.js.map +0 -1
  335. package/dist/chunks/base-button.-gx_u8Bd.js.map +0 -1
  336. package/dist/chunks/base-modal.CkkfT6r6.js.map +0 -1
  337. package/dist/chunks/base-modal.keys.C2PQXcE2.js +0 -5
  338. package/dist/chunks/base-modal.keys.C2PQXcE2.js.map +0 -1
  339. package/dist/chunks/button-actions-with-menu.nPj7sdGE.js +0 -83
  340. package/dist/chunks/button-actions-with-menu.nPj7sdGE.js.map +0 -1
  341. package/dist/chunks/button-actions.Ju27CRNG.js +0 -194
  342. package/dist/chunks/button-actions.Ju27CRNG.js.map +0 -1
  343. package/dist/chunks/button.hF-nD1Og.js.map +0 -1
  344. package/dist/chunks/calendar.DvIQEYwN.js.map +0 -1
  345. package/dist/chunks/card.CASAAsuJ.js.map +0 -1
  346. package/dist/chunks/checkbox-group.QdX-NrSG.js.map +0 -1
  347. package/dist/chunks/checkbox-input.CNWigbX4.js.map +0 -1
  348. package/dist/chunks/checkbox.DCD6SSXC.js.map +0 -1
  349. package/dist/chunks/chip.OV0EWIP3.js.map +0 -1
  350. package/dist/chunks/code-snippet.dIKi0D7d.js.map +0 -1
  351. package/dist/chunks/copy.CF8Fzu2Y.js.map +0 -1
  352. package/dist/chunks/country.melpzEsY.js.map +0 -1
  353. package/dist/chunks/currency.BM9OXTqe.js.map +0 -1
  354. package/dist/chunks/dashed-underline.BbH6Lnd2.js.map +0 -1
  355. package/dist/chunks/data-grid-template.Co0Ecr79.js.map +0 -1
  356. package/dist/chunks/data-grid.erxjh5TN.js.map +0 -1
  357. package/dist/chunks/date-picker.DGIS6Pp-.js.map +0 -1
  358. package/dist/chunks/date-range-picker.CIaKRXIQ.js +0 -1021
  359. package/dist/chunks/date-range-picker.CIaKRXIQ.js.map +0 -1
  360. package/dist/chunks/dialog-page.CLHZqQeU.js.map +0 -1
  361. package/dist/chunks/divider.Cc4JFWG_.js.map +0 -1
  362. package/dist/chunks/dropdown-default-textbox.94q6opSD.js.map +0 -1
  363. package/dist/chunks/dropdown-tag.BaosvGGZ.js +0 -240
  364. package/dist/chunks/dropdown-tag.BaosvGGZ.js.map +0 -1
  365. package/dist/chunks/dropdown.DazYAy4B.js.map +0 -1
  366. package/dist/chunks/empty-state.mtXfb1BB.js.map +0 -1
  367. package/dist/chunks/es6.n1ewaW31.js +0 -11
  368. package/dist/chunks/es6.n1ewaW31.js.map +0 -1
  369. package/dist/chunks/file-uploader.BPslxGI8.js.map +0 -1
  370. package/dist/chunks/filter-bar.DL19SXF1.js.map +0 -1
  371. package/dist/chunks/focus-trap.C-wIQqpO.js.map +0 -1
  372. package/dist/chunks/footer-actions.BE_zzX-e.js.map +0 -1
  373. package/dist/chunks/form-layout-title.CIynHgCF.js.map +0 -1
  374. package/dist/chunks/grid-layout.HvTAa4to.js.map +0 -1
  375. package/dist/chunks/header-with-views.BUQ-MlAq.js.map +0 -1
  376. package/dist/chunks/header.uyxNdQa3.js.map +0 -1
  377. package/dist/chunks/info-icon.CYOXx8CL.js.map +0 -1
  378. package/dist/chunks/input-field-password.C1zTapiN.js.map +0 -1
  379. package/dist/chunks/input-field.5S-pUNxA.js.map +0 -1
  380. package/dist/chunks/inspector.BI28vKQz.js.map +0 -1
  381. package/dist/chunks/layout-row.C_F2wX6d.js.map +0 -1
  382. package/dist/chunks/link.CXy_LoFI.js.map +0 -1
  383. package/dist/chunks/listbox-option-tag.D0Cql_R3.js.map +0 -1
  384. package/dist/chunks/loading-indicator.z8COalOc.js.map +0 -1
  385. package/dist/chunks/menu.D0OQgk40.js +0 -515
  386. package/dist/chunks/menu.D0OQgk40.js.map +0 -1
  387. package/dist/chunks/modal-fullscreen.DHotw1RI.js.map +0 -1
  388. package/dist/chunks/modal-fullscreen.keys.CMba3hYp.js +0 -5
  389. package/dist/chunks/modal-fullscreen.keys.CMba3hYp.js.map +0 -1
  390. package/dist/chunks/modal.eoNQ6E3U.js.map +0 -1
  391. package/dist/chunks/pagination.4J7ZMyf5.js.map +0 -1
  392. package/dist/chunks/payment-method.Cx4nPDtE.js.map +0 -1
  393. package/dist/chunks/popover.Bo4Bkudr.js +0 -145
  394. package/dist/chunks/popover.Bo4Bkudr.js.map +0 -1
  395. package/dist/chunks/popover.types.CBqyA4ly.js +0 -6
  396. package/dist/chunks/popover.types.CBqyA4ly.js.map +0 -1
  397. package/dist/chunks/popper-container.DIFqmRsp.js.map +0 -1
  398. package/dist/chunks/promo-banner.Bbc2U3S3.js.map +0 -1
  399. package/dist/chunks/radio-group.4_KKjvAm.js.map +0 -1
  400. package/dist/chunks/radio-input.uJAhxKRs.js.map +0 -1
  401. package/dist/chunks/rich-text-editor.BUKLdRkN.js.map +0 -1
  402. package/dist/chunks/search-bar.CuBj5FAE.js.map +0 -1
  403. package/dist/chunks/secondary-nav.C6usurfD.js.map +0 -1
  404. package/dist/chunks/segmented-control.DHZEfmT-.js.map +0 -1
  405. package/dist/chunks/selection-card-group.0o5T4tab.js.map +0 -1
  406. package/dist/chunks/sidepanel.DyThBUgV.js.map +0 -1
  407. package/dist/chunks/sidepanel.keys.R0DKQuYx.js +0 -5
  408. package/dist/chunks/sidepanel.keys.R0DKQuYx.js.map +0 -1
  409. package/dist/chunks/status.types.p_TCvoo0.js.map +0 -1
  410. package/dist/chunks/step.DMMofD4B.js.map +0 -1
  411. package/dist/chunks/structured-list-item.Bnn6-Z3q.js.map +0 -1
  412. package/dist/chunks/tab.BhWPBxcB.js.map +0 -1
  413. package/dist/chunks/tag.CGkclKVL.js.map +0 -1
  414. package/dist/chunks/teleport.BV6zrDjA.js +0 -128
  415. package/dist/chunks/teleport.BV6zrDjA.js.map +0 -1
  416. package/dist/chunks/textarea.UPM6N9V1.js +0 -203
  417. package/dist/chunks/textarea.UPM6N9V1.js.map +0 -1
  418. package/dist/chunks/timeline-item.DqLhj0Lb.js.map +0 -1
  419. package/dist/chunks/toast.BOyeuS19.js.map +0 -1
  420. package/dist/chunks/toggle-button.DEVVvpkw.js +0 -83
  421. package/dist/chunks/toggle-button.DEVVvpkw.js.map +0 -1
  422. package/dist/chunks/toggle.DyXL09-x.js.map +0 -1
  423. package/dist/chunks/tooltip.wQsyAwkC.js.map +0 -1
  424. package/dist/chunks/tutorial.CxrGhLS7.js.map +0 -1
  425. package/dist/chunks/typography.J1v_SPG3.js.map +0 -1
  426. package/dist/chunks/use-cached-selected-values.0EeyFfyF.js.map +0 -1
  427. package/dist/chunks/use-click-outside.BnhTgpSt.js +0 -14
  428. package/dist/chunks/use-click-outside.BnhTgpSt.js.map +0 -1
@@ -1,1021 +0,0 @@
1
- import { reactive as ce, defineComponent as Le, ref as w, computed as _, onMounted as Ye, toRaw as ye, toRef as ke, watch as Te } from "vue";
2
- import { B as it } from "./divider.Cc4JFWG_.js";
3
- import { B as lt } from "./popover.Bo4Bkudr.js";
4
- import { B as Qe, d as ot } from "./typography.J1v_SPG3.js";
5
- import { D as ut } from "./dropdown-default-textbox.94q6opSD.js";
6
- import { e as F, a as Ee, g as pe } from "./get-date-locale.CAyOIbcp.js";
7
- import { g as re } from "./generate-uid.NJ8tVoha.js";
8
- import { u as _e } from "./i18n.BQkEbtPM.js";
9
- import { e as je, t as ae, g as se, i as C, h as M, j as he, k as dt, l as Oe, m as ct, s as we, n as Dt, o as Me, a as G, u as mt, f as te } from "./calendar.DvIQEYwN.js";
10
- import { r as O, t as L } from "./index.BrH1t1iu.js";
11
- import { f as Ce, v as ft, D as S } from "./date-input.BqBdAO1E.js";
12
- import { u as vt } from "./use-form-layout-loading.D3lALhtC.js";
13
- import "./index.Cl4_42j5.js";
14
- import { B as gt } from "./input-field.5S-pUNxA.js";
15
- import { B as Tt } from "./dropdown.DazYAy4B.js";
16
- import { B as yt } from "./segmented-control.DHZEfmT-.js";
17
- import { d as oe } from "./debounce.DUTu11PS.js";
18
- import { u as pt } from "./use-has-slot.C9lQZ6nz.js";
19
- import { n as $e } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
20
- import { B as _t } from "./directive.Cbdox5VL.js";
21
- import { F as Rt, E as It } from "./error-message.BgxnwPLF.js";
22
- import { B as bt, c as St } from "./button-actions.Ju27CRNG.js";
23
- import "../assets/date-range-picker.css";
24
- function Ge(t, e) {
25
- O(2, arguments);
26
- var n = ae(e), l = n * 3;
27
- return je(t, l);
28
- }
29
- function Ae(t) {
30
- O(1, arguments);
31
- var e = L(t), n = Math.floor(e.getMonth() / 3) + 1;
32
- return n;
33
- }
34
- function Fe(t) {
35
- return O(1, arguments), L(t).getFullYear();
36
- }
37
- function ue(t, e) {
38
- O(2, arguments);
39
- var n = L(t), l = L(e);
40
- return n.getTime() === l.getTime();
41
- }
42
- function kt(t, e) {
43
- O(2, arguments);
44
- var n = se(t), l = se(e);
45
- return n.getTime() === l.getTime();
46
- }
47
- function xe(t) {
48
- O(1, arguments);
49
- var e = L(t);
50
- return e.setMilliseconds(0), e;
51
- }
52
- function Ue(t, e) {
53
- O(2, arguments);
54
- var n = xe(t), l = xe(e);
55
- return n.getTime() === l.getTime();
56
- }
57
- function Et(t) {
58
- return O(1, arguments), C(t, Date.now());
59
- }
60
- function ht(t, e) {
61
- O(2, arguments);
62
- var n = L(t), l = ae(e);
63
- return n.setHours(l), n;
64
- }
65
- function Ne(t, e) {
66
- O(2, arguments);
67
- var n = L(t), l = ae(e);
68
- return n.setMilliseconds(l), n;
69
- }
70
- function Ot(t, e) {
71
- O(2, arguments);
72
- var n = L(t), l = ae(e);
73
- return n.setMinutes(l), n;
74
- }
75
- function wt(t, e) {
76
- O(2, arguments);
77
- var n = L(t), l = ae(e);
78
- return n.setSeconds(l), n;
79
- }
80
- function Mt(t, e) {
81
- O(2, arguments);
82
- var n = ae(e);
83
- return Ge(t, -n);
84
- }
85
- function J(t) {
86
- if (t == null)
87
- return M(/* @__PURE__ */ new Date());
88
- const [e, n, l] = t.split("-").map((o) => parseInt(o, 10));
89
- return new Date(e, n - 1, l);
90
- }
91
- const Ct = ({
92
- firstDayOfWeek: t,
93
- min: e,
94
- max: n
95
- }) => ({ getGranularCalendarLimits: (o) => {
96
- let D = M(e), f = F(n);
97
- if ((o == null ? void 0 : o.type) === "weekly") {
98
- if (o.earliest)
99
- D = M(o.earliest);
100
- else {
101
- const y = he(D, { weekStartsOn: t });
102
- C(D, y) || (D = M(dt(Oe(D, { weekStartsOn: t }), 1)));
103
- }
104
- if (o.latest)
105
- f = F(o.latest);
106
- else {
107
- const y = Oe(f, { weekStartsOn: t });
108
- C(f, y) || (f = F(ct(he(f, { weekStartsOn: t }), 1)));
109
- }
110
- }
111
- if ((o == null ? void 0 : o.type) === "monthly") {
112
- if (o.earliest)
113
- D = M(o.earliest);
114
- else {
115
- const y = we(D);
116
- C(D, y) || (D = we(je(D, 1)));
117
- }
118
- if (o.latest)
119
- f = F(o.latest);
120
- else {
121
- const y = Ee(f);
122
- C(f, y) || (f = Ee(Dt(f, 1)));
123
- }
124
- }
125
- if ((o == null ? void 0 : o.type) === "quarterly") {
126
- if (o.earliest)
127
- D = se(o.earliest);
128
- else {
129
- const y = se(D);
130
- C(D, y) || (D = se(Ge(D, 1)));
131
- }
132
- if (o.latest)
133
- f = F(o.latest);
134
- else {
135
- const y = Me(f);
136
- C(f, y) || (f = Me(Mt(f, 1)));
137
- }
138
- }
139
- return { min: D, max: f };
140
- } }), At = () => {
141
- const t = ce({
142
- daily: null,
143
- weekly: null,
144
- monthly: null,
145
- quarterly: null
146
- });
147
- return {
148
- savedRanges: t,
149
- saveRange: (l, o) => {
150
- t[l] = o;
151
- },
152
- resetSavedRanges: () => {
153
- t.daily = null, t.weekly = null, t.monthly = null, t.quarterly = null;
154
- }
155
- };
156
- };
157
- var g = /* @__PURE__ */ ((t) => (t.CUSTOM_RANGE = "custom-range", t.INPUT = "input", t.ERROR = "error", t.FORM_DATE = "form-date", t.START_DATE_SELECTED = "start-date-selected", t))(g || {});
158
- const Ft = /[\d]/, xt = /^\d{2}$/, Ut = /^\d{2}:\d{2}$/, Nt = (t) => {
159
- const { selectionStart: e } = t.target, n = ["Backspace", "Tab", "ArrowLeft", "ArrowRight"], l = Ft.test(t.key) || n.includes(t.key), o = [1, 2, 4, 5].includes(e) && t.key === ":";
160
- !l && !o && t.preventDefault();
161
- }, Pe = (t) => {
162
- if (!t)
163
- return t;
164
- let e = t;
165
- if (e.length === 1 && parseInt(t, 10) > 2)
166
- return `0${e}:`;
167
- const [n, l] = e.slice(-2);
168
- return [2, 5].includes(e.length) && l === ":" && (e = `${e.slice(0, e.length - 2)}0${n}`), (xt.test(e) || Ut.test(e)) && (e += ":"), e;
169
- }, Pt = {
170
- "en-US": {
171
- customRange: "Custom range",
172
- daily: "Daily",
173
- dateFrom: "Date from",
174
- dateTo: "Date to",
175
- lastMonth: "Last month",
176
- lastSevenDays: "Last 7 days",
177
- lastThreeMonths: "Last three months",
178
- monthly: "Monthly",
179
- quarterly: "Quarterly",
180
- timeFrom: "Time from",
181
- timeTo: "Time to",
182
- weekly: "Weekly"
183
- },
184
- "ja-JP": {
185
- customRange: "カスタム範囲を選択",
186
- daily: "毎日",
187
- lastMonth: "先月",
188
- lastSevenDays: "過去7日間",
189
- monthly: "毎月",
190
- weekly: "毎週"
191
- },
192
- "pt-BR": {
193
- customRange: "Selecione um intervalo personalizado",
194
- daily: "Diário",
195
- lastMonth: "Último mês",
196
- lastSevenDays: "Últimos 7 dias",
197
- monthly: "Mensal",
198
- weekly: "Semanal"
199
- }
200
- }, Be = 300, qe = "customRange", Bt = Le({
201
- i18n: { messages: Pt },
202
- name: "date-range-picker-calendar",
203
- components: {
204
- BentoDropdown: Tt,
205
- BentoInputField: gt,
206
- BentoSegmentedControl: yt,
207
- BentoTypography: Qe,
208
- Calendar: G
209
- },
210
- props: {
211
- /**
212
- * Allows user to enter time values in the form
213
- */
214
- allowTimeInput: { type: Boolean, default: !1 },
215
- /**
216
- * Ranges form persistance data
217
- */
218
- dateFormData: {
219
- type: Object,
220
- default: () => ({ startDate: void 0, endDate: void 0, startTime: void 0, endTime: void 0 })
221
- },
222
- /**
223
- * Allows you to set the first day of the week. 0 is sunday, 1 is monday, 6 is saturday
224
- */
225
- firstDayOfWeek: G.props.firstDayOfWeek,
226
- /**
227
- * A list of available granularities.
228
- * If present, the date picker will display a segmented control to change granularity.
229
- */
230
- granularities: {
231
- type: Array,
232
- default: null
233
- },
234
- /**
235
- * Indicate if a date should be disabled or not
236
- */
237
- isDateDisabled: G.props.isDateDisabled,
238
- /**
239
- * Set a maximum number of dates to be selectable by the range.
240
- */
241
- maxRange: G.props.maxRange,
242
- /**
243
- * Sets a minimum limit for selectable dates - dates before `min` will not be selectable
244
- */
245
- min: G.props.min,
246
- /**
247
- * Sets a maximum limit for selectable dates - dates after `max` will not be selectable
248
- */
249
- max: G.props.max,
250
- /**
251
- * Number of months rendered on pane
252
- */
253
- numberOfMonths: G.props.numberOfMonths,
254
- /**
255
- * Displays the end date's month when the calendar is opened. Defaults to false i.e. the start date's month is displayed.
256
- */
257
- showEndDateOnOpen: { type: Boolean, default: !1 },
258
- /**
259
- * Enables the custom range selector.
260
- * If provided, must be an array that sets the custom range dropdown items. Items are of the structure:
261
- * `label` - label of custom range item.
262
- * `value` - a unique key of the custom range item.
263
- * `data` - an object `{ startDate: Date; endDate: Date }` to set the date picker range to upon selecting.
264
- */
265
- quickSelectRanges: {
266
- type: Array,
267
- default: void 0
268
- },
269
- /**
270
- * Selected date
271
- */
272
- value: { type: Object, default: void 0 },
273
- /**
274
- * The type of calendar to display. Defaults to showing days.
275
- */
276
- variant: G.props.variant
277
- },
278
- emits: [
279
- g.CUSTOM_RANGE,
280
- g.INPUT,
281
- g.ERROR,
282
- g.FORM_DATE,
283
- g.START_DATE_SELECTED
284
- ],
285
- setup(t, { emit: e, slots: n }) {
286
- var Re, Ie, be, Se;
287
- const { locale: l, t: o } = _e(), D = pe(), f = w({}), y = _(() => t.variant === "month" ? "monthly" : "daily"), r = ce({
288
- startDate: (Re = t.value) == null ? void 0 : Re.startDate,
289
- endDate: (Ie = t.value) == null ? void 0 : Ie.endDate,
290
- range: (be = t.value) == null ? void 0 : be.range,
291
- ...t.granularities ? {
292
- granularity: ((Se = t.value) == null ? void 0 : Se.granularity) || y.value
293
- } : {}
294
- });
295
- function T(a) {
296
- return a ? new Date(
297
- a.getUTCFullYear(),
298
- a.getUTCMonth(),
299
- a.getUTCDate(),
300
- a.getUTCHours(),
301
- a.getUTCMinutes(),
302
- a.getUTCSeconds()
303
- ) : null;
304
- }
305
- const A = _(() => {
306
- var a, i;
307
- return (
308
- // eslint-disable-next-line consistent-return
309
- ((i = (a = t == null ? void 0 : t.quickSelectRanges) == null ? void 0 : a.find(({ value: u, data: d }) => {
310
- var I;
311
- if (!d.endDate) {
312
- if (d.isRelativeToNow) {
313
- const h = (I = f.value) == null ? void 0 : I[u];
314
- return h ? ue(
315
- T(h.startDate),
316
- T(r.startDate)
317
- ) && ue(
318
- T(h.endDate),
319
- T(r.endDate)
320
- ) : (
321
- // If not stored calculated dates, fall back to comparing the quick select item's value
322
- // with the internal range's stored range identifier.
323
- u === r.range
324
- );
325
- }
326
- return ue(
327
- T(d.startDate),
328
- T(r.startDate)
329
- ) && ue(
330
- T(r.endDate),
331
- T(F(r.endDate))
332
- ) && Et(T(r.endDate));
333
- }
334
- if (t.allowTimeInput)
335
- return Ue(
336
- T(d.startDate),
337
- T(r.startDate)
338
- ) && Ue(T(d.endDate), T(r.endDate));
339
- if (d.endDate)
340
- return C(d.startDate, r.startDate) && C(d.endDate, r.endDate);
341
- })) == null ? void 0 : i.value) ?? qe
342
- );
343
- }), ne = _(() => ({
344
- "b-date-range-picker-calendar__form-input-wrapper": t.allowTimeInput
345
- })), R = _(() => [
346
- { label: o("customRange"), value: qe },
347
- ...t.quickSelectRanges ? t.quickSelectRanges : []
348
- ]), x = _(
349
- () => {
350
- var a;
351
- return ((a = t.granularities) == null ? void 0 : a.find(({ type: i }) => i === r.granularity)) || null;
352
- }
353
- ), E = _(
354
- () => {
355
- var a;
356
- return ((a = t.granularities) == null ? void 0 : a.map(({ type: i, disabled: u }) => ({
357
- label: o(i),
358
- value: i,
359
- disabled: u
360
- }))) ?? [];
361
- }
362
- ), { getGranularCalendarLimits: X } = Ct(t), m = _(
363
- () => t.granularities ? X(x.value) : { min: M(t.min), max: F(t.max) }
364
- ), {
365
- adjustDateForQuarterly: H,
366
- adjustDateForMonthly: Z,
367
- adjustDateForWeekly: U,
368
- adjustStartDateInputForWeekly: v,
369
- adjustEndDateInputForWeekly: N,
370
- adjustStartDateInputForMonthly: P,
371
- adjustEndDateInputForMonthly: W,
372
- adjustStartDateInputForQuarterly: De,
373
- adjustEndDateInputForQuarterly: ie
374
- } = mt(t.firstDayOfWeek), { savedRanges: B, saveRange: Y, resetSavedRanges: V } = At(), k = (a) => a ? te(a, S.NUMERIC_DATE_YEAR_FIRST, {
375
- locale: D[l.value.substring(0, 2)] || D.enUS
376
- }) : "", Q = (a) => a ? te(a, S.HOUR_MINUTE_SECONDS, {
377
- locale: D[l.value.substring(0, 2)] || D.enUS
378
- }) : "", K = w(!1), ee = w(!1), j = w(!1), $ = w(!1), s = ce({
379
- startDate: t.dateFormData.startDate,
380
- endDate: t.dateFormData.endDate,
381
- startTime: t.dateFormData.startTime,
382
- endTime: t.dateFormData.endTime
383
- }), me = (a, i) => {
384
- let u = new Date(a);
385
- const [d, I, h] = i.split(":");
386
- return u = ht(u, parseInt(d, 10)), u = Ot(u, parseInt(I, 10)), u = wt(u, parseInt(h, 10)), u;
387
- }, fe = (a) => /^(?:[01]\d|2[01234]):(?:[012345]\d):(?:[012345]\d)$/.test(a), c = (a, i) => {
388
- const u = () => {
389
- if (i && b(i)) {
390
- const d = me(new Date(i), a);
391
- if (t.min && d < Ne(t.min, 0) || t.max && d > Ne(t.max, 0))
392
- return !1;
393
- }
394
- return !0;
395
- };
396
- return fe(a) && u();
397
- }, p = (a, i) => !i || !fe(i) || t.variant === "month" ? a : me(new Date(a), i), z = (a) => {
398
- s.startTime = Q(
399
- t.min && t.allowTimeInput && C(t.min, a.startDate) ? t.min : M(a.startDate)
400
- ), s.endTime = Q(
401
- t.max && t.allowTimeInput && C(t.max, a.endDate) ? t.max : F(a.endDate)
402
- ), r.startDate = p(a.startDate, s.startTime), r.endDate = p(a.endDate, s.endTime), r.range = null, t.granularities && V(), e(g.INPUT, {
403
- ...r,
404
- range: A.value
405
- });
406
- }, b = (a) => {
407
- const i = (d) => t.min && M(d) < M(t.min) || t.max && M(d) > M(t.max) ? !1 : t.isDateDisabled ? !t.isDateDisabled(M(d)) : !0;
408
- return /^\d{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])$/.test(a) && i(new Date(a));
409
- };
410
- Ye(() => {
411
- K.value = !!(t.dateFormData.startDate && !b(t.dateFormData.startDate)), t.allowTimeInput ? j.value = !!(t.dateFormData.startTime && !c(t.dateFormData.startTime, t.dateFormData.startDate)) : j.value = !1, ee.value = !!(t.dateFormData.endDate && !b(t.dateFormData.endDate)), t.allowTimeInput ? $.value = !!(t.dateFormData.endTime && !c(t.dateFormData.endTime, t.dateFormData.endDate)) : $.value = !1;
412
- });
413
- const ve = (a) => {
414
- var i;
415
- s.startDate = k(a), s.startTime ? j.value && (s.startTime = (i = t.dateFormData) == null ? void 0 : i.startTime) : s.startTime = Q(a), K.value = !1, j.value = !1, e(g.START_DATE_SELECTED, a);
416
- }, He = (a) => {
417
- var i;
418
- s.endDate = k(a), s.endTime ? $.value && (s.endTime = (i = t.dateFormData) == null ? void 0 : i.endTime) : s.endTime = Q(F(a)), ee.value = !1, $.value = !1;
419
- }, ge = (a) => {
420
- const i = t.value[a];
421
- if (i)
422
- return i;
423
- if (t.dateFormData[a] && b(t.dateFormData[a]))
424
- return new Date(t.dateFormData[a]);
425
- }, We = oe((a) => {
426
- var i;
427
- if (b(a)) {
428
- let u = a;
429
- switch (K.value = !1, (i = x.value) == null ? void 0 : i.type) {
430
- case "weekly":
431
- u = v(
432
- a,
433
- k,
434
- m.value.min,
435
- m.value.max
436
- ), s.startDate = u;
437
- break;
438
- case "monthly":
439
- u = P(
440
- a,
441
- k,
442
- m.value.min,
443
- m.value.max
444
- ), s.startDate = u;
445
- break;
446
- case "quarterly":
447
- u = De(
448
- a,
449
- k,
450
- m.value.min,
451
- m.value.max
452
- ), s.startDate = u;
453
- break;
454
- }
455
- const d = J(u);
456
- r.startDate = p(d, s.startTime), r.endDate = p(
457
- J(s.endDate),
458
- s.endTime
459
- ), b(s.endDate) && (r.endDate = p(
460
- J(s.endDate),
461
- s.endTime
462
- ));
463
- const I = ge("endDate");
464
- r.range = null, e(g.FORM_DATE, {
465
- startDate: d,
466
- endDate: I
467
- }), e(g.INPUT, {
468
- ...r,
469
- range: A.value
470
- });
471
- } else
472
- K.value = !0, e(g.ERROR, { ...s });
473
- }, Be), Ve = (a) => {
474
- s.startDate = Ce(a), We(s.startDate);
475
- }, Ke = oe((a) => {
476
- var i;
477
- if (b(a)) {
478
- let u = a;
479
- switch (ee.value = !1, (i = x.value) == null ? void 0 : i.type) {
480
- case "weekly":
481
- u = N(
482
- a,
483
- k,
484
- m.value.min,
485
- m.value.max
486
- ), s.endDate = u;
487
- break;
488
- case "monthly":
489
- u = W(
490
- a,
491
- k,
492
- m.value.min,
493
- m.value.max
494
- ), s.endDate = u;
495
- break;
496
- case "quarterly":
497
- u = ie(
498
- a,
499
- k,
500
- m.value.min,
501
- m.value.max
502
- ), s.endDate = u;
503
- break;
504
- }
505
- const d = J(u);
506
- r.endDate = p(d, s.endTime), b(s.startDate) && (r.startDate = p(
507
- J(s.startDate),
508
- s.startTime
509
- ));
510
- const I = ge("startDate");
511
- r.range = null, e(g.FORM_DATE, {
512
- startDate: I,
513
- endDate: d
514
- }), e(g.INPUT, {
515
- ...r,
516
- range: A.value
517
- });
518
- } else
519
- ee.value = !0, e(g.ERROR, { ...s });
520
- }, Be), ze = (a) => {
521
- s.endDate = Ce(a), Ke(s.endDate);
522
- }, Je = (a) => {
523
- ft(a);
524
- }, Xe = oe((a) => {
525
- if (c(a, t.dateFormData.startDate)) {
526
- j.value = !1, r.startDate = p(r.startDate, a);
527
- const i = ge("endDate");
528
- e(g.FORM_DATE, {
529
- startDate: r.startDate,
530
- endDate: i,
531
- startTime: a,
532
- endTime: s.endTime ?? t.dateFormData.endTime
533
- }), e(g.INPUT, {
534
- ...r,
535
- range: A.value
536
- });
537
- } else
538
- j.value = !0, e(g.ERROR, { ...s });
539
- }), Ze = oe((a) => {
540
- c(a, t.dateFormData.endDate) ? ($.value = !1, r.endDate = p(r.endDate, a), e(g.FORM_DATE, {
541
- startDate: r.startDate,
542
- endDate: r.endDate,
543
- startTime: s.startTime ?? t.dateFormData.startTime,
544
- endTime: a
545
- }), e(g.INPUT, {
546
- ...r,
547
- range: A.value
548
- })) : ($.value = !0, e(g.ERROR, { ...s }));
549
- }), et = (a) => {
550
- s.startTime = Pe(a), Xe(s.startTime);
551
- }, tt = (a) => {
552
- s.endTime = Pe(a), Ze(s.endTime);
553
- }, at = (a) => {
554
- Nt(a);
555
- }, le = (a, i, u, d) => {
556
- r.startDate = a, r.endDate = i, u && (r.granularity = u), d && (r.range = d);
557
- }, nt = (a) => {
558
- var u;
559
- const i = (u = t.quickSelectRanges) == null ? void 0 : u.find(({ value: d }) => d === a);
560
- if (i) {
561
- V();
562
- const d = i.data, I = d.endDate || (d.isRelativeToNow ? new Date(Date.now()) : F(new Date(Date.now()))), h = d.isRelativeToNow && d.timeDifference ? new Date(I.getTime() - d.timeDifference) : d.startDate;
563
- s.endDate = k(I), s.startDate = k(h), le(h, I, null, a), t.granularities && (r.granularity = d.granularity || y.value), s.startTime = Q(h), s.endTime = Q(I), r.startDate = h, r.endDate = I, d.isRelativeToNow && (f.value = {
564
- ...f.value,
565
- [a]: {
566
- startDate: h,
567
- endDate: I
568
- }
569
- }), e(g.CUSTOM_RANGE, {
570
- ...i.data,
571
- startDate: h,
572
- endDate: I,
573
- range: i.value
574
- });
575
- }
576
- }, rt = {
577
- weekly: U,
578
- monthly: Z,
579
- quarterly: H
580
- }, st = (a) => {
581
- const i = r.granularity;
582
- if (r.granularity = a, i && Y(i, structuredClone(ye(r))), r.startDate && r.endDate) {
583
- switch (a) {
584
- case "quarterly":
585
- case "monthly":
586
- case "weekly": {
587
- if (B[a]) {
588
- le(B[a].startDate, B[a].endDate, a);
589
- break;
590
- }
591
- const { startDate: u, endDate: d } = rt[a](
592
- r.startDate,
593
- r.endDate,
594
- m.value.min,
595
- m.value.max
596
- );
597
- le(u, d, a);
598
- break;
599
- }
600
- case "daily":
601
- B.daily && le(B.daily.startDate, B.daily.endDate, a);
602
- break;
603
- }
604
- s.startDate = k(r.startDate), s.endDate = k(r.endDate), e(g.INPUT, {
605
- ...r,
606
- range: A.value
607
- });
608
- }
609
- };
610
- return {
611
- // Values
612
- internalRangeDate: r,
613
- dateTextInput: s,
614
- endDateError: ee,
615
- endTimeError: $,
616
- granularityItems: E,
617
- selectedGranularity: x,
618
- computedMinMax: m,
619
- selectedRangeSelectorValue: A,
620
- startDateError: K,
621
- startTimeError: j,
622
- quickSelectRangeDefaultItems: R,
623
- formInputWrapperConditionalClasses: ne,
624
- // Methods
625
- hasSlot: pt(n),
626
- t: o,
627
- // Events
628
- onDateInput: z,
629
- onDateInputKeyDown: Je,
630
- onEndDateInput: ze,
631
- onEndDateSelected: He,
632
- onEndTimeInput: tt,
633
- onGranularityInput: st,
634
- onRangeSelectorInput: nt,
635
- onStartDateInput: Ve,
636
- onStartDateSelected: ve,
637
- onStartTimeInput: et,
638
- onTimeInputKeyDown: at
639
- };
640
- }
641
- });
642
- var qt = function() {
643
- var e = this, n = e._self._c;
644
- return e._self._setupProxy, n("div", { staticClass: "b-date-range-picker-calendar" }, [n("div", { staticClass: "b-date-range-picker-calendar__form-container" }, [n("div", { staticClass: "b-date-range-picker-calendar__form" }, [e.hasSlot("title") ? [e._t("title")] : e._e(), e.quickSelectRanges ? n("bento-dropdown", { attrs: { "aria-label": e.t("customRange"), items: e.quickSelectRangeDefaultItems, value: e.selectedRangeSelectorValue }, on: { input: e.onRangeSelectorInput } }) : e._e(), e.granularities ? n("bento-segmented-control", { attrs: { items: e.granularityItems, "model-value": e.internalRangeDate.granularity, "full-width": "" }, on: { "update:model-value": e.onGranularityInput } }) : e._e(), n("div", [n("bento-typography", { staticClass: "b-date-range-picker-calendar__label", attrs: { stronger: "", el: "span" } }, [e._v(" From ")]), n("div", { class: e.formInputWrapperConditionalClasses }, [n("bento-input-field", { staticClass: "b-date-range-picker-calendar__form-input", attrs: { "aria-label": e.t("dateFrom"), value: e.dateTextInput.startDate, error: e.startDateError }, on: { input: e.onStartDateInput, keydown: e.onDateInputKeyDown }, scopedSlots: e._u([{ key: "description", fn: function() {
645
- return [e._v("YYYY-MM-DD")];
646
- }, proxy: !0 }]) }), e.allowTimeInput ? n("bento-input-field", { staticClass: "b-date-range-picker-calendar__form-input", attrs: { "aria-label": e.t("timeFrom"), value: e.dateTextInput.startTime, error: e.startTimeError }, on: { input: e.onStartTimeInput, keydown: e.onTimeInputKeyDown }, scopedSlots: e._u([{ key: "description", fn: function() {
647
- return [e._v("HH:MM:SS")];
648
- }, proxy: !0 }], null, !1, 3442289499) }) : e._e()], 1)], 1), n("div", [n("bento-typography", { staticClass: "b-date-range-picker-calendar__label", attrs: { stronger: "", el: "span" } }, [e._v(" To ")]), n("div", { class: e.formInputWrapperConditionalClasses }, [n("bento-input-field", { staticClass: "b-date-range-picker-calendar__form-input", attrs: { "aria-label": e.t("dateTo"), value: e.dateTextInput.endDate, error: e.endDateError }, on: { input: e.onEndDateInput, keydown: e.onDateInputKeyDown }, scopedSlots: e._u([{ key: "description", fn: function() {
649
- return [e._v("YYYY-MM-DD")];
650
- }, proxy: !0 }]) }), e.allowTimeInput ? n("bento-input-field", { staticClass: "b-date-range-picker-calendar__form-input", attrs: { "aria-label": e.t("timeTo"), value: e.dateTextInput.endTime, error: e.endTimeError }, on: { input: e.onEndTimeInput, keydown: e.onTimeInputKeyDown }, scopedSlots: e._u([{ key: "description", fn: function() {
651
- return [e._v("HH:MM:SS")];
652
- }, proxy: !0 }], null, !1, 3442289499) }) : e._e()], 1)], 1)], 2), e.hasSlot("actions") ? n("div", [e._t("actions")], 2) : e._e()]), n("div", { staticClass: "b-date-range-picker-calendar__calendars-container" }, [n("calendar", { attrs: { value: e.internalRangeDate, "first-day-of-week": e.firstDayOfWeek, "is-date-disabled": e.isDateDisabled, "max-range": e.maxRange, min: e.computedMinMax.min, max: e.computedMinMax.max, "number-of-months": e.numberOfMonths, "show-end-date-on-open": e.showEndDateOnOpen, granularity: e.selectedGranularity, variant: e.variant, "is-range": "" }, on: { input: e.onDateInput, "start-date-selected": e.onStartDateSelected, "end-date-selected": e.onEndDateSelected } })], 1)]);
653
- }, Lt = [], Yt = /* @__PURE__ */ $e(
654
- Bt,
655
- qt,
656
- Lt,
657
- !1,
658
- null,
659
- "f113fd62"
660
- );
661
- const q = Yt.exports, Qt = ({
662
- datePickerValue: t,
663
- isDateIncorrect: e,
664
- quickSelectRanges: n,
665
- isMonthVariant: l
666
- }) => {
667
- var R, x, E, X;
668
- const { locale: o, t: D } = _e(), f = pe(), y = (m) => !!m && !isNaN(m.getTime()), r = (m, H) => y(m) ? te(m, H, {
669
- locale: f[o.value.substring(0, 2)] || f.enUS
670
- }) : void 0, T = ce({
671
- startDate: r((R = t.value) == null ? void 0 : R.startDate, S.NUMERIC_DATE_YEAR_FIRST),
672
- endDate: r((x = t.value) == null ? void 0 : x.endDate, S.NUMERIC_DATE_YEAR_FIRST),
673
- startTime: r((E = t.value) == null ? void 0 : E.startDate, S.HOUR_MINUTE_SECONDS),
674
- endTime: r((X = t.value) == null ? void 0 : X.endDate, S.HOUR_MINUTE_SECONDS)
675
- });
676
- return {
677
- // Values
678
- dateDisplayValue: _(() => {
679
- var U;
680
- if (e.value)
681
- return `${T.startDate || ""} - ${T.endDate || ""}`;
682
- if (!t.value || !t.value.startDate && !t.value.endDate)
683
- return D("selectDateRange");
684
- if ((U = n.value) != null && U.length) {
685
- const v = n.value.find(({ value: N }) => {
686
- var P;
687
- return N === ((P = t.value) == null ? void 0 : P.range);
688
- });
689
- if (v)
690
- return v.label;
691
- }
692
- if (t.value.granularity === "quarterly") {
693
- const { startDate: v, endDate: N } = t.value, P = D("quarter", { quarter: Ae(v), year: Fe(v) });
694
- if (kt(v, N))
695
- return P;
696
- const W = D("quarter", { quarter: Ae(N), year: Fe(N) });
697
- return `${P} - ${W}`;
698
- }
699
- const { startDate: m, endDate: H } = T, Z = l != null && l.value ? S.LONG_MONTH_YEAR : S.FULL_DATE_MONTH_FIRST;
700
- return `${r(J(m), Z)} - ${r(
701
- J(H),
702
- Z
703
- )}`;
704
- }),
705
- textInputDisplayValue: T,
706
- // Methods
707
- formatTextInputDisplayValue: () => ""
708
- };
709
- };
710
- var de = /* @__PURE__ */ ((t) => (t.INPUT = "input", t))(de || {});
711
- const jt = {
712
- "en-US": {
713
- apply: "Apply",
714
- cancel: "Cancel",
715
- dateRangePicker: "Date range picker {name}",
716
- provideDateInAFormat: "Provide date in a YYYY-MM-DD format",
717
- quarter: "Q{quarter} {year}",
718
- selectDate: "Select a date",
719
- selectDateRange: "Select a date range",
720
- selectedDateIsNotAvailable: "Selected date is not available"
721
- },
722
- "ja-JP": {
723
- apply: "適用",
724
- cancel: "キャンセル",
725
- selectDate: "日付を選択"
726
- },
727
- "pt-BR": {
728
- apply: "Aplicar",
729
- cancel: "Cancelar",
730
- selectDate: "Selecione uma data"
731
- }
732
- }, $t = Le({
733
- i18n: { messages: jt },
734
- name: "bento-date-range-picker",
735
- components: {
736
- BentoButtonActions: bt,
737
- BentoDivider: it,
738
- BentoTypography: Qe,
739
- BentoPopover: lt,
740
- DateRangePickerCalendar: q,
741
- DropdownInputDefault: ut,
742
- ErrorMessage: It,
743
- FieldLabel: Rt
744
- },
745
- directives: { BentoClickOutsideDirective: _t },
746
- props: {
747
- /**
748
- * Allows user to enter time values in the form
749
- */
750
- allowTimeInput: { type: Boolean, default: !1 },
751
- /**
752
- * Descriptive supporting text visbile underneath the dropdown.
753
- */
754
- description: { type: String, default: void 0 },
755
- /**
756
- * Disables dropdown functionality.
757
- */
758
- disabled: { type: Boolean, default: !1 },
759
- /**
760
- * Displays component in an error state with an error message
761
- */
762
- errorMessage: { type: String, default: null },
763
- /**
764
- * Allows user to set the first day of the week. 0 is sunday, 1 is monday, 6 is saturday
765
- */
766
- firstDayOfWeek: q.props.firstDayOfWeek,
767
- /**
768
- * A list of available granularities.
769
- * If present, the date picker will display a segmented control to change granularity.
770
- */
771
- granularities: q.props.granularities,
772
- /**
773
- * Indicate if a date should be disabled or not
774
- */
775
- isDateDisabled: q.props.isDateDisabled,
776
- /**
777
- * Text that is displayed as a label above the element.
778
- */
779
- label: { type: String, default: void 0 },
780
- /**
781
- * Upon opening date range picker, end date's month will be pre-selected.
782
- */
783
- showEndDateOnOpen: { type: Boolean, default: !1 },
784
- /**
785
- * Highlights the dropdown is optional.
786
- */
787
- optional: { type: Boolean, default: !1 },
788
- /**
789
- * The Boolean readonly property, when present, makes the element not mutable, meaning the user can not edit the date range picker.
790
- */
791
- readonly: { type: Boolean, default: !1 },
792
- /**
793
- * Highlights the dropdown is required.
794
- */
795
- required: { type: Boolean, default: !1 },
796
- /**
797
- * Adds a info icon next to the label to display the passed tooltip message.
798
- */
799
- tooltipText: { type: String, default: null },
800
- /**
801
- * Enables the range selector.
802
- * If provided, must be an array that sets the custom range dropdown items. Items are of the structure:
803
- * `label` - label of custom range item.
804
- * `value` - a unique key of the custom range item.
805
- * `data` - an object `{ startDate: Date; endDate: Date }` to set the date picker range to upon selecting.
806
- */
807
- quickSelectRanges: {
808
- type: Array,
809
- default: void 0
810
- },
811
- /**
812
- * Set a maximum number of dates to be selectable by the range.
813
- */
814
- maxRange: q.props.maxRange,
815
- /**
816
- * Sets a minimum limit for selectable dates - dates before `min` will not be selectable
817
- */
818
- min: q.props.min,
819
- /**
820
- * Sets a maximum limit for selectable dates - dates after `max` will not be selectable
821
- */
822
- max: q.props.max,
823
- /**
824
- * Number of months rendered on pane
825
- */
826
- numberOfMonths: q.props.numberOfMonths,
827
- /**
828
- * Selected date
829
- */
830
- value: q.props.value,
831
- /**
832
- * The type of calendar to display. Defaults to showing days.
833
- */
834
- variant: {
835
- type: String,
836
- default: void 0
837
- // Default will be set by @/internal/calendar
838
- },
839
- /**
840
- * Enables the date picker selection to persist until it is explicitly applied.
841
- * Displays a set of buttons: Apply and Cancel.
842
- *
843
- * @deprecated This will be the default behaviour in v2.0.0.
844
- */
845
- hasActions: { type: Boolean, default: !1 }
846
- },
847
- emits: [de.INPUT],
848
- setup(t, { emit: e }) {
849
- const { locale: n, t: l } = _e(), o = pe(), D = re("bento-date-range-picker-container"), f = re("bento-date-range-picker-label"), y = re("bento-date-range-picker-description"), r = re("bento-date-range-picker-error"), T = re("bento-date-range-picker-date-error"), A = _(
850
- () => t.label || l("dateRangePicker", { name: D })
851
- ), ne = _(() => (t == null ? void 0 : t.quickSelectRanges) && t.quickSelectRanges.map((c) => {
852
- const p = c.data.endDate ? void 0 : new Date(Date.now()).getTime() - c.data.startDate.getTime();
853
- return {
854
- ...c,
855
- data: {
856
- ...c.data,
857
- // Adding timeDifference to calculate an up-to-date endDate on range selection
858
- timeDifference: p
859
- }
860
- };
861
- })), R = w(!1), x = w(null), E = w(!1), { isReadOnly: X } = vt(ke(t, "readonly"));
862
- Te(
863
- () => t.disabled,
864
- () => {
865
- t.disabled && E.value && (E.value = !1);
866
- }
867
- );
868
- const m = _(() => t.hasActions ? !V.value && R.value : R.value), H = _(() => ({
869
- "b-date-range-picker__description--error": !!t.errorMessage || m.value
870
- })), Z = _(() => t.variant === "month"), { dateDisplayValue: U, textInputDisplayValue: v } = Qt({
871
- datePickerValue: ke(t, "value"),
872
- isDateIncorrect: R,
873
- quickSelectRanges: ne,
874
- isMonthVariant: Z
875
- }), N = _(
876
- () => `${t.description ? y : ""} ${t.errorMessage ? r : ""} ${R.value ? T : ""}`.trim() || null
877
- ), P = _(() => t.allowTimeInput && t.variant !== "month"), W = () => {
878
- E.value = !1;
879
- }, De = () => {
880
- E.value = !0;
881
- }, ie = w(U.value), B = w(
882
- // textInputDisplayValue is a reactive object
883
- structuredClone(ye(v))
884
- ), Y = w(t.value), V = w(!0), k = _(
885
- () => t.hasActions ? B.value : v
886
- ), Q = _(
887
- () => t.hasActions ? ie.value : U.value
888
- );
889
- Ye(() => {
890
- if (t.hasActions || ot(
891
- 'BentoDateRangePicker "hasActions" property',
892
- `Set the BentoDateRangePicker "hasActions" property true which will display the "Apply" and "Cancel" buttons.
893
- This will be the default behavior in the v2 and "hasActions" will be removed.`,
894
- "2.0.0"
895
- ), t.granularities && t.variant !== "month" && t.granularities.find(({ type: c }) => c === "quarterly"))
896
- throw new Error(
897
- 'Quarterly granularity is only supported by BentoDateRangePicker with variant: "month"'
898
- );
899
- }), Te(
900
- () => t.value,
901
- () => {
902
- ie.value = U.value, B.value = structuredClone(ye(v));
903
- }
904
- );
905
- const K = _(() => [
906
- {
907
- title: l("apply"),
908
- event: () => {
909
- e(de.INPUT, Y.value), W(), V.value = !0;
910
- },
911
- disabled: V.value
912
- },
913
- {
914
- title: l("cancel"),
915
- event: W
916
- }
917
- ]);
918
- return Te(Y, (c) => {
919
- if (t.hasActions) {
920
- V.value = R.value;
921
- return;
922
- }
923
- e(de.INPUT, c);
924
- }), {
925
- // Refs
926
- inputContainerRef: x,
927
- // Values,
928
- adjustedQuickSelectRanges: ne,
929
- dateDisplayValue: U,
930
- datePickerContainerId: D,
931
- descriptionConditionalClasses: H,
932
- displayedTextInputValue: k,
933
- displayedDateValue: Q,
934
- isDateIncorrect: R,
935
- isDateRangePickerOpen: E,
936
- isReadOnly: X,
937
- labelId: f,
938
- descriptionId: y,
939
- dateErrorId: T,
940
- errorId: r,
941
- popoverAriaLabel: A,
942
- shouldDisplayError: m,
943
- ariaDescribedBy: N,
944
- textInputDisplayValue: v,
945
- rangePickerButtonActions: K,
946
- BentoButtonActionsLayout: St,
947
- withTimeInput: P,
948
- // Events
949
- closeDateRangePicker: W,
950
- clearDateRangePickerValue: async () => {
951
- R.value && (R.value = !1), Y.value = null;
952
- },
953
- openDateRangePicker: De,
954
- onRangeSelectorInput: (c) => {
955
- if (c) {
956
- const p = (b, ve) => b ? te(b, ve, {
957
- locale: o[n.value.substring(0, 2)] || o.enUS
958
- }) : void 0, z = (b) => te(b, S.NUMERIC_DATE_YEAR_FIRST, {
959
- locale: o[n.value.substring(0, 2)] || o.enUS
960
- });
961
- v.startDate = z(c.startDate), v.endDate = z(c.endDate), v.startTime = p(
962
- c.startDate,
963
- S.HOUR_MINUTE_SECONDS
964
- ), v.endTime = p(
965
- c.endDate,
966
- S.HOUR_MINUTE_SECONDS
967
- ), Y.value = c;
968
- }
969
- },
970
- onEnterPressedOverInput: () => {
971
- if (!E.value) {
972
- E.value = !0;
973
- return;
974
- }
975
- R.value || (E.value = !1);
976
- },
977
- onDateRangePickerInput: (c) => {
978
- R.value = !1;
979
- const p = (z, b) => z ? te(z, b, {
980
- locale: o[n.value.substring(0, 2)] || o.enUS
981
- }) : void 0;
982
- v.startDate = p(
983
- c.startDate,
984
- S.NUMERIC_DATE_YEAR_FIRST
985
- ), v.endDate = p(c.endDate, S.NUMERIC_DATE_YEAR_FIRST), v.startTime = p(c.startDate, S.HOUR_MINUTE_SECONDS), v.endTime = p(c.endDate, S.HOUR_MINUTE_SECONDS), Y.value = c;
986
- },
987
- onDateRangePickerError: (c) => {
988
- R.value = !0, v.startDate = c.startDate, v.endDate = c.endDate, Y.value = { startDate: null, endDate: null };
989
- },
990
- onDateRangePickerFormDateInputUpdate: (c) => {
991
- R.value = !1, c.startTime && (v.startTime = c.startTime), c.endTime && (v.endTime = c.endTime);
992
- },
993
- // Translations
994
- t: l
995
- };
996
- }
997
- });
998
- var Gt = function() {
999
- var e = this, n = e._self._c;
1000
- return e._self._setupProxy, n("div", { directives: [{ name: "bento-click-outside-directive", rawName: "v-bento-click-outside-directive", value: e.closeDateRangePicker, expression: "closeDateRangePicker" }], staticClass: "b-date-range-picker" }, [e.label ? n("field-label", { attrs: { id: e.labelId, label: e.label, "tooltip-text": e.tooltipText, optional: e.optional, required: e.required } }) : e._e(), n("div", { on: { keydown: function(l) {
1001
- return !l.type.indexOf("key") && e._k(l.keyCode, "enter", 13, l.key, "Enter") ? null : e.onEnterPressedOverInput.apply(null, arguments);
1002
- } } }, [n("dropdown-input-default", { ref: "inputContainerRef", attrs: { "always-combobox-is-input": "", ariaControls: e.datePickerContainerId, ariaExpanded: e.isDateRangePickerOpen, "aria-labelledby": e.label ? e.labelId : null, "aria-describedby": e.ariaDescribedBy, disabled: e.disabled, "is-invalid": !!e.errorMessage || e.shouldDisplayError, open: e.isDateRangePickerOpen, "display-value": e.displayedDateValue, readonly: e.isReadOnly }, on: { open: e.openDateRangePicker, clear: e.clearDateRangePickerValue, close: e.closeDateRangePicker } })], 1), e.shouldDisplayError ? n("error-message", { staticClass: "b-date-range-picker__error-message", attrs: { id: e.dateErrorId, "error-message": e.t("provideDateInAFormat") } }) : e._e(), e.errorMessage ? n("error-message", { staticClass: "b-date-range-picker__error-message", attrs: { id: e.errorId, "error-message": e.errorMessage } }) : e._e(), e.description ? n("bento-typography", { staticClass: "b-date-range-picker__description", class: e.descriptionConditionalClasses, attrs: { id: e.descriptionId, el: "span" } }, [e._v(" " + e._s(e.description) + " ")]) : e._e(), e.inputContainerRef ? n("bento-popover", { staticClass: "b-date-range-picker__container", attrs: { id: e.datePickerContainerId, open: e.isDateRangePickerOpen, "target-element": e.inputContainerRef, "disable-focus-trap": !0, "aria-label": e.popoverAriaLabel, position: "bottom-start", "without-space": "", "fit-content": "" } }, [n("date-range-picker-calendar", { attrs: { "allow-time-input": e.withTimeInput, "quick-select-ranges": e.adjustedQuickSelectRanges, value: e.value, "first-day-of-week": e.firstDayOfWeek, granularities: e.granularities, "is-date-disabled": e.isDateDisabled, "max-range": e.maxRange, min: e.min, max: e.max, "number-of-months": e.numberOfMonths, "show-end-date-on-open": e.showEndDateOnOpen, "date-form-data": e.displayedTextInputValue, variant: e.variant }, on: { "custom-range": e.onRangeSelectorInput, input: e.onDateRangePickerInput, error: e.onDateRangePickerError, "form-date": e.onDateRangePickerFormDateInputUpdate }, scopedSlots: e._u([e.hasActions ? { key: "actions", fn: function() {
1003
- return [n("bento-divider"), n("div", { staticClass: "b-date-range-picker__footer" }, [n("bento-button-actions", { attrs: { actions: e.rangePickerButtonActions, layout: e.BentoButtonActionsLayout.SPACE_BETWEEN } })], 1)];
1004
- }, proxy: !0 } : null], null, !0) })], 1) : e._e()], 1);
1005
- }, Ht = [], Wt = /* @__PURE__ */ $e(
1006
- $t,
1007
- Gt,
1008
- Ht,
1009
- !1,
1010
- null,
1011
- "288c6da8"
1012
- );
1013
- const ga = Wt.exports;
1014
- export {
1015
- ga as B,
1016
- q as D,
1017
- de as a,
1018
- Et as b,
1019
- ue as i
1020
- };
1021
- //# sourceMappingURL=date-range-picker.CIaKRXIQ.js.map