@adyen/bento-vue3 1.7.0 → 1.8.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 (238) hide show
  1. package/dist/@types/components.d.ts +2 -0
  2. package/dist/@types/packages/core/src/components/button/button.types.d.ts +1 -1
  3. package/dist/@types/packages/vue2/src/components/action-bar/action-bar.vue.d.ts +11 -0
  4. package/dist/@types/packages/vue2/src/components/button/components/button-actions/button-actions.types.d.ts +1 -1
  5. package/dist/@types/packages/vue2/src/components/button/components/button-actions/button-actions.vue.d.ts +7 -2
  6. package/dist/@types/packages/vue2/src/components/button/components/loading-button/loading-button.vue.d.ts +25 -13
  7. package/dist/@types/packages/vue2/src/components/checkbox/checkbox.vue.d.ts +25 -0
  8. package/dist/@types/packages/vue2/src/components/data-grid/data-grid.vue.d.ts +13 -1
  9. package/dist/@types/packages/vue2/src/components/date-picker/date-picker.vue.d.ts +9 -0
  10. package/dist/@types/packages/vue2/src/components/date-range-picker/components/date-range-picker-calendar/date-range-picker-calendar.types.d.ts +6 -2
  11. package/dist/@types/packages/vue2/src/components/date-range-picker/components/date-range-picker-calendar/date-range-picker-calendar.vue.d.ts +153 -12
  12. package/dist/@types/packages/vue2/src/components/date-range-picker/date-range-picker.types.d.ts +1 -1
  13. package/dist/@types/packages/vue2/src/components/date-range-picker/date-range-picker.vue.d.ts +12 -0
  14. package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-options-container/dropdown-options-container.vue.d.ts +319 -96
  15. package/dist/@types/packages/vue2/src/components/dropdown/dropdown.vue.d.ts +12 -3
  16. package/dist/@types/packages/vue2/src/components/filter-bar/components/all-filters-modal/all-filters-modal.vue.d.ts +30 -24
  17. package/dist/@types/packages/vue2/src/components/filter-bar/components/date-range-filter/date-range-filter.vue.d.ts +1 -0
  18. package/dist/@types/packages/vue2/src/components/input-field/input-field.vue.d.ts +9 -0
  19. package/dist/@types/packages/vue2/src/components/internal/calendar/calendar.types.d.ts +12 -0
  20. package/dist/@types/packages/vue2/src/components/internal/calendar/calendar.vue.d.ts +11 -1
  21. package/dist/@types/packages/vue2/src/components/internal/calendar/components/calendar-month/composables/granular-min-max-date.d.ts +2 -0
  22. package/dist/@types/packages/vue2/src/components/internal/calendar/components/calendar-month/composables/granular-min-max-date.types.d.ts +13 -0
  23. package/dist/@types/packages/vue2/src/components/internal/calendar/composables/use-granularity-adjustments.d.ts +2 -0
  24. package/dist/@types/packages/vue2/src/components/internal/calendar/composables/use-granularity-adjustments.types.d.ts +14 -0
  25. package/dist/@types/packages/vue2/src/components/internal/calendar/composables/use-granularity-memory.d.ts +2 -0
  26. package/dist/@types/packages/vue2/src/components/internal/calendar/composables/use-granularity-memory.types.d.ts +22 -0
  27. package/dist/@types/packages/vue2/src/components/internal/field-label/field-label.vue.d.ts +48 -0
  28. package/dist/@types/packages/vue2/src/components/internal/field-label/index.d.ts +1 -0
  29. package/dist/@types/packages/vue2/src/components/internal/grid-layout/grid-layout.vue.d.ts +11 -0
  30. package/dist/@types/packages/vue2/src/components/internal/index.d.ts +1 -0
  31. package/dist/@types/packages/vue2/src/components/modal/components/base-modal/base-modal.vue.d.ts +2 -1
  32. package/dist/@types/packages/vue2/src/components/popover/popover.keys.d.ts +1 -0
  33. package/dist/@types/packages/vue2/src/components/popover/popover.vue.d.ts +18 -24
  34. package/dist/@types/packages/vue2/src/components/structured-list/components/structered-list-item/structured-list-item.vue.d.ts +1 -0
  35. package/dist/@types/packages/vue2/src/components/structured-list/structured-list.keys.d.ts +1 -0
  36. package/dist/@types/packages/vue2/src/components/structured-list/structured-list.vue.d.ts +20 -1
  37. package/dist/@types/packages/vue2/src/components/summary-grid/summary-grid.types.d.ts +4 -4
  38. package/dist/@types/packages/vue2/src/components/textarea/textarea.vue.d.ts +9 -0
  39. package/dist/@types/packages/vue2/src/components/timeline/components/timeline-item/timeline-item.vue.d.ts +19 -2
  40. package/dist/@types/packages/vue2/src/components/timeline/timeline.types.d.ts +4 -2
  41. package/dist/@types/packages/vue2/src/components/timeline/timeline.vue.d.ts +21 -3
  42. package/dist/@types/packages/vue2/src/index.d.ts +1 -0
  43. package/dist/accordion.js +2 -2
  44. package/dist/action-bar.js +146 -116
  45. package/dist/action-bar.js.map +1 -1
  46. package/dist/alert.js +3 -3
  47. package/dist/assets/base-modal.css +1 -1
  48. package/dist/assets/calendar.css +1 -1
  49. package/dist/assets/checkbox.css +1 -1
  50. package/dist/assets/controls-group.css +1 -1
  51. package/dist/assets/dropdown.css +1 -1
  52. package/dist/assets/field-label.css +1 -0
  53. package/dist/assets/grid-layout.css +1 -1
  54. package/dist/assets/index.css +1 -1
  55. package/dist/assets/index10.css +1 -1
  56. package/dist/assets/index11.css +1 -1
  57. package/dist/assets/index12.css +1 -1
  58. package/dist/assets/index13.css +1 -1
  59. package/dist/assets/index14.css +1 -1
  60. package/dist/assets/index15.css +1 -1
  61. package/dist/assets/index16.css +1 -1
  62. package/dist/assets/index17.css +1 -1
  63. package/dist/assets/index18.css +1 -1
  64. package/dist/assets/index19.css +1 -1
  65. package/dist/assets/index2.css +1 -1
  66. package/dist/assets/index20.css +1 -1
  67. package/dist/assets/index21.css +1 -1
  68. package/dist/assets/index22.css +1 -1
  69. package/dist/assets/index23.css +1 -1
  70. package/dist/assets/index24.css +1 -1
  71. package/dist/assets/index25.css +1 -1
  72. package/dist/assets/index26.css +1 -1
  73. package/dist/assets/index27.css +1 -1
  74. package/dist/assets/index28.css +1 -1
  75. package/dist/assets/index29.css +1 -1
  76. package/dist/assets/index3.css +1 -1
  77. package/dist/assets/index30.css +1 -1
  78. package/dist/assets/index31.css +1 -1
  79. package/dist/assets/index32.css +1 -1
  80. package/dist/assets/index33.css +1 -1
  81. package/dist/assets/index34.css +1 -1
  82. package/dist/assets/index35.css +1 -1
  83. package/dist/assets/index36.css +1 -1
  84. package/dist/assets/index37.css +1 -1
  85. package/dist/assets/index38.css +1 -1
  86. package/dist/assets/index39.css +1 -1
  87. package/dist/assets/index40.css +1 -1
  88. package/dist/assets/index41.css +1 -1
  89. package/dist/assets/index42.css +1 -1
  90. package/dist/assets/index43.css +1 -1
  91. package/dist/assets/index44.css +1 -1
  92. package/dist/assets/index45.css +1 -1
  93. package/dist/assets/index46.css +1 -1
  94. package/dist/assets/index5.css +1 -1
  95. package/dist/assets/index6.css +1 -1
  96. package/dist/assets/index7.css +1 -1
  97. package/dist/assets/index8.css +1 -1
  98. package/dist/assets/index9.css +1 -1
  99. package/dist/assets/loading-button.css +1 -1
  100. package/dist/avatar-image.js +1 -1
  101. package/dist/badge.js +1 -1
  102. package/dist/button.js +53 -51
  103. package/dist/button.js.map +1 -1
  104. package/dist/card.js +2 -2
  105. package/dist/checkbox.js +6 -6
  106. package/dist/chunks/{base-button.7897a95e.js → base-button.aa085dfa.js} +2 -2
  107. package/dist/chunks/{base-button.7897a95e.js.map → base-button.aa085dfa.js.map} +1 -1
  108. package/dist/chunks/{base-modal.0c85e7cb.js → base-modal.3dcf8376.js} +119 -105
  109. package/dist/chunks/base-modal.3dcf8376.js.map +1 -0
  110. package/dist/chunks/{button-actions-with-menu.fa35390c.js → button-actions-with-menu.3f52ea2d.js} +7 -7
  111. package/dist/chunks/{button-actions-with-menu.fa35390c.js.map → button-actions-with-menu.3f52ea2d.js.map} +1 -1
  112. package/dist/chunks/{button.e5177388.js → button.82ed953e.js} +2 -2
  113. package/dist/chunks/button.82ed953e.js.map +1 -0
  114. package/dist/chunks/calendar.d4ab387d.js +1037 -0
  115. package/dist/chunks/calendar.d4ab387d.js.map +1 -0
  116. package/dist/chunks/checkbox.03c4b0fe.js +265 -0
  117. package/dist/chunks/checkbox.03c4b0fe.js.map +1 -0
  118. package/dist/chunks/controls-group.807b5fb0.js +95 -0
  119. package/dist/chunks/controls-group.807b5fb0.js.map +1 -0
  120. package/dist/chunks/{copy.86236c8d.js → copy.28bd4298.js} +4 -4
  121. package/dist/chunks/{copy.86236c8d.js.map → copy.28bd4298.js.map} +1 -1
  122. package/dist/chunks/{dropdown-default-textbox.0b38fac3.js → dropdown-default-textbox.74c4584a.js} +2 -2
  123. package/dist/chunks/{dropdown-default-textbox.0b38fac3.js.map → dropdown-default-textbox.74c4584a.js.map} +1 -1
  124. package/dist/chunks/{dropdown.afff433b.js → dropdown.502e1f5c.js} +314 -337
  125. package/dist/chunks/dropdown.502e1f5c.js.map +1 -0
  126. package/dist/chunks/field-label.61679178.js +132 -0
  127. package/dist/chunks/field-label.61679178.js.map +1 -0
  128. package/dist/chunks/{fixed-scroller.e5aa7b00.js → fixed-scroller.92bb77a6.js} +2 -2
  129. package/dist/chunks/{fixed-scroller.e5aa7b00.js.map → fixed-scroller.92bb77a6.js.map} +1 -1
  130. package/dist/chunks/{footer-actions.1ce44374.js → footer-actions.cefaf1e2.js} +3 -3
  131. package/dist/chunks/{footer-actions.1ce44374.js.map → footer-actions.cefaf1e2.js.map} +1 -1
  132. package/dist/chunks/{grid-layout.7c919507.js → grid-layout.c2fe3057.js} +43 -34
  133. package/dist/chunks/grid-layout.c2fe3057.js.map +1 -0
  134. package/dist/chunks/{index.fa7b44f1.js → index.0ee895e0.js} +2 -2
  135. package/dist/chunks/{index.fa7b44f1.js.map → index.0ee895e0.js.map} +1 -1
  136. package/dist/chunks/{index.bcc58fdd.js → index.7262642e.js} +3 -3
  137. package/dist/chunks/{index.bcc58fdd.js.map → index.7262642e.js.map} +1 -1
  138. package/dist/chunks/index.726e2f3c.js +339 -0
  139. package/dist/chunks/index.726e2f3c.js.map +1 -0
  140. package/dist/chunks/{index.2bd3812b.js → index.75f3672e.js} +2 -2
  141. package/dist/chunks/{index.2bd3812b.js.map → index.75f3672e.js.map} +1 -1
  142. package/dist/chunks/{index.6a665ade.js → index.abb2a1d5.js} +3 -3
  143. package/dist/chunks/{index.6a665ade.js.map → index.abb2a1d5.js.map} +1 -1
  144. package/dist/chunks/index.b043371e.js +150 -0
  145. package/dist/chunks/index.b043371e.js.map +1 -0
  146. package/dist/chunks/{index.e579bc02.js → index.cf0d3be3.js} +19 -17
  147. package/dist/chunks/{index.e579bc02.js.map → index.cf0d3be3.js.map} +1 -1
  148. package/dist/chunks/{index.c207e9ab.js → index.d2542c6a.js} +132 -135
  149. package/dist/chunks/index.d2542c6a.js.map +1 -0
  150. package/dist/chunks/index.d80206ed.js +10 -0
  151. package/dist/chunks/index.d80206ed.js.map +1 -0
  152. package/dist/chunks/index.e9156fe3.js +817 -0
  153. package/dist/chunks/index.e9156fe3.js.map +1 -0
  154. package/dist/chunks/{listbox-option-tag.809ec40e.js → listbox-option-tag.5b00c85f.js} +3 -3
  155. package/dist/chunks/{listbox-option-tag.809ec40e.js.map → listbox-option-tag.5b00c85f.js.map} +1 -1
  156. package/dist/chunks/{listbox.f6e5a11d.js → listbox.d07c24e6.js} +4 -4
  157. package/dist/chunks/{listbox.f6e5a11d.js.map → listbox.d07c24e6.js.map} +1 -1
  158. package/dist/chunks/loading-button.ad7cfaee.js +108 -0
  159. package/dist/chunks/loading-button.ad7cfaee.js.map +1 -0
  160. package/dist/chunks/{tooltip.f769eb14.js → tooltip.054d2eb6.js} +3 -3
  161. package/dist/chunks/{tooltip.f769eb14.js.map → tooltip.054d2eb6.js.map} +1 -1
  162. package/dist/code-snippet.js +6 -6
  163. package/dist/code-snippet.js.map +1 -1
  164. package/dist/country.js +2 -2
  165. package/dist/currency.js +1 -1
  166. package/dist/data-grid.js +847 -820
  167. package/dist/data-grid.js.map +1 -1
  168. package/dist/date-picker.js +114 -138
  169. package/dist/date-picker.js.map +1 -1
  170. package/dist/date-range-picker.js +2 -2
  171. package/dist/date.js +1 -1
  172. package/dist/divider.js +1 -1
  173. package/dist/dropdown.js +4 -4
  174. package/dist/empty-state.js +3 -3
  175. package/dist/filter-bar.js +17 -16
  176. package/dist/filter-bar.js.map +1 -1
  177. package/dist/focus-trap.js +1 -1
  178. package/dist/form-layout.js +2 -2
  179. package/dist/header.js +76 -80
  180. package/dist/header.js.map +1 -1
  181. package/dist/index.js +207 -205
  182. package/dist/index.js.map +1 -1
  183. package/dist/info-icon.js +3 -3
  184. package/dist/input-field.js +136 -158
  185. package/dist/input-field.js.map +1 -1
  186. package/dist/internal.js +14 -13
  187. package/dist/link.js +2 -2
  188. package/dist/loading-indicator.js +1 -1
  189. package/dist/menu.js +1 -1
  190. package/dist/modal.js +4 -4
  191. package/dist/modal.js.map +1 -1
  192. package/dist/pagination.js +4 -4
  193. package/dist/payment-method.js +2 -2
  194. package/dist/popover.js +3 -359
  195. package/dist/popover.js.map +1 -1
  196. package/dist/popper-container.js +1 -1
  197. package/dist/radio-group.js +4 -4
  198. package/dist/search-bar.js +2 -2
  199. package/dist/segmented-control.js +3 -3
  200. package/dist/sidepanel.js +5 -5
  201. package/dist/status.js +2 -2
  202. package/dist/stepper.js +3 -3
  203. package/dist/structured-list.js +1 -1
  204. package/dist/summary-grid.js +4 -4
  205. package/dist/summary-grid.js.map +1 -1
  206. package/dist/tabs.js +3 -3
  207. package/dist/tag.js +3 -3
  208. package/dist/textarea.js +125 -149
  209. package/dist/textarea.js.map +1 -1
  210. package/dist/timeline.js +312 -229
  211. package/dist/timeline.js.map +1 -1
  212. package/dist/toast.js +3 -3
  213. package/dist/toggle.js +2 -2
  214. package/dist/tutorial.js +49 -49
  215. package/dist/typography.js +1 -1
  216. package/dist/web-types.json +1 -1
  217. package/package.json +2 -2
  218. package/dist/@types/packages/vue2/src/components/modal/components/base-modal/__mocks__/base-modal.vue.d.ts +0 -120
  219. package/dist/assets/error-message.css +0 -1
  220. package/dist/chunks/base-modal.0c85e7cb.js.map +0 -1
  221. package/dist/chunks/button.e5177388.js.map +0 -1
  222. package/dist/chunks/calendar.c83d4e99.js +0 -898
  223. package/dist/chunks/calendar.c83d4e99.js.map +0 -1
  224. package/dist/chunks/checkbox.3cdbdd52.js +0 -235
  225. package/dist/chunks/checkbox.3cdbdd52.js.map +0 -1
  226. package/dist/chunks/controls-group.38b436f6.js +0 -136
  227. package/dist/chunks/controls-group.38b436f6.js.map +0 -1
  228. package/dist/chunks/dropdown.afff433b.js.map +0 -1
  229. package/dist/chunks/error-message.64e1964b.js +0 -49
  230. package/dist/chunks/error-message.64e1964b.js.map +0 -1
  231. package/dist/chunks/grid-layout.7c919507.js.map +0 -1
  232. package/dist/chunks/index.369b0e66.js +0 -734
  233. package/dist/chunks/index.369b0e66.js.map +0 -1
  234. package/dist/chunks/index.77f35162.js +0 -134
  235. package/dist/chunks/index.77f35162.js.map +0 -1
  236. package/dist/chunks/index.c207e9ab.js.map +0 -1
  237. package/dist/chunks/loading-button.746b7fa1.js +0 -109
  238. package/dist/chunks/loading-button.746b7fa1.js.map +0 -1
