@adyen/bento-vue2 1.65.0 → 1.66.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 (181) hide show
  1. package/dist/@types/index.d.ts +416 -234
  2. package/dist/action-bar.js +1 -1
  3. package/dist/assets/accordion-item.css +1 -1
  4. package/dist/assets/action-bar.css +1 -1
  5. package/dist/assets/base-modal.css +1 -1
  6. package/dist/assets/button-actions-with-menu.css +1 -1
  7. package/dist/assets/card.css +1 -1
  8. package/dist/assets/copy.css +1 -1
  9. package/dist/assets/data-grid-template.css +1 -1
  10. package/dist/assets/data-grid.css +1 -1
  11. package/dist/assets/date.css +1 -1
  12. package/dist/assets/dialog-page.css +1 -1
  13. package/dist/assets/dropdown.css +1 -1
  14. package/dist/assets/file-uploader.css +1 -1
  15. package/dist/assets/filter-bar.css +1 -1
  16. package/dist/assets/header.css +1 -1
  17. package/dist/assets/info-icon.css +1 -1
  18. package/dist/assets/input-field-password.css +1 -1
  19. package/dist/assets/inspector.css +1 -1
  20. package/dist/assets/menu.css +1 -1
  21. package/dist/assets/modal-fullscreen.css +1 -1
  22. package/dist/assets/pagination.css +1 -1
  23. package/dist/assets/popover.css +1 -1
  24. package/dist/assets/sidepanel.css +1 -1
  25. package/dist/assets/step.css +1 -1
  26. package/dist/assets/summary-grid.css +1 -1
  27. package/dist/assets/tab.css +1 -0
  28. package/dist/assets/textarea.css +1 -1
  29. package/dist/assets/use-cached-selected-values.css +1 -1
  30. package/dist/checkbox.js +2 -2
  31. package/dist/chunks/{action-bar.DHdrZtmW.js → action-bar.C8zeHAJG.js} +31 -31
  32. package/dist/chunks/action-bar.C8zeHAJG.js.map +1 -0
  33. package/dist/chunks/button-actions-with-menu.BVU1NS0m.js +83 -0
  34. package/dist/chunks/button-actions-with-menu.BVU1NS0m.js.map +1 -0
  35. package/dist/chunks/calendar.DvIQEYwN.js +2086 -0
  36. package/dist/chunks/calendar.DvIQEYwN.js.map +1 -0
  37. package/dist/chunks/{checkbox-group.DVX0GFm9.js → checkbox-group.BVMGnokj.js} +4 -4
  38. package/dist/chunks/{checkbox-group.DVX0GFm9.js.map → checkbox-group.BVMGnokj.js.map} +1 -1
  39. package/dist/chunks/{checkbox.nHrvoKfp.js → checkbox.Bg5FM5Oa.js} +2 -2
  40. package/dist/chunks/{checkbox.nHrvoKfp.js.map → checkbox.Bg5FM5Oa.js.map} +1 -1
  41. package/dist/chunks/{code-snippet.W8Zp0zQP.js → code-snippet.BcoVTIs2.js} +3 -3
  42. package/dist/chunks/{code-snippet.W8Zp0zQP.js.map → code-snippet.BcoVTIs2.js.map} +1 -1
  43. package/dist/chunks/{controls-group.BWAmz7Tg.js → controls-group.CccuLkgP.js} +2 -2
  44. package/dist/chunks/{controls-group.BWAmz7Tg.js.map → controls-group.CccuLkgP.js.map} +1 -1
  45. package/dist/chunks/copy.CF8Fzu2Y.js +96 -0
  46. package/dist/chunks/copy.CF8Fzu2Y.js.map +1 -0
  47. package/dist/chunks/{dashboard-section.Bz54Z6Hh.js → dashboard-section.CcEIwDqX.js} +3 -3
  48. package/dist/chunks/{dashboard-section.Bz54Z6Hh.js.map → dashboard-section.CcEIwDqX.js.map} +1 -1
  49. package/dist/chunks/{data-grid-template.DtFRjaR8.js → data-grid-template.DJQcVuPs.js} +16 -14
  50. package/dist/chunks/data-grid-template.DJQcVuPs.js.map +1 -0
  51. package/dist/chunks/{data-grid.D4oeTUhn.js → data-grid.t4fCoE2Y.js} +10 -10
  52. package/dist/chunks/{data-grid.D4oeTUhn.js.map → data-grid.t4fCoE2Y.js.map} +1 -1
  53. package/dist/chunks/{date-picker.k0g6anfy.js → date-picker.DOAWsba5.js} +6 -7
  54. package/dist/chunks/{date-picker.k0g6anfy.js.map → date-picker.DOAWsba5.js.map} +1 -1
  55. package/dist/chunks/{date-range-picker.D9lyIoO-.js → date-range-picker.DYxZygbL.js} +22 -23
  56. package/dist/chunks/{date-range-picker.D9lyIoO-.js.map → date-range-picker.DYxZygbL.js.map} +1 -1
  57. package/dist/chunks/date.BfyWX2PY.js +160 -0
  58. package/dist/chunks/date.BfyWX2PY.js.map +1 -0
  59. package/dist/chunks/{dropdown-tag.DKhxBV52.js → dropdown-tag.DYg5l6HT.js} +2 -2
  60. package/dist/chunks/{dropdown-tag.DKhxBV52.js.map → dropdown-tag.DYg5l6HT.js.map} +1 -1
  61. package/dist/chunks/{dropdown.DV7uhHNP.js → dropdown.BWsU98dn.js} +265 -270
  62. package/dist/chunks/{dropdown.DV7uhHNP.js.map → dropdown.BWsU98dn.js.map} +1 -1
  63. package/dist/chunks/{error-message.1Em7Lis3.js → error-message.BgxnwPLF.js} +2 -2
  64. package/dist/chunks/{error-message.1Em7Lis3.js.map → error-message.BgxnwPLF.js.map} +1 -1
  65. package/dist/chunks/es6.n1ewaW31.js.map +1 -1
  66. package/dist/chunks/{file-uploader.DyjdNLOa.js → file-uploader.BPslxGI8.js} +323 -323
  67. package/dist/chunks/file-uploader.BPslxGI8.js.map +1 -0
  68. package/dist/chunks/{filter-bar.BxDEplt3.js → filter-bar.Bx3wivl8.js} +664 -649
  69. package/dist/chunks/{filter-bar.BxDEplt3.js.map → filter-bar.Bx3wivl8.js.map} +1 -1
  70. package/dist/chunks/{get-date-locale.BN8xEjY0.js → get-date-locale.CAyOIbcp.js} +288 -649
  71. package/dist/chunks/get-date-locale.CAyOIbcp.js.map +1 -0
  72. package/dist/chunks/{header-with-views.Ds9mcwmp.js → header-with-views.B6mwBJjk.js} +13 -13
  73. package/dist/chunks/{header-with-views.Ds9mcwmp.js.map → header-with-views.B6mwBJjk.js.map} +1 -1
  74. package/dist/chunks/{header.Cb644uAi.js → header.hTMmMN8n.js} +25 -24
  75. package/dist/chunks/{header.Cb644uAi.js.map → header.hTMmMN8n.js.map} +1 -1
  76. package/dist/chunks/index.BrH1t1iu.js +407 -0
  77. package/dist/chunks/index.BrH1t1iu.js.map +1 -0
  78. package/dist/chunks/info-icon.CYOXx8CL.js +37 -0
  79. package/dist/chunks/info-icon.CYOXx8CL.js.map +1 -0
  80. package/dist/chunks/input-field-password.B8qWGzaB.js +252 -0
  81. package/dist/chunks/input-field-password.B8qWGzaB.js.map +1 -0
  82. package/dist/chunks/{input-field-phone-number.B3qzZKuP.js → input-field-phone-number.Bi4TJhbX.js} +3 -3
  83. package/dist/chunks/{input-field-phone-number.B3qzZKuP.js.map → input-field-phone-number.Bi4TJhbX.js.map} +1 -1
  84. package/dist/chunks/{input-field.B_3nZFYz.js → input-field.L5bWjTpB.js} +3 -3
  85. package/dist/chunks/{input-field.B_3nZFYz.js.map → input-field.L5bWjTpB.js.map} +1 -1
  86. package/dist/chunks/{pagination.Cl7SzoId.js → pagination.CW_1yX5C.js} +115 -115
  87. package/dist/chunks/pagination.CW_1yX5C.js.map +1 -0
  88. package/dist/chunks/{radio-group.CtPG_iiI.js → radio-group.4_KKjvAm.js} +3 -3
  89. package/dist/chunks/{radio-group.CtPG_iiI.js.map → radio-group.4_KKjvAm.js.map} +1 -1
  90. package/dist/chunks/{rich-text-editor.CLxVaskq.js → rich-text-editor.BpaFd2-y.js} +3 -3
  91. package/dist/chunks/{rich-text-editor.CLxVaskq.js.map → rich-text-editor.BpaFd2-y.js.map} +1 -1
  92. package/dist/chunks/{search-bar.CadVBoj0.js → search-bar.5JHI6li0.js} +3 -3
  93. package/dist/chunks/{search-bar.CadVBoj0.js.map → search-bar.5JHI6li0.js.map} +1 -1
  94. package/dist/chunks/{secondary-nav.OwimHNCb.js → secondary-nav.D4hrWvf7.js} +2 -2
  95. package/dist/chunks/{secondary-nav.OwimHNCb.js.map → secondary-nav.D4hrWvf7.js.map} +1 -1
  96. package/dist/chunks/{selection-card-group.CoqBRUT8.js → selection-card-group.0o5T4tab.js} +3 -3
  97. package/dist/chunks/{selection-card-group.CoqBRUT8.js.map → selection-card-group.0o5T4tab.js.map} +1 -1
  98. package/dist/chunks/step.DMMofD4B.js +217 -0
  99. package/dist/chunks/step.DMMofD4B.js.map +1 -0
  100. package/dist/chunks/{structured-list-item.tox2Kcb6.js → structured-list-item.Bnn6-Z3q.js} +3 -3
  101. package/dist/chunks/{structured-list-item.tox2Kcb6.js.map → structured-list-item.Bnn6-Z3q.js.map} +1 -1
  102. package/dist/chunks/summary-grid.types.Cwri2Y3T.js +337 -0
  103. package/dist/chunks/summary-grid.types.Cwri2Y3T.js.map +1 -0
  104. package/dist/chunks/tab.BhWPBxcB.js +192 -0
  105. package/dist/chunks/tab.BhWPBxcB.js.map +1 -0
  106. package/dist/chunks/{tabs.keys.Bc2pSKRw.js → tabs.keys.Cb4Vw5Jh.js} +3 -3
  107. package/dist/chunks/{tabs.keys.Bc2pSKRw.js.map → tabs.keys.Cb4Vw5Jh.js.map} +1 -1
  108. package/dist/chunks/{textarea.BPeDUAPL.js → textarea.RAU710Uw.js} +83 -80
  109. package/dist/chunks/textarea.RAU710Uw.js.map +1 -0
  110. package/dist/chunks/{timeline-item.CS9ZDOsm.js → timeline-item.DK2d00rt.js} +10 -11
  111. package/dist/chunks/timeline-item.DK2d00rt.js.map +1 -0
  112. package/dist/chunks/{use-cached-selected-values.DNOmzQVy.js → use-cached-selected-values.CusB5KBl.js} +568 -528
  113. package/dist/chunks/use-cached-selected-values.CusB5KBl.js.map +1 -0
  114. package/dist/code-snippet.js +1 -1
  115. package/dist/dashboard-template.js +1 -1
  116. package/dist/data-grid-template.js +1 -1
  117. package/dist/data-grid.js +1 -1
  118. package/dist/date-picker.js +2 -2
  119. package/dist/date-range-picker.js +2 -2
  120. package/dist/date.js +1 -1
  121. package/dist/dropdown.js +3 -3
  122. package/dist/file-uploader.js +1 -1
  123. package/dist/filter-bar.js +1 -1
  124. package/dist/header-with-views.js +1 -1
  125. package/dist/header.js +1 -1
  126. package/dist/index.js +34 -34
  127. package/dist/info-icon.js +1 -1
  128. package/dist/input-field-password.js +1 -1
  129. package/dist/input-field-phone-number.js +1 -1
  130. package/dist/input-field.js +1 -1
  131. package/dist/internal.js +6 -6
  132. package/dist/pagination.js +1 -1
  133. package/dist/radio-group.js +1 -1
  134. package/dist/rich-text-editor.js +1 -1
  135. package/dist/search-bar.js +2 -2
  136. package/dist/secondary-nav.js +1 -1
  137. package/dist/selection-card.js +1 -1
  138. package/dist/stepper.js +1 -1
  139. package/dist/structured-list.js +1 -1
  140. package/dist/styles/bento-dark.css +1 -0
  141. package/dist/styles/bento-light.css +1 -0
  142. package/dist/styles/bento.css +1 -0
  143. package/dist/styles/legacy.css +1 -0
  144. package/dist/styles/styleguide.css +1 -0
  145. package/dist/summary-grid.js +1 -1
  146. package/dist/tabs.js +1 -1
  147. package/dist/textarea.js +1 -1
  148. package/dist/timeline.js +1 -1
  149. package/dist/web-types.json +197 -79
  150. package/package.json +5 -5
  151. package/dist/assets/tabs.css +0 -1
  152. package/dist/chunks/action-bar.DHdrZtmW.js.map +0 -1
  153. package/dist/chunks/button-actions-with-menu.CYkEoiee.js +0 -166
  154. package/dist/chunks/button-actions-with-menu.CYkEoiee.js.map +0 -1
  155. package/dist/chunks/calendar.DbTC35rM.js +0 -1167
  156. package/dist/chunks/calendar.DbTC35rM.js.map +0 -1
  157. package/dist/chunks/copy.CXeLbvUP.js +0 -129
  158. package/dist/chunks/copy.CXeLbvUP.js.map +0 -1
  159. package/dist/chunks/data-grid-template.DtFRjaR8.js.map +0 -1
  160. package/dist/chunks/date.dYFFEunA.js +0 -987
  161. package/dist/chunks/date.dYFFEunA.js.map +0 -1
  162. package/dist/chunks/file-uploader.DyjdNLOa.js.map +0 -1
  163. package/dist/chunks/get-date-locale.BN8xEjY0.js.map +0 -1
  164. package/dist/chunks/index.BDuTpjD8.js +0 -40
  165. package/dist/chunks/index.BDuTpjD8.js.map +0 -1
  166. package/dist/chunks/index.DD7TppDb.js +0 -10
  167. package/dist/chunks/index.DD7TppDb.js.map +0 -1
  168. package/dist/chunks/info-icon.B9aTl1nU.js +0 -41
  169. package/dist/chunks/info-icon.B9aTl1nU.js.map +0 -1
  170. package/dist/chunks/input-field-password.Bloa-rqx.js +0 -252
  171. package/dist/chunks/input-field-password.Bloa-rqx.js.map +0 -1
  172. package/dist/chunks/pagination.Cl7SzoId.js.map +0 -1
  173. package/dist/chunks/step.dNTg2rtW.js +0 -217
  174. package/dist/chunks/step.dNTg2rtW.js.map +0 -1
  175. package/dist/chunks/summary-grid.types.CkUIw703.js +0 -301
  176. package/dist/chunks/summary-grid.types.CkUIw703.js.map +0 -1
  177. package/dist/chunks/tabs.Dx6teJGW.js +0 -205
  178. package/dist/chunks/tabs.Dx6teJGW.js.map +0 -1
  179. package/dist/chunks/textarea.BPeDUAPL.js.map +0 -1
  180. package/dist/chunks/timeline-item.CS9ZDOsm.js.map +0 -1
  181. package/dist/chunks/use-cached-selected-values.DNOmzQVy.js.map +0 -1
