@adyen/bento-vue3 1.22.0 → 1.24.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 (251) hide show
  1. package/dist/@types/packages/vue2/src/components/avatar-image/avatar-image.vue.d.ts +38 -48
  2. package/dist/@types/packages/vue2/src/components/card/card.vue.d.ts +25 -20
  3. package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-cell/data-grid-cell.types.d.ts +9 -5
  4. package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-cell/data-grid-cell.vue.d.ts +15 -0
  5. package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-columns/data-grid-columns.types.d.ts +1 -0
  6. package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-columns/data-grid-columns.vue.d.ts +18 -0
  7. package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-config-settings/data-grid-config-settings.vue.d.ts +1 -0
  8. package/dist/@types/packages/vue2/src/components/data-grid/composables/index.d.ts +1 -0
  9. package/dist/@types/packages/vue2/src/components/data-grid/composables/use-calculate-column-width/use-calculate-column-width.d.ts +2 -1
  10. package/dist/@types/packages/vue2/src/components/data-grid/composables/use-column-hovering/index.d.ts +2 -0
  11. package/dist/@types/packages/vue2/src/components/data-grid/composables/use-column-hovering/use-column-hovering.d.ts +53 -0
  12. package/dist/@types/packages/vue2/src/components/data-grid/composables/use-column-hovering/use-column-hovering.types.d.ts +12 -0
  13. package/dist/@types/packages/vue2/src/components/data-grid/composables/use-config-settings/use-config-settings.d.ts +2 -99
  14. package/dist/@types/packages/vue2/src/components/data-grid/composables/use-config-settings/use-config.settings.types.d.ts +7 -0
  15. package/dist/@types/packages/vue2/src/components/data-grid/composables/use-resizer.d.ts +47 -1
  16. package/dist/@types/packages/vue2/src/components/data-grid/data-grid.vue.d.ts +48 -8
  17. package/dist/@types/packages/vue2/src/components/dropdown/dropdown.vue.d.ts +1 -1
  18. package/dist/@types/packages/vue2/src/components/filter-bar/components/all-filters-modal/all-filters-modal.vue.d.ts +48 -24
  19. package/dist/@types/packages/vue2/src/components/filter-bar/components/base-filter-button/base-filter-button.vue.d.ts +1 -1
  20. package/dist/@types/packages/vue2/src/components/filter-bar/filter-bar.types.d.ts +12 -2
  21. package/dist/@types/packages/vue2/src/components/input-field/input-field.vue.d.ts +10 -2
  22. package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-multi-select/components/listbox-multi-select-options/components/listbox-multi-select-category/listbox-multi-select-category.vue.d.ts +25 -20
  23. package/dist/@types/packages/vue2/src/components/menu/menu.types.d.ts +1 -1
  24. package/dist/@types/packages/vue2/src/components/menu/menu.vue.d.ts +1 -0
  25. package/dist/@types/packages/vue2/src/components/modal/components/base-modal/base-modal.vue.d.ts +3 -3
  26. package/dist/@types/packages/vue2/src/components/modal/components/modal-default/modal-default.vue.d.ts +2 -2
  27. package/dist/@types/packages/vue2/src/components/modal/modal.vue.d.ts +3 -3
  28. package/dist/@types/packages/vue2/src/components/popper-container/popper-container.vue.d.ts +1 -1
  29. package/dist/@types/packages/vue2/src/components/stepper/composables/index.d.ts +2 -0
  30. package/dist/@types/packages/vue2/src/components/stepper/composables/use-step-register/use-step-register.d.ts +11 -0
  31. package/dist/@types/packages/vue2/src/components/stepper/stepper.types.d.ts +1 -0
  32. package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item/summary-grid-item.vue.d.ts +3 -3
  33. package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item-amount/summary-grid-item-amount.vue.d.ts +3 -3
  34. package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item-numeric/summary-grid-item-numeric.vue.d.ts +3 -3
  35. package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item-percentage/summary-grid-item-percentage.vue.d.ts +3 -3
  36. package/dist/@types/packages/vue2/src/components/toast/components/toast-item/toast-item.vue.d.ts +7 -40
  37. package/dist/@types/packages/vue2/src/components/toast/components/toast-shadow-stack/toast-shadow-stack.types.d.ts +5 -0
  38. package/dist/@types/packages/vue2/src/components/toast/components/toast-shadow-stack/toast-shadow-stack.vue.d.ts +7 -0
  39. package/dist/@types/packages/vue2/src/components/toast/index.d.ts +0 -1
  40. package/dist/@types/packages/vue2/src/components/toast/toast.vue.d.ts +1 -29
  41. package/dist/@types/packages/vue2/src/components/tooltip/tooltip.vue.d.ts +195 -55
  42. package/dist/@types/packages/vue2/src/components/typography/typography.vue.d.ts +71 -85
  43. package/dist/@types/packages/vue2/src/composables/index.d.ts +1 -0
  44. package/dist/@types/packages/vue2/src/composables/use-bento-toast-controller/index.d.ts +2 -0
  45. package/dist/@types/packages/vue2/src/composables/use-bento-toast-controller/install.d.ts +6 -0
  46. package/dist/@types/packages/vue2/src/composables/use-bento-toast-controller/toast-stack.d.ts +7 -0
  47. package/dist/@types/packages/vue2/src/composables/use-bento-toast-controller/use-bento-toast-controller.d.ts +2 -0
  48. package/dist/@types/packages/vue2/src/composables/use-bento-toast-controller/use-bento-toast-controller.types.d.ts +23 -0
  49. package/dist/@types/packages/vue2/src/index.d.ts +1 -0
  50. package/dist/@types/packages/vue2/src/utils/ts/storybook.d.ts +10 -0
  51. package/dist/accordion.js +2 -2
  52. package/dist/action-bar.js +6 -6
  53. package/dist/alert.js +113 -77
  54. package/dist/alert.js.map +1 -1
  55. package/dist/assets/base-modal.css +1 -1
  56. package/dist/assets/button.css +1 -1
  57. package/dist/assets/dialog-page.css +1 -1
  58. package/dist/assets/grid-layout.css +1 -1
  59. package/dist/assets/index.css +1 -1
  60. package/dist/assets/index10.css +1 -1
  61. package/dist/assets/index11.css +1 -1
  62. package/dist/assets/index12.css +1 -1
  63. package/dist/assets/index13.css +1 -1
  64. package/dist/assets/index14.css +1 -1
  65. package/dist/assets/index15.css +1 -1
  66. package/dist/assets/index16.css +1 -1
  67. package/dist/assets/index17.css +1 -1
  68. package/dist/assets/index18.css +1 -1
  69. package/dist/assets/index19.css +1 -1
  70. package/dist/assets/index2.css +1 -1
  71. package/dist/assets/index20.css +1 -1
  72. package/dist/assets/index21.css +1 -1
  73. package/dist/assets/index22.css +1 -1
  74. package/dist/assets/index23.css +1 -1
  75. package/dist/assets/index24.css +1 -1
  76. package/dist/assets/index25.css +1 -1
  77. package/dist/assets/index26.css +1 -1
  78. package/dist/assets/index27.css +1 -1
  79. package/dist/assets/index28.css +1 -1
  80. package/dist/assets/index29.css +1 -1
  81. package/dist/assets/index3.css +1 -1
  82. package/dist/assets/index30.css +1 -1
  83. package/dist/assets/index31.css +1 -1
  84. package/dist/assets/index32.css +1 -1
  85. package/dist/assets/index33.css +1 -1
  86. package/dist/assets/index34.css +1 -1
  87. package/dist/assets/index35.css +1 -1
  88. package/dist/assets/index36.css +1 -1
  89. package/dist/assets/index37.css +1 -1
  90. package/dist/assets/index38.css +1 -1
  91. package/dist/assets/index39.css +1 -1
  92. package/dist/assets/index4.css +1 -1
  93. package/dist/assets/index40.css +1 -1
  94. package/dist/assets/index41.css +1 -1
  95. package/dist/assets/index42.css +1 -1
  96. package/dist/assets/index43.css +1 -1
  97. package/dist/assets/index44.css +1 -1
  98. package/dist/assets/index45.css +1 -1
  99. package/dist/assets/index46.css +1 -1
  100. package/dist/assets/index47.css +1 -1
  101. package/dist/assets/index48.css +1 -1
  102. package/dist/assets/index5.css +1 -1
  103. package/dist/assets/index6.css +1 -1
  104. package/dist/assets/index7.css +1 -1
  105. package/dist/assets/index8.css +1 -1
  106. package/dist/assets/index9.css +1 -1
  107. package/dist/avatar-image.js +1 -1
  108. package/dist/badge.js +1 -1
  109. package/dist/button.js +5 -5
  110. package/dist/card.js +3 -3
  111. package/dist/checkbox.js +5 -5
  112. package/dist/chunks/{base-button.86be8130.js → base-button.ab9c947e.js} +2 -2
  113. package/dist/chunks/{base-button.86be8130.js.map → base-button.ab9c947e.js.map} +1 -1
  114. package/dist/chunks/{base-modal.01333c00.js → base-modal.28b5ff83.js} +6 -6
  115. package/dist/chunks/{base-modal.01333c00.js.map → base-modal.28b5ff83.js.map} +1 -1
  116. package/dist/chunks/{button-actions-with-menu.df95130d.js → button-actions-with-menu.305991e5.js} +4 -4
  117. package/dist/chunks/{button-actions-with-menu.df95130d.js.map → button-actions-with-menu.305991e5.js.map} +1 -1
  118. package/dist/chunks/{button-actions.bcc9dcc7.js → button-actions.ea025810.js} +3 -3
  119. package/dist/chunks/{button-actions.bcc9dcc7.js.map → button-actions.ea025810.js.map} +1 -1
  120. package/dist/chunks/{button.a378e7ab.js → button.ce5d1f5e.js} +3 -3
  121. package/dist/chunks/{button.a378e7ab.js.map → button.ce5d1f5e.js.map} +1 -1
  122. package/dist/chunks/{calendar.891a60a9.js → calendar.24a492f1.js} +4 -4
  123. package/dist/chunks/{calendar.891a60a9.js.map → calendar.24a492f1.js.map} +1 -1
  124. package/dist/chunks/{checkbox.9753e9d6.js → checkbox.d0f897e0.js} +3 -3
  125. package/dist/chunks/{checkbox.9753e9d6.js.map → checkbox.d0f897e0.js.map} +1 -1
  126. package/dist/chunks/{controls-group.84981503.js → controls-group.2b31233c.js} +3 -3
  127. package/dist/chunks/{controls-group.84981503.js.map → controls-group.2b31233c.js.map} +1 -1
  128. package/dist/chunks/{copy.86eb5d86.js → copy.9003ed59.js} +4 -4
  129. package/dist/chunks/{copy.86eb5d86.js.map → copy.9003ed59.js.map} +1 -1
  130. package/dist/chunks/{dialog-page.ce02932b.js → dialog-page.2c07d294.js} +3 -3
  131. package/dist/chunks/{dialog-page.ce02932b.js.map → dialog-page.2c07d294.js.map} +1 -1
  132. package/dist/chunks/{dropdown-default-textbox.91ad6585.js → dropdown-default-textbox.311443a8.js} +136 -116
  133. package/dist/chunks/dropdown-default-textbox.311443a8.js.map +1 -0
  134. package/dist/chunks/{dropdown.6c010045.js → dropdown.170b43c4.js} +14 -15
  135. package/dist/chunks/{dropdown.6c010045.js.map → dropdown.170b43c4.js.map} +1 -1
  136. package/dist/chunks/{error-message.498811e4.js → error-message.4678cbdc.js} +2 -2
  137. package/dist/chunks/{error-message.498811e4.js.map → error-message.4678cbdc.js.map} +1 -1
  138. package/dist/chunks/{fixed-scroller.51b63488.js → fixed-scroller.f09618f2.js} +2 -2
  139. package/dist/chunks/{fixed-scroller.51b63488.js.map → fixed-scroller.f09618f2.js.map} +1 -1
  140. package/dist/chunks/{footer-actions.573307ed.js → footer-actions.2efe610e.js} +4 -4
  141. package/dist/chunks/{footer-actions.573307ed.js.map → footer-actions.2efe610e.js.map} +1 -1
  142. package/dist/chunks/{index.da4cb1b8.js → index.0d513625.js} +16 -17
  143. package/dist/chunks/{index.da4cb1b8.js.map → index.0d513625.js.map} +1 -1
  144. package/dist/chunks/{index.c4f8460d.js → index.1b1646bf.js} +187 -187
  145. package/dist/chunks/index.1b1646bf.js.map +1 -0
  146. package/dist/chunks/{index.037ae52f.js → index.44f2aca7.js} +2 -2
  147. package/dist/chunks/{index.037ae52f.js.map → index.44f2aca7.js.map} +1 -1
  148. package/dist/chunks/index.51fe0fc2.js +74 -0
  149. package/dist/chunks/index.51fe0fc2.js.map +1 -0
  150. package/dist/chunks/{index.9c423f37.js → index.6987f880.js} +6 -6
  151. package/dist/chunks/{index.9c423f37.js.map → index.6987f880.js.map} +1 -1
  152. package/dist/chunks/{index.9d65b72a.js → index.70c91b3b.js} +2 -2
  153. package/dist/chunks/{index.9d65b72a.js.map → index.70c91b3b.js.map} +1 -1
  154. package/dist/chunks/{index.fb0e9e1a.js → index.920cc1ee.js} +6 -6
  155. package/dist/chunks/{index.fb0e9e1a.js.map → index.920cc1ee.js.map} +1 -1
  156. package/dist/chunks/{index.e2793c20.js → index.b3cb905c.js} +3 -3
  157. package/dist/chunks/{index.e2793c20.js.map → index.b3cb905c.js.map} +1 -1
  158. package/dist/chunks/{index.030fb327.js → index.b772214b.js} +20 -19
  159. package/dist/chunks/index.b772214b.js.map +1 -0
  160. package/dist/chunks/{index.d6a0cf32.js → index.c41d1bbb.js} +2 -2
  161. package/dist/chunks/{index.d6a0cf32.js.map → index.c41d1bbb.js.map} +1 -1
  162. package/dist/chunks/index.c5b58864.js +62 -0
  163. package/dist/chunks/index.c5b58864.js.map +1 -0
  164. package/dist/chunks/{listbox-option-tag.abedc9e0.js → listbox-option-tag.bf77e0c4.js} +3 -3
  165. package/dist/chunks/{listbox-option-tag.abedc9e0.js.map → listbox-option-tag.bf77e0c4.js.map} +1 -1
  166. package/dist/chunks/{listbox.8ce17729.js → listbox.b6a1aea2.js} +5 -5
  167. package/dist/chunks/{listbox.8ce17729.js.map → listbox.b6a1aea2.js.map} +1 -1
  168. package/dist/chunks/{loading-button.5f58f1cf.js → loading-button.cdc193c6.js} +2 -2
  169. package/dist/chunks/{loading-button.5f58f1cf.js.map → loading-button.cdc193c6.js.map} +1 -1
  170. package/dist/chunks/{payment-method.313f2635.js → payment-method.ea1788f7.js} +2 -2
  171. package/dist/chunks/{payment-method.313f2635.js.map → payment-method.ea1788f7.js.map} +1 -1
  172. package/dist/chunks/{tooltip.a70c9e69.js → tooltip.10210728.js} +3 -3
  173. package/dist/chunks/{tooltip.a70c9e69.js.map → tooltip.10210728.js.map} +1 -1
  174. package/dist/chunks/use-bento-toast-controller.3275a505.js +50 -0
  175. package/dist/chunks/use-bento-toast-controller.3275a505.js.map +1 -0
  176. package/dist/chunks/use-click-outside.941d1600.js +14 -0
  177. package/dist/chunks/use-click-outside.941d1600.js.map +1 -0
  178. package/dist/code-snippet.js +7 -7
  179. package/dist/code-snippet.js.map +1 -1
  180. package/dist/country.js +2 -2
  181. package/dist/currency.js +1 -1
  182. package/dist/data-grid-template.js +1 -1
  183. package/dist/data-grid.js +1211 -1108
  184. package/dist/data-grid.js.map +1 -1
  185. package/dist/date-picker.js +21 -22
  186. package/dist/date-picker.js.map +1 -1
  187. package/dist/date-range-picker.js +2 -2
  188. package/dist/date.js +1 -1
  189. package/dist/divider.js +1 -1
  190. package/dist/dropdown.js +7 -7
  191. package/dist/empty-state.js +3 -3
  192. package/dist/filter-bar.js +587 -598
  193. package/dist/filter-bar.js.map +1 -1
  194. package/dist/focus-trap.js +1 -1
  195. package/dist/form-layout.js +2 -2
  196. package/dist/header.js +4 -4
  197. package/dist/index.js +248 -271
  198. package/dist/index.js.map +1 -1
  199. package/dist/info-icon.js +3 -3
  200. package/dist/input-field.js +85 -80
  201. package/dist/input-field.js.map +1 -1
  202. package/dist/internal.js +8 -8
  203. package/dist/link.js +1 -1
  204. package/dist/loading-indicator.js +1 -1
  205. package/dist/menu.js +1 -1
  206. package/dist/modal-fullscreen.js +6 -6
  207. package/dist/modal.js +6 -6
  208. package/dist/pagination.js +4 -4
  209. package/dist/payment-method.js +1 -1
  210. package/dist/popover.js +1 -1
  211. package/dist/popper-container.js +1 -1
  212. package/dist/radio-group.js +4 -4
  213. package/dist/search-bar.js +2 -2
  214. package/dist/secondary-nav.js +2 -2
  215. package/dist/segmented-control.js +3 -3
  216. package/dist/selection-card.js +4 -4
  217. package/dist/sidepanel.js +6 -6
  218. package/dist/status.js +2 -2
  219. package/dist/stepper.js +152 -141
  220. package/dist/stepper.js.map +1 -1
  221. package/dist/structured-list.js +1 -1
  222. package/dist/summary-grid.js +3 -3
  223. package/dist/tabs.js +3 -3
  224. package/dist/tag.js +3 -3
  225. package/dist/textarea.js +4 -4
  226. package/dist/timeline.js +7 -7
  227. package/dist/toast.js +185 -154
  228. package/dist/toast.js.map +1 -1
  229. package/dist/toggle.js +2 -2
  230. package/dist/tutorial.js +6 -6
  231. package/dist/typography.js +1 -1
  232. package/dist/web-types.json +1 -1
  233. package/package.json +2 -2
  234. package/dist/@types/packages/vue2/src/components/toast/components/toast-item/index.d.ts +0 -2
  235. package/dist/@types/packages/vue2/src/components/toast/components/toast-item/toast-item.types.d.ts +0 -9
  236. package/dist/@types/packages/vue2/src/plugins/toastController.d.ts +0 -12
  237. package/dist/@types/packages/vue2/src/utils/ts/toastController.d.ts +0 -2
  238. package/dist/chunks/directive.0408e565.js +0 -23
  239. package/dist/chunks/directive.0408e565.js.map +0 -1
  240. package/dist/chunks/dropdown-default-textbox.91ad6585.js.map +0 -1
  241. package/dist/chunks/index.030fb327.js.map +0 -1
  242. package/dist/chunks/index.19dab2ef.js +0 -101
  243. package/dist/chunks/index.19dab2ef.js.map +0 -1
  244. package/dist/chunks/index.6e7e9ac6.js +0 -125
  245. package/dist/chunks/index.6e7e9ac6.js.map +0 -1
  246. package/dist/chunks/index.c4f8460d.js.map +0 -1
  247. package/dist/chunks/info-filled.a6f9d7d0.js +0 -44
  248. package/dist/chunks/info-filled.a6f9d7d0.js.map +0 -1
  249. package/dist/chunks/toastController.0b01d2e8.js +0 -9
  250. package/dist/chunks/toastController.0b01d2e8.js.map +0 -1
  251. /package/dist/@types/packages/vue2/src/components/stepper/composables/{useKeyboardNavigation/useKeyboardNavigation.d.ts → use-keyboard-navigation/use-keyboard-navigation.d.ts} +0 -0
