@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
@@ -1,960 +0,0 @@
1
- import { defineComponent as le, computed as I, ref as j, watch as G, nextTick as Ne, toRef as $, reactive as ie, toRaw as Te } from "vue";
2
- import { r as E, t as S, g as fe, e as oe, d as Ee, f as Se } from "./index.f55fdc32.js";
3
- import { t as O, B as we, a as be, f as ve } from "./index.2e70720a.js";
4
- import { e as De } from "./index.d80206ed.js";
5
- import { a as Me } from "./button.f5739261.js";
6
- import { B as Oe } from "./index.546b27ae.js";
7
- import { u as Ie } from "./i18n.eb5b985b.js";
8
- import { g as pe } from "./unique-id.a2a2b458.js";
9
- import { C as xe, a as Re } from "./chevron-left.5edf02ac.js";
10
- import { n as ce } from "./_plugin-vue2_normalizer.71e2aa87.js";
11
- import { a as Pe } from "./keyboard-navigation.ca47dfa8.js";
12
- import "../assets/calendar.css";
13
- function B(e, t) {
14
- E(2, arguments);
15
- var n = S(e), a = O(t);
16
- return isNaN(a) ? /* @__PURE__ */ new Date(NaN) : (a && n.setDate(n.getDate() + a), n);
17
- }
18
- function W(e, t) {
19
- E(2, arguments);
20
- var n = S(e), a = O(t);
21
- if (isNaN(a))
22
- return /* @__PURE__ */ new Date(NaN);
23
- if (!a)
24
- return n;
25
- var s = n.getDate(), r = new Date(n.getTime());
26
- r.setMonth(n.getMonth() + a + 1, 0);
27
- var l = r.getDate();
28
- return s >= l ? r : (n.setFullYear(r.getFullYear(), r.getMonth(), s), n);
29
- }
30
- function ee(e, t) {
31
- E(1, arguments);
32
- var n = t || {}, a = n.locale, s = a && a.options && a.options.weekStartsOn, r = s == null ? 0 : O(s), l = n.weekStartsOn == null ? r : O(n.weekStartsOn);
33
- if (!(l >= 0 && l <= 6))
34
- throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
35
- var u = S(e), h = u.getDay(), c = (h < l ? 7 : 0) + h - l;
36
- return u.setDate(u.getDate() - c), u.setHours(0, 0, 0, 0), u;
37
- }
38
- function C(e) {
39
- E(1, arguments);
40
- var t = S(e);
41
- return t.setHours(0, 0, 0, 0), t;
42
- }
43
- var Ae = 864e5;
44
- function Le(e, t) {
45
- E(2, arguments);
46
- var n = C(e), a = C(t), s = n.getTime() - fe(n), r = a.getTime() - fe(a);
47
- return Math.round((s - r) / Ae);
48
- }
49
- function he(e, t) {
50
- E(2, arguments);
51
- var n = O(t), a = n * 7;
52
- return B(e, a);
53
- }
54
- function Z(e, t) {
55
- E(2, arguments);
56
- var n = C(e), a = C(t);
57
- return n.getTime() === a.getTime();
58
- }
59
- function me(e, t) {
60
- var n = 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();
61
- return n < 0 ? -1 : n > 0 ? 1 : n;
62
- }
63
- function Ue(e, t) {
64
- E(2, arguments);
65
- var n = S(e), a = S(t), s = me(n, a), r = Math.abs(Le(n, a));
66
- n.setDate(n.getDate() - s * r);
67
- var l = +(me(n, a) === -s), u = s * (r - l);
68
- return u === 0 ? 0 : u;
69
- }
70
- function te(e) {
71
- E(1, arguments);
72
- var t = S(e);
73
- return t.setDate(1), t.setHours(0, 0, 0, 0), t;
74
- }
75
- function ue(e, t) {
76
- E(1, arguments);
77
- var n = t || {}, a = n.locale, s = a && a.options && a.options.weekStartsOn, r = s == null ? 0 : O(s), l = n.weekStartsOn == null ? r : O(n.weekStartsOn);
78
- if (!(l >= 0 && l <= 6))
79
- throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
80
- var u = S(e), h = u.getDay(), c = (h < l ? -7 : 0) + 6 - (h - l);
81
- return u.setDate(u.getDate() + c), u.setHours(23, 59, 59, 999), u;
82
- }
83
- function We(e, t) {
84
- E(2, arguments);
85
- var n = O(t);
86
- return B(e, -n);
87
- }
88
- function X(e, t) {
89
- E(2, arguments);
90
- var n = O(t);
91
- return W(e, -n);
92
- }
93
- function Ce(e, t) {
94
- E(2, arguments);
95
- var n = S(e), a = S(t);
96
- return n.getTime() > a.getTime();
97
- }
98
- function Ye(e, t) {
99
- E(2, arguments);
100
- var n = S(e), a = S(t);
101
- return n.getTime() < a.getTime();
102
- }
103
- function ye(e, t) {
104
- E(2, arguments);
105
- var n = S(e).getTime(), a = S(t.start).getTime(), s = S(t.end).getTime();
106
- if (!(a <= s))
107
- throw new RangeError("Invalid interval");
108
- return n >= a && n <= s;
109
- }
110
- function Fe(e, t, n) {
111
- E(2, arguments);
112
- var a = n || {}, s = a.locale, r = s && s.options && s.options.weekStartsOn, l = r == null ? 0 : O(r), u = a.weekStartsOn == null ? l : O(a.weekStartsOn);
113
- if (!(u >= 0 && u <= 6))
114
- throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
115
- var h = S(e), c = O(t), D = h.getDay(), d = c % 7, i = (d + 7) % 7, k = 7 - u, N = c < 0 || c > 6 ? c - (D + k) % 7 : (i + k) % 7 - (D + k) % 7;
116
- return B(h, N);
117
- }
118
- function $e(e, t) {
119
- E(2, arguments);
120
- var n = O(t);
121
- return he(e, -n);
122
- }
123
- var p = /* @__PURE__ */ ((e) => (e.SINGLE = "single", e.MIDDLE = "middle", e.BEGINNING = "beginning", e.END = "end", e))(p || {}), U = /* @__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))(U || {}), Q = /* @__PURE__ */ ((e) => (e.CLICK = "click", e.MOUSE_OVER = "mouseover", e))(Q || {});
124
- const je = le({
125
- name: "calendar-month-day",
126
- components: { BentoDate: we },
127
- inheritAttrs: !0,
128
- props: {
129
- /**
130
- * Date to be displayed as the calendar day. From 1st to 31st (or end of the month defined in the date)
131
- */
132
- day: { type: Date, required: !0 },
133
- /**
134
- * Indicate if a date should be disabled or not
135
- */
136
- disabled: { type: Boolean, default: !1 },
137
- /**
138
- * Changes the state of the calendar day to selected.
139
- */
140
- selected: { type: Boolean, default: !1 },
141
- /**
142
- * When the day is selected, this indicates if the selection is a single date or part of a range.
143
- * If it's a range it can be at the beginning, middle or end of the selection.
144
- */
145
- variant: {
146
- type: String,
147
- default: p.SINGLE,
148
- validator: (e) => Object.values(p).includes(e)
149
- }
150
- },
151
- emits: [Q.CLICK, Q.MOUSE_OVER],
152
- setup(e, { emit: t }) {
153
- const n = I(() => {
154
- const r = /* @__PURE__ */ new Date();
155
- return e.day.getDate() === r.getDate() && e.day.getMonth() === r.getMonth() && e.day.getFullYear() === r.getFullYear();
156
- });
157
- return {
158
- // Values
159
- conditionalClasses: I(() => ({
160
- // Variants
161
- [`b-calendar-month-day--${U.BEGINNING}`]: e.variant === p.BEGINNING,
162
- [`b-calendar-month-day--${U.MIDDLE}`]: e.variant === p.MIDDLE,
163
- [`b-calendar-month-day--${U.END}`]: e.variant === p.END,
164
- [`b-calendar-month-day--${U.SINGLE}`]: e.variant === p.SINGLE,
165
- // Selected
166
- [`b-calendar-month-day--${U.UNSELECTED}`]: !e.selected,
167
- [`b-calendar-month-day--${U.SELECTED}`]: e.selected,
168
- // Current Day
169
- [`b-calendar-month-day--${U.CURRENT_DAY}`]: n.value,
170
- // Disabled
171
- [`b-calendar-month-day--${U.DISABLED}`]: e.disabled
172
- })),
173
- // Enums
174
- BentoDateFormat: be,
175
- CalendarMonthDayEvent: Q,
176
- // Events
177
- onClick: (r, l) => {
178
- e.disabled ? (r.preventDefault(), r.stopPropagation()) : t(Q.CLICK, l, e.day);
179
- }
180
- };
181
- }
182
- });
183
- var Ge = function() {
184
- var t = this, n = t._self._c;
185
- return t._self._setupProxy, n("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: (a) => t.onClick(a, t.day), mouseover: function(a) {
186
- return t.$emit(t.CalendarMonthDayEvent.MOUSE_OVER);
187
- }, keydown: function(a) {
188
- return !a.type.indexOf("key") && t._k(a.keyCode, "space", 32, a.key, [" ", "Spacebar"]) && t._k(a.keyCode, "enter", 13, a.key, "Enter") ? null : ((s) => t.onClick(s, t.day)).apply(null, arguments);
189
- } } }, [n("div", { staticClass: "b-calendar-month-day__wrapper" }, [n("bento-date", { staticClass: "b-calendar-month-day__label", attrs: { date: t.day, format: t.BentoDateFormat.DAY_OF_MONTH } })], 1)]);
190
- }, Be = [], He = /* @__PURE__ */ ce(
191
- je,
192
- Ge,
193
- Be,
194
- !1,
195
- null,
196
- "404de012",
197
- null,
198
- null
199
- );
200
- const Ve = He.exports;
201
- var A = /* @__PURE__ */ ((e) => (e.INPUT = "input", e.MOUSE_OVER = "mouseover", e.NEXT_MONTH = "nextMonth", e.PREVIOUS_MONTH = "previousMonth", e))(A || {}), x = /* @__PURE__ */ ((e) => (e.FIRST = "first", e.LAST = "last", e.MIDDLE = "middle", e.UNIQUE = "unique", e))(x || {}), K = /* @__PURE__ */ ((e) => (e[e.MONDAY = 1] = "MONDAY", e[e.SATURDAY = 6] = "SATURDAY", e[e.SUNDAY = 0] = "SUNDAY", e))(K || {});
202
- function qe(e) {
203
- return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
204
- }
205
- var ae = {}, Qe = {
206
- get exports() {
207
- return ae;
208
- },
209
- set exports(e) {
210
- ae = e;
211
- }
212
- }, z = {}, Ke = {
213
- get exports() {
214
- return z;
215
- },
216
- set exports(e) {
217
- z = e;
218
- }
219
- };
220
- (function(e, t) {
221
- Object.defineProperty(t, "__esModule", {
222
- value: !0
223
- }), t.default = n;
224
- function n(a) {
225
- if (a === null || a === !0 || a === !1)
226
- return NaN;
227
- var s = Number(a);
228
- return isNaN(s) ? s : s < 0 ? Math.ceil(s) : Math.floor(s);
229
- }
230
- e.exports = t.default;
231
- })(Ke, z);
232
- var ne = {}, Xe = {
233
- get exports() {
234
- return ne;
235
- },
236
- set exports(e) {
237
- ne = e;
238
- }
239
- }, re = {}, ze = {
240
- get exports() {
241
- return re;
242
- },
243
- set exports(e) {
244
- re = e;
245
- }
246
- }, H = {}, Je = {
247
- get exports() {
248
- return H;
249
- },
250
- set exports(e) {
251
- H = e;
252
- }
253
- };
254
- (function(e, t) {
255
- Object.defineProperty(t, "__esModule", {
256
- value: !0
257
- }), t.default = n;
258
- function n(a, s) {
259
- if (s.length < a)
260
- throw new TypeError(a + " argument" + (a > 1 ? "s" : "") + " required, but only " + s.length + " present");
261
- }
262
- e.exports = t.default;
263
- })(Je, H);
264
- (function(e, t) {
265
- Object.defineProperty(t, "__esModule", {
266
- value: !0
267
- }), t.default = s;
268
- var n = a(H);
269
- function a(r) {
270
- return r && r.__esModule ? r : { default: r };
271
- }
272
- function s(r) {
273
- (0, n.default)(1, arguments);
274
- var l = Object.prototype.toString.call(r);
275
- return r instanceof Date || typeof r == "object" && l === "[object Date]" ? new Date(r.getTime()) : typeof r == "number" || l === "[object Number]" ? new Date(r) : ((typeof r == "string" || l === "[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));
276
- }
277
- e.exports = t.default;
278
- })(ze, re);
279
- (function(e, t) {
280
- Object.defineProperty(t, "__esModule", {
281
- value: !0
282
- }), t.default = l;
283
- var n = r(z), a = r(re), s = r(H);
284
- function r(u) {
285
- return u && u.__esModule ? u : { default: u };
286
- }
287
- function l(u, h) {
288
- (0, s.default)(2, arguments);
289
- var c = (0, a.default)(u), D = (0, n.default)(h);
290
- return isNaN(D) ? /* @__PURE__ */ new Date(NaN) : (D && c.setDate(c.getDate() + D), c);
291
- }
292
- e.exports = t.default;
293
- })(Xe, ne);
294
- (function(e, t) {
295
- Object.defineProperty(t, "__esModule", {
296
- value: !0
297
- }), t.default = l;
298
- var n = r(z), a = r(ne), s = r(H);
299
- function r(u) {
300
- return u && u.__esModule ? u : { default: u };
301
- }
302
- function l(u, h) {
303
- (0, s.default)(2, arguments);
304
- var c = (0, n.default)(h);
305
- return (0, a.default)(u, -c);
306
- }
307
- e.exports = t.default;
308
- })(Qe, ae);
309
- const _e = /* @__PURE__ */ qe(ae), Ze = ({ currentSelectedDate: e, month: t, isDateDisabled: n, firstDayOfWeek: a }, s) => {
310
- const r = j(new Date(t.value));
311
- G(
312
- t,
313
- () => {
314
- r.value = t.value;
315
- },
316
- { immediate: !0 }
317
- );
318
- const l = j(new Date(e.value));
319
- G(e, () => {
320
- l.value = e.value;
321
- });
322
- const u = j({}), h = (o) => (f) => {
323
- u.value[o.toDateString()] = f;
324
- }, c = () => {
325
- u.value = {};
326
- }, D = (o = 1) => {
327
- r.value = W(r.value, o), s(A.NEXT_MONTH, o), c();
328
- }, d = (o = 1) => {
329
- r.value = X(r.value, o), s(A.PREVIOUS_MONTH, o), c();
330
- }, i = (o) => {
331
- const f = !!u.value[o == null ? void 0 : o.toDateString()];
332
- o && f && u.value[o.toDateString()].$el.focus();
333
- }, k = (o) => {
334
- o.preventDefault(), o.stopImmediatePropagation(), o.stopPropagation();
335
- }, N = ({ nextDate: o, isIncreasingDays: f, amountOfMonths: R, isCalendarButtonsNav: J }) => {
336
- if (!J && n && n(o))
337
- return;
338
- o.getMonth() === l.value.getMonth() && o.getFullYear() === l.value.getFullYear() ? (l.value = o, i(o)) : (f ? D(R) : d(R), Ne(() => {
339
- const se = o.getMonth() === r.value.getMonth() && o.getFullYear() === r.value.getFullYear();
340
- n && n(o) || !se || J || (l.value = o, i(o));
341
- }));
342
- };
343
- return {
344
- // Calendar days ref
345
- calendarRef: u,
346
- addDayRef: h,
347
- /**
348
- * Month navigation
349
- */
350
- showNextMonth: D,
351
- showPreviousMonth: d,
352
- /**
353
- * Focus method
354
- */
355
- focusOnDate: i,
356
- /**
357
- * Day navigation
358
- */
359
- // ArrowRight
360
- moveToNextDay: (o) => {
361
- k(o);
362
- const f = 1;
363
- N({ nextDate: B(l.value, f), isIncreasingDays: !0 });
364
- },
365
- // ArrowLeft
366
- moveToPreviousDay: (o) => {
367
- k(o);
368
- const f = 1;
369
- N({ nextDate: _e(l.value, f), isIncreasingDays: !1 });
370
- },
371
- // ArrowUp
372
- moveToPreviousWeek: (o) => {
373
- k(o);
374
- const f = 7;
375
- N({ nextDate: _e(l.value, f), isIncreasingDays: !1 });
376
- },
377
- // ArrowDown
378
- moveToNextWeek: (o) => {
379
- k(o);
380
- const f = 7;
381
- N({ nextDate: B(l.value, f), isIncreasingDays: !0 });
382
- },
383
- // Home
384
- moveToFirstDayOfWeek: (o) => {
385
- k(o), N({
386
- nextDate: ee(l.value, { weekStartsOn: a }),
387
- isIncreasingDays: !1
388
- });
389
- },
390
- // End
391
- moveToLastDayOfWeek: (o) => {
392
- k(o), N({
393
- nextDate: ue(l.value, { weekStartsOn: a }),
394
- isIncreasingDays: !0
395
- });
396
- },
397
- // PageUp
398
- moveToPreviousMonth: (o, f = !1) => {
399
- k(o);
400
- const R = 1;
401
- N({
402
- nextDate: X(l.value, R),
403
- isIncreasingDays: !1,
404
- amountOfMonths: R,
405
- isCalendarButtonsNav: f
406
- });
407
- },
408
- // Shift+PageUp
409
- moveToPreviousYear: (o) => {
410
- k(o);
411
- const f = 12;
412
- N({
413
- nextDate: X(l.value, f),
414
- isIncreasingDays: !1,
415
- amountOfMonths: f
416
- });
417
- },
418
- // PageDown
419
- moveToNextMonth: (o, f = !1) => {
420
- k(o);
421
- const R = 1;
422
- N({
423
- nextDate: W(l.value, R),
424
- isIncreasingDays: !0,
425
- amountOfMonths: R,
426
- isCalendarButtonsNav: f
427
- });
428
- },
429
- // Shift-PageDown
430
- moveToNextYear: (o) => {
431
- k(o);
432
- const f = 12;
433
- N({
434
- nextDate: W(l.value, f),
435
- isIncreasingDays: !0,
436
- amountOfMonths: f
437
- });
438
- },
439
- // Values
440
- internalDate: l,
441
- baseDate: r
442
- };
443
- }, et = {
444
- "en-US": {
445
- nextMonth: "Next month",
446
- previousMonth: "Previous month"
447
- }
448
- }, tt = le({
449
- i18n: { messages: et },
450
- name: "calendar-month",
451
- components: {
452
- BentoButton: Me,
453
- BentoTypography: Oe,
454
- CalendarMonthDay: Ve,
455
- ChevronLeftIcon: xe,
456
- ChevronRightIcon: Re
457
- },
458
- directives: { BentoKeyboardNavigationDirective: Pe },
459
- props: {
460
- /**
461
- * end of the selected range
462
- */
463
- endDate: { type: Date, default: null },
464
- /**
465
- * Allows you to set the first day of the week. 0 is sunday, 1 is monday, 6 is saturday
466
- */
467
- firstDayOfWeek: {
468
- type: Number,
469
- default: K.MONDAY,
470
- validator: (e) => Object.values(K).includes(e)
471
- },
472
- /**
473
- * Indicate if a date should be disabled or not
474
- */
475
- isDateDisabled: { type: Function, default: void 0 },
476
- /**
477
- * Indicates if the calendar is part of a range date picker or a sigle date picker
478
- */
479
- isRange: { type: Boolean, default: !1 },
480
- /**
481
- * Sets a minimum limit for selectable dates - dates before `min` will not be selectable
482
- */
483
- min: { type: Date, default: null },
484
- /**
485
- * Sets a maximum limit for selectable dates - dates after `max` will not be selectable
486
- */
487
- max: { type: Date, default: null },
488
- /**
489
- * Month of the year to be displayed in the calendar
490
- */
491
- month: { type: Date, required: !0 },
492
- /**
493
- * When rendering multiple calendars, this property allows to render the
494
- * Next and Previous calendar buttons to the right, left or not at all
495
- * depending on the position: Unique (only 1), First, Middle or Last
496
- */
497
- position: {
498
- type: String,
499
- default: x.UNIQUE,
500
- validator: (e) => Object.values(x).includes(e)
501
- },
502
- /**
503
- * start of the selected range
504
- */
505
- startDate: { type: Date, default: null }
506
- // can be undefined, eslint complains without default
507
- },
508
- emits: [
509
- A.INPUT,
510
- A.NEXT_MONTH,
511
- A.PREVIOUS_MONTH,
512
- A.MOUSE_OVER
513
- ],
514
- setup(e, { emit: t }) {
515
- const { locale: n } = Ie(), a = { de: Ee, enUS: oe, fr: Se }, s = pe("bento-date-picker-month-label"), r = I(
516
- () => (g) => {
517
- var P;
518
- return e.min && g < e.min || e.max && g > e.max || ((P = e.isDateDisabled) == null ? void 0 : P.call(e, g));
519
- }
520
- ), {
521
- internalDate: l,
522
- baseDate: u,
523
- // Calendar refs
524
- addDayRef: h,
525
- // Month navigation
526
- showNextMonth: c,
527
- showPreviousMonth: D,
528
- // Day navigation
529
- moveToNextDay: d,
530
- moveToPreviousDay: i,
531
- moveToPreviousWeek: k,
532
- moveToNextWeek: N,
533
- moveToFirstDayOfWeek: m,
534
- moveToLastDayOfWeek: w,
535
- moveToPreviousMonth: T,
536
- moveToPreviousYear: Y,
537
- moveToNextMonth: V,
538
- moveToNextYear: v,
539
- focusOnDate: y
540
- } = Ze(
541
- {
542
- currentSelectedDate: $(e, "startDate"),
543
- month: $(e, "month"),
544
- isDateDisabled: r.value,
545
- firstDayOfWeek: e.firstDayOfWeek
546
- },
547
- t
548
- ), b = I(
549
- () => Object.values(K).includes(e.firstDayOfWeek) ? e.firstDayOfWeek : K.MONDAY
550
- ), _ = I(
551
- () => [x.FIRST, x.UNIQUE].includes(e.position)
552
- ), L = I(
553
- () => [x.LAST, x.UNIQUE].includes(e.position)
554
- ), o = I(
555
- () => ve(u.value, "MMMM yyyy", {
556
- locale: a[n.value.substring(0, 2)] || oe
557
- })
558
- ), f = I(
559
- () => new Array(7).fill(/* @__PURE__ */ new Date()).map((g, P) => {
560
- const q = Fe(g, b.value + P);
561
- return ve(q, "EEE", {
562
- locale: a[n.value.substring(0, 2)] || oe
563
- });
564
- })
565
- ), R = I(() => {
566
- const g = [], P = te(e.month);
567
- let q = g[g.push([]) - 1];
568
- for (; P.getMonth() === e.month.getMonth(); )
569
- P.getDay() - b.value === 0 && q.length > 0 && (q = g[g.push([]) - 1]), q.push(C(P)), P.setDate(P.getDate() + 1);
570
- return g;
571
- }), J = (g) => {
572
- t(A.INPUT, g);
573
- }, de = (g) => {
574
- if (!e.isRange || Z(e.startDate, e.endDate))
575
- return p.SINGLE;
576
- if (e.startDate && Z(e.startDate, g))
577
- return p.BEGINNING;
578
- if (e.endDate && Z(e.endDate, g))
579
- return p.END;
580
- if (e.startDate && e.endDate && ye(g, { start: e.startDate, end: e.endDate }))
581
- return p.MIDDLE;
582
- }, se = (g) => l.value && Z(l.value, g) ? !0 : e.startDate && e.endDate && ye(g, { start: e.startDate, end: e.endDate }), ge = () => {
583
- t(A.INPUT, l);
584
- }, ke = e.isRange ? {} : {
585
- "keydown:arrow-right": d,
586
- "keydown:arrow-left": i,
587
- "keydown:arrow-up": k,
588
- "keydown:arrow-down": N,
589
- "keydown:home": m,
590
- "keydown:end": w,
591
- "keydown:page-up": T,
592
- "keydown:shift-page-up": Y,
593
- "keydown:page-down": V,
594
- "keydown:shift-page-down": v
595
- };
596
- return {
597
- // Refs
598
- addDayRef: h,
599
- // Values
600
- computedIsDateDisabled: r,
601
- daysOfWeek: f,
602
- weeksOfMonth: R,
603
- formattedMonthDate: o,
604
- shouldShowNextMonthButton: L,
605
- shouldShowPreviousMonthButton: _,
606
- monthLabelId: s,
607
- // Enums
608
- CalendarMonthEvent: A,
609
- // Functions
610
- isSelectedDate: se,
611
- showNextMonth: c,
612
- showPreviousMonth: D,
613
- dayVariant: de,
614
- confirmNavigationDate: ge,
615
- // Events
616
- onDayClicked: J,
617
- listeners: ke,
618
- // Exposed methods
619
- focusOnDate: y,
620
- moveToNextDay: d,
621
- moveToPreviousDay: i,
622
- moveToPreviousWeek: k,
623
- moveToNextWeek: N,
624
- moveToFirstDayOfWeek: m,
625
- moveToLastDayOfWeek: w,
626
- moveToPreviousMonth: T,
627
- moveToPreviousYear: Y,
628
- moveToNextMonth: V,
629
- moveToNextYear: v
630
- };
631
- }
632
- });
633
- var at = function() {
634
- var t = this, n = t._self._c;
635
- return t._self._setupProxy, n("div", t._g({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], staticClass: "b-calendar-month" }, t.listeners), [n("div", { staticClass: "b-calendar-month__month-selector" }, [n("div", { staticClass: "b-calendar-month__previous" }, [t.shouldShowPreviousMonthButton ? n("bento-button", { attrs: { variant: "tertiary" }, on: { click: function(a) {
636
- return t.moveToPreviousMonth(a, !0);
637
- } }, scopedSlots: t._u([{ key: "iconLeft", fn: function() {
638
- return [n("chevron-left-icon", { attrs: { "svg-title": t.$t("previousMonth") } })];
639
- }, proxy: !0 }], null, !1, 351640624) }) : t._e()], 1), n("bento-typography", { attrs: { id: t.monthLabelId, el: "h2", variant: "title", "aria-live": "polite" } }, [t._v(" " + t._s(t.formattedMonthDate) + " ")]), n("div", { staticClass: "b-calendar-month__next" }, [t.shouldShowNextMonthButton ? n("bento-button", { attrs: { variant: "tertiary" }, on: { click: function(a) {
640
- return t.moveToNextMonth(a, !0);
641
- } }, scopedSlots: t._u([{ key: "iconLeft", fn: function() {
642
- return [n("chevron-right-icon", { attrs: { "svg-title": t.$t("nextMonth") } })];
643
- }, proxy: !0 }], null, !1, 1260976669) }) : t._e()], 1)], 1), n("table", { staticClass: "b-calendar-month__month-container", attrs: { role: "grid", "aria-labelledby": t.monthLabelId } }, [n("thead", [n("tr", { staticClass: "b-calendar-month__week-header" }, t._l(t.daysOfWeek, function(a, s) {
644
- return n("th", { key: s, staticClass: "b-calendar-month__day-of-week" }, [n("bento-typography", { staticClass: "b-calendar-month__day-of-week-font", attrs: { el: "span", variant: "caption" } }, [t._v(" " + t._s(a) + " ")])], 1);
645
- }), 0)]), n("tbody", t._l(t.weeksOfMonth, function(a, s) {
646
- return n("tr", { key: s }, [s === 0 && a.length < 7 ? n("td", { attrs: { colspan: 7 - a.length } }) : t._e(), t._l(a, function(r, l) {
647
- return n("calendar-month-day", { key: `calendar-day-${l}`, 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(u) {
648
- return t.$emit(t.CalendarMonthEvent.MOUSE_OVER, r);
649
- } } });
650
- })], 2);
651
- }), 0)])]);
652
- }, nt = [], rt = /* @__PURE__ */ ce(
653
- tt,
654
- at,
655
- nt,
656
- !1,
657
- null,
658
- "be42e964",
659
- null,
660
- null
661
- );
662
- const F = rt.exports;
663
- var M = /* @__PURE__ */ ((e) => (e.INPUT = "input", e.START_DATE_SELECTED = "start-date-selected", e.END_DATE_SELECTED = "end-date-selected", e))(M || {});
664
- const st = ({ selectedDate: e }, t) => {
665
- const n = ie({
666
- startDate: null,
667
- endDate: null
668
- });
669
- return G(
670
- () => e.value,
671
- () => {
672
- n.startDate = e.value, n.endDate = void 0;
673
- },
674
- { immediate: !0 }
675
- ), {
676
- internalValue: n,
677
- onDateInput: (s) => {
678
- t(M.INPUT, s);
679
- },
680
- // Empty function to prevent the listeners from throwing a warning
681
- // eslint-disable-next-line @typescript-eslint/no-empty-function
682
- onMouseOver: () => {
683
- }
684
- };
685
- }, ot = (e, t, n) => {
686
- const a = (c, D) => {
687
- let d = ee(c, { weekStartsOn: e }), i = ue(D || c, { weekStartsOn: e });
688
- return t && d < t && (d = ee(he(t, 1), { weekStartsOn: e })), n && i > n && (i = ue($e(n, 1), { weekStartsOn: e })), d > i && (d = ee(i)), { startDate: d, endDate: i };
689
- }, s = (c, D) => {
690
- let d = te(c), i = De(D || c);
691
- return t && d < t && (d = te(W(t, 1))), n && i > n && (i = De(X(n, 1))), d > i && (d = te(i)), { startDate: d, endDate: i };
692
- };
693
- return {
694
- adjustDateForWeekly: a,
695
- adjustDateForMonthly: s,
696
- adjustStartDateInputForWeekly: (c, D) => {
697
- const { startDate: d } = a(new Date(c));
698
- return D(d);
699
- },
700
- adjustEndDateInputForWeekly: (c, D) => {
701
- const { endDate: d } = a(new Date(c));
702
- return D(d);
703
- },
704
- adjustStartDateInputForMonthly: (c, D) => {
705
- const { startDate: d } = s(new Date(c));
706
- return D(d);
707
- },
708
- adjustEndDateInputForMonthly: (c, D) => {
709
- const { endDate: d } = s(new Date(c));
710
- return D(d);
711
- }
712
- };
713
- }, ut = () => {
714
- const e = ie({
715
- daily: null,
716
- weekly: null,
717
- monthly: null
718
- });
719
- return {
720
- savedRanges: e,
721
- saveRange: (a, s) => {
722
- e[a] = s;
723
- },
724
- resetSavedRange: (a) => {
725
- e[a] = null;
726
- }
727
- };
728
- }, lt = ({ selectedDate: e, isDateDisabled: t, maxRange: n, granularity: a, firstDayOfWeek: s, min: r, max: l }, u) => {
729
- const { adjustDateForWeekly: D, adjustDateForMonthly: d } = ot(s, r, l), { savedRanges: i, saveRange: k, resetSavedRange: N } = ut(), m = ie({
730
- startDate: null,
731
- endDate: null
732
- }), w = j(null);
733
- G(
734
- () => e.value,
735
- () => {
736
- let { startDate: v = null, endDate: y = null } = e.value || {};
737
- v && (v = C(v)), y && (y = C(y)), !(v && t && t(v) || y && t && t(y) || v && y && Ce(v, y)) && (m.startDate = v, m.endDate = y);
738
- },
739
- { immediate: !0 }
740
- );
741
- const T = (v, y, b) => {
742
- if (m.startDate = v, m.endDate = y, n.value) {
743
- const _ = Ue(y, v) - n.value;
744
- _ > 0 && (b < 1 ? (m.startDate = v, m.endDate = We(y, _)) : (m.startDate = B(v, _), m.endDate = y));
745
- }
746
- u(M.START_DATE_SELECTED, m.startDate), u(M.END_DATE_SELECTED, m.endDate);
747
- }, Y = (v) => {
748
- var y, b, _, L;
749
- if (!(!w.value || t && t(v)))
750
- if (Ye(v, w.value)) {
751
- if (((y = a == null ? void 0 : a.value) == null ? void 0 : y.type) === "weekly") {
752
- const { startDate: o, endDate: f } = D(v, w.value);
753
- T(o, f, -1);
754
- return;
755
- }
756
- if (((b = a == null ? void 0 : a.value) == null ? void 0 : b.type) === "monthly") {
757
- const { startDate: o, endDate: f } = d(v, w.value);
758
- T(o, f, -1);
759
- return;
760
- }
761
- T(v, w.value, -1);
762
- } else {
763
- if (((_ = a == null ? void 0 : a.value) == null ? void 0 : _.type) === "weekly") {
764
- const { startDate: o, endDate: f } = D(w.value, v);
765
- T(o, f, 1);
766
- return;
767
- }
768
- if (((L = a == null ? void 0 : a.value) == null ? void 0 : L.type) === "monthly") {
769
- const { startDate: o, endDate: f } = d(w.value, v);
770
- T(o, f, 1);
771
- return;
772
- }
773
- T(w.value, v, 1);
774
- }
775
- }, V = (v) => {
776
- var y, b;
777
- if (w.value)
778
- w.value = null, u(M.INPUT, m), a.value && N(a.value.type);
779
- else {
780
- let _ = v;
781
- if (((y = a == null ? void 0 : a.value) == null ? void 0 : y.type) === "weekly") {
782
- const { startDate: L, endDate: o } = D(v);
783
- _ = L, T(_, o);
784
- }
785
- if (((b = a == null ? void 0 : a.value) == null ? void 0 : b.type) === "monthly") {
786
- const { startDate: L, endDate: o } = d(v);
787
- _ = L, T(_, o);
788
- }
789
- w.value = _, Y(_), u(M.START_DATE_SELECTED, _), u(M.END_DATE_SELECTED, _);
790
- }
791
- };
792
- return G(a, (v, y) => {
793
- switch (k(y.type, structuredClone(Te(m))), v.type) {
794
- case "monthly": {
795
- if (i.monthly) {
796
- T(i.monthly.startDate, i.monthly.endDate), u(M.INPUT, m);
797
- return;
798
- }
799
- const { startDate: b, endDate: _ } = d(m.startDate, m.endDate);
800
- T(b, _), u(M.INPUT, m);
801
- break;
802
- }
803
- case "weekly": {
804
- if (i.weekly) {
805
- T(i.weekly.startDate, i.weekly.endDate), u(M.INPUT, m);
806
- return;
807
- }
808
- const { startDate: b, endDate: _ } = D(m.startDate, m.endDate);
809
- T(b, _), u(M.INPUT, m);
810
- break;
811
- }
812
- case "daily":
813
- default:
814
- i.daily && T(i.daily.startDate, i.daily.endDate), u(M.INPUT, m);
815
- break;
816
- }
817
- }), {
818
- internalValue: m,
819
- onDateInput: V,
820
- onMouseOver: Y
821
- };
822
- }, it = le({
823
- name: "calendar",
824
- components: { CalendarMonth: F },
825
- props: {
826
- /**
827
- * Allows you to set the first day of the week. 0 is sunday, 1 is monday, 6 is saturday
828
- */
829
- firstDayOfWeek: F.props.firstDayOfWeek,
830
- /**
831
- * The selected granularity configuration
832
- */
833
- granularity: {
834
- type: Object,
835
- default: null
836
- },
837
- /**
838
- * Indicate if a date should be disabled or not
839
- */
840
- isDateDisabled: F.props.isDateDisabled,
841
- /**
842
- * Enables the Date Range calendar
843
- */
844
- isRange: F.props.isRange,
845
- /**
846
- * Set a maximum number of dates to be selectable by the range.
847
- */
848
- maxRange: { type: Number, default: null, validator: (e) => !e || e > 0 },
849
- /**
850
- * Sets a minimum limit for selectable dates - dates before `min` will not be selectable
851
- */
852
- min: F.props.min,
853
- /**
854
- * Sets a maximum limit for selectable dates - dates after `max` will not be selectable
855
- */
856
- max: F.props.max,
857
- /**
858
- * Number of months rendered on pane
859
- */
860
- numberOfMonths: {
861
- type: Number,
862
- default: 3,
863
- validator: (e) => e >= 1
864
- },
865
- /**
866
- * Selected date. Can be a single Date or a CalendarRangeDate
867
- * instance that contains startDate and endDate attributes.
868
- */
869
- value: { type: [Date, Object], default: void 0 }
870
- },
871
- emit: [M.INPUT, M.START_DATE_SELECTED, M.END_DATE_SELECTED],
872
- setup(e, { emit: t }) {
873
- const n = j(null), a = j();
874
- G(
875
- () => e.value,
876
- () => {
877
- var i;
878
- e.isRange ? a.value = ((i = e.value) == null ? void 0 : i.startDate) || /* @__PURE__ */ new Date() : a.value = e.value || /* @__PURE__ */ new Date();
879
- },
880
- { immediate: !0 }
881
- );
882
- const s = I(() => ({
883
- "b-calendar__range": e.isRange
884
- })), {
885
- internalValue: r,
886
- onDateInput: l,
887
- onMouseOver: u
888
- } = e.isRange ? lt(
889
- {
890
- selectedDate: $(e, "value"),
891
- isDateDisabled: e.isDateDisabled,
892
- maxRange: $(e, "maxRange"),
893
- granularity: $(e, "granularity"),
894
- firstDayOfWeek: e.firstDayOfWeek,
895
- min: e.min,
896
- max: e.max
897
- },
898
- t
899
- ) : st(
900
- {
901
- selectedDate: $(e, "value"),
902
- firstDayOfWeek: e.firstDayOfWeek
903
- },
904
- t
905
- ), h = (i) => e.numberOfMonths === 1 ? x.UNIQUE : i === 0 ? x.FIRST : i === e.numberOfMonths - 1 ? x.LAST : x.MIDDLE, c = I(
906
- () => (i) => W(a.value, i)
907
- );
908
- return {
909
- // Refs
910
- calendarRef: n,
911
- // Values
912
- baseDate: a,
913
- conditionalClasses: s,
914
- internalValue: r,
915
- // Methods
916
- calculateOffsetMonth: c,
917
- calendarPosition: h,
918
- // Events
919
- onDateInput: l,
920
- onMouseOver: u,
921
- calculateNextMonths: (i = 1) => {
922
- a.value = W(a.value, i);
923
- },
924
- calculatePreviousMonths: (i = 1) => {
925
- a.value = X(a.value, i);
926
- }
927
- };
928
- }
929
- });
930
- var ct = function() {
931
- var t = this, n = t._self._c;
932
- return t._self._setupProxy, n("div", { staticClass: "b-calendar", class: t.conditionalClasses }, t._l(t.numberOfMonths, function(a, s) {
933
- return n("calendar-month", { key: `calendar-${s}`, ref: t.numberOfMonths === 1 ? "calendarRef" : null, refInFor: !0, attrs: { "first-day-of-week": t.firstDayOfWeek, "is-date-disabled": t.isDateDisabled, month: t.calculateOffsetMonth(s), position: t.calendarPosition(s), min: t.min, max: t.max, "is-range": t.isRange, "start-date": t.internalValue.startDate, "end-date": t.internalValue.endDate, granularity: t.granularity }, on: { input: t.onDateInput, mouseover: t.onMouseOver, nextMonth: t.calculateNextMonths, previousMonth: t.calculatePreviousMonths } });
934
- }), 1);
935
- }, dt = [], ft = /* @__PURE__ */ ce(
936
- it,
937
- ct,
938
- dt,
939
- !1,
940
- null,
941
- "57c97924",
942
- null,
943
- null
944
- );
945
- const St = ft.exports;
946
- export {
947
- St as C,
948
- M as a,
949
- K as b,
950
- ee as c,
951
- B as d,
952
- ue as e,
953
- We as f,
954
- te as g,
955
- W as h,
956
- Z as i,
957
- C as s,
958
- ot as u
959
- };
960
- //# sourceMappingURL=calendar.7a2d1894.js.map