@adyen/bento-vue2 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 (223) 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 +28 -18
  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 +18 -0
  14. package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-options-container/dropdown-options-container.vue.d.ts +320 -21
  15. package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-avatar/dropdown-avatar.vue.d.ts +9 -0
  16. package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-country/dropdown-country.vue.d.ts +9 -0
  17. package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-currency/dropdown-currency.vue.d.ts +9 -0
  18. package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-payment-method/dropdown-payment-method.vue.d.ts +9 -0
  19. package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-tag/dropdown-tag.vue.d.ts +9 -0
  20. package/dist/@types/packages/vue2/src/components/dropdown/dropdown.vue.d.ts +12 -3
  21. package/dist/@types/packages/vue2/src/components/filter-bar/components/all-filters-modal/all-filters-modal.vue.d.ts +30 -24
  22. package/dist/@types/packages/vue2/src/components/filter-bar/components/date-range-filter/date-range-filter.vue.d.ts +1 -0
  23. package/dist/@types/packages/vue2/src/components/input-field/input-field.vue.d.ts +9 -0
  24. package/dist/@types/packages/vue2/src/components/internal/calendar/calendar.types.d.ts +12 -0
  25. package/dist/@types/packages/vue2/src/components/internal/calendar/calendar.vue.d.ts +11 -1
  26. package/dist/@types/packages/vue2/src/components/internal/calendar/components/calendar-month/composables/granular-min-max-date.d.ts +2 -0
  27. package/dist/@types/packages/vue2/src/components/internal/calendar/components/calendar-month/composables/granular-min-max-date.types.d.ts +13 -0
  28. package/dist/@types/packages/vue2/src/components/internal/calendar/composables/use-granularity-adjustments.d.ts +2 -0
  29. package/dist/@types/packages/vue2/src/components/internal/calendar/composables/use-granularity-adjustments.types.d.ts +14 -0
  30. package/dist/@types/packages/vue2/src/components/internal/calendar/composables/use-granularity-memory.d.ts +2 -0
  31. package/dist/@types/packages/vue2/src/components/internal/calendar/composables/use-granularity-memory.types.d.ts +22 -0
  32. package/dist/@types/packages/vue2/src/components/internal/controls-group/controls-group.vue.d.ts +1 -1
  33. package/dist/@types/packages/vue2/src/components/internal/field-label/field-label.vue.d.ts +48 -0
  34. package/dist/@types/packages/vue2/src/components/internal/field-label/index.d.ts +1 -0
  35. package/dist/@types/packages/vue2/src/components/internal/grid-layout/grid-layout.vue.d.ts +11 -0
  36. package/dist/@types/packages/vue2/src/components/internal/index.d.ts +1 -0
  37. package/dist/@types/packages/vue2/src/components/modal/components/base-modal/base-modal.vue.d.ts +2 -1
  38. package/dist/@types/packages/vue2/src/components/popover/popover.keys.d.ts +1 -0
  39. package/dist/@types/packages/vue2/src/components/popover/popover.vue.d.ts +16 -22
  40. package/dist/@types/packages/vue2/src/components/structured-list/components/structered-list-item/structured-list-item.vue.d.ts +1 -0
  41. package/dist/@types/packages/vue2/src/components/structured-list/structured-list.keys.d.ts +1 -0
  42. package/dist/@types/packages/vue2/src/components/structured-list/structured-list.vue.d.ts +20 -1
  43. package/dist/@types/packages/vue2/src/components/summary-grid/summary-grid.types.d.ts +4 -4
  44. package/dist/@types/packages/vue2/src/components/textarea/textarea.vue.d.ts +9 -0
  45. package/dist/@types/packages/vue2/src/components/timeline/components/timeline-item/timeline-item.vue.d.ts +19 -2
  46. package/dist/@types/packages/vue2/src/components/timeline/timeline.types.d.ts +4 -2
  47. package/dist/@types/packages/vue2/src/components/timeline/timeline.vue.d.ts +18 -2
  48. package/dist/@types/packages/vue2/src/index.d.ts +1 -0
  49. package/dist/accordion.js +1 -1
  50. package/dist/action-bar.js +112 -93
  51. package/dist/action-bar.js.map +1 -1
  52. package/dist/alert.js +1 -1
  53. package/dist/assets/base-modal.css +1 -1
  54. package/dist/assets/calendar.css +1 -1
  55. package/dist/assets/checkbox.css +1 -1
  56. package/dist/assets/controls-group.css +1 -1
  57. package/dist/assets/dropdown.css +1 -1
  58. package/dist/assets/field-label.css +1 -0
  59. package/dist/assets/grid-layout.css +1 -1
  60. package/dist/assets/index.css +1 -1
  61. package/dist/assets/index11.css +1 -1
  62. package/dist/assets/index12.css +1 -1
  63. package/dist/assets/index13.css +1 -1
  64. package/dist/assets/index14.css +1 -1
  65. package/dist/assets/index15.css +1 -1
  66. package/dist/assets/index16.css +1 -1
  67. package/dist/assets/index17.css +1 -1
  68. package/dist/assets/index18.css +1 -1
  69. package/dist/assets/index19.css +1 -1
  70. package/dist/assets/index2.css +1 -1
  71. package/dist/assets/index20.css +1 -1
  72. package/dist/assets/index21.css +1 -1
  73. package/dist/assets/index22.css +1 -1
  74. package/dist/assets/index23.css +1 -1
  75. package/dist/assets/index24.css +1 -1
  76. package/dist/assets/index25.css +1 -1
  77. package/dist/assets/index26.css +1 -1
  78. package/dist/assets/index27.css +1 -1
  79. package/dist/assets/index28.css +1 -1
  80. package/dist/assets/index29.css +1 -1
  81. package/dist/assets/index3.css +1 -1
  82. package/dist/assets/index30.css +1 -1
  83. package/dist/assets/index32.css +1 -1
  84. package/dist/assets/index33.css +1 -1
  85. package/dist/assets/index34.css +1 -1
  86. package/dist/assets/index35.css +1 -1
  87. package/dist/assets/index36.css +1 -1
  88. package/dist/assets/index37.css +1 -1
  89. package/dist/assets/index38.css +1 -1
  90. package/dist/assets/index39.css +1 -1
  91. package/dist/assets/index4.css +1 -1
  92. package/dist/assets/index40.css +1 -1
  93. package/dist/assets/index41.css +1 -1
  94. package/dist/assets/index42.css +1 -1
  95. package/dist/assets/index43.css +1 -1
  96. package/dist/assets/index44.css +1 -1
  97. package/dist/assets/index45.css +1 -1
  98. package/dist/assets/index5.css +1 -1
  99. package/dist/assets/index6.css +1 -1
  100. package/dist/assets/index7.css +1 -1
  101. package/dist/assets/index8.css +1 -1
  102. package/dist/assets/index9.css +1 -1
  103. package/dist/assets/loading-button.css +1 -1
  104. package/dist/avatar-image.js +1 -1
  105. package/dist/badge.js +1 -1
  106. package/dist/button.js +38 -35
  107. package/dist/button.js.map +1 -1
  108. package/dist/card.js +1 -1
  109. package/dist/checkbox.js +5 -5
  110. package/dist/chunks/{base-modal.88e7b9d4.js → base-modal.31634fe8.js} +60 -49
  111. package/dist/chunks/base-modal.31634fe8.js.map +1 -0
  112. package/dist/chunks/{button-actions-with-menu.a5413243.js → button-actions-with-menu.5faea13e.js} +5 -5
  113. package/dist/chunks/{button-actions-with-menu.a5413243.js.map → button-actions-with-menu.5faea13e.js.map} +1 -1
  114. package/dist/chunks/button.e09d5980.js.map +1 -1
  115. package/dist/chunks/calendar.47e9e755.js +959 -0
  116. package/dist/chunks/calendar.47e9e755.js.map +1 -0
  117. package/dist/chunks/{checkbox.5343e28e.js → checkbox.2277450e.js} +67 -56
  118. package/dist/chunks/checkbox.2277450e.js.map +1 -0
  119. package/dist/chunks/controls-group.6c5bfccd.js +79 -0
  120. package/dist/chunks/controls-group.6c5bfccd.js.map +1 -0
  121. package/dist/chunks/{copy.346eadb1.js → copy.a85c2e9f.js} +3 -3
  122. package/dist/chunks/{copy.346eadb1.js.map → copy.a85c2e9f.js.map} +1 -1
  123. package/dist/chunks/{dropdown.f1253a54.js → dropdown.ce937989.js} +200 -196
  124. package/dist/chunks/dropdown.ce937989.js.map +1 -0
  125. package/dist/chunks/field-label.330edb60.js +107 -0
  126. package/dist/chunks/field-label.330edb60.js.map +1 -0
  127. package/dist/chunks/{grid-layout.b7e0d964.js → grid-layout.a806acb2.js} +36 -27
  128. package/dist/chunks/grid-layout.a806acb2.js.map +1 -0
  129. package/dist/chunks/index.210d2169.js +290 -0
  130. package/dist/chunks/index.210d2169.js.map +1 -0
  131. package/dist/chunks/{index.8ac70774.js → index.66503760.js} +3 -3
  132. package/dist/chunks/{index.8ac70774.js.map → index.66503760.js.map} +1 -1
  133. package/dist/chunks/{index.2625175a.js → index.86fc63ca.js} +30 -28
  134. package/dist/chunks/{index.2625175a.js.map → index.86fc63ca.js.map} +1 -1
  135. package/dist/chunks/{index.a201f750.js → index.89942d3a.js} +4 -5
  136. package/dist/chunks/{index.a201f750.js.map → index.89942d3a.js.map} +1 -1
  137. package/dist/chunks/index.a5de5242.js +130 -0
  138. package/dist/chunks/index.a5de5242.js.map +1 -0
  139. package/dist/chunks/index.a99ffd48.js +634 -0
  140. package/dist/chunks/index.a99ffd48.js.map +1 -0
  141. package/dist/chunks/index.d80206ed.js +10 -0
  142. package/dist/chunks/index.d80206ed.js.map +1 -0
  143. package/dist/chunks/{index.37283390.js → index.d8bd7596.js} +96 -99
  144. package/dist/chunks/{index.37283390.js.map → index.d8bd7596.js.map} +1 -1
  145. package/dist/chunks/{listbox-option-tag.6a09e8e2.js → listbox-option-tag.97af47fc.js} +6 -7
  146. package/dist/chunks/{listbox-option-tag.6a09e8e2.js.map → listbox-option-tag.97af47fc.js.map} +1 -1
  147. package/dist/chunks/{listbox.73c38f38.js → listbox.d039b178.js} +5 -6
  148. package/dist/chunks/{listbox.73c38f38.js.map → listbox.d039b178.js.map} +1 -1
  149. package/dist/chunks/loading-button.9a9cbbad.js +89 -0
  150. package/dist/chunks/loading-button.9a9cbbad.js.map +1 -0
  151. package/dist/chunks/{tooltip.104e5fac.js → tooltip.ecd0f707.js} +2 -2
  152. package/dist/chunks/{tooltip.104e5fac.js.map → tooltip.ecd0f707.js.map} +1 -1
  153. package/dist/code-snippet.js +4 -4
  154. package/dist/code-snippet.js.map +1 -1
  155. package/dist/country.js +1 -1
  156. package/dist/data-grid.js +563 -541
  157. package/dist/data-grid.js.map +1 -1
  158. package/dist/date-picker.js +83 -80
  159. package/dist/date-picker.js.map +1 -1
  160. package/dist/date-range-picker.js +2 -2
  161. package/dist/divider.js +1 -1
  162. package/dist/dropdown.js +3 -3
  163. package/dist/empty-state.js +1 -1
  164. package/dist/filter-bar.js +13 -12
  165. package/dist/filter-bar.js.map +1 -1
  166. package/dist/focus-trap.js +1 -1
  167. package/dist/form-layout.js +1 -1
  168. package/dist/header.js +63 -67
  169. package/dist/header.js.map +1 -1
  170. package/dist/index.js +211 -209
  171. package/dist/index.js.map +1 -1
  172. package/dist/info-icon.js +3 -3
  173. package/dist/input-field.js +57 -55
  174. package/dist/input-field.js.map +1 -1
  175. package/dist/internal.js +13 -12
  176. package/dist/link.js +1 -1
  177. package/dist/loading-indicator.js +1 -1
  178. package/dist/menu.js +1 -1
  179. package/dist/modal.js +2 -2
  180. package/dist/modal.js.map +1 -1
  181. package/dist/pagination.js +2 -2
  182. package/dist/payment-method.js +1 -1
  183. package/dist/popover.js +3 -305
  184. package/dist/popover.js.map +1 -1
  185. package/dist/popper-container.js +1 -1
  186. package/dist/radio-group.js +3 -3
  187. package/dist/search-bar.js +2 -2
  188. package/dist/segmented-control.js +2 -2
  189. package/dist/sidepanel.js +2 -2
  190. package/dist/status.js +1 -1
  191. package/dist/stepper.js +1 -1
  192. package/dist/structured-list.js +1 -1
  193. package/dist/summary-grid.js +3 -3
  194. package/dist/summary-grid.js.map +1 -1
  195. package/dist/tabs.js +1 -1
  196. package/dist/tag.js +2 -2
  197. package/dist/textarea.js +59 -56
  198. package/dist/textarea.js.map +1 -1
  199. package/dist/timeline.js +226 -173
  200. package/dist/timeline.js.map +1 -1
  201. package/dist/toast.js +1 -1
  202. package/dist/toggle.js +1 -1
  203. package/dist/tutorial.js +7 -7
  204. package/dist/web-types.json +519 -393
  205. package/package.json +3 -3
  206. package/dist/@types/packages/vue2/src/components/modal/components/base-modal/__mocks__/base-modal.vue.d.ts +0 -118
  207. package/dist/assets/error-message.css +0 -1
  208. package/dist/chunks/base-modal.88e7b9d4.js.map +0 -1
  209. package/dist/chunks/calendar.24d0ac04.js +0 -821
  210. package/dist/chunks/calendar.24d0ac04.js.map +0 -1
  211. package/dist/chunks/checkbox.5343e28e.js.map +0 -1
  212. package/dist/chunks/controls-group.2a21bd83.js +0 -87
  213. package/dist/chunks/controls-group.2a21bd83.js.map +0 -1
  214. package/dist/chunks/dropdown.f1253a54.js.map +0 -1
  215. package/dist/chunks/error-message.8302a46c.js +0 -47
  216. package/dist/chunks/error-message.8302a46c.js.map +0 -1
  217. package/dist/chunks/grid-layout.b7e0d964.js.map +0 -1
  218. package/dist/chunks/index.d6b5f5e1.js +0 -112
  219. package/dist/chunks/index.d6b5f5e1.js.map +0 -1
  220. package/dist/chunks/index.e566354f.js +0 -532
  221. package/dist/chunks/index.e566354f.js.map +0 -1
  222. package/dist/chunks/loading-button.c65682d6.js +0 -86
  223. package/dist/chunks/loading-button.c65682d6.js.map +0 -1