@@ -1,58 +1,58 @@
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";
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.726e2f3c.js";
3
+ import { B as oe } from "./chunks/index.75f3672e.js";
4
+ import { d as le } from "./chunks/debounce.b5ef6acf.js";
5
+ import { D as A, v as ie, f as se } from "./chunks/date-input.9186a0bf.js";
5
6
  import { g as I } from "./chunks/unique-id.a2a2b458.js";
6
- import { B as ie } from "./chunks/index.2bd3812b.js";
7
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
- import { _ as De } from "./chunks/_plugin-vue_export-helper.dad06003.js";
17
- import "./assets/index21.css";
18
- var c = /* @__PURE__ */ ((e) => (e.INPUT = "input", e))(c || {});
8
+ import { f as F } from "./chunks/index.0ee895e0.js";
9
+ import { e as O, d as de, f as ue } from "./chunks/index.f55fdc32.js";
10
+ import { u as pe } from "./chunks/use-form-layout-loading.d03e5d48.js";
11
+ import { B as ce } from "./chunks/directive.0408e565.js";
12
+ import { C as g } from "./chunks/calendar.d4ab387d.js";
13
+ import { b as qe } from "./chunks/calendar.d4ab387d.js";
14
+ import { c as fe } from "./chunks/dropdown-default-textbox.74c4584a.js";
15
+ import { E as me, F as De } from "./chunks/field-label.61679178.js";
16
+ import { _ as ve } from "./chunks/_plugin-vue_export-helper.dad06003.js";
17
+ import "./assets/index40.css";
19
18
  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());