@@ -1,23 +1,22 @@
1
1
  import { ref as C, computed as P, defineComponent as J, toRef as N, watch as Q, nextTick as U, resolveComponent as p, resolveDirective as X, withDirectives as Z, openBlock as c, createElementBlock as x, withKeys as M, createBlock as y, createCommentVNode as k, createElementVNode as ee, createVNode as _, normalizeClass as ae, withCtx as h, createTextVNode as te, toDisplayString as re } from "vue";
2
- import { a as ne } from "./chunks/index.fb0e9e1a.js";
3
- import { B as oe } from "./chunks/index.6e7e9ac6.js";
4
- import { c as le } from "./chunks/dropdown-default-textbox.91ad6585.js";
5
- import { d as ie } from "./chunks/debounce.b5ef6acf.js";
6
- import { D as A, v as se, f as de } from "./chunks/date-input.9186a0bf.js";
2
+ import { a as ne } from "./chunks/index.920cc1ee.js";
3
+ import { B as oe } from "./chunks/index.51fe0fc2.js";
4
+ import { c as le, B as ie } from "./chunks/dropdown-default-textbox.311443a8.js";
5
+ import { d as se } from "./chunks/debounce.b5ef6acf.js";
6
+ import { D as A, v as de, f as ue } from "./chunks/date-input.9186a0bf.js";
7
7
  import { g as I } from "./chunks/unique-id.a2a2b458.js";
