react-modular-datepicker 0.0.6 → 0.0.8

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.
package/dist/index.js CHANGED
@@ -2,36 +2,59 @@ import { n as e, r as t, t as n } from "./useDates-CjPuu-VA.js";
2
2
  import { addMonth as r, composeEventHandlers as i, getCalendars as a, isBackDisabled as o, isForwardDisabled as s, subtractMonth as c } from "./utils.js";
3
3
  import { useEffect as l, useRef as u, useState as d } from "react";
4
4
  import { jsx as f, jsxs as p } from "react/jsx-runtime";
5
- //#region src/components/Day.tsx
6
- var m = ({ dateObj: e, getDateProps: t, classNames: n, tooltip: r }) => {
7
- let [i, a] = d(!1);
8
- if (!e) return /* @__PURE__ */ f("div", { className: "aspect-square bg-white" });
9
- let { date: o, selected: s, selectable: c, isRangeStart: l, isRangeEnd: u, isRangeBetween: m, isRangeHovering: h, isRangeActive: g } = e, _ = n.day, v = "rounded-full";
10
- v = l && u ? `${_.selected} rounded-full` : l ? `${_.rangeStart} ${g ? "rounded-l-full rounded-r-none" : "rounded-full"}` : u ? `${_.rangeEnd} ${g ? "rounded-r-full rounded-l-none" : "rounded-full"}` : m ? _.rangeBetween || "" : h ? _.rangeHovering || "" : s ? _.selected || "" : c ? _.unselected || "" : _.disabled || "";
11
- let y = [
12
- _.day,
13
- v,
14
- ...(e.modifiers || []).map((e) => _[e] || e)
15
- ].filter(Boolean).join(" ");
16
- return /* @__PURE__ */ p("button", {
17
- ...t({
18
- dateObj: e,
19
- onMouseEnter: () => a(!0),
20
- onMouseLeave: () => a(!1)
21
- }),
22
- className: y,
23
- children: [o.getDate(), r && i && /* @__PURE__ */ f("div", {
24
- className: "absolute bottom-full left-1/2 -translate-x-1/2 mb-2 hidden group-hover:block z-10",
25
- children: /* @__PURE__ */ p("div", {
26
- className: "bg-gray-800 text-white text-xs py-1 px-2 rounded whitespace-nowrap shadow-lg",
27
- children: [r, /* @__PURE__ */ f("div", { className: "absolute top-full left-1/2 -translate-x-1/2 border-8 border-transparent border-t-gray-800" })]
28
- })
29
- })]
30
- });
5
+ //#region src/classNames.ts
6
+ var m = {
7
+ root: "w-fit flex flex-col p-4 bg-white rounded-lg shadow-lg",
8
+ header: "flex items-center justify-between border-b-2 border-brand-gray-light/40 pb-2",
9
+ headerMultiMonth: "border-b-0 pb-0",
10
+ calendarsContainer: "flex flex-wrap gap-4",
11
+ calendarContainer: "flex-1 min-w-[280px] max-w-full",
12
+ navButtonSlotStart: "w-9 flex justify-start",
13
+ navButtonSlotEnd: "w-9 flex justify-end",
14
+ headerTitleContainer: "font-semibold text-brand-text text-center flex-1",
15
+ weekdayGrid: "grid grid-cols-7 gap-1 mb-1 border-b border-brand-gray-light/40",
16
+ weekday: "text-center text-xs text-gray-400 py-2",
17
+ daysGrid: "grid grid-cols-7 gap-px bg-brand-gray-light/20",
18
+ footer: "mt-4",
19
+ navButton: "p-2 text-brand-text hover:bg-gray-100 rounded-full transition-colors cursor-pointer disabled:opacity-30 disabled:pointer-events-none",
20
+ navButtonHidden: "invisible pointer-events-none",
21
+ monthYearContainer: "flex gap-8",
22
+ monthYearLabel: "flex gap-1 items-center font-semibold text-brand-text",
23
+ monthYearButton: "hover:bg-gray-100 px-2 py-1 rounded cursor-pointer",
24
+ day: {
25
+ day: "rmdp-day group",
26
+ selected: "rmdp-day-selected",
27
+ unselected: "rmdp-day-unselected",
28
+ disabled: "rmdp-day-disabled",
29
+ empty: "rmdp-day-empty",
30
+ rangeStart: "rmdp-day-range-start",
31
+ rangeEnd: "rmdp-day-range-end",
32
+ rangeBetween: "rmdp-day-range-between",
33
+ rangeHovering: "rmdp-day-range-hovering"
34
+ },
35
+ monthsGrid: "grid grid-cols-3 gap-2 animate-slide-in-top",
36
+ monthButton: "py-3 rounded-lg hover:bg-brand-gray-light transition-colors cursor-pointer disabled:opacity-30 disabled:pointer-events-none",
37
+ monthButtonSelected: "bg-brand-gold text-white",
38
+ monthButtonUnselected: "text-brand-text",
39
+ yearsGrid: "grid grid-cols-3 gap-2 max-h-[210px] overflow-y-auto pr-2 animate-slide-in-top rmdp-scrollbar",
40
+ yearButton: "py-3 rounded-lg hover:bg-brand-gray-light transition-colors cursor-pointer disabled:opacity-30 disabled:pointer-events-none",
41
+ yearButtonSelected: "bg-brand-gold text-white",
42
+ yearButtonUnselected: "text-brand-text"
43
+ }, h = (e) => {
44
+ let t = { ...m };
45
+ if (!e) return t;
46
+ for (let n in e) {
47
+ let r = n;
48
+ r === "day" && e.day ? t.day = {
49
+ ...m.day,
50
+ ...e.day
51
+ } : e[r] && (t[r] = e[r]);
52
+ }
53
+ return t;
31
54
  };
32
55
  //#endregion
33
56
  //#region src/i18n.ts
34
- function h(e = t, n) {
57
+ function g(e = t, n) {
35
58
  return {
36
59
  months: e.getMonths(n),
37
60
  weekdays: e.getWeekdays(n),
@@ -39,15 +62,15 @@ function h(e = t, n) {
39
62
  forward: "Next month"
40
63
  };
41
64
  }
42
- function g(e = t, n, r) {
65
+ function _(e = t, n, r) {
43
66
  return {
44
- ...h(e, n),
67
+ ...g(e, n),
45
68
  ...r
46
69
  };
47
70
  }
48
71
  //#endregion
49
72
  //#region src/components/CalendarHeader.tsx
50
- var _ = () => /* @__PURE__ */ f("svg", {
73
+ var v = () => /* @__PURE__ */ f("svg", {
51
74
  width: "20",
52
75
  height: "20",
53
76
  viewBox: "0 0 24 24",
@@ -57,7 +80,7 @@ var _ = () => /* @__PURE__ */ f("svg", {
57
80
  strokeLinecap: "round",
58
81
  strokeLinejoin: "round",
59
82
  children: /* @__PURE__ */ f("polyline", { points: "15 18 9 12 15 6" })
60
- }), v = () => /* @__PURE__ */ f("svg", {
83
+ }), y = () => /* @__PURE__ */ f("svg", {
61
84
  width: "20",
62
85
  height: "20",
63
86
  viewBox: "0 0 24 24",
@@ -67,103 +90,65 @@ var _ = () => /* @__PURE__ */ f("svg", {
67
90
  strokeLinecap: "round",
68
91
  strokeLinejoin: "round",
69
92
  children: /* @__PURE__ */ f("polyline", { points: "9 18 15 12 9 6" })
70
- }), y = ({ calendars: e, getBackProps: t, getForwardProps: n, setView: r, monthNames: i, t: a, classNames: o, slideDirection: s, currentView: c }) => /* @__PURE__ */ p("div", {
71
- className: o.header,
72
- children: [
73
- /* @__PURE__ */ f("button", {
74
- ...t({ calendars: e }),
75
- onMouseDown: (e) => e.preventDefault(),
76
- className: `${o.navButton} ${c && c !== "days" ? "invisible pointer-events-none" : ""}`,
77
- "aria-label": a.back,
78
- children: /* @__PURE__ */ f(_, {})
79
- }),
80
- /* @__PURE__ */ f("div", {
81
- className: o.monthYearContainer,
82
- children: e.length === 1 ? /* @__PURE__ */ p("div", {
83
- className: `${o.monthYearLabel} ${s === "left" ? "animate-slide-in-left" : s === "right" ? "animate-slide-in-right" : ""}`,
84
- children: [/* @__PURE__ */ f("button", {
85
- onMouseDown: (e) => e.preventDefault(),
86
- onClick: () => r(c === "months" ? "days" : "months"),
87
- className: o.monthYearButton,
88
- children: i[e[0].month]
89
- }), /* @__PURE__ */ f("button", {
90
- onMouseDown: (e) => e.preventDefault(),
91
- onClick: () => r(c === "years" ? "days" : "years"),
92
- className: o.monthYearButton,
93
- children: e[0].year
94
- })]
95
- }, `${e[0].month}-${e[0].year}`) : /* @__PURE__ */ f("div", {
96
- className: `${o.monthYearLabel} ${s === "left" ? "animate-slide-in-left" : s === "right" ? "animate-slide-in-right" : ""}`,
97
- children: (() => {
98
- let t = e[0], n = e[e.length - 1];
99
- return e.length === 12 && t.month === 0 && n.month === 11 && t.year === n.year ? /* @__PURE__ */ f("span", { children: t.year }) : t.year === n.year ? /* @__PURE__ */ p("span", { children: [
100
- i[t.month],
101
- " - ",
102
- i[n.month],
103
- " ",
104
- t.year
105
- ] }) : /* @__PURE__ */ p("span", { children: [
106
- i[t.month],
107
- " ",
108
- t.year,
109
- " - ",
110
- i[n.month],
111
- " ",
112
- n.year
113
- ] });
114
- })()
93
+ }), b = ({ calendars: e, getBackProps: t, getForwardProps: n, setView: r, monthNames: i, t: a, classNames: o, slideDirection: s, currentView: c }) => {
94
+ if (e.length > 1 && e.length < 12) return null;
95
+ let l = e[0], u = e[e.length - 1], d = [o.header, e.length > 1 ? o.headerMultiMonth : ""].filter(Boolean).join(" "), m = (e) => [o.navButton, e ? o.navButtonHidden : ""].filter(Boolean).join(" "), h = !!(c && c !== "days");
96
+ return /* @__PURE__ */ p("div", {
97
+ className: d,
98
+ children: [
99
+ /* @__PURE__ */ f("button", {
100
+ ...t({ calendars: e }),
101
+ onMouseDown: (e) => e.preventDefault(),
102
+ className: m(h),
103
+ "aria-label": a.back,
104
+ children: /* @__PURE__ */ f(v, {})
105
+ }),
106
+ /* @__PURE__ */ f("div", {
107
+ className: o.monthYearContainer,
108
+ children: e.length === 1 ? /* @__PURE__ */ p("div", {
109
+ className: `${o.monthYearLabel} ${s === "left" ? "animate-slide-in-left" : s === "right" ? "animate-slide-in-right" : ""}`,
110
+ children: [/* @__PURE__ */ f("button", {
111
+ onMouseDown: (e) => e.preventDefault(),
112
+ onClick: () => r(c === "months" ? "days" : "months"),
113
+ className: o.monthYearButton,
114
+ children: i[e[0].month]
115
+ }), /* @__PURE__ */ f("button", {
116
+ onMouseDown: (e) => e.preventDefault(),
117
+ onClick: () => r(c === "years" ? "days" : "years"),
118
+ className: o.monthYearButton,
119
+ children: e[0].year
120
+ })]
121
+ }, `${e[0].month}-${e[0].year}`) : /* @__PURE__ */ f("div", {
122
+ className: `${o.monthYearLabel} ${s === "left" ? "animate-slide-in-left" : s === "right" ? "animate-slide-in-right" : ""}`,
123
+ children: /* @__PURE__ */ f("span", { children: l.year === u.year ? l.year : `${l.year} - ${u.year}` })
124
+ })
125
+ }),
126
+ /* @__PURE__ */ f("button", {
127
+ ...n({ calendars: e }),
128
+ onMouseDown: (e) => e.preventDefault(),
129
+ className: m(h),
130
+ "aria-label": a.forward,
131
+ children: /* @__PURE__ */ f(y, {})
115
132
  })
133
+ ]
134
+ });
135
+ }, x = ({ dateObj: e, getDateProps: t, dayProps: n, classNames: r }) => {
136
+ if (!e) return /* @__PURE__ */ f("div", { className: r.day.empty });
137
+ let { date: i, selected: a, selectable: o, isRangeStart: s, isRangeEnd: c, isRangeBetween: l, isRangeHovering: u, isRangeActive: d } = e, p = r.day, m = "rounded-full";
138
+ m = s && c ? `${p.selected} rounded-full` : s ? `${p.rangeStart} ${d ? "rounded-l-full rounded-r-none" : "rounded-full"}` : c ? `${p.rangeEnd} ${d ? "rounded-r-full rounded-l-none" : "rounded-full"}` : l ? p.rangeBetween || "" : u ? p.rangeHovering || "" : a ? p.selected || "" : o ? p.unselected || "" : p.disabled || "";
139
+ let h = (e.modifiers || []).map((e) => p[e] || e).filter(Boolean).join(" "), g = [
140
+ p.day,
141
+ m,
142
+ h
143
+ ].filter(Boolean).join(" ");
144
+ return /* @__PURE__ */ f("button", {
145
+ ...t({
146
+ dateObj: e,
147
+ ...n
116
148
  }),
117
- /* @__PURE__ */ f("button", {
118
- ...n({ calendars: e }),
119
- onMouseDown: (e) => e.preventDefault(),
120
- className: `${o.navButton} ${c && c !== "days" ? "invisible pointer-events-none" : ""}`,
121
- "aria-label": a.forward,
122
- children: /* @__PURE__ */ f(v, {})
123
- })
124
- ]
125
- }), b = {
126
- root: "w-fit flex flex-col p-4 bg-white rounded-lg shadow-lg",
127
- header: "flex items-center justify-between border-b-2 border-brand-gray-light/40 pb-2",
128
- calendarsContainer: "flex flex-wrap gap-4 mt-3",
129
- calendarContainer: "flex-1 min-w-[280px] max-w-full",
130
- weekdayGrid: "grid grid-cols-7 gap-1 mb-1 border-b border-brand-gray-light/40",
131
- weekday: "text-center text-xs text-gray-400 py-2",
132
- daysGrid: "grid grid-cols-7 gap-px bg-brand-gray-light/20",
133
- footer: "mt-4",
134
- navButton: "p-2 text-brand-text hover:bg-gray-100 rounded-full transition-colors cursor-pointer disabled:opacity-30 disabled:pointer-events-none",
135
- monthYearContainer: "flex gap-8",
136
- monthYearLabel: "flex gap-1 items-center font-semibold text-brand-text",
137
- monthYearButton: "hover:bg-gray-100 px-2 py-1 rounded cursor-pointer",
138
- day: {
139
- day: "aspect-square flex items-center justify-center text-sm font-medium transition-all relative group cursor-pointer p-px",
140
- selected: "bg-brand-gold text-white rounded-full",
141
- unselected: "bg-white hover:bg-brand-gray-light text-brand-text",
142
- disabled: "bg-white text-gray-300 cursor-not-allowed",
143
- rangeStart: "bg-brand-gold text-white",
144
- rangeEnd: "bg-brand-gold text-white",
145
- rangeBetween: "bg-brand-gold/25 text-brand-text",
146
- rangeHovering: "bg-brand-gold/25 text-brand-text"
147
- },
148
- monthsGrid: "grid grid-cols-3 gap-2 animate-slide-in-top",
149
- monthButton: "py-3 rounded-lg hover:bg-brand-gray-light transition-colors cursor-pointer disabled:opacity-30 disabled:pointer-events-none",
150
- monthButtonSelected: "bg-brand-gold text-white",
151
- monthButtonUnselected: "text-brand-text",
152
- yearsGrid: "grid grid-cols-3 gap-2 max-h-[300px] overflow-y-auto pr-2 animate-slide-in-top",
153
- yearButton: "py-3 rounded-lg hover:bg-brand-gray-light transition-colors cursor-pointer disabled:opacity-30 disabled:pointer-events-none",
154
- yearButtonSelected: "bg-brand-gold text-white",
155
- yearButtonUnselected: "text-brand-text"
156
- }, x = (e) => {
157
- let t = { ...b };
158
- if (!e) return t;
159
- for (let n in e) {
160
- let r = n;
161
- r === "day" && e.day ? t.day = {
162
- ...b.day,
163
- ...e.day
164
- } : e[r] && (t[r] = e[r]);
165
- }
166
- return t;
149
+ className: g,
150
+ children: i.getDate()
151
+ });
167
152
  }, S = ({ year: e, month: t, monthNames: n, minDate: r, maxDate: i, onMonthSelect: a, classNames: o }) => {
168
153
  let s = (t) => !!(r && e === r.getFullYear() && t < r.getMonth() || i && e === i.getFullYear() && t > i.getMonth());
169
154
  return /* @__PURE__ */ f("div", {
@@ -201,123 +186,148 @@ var _ = () => /* @__PURE__ */ f("svg", {
201
186
  }, t))
202
187
  });
203
188
  }, w = (e) => {
204
- let { classNames: r, locale: i, translations: a, adapter: o = t, firstDayOfWeek: s = 0, header: c, footer: l, renderDayTooltip: u, ...h } = e, _ = x(r), [v, b] = d("days"), [w, T] = d(null), E = g(o, i, a), D = E.weekdays, O = E.months, { calendars: k, getBackProps: A, getForwardProps: j, getDateProps: M, setOffset: N } = n({
205
- ...h,
189
+ let { classNames: r, locale: i, translations: a, adapter: o = t, firstDayOfWeek: s = 0, header: c, footer: l, getDayProps: u, ...m } = e, g = h(r), [w, T] = d("days"), [E, D] = d(null), O = _(o, i, a), k = O.weekdays, A = O.months, { calendars: j, getBackProps: M, getForwardProps: N, getDateProps: P, setOffset: F } = n({
190
+ ...m,
206
191
  adapter: o,
207
192
  firstDayOfWeek: s
208
- }), P = [...D.slice(s), ...D.slice(0, s)], { month: F, year: I } = k[0], L = (t) => {
209
- let n = o.set(o.set(o.date(e.date || /* @__PURE__ */ new Date()), "year", I), "month", F), r = o.set(n, "month", t), i = o.startOf(o.date(e.date || /* @__PURE__ */ new Date()), "month"), a = o.diff(r, i, "month");
210
- T(null), N(a), b("days");
211
- }, R = (t) => {
212
- let n = o.set(o.set(o.date(e.date || /* @__PURE__ */ new Date()), "year", I), "month", F), r = o.set(n, "year", t), i = o.startOf(o.date(e.date || /* @__PURE__ */ new Date()), "month"), a = o.diff(r, i, "month");
213
- T(null), N(a), b("days");
214
- }, z = (e) => {
215
- let t = A(e);
193
+ }), I = [...k.slice(s), ...k.slice(0, s)], { month: L, year: R } = j[0], z = (t) => {
194
+ let n = o.set(o.set(o.date(e.date || /* @__PURE__ */ new Date()), "year", R), "month", L), r = o.set(n, "month", t), i = o.startOf(o.date(e.date || /* @__PURE__ */ new Date()), "month"), a = o.diff(r, i, "month");
195
+ D(null), F(a), T("days");
196
+ }, B = (t) => {
197
+ let n = o.set(o.set(o.date(e.date || /* @__PURE__ */ new Date()), "year", R), "month", L), r = o.set(n, "year", t), i = o.startOf(o.date(e.date || /* @__PURE__ */ new Date()), "month"), a = o.diff(r, i, "month");
198
+ D(null), F(a), T("days");
199
+ }, V = m.monthsToDisplay || 1, H = (e) => {
200
+ let t = M({
201
+ offset: V,
202
+ ...e
203
+ });
216
204
  return {
217
205
  ...t,
218
206
  onClick: (e) => {
219
- T("left"), t.onClick?.(e);
207
+ D("left"), t.onClick?.(e);
220
208
  }
221
209
  };
222
- }, B = (e) => {
223
- let t = j(e);
210
+ }, U = (e) => {
211
+ let t = N({
212
+ offset: V,
213
+ ...e
214
+ });
224
215
  return {
225
216
  ...t,
226
217
  onClick: (e) => {
227
- T("right"), t.onClick?.(e);
218
+ D("right"), t.onClick?.(e);
228
219
  }
229
220
  };
230
221
  };
231
222
  return /* @__PURE__ */ p("div", {
232
- className: `rmdp ${_.root}`,
223
+ className: `rmdp ${g.root}`,
233
224
  children: [
234
225
  typeof c == "function" ? c({
235
- calendars: k,
236
- getBackProps: z,
237
- getForwardProps: B,
238
- setView: b,
239
- monthNames: O,
240
- t: E,
241
- slideDirection: w,
242
- currentView: v
243
- }) : c || /* @__PURE__ */ f(y, {
244
- calendars: k,
245
- getBackProps: z,
246
- getForwardProps: B,
247
- setView: b,
248
- monthNames: O,
249
- t: E,
250
- classNames: _,
251
- slideDirection: w,
252
- currentView: v
226
+ calendars: j,
227
+ getBackProps: H,
228
+ getForwardProps: U,
229
+ setView: T,
230
+ monthNames: A,
231
+ t: O,
232
+ slideDirection: E,
233
+ currentView: w
234
+ }) : c || /* @__PURE__ */ f(b, {
235
+ calendars: j,
236
+ getBackProps: H,
237
+ getForwardProps: U,
238
+ setView: T,
239
+ monthNames: A,
240
+ t: O,
241
+ classNames: g,
242
+ slideDirection: E,
243
+ currentView: w
253
244
  }),
254
245
  /* @__PURE__ */ p("div", {
255
- className: _.calendarsContainer,
246
+ className: g.calendarsContainer,
256
247
  children: [
257
- v === "months" && k.map((t) => /* @__PURE__ */ f("div", {
258
- className: _.calendarContainer,
248
+ w === "months" && j.map((t) => /* @__PURE__ */ f("div", {
249
+ className: g.calendarContainer,
259
250
  children: /* @__PURE__ */ f(S, {
260
251
  year: t.year,
261
252
  month: t.month,
262
- monthNames: O,
253
+ monthNames: A,
263
254
  minDate: e.minDate,
264
255
  maxDate: e.maxDate,
265
- onMonthSelect: L,
266
- classNames: _
256
+ onMonthSelect: z,
257
+ classNames: g
267
258
  })
268
259
  }, `months-${t.year}`)),
269
- v === "years" && k.map((t) => /* @__PURE__ */ f("div", {
270
- className: _.calendarContainer,
260
+ w === "years" && j.map((t) => /* @__PURE__ */ f("div", {
261
+ className: g.calendarContainer,
271
262
  children: /* @__PURE__ */ f(C, {
272
263
  year: t.year,
273
264
  minDate: e.minDate,
274
265
  maxDate: e.maxDate,
275
266
  adapter: o,
276
- onYearSelect: R,
277
- classNames: _
267
+ onYearSelect: B,
268
+ classNames: g
278
269
  })
279
270
  }, `years-${t.year}`)),
280
- v === "days" && k.map((e) => /* @__PURE__ */ p("div", {
281
- className: _.calendarContainer,
271
+ w === "days" && j.map((e, t) => /* @__PURE__ */ p("div", {
272
+ className: g.calendarContainer,
282
273
  children: [
283
- k.length > 1 && /* @__PURE__ */ p("button", {
284
- type: "button",
285
- "aria-label": O[e.month],
286
- className: "block w-full text-center font-semibold mb-2 text-brand-text",
274
+ j.length > 1 && /* @__PURE__ */ p("div", {
275
+ className: g.header,
287
276
  children: [
288
- O[e.month],
289
- " ",
290
- k[0].year === k[k.length - 1].year ? "" : e.year
277
+ /* @__PURE__ */ f("div", {
278
+ className: g.navButtonSlotStart,
279
+ children: t === 0 && j.length < 12 && /* @__PURE__ */ f("button", {
280
+ ...H({ calendars: j }),
281
+ onMouseDown: (e) => e.preventDefault(),
282
+ className: g.navButton,
283
+ "aria-label": O.back,
284
+ children: /* @__PURE__ */ f(v, {})
285
+ })
286
+ }),
287
+ /* @__PURE__ */ p("span", {
288
+ className: g.headerTitleContainer,
289
+ children: [A[e.month], j.length < 12 ? ` ${e.year}` : ""]
290
+ }),
291
+ /* @__PURE__ */ f("div", {
292
+ className: g.navButtonSlotEnd,
293
+ children: t === j.length - 1 && j.length < 12 && /* @__PURE__ */ f("button", {
294
+ ...U({ calendars: j }),
295
+ onMouseDown: (e) => e.preventDefault(),
296
+ className: g.navButton,
297
+ "aria-label": O.forward,
298
+ children: /* @__PURE__ */ f(y, {})
299
+ })
300
+ })
291
301
  ]
292
302
  }),
293
303
  /* @__PURE__ */ f("div", {
294
- className: _.weekdayGrid,
295
- children: P.map((e) => /* @__PURE__ */ f("div", {
296
- className: _.weekday,
304
+ className: g.weekdayGrid,
305
+ children: I.map((e) => /* @__PURE__ */ f("div", {
306
+ className: g.weekday,
297
307
  children: e
298
308
  }, e))
299
309
  }),
300
310
  /* @__PURE__ */ f("div", {
301
- className: `${_.daysGrid} ${w === "left" ? "animate-slide-in-left" : w === "right" ? "animate-slide-in-right" : ""}`,
302
- children: e.weeks.map((e, t) => e.map((e, n) => /* @__PURE__ */ f(m, {
311
+ className: `${g.daysGrid} ${E === "left" ? "animate-slide-in-left" : E === "right" ? "animate-slide-in-right" : ""}`,
312
+ children: e.weeks.map((e, t) => e.map((e, n) => /* @__PURE__ */ f(x, {
303
313
  dateObj: e,
304
- getDateProps: M,
305
- classNames: _,
306
- tooltip: e && u?.(e)
314
+ getDateProps: P,
315
+ dayProps: e ? u?.(e) : void 0,
316
+ classNames: g
307
317
  }, `${t}-${n}`)))
308
- })
318
+ }, `daysGrid-${e.month}-${e.year}`)
309
319
  ]
310
320
  }, `${e.month}-${e.year}`))
311
321
  ]
312
322
  }),
313
323
  l && /* @__PURE__ */ f("div", {
314
- className: _.footer,
324
+ className: g.footer,
315
325
  children: l
316
326
  })
317
327
  ]
318
328
  });
319
329
  };
320
330
  //#endregion
321
- export { w as Calendar, y as CalendarHeader, _ as ChevronLeftIcon, v as ChevronRightIcon, m as Day, e as DayjsAdapter, S as MonthSelection, C as YearSelection, r as addMonth, i as composeEventHandlers, t as defaultAdapter, b as defaultClassNames, a as getCalendars, h as getDefaults, g as getTranslations, o as isBackDisabled, s as isForwardDisabled, x as mergeClassNames, c as subtractMonth, n as useDates };
331
+ export { w as Calendar, b as CalendarHeader, v as ChevronLeftIcon, y as ChevronRightIcon, x as Day, e as DayjsAdapter, S as MonthSelection, C as YearSelection, r as addMonth, i as composeEventHandlers, t as defaultAdapter, m as defaultClassNames, a as getCalendars, g as getDefaults, _ as getTranslations, o as isBackDisabled, s as isForwardDisabled, h as mergeClassNames, c as subtractMonth, n as useDates };
322
332
 
323
333
  //# sourceMappingURL=index.js.map