@adyen/bento-vue3 1.6.1 → 1.7.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 (286) hide show
  1. package/dist/@types/components.d.ts +2 -0
  2. package/dist/@types/packages/core/src/components/button/button.types.d.ts +3 -1
  3. package/dist/@types/packages/vue2/src/components/action-bar/action-bar.vue.d.ts +45 -0
  4. package/dist/@types/packages/vue2/src/components/action-bar/index.d.ts +1 -0
  5. package/dist/@types/packages/vue2/src/components/alert/alert.vue.d.ts +4 -4
  6. package/dist/@types/packages/vue2/src/components/avatar-image/avatar-image.vue.d.ts +1 -1
  7. package/dist/@types/packages/vue2/src/components/button/button.vue.d.ts +229 -220
  8. package/dist/@types/packages/vue2/src/components/button/components/button-actions/button-actions.vue.d.ts +9 -0
  9. package/dist/@types/packages/vue2/src/components/button/components/loading-button/loading-button.vue.d.ts +3 -3
  10. package/dist/@types/packages/vue2/src/components/checkbox/checkbox.vue.d.ts +1 -1
  11. package/dist/@types/packages/vue2/src/components/checkbox/components/checkbox-group/checkbox-group.vue.d.ts +5 -5
  12. package/dist/@types/packages/vue2/src/components/code-snippet/code-snippet.vue.d.ts +1 -1
  13. package/dist/@types/packages/vue2/src/components/country/country.vue.d.ts +4 -3
  14. package/dist/@types/packages/vue2/src/components/data-grid/data-grid.vue.d.ts +44 -46
  15. package/dist/@types/packages/vue2/src/components/date/date.vue.d.ts +1 -1
  16. package/dist/@types/packages/vue2/src/components/date-picker/date-picker.vue.d.ts +8 -2
  17. package/dist/@types/packages/vue2/src/components/date-range-picker/components/date-range-picker-calendar/date-range-picker-calendar.vue.d.ts +6 -0
  18. package/dist/@types/packages/vue2/src/components/date-range-picker/date-range-picker.vue.d.ts +8 -2
  19. package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue.d.ts +1 -1
  20. package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-default-textbox/dropdown-default-textbox.vue.d.ts +1 -1
  21. package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-options-container/dropdown-options-container.vue.d.ts +46 -28
  22. package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-small-textbox/dropdown-small-textbox.vue.d.ts +1 -1
  23. package/dist/@types/packages/vue2/src/components/dropdown/dropdown.types.d.ts +2 -0
  24. package/dist/@types/packages/vue2/src/components/dropdown/dropdown.vue.d.ts +22 -4
  25. package/dist/@types/packages/vue2/src/components/empty-state/empty-state.vue.d.ts +5 -2
  26. package/dist/@types/packages/vue2/src/components/filter-bar/components/all-filters-modal/all-filters-modal.vue.d.ts +802 -52
  27. package/dist/@types/packages/vue2/src/components/filter-bar/components/boolean-filter/boolean-filter.vue.d.ts +12 -5
  28. package/dist/@types/packages/vue2/src/components/filter-bar/components/filter-bar-button/filter-bar-button.vue.d.ts +1 -1
  29. package/dist/@types/packages/vue2/src/components/filter-bar/filter-bar.types.d.ts +12 -2
  30. package/dist/@types/packages/vue2/src/components/filter-bar/filter-bar.vue.d.ts +10 -0
  31. package/dist/@types/packages/vue2/src/components/form-layout/components/form-layout-field-tip/form-layout-field-tip.vue.d.ts +3 -3
  32. package/dist/@types/packages/vue2/src/components/header/header.vue.d.ts +1 -1
  33. package/dist/@types/packages/vue2/src/components/info-icon/info-icon.vue.d.ts +3 -3
  34. package/dist/@types/packages/vue2/src/components/input-field/input-field.vue.d.ts +2 -2
  35. package/dist/@types/packages/vue2/src/components/internal/button-actions-with-menu/button-actions-with-menu.vue.d.ts +21 -0
  36. package/dist/@types/packages/vue2/src/components/internal/calendar/calendar.vue.d.ts +6 -0
  37. package/dist/@types/packages/vue2/src/components/internal/calendar/components/calendar-month/calendar-month.vue.d.ts +19 -0
  38. package/dist/@types/packages/vue2/src/components/internal/controls-group/controls-group.vue.d.ts +1 -1
  39. package/dist/@types/packages/vue2/src/components/internal/fixed-scroller/fixed-scroller.vue.d.ts +22 -1
  40. package/dist/@types/packages/vue2/src/components/internal/listbox/listbox.vue.d.ts +64 -7
  41. package/dist/@types/packages/vue2/src/components/internal/teleport/index.d.ts +1 -0
  42. package/dist/@types/packages/vue2/src/components/internal/teleport/teleport.vue.d.ts +50 -0
  43. package/dist/@types/packages/vue2/src/components/link/link.vue.d.ts +1 -1
  44. package/dist/@types/packages/vue2/src/components/menu/menu.keys.d.ts +1 -0
  45. package/dist/@types/packages/vue2/src/components/menu/menu.vue.d.ts +15 -11
  46. package/dist/@types/packages/vue2/src/components/pagination/components/pagination-context/pagination-context.vue.d.ts +9 -0
  47. package/dist/@types/packages/vue2/src/components/pagination/pagination.vue.d.ts +10 -1
  48. package/dist/@types/packages/vue2/src/components/payment-method/payment-method.vue.d.ts +1 -0
  49. package/dist/@types/packages/vue2/src/components/popover/popover.vue.d.ts +4 -4
  50. package/dist/@types/packages/vue2/src/components/popper-container/popper-container.vue.d.ts +5 -5
  51. package/dist/@types/packages/vue2/src/components/radio-group/radio-group.vue.d.ts +10 -5
  52. package/dist/@types/packages/vue2/src/components/segmented-control/components/segmented-control-button/segmented-control-button.vue.d.ts +21 -0
  53. package/dist/@types/packages/vue2/src/components/segmented-control/segmented-control.vue.d.ts +21 -5
  54. package/dist/@types/packages/vue2/src/components/stepper/stepper.vue.d.ts +3 -3
  55. package/dist/@types/packages/vue2/src/components/structured-list/components/structered-list-item/structured-list-item.vue.d.ts +1 -1
  56. package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item/summary-grid-item.vue.d.ts +1 -2
  57. package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item-amount/summary-grid-item-amount.vue.d.ts +1 -1
  58. package/dist/@types/packages/vue2/src/components/summary-grid/summary-grid.keys.d.ts +1 -0
  59. package/dist/@types/packages/vue2/src/components/summary-grid/summary-grid.types.d.ts +3 -0
  60. package/dist/@types/packages/vue2/src/components/tabs/components/tab.types.d.ts +1 -0
  61. package/dist/@types/packages/vue2/src/components/tabs/components/tab.vue.d.ts +9 -0
  62. package/dist/@types/packages/vue2/src/components/tabs/tabs.types.d.ts +1 -0
  63. package/dist/@types/packages/vue2/src/components/tabs/tabs.vue.d.ts +2 -0
  64. package/dist/@types/packages/vue2/src/components/textarea/textarea.vue.d.ts +5 -5
  65. package/dist/@types/packages/vue2/src/components/timeline/components/timeline-item/timeline-item.vue.d.ts +7 -4
  66. package/dist/@types/packages/vue2/src/components/timeline/timeline.types.d.ts +9 -2
  67. package/dist/@types/packages/vue2/src/components/tooltip/tooltip.vue.d.ts +15 -15
  68. package/dist/@types/packages/vue2/src/components/tutorial/components/tutorial-popover/components/tutorial-indicator/index.d.ts +1 -0
  69. package/dist/@types/packages/vue2/src/components/tutorial/components/tutorial-popover/components/tutorial-indicator/tutorial-indicator.vue.d.ts +12 -0
  70. package/dist/@types/packages/vue2/src/components/tutorial/components/tutorial-popover/index.d.ts +1 -0
  71. package/dist/@types/packages/vue2/src/components/tutorial/components/tutorial-popover/tutorial-popover.vue.d.ts +173 -0
  72. package/dist/@types/packages/vue2/src/components/tutorial/index.d.ts +2 -0
  73. package/dist/@types/packages/vue2/src/components/tutorial/tutorial.types.d.ts +13 -0
  74. package/dist/@types/packages/vue2/src/components/tutorial/tutorial.vue.d.ts +16 -0
  75. package/dist/@types/packages/vue2/src/composables/index.d.ts +5 -2
  76. package/dist/@types/packages/vue2/src/composables/use-click-outside/use-click-outside.d.ts +3 -0
  77. package/dist/@types/packages/vue2/src/composables/use-form-validate/index.d.ts +2 -0
  78. package/dist/@types/packages/vue2/src/composables/use-form-validate/use-form.d.ts +12 -0
  79. package/dist/@types/packages/vue2/src/composables/use-form-validate/use-form.types.d.ts +5 -0
  80. package/dist/@types/packages/vue2/src/composables/use-virtual-list/index.d.ts +2 -0
  81. package/dist/@types/packages/vue2/src/composables/use-virtual-list/use-virtual-list.d.ts +15 -0
  82. package/dist/@types/packages/vue2/src/composables/use-virtual-list/use-virtual-list.types.d.ts +20 -0
  83. package/dist/@types/packages/vue2/src/index.d.ts +1 -0
  84. package/dist/@types/packages/vue2/src/templates/data-grid-template/data-grid-template.vue.d.ts +4 -4
  85. package/dist/@types/packages/vue2/src/types/listbox.d.ts +12 -0
  86. package/dist/accordion.js +52 -43
  87. package/dist/accordion.js.map +1 -1
  88. package/dist/action-bar.js +210 -0
  89. package/dist/action-bar.js.map +1 -0
  90. package/dist/alert.js +3 -3
  91. package/dist/assets/base-modal.css +1 -1
  92. package/dist/assets/button-actions-with-menu.css +1 -0
  93. package/dist/assets/button.css +1 -1
  94. package/dist/assets/calendar.css +1 -1
  95. package/dist/assets/checkbox.css +1 -1
  96. package/dist/assets/checkmark.css +1 -0
  97. package/dist/assets/chevron-left.css +1 -0
  98. package/dist/assets/dropdown-default-textbox.css +1 -1
  99. package/dist/assets/dropdown.css +1 -1
  100. package/dist/assets/fixed-scroller.css +1 -0
  101. package/dist/assets/index.css +1 -1
  102. package/dist/assets/index10.css +1 -1
  103. package/dist/assets/index11.css +1 -1
  104. package/dist/assets/index12.css +1 -1
  105. package/dist/assets/index13.css +1 -1
  106. package/dist/assets/index14.css +1 -1
  107. package/dist/assets/index15.css +1 -1
  108. package/dist/assets/index16.css +1 -1
  109. package/dist/assets/index17.css +1 -1
  110. package/dist/assets/index18.css +1 -1
  111. package/dist/assets/index19.css +1 -1
  112. package/dist/assets/index2.css +1 -1
  113. package/dist/assets/index20.css +1 -1
  114. package/dist/assets/index21.css +1 -1
  115. package/dist/assets/index22.css +1 -1
  116. package/dist/assets/index23.css +1 -1
  117. package/dist/assets/index24.css +1 -1
  118. package/dist/assets/index25.css +1 -1
  119. package/dist/assets/index26.css +1 -1
  120. package/dist/assets/index27.css +1 -1
  121. package/dist/assets/index28.css +1 -1
  122. package/dist/assets/index29.css +1 -1
  123. package/dist/assets/index3.css +1 -1
  124. package/dist/assets/index30.css +1 -1
  125. package/dist/assets/index31.css +1 -1
  126. package/dist/assets/index32.css +1 -1
  127. package/dist/assets/index33.css +1 -1
  128. package/dist/assets/index34.css +1 -1
  129. package/dist/assets/index35.css +1 -1
  130. package/dist/assets/index36.css +1 -1
  131. package/dist/assets/index37.css +1 -1
  132. package/dist/assets/index38.css +1 -1
  133. package/dist/assets/index39.css +1 -1
  134. package/dist/assets/index40.css +1 -1
  135. package/dist/assets/index41.css +1 -1
  136. package/dist/assets/index42.css +1 -1
  137. package/dist/assets/index43.css +1 -1
  138. package/dist/assets/index44.css +1 -1
  139. package/dist/assets/index45.css +1 -1
  140. package/dist/assets/index46.css +1 -0
  141. package/dist/assets/index5.css +1 -1
  142. package/dist/assets/index6.css +1 -1
  143. package/dist/assets/index7.css +1 -1
  144. package/dist/assets/index8.css +1 -1
  145. package/dist/assets/index9.css +1 -1
  146. package/dist/assets/listbox.css +1 -1
  147. package/dist/assets/refresh.css +1 -0
  148. package/dist/avatar-image.js +1 -1
  149. package/dist/badge.js +1 -1
  150. package/dist/button.js +30 -22
  151. package/dist/button.js.map +1 -1
  152. package/dist/card.js +84 -84
  153. package/dist/card.js.map +1 -1
  154. package/dist/checkbox.js +6 -6
  155. package/dist/chunks/{base-button.4b5ab17e.js → base-button.7897a95e.js} +2 -2
  156. package/dist/chunks/{base-button.4b5ab17e.js.map → base-button.7897a95e.js.map} +1 -1
  157. package/dist/chunks/{base-modal.53a229ac.js → base-modal.0c85e7cb.js} +4 -4
  158. package/dist/chunks/{base-modal.53a229ac.js.map → base-modal.0c85e7cb.js.map} +1 -1
  159. package/dist/chunks/button-actions-with-menu.fa35390c.js +107 -0
  160. package/dist/chunks/button-actions-with-menu.fa35390c.js.map +1 -0
  161. package/dist/chunks/{button.975d0bb8.js → button.e5177388.js} +44 -36
  162. package/dist/chunks/button.e5177388.js.map +1 -0
  163. package/dist/chunks/{calendar.cc37ac1f.js → calendar.c83d4e99.js} +274 -250
  164. package/dist/chunks/calendar.c83d4e99.js.map +1 -0
  165. package/dist/chunks/{checkbox.67ceb148.js → checkbox.3cdbdd52.js} +7 -7
  166. package/dist/chunks/{checkbox.67ceb148.js.map → checkbox.3cdbdd52.js.map} +1 -1
  167. package/dist/chunks/checkmark.83e4f1e0.js +30 -0
  168. package/dist/chunks/checkmark.83e4f1e0.js.map +1 -0
  169. package/dist/chunks/{chevron-right.aef416c6.js → chevron-left.2fd6b083.js} +10 -10
  170. package/dist/chunks/chevron-left.2fd6b083.js.map +1 -0
  171. package/dist/chunks/{controls-group.7214dc7f.js → controls-group.38b436f6.js} +2 -2
  172. package/dist/chunks/{controls-group.7214dc7f.js.map → controls-group.38b436f6.js.map} +1 -1
  173. package/dist/chunks/{copy.7a73d1fd.js → copy.86236c8d.js} +4 -4
  174. package/dist/chunks/{copy.7a73d1fd.js.map → copy.86236c8d.js.map} +1 -1
  175. package/dist/chunks/{dropdown-default-textbox.0f878a8d.js → dropdown-default-textbox.0b38fac3.js} +4 -4
  176. package/dist/chunks/dropdown-default-textbox.0b38fac3.js.map +1 -0
  177. package/dist/chunks/{dropdown.7a104ce3.js → dropdown.afff433b.js} +144 -110
  178. package/dist/chunks/dropdown.afff433b.js.map +1 -0
  179. package/dist/chunks/{error-message.b91afffc.js → error-message.64e1964b.js} +2 -2
  180. package/dist/chunks/{error-message.b91afffc.js.map → error-message.64e1964b.js.map} +1 -1
  181. package/dist/chunks/fixed-scroller.e5aa7b00.js +148 -0
  182. package/dist/chunks/fixed-scroller.e5aa7b00.js.map +1 -0
  183. package/dist/chunks/{footer-actions.13f19a22.js → footer-actions.1ce44374.js} +3 -3
  184. package/dist/chunks/{footer-actions.13f19a22.js.map → footer-actions.1ce44374.js.map} +1 -1
  185. package/dist/chunks/{index.7f24db66.js → index.2bd3812b.js} +2 -2
  186. package/dist/chunks/{index.7f24db66.js.map → index.2bd3812b.js.map} +1 -1
  187. package/dist/chunks/{index.1dc4ebae.js → index.369b0e66.js} +112 -92
  188. package/dist/chunks/index.369b0e66.js.map +1 -0
  189. package/dist/chunks/{index.536bcb56.js → index.6a665ade.js} +3 -3
  190. package/dist/chunks/{index.536bcb56.js.map → index.6a665ade.js.map} +1 -1
  191. package/dist/chunks/{index.4c951e0d.js → index.77f35162.js} +6 -6
  192. package/dist/chunks/{index.4c951e0d.js.map → index.77f35162.js.map} +1 -1
  193. package/dist/chunks/index.bcc58fdd.js +1334 -0
  194. package/dist/chunks/index.bcc58fdd.js.map +1 -0
  195. package/dist/chunks/index.c207e9ab.js +602 -0
  196. package/dist/chunks/index.c207e9ab.js.map +1 -0
  197. package/dist/chunks/{index.6700224a.js → index.e579bc02.js} +2 -2
  198. package/dist/chunks/{index.6700224a.js.map → index.e579bc02.js.map} +1 -1
  199. package/dist/chunks/{index.d68847b0.js → index.fa7b44f1.js} +2 -2
  200. package/dist/chunks/{index.d68847b0.js.map → index.fa7b44f1.js.map} +1 -1
  201. package/dist/chunks/{listbox-option-tag.0f31ecb2.js → listbox-option-tag.809ec40e.js} +3 -3
  202. package/dist/chunks/{listbox-option-tag.0f31ecb2.js.map → listbox-option-tag.809ec40e.js.map} +1 -1
  203. package/dist/chunks/listbox.f6e5a11d.js +1306 -0
  204. package/dist/chunks/listbox.f6e5a11d.js.map +1 -0
  205. package/dist/chunks/{loading-button.6523a015.js → loading-button.746b7fa1.js} +2 -2
  206. package/dist/chunks/{loading-button.6523a015.js.map → loading-button.746b7fa1.js.map} +1 -1
  207. package/dist/chunks/refresh.c38c9eee.js +30 -0
  208. package/dist/chunks/refresh.c38c9eee.js.map +1 -0
  209. package/dist/chunks/summary-grid.keys.1d1028c2.js +5 -0
  210. package/dist/chunks/summary-grid.keys.1d1028c2.js.map +1 -0
  211. package/dist/chunks/{tooltip.b5391514.js → tooltip.f769eb14.js} +54 -51
  212. package/dist/chunks/{tooltip.b5391514.js.map → tooltip.f769eb14.js.map} +1 -1
  213. package/dist/code-snippet.js +6 -6
  214. package/dist/code-snippet.js.map +1 -1
  215. package/dist/country.js +553 -541
  216. package/dist/country.js.map +1 -1
  217. package/dist/currency.js +1 -1
  218. package/dist/data-grid.js +10 -10
  219. package/dist/data-grid.js.map +1 -1
  220. package/dist/date-picker.js +129 -118
  221. package/dist/date-picker.js.map +1 -1
  222. package/dist/date-range-picker.js +2 -2
  223. package/dist/date.js +1 -1
  224. package/dist/divider.js +1 -1
  225. package/dist/dropdown.js +4 -4
  226. package/dist/empty-state.js +44 -42
  227. package/dist/empty-state.js.map +1 -1
  228. package/dist/filter-bar.js +696 -683
  229. package/dist/filter-bar.js.map +1 -1
  230. package/dist/focus-trap.js +1 -1
  231. package/dist/form-layout.js +3 -3
  232. package/dist/header.js +121 -198
  233. package/dist/header.js.map +1 -1
  234. package/dist/image.js +4 -4
  235. package/dist/index.js +164 -158
  236. package/dist/index.js.map +1 -1
  237. package/dist/info-icon.js +8 -8
  238. package/dist/input-field.js +7 -7
  239. package/dist/internal.js +20 -144
  240. package/dist/internal.js.map +1 -1
  241. package/dist/link.js +2 -2
  242. package/dist/loading-indicator.js +1 -1
  243. package/dist/menu.js +3 -592
  244. package/dist/menu.js.map +1 -1
  245. package/dist/modal.js +3 -3
  246. package/dist/pagination.js +37 -21
  247. package/dist/pagination.js.map +1 -1
  248. package/dist/payment-method.js +50 -40
  249. package/dist/payment-method.js.map +1 -1
  250. package/dist/popover.js +16 -16
  251. package/dist/popper-container.js +6 -1276
  252. package/dist/popper-container.js.map +1 -1
  253. package/dist/radio-group.js +128 -97
  254. package/dist/radio-group.js.map +1 -1
  255. package/dist/search-bar.js +2 -2
  256. package/dist/segmented-control.js +130 -106
  257. package/dist/segmented-control.js.map +1 -1
  258. package/dist/sidepanel.js +94 -91
  259. package/dist/sidepanel.js.map +1 -1
  260. package/dist/status.js +2 -2
  261. package/dist/stepper.js +3 -3
  262. package/dist/structured-list.js +1 -1
  263. package/dist/summary-grid.js +146 -163
  264. package/dist/summary-grid.js.map +1 -1
  265. package/dist/tabs.js +128 -99
  266. package/dist/tabs.js.map +1 -1
  267. package/dist/tag.js +3 -3
  268. package/dist/textarea.js +4 -4
  269. package/dist/timeline.js +216 -203
  270. package/dist/timeline.js.map +1 -1
  271. package/dist/toast.js +3 -3
  272. package/dist/toggle.js +6 -6
  273. package/dist/tutorial.js +375 -0
  274. package/dist/tutorial.js.map +1 -0
  275. package/dist/typography.js +1 -1
  276. package/dist/web-types.json +1 -1
  277. package/package.json +5 -2
  278. package/dist/assets/chevron-right.css +0 -1
  279. package/dist/chunks/button.975d0bb8.js.map +0 -1
  280. package/dist/chunks/calendar.cc37ac1f.js.map +0 -1
  281. package/dist/chunks/chevron-right.aef416c6.js.map +0 -1
  282. package/dist/chunks/dropdown-default-textbox.0f878a8d.js.map +0 -1
  283. package/dist/chunks/dropdown.7a104ce3.js.map +0 -1
  284. package/dist/chunks/index.1dc4ebae.js.map +0 -1
  285. package/dist/chunks/listbox.0f25778d.js +0 -1213
  286. package/dist/chunks/listbox.0f25778d.js.map +0 -1
