chesai-ui 0.16.11 → 0.16.13
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/chesai-ui.css +1 -1
- package/dist/components/button-group/index.mjs +29 -29
- package/dist/components/date-picker/calendar.mjs +100 -96
- package/dist/components/date-picker/date-picker.mjs +4 -4
- package/dist/components/date-picker/infinite-calendar.mjs +22 -25
- package/dist/components/full-calendar/event-popover.mjs +185 -253
- package/dist/components/full-calendar/index.d.ts +1 -0
- package/dist/components/full-calendar/recurrence-select.d.ts +11 -0
- package/dist/components/full-calendar/recurrence-select.mjs +118 -0
- package/dist/hooks/useRipple.d.ts +107 -0
- package/dist/index.mjs +301 -299
- package/package.json +1 -1
|
@@ -1,71 +1,71 @@
|
|
|
1
1
|
import { jsx as C } from "react/jsx-runtime";
|
|
2
2
|
import { clsx as a } from "clsx";
|
|
3
|
-
import
|
|
3
|
+
import l from "react";
|
|
4
4
|
const N = {
|
|
5
5
|
none: "gap-0",
|
|
6
6
|
xs: "gap-px",
|
|
7
7
|
sm: "gap-0.5",
|
|
8
8
|
md: "gap-1",
|
|
9
9
|
lg: "gap-2"
|
|
10
|
-
}, y = (d, u,
|
|
11
|
-
const
|
|
12
|
-
if (
|
|
13
|
-
if (
|
|
10
|
+
}, y = (d, u, n, s, i, o) => {
|
|
11
|
+
const r = d === 0, e = d === u - 1, t = u === 1;
|
|
12
|
+
if (n === "sharp") return "!rounded-none";
|
|
13
|
+
if (i && o) {
|
|
14
14
|
if (o === "full") return "!rounded-[30px]";
|
|
15
15
|
if (o === "minimal") return "!rounded-xl";
|
|
16
16
|
if (o === "sharp") return "!rounded-none";
|
|
17
17
|
}
|
|
18
18
|
if (t) {
|
|
19
|
-
if (
|
|
20
|
-
if (
|
|
19
|
+
if (n === "full") return "!rounded-[30px]";
|
|
20
|
+
if (n === "minimal") return "!rounded-xl";
|
|
21
21
|
}
|
|
22
|
-
if (
|
|
23
|
-
if (
|
|
24
|
-
return
|
|
25
|
-
if (
|
|
26
|
-
return
|
|
22
|
+
if (s) {
|
|
23
|
+
if (n === "full")
|
|
24
|
+
return r ? "!rounded-s-[30px] !rounded-e-md" : e ? "!rounded-s-md !rounded-e-[30px]" : "!rounded-md";
|
|
25
|
+
if (n === "minimal")
|
|
26
|
+
return r ? "!rounded-s-xl !rounded-e-md" : e ? "!rounded-s-md !rounded-e-xl" : "!rounded-md";
|
|
27
27
|
} else {
|
|
28
|
-
if (
|
|
29
|
-
return
|
|
30
|
-
if (
|
|
31
|
-
return
|
|
28
|
+
if (n === "full")
|
|
29
|
+
return r ? "!rounded-s-[30px] !rounded-e-none" : e ? "!rounded-s-none !rounded-e-[30px]" : "!rounded-none";
|
|
30
|
+
if (n === "minimal")
|
|
31
|
+
return r ? "!rounded-s-xl !rounded-e-none" : e ? "!rounded-s-none !rounded-e-xl" : "!rounded-none";
|
|
32
32
|
}
|
|
33
33
|
return "";
|
|
34
34
|
}, A = ({
|
|
35
35
|
children: d,
|
|
36
36
|
className: u,
|
|
37
|
-
shape:
|
|
38
|
-
gap:
|
|
39
|
-
activeShape:
|
|
37
|
+
shape: n = "full",
|
|
38
|
+
gap: s = "none",
|
|
39
|
+
activeShape: i = "full",
|
|
40
40
|
...o
|
|
41
41
|
}) => {
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
), e =
|
|
42
|
+
const r = l.Children.toArray(d).filter(
|
|
43
|
+
l.isValidElement
|
|
44
|
+
), e = s !== "none";
|
|
45
45
|
return /* @__PURE__ */ C(
|
|
46
46
|
"fieldset",
|
|
47
47
|
{
|
|
48
48
|
className: a(
|
|
49
49
|
"inline-flex items-center border-none p-0 m-0",
|
|
50
|
-
N[
|
|
50
|
+
N[s],
|
|
51
51
|
u
|
|
52
52
|
),
|
|
53
53
|
...o,
|
|
54
|
-
children:
|
|
54
|
+
children: r.map((t, f) => {
|
|
55
55
|
const p = f === 0, m = t.props, c = m.isActive, x = y(
|
|
56
56
|
f,
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
r.length,
|
|
58
|
+
n,
|
|
59
59
|
e,
|
|
60
60
|
c,
|
|
61
|
-
|
|
61
|
+
i
|
|
62
62
|
), g = a(
|
|
63
63
|
m.className,
|
|
64
64
|
x,
|
|
65
|
-
!p && !e && "-
|
|
65
|
+
!p && !e && "-ms-px",
|
|
66
66
|
"focus:z-10"
|
|
67
67
|
);
|
|
68
|
-
return
|
|
68
|
+
return l.cloneElement(t, {
|
|
69
69
|
className: g,
|
|
70
70
|
shape: "sharp"
|
|
71
71
|
});
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { jsxs as u, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { useVirtualizer as
|
|
3
|
-
import { cva as
|
|
2
|
+
import { useVirtualizer as oe } from "@tanstack/react-virtual";
|
|
3
|
+
import { cva as ae } from "class-variance-authority";
|
|
4
4
|
import { clsx as c } from "clsx";
|
|
5
|
-
import { format as
|
|
6
|
-
import { AnimatePresence as
|
|
7
|
-
import { ChevronDown as
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { ElasticScrollArea as
|
|
11
|
-
import { IconButton as
|
|
12
|
-
import { useCalendar as
|
|
13
|
-
const
|
|
5
|
+
import { format as D } from "date-fns";
|
|
6
|
+
import { AnimatePresence as se, motion as M } from "framer-motion";
|
|
7
|
+
import { ChevronDown as S, ChevronLeft as ie, ChevronRight as le } from "lucide-react";
|
|
8
|
+
import A, { useState as k, useEffect as O, memo as z, useRef as _ } from "react";
|
|
9
|
+
import ce from "use-ripple-hook";
|
|
10
|
+
import { ElasticScrollArea as B } from "../elastic-scroll-area/index.mjs";
|
|
11
|
+
import { IconButton as V } from "../icon-button/index.mjs";
|
|
12
|
+
import { useCalendar as fe } from "../../hooks/use-calender.mjs";
|
|
13
|
+
const de = ae(
|
|
14
14
|
"overflow-hidden select-none p-4 text-on-surface relative transition-colors duration-300",
|
|
15
15
|
{
|
|
16
16
|
variants: {
|
|
@@ -29,12 +29,12 @@ const ce = re(
|
|
|
29
29
|
variant: "default"
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
|
-
),
|
|
32
|
+
), E = {
|
|
33
33
|
full: "rounded-full",
|
|
34
34
|
minimal: "rounded-lg",
|
|
35
35
|
sharp: "rounded-none"
|
|
36
|
-
},
|
|
37
|
-
const f =
|
|
36
|
+
}, me = (n) => {
|
|
37
|
+
const f = E[n];
|
|
38
38
|
return c(
|
|
39
39
|
"relative z-10 w-10 h-10 flex items-center justify-center text-sm focus:outline-none overflow-hidden",
|
|
40
40
|
"transition-colors duration-200",
|
|
@@ -44,13 +44,12 @@ const ce = re(
|
|
|
44
44
|
"after:transition-[opacity,transform] after:duration-200 after:ease-out",
|
|
45
45
|
"hover:after:opacity-100 hover:after:scale-100"
|
|
46
46
|
);
|
|
47
|
-
},
|
|
48
|
-
// FIX: Explicitly type transition object
|
|
47
|
+
}, ue = {
|
|
49
48
|
type: "spring",
|
|
50
49
|
stiffness: 300,
|
|
51
50
|
damping: 30,
|
|
52
51
|
mass: 1
|
|
53
|
-
},
|
|
52
|
+
}, he = {
|
|
54
53
|
enter: (n) => ({
|
|
55
54
|
x: n > 0 ? "100%" : "-100%",
|
|
56
55
|
opacity: 1
|
|
@@ -60,7 +59,7 @@ const ce = re(
|
|
|
60
59
|
x: n < 0 ? "100%" : "-100%",
|
|
61
60
|
opacity: 1
|
|
62
61
|
})
|
|
63
|
-
},
|
|
62
|
+
}, L = z(
|
|
64
63
|
({
|
|
65
64
|
day: n,
|
|
66
65
|
isCurrentMonth: f,
|
|
@@ -72,9 +71,8 @@ const ce = re(
|
|
|
72
71
|
onClick: l,
|
|
73
72
|
itemShape: m = "full"
|
|
74
73
|
}) => {
|
|
75
|
-
const d =
|
|
74
|
+
const d = _(null), [, t] = ce({
|
|
76
75
|
ref: d,
|
|
77
|
-
// FIX: Cast ref
|
|
78
76
|
color: "var(--color-ripple-dark)",
|
|
79
77
|
duration: 400
|
|
80
78
|
});
|
|
@@ -85,35 +83,35 @@ const ce = re(
|
|
|
85
83
|
onPointerDown: t,
|
|
86
84
|
onClick: l,
|
|
87
85
|
className: c(
|
|
88
|
-
|
|
86
|
+
me(m),
|
|
89
87
|
a || s || i ? "bg-primary text-on-primary font-bold shadow-sm" : h && !x ? "border border-primary text-primary font-bold" : "text-on-surface"
|
|
90
88
|
),
|
|
91
|
-
children:
|
|
89
|
+
children: D(n, "d")
|
|
92
90
|
}
|
|
93
|
-
) : /* @__PURE__ */ e("div", { className: "w-10 h-10 flex items-center justify-center text-on-surface-variant/30 text-sm", children:
|
|
91
|
+
) : /* @__PURE__ */ e("div", { className: "w-10 h-10 flex items-center justify-center text-on-surface-variant/30 text-sm", children: D(n, "d") });
|
|
94
92
|
}
|
|
95
93
|
);
|
|
96
|
-
|
|
97
|
-
const
|
|
94
|
+
L.displayName = "DayButton";
|
|
95
|
+
const v = 3, T = z(
|
|
98
96
|
({
|
|
99
97
|
currentYear: n,
|
|
100
98
|
onSelectYear: f,
|
|
101
99
|
itemShape: h = "full"
|
|
102
100
|
}) => {
|
|
103
|
-
const a =
|
|
101
|
+
const a = _(null), s = A.useMemo(
|
|
104
102
|
() => Array.from({ length: 400 }, (d, t) => 1900 + t),
|
|
105
103
|
[]
|
|
106
|
-
), i = Math.ceil(s.length /
|
|
104
|
+
), i = Math.ceil(s.length / v), x = s.indexOf(n), l = x !== -1 ? Math.floor(x / v) : 0, m = oe({
|
|
107
105
|
count: i,
|
|
108
106
|
getScrollElement: () => a.current,
|
|
109
107
|
estimateSize: () => 60,
|
|
110
108
|
overscan: 3,
|
|
111
109
|
initialOffset: l * 60
|
|
112
110
|
});
|
|
113
|
-
return
|
|
111
|
+
return O(() => {
|
|
114
112
|
l !== -1 && m.scrollToIndex(l, { align: "center" });
|
|
115
113
|
}, [l, m]), /* @__PURE__ */ e(
|
|
116
|
-
|
|
114
|
+
B,
|
|
117
115
|
{
|
|
118
116
|
ref: a,
|
|
119
117
|
className: "h-full w-full",
|
|
@@ -127,14 +125,14 @@ const b = 3, B = N(
|
|
|
127
125
|
position: "relative"
|
|
128
126
|
},
|
|
129
127
|
children: m.getVirtualItems().map((d) => {
|
|
130
|
-
const t = d.index *
|
|
128
|
+
const t = d.index * v, y = s.slice(
|
|
131
129
|
t,
|
|
132
|
-
t +
|
|
130
|
+
t + v
|
|
133
131
|
);
|
|
134
132
|
return /* @__PURE__ */ e(
|
|
135
133
|
"div",
|
|
136
134
|
{
|
|
137
|
-
className: "absolute top-0
|
|
135
|
+
className: "absolute top-0 inset-x-0 w-full flex justify-between px-2",
|
|
138
136
|
style: {
|
|
139
137
|
height: `${d.size}px`,
|
|
140
138
|
transform: `translateY(${d.start}px)`,
|
|
@@ -150,7 +148,7 @@ const b = 3, B = N(
|
|
|
150
148
|
onClick: () => f(p),
|
|
151
149
|
className: c(
|
|
152
150
|
"w-[88px] h-10 flex items-center justify-center text-sm font-medium transition-colors duration-200 border border-transparent focus:outline-none",
|
|
153
|
-
|
|
151
|
+
E[h],
|
|
154
152
|
g ? "bg-primary text-on-primary font-bold shadow-sm" : "text-on-surface hover:bg-surface-container-highest hover:border-outline-variant/30"
|
|
155
153
|
),
|
|
156
154
|
children: p
|
|
@@ -168,13 +166,13 @@ const b = 3, B = N(
|
|
|
168
166
|
);
|
|
169
167
|
}
|
|
170
168
|
);
|
|
171
|
-
|
|
172
|
-
const
|
|
169
|
+
T.displayName = "YearPicker";
|
|
170
|
+
const $ = z(
|
|
173
171
|
({
|
|
174
172
|
currentMonthIndex: n,
|
|
175
173
|
onSelectMonth: f,
|
|
176
174
|
itemShape: h = "full"
|
|
177
|
-
}) => /* @__PURE__ */ e(
|
|
175
|
+
}) => /* @__PURE__ */ e(B, { className: "h-full", children: /* @__PURE__ */ e("div", { className: "grid grid-cols-3 gap-4 p-4 min-h-full content-center", children: [
|
|
178
176
|
"Jan",
|
|
179
177
|
"Feb",
|
|
180
178
|
"Mar",
|
|
@@ -193,7 +191,7 @@ const L = N(
|
|
|
193
191
|
onClick: () => f(i),
|
|
194
192
|
className: c(
|
|
195
193
|
"h-12 text-sm font-medium transition-colors duration-200 border border-transparent focus:outline-none",
|
|
196
|
-
|
|
194
|
+
E[h],
|
|
197
195
|
i === n ? "bg-primary text-on-primary font-bold shadow-sm" : "text-on-surface hover:bg-surface-container-highest hover:border-outline-variant"
|
|
198
196
|
),
|
|
199
197
|
children: s
|
|
@@ -201,8 +199,8 @@ const L = N(
|
|
|
201
199
|
s
|
|
202
200
|
)) }) })
|
|
203
201
|
);
|
|
204
|
-
|
|
205
|
-
const
|
|
202
|
+
$.displayName = "MonthPicker";
|
|
203
|
+
const pe = A.forwardRef(
|
|
206
204
|
({
|
|
207
205
|
className: n,
|
|
208
206
|
shape: f,
|
|
@@ -214,27 +212,33 @@ const ue = V.forwardRef(
|
|
|
214
212
|
onRangeSelect: l,
|
|
215
213
|
...m
|
|
216
214
|
}, d) => {
|
|
217
|
-
const [t, y] =
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
},
|
|
215
|
+
const [t, y] = k("days"), [p, g] = k(0), [w, J] = k(!1);
|
|
216
|
+
O(() => {
|
|
217
|
+
typeof document < "u" && J(
|
|
218
|
+
document.documentElement.dir === "rtl" || document.documentElement.classList.contains("rtl")
|
|
219
|
+
);
|
|
220
|
+
}, []);
|
|
221
|
+
const {
|
|
222
|
+
cursorDate: H,
|
|
223
|
+
daysInMonth: F,
|
|
224
|
+
weekdays: U,
|
|
225
|
+
getDayProps: W,
|
|
226
|
+
nextMonth: q,
|
|
227
|
+
prevMonth: G,
|
|
228
|
+
nextYear: K,
|
|
229
|
+
prevYear: Q,
|
|
230
|
+
selectYear: X,
|
|
231
|
+
selectMonth: Z,
|
|
232
|
+
currentMonthName: ee,
|
|
233
|
+
currentMonthIndex: te,
|
|
234
|
+
currentYear: R
|
|
235
|
+
} = fe(i instanceof Date ? i : /* @__PURE__ */ new Date(), i, s), N = () => {
|
|
236
|
+
g(w ? -1 : 1), t === "years" ? K() : q();
|
|
237
|
+
}, C = () => {
|
|
238
|
+
g(w ? 1 : -1), t === "years" ? Q() : G();
|
|
239
|
+
}, b = 50, re = (r, o) => {
|
|
240
|
+
t === "days" && (w ? o.offset.x < -b ? C() : o.offset.x > b && N() : o.offset.x < -b ? N() : o.offset.x > b && C());
|
|
241
|
+
}, ne = (r) => {
|
|
238
242
|
if (s === "single")
|
|
239
243
|
x?.(r);
|
|
240
244
|
else {
|
|
@@ -246,7 +250,7 @@ const ue = V.forwardRef(
|
|
|
246
250
|
"div",
|
|
247
251
|
{
|
|
248
252
|
ref: d,
|
|
249
|
-
className: c(
|
|
253
|
+
className: c(de({ shape: f, variant: h, className: n })),
|
|
250
254
|
...m,
|
|
251
255
|
children: [
|
|
252
256
|
/* @__PURE__ */ u("div", { className: "flex items-center justify-between h-12 px-2 mb-4 relative z-20", children: [
|
|
@@ -261,9 +265,9 @@ const ue = V.forwardRef(
|
|
|
261
265
|
t === "months" ? "bg-secondary-container text-on-secondary-container" : "text-on-surface hover:bg-surface-container-highest"
|
|
262
266
|
),
|
|
263
267
|
children: [
|
|
264
|
-
/* @__PURE__ */ e("span", { children:
|
|
268
|
+
/* @__PURE__ */ e("span", { children: ee }),
|
|
265
269
|
/* @__PURE__ */ e(
|
|
266
|
-
|
|
270
|
+
S,
|
|
267
271
|
{
|
|
268
272
|
className: c(
|
|
269
273
|
"w-4 h-4 transition-transform duration-200",
|
|
@@ -284,9 +288,9 @@ const ue = V.forwardRef(
|
|
|
284
288
|
t === "years" ? "bg-secondary-container text-on-secondary-container" : "text-on-surface hover:bg-surface-container-highest"
|
|
285
289
|
),
|
|
286
290
|
children: [
|
|
287
|
-
/* @__PURE__ */ e("span", { children:
|
|
291
|
+
/* @__PURE__ */ e("span", { children: R }),
|
|
288
292
|
/* @__PURE__ */ e(
|
|
289
|
-
|
|
293
|
+
S,
|
|
290
294
|
{
|
|
291
295
|
className: c(
|
|
292
296
|
"w-4 h-4 transition-transform duration-200",
|
|
@@ -307,47 +311,47 @@ const ue = V.forwardRef(
|
|
|
307
311
|
),
|
|
308
312
|
children: [
|
|
309
313
|
/* @__PURE__ */ e(
|
|
310
|
-
|
|
314
|
+
V,
|
|
311
315
|
{
|
|
312
316
|
variant: "ghost",
|
|
313
317
|
size: "sm",
|
|
314
318
|
shape: "full",
|
|
315
|
-
onClick:
|
|
316
|
-
children: /* @__PURE__ */ e(
|
|
319
|
+
onClick: C,
|
|
320
|
+
children: /* @__PURE__ */ e(ie, { className: "w-5 h-5 text-on-surface-variant rtl:rotate-180" })
|
|
317
321
|
}
|
|
318
322
|
),
|
|
319
323
|
/* @__PURE__ */ e(
|
|
320
|
-
|
|
324
|
+
V,
|
|
321
325
|
{
|
|
322
326
|
variant: "ghost",
|
|
323
327
|
size: "sm",
|
|
324
328
|
shape: "full",
|
|
325
|
-
onClick:
|
|
326
|
-
children: /* @__PURE__ */ e(
|
|
329
|
+
onClick: N,
|
|
330
|
+
children: /* @__PURE__ */ e(le, { className: "w-5 h-5 text-on-surface-variant rtl:rotate-180" })
|
|
327
331
|
}
|
|
328
332
|
)
|
|
329
333
|
]
|
|
330
334
|
}
|
|
331
335
|
)
|
|
332
336
|
] }),
|
|
333
|
-
/* @__PURE__ */ e("div", { className: "relative h-[312px] overflow-hidden", children: /* @__PURE__ */ u(
|
|
337
|
+
/* @__PURE__ */ e("div", { className: "relative h-[312px] overflow-hidden", children: /* @__PURE__ */ u(se, { mode: "popLayout", custom: p, initial: !1, children: [
|
|
334
338
|
t === "days" && /* @__PURE__ */ u(
|
|
335
|
-
|
|
339
|
+
M.div,
|
|
336
340
|
{
|
|
337
341
|
custom: p,
|
|
338
|
-
variants:
|
|
342
|
+
variants: he,
|
|
339
343
|
initial: "enter",
|
|
340
344
|
animate: "center",
|
|
341
345
|
exit: "exit",
|
|
342
|
-
transition:
|
|
346
|
+
transition: ue,
|
|
343
347
|
drag: "x",
|
|
344
348
|
dragConstraints: { left: 0, right: 0 },
|
|
345
349
|
dragElastic: 0.2,
|
|
346
|
-
onDragEnd:
|
|
350
|
+
onDragEnd: re,
|
|
347
351
|
style: { willChange: "transform" },
|
|
348
352
|
className: "absolute inset-0 flex flex-col w-full h-full touch-pan-y",
|
|
349
353
|
children: [
|
|
350
|
-
/* @__PURE__ */ e("div", { className: "grid grid-cols-7 mb-2 shrink-0", children:
|
|
354
|
+
/* @__PURE__ */ e("div", { className: "grid grid-cols-7 mb-2 shrink-0", children: U.map((r, o) => /* @__PURE__ */ e(
|
|
351
355
|
"div",
|
|
352
356
|
{
|
|
353
357
|
className: "h-8 flex items-center justify-center text-on-surface-variant text-xs font-medium",
|
|
@@ -355,24 +359,24 @@ const ue = V.forwardRef(
|
|
|
355
359
|
},
|
|
356
360
|
o
|
|
357
361
|
)) }),
|
|
358
|
-
/* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-y-1", children:
|
|
359
|
-
const
|
|
362
|
+
/* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-y-1", children: F.map((r, o) => {
|
|
363
|
+
const I = W(r), { isRangeStart: P, isRangeEnd: Y, isInRange: j } = I;
|
|
360
364
|
return /* @__PURE__ */ e(
|
|
361
365
|
"div",
|
|
362
366
|
{
|
|
363
367
|
className: c(
|
|
364
368
|
"relative flex items-center justify-center w-full h-10 p-0",
|
|
365
369
|
(j || P || Y) && "before:absolute before:inset-y-0 before:bg-primary/10 before:z-0",
|
|
366
|
-
P && "before:
|
|
367
|
-
Y && "before:
|
|
368
|
-
j && "before:
|
|
370
|
+
P && "before:start-1/2 before:end-0 before:rounded-s-full",
|
|
371
|
+
Y && "before:start-0 before:end-1/2 before:rounded-e-full",
|
|
372
|
+
j && "before:start-0 before:end-0"
|
|
369
373
|
),
|
|
370
374
|
children: /* @__PURE__ */ e(
|
|
371
|
-
|
|
375
|
+
L,
|
|
372
376
|
{
|
|
373
377
|
day: r,
|
|
374
|
-
...
|
|
375
|
-
onClick: () =>
|
|
378
|
+
...I,
|
|
379
|
+
onClick: () => ne(r),
|
|
376
380
|
itemShape: a
|
|
377
381
|
}
|
|
378
382
|
)
|
|
@@ -382,10 +386,10 @@ const ue = V.forwardRef(
|
|
|
382
386
|
}) })
|
|
383
387
|
]
|
|
384
388
|
},
|
|
385
|
-
|
|
389
|
+
D(H, "yyyy-MM")
|
|
386
390
|
),
|
|
387
391
|
t === "months" && /* @__PURE__ */ e(
|
|
388
|
-
|
|
392
|
+
M.div,
|
|
389
393
|
{
|
|
390
394
|
initial: { opacity: 0, scale: 0.9 },
|
|
391
395
|
animate: { opacity: 1, scale: 1 },
|
|
@@ -393,11 +397,11 @@ const ue = V.forwardRef(
|
|
|
393
397
|
transition: { duration: 0.2 },
|
|
394
398
|
className: "absolute inset-0 z-10",
|
|
395
399
|
children: /* @__PURE__ */ e(
|
|
396
|
-
|
|
400
|
+
$,
|
|
397
401
|
{
|
|
398
|
-
currentMonthIndex:
|
|
402
|
+
currentMonthIndex: te,
|
|
399
403
|
onSelectMonth: (r) => {
|
|
400
|
-
|
|
404
|
+
Z(r), y("days");
|
|
401
405
|
},
|
|
402
406
|
itemShape: a
|
|
403
407
|
}
|
|
@@ -406,7 +410,7 @@ const ue = V.forwardRef(
|
|
|
406
410
|
"months"
|
|
407
411
|
),
|
|
408
412
|
t === "years" && /* @__PURE__ */ e(
|
|
409
|
-
|
|
413
|
+
M.div,
|
|
410
414
|
{
|
|
411
415
|
initial: { opacity: 0, scale: 0.9 },
|
|
412
416
|
animate: { opacity: 1, scale: 1 },
|
|
@@ -414,11 +418,11 @@ const ue = V.forwardRef(
|
|
|
414
418
|
transition: { duration: 0.2 },
|
|
415
419
|
className: "absolute inset-0 z-10",
|
|
416
420
|
children: /* @__PURE__ */ e(
|
|
417
|
-
|
|
421
|
+
T,
|
|
418
422
|
{
|
|
419
|
-
currentYear:
|
|
423
|
+
currentYear: R,
|
|
420
424
|
onSelectYear: (r) => {
|
|
421
|
-
|
|
425
|
+
X(r), y("days");
|
|
422
426
|
},
|
|
423
427
|
itemShape: a
|
|
424
428
|
}
|
|
@@ -432,7 +436,7 @@ const ue = V.forwardRef(
|
|
|
432
436
|
);
|
|
433
437
|
}
|
|
434
438
|
);
|
|
435
|
-
|
|
439
|
+
pe.displayName = "Calendar";
|
|
436
440
|
export {
|
|
437
|
-
|
|
441
|
+
pe as Calendar
|
|
438
442
|
};
|
|
@@ -178,12 +178,12 @@ const z = {
|
|
|
178
178
|
isFocused: f,
|
|
179
179
|
isErrored: g
|
|
180
180
|
}),
|
|
181
|
-
"w-full justify-start text-
|
|
181
|
+
"w-full justify-start text-start font-normal text-on-surface",
|
|
182
182
|
!T && "text-on-surface-variant/50",
|
|
183
183
|
I?.inputWrapper
|
|
184
184
|
),
|
|
185
185
|
children: [
|
|
186
|
-
/* @__PURE__ */ e(O, { className: "
|
|
186
|
+
/* @__PURE__ */ e(O, { className: "me-2 h-4 w-4 opacity-50 shrink-0" }),
|
|
187
187
|
/* @__PURE__ */ e("span", { className: "truncate", children: A })
|
|
188
188
|
]
|
|
189
189
|
}
|
|
@@ -194,7 +194,7 @@ const z = {
|
|
|
194
194
|
"label",
|
|
195
195
|
{
|
|
196
196
|
className: s(
|
|
197
|
-
"
|
|
197
|
+
"ms-1 text-sm font-medium",
|
|
198
198
|
g ? "text-error" : "text-on-surface-variant"
|
|
199
199
|
),
|
|
200
200
|
children: c
|
|
@@ -236,7 +236,7 @@ const z = {
|
|
|
236
236
|
"label",
|
|
237
237
|
{
|
|
238
238
|
className: s(
|
|
239
|
-
"
|
|
239
|
+
"ms-1 text-sm font-medium",
|
|
240
240
|
g ? "text-error" : "text-on-surface-variant"
|
|
241
241
|
),
|
|
242
242
|
children: c
|