19
+ var i;
20
+ const { locale: o, t: f } = L(), m = { de, enUS: O, fr: ue }, l = C((i = e.value) == null ? void 0 : i.toDateString());
22
21
  return {
23
22
  // Values
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")),
27
- textInputValue: s,
23
+ dateDisplayValue: P(() => t.value ? l.value : e.value ? F(e.value, A.FULL_DATE, {
24
+ locale: m[o.value.substring(0, 2)] || O
25
+ }) : f("selectDate")),
26
+ textInputValue: l,
28
27
  // Methods
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
28
+ formatTextInputDisplayValue: (s = e.value) => {
29
+ t.value || (l.value = s ? F(s, A.NUMERIC_DATE_YEAR_FIRST, {
30
+ locale: m[o.value.substring(0, 2)] || O
32
31
  }) : null);
33
32
  }
34
33
  };
35
- }, K = {
34
+ };
35
+ var d = /* @__PURE__ */ ((e) => (e.INPUT = "input", e))(d || {});
36
+ const $ = {
36
37
  "en-US": {
37
- optional: "optional",
38
- required: "required",
39
38
  provideDateInAFormat: "Provide date in a YYYY-MM-DD format",
40
39
  selectDate: "Select a date",
41
40
  selectDateRange: "Select a date range",
42
41
  selectedDateIsNotAvailable: "Selected date is not available",
43
42
  datePicker: "Date picker"
44
43
  }
45
- }, ve = 1e3, ye = Z({
46
- i18n: { messages: K },
44
+ }, ye = 1e3, ke = J({
45
+ i18n: { messages: $ },
47
46
  name: "bento-date-picker",
48
47
  components: {
49
- BentoTypography: ie,
50
- BentoPopover: le,
48
+ BentoTypography: oe,
49
+ BentoPopover: ne,
51
50
  Calendar: g,
52
51
  ErrorMessage: me,
53
- DropdownInputDefault: oe
52
+ DropdownInputDefault: fe,
53
+ FieldLabel: De
54
54
  },
55
- directives: { BentoClickOutsideDirective: ne },
55
+ directives: { BentoClickOutsideDirective: ce },
56
56
  props: {
57
57
  /**
58
58
  * Descriptive supporting text visbile underneath the dropdown.
@@ -98,125 +98,101 @@ const be = ({ datePickerValue: e, isDateIncorrect: t }) => {
98
98
  * Highlights the dropdown is required.
99
99
  */
100
100
  required: { type: Boolean, default: !1 },
101
+ /**
102
+ * Adds a info icon next to the label to display the passed tooltip message.
103
+ */
104
+ tooltipText: { type: String, default: null },
101
105
  /**
102
106
  * Selected date
103
107
  */
104
108
  value: { type: [Date, Object], default: null }
105
109
  },
106
- emits: [c.INPUT],
110
+ emits: [d.INPUT],
107
111
  setup(e, { emit: t }) {
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(
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"), v = 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: b } = pe(N(e, "readonly"));
113
+ Q(
110
114
  () => e.disabled,
111
115
  (a) => {
112
- a && r.value && (r.value = !1);
116
+ a && n.value && (n.value = !1);
113
117
  }
114
118
  );
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;
124
- }, N = () => {
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) => {
119
+ const { dateDisplayValue: K, textInputValue: u, formatTextInputDisplayValue: w } = be({
120
+ datePickerValue: N(e, "value"),
121
+ isDateIncorrect: r
122
+ }), B = P(() => e.isDateDisabled && e.isDateDisabled(new Date(u.value)) && !n.value ? o("selectedDateIsNotAvailable") : r.value ? o("provideDateInAFormat") : null), Y = P(() => ({
123
+ "b-date-picker__description--error": e.errorMessage || B.value
124
+ })), q = P(
125
+ () => `${e.description ? l : ""} ${e.errorMessage ? D : ""} ${B.value ? v : ""}`.trim() || null
126
+ ), W = (a) => e.min && a <= e.min || e.max && a >= e.max ? !1 : e.isDateDisabled ? !e.isDateDisabled(a) : !0, S = () => {
127
+ n.value = !1;
128
+ }, V = () => {
129
+ n.value = !0, w();
130
+ }, j = (a) => {
131
+ r.value = !1, S(), t(d.INPUT, a);
132
+ }, z = async () => {
133
+ r.value && (r.value = !1, u.value = null), t(d.INPUT, null);
134
+ }, G = (a) => {
135
+ ie(a);
136
+ }, R = (a) => {
133
137
  if (a.length < 10)
134
138
  return;
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);
139
+ /^\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 = le(R, ye);
137
141
  return {
138
142
  // Refs
139
- inputContainerRef: O,
140
- calendarContainerRef: u,
143
+ inputContainerRef: E,
144
+ calendarContainerRef: s,
141
145
  // Values,
142
- dateDisplayValue: W,
143
- datePickerContainerId: D,
144
- descriptionConditionalClasses: j,
145
- isDateIncorrect: n,
146
- isDatePickerOpen: r,
147
- isReadOnly: Y,
148
- dateErrorText: w,
149
- labelId: b,
150
- descriptionId: s,
151
- errorId: o,
146
+ dateDisplayValue: K,
147
+ datePickerContainerId: f,
148
+ descriptionConditionalClasses: Y,
149
+ isDateIncorrect: r,
150
+ isDatePickerOpen: n,
151
+ isReadOnly: b,
152
+ dateErrorText: B,
153
+ labelId: m,
154
+ descriptionId: l,
155
+ errorId: D,
152
156
  dateErrorId: v,
153
- popoverAriaLabel: d,
154
- ariaDescribedBy: z,
155
- textInputValue: f,
157
+ popoverAriaLabel: i,
158
+ ariaDescribedBy: q,
159
+ textInputValue: u,
156
160
  // Events
157
- closeDatePicker: R,
158
- clearDatePickerValue: J,
159
- onDateSelected: H,
160
- openDatePicker: N,
161
- onDateKeyDown: Q,
161
+ closeDatePicker: S,
162
+ clearDatePickerValue: z,
163
+ onDateSelected: j,
164
+ openDatePicker: V,
165
+ onDateKeyDown: G,
162
166
  onDateInputChange: (a) => {
163
- f.value = de(a), r.value ? X(f.value) : U(f.value);
167
+ u.value = se(a), n.value ? H(u.value) : R(u.value);
164
168
  },
165
169
  // Keyboard navigation
166
170
  onSpaceBarOrEnter: async (a) => {
167
171
  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));
172
+ n.value || (a.preventDefault(), V(), await U(), e.value || (w(/* @__PURE__ */ new Date()), t(d.INPUT, /* @__PURE__ */ new Date()), await U()), (T = s.value) == null || T.$refs.calendarRef[0].focusOnDate(e.value));
169
173
  }
170
174
  };
171
175
  }
172
176
  });
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", {
177
+ function Ie(e, t, o, f, m, l) {
178
+ const D = p("field-label"), v = p("dropdown-input-default"), i = p("error-message"), s = p("bento-typography"), E = p("calendar"), r = p("bento-popover"), n = X("bento-click-outside-directive");
179
+ return Z((c(), x("div", {
177
180
  class: "b-date-picker",
178
181
  onKeydownCapture: [
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"]))
182
+ t[0] || (t[0] = M((...b) => e.onSpaceBarOrEnter && e.onSpaceBarOrEnter(...b), ["space"])),
183
+ t[1] || (t[1] = M((...b) => e.onSpaceBarOrEnter && e.onSpaceBarOrEnter(...b), ["enter"]))
181
184
  ]
182
185
  }, [
183
- e.label ? (l(), h("div", {
186
+ e.label ? (c(), y(D, {
184
187
  key: 0,
185
188
  id: e.labelId,
186
- class: "b-date-picker__label"
187
- }, [
188
- S(o, {
189
- el: "span",
190
- stronger: ""
191
- }, {
192
- default: k(() => [
193
- E(B(e.label), 1)
194
- ]),
195
- _: 1
196
- }),
197
- e.optional ? (l(), m(o, {
198
- key: 0,
199
- class: "b-date-picker__label-requirement",
200
- el: "span"
201
- }, {
202
- default: k(() => [
203
- E(" (" + B(e.$t("optional")) + ") ", 1)
204
- ]),
205
- _: 1
206
- })) : p("", !0),
207
- e.required ? (l(), m(o, {
208
- key: 1,
209
- class: "b-date-picker__label-requirement",
210
- el: "span"
211
- }, {
212
- default: k(() => [
213
- E(" (" + B(e.$t("required")) + ") ", 1)
214
- ]),
215
- _: 1
216
- })) : p("", !0)
217
- ], 8, ke)) : p("", !0),
218
- te("div", null, [
219
- S(v, {
189
+ label: e.label,
190
+ "tooltip-text": e.tooltipText,
191
+ optional: e.optional,
192
+ required: e.required
193
+ }, null, 8, ["id", "label", "tooltip-text", "optional", "required"])) : k("", !0),
194
+ ee("div", null, [
195
+ _(v, {
220
196
  ref: "inputContainerRef",
221
197
  ariaControls: e.datePickerContainerId,
222
198
  ariaExpanded: e.isDatePickerOpen,
@@ -237,29 +213,29 @@ function Ie(e, t, i, D, b, s) {
237
213
  onClose: e.closeDatePicker
238
214
  }, null, 8, ["ariaControls", "ariaExpanded", "aria-labelledby", "aria-describedby", "disabled", "is-invalid", "open", "value", "display-value", "readonly", "onInput", "onOpen", "onKeydown", "onClear", "onClose"])
239
215
  ]),
240
- e.dateErrorText ? (l(), m(d, {
216
+ e.dateErrorText ? (c(), y(i, {
241
217
  key: 1,
242
218
  id: e.dateErrorId,
243
219
  "error-message": e.dateErrorText,
244
220
  class: "b-date-picker__error-message"
245
- }, null, 8, ["id", "error-message"])) : p("", !0),
246
- e.errorMessage ? (l(), m(d, {
221
+ }, null, 8, ["id", "error-message"])) : k("", !0),
222
+ e.errorMessage ? (c(), y(i, {
247
223
  key: 2,
248
224
  id: e.errorId,
249
225
  "error-message": e.errorMessage,
250
226
  class: "b-date-picker__error-message"
251
- }, null, 8, ["id", "error-message"])) : p("", !0),
252
- e.description ? (l(), m(o, {
227
+ }, null, 8, ["id", "error-message"])) : k("", !0),
228
+ e.description ? (c(), y(s, {
253
229
  key: 3,
254
- class: re(["b-date-picker__description", e.descriptionConditionalClasses]),
230
+ class: ae(["b-date-picker__description", e.descriptionConditionalClasses]),
255
231
  el: "span"
256
232
  }, {
257
- default: k(() => [
258
- E(B(e.description), 1)
233
+ default: h(() => [
234
+ te(re(e.description), 1)
259
235
  ]),
260
236
  _: 1
261
- }, 8, ["class"])) : p("", !0),
262
- e.inputContainerRef ? (l(), m(O, {
237
+ }, 8, ["class"])) : k("", !0),
238
+ e.inputContainerRef ? (c(), y(r, {
263
239
  key: 4,
264
240
  id: e.datePickerContainerId,
265
241
  class: "b-date-picker__container",
@@ -272,8 +248,8 @@ function Ie(e, t, i, D, b, s) {
272
248
  position: "bottom-start",
273
249
  "fit-content": ""
274
250
  }, {
275
- default: k(() => [
276
- S(u, {
251
+ default: h(() => [
252
+ _(E, {
277
253
  ref: "calendarContainerRef",
278
254
  "first-day-of-week": e.firstDayOfWeek,
279
255
  "is-date-disabled": e.isDateDisabled,
@@ -285,15 +261,15 @@ function Ie(e, t, i, D, b, s) {
285
261
  }, null, 8, ["first-day-of-week", "is-date-disabled", "value", "min", "max", "onInput"])
286
262
  ]),
287
263
  _: 1
288
- }, 8, ["id", "open", "target-element", "aria-label"])) : p("", !0)
264
+ }, 8, ["id", "open", "target-element", "aria-label"])) : k("", !0)
289
265
  ], 32)), [
290
266
  [n, e.closeDatePicker]
291
267
  ]);
292
268
  }
293
- const qe = /* @__PURE__ */ De(ye, [["render", Ie], ["__scopeId", "data-v-b56eb260"]]);
269
+ const $e = /* @__PURE__ */ ve(ke, [["render", Ie], ["__scopeId", "data-v-8908d3a8"]]);
294
270
  export {
295
- qe as BentoDatePicker,
296
- c as BentoDatePickerEvent,
297
- Ye as BentoDatePickerFirstDayOfWeek
271
+ $e as BentoDatePicker,
272
+ d as BentoDatePickerEvent,
273
+ qe as BentoDatePickerFirstDayOfWeek
298
274
  };
299
275
  //# 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(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,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,GAAA,CAAA,CAAA,KAAAK;AAAA,MACJ,CAAA,IAAA;AAAA,IAErD;AAAA,EASN;AAER;;;;;;;;;;GCsDIS,KAAA,KA6BAC,KAAAC,EAAA;AAAA,EAA+B,MAAA,EAAA,UAAAC,EAAA;AAAA,EACV,MAAA;AAA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AAA,QACF,WAAAA,EAAA;AAAA,QACA,SAAAA,EAAA;AAAA;;IAMO,CAAA;AAAA;MACH,KAAA;AAAA,MACf,IAAAA,EAAA;AAAA,MACK,iBAAAA,EAAA;AAAA;IAGA,GAAA,MAAA,GAAA,CAAA,MAAA,eAAA,CAAA,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,IAsBMD,EAAA,qBAAAE,EAAA,GAAAC,EAAAQ,GAAA;AAAA,MArBc,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,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 :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","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,IAAA,MAAAC,GAAA,IAAAC,GAAA,GAEAC,IAAAC,GAAAC,IAAAV,EAAA,UAAA,gBAAAU,EAAA,cAAA;AAoCA,SAAA;AAAA;AAAA,IAAO,kBAlCPC,EAAA,MAEIV,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c,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,5 +1,5 @@
1
- import { B as t, a as r } from "./chunks/index.369b0e66.js";
2
- import { b as o } from "./chunks/calendar.c83d4e99.js";
1
+ import { B as t, a as r } from "./chunks/index.e9156fe3.js";
2
+ import { b as o } from "./chunks/calendar.d4ab387d.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.fa7b44f1.js";
1
+ import { B as e, a as o } from "./chunks/index.0ee895e0.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/index24.css";
3
+ import "./assets/index26.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.afff433b.js";
1
+ import { B as d } from "./chunks/dropdown.502e1f5c.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.809ec40e.js";
3
+ import { B as C, L as B } from "./chunks/listbox-option-tag.5b00c85f.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.2bd3812b.js";
7
+ import { d as k } from "./chunks/index.75f3672e.js";
8
8
  import { BentoPaymentMethod as M } from "./payment-method.js";
9
- import "./assets/index23.css";
9
+ import "./assets/index16.css";
10
10
  const T = _({
11
11
  name: "bento-dropdown-avatar",
12
12
  components: {