chesai-ui 0.16.13 → 0.16.15
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/card/index.d.ts +3 -0
- package/dist/components/card/index.mjs +73 -42
- package/dist/components/full-calendar/index.mjs +115 -111
- package/dist/components/full-calendar/timeline-view.mjs +124 -122
- package/dist/components/full-calendar/types.d.ts +1 -1
- package/dist/components/full-calendar/utils.d.ts +3 -2
- package/dist/components/full-calendar/utils.mjs +184 -136
- package/dist/components/reverse-infinite-scroll/index.d.ts +31 -0
- package/dist/components/toolbar/index.mjs +4 -1
- package/package.json +1 -1
|
@@ -25,6 +25,9 @@ export interface CardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
25
25
|
elevation?: "none" | 1 | 2 | 3 | 4 | 5;
|
|
26
26
|
enableRipple?: boolean;
|
|
27
27
|
glass?: boolean;
|
|
28
|
+
animatedGradientBorder?: boolean;
|
|
29
|
+
gradientColors?: string[];
|
|
30
|
+
gradientWidth?: number;
|
|
28
31
|
}
|
|
29
32
|
export declare const CardGroup: React.ForwardRefExoticComponent<CardGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
30
33
|
export declare const Card: React.ForwardRefExoticComponent<CardProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { cva as
|
|
3
|
-
import { clsx as
|
|
1
|
+
import { jsx as m, jsxs as x, Fragment as R } from "react/jsx-runtime";
|
|
2
|
+
import { cva as A } from "class-variance-authority";
|
|
3
|
+
import { clsx as g } from "clsx";
|
|
4
4
|
import * as o from "react";
|
|
5
5
|
import { twMerge as h } from "tailwind-merge";
|
|
6
|
-
import
|
|
7
|
-
const
|
|
6
|
+
import F from "use-ripple-hook";
|
|
7
|
+
const M = A(
|
|
8
8
|
"transition-all duration-300 ease-out relative z-0 overflow-hidden",
|
|
9
9
|
{
|
|
10
10
|
variants: {
|
|
@@ -179,13 +179,13 @@ const N = w(
|
|
|
179
179
|
glass: !1
|
|
180
180
|
}
|
|
181
181
|
}
|
|
182
|
-
),
|
|
182
|
+
), V = {
|
|
183
183
|
none: "gap-0",
|
|
184
184
|
xs: "gap-0.5",
|
|
185
185
|
sm: "gap-1",
|
|
186
186
|
md: "gap-2",
|
|
187
187
|
lg: "gap-4"
|
|
188
|
-
},
|
|
188
|
+
}, j = (n, s, r, t) => {
|
|
189
189
|
const e = n === 0, a = n === s - 1, i = s === 1;
|
|
190
190
|
if (r === "sharp") return "!rounded-none";
|
|
191
191
|
if (i) {
|
|
@@ -204,7 +204,7 @@ const N = w(
|
|
|
204
204
|
return e ? "!rounded-l-xl !rounded-r-sm" : a ? "!rounded-l-sm !rounded-r-xl" : "!rounded-l-sm !rounded-r-sm";
|
|
205
205
|
}
|
|
206
206
|
return "";
|
|
207
|
-
},
|
|
207
|
+
}, B = o.forwardRef(
|
|
208
208
|
({
|
|
209
209
|
className: n,
|
|
210
210
|
children: s,
|
|
@@ -213,36 +213,36 @@ const N = w(
|
|
|
213
213
|
gap: e = "xs",
|
|
214
214
|
...a
|
|
215
215
|
}, i) => {
|
|
216
|
-
const
|
|
216
|
+
const l = o.Children.toArray(s).filter(
|
|
217
217
|
o.isValidElement
|
|
218
218
|
);
|
|
219
|
-
return /* @__PURE__ */
|
|
219
|
+
return /* @__PURE__ */ m(
|
|
220
220
|
"div",
|
|
221
221
|
{
|
|
222
222
|
ref: i,
|
|
223
223
|
role: "group",
|
|
224
224
|
"data-slot": "card-group",
|
|
225
225
|
className: h(
|
|
226
|
-
|
|
226
|
+
g(
|
|
227
227
|
"flex",
|
|
228
228
|
t === "vertical" ? "flex-col" : "flex-row",
|
|
229
|
-
|
|
229
|
+
V[e],
|
|
230
230
|
n
|
|
231
231
|
)
|
|
232
232
|
),
|
|
233
233
|
...a,
|
|
234
|
-
children:
|
|
235
|
-
const
|
|
234
|
+
children: l.map((d, u) => {
|
|
235
|
+
const c = j(
|
|
236
236
|
u,
|
|
237
|
-
|
|
237
|
+
l.length,
|
|
238
238
|
r,
|
|
239
239
|
t
|
|
240
240
|
), f = e === "none" && u > 0 ? t === "vertical" ? "-mt-px" : "-ml-px" : "";
|
|
241
|
-
return o.cloneElement(
|
|
241
|
+
return o.cloneElement(d, {
|
|
242
242
|
className: h(
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
243
|
+
g(
|
|
244
|
+
d.props.className,
|
|
245
|
+
c,
|
|
246
246
|
f,
|
|
247
247
|
"focus-visible:z-10"
|
|
248
248
|
)
|
|
@@ -253,8 +253,8 @@ const N = w(
|
|
|
253
253
|
);
|
|
254
254
|
}
|
|
255
255
|
);
|
|
256
|
-
|
|
257
|
-
const
|
|
256
|
+
B.displayName = "CardGroup";
|
|
257
|
+
const O = o.forwardRef(
|
|
258
258
|
({
|
|
259
259
|
className: n,
|
|
260
260
|
shape: s,
|
|
@@ -263,48 +263,79 @@ const R = o.forwardRef(
|
|
|
263
263
|
bordered: e,
|
|
264
264
|
elevation: a,
|
|
265
265
|
enableRipple: i,
|
|
266
|
-
hoverEffect:
|
|
267
|
-
glass:
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
266
|
+
hoverEffect: l,
|
|
267
|
+
glass: d,
|
|
268
|
+
animatedGradientBorder: u,
|
|
269
|
+
gradientColors: c,
|
|
270
|
+
gradientWidth: f = 2,
|
|
271
|
+
onPointerDown: y,
|
|
272
|
+
children: w,
|
|
273
|
+
...N
|
|
274
|
+
}, k) => {
|
|
271
275
|
const b = o.useRef(null);
|
|
272
|
-
o.useImperativeHandle(
|
|
273
|
-
const
|
|
276
|
+
o.useImperativeHandle(k, () => b.current);
|
|
277
|
+
const E = r === "high-contrast" || r === "tertiary" ? "var(--color-ripple-dark)" : "var(--color-ripple-light)", [, C] = F({
|
|
274
278
|
ref: b,
|
|
275
|
-
color:
|
|
279
|
+
color: E,
|
|
276
280
|
duration: 600,
|
|
277
281
|
disabled: !i
|
|
278
|
-
});
|
|
279
|
-
return /* @__PURE__ */
|
|
282
|
+
}), G = ["#4285F4", "#EA4335", "#FBBC05", "#34A853"], v = c && c.length > 0 ? c : G, z = [...v, ...v].join(", ");
|
|
283
|
+
return /* @__PURE__ */ x(
|
|
280
284
|
"div",
|
|
281
285
|
{
|
|
282
286
|
ref: b,
|
|
283
287
|
className: h(
|
|
284
|
-
|
|
285
|
-
|
|
288
|
+
g(
|
|
289
|
+
M({
|
|
286
290
|
shape: s,
|
|
287
291
|
variant: r,
|
|
288
292
|
padding: t,
|
|
289
293
|
bordered: e,
|
|
290
294
|
elevation: a,
|
|
291
|
-
hoverEffect:
|
|
292
|
-
glass:
|
|
295
|
+
hoverEffect: l,
|
|
296
|
+
glass: d
|
|
293
297
|
}),
|
|
294
298
|
n
|
|
295
299
|
)
|
|
296
300
|
),
|
|
297
|
-
onPointerDown: (
|
|
298
|
-
i &&
|
|
301
|
+
onPointerDown: (p) => {
|
|
302
|
+
i && C(p), y?.(p);
|
|
299
303
|
},
|
|
300
|
-
...
|
|
304
|
+
...N,
|
|
305
|
+
children: [
|
|
306
|
+
u && /* @__PURE__ */ x(R, { children: [
|
|
307
|
+
/* @__PURE__ */ m("style", { children: `
|
|
308
|
+
@keyframes card-border-gradient-animation {
|
|
309
|
+
0% { background-position: 0% 50%; }
|
|
310
|
+
100% { background-position: 100% 50%; }
|
|
311
|
+
}
|
|
312
|
+
` }),
|
|
313
|
+
/* @__PURE__ */ m(
|
|
314
|
+
"div",
|
|
315
|
+
{
|
|
316
|
+
className: "absolute inset-0 rounded-[inherit] pointer-events-none z-10",
|
|
317
|
+
style: {
|
|
318
|
+
padding: `${f}px`,
|
|
319
|
+
background: `linear-gradient(90deg, ${z})`,
|
|
320
|
+
backgroundSize: "200% 100%",
|
|
321
|
+
animation: "card-border-gradient-animation 4s linear infinite",
|
|
322
|
+
WebkitMask: "linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0)",
|
|
323
|
+
WebkitMaskComposite: "xor",
|
|
324
|
+
mask: "linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0)",
|
|
325
|
+
maskComposite: "exclude"
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
)
|
|
329
|
+
] }),
|
|
330
|
+
w
|
|
331
|
+
]
|
|
301
332
|
}
|
|
302
333
|
);
|
|
303
334
|
}
|
|
304
335
|
);
|
|
305
|
-
|
|
336
|
+
O.displayName = "Card";
|
|
306
337
|
export {
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
338
|
+
O as Card,
|
|
339
|
+
B as CardGroup,
|
|
340
|
+
M as cardVariants
|
|
310
341
|
};
|
|
@@ -1,28 +1,29 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import { clsx as
|
|
3
|
-
import { format as m, startOfWeek as g, endOfWeek as
|
|
4
|
-
import {
|
|
5
|
-
import y, { useMemo as
|
|
1
|
+
import { jsx as e, jsxs as p, Fragment as A } from "react/jsx-runtime";
|
|
2
|
+
import { clsx as u } from "clsx";
|
|
3
|
+
import { format as m, startOfWeek as g, endOfWeek as I, differenceInDays as _, startOfDay as b, addDays as H, addWeeks as Q, startOfMonth as x, addMonths as q, startOfYear as M, addYears as G } from "date-fns";
|
|
4
|
+
import { ChevronRight as k, ChevronLeft as C, Printer as J } from "lucide-react";
|
|
5
|
+
import y, { useMemo as N, useEffect as U } from "react";
|
|
6
6
|
import { createPortal as X } from "react-dom";
|
|
7
7
|
import { Button as Z } from "../button/index.mjs";
|
|
8
8
|
import { IconButton as w } from "../icon-button/index.mjs";
|
|
9
9
|
import { Select as ee } from "../select/index.mjs";
|
|
10
10
|
import { Typography as te } from "../typography/index.mjs";
|
|
11
11
|
import { TooltipProvider as re, TooltipTrigger as ae, Tooltip as ne } from "../tooltip/index.mjs";
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
|
|
22
|
-
|
|
12
|
+
import { useLayout as ie } from "../../context/layout-context.mjs";
|
|
13
|
+
import { useFullCalendar as v, PrintModeContext as S, PrintOverrideProvider as oe, FullCalendarProvider as le } from "./calendar-context.mjs";
|
|
14
|
+
import { MonthView as se } from "./month-view.mjs";
|
|
15
|
+
import { TimelineView as de } from "./timeline-view.mjs";
|
|
16
|
+
import { YearView as ce } from "./year-view.mjs";
|
|
17
|
+
import { EventPopover as me } from "./event-popover.mjs";
|
|
18
|
+
import { PrintPreviewDialog as pe } from "./print-preview-dialog.mjs";
|
|
19
|
+
import { getCalendarSidePanelBgClasses as fe, getCalendarBgClasses as D, getCalendarStickyBgClasses as he } from "./utils.mjs";
|
|
20
|
+
import { useMediaQuery as ue } from "@uidotdev/usehooks";
|
|
21
|
+
import { Calendar as ye } from "../date-picker/calendar.mjs";
|
|
22
|
+
const ve = () => {
|
|
23
|
+
const { currentDate: t, view: n } = v(), l = y.useContext(S), c = y.useMemo(() => {
|
|
23
24
|
if (n === "day") return m(t, "MMMM d, yyyy");
|
|
24
25
|
if (n === "week") {
|
|
25
|
-
const r = g(t), o =
|
|
26
|
+
const r = g(t), o = I(t);
|
|
26
27
|
return `${m(r, "MMM d, yyyy")} - ${m(o, "MMM d, yyyy")}`;
|
|
27
28
|
}
|
|
28
29
|
return n === "month" ? m(t, "MMMM yyyy") : n === "year" ? m(t, "yyyy") : m(t, "MMMM yyyy");
|
|
@@ -30,59 +31,59 @@ const he = () => {
|
|
|
30
31
|
return /* @__PURE__ */ e(
|
|
31
32
|
"div",
|
|
32
33
|
{
|
|
33
|
-
className:
|
|
34
|
+
className: u(
|
|
34
35
|
"w-full text-center py-4 font-bold text-2xl shrink-0",
|
|
35
36
|
l ? "bg-white text-black border-b border-black/20" : "bg-surface text-on-surface border-b border-outline-variant/30"
|
|
36
37
|
),
|
|
37
38
|
children: c
|
|
38
39
|
}
|
|
39
40
|
);
|
|
40
|
-
},
|
|
41
|
+
}, we = ({
|
|
41
42
|
isPreview: t = !1,
|
|
42
43
|
printWidth: n,
|
|
43
44
|
printHeight: l,
|
|
44
45
|
scale: c = 1
|
|
45
46
|
}) => {
|
|
46
|
-
const { printSettings: r } = v(), o =
|
|
47
|
+
const { printSettings: r } = v(), o = N(() => {
|
|
47
48
|
if (r.view !== "auto") return r.view;
|
|
48
|
-
const i =
|
|
49
|
+
const i = _(r.rangeEnd, r.rangeStart) + 1;
|
|
49
50
|
return i <= 1 ? "day" : i <= 7 ? "week" : "month";
|
|
50
|
-
}, [r.view, r.rangeStart, r.rangeEnd]),
|
|
51
|
+
}, [r.view, r.rangeStart, r.rangeEnd]), f = N(() => {
|
|
51
52
|
const i = b(r.rangeStart), d = b(r.rangeEnd), s = [];
|
|
52
53
|
if (o === "day") {
|
|
53
54
|
let a = i;
|
|
54
55
|
for (; a <= d; )
|
|
55
|
-
s.push(a), a =
|
|
56
|
+
s.push(a), a = H(a, 1);
|
|
56
57
|
} else if (o === "week") {
|
|
57
58
|
let a = g(i);
|
|
58
|
-
const
|
|
59
|
-
for (; a <=
|
|
60
|
-
s.push(a), a =
|
|
59
|
+
const h = g(d);
|
|
60
|
+
for (; a <= h; )
|
|
61
|
+
s.push(a), a = Q(a, 1);
|
|
61
62
|
} else if (o === "month") {
|
|
62
63
|
let a = x(i);
|
|
63
|
-
const
|
|
64
|
-
for (; a <=
|
|
65
|
-
s.push(a), a =
|
|
64
|
+
const h = x(d);
|
|
65
|
+
for (; a <= h; )
|
|
66
|
+
s.push(a), a = q(a, 1);
|
|
66
67
|
} else if (o === "year") {
|
|
67
68
|
let a = M(i);
|
|
68
|
-
const
|
|
69
|
-
for (; a <=
|
|
70
|
-
s.push(a), a =
|
|
69
|
+
const h = M(d);
|
|
70
|
+
for (; a <= h; )
|
|
71
|
+
s.push(a), a = G(a, 1);
|
|
71
72
|
}
|
|
72
73
|
return s.length > 0 ? s : [i];
|
|
73
74
|
}, [r.rangeStart, r.rangeEnd, o]);
|
|
74
75
|
return /* @__PURE__ */ e(
|
|
75
76
|
"div",
|
|
76
77
|
{
|
|
77
|
-
className:
|
|
78
|
+
className: u(
|
|
78
79
|
"flex flex-col w-full",
|
|
79
80
|
t && "items-center origin-top gap-8"
|
|
80
81
|
),
|
|
81
82
|
style: t ? { transform: `scale(${c})`, transformOrigin: "top center" } : {},
|
|
82
|
-
children:
|
|
83
|
+
children: f.map((i, d) => /* @__PURE__ */ e(
|
|
83
84
|
"div",
|
|
84
85
|
{
|
|
85
|
-
className:
|
|
86
|
+
className: u(
|
|
86
87
|
"print-page-container bg-white text-black",
|
|
87
88
|
t && "shadow-2xl border border-outline-variant/30 shrink-0"
|
|
88
89
|
),
|
|
@@ -100,14 +101,14 @@ const he = () => {
|
|
|
100
101
|
fontSize: r.fontSize === "small" ? "0.85rem" : r.fontSize === "smallest" ? "0.7rem" : "1rem",
|
|
101
102
|
filter: r.colorStyle === "bw" ? "grayscale(100%)" : "none"
|
|
102
103
|
},
|
|
103
|
-
children: /* @__PURE__ */
|
|
104
|
-
|
|
104
|
+
children: /* @__PURE__ */ p(
|
|
105
|
+
oe,
|
|
105
106
|
{
|
|
106
107
|
overrideDate: i,
|
|
107
108
|
overrideView: o,
|
|
108
109
|
children: [
|
|
109
|
-
/* @__PURE__ */ e(
|
|
110
|
-
/* @__PURE__ */ e(
|
|
110
|
+
/* @__PURE__ */ e(ve, {}),
|
|
111
|
+
/* @__PURE__ */ e(z, {})
|
|
111
112
|
]
|
|
112
113
|
}
|
|
113
114
|
)
|
|
@@ -116,8 +117,8 @@ const he = () => {
|
|
|
116
117
|
))
|
|
117
118
|
}
|
|
118
119
|
);
|
|
119
|
-
},
|
|
120
|
-
const { setPrintPreviewOpen: r, printSettings: o, variant:
|
|
120
|
+
}, P = y.forwardRef(({ className: t, children: n, ...l }, c) => {
|
|
121
|
+
const { setPrintPreviewOpen: r, printSettings: o, variant: f } = v();
|
|
121
122
|
U(() => {
|
|
122
123
|
const d = (s) => {
|
|
123
124
|
(s.ctrlKey || s.metaKey) && s.key.toLowerCase() === "p" && (s.preventDefault(), r(!0));
|
|
@@ -157,33 +158,33 @@ const he = () => {
|
|
|
157
158
|
}
|
|
158
159
|
}
|
|
159
160
|
`;
|
|
160
|
-
return /* @__PURE__ */
|
|
161
|
+
return /* @__PURE__ */ p(A, { children: [
|
|
161
162
|
/* @__PURE__ */ e("style", { children: i }),
|
|
162
|
-
/* @__PURE__ */
|
|
163
|
+
/* @__PURE__ */ p(
|
|
163
164
|
"div",
|
|
164
165
|
{
|
|
165
166
|
ref: c,
|
|
166
|
-
className:
|
|
167
|
-
"flex flex-col w-full h-full
|
|
168
|
-
|
|
167
|
+
className: u(
|
|
168
|
+
"flex flex-col w-full h-full rounded-2xl overflow-hidden font-manrope relative print:hidden",
|
|
169
|
+
D(f),
|
|
169
170
|
t
|
|
170
171
|
),
|
|
171
172
|
...l,
|
|
172
173
|
children: [
|
|
173
174
|
n,
|
|
174
|
-
/* @__PURE__ */ e(
|
|
175
|
-
/* @__PURE__ */ e(
|
|
175
|
+
/* @__PURE__ */ e(me, {}),
|
|
176
|
+
/* @__PURE__ */ e(pe, {})
|
|
176
177
|
]
|
|
177
178
|
}
|
|
178
179
|
),
|
|
179
180
|
typeof document < "u" && X(
|
|
180
|
-
/* @__PURE__ */ e("div", { className: "hidden print:block chesai-calendar-print-root w-full bg-white", children: /* @__PURE__ */ e(
|
|
181
|
+
/* @__PURE__ */ e("div", { className: "hidden print:block chesai-calendar-print-root w-full bg-white", children: /* @__PURE__ */ e(we, {}) }),
|
|
181
182
|
document.body
|
|
182
183
|
)
|
|
183
184
|
] });
|
|
184
185
|
});
|
|
185
|
-
|
|
186
|
-
const
|
|
186
|
+
P.displayName = "FullCalendarRootContent";
|
|
187
|
+
const T = y.forwardRef(
|
|
187
188
|
({
|
|
188
189
|
className: t,
|
|
189
190
|
events: n,
|
|
@@ -191,73 +192,73 @@ const S = y.forwardRef(
|
|
|
191
192
|
initialView: c,
|
|
192
193
|
variant: r,
|
|
193
194
|
onDateClick: o,
|
|
194
|
-
onEventClick:
|
|
195
|
+
onEventClick: f,
|
|
195
196
|
onViewChange: i,
|
|
196
197
|
onEventCreate: d,
|
|
197
198
|
onEventUpdate: s,
|
|
198
199
|
onEventDelete: a,
|
|
199
|
-
renderEventContent:
|
|
200
|
+
renderEventContent: h,
|
|
200
201
|
// Included Customization Props
|
|
201
|
-
renderPopoverHeader:
|
|
202
|
-
renderPopoverFooter:
|
|
203
|
-
renderPopoverCustomFields:
|
|
204
|
-
hidePopoverTitle:
|
|
205
|
-
hidePopoverTime:
|
|
206
|
-
hidePopoverRecurrence:
|
|
207
|
-
disableCreateOnGridClick:
|
|
208
|
-
disableEventClick:
|
|
209
|
-
disableDragAndDrop:
|
|
210
|
-
children:
|
|
211
|
-
|
|
212
|
-
},
|
|
213
|
-
|
|
202
|
+
renderPopoverHeader: F,
|
|
203
|
+
renderPopoverFooter: O,
|
|
204
|
+
renderPopoverCustomFields: E,
|
|
205
|
+
hidePopoverTitle: V,
|
|
206
|
+
hidePopoverTime: R,
|
|
207
|
+
hidePopoverRecurrence: j,
|
|
208
|
+
disableCreateOnGridClick: B,
|
|
209
|
+
disableEventClick: L,
|
|
210
|
+
disableDragAndDrop: W,
|
|
211
|
+
children: Y,
|
|
212
|
+
...$
|
|
213
|
+
}, K) => /* @__PURE__ */ e(
|
|
214
|
+
le,
|
|
214
215
|
{
|
|
215
216
|
events: n,
|
|
216
217
|
initialDate: l,
|
|
217
218
|
initialView: c,
|
|
218
219
|
variant: r,
|
|
219
220
|
onDateClick: o,
|
|
220
|
-
onEventClick:
|
|
221
|
+
onEventClick: f,
|
|
221
222
|
onViewChange: i,
|
|
222
223
|
onEventCreate: d,
|
|
223
224
|
onEventUpdate: s,
|
|
224
225
|
onEventDelete: a,
|
|
225
|
-
renderEventContent:
|
|
226
|
-
renderPopoverHeader:
|
|
227
|
-
renderPopoverFooter:
|
|
228
|
-
renderPopoverCustomFields:
|
|
229
|
-
hidePopoverTitle:
|
|
230
|
-
hidePopoverTime:
|
|
231
|
-
hidePopoverRecurrence:
|
|
232
|
-
disableCreateOnGridClick:
|
|
233
|
-
disableEventClick:
|
|
234
|
-
disableDragAndDrop:
|
|
235
|
-
children: /* @__PURE__ */ e(
|
|
226
|
+
renderEventContent: h,
|
|
227
|
+
renderPopoverHeader: F,
|
|
228
|
+
renderPopoverFooter: O,
|
|
229
|
+
renderPopoverCustomFields: E,
|
|
230
|
+
hidePopoverTitle: V,
|
|
231
|
+
hidePopoverTime: R,
|
|
232
|
+
hidePopoverRecurrence: j,
|
|
233
|
+
disableCreateOnGridClick: B,
|
|
234
|
+
disableEventClick: L,
|
|
235
|
+
disableDragAndDrop: W,
|
|
236
|
+
children: /* @__PURE__ */ e(P, { ref: K, className: t, ...$, children: Y })
|
|
236
237
|
}
|
|
237
238
|
)
|
|
238
239
|
);
|
|
239
|
-
|
|
240
|
-
const
|
|
240
|
+
T.displayName = "FullCalendar";
|
|
241
|
+
const ge = ({ className: t }) => {
|
|
241
242
|
const {
|
|
242
243
|
currentDate: n,
|
|
243
244
|
view: l,
|
|
244
245
|
variant: c,
|
|
245
246
|
setView: r,
|
|
246
247
|
navigateNext: o,
|
|
247
|
-
navigatePrev:
|
|
248
|
+
navigatePrev: f,
|
|
248
249
|
navigateToday: i,
|
|
249
250
|
setPrintPreviewOpen: d
|
|
250
|
-
} = v(), s = y.useMemo(() => l === "day" ? m(n, "MMMM d, yyyy") : l === "week" ? m(n, "MMMM yyyy") : l === "year" ? m(n, "yyyy") : m(n, "MMMM yyyy"), [n, l]);
|
|
251
|
-
return /* @__PURE__ */
|
|
251
|
+
} = v(), { isRtl: s } = ie(), a = y.useMemo(() => l === "day" ? m(n, "MMMM d, yyyy") : l === "week" ? m(n, "MMMM yyyy") : l === "year" ? m(n, "yyyy") : m(n, "MMMM yyyy"), [n, l]);
|
|
252
|
+
return /* @__PURE__ */ p(
|
|
252
253
|
"div",
|
|
253
254
|
{
|
|
254
|
-
className:
|
|
255
|
+
className: u(
|
|
255
256
|
"flex items-center justify-between p-4 shrink-0 border-b border-outline-variant/30 z-30 relative print:hidden",
|
|
256
|
-
|
|
257
|
+
he(c),
|
|
257
258
|
t
|
|
258
259
|
),
|
|
259
260
|
children: [
|
|
260
|
-
/* @__PURE__ */
|
|
261
|
+
/* @__PURE__ */ p("div", { className: "flex items-center gap-2 sm:gap-4", children: [
|
|
261
262
|
/* @__PURE__ */ e(
|
|
262
263
|
Z,
|
|
263
264
|
{
|
|
@@ -268,21 +269,21 @@ const ve = ({ className: t }) => {
|
|
|
268
269
|
children: "Today"
|
|
269
270
|
}
|
|
270
271
|
),
|
|
271
|
-
/* @__PURE__ */
|
|
272
|
-
/* @__PURE__ */ e(w, { variant: "ghost", size: "sm", onClick:
|
|
273
|
-
/* @__PURE__ */ e(w, { variant: "ghost", size: "sm", onClick: o, children: /* @__PURE__ */ e(
|
|
272
|
+
/* @__PURE__ */ p("div", { className: "flex items-center gap-1", children: [
|
|
273
|
+
/* @__PURE__ */ e(w, { variant: "ghost", size: "sm", onClick: f, children: s ? /* @__PURE__ */ e(k, { className: "w-5 h-5" }) : /* @__PURE__ */ e(C, { className: "w-5 h-5" }) }),
|
|
274
|
+
/* @__PURE__ */ e(w, { variant: "ghost", size: "sm", onClick: o, children: s ? /* @__PURE__ */ e(C, { className: "w-5 h-5" }) : /* @__PURE__ */ e(k, { className: "w-5 h-5" }) })
|
|
274
275
|
] }),
|
|
275
276
|
/* @__PURE__ */ e(
|
|
276
277
|
te,
|
|
277
278
|
{
|
|
278
279
|
variant: "title-large",
|
|
279
280
|
className: "font-normal min-w-[150px] sm:min-w-[200px]",
|
|
280
|
-
children:
|
|
281
|
+
children: a
|
|
281
282
|
}
|
|
282
283
|
)
|
|
283
284
|
] }),
|
|
284
|
-
/* @__PURE__ */
|
|
285
|
-
/* @__PURE__ */
|
|
285
|
+
/* @__PURE__ */ p("div", { className: "flex items-center gap-2 sm:gap-4", children: [
|
|
286
|
+
/* @__PURE__ */ p(re, { children: [
|
|
286
287
|
/* @__PURE__ */ e(ae, { asChild: !0, children: /* @__PURE__ */ e(
|
|
287
288
|
w,
|
|
288
289
|
{
|
|
@@ -301,7 +302,7 @@ const ve = ({ className: t }) => {
|
|
|
301
302
|
variant: "outlined",
|
|
302
303
|
shape: "full",
|
|
303
304
|
value: l,
|
|
304
|
-
onValueChange: (
|
|
305
|
+
onValueChange: (h) => r(h),
|
|
305
306
|
items: [
|
|
306
307
|
{ value: "day", label: "Day" },
|
|
307
308
|
{ value: "week", label: "Week" },
|
|
@@ -314,18 +315,21 @@ const ve = ({ className: t }) => {
|
|
|
314
315
|
]
|
|
315
316
|
}
|
|
316
317
|
);
|
|
317
|
-
},
|
|
318
|
-
const { view: t, variant: n, currentDate: l, setCurrentDate: c } = v(), r =
|
|
319
|
-
return /* @__PURE__ */
|
|
318
|
+
}, z = () => {
|
|
319
|
+
const { view: t, variant: n, currentDate: l, setCurrentDate: c } = v(), r = ue("(min-width: 1024px)"), o = y.useContext(S), f = t === "day" && r && !o;
|
|
320
|
+
return /* @__PURE__ */ p(
|
|
320
321
|
"div",
|
|
321
322
|
{
|
|
322
|
-
className:
|
|
323
|
+
className: u(
|
|
323
324
|
"flex-1 overflow-hidden relative flex flex-row",
|
|
324
|
-
o ? "bg-white h-full overflow-visible" :
|
|
325
|
+
o ? "bg-white h-full overflow-visible" : D(n)
|
|
325
326
|
),
|
|
326
327
|
children: [
|
|
327
|
-
|
|
328
|
-
|
|
328
|
+
f && /* @__PURE__ */ e("div", { className: u(
|
|
329
|
+
"w-[350px] shrink-0 border-r border-outline-variant/30 p-2 flex flex-col",
|
|
330
|
+
fe(n)
|
|
331
|
+
), children: /* @__PURE__ */ e(
|
|
332
|
+
ye,
|
|
329
333
|
{
|
|
330
334
|
mode: "single",
|
|
331
335
|
value: l,
|
|
@@ -337,21 +341,21 @@ const ve = ({ className: t }) => {
|
|
|
337
341
|
shape: "minimal"
|
|
338
342
|
}
|
|
339
343
|
) }),
|
|
340
|
-
/* @__PURE__ */
|
|
341
|
-
t === "month" && /* @__PURE__ */ e(
|
|
342
|
-
(t === "week" || t === "day") && /* @__PURE__ */ e(
|
|
343
|
-
t === "year" && /* @__PURE__ */ e(
|
|
344
|
+
/* @__PURE__ */ p("div", { className: "flex-1 flex flex-col overflow-hidden relative", children: [
|
|
345
|
+
t === "month" && /* @__PURE__ */ e(se, {}),
|
|
346
|
+
(t === "week" || t === "day") && /* @__PURE__ */ e(de, {}),
|
|
347
|
+
t === "year" && /* @__PURE__ */ e(ce, {})
|
|
344
348
|
] })
|
|
345
349
|
]
|
|
346
350
|
}
|
|
347
351
|
);
|
|
348
|
-
},
|
|
349
|
-
Toolbar:
|
|
350
|
-
View:
|
|
352
|
+
}, $e = Object.assign(T, {
|
|
353
|
+
Toolbar: ge,
|
|
354
|
+
View: z
|
|
351
355
|
});
|
|
352
356
|
export {
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
+
$e as FullCalendar,
|
|
358
|
+
z as FullCalendarViewDispatcher,
|
|
359
|
+
ve as PrintHeader,
|
|
360
|
+
we as PrintPagesLayout
|
|
357
361
|
};
|