8
8
  import { u as L } from "./chunks/i18n.f7e6533e.js";
9
- import { f as F } from "./chunks/index.d6a0cf32.js";
10
- import { e as w, d as ue, f as pe } from "./chunks/index.f55fdc32.js";
11
- import { u as ce } from "./chunks/use-form-layout-loading.d03e5d48.js";
12
- import { B as fe } from "./chunks/directive.0408e565.js";
13
- import { C as g } from "./chunks/calendar.891a60a9.js";
14
- import { b as qe } from "./chunks/calendar.891a60a9.js";
15
- import { E as me, F as De } from "./chunks/error-message.498811e4.js";
9
+ import { f as F } from "./chunks/index.c41d1bbb.js";
10
+ import { e as w, d as pe, f as ce } from "./chunks/index.f55fdc32.js";
11
+ import { u as fe } from "./chunks/use-form-layout-loading.d03e5d48.js";
12
+ import { C as g } from "./chunks/calendar.24a492f1.js";
13
+ import { b as Ye } from "./chunks/calendar.24a492f1.js";
14
+ import { E as me, F as De } from "./chunks/error-message.4678cbdc.js";
16
15
  import { _ as be } from "./chunks/_plugin-vue_export-helper.dad06003.js";
17
- import "./assets/index6.css";
16
+ import "./assets/index.css";
18
17
  const ve = ({ datePickerValue: e, isDateIncorrect: t }) => {
19
18
  var i;
20
- const { locale: o, t: f } = L(), m = { de: ue, enUS: w, fr: pe }, l = C((i = e.value) == null ? void 0 : i.toDateString());
19
+ const { locale: o, t: f } = L(), m = { de: pe, enUS: w, fr: ce }, l = C((i = e.value) == null ? void 0 : i.toDateString());
21
20
  return {
22
21
  // Values
23
22
  dateDisplayValue: P(() => t.value ? l.value : e.value ? F(e.value, A.FULL_DATE, {
@@ -52,7 +51,7 @@ const $ = {
52
51
  DropdownInputDefault: le,
53
52
  FieldLabel: De
54
53
  },
55
- directives: { BentoClickOutsideDirective: fe },
54
+ directives: { BentoClickOutsideDirective: ie },
56
55
  props: {
57
56
  /**
58
57
  * Descriptive supporting text visbile underneath the dropdown.
@@ -109,7 +108,7 @@ const $ = {
109
108
  },
110
109
  emits: [d.INPUT],
111
110
  setup(e, { emit: t }) {
112
- const { t: o } = L({ messages: $ }), f = I("bento-date-picker-container"), m = I("bento-date-picker-label"), l = I("bento-date-picker-description"), D = I("bento-date-picker-error"), b = I("bento-date-picker-date-error"), i = P(() => e.label || o("datePicker", { name: f })), s = C(null), E = C(null), r = C(!1), n = C(!1), { isReadOnly: v } = ce(N(e, "readonly"));
111
+ const { t: o } = L({ messages: $ }), f = I("bento-date-picker-container"), m = I("bento-date-picker-label"), l = I("bento-date-picker-description"), D = I("bento-date-picker-error"), b = I("bento-date-picker-date-error"), i = P(() => e.label || o("datePicker", { name: f })), s = C(null), E = C(null), r = C(!1), n = C(!1), { isReadOnly: v } = fe(N(e, "readonly"));
113
112
  Q(
114
113
  () => e.disabled,
115
114
  (a) => {
@@ -132,12 +131,12 @@ const $ = {
132
131
  }, z = async () => {
133
132
  r.value && (r.value = !1, u.value = null), t(d.INPUT, null);
134
133
  }, G = (a) => {
135
- se(a);
134
+ de(a);
136
135
  }, R = (a) => {
137
136
  if (a.length < 10)
138
137
  return;
139
138
  /^\d{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])$/.test(a) && W(new Date(a)) ? (r.value = !1, t(d.INPUT, new Date(a))) : a && (r.value = !0, t(d.INPUT, null));
140
- }, H = ie(R, ye);
139
+ }, H = se(R, ye);
141
140
  return {
142
141
  // Refs
143
142
  inputContainerRef: E,
@@ -164,7 +163,7 @@ const $ = {
164
163
  openDatePicker: V,
165
164
  onDateKeyDown: G,
166
165
  onDateInputChange: (a) => {
167
- u.value = de(a), n.value ? H(u.value) : R(u.value);
166
+ u.value = ue(a), n.value ? H(u.value) : R(u.value);
168
167
  },
169
168
  // Keyboard navigation
170
169
  onSpaceBarOrEnter: async (a) => {
@@ -267,10 +266,10 @@ function Ie(e, t, o, f, m, l) {
267
266
  [n, e.closeDatePicker]
268
267
  ]);
269
268
  }
270
- const $e = /* @__PURE__ */ be(ke, [["render", Ie], ["__scopeId", "data-v-a7b0c2e4"]]);
269
+ const Fe = /* @__PURE__ */ be(ke, [["render", Ie], ["__scopeId", "data-v-a7b0c2e4"]]);
271
270
  export {
272
- $e as BentoDatePicker,
271
+ Fe as BentoDatePicker,
273
272
  d as BentoDatePickerEvent,
274
- qe as BentoDatePickerFirstDayOfWeek
273
+ Ye as BentoDatePickerFirstDayOfWeek
275
274
  };
276
275
  //# sourceMappingURL=date-picker.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"date-picker.js","sources":["../../vue2/src/components/date-picker/composables/use-date-picker-single-calendar-text.ts","../../vue2/src/components/date-picker/date-picker.types.ts","../../vue2/src/components/date-picker/date-picker.vue"],"sourcesContent":["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","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","<!-- 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 <field-label\n v-if=\"label\"\n :id=\"labelId\"\n :label=\"label\"\n :tooltip-text=\"tooltipText\"\n :optional=\"optional\"\n :required=\"required\"\n />\n\n <!-- Input -->\n <div>\n <dropdown-input-default\n ref=\"inputContainerRef\"\n always-combobox-is-input\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\n // Components\n import { BentoPopover } from '@/components/popover';\n import { BentoTypography } from '../typography';\n import { Calendar, ErrorMessage, FieldLabel } from '@/internal';\n import { DropdownInputDefault } from '@/components/dropdown/components';\n\n // Utils\n import { debounce } from '@/utils/ts/debounce';\n import { formatDateInputValue, validateDateInput } from '@/utils/ts/date-input';\n import { generateUid } from '@/utils/ts/unique-id';\n import { useI18n } from '@/utils/ts/i18n';\n\n // Composables\n import { useDatePickerSingleCalendarText } from './composables/use-date-picker-single-calendar-text';\n import { useFormLayoutFieldLoading } from '@/composables';\n\n // Directive\n import { BentoClickOutsideDirective } from '@/directives';\n\n // Types\n import { BentoDatePickerEvent, BentoDatePickerValue } from './date-picker.types';\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 FieldLabel,\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 * Adds a info icon next to the label to display the passed tooltip message.\n */\n tooltipText: { type: String, default: null },\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":["useDatePickerSingleCalendarText","datePickerValue","isDateIncorrect","locale","t","useI18n","locales","de","enUS","fr","textInputValue","ref","_a","computed","format","DateFormat","dateToFormat","BentoDatePickerEvent","BentoDatePickerEvent2","DEBOUNCE_TIME","_sfc_main","defineComponent","messages","BentoTypography","BentoPopover","Calendar","ErrorMessage","DropdownInputDefault","FieldLabel","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","createElementVNode","createVNode","_component_dropdown_input_default","openBlock","createBlock","_component_error_message","_component_bento_typography","normalizeClass","_component_bento_popover","withCtx","_component_calendar"],"mappings":";;;;;;;;;;;;;;;;;AAYO,MAAAA,KAAA,CAAA,EAAA,iBAAAC,GAA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AAA;AAAA,IAMSD,EAAA,eAAAK,EAAA,GAAAC,EAAAE,GAAA;AAAA,MAJP,KAAA;AAAA,MACL,OAAAC,GAAA,CAAA,8BAAAT,EAAA,6BAAA,CAAA;AAAA;;;;;;IAOG,GAAA,GAAA,CAAA,OAAA,CAAA,KAAAC,EAAA,IAAA,EAAA;AAAA,IAsBMD,EAAA,qBAAAK,EAAA,GAAAC,EAAAI,GAAA;AAAA,MArBc,KAAA;AAAA,MACrB,IAAAV,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,SAAAW,EAAA,MAAA;AAAA,QAAAR,EAAAS,GAAA;AAAA,UACgB,KAAA;AAAA,UACnB,qBAAAZ,EAAA;AAAA,UACmB,oBAAAA,EAAA;AAAA,UACP,oBAAA;AAAA,UACJ,OAAAA,EAAA;AAAA,UACH,KAAAA,EAAA;AAAA,UACE,KAAAA,EAAA;AAAA;;;;;;;;;;"}
1
+ {"version":3,"file":"date-picker.js","sources":["../../vue2/src/components/date-picker/composables/use-date-picker-single-calendar-text.ts","../../vue2/src/components/date-picker/date-picker.types.ts","../../vue2/src/components/date-picker/date-picker.vue"],"sourcesContent":["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","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","<!-- 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 <field-label\n v-if=\"label\"\n :id=\"labelId\"\n :label=\"label\"\n :tooltip-text=\"tooltipText\"\n :optional=\"optional\"\n :required=\"required\"\n />\n\n <!-- Input -->\n <div>\n <dropdown-input-default\n ref=\"inputContainerRef\"\n always-combobox-is-input\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\n // Components\n import { BentoPopover } from '@/components/popover';\n import { BentoTypography } from '../typography';\n import { Calendar, ErrorMessage, FieldLabel } from '@/internal';\n import { DropdownInputDefault } from '@/components/dropdown/components';\n\n // Utils\n import { debounce } from '@/utils/ts/debounce';\n import { formatDateInputValue, validateDateInput } from '@/utils/ts/date-input';\n import { generateUid } from '@/utils/ts/unique-id';\n import { useI18n } from '@/utils/ts/i18n';\n\n // Composables\n import { useDatePickerSingleCalendarText } from './composables/use-date-picker-single-calendar-text';\n import { useFormLayoutFieldLoading } from '@/composables';\n\n // Directive\n import { BentoClickOutsideDirective } from '@/directives';\n\n // Types\n import { BentoDatePickerEvent, BentoDatePickerValue } from './date-picker.types';\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 FieldLabel,\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 * Adds a info icon next to the label to display the passed tooltip message.\n */\n tooltipText: { type: String, default: null },\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":["useDatePickerSingleCalendarText","datePickerValue","isDateIncorrect","locale","t","useI18n","locales","de","enUS","fr","textInputValue","ref","_a","computed","format","DateFormat","dateToFormat","BentoDatePickerEvent","BentoDatePickerEvent2","DEBOUNCE_TIME","_sfc_main","defineComponent","messages","BentoTypography","BentoPopover","Calendar","ErrorMessage","DropdownInputDefault","FieldLabel","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","createElementVNode","createVNode","_component_dropdown_input_default","openBlock","createBlock","_component_error_message","_component_bento_typography","normalizeClass","_component_bento_popover","withCtx","_component_calendar"],"mappings":";;;;;;;;;;;;;;;;AAYO,MAAAA,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,CAAA,CAAA,KAAAK;AAAA,IACd,CAAA,IALjDJ,EAAA,YAAA,CAMH;AAAA,IAsBD,gBAAAM;AAAA;AAAA,IACA,6BAhBJ,CAAAM,IAAAf,EAAA,UAAA;AAEI,MAAAC,EAAA,UAIAQ,EAAA,QAAAM,IAAAF,EAAAE,GAAAD,EAAA,yBAAA;AAAA,QAC+D,QAAAT,EAAAH,EAAA,MAAA,UAAA,GAA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AAA,UACH,KAAAA,EAAA;AAAA,UACE,KAAAA,EAAA;AAAA;;;;;;;;;;"}
@@ -1,5 +1,5 @@
1
- import { B as t, a as r } from "./chunks/index.da4cb1b8.js";
2
- import { b as o } from "./chunks/calendar.891a60a9.js";
1
+ import { B as t, a as r } from "./chunks/index.0d513625.js";
2
+ import { b as o } from "./chunks/calendar.24a492f1.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.d6a0cf32.js";
1
+ import { B as e, a as o } from "./chunks/index.c41d1bbb.js";
2
2
  export {
3
3
  e as BentoDate,
4
4
  o as BentoDateFormat
package/dist/divider.js CHANGED
@@ -1,4 +1,4 @@
1
- import { B as r } from "./chunks/index.9d65b72a.js";
1
+ import { B as r } from "./chunks/index.70c91b3b.js";
2
2
  export {
3
3
  r as BentoDivider
4
4
  };
package/dist/dropdown.js CHANGED
@@ -1,14 +1,14 @@
1
- import { B as n } from "./chunks/dropdown.6c010045.js";
2
- import { a as Z } from "./chunks/dropdown.6c010045.js";
1
+ import { B as n } from "./chunks/dropdown.170b43c4.js";
2
+ import { a as Z } from "./chunks/dropdown.170b43c4.js";
3
3
  import { defineComponent as r, computed as w, openBlock as l, createElementBlock as y, createVNode as i, mergeProps as f, unref as m, withCtx as _, toRefs as D, createTextVNode as $, toDisplayString as g, createBlock as v } from "vue";
4
- import { B as I, L as b } from "./chunks/listbox-option-tag.abedc9e0.js";
5
- import { d as C, B as x } from "./chunks/index.6e7e9ac6.js";
4
+ import { B as I, L as b } from "./chunks/listbox-option-tag.bf77e0c4.js";
5
+ import { d as C, B as x } from "./chunks/index.51fe0fc2.js";
6
6
  import { u as T } from "./chunks/use-country-items.32e30471.js";
7
7
  import { B } from "./chunks/country.types.002caff2.js";
8
- import { B as A } from "./chunks/payment-method.313f2635.js";
9
- import { b as ot, a as et } from "./chunks/listbox.8ce17729.js";
8
+ import { B as A } from "./chunks/payment-method.ea1788f7.js";
9
+ import { b as ot, a as et } from "./chunks/listbox.b6a1aea2.js";
10
10
  import { _ as k } from "./chunks/_plugin-vue_export-helper.dad06003.js";
11
- import "./assets/index5.css";
11
+ import "./assets/index37.css";
12
12
  const L = r({
13
13
  name: "bento-dropdown-avatar"
14
14
  }), G = /* @__PURE__ */ r({
@@ -1,9 +1,9 @@
1
1
  import { defineComponent as U, ref as v, computed as l, watch as L, openBlock as o, createElementBlock as A, unref as r, normalizeClass as S, createCommentVNode as d, createVNode as k, mergeProps as M, withCtx as c, renderSlot as C, createTextVNode as m, toDisplayString as f, createBlock as p, createSlots as P, resolveDynamicComponent as w } from "vue";
2
- import { a as F } from "./chunks/button.a378e7ab.js";
3
- import { c as j, B as y } from "./chunks/index.6e7e9ac6.js";
2
+ import { a as F } from "./chunks/button.ce5d1f5e.js";
3
+ import { c as j, B as y } from "./chunks/index.51fe0fc2.js";
4
4
  import { o as x } from "./chunks/resize.a041304d.js";
5
5
  import { _ as H } from "./chunks/_plugin-vue_export-helper.dad06003.js";
6
- import "./assets/index7.css";
6
+ import "./assets/index38.css";
7
7
  const O = (e, s) => {
8
8
  const i = e[s];
9
9
  return i ? typeof i == "function" ? i() : Promise.resolve(i) : new Promise((E, t) => {