@adyen/bento-vue2 1.18.0 → 1.19.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 (239) hide show
  1. package/dist/@types/components.d.ts +4 -0
  2. package/dist/@types/packages/vue2/src/components/button/components/toggle-button/index.d.ts +1 -0
  3. package/dist/@types/packages/vue2/src/components/button/components/toggle-button/toggle-button.vue.d.ts +65 -0
  4. package/dist/@types/packages/vue2/src/components/button/components/toggle-button/toggle.types.d.ts +1 -0
  5. package/dist/@types/packages/vue2/src/components/button/index.d.ts +1 -0
  6. package/dist/@types/packages/vue2/src/components/checkbox/checkbox.types.d.ts +3 -8
  7. package/dist/@types/packages/vue2/src/components/checkbox/checkbox.vue.d.ts +3 -6
  8. package/dist/@types/packages/vue2/src/components/checkbox/components/checkbox-group/checkbox-group.vue.d.ts +1 -1
  9. package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-cell/data-grid-cell.types.d.ts +1 -1
  10. package/dist/@types/packages/vue2/src/components/date-range-picker/components/date-range-picker-calendar/date-range-picker-calendar.vue.d.ts +7 -5
  11. package/dist/@types/packages/vue2/src/components/{internal/calendar → date-range-picker}/composables/use-granularity-memory.types.d.ts +2 -2
  12. package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.types.d.ts +5 -5
  13. package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue.d.ts +5 -5
  14. package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-default-textbox/dropdown-default-textbox.vue.d.ts +18 -19
  15. package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-small-textbox/dropdown-small-textbox.vue.d.ts +2 -2
  16. package/dist/@types/packages/vue2/src/components/filter-bar/components/all-filters-modal/all-filters-modal.vue.d.ts +1 -1
  17. package/dist/@types/packages/vue2/src/components/internal/calendar/calendar.types.d.ts +2 -2
  18. package/dist/@types/packages/vue2/src/components/internal/calendar/composables/use-granularity-adjustments.types.d.ts +7 -7
  19. package/dist/@types/packages/vue2/src/components/internal/checkbox-input/checkbox-input.types.d.ts +20 -0
  20. package/dist/@types/packages/vue2/src/components/internal/checkbox-input/checkbox-input.vue.d.ts +90 -0
  21. package/dist/@types/packages/vue2/src/components/internal/checkbox-input/index.d.ts +3 -0
  22. package/dist/@types/packages/vue2/src/components/internal/dialog-page/dialog-page.keys.d.ts +2 -0
  23. package/dist/@types/packages/vue2/src/components/internal/dialog-page/dialog-page.types.d.ts +16 -0
  24. package/dist/@types/packages/vue2/src/components/internal/dialog-page/dialog-page.vue.d.ts +54 -0
  25. package/dist/@types/packages/vue2/src/components/internal/dialog-page/index.d.ts +3 -0
  26. package/dist/@types/packages/vue2/src/components/internal/index.d.ts +1 -0
  27. package/dist/@types/packages/vue2/src/components/internal/listbox/composables/use-cached-selected-values/use-cached-selected-values.d.ts +14 -0
  28. package/dist/@types/packages/vue2/src/components/internal/listbox/index.d.ts +1 -0
  29. package/dist/@types/packages/vue2/src/components/internal/radio-input/index.d.ts +3 -0
  30. package/dist/@types/packages/vue2/src/components/internal/radio-input/radio-input.types.d.ts +6 -0
  31. package/dist/@types/packages/vue2/src/components/internal/radio-input/radio-input.vue.d.ts +80 -0
  32. package/dist/@types/packages/vue2/src/components/modal-fullscreen/components/modal-fullscreen-page.vue.d.ts +60 -0
  33. package/dist/@types/packages/vue2/src/components/modal-fullscreen/index.d.ts +1 -0
  34. package/dist/@types/packages/vue2/src/components/modal-fullscreen/modal-fullscreen.vue.d.ts +12 -1
  35. package/dist/@types/packages/vue2/src/components/radio-group/components/radio-button/radio-button.types.d.ts +3 -6
  36. package/dist/@types/packages/vue2/src/components/radio-group/components/radio-button/radio-button.vue.d.ts +1 -1
  37. package/dist/@types/packages/vue2/src/components/radio-group/radio-group.vue.d.ts +1 -1
  38. package/dist/@types/packages/vue2/src/components/sidepanel/components/sidepanel-page.vue.d.ts +3 -3
  39. package/dist/@types/packages/vue2/src/components/sidepanel/sidepanel.keys.d.ts +0 -2
  40. package/dist/@types/packages/vue2/src/components/sidepanel/sidepanel.types.d.ts +0 -19
  41. package/dist/@types/packages/vue2/src/components/sidepanel/sidepanel.vue.d.ts +1 -1
  42. package/dist/@types/packages/vue2/src/composables/use-form-validate/use-form.d.ts +1 -1
  43. package/dist/accordion.js +2 -2
  44. package/dist/action-bar.js +6 -6
  45. package/dist/alert.js +3 -3
  46. package/dist/assets/base-modal.css +1 -1
  47. package/dist/assets/button-actions.css +1 -0
  48. package/dist/assets/button.css +1 -1
  49. package/dist/assets/calendar.css +1 -1
  50. package/dist/assets/checkbox.css +1 -1
  51. package/dist/assets/dialog-page.css +1 -0
  52. package/dist/assets/dropdown-default-textbox.css +1 -1
  53. package/dist/assets/dropdown.css +1 -1
  54. package/dist/assets/index10.css +1 -1
  55. package/dist/assets/index11.css +1 -1
  56. package/dist/assets/index12.css +1 -1
  57. package/dist/assets/index13.css +1 -1
  58. package/dist/assets/index14.css +1 -1
  59. package/dist/assets/index15.css +1 -1
  60. package/dist/assets/index16.css +1 -1
  61. package/dist/assets/index17.css +1 -1
  62. package/dist/assets/index18.css +1 -1
  63. package/dist/assets/index19.css +1 -1
  64. package/dist/assets/index20.css +1 -1
  65. package/dist/assets/index21.css +1 -1
  66. package/dist/assets/index22.css +1 -1
  67. package/dist/assets/index23.css +1 -1
  68. package/dist/assets/index24.css +1 -1
  69. package/dist/assets/index25.css +1 -1
  70. package/dist/assets/index26.css +1 -1
  71. package/dist/assets/index27.css +1 -1
  72. package/dist/assets/index28.css +1 -1
  73. package/dist/assets/index29.css +1 -1
  74. package/dist/assets/index3.css +1 -1
  75. package/dist/assets/index30.css +1 -1
  76. package/dist/assets/index31.css +1 -1
  77. package/dist/assets/index32.css +1 -1
  78. package/dist/assets/index33.css +1 -1
  79. package/dist/assets/index34.css +1 -1
  80. package/dist/assets/index35.css +1 -1
  81. package/dist/assets/index36.css +1 -1
  82. package/dist/assets/index37.css +1 -1
  83. package/dist/assets/index38.css +1 -1
  84. package/dist/assets/index39.css +1 -1
  85. package/dist/assets/index4.css +1 -1
  86. package/dist/assets/index40.css +1 -1
  87. package/dist/assets/index41.css +1 -1
  88. package/dist/assets/index42.css +1 -1
  89. package/dist/assets/index43.css +1 -1
  90. package/dist/assets/index44.css +1 -1
  91. package/dist/assets/index45.css +1 -1
  92. package/dist/assets/index46.css +1 -1
  93. package/dist/assets/index47.css +1 -1
  94. package/dist/assets/index48.css +1 -1
  95. package/dist/assets/index5.css +1 -1
  96. package/dist/assets/index6.css +1 -1
  97. package/dist/assets/index7.css +1 -1
  98. package/dist/assets/index8.css +1 -1
  99. package/dist/assets/index9.css +1 -1
  100. package/dist/assets/teleport.css +1 -1
  101. package/dist/avatar-image.js +1 -1
  102. package/dist/button.js +71 -93
  103. package/dist/button.js.map +1 -1
  104. package/dist/card.js +3 -3
  105. package/dist/checkbox.js +6 -6
  106. package/dist/chunks/{base-button.bf0c938c.js → base-button.3c3d473d.js} +2 -2
  107. package/dist/chunks/{base-button.bf0c938c.js.map → base-button.3c3d473d.js.map} +1 -1
  108. package/dist/chunks/{base-modal.1dc6cf96.js → base-modal.27c6f2db.js} +5 -5
  109. package/dist/chunks/{base-modal.1dc6cf96.js.map → base-modal.27c6f2db.js.map} +1 -1
  110. package/dist/chunks/{button-actions-with-menu.4ecf3d93.js → button-actions-with-menu.a38327c2.js} +4 -4
  111. package/dist/chunks/{button-actions-with-menu.4ecf3d93.js.map → button-actions-with-menu.a38327c2.js.map} +1 -1
  112. package/dist/chunks/button-actions.1dc90a19.js +111 -0
  113. package/dist/chunks/button-actions.1dc90a19.js.map +1 -0
  114. package/dist/chunks/{button.f5739261.js → button.0b6cda85.js} +3 -3
  115. package/dist/chunks/{button.f5739261.js.map → button.0b6cda85.js.map} +1 -1
  116. package/dist/chunks/calendar.263cfc88.js +913 -0
  117. package/dist/chunks/calendar.263cfc88.js.map +1 -0
  118. package/dist/chunks/checkbox.c7a74005.js +275 -0
  119. package/dist/chunks/checkbox.c7a74005.js.map +1 -0
  120. package/dist/chunks/{controls-group.2b645d54.js → controls-group.8abe0bd1.js} +3 -3
  121. package/dist/chunks/{controls-group.2b645d54.js.map → controls-group.8abe0bd1.js.map} +1 -1
  122. package/dist/chunks/{copy.e01532cf.js → copy.647aae54.js} +4 -4
  123. package/dist/chunks/{copy.e01532cf.js.map → copy.647aae54.js.map} +1 -1
  124. package/dist/chunks/dialog-page.f787969c.js +113 -0
  125. package/dist/chunks/dialog-page.f787969c.js.map +1 -0
  126. package/dist/chunks/{dropdown-default-textbox.d45138fa.js → dropdown-default-textbox.59803edd.js} +97 -111
  127. package/dist/chunks/dropdown-default-textbox.59803edd.js.map +1 -0
  128. package/dist/chunks/{dropdown.0a9acf8b.js → dropdown.0574f613.js} +62 -61
  129. package/dist/chunks/dropdown.0574f613.js.map +1 -0
  130. package/dist/chunks/{error-message.317dd85f.js → error-message.75666843.js} +2 -2
  131. package/dist/chunks/{error-message.317dd85f.js.map → error-message.75666843.js.map} +1 -1
  132. package/dist/chunks/{fixed-scroller.afe02620.js → fixed-scroller.06574a66.js} +2 -2
  133. package/dist/chunks/{fixed-scroller.afe02620.js.map → fixed-scroller.06574a66.js.map} +1 -1
  134. package/dist/chunks/{footer-actions.e0b866b1.js → footer-actions.0268a57b.js} +4 -4
  135. package/dist/chunks/{footer-actions.e0b866b1.js.map → footer-actions.0268a57b.js.map} +1 -1
  136. package/dist/chunks/{index.7aa428c2.js → index.026ae47b.js} +2 -2
  137. package/dist/chunks/{index.7aa428c2.js.map → index.026ae47b.js.map} +1 -1
  138. package/dist/chunks/{index.898a95bc.js → index.0bb773a7.js} +6 -6
  139. package/dist/chunks/{index.898a95bc.js.map → index.0bb773a7.js.map} +1 -1
  140. package/dist/chunks/{index.651dac2d.js → index.10b9618d.js} +3 -3
  141. package/dist/chunks/{index.651dac2d.js.map → index.10b9618d.js.map} +1 -1
  142. package/dist/chunks/{index.6c299479.js → index.302e9cf2.js} +2 -2
  143. package/dist/chunks/{index.6c299479.js.map → index.302e9cf2.js.map} +1 -1
  144. package/dist/chunks/index.408e1419.js +712 -0
  145. package/dist/chunks/index.408e1419.js.map +1 -0
  146. package/dist/chunks/{index.88ac1dab.js → index.45cd2344.js} +31 -31
  147. package/dist/chunks/index.45cd2344.js.map +1 -0
  148. package/dist/chunks/{index.6c017121.js → index.5b47c56b.js} +7 -7
  149. package/dist/chunks/{index.6c017121.js.map → index.5b47c56b.js.map} +1 -1
  150. package/dist/chunks/{index.2e70720a.js → index.5bfc67d1.js} +2 -2
  151. package/dist/chunks/{index.2e70720a.js.map → index.5bfc67d1.js.map} +1 -1
  152. package/dist/chunks/{index.e6aa2c36.js → index.932c230b.js} +6 -6
  153. package/dist/chunks/{index.e6aa2c36.js.map → index.932c230b.js.map} +1 -1
  154. package/dist/chunks/{index.81443e01.js → index.a52b98d1.js} +8 -8
  155. package/dist/chunks/{index.81443e01.js.map → index.a52b98d1.js.map} +1 -1
  156. package/dist/chunks/{index.290bbc9e.js → index.dc985e76.js} +3 -3
  157. package/dist/chunks/{index.290bbc9e.js.map → index.dc985e76.js.map} +1 -1
  158. package/dist/chunks/{index.546b27ae.js → index.de687404.js} +3 -2
  159. package/dist/chunks/{index.546b27ae.js.map → index.de687404.js.map} +1 -1
  160. package/dist/chunks/{listbox-option-tag.720eabb5.js → listbox-option-tag.89846151.js} +3 -3
  161. package/dist/chunks/{listbox-option-tag.720eabb5.js.map → listbox-option-tag.89846151.js.map} +1 -1
  162. package/dist/chunks/{listbox.dc3d986e.js → listbox.a8180c4a.js} +5 -5
  163. package/dist/chunks/{listbox.dc3d986e.js.map → listbox.a8180c4a.js.map} +1 -1
  164. package/dist/chunks/{loading-button.390228ff.js → loading-button.50dddf2f.js} +2 -2
  165. package/dist/chunks/{loading-button.390228ff.js.map → loading-button.50dddf2f.js.map} +1 -1
  166. package/dist/chunks/modal-fullscreen.keys.b9f31632.js +5 -0
  167. package/dist/chunks/modal-fullscreen.keys.b9f31632.js.map +1 -0
  168. package/dist/chunks/sidepanel.keys.1ed8a57c.js +5 -0
  169. package/dist/chunks/sidepanel.keys.1ed8a57c.js.map +1 -0
  170. package/dist/chunks/{teleport.d52e5254.js → teleport.84b0f20b.js} +14 -13
  171. package/dist/chunks/teleport.84b0f20b.js.map +1 -0
  172. package/dist/chunks/{tooltip.d452f6c4.js → tooltip.6748027a.js} +3 -3
  173. package/dist/chunks/{tooltip.d452f6c4.js.map → tooltip.6748027a.js.map} +1 -1
  174. package/dist/code-snippet.js +7 -7
  175. package/dist/code-snippet.js.map +1 -1
  176. package/dist/country.js +2 -2
  177. package/dist/currency.js +1 -1
  178. package/dist/data-grid.js +1 -1
  179. package/dist/date-picker.js +18 -18
  180. package/dist/date-range-picker.js +2 -2
  181. package/dist/date.js +1 -1
  182. package/dist/divider.js +1 -1
  183. package/dist/dropdown.js +6 -6
  184. package/dist/empty-state.js +3 -3
  185. package/dist/filter-bar.js +19 -19
  186. package/dist/filter-bar.js.map +1 -1
  187. package/dist/focus-trap.js +1 -1
  188. package/dist/form-layout.js +2 -2
  189. package/dist/header.js +4 -4
  190. package/dist/index.js +299 -2935
  191. package/dist/index.js.map +1 -1
  192. package/dist/info-icon.js +3 -3
  193. package/dist/input-field.js +4 -4
  194. package/dist/internal.js +78 -25
  195. package/dist/internal.js.map +1 -1
  196. package/dist/link.js +1 -1
  197. package/dist/loading-indicator.js +1 -1
  198. package/dist/menu.js +1 -1
  199. package/dist/modal-fullscreen.js +144 -44
  200. package/dist/modal-fullscreen.js.map +1 -1
  201. package/dist/modal.js +6 -6
  202. package/dist/pagination.js +4 -4
  203. package/dist/payment-method.js +2 -2
  204. package/dist/popover.js +1 -1
  205. package/dist/popper-container.js +1 -1
  206. package/dist/radio-group.js +147 -78
  207. package/dist/radio-group.js.map +1 -1
  208. package/dist/search-bar.js +2 -2
  209. package/dist/secondary-nav.js +2 -2
  210. package/dist/segmented-control.js +3 -3
  211. package/dist/sidepanel.js +78 -111
  212. package/dist/sidepanel.js.map +1 -1
  213. package/dist/status.js +2 -2
  214. package/dist/stepper.js +3 -3
  215. package/dist/structured-list.js +1 -1
  216. package/dist/summary-grid.js +3 -3
  217. package/dist/tabs.js +3 -3
  218. package/dist/tag.js +3 -3
  219. package/dist/textarea.js +4 -4
  220. package/dist/timeline.js +12 -12
  221. package/dist/toast.js +3 -3
  222. package/dist/toggle.js +2 -2
  223. package/dist/tutorial.js +6 -6
  224. package/dist/typography.js +1 -1
  225. package/dist/web-types.json +431 -5
  226. package/package.json +3 -3
  227. package/dist/chunks/calendar.7a2d1894.js +0 -960
  228. package/dist/chunks/calendar.7a2d1894.js.map +0 -1
  229. package/dist/chunks/checkbox.1345941b.js +0 -195
  230. package/dist/chunks/checkbox.1345941b.js.map +0 -1
  231. package/dist/chunks/dropdown-default-textbox.d45138fa.js.map +0 -1
  232. package/dist/chunks/dropdown.0a9acf8b.js.map +0 -1
  233. package/dist/chunks/index.84c2cef6.js +0 -637
  234. package/dist/chunks/index.84c2cef6.js.map +0 -1
  235. package/dist/chunks/index.88ac1dab.js.map +0 -1
  236. package/dist/chunks/sidepanel.keys.3f8d69c1.js +0 -7
  237. package/dist/chunks/sidepanel.keys.3f8d69c1.js.map +0 -1
  238. package/dist/chunks/teleport.d52e5254.js.map +0 -1
  239. /package/dist/@types/packages/vue2/src/components/{internal/calendar → date-range-picker}/composables/use-granularity-memory.d.ts +0 -0