@@ -1,37 +1,38 @@
1
- import { ref as I, computed as g, defineComponent as X, toRef as U, watch as Z, nextTick as M, resolveComponent as v, resolveDirective as x, withDirectives as ee, openBlock as l, createElementBlock as $, withKeys as h, createVNode as T, withCtx as y, createTextVNode as P, toDisplayString as E, createBlock as c, createCommentVNode as u, createElementVNode as ae, normalizeClass as te } from "vue";
2
- import { B as re } from "./chunks/directive.0408e565.js";
3
- import { c as ne } from "./chunks/dropdown-default-textbox.0f878a8d.js";
4
- import { BentoPopover as oe } from "./popover.js";
5
- import { g as k } from "./chunks/unique-id.a2a2b458.js";
6
- import { B as le } from "./chunks/index.7f24db66.js";
7
- import { u as K } from "./chunks/i18n.6c402773.js";
8
- import { D as A, v as ie, f as se } from "./chunks/date-input.9186a0bf.js";
9
- import { f as q } from "./chunks/index.d68847b0.js";
10
- import { e as S, d as de, f as ue } from "./chunks/index.f55fdc32.js";
11
- import { d as pe } from "./chunks/debounce.b5ef6acf.js";
12
- import { u as ce } from "./chunks/use-form-layout-loading.d03e5d48.js";
13
- import { C as _ } from "./chunks/calendar.cc37ac1f.js";
14
- import { b as Le } from "./chunks/calendar.cc37ac1f.js";
15
- import { E as fe } from "./chunks/error-message.b91afffc.js";
1
+ import { ref as C, computed as P, defineComponent as Z, toRef as M, watch as x, nextTick as $, resolveComponent as y, resolveDirective as ee, withDirectives as ae, openBlock as l, createElementBlock as h, withKeys as A, createVNode as S, withCtx as k, createTextVNode as E, toDisplayString as B, createBlock as m, createCommentVNode as p, createElementVNode as te, normalizeClass as re } from "vue";
2
+ import { B as ne } from "./chunks/directive.0408e565.js";
3
+ import { c as oe } from "./chunks/dropdown-default-textbox.0b38fac3.js";
4
+ import { BentoPopover as le } from "./popover.js";
5
+ import { g as I } from "./chunks/unique-id.a2a2b458.js";
6
+ import { B as ie } from "./chunks/index.2bd3812b.js";
7
+ import { u as L } from "./chunks/i18n.6c402773.js";
8
+ import { D as q, v as se, f as de } from "./chunks/date-input.9186a0bf.js";
9
+ import { f as F } from "./chunks/index.fa7b44f1.js";
10
+ import { e as V, d as ue, f as pe } from "./chunks/index.f55fdc32.js";
11
+ import { d as ce } from "./chunks/debounce.b5ef6acf.js";
12
+ import { u as fe } from "./chunks/use-form-layout-loading.d03e5d48.js";
13
+ import { C as g } from "./chunks/calendar.c83d4e99.js";
14
+ import { b as Ye } from "./chunks/calendar.c83d4e99.js";
15
+ import { E as me } from "./chunks/error-message.64e1964b.js";
16
16
  import { _ as De } from "./chunks/_plugin-vue_export-helper.dad06003.js";
