impact-nova 1.1.0 → 1.1.1
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/components/ui/calendar.d.ts +4 -4
- package/dist/components/ui/calendar.js +205 -219
- package/dist/components/ui/date-picker/date-picker.js +47 -48
- package/dist/components/ui/date-picker/date-range-picker.js +4 -4
- package/dist/components/ui/date-picker/month-picker.js +4 -4
- package/dist/components/ui/date-picker/month-range-picker.js +4 -4
- package/dist/components/ui/date-picker/multi-date-picker.js +4 -4
- package/dist/components/ui/date-picker/multi-month-picker.js +4 -4
- package/dist/components/ui/date-picker/multi-week-picker.js +4 -4
- package/dist/components/ui/date-picker/week-picker.js +4 -4
- package/dist/components/ui/date-picker/week-range-picker.js +4 -4
- package/dist/components/ui/types/date-picker.types.d.ts +18 -18
- package/package.json +1 -1
|
@@ -27,8 +27,8 @@ export interface CalendarProps extends Omit<React.ComponentProps<typeof DayPicke
|
|
|
27
27
|
onApply?: (date: Date | Date[] | DateRange | undefined) => void;
|
|
28
28
|
onCancel?: () => void;
|
|
29
29
|
onClear?: () => void;
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
startMonth?: Date;
|
|
31
|
+
endMonth?: Date;
|
|
32
32
|
mode?: "single" | "multiple" | "range";
|
|
33
33
|
selected?: Date | Date[] | DateRange;
|
|
34
34
|
onSelect?: (date: Date | Date[] | DateRange | undefined) => void;
|
|
@@ -51,8 +51,8 @@ export interface CalendarProps extends Omit<React.ComponentProps<typeof DayPicke
|
|
|
51
51
|
selectedMonths?: MonthSelection | MonthSelection[] | MonthRange;
|
|
52
52
|
onMonthSelect?: (months: MonthSelection | MonthSelection[] | MonthRange | undefined) => void;
|
|
53
53
|
}
|
|
54
|
-
declare function Calendar({ className, classNames, showOutsideDays, captionLayout, buttonVariant, formatters, components, showFooter, onApply, onCancel, onClear,
|
|
55
|
-
monthMode, selectedMonths, onMonthSelect, month, defaultMonth, onMonthChange, ...props }: CalendarProps): import("react/jsx-runtime").JSX.Element;
|
|
54
|
+
declare function Calendar({ className, classNames, showOutsideDays, captionLayout, buttonVariant, formatters, components, showFooter, onApply, onCancel, onClear, mode, selected, onSelect, pickerType, weekMode, selectedWeeks, onWeekSelect, calendarType, fiscalMode, selectionMode, fiscalMonthPattern, fiscalYearStartMonth, weekStartsOn, // Default Monday
|
|
55
|
+
monthMode, selectedMonths, onMonthSelect, month, defaultMonth, onMonthChange, startMonth, endMonth, ...props }: CalendarProps): import("react/jsx-runtime").JSX.Element;
|
|
56
56
|
declare function CalendarDayButton({ className, day, modifiers, pickerType, ...props }: React.ComponentProps<typeof DayButton> & {
|
|
57
57
|
pickerType?: "date" | "week" | "month";
|
|
58
58
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as w, jsx as f } from "react/jsx-runtime";
|
|
2
2
|
import * as d from "react";
|
|
3
|
-
import { ChevronLeftIcon as
|
|
4
|
-
import { getDefaultClassNames as
|
|
3
|
+
import { ChevronLeftIcon as pe, ChevronRightIcon as be } from "lucide-react";
|
|
4
|
+
import { getDefaultClassNames as $e, DayPicker as ke } from "react-day-picker";
|
|
5
5
|
import { cn as c } from "../../lib/utils.js";
|
|
6
6
|
import { Button as E } from "./button.js";
|
|
7
|
-
import { buttonVariants as
|
|
8
|
-
import
|
|
9
|
-
import { FISCAL_PATTERNS as
|
|
10
|
-
const
|
|
7
|
+
import { buttonVariants as ve } from "./button-variants.js";
|
|
8
|
+
import ie from "./select/select.js";
|
|
9
|
+
import { FISCAL_PATTERNS as Oe, resolveWeekSelection as Ee } from "../../lib/fiscal-calendar.js";
|
|
10
|
+
const Re = [
|
|
11
11
|
"January",
|
|
12
12
|
"February",
|
|
13
13
|
"March",
|
|
@@ -20,57 +20,53 @@ const Pe = [
|
|
|
20
20
|
"October",
|
|
21
21
|
"November",
|
|
22
22
|
"December"
|
|
23
|
-
],
|
|
24
|
-
function
|
|
25
|
-
className:
|
|
26
|
-
classNames:
|
|
27
|
-
showOutsideDays:
|
|
28
|
-
captionLayout:
|
|
23
|
+
], Ie = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
|
|
24
|
+
function qe({
|
|
25
|
+
className: te,
|
|
26
|
+
classNames: T,
|
|
27
|
+
showOutsideDays: v = !1,
|
|
28
|
+
captionLayout: q = "dropdown",
|
|
29
29
|
buttonVariant: P = "ghost",
|
|
30
|
-
formatters:
|
|
31
|
-
components:
|
|
30
|
+
formatters: G,
|
|
31
|
+
components: De,
|
|
32
32
|
showFooter: h = !0,
|
|
33
|
-
onApply:
|
|
34
|
-
onCancel:
|
|
35
|
-
onClear:
|
|
36
|
-
fromYear: se = 1900,
|
|
37
|
-
toYear: le = 2100,
|
|
33
|
+
onApply: K,
|
|
34
|
+
onCancel: oe,
|
|
35
|
+
onClear: ce,
|
|
38
36
|
mode: J = "single",
|
|
39
37
|
selected: x,
|
|
40
38
|
onSelect: k,
|
|
41
|
-
fromDate: C,
|
|
42
|
-
toDate: _,
|
|
43
|
-
fromMonth: L,
|
|
44
|
-
toMonth: W,
|
|
45
39
|
// Week picker props
|
|
46
40
|
pickerType: u = "date",
|
|
47
|
-
weekMode:
|
|
48
|
-
selectedWeeks:
|
|
49
|
-
onWeekSelect:
|
|
50
|
-
calendarType:
|
|
51
|
-
fiscalMode:
|
|
52
|
-
selectionMode:
|
|
53
|
-
fiscalMonthPattern:
|
|
54
|
-
fiscalYearStartMonth:
|
|
55
|
-
weekStartsOn:
|
|
41
|
+
weekMode: D = "single",
|
|
42
|
+
selectedWeeks: C,
|
|
43
|
+
onWeekSelect: _,
|
|
44
|
+
calendarType: j = "calendar",
|
|
45
|
+
fiscalMode: Q = "basic",
|
|
46
|
+
selectionMode: re = "week",
|
|
47
|
+
fiscalMonthPattern: ne,
|
|
48
|
+
fiscalYearStartMonth: fe = 1,
|
|
49
|
+
weekStartsOn: L = 1,
|
|
56
50
|
// Default Monday
|
|
57
51
|
// Month picker props
|
|
58
|
-
monthMode:
|
|
59
|
-
selectedMonths:
|
|
52
|
+
monthMode: p = "single",
|
|
53
|
+
selectedMonths: y,
|
|
60
54
|
onMonthSelect: N,
|
|
61
55
|
month: R,
|
|
62
|
-
defaultMonth:
|
|
63
|
-
onMonthChange:
|
|
64
|
-
|
|
56
|
+
defaultMonth: ue,
|
|
57
|
+
onMonthChange: ye,
|
|
58
|
+
startMonth: Y,
|
|
59
|
+
endMonth: z,
|
|
60
|
+
...de
|
|
65
61
|
}) {
|
|
66
|
-
const
|
|
67
|
-
if (
|
|
68
|
-
if (
|
|
69
|
-
if (
|
|
62
|
+
const X = d.useMemo(() => {
|
|
63
|
+
if (j === "fiscal") {
|
|
64
|
+
if (ne) return ne;
|
|
65
|
+
if (Q === "advanced") return Oe["4-4-5"];
|
|
70
66
|
}
|
|
71
|
-
}, [
|
|
67
|
+
}, [j, Q, ne]), m = $e(), [W, Z] = d.useState(x), [V, ae] = d.useState(() => {
|
|
72
68
|
if (R) return R;
|
|
73
|
-
if (
|
|
69
|
+
if (ue) return ue;
|
|
74
70
|
if (x) {
|
|
75
71
|
if (Array.isArray(x))
|
|
76
72
|
return x[0] || /* @__PURE__ */ new Date();
|
|
@@ -82,35 +78,35 @@ function Qe({
|
|
|
82
78
|
return /* @__PURE__ */ new Date();
|
|
83
79
|
});
|
|
84
80
|
d.useEffect(() => {
|
|
85
|
-
R && (
|
|
81
|
+
R && (ae(R), ge(R.getFullYear()));
|
|
86
82
|
}, [R]);
|
|
87
|
-
const [I,
|
|
83
|
+
const [I, M] = d.useState(C), [A, ee] = d.useState(y), [me, ge] = d.useState(V.getFullYear());
|
|
88
84
|
d.useEffect(() => {
|
|
89
|
-
|
|
90
|
-
}, [x,
|
|
91
|
-
const
|
|
92
|
-
|
|
93
|
-
},
|
|
85
|
+
Z(x), M(C), ee(y);
|
|
86
|
+
}, [x, C, y]);
|
|
87
|
+
const B = (e) => {
|
|
88
|
+
ae(e), ge(e.getFullYear()), ye?.(e);
|
|
89
|
+
}, se = d.useCallback((e) => {
|
|
94
90
|
let n;
|
|
95
|
-
return e instanceof Date ? n = e : n = e.days.find((t) => !t.outside)?.date || e.days[0]?.date || /* @__PURE__ */ new Date(),
|
|
96
|
-
calendarType:
|
|
97
|
-
fiscalMode:
|
|
98
|
-
selectionMode:
|
|
99
|
-
fiscalMonthPattern:
|
|
100
|
-
fiscalYearStartMonth:
|
|
101
|
-
weekStartsOn:
|
|
91
|
+
return e instanceof Date ? n = e : n = e.days.find((t) => !t.outside)?.date || e.days[0]?.date || /* @__PURE__ */ new Date(), Ee(n, {
|
|
92
|
+
calendarType: j,
|
|
93
|
+
fiscalMode: Q,
|
|
94
|
+
selectionMode: re,
|
|
95
|
+
fiscalMonthPattern: X,
|
|
96
|
+
fiscalYearStartMonth: fe,
|
|
97
|
+
weekStartsOn: L
|
|
102
98
|
});
|
|
103
|
-
}, [
|
|
99
|
+
}, [j, Q, re, X, fe, L]), le = d.useCallback((e) => {
|
|
104
100
|
const n = (t, r) => t.year === r.year && t.month === r.month && t.weekOfMonth === r.weekOfMonth;
|
|
105
101
|
if (h)
|
|
106
|
-
|
|
102
|
+
M((t) => {
|
|
107
103
|
let r;
|
|
108
|
-
if (
|
|
104
|
+
if (D === "single")
|
|
109
105
|
r = e;
|
|
110
|
-
else if (
|
|
106
|
+
else if (D === "multiple") {
|
|
111
107
|
const a = t || [];
|
|
112
108
|
r = a.some((s) => n(s, e)) ? a.filter((s) => !n(s, e)) : [...a, e];
|
|
113
|
-
} else if (
|
|
109
|
+
} else if (D === "range") {
|
|
114
110
|
const a = t;
|
|
115
111
|
if (!a?.from || a.to)
|
|
116
112
|
r = { from: e };
|
|
@@ -119,33 +115,33 @@ function Qe({
|
|
|
119
115
|
e.startDate < a.from.startDate && (l.from = e, l.to = a.from), r = l;
|
|
120
116
|
}
|
|
121
117
|
}
|
|
122
|
-
return
|
|
118
|
+
return _?.(r), r;
|
|
123
119
|
});
|
|
124
|
-
else if (
|
|
125
|
-
|
|
126
|
-
else if (
|
|
127
|
-
const t =
|
|
128
|
-
|
|
129
|
-
} else if (
|
|
130
|
-
const t =
|
|
120
|
+
else if (D === "single")
|
|
121
|
+
_?.(e);
|
|
122
|
+
else if (D === "multiple") {
|
|
123
|
+
const t = C || [], a = t.some((l) => n(l, e)) ? t.filter((l) => !n(l, e)) : [...t, e];
|
|
124
|
+
_?.(a.length > 0 ? a : void 0);
|
|
125
|
+
} else if (D === "range") {
|
|
126
|
+
const t = C;
|
|
131
127
|
if (!t?.from || t.to)
|
|
132
|
-
|
|
128
|
+
_?.({ from: e });
|
|
133
129
|
else {
|
|
134
130
|
const r = { from: t.from, to: e };
|
|
135
|
-
e.startDate < t.from.startDate && (r.from = e, r.to = t.from),
|
|
131
|
+
e.startDate < t.from.startDate && (r.from = e, r.to = t.from), _?.(r);
|
|
136
132
|
}
|
|
137
133
|
}
|
|
138
|
-
}, [
|
|
134
|
+
}, [D, h, C, _]), we = d.useCallback((e, n) => {
|
|
139
135
|
const t = { year: e, month: n }, r = (a, l) => a.year === l.year && a.month === l.month;
|
|
140
136
|
if (h)
|
|
141
|
-
|
|
137
|
+
ee((a) => {
|
|
142
138
|
let l;
|
|
143
|
-
if (
|
|
139
|
+
if (p === "single")
|
|
144
140
|
l = t;
|
|
145
|
-
else if (
|
|
141
|
+
else if (p === "multiple") {
|
|
146
142
|
const s = a || [];
|
|
147
143
|
l = s.some((o) => r(o, t)) ? s.filter((o) => !r(o, t)) : [...s, t];
|
|
148
|
-
} else if (
|
|
144
|
+
} else if (p === "range") {
|
|
149
145
|
const s = a;
|
|
150
146
|
if (!s?.from || s.to)
|
|
151
147
|
l = { from: t };
|
|
@@ -156,13 +152,13 @@ function Qe({
|
|
|
156
152
|
}
|
|
157
153
|
return N?.(l), l;
|
|
158
154
|
});
|
|
159
|
-
else if (
|
|
155
|
+
else if (p === "single")
|
|
160
156
|
N?.(t);
|
|
161
|
-
else if (
|
|
162
|
-
const a =
|
|
157
|
+
else if (p === "multiple") {
|
|
158
|
+
const a = y || [], s = a.some((i) => r(i, t)) ? a.filter((i) => !r(i, t)) : [...a, t];
|
|
163
159
|
N?.(s.length > 0 ? s : void 0);
|
|
164
|
-
} else if (
|
|
165
|
-
const a =
|
|
160
|
+
} else if (p === "range") {
|
|
161
|
+
const a = y;
|
|
166
162
|
if (!a?.from || a.to)
|
|
167
163
|
N?.({ from: t });
|
|
168
164
|
else {
|
|
@@ -170,22 +166,20 @@ function Qe({
|
|
|
170
166
|
new Date(t.year, t.month, 1) < l ? N?.({ from: t, to: a.from }) : N?.({ from: a.from, to: t });
|
|
171
167
|
}
|
|
172
168
|
}
|
|
173
|
-
}, [
|
|
174
|
-
|
|
175
|
-
C && (e = Math.max(e, C.getFullYear())), _ && (n = Math.min(n, _.getFullYear()));
|
|
176
|
-
const t = [];
|
|
169
|
+
}, [p, h, y, N]), he = d.useCallback(() => {
|
|
170
|
+
const e = Y ? Y.getFullYear() : 1900, n = z ? z.getFullYear() : 2100, t = [];
|
|
177
171
|
for (let r = e; r <= n; r++)
|
|
178
172
|
t.push({ label: r.toString(), value: r.toString() });
|
|
179
173
|
return t;
|
|
180
|
-
}, [
|
|
174
|
+
}, [Y, z]), Ne = d.useCallback((e) => Re.map((t, r) => ({
|
|
181
175
|
label: t,
|
|
182
176
|
value: r.toString()
|
|
183
177
|
})).filter((t, r) => {
|
|
184
178
|
const a = new Date(e, r, 1);
|
|
185
|
-
return !(
|
|
186
|
-
}), [
|
|
179
|
+
return !(Y && a < new Date(Y.getFullYear(), Y.getMonth(), 1) || z && a > new Date(z.getFullYear(), z.getMonth(), 1));
|
|
180
|
+
}), [Y, z]), F = d.useMemo(() => {
|
|
187
181
|
if (u !== "week") return;
|
|
188
|
-
const e = h ? I :
|
|
182
|
+
const e = h ? I : C;
|
|
189
183
|
if (!e) return;
|
|
190
184
|
const n = [], t = (r) => {
|
|
191
185
|
let a = new Date(r.startDate);
|
|
@@ -210,10 +204,10 @@ function Qe({
|
|
|
210
204
|
} else
|
|
211
205
|
t(e);
|
|
212
206
|
return n;
|
|
213
|
-
}, [u, h, I,
|
|
214
|
-
if (u !== "week" || !
|
|
207
|
+
}, [u, h, I, C]), Ce = d.useMemo(() => {
|
|
208
|
+
if (u !== "week" || !F || F.length === 0)
|
|
215
209
|
return { range_start: [], range_middle: [], range_end: [] };
|
|
216
|
-
const e = [...
|
|
210
|
+
const e = [...F].sort((s, i) => s.getTime() - i.getTime()), n = [], t = [], r = [], a = (s, i) => {
|
|
217
211
|
if (i === 0) return !1;
|
|
218
212
|
const o = e[i - 1];
|
|
219
213
|
return s.getTime() - o.getTime() <= 1440 * 60 * 1e3;
|
|
@@ -226,24 +220,24 @@ function Qe({
|
|
|
226
220
|
range_middle: t,
|
|
227
221
|
range_end: r
|
|
228
222
|
};
|
|
229
|
-
}, [u,
|
|
223
|
+
}, [u, F]), _e = d.useCallback((e) => {
|
|
230
224
|
if (u === "week" && e) {
|
|
231
225
|
const n = Array.isArray(e) ? e[e.length - 1] : e instanceof Date ? e : void 0;
|
|
232
226
|
if (n) {
|
|
233
|
-
const t =
|
|
234
|
-
|
|
227
|
+
const t = se(n);
|
|
228
|
+
le(t);
|
|
235
229
|
return;
|
|
236
230
|
}
|
|
237
231
|
}
|
|
238
|
-
h &&
|
|
239
|
-
}, [h, k, u,
|
|
240
|
-
u === "week" ? (
|
|
241
|
-
}, [
|
|
242
|
-
u === "week" ?
|
|
243
|
-
}, [x,
|
|
244
|
-
u === "week" ? (
|
|
245
|
-
}, [h, k,
|
|
246
|
-
const t = h ?
|
|
232
|
+
h && Z(e), k?.(e);
|
|
233
|
+
}, [h, k, u, se, le]), Se = d.useCallback(() => {
|
|
234
|
+
u === "week" ? (_?.(I), K?.(I)) : u === "month" ? (N?.(A), K?.(A)) : (k?.(W), K?.(W));
|
|
235
|
+
}, [W, I, A, k, _, N, K, u]), Ae = d.useCallback(() => {
|
|
236
|
+
u === "week" ? M(C) : u === "month" ? ee(y) : Z(x), oe?.();
|
|
237
|
+
}, [x, C, y, oe, u]), je = d.useCallback(() => {
|
|
238
|
+
u === "week" ? (M(void 0), h || _?.(void 0)) : u === "month" ? (ee(void 0), h || N?.(void 0)) : (Z(void 0), h || k?.(void 0)), ce?.();
|
|
239
|
+
}, [h, k, _, N, ce, u]), Ye = d.useCallback((e, n) => {
|
|
240
|
+
const t = h ? A : y;
|
|
247
241
|
if (!t) return !1;
|
|
248
242
|
if (Array.isArray(t))
|
|
249
243
|
return t.some((r) => r.year === e && r.month === n);
|
|
@@ -256,8 +250,8 @@ function Qe({
|
|
|
256
250
|
const r = t;
|
|
257
251
|
return r.year === e && r.month === n;
|
|
258
252
|
}
|
|
259
|
-
}, [h,
|
|
260
|
-
const t = h ?
|
|
253
|
+
}, [h, A, y]), ze = d.useCallback((e, n) => {
|
|
254
|
+
const t = h ? A : y;
|
|
261
255
|
if (!t || !("from" in t)) return { isStart: !1, isEnd: !1, isMiddle: !1 };
|
|
262
256
|
const r = t, a = r.from, l = r.to, s = new Date(e, n, 1).getTime(), i = new Date(a.year, a.month, 1).getTime();
|
|
263
257
|
if (!l) return { isStart: s === i, isEnd: !1, isMiddle: !1 };
|
|
@@ -267,52 +261,52 @@ function Qe({
|
|
|
267
261
|
isEnd: s === o,
|
|
268
262
|
isMiddle: s > i && s < o
|
|
269
263
|
};
|
|
270
|
-
}, [h,
|
|
271
|
-
const n =
|
|
272
|
-
return /* @__PURE__ */
|
|
273
|
-
/* @__PURE__ */
|
|
264
|
+
}, [h, A, y]), xe = ({ yearOffset: e = 0 }) => {
|
|
265
|
+
const n = me + e;
|
|
266
|
+
return /* @__PURE__ */ w("div", { className: "flex flex-col gap-4 p-3 min-w-[280px]", children: [
|
|
267
|
+
/* @__PURE__ */ w("div", { className: "flex items-center justify-between", children: [
|
|
274
268
|
e === 0 && /* @__PURE__ */ f(
|
|
275
269
|
E,
|
|
276
270
|
{
|
|
277
271
|
variant: "ghost",
|
|
278
272
|
size: "sm",
|
|
279
273
|
className: "h-7 w-7 p-0",
|
|
280
|
-
onClick: () =>
|
|
281
|
-
children: /* @__PURE__ */ f(
|
|
274
|
+
onClick: () => B(new Date(n - 1, me % 12, 1)),
|
|
275
|
+
children: /* @__PURE__ */ f(pe, { className: "h-4 w-4" })
|
|
282
276
|
}
|
|
283
277
|
),
|
|
284
278
|
/* @__PURE__ */ f("div", { className: "flex-1 flex justify-center items-center", children: /* @__PURE__ */ f(
|
|
285
|
-
|
|
279
|
+
ie,
|
|
286
280
|
{
|
|
287
281
|
value: { label: n.toString(), value: n.toString() },
|
|
288
282
|
onChange: (t) => {
|
|
289
283
|
if (t && "value" in t) {
|
|
290
284
|
const r = parseInt(t.value) - e;
|
|
291
|
-
|
|
285
|
+
B(new Date(r, 0, 1));
|
|
292
286
|
}
|
|
293
287
|
},
|
|
294
288
|
scrollToSelectedOnOpen: !0,
|
|
295
|
-
options:
|
|
289
|
+
options: he(),
|
|
296
290
|
parentClassName: "flex justify-center items-center",
|
|
297
291
|
className: "w-[200px]",
|
|
298
292
|
menuWidth: "140px"
|
|
299
293
|
}
|
|
300
294
|
) }),
|
|
301
|
-
(
|
|
295
|
+
(p !== "range" || e === 1) && /* @__PURE__ */ f(
|
|
302
296
|
E,
|
|
303
297
|
{
|
|
304
298
|
variant: "ghost",
|
|
305
299
|
size: "sm",
|
|
306
300
|
className: "h-7 w-7 p-0",
|
|
307
|
-
onClick: () =>
|
|
308
|
-
children: /* @__PURE__ */ f(
|
|
301
|
+
onClick: () => B(new Date(n + 1, 0, 1)),
|
|
302
|
+
children: /* @__PURE__ */ f(be, { className: "h-4 w-4" })
|
|
309
303
|
}
|
|
310
304
|
)
|
|
311
305
|
] }),
|
|
312
|
-
/* @__PURE__ */ f("div", { className: "grid grid-cols-4 gap-y-4 gap-x-0", children:
|
|
313
|
-
const a =
|
|
314
|
-
return /* @__PURE__ */
|
|
315
|
-
o &&
|
|
306
|
+
/* @__PURE__ */ f("div", { className: "grid grid-cols-4 gap-y-4 gap-x-0", children: Ie.map((t, r) => {
|
|
307
|
+
const a = Ye(n, r), { isStart: l, isEnd: s, isMiddle: i } = ze(n, r), o = p === "range", g = h ? A : y, b = g && "to" in g && !!g.to;
|
|
308
|
+
return /* @__PURE__ */ w("div", { className: "relative flex items-center justify-center h-10 w-full group", children: [
|
|
309
|
+
o && b && (i || l || s) && /* @__PURE__ */ f("div", { className: c(
|
|
316
310
|
"absolute inset-y-0 inset-x-0 bg-accent",
|
|
317
311
|
l && "rounded-l-full left-1/2 -ml-5",
|
|
318
312
|
s && "rounded-r-full right-1/2 -mr-5",
|
|
@@ -323,7 +317,7 @@ function Qe({
|
|
|
323
317
|
E,
|
|
324
318
|
{
|
|
325
319
|
variant: "ghost",
|
|
326
|
-
onClick: () =>
|
|
320
|
+
onClick: () => we(n, r),
|
|
327
321
|
className: c(
|
|
328
322
|
"relative z-10 w-10 h-10 p-0 text-sm font-normal rounded-lg transition-all",
|
|
329
323
|
a && !o && "bg-primary text-primary-foreground hover:bg-primary/90 hover:text-primary-foreground",
|
|
@@ -338,51 +332,43 @@ function Qe({
|
|
|
338
332
|
}) })
|
|
339
333
|
] });
|
|
340
334
|
};
|
|
341
|
-
return /* @__PURE__ */
|
|
342
|
-
u === "month" ? /* @__PURE__ */
|
|
343
|
-
/* @__PURE__ */ f(
|
|
344
|
-
(
|
|
335
|
+
return /* @__PURE__ */ w("div", { className: "flex flex-col ", "data-component": "calendar", children: [
|
|
336
|
+
u === "month" ? /* @__PURE__ */ w("div", { className: "flex flex-col md:flex-row", children: [
|
|
337
|
+
/* @__PURE__ */ f(xe, { yearOffset: 0 }),
|
|
338
|
+
(p === "range" || p === "multiple") && /* @__PURE__ */ w("div", { className: "flex flex-row gap-0", children: [
|
|
345
339
|
/* @__PURE__ */ f("div", { className: "w-[1px] bg-gray-200 my-4" }),
|
|
346
|
-
/* @__PURE__ */ f(
|
|
340
|
+
/* @__PURE__ */ f(xe, { yearOffset: 1 })
|
|
347
341
|
] })
|
|
348
342
|
] }) : (
|
|
349
343
|
// @ts-ignore: TS mismatch due to dynamic union types.
|
|
350
344
|
// FIX: Split rendering into separate `DayPicker` calls for 'single' | 'multiple' | 'range' to strictly match discriminated unions.
|
|
351
345
|
/* @__PURE__ */ f(
|
|
352
|
-
|
|
346
|
+
ke,
|
|
353
347
|
{
|
|
354
348
|
mode: u === "week" ? "multiple" : J,
|
|
355
|
-
selected: u === "week" ?
|
|
356
|
-
onSelect:
|
|
357
|
-
month:
|
|
358
|
-
onMonthChange:
|
|
359
|
-
showOutsideDays:
|
|
360
|
-
weekStartsOn:
|
|
361
|
-
modifiers: u === "week" ?
|
|
349
|
+
selected: u === "week" ? F : h ? W : x,
|
|
350
|
+
onSelect: _e,
|
|
351
|
+
month: V,
|
|
352
|
+
onMonthChange: B,
|
|
353
|
+
showOutsideDays: j === "fiscal" ? !0 : v,
|
|
354
|
+
weekStartsOn: L,
|
|
355
|
+
modifiers: u === "week" ? Ce : void 0,
|
|
362
356
|
className: c(
|
|
363
357
|
"bg-background group/calendar p-2 [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",
|
|
364
358
|
String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,
|
|
365
359
|
String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,
|
|
366
|
-
|
|
360
|
+
te
|
|
367
361
|
),
|
|
368
|
-
captionLayout:
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
disabled:
|
|
372
|
-
|
|
373
|
-
C ? { before: C } : void 0,
|
|
374
|
-
_ ? { after: _ } : void 0
|
|
375
|
-
].filter(Boolean),
|
|
376
|
-
fromMonth: L,
|
|
377
|
-
toMonth: W,
|
|
378
|
-
fromYear: se,
|
|
379
|
-
toYear: le,
|
|
380
|
-
numberOfMonths: J === "range" || J === "multiple" || y === "range" || y === "multiple" ? 2 : 1,
|
|
362
|
+
captionLayout: q,
|
|
363
|
+
startMonth: Y,
|
|
364
|
+
endMonth: z,
|
|
365
|
+
disabled: de.disabled,
|
|
366
|
+
numberOfMonths: J === "range" || J === "multiple" || D === "range" || D === "multiple" ? 2 : 1,
|
|
381
367
|
showWeekNumber: !0,
|
|
382
368
|
formatters: {
|
|
383
369
|
formatMonthDropdown: (e) => e.toLocaleString("default", { month: "short" }),
|
|
384
370
|
formatWeekNumber: (e) => `W${e}`,
|
|
385
|
-
...
|
|
371
|
+
...G
|
|
386
372
|
},
|
|
387
373
|
classNames: {
|
|
388
374
|
root: c("w-fit", m.root),
|
|
@@ -399,12 +385,12 @@ function Qe({
|
|
|
399
385
|
m.nav
|
|
400
386
|
),
|
|
401
387
|
button_previous: c(
|
|
402
|
-
|
|
388
|
+
ve({ variant: P }),
|
|
403
389
|
"h-[--cell-size] w-[--cell-size] select-none p-0.2 z-10 aria-disabled:opacity-50 flex items-center justify-center relative",
|
|
404
390
|
m.button_previous
|
|
405
391
|
),
|
|
406
392
|
button_next: c(
|
|
407
|
-
|
|
393
|
+
ve({ variant: P }),
|
|
408
394
|
"h-[--cell-size] w-[--cell-size] select-none p-0.2 z-10 aria-disabled:opacity-50 flex items-center justify-center relative",
|
|
409
395
|
m.button_next
|
|
410
396
|
),
|
|
@@ -444,7 +430,7 @@ function Qe({
|
|
|
444
430
|
"group/day relative select-none p-0 text-center flex-1 h-[30px] flex items-center justify-center [&:nth-child(2)]:pl-2 rdp-day",
|
|
445
431
|
u === "week" && "group-hover/week:bg-accent [&:nth-child(2)]:group-hover/week:rounded-l-full [&:nth-child(8)]:group-hover/week:rounded-r-full",
|
|
446
432
|
u === "week" && "[&.rdp-selected:nth-child(2)]:rounded-l-full [&.rdp-selected:nth-child(8)]:rounded-r-full",
|
|
447
|
-
|
|
433
|
+
T?.day
|
|
448
434
|
),
|
|
449
435
|
range_start: c(
|
|
450
436
|
"bg-accent rounded-l-full",
|
|
@@ -457,7 +443,7 @@ function Qe({
|
|
|
457
443
|
m.today
|
|
458
444
|
),
|
|
459
445
|
outside: c(
|
|
460
|
-
|
|
446
|
+
j === "fiscal" || v ? "text-muted-foreground opacity-50" : "invisible",
|
|
461
447
|
m.outside
|
|
462
448
|
),
|
|
463
449
|
disabled: c(
|
|
@@ -465,7 +451,7 @@ function Qe({
|
|
|
465
451
|
m.disabled
|
|
466
452
|
),
|
|
467
453
|
hidden: c("invisible", m.hidden),
|
|
468
|
-
...
|
|
454
|
+
...T
|
|
469
455
|
},
|
|
470
456
|
components: {
|
|
471
457
|
Root: ({ className: e, rootRef: n, ...t }) => /* @__PURE__ */ f(
|
|
@@ -477,23 +463,23 @@ function Qe({
|
|
|
477
463
|
...t
|
|
478
464
|
}
|
|
479
465
|
),
|
|
480
|
-
Chevron: ({ className: e, orientation: n, ...t }) => n === "left" ? /* @__PURE__ */ f(
|
|
481
|
-
|
|
466
|
+
Chevron: ({ className: e, orientation: n, ...t }) => n === "left" ? /* @__PURE__ */ f(pe, { className: c("size-4 text-foreground", e), ...t }) : n === "right" ? /* @__PURE__ */ f(
|
|
467
|
+
be,
|
|
482
468
|
{
|
|
483
469
|
className: c("size-4 text-foreground", e),
|
|
484
470
|
...t
|
|
485
471
|
}
|
|
486
472
|
) : /* @__PURE__ */ f("span", {}),
|
|
487
473
|
MonthsDropdown: ({ value: e, onChange: n }) => {
|
|
488
|
-
const t =
|
|
474
|
+
const t = V.getFullYear(), r = Ne(t);
|
|
489
475
|
return /* @__PURE__ */ f(
|
|
490
|
-
|
|
476
|
+
ie,
|
|
491
477
|
{
|
|
492
478
|
value: r.find((a) => a.value === e?.toString()),
|
|
493
479
|
onChange: (a) => {
|
|
494
480
|
if (a && "value" in a) {
|
|
495
481
|
const l = parseInt(a.value), s = new Date(t, l, 1);
|
|
496
|
-
|
|
482
|
+
B(s), n?.(l);
|
|
497
483
|
}
|
|
498
484
|
},
|
|
499
485
|
scrollToSelectedOnOpen: !0,
|
|
@@ -507,15 +493,15 @@ function Qe({
|
|
|
507
493
|
);
|
|
508
494
|
},
|
|
509
495
|
YearsDropdown: ({ value: e, onChange: n }) => {
|
|
510
|
-
const t =
|
|
496
|
+
const t = he();
|
|
511
497
|
return /* @__PURE__ */ f(
|
|
512
|
-
|
|
498
|
+
ie,
|
|
513
499
|
{
|
|
514
500
|
value: t.find((r) => r.value === e?.toString()),
|
|
515
501
|
onChange: (r) => {
|
|
516
502
|
if (r && "value" in r) {
|
|
517
|
-
const a = parseInt(r.value), l = new Date(a,
|
|
518
|
-
|
|
503
|
+
const a = parseInt(r.value), l = new Date(a, V.getMonth(), 1);
|
|
504
|
+
ae(l), n?.(a);
|
|
519
505
|
}
|
|
520
506
|
},
|
|
521
507
|
scrollToSelectedOnOpen: !0,
|
|
@@ -529,7 +515,7 @@ function Qe({
|
|
|
529
515
|
);
|
|
530
516
|
},
|
|
531
517
|
DayButton: (e) => /* @__PURE__ */ f(
|
|
532
|
-
|
|
518
|
+
Ue,
|
|
533
519
|
{
|
|
534
520
|
...e,
|
|
535
521
|
pickerType: u
|
|
@@ -539,16 +525,16 @@ function Qe({
|
|
|
539
525
|
const t = e.days.find((H) => !H.outside)?.date;
|
|
540
526
|
if (!t)
|
|
541
527
|
return /* @__PURE__ */ f("td", { ...n, className: c("select-none flex items-center justify-center h-8 text-[11px] text-[#757575] w-8 flex-shrink-0 rdp-week_number", n.className), children: /* @__PURE__ */ f("div", { className: "flex size-[--cell-size] items-center justify-center text-center" }) });
|
|
542
|
-
const r = t.getFullYear(), a = t.getMonth(), i = (new Date(r, a, 1).getDay() + 7 -
|
|
528
|
+
const r = t.getFullYear(), a = t.getMonth(), i = (new Date(r, a, 1).getDay() + 7 - L) % 7, o = new Date(r, a, 1 - i), g = new Date(t), $ = (t.getDay() + 7 - L) % 7;
|
|
543
529
|
g.setDate(t.getDate() - $);
|
|
544
|
-
const
|
|
530
|
+
const S = Math.round((g.getTime() - o.getTime()) / (10080 * 60 * 1e3)) + 1, U = `Week ${S}`;
|
|
545
531
|
return u === "week" ? /* @__PURE__ */ f(
|
|
546
532
|
"td",
|
|
547
533
|
{
|
|
548
534
|
...n,
|
|
549
535
|
"aria-label": U,
|
|
550
|
-
"data-week-index":
|
|
551
|
-
"data-week-number":
|
|
536
|
+
"data-week-index": S,
|
|
537
|
+
"data-week-number": S,
|
|
552
538
|
className: c(
|
|
553
539
|
"select-none flex items-center justify-center h-[30px] w-[30px] flex-shrink-0 rdp-week_number cursor-pointer hover:bg-accent hover:text-accent-foreground group-hover/week:bg-accent group-hover/week:rounded-l-lg rounded-lg transition-colors",
|
|
554
540
|
n.className
|
|
@@ -556,11 +542,11 @@ function Qe({
|
|
|
556
542
|
scope: "row",
|
|
557
543
|
role: "rowheader",
|
|
558
544
|
onClick: (H) => {
|
|
559
|
-
H.preventDefault(), H.stopPropagation(),
|
|
545
|
+
H.preventDefault(), H.stopPropagation(), le(se(e));
|
|
560
546
|
},
|
|
561
|
-
children: /* @__PURE__ */
|
|
547
|
+
children: /* @__PURE__ */ w("div", { className: "flex h-8 w-full items-center justify-center text-center text-[11px] text-[#757575]", children: [
|
|
562
548
|
"W",
|
|
563
|
-
|
|
549
|
+
S
|
|
564
550
|
] })
|
|
565
551
|
}
|
|
566
552
|
) : /* @__PURE__ */ f(
|
|
@@ -574,24 +560,24 @@ function Qe({
|
|
|
574
560
|
),
|
|
575
561
|
scope: "row",
|
|
576
562
|
role: "rowheader",
|
|
577
|
-
children: /* @__PURE__ */
|
|
563
|
+
children: /* @__PURE__ */ w("div", { className: "flex h-8 w-full items-center justify-center text-center", children: [
|
|
578
564
|
"W",
|
|
579
|
-
|
|
565
|
+
S
|
|
580
566
|
] })
|
|
581
567
|
}
|
|
582
568
|
);
|
|
583
569
|
},
|
|
584
|
-
...
|
|
570
|
+
...De
|
|
585
571
|
},
|
|
586
|
-
...
|
|
572
|
+
...de
|
|
587
573
|
}
|
|
588
574
|
)
|
|
589
575
|
),
|
|
590
|
-
h && /* @__PURE__ */
|
|
591
|
-
J === "range" && u === "date" && /* @__PURE__ */
|
|
576
|
+
h && /* @__PURE__ */ w("div", { className: c("flex items-center gap-2 border-t pt-3 p-3", u === "month" && p !== "single" || J === "range" || D === "range" || D === "multiple" ? "justify-between" : "justify-end"), children: [
|
|
577
|
+
J === "range" && u === "date" && /* @__PURE__ */ w("div", { className: "flex flex-row items-center gap-1 text-[#60697d] text-xs leading-[18px] font-medium", children: [
|
|
592
578
|
"Selected:",
|
|
593
579
|
/* @__PURE__ */ f("span", { className: "text-[#0d152c] font-semibold", children: (() => {
|
|
594
|
-
const e =
|
|
580
|
+
const e = W;
|
|
595
581
|
if (e?.from && e?.to) {
|
|
596
582
|
const n = Math.abs(e.to.getTime() - e.from.getTime()), t = Math.ceil(n / (1e3 * 60 * 60 * 24)) + 1;
|
|
597
583
|
return `${t} day${t !== 1 ? "s" : ""}`;
|
|
@@ -599,15 +585,15 @@ function Qe({
|
|
|
599
585
|
return "0 days";
|
|
600
586
|
})() })
|
|
601
587
|
] }),
|
|
602
|
-
u === "week" && (
|
|
588
|
+
u === "week" && (D === "range" || D === "multiple") && /* @__PURE__ */ w("div", { className: "flex flex-row items-center gap-1 text-[#60697d] text-xs leading-[18px] font-medium", children: [
|
|
603
589
|
"Selected:",
|
|
604
590
|
/* @__PURE__ */ f("span", { className: "text-[#0d152c] font-semibold", children: (() => {
|
|
605
591
|
const e = I;
|
|
606
592
|
if (!e) return "0 weeks";
|
|
607
593
|
const n = (i) => Date.UTC(i.getFullYear(), i.getMonth(), i.getDate()), t = (i) => {
|
|
608
|
-
const o = Math.floor(i / 7), g = i % 7,
|
|
609
|
-
return o > 0 &&
|
|
610
|
-
}, r =
|
|
594
|
+
const o = Math.floor(i / 7), g = i % 7, b = [];
|
|
595
|
+
return o > 0 && b.push(`${o} week${o !== 1 ? "s" : ""}`), (g > 0 || o === 0) && b.push(`${g} day${g !== 1 ? "s" : ""}`), b.join(" ");
|
|
596
|
+
}, r = j === "fiscal" && re === "fiscalMonth", a = j === "fiscal", l = r ? "fiscal month" : a ? "fiscal week" : "week", s = r ? "fiscal months" : a ? "fiscal weeks" : "weeks";
|
|
611
597
|
if (Array.isArray(e))
|
|
612
598
|
if (a || r) {
|
|
613
599
|
const i = e.length;
|
|
@@ -615,36 +601,36 @@ function Qe({
|
|
|
615
601
|
} else {
|
|
616
602
|
let i = 0;
|
|
617
603
|
return e.forEach((o) => {
|
|
618
|
-
const g = n(o.startDate),
|
|
619
|
-
i += Math.round((
|
|
604
|
+
const g = n(o.startDate), b = n(o.endDate);
|
|
605
|
+
i += Math.round((b - g) / (1e3 * 60 * 60 * 24)) + 1;
|
|
620
606
|
}), t(i);
|
|
621
607
|
}
|
|
622
608
|
else if ("from" in e) {
|
|
623
609
|
const { from: i, to: o } = e;
|
|
624
610
|
if (r) {
|
|
625
611
|
if (!o) return `1 ${l}`;
|
|
626
|
-
const g = n(i.startDate),
|
|
627
|
-
return `${
|
|
612
|
+
const g = n(i.startDate), b = n(o.endDate), $ = Math.round(Math.abs(b - g) / (1e3 * 60 * 60 * 24)) + 1, O = X ? X.reduce((U, H) => U + H, 0) / 12 : 4.33, S = Math.max(1, Math.round($ / (O * 7)));
|
|
613
|
+
return `${S} ${S !== 1 ? s : l}`;
|
|
628
614
|
} else if (a) {
|
|
629
615
|
if (!o) return `1 ${l}`;
|
|
630
|
-
const g = n(i.startDate),
|
|
616
|
+
const g = n(i.startDate), b = n(o.endDate), $ = Math.round((b - g) / (10080 * 60 * 1e3)), O = $ > 0 ? $ : 1;
|
|
631
617
|
return `${O} ${O !== 1 ? s : l}`;
|
|
632
618
|
} else {
|
|
633
619
|
if (!o) {
|
|
634
|
-
const O = n(i.startDate),
|
|
620
|
+
const O = n(i.startDate), S = n(i.endDate), U = Math.round((S - O) / (1e3 * 60 * 60 * 24)) + 1;
|
|
635
621
|
return t(U);
|
|
636
622
|
}
|
|
637
|
-
const g = n(i.startDate),
|
|
623
|
+
const g = n(i.startDate), b = n(o.endDate), $ = Math.round(Math.abs(b - g) / (1e3 * 60 * 60 * 24)) + 1;
|
|
638
624
|
return t($);
|
|
639
625
|
}
|
|
640
626
|
} else
|
|
641
627
|
return `1 ${l}`;
|
|
642
628
|
})() })
|
|
643
629
|
] }),
|
|
644
|
-
u === "month" && (
|
|
630
|
+
u === "month" && (p === "range" || p === "multiple") && /* @__PURE__ */ w("div", { className: "flex flex-row items-center gap-1 text-[#60697d] text-xs leading-[18px] font-medium", children: [
|
|
645
631
|
"Selected:",
|
|
646
632
|
/* @__PURE__ */ f("span", { className: "text-[#0d152c] font-semibold", children: (() => {
|
|
647
|
-
const e =
|
|
633
|
+
const e = A;
|
|
648
634
|
if (!e) return "0 months";
|
|
649
635
|
if (Array.isArray(e)) {
|
|
650
636
|
const n = e.length;
|
|
@@ -658,13 +644,13 @@ function Qe({
|
|
|
658
644
|
return "1 month";
|
|
659
645
|
})() })
|
|
660
646
|
] }),
|
|
661
|
-
/* @__PURE__ */
|
|
647
|
+
/* @__PURE__ */ w("div", { className: "flex items-center gap-2", children: [
|
|
662
648
|
/* @__PURE__ */ f(
|
|
663
649
|
E,
|
|
664
650
|
{
|
|
665
651
|
variant: "link",
|
|
666
652
|
size: "sm",
|
|
667
|
-
onClick:
|
|
653
|
+
onClick: je,
|
|
668
654
|
children: "Clear"
|
|
669
655
|
}
|
|
670
656
|
),
|
|
@@ -673,7 +659,7 @@ function Qe({
|
|
|
673
659
|
{
|
|
674
660
|
variant: "outline",
|
|
675
661
|
size: "sm",
|
|
676
|
-
onClick:
|
|
662
|
+
onClick: Ae,
|
|
677
663
|
children: "Cancel"
|
|
678
664
|
}
|
|
679
665
|
),
|
|
@@ -682,7 +668,7 @@ function Qe({
|
|
|
682
668
|
{
|
|
683
669
|
variant: "default",
|
|
684
670
|
size: "sm",
|
|
685
|
-
onClick:
|
|
671
|
+
onClick: Se,
|
|
686
672
|
children: "Apply"
|
|
687
673
|
}
|
|
688
674
|
)
|
|
@@ -690,46 +676,46 @@ function Qe({
|
|
|
690
676
|
] })
|
|
691
677
|
] });
|
|
692
678
|
}
|
|
693
|
-
function
|
|
694
|
-
className:
|
|
695
|
-
day:
|
|
696
|
-
modifiers:
|
|
697
|
-
pickerType:
|
|
679
|
+
function Ue({
|
|
680
|
+
className: te,
|
|
681
|
+
day: T,
|
|
682
|
+
modifiers: v,
|
|
683
|
+
pickerType: q,
|
|
698
684
|
...P
|
|
699
685
|
}) {
|
|
700
|
-
const
|
|
686
|
+
const G = d.useRef(null);
|
|
701
687
|
return d.useEffect(() => {
|
|
702
|
-
|
|
703
|
-
}, [
|
|
688
|
+
v.focused && G.current?.focus();
|
|
689
|
+
}, [v.focused]), /* @__PURE__ */ f(
|
|
704
690
|
E,
|
|
705
691
|
{
|
|
706
|
-
ref:
|
|
692
|
+
ref: G,
|
|
707
693
|
variant: "ghost",
|
|
708
694
|
size: "sm",
|
|
709
|
-
"data-day":
|
|
710
|
-
"data-selected-single":
|
|
711
|
-
"data-range-start":
|
|
712
|
-
"data-range-end":
|
|
713
|
-
"data-range-middle":
|
|
695
|
+
"data-day": T.date.toLocaleDateString(),
|
|
696
|
+
"data-selected-single": v.selected && !v.range_start && !v.range_end && !v.range_middle,
|
|
697
|
+
"data-range-start": v.range_start,
|
|
698
|
+
"data-range-end": v.range_end,
|
|
699
|
+
"data-range-middle": v.range_middle,
|
|
714
700
|
className: c(
|
|
715
701
|
"gap-2 whitespace-nowrap focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 px-3 rounded-lg flex items-center justify-center font-normal transition-colors w-5 h-5 border border-transparent focus-visible:outline-none text-sm rdp-day rdp-day_button",
|
|
716
702
|
// Hover styling
|
|
717
|
-
|
|
718
|
-
|
|
703
|
+
q !== "week" && "hover:bg-accent hover:text-accent-foreground hover:border-primary",
|
|
704
|
+
q === "week" && "hover:bg-transparent hover:text-inherit hover:border-transparent",
|
|
719
705
|
// Selection state
|
|
720
706
|
"data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[selected-single=true]:rounded-lg data-[selected-single=true]:border-transparent",
|
|
721
707
|
"data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-start=true]:rounded-lg data-[range-start=true]:border-transparent",
|
|
722
708
|
"data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-end=true]:rounded-lg data-[range-end=true]:border-transparent",
|
|
723
709
|
"data-[range-middle=true]:text-accent-foreground data-[range-middle=true]:rounded-none",
|
|
724
|
-
|
|
710
|
+
te
|
|
725
711
|
),
|
|
726
712
|
"data-component": "calendar-day",
|
|
727
713
|
...P,
|
|
728
|
-
disabled: P.disabled ||
|
|
714
|
+
disabled: P.disabled || v.disabled
|
|
729
715
|
}
|
|
730
716
|
);
|
|
731
717
|
}
|
|
732
718
|
export {
|
|
733
|
-
|
|
734
|
-
|
|
719
|
+
qe as Calendar,
|
|
720
|
+
Ue as CalendarDayButton
|
|
735
721
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsxs as V, jsx as l } from "react/jsx-runtime";
|
|
2
|
-
import * as
|
|
3
|
-
import { X as
|
|
4
|
-
import { CalendarMonth as
|
|
2
|
+
import * as r from "react";
|
|
3
|
+
import { X as q } from "lucide-react";
|
|
4
|
+
import { CalendarMonth as z } from "../../../icons/index.js";
|
|
5
5
|
import { format as a, isValid as x, parse as C } from "date-fns";
|
|
6
|
-
import { cn as
|
|
7
|
-
import { Input as
|
|
8
|
-
import { Popover as
|
|
9
|
-
import { Calendar as
|
|
10
|
-
const
|
|
6
|
+
import { cn as G, padValidDateString as J, maskDate as K } from "../../../lib/utils.js";
|
|
7
|
+
import { Input as Q } from "../input.js";
|
|
8
|
+
import { Popover as U, PopoverTrigger as W, PopoverContent as Y } from "../popover.js";
|
|
9
|
+
import { Calendar as Z } from "../calendar.js";
|
|
10
|
+
const _ = r.forwardRef(
|
|
11
11
|
({
|
|
12
12
|
value: e,
|
|
13
13
|
onChange: p,
|
|
@@ -15,64 +15,64 @@ const $ = o.forwardRef(
|
|
|
15
15
|
placeholder: k = "Select Date",
|
|
16
16
|
minDate: I,
|
|
17
17
|
maxDate: M,
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
startMonth: N,
|
|
19
|
+
endMonth: A,
|
|
20
20
|
showFooter: f = !0,
|
|
21
21
|
disabled: P,
|
|
22
22
|
className: E,
|
|
23
23
|
...O
|
|
24
24
|
}, T) => {
|
|
25
|
-
const g =
|
|
26
|
-
|
|
27
|
-
const [
|
|
28
|
-
|
|
25
|
+
const g = r.useRef(null), h = r.useRef(null);
|
|
26
|
+
r.useImperativeHandle(T, () => g.current);
|
|
27
|
+
const [o, d] = r.useState(!1), [S, s] = r.useState(e), [i, c] = r.useState(e ? a(e, t) : ""), [j, y] = r.useState(e || /* @__PURE__ */ new Date());
|
|
28
|
+
r.useEffect(() => {
|
|
29
29
|
g.current && h.current !== null && (g.current.setSelectionRange(h.current, h.current), h.current = null);
|
|
30
|
-
}, [i]),
|
|
31
|
-
!
|
|
32
|
-
}, [e, t,
|
|
33
|
-
|
|
34
|
-
}, [
|
|
30
|
+
}, [i]), r.useEffect(() => {
|
|
31
|
+
!o && e && (c(a(e, t)), s(e));
|
|
32
|
+
}, [e, t, o]), r.useEffect(() => {
|
|
33
|
+
o && (s(e), y(e || /* @__PURE__ */ new Date()));
|
|
34
|
+
}, [o, e]);
|
|
35
35
|
const B = (n) => {
|
|
36
36
|
s(n), n && c(a(n, t)), f || (p?.(n), d(!1));
|
|
37
|
-
},
|
|
37
|
+
}, b = (n) => {
|
|
38
38
|
p?.(n !== void 0 ? n : S), d(!1);
|
|
39
|
-
},
|
|
39
|
+
}, v = () => {
|
|
40
40
|
s(e), c(e ? a(e, t) : ""), d(!1);
|
|
41
41
|
}, w = () => {
|
|
42
42
|
s(void 0), c(""), p?.(void 0), f || d(!1);
|
|
43
|
-
},
|
|
44
|
-
const u = n.target.value, m =
|
|
43
|
+
}, H = (n) => {
|
|
44
|
+
const u = n.target.value, m = K(u, t, i);
|
|
45
45
|
if (c(m), m === "") {
|
|
46
46
|
s(void 0), f || p?.(void 0);
|
|
47
47
|
return;
|
|
48
48
|
}
|
|
49
49
|
const D = C(m, t, /* @__PURE__ */ new Date());
|
|
50
50
|
x(D) && m.length === t.length && (s(D), y(D), f || p?.(D));
|
|
51
|
-
},
|
|
52
|
-
if (
|
|
53
|
-
const n =
|
|
51
|
+
}, L = () => {
|
|
52
|
+
if (o) return;
|
|
53
|
+
const n = J(i, t), u = C(n, t, /* @__PURE__ */ new Date());
|
|
54
54
|
!x(u) || n.length !== t.length ? (c(e ? a(e, t) : ""), s(e)) : (c(n), f || p?.(u));
|
|
55
|
-
}, R = (e ? a(e, t) : "") !== i,
|
|
56
|
-
return /* @__PURE__ */ V(
|
|
57
|
-
/* @__PURE__ */ l(
|
|
58
|
-
|
|
55
|
+
}, R = (e ? a(e, t) : "") !== i, X = i.length === t.length && !x(C(i, t, /* @__PURE__ */ new Date()));
|
|
56
|
+
return /* @__PURE__ */ V(U, { open: o, onOpenChange: d, children: [
|
|
57
|
+
/* @__PURE__ */ l(W, { asChild: !0, children: /* @__PURE__ */ l("div", { "data-component": "date-picker", "data-state": o ? "open" : "closed", "data-pending": R || void 0, children: /* @__PURE__ */ l(
|
|
58
|
+
Q,
|
|
59
59
|
{
|
|
60
60
|
ref: g,
|
|
61
61
|
value: i,
|
|
62
|
-
onChange:
|
|
63
|
-
onBlur:
|
|
64
|
-
onClick: (n) =>
|
|
65
|
-
placeholder:
|
|
62
|
+
onChange: H,
|
|
63
|
+
onBlur: L,
|
|
64
|
+
onClick: (n) => o && n.stopPropagation(),
|
|
65
|
+
placeholder: o ? t : k,
|
|
66
66
|
disabled: P,
|
|
67
67
|
"data-form-control": "input",
|
|
68
|
-
className:
|
|
68
|
+
className: G(
|
|
69
69
|
"cursor-pointer",
|
|
70
|
-
|
|
70
|
+
X ? "text-destructive" : R ? "text-muted-foreground" : "",
|
|
71
71
|
E
|
|
72
72
|
),
|
|
73
73
|
suffix: /* @__PURE__ */ V("div", { className: "flex items-center gap-1", children: [
|
|
74
74
|
e && !P && /* @__PURE__ */ l(
|
|
75
|
-
|
|
75
|
+
q,
|
|
76
76
|
{
|
|
77
77
|
className: "h-4 w-4 cursor-pointer hover:text-foreground",
|
|
78
78
|
onClick: (n) => {
|
|
@@ -80,32 +80,31 @@ const $ = o.forwardRef(
|
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
),
|
|
83
|
-
/* @__PURE__ */ l(
|
|
83
|
+
/* @__PURE__ */ l(z, { className: "h-4 w-4 text-secondary-foreground" })
|
|
84
84
|
] }),
|
|
85
85
|
...O
|
|
86
86
|
}
|
|
87
87
|
) }) }),
|
|
88
88
|
/* @__PURE__ */ l(
|
|
89
|
-
|
|
89
|
+
Y,
|
|
90
90
|
{
|
|
91
91
|
className: "w-auto p-0",
|
|
92
92
|
align: "start",
|
|
93
93
|
onOpenAutoFocus: (n) => n.preventDefault(),
|
|
94
94
|
children: /* @__PURE__ */ l(
|
|
95
|
-
|
|
95
|
+
Z,
|
|
96
96
|
{
|
|
97
97
|
mode: "single",
|
|
98
98
|
selected: S,
|
|
99
99
|
onSelect: B,
|
|
100
100
|
month: j,
|
|
101
101
|
onMonthChange: y,
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
toYear: A,
|
|
102
|
+
disabled: { before: I, after: M },
|
|
103
|
+
startMonth: N,
|
|
104
|
+
endMonth: A,
|
|
106
105
|
showFooter: f,
|
|
107
|
-
onApply:
|
|
108
|
-
onCancel:
|
|
106
|
+
onApply: b,
|
|
107
|
+
onCancel: v,
|
|
109
108
|
onClear: w,
|
|
110
109
|
captionLayout: "dropdown"
|
|
111
110
|
}
|
|
@@ -115,7 +114,7 @@ const $ = o.forwardRef(
|
|
|
115
114
|
] });
|
|
116
115
|
}
|
|
117
116
|
);
|
|
118
|
-
|
|
117
|
+
_.displayName = "DatePicker";
|
|
119
118
|
export {
|
|
120
|
-
|
|
119
|
+
_ as DatePicker
|
|
121
120
|
};
|
|
@@ -15,8 +15,8 @@ const ae = i.forwardRef(
|
|
|
15
15
|
endPlaceholder: O = "End Date",
|
|
16
16
|
minDate: T,
|
|
17
17
|
maxDate: z,
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
startMonth: H,
|
|
19
|
+
endMonth: L,
|
|
20
20
|
showFooter: m = !0,
|
|
21
21
|
disabled: x,
|
|
22
22
|
label: P,
|
|
@@ -174,8 +174,8 @@ const ae = i.forwardRef(
|
|
|
174
174
|
month: Q,
|
|
175
175
|
onMonthChange: I,
|
|
176
176
|
disabled: { before: T, after: z },
|
|
177
|
-
|
|
178
|
-
|
|
177
|
+
startMonth: H,
|
|
178
|
+
endMonth: L,
|
|
179
179
|
showFooter: m,
|
|
180
180
|
onApply: W,
|
|
181
181
|
onCancel: Y,
|
|
@@ -14,8 +14,8 @@ const c = (t) => `${(t.month + 1).toString().padStart(2, "0")}/${t.year}`, Z = n
|
|
|
14
14
|
placeholder: k = "Select Month",
|
|
15
15
|
minDate: V,
|
|
16
16
|
maxDate: I,
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
startMonth: N,
|
|
18
|
+
endMonth: Y,
|
|
19
19
|
showFooter: p = !0,
|
|
20
20
|
disabled: u,
|
|
21
21
|
className: A,
|
|
@@ -106,8 +106,8 @@ const c = (t) => `${(t.month + 1).toString().padStart(2, "0")}/${t.year}`, Z = n
|
|
|
106
106
|
month: O,
|
|
107
107
|
onMonthChange: y,
|
|
108
108
|
disabled: { before: V, after: I },
|
|
109
|
-
|
|
110
|
-
|
|
109
|
+
startMonth: N,
|
|
110
|
+
endMonth: Y,
|
|
111
111
|
showFooter: p,
|
|
112
112
|
onApply: B,
|
|
113
113
|
onCancel: E,
|
|
@@ -13,8 +13,8 @@ const o = (t) => `${(t.month + 1).toString().padStart(2, "0")}/${t.year}`, ct =
|
|
|
13
13
|
placeholder: lt = "Select Month Range",
|
|
14
14
|
minDate: B,
|
|
15
15
|
maxDate: O,
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
startMonth: T,
|
|
17
|
+
endMonth: $,
|
|
18
18
|
showFooter: f = !0,
|
|
19
19
|
disabled: g,
|
|
20
20
|
className: z,
|
|
@@ -175,8 +175,8 @@ const o = (t) => `${(t.month + 1).toString().padStart(2, "0")}/${t.year}`, ct =
|
|
|
175
175
|
month: J,
|
|
176
176
|
onMonthChange: P,
|
|
177
177
|
disabled: { before: B, after: O },
|
|
178
|
-
|
|
179
|
-
|
|
178
|
+
startMonth: T,
|
|
179
|
+
endMonth: $,
|
|
180
180
|
showFooter: f,
|
|
181
181
|
onApply: L,
|
|
182
182
|
onCancel: Q,
|
|
@@ -15,8 +15,8 @@ const I = s.forwardRef(
|
|
|
15
15
|
placeholder: h = "Select Dates",
|
|
16
16
|
minDate: u,
|
|
17
17
|
maxDate: y,
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
startMonth: g,
|
|
19
|
+
endMonth: C,
|
|
20
20
|
showFooter: l = !0,
|
|
21
21
|
disabled: c,
|
|
22
22
|
className: x,
|
|
@@ -73,8 +73,8 @@ const I = s.forwardRef(
|
|
|
73
73
|
selected: p,
|
|
74
74
|
onSelect: A,
|
|
75
75
|
disabled: { before: u, after: y },
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
startMonth: g,
|
|
77
|
+
endMonth: C,
|
|
78
78
|
showFooter: l,
|
|
79
79
|
onApply: D,
|
|
80
80
|
onCancel: M,
|
|
@@ -13,8 +13,8 @@ const v = s.forwardRef(
|
|
|
13
13
|
placeholder: f = "Select Months",
|
|
14
14
|
minDate: h,
|
|
15
15
|
maxDate: u,
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
startMonth: g,
|
|
17
|
+
endMonth: y,
|
|
18
18
|
showFooter: l = !0,
|
|
19
19
|
disabled: a,
|
|
20
20
|
className: M,
|
|
@@ -72,8 +72,8 @@ const v = s.forwardRef(
|
|
|
72
72
|
selectedMonths: p,
|
|
73
73
|
onMonthSelect: P,
|
|
74
74
|
disabled: { before: h, after: u },
|
|
75
|
-
|
|
76
|
-
|
|
75
|
+
startMonth: g,
|
|
76
|
+
endMonth: y,
|
|
77
77
|
showFooter: l,
|
|
78
78
|
onApply: N,
|
|
79
79
|
onCancel: A,
|
|
@@ -18,8 +18,8 @@ const q = (e, o = "MM/dd/yyyy") => {
|
|
|
18
18
|
placeholder: i = "Select Weeks",
|
|
19
19
|
minDate: k,
|
|
20
20
|
maxDate: u,
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
startMonth: g,
|
|
22
|
+
endMonth: C,
|
|
23
23
|
showFooter: l = !0,
|
|
24
24
|
calendarType: M = "calendar",
|
|
25
25
|
fiscalMode: w = "basic",
|
|
@@ -83,8 +83,8 @@ const q = (e, o = "MM/dd/yyyy") => {
|
|
|
83
83
|
selectedWeeks: f,
|
|
84
84
|
onWeekSelect: T,
|
|
85
85
|
disabled: { before: k, after: u },
|
|
86
|
-
|
|
87
|
-
|
|
86
|
+
startMonth: g,
|
|
87
|
+
endMonth: C,
|
|
88
88
|
showFooter: l,
|
|
89
89
|
calendarType: M,
|
|
90
90
|
fiscalMode: w,
|
|
@@ -19,8 +19,8 @@ const l = (e, s = "MM/dd/yyyy") => {
|
|
|
19
19
|
placeholder: h = "Select Week",
|
|
20
20
|
minDate: B,
|
|
21
21
|
maxDate: E,
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
startMonth: L,
|
|
23
|
+
endMonth: O,
|
|
24
24
|
showFooter: f = !0,
|
|
25
25
|
calendarType: w = "calendar",
|
|
26
26
|
fiscalMode: W = "basic",
|
|
@@ -124,8 +124,8 @@ const l = (e, s = "MM/dd/yyyy") => {
|
|
|
124
124
|
month: q,
|
|
125
125
|
onMonthChange: k,
|
|
126
126
|
disabled: { before: B, after: E },
|
|
127
|
-
|
|
128
|
-
|
|
127
|
+
startMonth: L,
|
|
128
|
+
endMonth: O,
|
|
129
129
|
showFooter: f,
|
|
130
130
|
calendarType: w,
|
|
131
131
|
fiscalMode: W,
|
|
@@ -18,8 +18,8 @@ const g = (e, r = "MM/dd/yyyy") => {
|
|
|
18
18
|
placeholder: W = "Select Week Range",
|
|
19
19
|
minDate: G,
|
|
20
20
|
maxDate: J,
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
startMonth: K,
|
|
22
|
+
endMonth: Q,
|
|
23
23
|
showFooter: p = !0,
|
|
24
24
|
calendarType: E = "calendar",
|
|
25
25
|
fiscalMode: v = "basic",
|
|
@@ -195,8 +195,8 @@ const g = (e, r = "MM/dd/yyyy") => {
|
|
|
195
195
|
month: ee,
|
|
196
196
|
onMonthChange: P,
|
|
197
197
|
disabled: { before: G, after: J },
|
|
198
|
-
|
|
199
|
-
|
|
198
|
+
startMonth: K,
|
|
199
|
+
endMonth: Q,
|
|
200
200
|
showFooter: p,
|
|
201
201
|
calendarType: E,
|
|
202
202
|
fiscalMode: v,
|
|
@@ -8,8 +8,8 @@ export interface DatePickerProps extends Omit<InputProps, 'value' | 'onChange' |
|
|
|
8
8
|
placeholder?: string;
|
|
9
9
|
minDate?: Date;
|
|
10
10
|
maxDate?: Date;
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
startMonth?: Date;
|
|
12
|
+
endMonth?: Date;
|
|
13
13
|
showFooter?: boolean;
|
|
14
14
|
}
|
|
15
15
|
export interface DateRangePickerProps extends Omit<InputProps, 'value' | 'onChange' | 'type' | 'suffix' | 'suffixClick'> {
|
|
@@ -20,8 +20,8 @@ export interface DateRangePickerProps extends Omit<InputProps, 'value' | 'onChan
|
|
|
20
20
|
endPlaceholder?: string;
|
|
21
21
|
minDate?: Date;
|
|
22
22
|
maxDate?: Date;
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
startMonth?: Date;
|
|
24
|
+
endMonth?: Date;
|
|
25
25
|
showFooter?: boolean;
|
|
26
26
|
}
|
|
27
27
|
export interface MonthPickerProps extends Omit<InputProps, 'value' | 'onChange' | 'type' | 'suffix' | 'suffixClick'> {
|
|
@@ -30,8 +30,8 @@ export interface MonthPickerProps extends Omit<InputProps, 'value' | 'onChange'
|
|
|
30
30
|
placeholder?: string;
|
|
31
31
|
minDate?: Date;
|
|
32
32
|
maxDate?: Date;
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
startMonth?: Date;
|
|
34
|
+
endMonth?: Date;
|
|
35
35
|
showFooter?: boolean;
|
|
36
36
|
}
|
|
37
37
|
export interface MonthRangePickerProps extends Omit<InputProps, 'value' | 'onChange' | 'type' | 'suffix' | 'suffixClick'> {
|
|
@@ -40,8 +40,8 @@ export interface MonthRangePickerProps extends Omit<InputProps, 'value' | 'onCha
|
|
|
40
40
|
placeholder?: string;
|
|
41
41
|
minDate?: Date;
|
|
42
42
|
maxDate?: Date;
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
startMonth?: Date;
|
|
44
|
+
endMonth?: Date;
|
|
45
45
|
showFooter?: boolean;
|
|
46
46
|
}
|
|
47
47
|
export interface WeekPickerProps extends Omit<InputProps, 'value' | 'onChange' | 'type' | 'suffix' | 'suffixClick'> {
|
|
@@ -51,8 +51,8 @@ export interface WeekPickerProps extends Omit<InputProps, 'value' | 'onChange' |
|
|
|
51
51
|
placeholder?: string;
|
|
52
52
|
minDate?: Date;
|
|
53
53
|
maxDate?: Date;
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
startMonth?: Date;
|
|
55
|
+
endMonth?: Date;
|
|
56
56
|
showFooter?: boolean;
|
|
57
57
|
/** Whether to use standard calendar weeks or fiscal weeks. Default: "calendar" */
|
|
58
58
|
calendarType?: "calendar" | "fiscal";
|
|
@@ -73,8 +73,8 @@ export interface WeekRangePickerProps extends Omit<InputProps, 'value' | 'onChan
|
|
|
73
73
|
placeholder?: string;
|
|
74
74
|
minDate?: Date;
|
|
75
75
|
maxDate?: Date;
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
startMonth?: Date;
|
|
77
|
+
endMonth?: Date;
|
|
78
78
|
showFooter?: boolean;
|
|
79
79
|
/** Whether to use standard calendar weeks or fiscal weeks. Default: "calendar" */
|
|
80
80
|
calendarType?: "calendar" | "fiscal";
|
|
@@ -95,8 +95,8 @@ export interface MultiDatePickerProps extends Omit<InputProps, 'value' | 'onChan
|
|
|
95
95
|
placeholder?: string;
|
|
96
96
|
minDate?: Date;
|
|
97
97
|
maxDate?: Date;
|
|
98
|
-
|
|
99
|
-
|
|
98
|
+
startMonth?: Date;
|
|
99
|
+
endMonth?: Date;
|
|
100
100
|
showFooter?: boolean;
|
|
101
101
|
}
|
|
102
102
|
export interface MultiMonthPickerProps extends Omit<InputProps, 'value' | 'onChange' | 'type' | 'suffix' | 'suffixClick'> {
|
|
@@ -105,8 +105,8 @@ export interface MultiMonthPickerProps extends Omit<InputProps, 'value' | 'onCha
|
|
|
105
105
|
placeholder?: string;
|
|
106
106
|
minDate?: Date;
|
|
107
107
|
maxDate?: Date;
|
|
108
|
-
|
|
109
|
-
|
|
108
|
+
startMonth?: Date;
|
|
109
|
+
endMonth?: Date;
|
|
110
110
|
showFooter?: boolean;
|
|
111
111
|
}
|
|
112
112
|
export interface MultiWeekPickerProps extends Omit<InputProps, 'value' | 'onChange' | 'type' | 'suffix' | 'suffixClick'> {
|
|
@@ -116,8 +116,8 @@ export interface MultiWeekPickerProps extends Omit<InputProps, 'value' | 'onChan
|
|
|
116
116
|
placeholder?: string;
|
|
117
117
|
minDate?: Date;
|
|
118
118
|
maxDate?: Date;
|
|
119
|
-
|
|
120
|
-
|
|
119
|
+
startMonth?: Date;
|
|
120
|
+
endMonth?: Date;
|
|
121
121
|
showFooter?: boolean;
|
|
122
122
|
/** Whether to use standard calendar weeks or fiscal weeks. Default: "calendar" */
|
|
123
123
|
calendarType?: "calendar" | "fiscal";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
{
|
|
3
3
|
"name": "impact-nova",
|
|
4
|
-
"version": "1.1.
|
|
4
|
+
"version": "1.1.1",
|
|
5
5
|
"description": "Enterprise-grade React design system built with React 19, Vite, Tailwind CSS, and Radix UI. Comprehensive UI component library for scalable, accessible, and performant applications.",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./dist/index.js",
|