@@ -0,0 +1,712 @@
1
+ import { reactive as J, defineComponent as ke, ref as M, computed as k, onMounted as We, toRaw as qe, toRef as fe, watch as Ve } from "vue";
2
+ import { a as He } from "./index.932c230b.js";
3
+ import { B as Se } from "./index.de687404.js";
4
+ import { c as je } from "./dropdown-default-textbox.59803edd.js";
5
+ import { g as V } from "./unique-id.a2a2b458.js";
6
+ import { u as re } from "./i18n.eb5b985b.js";
7
+ import { t as se, f as $ } from "./index.5bfc67d1.js";
8
+ import { r as Q, t as j, e as E, d as ie, f as oe } from "./index.f55fdc32.js";
9
+ import { f as pe, v as Ke, D as S } from "./date-input.9186a0bf.js";
10
+ import { u as ze } from "./use-form-layout-loading.d03e5d48.js";
11
+ import "./index.4c062058.js";
12
+ import { BentoInputField as Je } from "../input-field.js";
13
+ import { B as Qe } from "./dropdown.0574f613.js";
14
+ import { BentoSegmentedControl as Xe } from "../segmented-control.js";
15
+ import { d as z } from "./debounce.b5ef6acf.js";
16
+ import { u as Ze } from "./use-has-slot.fbeb19ec.js";
17
+ import { s as H, c as ge, i as L, d as et, e as ve, f as tt, g as _e, h as at, j as nt, C as F, u as rt } from "./calendar.263cfc88.js";
18
+ import { e as O } from "./index.fdf12170.js";
19
+ import { e as ye } from "./index.d80206ed.js";
20
+ import { n as Ee } from "./_plugin-vue2_normalizer.71e2aa87.js";
21
+ import { E as st, F as it } from "./error-message.75666843.js";
22
+ import { B as ot } from "./directive.0408e565.js";
23
+ import "../assets/index13.css";
24
+ function Re(t, e) {
25
+ Q(2, arguments);
26
+ var n = j(t), d = j(e);
27
+ return n.getTime() === d.getTime();
28
+ }
29
+ function lt(t, e) {
30
+ Q(2, arguments);
31
+ var n = j(t), d = se(e);
32
+ return n.setHours(d), n;
33
+ }
34
+ function dt(t, e) {
35
+ Q(2, arguments);
36
+ var n = j(t), d = se(e);
37
+ return n.setMinutes(d), n;
38
+ }
39
+ function ut(t, e) {
40
+ Q(2, arguments);
41
+ var n = j(t), d = se(e);
42
+ return n.setSeconds(d), n;
43
+ }
44
+ const ct = ({
45
+ firstDayOfWeek: t,
46
+ min: e,
47
+ max: n
48
+ }) => ({ getGranularCalendarLimits: (l) => {
49
+ let D = H(e), r = O(n);
50
+ if ((l == null ? void 0 : l.type) === "weekly") {
51
+ if (l.earliest)
52
+ D = H(l.earliest);
53
+ else {
54
+ const f = ge(D, { weekStartsOn: t });
55
+ L(D, f) || (D = H(et(ve(D, { weekStartsOn: t }), 1)));
56
+ }
57
+ if (l.latest)
58
+ r = O(l.latest);
59
+ else {
60
+ const f = ve(r, { weekStartsOn: t });
61
+ L(r, f) || (r = O(tt(ge(r, { weekStartsOn: t }), 1)));
62
+ }
63
+ }
64
+ if ((l == null ? void 0 : l.type) === "monthly") {
65
+ if (l.earliest)
66
+ D = H(l.earliest);
67
+ else {
68
+ const f = _e(D);
69
+ L(D, f) || (D = _e(at(D, 1)));
70
+ }
71
+ if (l.latest)
72
+ r = O(l.latest);
73
+ else {
74
+ const f = ye(r);
75
+ L(r, f) || (r = ye(nt(r, 1)));
76
+ }
77
+ }
78
+ return { min: D, max: r };
79
+ } }), Dt = () => {
80
+ const t = J({
81
+ daily: null,
82
+ weekly: null,
83
+ monthly: null
84
+ });
85
+ return {
86
+ savedRanges: t,
87
+ saveRange: (d, l) => {
88
+ t[d] = l;
89
+ },
90
+ resetSavedRanges: () => {
91
+ t.daily = null, t.weekly = null, t.monthly = null;
92
+ }
93
+ };
94
+ };
95
+ var m = /* @__PURE__ */ ((t) => (t.CUSTOM_RANGE = "custom-range", t.INPUT = "input", t.ERROR = "error", t.FORM_DATE = "form-date", t))(m || {});
96
+ const mt = /[\d]/, ft = /^\d{2}$/, pt = /^\d{2}:\d{2}$/, gt = (t) => {
97
+ const { selectionStart: e } = t.target, n = mt.test(t.key) || t.key === "Backspace", d = [1, 2, 4, 5].includes(e) && t.key === ":";
98
+ !n && !d && t.preventDefault();
99
+ }, Te = (t) => {
100
+ if (!t)
101
+ return t;
102
+ let e = t;
103
+ if (e.length === 1 && parseInt(t, 10) > 2)
104
+ return `0${e}:`;
105
+ const [n, d] = e.slice(-2);
106
+ return [2, 5].includes(e.length) && d === ":" && (e = `${e.slice(0, e.length - 2)}0${n}`), (ft.test(e) || pt.test(e)) && (e += ":"), e;
107
+ }, vt = {
108
+ "en-US": {
109
+ customRange: "Custom range",
110
+ daily: "Daily",
111
+ dateFrom: "Date from",
112
+ dateTo: "Date to",
113
+ lastMonth: "Last month",
114
+ lastSevenDays: "Last 7 days",
115
+ lastThreeMonths: "Last three months",
116
+ monthly: "Monthly",
117
+ timeFrom: "Time from",
118
+ timeTo: "Time to",
119
+ weekly: "Weekly"
120
+ }
121
+ }, Ie = 300, ne = "customRange", be = "daily", _t = ke({
122
+ i18n: { messages: vt },
123
+ name: "date-range-picker-calendar",
124
+ components: {
125
+ BentoDropdown: Qe,
126
+ BentoInputField: Je,
127
+ BentoSegmentedControl: Xe,
128
+ BentoTypography: Se,
129
+ Calendar: F
130
+ },
131
+ props: {
132
+ /**
133
+ * Allows user to enter time values in the form
134
+ */
135
+ allowTimeInput: { type: Boolean, default: !1 },
136
+ /**
137
+ * Ranges form persistance data
138
+ */
139
+ dateFormData: {
140
+ type: Object,
141
+ default: () => ({ startDate: void 0, endDate: void 0, startTime: void 0, endTime: void 0 })
142
+ },
143
+ /**
144
+ * Allows you to set the first day of the week. 0 is sunday, 1 is monday, 6 is saturday
145
+ */
146
+ firstDayOfWeek: F.props.firstDayOfWeek,
147
+ /**
148
+ * A list of available granularities.
149
+ * If present, the date picker will display a segmented control to change granularity.
150
+ */
151
+ granularities: {
152
+ type: Array,
153
+ default: null
154
+ },
155
+ /**
156
+ * Indicate if a date should be disabled or not
157
+ */
158
+ isDateDisabled: F.props.isDateDisabled,
159
+ /**
160
+ * Set a maximum number of dates to be selectable by the range.
161
+ */
162
+ maxRange: F.props.maxRange,
163
+ /**
164
+ * Sets a minimum limit for selectable dates - dates before `min` will not be selectable
165
+ */
166
+ min: F.props.min,
167
+ /**
168
+ * Sets a maximum limit for selectable dates - dates after `max` will not be selectable
169
+ */
170
+ max: F.props.max,
171
+ /**
172
+ * Number of months rendered on pane
173
+ */
174
+ numberOfMonths: F.props.numberOfMonths,
175
+ /**
176
+ * Enables the custom range selector.
177
+ * If provided, must be an array that sets the custom range dropdown items. Items are of the structure:
178
+ * `label` - label of custom range item.
179
+ * `value` - a unique key of the custom range item.
180
+ * `data` - an object `{ startDate: Date; endDate: Date }` to set the date picker range to upon selecting.
181
+ */
182
+ quickSelectRanges: {
183
+ type: Array,
184
+ default: void 0
185
+ },
186
+ /**
187
+ * Selected date
188
+ */
189
+ value: { type: Object, default: void 0 }
190
+ },
191
+ emits: [
192
+ m.CUSTOM_RANGE,
193
+ m.INPUT,
194
+ m.ERROR,
195
+ m.FORM_DATE
196
+ ],
197
+ setup(t, { emit: e, slots: n }) {
198
+ var de, ue, ce, De, me;
199
+ const { locale: d, t: l } = re(), D = { de: ie, enUS: E, fr: oe }, r = J({
200
+ startDate: (de = t.value) == null ? void 0 : de.startDate,
201
+ endDate: (ue = t.value) == null ? void 0 : ue.endDate,
202
+ ...t.granularities ? {
203
+ granularity: ((ce = t.value) == null ? void 0 : ce.granularity) || be
204
+ } : {}
205
+ }), f = M(
206
+ ((me = (De = t == null ? void 0 : t.quickSelectRanges) == null ? void 0 : De.find(({ data: a }) => t.allowTimeInput ? Re(a.startDate, r.startDate) && Re(a.endDate, r.endDate) : L(a.startDate, r.startDate) && L(a.endDate, r.endDate))) == null ? void 0 : me.value) ?? ne
207
+ ), Y = k(() => ({
208
+ "b-date-range-picker-calendar__form-input-wrapper": t.allowTimeInput
209
+ })), G = k(() => [
210
+ { label: l("customRange"), value: ne },
211
+ ...t.quickSelectRanges
212
+ ]), T = k(
213
+ () => {
214
+ var a;
215
+ return ((a = t.granularities) == null ? void 0 : a.find(({ type: s }) => s === r.granularity)) || null;
216
+ }
217
+ ), g = k(
218
+ () => t.granularities.map(({ type: a, disabled: s }) => ({
219
+ label: l(a),
220
+ value: a,
221
+ disabled: s
222
+ }))
223
+ ), { getGranularCalendarLimits: P } = ct(t), u = k(
224
+ () => t.granularities ? P(T.value) : { min: H(t.min), max: O(t.max) }
225
+ ), {
226
+ adjustDateForMonthly: U,
227
+ adjustDateForWeekly: I,
228
+ adjustStartDateInputForWeekly: w,
229
+ adjustEndDateInputForWeekly: _,
230
+ adjustStartDateInputForMonthly: X,
231
+ adjustEndDateInputForMonthly: Z
232
+ } = rt(t.firstDayOfWeek), { savedRanges: R, saveRange: le, resetSavedRanges: ee } = Dt(), x = () => {
233
+ t != null && t.quickSelectRanges && (f.value = ne);
234
+ }, y = (a) => a ? $(a, S.NUMERIC_DATE_YEAR_FIRST, {
235
+ locale: D[d.value.substring(0, 2)] || E
236
+ }) : "", W = (a) => a ? $(a, S.HOUR_MINUTE_SECONDS, {
237
+ locale: D[d.value.substring(0, 2)] || E
238
+ }) : "", C = M(!1), h = M(!1), c = M(!1), v = M(!1), i = J({
239
+ startDate: t.dateFormData.startDate,
240
+ endDate: t.dateFormData.endDate,
241
+ startTime: t.dateFormData.startTime,
242
+ endTime: t.dateFormData.endTime
243
+ }), te = (a) => /^(?:[01]\d|2[01234]):(?:[012345]\d):(?:[012345]\d)$/.test(a), A = (a, s) => {
244
+ if (!s || !te(s))
245
+ return a;
246
+ let o = new Date(a);
247
+ const [p, ae, Ge] = s.split(":");
248
+ return o = lt(o, parseInt(p, 10)), o = dt(o, parseInt(ae, 10)), o = ut(o, parseInt(Ge, 10)), o;
249
+ }, Me = (a) => {
250
+ r.startDate = A(a.startDate, i.startTime), r.endDate = A(a.endDate, i.endTime), t.granularities && ee(), e(m.INPUT, r);
251
+ }, q = (a) => {
252
+ const s = (p) => t.min && p <= t.min || t.max && p >= t.max ? !1 : t.isDateDisabled ? !t.isDateDisabled(p) : !0;
253
+ return /^\d{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])$/.test(a) && s(new Date(a));
254
+ };
255
+ We(() => {
256
+ t.dateFormData.startDate && !q(t.dateFormData.startDate) ? C.value = !0 : (C.value = !1, c.value = !1), t.dateFormData.endDate && !q(t.dateFormData.endDate) ? h.value = !0 : (h.value = !1, v.value = !1);
257
+ });
258
+ const Oe = (a) => {
259
+ var s;
260
+ x(), i.startDate = y(a), i.startTime ? c.value && (i.startTime = (s = t.dateFormData) == null ? void 0 : s.startTime) : i.startTime = W(a), C.value = !1, c.value = !1;
261
+ }, we = (a) => {
262
+ var s;
263
+ i.endDate = y(a), i.endTime ? v.value && (i.endTime = (s = t.dateFormData) == null ? void 0 : s.endTime) : i.endTime = W(O(a)), h.value = !1, v.value = !1;
264
+ }, K = (a) => {
265
+ const s = t.value[a];
266
+ if (s)
267
+ return s;
268
+ if (t.dateFormData[a] && q(t.dateFormData[a]))
269
+ return new Date(t.dateFormData[a]);
270
+ }, xe = z((a) => {
271
+ var s;
272
+ if (q(a)) {
273
+ let o = a;
274
+ switch (C.value = !1, (s = T.value) == null ? void 0 : s.type) {
275
+ case "weekly":
276
+ o = w(
277
+ a,
278
+ y,
279
+ u.value.min,
280
+ u.value.max
281
+ ), i.startDate = o;
282
+ break;
283
+ case "monthly":
284
+ o = X(
285
+ a,
286
+ y,
287
+ u.value.min,
288
+ u.value.max
289
+ ), i.startDate = o;
290
+ break;
291
+ }
292
+ r.startDate = A(new Date(o), i.startTime);
293
+ const p = K("endDate");
294
+ e(m.FORM_DATE, {
295
+ startDate: new Date(o),
296
+ endDate: p
297
+ }), e(m.INPUT, {
298
+ startDate: new Date(o),
299
+ endDate: p
300
+ });
301
+ } else
302
+ C.value = !0, e(m.ERROR, { ...i });
303
+ }, Ie), Ce = (a) => {
304
+ x(), i.startDate = pe(a), xe(i.startDate);
305
+ }, he = z((a) => {
306
+ var s;
307
+ if (q(a)) {
308
+ let o = a;
309
+ switch (h.value = !1, (s = T.value) == null ? void 0 : s.type) {
310
+ case "weekly":
311
+ o = _(
312
+ a,
313
+ y,
314
+ u.value.min,
315
+ u.value.max
316
+ ), i.endDate = o;
317
+ break;
318
+ case "monthly":
319
+ o = Z(
320
+ a,
321
+ y,
322
+ u.value.min,
323
+ u.value.max
324
+ ), i.endDate = o;
325
+ break;
326
+ }
327
+ r.endDate = A(new Date(o), i.endTime);
328
+ const p = K("startDate");
329
+ e(m.FORM_DATE, {
330
+ startDate: p,
331
+ endDate: new Date(r.endDate),
332
+ startTime: t.dateFormData.endTime,
333
+ endTime: o
334
+ }), e(m.INPUT, {
335
+ startDate: p,
336
+ endDate: new Date(r.endDate)
337
+ });
338
+ } else
339
+ h.value = !0, e(m.ERROR, { ...i });
340
+ }, Ie), Fe = (a) => {
341
+ x(), i.endDate = pe(a), he(i.endDate);
342
+ }, Pe = (a) => {
343
+ Ke(a);
344
+ }, Ue = z((a) => {
345
+ if (te(a)) {
346
+ c.value = !1, r.startDate = A(r.startDate, a);
347
+ const s = K("endDate");
348
+ e(m.FORM_DATE, {
349
+ startDate: new Date(r.startDate),
350
+ endDate: s,
351
+ startTime: a,
352
+ endTime: t.dateFormData.endTime
353
+ }), e(m.INPUT, {
354
+ startDate: new Date(r.startDate),
355
+ endDate: s
356
+ });
357
+ } else
358
+ c.value = !0, e(m.ERROR, { ...i });
359
+ }), Ae = z((a) => {
360
+ if (te(a)) {
361
+ v.value = !1, r.endDate = A(r.endDate, a);
362
+ const s = K("startDate");
363
+ e(m.FORM_DATE, {
364
+ startDate: s,
365
+ endDate: new Date(r.endDate),
366
+ startTime: t.dateFormData.startTime,
367
+ endTime: a
368
+ }), e(m.INPUT, {
369
+ startDate: s,
370
+ endDate: new Date(r.endDate)
371
+ });
372
+ } else
373
+ v.value = !0, e(m.ERROR, { ...i });
374
+ }), Ne = (a) => {
375
+ x(), i.startTime = Te(a), Ue(i.startTime);
376
+ }, Be = (a) => {
377
+ x(), i.endTime = Te(a), Ae(i.endTime);
378
+ }, Le = (a) => {
379
+ gt(a);
380
+ }, N = (a, s, o) => {
381
+ r.startDate = a, r.endDate = s, o && (r.granularity = o);
382
+ }, $e = (a) => {
383
+ var o, p;
384
+ f.value = a;
385
+ const s = (p = (o = t.quickSelectRanges) == null ? void 0 : o.find(({ value: ae }) => ae === a)) == null ? void 0 : p.data;
386
+ s && (ee(), i.startDate = y(s.startDate), i.endDate = y(s.endDate), N(s.startDate, s.endDate), t.granularities && (r.granularity = s.granularity || be), i.startTime || (i.startTime = W(O(s.startDate))), i.endTime || (i.endTime = W(O(s.endDate))), e(m.CUSTOM_RANGE, s));
387
+ }, Ye = (a) => {
388
+ x();
389
+ const s = r.granularity;
390
+ if (r.granularity = a, s && le(s, structuredClone(qe(r))), r.startDate && r.endDate) {
391
+ switch (a) {
392
+ case "monthly": {
393
+ if (R.monthly) {
394
+ N(R.monthly.startDate, R.monthly.endDate, a);
395
+ break;
396
+ }
397
+ const { startDate: o, endDate: p } = U(
398
+ r.startDate,
399
+ r.endDate,
400
+ u.value.min,
401
+ u.value.max
402
+ );
403
+ N(o, p, a);
404
+ break;
405
+ }
406
+ case "weekly": {
407
+ if (R.weekly) {
408
+ N(R.weekly.startDate, R.weekly.endDate, a);
409
+ break;
410
+ }
411
+ const { startDate: o, endDate: p } = I(
412
+ r.startDate,
413
+ r.endDate,
414
+ u.value.min,
415
+ u.value.max
416
+ );
417
+ N(o, p, a);
418
+ break;
419
+ }
420
+ case "daily":
421
+ R.daily && N(R.daily.startDate, R.daily.endDate, a);
422
+ break;
423
+ }
424
+ i.startDate = y(r.startDate), i.endDate = y(r.endDate), e(m.INPUT, r);
425
+ }
426
+ };
427
+ return {
428
+ // Values
429
+ internalRangeDate: r,
430
+ dateTextInput: i,
431
+ endDateError: h,
432
+ endTimeError: v,
433
+ granularityItems: g,
434
+ selectedGranularity: T,
435
+ computedMinMax: u,
436
+ selectedRangeSelectorValue: f,
437
+ startDateError: C,
438
+ startTimeError: c,
439
+ quickSelectRangeDefaultItems: G,
440
+ formInputWrapperConditionalClasses: Y,
441
+ // Methods
442
+ hasSlot: Ze(n),
443
+ t: l,
444
+ // Events
445
+ onDateInput: Me,
446
+ onDateInputKeyDown: Pe,
447
+ onEndDateInput: Fe,
448
+ onEndDateSelected: we,
449
+ onEndTimeInput: Be,
450
+ onGranularityInput: Ye,
451
+ onRangeSelectorInput: $e,
452
+ onStartDateInput: Ce,
453
+ onStartDateSelected: Oe,
454
+ onStartTimeInput: Ne,
455
+ onTimeInputKeyDown: Le
456
+ };
457
+ }
458
+ });
459
+ var yt = function() {
460
+ var e = this, n = e._self._c;
461
+ return e._self._setupProxy, n("div", { staticClass: "b-date-range-picker-calendar" }, [n("div", { staticClass: "b-date-range-picker-calendar__form-container" }, [n("div", { staticClass: "b-date-range-picker-calendar__form" }, [e.hasSlot("title") ? [e._t("title")] : e._e(), e.quickSelectRanges ? n("bento-dropdown", { attrs: { "aria-label": e.t("customRange"), items: e.quickSelectRangeDefaultItems, value: e.selectedRangeSelectorValue }, on: { input: e.onRangeSelectorInput } }) : e._e(), e.granularities ? n("bento-segmented-control", { attrs: { items: e.granularityItems, "model-value": e.internalRangeDate.granularity, "full-width": "" }, on: { "update:model-value": e.onGranularityInput } }) : e._e(), n("div", [n("bento-typography", { staticClass: "b-date-range-picker-calendar__label", attrs: { stronger: "", el: "span" } }, [e._v(" From ")]), n("div", { class: e.formInputWrapperConditionalClasses }, [n("bento-input-field", { staticClass: "b-date-range-picker-calendar__form-input", attrs: { "aria-label": e.$t("dateFrom"), value: e.dateTextInput.startDate, error: e.startDateError }, on: { input: e.onStartDateInput, keydown: e.onDateInputKeyDown }, scopedSlots: e._u([{ key: "description", fn: function() {
462
+ return [e._v("YYYY-MM-DD")];
463
+ }, proxy: !0 }]) }), e.allowTimeInput ? n("bento-input-field", { staticClass: "b-date-range-picker-calendar__form-input", attrs: { "aria-label": e.t("timeFrom"), value: e.dateTextInput.startTime, error: e.startTimeError }, on: { input: e.onStartTimeInput, keydown: e.onTimeInputKeyDown }, scopedSlots: e._u([{ key: "description", fn: function() {
464
+ return [e._v("HH:MM:SS")];
465
+ }, proxy: !0 }], null, !1, 3442289499) }) : e._e()], 1)], 1), n("div", [n("bento-typography", { staticClass: "b-date-range-picker-calendar__label", attrs: { stronger: "", el: "span" } }, [e._v(" To ")]), n("div", { class: e.formInputWrapperConditionalClasses }, [n("bento-input-field", { staticClass: "b-date-range-picker-calendar__form-input", attrs: { "aria-label": e.$t("dateTo"), value: e.dateTextInput.endDate, error: e.endDateError }, on: { input: e.onEndDateInput, keydown: e.onDateInputKeyDown }, scopedSlots: e._u([{ key: "description", fn: function() {
466
+ return [e._v("YYYY-MM-DD")];
467
+ }, proxy: !0 }]) }), e.allowTimeInput ? n("bento-input-field", { staticClass: "b-date-range-picker-calendar__form-input", attrs: { "aria-label": e.t("timeTo"), value: e.dateTextInput.endTime, error: e.endTimeError }, on: { input: e.onEndTimeInput, keydown: e.onTimeInputKeyDown }, scopedSlots: e._u([{ key: "description", fn: function() {
468
+ return [e._v("HH:MM:SS")];
469
+ }, proxy: !0 }], null, !1, 3442289499) }) : e._e()], 1)], 1)], 2), e.hasSlot("actions") ? n("div", [e._t("actions")], 2) : e._e()]), n("div", { staticClass: "b-date-range-picker-calendar__calendars-container" }, [n("calendar", { attrs: { value: e.value, "first-day-of-week": e.firstDayOfWeek, "is-date-disabled": e.isDateDisabled, "max-range": e.maxRange, min: e.computedMinMax.min, max: e.computedMinMax.max, "number-of-months": e.numberOfMonths, granularity: e.selectedGranularity, "is-range": "" }, on: { input: e.onDateInput, "start-date-selected": e.onStartDateSelected, "end-date-selected": e.onEndDateSelected } })], 1)]);
470
+ }, Rt = [], Tt = /* @__PURE__ */ Ee(
471
+ _t,
472
+ yt,
473
+ Rt,
474
+ !1,
475
+ null,
476
+ "d872ba17",
477
+ null,
478
+ null
479
+ );
480
+ const b = Tt.exports, It = ({
481
+ datePickerValue: t,
482
+ isDateIncorrect: e
483
+ }) => {
484
+ var T, g, P, u, U;
485
+ const { locale: n, t: d } = re(), l = { de: ie, enUS: E, fr: oe }, D = (I, w) => $(I, w, {
486
+ locale: l[n.value.substring(0, 2)] || E
487
+ }), r = (I) => $(I, S.HOUR_MINUTE_SECONDS, {
488
+ locale: l[n.value.substring(0, 2)] || E
489
+ }), f = J({
490
+ startDate: (T = t.value) != null && T.startDate ? D(t.value.startDate, S.NUMERIC_DATE_YEAR_FIRST) : void 0,
491
+ endDate: (g = t.value) != null && g.endDate ? D(t.value.endDate, S.NUMERIC_DATE_YEAR_FIRST) : void 0,
492
+ // Set time if the startDate/endDate are set
493
+ startTime: (P = t.value) != null && P.startDate ? r((u = t.value) == null ? void 0 : u.startDate) : void 0,
494
+ endTime: (U = t.value) != null && U.endDate ? r(t.value.endDate) : void 0
495
+ });
496
+ return {
497
+ // Values
498
+ dateDisplayValue: k(() => {
499
+ if (e.value)
500
+ return `${f.startDate || ""} - ${f.endDate || ""}`;
501
+ if (!t.value || !t.value.startDate && !t.value.endDate)
502
+ return d("selectDateRange");
503
+ const { startDate: I, endDate: w } = f;
504
+ return `${D(new Date(I), S.FULL_DATE_MONTH_FIRST)} - ${D(
505
+ new Date(w),
506
+ S.FULL_DATE_MONTH_FIRST
507
+ )}`;
508
+ }),
509
+ textInputDisplayValue: f,
510
+ // Methods
511
+ formatTextInputDisplayValue: () => ""
512
+ };
513
+ };
514
+ var B = /* @__PURE__ */ ((t) => (t.INPUT = "input", t))(B || {});
515
+ const bt = {
516
+ "en-US": {
517
+ dateRangePicker: "Date range picker {name}",
518
+ provideDateInAFormat: "Provide date in a YYYY-MM-DD format",
519
+ selectDate: "Select a date",
520
+ selectDateRange: "Select a date range",
521
+ selectedDateIsNotAvailable: "Selected date is not available"
522
+ }
523
+ }, kt = ke({
524
+ i18n: { messages: bt },
525
+ name: "bento-date-range-picker",
526
+ components: {
527
+ BentoTypography: Se,
528
+ BentoPopover: He,
529
+ DateRangePickerCalendar: b,
530
+ DropdownInputDefault: je,
531
+ ErrorMessage: st,
532
+ FieldLabel: it
533
+ },
534
+ directives: { BentoClickOutsideDirective: ot },
535
+ props: {
536
+ /**
537
+ * Allows user to enter time values in the form
538
+ */
539
+ allowTimeInput: { type: Boolean, default: !1 },
540
+ /**
541
+ * Descriptive supporting text visbile underneath the dropdown.
542
+ */
543
+ description: { type: String, default: void 0 },
544
+ /**
545
+ * Disables dropdown functionality.
546
+ */
547
+ disabled: { type: Boolean, default: !1 },
548
+ /**
549
+ * Displays component in an error state with an error message
550
+ */
551
+ errorMessage: { type: String, default: null },
552
+ /**
553
+ * Allows user to set the first day of the week. 0 is sunday, 1 is monday, 6 is saturday
554
+ */
555
+ firstDayOfWeek: b.props.firstDayOfWeek,
556
+ /**
557
+ * A list of available granularities.
558
+ * If present, the date picker will display a segmented control to change granularity.
559
+ */
560
+ granularities: b.props.granularities,
561
+ /**
562
+ * Indicate if a date should be disabled or not
563
+ */
564
+ isDateDisabled: b.props.isDateDisabled,
565
+ /**
566
+ * Text that is displayed as a label above the element.
567
+ */
568
+ label: { type: String, default: void 0 },
569
+ /**
570
+ * Highlights the dropdown is optional.
571
+ */
572
+ optional: { type: Boolean, default: !1 },
573
+ /**
574
+ * The Boolean readonly property, when present, makes the element not mutable, meaning the user can not edit the date range picker.
575
+ */
576
+ readonly: { type: Boolean, default: !1 },
577
+ /**
578
+ * Highlights the dropdown is required.
579
+ */
580
+ required: { type: Boolean, default: !1 },
581
+ /**
582
+ * Adds a info icon next to the label to display the passed tooltip message.
583
+ */
584
+ tooltipText: { type: String, default: null },
585
+ /**
586
+ * Enables the range selector.
587
+ * If provided, must be an array that sets the custom range dropdown items. Items are of the structure:
588
+ * `label` - label of custom range item.
589
+ * `value` - a unique key of the custom range item.
590
+ * `data` - an object `{ startDate: Date; endDate: Date }` to set the date picker range to upon selecting.
591
+ */
592
+ quickSelectRanges: {
593
+ type: Array,
594
+ default: void 0
595
+ },
596
+ /**
597
+ * Set a maximum number of dates to be selectable by the range.
598
+ */
599
+ maxRange: b.props.maxRange,
600
+ /**
601
+ * Sets a minimum limit for selectable dates - dates before `min` will not be selectable
602
+ */
603
+ min: b.props.min,
604
+ /**
605
+ * Sets a maximum limit for selectable dates - dates after `max` will not be selectable
606
+ */
607
+ max: b.props.max,
608
+ /**
609
+ * Number of months rendered on pane
610
+ */
611
+ numberOfMonths: b.props.numberOfMonths,
612
+ /**
613
+ * Selected date
614
+ */
615
+ value: b.props.value
616
+ },
617
+ emits: [B.INPUT],
618
+ setup(t, { emit: e }) {
619
+ const { locale: n, t: d } = re(), l = { de: ie, enUS: E, fr: oe }, D = V("bento-date-range-picker-container"), r = V("bento-date-range-picker-label"), f = V("bento-date-range-picker-description"), Y = V("bento-date-range-picker-error"), G = V("bento-date-range-picker-date-error"), T = k(
620
+ () => t.label || d("dateRangePicker", { name: D })
621
+ ), g = M(!1), P = M(null), u = M(!1), { isReadOnly: U } = ze(fe(t, "readonly"));
622
+ Ve(
623
+ () => t.disabled,
624
+ () => {
625
+ t.disabled && u.value && (u.value = !1);
626
+ }
627
+ );
628
+ const I = k(() => ({
629
+ "b-date-range-picker__description--error": !!t.errorMessage || g.value
630
+ })), { dateDisplayValue: w, textInputDisplayValue: _, formatTextInputDisplayValue: X } = It({
631
+ datePickerValue: fe(t, "value"),
632
+ isDateIncorrect: g
633
+ }), Z = k(
634
+ () => `${t.description ? f : ""} ${t.errorMessage ? Y : ""} ${g.value ? G : ""}`.trim() || null
635
+ );
636
+ return {
637
+ // Refs
638
+ inputContainerRef: P,
639
+ // Values,
640
+ dateDisplayValue: w,
641
+ datePickerContainerId: D,
642
+ descriptionConditionalClasses: I,
643
+ isDateIncorrect: g,
644
+ isDateRangePickerOpen: u,
645
+ isReadOnly: U,
646
+ labelId: r,
647
+ descriptionId: f,
648
+ dateErrorId: G,
649
+ errorId: Y,
650
+ popoverAriaLabel: T,
651
+ ariaDescribedBy: Z,
652
+ textInputDisplayValue: _,
653
+ // Events
654
+ closeDateRangePicker: () => {
655
+ u.value = !1;
656
+ },
657
+ clearDateRangePickerValue: async () => {
658
+ g.value && (g.value = !1), e(B.INPUT, null);
659
+ },
660
+ openDateRangePicker: () => {
661
+ u.value = !0, X();
662
+ },
663
+ onRangeSelectorInput: (c) => {
664
+ if (c) {
665
+ const v = (i) => $(i, S.NUMERIC_DATE_YEAR_FIRST, {
666
+ locale: l[n.value.substring(0, 2)] || E
667
+ });
668
+ _.startDate = v(c.startDate), _.endDate = v(c.endDate), e(B.INPUT, c);
669
+ }
670
+ },
671
+ onEnterPressedOverInput: () => {
672
+ g.value || (u.value = !1);
673
+ },
674
+ onDateRangePickerInput: (c) => {
675
+ g.value = !1;
676
+ const v = (i) => $(i, S.NUMERIC_DATE_YEAR_FIRST, {
677
+ locale: l[n.value.substring(0, 2)] || E
678
+ });
679
+ _.startDate = v(c.startDate), _.endDate = v(c.endDate), e(B.INPUT, c);
680
+ },
681
+ onDateRangePickerError: (c) => {
682
+ g.value = !0, _.startDate = c.startDate, _.endDate = c.endDate, e(B.INPUT, { startDate: null, endDate: null });
683
+ },
684
+ onDateRangePickerFormDateInputUpdate: (c) => {
685
+ g.value = !1, c.startTime && (_.startTime = c.startTime), c.endTime && (_.endTime = c.endTime);
686
+ }
687
+ };
688
+ }
689
+ });
690
+ var St = function() {
691
+ var e = this, n = e._self._c;
692
+ return e._self._setupProxy, n("div", { directives: [{ name: "bento-click-outside-directive", rawName: "v-bento-click-outside-directive", value: e.closeDateRangePicker, expression: "closeDateRangePicker" }], staticClass: "b-date-range-picker" }, [e.label ? n("field-label", { attrs: { id: e.labelId, label: e.label, "tooltip-text": e.tooltipText, optional: e.optional, required: e.required } }) : e._e(), n("div", { on: { keydown: function(d) {
693
+ return !d.type.indexOf("key") && e._k(d.keyCode, "enter", 13, d.key, "Enter") ? null : e.onEnterPressedOverInput.apply(null, arguments);
694
+ } } }, [n("dropdown-input-default", { ref: "inputContainerRef", attrs: { "always-combobox-is-input": "", ariaControls: e.datePickerContainerId, ariaExpanded: e.isDateRangePickerOpen, "aria-labelledby": e.label ? e.labelId : null, "aria-describedby": e.ariaDescribedBy, disabled: e.disabled, "is-invalid": !!e.errorMessage || e.isDateIncorrect, open: e.isDateRangePickerOpen, "display-value": e.dateDisplayValue, readonly: e.isReadOnly }, on: { open: e.openDateRangePicker, clear: e.clearDateRangePickerValue, close: e.closeDateRangePicker } })], 1), e.isDateIncorrect ? n("error-message", { staticClass: "b-date-range-picker__error-message", attrs: { id: e.dateErrorId, "error-message": e.$t("provideDateInAFormat").toString() } }) : e._e(), e.errorMessage ? n("error-message", { staticClass: "b-date-range-picker__error-message", attrs: { id: e.errorId, "error-message": e.errorMessage } }) : e._e(), e.description ? n("bento-typography", { staticClass: "b-date-range-picker__description", class: e.descriptionConditionalClasses, attrs: { id: e.descriptionId, el: "span" } }, [e._v(" " + e._s(e.description) + " ")]) : e._e(), e.inputContainerRef ? n("bento-popover", { staticClass: "b-date-range-picker__container", attrs: { id: e.datePickerContainerId, open: e.isDateRangePickerOpen, "target-element": e.inputContainerRef, "disable-focus-trap": !0, "aria-label": e.popoverAriaLabel, position: "bottom-start", "without-space": "", "fit-content": "" } }, [n("date-range-picker-calendar", { attrs: { "allow-time-input": e.allowTimeInput, "quick-select-ranges": e.quickSelectRanges, value: e.value, "first-day-of-week": e.firstDayOfWeek, granularities: e.granularities, "is-date-disabled": e.isDateDisabled, "max-range": e.maxRange, min: e.min, max: e.max, "number-of-months": e.numberOfMonths, "date-form-data": e.textInputDisplayValue }, on: { "custom-range": e.onRangeSelectorInput, input: e.onDateRangePickerInput, error: e.onDateRangePickerError, "form-date": e.onDateRangePickerFormDateInputUpdate } })], 1) : e._e()], 1);
695
+ }, Et = [], Mt = /* @__PURE__ */ Ee(
696
+ kt,
697
+ St,
698
+ Et,
699
+ !1,
700
+ null,
701
+ "f981286a",
702
+ null,
703
+ null
704
+ );
705
+ const Jt = Mt.exports;
706
+ export {
707
+ Jt as B,
708
+ b as D,
709
+ B as a,
710
+ Re as i
711
+ };
712
+ //# sourceMappingURL=index.408e1419.js.map