@@ -1,1167 +0,0 @@
1
- import { defineComponent as te, computed as w, ref as W, watch as K, nextTick as $e, toRef as F, reactive as Te } from "vue";
2
- import { r as k, t as N, a as be, g as We } from "./get-date-locale.BN8xEjY0.js";
3
- import { t as M, B as pe, a as xe, f as Ne } from "./date.dYFFEunA.js";
4
- import { d as ke, a as ie } from "./index.BDuTpjD8.js";
5
- import { B as Le } from "./button.hF-nD1Og.js";
6
- import { B as Re } from "./typography.J1v_SPG3.js";
7
- import { n as ae } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
8
- import { C as Ye, a as Ae } from "./chevron-right.C--ZOC9j.js";
9
- import { g as Ce } from "./generate-uid.NJ8tVoha.js";
10
- import { u as Pe } from "./i18n.BQkEbtPM.js";
11
- import { a as He } from "./index.BdrLbvtJ.js";
12
- import { g as qe } from "./_commonjsHelpers.C6fGbg64.js";
13
- import { a as Fe } from "./keyboard-navigation.pB8weElW.js";
14
- import "../assets/calendar.css";
15
- function ee(e, t) {
16
- k(2, arguments);
17
- var n = N(e), a = M(t);
18
- return isNaN(a) ? /* @__PURE__ */ new Date(NaN) : (a && n.setDate(n.getDate() + a), n);
19
- }
20
- function q(e, t) {
21
- k(2, arguments);
22
- var n = N(e), a = M(t);
23
- if (isNaN(a))
24
- return /* @__PURE__ */ new Date(NaN);
25
- if (!a)
26
- return n;
27
- var r = n.getDate(), o = new Date(n.getTime());
28
- o.setMonth(n.getMonth() + a + 1, 0);
29
- var s = o.getDate();
30
- return r >= s ? o : (n.setFullYear(o.getFullYear(), o.getMonth(), r), n);
31
- }
32
- function oe(e, t) {
33
- k(1, arguments);
34
- var n = t || {}, a = n.locale, r = a && a.options && a.options.weekStartsOn, o = r == null ? 0 : M(r), s = n.weekStartsOn == null ? o : M(n.weekStartsOn);
35
- if (!(s >= 0 && s <= 6))
36
- throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
37
- var u = N(e), y = u.getDay(), g = (y < s ? 7 : 0) + y - s;
38
- return u.setDate(u.getDate() - g), u.setHours(0, 0, 0, 0), u;
39
- }
40
- function V(e) {
41
- k(1, arguments);
42
- var t = N(e);
43
- return t.setHours(0, 0, 0, 0), t;
44
- }
45
- var Ve = 864e5;
46
- function Qe(e, t) {
47
- k(2, arguments);
48
- var n = V(e), a = V(t), r = n.getTime() - be(n), o = a.getTime() - be(a);
49
- return Math.round((r - o) / Ve);
50
- }
51
- function Be(e, t) {
52
- k(2, arguments);
53
- var n = M(t);
54
- return q(e, n * 12);
55
- }
56
- function ne(e, t) {
57
- k(2, arguments);
58
- var n = V(e), a = V(t);
59
- return n.getTime() === a.getTime();
60
- }
61
- function Oe(e, t) {
62
- 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();
63
- return n < 0 ? -1 : n > 0 ? 1 : n;
64
- }
65
- function Ke(e, t) {
66
- k(2, arguments);
67
- var n = N(e), a = N(t), r = Oe(n, a), o = Math.abs(Qe(n, a));
68
- n.setDate(n.getDate() - r * o);
69
- var s = +(Oe(n, a) === -r), u = r * (o - s);
70
- return u === 0 ? 0 : u;
71
- }
72
- function ce(e) {
73
- k(1, arguments);
74
- var t = N(e), n = t.getMonth(), a = n - n % 3;
75
- return t.setMonth(a, 1), t.setHours(0, 0, 0, 0), t;
76
- }
77
- function se(e) {
78
- k(1, arguments);
79
- var t = N(e);
80
- return t.setDate(1), t.setHours(0, 0, 0, 0), t;
81
- }
82
- function Me(e) {
83
- k(1, arguments);
84
- var t = N(e), n = /* @__PURE__ */ new Date(0);
85
- return n.setFullYear(t.getFullYear(), 0, 1), n.setHours(0, 0, 0, 0), n;
86
- }
87
- function ue(e, t) {
88
- k(1, arguments);
89
- var n = t || {}, a = n.locale, r = a && a.options && a.options.weekStartsOn, o = r == null ? 0 : M(r), s = n.weekStartsOn == null ? o : M(n.weekStartsOn);
90
- if (!(s >= 0 && s <= 6))
91
- throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
92
- var u = N(e), y = u.getDay(), g = (y < s ? -7 : 0) + 6 - (y - s);
93
- return u.setDate(u.getDate() + g), u.setHours(23, 59, 59, 999), u;
94
- }
95
- function de(e) {
96
- k(1, arguments);
97
- var t = N(e), n = t.getMonth(), a = n - n % 3 + 3;
98
- return t.setMonth(a, 0), t.setHours(23, 59, 59, 999), t;
99
- }
100
- function Xe(e) {
101
- k(1, arguments);
102
- var t = N(e), n = t.getFullYear(), a = t.getMonth(), r = /* @__PURE__ */ new Date(0);
103
- return r.setFullYear(n, a + 1, 0), r.setHours(0, 0, 0, 0), r.getDate();
104
- }
105
- function ze(e, t) {
106
- k(2, arguments);
107
- var n = M(t);
108
- return ee(e, -n);
109
- }
110
- function Z(e, t) {
111
- k(2, arguments);
112
- var n = M(t);
113
- return q(e, -n);
114
- }
115
- function Je(e, t) {
116
- k(2, arguments);
117
- var n = N(e), a = N(t);
118
- return n.getTime() > a.getTime();
119
- }
120
- function Ze(e, t) {
121
- k(2, arguments);
122
- var n = N(e), a = N(t);
123
- return n.getTime() < a.getTime();
124
- }
125
- function re(e, t) {
126
- k(2, arguments);
127
- var n = N(e), a = N(t);
128
- return n.getFullYear() === a.getFullYear() && n.getMonth() === a.getMonth();
129
- }
130
- function le(e, t) {
131
- k(2, arguments);
132
- var n = N(e).getTime(), a = N(t.start).getTime(), r = N(t.end).getTime();
133
- if (!(a <= r))
134
- throw new RangeError("Invalid interval");
135
- return n >= a && n <= r;
136
- }
137
- function et(e, t) {
138
- k(2, arguments);
139
- var n = N(e), a = M(t), r = n.getFullYear(), o = n.getDate(), s = /* @__PURE__ */ new Date(0);
140
- s.setFullYear(r, a, 15), s.setHours(0, 0, 0, 0);
141
- var u = Xe(s);
142
- return n.setMonth(a, Math.min(o, u)), n;
143
- }
144
- function tt(e, t) {
145
- if (k(2, arguments), typeof t != "object" || t === null)
146
- throw new RangeError("values parameter must be an object");
147
- var n = N(e);
148
- return isNaN(n.getTime()) ? /* @__PURE__ */ new Date(NaN) : (t.year != null && n.setFullYear(t.year), t.month != null && (n = et(n, t.month)), t.date != null && n.setDate(M(t.date)), t.hours != null && n.setHours(M(t.hours)), t.minutes != null && n.setMinutes(M(t.minutes)), t.seconds != null && n.setSeconds(M(t.seconds)), t.milliseconds != null && n.setMilliseconds(M(t.milliseconds)), n);
149
- }
150
- function at(e, t, n) {
151
- k(2, arguments);
152
- var a = {}, r = a.locale, o = r && r.options && r.options.weekStartsOn, s = o == null ? 0 : M(o), u = a.weekStartsOn == null ? s : M(a.weekStartsOn);
153
- if (!(u >= 0 && u <= 6))
154
- throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");
155
- var y = N(e), g = M(t), f = y.getDay(), m = g % 7, v = (m + 7) % 7, d = 7 - u, l = g < 0 || g > 6 ? g - (f + d) % 7 : (v + d) % 7 - (f + d) % 7;
156
- return ee(y, l);
157
- }
158
- function nt(e, t) {
159
- k(2, arguments);
160
- var n = M(t);
161
- return Be(e, -n);
162
- }
163
- var C = /* @__PURE__ */ ((e) => (e.SINGLE = "single", e.MIDDLE = "middle", e.BEGINNING = "beginning", e.END = "end", e))(C || {}), G = /* @__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))(G || {}), J = /* @__PURE__ */ ((e) => (e.CLICK = "click", e.MOUSE_OVER = "mouseover", e))(J || {});
164
- const rt = {
165
- /**
166
- * Date to be displayed as the calendar day. From 1st to 31st (or end of the month defined in the date)
167
- */
168
- day: { type: Date, required: !0 },
169
- /**
170
- * Indicate if a date should be disabled or not
171
- */
172
- disabled: { type: Boolean, default: !1 },
173
- /**
174
- * Changes the state of the calendar day to selected.
175
- */
176
- selected: { type: Boolean, default: !1 },
177
- /**
178
- * When the day is selected, this indicates if the selection is a single date or part of a range.
179
- * If it's a range it can be at the beginning, middle or end of the selection.
180
- */
181
- variant: {
182
- type: String,
183
- default: C.SINGLE,
184
- validator: (e) => Object.values(C).includes(e)
185
- }
186
- }, ot = te({
187
- name: "calendar-month-day",
188
- components: { BentoDate: pe },
189
- inheritAttrs: !0,
190
- props: rt,
191
- emits: [J.CLICK, J.MOUSE_OVER],
192
- setup(e, { emit: t }) {
193
- const n = w(() => {
194
- const o = /* @__PURE__ */ new Date();
195
- return e.day.getDate() === o.getDate() && e.day.getMonth() === o.getMonth() && e.day.getFullYear() === o.getFullYear();
196
- });
197
- return {
198
- // Values
199
- conditionalClasses: w(() => ({
200
- // Variants
201
- [`b-calendar-month-day--${G.BEGINNING}`]: e.variant === C.BEGINNING,
202
- [`b-calendar-month-day--${G.MIDDLE}`]: e.variant === C.MIDDLE,
203
- [`b-calendar-month-day--${G.END}`]: e.variant === C.END,
204
- [`b-calendar-month-day--${G.SINGLE}`]: e.variant === C.SINGLE,
205
- // Selected
206
- [`b-calendar-month-day--${G.UNSELECTED}`]: !e.selected,
207
- [`b-calendar-month-day--${G.SELECTED}`]: e.selected,
208
- // Current Day
209
- [`b-calendar-month-day--${G.CURRENT_DAY}`]: n.value,
210
- // Disabled
211
- [`b-calendar-month-day--${G.DISABLED}`]: e.disabled
212
- })),
213
- isCurrentDay: n,
214
- // Enums
215
- BentoDateFormat: xe,
216
- CalendarMonthDayEvent: J,
217
- // Events
218
- onClick: (o, s) => {
219
- e.disabled ? (o.preventDefault(), o.stopPropagation()) : t(J.CLICK, s, e.day);
220
- }
221
- };
222
- }
223
- });
224
- var st = function() {
225
- var t = this, n = t._self._c;
226
- 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, "aria-disabled": t.disabled, "aria-current": t.isCurrentDay ? "date" : void 0, "data-date": t.day.toDateString() }, on: { click: (a) => t.onClick(a, t.day), mouseover: function(a) {
227
- return t.$emit(t.CalendarMonthDayEvent.MOUSE_OVER);
228
- }, keydown: function(a) {
229
- return !a.type.indexOf("key") && t._k(a.keyCode, "space", 32, a.key, [" ", "Spacebar"]) && t._k(a.keyCode, "enter", 13, a.key, "Enter") ? null : ((r) => t.onClick(r, t.day)).apply(null, arguments);
230
- } } }, [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)]);
231
- }, ut = [], lt = /* @__PURE__ */ ae(
232
- ot,
233
- st,
234
- ut,
235
- !1,
236
- null,
237
- "1ff0b36f"
238
- );
239
- const it = lt.exports;
240
- var A = /* @__PURE__ */ ((e) => (e.INPUT = "input", e.MOUSE_OVER = "mouseover", e.CHANGE_DAY = "changeDay", e.NEXT_MONTH = "nextMonth", e.PREVIOUS_MONTH = "previousMonth", e))(A || {}), H = /* @__PURE__ */ ((e) => (e[e.MONDAY = 1] = "MONDAY", e[e.SATURDAY = 6] = "SATURDAY", e[e.SUNDAY = 0] = "SUNDAY", e))(H || {}), $ = /* @__PURE__ */ ((e) => (e.INPUT = "input", e.START_DATE_SELECTED = "start-date-selected", e.END_DATE_SELECTED = "end-date-selected", e))($ || {}), Q = /* @__PURE__ */ ((e) => (e.FIRST = "first", e.LAST = "last", e.MIDDLE = "middle", e.UNIQUE = "unique", e))(Q || {}), fe = /* @__PURE__ */ ((e) => (e.DAY = "day", e.MONTH = "month", e))(fe || {}), ve = { exports: {} }, De = { exports: {} };
241
- (function(e, t) {
242
- Object.defineProperty(t, "__esModule", {
243
- value: !0
244
- }), t.default = n;
245
- function n(a) {
246
- if (a === null || a === !0 || a === !1)
247
- return NaN;
248
- var r = Number(a);
249
- return isNaN(r) ? r : r < 0 ? Math.ceil(r) : Math.floor(r);
250
- }
251
- e.exports = t.default;
252
- })(De, De.exports);
253
- var Ue = De.exports, me = { exports: {} }, ye = { exports: {} }, he = { exports: {} };
254
- (function(e, t) {
255
- Object.defineProperty(t, "__esModule", {
256
- value: !0
257
- }), t.default = n;
258
- function n(a, r) {
259
- if (r.length < a)
260
- throw new TypeError(a + " argument" + (a > 1 ? "s" : "") + " required, but only " + r.length + " present");
261
- }
262
- e.exports = t.default;
263
- })(he, he.exports);
264
- var ge = he.exports;
265
- (function(e, t) {
266
- Object.defineProperty(t, "__esModule", {
267
- value: !0
268
- }), t.default = r;
269
- var n = a(ge);
270
- function a(o) {
271
- return o && o.__esModule ? o : { default: o };
272
- }
273
- function r(o) {
274
- (0, n.default)(1, arguments);
275
- var s = Object.prototype.toString.call(o);
276
- return o instanceof Date || typeof o == "object" && s === "[object Date]" ? new Date(o.getTime()) : typeof o == "number" || s === "[object Number]" ? new Date(o) : ((typeof o == "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));
277
- }
278
- e.exports = t.default;
279
- })(ye, ye.exports);
280
- var ct = ye.exports;
281
- (function(e, t) {
282
- Object.defineProperty(t, "__esModule", {
283
- value: !0
284
- }), t.default = s;
285
- var n = o(Ue), a = o(ct), r = o(ge);
286
- function o(u) {
287
- return u && u.__esModule ? u : { default: u };
288
- }
289
- function s(u, y) {
290
- (0, r.default)(2, arguments);
291
- var g = (0, a.default)(u), f = (0, n.default)(y);
292
- return isNaN(f) ? /* @__PURE__ */ new Date(NaN) : (f && g.setDate(g.getDate() + f), g);
293
- }
294
- e.exports = t.default;
295
- })(me, me.exports);
296
- var dt = me.exports;
297
- (function(e, t) {
298
- Object.defineProperty(t, "__esModule", {
299
- value: !0
300
- }), t.default = s;
301
- var n = o(Ue), a = o(dt), r = o(ge);
302
- function o(u) {
303
- return u && u.__esModule ? u : { default: u };
304
- }
305
- function s(u, y) {
306
- (0, r.default)(2, arguments);
307
- var g = (0, n.default)(y);
308
- return (0, a.default)(u, -g);
309
- }
310
- e.exports = t.default;
311
- })(ve, ve.exports);
312
- var ft = ve.exports;
313
- const we = /* @__PURE__ */ qe(ft), Ge = ({ currentSelectedDate: e, month: t, isDateDisabled: n, firstDayOfWeek: a }, r) => {
314
- const o = W(new Date(t.value));
315
- K(
316
- t,
317
- () => {
318
- o.value = t.value;
319
- },
320
- { immediate: !0 }
321
- );
322
- const s = W(new Date(e.value));
323
- K(e, () => {
324
- s.value = new Date(e.value);
325
- });
326
- const u = He(), y = W(s.value);
327
- K(u, (c) => {
328
- const E = c.getAttribute("data-date");
329
- y.value = E ? new Date(E) : s.value;
330
- });
331
- const g = W({}), f = (c) => (E) => {
332
- g.value[c.toDateString()] = E;
333
- }, m = () => {
334
- g.value = {};
335
- }, v = (c = 1) => {
336
- o.value = q(o.value, c), r(A.NEXT_MONTH, c), m();
337
- }, d = (c = 1) => {
338
- o.value = Z(o.value, c), r(A.PREVIOUS_MONTH, c), m();
339
- }, l = (c) => {
340
- const E = !!g.value[c == null ? void 0 : c.toDateString()];
341
- c && E && g.value[c.toDateString()].$el.focus();
342
- }, i = (c) => {
343
- c.preventDefault(), c.stopImmediatePropagation(), c.stopPropagation();
344
- }, h = ({ nextDate: c, isIncreasingDays: E, amountOfMonths: R, isCalendarButtonsNav: U }) => {
345
- if (!U && n && n(c))
346
- return;
347
- c.getMonth() === s.value.getMonth() && c.getFullYear() === s.value.getFullYear() ? (s.value = c, l(c)) : (E ? v(R) : d(R), $e(() => {
348
- const O = c.getMonth() === o.value.getMonth() && c.getFullYear() === o.value.getFullYear();
349
- n && n(c) || !O || U || (s.value = c, l(c));
350
- }));
351
- };
352
- return {
353
- // Calendar days ref
354
- calendarRef: g,
355
- addDayRef: f,
356
- /**
357
- * Month navigation
358
- */
359
- showNextMonth: v,
360
- showPreviousMonth: d,
361
- /**
362
- * Focus method
363
- */
364
- focusOnDate: l,
365
- /**
366
- * Day navigation
367
- */
368
- // ArrowRight
369
- moveToNextDay: (c) => {
370
- i(c), h({ nextDate: ee(y.value, 1), isIncreasingDays: !0 });
371
- },
372
- // ArrowLeft
373
- moveToPreviousDay: (c) => {
374
- i(c), h({ nextDate: we(y.value, 1), isIncreasingDays: !1 });
375
- },
376
- // ArrowUp
377
- moveToPreviousWeek: (c) => {
378
- i(c), h({ nextDate: we(y.value, 7), isIncreasingDays: !1 });
379
- },
380
- // ArrowDown
381
- moveToNextWeek: (c) => {
382
- i(c), h({ nextDate: ee(y.value, 7), isIncreasingDays: !0 });
383
- },
384
- // Home
385
- moveToFirstDayOfWeek: (c) => {
386
- i(c), h({
387
- nextDate: oe(y.value, { weekStartsOn: a }),
388
- isIncreasingDays: !1
389
- });
390
- },
391
- moveToFirstMonthOfYear: (c) => {
392
- i(c);
393
- const E = ke(s.value, Me(s.value));
394
- h({
395
- nextDate: Me(s.value),
396
- isIncreasingDays: !1,
397
- amountOfMonths: E
398
- });
399
- },
400
- // End
401
- moveToLastDayOfWeek: (c) => {
402
- i(c), h({
403
- nextDate: ue(y.value, { weekStartsOn: a }),
404
- isIncreasingDays: !0
405
- });
406
- },
407
- moveToLastMonthOfYear: (c) => {
408
- i(c);
409
- const E = tt(s.value, { month: 11, date: 1 }), R = ke(E, s.value);
410
- h({
411
- nextDate: E,
412
- isIncreasingDays: !0,
413
- amountOfMonths: R
414
- });
415
- },
416
- // PageUp
417
- moveToPreviousMonth: (c, E = !1, R = 1) => {
418
- i(c);
419
- const U = R;
420
- h({
421
- nextDate: Z(y.value, U),
422
- isIncreasingDays: !1,
423
- amountOfMonths: U,
424
- isCalendarButtonsNav: E
425
- });
426
- },
427
- // Shift+PageUp
428
- moveToPreviousYear: (c, E = !1) => {
429
- i(c);
430
- const R = 12;
431
- h({
432
- nextDate: Z(y.value, R),
433
- isIncreasingDays: !1,
434
- amountOfMonths: R,
435
- isCalendarButtonsNav: E
436
- });
437
- },
438
- // PageDown
439
- moveToNextMonth: (c, E = !1, R = 1) => {
440
- i(c);
441
- const U = R;
442
- h({
443
- nextDate: q(y.value, U),
444
- isIncreasingDays: !0,
445
- amountOfMonths: U,
446
- isCalendarButtonsNav: E
447
- });
448
- },
449
- // Shift-PageDown
450
- moveToNextYear: (c, E = !1) => {
451
- i(c);
452
- const R = 12;
453
- h({
454
- nextDate: q(y.value, R),
455
- isIncreasingDays: !0,
456
- amountOfMonths: R,
457
- isCalendarButtonsNav: E
458
- });
459
- },
460
- // Values
461
- internalDate: s,
462
- baseDate: o
463
- };
464
- }, vt = {
465
- "en-US": {
466
- nextMonth: "Next month",
467
- previousMonth: "Previous month"
468
- }
469
- }, Dt = te({
470
- i18n: { messages: vt },
471
- name: "calendar-month",
472
- components: {
473
- BentoButton: Le,
474
- BentoTypography: Re,
475
- CalendarMonthDay: it,
476
- ChevronLeftIcon: Ae,
477
- ChevronRightIcon: Ye
478
- },
479
- directives: { BentoKeyboardNavigationDirective: Fe },
480
- props: {
481
- /**
482
- * end of the selected range
483
- */
484
- endDate: { type: Date, default: null },
485
- /**
486
- * Allows you to set the first day of the week. 0 is sunday, 1 is monday, 6 is saturday
487
- */
488
- firstDayOfWeek: {
489
- type: Number,
490
- default: H.MONDAY,
491
- validator: (e) => Object.values(H).includes(e)
492
- },
493
- /**
494
- * Indicate if a date should be disabled or not
495
- */
496
- isDateDisabled: { type: Function, default: void 0 },
497
- /**
498
- * Indicates if the calendar is part of a range date picker or a sigle date picker
499
- */
500
- isRange: { type: Boolean, default: !1 },
501
- /**
502
- * Sets a minimum limit for selectable dates - dates before `min` will not be selectable
503
- */
504
- min: { type: Date, default: null },
505
- /**
506
- * Sets a maximum limit for selectable dates - dates after `max` will not be selectable
507
- */
508
- max: { type: Date, default: null },
509
- /**
510
- * Month of the year to be displayed in the calendar
511
- */
512
- month: { type: Date, required: !0 },
513
- /**
514
- * When rendering multiple calendars, this property allows to render the
515
- * Next and Previous calendar buttons to the right, left or not at all
516
- * depending on the position: Unique (only 1), First, Middle or Last
517
- */
518
- position: {
519
- type: String,
520
- default: "unique",
521
- validator: (e) => Object.values(Q).includes(e)
522
- },
523
- /**
524
- * start of the selected range
525
- */
526
- startDate: { type: Date, default: null }
527
- // can be undefined, eslint complains without default
528
- },
529
- emits: [
530
- A.CHANGE_DAY,
531
- A.INPUT,
532
- A.NEXT_MONTH,
533
- A.PREVIOUS_MONTH,
534
- A.MOUSE_OVER
535
- ],
536
- setup(e, { emit: t }) {
537
- const { locale: n, t: a } = Pe(), r = We(), o = Ce("bento-date-picker-month-label"), s = w(
538
- () => (O) => {
539
- var P;
540
- return e.min && O < e.min || e.max && O > e.max || ((P = e.isDateDisabled) == null ? void 0 : P.call(e, O));
541
- }
542
- ), {
543
- internalDate: u,
544
- baseDate: y,
545
- // Calendar refs
546
- addDayRef: g,
547
- // Month navigation
548
- showNextMonth: f,
549
- showPreviousMonth: m,
550
- // Day navigation
551
- moveToNextDay: v,
552
- moveToPreviousDay: d,
553
- moveToPreviousWeek: l,
554
- moveToNextWeek: i,
555
- moveToFirstDayOfWeek: h,
556
- moveToLastDayOfWeek: x,
557
- moveToPreviousMonth: D,
558
- moveToPreviousYear: b,
559
- moveToNextMonth: Y,
560
- moveToNextYear: L,
561
- focusOnDate: T
562
- } = Ge(
563
- {
564
- currentSelectedDate: F(e, "startDate"),
565
- month: F(e, "month"),
566
- isDateDisabled: s.value,
567
- firstDayOfWeek: e.firstDayOfWeek
568
- },
569
- t
570
- ), _ = w(
571
- () => Object.values(H).includes(e.firstDayOfWeek) ? e.firstDayOfWeek : H.MONDAY
572
- ), p = w(() => ["first", "unique"].includes(e.position)), S = w(() => ["last", "unique"].includes(e.position)), I = w(
573
- () => Ne(y.value, "MMMM yyyy", {
574
- locale: r[n.value.substring(0, 2)] || r.enUS
575
- })
576
- ), X = w(
577
- () => new Array(7).fill(/* @__PURE__ */ new Date()).map((O, P) => {
578
- const z = at(O, _.value + P);
579
- return Ne(z, "EEE", {
580
- locale: r[n.value.substring(0, 2)] || r.enUS
581
- });
582
- })
583
- ), Ee = w(() => {
584
- const O = [], P = se(e.month);
585
- let z = O[O.push([]) - 1];
586
- for (; P.getMonth() === e.month.getMonth(); )
587
- P.getDay() - _.value === 0 && z.length > 0 && (z = O[O.push([]) - 1]), z.push(V(P)), P.setDate(P.getDate() + 1);
588
- return O;
589
- });
590
- return {
591
- // Refs
592
- addDayRef: g,
593
- // Values
594
- computedIsDateDisabled: s,
595
- daysOfWeek: X,
596
- weeksOfMonth: Ee,
597
- formattedMonthDate: I,
598
- shouldShowNextMonthButton: S,
599
- shouldShowPreviousMonthButton: p,
600
- monthLabelId: o,
601
- // Enums
602
- CalendarMonthEvent: A,
603
- // Functions
604
- isSelectedDate: (O) => u.value && ne(u.value, O) && !e.endDate ? !0 : e.startDate && e.endDate && le(O, { start: e.startDate, end: e.endDate }),
605
- showNextMonth: f,
606
- showPreviousMonth: m,
607
- dayVariant: (O) => {
608
- if (!e.isRange || ne(e.startDate, e.endDate))
609
- return C.SINGLE;
610
- if (e.startDate && ne(e.startDate, O))
611
- return C.BEGINNING;
612
- if (e.endDate && ne(e.endDate, O))
613
- return C.END;
614
- if (e.startDate && e.endDate && le(O, { start: e.startDate, end: e.endDate }))
615
- return C.MIDDLE;
616
- },
617
- confirmNavigationDate: () => {
618
- t(A.INPUT, u);
619
- },
620
- // Events
621
- onDayClicked: (O) => {
622
- t(A.INPUT, O);
623
- },
624
- listeners: {
625
- "keydown:arrow-right": v,
626
- "keydown:arrow-left": d,
627
- "keydown:arrow-up": l,
628
- "keydown:arrow-down": i,
629
- "keydown:home": h,
630
- "keydown:end": x,
631
- "keydown:page-up": D,
632
- "keydown:shift-page-up": b,
633
- "keydown:page-down": Y,
634
- "keydown:shift-page-down": L
635
- },
636
- // Exposed methods
637
- focusOnDate: T,
638
- moveToNextDay: v,
639
- moveToPreviousDay: d,
640
- moveToPreviousWeek: l,
641
- moveToNextWeek: i,
642
- moveToFirstDayOfWeek: h,
643
- moveToLastDayOfWeek: x,
644
- moveToPreviousMonth: D,
645
- moveToPreviousYear: b,
646
- moveToNextMonth: Y,
647
- moveToNextYear: L,
648
- // Translations
649
- t: a
650
- };
651
- }
652
- });
653
- var mt = function() {
654
- var t = this, n = t._self._c;
655
- 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) {
656
- return t.moveToPreviousMonth(a, !0);
657
- } }, scopedSlots: t._u([{ key: "iconLeft", fn: function() {
658
- return [n("chevron-left-icon", { attrs: { "svg-title": t.t("previousMonth") } })];
659
- }, proxy: !0 }], null, !1, 1806090420) }) : 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) {
660
- return t.moveToNextMonth(a, !0);
661
- } }, scopedSlots: t._u([{ key: "iconLeft", fn: function() {
662
- return [n("chevron-right-icon", { attrs: { "svg-title": t.t("nextMonth") } })];
663
- }, proxy: !0 }], null, !1, 1041540377) }) : 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, r) {
664
- return n("th", { key: r, 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);
665
- }), 0)]), n("tbody", t._l(t.weeksOfMonth, function(a, r) {
666
- return n("tr", { key: r }, [r === 0 && a.length < 7 ? n("td", { attrs: { colspan: 7 - a.length } }) : t._e(), t._l(a, function(o, s) {
667
- return n("calendar-month-day", { key: `calendar-day-${s}`, ref: t.addDayRef(o), refInFor: !0, attrs: { day: o, disabled: t.computedIsDateDisabled(o), selected: t.isSelectedDate(o), variant: t.dayVariant(o) }, on: { click: t.onDayClicked, mouseover: function(u) {
668
- return t.$emit(t.CalendarMonthEvent.MOUSE_OVER, o);
669
- } }, nativeOn: { keyup: [function(u) {
670
- return !u.type.indexOf("key") && t._k(u.keyCode, "up", 38, u.key, ["Up", "ArrowUp"]) ? null : t.$emit(t.CalendarMonthEvent.CHANGE_DAY, o);
671
- }, function(u) {
672
- return !u.type.indexOf("key") && t._k(u.keyCode, "down", 40, u.key, ["Down", "ArrowDown"]) ? null : t.$emit(t.CalendarMonthEvent.CHANGE_DAY, o);
673
- }, function(u) {
674
- return !u.type.indexOf("key") && t._k(u.keyCode, "left", 37, u.key, ["Left", "ArrowLeft"]) || "button" in u && u.button !== 0 ? null : t.$emit(t.CalendarMonthEvent.CHANGE_DAY, o);
675
- }, function(u) {
676
- return !u.type.indexOf("key") && t._k(u.keyCode, "right", 39, u.key, ["Right", "ArrowRight"]) || "button" in u && u.button !== 2 ? null : t.$emit(t.CalendarMonthEvent.CHANGE_DAY, o);
677
- }] } });
678
- })], 2);
679
- }), 0)])]);
680
- }, yt = [], ht = /* @__PURE__ */ ae(
681
- Dt,
682
- mt,
683
- yt,
684
- !1,
685
- null,
686
- "a0054d45"
687
- );
688
- const Se = ht.exports;
689
- var B = /* @__PURE__ */ ((e) => (e.SINGLE = "single", e.MIDDLE = "middle", e.BEGINNING = "beginning", e.END = "end", e))(B || {}), j = /* @__PURE__ */ ((e) => (e.SINGLE = "single", e.MIDDLE = "middle", e.BEGINNING = "beginning", e.END = "end", e.SELECTED = "selected", e.UNSELECTED = "unselected", e.CURRENT_MONTH = "current-month", e.DISABLED = "disabled", e))(j || {}), _e = /* @__PURE__ */ ((e) => (e.CLICK = "click", e.MOUSE_OVER = "mouseover", e))(_e || {});
690
- const _t = {}, gt = /* @__PURE__ */ te({
691
- ..._t,
692
- __name: "calendar-year-month",
693
- props: {
694
- month: null,
695
- disabled: { type: Boolean, default: !1 },
696
- selected: { type: Boolean, default: !1 },
697
- variant: { default: B.SINGLE }
698
- },
699
- emits: ["click", "mouseover"],
700
- setup(e, { emit: t }) {
701
- const n = e, a = w(() => {
702
- const s = /* @__PURE__ */ new Date();
703
- return n.month.getMonth() === s.getMonth() && n.month.getFullYear() === s.getFullYear();
704
- }), r = w(() => ({
705
- // Variants
706
- [`b-calendar-year-month--${j.BEGINNING}`]: n.variant === B.BEGINNING,
707
- [`b-calendar-year-month--${j.MIDDLE}`]: n.variant === B.MIDDLE,
708
- [`b-calendar-year-month--${j.END}`]: n.variant === B.END,
709
- [`b-calendar-year-month--${j.SINGLE}`]: n.variant === B.SINGLE,
710
- // Selected
711
- [`b-calendar-year-month--${j.UNSELECTED}`]: !n.selected,
712
- [`b-calendar-year-month--${j.SELECTED}`]: n.selected,
713
- // Current month
714
- [`b-calendar-year-month--${j.CURRENT_MONTH}`]: a.value,
715
- // Disabled
716
- [`b-calendar-year-month--${j.DISABLED}`]: n.disabled
717
- }));
718
- return { __sfc: !0, props: n, emit: t, isCurrentMonth: a, conditionalClasses: r, onClick: (s, u) => {
719
- n.disabled ? (s.preventDefault(), s.stopPropagation()) : t(_e.CLICK, u, n.month);
720
- }, BentoDate: pe, BentoDateFormat: xe, CalendarYearMonthEvent: _e };
721
- }
722
- });
723
- var Et = function() {
724
- var t = this, n = t._self._c, a = t._self._setupProxy;
725
- return n("td", { staticClass: "b-calendar-year-month", class: a.conditionalClasses, attrs: { tabindex: t.selected ? "0" : "-1", "aria-selected": t.selected ? t.selected : void 0 }, on: { click: (r) => a.onClick(r, t.month), mouseover: function(r) {
726
- return a.emit(a.CalendarYearMonthEvent.MOUSE_OVER);
727
- }, keydown: function(r) {
728
- return !r.type.indexOf("key") && t._k(r.keyCode, "space", 32, r.key, [" ", "Spacebar"]) && t._k(r.keyCode, "enter", 13, r.key, "Enter") ? null : ((o) => a.onClick(o, t.month)).apply(null, arguments);
729
- } } }, [n("div", { staticClass: "b-calendar-year-month__wrapper" }, [n(a.BentoDate, { staticClass: "b-calendar-year-month__label", attrs: { date: t.month, format: a.BentoDateFormat.SHORT_MONTH } })], 1)]);
730
- }, bt = [], Nt = /* @__PURE__ */ ae(
731
- gt,
732
- Et,
733
- bt,
734
- !1,
735
- null,
736
- "9d0ea56b"
737
- );
738
- const kt = Nt.exports, Ot = {
739
- "en-US": {
740
- nextYear: "Next year",
741
- previousYear: "Previous year"
742
- },
743
- "ja-JP": {
744
- nextYear: "来年",
745
- previousYear: "前年"
746
- },
747
- "pt-BR": {
748
- nextYear: "Ano seguinte",
749
- previousYear: "Ano anterior"
750
- }
751
- }, Mt = {
752
- i18n: { messages: Ot }
753
- }, wt = /* @__PURE__ */ te({
754
- ...Mt,
755
- __name: "calendar-year",
756
- props: {
757
- endDate: { default: null },
758
- isDateDisabled: { type: Function, default: void 0 },
759
- isRange: { type: Boolean, default: !1 },
760
- min: { default: null },
761
- max: { default: null },
762
- position: { default: "unique" },
763
- startDate: { default: null },
764
- year: null
765
- },
766
- emits: ["input", "mouseover", "nextMonth", "previousMonth"],
767
- setup(e, { expose: t, emit: n }) {
768
- const a = e, r = Ce("bento-date-picker-year-label"), { t: o } = Pe(), s = (_) => {
769
- var p;
770
- return a.min && _ < a.min || a.max && _ > a.max || ((p = a.isDateDisabled) == null ? void 0 : p.call(a, _));
771
- }, u = w(() => ["first", "unique"].includes(a.position)), y = w(() => ["last", "unique"].includes(a.position)), {
772
- internalDate: g,
773
- // Calendar refs
774
- addDayRef: f,
775
- // Day navigation
776
- moveToPreviousMonth: m,
777
- moveToPreviousYear: v,
778
- moveToNextMonth: d,
779
- moveToNextYear: l,
780
- moveToFirstMonthOfYear: i,
781
- moveToLastMonthOfYear: h,
782
- focusOnDate: x
783
- } = Ge(
784
- {
785
- currentSelectedDate: F(a, "startDate"),
786
- month: F(a, "year"),
787
- isDateDisabled: s
788
- },
789
- n
790
- );
791
- t({ focusOnDate: x });
792
- const D = w(() => {
793
- const _ = [];
794
- let p = 0;
795
- for (let S = 0; S < 3; S++) {
796
- const I = [];
797
- for (let X = 0; X < 4; X++)
798
- I.push(new Date(a.year.getFullYear(), p++, 1));
799
- _.push(I);
800
- }
801
- return _;
802
- }), b = (_) => !a.isRange || re(a.startDate, a.endDate) ? B.SINGLE : a.startDate && re(a.startDate, _) ? B.BEGINNING : a.endDate && re(a.endDate, _) ? B.END : a.startDate && a.endDate && le(_, { start: a.startDate, end: a.endDate }) ? B.MIDDLE : null, Y = (_) => g.value && re(g.value, _) ? !0 : a.startDate && a.endDate && le(_, { start: a.startDate, end: a.endDate }), L = (_) => {
803
- n("input", _);
804
- }, T = a.isRange ? {} : {
805
- "keydown:arrow-right": d,
806
- "keydown:arrow-left": m,
807
- "keydown:arrow-up": (_) => m(_, !1, 4),
808
- "keydown:arrow-down": (_) => d(_, !1, 4),
809
- "keydown:home": i,
810
- "keydown:end": h,
811
- "keydown:page-up": v,
812
- "keydown:page-down": l
813
- };
814
- return { __sfc: !0, yearLabelId: r, props: a, emit: n, t: o, isDateDisabled: s, shouldShowPreviousYearButton: u, shouldShowNextYearButton: y, internalDate: g, addDayRef: f, moveToPreviousMonth: m, moveToPreviousYear: v, moveToNextMonth: d, moveToNextYear: l, moveToFirstMonthOfYear: i, moveToLastMonthOfYear: h, focusOnDate: x, monthRows: D, monthVariant: b, isSelectedDate: Y, onMonthClicked: L, listeners: T, BentoButton: Le, BentoTypography: Re, CalendarYearMonth: kt, ChevronLeftIcon: Ae, ChevronRightIcon: Ye, vBentoKeyboardNavigationDirective: Fe };
815
- }
816
- });
817
- var St = function() {
818
- var t = this, n = t._self._c, a = t._self._setupProxy;
819
- return n("div", t._g({ directives: [{ name: "bento-keyboard-navigation-directive", rawName: "v-bento-keyboard-navigation-directive" }], staticClass: "b-calendar-year" }, a.listeners), [n("div", { staticClass: "b-calendar-year__year-selector" }, [n("div", { staticClass: "b-calendar-year__previous" }, [a.shouldShowPreviousYearButton ? n(a.BentoButton, { attrs: { variant: "tertiary" }, on: { click: function(r) {
820
- return a.moveToPreviousYear(r, !0);
821
- } }, scopedSlots: t._u([{ key: "iconLeft", fn: function() {
822
- return [n(a.ChevronLeftIcon, { attrs: { "svg-title": a.t("previousYear") } })];
823
- }, proxy: !0 }], null, !1, 3347270443) }) : t._e()], 1), n(a.BentoTypography, { attrs: { id: a.yearLabelId, el: "h2", variant: "title", "aria-live": "polite" } }, [t._v(" " + t._s(t.year.getFullYear()) + " ")]), n("div", { staticClass: "b-calendar-year__next" }, [a.shouldShowNextYearButton ? n(a.BentoButton, { attrs: { variant: "tertiary" }, on: { click: function(r) {
824
- return a.moveToNextYear(r, !0);
825
- } }, scopedSlots: t._u([{ key: "iconLeft", fn: function() {
826
- return [n(a.ChevronRightIcon, { attrs: { "svg-title": a.t("nextYear") } })];
827
- }, proxy: !0 }], null, !1, 3324005926) }) : t._e()], 1)], 1), n("table", { staticClass: "b-calendar-year__year-container", attrs: { role: "grid", "aria-labelledby": a.yearLabelId } }, [n("tbody", t._l(a.monthRows, function(r, o) {
828
- return n("tr", { key: o }, t._l(r, function(s, u) {
829
- return n(a.CalendarYearMonth, { key: `calendar-month-${u}`, ref: a.addDayRef(s), refInFor: !0, attrs: { month: s, disabled: a.isDateDisabled(s), selected: a.isSelectedDate(s), variant: a.monthVariant(s) }, on: { click: a.onMonthClicked, mouseover: function(y) {
830
- return a.emit("mouseover", s);
831
- } } });
832
- }), 1);
833
- }), 0)])]);
834
- }, It = [], Tt = /* @__PURE__ */ ae(
835
- wt,
836
- St,
837
- It,
838
- !1,
839
- null,
840
- "88d584a6"
841
- );
842
- const Ie = Tt.exports, pt = ({ selectedDate: e }, t) => {
843
- const n = Te({
844
- startDate: null,
845
- endDate: null
846
- });
847
- return K(
848
- () => e.value,
849
- () => {
850
- n.startDate = e.value, n.endDate = void 0;
851
- },
852
- { immediate: !0 }
853
- ), {
854
- internalValue: n,
855
- onDateInput: (r) => {
856
- t($.INPUT, r);
857
- },
858
- // Empty function to prevent the listeners from throwing a warning
859
- // eslint-disable-next-line @typescript-eslint/no-empty-function
860
- onMouseOver: () => {
861
- }
862
- };
863
- }, xt = (e) => {
864
- const t = (f, m, v, d) => {
865
- let l = oe(f, { weekStartsOn: e }), i = ue(m || f, { weekStartsOn: e });
866
- const h = v && l < v, x = d && i > d;
867
- return h && (l = oe(v, { weekStartsOn: e })), x && (i = ue(d, { weekStartsOn: e })), l > i && (h ? i = ue(l, { weekStartsOn: e }) : l = oe(i, { weekStartsOn: e })), { startDate: l, endDate: i };
868
- }, n = (f, m, v, d) => {
869
- let l = se(f), i = ie(m || f);
870
- const h = l < v, x = i > d;
871
- return h && (l = se(v)), x && (i = ie(d)), l > i && (h ? i = ie(l) : l = se(i)), { startDate: l, endDate: i };
872
- }, a = (f, m, v, d) => {
873
- let l = ce(f), i = de(m || f);
874
- const h = v instanceof Date && l < v, x = d instanceof Date && i > d;
875
- return h && (l = ce(v)), x && (i = de(d)), l > i && (h ? i = de(l) : l = ce(i)), { startDate: l, endDate: i };
876
- };
877
- return {
878
- adjustDateForWeekly: t,
879
- adjustDateForMonthly: n,
880
- adjustDateForQuarterly: a,
881
- adjustStartDateInputForWeekly: (f, m, v, d) => {
882
- const { startDate: l } = t(new Date(f), null, v, d);
883
- return m(l);
884
- },
885
- adjustEndDateInputForWeekly: (f, m, v, d) => {
886
- const { endDate: l } = t(new Date(f), null, v, d);
887
- return m(l);
888
- },
889
- adjustStartDateInputForMonthly: (f, m, v, d) => {
890
- const { startDate: l } = n(new Date(f), null, v, d);
891
- return m(l);
892
- },
893
- adjustEndDateInputForMonthly: (f, m, v, d) => {
894
- const { endDate: l } = n(new Date(f), null, v, d);
895
- return m(l);
896
- },
897
- adjustStartDateInputForQuarterly: (f, m, v, d) => {
898
- const { startDate: l } = a(new Date(f), null, v, d);
899
- return m(l);
900
- },
901
- adjustEndDateInputForQuarterly: (f, m, v, d) => {
902
- const { endDate: l } = a(new Date(f), null, v, d);
903
- return m(l);
904
- }
905
- };
906
- }, Lt = ({ selectedDate: e, isDateDisabled: t, maxRange: n, granularity: a, firstDayOfWeek: r, min: o, max: s }, u) => {
907
- const { adjustDateForWeekly: f, adjustDateForMonthly: m, adjustDateForQuarterly: v } = xt(r), d = Te({
908
- startDate: null,
909
- endDate: null
910
- }), l = W(null);
911
- K(
912
- () => e.value,
913
- () => {
914
- let { startDate: D = null, endDate: b = null } = e.value || {};
915
- D && (D = V(D)), b && (b = V(b)), !(D && t && t(D) || b && t && t(b) || D && b && Je(D, b)) && (d.startDate = D, d.endDate = b);
916
- },
917
- { immediate: !0, deep: !0 }
918
- );
919
- const i = (D, b, Y) => {
920
- if (d.startDate = D, d.endDate = b, n.value) {
921
- const L = Ke(b, D) - n.value;
922
- L > 0 && (Y < 1 ? (d.startDate = D, d.endDate = ze(b, L)) : (d.startDate = ee(D, L), d.endDate = b));
923
- }
924
- u($.START_DATE_SELECTED, d.startDate), u($.END_DATE_SELECTED, d.endDate);
925
- }, h = (D) => {
926
- var b, Y, L, T, _, p;
927
- if (!(!l.value || t && t(D)))
928
- if (Ze(D, l.value)) {
929
- if (((b = a == null ? void 0 : a.value) == null ? void 0 : b.type) === "weekly") {
930
- const { startDate: S, endDate: I } = f(D, l.value, o.value, s.value);
931
- i(S, I, -1);
932
- return;
933
- }
934
- if (((Y = a == null ? void 0 : a.value) == null ? void 0 : Y.type) === "monthly") {
935
- const { startDate: S, endDate: I } = m(D, l.value, o.value, s.value);
936
- i(S, I, -1);
937
- return;
938
- }
939
- if (((L = a == null ? void 0 : a.value) == null ? void 0 : L.type) === "quarterly") {
940
- const { startDate: S, endDate: I } = v(D, l.value, o.value, s.value);
941
- i(S, I, -1);
942
- return;
943
- }
944
- i(D, l.value, -1);
945
- } else {
946
- if (((T = a == null ? void 0 : a.value) == null ? void 0 : T.type) === "weekly") {
947
- const { startDate: S, endDate: I } = f(l.value, D, o.value, s.value);
948
- i(S, I, 1);
949
- return;
950
- }
951
- if (((_ = a == null ? void 0 : a.value) == null ? void 0 : _.type) === "monthly") {
952
- const { startDate: S, endDate: I } = m(l.value, D, o.value, s.value);
953
- i(S, I, 1);
954
- return;
955
- }
956
- if (((p = a == null ? void 0 : a.value) == null ? void 0 : p.type) === "quarterly") {
957
- const { startDate: S, endDate: I } = v(l.value, D, o.value, s.value);
958
- i(S, I, 1);
959
- return;
960
- }
961
- i(l.value, D, 1);
962
- }
963
- };
964
- return {
965
- internalValue: d,
966
- onDateInput: (D) => {
967
- var b, Y, L;
968
- if (l.value)
969
- l.value = null, u($.INPUT, d);
970
- else {
971
- let T = D;
972
- if (((b = a == null ? void 0 : a.value) == null ? void 0 : b.type) === "weekly") {
973
- const { startDate: _, endDate: p } = f(D);
974
- T = _, i(T, p);
975
- }
976
- if (((Y = a == null ? void 0 : a.value) == null ? void 0 : Y.type) === "monthly") {
977
- const { startDate: _, endDate: p } = m(D);
978
- T = _, i(T, p);
979
- }
980
- if (((L = a == null ? void 0 : a.value) == null ? void 0 : L.type) === "quarterly") {
981
- const { startDate: _, endDate: p } = v(D);
982
- T = _, i(T, p);
983
- }
984
- l.value = T, h(T);
985
- }
986
- },
987
- onMouseOver: h
988
- };
989
- }, Rt = te({
990
- name: "calendar",
991
- components: { CalendarMonth: Se, CalendarYear: Ie },
992
- props: {
993
- /**
994
- * Allows you to set the first day of the week. 0 is sunday, 1 is monday, 6 is saturday
995
- */
996
- firstDayOfWeek: {
997
- type: Number,
998
- default: H.MONDAY,
999
- validator: (e) => Object.values(H).includes(e)
1000
- },
1001
- /**
1002
- * The selected granularity configuration
1003
- */
1004
- granularity: {
1005
- type: Object,
1006
- default: null
1007
- },
1008
- /**
1009
- * Indicate if a date should be disabled or not
1010
- */
1011
- isDateDisabled: { type: Function, default: void 0 },
1012
- /**
1013
- * Enables the Date Range calendar
1014
- */
1015
- isRange: { type: Boolean, default: !1 },
1016
- /**
1017
- * Set a maximum number of dates to be selectable by the range.
1018
- */
1019
- maxRange: { type: Number, default: null, validator: (e) => !e || e > 0 },
1020
- /**
1021
- * Sets a minimum limit for selectable dates - dates before `min` will not be selectable
1022
- */
1023
- min: { type: Date, default: null },
1024
- /**
1025
- * Sets a maximum limit for selectable dates - dates after `max` will not be selectable
1026
- */
1027
- max: { type: Date, default: null },
1028
- /**
1029
- * Number of months rendered on pane
1030
- */
1031
- numberOfMonths: {
1032
- type: Number,
1033
- default: 3,
1034
- validator: (e) => e >= 1
1035
- },
1036
- /**
1037
- * Upon opening date range picker, end date's month will be pre-selected.
1038
- */
1039
- showEndDateOnOpen: { type: Boolean, default: !1 },
1040
- /**
1041
- * Selected date. Can be a single Date or a CalendarRangeDate
1042
- * instance that contains startDate and endDate attributes.
1043
- */
1044
- value: { type: [Date, Object], default: void 0 },
1045
- /**
1046
- * Default start date for the calendar pane
1047
- */
1048
- defaultDisplayMonth: {
1049
- type: String,
1050
- default: null,
1051
- validator: (e) => /^\d{4}-(0?[1-9]|1[012])(-(0?[1-9]|[12][0-9]|3[01]))?$/.test(e)
1052
- },
1053
- /**
1054
- * The type of calendar to display. Defaults to showing days.
1055
- */
1056
- variant: {
1057
- type: String,
1058
- default: "day",
1059
- validator: (e) => Object.values(fe).includes(e)
1060
- }
1061
- },
1062
- emit: [$.INPUT, $.START_DATE_SELECTED, $.END_DATE_SELECTED],
1063
- setup(e, { emit: t }) {
1064
- const n = W(null), a = W();
1065
- K(
1066
- () => e.value,
1067
- () => {
1068
- var l, i, h;
1069
- if (e.isRange)
1070
- a.value = e != null && e.showEndDateOnOpen && ((l = e.value) != null && l.endDate) ? (i = e.value) == null ? void 0 : i.endDate : ((h = e.value) == null ? void 0 : h.startDate) || /* @__PURE__ */ new Date();
1071
- else {
1072
- const x = e.defaultDisplayMonth && new Date(e.defaultDisplayMonth).getTime() ? new Date(e.defaultDisplayMonth) : /* @__PURE__ */ new Date();
1073
- a.value = e.value || x;
1074
- }
1075
- },
1076
- { immediate: !0, deep: !0 }
1077
- );
1078
- const r = w(
1079
- () => e.variant === fe.MONTH ? Ie : Se
1080
- ), o = w(() => ({
1081
- "b-calendar__range": e.isRange
1082
- })), {
1083
- internalValue: s,
1084
- onDateInput: u,
1085
- onMouseOver: y
1086
- } = e.isRange ? Lt(
1087
- {
1088
- selectedDate: F(e, "value"),
1089
- isDateDisabled: e.isDateDisabled,
1090
- maxRange: F(e, "maxRange"),
1091
- granularity: F(e, "granularity"),
1092
- firstDayOfWeek: e.firstDayOfWeek,
1093
- min: F(e, "min"),
1094
- max: F(e, "max")
1095
- },
1096
- t
1097
- ) : pt(
1098
- {
1099
- selectedDate: F(e, "value"),
1100
- firstDayOfWeek: e.firstDayOfWeek
1101
- },
1102
- t
1103
- ), g = (l) => e.numberOfMonths === 1 ? Q.UNIQUE : l === 0 ? Q.FIRST : l === e.numberOfMonths - 1 ? Q.LAST : Q.MIDDLE, f = w(() => (l) => {
1104
- const i = e != null && e.showEndDateOnOpen && e.isRange ? Z(a.value, e.numberOfMonths - 1) : a.value;
1105
- return q(i, l);
1106
- }), m = w(() => (l) => {
1107
- const i = e != null && e.showEndDateOnOpen ? nt(a.value, e.numberOfMonths - 1) : a.value;
1108
- return Be(i, l);
1109
- });
1110
- return {
1111
- // Refs
1112
- calendarRef: n,
1113
- // Values
1114
- baseDate: a,
1115
- calendarComponent: r,
1116
- conditionalClasses: o,
1117
- internalValue: s,
1118
- // Methods
1119
- calculateOffsetMonth: f,
1120
- calculateOffsetYear: m,
1121
- calendarPosition: g,
1122
- // Events
1123
- onDateInput: u,
1124
- onMouseOver: y,
1125
- calculateNextMonths: (l = 1) => {
1126
- a.value = q(a.value, l);
1127
- },
1128
- calculatePreviousMonths: (l = 1) => {
1129
- a.value = Z(a.value, l);
1130
- }
1131
- };
1132
- }
1133
- });
1134
- var Yt = function() {
1135
- var t = this, n = t._self._c;
1136
- return t._self._setupProxy, n("div", { staticClass: "b-calendar", class: t.conditionalClasses }, t._l(t.numberOfMonths, function(a, r) {
1137
- return n(t.calendarComponent, { key: `calendar-${r}`, ref: t.numberOfMonths === 1 ? "calendarRef" : null, refInFor: !0, tag: "component", attrs: { "first-day-of-week": t.firstDayOfWeek, "is-date-disabled": t.isDateDisabled, month: t.calculateOffsetMonth(r), year: t.calculateOffsetYear(r), position: t.calendarPosition(r), 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, changeDay: t.onMouseOver, nextMonth: t.calculateNextMonths, previousMonth: t.calculatePreviousMonths } });
1138
- }), 1);
1139
- }, At = [], Ct = /* @__PURE__ */ ae(
1140
- Rt,
1141
- Yt,
1142
- At,
1143
- !1,
1144
- null,
1145
- "50663464"
1146
- );
1147
- const Xt = Ct.exports;
1148
- export {
1149
- H as C,
1150
- Xt as a,
1151
- $ as b,
1152
- Q as c,
1153
- fe as d,
1154
- q as e,
1155
- ce as f,
1156
- V as g,
1157
- oe as h,
1158
- ne as i,
1159
- ee as j,
1160
- ue as k,
1161
- ze as l,
1162
- Z as m,
1163
- de as n,
1164
- se as s,
1165
- xt as u
1166
- };
1167
- //# sourceMappingURL=calendar.DbTC35rM.js.map