17
- import "./assets/index8.css";
18
- var p = /* @__PURE__ */ ((e) => (e.INPUT = "input", e))(p || {});
19
- const me = ({ datePickerValue: e, isDateIncorrect: t }) => {
20
- const { locale: i, t: f } = K(), D = { de, enUS: S, fr: ue }, s = I(null);
17
+ import "./assets/index21.css";
18
+ var c = /* @__PURE__ */ ((e) => (e.INPUT = "input", e))(c || {});
19
+ const be = ({ datePickerValue: e, isDateIncorrect: t }) => {
20
+ var d;
21
+ const { locale: i, t: D } = L(), b = { de: ue, enUS: V, fr: pe }, s = C((d = e.value) == null ? void 0 : d.toDateString());
21
22
  return {
22
23
  // Values
23
- dateDisplayValue: g(() => t.value ? s.value : e.value ? q(e.value, A.FULL_DATE, {
24
- locale: D[i.value.substring(0, 2)] || S
25
- }) : f("selectDate")),
24
+ dateDisplayValue: P(() => t.value ? s.value : e.value ? F(e.value, q.FULL_DATE, {
25
+ locale: b[i.value.substring(0, 2)] || V
26
+ }) : D("selectDate")),
26
27
  textInputValue: s,
27
28
  // Methods
28
- formatTextInputDisplayValue: (d = e.value) => {
29
- t.value || (s.value = d ? q(d, A.NUMERIC_DATE_YEAR_FIRST, {
30
- locale: D[i.value.substring(0, 2)] || S
29
+ formatTextInputDisplayValue: (u = e.value) => {
30
+ t.value || (s.value = u ? F(u, q.NUMERIC_DATE_YEAR_FIRST, {
31
+ locale: b[i.value.substring(0, 2)] || V
31
32
  }) : null);
32
33
  }
33
34
  };
34
- }, F = {
35
+ }, K = {
35
36
  "en-US": {
36
37
  optional: "optional",
37
38
  required: "required",
@@ -41,17 +42,17 @@ const me = ({ datePickerValue: e, isDateIncorrect: t }) => {
41
42
  selectedDateIsNotAvailable: "Selected date is not available",
42
43
  datePicker: "Date picker"
43
44
  }
44
- }, be = 1e3, ve = X({
45
- i18n: { messages: F },
45
+ }, ve = 1e3, ye = Z({
46
+ i18n: { messages: K },
46
47
  name: "bento-date-picker",
47
48
  components: {
48
- BentoTypography: le,
49
- BentoPopover: oe,
50
- Calendar: _,
51
- ErrorMessage: fe,
52
- DropdownInputDefault: ne
49
+ BentoTypography: ie,
50
+ BentoPopover: le,
51
+ Calendar: g,
52
+ ErrorMessage: me,
53
+ DropdownInputDefault: oe
53
54
  },
54
- directives: { BentoClickOutsideDirective: re },
55
+ directives: { BentoClickOutsideDirective: ne },
55
56
  props: {
56
57
  /**
57
58
  * Descriptive supporting text visbile underneath the dropdown.
@@ -68,11 +69,19 @@ const me = ({ datePickerValue: e, isDateIncorrect: t }) => {
68
69
  /**
69
70
  * Allows you to set the first day of the week. 0 is sunday, 1 is monday, 6 is saturday
70
71
  */
71
- firstDayOfWeek: _.props.firstDayOfWeek,
72
+ firstDayOfWeek: g.props.firstDayOfWeek,
72
73
  /**
73
74
  * Indicate if a date should be disabled or not
74
75
  */
75
- isDateDisabled: _.props.isDateDisabled,
76
+ isDateDisabled: g.props.isDateDisabled,
77
+ /**
78
+ * Sets a minimum limit for selectable dates - dates before `min` will not be selectable
79
+ */
80
+ min: g.props.min,
81
+ /**
82
+ * Sets a maximum limit for selectable dates - dates after `max` will not be selectable
83
+ */
84
+ max: g.props.max,
76
85
  /**
77
86
  * Text that is displayed as a label above the element.
78
87
  */
@@ -94,120 +103,120 @@ const me = ({ datePickerValue: e, isDateIncorrect: t }) => {
94
103
  */
95
104
  value: { type: [Date, Object], default: null }
96
105
  },
97
- emits: [p.INPUT],
106
+ emits: [c.INPUT],
98
107
  setup(e, { emit: t }) {
99
- const { t: i } = K({ messages: F }), f = k("bento-date-picker-container"), D = k("bento-date-picker-label"), s = k("bento-date-picker-description"), o = k("bento-date-picker-error"), m = k("bento-date-picker-date-error"), d = g(() => e.label || i("datePicker", { name: f })), C = I(null), B = I(null), r = I(!1), n = I(!1), { isReadOnly: L } = ce(U(e, "readonly"));
100
- Z(
108
+ const { t: i } = L({ messages: K }), D = I("bento-date-picker-container"), b = I("bento-date-picker-label"), s = I("bento-date-picker-description"), o = I("bento-date-picker-error"), v = I("bento-date-picker-date-error"), d = P(() => e.label || i("datePicker", { name: D })), u = C(null), O = C(null), n = C(!1), r = C(!1), { isReadOnly: Y } = fe(M(e, "readonly"));
109
+ x(
101
110
  () => e.disabled,
102
111
  (a) => {
103
- a && n.value && (n.value = !1);
112
+ a && r.value && (r.value = !1);
104
113
  }
105
114
  );
106
- const { dateDisplayValue: Y, textInputValue: b, formatTextInputDisplayValue: V } = me({
107
- datePickerValue: U(e, "value"),
108
- isDateIncorrect: r
109
- }), O = g(() => e.isDateDisabled && e.isDateDisabled(new Date(b.value)) ? i("selectedDateIsNotAvailable") : r.value ? i("provideDateInAFormat") : null), W = g(() => ({
110
- "b-date-picker__description--error": e.errorMessage || O.value
111
- })), j = g(
112
- () => `${e.description ? s : ""} ${e.errorMessage ? o : ""} ${O.value ? m : ""}`.trim() || null
113
- ), z = (a) => e.isDateDisabled ? !e.isDateDisabled(a) : !0, R = () => {
114
- n.value = !1;
115
+ const { dateDisplayValue: W, textInputValue: f, formatTextInputDisplayValue: _ } = be({
116
+ datePickerValue: M(e, "value"),
117
+ isDateIncorrect: n
118
+ }), w = P(() => e.isDateDisabled && e.isDateDisabled(new Date(f.value)) && !r.value ? i("selectedDateIsNotAvailable") : n.value ? i("provideDateInAFormat") : null), j = P(() => ({
119
+ "b-date-picker__description--error": e.errorMessage || w.value
120
+ })), z = P(
121
+ () => `${e.description ? s : ""} ${e.errorMessage ? o : ""} ${w.value ? v : ""}`.trim() || null
122
+ ), G = (a) => e.min && a <= e.min || e.max && a >= e.max ? !1 : e.isDateDisabled ? !e.isDateDisabled(a) : !0, R = () => {
123
+ r.value = !1;
115
124
  }, N = () => {
116
- n.value = !0, V();
117
- }, G = (a) => {
118
- r.value = !1, R(), t(p.INPUT, a);
119
- }, H = async () => {
120
- r.value && (r.value = !1, b.value = null), t(p.INPUT, null);
121
- }, J = (a) => {
122
- ie(a);
123
- }, Q = pe((a) => {
125
+ r.value = !0, _();
126
+ }, H = (a) => {
127
+ n.value = !1, R(), t(c.INPUT, a);
128
+ }, J = async () => {
129
+ n.value && (n.value = !1, f.value = null), t(c.INPUT, null);
130
+ }, Q = (a) => {
131
+ se(a);
132
+ }, U = (a) => {
124
133
  if (a.length < 10)
125
134
  return;
126
- /^\d{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])$/.test(a) && z(new Date(a)) ? (r.value = !1, t(p.INPUT, new Date(a))) : a && (r.value = !0, t(p.INPUT, null));
127
- }, be);
135
+ /^\d{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])$/.test(a) && G(new Date(a)) ? (n.value = !1, t(c.INPUT, new Date(a))) : a && (n.value = !0, t(c.INPUT, null));
136
+ }, X = ce(U, ve);
128
137
  return {
129
138
  // Refs
130
- inputContainerRef: B,
131
- calendarContainerRef: C,
139
+ inputContainerRef: O,
140
+ calendarContainerRef: u,
132
141
  // Values,
133
- dateDisplayValue: Y,
134
- datePickerContainerId: f,
135
- descriptionConditionalClasses: W,
136
- isDateIncorrect: r,
137
- isDatePickerOpen: n,
138
- isReadOnly: L,
139
- dateErrorText: O,
140
- labelId: D,
142
+ dateDisplayValue: W,
143
+ datePickerContainerId: D,
144
+ descriptionConditionalClasses: j,
145
+ isDateIncorrect: n,
146
+ isDatePickerOpen: r,
147
+ isReadOnly: Y,
148
+ dateErrorText: w,
149
+ labelId: b,
141
150
  descriptionId: s,
142
151
  errorId: o,
143
- dateErrorId: m,
152
+ dateErrorId: v,
144
153
  popoverAriaLabel: d,
145
- ariaDescribedBy: j,
146
- textInputValue: b,
154
+ ariaDescribedBy: z,
155
+ textInputValue: f,
147
156
  // Events
148
157
  closeDatePicker: R,
149
- clearDatePickerValue: H,
150
- onDateSelected: G,
158
+ clearDatePickerValue: J,
159
+ onDateSelected: H,
151
160
  openDatePicker: N,
152
- onDateKeyDown: J,
161
+ onDateKeyDown: Q,
153
162
  onDateInputChange: (a) => {
154
- b.value = se(a), Q(b.value);
163
+ f.value = de(a), r.value ? X(f.value) : U(f.value);
155
164
  },
156
165
  // Keyboard navigation
157
166
  onSpaceBarOrEnter: async (a) => {
158
- var w;
159
- n.value || (a.preventDefault(), N(), await M(), e.value || (V(/* @__PURE__ */ new Date()), t(p.INPUT, /* @__PURE__ */ new Date()), await M()), (w = C.value) == null || w.$refs.calendarRef[0].focusOnDate(e.value));
167
+ var T;
168
+ r.value || (a.preventDefault(), N(), await $(), e.value || (_(/* @__PURE__ */ new Date()), t(c.INPUT, /* @__PURE__ */ new Date()), await $()), (T = u.value) == null || T.$refs.calendarRef[0].focusOnDate(e.value));
160
169
  }
161
170
  };
162
171
  }
163
172
  });
164
- const ye = ["id"];
165
- function ke(e, t, i, f, D, s) {
166
- const o = v("bento-typography"), m = v("dropdown-input-default"), d = v("error-message"), C = v("calendar"), B = v("bento-popover"), r = x("bento-click-outside-directive");
167
- return ee((l(), $("div", {
173
+ const ke = ["id"];
174
+ function Ie(e, t, i, D, b, s) {
175
+ const o = y("bento-typography"), v = y("dropdown-input-default"), d = y("error-message"), u = y("calendar"), O = y("bento-popover"), n = ee("bento-click-outside-directive");
176
+ return ae((l(), h("div", {
168
177
  class: "b-date-picker",
169
178
  onKeydownCapture: [
170
- t[0] || (t[0] = h((...n) => e.onSpaceBarOrEnter && e.onSpaceBarOrEnter(...n), ["space"])),
171
- t[1] || (t[1] = h((...n) => e.onSpaceBarOrEnter && e.onSpaceBarOrEnter(...n), ["enter"]))
179
+ t[0] || (t[0] = A((...r) => e.onSpaceBarOrEnter && e.onSpaceBarOrEnter(...r), ["space"])),
180
+ t[1] || (t[1] = A((...r) => e.onSpaceBarOrEnter && e.onSpaceBarOrEnter(...r), ["enter"]))
172
181
  ]
173
182
  }, [
174
- e.label ? (l(), $("div", {
183
+ e.label ? (l(), h("div", {
175
184
  key: 0,
176
185
  id: e.labelId,
177
186
  class: "b-date-picker__label"
178
187
  }, [
179
- T(o, {
188
+ S(o, {
180
189
  el: "span",
181
190
  stronger: ""
182
191
  }, {
183
- default: y(() => [
184
- P(E(e.label), 1)
192
+ default: k(() => [
193
+ E(B(e.label), 1)
185
194
  ]),
186
195
  _: 1
187
196
  }),
188
- e.optional ? (l(), c(o, {
197
+ e.optional ? (l(), m(o, {
189
198
  key: 0,
190
199
  class: "b-date-picker__label-requirement",
191
200
  el: "span"
192
201
  }, {
193
- default: y(() => [
194
- P(" (" + E(e.$t("optional")) + ") ", 1)
202
+ default: k(() => [
203
+ E(" (" + B(e.$t("optional")) + ") ", 1)
195
204
  ]),
196
205
  _: 1
197
- })) : u("", !0),
198
- e.required ? (l(), c(o, {
206
+ })) : p("", !0),
207
+ e.required ? (l(), m(o, {
199
208
  key: 1,
200
209
  class: "b-date-picker__label-requirement",
201
210
  el: "span"
202
211
  }, {
203
- default: y(() => [
204
- P(" (" + E(e.$t("required")) + ") ", 1)
212
+ default: k(() => [
213
+ E(" (" + B(e.$t("required")) + ") ", 1)
205
214
  ]),
206
215
  _: 1
207
- })) : u("", !0)
208
- ], 8, ye)) : u("", !0),
209
- ae("div", null, [
210
- T(m, {
216
+ })) : p("", !0)
217
+ ], 8, ke)) : p("", !0),
218
+ te("div", null, [
219
+ S(v, {
211
220
  ref: "inputContainerRef",
212
221
  ariaControls: e.datePickerContainerId,
213
222
  ariaExpanded: e.isDatePickerOpen,
@@ -228,29 +237,29 @@ function ke(e, t, i, f, D, s) {
228
237
  onClose: e.closeDatePicker
229
238
  }, null, 8, ["ariaControls", "ariaExpanded", "aria-labelledby", "aria-describedby", "disabled", "is-invalid", "open", "value", "display-value", "readonly", "onInput", "onOpen", "onKeydown", "onClear", "onClose"])
230
239
  ]),
231
- e.dateErrorText ? (l(), c(d, {
240
+ e.dateErrorText ? (l(), m(d, {
232
241
  key: 1,
233
242
  id: e.dateErrorId,
234
243
  "error-message": e.dateErrorText,
235
244
  class: "b-date-picker__error-message"
236
- }, null, 8, ["id", "error-message"])) : u("", !0),
237
- e.errorMessage ? (l(), c(d, {
245
+ }, null, 8, ["id", "error-message"])) : p("", !0),
246
+ e.errorMessage ? (l(), m(d, {
238
247
  key: 2,
239
248
  id: e.errorId,
240
249
  "error-message": e.errorMessage,
241
250
  class: "b-date-picker__error-message"
242
- }, null, 8, ["id", "error-message"])) : u("", !0),
243
- e.description ? (l(), c(o, {
251
+ }, null, 8, ["id", "error-message"])) : p("", !0),
252
+ e.description ? (l(), m(o, {
244
253
  key: 3,
245
- class: te(["b-date-picker__description", e.descriptionConditionalClasses]),
254
+ class: re(["b-date-picker__description", e.descriptionConditionalClasses]),
246
255
  el: "span"
247
256
  }, {
248
- default: y(() => [
249
- P(E(e.description), 1)
257
+ default: k(() => [
258
+ E(B(e.description), 1)
250
259
  ]),
251
260
  _: 1
252
- }, 8, ["class"])) : u("", !0),
253
- e.inputContainerRef ? (l(), c(B, {
261
+ }, 8, ["class"])) : p("", !0),
262
+ e.inputContainerRef ? (l(), m(O, {
254
263
  key: 4,
255
264
  id: e.datePickerContainerId,
256
265
  class: "b-date-picker__container",
@@ -263,26 +272,28 @@ function ke(e, t, i, f, D, s) {
263
272
  position: "bottom-start",
264
273
  "fit-content": ""
265
274
  }, {
266
- default: y(() => [
267
- T(C, {
275
+ default: k(() => [
276
+ S(u, {
268
277
  ref: "calendarContainerRef",
269
278
  "first-day-of-week": e.firstDayOfWeek,
270
279
  "is-date-disabled": e.isDateDisabled,
271
280
  "number-of-months": 1,
272
281
  value: e.value,
282
+ min: e.min,
283
+ max: e.max,
273
284
  onInput: e.onDateSelected
274
- }, null, 8, ["first-day-of-week", "is-date-disabled", "value", "onInput"])
285
+ }, null, 8, ["first-day-of-week", "is-date-disabled", "value", "min", "max", "onInput"])
275
286
  ]),
276
287
  _: 1
277
- }, 8, ["id", "open", "target-element", "aria-label"])) : u("", !0)
288
+ }, 8, ["id", "open", "target-element", "aria-label"])) : p("", !0)
278
289
  ], 32)), [
279
- [r, e.closeDatePicker]
290
+ [n, e.closeDatePicker]
280
291
  ]);
281
292
  }
282
- const Ae = /* @__PURE__ */ De(ve, [["render", ke], ["__scopeId", "data-v-5947eaf2"]]);
293
+ const qe = /* @__PURE__ */ De(ye, [["render", Ie], ["__scopeId", "data-v-b56eb260"]]);
283
294
  export {
284
- Ae as BentoDatePicker,
285
- p as BentoDatePickerEvent,
286
- Le as BentoDatePickerFirstDayOfWeek
295
+ qe as BentoDatePicker,
296
+ c as BentoDatePickerEvent,
297
+ Ye as BentoDatePickerFirstDayOfWeek
287
298
  };
288
299
  //# sourceMappingURL=date-picker.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"date-picker.js","sources":["../../vue2/src/components/date-picker/date-picker.types.ts","../../vue2/src/components/date-picker/composables/use-date-picker-single-calendar-text.ts","../../vue2/src/components/date-picker/date-picker.vue"],"sourcesContent":["export { CalendarFirstDayOfWeek as BentoDatePickerFirstDayOfWeek } from '@/internal';\nexport type {\n CalendarIsDateDisabled as BentoDatePickerIsDateDisabled,\n CalendarSingleDateValue as BentoDatePickerValue,\n} from '@/internal';\n\nexport enum BentoDatePickerEvent {\n INPUT = 'input',\n}\n","import { computed, ref } from 'vue';\nimport { de, enUS, fr } from 'date-fns/locale';\nimport { useI18n } from '@/utils/ts/i18n';\nimport { UseDateDisplayText } from './use-date-picker-single-calendar-text.types';\nimport { DateFormat } from '@/types';\nimport format from 'date-fns/format';\n\n/**\n * Composable that sets and formats the date to be displayed in the input box of a Single Date Picker\n * @param {Ref<Date>} option.datePickerValue Ref to the datePickerValue set in the DatePicker component\n * @param {Ref<boolean>} option.isDateIncorrect Indicates if the date is correct or not\n */\nexport const useDatePickerSingleCalendarText: UseDateDisplayText<Date> = ({ datePickerValue, isDateIncorrect }) => {\n const { locale, t } = useI18n();\n const locales = { de, enUS, fr };\n\n const textInputValue = ref(null);\n\n const dateDisplayValue = computed(() => {\n // Display incorrect date when there's an error with the input\n if (isDateIncorrect.value) {\n return textInputValue.value;\n }\n\n // Display \"Select a date\" when there's no date selected or input\n if (!datePickerValue.value) {\n return t('selectDate') as string;\n }\n\n // Display the date in format \"dd MMM, yyyy (25 Jun, 2023)\" if there's a valid date selected\n return format(datePickerValue.value as Date, DateFormat.FULL_DATE, {\n locale: locales[locale.value.substring(0, 2)] || enUS,\n });\n });\n\n /**\n * Formats the \"dateToFormat\" date value with the yyyy-MM-dd format and sets it as \"formatTextInputDisplayValue\" value\n * @param {DATE} dateToFormat - Date to be assigned and formatted\n */\n const formatTextInputDisplayValue = (dateToFormat: Date = datePickerValue.value) => {\n // If date is incorrect, leave the textInputValue intact\n if (isDateIncorrect.value) {\n return;\n }\n\n textInputValue.value = dateToFormat\n ? format(dateToFormat, DateFormat.NUMERIC_DATE_YEAR_FIRST, {\n locale: locales[locale.value.substring(0, 2)] || enUS,\n })\n : null;\n };\n\n return {\n // Values\n dateDisplayValue,\n textInputValue,\n\n // Methods\n formatTextInputDisplayValue,\n };\n};\n","<!-- TODO: Remove aria props as these are part of JSX elements /vue/types/jsx.d.ts -->\n<!-- eslint-disable vue/attribute-hyphenation -->\n<template>\n <div\n v-bento-click-outside-directive=\"closeDatePicker\"\n class=\"b-date-picker\"\n @keydown.space.capture=\"onSpaceBarOrEnter\"\n @keydown.enter.capture=\"onSpaceBarOrEnter\"\n >\n <!-- Label -->\n <div v-if=\"label\" :id=\"labelId\" class=\"b-date-picker__label\">\n <bento-typography el=\"span\" stronger>{{ label }}</bento-typography>\n <bento-typography v-if=\"optional\" class=\"b-date-picker__label-requirement\" el=\"span\">\n ({{ $t('optional') }})\n </bento-typography>\n <bento-typography v-if=\"required\" class=\"b-date-picker__label-requirement\" el=\"span\">\n ({{ $t('required') }})\n </bento-typography>\n </div>\n\n <!-- Input -->\n <div>\n <dropdown-input-default\n ref=\"inputContainerRef\"\n :ariaControls=\"datePickerContainerId\"\n :ariaExpanded=\"isDatePickerOpen\"\n :aria-labelledby=\"label ? labelId : null\"\n :aria-describedby=\"ariaDescribedBy\"\n :disabled=\"disabled\"\n dynamic-filtering\n :is-invalid=\"!!errorMessage || !!dateErrorText\"\n :open=\"isDatePickerOpen\"\n :value=\"textInputValue\"\n :display-value=\"dateDisplayValue\"\n :debounce-time=\"0\"\n :readonly=\"isReadOnly\"\n @input=\"onDateInputChange\"\n @open=\"openDatePicker\"\n @keydown=\"onDateKeyDown\"\n @clear=\"clearDatePickerValue\"\n @close=\"closeDatePicker\"\n />\n </div>\n\n <!-- Error Messages -->\n <error-message\n v-if=\"dateErrorText\"\n :id=\"dateErrorId\"\n :error-message=\"dateErrorText\"\n class=\"b-date-picker__error-message\"\n />\n <error-message\n v-if=\"errorMessage\"\n :id=\"errorId\"\n :error-message=\"errorMessage\"\n class=\"b-date-picker__error-message\"\n />\n\n <!-- Description -->\n <bento-typography\n v-if=\"description\"\n class=\"b-date-picker__description\"\n :class=\"descriptionConditionalClasses\"\n el=\"span\"\n >\n {{ description }}\n </bento-typography>\n\n <!-- Calendar container -->\n <bento-popover\n v-if=\"inputContainerRef\"\n :id=\"datePickerContainerId\"\n class=\"b-date-picker__container\"\n role=\"dialog\"\n :open=\"isDatePickerOpen\"\n :target-element=\"inputContainerRef\"\n :disable-focus-trap=\"true\"\n :aria-label=\"popoverAriaLabel\"\n :aria-modal=\"true\"\n position=\"bottom-start\"\n fit-content\n >\n <calendar\n ref=\"calendarContainerRef\"\n :first-day-of-week=\"firstDayOfWeek\"\n :is-date-disabled=\"isDateDisabled\"\n :number-of-months=\"1\"\n :value=\"value\"\n @input=\"onDateSelected\"\n />\n </bento-popover>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, nextTick, PropType, Ref, ref, toRef, watch } from 'vue';\n import { BentoClickOutsideDirective } from '@/directives';\n import { BentoDatePickerEvent, BentoDatePickerValue } from './date-picker.types';\n import { Calendar, ErrorMessage } from '@/internal';\n import { DropdownInputDefault } from '@/components/dropdown/components';\n import { BentoPopover } from '@/components/popover';\n import { generateUid } from '@/utils/ts/unique-id';\n import { BentoTypography } from '../typography';\n import { useDatePickerSingleCalendarText } from './composables/use-date-picker-single-calendar-text';\n import { formatDateInputValue, validateDateInput } from '@/utils/ts/date-input';\n import { useI18n } from '@/utils/ts/i18n';\n import { debounce } from '@/utils/ts/debounce';\n import { useFormLayoutFieldLoading } from '@/composables';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n const DEBOUNCE_TIME = 1000;\n\n /**\n * Date picker selector.\n *\n * @example\n * import { BentoDatePicker } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoDatePicker },\n * template: `\n * <bento-date-picker\n * label=\"Label\"\n * description=\"Supporting text\"\n * required\n * optional\n * disabled\n * @input=\"onDateChanged\"\n * v-model=\"selectedDate\"\n * />\n * `,\n * setup() {\n * const selectedDate = ref(new Date()); // reactive({ startDate: new Date(), endDate: new Date() })\n * return {\n * selectedDate,\n * }\n * }\n * }\n */\n export default defineComponent({\n i18n: { messages },\n name: 'bento-date-picker',\n components: {\n BentoTypography,\n BentoPopover,\n Calendar,\n ErrorMessage,\n DropdownInputDefault,\n },\n directives: { BentoClickOutsideDirective },\n props: {\n /**\n * Descriptive supporting text visbile underneath the dropdown.\n */\n description: { type: String, default: undefined },\n\n /**\n * Disables dropdown functionality.\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Displays component in an error state with an error message\n */\n errorMessage: { type: String, default: null },\n\n /**\n * Allows you to set the first day of the week. 0 is sunday, 1 is monday, 6 is saturday\n */\n firstDayOfWeek: Calendar.props.firstDayOfWeek,\n\n /**\n * Indicate if a date should be disabled or not\n */\n isDateDisabled: Calendar.props.isDateDisabled,\n\n /**\n * Text that is displayed as a label above the element.\n */\n label: { type: String, default: undefined },\n\n /**\n * Highlights the dropdown is optional.\n */\n optional: { type: Boolean, default: false },\n\n /**\n * The Boolean readonly property, when present, makes the element not mutable, meaning the user can not edit the date picker.\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * Highlights the dropdown is required.\n */\n required: { type: Boolean, default: false },\n\n /**\n * Selected date\n */\n value: { type: [Date, Object] as PropType<BentoDatePickerValue>, default: null },\n },\n emits: [BentoDatePickerEvent.INPUT],\n setup(props, { emit }) {\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const datePickerContainerId = generateUid('bento-date-picker-container');\n const labelId = generateUid('bento-date-picker-label');\n const descriptionId = generateUid('bento-date-picker-description');\n const errorId = generateUid('bento-date-picker-error');\n const dateErrorId = generateUid('bento-date-picker-date-error');\n const popoverAriaLabel = computed(() => props.label || t('datePicker', { name: datePickerContainerId }));\n\n // Refs\n const calendarContainerRef = ref(null);\n const inputContainerRef = ref(null);\n\n // Values\n const isDateIncorrect = ref(false);\n const isDatePickerOpen = ref(false);\n const { isReadOnly } = useFormLayoutFieldLoading(toRef(props, 'readonly'));\n\n watch(\n () => props.disabled,\n disabled => {\n // Close date picker popover if it's opened when it's disabled\n if (disabled && isDatePickerOpen.value) {\n isDatePickerOpen.value = false;\n }\n }\n );\n\n const { dateDisplayValue, textInputValue, formatTextInputDisplayValue } = useDatePickerSingleCalendarText({\n datePickerValue: toRef(props, 'value') as Ref<Date>,\n isDateIncorrect,\n });\n\n const dateErrorText = computed(() => {\n if (props.isDateDisabled && props.isDateDisabled(new Date(textInputValue.value))) {\n return t('selectedDateIsNotAvailable');\n }\n\n return isDateIncorrect.value ? t('provideDateInAFormat') : null;\n });\n\n const descriptionConditionalClasses = computed(() => ({\n 'b-date-picker__description--error': props.errorMessage || dateErrorText.value,\n }));\n\n const ariaDescribedBy = computed(\n () =>\n `${props.description ? descriptionId : ''} ${props.errorMessage ? errorId : ''} ${\n dateErrorText.value ? dateErrorId : ''\n }`.trim() || null\n );\n\n const isDateEnabled = (date: Date) => {\n // Check if function is set, otherwise all dates are enabled\n if (props.isDateDisabled) {\n return !props.isDateDisabled(date);\n }\n\n return true;\n };\n\n const closeDatePicker = () => {\n isDatePickerOpen.value = false;\n };\n\n const openDatePicker = () => {\n isDatePickerOpen.value = true;\n\n formatTextInputDisplayValue();\n };\n\n const onDateSelected = (selectedDate: Date) => {\n // Reset the error state when a valid date is selected\n isDateIncorrect.value = false;\n\n closeDatePicker();\n emit(BentoDatePickerEvent.INPUT, selectedDate);\n };\n\n const clearDatePickerValue = async () => {\n if (isDateIncorrect.value) {\n isDateIncorrect.value = false;\n textInputValue.value = null;\n }\n emit(BentoDatePickerEvent.INPUT, null);\n };\n\n const onDateKeyDown = (event: KeyboardEvent) => {\n validateDateInput(event);\n };\n\n const validateDate = debounce((stringDate: string) => {\n // Validate only if the date is complete\n if (stringDate.length < 10) {\n return;\n }\n\n // Checks for YYYY-MM-DD format\n const dateRegex = /^\\d{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])$/;\n const isValidDate = dateRegex.test(stringDate) && isDateEnabled(new Date(stringDate));\n if (isValidDate) {\n isDateIncorrect.value = false;\n emit(BentoDatePickerEvent.INPUT, new Date(stringDate));\n } else if (stringDate) {\n // Only set to true if the value exists (not null/undefined)\n isDateIncorrect.value = true;\n emit(BentoDatePickerEvent.INPUT, null);\n }\n }, DEBOUNCE_TIME);\n\n const onDateInputChange = (stringDate: string) => {\n textInputValue.value = formatDateInputValue(stringDate);\n validateDate(textInputValue.value);\n };\n\n /**\n * Space bar and Enter keyDown event handler.\n *\n * * Opens the date picker dialog on the first keydown.\n * * Move focus to selected date, i.e., the date displayed in the date input text field. If no date has been selected, places focus on the current date.\n * @param {KeyboardEvent} event Event being triggered\n */\n const onSpaceBarOrEnter = async (event: KeyboardEvent) => {\n if (isDatePickerOpen.value) {\n return;\n }\n event.preventDefault();\n\n openDatePicker();\n\n // Wait for the date picker dialog to open\n await nextTick();\n\n // Set current date (today) if no date is selected\n if (!props.value) {\n // Format the opened date picker date to YYYY-MM-DD\n formatTextInputDisplayValue(new Date());\n emit(BentoDatePickerEvent.INPUT, new Date());\n\n // Wait for new value to be set with the emit\n await nextTick();\n }\n\n // Focus on date\n calendarContainerRef.value?.$refs.calendarRef[0].focusOnDate(props.value);\n };\n\n return {\n // Refs\n inputContainerRef,\n calendarContainerRef,\n\n // Values,\n dateDisplayValue,\n datePickerContainerId,\n descriptionConditionalClasses,\n isDateIncorrect,\n isDatePickerOpen,\n isReadOnly,\n dateErrorText,\n labelId,\n descriptionId,\n errorId,\n dateErrorId,\n popoverAriaLabel,\n ariaDescribedBy,\n textInputValue,\n\n // Events\n closeDatePicker,\n clearDatePickerValue,\n onDateSelected,\n openDatePicker,\n onDateKeyDown,\n onDateInputChange,\n\n // Keyboard navigation\n onSpaceBarOrEnter,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./date-picker.scss\" />\n"],"names":["BentoDatePickerEvent","BentoDatePickerEvent2","useDatePickerSingleCalendarText","datePickerValue","isDateIncorrect","locale","t","useI18n","locales","enUS","fr","textInputValue","ref","computed","format","DateFormat","dateToFormat","DEBOUNCE_TIME","_sfc_main","defineComponent","messages","BentoTypography","BentoPopover","Calendar","ErrorMessage","DropdownInputDefault","BentoClickOutsideDirective","props","emit","datePickerContainerId","generateUid","labelId","descriptionId","errorId","dateErrorId","popoverAriaLabel","calendarContainerRef","inputContainerRef","isDatePickerOpen","isReadOnly","useFormLayoutFieldLoading","toRef","watch","disabled","dateDisplayValue","formatTextInputDisplayValue","dateErrorText","descriptionConditionalClasses","ariaDescribedBy","isDateEnabled","date","closeDatePicker","openDatePicker","onDateSelected","selectedDate","clearDatePickerValue","onDateKeyDown","event","validateDateInput","validateDate","debounce","stringDate","formatDateInputValue","nextTick","_a","_ctx","createCommentVNode","openBlock","createBlock","_component_bento_typography","_hoisted_1","createElementVNode","createVNode","_component_dropdown_input_default","_component_error_message","normalizeClass","_component_bento_popover","withCtx","_component_calendar"],"mappings":";;;;;;;;;;;;;;;;;AAMY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,QAAA,SADQA,IAAAD,KAAA,CAAA,CAAA;ACML,MAAAE,KAAA,CAAA,EAAA,iBAAAC,GAAA,iBAAAC,EAAA,MAAA;AACH,QAAA,EAAA,QAAAC,GAAA,GAAAC,EAAA,IAAAC,EAAA,GACAC,IAAA,EAAA,IAAA,MAAAC,GAAA,IAAAC,GAAA,GAEAC,IAAAC,EAAA,IAAA;AAoCA,SAAA;AAAA;AAAA,IAAO,kBAlCPC,EAAA,MAEIT,EAAA,QACIO,EAAA,QAIJR,EAAA,QAKAW,EAAAX,EAAA,OAAAY,EAAA,WAAA;AAAA,MAAmE,QAAAP,EAAAH,EAAA,MAAA,UAAA,GAAA,CAAA,CAAA,KAAAI;AAAA,IACd,CAAA,IALjDH,EAAA,YAAA,CAMH;AAAA,IAsBD,gBAAAK;AAAA;AAAA,IACA,6BAhBJ,CAAAK,IAAAb,EAAA,UAAA;AAEI,MAAAC,EAAA,UAIAO,EAAA,QAAAK,IAAAF,EAAAE,GAAAD,EAAA,yBAAA;AAAA,QAC+D,QAAAP,EAAAH,EAAA,MAAA,UAAA,GAAA,CAAA,CAAA,KAAAI;AAAA,MACJ,CAAA,IAAA;AAAA,IAErD;AAAA,EASN;AAER;;;;;;;;;;GCoDIQ,KAAA,KA6BAC,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A,KAAAC,EAAA,IAAA,EAAA;AAAA,IAIRD,EAAA,gBAAAE,EAAA,GAAAC,EAAAM,GAAA;AAAA,MAHc,KAAA;AAAA,MACX,IAAAT,EAAA;AAAA,MACK,iBAAAA,EAAA;AAAA;IAKA,GAAA,MAAA,GAAA,CAAA,MAAA,eAAA,CAAA,KAAAC,EAAA,IAAA,EAAA;AAAA,IAMSD,EAAA,eAAAE,EAAA,GAAAC,EAAAC,GAAA;AAAA,MAJP,KAAA;AAAA,MACL,OAAAM,GAAA,CAAA,8BAAAV,EAAA,6BAAA,CAAA;AAAA;;;;;;IAOG,GAAA,GAAA,CAAA,OAAA,CAAA,KAAAC,EAAA,IAAA,EAAA;AAAA,IAoBMD,EAAA,qBAAAE,EAAA,GAAAC,EAAAQ,GAAA;AAAA,MAnBc,KAAA;AAAA,MACrB,IAAAX,EAAA;AAAA,MACA,OAAA;AAAA,MACE,MAAA;AAAA,MACN,MAAAA,EAAA;AAAA,MACA,kBAAAA,EAAA;AAAA,MACY,sBAAA;AAAA,MACI,cAAAA,EAAA;AAAA,MACR,cAAA;AAAA,MACE,UAAA;AAAA;;MAGH,SAAAY,EAAA,MAAA;AAAA,QAAAL,EAAAM,GAAA;AAAA,UACgB,KAAA;AAAA,UACnB,qBAAAb,EAAA;AAAA,UACmB,oBAAAA,EAAA;AAAA,UACP,oBAAA;AAAA,UACL,OAAAA,EAAA;AAAA;;;;;;;;;;"}
1
+ {"version":3,"file":"date-picker.js","sources":["../../vue2/src/components/date-picker/date-picker.types.ts","../../vue2/src/components/date-picker/composables/use-date-picker-single-calendar-text.ts","../../vue2/src/components/date-picker/date-picker.vue"],"sourcesContent":["export { CalendarFirstDayOfWeek as BentoDatePickerFirstDayOfWeek } from '@/internal';\nexport type {\n CalendarIsDateDisabled as BentoDatePickerIsDateDisabled,\n CalendarSingleDateValue as BentoDatePickerValue,\n} from '@/internal';\n\nexport enum BentoDatePickerEvent {\n INPUT = 'input',\n}\n","import { computed, ref } from 'vue';\nimport { de, enUS, fr } from 'date-fns/locale';\nimport { useI18n } from '@/utils/ts/i18n';\nimport { UseDateDisplayText } from './use-date-picker-single-calendar-text.types';\nimport { DateFormat } from '@/types';\nimport format from 'date-fns/format';\n\n/**\n * Composable that sets and formats the date to be displayed in the input box of a Single Date Picker\n * @param {Ref<Date>} option.datePickerValue Ref to the datePickerValue set in the DatePicker component\n * @param {Ref<boolean>} option.isDateIncorrect Indicates if the date is correct or not\n */\nexport const useDatePickerSingleCalendarText: UseDateDisplayText<Date> = ({ datePickerValue, isDateIncorrect }) => {\n const { locale, t } = useI18n();\n const locales = { de, enUS, fr };\n\n const textInputValue = ref(datePickerValue.value?.toDateString());\n\n const dateDisplayValue = computed(() => {\n // Display incorrect date when there's an error with the input\n if (isDateIncorrect.value) {\n return textInputValue.value;\n }\n\n // Display \"Select a date\" when there's no date selected or input\n if (!datePickerValue.value) {\n return t('selectDate') as string;\n }\n\n // Display the date in format \"dd MMM, yyyy (25 Jun, 2023)\" if there's a valid date selected\n return format(datePickerValue.value as Date, DateFormat.FULL_DATE, {\n locale: locales[locale.value.substring(0, 2)] || enUS,\n });\n });\n\n /**\n * Formats the \"dateToFormat\" date value with the yyyy-MM-dd format and sets it as \"formatTextInputDisplayValue\" value\n * @param {DATE} dateToFormat - Date to be assigned and formatted\n */\n const formatTextInputDisplayValue = (dateToFormat: Date = datePickerValue.value) => {\n // If date is incorrect, leave the textInputValue intact\n if (isDateIncorrect.value) {\n return;\n }\n\n textInputValue.value = dateToFormat\n ? format(dateToFormat, DateFormat.NUMERIC_DATE_YEAR_FIRST, {\n locale: locales[locale.value.substring(0, 2)] || enUS,\n })\n : null;\n };\n\n return {\n // Values\n dateDisplayValue,\n textInputValue,\n\n // Methods\n formatTextInputDisplayValue,\n };\n};\n","<!-- TODO: Remove aria props as these are part of JSX elements /vue/types/jsx.d.ts -->\n<!-- eslint-disable vue/attribute-hyphenation -->\n<template>\n <div\n v-bento-click-outside-directive=\"closeDatePicker\"\n class=\"b-date-picker\"\n @keydown.space.capture=\"onSpaceBarOrEnter\"\n @keydown.enter.capture=\"onSpaceBarOrEnter\"\n >\n <!-- Label -->\n <div v-if=\"label\" :id=\"labelId\" class=\"b-date-picker__label\">\n <bento-typography el=\"span\" stronger>{{ label }}</bento-typography>\n <bento-typography v-if=\"optional\" class=\"b-date-picker__label-requirement\" el=\"span\">\n ({{ $t('optional') }})\n </bento-typography>\n <bento-typography v-if=\"required\" class=\"b-date-picker__label-requirement\" el=\"span\">\n ({{ $t('required') }})\n </bento-typography>\n </div>\n\n <!-- Input -->\n <div>\n <dropdown-input-default\n ref=\"inputContainerRef\"\n :ariaControls=\"datePickerContainerId\"\n :ariaExpanded=\"isDatePickerOpen\"\n :aria-labelledby=\"label ? labelId : null\"\n :aria-describedby=\"ariaDescribedBy\"\n :disabled=\"disabled\"\n dynamic-filtering\n :is-invalid=\"!!errorMessage || !!dateErrorText\"\n :open=\"isDatePickerOpen\"\n :value=\"textInputValue\"\n :display-value=\"dateDisplayValue\"\n :debounce-time=\"0\"\n :readonly=\"isReadOnly\"\n @input=\"onDateInputChange\"\n @open=\"openDatePicker\"\n @keydown=\"onDateKeyDown\"\n @clear=\"clearDatePickerValue\"\n @close=\"closeDatePicker\"\n />\n </div>\n\n <!-- Error Messages -->\n <error-message\n v-if=\"dateErrorText\"\n :id=\"dateErrorId\"\n :error-message=\"dateErrorText\"\n class=\"b-date-picker__error-message\"\n />\n <error-message\n v-if=\"errorMessage\"\n :id=\"errorId\"\n :error-message=\"errorMessage\"\n class=\"b-date-picker__error-message\"\n />\n\n <!-- Description -->\n <bento-typography\n v-if=\"description\"\n class=\"b-date-picker__description\"\n :class=\"descriptionConditionalClasses\"\n el=\"span\"\n >\n {{ description }}\n </bento-typography>\n\n <!-- Calendar container -->\n <bento-popover\n v-if=\"inputContainerRef\"\n :id=\"datePickerContainerId\"\n class=\"b-date-picker__container\"\n role=\"dialog\"\n :open=\"isDatePickerOpen\"\n :target-element=\"inputContainerRef\"\n :disable-focus-trap=\"true\"\n :aria-label=\"popoverAriaLabel\"\n :aria-modal=\"true\"\n position=\"bottom-start\"\n fit-content\n >\n <calendar\n ref=\"calendarContainerRef\"\n :first-day-of-week=\"firstDayOfWeek\"\n :is-date-disabled=\"isDateDisabled\"\n :number-of-months=\"1\"\n :value=\"value\"\n :min=\"min\"\n :max=\"max\"\n @input=\"onDateSelected\"\n />\n </bento-popover>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, nextTick, PropType, Ref, ref, toRef, watch } from 'vue';\n import { BentoClickOutsideDirective } from '@/directives';\n import { BentoDatePickerEvent, BentoDatePickerValue } from './date-picker.types';\n import { Calendar, ErrorMessage } from '@/internal';\n import { DropdownInputDefault } from '@/components/dropdown/components';\n import { BentoPopover } from '@/components/popover';\n import { generateUid } from '@/utils/ts/unique-id';\n import { BentoTypography } from '../typography';\n import { useDatePickerSingleCalendarText } from './composables/use-date-picker-single-calendar-text';\n import { formatDateInputValue, validateDateInput } from '@/utils/ts/date-input';\n import { useI18n } from '@/utils/ts/i18n';\n import { debounce } from '@/utils/ts/debounce';\n import { useFormLayoutFieldLoading } from '@/composables';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n const DEBOUNCE_TIME = 1000;\n\n /**\n * Date picker selector.\n *\n * @example\n * import { BentoDatePicker } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoDatePicker },\n * template: `\n * <bento-date-picker\n * label=\"Label\"\n * description=\"Supporting text\"\n * required\n * optional\n * disabled\n * @input=\"onDateChanged\"\n * v-model=\"selectedDate\"\n * />\n * `,\n * setup() {\n * const selectedDate = ref(new Date()); // reactive({ startDate: new Date(), endDate: new Date() })\n * return {\n * selectedDate,\n * }\n * }\n * }\n */\n export default defineComponent({\n i18n: { messages },\n name: 'bento-date-picker',\n components: {\n BentoTypography,\n BentoPopover,\n Calendar,\n ErrorMessage,\n DropdownInputDefault,\n },\n directives: { BentoClickOutsideDirective },\n props: {\n /**\n * Descriptive supporting text visbile underneath the dropdown.\n */\n description: { type: String, default: undefined },\n\n /**\n * Disables dropdown functionality.\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Displays component in an error state with an error message\n */\n errorMessage: { type: String, default: null },\n\n /**\n * Allows you to set the first day of the week. 0 is sunday, 1 is monday, 6 is saturday\n */\n firstDayOfWeek: Calendar.props.firstDayOfWeek,\n\n /**\n * Indicate if a date should be disabled or not\n */\n isDateDisabled: Calendar.props.isDateDisabled,\n\n /**\n * Sets a minimum limit for selectable dates - dates before `min` will not be selectable\n */\n min: Calendar.props.min,\n\n /**\n * Sets a maximum limit for selectable dates - dates after `max` will not be selectable\n */\n max: Calendar.props.max,\n\n /**\n * Text that is displayed as a label above the element.\n */\n label: { type: String, default: undefined },\n\n /**\n * Highlights the dropdown is optional.\n */\n optional: { type: Boolean, default: false },\n\n /**\n * The Boolean readonly property, when present, makes the element not mutable, meaning the user can not edit the date picker.\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * Highlights the dropdown is required.\n */\n required: { type: Boolean, default: false },\n\n /**\n * Selected date\n */\n value: { type: [Date, Object] as PropType<BentoDatePickerValue>, default: null },\n },\n emits: [BentoDatePickerEvent.INPUT],\n setup(props, { emit }) {\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const datePickerContainerId = generateUid('bento-date-picker-container');\n const labelId = generateUid('bento-date-picker-label');\n const descriptionId = generateUid('bento-date-picker-description');\n const errorId = generateUid('bento-date-picker-error');\n const dateErrorId = generateUid('bento-date-picker-date-error');\n const popoverAriaLabel = computed(() => props.label || t('datePicker', { name: datePickerContainerId }));\n\n // Refs\n const calendarContainerRef = ref(null);\n const inputContainerRef = ref(null);\n\n // Values\n const isDateIncorrect = ref(false);\n const isDatePickerOpen = ref(false);\n const { isReadOnly } = useFormLayoutFieldLoading(toRef(props, 'readonly'));\n\n watch(\n () => props.disabled,\n disabled => {\n // Close date picker popover if it's opened when it's disabled\n if (disabled && isDatePickerOpen.value) {\n isDatePickerOpen.value = false;\n }\n }\n );\n\n const { dateDisplayValue, textInputValue, formatTextInputDisplayValue } = useDatePickerSingleCalendarText({\n datePickerValue: toRef(props, 'value') as Ref<Date>,\n isDateIncorrect,\n });\n\n const dateErrorText = computed(() => {\n if (\n props.isDateDisabled &&\n props.isDateDisabled(new Date(textInputValue.value)) &&\n !isDatePickerOpen.value\n ) {\n return t('selectedDateIsNotAvailable');\n }\n\n return isDateIncorrect.value ? t('provideDateInAFormat') : null;\n });\n\n const descriptionConditionalClasses = computed(() => ({\n 'b-date-picker__description--error': props.errorMessage || dateErrorText.value,\n }));\n\n const ariaDescribedBy = computed(\n () =>\n `${props.description ? descriptionId : ''} ${props.errorMessage ? errorId : ''} ${\n dateErrorText.value ? dateErrorId : ''\n }`.trim() || null\n );\n\n const isDateEnabled = (date: Date) => {\n // Check if date is between min/max bounds, if there are any\n if ((props.min && date <= props.min) || (props.max && date >= props.max)) {\n return false;\n }\n\n // Check if function is set, otherwise all dates are enabled\n if (props.isDateDisabled) {\n return !props.isDateDisabled(date);\n }\n\n return true;\n };\n\n const closeDatePicker = () => {\n isDatePickerOpen.value = false;\n };\n\n const openDatePicker = () => {\n isDatePickerOpen.value = true;\n\n formatTextInputDisplayValue();\n };\n\n const onDateSelected = (selectedDate: Date) => {\n // Reset the error state when a valid date is selected\n isDateIncorrect.value = false;\n\n closeDatePicker();\n emit(BentoDatePickerEvent.INPUT, selectedDate);\n };\n\n const clearDatePickerValue = async () => {\n if (isDateIncorrect.value) {\n isDateIncorrect.value = false;\n textInputValue.value = null;\n }\n emit(BentoDatePickerEvent.INPUT, null);\n };\n\n const onDateKeyDown = (event: KeyboardEvent) => {\n validateDateInput(event);\n };\n\n const validateDate = (stringDate: string) => {\n // Validate only if the date is complete\n if (stringDate.length < 10) {\n return;\n }\n\n // Checks for YYYY-MM-DD format\n const dateRegex = /^\\d{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])$/;\n const isValidDate = dateRegex.test(stringDate) && isDateEnabled(new Date(stringDate));\n if (isValidDate) {\n isDateIncorrect.value = false;\n emit(BentoDatePickerEvent.INPUT, new Date(stringDate));\n } else if (stringDate) {\n // Only set to true if the value exists (not null/undefined)\n isDateIncorrect.value = true;\n emit(BentoDatePickerEvent.INPUT, null);\n }\n };\n\n const validateDateDebounced = debounce(validateDate, DEBOUNCE_TIME);\n\n const onDateInputChange = (stringDate: string) => {\n textInputValue.value = formatDateInputValue(stringDate);\n // If we are closing the date picker, we should validate (and emit date inputs) immediately so the user doesn't have to wait for the debounce time.\n if (isDatePickerOpen.value) {\n validateDateDebounced(textInputValue.value);\n } else {\n validateDate(textInputValue.value);\n }\n };\n\n /**\n * Space bar and Enter keyDown event handler.\n *\n * * Opens the date picker dialog on the first keydown.\n * * Move focus to selected date, i.e., the date displayed in the date input text field. If no date has been selected, places focus on the current date.\n * @param {KeyboardEvent} event Event being triggered\n */\n const onSpaceBarOrEnter = async (event: KeyboardEvent) => {\n if (isDatePickerOpen.value) {\n return;\n }\n event.preventDefault();\n\n openDatePicker();\n\n // Wait for the date picker dialog to open\n await nextTick();\n\n // Set current date (today) if no date is selected\n if (!props.value) {\n // Format the opened date picker date to YYYY-MM-DD\n formatTextInputDisplayValue(new Date());\n emit(BentoDatePickerEvent.INPUT, new Date());\n\n // Wait for new value to be set with the emit\n await nextTick();\n }\n\n // Focus on date\n calendarContainerRef.value?.$refs.calendarRef[0].focusOnDate(props.value);\n };\n\n return {\n // Refs\n inputContainerRef,\n calendarContainerRef,\n\n // Values,\n dateDisplayValue,\n datePickerContainerId,\n descriptionConditionalClasses,\n isDateIncorrect,\n isDatePickerOpen,\n isReadOnly,\n dateErrorText,\n labelId,\n descriptionId,\n errorId,\n dateErrorId,\n popoverAriaLabel,\n ariaDescribedBy,\n textInputValue,\n\n // Events\n closeDatePicker,\n clearDatePickerValue,\n onDateSelected,\n openDatePicker,\n onDateKeyDown,\n onDateInputChange,\n\n // Keyboard navigation\n onSpaceBarOrEnter,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./date-picker.scss\" />\n"],"names":["BentoDatePickerEvent","BentoDatePickerEvent2","useDatePickerSingleCalendarText","datePickerValue","isDateIncorrect","locale","t","useI18n","locales","de","enUS","fr","textInputValue","ref","_a","computed","format","DateFormat","dateToFormat","DEBOUNCE_TIME","_sfc_main","defineComponent","messages","BentoTypography","BentoPopover","Calendar","ErrorMessage","DropdownInputDefault","BentoClickOutsideDirective","props","emit","datePickerContainerId","generateUid","labelId","descriptionId","errorId","dateErrorId","popoverAriaLabel","calendarContainerRef","inputContainerRef","isDatePickerOpen","isReadOnly","useFormLayoutFieldLoading","toRef","watch","disabled","dateDisplayValue","formatTextInputDisplayValue","dateErrorText","descriptionConditionalClasses","ariaDescribedBy","isDateEnabled","date","closeDatePicker","openDatePicker","onDateSelected","selectedDate","clearDatePickerValue","onDateKeyDown","event","validateDateInput","validateDate","stringDate","validateDateDebounced","debounce","formatDateInputValue","nextTick","_ctx","createCommentVNode","openBlock","createBlock","_component_bento_typography","_hoisted_1","createElementVNode","createVNode","_component_dropdown_input_default","_component_error_message","normalizeClass","_component_bento_popover","withCtx","_component_calendar"],"mappings":";;;;;;;;;;;;;;;;;AAMY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,QAAA,SADQA,IAAAD,KAAA,CAAA,CAAA;ACML,MAAAE,KAAA,CAAA,EAAA,iBAAAC,GAAA,iBAAAC,EAAA,MAAA;;AACH,QAAA,EAAA,QAAAC,GAAA,GAAAC,EAAA,IAAAC,EAAA,GACAC,IAAA,EAAA,IAAAC,IAAA,MAAAC,GAAA,IAAAC,GAAA,GAEAC,IAAAC,GAAAC,IAAAX,EAAA,UAAA,gBAAAW,EAAA,cAAA;AAoCA,SAAA;AAAA;AAAA,IAAO,kBAlCPC,EAAA,MAEIX,EAAA,QACIQ,EAAA,QAIJT,EAAA,QAKAa,EAAAb,EAAA,OAAAc,EAAA,WAAA;AAAA,MAAmE,QAAAT,EAAAH,EAAA,MAAA,UAAA,GAAA,CA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AAA;AAAA,MACY,sBAAA;AAAA,MACI,cAAAA,EAAA;AAAA,MACR,cAAA;AAAA,MACE,UAAA;AAAA;;MAGH,SAAAY,EAAA,MAAA;AAAA,QAAAL,EAAAM,GAAA;AAAA,UACgB,KAAA;AAAA,UACnB,qBAAAb,EAAA;AAAA,UACmB,oBAAAA,EAAA;AAAA,UACP,oBAAA;AAAA,UACJ,OAAAA,EAAA;AAAA,UACH,KAAAA,EAAA;AAAA,UACE,KAAAA,EAAA;AAAA;;;;;;;;;;"}
@@ -1,5 +1,5 @@
1
- import { B as t, a as r } from "./chunks/index.1dc4ebae.js";
2
- import { b as o } from "./chunks/calendar.cc37ac1f.js";
1
+ import { B as t, a as r } from "./chunks/index.369b0e66.js";
2
+ import { b as o } from "./chunks/calendar.c83d4e99.js";
3
3
  export {
4
4
  t as BentoDateRangePicker,
5
5
  r as BentoDateRangePickerEvent,
package/dist/date.js CHANGED
@@ -1,4 +1,4 @@
1
- import { B as e, a as o } from "./chunks/index.d68847b0.js";
1
+ import { B as e, a as o } from "./chunks/index.fa7b44f1.js";
2
2
  export {
3
3
  e as BentoDate,
4
4
  o as BentoDateFormat
package/dist/divider.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as i, computed as o, openBlock as s, createElementBlock as n } from "vue";
2
2
  import { _ } from "./chunks/_plugin-vue_export-helper.dad06003.js";
3
- import "./assets/index12.css";
3
+ import "./assets/index24.css";
4
4
  const d = i({
5
5
  name: "bento-divider",
6
6
  setup(t, { attrs: r }) {
package/dist/dropdown.js CHANGED
@@ -1,12 +1,12 @@
1
- import { B as d } from "./chunks/dropdown.7a104ce3.js";
1
+ import { B as d } from "./chunks/dropdown.afff433b.js";
2
2
  import { defineComponent as _, computed as I, resolveComponent as u, openBlock as l, createElementBlock as b, createVNode as m, mergeProps as f, withCtx as y, toRefs as g, provide as h, createBlock as v } from "vue";
3
- import { B as C, L as B } from "./chunks/listbox-option-tag.0f31ecb2.js";
3
+ import { B as C, L as B } from "./chunks/listbox-option-tag.809ec40e.js";
4
4
  import { _ as w } from "./chunks/_plugin-vue_export-helper.dad06003.js";
5
5
  import { BentoCountry as D, BentoCountryVariant as $ } from "./country.js";
6
6
  import { u as A } from "./chunks/useCountryItems.e83ef8f0.js";
7
- import { d as k } from "./chunks/index.7f24db66.js";
7
+ import { d as k } from "./chunks/index.2bd3812b.js";
8
8
  import { BentoPaymentMethod as M } from "./payment-method.js";
9
- import "./assets/index11.css";
9
+ import "./assets/index23.css";
10
10
  const T = _({
11
11
  name: "bento-dropdown-avatar",
12
12
  components: {