@@ -1,821 +0,0 @@
1
- import { defineComponent as ae, computed as h, ref as x, watch as Y, nextTick as _e, toRef as C, reactive as ve } from "vue";
2
- import { r as y, t as _, g as le, e as te, d as ge, f as ye } from "./index.f55fdc32.js";
3
- import { t as T, B as he, a as Ne, f as ie } from "./index.b83f8b7e.js";
4
- import { a as Ee } from "./button.e09d5980.js";
5
- import { B as Te } from "./index.965ac1af.js";
6
- import { u as be } from "./i18n.155748d6.js";
7
- import { g as Me } from "./unique-id.a2a2b458.js";
8
- import { C as Se, a as Oe } from "./chevron-left.c10778d3.js";
9
- import { n as ne } from "./_plugin-vue2_normalizer.71e2aa87.js";
10
- import { a as ke } from "./keyboard-navigation.ca47dfa8.js";
11
- import "../assets/calendar.css";
12
- function W(e, t) {
13
- y(2, arguments);
14
- var a = _(e), n = T(t);
15
- return isNaN(n) ? /* @__PURE__ */ new Date(NaN) : (n && a.setDate(a.getDate() + n), a);
16
- }
17
- function R(e, t) {
18
- y(2, arguments);
19
- var a = _(e), n = T(t);
20
- if (isNaN(n))
21
- return /* @__PURE__ */ new Date(NaN);
22
- if (!n)
23
- return a;
24
- var o = a.getDate(), r = new Date(a.getTime());
25
- r.setMonth(a.getMonth() + n + 1, 0);
26
- var s = r.getDate();
27
- return o >= s ? r : (a.setFullYear(r.getFullYear(), r.getMonth(), o), a);
28
- }
29
- function Ie(e, t) {
30
- y(1, arguments);
31
- var a = t || {}, n = a.locale, o = n && n.options && n.options.weekStartsOn, r = o == null ? 0 : T(o), s = a.weekStartsOn == null ? r : T(a.weekStartsOn);
32
- if (!(s >= 0 && s <= 6))
33
- throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
34
- var i = _(e), D = i.getDay(), l = (D < s ? 7 : 0) + D - s;
35
- return i.setDate(i.getDate() - l), i.setHours(0, 0, 0, 0), i;
36
- }
37
- function w(e) {
38
- y(1, arguments);
39
- var t = _(e);
40
- return t.setHours(0, 0, 0, 0), t;
41
- }
42
- var we = 864e5;
43
- function pe(e, t) {
44
- y(2, arguments);
45
- var a = w(e), n = w(t), o = a.getTime() - le(a), r = n.getTime() - le(n);
46
- return Math.round((o - r) / we);
47
- }
48
- function F(e, t) {
49
- y(2, arguments);
50
- var a = w(e), n = w(t);
51
- return a.getTime() === n.getTime();
52
- }
53
- function ce(e, t) {
54
- var a = e.getFullYear() - t.getFullYear() || e.getMonth() - t.getMonth() || e.getDate() - t.getDate() || e.getHours() - t.getHours() || e.getMinutes() - t.getMinutes() || e.getSeconds() - t.getSeconds() || e.getMilliseconds() - t.getMilliseconds();
55
- return a < 0 ? -1 : a > 0 ? 1 : a;
56
- }
57
- function xe(e, t) {
58
- y(2, arguments);
59
- var a = _(e), n = _(t), o = ce(a, n), r = Math.abs(pe(a, n));
60
- a.setDate(a.getDate() - o * r);
61
- var s = +(ce(a, n) === -o), i = o * (r - s);
62
- return i === 0 ? 0 : i;
63
- }
64
- function Re(e) {
65
- y(1, arguments);
66
- var t = _(e);
67
- return t.setDate(1), t.setHours(0, 0, 0, 0), t;
68
- }
69
- function Pe(e, t) {
70
- y(1, arguments);
71
- var a = t || {}, n = a.locale, o = n && n.options && n.options.weekStartsOn, r = o == null ? 0 : T(o), s = a.weekStartsOn == null ? r : T(a.weekStartsOn);
72
- if (!(s >= 0 && s <= 6))
73
- throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
74
- var i = _(e), D = i.getDay(), l = (D < s ? -7 : 0) + 6 - (D - s);
75
- return i.setDate(i.getDate() + l), i.setHours(23, 59, 59, 999), i;
76
- }
77
- function Ae(e, t) {
78
- y(2, arguments);
79
- var a = T(t);
80
- return W(e, -a);
81
- }
82
- function G(e, t) {
83
- y(2, arguments);
84
- var a = T(t);
85
- return R(e, -a);
86
- }
87
- function Le(e, t) {
88
- y(2, arguments);
89
- var a = _(e), n = _(t);
90
- return a.getTime() > n.getTime();
91
- }
92
- function Ue(e, t) {
93
- y(2, arguments);
94
- var a = _(e), n = _(t);
95
- return a.getTime() < n.getTime();
96
- }
97
- function de(e, t) {
98
- y(2, arguments);
99
- var a = _(e).getTime(), n = _(t.start).getTime(), o = _(t.end).getTime();
100
- if (!(n <= o))
101
- throw new RangeError("Invalid interval");
102
- return a >= n && a <= o;
103
- }
104
- function Ce(e, t, a) {
105
- y(2, arguments);
106
- var n = a || {}, o = n.locale, r = o && o.options && o.options.weekStartsOn, s = r == null ? 0 : T(r), i = n.weekStartsOn == null ? s : T(n.weekStartsOn);
107
- if (!(i >= 0 && i <= 6))
108
- throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
109
- var D = _(e), l = T(t), c = D.getDay(), b = l % 7, f = (b + 7) % 7, m = 7 - i, g = l < 0 || l > 6 ? l - (c + m) % 7 : (f + m) % 7 - (c + m) % 7;
110
- return W(D, g);
111
- }
112
- var N = /* @__PURE__ */ ((e) => (e.SINGLE = "single", e.MIDDLE = "middle", e.BEGINNING = "beginning", e.END = "end", e))(N || {}), I = /* @__PURE__ */ ((e) => (e.SINGLE = "single", e.MIDDLE = "middle", e.BEGINNING = "beginning", e.END = "end", e.SELECTED = "selected", e.UNSELECTED = "unselected", e.CURRENT_DAY = "current-day", e.DISABLED = "disabled", e))(I || {}), L = /* @__PURE__ */ ((e) => (e.CLICK = "click", e.MOUSE_OVER = "mouseover", e))(L || {});
113
- const Ye = ae({
114
- name: "calendar-month-day",
115
- components: { BentoDate: he },
116
- inheritAttrs: !0,
117
- props: {
118
- /**
119
- * Date to be displayed as the calendar day. From 1st to 31st (or end of the month defined in the date)
120
- */
121
- day: { type: Date, required: !0 },
122
- /**
123
- * Indicate if a date should be disabled or not
124
- */
125
- disabled: { type: Boolean, default: !1 },
126
- /**
127
- * Changes the state of the calendar day to selected.
128
- */
129
- selected: { type: Boolean, default: !1 },
130
- /**
131
- * When the day is selected, this indicates if the selection is a single date or part of a range.
132
- * If it's a range it can be at the beginning, middle or end of the selection.
133
- */
134
- variant: {
135
- type: String,
136
- default: N.SINGLE,
137
- validator: (e) => Object.values(N).includes(e)
138
- }
139
- },
140
- emits: [L.CLICK, L.MOUSE_OVER],
141
- setup(e, { emit: t }) {
142
- const a = h(() => {
143
- const r = /* @__PURE__ */ new Date();
144
- return e.day.getDate() === r.getDate() && e.day.getMonth() === r.getMonth() && e.day.getFullYear() === r.getFullYear();
145
- });
146
- return {
147
- // Values
148
- conditionalClasses: h(() => ({
149
- // Variants
150
- [`b-calendar-month-day--${I.BEGINNING}`]: e.variant === N.BEGINNING,
151
- [`b-calendar-month-day--${I.MIDDLE}`]: e.variant === N.MIDDLE,
152
- [`b-calendar-month-day--${I.END}`]: e.variant === N.END,
153
- [`b-calendar-month-day--${I.SINGLE}`]: e.variant === N.SINGLE,
154
- // Selected
155
- [`b-calendar-month-day--${I.UNSELECTED}`]: !e.selected,
156
- [`b-calendar-month-day--${I.SELECTED}`]: e.selected,
157
- // Current Day
158
- [`b-calendar-month-day--${I.CURRENT_DAY}`]: a.value,
159
- // Disabled
160
- [`b-calendar-month-day--${I.DISABLED}`]: e.disabled
161
- })),
162
- // Enums
163
- BentoDateFormat: Ne,
164
- CalendarMonthDayEvent: L,
165
- // Events
166
- onClick: (r, s) => {
167
- e.disabled ? (r.preventDefault(), r.stopPropagation()) : t(L.CLICK, s, e.day);
168
- }
169
- };
170
- }
171
- });
172
- var We = function() {
173
- var t = this, a = t._self._c;
174
- return t._self._setupProxy, a("td", { staticClass: "b-calendar-month-day", class: t.conditionalClasses, attrs: { tabindex: t.selected ? "0" : "-1", "aria-selected": t.selected ? t.selected : void 0 }, on: { click: (n) => t.onClick(n, t.day), mouseover: function(n) {
175
- return t.$emit(t.CalendarMonthDayEvent.MOUSE_OVER);
176
- }, keydown: function(n) {
177
- return !n.type.indexOf("key") && t._k(n.keyCode, "space", 32, n.key, [" ", "Spacebar"]) && t._k(n.keyCode, "enter", 13, n.key, "Enter") ? null : ((o) => t.onClick(o, t.day)).apply(null, arguments);
178
- } } }, [a("div", { staticClass: "b-calendar-month-day__wrapper" }, [a("bento-date", { staticClass: "b-calendar-month-day__label", attrs: { date: t.day, format: t.BentoDateFormat.DAY_OF_MONTH } })], 1)]);
179
- }, $e = [], Be = /* @__PURE__ */ ne(
180
- Ye,
181
- We,
182
- $e,
183
- !1,
184
- null,
185
- "404de012",
186
- null,
187
- null
188
- );
189
- const Fe = Be.exports;
190
- var O = /* @__PURE__ */ ((e) => (e.INPUT = "input", e.MOUSE_OVER = "mouseover", e.NEXT_MONTH = "nextMonth", e.PREVIOUS_MONTH = "previousMonth", e))(O || {}), E = /* @__PURE__ */ ((e) => (e.FIRST = "first", e.LAST = "last", e.MIDDLE = "middle", e.UNIQUE = "unique", e))(E || {}), U = /* @__PURE__ */ ((e) => (e[e.MONDAY = 1] = "MONDAY", e[e.SATURDAY = 6] = "SATURDAY", e[e.SUNDAY = 0] = "SUNDAY", e))(U || {});
191
- function Ge(e) {
192
- return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
193
- }
194
- var H = {}, He = {
195
- get exports() {
196
- return H;
197
- },
198
- set exports(e) {
199
- H = e;
200
- }
201
- }, $ = {}, Ve = {
202
- get exports() {
203
- return $;
204
- },
205
- set exports(e) {
206
- $ = e;
207
- }
208
- };
209
- (function(e, t) {
210
- Object.defineProperty(t, "__esModule", {
211
- value: !0
212
- }), t.default = a;
213
- function a(n) {
214
- if (n === null || n === !0 || n === !1)
215
- return NaN;
216
- var o = Number(n);
217
- return isNaN(o) ? o : o < 0 ? Math.ceil(o) : Math.floor(o);
218
- }
219
- e.exports = t.default;
220
- })(Ve, $);
221
- var V = {}, je = {
222
- get exports() {
223
- return V;
224
- },
225
- set exports(e) {
226
- V = e;
227
- }
228
- }, j = {}, qe = {
229
- get exports() {
230
- return j;
231
- },
232
- set exports(e) {
233
- j = e;
234
- }
235
- }, P = {}, Qe = {
236
- get exports() {
237
- return P;
238
- },
239
- set exports(e) {
240
- P = e;
241
- }
242
- };
243
- (function(e, t) {
244
- Object.defineProperty(t, "__esModule", {
245
- value: !0
246
- }), t.default = a;
247
- function a(n, o) {
248
- if (o.length < n)
249
- throw new TypeError(n + " argument" + (n > 1 ? "s" : "") + " required, but only " + o.length + " present");
250
- }
251
- e.exports = t.default;
252
- })(Qe, P);
253
- (function(e, t) {
254
- Object.defineProperty(t, "__esModule", {
255
- value: !0
256
- }), t.default = o;
257
- var a = n(P);
258
- function n(r) {
259
- return r && r.__esModule ? r : { default: r };
260
- }
261
- function o(r) {
262
- (0, a.default)(1, arguments);
263
- var s = Object.prototype.toString.call(r);
264
- return r instanceof Date || typeof r == "object" && s === "[object Date]" ? new Date(r.getTime()) : typeof r == "number" || s === "[object Number]" ? new Date(r) : ((typeof r == "string" || s === "[object String]") && typeof console < "u" && (console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule"), console.warn(new Error().stack)), /* @__PURE__ */ new Date(NaN));
265
- }
266
- e.exports = t.default;
267
- })(qe, j);
268
- (function(e, t) {
269
- Object.defineProperty(t, "__esModule", {
270
- value: !0
271
- }), t.default = s;
272
- var a = r($), n = r(j), o = r(P);
273
- function r(i) {
274
- return i && i.__esModule ? i : { default: i };
275
- }
276
- function s(i, D) {
277
- (0, o.default)(2, arguments);
278
- var l = (0, n.default)(i), c = (0, a.default)(D);
279
- return isNaN(c) ? /* @__PURE__ */ new Date(NaN) : (c && l.setDate(l.getDate() + c), l);
280
- }
281
- e.exports = t.default;
282
- })(je, V);
283
- (function(e, t) {
284
- Object.defineProperty(t, "__esModule", {
285
- value: !0
286
- }), t.default = s;
287
- var a = r($), n = r(V), o = r(P);
288
- function r(i) {
289
- return i && i.__esModule ? i : { default: i };
290
- }
291
- function s(i, D) {
292
- (0, o.default)(2, arguments);
293
- var l = (0, a.default)(D);
294
- return (0, n.default)(i, -l);
295
- }
296
- e.exports = t.default;
297
- })(He, H);
298
- const fe = /* @__PURE__ */ Ge(H), Ke = ({ currentSelectedDate: e, month: t, isDateDisabled: a, firstDayOfWeek: n }, o) => {
299
- const r = x(new Date(t.value));
300
- Y(
301
- t,
302
- () => {
303
- r.value = t.value;
304
- },
305
- { immediate: !0 }
306
- );
307
- const s = x(new Date(e.value));
308
- Y(e, () => {
309
- s.value = e.value;
310
- });
311
- const i = x({}), D = (u) => (d) => {
312
- i.value[u.toDateString()] = d;
313
- }, l = () => {
314
- i.value = {};
315
- }, c = (u = 1) => {
316
- r.value = R(r.value, u), o(O.NEXT_MONTH, u), l();
317
- }, b = (u = 1) => {
318
- r.value = G(r.value, u), o(O.PREVIOUS_MONTH, u), l();
319
- }, f = (u) => {
320
- const d = !!i.value[u == null ? void 0 : u.toDateString()];
321
- u && d && i.value[u.toDateString()].$el.focus();
322
- }, m = (u) => {
323
- u.preventDefault(), u.stopImmediatePropagation(), u.stopPropagation();
324
- }, g = ({ nextDate: u, isIncreasingDays: d, amountOfMonths: M, isCalendarButtonsNav: B }) => {
325
- if (!B && a && a(u))
326
- return;
327
- u.getMonth() === s.value.getMonth() && u.getFullYear() === s.value.getFullYear() ? (s.value = u, f(u)) : (d ? c(M) : b(M), _e(() => {
328
- const ee = u.getMonth() === r.value.getMonth() && u.getFullYear() === r.value.getFullYear();
329
- a && a(u) || !ee || B || (s.value = u, f(u));
330
- }));
331
- };
332
- return {
333
- // Calendar days ref
334
- calendarRef: i,
335
- addDayRef: D,
336
- /**
337
- * Month navigation
338
- */
339
- showNextMonth: c,
340
- showPreviousMonth: b,
341
- /**
342
- * Focus method
343
- */
344
- focusOnDate: f,
345
- /**
346
- * Day navigation
347
- */
348
- // ArrowRight
349
- moveToNextDay: (u) => {
350
- m(u);
351
- const d = 1;
352
- g({ nextDate: W(s.value, d), isIncreasingDays: !0 });
353
- },
354
- // ArrowLeft
355
- moveToPreviousDay: (u) => {
356
- m(u);
357
- const d = 1;
358
- g({ nextDate: fe(s.value, d), isIncreasingDays: !1 });
359
- },
360
- // ArrowUp
361
- moveToPreviousWeek: (u) => {
362
- m(u);
363
- const d = 7;
364
- g({ nextDate: fe(s.value, d), isIncreasingDays: !1 });
365
- },
366
- // ArrowDown
367
- moveToNextWeek: (u) => {
368
- m(u);
369
- const d = 7;
370
- g({ nextDate: W(s.value, d), isIncreasingDays: !0 });
371
- },
372
- // Home
373
- moveToFirstDayOfWeek: (u) => {
374
- m(u), g({
375
- nextDate: Ie(s.value, { weekStartsOn: n }),
376
- isIncreasingDays: !1
377
- });
378
- },
379
- // End
380
- moveToLastDayOfWeek: (u) => {
381
- m(u), g({
382
- nextDate: Pe(s.value, { weekStartsOn: n }),
383
- isIncreasingDays: !0
384
- });
385
- },
386
- // PageUp
387
- moveToPreviousMonth: (u, d = !1) => {
388
- m(u);
389
- const M = 1;
390
- g({
391
- nextDate: G(s.value, M),
392
- isIncreasingDays: !1,
393
- amountOfMonths: M,
394
- isCalendarButtonsNav: d
395
- });
396
- },
397
- // Shift+PageUp
398
- moveToPreviousYear: (u) => {
399
- m(u);
400
- const d = 12;
401
- g({
402
- nextDate: G(s.value, d),
403
- isIncreasingDays: !1,
404
- amountOfMonths: d
405
- });
406
- },
407
- // PageDown
408
- moveToNextMonth: (u, d = !1) => {
409
- m(u);
410
- const M = 1;
411
- g({
412
- nextDate: R(s.value, M),
413
- isIncreasingDays: !0,
414
- amountOfMonths: M,
415
- isCalendarButtonsNav: d
416
- });
417
- },
418
- // Shift-PageDown
419
- moveToNextYear: (u) => {
420
- m(u);
421
- const d = 12;
422
- g({
423
- nextDate: R(s.value, d),
424
- isIncreasingDays: !0,
425
- amountOfMonths: d
426
- });
427
- },
428
- // Values
429
- internalDate: s,
430
- baseDate: r
431
- };
432
- }, Xe = {
433
- "en-US": {
434
- nextMonth: "Next month",
435
- previousMonth: "Previous month"
436
- }
437
- }, ze = ae({
438
- i18n: { messages: Xe },
439
- name: "calendar-month",
440
- components: {
441
- BentoButton: Ee,
442
- BentoTypography: Te,
443
- CalendarMonthDay: Fe,
444
- ChevronLeftIcon: Se,
445
- ChevronRightIcon: Oe
446
- },
447
- directives: { BentoKeyboardNavigationDirective: ke },
448
- props: {
449
- /**
450
- * end of the selected range
451
- */
452
- endDate: { type: Date, default: null },
453
- /**
454
- * Allows you to set the first day of the week. 0 is sunday, 1 is monday, 6 is saturday
455
- */
456
- firstDayOfWeek: {
457
- type: Number,
458
- default: U.MONDAY,
459
- validator: (e) => Object.values(U).includes(e)
460
- },
461
- /**
462
- * Indicate if a date should be disabled or not
463
- */
464
- isDateDisabled: { type: Function, default: void 0 },
465
- /**
466
- * Indicates if the calendar is part of a range date picker or a sigle date picker
467
- */
468
- isRange: { type: Boolean, default: !1 },
469
- /**
470
- * Sets a minimum limit for selectable dates - dates before `min` will not be selectable
471
- */
472
- min: { type: Date, default: null },
473
- /**
474
- * Sets a maximum limit for selectable dates - dates after `max` will not be selectable
475
- */
476
- max: { type: Date, default: null },
477
- /**
478
- * Month of the year to be displayed in the calendar
479
- */
480
- month: { type: Date, required: !0 },
481
- /**
482
- * When rendering multiple calendars, this property allows to render the
483
- * Next and Previous calendar buttons to the right, left or not at all
484
- * depending on the position: Unique (only 1), First, Middle or Last
485
- */
486
- position: {
487
- type: String,
488
- default: E.UNIQUE,
489
- validator: (e) => Object.values(E).includes(e)
490
- },
491
- /**
492
- * start of the selected range
493
- */
494
- startDate: { type: Date, default: null }
495
- // can be undefined, eslint complains without default
496
- },
497
- emits: [
498
- O.INPUT,
499
- O.NEXT_MONTH,
500
- O.PREVIOUS_MONTH,
501
- O.MOUSE_OVER
502
- ],
503
- setup(e, { emit: t }) {
504
- const { locale: a } = be(), n = { de: ge, enUS: te, fr: ye }, o = Me("bento-date-picker-month-label"), r = h(
505
- () => (v) => {
506
- var S;
507
- return e.min && v <= e.min || e.max && v >= e.max || ((S = e.isDateDisabled) == null ? void 0 : S.call(e, v));
508
- }
509
- ), {
510
- internalDate: s,
511
- baseDate: i,
512
- // Calendar refs
513
- addDayRef: D,
514
- // Month navigation
515
- showNextMonth: l,
516
- showPreviousMonth: c,
517
- // Day navigation
518
- moveToNextDay: b,
519
- moveToPreviousDay: f,
520
- moveToPreviousWeek: m,
521
- moveToNextWeek: g,
522
- moveToFirstDayOfWeek: q,
523
- moveToLastDayOfWeek: Q,
524
- moveToPreviousMonth: K,
525
- moveToPreviousYear: X,
526
- moveToNextMonth: z,
527
- moveToNextYear: J,
528
- focusOnDate: re
529
- } = Ke(
530
- {
531
- currentSelectedDate: C(e, "startDate"),
532
- month: C(e, "month"),
533
- isDateDisabled: r.value,
534
- firstDayOfWeek: e.firstDayOfWeek
535
- },
536
- t
537
- ), Z = h(
538
- () => Object.values(U).includes(e.firstDayOfWeek) ? e.firstDayOfWeek : U.MONDAY
539
- ), oe = h(
540
- () => [E.FIRST, E.UNIQUE].includes(e.position)
541
- ), se = h(
542
- () => [E.LAST, E.UNIQUE].includes(e.position)
543
- ), u = h(
544
- () => ie(i.value, "MMMM yyyy", {
545
- locale: n[a.value.substring(0, 2)] || te
546
- })
547
- ), d = h(
548
- () => new Array(7).fill(/* @__PURE__ */ new Date()).map((v, S) => {
549
- const A = Ce(v, Z.value + S);
550
- return ie(A, "EEE", {
551
- locale: n[a.value.substring(0, 2)] || te
552
- });
553
- })
554
- ), M = h(() => {
555
- const v = [], S = Re(e.month);
556
- let A = v[v.push([]) - 1];
557
- for (; S.getMonth() === e.month.getMonth(); )
558
- S.getDay() - Z.value === 0 && A.length > 0 && (A = v[v.push([]) - 1]), A.push(w(S)), S.setDate(S.getDate() + 1);
559
- return v;
560
- }), B = (v) => {
561
- t(O.INPUT, v);
562
- }, ue = (v) => {
563
- if (!e.isRange || F(e.startDate, e.endDate))
564
- return N.SINGLE;
565
- if (e.startDate && F(e.startDate, v))
566
- return N.BEGINNING;
567
- if (e.endDate && F(e.endDate, v))
568
- return N.END;
569
- if (e.startDate && e.endDate && de(v, { start: e.startDate, end: e.endDate }))
570
- return N.MIDDLE;
571
- }, ee = (v) => s.value && F(s.value, v) ? !0 : e.startDate && e.endDate && de(v, { start: e.startDate, end: e.endDate }), De = () => {
572
- t(O.INPUT, s);
573
- }, me = e.isRange ? {} : {
574
- "keydown:arrow-right": b,
575
- "keydown:arrow-left": f,
576
- "keydown:arrow-up": m,
577
- "keydown:arrow-down": g,
578
- "keydown:home": q,
579
- "keydown:end": Q,
580
- "keydown:page-up": K,
581
- "keydown:shift-page-up": X,
582
- "keydown:page-down": z,
583
- "keydown:shift-page-down": J
584
- };
585
- return {
586
- // Refs
587
- addDayRef: D,
588
- // Values
589
- computedIsDateDisabled: r,
590
- daysOfWeek: d,
591
- weeksOfMonth: M,
592
- formattedMonthDate: u,
593
- shouldShowNextMonthButton: se,
594
- shouldShowPreviousMonthButton: oe,
595
- monthLabelId: o,
596
- // Enums
597
- CalendarMonthEvent: O,
598
- // Functions
599
- isSelectedDate: ee,
600
- showNextMonth: l,
601
- showPreviousMonth: c,
602
- dayVariant: ue,
603
- confirmNavigationDate: De,
604
- // Events
605
- onDayClicked: B,
606
- listeners: me,
607
- // Exposed methods
608
- focusOnDate: re,
609
- moveToNextDay: b,
610
- moveToPreviousDay: f,
611
- moveToPreviousWeek: m,
612
- moveToNextWeek: g,
613
- moveToFirstDayOfWeek: q,
614
- moveToLastDayOfWeek: Q,
615
- moveToPreviousMonth: K,
616
- moveToPreviousYear: X,
617
- moveToNextMonth: z,
618
- moveToNextYear: J
619
- };
620
- }
621
- });
622
- var Je = function() {
623
- var t = this, a = t._self._c;
624
- return t._self._setupProxy, a("div", t._g({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], staticClass: "b-calendar-month" }, t.listeners), [a("div", { staticClass: "b-calendar-month__month-selector" }, [a("div", { staticClass: "b-calendar-month__previous" }, [t.shouldShowPreviousMonthButton ? a("bento-button", { attrs: { variant: "tertiary" }, on: { click: function(n) {
625
- return t.moveToPreviousMonth(n, !0);
626
- } }, scopedSlots: t._u([{ key: "iconLeft", fn: function() {
627
- return [a("chevron-left-icon", { attrs: { "svg-title": t.$t("previousMonth") } })];
628
- }, proxy: !0 }], null, !1, 351640624) }) : t._e()], 1), a("bento-typography", { attrs: { id: t.monthLabelId, el: "h2", variant: "title", "aria-live": "polite" } }, [t._v(" " + t._s(t.formattedMonthDate) + " ")]), a("div", { staticClass: "b-calendar-month__next" }, [t.shouldShowNextMonthButton ? a("bento-button", { attrs: { variant: "tertiary" }, on: { click: function(n) {
629
- return t.moveToNextMonth(n, !0);
630
- } }, scopedSlots: t._u([{ key: "iconLeft", fn: function() {
631
- return [a("chevron-right-icon", { attrs: { "svg-title": t.$t("nextMonth") } })];
632
- }, proxy: !0 }], null, !1, 1260976669) }) : t._e()], 1)], 1), a("table", { staticClass: "b-calendar-month__month-container", attrs: { role: "grid", "aria-labelledby": t.monthLabelId } }, [a("thead", [a("tr", { staticClass: "b-calendar-month__week-header" }, t._l(t.daysOfWeek, function(n, o) {
633
- return a("th", { key: o, staticClass: "b-calendar-month__day-of-week" }, [a("bento-typography", { staticClass: "b-calendar-month__day-of-week-font", attrs: { el: "span", variant: "caption" } }, [t._v(" " + t._s(n) + " ")])], 1);
634
- }), 0)]), a("tbody", t._l(t.weeksOfMonth, function(n, o) {
635
- return a("tr", { key: o }, [o === 0 && n.length < 7 ? a("td", { attrs: { colspan: 7 - n.length } }) : t._e(), t._l(n, function(r, s) {
636
- return a("calendar-month-day", { key: `calendar-day-${s}`, ref: t.addDayRef(r), refInFor: !0, attrs: { day: r, disabled: t.computedIsDateDisabled(r), selected: t.isSelectedDate(r), variant: t.dayVariant(r) }, on: { click: t.onDayClicked, mouseover: function(i) {
637
- return t.$emit(t.CalendarMonthEvent.MOUSE_OVER, r);
638
- } } });
639
- })], 2);
640
- }), 0)])]);
641
- }, Ze = [], et = /* @__PURE__ */ ne(
642
- ze,
643
- Je,
644
- Ze,
645
- !1,
646
- null,
647
- "21532a5b",
648
- null,
649
- null
650
- );
651
- const p = et.exports;
652
- var k = /* @__PURE__ */ ((e) => (e.INPUT = "input", e.START_DATE_SELECTED = "start-date-selected", e.END_DATE_SELECTED = "end-date-selected", e))(k || {});
653
- const tt = ({ selectedDate: e }, t) => {
654
- const a = ve({
655
- startDate: null,
656
- endDate: null
657
- });
658
- return Y(
659
- () => e.value,
660
- () => {
661
- a.startDate = e.value, a.endDate = void 0;
662
- },
663
- { immediate: !0 }
664
- ), {
665
- internalValue: a,
666
- onDateInput: (o) => {
667
- t(k.INPUT, o);
668
- },
669
- // Empty function to prevent the listeners from throwing a warning
670
- // eslint-disable-next-line @typescript-eslint/no-empty-function
671
- onMouseOver: () => {
672
- }
673
- };
674
- }, at = ({ selectedDate: e, isDateDisabled: t, maxRange: a }, n) => {
675
- const o = ve({
676
- startDate: null,
677
- endDate: null
678
- }), r = x(null);
679
- Y(
680
- () => e.value,
681
- () => {
682
- let { startDate: l = null, endDate: c = null } = e.value || {};
683
- l && (l = w(l)), c && (c = w(c)), !(l && t && t(l) || c && t && t(c) || l && c && Le(l, c)) && (o.startDate = l, o.endDate = c);
684
- },
685
- { immediate: !0 }
686
- );
687
- const s = (l, c, b) => {
688
- if (o.startDate = l, o.endDate = c, a.value) {
689
- const f = xe(c, l) - a.value;
690
- f > 0 && (b < 1 ? (o.startDate = l, o.endDate = Ae(c, f)) : (o.startDate = W(l, f), o.endDate = c));
691
- }
692
- n(k.START_DATE_SELECTED, o.startDate), n(k.END_DATE_SELECTED, o.endDate);
693
- };
694
- return {
695
- internalValue: o,
696
- onDateInput: (l) => {
697
- r.value ? (r.value = null, n(k.INPUT, o)) : (r.value = l, n(k.START_DATE_SELECTED, l), n(k.END_DATE_SELECTED, l));
698
- },
699
- onMouseOver: (l) => {
700
- !r.value || t && t(l) || (Ue(l, r.value) ? s(l, r.value, -1) : s(r.value, l, 1));
701
- }
702
- };
703
- }, nt = ae({
704
- name: "calendar",
705
- components: { CalendarMonth: p },
706
- props: {
707
- /**
708
- * Allows you to set the first day of the week. 0 is sunday, 1 is monday, 6 is saturday
709
- */
710
- firstDayOfWeek: p.props.firstDayOfWeek,
711
- /**
712
- * Indicate if a date should be disabled or not
713
- */
714
- isDateDisabled: p.props.isDateDisabled,
715
- /**
716
- * Enables the Date Range calendar
717
- */
718
- isRange: p.props.isRange,
719
- /**
720
- * Set a maximum number of dates to be selectable by the range.
721
- */
722
- maxRange: { type: Number, default: null, validator: (e) => !e || e > 0 },
723
- /**
724
- * Sets a minimum limit for selectable dates - dates before `min` will not be selectable
725
- */
726
- min: p.props.min,
727
- /**
728
- * Sets a maximum limit for selectable dates - dates after `max` will not be selectable
729
- */
730
- max: p.props.max,
731
- /**
732
- * Number of months rendered on pane
733
- */
734
- numberOfMonths: {
735
- type: Number,
736
- default: 3,
737
- validator: (e) => e >= 1
738
- },
739
- /**
740
- * Selected date. Can be a single Date or a CalendarRangeDate
741
- * instance that contains startDate and endDate attributes.
742
- */
743
- value: { type: [Date, Object], default: void 0 }
744
- },
745
- emit: [k.INPUT, k.START_DATE_SELECTED, k.END_DATE_SELECTED],
746
- setup(e, { emit: t }) {
747
- const a = x(null), n = x();
748
- Y(
749
- () => e.value,
750
- () => {
751
- var f;
752
- e.isRange ? n.value = ((f = e.value) == null ? void 0 : f.startDate) || /* @__PURE__ */ new Date() : n.value = e.value || /* @__PURE__ */ new Date();
753
- },
754
- { immediate: !0 }
755
- );
756
- const o = h(() => ({
757
- "b-calendar__range": e.isRange
758
- })), {
759
- internalValue: r,
760
- onDateInput: s,
761
- onMouseOver: i
762
- } = e.isRange ? at(
763
- {
764
- selectedDate: C(e, "value"),
765
- isDateDisabled: e.isDateDisabled,
766
- maxRange: C(e, "maxRange")
767
- },
768
- t
769
- ) : tt(
770
- {
771
- selectedDate: C(e, "value")
772
- },
773
- t
774
- ), D = (f) => e.numberOfMonths === 1 ? E.UNIQUE : f === 0 ? E.FIRST : f === e.numberOfMonths - 1 ? E.LAST : E.MIDDLE, l = h(
775
- () => (f) => R(n.value, f)
776
- );
777
- return {
778
- // Refs
779
- calendarRef: a,
780
- // Values
781
- baseDate: n,
782
- conditionalClasses: o,
783
- internalValue: r,
784
- // Methods
785
- calculateOffsetMonth: l,
786
- calendarPosition: D,
787
- // Events
788
- onDateInput: s,
789
- onMouseOver: i,
790
- calculateNextMonths: (f = 1) => {
791
- n.value = R(n.value, f);
792
- },
793
- calculatePreviousMonths: (f = 1) => {
794
- n.value = G(n.value, f);
795
- }
796
- };
797
- }
798
- });
799
- var rt = function() {
800
- var t = this, a = t._self._c;
801
- return t._self._setupProxy, a("div", { staticClass: "b-calendar", class: t.conditionalClasses }, t._l(t.numberOfMonths, function(n, o) {
802
- return a("calendar-month", { key: `calendar-${o}`, ref: t.numberOfMonths === 1 ? "calendarRef" : null, refInFor: !0, attrs: { "first-day-of-week": t.firstDayOfWeek, "is-date-disabled": t.isDateDisabled, month: t.calculateOffsetMonth(o), position: t.calendarPosition(o), min: t.min, max: t.max, "is-range": t.isRange, "start-date": t.internalValue.startDate, "end-date": t.internalValue.endDate }, on: { input: t.onDateInput, mouseover: t.onMouseOver, nextMonth: t.calculateNextMonths, previousMonth: t.calculatePreviousMonths } });
803
- }), 1);
804
- }, ot = [], st = /* @__PURE__ */ ne(
805
- nt,
806
- rt,
807
- ot,
808
- !1,
809
- null,
810
- "ab4d39cf",
811
- null,
812
- null
813
- );
814
- const gt = st.exports;
815
- export {
816
- gt as C,
817
- k as a,
818
- U as b,
819
- F as i
820
- };
821
- //# sourceMappingURL=calendar.24d0ac04.js.map