@innosolutions/inno-calendar 1.0.21 → 1.0.22
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/{agenda-dropdown-D8rfvI3Q.js → agenda-dropdown-CXEm80us.js} +665 -661
- package/dist/agenda-dropdown-CXEm80us.js.map +1 -0
- package/dist/agenda-dropdown-DscR56sP.cjs +2 -0
- package/dist/agenda-dropdown-DscR56sP.cjs.map +1 -0
- package/dist/agenda-view-CVYk83hH.cjs +11 -0
- package/dist/{agenda-view-BotvTTEB.cjs.map → agenda-view-CVYk83hH.cjs.map} +1 -1
- package/dist/{agenda-view-CRI1J_KB.js → agenda-view-DM01Fpvr.js} +795 -733
- package/dist/{agenda-view-CRI1J_KB.js.map → agenda-view-DM01Fpvr.js.map} +1 -1
- package/dist/components/index.cjs +1 -1
- package/dist/components/index.mjs +2 -2
- package/dist/components/inno-calendar.d.ts +7 -1
- package/dist/components/inno-calendar.d.ts.map +1 -1
- package/dist/components/views/month-view.d.ts +7 -1
- package/dist/components/views/month-view.d.ts.map +1 -1
- package/dist/components/views/timeline-view.d.ts +1 -1
- package/dist/components/views/timeline-view.d.ts.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +3 -3
- package/dist/presets/index.cjs +1 -1
- package/dist/presets/index.mjs +1 -1
- package/dist/{tailwind-calendar-CQBD-ljO.cjs → tailwind-calendar-BvdxZ56F.cjs} +2 -2
- package/dist/{tailwind-calendar-CQBD-ljO.cjs.map → tailwind-calendar-BvdxZ56F.cjs.map} +1 -1
- package/dist/{tailwind-calendar-Y9dn5uKm.js → tailwind-calendar-DtZENWzv.js} +2 -2
- package/dist/{tailwind-calendar-Y9dn5uKm.js.map → tailwind-calendar-DtZENWzv.js.map} +1 -1
- package/package.json +1 -1
- package/dist/agenda-dropdown-D8rfvI3Q.js.map +0 -1
- package/dist/agenda-dropdown-oY4qocpp.cjs +0 -2
- package/dist/agenda-dropdown-oY4qocpp.cjs.map +0 -1
- package/dist/agenda-view-BotvTTEB.cjs +0 -11
|
@@ -1,41 +1,41 @@
|
|
|
1
1
|
import { jsxs as a, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { a as nt, c as
|
|
2
|
+
import { a as nt, c as u } from "./index-DtaLkIY8.js";
|
|
3
3
|
import * as K from "react";
|
|
4
|
-
import { forwardRef as
|
|
5
|
-
import * as
|
|
6
|
-
import { a7 as at, ad as ot, aY as
|
|
4
|
+
import { forwardRef as Se, createElement as Ne, useMemo as P, useState as ne, useCallback as z, useRef as oe, useEffect as rt, useLayoutEffect as Fe } from "react";
|
|
5
|
+
import * as j from "@radix-ui/react-dropdown-menu";
|
|
6
|
+
import { a7 as at, ad as ot, aY as Me, av as $e, a8 as ze, aJ as Ve, w as Ue, ah as qe, az as Q, aZ as Te, aB as Ke, V as be, ai as st, aQ as it, Z as lt, ao as dt } from "./slot-selection-context-CZjfJAcp.js";
|
|
7
7
|
import * as de from "@radix-ui/react-popover";
|
|
8
8
|
import * as me from "@radix-ui/react-tooltip";
|
|
9
|
-
const
|
|
9
|
+
const _e = (t) => typeof t == "boolean" ? `${t}` : t === 0 ? "0" : t, Ae = nt, Ye = (t, n) => (r) => {
|
|
10
10
|
var o;
|
|
11
|
-
if (n?.variants == null) return
|
|
12
|
-
const { variants:
|
|
13
|
-
const h = r?.[
|
|
11
|
+
if (n?.variants == null) return Ae(t, r?.class, r?.className);
|
|
12
|
+
const { variants: i, defaultVariants: f } = n, l = Object.keys(i).map((m) => {
|
|
13
|
+
const h = r?.[m], y = f?.[m];
|
|
14
14
|
if (h === null) return null;
|
|
15
|
-
const
|
|
16
|
-
return
|
|
17
|
-
}),
|
|
18
|
-
let [
|
|
19
|
-
return
|
|
20
|
-
}, {}), D = n == null || (o = n.compoundVariants) === null || o === void 0 ? void 0 : o.reduce((
|
|
21
|
-
let { class:
|
|
22
|
-
return Object.entries(w).every((
|
|
23
|
-
let [
|
|
24
|
-
return Array.isArray(
|
|
15
|
+
const d = _e(h) || _e(y);
|
|
16
|
+
return i[m][d];
|
|
17
|
+
}), x = r && Object.entries(r).reduce((m, h) => {
|
|
18
|
+
let [y, d] = h;
|
|
19
|
+
return d === void 0 || (m[y] = d), m;
|
|
20
|
+
}, {}), D = n == null || (o = n.compoundVariants) === null || o === void 0 ? void 0 : o.reduce((m, h) => {
|
|
21
|
+
let { class: y, className: d, ...w } = h;
|
|
22
|
+
return Object.entries(w).every((k) => {
|
|
23
|
+
let [b, W] = k;
|
|
24
|
+
return Array.isArray(W) ? W.includes({
|
|
25
25
|
...f,
|
|
26
|
-
...
|
|
27
|
-
}[
|
|
26
|
+
...x
|
|
27
|
+
}[b]) : {
|
|
28
28
|
...f,
|
|
29
|
-
...
|
|
30
|
-
}[
|
|
29
|
+
...x
|
|
30
|
+
}[b] === W;
|
|
31
31
|
}) ? [
|
|
32
|
-
...
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
] :
|
|
32
|
+
...m,
|
|
33
|
+
y,
|
|
34
|
+
d
|
|
35
|
+
] : m;
|
|
36
36
|
}, []);
|
|
37
|
-
return
|
|
38
|
-
}, ct =
|
|
37
|
+
return Ae(t, l, D, r?.class, r?.className);
|
|
38
|
+
}, ct = Ye(
|
|
39
39
|
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
40
40
|
{
|
|
41
41
|
variants: {
|
|
@@ -59,14 +59,14 @@ const $e = (t) => typeof t == "boolean" ? `${t}` : t === 0 ? "0" : t, _e = nt, K
|
|
|
59
59
|
size: "default"
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
-
),
|
|
63
|
-
({ className: t, variant: n, size: r, loading: o, disabled:
|
|
62
|
+
), le = Se(
|
|
63
|
+
({ className: t, variant: n, size: r, loading: o, disabled: i, children: f, ...l }, x) => /* @__PURE__ */ a(
|
|
64
64
|
"button",
|
|
65
65
|
{
|
|
66
|
-
className:
|
|
67
|
-
ref:
|
|
68
|
-
disabled:
|
|
69
|
-
...
|
|
66
|
+
className: u(ct({ variant: n, size: r, className: t })),
|
|
67
|
+
ref: x,
|
|
68
|
+
disabled: i || o,
|
|
69
|
+
...l,
|
|
70
70
|
children: [
|
|
71
71
|
o && /* @__PURE__ */ a(
|
|
72
72
|
"svg",
|
|
@@ -103,14 +103,14 @@ const $e = (t) => typeof t == "boolean" ? `${t}` : t === 0 ? "0" : t, _e = nt, K
|
|
|
103
103
|
}
|
|
104
104
|
)
|
|
105
105
|
);
|
|
106
|
-
|
|
107
|
-
const
|
|
106
|
+
le.displayName = "Button";
|
|
107
|
+
const Ge = (...t) => t.filter((n, r, o) => !!n && n.trim() !== "" && o.indexOf(n) === r).join(" ").trim();
|
|
108
108
|
const ut = (t) => t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
109
109
|
const mt = (t) => t.replace(
|
|
110
110
|
/^([A-Z])|[\s-_]+(\w)/g,
|
|
111
111
|
(n, r, o) => o ? o.toUpperCase() : r.toLowerCase()
|
|
112
112
|
);
|
|
113
|
-
const
|
|
113
|
+
const Ie = (t) => {
|
|
114
114
|
const n = mt(t);
|
|
115
115
|
return n.charAt(0).toUpperCase() + n.slice(1);
|
|
116
116
|
};
|
|
@@ -131,16 +131,16 @@ const ft = (t) => {
|
|
|
131
131
|
return !0;
|
|
132
132
|
return !1;
|
|
133
133
|
};
|
|
134
|
-
const pt =
|
|
134
|
+
const pt = Se(
|
|
135
135
|
({
|
|
136
136
|
color: t = "currentColor",
|
|
137
137
|
size: n = 24,
|
|
138
138
|
strokeWidth: r = 2,
|
|
139
139
|
absoluteStrokeWidth: o,
|
|
140
|
-
className:
|
|
140
|
+
className: i = "",
|
|
141
141
|
children: f,
|
|
142
|
-
iconNode:
|
|
143
|
-
...
|
|
142
|
+
iconNode: l,
|
|
143
|
+
...x
|
|
144
144
|
}, D) => Ne(
|
|
145
145
|
"svg",
|
|
146
146
|
{
|
|
@@ -150,38 +150,38 @@ const pt = Ce(
|
|
|
150
150
|
height: n,
|
|
151
151
|
stroke: t,
|
|
152
152
|
strokeWidth: o ? Number(r) * 24 / Number(n) : r,
|
|
153
|
-
className:
|
|
154
|
-
...!f && !ft(
|
|
155
|
-
...
|
|
153
|
+
className: Ge("lucide", i),
|
|
154
|
+
...!f && !ft(x) && { "aria-hidden": "true" },
|
|
155
|
+
...x
|
|
156
156
|
},
|
|
157
157
|
[
|
|
158
|
-
...
|
|
158
|
+
...l.map(([m, h]) => Ne(m, h)),
|
|
159
159
|
...Array.isArray(f) ? f : [f]
|
|
160
160
|
]
|
|
161
161
|
)
|
|
162
162
|
);
|
|
163
|
-
const
|
|
164
|
-
const r =
|
|
165
|
-
({ className: o, ...
|
|
163
|
+
const We = (t, n) => {
|
|
164
|
+
const r = Se(
|
|
165
|
+
({ className: o, ...i }, f) => Ne(pt, {
|
|
166
166
|
ref: f,
|
|
167
167
|
iconNode: n,
|
|
168
|
-
className:
|
|
169
|
-
`lucide-${ut(
|
|
168
|
+
className: Ge(
|
|
169
|
+
`lucide-${ut(Ie(t))}`,
|
|
170
170
|
`lucide-${t}`,
|
|
171
171
|
o
|
|
172
172
|
),
|
|
173
|
-
...
|
|
173
|
+
...i
|
|
174
174
|
})
|
|
175
175
|
);
|
|
176
|
-
return r.displayName =
|
|
176
|
+
return r.displayName = Ie(t), r;
|
|
177
177
|
};
|
|
178
|
-
const gt = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]], xt =
|
|
179
|
-
const bt = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], yt =
|
|
180
|
-
const wt = [["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]], vt =
|
|
181
|
-
|
|
178
|
+
const gt = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]], xt = We("check", gt);
|
|
179
|
+
const bt = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], yt = We("chevron-right", bt);
|
|
180
|
+
const wt = [["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]], vt = We("circle", wt), Re = j.Root, je = j.Trigger, Nt = K.forwardRef(({ className: t, inset: n, children: r, ...o }, i) => /* @__PURE__ */ a(
|
|
181
|
+
j.SubTrigger,
|
|
182
182
|
{
|
|
183
|
-
ref:
|
|
184
|
-
className:
|
|
183
|
+
ref: i,
|
|
184
|
+
className: u(
|
|
185
185
|
"flex cursor-default select-none items-center rounded-lg px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",
|
|
186
186
|
n && "pl-8",
|
|
187
187
|
t
|
|
@@ -193,37 +193,37 @@ const wt = [["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]], vt = Te
|
|
|
193
193
|
]
|
|
194
194
|
}
|
|
195
195
|
));
|
|
196
|
-
Nt.displayName =
|
|
196
|
+
Nt.displayName = j.SubTrigger.displayName;
|
|
197
197
|
const kt = K.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ e(
|
|
198
|
-
|
|
198
|
+
j.SubContent,
|
|
199
199
|
{
|
|
200
200
|
ref: r,
|
|
201
|
-
className:
|
|
201
|
+
className: u(
|
|
202
202
|
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
203
203
|
t
|
|
204
204
|
),
|
|
205
205
|
...n
|
|
206
206
|
}
|
|
207
207
|
));
|
|
208
|
-
kt.displayName =
|
|
209
|
-
const ke = K.forwardRef(({ className: t, sideOffset: n = 4, ...r }, o) => /* @__PURE__ */ e(
|
|
210
|
-
|
|
208
|
+
kt.displayName = j.SubContent.displayName;
|
|
209
|
+
const ke = K.forwardRef(({ className: t, sideOffset: n = 4, ...r }, o) => /* @__PURE__ */ e(j.Portal, { children: /* @__PURE__ */ e(
|
|
210
|
+
j.Content,
|
|
211
211
|
{
|
|
212
212
|
ref: o,
|
|
213
213
|
sideOffset: n,
|
|
214
|
-
className:
|
|
214
|
+
className: u(
|
|
215
215
|
"z-50 rounded-xl border bg-popover p-1 text-popover-foreground shadow-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
216
216
|
t
|
|
217
217
|
),
|
|
218
218
|
...r
|
|
219
219
|
}
|
|
220
220
|
) }));
|
|
221
|
-
ke.displayName =
|
|
221
|
+
ke.displayName = j.Content.displayName;
|
|
222
222
|
const De = K.forwardRef(({ className: t, inset: n, ...r }, o) => /* @__PURE__ */ e(
|
|
223
|
-
|
|
223
|
+
j.Item,
|
|
224
224
|
{
|
|
225
225
|
ref: o,
|
|
226
|
-
className:
|
|
226
|
+
className: u(
|
|
227
227
|
"relative flex cursor-pointer select-none items-center rounded-lg px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
228
228
|
n && "pl-8",
|
|
229
229
|
t
|
|
@@ -231,72 +231,72 @@ const De = K.forwardRef(({ className: t, inset: n, ...r }, o) => /* @__PURE__ */
|
|
|
231
231
|
...r
|
|
232
232
|
}
|
|
233
233
|
));
|
|
234
|
-
De.displayName =
|
|
235
|
-
const Dt = K.forwardRef(({ className: t, children: n, checked: r = !1, ...o },
|
|
236
|
-
|
|
234
|
+
De.displayName = j.Item.displayName;
|
|
235
|
+
const Dt = K.forwardRef(({ className: t, children: n, checked: r = !1, ...o }, i) => /* @__PURE__ */ a(
|
|
236
|
+
j.CheckboxItem,
|
|
237
237
|
{
|
|
238
|
-
ref:
|
|
239
|
-
className:
|
|
238
|
+
ref: i,
|
|
239
|
+
className: u(
|
|
240
240
|
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
241
241
|
t
|
|
242
242
|
),
|
|
243
243
|
checked: r,
|
|
244
244
|
...o,
|
|
245
245
|
children: [
|
|
246
|
-
/* @__PURE__ */ e("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ e(
|
|
246
|
+
/* @__PURE__ */ e("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ e(j.ItemIndicator, { children: /* @__PURE__ */ e(xt, { className: "h-4 w-4" }) }) }),
|
|
247
247
|
n
|
|
248
248
|
]
|
|
249
249
|
}
|
|
250
250
|
));
|
|
251
|
-
Dt.displayName =
|
|
251
|
+
Dt.displayName = j.CheckboxItem.displayName;
|
|
252
252
|
const Ct = K.forwardRef(({ className: t, children: n, ...r }, o) => /* @__PURE__ */ a(
|
|
253
|
-
|
|
253
|
+
j.RadioItem,
|
|
254
254
|
{
|
|
255
255
|
ref: o,
|
|
256
|
-
className:
|
|
256
|
+
className: u(
|
|
257
257
|
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
258
258
|
t
|
|
259
259
|
),
|
|
260
260
|
...r,
|
|
261
261
|
children: [
|
|
262
|
-
/* @__PURE__ */ e("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ e(
|
|
262
|
+
/* @__PURE__ */ e("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ e(j.ItemIndicator, { children: /* @__PURE__ */ e(vt, { className: "h-2 w-2 fill-current" }) }) }),
|
|
263
263
|
n
|
|
264
264
|
]
|
|
265
265
|
}
|
|
266
266
|
));
|
|
267
|
-
Ct.displayName =
|
|
267
|
+
Ct.displayName = j.RadioItem.displayName;
|
|
268
268
|
const St = K.forwardRef(({ className: t, inset: n, ...r }, o) => /* @__PURE__ */ e(
|
|
269
|
-
|
|
269
|
+
j.Label,
|
|
270
270
|
{
|
|
271
271
|
ref: o,
|
|
272
|
-
className:
|
|
272
|
+
className: u("px-2 py-1.5 text-sm font-semibold", n && "pl-8", t),
|
|
273
273
|
...r
|
|
274
274
|
}
|
|
275
275
|
));
|
|
276
|
-
St.displayName =
|
|
276
|
+
St.displayName = j.Label.displayName;
|
|
277
277
|
const Mt = K.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ e(
|
|
278
|
-
|
|
278
|
+
j.Separator,
|
|
279
279
|
{
|
|
280
280
|
ref: r,
|
|
281
|
-
className:
|
|
281
|
+
className: u("-mx-1 my-1 h-px bg-muted", t),
|
|
282
282
|
...n
|
|
283
283
|
}
|
|
284
284
|
));
|
|
285
|
-
Mt.displayName =
|
|
286
|
-
const
|
|
285
|
+
Mt.displayName = j.Separator.displayName;
|
|
286
|
+
const ee = de.Root, te = de.Trigger, tn = de.Anchor, J = K.forwardRef(({ className: t, align: n = "center", sideOffset: r = 4, ...o }, i) => /* @__PURE__ */ e(de.Portal, { children: /* @__PURE__ */ e(
|
|
287
287
|
de.Content,
|
|
288
288
|
{
|
|
289
|
-
ref:
|
|
289
|
+
ref: i,
|
|
290
290
|
align: n,
|
|
291
291
|
sideOffset: r,
|
|
292
|
-
className:
|
|
292
|
+
className: u(
|
|
293
293
|
"z-50 w-72 rounded-xl border bg-white text-popover-foreground outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
294
294
|
t
|
|
295
295
|
),
|
|
296
296
|
...o
|
|
297
297
|
}
|
|
298
298
|
) }));
|
|
299
|
-
|
|
299
|
+
J.displayName = de.Content.displayName;
|
|
300
300
|
const zt = [
|
|
301
301
|
"JAN",
|
|
302
302
|
"FEB",
|
|
@@ -317,7 +317,7 @@ function Tt({ onClick: t, className: n }) {
|
|
|
317
317
|
"button",
|
|
318
318
|
{
|
|
319
319
|
type: "button",
|
|
320
|
-
className:
|
|
320
|
+
className: u(
|
|
321
321
|
"flex size-11 sm:size-14 flex-col items-start overflow-hidden rounded-lg border shrink-0",
|
|
322
322
|
"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
323
323
|
"hover:bg-accent/50 transition-colors",
|
|
@@ -331,7 +331,7 @@ function Tt({ onClick: t, className: n }) {
|
|
|
331
331
|
}
|
|
332
332
|
);
|
|
333
333
|
}
|
|
334
|
-
const Wt =
|
|
334
|
+
const Wt = Ye(
|
|
335
335
|
"inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
336
336
|
{
|
|
337
337
|
variants: {
|
|
@@ -346,7 +346,7 @@ const Wt = Ke(
|
|
|
346
346
|
}
|
|
347
347
|
);
|
|
348
348
|
function Lt({ className: t, variant: n, ...r }) {
|
|
349
|
-
return /* @__PURE__ */ e("div", { className:
|
|
349
|
+
return /* @__PURE__ */ e("div", { className: u(Wt({ variant: n }), t), ...r });
|
|
350
350
|
}
|
|
351
351
|
function Et({ className: t }) {
|
|
352
352
|
return /* @__PURE__ */ e(
|
|
@@ -403,20 +403,20 @@ function At({
|
|
|
403
403
|
view: n,
|
|
404
404
|
events: r = [],
|
|
405
405
|
onNavigatePrev: o,
|
|
406
|
-
onNavigateNext:
|
|
406
|
+
onNavigateNext: i,
|
|
407
407
|
weekStartsOn: f = 1,
|
|
408
|
-
showEventCount:
|
|
409
|
-
className:
|
|
408
|
+
showEventCount: l = !0,
|
|
409
|
+
className: x
|
|
410
410
|
}) {
|
|
411
|
-
const D = _t[t.getMonth()],
|
|
412
|
-
return /* @__PURE__ */ a("div", { className:
|
|
411
|
+
const D = _t[t.getMonth()], m = t.getFullYear(), h = l ? at(r, t, n, f) : 0, y = ot(t, n);
|
|
412
|
+
return /* @__PURE__ */ a("div", { className: u("min-w-0 flex-1", x), children: [
|
|
413
413
|
/* @__PURE__ */ a("div", { className: "flex items-center gap-1.5 sm:gap-2 flex-wrap", children: [
|
|
414
414
|
/* @__PURE__ */ a("span", { className: "text-base sm:text-lg font-semibold truncate", children: [
|
|
415
415
|
D,
|
|
416
416
|
" ",
|
|
417
|
-
|
|
417
|
+
m
|
|
418
418
|
] }),
|
|
419
|
-
|
|
419
|
+
l && /* @__PURE__ */ e(
|
|
420
420
|
Lt,
|
|
421
421
|
{
|
|
422
422
|
variant: "outline",
|
|
@@ -427,7 +427,7 @@ function At({
|
|
|
427
427
|
] }),
|
|
428
428
|
/* @__PURE__ */ a("div", { className: "flex items-center gap-1.5 sm:gap-2", children: [
|
|
429
429
|
/* @__PURE__ */ e(
|
|
430
|
-
|
|
430
|
+
le,
|
|
431
431
|
{
|
|
432
432
|
variant: "outline",
|
|
433
433
|
size: "icon",
|
|
@@ -436,14 +436,14 @@ function At({
|
|
|
436
436
|
children: /* @__PURE__ */ e(Et, {})
|
|
437
437
|
}
|
|
438
438
|
),
|
|
439
|
-
/* @__PURE__ */ e("p", { className: "text-xs sm:text-sm text-muted-foreground truncate", children:
|
|
439
|
+
/* @__PURE__ */ e("p", { className: "text-xs sm:text-sm text-muted-foreground truncate", children: y }),
|
|
440
440
|
/* @__PURE__ */ e(
|
|
441
|
-
|
|
441
|
+
le,
|
|
442
442
|
{
|
|
443
443
|
variant: "outline",
|
|
444
444
|
size: "icon",
|
|
445
445
|
className: "size-5 sm:size-6 [&_svg]:size-3 sm:[&_svg]:size-4",
|
|
446
|
-
onClick:
|
|
446
|
+
onClick: i,
|
|
447
447
|
children: /* @__PURE__ */ e($t, {})
|
|
448
448
|
}
|
|
449
449
|
)
|
|
@@ -479,7 +479,7 @@ function It({ className: t }) {
|
|
|
479
479
|
}
|
|
480
480
|
);
|
|
481
481
|
}
|
|
482
|
-
function
|
|
482
|
+
function xe({ className: t }) {
|
|
483
483
|
return /* @__PURE__ */ a(
|
|
484
484
|
"svg",
|
|
485
485
|
{
|
|
@@ -502,7 +502,7 @@ function ge({ className: t }) {
|
|
|
502
502
|
}
|
|
503
503
|
);
|
|
504
504
|
}
|
|
505
|
-
function
|
|
505
|
+
function Pe({ className: t }) {
|
|
506
506
|
return /* @__PURE__ */ e(
|
|
507
507
|
"svg",
|
|
508
508
|
{
|
|
@@ -587,7 +587,7 @@ function jt({ className: t }) {
|
|
|
587
587
|
}
|
|
588
588
|
);
|
|
589
589
|
}
|
|
590
|
-
function
|
|
590
|
+
function Pt({ className: t }) {
|
|
591
591
|
return /* @__PURE__ */ a(
|
|
592
592
|
"svg",
|
|
593
593
|
{
|
|
@@ -608,7 +608,7 @@ function Bt({ className: t }) {
|
|
|
608
608
|
}
|
|
609
609
|
);
|
|
610
610
|
}
|
|
611
|
-
function
|
|
611
|
+
function Bt({ className: t }) {
|
|
612
612
|
return /* @__PURE__ */ a(
|
|
613
613
|
"svg",
|
|
614
614
|
{
|
|
@@ -654,75 +654,75 @@ function Ot({ className: t }) {
|
|
|
654
654
|
}
|
|
655
655
|
);
|
|
656
656
|
}
|
|
657
|
-
const
|
|
657
|
+
const Ht = [
|
|
658
658
|
{ value: "day", label: "Day", icon: jt },
|
|
659
|
-
{ value: "week", label: "Week", icon:
|
|
660
|
-
{ value: "month", label: "Month", icon:
|
|
659
|
+
{ value: "week", label: "Week", icon: Pt },
|
|
660
|
+
{ value: "month", label: "Month", icon: Bt },
|
|
661
661
|
{ value: "year", label: "Year", icon: Ot }
|
|
662
662
|
// { value: 'agenda', label: 'Agenda', icon: ListIcon }, NOTE: Not needed currently
|
|
663
|
-
],
|
|
664
|
-
{ value: "timeline-day", label: "1 Day", icon:
|
|
665
|
-
{ value: "timeline-3day", label: "3 Days", icon:
|
|
666
|
-
{ value: "timeline-week", label: "7 Days", icon:
|
|
663
|
+
], Oe = [
|
|
664
|
+
{ value: "timeline-day", label: "1 Day", icon: xe },
|
|
665
|
+
{ value: "timeline-3day", label: "3 Days", icon: xe },
|
|
666
|
+
{ value: "timeline-week", label: "7 Days", icon: xe }
|
|
667
667
|
];
|
|
668
668
|
function nn({
|
|
669
669
|
currentDate: t,
|
|
670
670
|
view: n,
|
|
671
671
|
events: r = [],
|
|
672
672
|
onNavigateToday: o,
|
|
673
|
-
onNavigatePrev:
|
|
673
|
+
onNavigatePrev: i,
|
|
674
674
|
onNavigateNext: f,
|
|
675
|
-
onNavigate:
|
|
676
|
-
onViewChange:
|
|
675
|
+
onNavigate: l,
|
|
676
|
+
onViewChange: x,
|
|
677
677
|
onAddEvent: D,
|
|
678
|
-
availableViews:
|
|
678
|
+
availableViews: m = ["day", "week", "month", "agenda"],
|
|
679
679
|
showTimelineViews: h = !1,
|
|
680
|
-
timelineViews:
|
|
681
|
-
settingsContent:
|
|
680
|
+
timelineViews: y,
|
|
681
|
+
settingsContent: d,
|
|
682
682
|
showSettings: w = !1,
|
|
683
|
-
filterContent:
|
|
684
|
-
actions:
|
|
685
|
-
className:
|
|
686
|
-
weekStartsOn:
|
|
687
|
-
labels:
|
|
683
|
+
filterContent: k,
|
|
684
|
+
actions: b,
|
|
685
|
+
className: W,
|
|
686
|
+
weekStartsOn: L = 1,
|
|
687
|
+
labels: M = {}
|
|
688
688
|
}) {
|
|
689
|
-
const
|
|
689
|
+
const C = P(
|
|
690
690
|
() => ({
|
|
691
691
|
today: "Today",
|
|
692
692
|
addEvent: "Add Event",
|
|
693
693
|
calendarView: "Calendar View",
|
|
694
694
|
resourceView: "Resource View",
|
|
695
|
-
...
|
|
695
|
+
...M
|
|
696
696
|
}),
|
|
697
|
-
[
|
|
698
|
-
),
|
|
699
|
-
o?.(),
|
|
700
|
-
},
|
|
701
|
-
|
|
702
|
-
},
|
|
703
|
-
f?.(),
|
|
704
|
-
},
|
|
705
|
-
(
|
|
706
|
-
),
|
|
707
|
-
return /* @__PURE__ */ a("div", { className:
|
|
697
|
+
[M]
|
|
698
|
+
), A = () => {
|
|
699
|
+
o?.(), l?.("today");
|
|
700
|
+
}, p = () => {
|
|
701
|
+
i?.(), l?.("prev");
|
|
702
|
+
}, T = () => {
|
|
703
|
+
f?.(), l?.("next");
|
|
704
|
+
}, v = ["day", "week", "month", "year", "agenda"].includes(n), E = n.startsWith("timeline-") || n.startsWith("resource-"), B = Ht.filter(
|
|
705
|
+
(c) => m.includes(c.value)
|
|
706
|
+
), O = v ? B.find((c) => c.value === n) : null, g = E ? Oe.find((c) => c.value === n) : null;
|
|
707
|
+
return /* @__PURE__ */ a("div", { className: u("flex flex-col w-full gap-3 mb-2", W), children: [
|
|
708
708
|
/* @__PURE__ */ a("div", { className: "flex lg:flex-row flex-col w-full justify-between gap-3", children: [
|
|
709
709
|
/* @__PURE__ */ a("div", { className: "flex items-center justify-between gap-2", children: [
|
|
710
710
|
/* @__PURE__ */ a("div", { className: "flex items-center gap-2 sm:gap-3 min-w-0", children: [
|
|
711
|
-
/* @__PURE__ */ e(Tt, { onClick:
|
|
711
|
+
/* @__PURE__ */ e(Tt, { onClick: A }),
|
|
712
712
|
/* @__PURE__ */ e(
|
|
713
713
|
At,
|
|
714
714
|
{
|
|
715
715
|
date: t,
|
|
716
716
|
view: n,
|
|
717
717
|
events: r,
|
|
718
|
-
onNavigatePrev:
|
|
719
|
-
onNavigateNext:
|
|
720
|
-
weekStartsOn:
|
|
718
|
+
onNavigatePrev: p,
|
|
719
|
+
onNavigateNext: T,
|
|
720
|
+
weekStartsOn: L
|
|
721
721
|
}
|
|
722
722
|
)
|
|
723
723
|
] }),
|
|
724
724
|
D && /* @__PURE__ */ e(
|
|
725
|
-
|
|
725
|
+
le,
|
|
726
726
|
{
|
|
727
727
|
size: "icon",
|
|
728
728
|
className: "shrink-0 lg:hidden",
|
|
@@ -732,79 +732,79 @@ function nn({
|
|
|
732
732
|
)
|
|
733
733
|
] }),
|
|
734
734
|
/* @__PURE__ */ a("div", { className: "flex items-center gap-1.5 sm:gap-2 overflow-x-auto pb-1 -mb-1 scrollbar-none", children: [
|
|
735
|
-
|
|
735
|
+
x && B.length > 0 && /* @__PURE__ */ a(Re, { children: [
|
|
736
736
|
/* @__PURE__ */ a(
|
|
737
|
-
|
|
737
|
+
je,
|
|
738
738
|
{
|
|
739
|
-
className:
|
|
739
|
+
className: u(
|
|
740
740
|
"inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors",
|
|
741
741
|
"h-10 px-2 sm:px-3 gap-1 sm:gap-1.5 shrink-0",
|
|
742
|
-
|
|
742
|
+
v ? "bg-primary text-primary-foreground hover:bg-primary/90" : "border border-input bg-background hover:bg-accent hover:text-accent-foreground"
|
|
743
743
|
),
|
|
744
744
|
children: [
|
|
745
745
|
/* @__PURE__ */ e(It, { className: "size-4" }),
|
|
746
|
-
/* @__PURE__ */ e("span", { className: "text-xs sm:text-sm font-medium", children:
|
|
747
|
-
/* @__PURE__ */ e(
|
|
746
|
+
/* @__PURE__ */ e("span", { className: "text-xs sm:text-sm font-medium", children: O?.label ?? C.calendarView }),
|
|
747
|
+
/* @__PURE__ */ e(Pe, { className: "size-3 opacity-60" })
|
|
748
748
|
]
|
|
749
749
|
}
|
|
750
750
|
),
|
|
751
|
-
/* @__PURE__ */ e(ke, { align: "start", className: "min-w-[120px]", children:
|
|
752
|
-
const
|
|
751
|
+
/* @__PURE__ */ e(ke, { align: "start", className: "min-w-[120px]", children: B.map((c) => {
|
|
752
|
+
const F = c.icon;
|
|
753
753
|
return /* @__PURE__ */ a(
|
|
754
754
|
De,
|
|
755
755
|
{
|
|
756
|
-
onClick: () =>
|
|
757
|
-
className:
|
|
756
|
+
onClick: () => x(c.value),
|
|
757
|
+
className: u(
|
|
758
758
|
"gap-2",
|
|
759
|
-
n ===
|
|
759
|
+
n === c.value && "bg-accent"
|
|
760
760
|
),
|
|
761
761
|
children: [
|
|
762
|
-
/* @__PURE__ */ e(
|
|
763
|
-
/* @__PURE__ */ e("span", { children:
|
|
762
|
+
/* @__PURE__ */ e(F, { className: "size-4" }),
|
|
763
|
+
/* @__PURE__ */ e("span", { children: c.label })
|
|
764
764
|
]
|
|
765
765
|
},
|
|
766
|
-
|
|
766
|
+
c.value
|
|
767
767
|
);
|
|
768
768
|
}) })
|
|
769
769
|
] }),
|
|
770
|
-
h &&
|
|
770
|
+
h && x && /* @__PURE__ */ a(Re, { children: [
|
|
771
771
|
/* @__PURE__ */ a(
|
|
772
|
-
|
|
772
|
+
je,
|
|
773
773
|
{
|
|
774
|
-
className:
|
|
774
|
+
className: u(
|
|
775
775
|
"inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors",
|
|
776
776
|
"h-10 px-2 sm:px-3 gap-1 sm:gap-1.5 shrink-0",
|
|
777
|
-
|
|
777
|
+
E ? "bg-primary text-primary-foreground hover:bg-primary/90" : "border border-input bg-white hover:bg-zinc-50 hover:text-accent-foreground"
|
|
778
778
|
),
|
|
779
779
|
children: [
|
|
780
|
-
/* @__PURE__ */ e(
|
|
781
|
-
/* @__PURE__ */ e("span", { className: "text-xs sm:text-sm font-medium", children:
|
|
782
|
-
/* @__PURE__ */ e(
|
|
780
|
+
/* @__PURE__ */ e(xe, { className: "size-4" }),
|
|
781
|
+
/* @__PURE__ */ e("span", { className: "text-xs sm:text-sm font-medium", children: g?.label ?? C.resourceView }),
|
|
782
|
+
/* @__PURE__ */ e(Pe, { className: "size-3 opacity-60" })
|
|
783
783
|
]
|
|
784
784
|
}
|
|
785
785
|
),
|
|
786
|
-
/* @__PURE__ */ e(ke, { align: "start", className: "min-w-[120px]", children:
|
|
787
|
-
const
|
|
786
|
+
/* @__PURE__ */ e(ke, { align: "start", className: "min-w-[120px]", children: Oe.map((c) => {
|
|
787
|
+
const F = c.icon;
|
|
788
788
|
return /* @__PURE__ */ a(
|
|
789
789
|
De,
|
|
790
790
|
{
|
|
791
|
-
onClick: () =>
|
|
792
|
-
className:
|
|
791
|
+
onClick: () => x(c.value),
|
|
792
|
+
className: u(
|
|
793
793
|
"gap-2",
|
|
794
|
-
n ===
|
|
794
|
+
n === c.value && "bg-accent"
|
|
795
795
|
),
|
|
796
796
|
children: [
|
|
797
|
-
/* @__PURE__ */ e(
|
|
798
|
-
/* @__PURE__ */ e("span", { children:
|
|
797
|
+
/* @__PURE__ */ e(F, { className: "size-4" }),
|
|
798
|
+
/* @__PURE__ */ e("span", { children: c.label })
|
|
799
799
|
]
|
|
800
800
|
},
|
|
801
|
-
|
|
801
|
+
c.value
|
|
802
802
|
);
|
|
803
803
|
}) })
|
|
804
804
|
] }),
|
|
805
|
-
w &&
|
|
806
|
-
/* @__PURE__ */ e(
|
|
807
|
-
|
|
805
|
+
w && d && /* @__PURE__ */ a(ee, { children: [
|
|
806
|
+
/* @__PURE__ */ e(te, { asChild: !0, children: /* @__PURE__ */ e(
|
|
807
|
+
le,
|
|
808
808
|
{
|
|
809
809
|
variant: "outline",
|
|
810
810
|
size: "icon",
|
|
@@ -813,38 +813,38 @@ function nn({
|
|
|
813
813
|
}
|
|
814
814
|
) }),
|
|
815
815
|
/* @__PURE__ */ e(
|
|
816
|
-
|
|
816
|
+
J,
|
|
817
817
|
{
|
|
818
818
|
className: "w-auto min-w-80 p-0",
|
|
819
819
|
align: "end",
|
|
820
820
|
sideOffset: 8,
|
|
821
|
-
children: /* @__PURE__ */ e("div", { className: "max-h-[70vh] overflow-y-auto p-4 space-y-6", children:
|
|
821
|
+
children: /* @__PURE__ */ e("div", { className: "max-h-[70vh] overflow-y-auto p-4 space-y-6", children: d })
|
|
822
822
|
}
|
|
823
823
|
)
|
|
824
824
|
] }),
|
|
825
|
-
|
|
826
|
-
D && /* @__PURE__ */ a(
|
|
825
|
+
b,
|
|
826
|
+
D && /* @__PURE__ */ a(le, { className: "hidden lg:flex shrink-0 max-h-10", onClick: D, children: [
|
|
827
827
|
/* @__PURE__ */ e(Be, { className: "size-4" }),
|
|
828
|
-
|
|
828
|
+
C.addEvent
|
|
829
829
|
] })
|
|
830
830
|
] })
|
|
831
831
|
] }),
|
|
832
|
-
|
|
832
|
+
k && /* @__PURE__ */ e("div", { className: "flex items-center gap-2 overflow-x-auto pb-1 -mb-1 scrollbar-none", children: k })
|
|
833
833
|
] });
|
|
834
834
|
}
|
|
835
|
-
const rn = me.Provider,
|
|
835
|
+
const rn = me.Provider, se = me.Root, ie = me.Trigger, Z = K.forwardRef(({ className: t, sideOffset: n = 4, ...r }, o) => /* @__PURE__ */ e(
|
|
836
836
|
me.Content,
|
|
837
837
|
{
|
|
838
838
|
ref: o,
|
|
839
839
|
sideOffset: n,
|
|
840
|
-
className:
|
|
840
|
+
className: u(
|
|
841
841
|
"z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
842
842
|
t
|
|
843
843
|
),
|
|
844
844
|
...r
|
|
845
845
|
}
|
|
846
846
|
));
|
|
847
|
-
|
|
847
|
+
Z.displayName = me.Content.displayName;
|
|
848
848
|
function he(t) {
|
|
849
849
|
return {
|
|
850
850
|
blue: {
|
|
@@ -919,7 +919,7 @@ function he(t) {
|
|
|
919
919
|
}
|
|
920
920
|
}[t ?? "blue"];
|
|
921
921
|
}
|
|
922
|
-
function
|
|
922
|
+
function ye(t) {
|
|
923
923
|
return t.toLocaleTimeString([], {
|
|
924
924
|
hour: "2-digit",
|
|
925
925
|
minute: "2-digit",
|
|
@@ -927,97 +927,97 @@ function be(t) {
|
|
|
927
927
|
});
|
|
928
928
|
}
|
|
929
929
|
function X(t, n) {
|
|
930
|
-
return `${
|
|
930
|
+
return `${ye(t)} - ${ye(n)}`;
|
|
931
931
|
}
|
|
932
|
-
function
|
|
932
|
+
function Le(t) {
|
|
933
933
|
const n = new Date(t);
|
|
934
934
|
return n.setHours(0, 0, 0, 0), n;
|
|
935
935
|
}
|
|
936
|
-
function
|
|
936
|
+
function Ce({
|
|
937
937
|
event: t,
|
|
938
938
|
variant: n = "full",
|
|
939
939
|
badgeVariant: r = "colored",
|
|
940
940
|
onClick: o,
|
|
941
|
-
className:
|
|
941
|
+
className: i,
|
|
942
942
|
showTime: f = !0,
|
|
943
|
-
showDescription:
|
|
944
|
-
showParticipants:
|
|
943
|
+
showDescription: l = !1,
|
|
944
|
+
showParticipants: x = !1,
|
|
945
945
|
style: D,
|
|
946
|
-
disablePopover:
|
|
946
|
+
disablePopover: m = !1,
|
|
947
947
|
renderPopover: h,
|
|
948
|
-
enableDrag:
|
|
948
|
+
enableDrag: y = !1
|
|
949
949
|
}) {
|
|
950
|
-
const
|
|
951
|
-
|
|
952
|
-
}, [
|
|
953
|
-
|
|
954
|
-
}, []),
|
|
955
|
-
(
|
|
956
|
-
|
|
950
|
+
const d = he(t.color), [w, k] = ne(!1), [b, W] = ne(!1), L = Me(), M = t.endDate < Le(/* @__PURE__ */ new Date()), C = t.isCanceled ?? !1, A = y && L && !C && !M, p = C ? /* @__PURE__ */ e(Vt, { className: "h-3 w-3 text-zinc-800 dark:text-zinc-200" }) : t.meetingTookPlace ? /* @__PURE__ */ e(Ft, { className: u("h-3 w-3", d.text) }) : null, T = z(() => {
|
|
951
|
+
b || (m && o ? o(t) : m || k(!0));
|
|
952
|
+
}, [b, m, o, t]), v = z(() => {
|
|
953
|
+
k(!1);
|
|
954
|
+
}, []), E = z(
|
|
955
|
+
(g) => {
|
|
956
|
+
A && (g.dataTransfer.effectAllowed = "move", g.dataTransfer.setData("text/plain", t.id), W(!0), L?.startDrag?.(t));
|
|
957
957
|
},
|
|
958
|
-
[
|
|
959
|
-
),
|
|
960
|
-
|
|
961
|
-
}, [
|
|
958
|
+
[A, t, L]
|
|
959
|
+
), B = z(() => {
|
|
960
|
+
W(!1), L?.isDragging && L.endDrag?.();
|
|
961
|
+
}, [L]);
|
|
962
962
|
if (n === "dot") {
|
|
963
|
-
const
|
|
963
|
+
const g = /* @__PURE__ */ e(
|
|
964
964
|
"button",
|
|
965
965
|
{
|
|
966
966
|
type: "button",
|
|
967
|
-
onClick:
|
|
968
|
-
className:
|
|
967
|
+
onClick: T,
|
|
968
|
+
className: u(
|
|
969
969
|
"size-2 rounded-full cursor-pointer transition-opacity",
|
|
970
|
-
|
|
970
|
+
M ? "bg-gray-400" : d.dot,
|
|
971
971
|
t.isCanceled && "opacity-50",
|
|
972
|
-
|
|
972
|
+
i
|
|
973
973
|
),
|
|
974
974
|
style: D,
|
|
975
975
|
"aria-label": t.title
|
|
976
976
|
}
|
|
977
977
|
);
|
|
978
|
-
return
|
|
979
|
-
/* @__PURE__ */ e(
|
|
980
|
-
/* @__PURE__ */ e(
|
|
978
|
+
return m ? /* @__PURE__ */ a(se, { children: [
|
|
979
|
+
/* @__PURE__ */ e(ie, { asChild: !0, children: g }),
|
|
980
|
+
/* @__PURE__ */ e(Z, { children: /* @__PURE__ */ a("div", { className: "flex flex-col gap-0.5", children: [
|
|
981
981
|
/* @__PURE__ */ e("div", { className: "font-medium", children: t.title }),
|
|
982
982
|
/* @__PURE__ */ e("div", { className: "text-xs opacity-80", children: X(t.startDate, t.endDate) })
|
|
983
983
|
] }) })
|
|
984
|
-
] }) : /* @__PURE__ */ a(
|
|
985
|
-
/* @__PURE__ */ e(
|
|
986
|
-
/* @__PURE__ */ e(
|
|
987
|
-
/* @__PURE__ */ e(
|
|
984
|
+
] }) : /* @__PURE__ */ a(ee, { open: w, onOpenChange: k, children: [
|
|
985
|
+
/* @__PURE__ */ e(te, { asChild: !0, children: /* @__PURE__ */ a(se, { children: [
|
|
986
|
+
/* @__PURE__ */ e(ie, { asChild: !0, children: g }),
|
|
987
|
+
/* @__PURE__ */ e(Z, { children: /* @__PURE__ */ e("div", { className: "font-medium", children: t.title }) })
|
|
988
988
|
] }) }),
|
|
989
|
-
/* @__PURE__ */ e(
|
|
989
|
+
/* @__PURE__ */ e(J, { className: "w-80", children: h ? h({ event: t, onClose: v }) : /* @__PURE__ */ e(ue, { event: t, onClose: v }) })
|
|
990
990
|
] });
|
|
991
991
|
}
|
|
992
992
|
if (n === "compact") {
|
|
993
|
-
const
|
|
993
|
+
const g = /* @__PURE__ */ a(
|
|
994
994
|
"div",
|
|
995
995
|
{
|
|
996
996
|
role: "button",
|
|
997
997
|
tabIndex: 0,
|
|
998
|
-
draggable: !!
|
|
999
|
-
onDragStart:
|
|
1000
|
-
onDragEnd:
|
|
1001
|
-
onClick:
|
|
1002
|
-
onKeyDown: (
|
|
1003
|
-
(
|
|
998
|
+
draggable: !!A,
|
|
999
|
+
onDragStart: E,
|
|
1000
|
+
onDragEnd: B,
|
|
1001
|
+
onClick: m ? T : void 0,
|
|
1002
|
+
onKeyDown: (c) => {
|
|
1003
|
+
(c.key === "Enter" || c.key === " ") && (c.preventDefault(), T());
|
|
1004
1004
|
},
|
|
1005
|
-
className:
|
|
1005
|
+
className: u(
|
|
1006
1006
|
"group flex w-full relative items-center shadow-[0_0_1px_rgba(0,0,0,0.3)] gap-0 rounded px-1.5 py-1 text-left text-xs transition-colors hover:opacity-80",
|
|
1007
|
-
|
|
1008
|
-
|
|
1007
|
+
A ? "cursor-grab active:cursor-grabbing" : "cursor-pointer",
|
|
1008
|
+
b && "opacity-50",
|
|
1009
1009
|
// Cancelled events get gray background with strikethrough
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
r === "colored" && [
|
|
1013
|
-
r === "mixed" && [
|
|
1010
|
+
C || // Past events get neutral zinc styling
|
|
1011
|
+
M ? "bg-zinc-100 dark:bg-zinc-800 text-zinc-500 dark:text-zinc-400 line-through" : [
|
|
1012
|
+
r === "colored" && [d.bg, d.text],
|
|
1013
|
+
r === "mixed" && [d.bg, d.text],
|
|
1014
1014
|
r === "dot" && "bg-muted/50"
|
|
1015
1015
|
],
|
|
1016
|
-
|
|
1016
|
+
i
|
|
1017
1017
|
),
|
|
1018
1018
|
style: D,
|
|
1019
1019
|
children: [
|
|
1020
|
-
["dot", "mixed"].includes(r) && !
|
|
1020
|
+
["dot", "mixed"].includes(r) && !M && /* @__PURE__ */ e(
|
|
1021
1021
|
"svg",
|
|
1022
1022
|
{
|
|
1023
1023
|
width: "8",
|
|
@@ -1026,7 +1026,7 @@ function Ge({
|
|
|
1026
1026
|
className: "event-dot absolute -top-1 -left-1 shrink-0",
|
|
1027
1027
|
"aria-hidden": "true",
|
|
1028
1028
|
focusable: "false",
|
|
1029
|
-
children: /* @__PURE__ */ e("circle", { cx: "4", cy: "4", r: "4", className:
|
|
1029
|
+
children: /* @__PURE__ */ e("circle", { cx: "4", cy: "4", r: "4", className: d.dotFill })
|
|
1030
1030
|
}
|
|
1031
1031
|
),
|
|
1032
1032
|
/* @__PURE__ */ e("span", { className: "flex-1 min-w-0 overflow-hidden", children: /* @__PURE__ */ a("span", { className: "", children: [
|
|
@@ -1049,51 +1049,51 @@ function Ge({
|
|
|
1049
1049
|
/* @__PURE__ */ e(
|
|
1050
1050
|
"div",
|
|
1051
1051
|
{
|
|
1052
|
-
className:
|
|
1052
|
+
className: u(
|
|
1053
1053
|
"w-fit mt-0.5 text-[10px] px-1 py-0.5 border border-dashed rounded-full font-medium",
|
|
1054
|
-
|
|
1054
|
+
M ? "border-zinc-400 dark:border-zinc-600" : d.border
|
|
1055
1055
|
),
|
|
1056
1056
|
children: X(t.startDate, t.endDate)
|
|
1057
1057
|
}
|
|
1058
1058
|
)
|
|
1059
1059
|
] }) }),
|
|
1060
|
-
/* @__PURE__ */ e("div", { className: "flex gap-0.5", children:
|
|
1060
|
+
/* @__PURE__ */ e("div", { className: "flex gap-0.5", children: p })
|
|
1061
1061
|
]
|
|
1062
1062
|
}
|
|
1063
1063
|
);
|
|
1064
|
-
return
|
|
1065
|
-
/* @__PURE__ */ e(
|
|
1066
|
-
/* @__PURE__ */ e(
|
|
1064
|
+
return m ? /* @__PURE__ */ a(se, { children: [
|
|
1065
|
+
/* @__PURE__ */ e(ie, { asChild: !0, children: g }),
|
|
1066
|
+
/* @__PURE__ */ e(Z, { children: /* @__PURE__ */ a("div", { className: "flex flex-col gap-0.5", children: [
|
|
1067
1067
|
/* @__PURE__ */ e("div", { className: "font-medium", children: t.title }),
|
|
1068
1068
|
/* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground tabular-nums", children: X(t.startDate, t.endDate) })
|
|
1069
1069
|
] }) })
|
|
1070
|
-
] }) : /* @__PURE__ */ a(
|
|
1071
|
-
/* @__PURE__ */ e(
|
|
1072
|
-
/* @__PURE__ */ e(
|
|
1070
|
+
] }) : /* @__PURE__ */ a(ee, { open: w, onOpenChange: k, children: [
|
|
1071
|
+
/* @__PURE__ */ e(te, { asChild: !0, children: g }),
|
|
1072
|
+
/* @__PURE__ */ e(J, { className: "w-80", children: h ? h({ event: t, onClose: v }) : /* @__PURE__ */ e(ue, { event: t, onClose: v }) })
|
|
1073
1073
|
] });
|
|
1074
1074
|
}
|
|
1075
|
-
const
|
|
1075
|
+
const O = /* @__PURE__ */ a(
|
|
1076
1076
|
"button",
|
|
1077
1077
|
{
|
|
1078
1078
|
type: "button",
|
|
1079
|
-
onClick:
|
|
1080
|
-
className:
|
|
1079
|
+
onClick: T,
|
|
1080
|
+
className: u(
|
|
1081
1081
|
"group relative flex w-full flex-col gap-1 rounded-md border px-2 py-1.5 text-left transition-all hover:shadow-md",
|
|
1082
1082
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
1083
1083
|
// Cancelled events get gray background with strikethrough
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
r === "colored" && [
|
|
1087
|
-
r === "mixed" && [
|
|
1084
|
+
C || // Past events get neutral zinc styling with strikethrough
|
|
1085
|
+
M ? "bg-zinc-100 dark:bg-zinc-800 border-zinc-300 dark:border-zinc-700 text-zinc-500 dark:text-zinc-400 line-through" : [
|
|
1086
|
+
r === "colored" && [d.bg, d.border, d.text],
|
|
1087
|
+
r === "mixed" && [d.bg, d.border, d.text],
|
|
1088
1088
|
r === "dot" && "bg-muted/50 border-border"
|
|
1089
1089
|
],
|
|
1090
|
-
|
|
1090
|
+
i
|
|
1091
1091
|
),
|
|
1092
1092
|
style: D,
|
|
1093
1093
|
children: [
|
|
1094
1094
|
/* @__PURE__ */ a("div", { className: "flex items-start justify-between gap-1", children: [
|
|
1095
1095
|
/* @__PURE__ */ a("div", { className: "flex items-center gap-1.5 min-w-0", children: [
|
|
1096
|
-
["dot", "mixed"].includes(r) && !
|
|
1096
|
+
["dot", "mixed"].includes(r) && !M && !C && /* @__PURE__ */ e(
|
|
1097
1097
|
"svg",
|
|
1098
1098
|
{
|
|
1099
1099
|
width: "8",
|
|
@@ -1102,38 +1102,38 @@ function Ge({
|
|
|
1102
1102
|
className: "event-dot shrink-0",
|
|
1103
1103
|
"aria-hidden": "true",
|
|
1104
1104
|
focusable: "false",
|
|
1105
|
-
children: /* @__PURE__ */ e("circle", { cx: "4", cy: "4", r: "4", className:
|
|
1105
|
+
children: /* @__PURE__ */ e("circle", { cx: "4", cy: "4", r: "4", className: d.dotFill })
|
|
1106
1106
|
}
|
|
1107
1107
|
),
|
|
1108
1108
|
/* @__PURE__ */ e(
|
|
1109
1109
|
"span",
|
|
1110
1110
|
{
|
|
1111
|
-
className:
|
|
1111
|
+
className: u(
|
|
1112
1112
|
"text-sm font-medium truncate",
|
|
1113
|
-
!
|
|
1114
|
-
|
|
1113
|
+
!M && !C && r !== "dot" && d.text,
|
|
1114
|
+
C && "line-through"
|
|
1115
1115
|
),
|
|
1116
1116
|
children: t.title
|
|
1117
1117
|
}
|
|
1118
1118
|
)
|
|
1119
1119
|
] }),
|
|
1120
|
-
|
|
1120
|
+
p
|
|
1121
1121
|
] }),
|
|
1122
1122
|
f && /* @__PURE__ */ a("div", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
|
|
1123
1123
|
/* @__PURE__ */ e(Xe, { className: "h-3 w-3 shrink-0" }),
|
|
1124
1124
|
/* @__PURE__ */ e("span", { children: X(t.startDate, t.endDate) })
|
|
1125
1125
|
] }),
|
|
1126
|
-
|
|
1127
|
-
|
|
1126
|
+
l && t.description && /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground line-clamp-2", children: t.description }),
|
|
1127
|
+
x && t.participants && t.participants.length > 0 && /* @__PURE__ */ a("div", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
|
|
1128
1128
|
/* @__PURE__ */ e(Ut, { className: "h-3 w-3 shrink-0" }),
|
|
1129
|
-
/* @__PURE__ */ e("span", { className: "truncate", children: t.participants.map((
|
|
1129
|
+
/* @__PURE__ */ e("span", { className: "truncate", children: t.participants.map((g) => g.name).join(", ") })
|
|
1130
1130
|
] }),
|
|
1131
1131
|
t.scheduleTypeName && /* @__PURE__ */ e(
|
|
1132
1132
|
"span",
|
|
1133
1133
|
{
|
|
1134
|
-
className:
|
|
1134
|
+
className: u(
|
|
1135
1135
|
"mt-1 inline-flex self-start rounded-full px-2 py-0.5 text-[10px] font-medium",
|
|
1136
|
-
|
|
1136
|
+
M ? "bg-zinc-200 dark:bg-zinc-700 text-zinc-500 dark:text-zinc-400" : [d.bg, d.text]
|
|
1137
1137
|
),
|
|
1138
1138
|
children: t.scheduleTypeName
|
|
1139
1139
|
}
|
|
@@ -1141,15 +1141,15 @@ function Ge({
|
|
|
1141
1141
|
]
|
|
1142
1142
|
}
|
|
1143
1143
|
);
|
|
1144
|
-
return
|
|
1145
|
-
/* @__PURE__ */ e(
|
|
1146
|
-
/* @__PURE__ */ e(
|
|
1144
|
+
return m ? /* @__PURE__ */ a(se, { children: [
|
|
1145
|
+
/* @__PURE__ */ e(ie, { asChild: !0, children: O }),
|
|
1146
|
+
/* @__PURE__ */ e(Z, { children: /* @__PURE__ */ a("div", { className: "flex flex-col gap-0.5", children: [
|
|
1147
1147
|
/* @__PURE__ */ e("div", { className: "font-medium", children: t.title }),
|
|
1148
1148
|
/* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground tabular-nums", children: X(t.startDate, t.endDate) })
|
|
1149
1149
|
] }) })
|
|
1150
|
-
] }) : /* @__PURE__ */ a(
|
|
1151
|
-
/* @__PURE__ */ e(
|
|
1152
|
-
/* @__PURE__ */ e(
|
|
1150
|
+
] }) : /* @__PURE__ */ a(ee, { open: w, onOpenChange: k, children: [
|
|
1151
|
+
/* @__PURE__ */ e(te, { asChild: !0, children: O }),
|
|
1152
|
+
/* @__PURE__ */ e(J, { className: "w-80", children: h ? h({ event: t, onClose: v }) : /* @__PURE__ */ e(ue, { event: t, onClose: v }) })
|
|
1153
1153
|
] });
|
|
1154
1154
|
}
|
|
1155
1155
|
function Xe({ className: t }) {
|
|
@@ -1171,7 +1171,7 @@ function Xe({ className: t }) {
|
|
|
1171
1171
|
}
|
|
1172
1172
|
);
|
|
1173
1173
|
}
|
|
1174
|
-
function
|
|
1174
|
+
function Ft({ className: t }) {
|
|
1175
1175
|
return /* @__PURE__ */ e(
|
|
1176
1176
|
"svg",
|
|
1177
1177
|
{
|
|
@@ -1187,7 +1187,7 @@ function Vt({ className: t }) {
|
|
|
1187
1187
|
}
|
|
1188
1188
|
);
|
|
1189
1189
|
}
|
|
1190
|
-
function
|
|
1190
|
+
function Vt({ className: t }) {
|
|
1191
1191
|
return /* @__PURE__ */ a(
|
|
1192
1192
|
"svg",
|
|
1193
1193
|
{
|
|
@@ -1231,9 +1231,9 @@ function ue({ event: t, onClose: n }) {
|
|
|
1231
1231
|
const r = he(t.color), o = t.isCanceled ?? !1;
|
|
1232
1232
|
return /* @__PURE__ */ a("div", { className: "space-y-3", children: [
|
|
1233
1233
|
/* @__PURE__ */ a("div", { className: "flex items-start gap-3", children: [
|
|
1234
|
-
/* @__PURE__ */ e("div", { className:
|
|
1234
|
+
/* @__PURE__ */ e("div", { className: u("size-4 rounded shrink-0 mt-0.5", r.dot) }),
|
|
1235
1235
|
/* @__PURE__ */ a("div", { className: "flex-1 min-w-0", children: [
|
|
1236
|
-
/* @__PURE__ */ e("h3", { className:
|
|
1236
|
+
/* @__PURE__ */ e("h3", { className: u("font-semibold text-lg", o && "line-through opacity-50"), children: t.title }),
|
|
1237
1237
|
/* @__PURE__ */ a("div", { className: "flex items-center gap-1 text-sm text-muted-foreground mt-1", children: [
|
|
1238
1238
|
/* @__PURE__ */ e(Xe, { className: "h-4 w-4 shrink-0" }),
|
|
1239
1239
|
/* @__PURE__ */ e("span", { className: "tabular-nums", children: X(t.startDate, t.endDate) })
|
|
@@ -1262,63 +1262,63 @@ function Je({
|
|
|
1262
1262
|
position: n,
|
|
1263
1263
|
hourHeight: r = 96,
|
|
1264
1264
|
badgeVariant: o = "colored",
|
|
1265
|
-
onClick:
|
|
1265
|
+
onClick: i,
|
|
1266
1266
|
className: f,
|
|
1267
|
-
disablePopover:
|
|
1268
|
-
renderPopover:
|
|
1267
|
+
disablePopover: l = !1,
|
|
1268
|
+
renderPopover: x,
|
|
1269
1269
|
enableDrag: D = !0
|
|
1270
1270
|
}) {
|
|
1271
|
-
const
|
|
1272
|
-
|
|
1273
|
-
}, [l, i,
|
|
1274
|
-
|
|
1275
|
-
}, []),
|
|
1276
|
-
(
|
|
1277
|
-
if (!
|
|
1278
|
-
|
|
1279
|
-
const
|
|
1280
|
-
|
|
1271
|
+
const m = he(t.color), [h, y] = ne(!1), [d, w] = ne(!1), k = Me(), b = (t.endDate.getTime() - t.startDate.getTime()) / (1e3 * 60), W = b / 60 * r - 8, L = t.endDate < Le(/* @__PURE__ */ new Date()), M = t.isCanceled ?? !1, C = D && k && !M && !L, A = b < 35, p = b > 25, T = o === "dot", v = z(() => {
|
|
1272
|
+
d || (l && i ? i(t) : l || y(!0));
|
|
1273
|
+
}, [d, l, i, t]), E = z(() => {
|
|
1274
|
+
y(!1);
|
|
1275
|
+
}, []), B = z(
|
|
1276
|
+
(_) => {
|
|
1277
|
+
if (!C) return;
|
|
1278
|
+
_.dataTransfer.effectAllowed = "move", _.dataTransfer.setData("text/plain", t.id);
|
|
1279
|
+
const N = _.currentTarget, s = N.getBoundingClientRect();
|
|
1280
|
+
_.dataTransfer.setDragImage(N, _.clientX - s.left, _.clientY - s.top), w(!0), k?.startDrag?.(t);
|
|
1281
1281
|
},
|
|
1282
|
-
[
|
|
1283
|
-
),
|
|
1284
|
-
w(!1),
|
|
1285
|
-
}, [
|
|
1286
|
-
(
|
|
1287
|
-
(
|
|
1282
|
+
[C, t, k]
|
|
1283
|
+
), O = z(() => {
|
|
1284
|
+
w(!1), k?.isDragging && k.endDrag?.();
|
|
1285
|
+
}, [k]), g = z(
|
|
1286
|
+
(_) => {
|
|
1287
|
+
(_.key === "Enter" || _.key === " ") && (_.preventDefault(), v());
|
|
1288
1288
|
},
|
|
1289
|
-
[
|
|
1290
|
-
),
|
|
1289
|
+
[v]
|
|
1290
|
+
), c = /* @__PURE__ */ a(
|
|
1291
1291
|
"div",
|
|
1292
1292
|
{
|
|
1293
1293
|
role: "button",
|
|
1294
1294
|
tabIndex: 0,
|
|
1295
|
-
draggable: !!
|
|
1296
|
-
onDragStart:
|
|
1297
|
-
onDragEnd:
|
|
1298
|
-
onKeyDown:
|
|
1299
|
-
onClick:
|
|
1300
|
-
className:
|
|
1295
|
+
draggable: !!C,
|
|
1296
|
+
onDragStart: B,
|
|
1297
|
+
onDragEnd: O,
|
|
1298
|
+
onKeyDown: g,
|
|
1299
|
+
onClick: d ? void 0 : v,
|
|
1300
|
+
className: u(
|
|
1301
1301
|
"group flex w-full select-none flex-col gap-0.5 overflow-hidden rounded-md border px-2 py-1.5 text-xs text-left",
|
|
1302
1302
|
"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
1303
1303
|
"transition-opacity",
|
|
1304
|
-
|
|
1305
|
-
|
|
1304
|
+
C ? "cursor-grab active:cursor-grabbing" : "cursor-pointer",
|
|
1305
|
+
d && "opacity-50",
|
|
1306
1306
|
// Cancelled events get gray background with strikethrough
|
|
1307
|
-
|
|
1308
|
-
|
|
1307
|
+
M || // Past events get neutral zinc styling with strikethrough
|
|
1308
|
+
L ? "bg-zinc-100 dark:bg-zinc-800 border-zinc-300 dark:border-zinc-700 text-zinc-500 dark:text-zinc-400 line-through" : [
|
|
1309
1309
|
// Colored/mixed variants
|
|
1310
|
-
!
|
|
1310
|
+
!T && [m.bg, m.border, m.text],
|
|
1311
1311
|
// Dot variant - neutral background
|
|
1312
|
-
|
|
1312
|
+
T && "bg-neutral-50 dark:bg-neutral-900 border-neutral-200 dark:border-neutral-700"
|
|
1313
1313
|
],
|
|
1314
1314
|
// Short events center content
|
|
1315
|
-
|
|
1315
|
+
A && "py-0 justify-center",
|
|
1316
1316
|
f
|
|
1317
1317
|
),
|
|
1318
|
-
style: { height: `${Math.max(
|
|
1318
|
+
style: { height: `${Math.max(W, 20)}px` },
|
|
1319
1319
|
children: [
|
|
1320
1320
|
/* @__PURE__ */ a("div", { className: "flex items-start gap-1.5 min-w-0", children: [
|
|
1321
|
-
["mixed", "dot"].includes(o) && !
|
|
1321
|
+
["mixed", "dot"].includes(o) && !L && !M && /* @__PURE__ */ e(
|
|
1322
1322
|
"svg",
|
|
1323
1323
|
{
|
|
1324
1324
|
width: "8",
|
|
@@ -1327,41 +1327,41 @@ function Je({
|
|
|
1327
1327
|
className: "event-dot shrink-0",
|
|
1328
1328
|
"aria-hidden": "true",
|
|
1329
1329
|
focusable: "false",
|
|
1330
|
-
children: /* @__PURE__ */ e("circle", { cx: "4", cy: "4", r: "4", className:
|
|
1330
|
+
children: /* @__PURE__ */ e("circle", { cx: "4", cy: "4", r: "4", className: m.dotFill })
|
|
1331
1331
|
}
|
|
1332
1332
|
),
|
|
1333
1333
|
/* @__PURE__ */ e("div", { className: "flex-1 min-w-0 overflow-hidden", children: /* @__PURE__ */ e(
|
|
1334
1334
|
"p",
|
|
1335
1335
|
{
|
|
1336
|
-
className:
|
|
1336
|
+
className: u(
|
|
1337
1337
|
"font-semibold whitespace-nowrap",
|
|
1338
|
-
!
|
|
1338
|
+
!L && !M && T && "text-foreground"
|
|
1339
1339
|
),
|
|
1340
1340
|
children: t.title
|
|
1341
1341
|
}
|
|
1342
1342
|
) })
|
|
1343
1343
|
] }),
|
|
1344
|
-
|
|
1344
|
+
p && /* @__PURE__ */ a(
|
|
1345
1345
|
"p",
|
|
1346
1346
|
{
|
|
1347
|
-
className:
|
|
1347
|
+
className: u(
|
|
1348
1348
|
"text-[11px] tabular-nums",
|
|
1349
|
-
|
|
1349
|
+
T ? "text-muted-foreground" : "opacity-90"
|
|
1350
1350
|
),
|
|
1351
1351
|
children: [
|
|
1352
|
-
|
|
1352
|
+
ye(t.startDate),
|
|
1353
1353
|
" - ",
|
|
1354
|
-
|
|
1354
|
+
ye(t.endDate)
|
|
1355
1355
|
]
|
|
1356
1356
|
}
|
|
1357
1357
|
)
|
|
1358
1358
|
]
|
|
1359
1359
|
}
|
|
1360
|
-
),
|
|
1360
|
+
), F = /* @__PURE__ */ e(Z, { children: /* @__PURE__ */ a("div", { className: "flex flex-col gap-0.5", children: [
|
|
1361
1361
|
/* @__PURE__ */ e("div", { className: "font-medium", children: t.title }),
|
|
1362
1362
|
/* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground tabular-nums", children: X(t.startDate, t.endDate) })
|
|
1363
1363
|
] }) });
|
|
1364
|
-
return
|
|
1364
|
+
return l ? /* @__PURE__ */ e(
|
|
1365
1365
|
"div",
|
|
1366
1366
|
{
|
|
1367
1367
|
className: "absolute p-0.5",
|
|
@@ -1371,9 +1371,9 @@ function Je({
|
|
|
1371
1371
|
width: n.minWidth ? `max(${n.minWidth}px, ${n.width}%)` : `${n.width}%`,
|
|
1372
1372
|
minWidth: n.minWidth ? `${n.minWidth}px` : void 0
|
|
1373
1373
|
},
|
|
1374
|
-
children: /* @__PURE__ */ a(
|
|
1375
|
-
/* @__PURE__ */ e(
|
|
1376
|
-
|
|
1374
|
+
children: /* @__PURE__ */ a(se, { children: [
|
|
1375
|
+
/* @__PURE__ */ e(ie, { asChild: !0, children: c }),
|
|
1376
|
+
F
|
|
1377
1377
|
] })
|
|
1378
1378
|
}
|
|
1379
1379
|
) : /* @__PURE__ */ e(
|
|
@@ -1386,9 +1386,9 @@ function Je({
|
|
|
1386
1386
|
width: n.minWidth ? `max(${n.minWidth}px, ${n.width}%)` : `${n.width}%`,
|
|
1387
1387
|
minWidth: n.minWidth ? `${n.minWidth}px` : void 0
|
|
1388
1388
|
},
|
|
1389
|
-
children: /* @__PURE__ */ a(
|
|
1390
|
-
/* @__PURE__ */ e(
|
|
1391
|
-
/* @__PURE__ */ e(
|
|
1389
|
+
children: /* @__PURE__ */ a(ee, { open: h, onOpenChange: y, children: [
|
|
1390
|
+
/* @__PURE__ */ e(te, { asChild: !0, children: c }),
|
|
1391
|
+
/* @__PURE__ */ e(J, { className: "w-80", children: x ? x({ event: t, onClose: E }) : /* @__PURE__ */ e(ue, { event: t, onClose: E }) })
|
|
1392
1392
|
] })
|
|
1393
1393
|
}
|
|
1394
1394
|
);
|
|
@@ -1398,25 +1398,25 @@ function an({
|
|
|
1398
1398
|
spanDays: n,
|
|
1399
1399
|
isStart: r,
|
|
1400
1400
|
isEnd: o,
|
|
1401
|
-
onClick:
|
|
1401
|
+
onClick: i,
|
|
1402
1402
|
className: f,
|
|
1403
|
-
disablePopover:
|
|
1404
|
-
renderPopover:
|
|
1403
|
+
disablePopover: l = !1,
|
|
1404
|
+
renderPopover: x
|
|
1405
1405
|
}) {
|
|
1406
|
-
const D = he(t.color), [
|
|
1407
|
-
|
|
1408
|
-
}, [
|
|
1406
|
+
const D = he(t.color), [m, h] = ne(!1), y = t.endDate < Le(/* @__PURE__ */ new Date()), d = t.isCanceled ?? !1, w = z(() => {
|
|
1407
|
+
l && i ? i(t) : l || h(!0);
|
|
1408
|
+
}, [l, i, t]), k = z(() => {
|
|
1409
1409
|
h(!1);
|
|
1410
|
-
}, []),
|
|
1410
|
+
}, []), b = /* @__PURE__ */ e(
|
|
1411
1411
|
"button",
|
|
1412
1412
|
{
|
|
1413
1413
|
type: "button",
|
|
1414
1414
|
onClick: w,
|
|
1415
|
-
className:
|
|
1415
|
+
className: u(
|
|
1416
1416
|
"flex h-5 items-center px-1.5 text-xs font-medium transition-opacity hover:opacity-80",
|
|
1417
1417
|
// Cancelled events get gray background with strikethrough
|
|
1418
|
-
|
|
1419
|
-
|
|
1418
|
+
d || // Past events get neutral zinc styling with strikethrough
|
|
1419
|
+
y ? "bg-zinc-200 dark:bg-zinc-700 text-zinc-500 dark:text-zinc-400 line-through" : [D.dot, "text-white"],
|
|
1420
1420
|
r && "rounded-l",
|
|
1421
1421
|
o && "rounded-r",
|
|
1422
1422
|
!r && "border-l-0",
|
|
@@ -1426,16 +1426,16 @@ function an({
|
|
|
1426
1426
|
style: { width: `${n * 100}%` },
|
|
1427
1427
|
children: r && /* @__PURE__ */ e("span", { className: "truncate", children: t.title })
|
|
1428
1428
|
}
|
|
1429
|
-
),
|
|
1429
|
+
), W = /* @__PURE__ */ e(Z, { children: /* @__PURE__ */ a("div", { className: "flex flex-col gap-0.5", children: [
|
|
1430
1430
|
/* @__PURE__ */ e("div", { className: "font-medium", children: t.title }),
|
|
1431
1431
|
/* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground tabular-nums", children: X(t.startDate, t.endDate) })
|
|
1432
1432
|
] }) });
|
|
1433
|
-
return
|
|
1434
|
-
/* @__PURE__ */ e(
|
|
1435
|
-
|
|
1436
|
-
] }) : /* @__PURE__ */ a(
|
|
1437
|
-
/* @__PURE__ */ e(
|
|
1438
|
-
/* @__PURE__ */ e(
|
|
1433
|
+
return l ? /* @__PURE__ */ a(se, { children: [
|
|
1434
|
+
/* @__PURE__ */ e(ie, { asChild: !0, children: b }),
|
|
1435
|
+
W
|
|
1436
|
+
] }) : /* @__PURE__ */ a(ee, { open: m, onOpenChange: h, children: [
|
|
1437
|
+
/* @__PURE__ */ e(te, { asChild: !0, children: b }),
|
|
1438
|
+
/* @__PURE__ */ e(J, { className: "w-80", children: x ? x({ event: t, onClose: k }) : /* @__PURE__ */ e(ue, { event: t, onClose: k }) })
|
|
1439
1439
|
] });
|
|
1440
1440
|
}
|
|
1441
1441
|
if (typeof window < "u" && !document.getElementById("inno-calendar-event-marquee-style")) {
|
|
@@ -1460,34 +1460,34 @@ function Ze({
|
|
|
1460
1460
|
return t.length === 0 ? null : /* @__PURE__ */ a(
|
|
1461
1461
|
"div",
|
|
1462
1462
|
{
|
|
1463
|
-
className:
|
|
1463
|
+
className: u(
|
|
1464
1464
|
"border-b bg-muted/20 px-2 py-1.5 space-y-1",
|
|
1465
1465
|
"sm:px-4 sm:py-2",
|
|
1466
1466
|
o
|
|
1467
1467
|
),
|
|
1468
1468
|
children: [
|
|
1469
1469
|
/* @__PURE__ */ e("span", { className: "text-[10px] font-medium text-muted-foreground sm:text-xs", children: "All day / Multi-day" }),
|
|
1470
|
-
/* @__PURE__ */ e("div", { className: "flex flex-wrap gap-1", children: t.map((
|
|
1471
|
-
const f = he(
|
|
1470
|
+
/* @__PURE__ */ e("div", { className: "flex flex-wrap gap-1", children: t.map((i) => {
|
|
1471
|
+
const f = he(i.color), l = $e(i.startDate, n), x = $e(i.endDate, n);
|
|
1472
1472
|
return /* @__PURE__ */ a(
|
|
1473
1473
|
"button",
|
|
1474
1474
|
{
|
|
1475
1475
|
type: "button",
|
|
1476
|
-
onClick: () => r?.(
|
|
1477
|
-
className:
|
|
1476
|
+
onClick: () => r?.(i),
|
|
1477
|
+
className: u(
|
|
1478
1478
|
"inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[10px] font-medium transition-opacity hover:opacity-80",
|
|
1479
1479
|
"sm:px-2 sm:py-1 sm:text-xs",
|
|
1480
1480
|
f.bg,
|
|
1481
1481
|
f.text,
|
|
1482
|
-
|
|
1482
|
+
i.isCanceled && "opacity-60 line-through"
|
|
1483
1483
|
),
|
|
1484
1484
|
children: [
|
|
1485
|
-
|
|
1486
|
-
/* @__PURE__ */ e("span", { className: "truncate max-w-24 sm:max-w-32", children:
|
|
1487
|
-
|
|
1485
|
+
l && "→ ",
|
|
1486
|
+
/* @__PURE__ */ e("span", { className: "truncate max-w-24 sm:max-w-32", children: i.title }),
|
|
1487
|
+
x && " →"
|
|
1488
1488
|
]
|
|
1489
1489
|
},
|
|
1490
|
-
|
|
1490
|
+
i.id
|
|
1491
1491
|
);
|
|
1492
1492
|
}) })
|
|
1493
1493
|
]
|
|
@@ -1500,151 +1500,151 @@ function Qe({
|
|
|
1500
1500
|
onSelectionStart: n,
|
|
1501
1501
|
onSelectionMove: r,
|
|
1502
1502
|
onSelectionEnd: o,
|
|
1503
|
-
isSelected:
|
|
1503
|
+
isSelected: i = !1,
|
|
1504
1504
|
isSelecting: f = !1,
|
|
1505
|
-
disabled:
|
|
1506
|
-
ariaLabel:
|
|
1505
|
+
disabled: l = !1,
|
|
1506
|
+
ariaLabel: x,
|
|
1507
1507
|
children: D,
|
|
1508
|
-
className:
|
|
1508
|
+
className: m,
|
|
1509
1509
|
height: h,
|
|
1510
|
-
style:
|
|
1511
|
-
dataAttributes:
|
|
1510
|
+
style: y,
|
|
1511
|
+
dataAttributes: d
|
|
1512
1512
|
}) {
|
|
1513
|
-
const w =
|
|
1514
|
-
(
|
|
1515
|
-
|
|
1513
|
+
const w = oe(null), k = oe(!1), b = oe(!1), W = oe(null), [L, M] = ne(!1), C = Me(), A = z(
|
|
1514
|
+
(c) => {
|
|
1515
|
+
l || c.button !== 0 && c.pointerType === "mouse" || (c.preventDefault(), w.current = { x: c.clientX, y: c.clientY }, k.current = !1, b.current = !0, n?.(t));
|
|
1516
1516
|
},
|
|
1517
|
-
[
|
|
1518
|
-
),
|
|
1519
|
-
(
|
|
1520
|
-
if (!(w.current &&
|
|
1521
|
-
const
|
|
1522
|
-
Math.sqrt(
|
|
1517
|
+
[l, t, n]
|
|
1518
|
+
), p = z(
|
|
1519
|
+
(c) => {
|
|
1520
|
+
if (!(w.current && b.current && !l)) return;
|
|
1521
|
+
const F = c.clientX - w.current.x, _ = c.clientY - w.current.y;
|
|
1522
|
+
Math.sqrt(F * F + _ * _) >= qt && (k.current = !0);
|
|
1523
1523
|
},
|
|
1524
|
-
[
|
|
1525
|
-
),
|
|
1526
|
-
(
|
|
1527
|
-
|
|
1524
|
+
[l]
|
|
1525
|
+
), T = z(
|
|
1526
|
+
(c) => {
|
|
1527
|
+
l || (c.buttons > 0 || f) && r?.(t);
|
|
1528
1528
|
},
|
|
1529
|
-
[
|
|
1530
|
-
),
|
|
1531
|
-
|
|
1532
|
-
}, [
|
|
1533
|
-
(
|
|
1534
|
-
if (!
|
|
1535
|
-
|
|
1536
|
-
const
|
|
1537
|
-
|
|
1529
|
+
[l, f, t, r]
|
|
1530
|
+
), v = z(() => {
|
|
1531
|
+
l || (o?.(), w.current = null, k.current = !1, b.current = !1);
|
|
1532
|
+
}, [l, o]), E = z(
|
|
1533
|
+
(c) => {
|
|
1534
|
+
if (!C?.isDragging || l) return;
|
|
1535
|
+
c.preventDefault(), c.dataTransfer.dropEffect = "move", M(!0);
|
|
1536
|
+
const F = /* @__PURE__ */ new Date(), _ = t.hour ?? F.getHours(), N = t.minute ?? (F.getMinutes() >= 30 ? 30 : 0);
|
|
1537
|
+
C.updateDragPreview?.(t.date, _, N);
|
|
1538
1538
|
},
|
|
1539
|
-
[
|
|
1540
|
-
),
|
|
1541
|
-
|
|
1542
|
-
}, []),
|
|
1543
|
-
(
|
|
1544
|
-
|
|
1539
|
+
[C, l, t]
|
|
1540
|
+
), B = z(() => {
|
|
1541
|
+
M(!1);
|
|
1542
|
+
}, []), O = z(
|
|
1543
|
+
(c) => {
|
|
1544
|
+
c.preventDefault(), M(!1), !(!C?.isDragging || l) && C.endDrag?.();
|
|
1545
1545
|
},
|
|
1546
|
-
[
|
|
1546
|
+
[C, l]
|
|
1547
1547
|
);
|
|
1548
1548
|
rt(() => {
|
|
1549
|
-
const
|
|
1550
|
-
|
|
1549
|
+
const c = () => {
|
|
1550
|
+
b.current && (b.current = !1, w.current = null, k.current = !1);
|
|
1551
1551
|
};
|
|
1552
|
-
return window.addEventListener("pointerup",
|
|
1553
|
-
window.removeEventListener("pointerup",
|
|
1552
|
+
return window.addEventListener("pointerup", c), window.addEventListener("pointercancel", c), () => {
|
|
1553
|
+
window.removeEventListener("pointerup", c), window.removeEventListener("pointercancel", c);
|
|
1554
1554
|
};
|
|
1555
1555
|
}, []);
|
|
1556
|
-
const
|
|
1557
|
-
(
|
|
1558
|
-
|
|
1556
|
+
const g = z(
|
|
1557
|
+
(c) => {
|
|
1558
|
+
l || (c.key === "Enter" || c.key === " ") && (c.preventDefault(), n?.(t), o?.());
|
|
1559
1559
|
},
|
|
1560
|
-
[
|
|
1560
|
+
[l, t, n, o]
|
|
1561
1561
|
);
|
|
1562
1562
|
return /* @__PURE__ */ e(
|
|
1563
1563
|
"button",
|
|
1564
1564
|
{
|
|
1565
|
-
ref:
|
|
1565
|
+
ref: W,
|
|
1566
1566
|
type: "button",
|
|
1567
|
-
"aria-label":
|
|
1568
|
-
"aria-disabled":
|
|
1569
|
-
"aria-pressed":
|
|
1570
|
-
disabled:
|
|
1571
|
-
onPointerDown:
|
|
1572
|
-
onPointerMove:
|
|
1573
|
-
onPointerUp:
|
|
1574
|
-
onPointerEnter:
|
|
1575
|
-
onKeyDown:
|
|
1576
|
-
onDragOver:
|
|
1577
|
-
onDragLeave:
|
|
1578
|
-
onDrop:
|
|
1579
|
-
className:
|
|
1567
|
+
"aria-label": x,
|
|
1568
|
+
"aria-disabled": l,
|
|
1569
|
+
"aria-pressed": i,
|
|
1570
|
+
disabled: l,
|
|
1571
|
+
onPointerDown: A,
|
|
1572
|
+
onPointerMove: p,
|
|
1573
|
+
onPointerUp: v,
|
|
1574
|
+
onPointerEnter: T,
|
|
1575
|
+
onKeyDown: g,
|
|
1576
|
+
onDragOver: E,
|
|
1577
|
+
onDragLeave: B,
|
|
1578
|
+
onDrop: O,
|
|
1579
|
+
className: u(
|
|
1580
1580
|
"select-none touch-none cursor-pointer transition-colors",
|
|
1581
1581
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset",
|
|
1582
1582
|
// Hover state (only when not in selection)
|
|
1583
|
-
!(f ||
|
|
1583
|
+
!(f || l) && "hover:bg-accent/50",
|
|
1584
1584
|
// Selection state
|
|
1585
|
-
|
|
1585
|
+
i && "bg-zinc-50",
|
|
1586
1586
|
// Drag over state - visual feedback when event is dragged over
|
|
1587
|
-
|
|
1587
|
+
L && "bg-primary/20 ring-2 ring-primary ring-inset",
|
|
1588
1588
|
// Disabled state
|
|
1589
|
-
|
|
1590
|
-
|
|
1589
|
+
l && "cursor-not-allowed opacity-50",
|
|
1590
|
+
m
|
|
1591
1591
|
),
|
|
1592
|
-
style: { height: h, ...
|
|
1593
|
-
...
|
|
1592
|
+
style: { height: h, ...y },
|
|
1593
|
+
...d,
|
|
1594
1594
|
children: D
|
|
1595
1595
|
}
|
|
1596
1596
|
);
|
|
1597
1597
|
}
|
|
1598
|
-
function et({ slot: t, date: n, hour: r, minute: o, ariaLabel:
|
|
1599
|
-
const
|
|
1600
|
-
return /* @__PURE__ */ e(Qe, { slot:
|
|
1598
|
+
function et({ slot: t, date: n, hour: r, minute: o, ariaLabel: i, ...f }) {
|
|
1599
|
+
const l = t ?? { date: n, hour: r ?? 0, minute: o ?? 0 }, x = i ?? `Add event at ${(l.hour ?? 0).toString().padStart(2, "0")}:${(l.minute ?? 0).toString().padStart(2, "0")} on ${l.date.toLocaleDateString()}`;
|
|
1600
|
+
return /* @__PURE__ */ e(Qe, { slot: l, ariaLabel: x, ...f });
|
|
1601
1601
|
}
|
|
1602
1602
|
function Kt({ slot: t, date: n, ariaLabel: r, ...o }) {
|
|
1603
|
-
const
|
|
1604
|
-
return /* @__PURE__ */ e(Qe, { slot:
|
|
1603
|
+
const i = t ?? { date: n }, f = r ?? `Select ${i.date.toLocaleDateString()}`;
|
|
1604
|
+
return /* @__PURE__ */ e(Qe, { slot: i, ariaLabel: f, ...o });
|
|
1605
1605
|
}
|
|
1606
|
-
const ce = 96,
|
|
1606
|
+
const ce = 96, we = 72, ve = 80;
|
|
1607
1607
|
function on({
|
|
1608
1608
|
events: t,
|
|
1609
1609
|
date: n,
|
|
1610
1610
|
visibleHours: r = { startHour: 0, endHour: 24 },
|
|
1611
1611
|
workingHours: o,
|
|
1612
|
-
slotDuration:
|
|
1612
|
+
slotDuration: i = 30,
|
|
1613
1613
|
badgeVariant: f = "colored",
|
|
1614
|
-
onEventClick:
|
|
1615
|
-
onSlotSelect:
|
|
1614
|
+
onEventClick: l,
|
|
1615
|
+
onSlotSelect: x,
|
|
1616
1616
|
className: D,
|
|
1617
|
-
renderEvent:
|
|
1617
|
+
renderEvent: m,
|
|
1618
1618
|
renderPopover: h
|
|
1619
1619
|
}) {
|
|
1620
|
-
const
|
|
1621
|
-
const
|
|
1622
|
-
for (let s = 0; s <
|
|
1623
|
-
|
|
1624
|
-
return
|
|
1625
|
-
}, [
|
|
1626
|
-
() => Ve(
|
|
1627
|
-
[
|
|
1628
|
-
),
|
|
1629
|
-
const
|
|
1630
|
-
for (const
|
|
1631
|
-
s.set(
|
|
1620
|
+
const y = 60 / i, d = 100 / y, w = P(() => {
|
|
1621
|
+
const N = [];
|
|
1622
|
+
for (let s = 0; s < y; s++)
|
|
1623
|
+
N.push(s * i);
|
|
1624
|
+
return N;
|
|
1625
|
+
}, [y, i]), k = P(() => ze(t, n), [t, n]), { singleDay: b, multiDay: W } = P(
|
|
1626
|
+
() => Ve(k),
|
|
1627
|
+
[k]
|
|
1628
|
+
), L = P(() => {
|
|
1629
|
+
const N = Ue(b, n, r, ce), s = /* @__PURE__ */ new Map();
|
|
1630
|
+
for (const S of N)
|
|
1631
|
+
s.set(S.event.id, S.position);
|
|
1632
1632
|
return s;
|
|
1633
|
-
}, [
|
|
1634
|
-
if (!
|
|
1635
|
-
const
|
|
1636
|
-
return
|
|
1637
|
-
}, [
|
|
1638
|
-
|
|
1639
|
-
const
|
|
1640
|
-
if (!
|
|
1633
|
+
}, [b, n, r]), M = P(() => qe(r), [r]), C = /* @__PURE__ */ new Date(), A = Q(n), p = P(() => {
|
|
1634
|
+
if (!A) return 0;
|
|
1635
|
+
const N = C.getHours() + C.getMinutes() / 60;
|
|
1636
|
+
return N < r.startHour || N > r.endHour ? -1 : (N - r.startHour) * ce;
|
|
1637
|
+
}, [A, r, C]), T = oe(null);
|
|
1638
|
+
Fe(() => {
|
|
1639
|
+
const N = T.current;
|
|
1640
|
+
if (!N) return;
|
|
1641
1641
|
const s = () => {
|
|
1642
|
-
const
|
|
1643
|
-
let
|
|
1644
|
-
|
|
1645
|
-
const
|
|
1646
|
-
|
|
1647
|
-
top:
|
|
1642
|
+
const S = n.getDay(), $ = o?.[S];
|
|
1643
|
+
let I;
|
|
1644
|
+
$?.enabled && $.from > 0 ? I = Math.max($.from - 1, r.startHour) : I = Math.max(7, r.startHour);
|
|
1645
|
+
const R = (I - r.startHour) * ce;
|
|
1646
|
+
N.scrollTo({
|
|
1647
|
+
top: R,
|
|
1648
1648
|
behavior: "instant"
|
|
1649
1649
|
});
|
|
1650
1650
|
};
|
|
@@ -1652,163 +1652,163 @@ function on({
|
|
|
1652
1652
|
requestAnimationFrame(s);
|
|
1653
1653
|
});
|
|
1654
1654
|
}, [n, o, r]);
|
|
1655
|
-
const
|
|
1656
|
-
(
|
|
1657
|
-
|
|
1655
|
+
const v = Te(), E = z(
|
|
1656
|
+
(N) => {
|
|
1657
|
+
v?.startSelection(N);
|
|
1658
1658
|
},
|
|
1659
|
-
[
|
|
1660
|
-
),
|
|
1661
|
-
(
|
|
1662
|
-
|
|
1659
|
+
[v]
|
|
1660
|
+
), B = z(
|
|
1661
|
+
(N) => {
|
|
1662
|
+
v?.updateSelection(N);
|
|
1663
1663
|
},
|
|
1664
|
-
[
|
|
1665
|
-
),
|
|
1666
|
-
|
|
1667
|
-
}, [
|
|
1668
|
-
(
|
|
1669
|
-
|
|
1664
|
+
[v]
|
|
1665
|
+
), O = z(() => {
|
|
1666
|
+
v?.endSelection();
|
|
1667
|
+
}, [v]), g = z(
|
|
1668
|
+
(N) => {
|
|
1669
|
+
l?.(N);
|
|
1670
1670
|
},
|
|
1671
|
-
[
|
|
1672
|
-
),
|
|
1673
|
-
return /* @__PURE__ */ a("div", { className:
|
|
1671
|
+
[l]
|
|
1672
|
+
), c = n.toLocaleDateString([], { weekday: "short" }), F = n.getDate(), _ = Q(n);
|
|
1673
|
+
return /* @__PURE__ */ a("div", { className: u("flex flex-col h-full", D), children: [
|
|
1674
1674
|
/* @__PURE__ */ e("div", { className: "flex items-center gap-3 border-b px-4 py-3", children: /* @__PURE__ */ a("div", { className: "flex flex-col items-center", children: [
|
|
1675
1675
|
/* @__PURE__ */ e(
|
|
1676
1676
|
"span",
|
|
1677
1677
|
{
|
|
1678
|
-
className:
|
|
1678
|
+
className: u(
|
|
1679
1679
|
"text-[11px] font-medium uppercase tracking-wide",
|
|
1680
|
-
|
|
1680
|
+
_ ? "text-primary" : "text-muted-foreground"
|
|
1681
1681
|
),
|
|
1682
|
-
children:
|
|
1682
|
+
children: c
|
|
1683
1683
|
}
|
|
1684
1684
|
),
|
|
1685
1685
|
/* @__PURE__ */ e(
|
|
1686
1686
|
"span",
|
|
1687
1687
|
{
|
|
1688
|
-
className:
|
|
1688
|
+
className: u(
|
|
1689
1689
|
"flex items-center justify-center rounded-full mt-0.5",
|
|
1690
1690
|
"size-12 text-3xl font-normal",
|
|
1691
|
-
|
|
1691
|
+
_ ? "bg-primary text-primary-foreground" : "text-foreground"
|
|
1692
1692
|
),
|
|
1693
|
-
children:
|
|
1693
|
+
children: F
|
|
1694
1694
|
}
|
|
1695
1695
|
)
|
|
1696
1696
|
] }) }),
|
|
1697
|
-
|
|
1697
|
+
W.length > 0 && /* @__PURE__ */ e(
|
|
1698
1698
|
Ze,
|
|
1699
1699
|
{
|
|
1700
|
-
events:
|
|
1700
|
+
events: W,
|
|
1701
1701
|
date: n,
|
|
1702
|
-
onEventClick:
|
|
1702
|
+
onEventClick: g
|
|
1703
1703
|
}
|
|
1704
1704
|
),
|
|
1705
|
-
/* @__PURE__ */ e("div", { ref:
|
|
1706
|
-
|
|
1707
|
-
const
|
|
1705
|
+
/* @__PURE__ */ e("div", { ref: T, className: "flex-1 overflow-auto", children: /* @__PURE__ */ a("div", { className: "relative min-h-full", children: [
|
|
1706
|
+
M.map((N, s) => {
|
|
1707
|
+
const $ = !Ke(n, N, o);
|
|
1708
1708
|
return /* @__PURE__ */ a(
|
|
1709
1709
|
"div",
|
|
1710
1710
|
{
|
|
1711
|
-
className:
|
|
1711
|
+
className: u("relative flex", $ && "bg-calendar-disabled-hour"),
|
|
1712
1712
|
style: { height: ce },
|
|
1713
1713
|
children: [
|
|
1714
1714
|
/* @__PURE__ */ e(
|
|
1715
1715
|
"div",
|
|
1716
1716
|
{
|
|
1717
1717
|
className: "relative flex-shrink-0 border-r border-border/50 bg-zinc-50 dark:bg-zinc-900",
|
|
1718
|
-
style: { width:
|
|
1719
|
-
children: /* @__PURE__ */ e("div", { className: "absolute -top-2.5 right-1 sm:right-2 flex h-5 items-center", children: s !== 0 && /* @__PURE__ */ e("span", { className: "text-[10px] sm:text-xs text-muted-foreground", children:
|
|
1718
|
+
style: { width: we },
|
|
1719
|
+
children: /* @__PURE__ */ e("div", { className: "absolute -top-2.5 right-1 sm:right-2 flex h-5 items-center", children: s !== 0 && /* @__PURE__ */ e("span", { className: "text-[10px] sm:text-xs text-muted-foreground", children: be(N) }) })
|
|
1720
1720
|
}
|
|
1721
1721
|
),
|
|
1722
1722
|
/* @__PURE__ */ a("div", { className: "relative flex-1", children: [
|
|
1723
|
-
|
|
1723
|
+
A && !$ && /* @__PURE__ */ e("div", { className: "absolute inset-0 bg-primary/5" }),
|
|
1724
1724
|
s !== 0 && /* @__PURE__ */ e("div", { className: "pointer-events-none absolute inset-x-0 top-0 border-b border-border/50" }),
|
|
1725
|
-
w.slice(1).map((
|
|
1725
|
+
w.slice(1).map((I) => /* @__PURE__ */ e(
|
|
1726
1726
|
"div",
|
|
1727
1727
|
{
|
|
1728
1728
|
className: "pointer-events-none absolute inset-x-0 border-b border-dashed border-border/30",
|
|
1729
|
-
style: { top: `${
|
|
1729
|
+
style: { top: `${I / 60 * 100}%` }
|
|
1730
1730
|
},
|
|
1731
|
-
|
|
1731
|
+
I
|
|
1732
1732
|
)),
|
|
1733
|
-
w.map((
|
|
1734
|
-
const U = { date: n, hour:
|
|
1733
|
+
w.map((I, R) => {
|
|
1734
|
+
const U = { date: n, hour: N, minute: I };
|
|
1735
1735
|
return /* @__PURE__ */ e(
|
|
1736
1736
|
et,
|
|
1737
1737
|
{
|
|
1738
1738
|
slot: U,
|
|
1739
|
-
onSelectionStart:
|
|
1740
|
-
onSelectionMove:
|
|
1741
|
-
onSelectionEnd:
|
|
1742
|
-
isSelected:
|
|
1743
|
-
isSelecting:
|
|
1744
|
-
disabled:
|
|
1739
|
+
onSelectionStart: E,
|
|
1740
|
+
onSelectionMove: B,
|
|
1741
|
+
onSelectionEnd: O,
|
|
1742
|
+
isSelected: v?.isSlotSelected(U) ?? !1,
|
|
1743
|
+
isSelecting: v?.isSelecting ?? !1,
|
|
1744
|
+
disabled: $,
|
|
1745
1745
|
className: "absolute inset-x-0",
|
|
1746
1746
|
style: {
|
|
1747
|
-
top: `${
|
|
1748
|
-
height: `${
|
|
1747
|
+
top: `${R * d}%`,
|
|
1748
|
+
height: `${d}%`
|
|
1749
1749
|
},
|
|
1750
|
-
ariaLabel: `Add event at ${
|
|
1750
|
+
ariaLabel: `Add event at ${be(N)}:${String(I).padStart(2, "0")}`
|
|
1751
1751
|
},
|
|
1752
|
-
|
|
1752
|
+
I
|
|
1753
1753
|
);
|
|
1754
1754
|
})
|
|
1755
1755
|
] })
|
|
1756
1756
|
]
|
|
1757
1757
|
},
|
|
1758
|
-
|
|
1758
|
+
N
|
|
1759
1759
|
);
|
|
1760
1760
|
}),
|
|
1761
1761
|
/* @__PURE__ */ e(
|
|
1762
1762
|
"div",
|
|
1763
1763
|
{
|
|
1764
1764
|
className: "absolute top-0 bottom-0 right-0 pointer-events-none",
|
|
1765
|
-
style: { left:
|
|
1766
|
-
children:
|
|
1767
|
-
const s =
|
|
1765
|
+
style: { left: we },
|
|
1766
|
+
children: b.map((N) => {
|
|
1767
|
+
const s = L.get(N.id);
|
|
1768
1768
|
if (!s) return null;
|
|
1769
|
-
const
|
|
1770
|
-
return
|
|
1769
|
+
const S = `calc(${s.width}% - 2px)`, $ = `max(${ve}px, ${S})`;
|
|
1770
|
+
return m ? /* @__PURE__ */ e(
|
|
1771
1771
|
"div",
|
|
1772
1772
|
{
|
|
1773
1773
|
className: "absolute pointer-events-auto p-0.5",
|
|
1774
1774
|
style: {
|
|
1775
1775
|
top: `${s.top}px`,
|
|
1776
1776
|
left: `${s.left}%`,
|
|
1777
|
-
width:
|
|
1778
|
-
minWidth: `${
|
|
1777
|
+
width: $,
|
|
1778
|
+
minWidth: `${ve}px`
|
|
1779
1779
|
},
|
|
1780
|
-
children:
|
|
1780
|
+
children: m({ event: N, position: s })
|
|
1781
1781
|
},
|
|
1782
|
-
|
|
1782
|
+
N.id
|
|
1783
1783
|
) : /* @__PURE__ */ e(
|
|
1784
1784
|
Je,
|
|
1785
1785
|
{
|
|
1786
|
-
event:
|
|
1786
|
+
event: N,
|
|
1787
1787
|
position: {
|
|
1788
1788
|
top: s.top,
|
|
1789
1789
|
left: s.left,
|
|
1790
1790
|
width: s.width,
|
|
1791
|
-
minWidth:
|
|
1791
|
+
minWidth: ve
|
|
1792
1792
|
},
|
|
1793
1793
|
hourHeight: ce,
|
|
1794
1794
|
badgeVariant: f,
|
|
1795
|
-
onClick:
|
|
1796
|
-
disablePopover: !!
|
|
1795
|
+
onClick: l,
|
|
1796
|
+
disablePopover: !!l && !h,
|
|
1797
1797
|
renderPopover: h,
|
|
1798
1798
|
className: "pointer-events-auto"
|
|
1799
1799
|
},
|
|
1800
|
-
|
|
1800
|
+
N.id
|
|
1801
1801
|
);
|
|
1802
1802
|
})
|
|
1803
1803
|
}
|
|
1804
1804
|
),
|
|
1805
|
-
|
|
1805
|
+
A && p >= 0 && /* @__PURE__ */ a(
|
|
1806
1806
|
"div",
|
|
1807
1807
|
{
|
|
1808
1808
|
className: "absolute left-0 right-0 z-20 flex items-center pointer-events-none",
|
|
1809
1809
|
style: {
|
|
1810
|
-
top:
|
|
1811
|
-
left:
|
|
1810
|
+
top: p,
|
|
1811
|
+
left: we
|
|
1812
1812
|
},
|
|
1813
1813
|
children: [
|
|
1814
1814
|
/* @__PURE__ */ e("div", { className: "h-2.5 w-2.5 -ml-1 rounded-full bg-red-500" }),
|
|
@@ -1819,145 +1819,145 @@ function on({
|
|
|
1819
1819
|
] }) })
|
|
1820
1820
|
] });
|
|
1821
1821
|
}
|
|
1822
|
-
const
|
|
1822
|
+
const ae = 96, fe = 56, He = 72, Y = 120, pe = 100, Yt = 3;
|
|
1823
1823
|
function sn({
|
|
1824
1824
|
events: t,
|
|
1825
1825
|
date: n,
|
|
1826
1826
|
weekStartsOn: r = 1,
|
|
1827
1827
|
visibleHours: o = { startHour: 0, endHour: 24 },
|
|
1828
|
-
workingHours:
|
|
1828
|
+
workingHours: i,
|
|
1829
1829
|
slotDuration: f = 30,
|
|
1830
|
-
badgeVariant:
|
|
1831
|
-
onEventClick:
|
|
1830
|
+
badgeVariant: l = "colored",
|
|
1831
|
+
onEventClick: x,
|
|
1832
1832
|
onSlotSelect: D,
|
|
1833
|
-
onDayClick:
|
|
1833
|
+
onDayClick: m,
|
|
1834
1834
|
className: h,
|
|
1835
|
-
renderEvent:
|
|
1836
|
-
renderPopover:
|
|
1835
|
+
renderEvent: y,
|
|
1836
|
+
renderPopover: d
|
|
1837
1837
|
}) {
|
|
1838
|
-
const w = 60 / f,
|
|
1838
|
+
const w = 60 / f, k = 100 / w, b = P(() => {
|
|
1839
1839
|
const s = [];
|
|
1840
|
-
for (let
|
|
1841
|
-
s.push(
|
|
1840
|
+
for (let S = 0; S < w; S++)
|
|
1841
|
+
s.push(S * f);
|
|
1842
1842
|
return s;
|
|
1843
|
-
}, [w, f]),
|
|
1843
|
+
}, [w, f]), W = P(() => st(n, r), [n, r]), L = P(() => qe(o), [o]), M = P(() => {
|
|
1844
1844
|
const s = /* @__PURE__ */ new Map();
|
|
1845
|
-
for (const
|
|
1846
|
-
const
|
|
1847
|
-
let
|
|
1845
|
+
for (const S of W) {
|
|
1846
|
+
const $ = S.toDateString(), I = ze(t, S), { singleDay: R, multiDay: U } = Ve(I), V = Ue(R, S, o, ae), H = /* @__PURE__ */ new Map();
|
|
1847
|
+
let re = 1;
|
|
1848
1848
|
for (const q of V)
|
|
1849
1849
|
if (H.set(q.event.id, q.position), q.position.width > 0) {
|
|
1850
1850
|
const G = Math.round(100 / q.position.width);
|
|
1851
|
-
|
|
1851
|
+
re = Math.max(re, G);
|
|
1852
1852
|
}
|
|
1853
|
-
s.set(
|
|
1854
|
-
singleDay:
|
|
1853
|
+
s.set($, {
|
|
1854
|
+
singleDay: R,
|
|
1855
1855
|
multiDay: U,
|
|
1856
1856
|
positions: H,
|
|
1857
|
-
maxOverlapping:
|
|
1857
|
+
maxOverlapping: re
|
|
1858
1858
|
});
|
|
1859
1859
|
}
|
|
1860
1860
|
return s;
|
|
1861
|
-
}, [
|
|
1861
|
+
}, [W, t, o]), C = P(() => {
|
|
1862
1862
|
const s = /* @__PURE__ */ new Map();
|
|
1863
|
-
for (const { multiDay:
|
|
1864
|
-
for (const
|
|
1865
|
-
s.set(
|
|
1863
|
+
for (const { multiDay: S } of M.values())
|
|
1864
|
+
for (const $ of S)
|
|
1865
|
+
s.set($.id, $);
|
|
1866
1866
|
return Array.from(s.values());
|
|
1867
|
-
}, [
|
|
1868
|
-
if (
|
|
1869
|
-
const s =
|
|
1870
|
-
return s < o.startHour || s > o.endHour ? -1 : (s - o.startHour) *
|
|
1871
|
-
}, [
|
|
1872
|
-
|
|
1873
|
-
const s =
|
|
1867
|
+
}, [M]), A = /* @__PURE__ */ new Date(), p = W.findIndex((s) => Q(s)), T = P(() => {
|
|
1868
|
+
if (p < 0) return -1;
|
|
1869
|
+
const s = A.getHours() + A.getMinutes() / 60;
|
|
1870
|
+
return s < o.startHour || s > o.endHour ? -1 : (s - o.startHour) * ae;
|
|
1871
|
+
}, [p, o, A]), v = oe(null);
|
|
1872
|
+
Fe(() => {
|
|
1873
|
+
const s = v.current;
|
|
1874
1874
|
if (!s) return;
|
|
1875
|
-
const
|
|
1876
|
-
const
|
|
1877
|
-
let
|
|
1878
|
-
if (!
|
|
1879
|
-
const H =
|
|
1880
|
-
H?.enabled && (
|
|
1875
|
+
const S = () => {
|
|
1876
|
+
const I = (/* @__PURE__ */ new Date()).getDay();
|
|
1877
|
+
let R = i?.[I];
|
|
1878
|
+
if (!R?.enabled || R.from === 0) {
|
|
1879
|
+
const H = i?.[1];
|
|
1880
|
+
H?.enabled && (R = H);
|
|
1881
1881
|
}
|
|
1882
1882
|
let U;
|
|
1883
|
-
|
|
1884
|
-
const V = (U - o.startHour) *
|
|
1883
|
+
R?.enabled && R.from > 0 ? U = Math.max(R.from - 1, o.startHour) : U = Math.max(7, o.startHour);
|
|
1884
|
+
const V = (U - o.startHour) * ae;
|
|
1885
1885
|
s.scrollTo({
|
|
1886
1886
|
top: V,
|
|
1887
1887
|
behavior: "instant"
|
|
1888
1888
|
});
|
|
1889
1889
|
};
|
|
1890
1890
|
requestAnimationFrame(() => {
|
|
1891
|
-
requestAnimationFrame(
|
|
1891
|
+
requestAnimationFrame(S);
|
|
1892
1892
|
});
|
|
1893
|
-
}, [n,
|
|
1894
|
-
const
|
|
1893
|
+
}, [n, i, o]);
|
|
1894
|
+
const E = Te(), B = z(
|
|
1895
1895
|
(s) => {
|
|
1896
|
-
|
|
1896
|
+
E?.startSelection(s);
|
|
1897
1897
|
},
|
|
1898
|
-
[
|
|
1899
|
-
),
|
|
1898
|
+
[E]
|
|
1899
|
+
), O = z(
|
|
1900
1900
|
(s) => {
|
|
1901
|
-
|
|
1901
|
+
E?.updateSelection(s);
|
|
1902
1902
|
},
|
|
1903
|
-
[
|
|
1904
|
-
),
|
|
1905
|
-
|
|
1906
|
-
}, [
|
|
1903
|
+
[E]
|
|
1904
|
+
), g = z(() => {
|
|
1905
|
+
E?.endSelection();
|
|
1906
|
+
}, [E]), c = z(
|
|
1907
1907
|
(s) => {
|
|
1908
|
-
|
|
1908
|
+
x?.(s);
|
|
1909
1909
|
},
|
|
1910
|
-
[
|
|
1911
|
-
),
|
|
1910
|
+
[x]
|
|
1911
|
+
), F = fe + 7 * Y, _ = P(() => {
|
|
1912
1912
|
const s = [];
|
|
1913
|
-
for (const
|
|
1914
|
-
const
|
|
1915
|
-
|
|
1913
|
+
for (const S of W) {
|
|
1914
|
+
const $ = S.toDateString(), R = M.get($)?.maxOverlapping ?? 1;
|
|
1915
|
+
R > Yt ? s.push(Math.max(Y, R * pe)) : s.push(Y);
|
|
1916
1916
|
}
|
|
1917
1917
|
return s;
|
|
1918
|
-
}, [
|
|
1919
|
-
return /* @__PURE__ */ a("div", { className:
|
|
1920
|
-
|
|
1918
|
+
}, [W, M]), N = fe + _.reduce((s, S) => s + S, 0);
|
|
1919
|
+
return /* @__PURE__ */ a("div", { className: u("ic-week-view flex flex-col h-full", h), children: [
|
|
1920
|
+
C.length > 0 && /* @__PURE__ */ e(
|
|
1921
1921
|
Ze,
|
|
1922
1922
|
{
|
|
1923
|
-
events:
|
|
1923
|
+
events: C,
|
|
1924
1924
|
date: it(n, r),
|
|
1925
|
-
onEventClick:
|
|
1925
|
+
onEventClick: c
|
|
1926
1926
|
}
|
|
1927
1927
|
),
|
|
1928
|
-
/* @__PURE__ */ e("div", { ref:
|
|
1928
|
+
/* @__PURE__ */ e("div", { ref: v, className: "ic-week-scroll-container flex-1", children: /* @__PURE__ */ a("div", { style: { minWidth: Math.max(F, N) }, children: [
|
|
1929
1929
|
/* @__PURE__ */ e("div", { className: "ic-week-header sticky top-0 z-20 border-b bg-background", children: /* @__PURE__ */ a("div", { className: "flex", children: [
|
|
1930
1930
|
/* @__PURE__ */ e(
|
|
1931
1931
|
"div",
|
|
1932
1932
|
{
|
|
1933
1933
|
className: "flex-shrink-0 flex items-end justify-center pb-2 text-[10px] text-muted-foreground/70",
|
|
1934
|
-
style: { width: fe, height:
|
|
1934
|
+
style: { width: fe, height: He },
|
|
1935
1935
|
children: /* @__PURE__ */ a("span", { className: "hidden sm:inline", children: [
|
|
1936
1936
|
"GMT",
|
|
1937
1937
|
(() => {
|
|
1938
|
-
const s = (/* @__PURE__ */ new Date()).getTimezoneOffset(),
|
|
1939
|
-
return
|
|
1938
|
+
const s = (/* @__PURE__ */ new Date()).getTimezoneOffset(), S = Math.abs(Math.floor(s / 60)), $ = s <= 0 ? "+" : "-";
|
|
1939
|
+
return S > 0 ? `${$}${String(S).padStart(2, "0")}` : "";
|
|
1940
1940
|
})()
|
|
1941
1941
|
] })
|
|
1942
1942
|
}
|
|
1943
1943
|
),
|
|
1944
|
-
|
|
1945
|
-
const
|
|
1944
|
+
W.map((s, S) => {
|
|
1945
|
+
const $ = Q(s), I = _[S] ?? Y, R = I > Y;
|
|
1946
1946
|
return /* @__PURE__ */ a(
|
|
1947
1947
|
"div",
|
|
1948
1948
|
{
|
|
1949
1949
|
className: "flex-1 flex flex-col items-center justify-center border-r last:border-r-0 py-2",
|
|
1950
1950
|
style: {
|
|
1951
|
-
height:
|
|
1952
|
-
minWidth:
|
|
1951
|
+
height: He,
|
|
1952
|
+
minWidth: R ? I : Y
|
|
1953
1953
|
},
|
|
1954
1954
|
children: [
|
|
1955
1955
|
/* @__PURE__ */ e(
|
|
1956
1956
|
"span",
|
|
1957
1957
|
{
|
|
1958
|
-
className:
|
|
1958
|
+
className: u(
|
|
1959
1959
|
"text-[11px] font-medium uppercase tracking-wide",
|
|
1960
|
-
|
|
1960
|
+
$ ? "text-primary" : "text-muted-foreground"
|
|
1961
1961
|
),
|
|
1962
1962
|
children: s.toLocaleDateString([], { weekday: "short" })
|
|
1963
1963
|
}
|
|
@@ -1966,11 +1966,11 @@ function sn({
|
|
|
1966
1966
|
"button",
|
|
1967
1967
|
{
|
|
1968
1968
|
type: "button",
|
|
1969
|
-
onClick: () =>
|
|
1970
|
-
className:
|
|
1969
|
+
onClick: () => m?.(s),
|
|
1970
|
+
className: u(
|
|
1971
1971
|
"flex items-center justify-center rounded-full transition-colors mt-0.5",
|
|
1972
1972
|
"size-10 text-2xl font-normal",
|
|
1973
|
-
|
|
1973
|
+
$ ? "bg-primary text-primary-foreground" : "text-foreground hover:bg-muted"
|
|
1974
1974
|
),
|
|
1975
1975
|
children: s.getDate()
|
|
1976
1976
|
}
|
|
@@ -1987,33 +1987,33 @@ function sn({
|
|
|
1987
1987
|
{
|
|
1988
1988
|
className: "ic-hour-column sticky left-0 z-10 bg-zinc-50 dark:bg-zinc-900 border-r",
|
|
1989
1989
|
style: { width: fe },
|
|
1990
|
-
children:
|
|
1990
|
+
children: L.map((s, S) => /* @__PURE__ */ e("div", { className: "relative", style: { height: ae }, children: /* @__PURE__ */ e("div", { className: "absolute -top-2.5 right-1 sm:right-2 flex h-5 items-center", children: S !== 0 && /* @__PURE__ */ e("span", { className: "text-[10px] sm:text-xs text-muted-foreground", children: be(s) }) }) }, s))
|
|
1991
1991
|
}
|
|
1992
1992
|
),
|
|
1993
|
-
/* @__PURE__ */ e("div", { className: "ic-week-grid relative flex-1", children: /* @__PURE__ */ e("div", { className: "flex divide-x", children:
|
|
1994
|
-
const
|
|
1993
|
+
/* @__PURE__ */ e("div", { className: "ic-week-grid relative flex-1", children: /* @__PURE__ */ e("div", { className: "flex divide-x", children: W.map((s, S) => {
|
|
1994
|
+
const $ = s.toDateString(), I = M.get($), R = _[S] ?? Y, U = R > Y;
|
|
1995
1995
|
return /* @__PURE__ */ a(
|
|
1996
1996
|
"div",
|
|
1997
1997
|
{
|
|
1998
1998
|
className: "ic-day-column relative flex-1",
|
|
1999
1999
|
style: {
|
|
2000
|
-
minWidth: U ?
|
|
2000
|
+
minWidth: U ? R : Y
|
|
2001
2001
|
},
|
|
2002
2002
|
children: [
|
|
2003
|
-
|
|
2004
|
-
const q = !
|
|
2003
|
+
L.map((V, H) => {
|
|
2004
|
+
const q = !Ke(s, V, i);
|
|
2005
2005
|
return /* @__PURE__ */ a(
|
|
2006
2006
|
"div",
|
|
2007
2007
|
{
|
|
2008
|
-
className:
|
|
2008
|
+
className: u(
|
|
2009
2009
|
"relative",
|
|
2010
2010
|
q && "bg-calendar-disabled-hour",
|
|
2011
|
-
|
|
2011
|
+
Q(s) && !q && "bg-primary/5"
|
|
2012
2012
|
),
|
|
2013
|
-
style: { height:
|
|
2013
|
+
style: { height: ae },
|
|
2014
2014
|
children: [
|
|
2015
2015
|
H !== 0 && /* @__PURE__ */ e("div", { className: "pointer-events-none absolute inset-x-0 top-0 border-b border-border/50" }),
|
|
2016
|
-
|
|
2016
|
+
b.slice(1).map((G) => /* @__PURE__ */ e(
|
|
2017
2017
|
"div",
|
|
2018
2018
|
{
|
|
2019
2019
|
className: "pointer-events-none absolute inset-x-0 border-b border-dashed border-border/30",
|
|
@@ -2021,24 +2021,24 @@ function sn({
|
|
|
2021
2021
|
},
|
|
2022
2022
|
G
|
|
2023
2023
|
)),
|
|
2024
|
-
|
|
2025
|
-
const
|
|
2024
|
+
b.map((G, tt) => {
|
|
2025
|
+
const Ee = { date: s, hour: V, minute: G };
|
|
2026
2026
|
return /* @__PURE__ */ e(
|
|
2027
2027
|
et,
|
|
2028
2028
|
{
|
|
2029
|
-
slot:
|
|
2030
|
-
onSelectionStart:
|
|
2031
|
-
onSelectionMove:
|
|
2032
|
-
onSelectionEnd:
|
|
2033
|
-
isSelected:
|
|
2034
|
-
isSelecting:
|
|
2029
|
+
slot: Ee,
|
|
2030
|
+
onSelectionStart: B,
|
|
2031
|
+
onSelectionMove: O,
|
|
2032
|
+
onSelectionEnd: g,
|
|
2033
|
+
isSelected: E?.isSlotSelected(Ee) ?? !1,
|
|
2034
|
+
isSelecting: E?.isSelecting ?? !1,
|
|
2035
2035
|
disabled: q,
|
|
2036
2036
|
className: "absolute inset-x-0",
|
|
2037
2037
|
style: {
|
|
2038
|
-
top: `${tt *
|
|
2039
|
-
height: `${
|
|
2038
|
+
top: `${tt * k}%`,
|
|
2039
|
+
height: `${k}%`
|
|
2040
2040
|
},
|
|
2041
|
-
ariaLabel: `Add event on ${s.toLocaleDateString()} at ${
|
|
2041
|
+
ariaLabel: `Add event on ${s.toLocaleDateString()} at ${be(V)}:${String(G).padStart(2, "0")}`
|
|
2042
2042
|
},
|
|
2043
2043
|
G
|
|
2044
2044
|
);
|
|
@@ -2048,11 +2048,11 @@ function sn({
|
|
|
2048
2048
|
V
|
|
2049
2049
|
);
|
|
2050
2050
|
}),
|
|
2051
|
-
|
|
2052
|
-
const H =
|
|
2051
|
+
I?.singleDay.map((V) => {
|
|
2052
|
+
const H = I.positions.get(V.id);
|
|
2053
2053
|
if (!H) return null;
|
|
2054
|
-
const
|
|
2055
|
-
return
|
|
2054
|
+
const re = `calc(${H.width}% - 2px)`, q = `max(${pe}px, ${re})`;
|
|
2055
|
+
return y ? /* @__PURE__ */ e(
|
|
2056
2056
|
"div",
|
|
2057
2057
|
{
|
|
2058
2058
|
className: "absolute pointer-events-auto p-0.5",
|
|
@@ -2062,7 +2062,7 @@ function sn({
|
|
|
2062
2062
|
width: q,
|
|
2063
2063
|
minWidth: `${pe}px`
|
|
2064
2064
|
},
|
|
2065
|
-
children:
|
|
2065
|
+
children: y({ event: V, position: H })
|
|
2066
2066
|
},
|
|
2067
2067
|
V.id
|
|
2068
2068
|
) : /* @__PURE__ */ e(
|
|
@@ -2075,21 +2075,21 @@ function sn({
|
|
|
2075
2075
|
width: H.width,
|
|
2076
2076
|
minWidth: pe
|
|
2077
2077
|
},
|
|
2078
|
-
hourHeight:
|
|
2079
|
-
badgeVariant:
|
|
2080
|
-
onClick:
|
|
2081
|
-
disablePopover: !!
|
|
2082
|
-
renderPopover:
|
|
2078
|
+
hourHeight: ae,
|
|
2079
|
+
badgeVariant: l,
|
|
2080
|
+
onClick: x,
|
|
2081
|
+
disablePopover: !!x && !d,
|
|
2082
|
+
renderPopover: d,
|
|
2083
2083
|
className: "pointer-events-auto"
|
|
2084
2084
|
},
|
|
2085
2085
|
V.id
|
|
2086
2086
|
);
|
|
2087
2087
|
}),
|
|
2088
|
-
|
|
2088
|
+
S === p && T >= 0 && /* @__PURE__ */ a(
|
|
2089
2089
|
"div",
|
|
2090
2090
|
{
|
|
2091
2091
|
className: "absolute left-0 right-0 z-20 flex items-center pointer-events-none",
|
|
2092
|
-
style: { top:
|
|
2092
|
+
style: { top: T },
|
|
2093
2093
|
children: [
|
|
2094
2094
|
/* @__PURE__ */ e("div", { className: "h-2 w-2 -ml-1 rounded-full bg-red-500" }),
|
|
2095
2095
|
/* @__PURE__ */ e("div", { className: "flex-1 h-0.5 bg-red-500" })
|
|
@@ -2121,144 +2121,206 @@ const Gt = [
|
|
|
2121
2121
|
{ full: "Thursday", short: "Thu", tiny: "T" },
|
|
2122
2122
|
{ full: "Friday", short: "Fri", tiny: "F" },
|
|
2123
2123
|
{ full: "Saturday", short: "Sat", tiny: "S" }
|
|
2124
|
-
],
|
|
2124
|
+
], ge = 3;
|
|
2125
2125
|
function ln({
|
|
2126
2126
|
events: t,
|
|
2127
2127
|
date: n,
|
|
2128
2128
|
weekStartsOn: r = 1,
|
|
2129
2129
|
badgeVariant: o = "colored",
|
|
2130
|
-
onEventClick:
|
|
2130
|
+
onEventClick: i,
|
|
2131
2131
|
onSlotSelect: f,
|
|
2132
|
-
onDayClick:
|
|
2133
|
-
className:
|
|
2132
|
+
onDayClick: l,
|
|
2133
|
+
className: x,
|
|
2134
2134
|
renderEvent: D,
|
|
2135
|
-
renderPopover:
|
|
2135
|
+
renderPopover: m,
|
|
2136
|
+
showMoreEventsInPopover: h = !1
|
|
2136
2137
|
}) {
|
|
2137
|
-
const
|
|
2138
|
-
const
|
|
2139
|
-
for (const
|
|
2140
|
-
const
|
|
2141
|
-
|
|
2138
|
+
const [y, d] = ne(null), w = P(() => lt(n, r), [n, r]), k = P(() => {
|
|
2139
|
+
const p = /* @__PURE__ */ new Map();
|
|
2140
|
+
for (const T of w) {
|
|
2141
|
+
const v = T.date.toDateString(), E = ze(t, T.date);
|
|
2142
|
+
E.sort((B, O) => B.startDate.getTime() - O.startDate.getTime()), p.set(v, E);
|
|
2142
2143
|
}
|
|
2143
|
-
return
|
|
2144
|
-
}, [
|
|
2145
|
-
(
|
|
2146
|
-
|
|
2144
|
+
return p;
|
|
2145
|
+
}, [w, t]), b = Te(), W = z(
|
|
2146
|
+
(p) => {
|
|
2147
|
+
b?.startSelection(p);
|
|
2147
2148
|
},
|
|
2148
|
-
[
|
|
2149
|
-
),
|
|
2150
|
-
(
|
|
2151
|
-
|
|
2149
|
+
[b]
|
|
2150
|
+
), L = z(
|
|
2151
|
+
(p) => {
|
|
2152
|
+
b?.updateSelection(p);
|
|
2152
2153
|
},
|
|
2153
|
-
[
|
|
2154
|
-
),
|
|
2155
|
-
|
|
2156
|
-
}, [
|
|
2157
|
-
(
|
|
2158
|
-
|
|
2154
|
+
[b]
|
|
2155
|
+
), M = z(() => {
|
|
2156
|
+
b?.endSelection();
|
|
2157
|
+
}, [b]), C = z(
|
|
2158
|
+
(p) => {
|
|
2159
|
+
l?.(p);
|
|
2159
2160
|
},
|
|
2160
|
-
[
|
|
2161
|
-
),
|
|
2162
|
-
return /* @__PURE__ */ e("div", { className:
|
|
2163
|
-
/* @__PURE__ */ e("div", { className: "grid grid-cols-7 border-b !sticky !top-0 bg-background z-10", children:
|
|
2161
|
+
[l]
|
|
2162
|
+
), A = r === 0 ? Xt : Gt;
|
|
2163
|
+
return /* @__PURE__ */ e("div", { className: u("flex flex-col h-full overflow-hidden", x), children: /* @__PURE__ */ e("div", { className: "flex flex-col flex-1 overflow-auto", children: /* @__PURE__ */ a("div", { className: "flex flex-col flex-1 min-w-[560px] sm:min-w-0", children: [
|
|
2164
|
+
/* @__PURE__ */ e("div", { className: "grid grid-cols-7 border-b !sticky !top-0 bg-background z-10", children: A.map((p, T) => /* @__PURE__ */ a(
|
|
2164
2165
|
"div",
|
|
2165
2166
|
{
|
|
2166
|
-
className:
|
|
2167
|
+
className: u(
|
|
2167
2168
|
"py-2 sm:py-2.5 text-center text-[11px] uppercase font-medium tracking-wide text-muted-foreground",
|
|
2168
|
-
|
|
2169
|
+
T >= 5 && "text-muted-foreground/70"
|
|
2169
2170
|
// Weekend
|
|
2170
2171
|
),
|
|
2171
2172
|
children: [
|
|
2172
|
-
/* @__PURE__ */ e("span", { className: "sm:hidden", children:
|
|
2173
|
-
/* @__PURE__ */ e("span", { className: "hidden sm:inline", children:
|
|
2173
|
+
/* @__PURE__ */ e("span", { className: "sm:hidden", children: p.short }),
|
|
2174
|
+
/* @__PURE__ */ e("span", { className: "hidden sm:inline", children: p.short })
|
|
2174
2175
|
]
|
|
2175
2176
|
},
|
|
2176
|
-
|
|
2177
|
+
p.full
|
|
2177
2178
|
)) }),
|
|
2178
|
-
/* @__PURE__ */ e("div", { className: "grid grid-cols-7 auto-rows-min", children:
|
|
2179
|
-
const
|
|
2179
|
+
/* @__PURE__ */ e("div", { className: "grid grid-cols-7 auto-rows-min", children: w.map((p) => {
|
|
2180
|
+
const T = p.date.toDateString(), v = k.get(T) || [], E = Q(p.date), B = p.date.getDay() === 0 || p.date.getDay() === 6, O = v.length > ge;
|
|
2180
2181
|
return /* @__PURE__ */ a(
|
|
2181
2182
|
Kt,
|
|
2182
2183
|
{
|
|
2183
|
-
date:
|
|
2184
|
-
onSelectionStart:
|
|
2185
|
-
onSelectionMove:
|
|
2186
|
-
onSelectionEnd:
|
|
2187
|
-
isSelected:
|
|
2188
|
-
isSelecting:
|
|
2189
|
-
className:
|
|
2184
|
+
date: p.date,
|
|
2185
|
+
onSelectionStart: W,
|
|
2186
|
+
onSelectionMove: L,
|
|
2187
|
+
onSelectionEnd: M,
|
|
2188
|
+
isSelected: b?.isSlotSelected({ date: p.date }) ?? !1,
|
|
2189
|
+
isSelecting: b?.isSelecting ?? !1,
|
|
2190
|
+
className: u(
|
|
2190
2191
|
"relative flex flex-col border-r border-b text-left min-h-[80px] sm:min-h-[100px] overflow-hidden",
|
|
2191
2192
|
"[&:nth-child(7n)]:border-r-0",
|
|
2192
|
-
!
|
|
2193
|
-
|
|
2193
|
+
!p.isCurrentMonth && "bg-muted/20",
|
|
2194
|
+
B && p.isCurrentMonth && "bg-muted/10"
|
|
2194
2195
|
),
|
|
2195
|
-
ariaLabel: `${
|
|
2196
|
+
ariaLabel: `${p.date.toLocaleDateString()} - ${v.length} events. Click to create event, double-click to view day.`,
|
|
2196
2197
|
children: [
|
|
2197
2198
|
/* @__PURE__ */ e(
|
|
2198
2199
|
"div",
|
|
2199
2200
|
{
|
|
2200
|
-
className:
|
|
2201
|
+
className: u(
|
|
2201
2202
|
"flex items-center justify-center p-1",
|
|
2202
|
-
!
|
|
2203
|
+
!p.isCurrentMonth && "text-muted-foreground/40"
|
|
2203
2204
|
),
|
|
2204
2205
|
children: /* @__PURE__ */ e(
|
|
2205
2206
|
"button",
|
|
2206
2207
|
{
|
|
2207
2208
|
type: "button",
|
|
2208
|
-
onClick: (
|
|
2209
|
-
|
|
2209
|
+
onClick: (g) => {
|
|
2210
|
+
g.stopPropagation(), C(p.date);
|
|
2210
2211
|
},
|
|
2211
|
-
className:
|
|
2212
|
+
className: u(
|
|
2212
2213
|
"flex items-center justify-center rounded-full transition-colors",
|
|
2213
2214
|
"size-7 text-sm font-normal",
|
|
2214
|
-
|
|
2215
|
+
E ? "bg-primary text-primary-foreground" : "hover:bg-muted"
|
|
2215
2216
|
),
|
|
2216
|
-
children:
|
|
2217
|
+
children: p.date.getDate()
|
|
2217
2218
|
}
|
|
2218
2219
|
)
|
|
2219
2220
|
}
|
|
2220
2221
|
),
|
|
2221
2222
|
/* @__PURE__ */ a("div", { className: "flex-1 overflow-hidden px-2 pt-1 pb-1 space-y-1", children: [
|
|
2222
|
-
|
|
2223
|
+
v.slice(0, ge).map((g) => /* @__PURE__ */ e(
|
|
2223
2224
|
"div",
|
|
2224
2225
|
{
|
|
2225
|
-
onPointerDown: (
|
|
2226
|
-
|
|
2226
|
+
onPointerDown: (c) => {
|
|
2227
|
+
c.stopPropagation();
|
|
2227
2228
|
},
|
|
2228
|
-
children: D ? D({ event:
|
|
2229
|
-
|
|
2229
|
+
children: D ? D({ event: g, variant: "compact" }) : /* @__PURE__ */ e(
|
|
2230
|
+
Ce,
|
|
2230
2231
|
{
|
|
2231
|
-
event:
|
|
2232
|
+
event: g,
|
|
2232
2233
|
variant: "compact",
|
|
2233
2234
|
badgeVariant: o,
|
|
2234
|
-
onClick:
|
|
2235
|
-
disablePopover: !!
|
|
2236
|
-
renderPopover:
|
|
2235
|
+
onClick: i,
|
|
2236
|
+
disablePopover: !!i && !m,
|
|
2237
|
+
renderPopover: m,
|
|
2237
2238
|
showTime: !1,
|
|
2238
2239
|
enableDrag: !0
|
|
2239
2240
|
}
|
|
2240
2241
|
)
|
|
2241
2242
|
},
|
|
2242
|
-
|
|
2243
|
+
g.id
|
|
2243
2244
|
)),
|
|
2244
|
-
|
|
2245
|
+
O && (h ? /* @__PURE__ */ a(
|
|
2246
|
+
ee,
|
|
2247
|
+
{
|
|
2248
|
+
open: y === T,
|
|
2249
|
+
onOpenChange: (g) => d(g ? T : null),
|
|
2250
|
+
children: [
|
|
2251
|
+
/* @__PURE__ */ e(te, { asChild: !0, children: /* @__PURE__ */ a(
|
|
2252
|
+
"button",
|
|
2253
|
+
{
|
|
2254
|
+
type: "button",
|
|
2255
|
+
onPointerDown: (g) => g.stopPropagation(),
|
|
2256
|
+
onClick: (g) => {
|
|
2257
|
+
g.stopPropagation(), d(T);
|
|
2258
|
+
},
|
|
2259
|
+
className: "w-full text-left text-xs text-muted-foreground hover:text-foreground hover:underline px-1.5 cursor-pointer",
|
|
2260
|
+
children: [
|
|
2261
|
+
"+",
|
|
2262
|
+
v.length - ge,
|
|
2263
|
+
" more"
|
|
2264
|
+
]
|
|
2265
|
+
}
|
|
2266
|
+
) }),
|
|
2267
|
+
/* @__PURE__ */ a(
|
|
2268
|
+
J,
|
|
2269
|
+
{
|
|
2270
|
+
align: "start",
|
|
2271
|
+
side: "right",
|
|
2272
|
+
sideOffset: 8,
|
|
2273
|
+
className: "w-72 max-h-80 overflow-y-auto p-2",
|
|
2274
|
+
onPointerDown: (g) => g.stopPropagation(),
|
|
2275
|
+
children: [
|
|
2276
|
+
/* @__PURE__ */ a("div", { className: "flex items-center justify-between mb-2 pb-2 border-b", children: [
|
|
2277
|
+
/* @__PURE__ */ e("span", { className: "text-sm font-medium", children: p.date.toLocaleDateString(void 0, {
|
|
2278
|
+
weekday: "short",
|
|
2279
|
+
month: "short",
|
|
2280
|
+
day: "numeric"
|
|
2281
|
+
}) }),
|
|
2282
|
+
/* @__PURE__ */ a("span", { className: "text-xs text-muted-foreground", children: [
|
|
2283
|
+
v.length,
|
|
2284
|
+
" events"
|
|
2285
|
+
] })
|
|
2286
|
+
] }),
|
|
2287
|
+
/* @__PURE__ */ e("div", { className: "space-y-1.5", children: v.map((g) => /* @__PURE__ */ e("div", { children: D ? D({ event: g, variant: "compact" }) : /* @__PURE__ */ e(
|
|
2288
|
+
Ce,
|
|
2289
|
+
{
|
|
2290
|
+
event: g,
|
|
2291
|
+
variant: "compact",
|
|
2292
|
+
badgeVariant: o,
|
|
2293
|
+
onClick: (c) => {
|
|
2294
|
+
d(null), i?.(c);
|
|
2295
|
+
},
|
|
2296
|
+
disablePopover: !!i && !m,
|
|
2297
|
+
renderPopover: m,
|
|
2298
|
+
showTime: !0
|
|
2299
|
+
}
|
|
2300
|
+
) }, g.id)) })
|
|
2301
|
+
]
|
|
2302
|
+
}
|
|
2303
|
+
)
|
|
2304
|
+
]
|
|
2305
|
+
}
|
|
2306
|
+
) : /* @__PURE__ */ a(
|
|
2245
2307
|
"div",
|
|
2246
2308
|
{
|
|
2247
|
-
onPointerDown: (
|
|
2248
|
-
|
|
2309
|
+
onPointerDown: (g) => {
|
|
2310
|
+
g.stopPropagation(), C(p.date);
|
|
2249
2311
|
},
|
|
2250
2312
|
className: "w-full text-left text-xs text-muted-foreground hover:text-foreground hover:underline px-1.5 cursor-pointer",
|
|
2251
2313
|
children: [
|
|
2252
2314
|
"+",
|
|
2253
|
-
|
|
2315
|
+
v.length - ge,
|
|
2254
2316
|
" more"
|
|
2255
2317
|
]
|
|
2256
2318
|
}
|
|
2257
|
-
)
|
|
2319
|
+
))
|
|
2258
2320
|
] })
|
|
2259
2321
|
]
|
|
2260
2322
|
},
|
|
2261
|
-
|
|
2323
|
+
T
|
|
2262
2324
|
);
|
|
2263
2325
|
}) })
|
|
2264
2326
|
] }) }) });
|
|
@@ -2268,30 +2330,30 @@ function dn({
|
|
|
2268
2330
|
date: n,
|
|
2269
2331
|
daysAhead: r = 60,
|
|
2270
2332
|
badgeVariant: o = "colored",
|
|
2271
|
-
onEventClick:
|
|
2333
|
+
onEventClick: i,
|
|
2272
2334
|
className: f,
|
|
2273
|
-
renderEvent:
|
|
2274
|
-
renderPopover:
|
|
2335
|
+
renderEvent: l,
|
|
2336
|
+
renderPopover: x
|
|
2275
2337
|
}) {
|
|
2276
|
-
const D =
|
|
2338
|
+
const D = P(() => {
|
|
2277
2339
|
const h = new Date(n);
|
|
2278
2340
|
h.setHours(0, 0, 0, 0);
|
|
2279
|
-
const
|
|
2280
|
-
return
|
|
2281
|
-
}, [t, r, n]),
|
|
2282
|
-
const h = dt(D),
|
|
2283
|
-
for (const [
|
|
2284
|
-
|
|
2285
|
-
date: new Date(
|
|
2286
|
-
dateKey:
|
|
2341
|
+
const y = new Date(h);
|
|
2342
|
+
return y.setDate(y.getDate() + r), t.filter((d) => d.endDate >= h && d.startDate <= y);
|
|
2343
|
+
}, [t, r, n]), m = P(() => {
|
|
2344
|
+
const h = dt(D), y = [];
|
|
2345
|
+
for (const [d, w] of h)
|
|
2346
|
+
y.push({
|
|
2347
|
+
date: new Date(d),
|
|
2348
|
+
dateKey: d,
|
|
2287
2349
|
events: w
|
|
2288
2350
|
});
|
|
2289
|
-
return
|
|
2351
|
+
return y.sort((d, w) => d.date.getTime() - w.date.getTime()), y;
|
|
2290
2352
|
}, [D]);
|
|
2291
|
-
return
|
|
2353
|
+
return m.length === 0 ? /* @__PURE__ */ e(
|
|
2292
2354
|
"div",
|
|
2293
2355
|
{
|
|
2294
|
-
className:
|
|
2356
|
+
className: u(
|
|
2295
2357
|
"flex flex-col items-center justify-center h-full py-12",
|
|
2296
2358
|
f
|
|
2297
2359
|
),
|
|
@@ -2300,7 +2362,7 @@ function dn({
|
|
|
2300
2362
|
/* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground/70", children: "No events scheduled for this period" })
|
|
2301
2363
|
] })
|
|
2302
2364
|
}
|
|
2303
|
-
) : /* @__PURE__ */ a("div", { className:
|
|
2365
|
+
) : /* @__PURE__ */ a("div", { className: u("flex flex-col h-full overflow-auto", f), children: [
|
|
2304
2366
|
/* @__PURE__ */ e("div", { className: "sticky top-0 z-10 bg-background border-b px-4 py-3", children: /* @__PURE__ */ a("div", { className: "flex items-center justify-between", children: [
|
|
2305
2367
|
/* @__PURE__ */ e("h2", { className: "text-lg font-medium", children: "Schedule" }),
|
|
2306
2368
|
/* @__PURE__ */ a("span", { className: "text-sm text-muted-foreground", children: [
|
|
@@ -2309,13 +2371,13 @@ function dn({
|
|
|
2309
2371
|
D.length !== 1 ? "s" : ""
|
|
2310
2372
|
] })
|
|
2311
2373
|
] }) }),
|
|
2312
|
-
/* @__PURE__ */ e("div", { className: "flex-1", children:
|
|
2313
|
-
const w =
|
|
2374
|
+
/* @__PURE__ */ e("div", { className: "flex-1", children: m.map(({ date: h, dateKey: y, events: d }) => {
|
|
2375
|
+
const w = Q(h), k = h.toLocaleDateString([], { weekday: "short" }), b = h.getDate(), W = h.toLocaleDateString([], { month: "short" });
|
|
2314
2376
|
return /* @__PURE__ */ a("div", { className: "", children: [
|
|
2315
2377
|
/* @__PURE__ */ e(
|
|
2316
2378
|
"div",
|
|
2317
2379
|
{
|
|
2318
|
-
className:
|
|
2380
|
+
className: u(
|
|
2319
2381
|
"sticky top-[52px] z-10 bg-background px-4 py-3 border-b"
|
|
2320
2382
|
),
|
|
2321
2383
|
children: /* @__PURE__ */ a("div", { className: "flex items-center gap-3", children: [
|
|
@@ -2323,83 +2385,83 @@ function dn({
|
|
|
2323
2385
|
/* @__PURE__ */ e(
|
|
2324
2386
|
"span",
|
|
2325
2387
|
{
|
|
2326
|
-
className:
|
|
2388
|
+
className: u(
|
|
2327
2389
|
"text-[11px] font-medium uppercase tracking-wide",
|
|
2328
2390
|
w ? "text-primary" : "text-muted-foreground"
|
|
2329
2391
|
),
|
|
2330
|
-
children:
|
|
2392
|
+
children: k
|
|
2331
2393
|
}
|
|
2332
2394
|
),
|
|
2333
2395
|
/* @__PURE__ */ e(
|
|
2334
2396
|
"span",
|
|
2335
2397
|
{
|
|
2336
|
-
className:
|
|
2398
|
+
className: u(
|
|
2337
2399
|
"flex items-center justify-center rounded-full mt-0.5",
|
|
2338
2400
|
"size-10 text-xl font-normal",
|
|
2339
2401
|
w ? "bg-primary text-primary-foreground" : "text-foreground"
|
|
2340
2402
|
),
|
|
2341
|
-
children:
|
|
2403
|
+
children: b
|
|
2342
2404
|
}
|
|
2343
2405
|
)
|
|
2344
2406
|
] }),
|
|
2345
2407
|
/* @__PURE__ */ a("span", { className: "text-sm text-muted-foreground", children: [
|
|
2346
|
-
|
|
2408
|
+
W,
|
|
2347
2409
|
" ",
|
|
2348
2410
|
h.getFullYear()
|
|
2349
2411
|
] })
|
|
2350
2412
|
] })
|
|
2351
2413
|
}
|
|
2352
2414
|
),
|
|
2353
|
-
/* @__PURE__ */ e("div", { className: "px-4 py-3 space-y-2 border-b last:border-b-0", children:
|
|
2354
|
-
(
|
|
2355
|
-
|
|
2415
|
+
/* @__PURE__ */ e("div", { className: "px-4 py-3 space-y-2 border-b last:border-b-0", children: d.map(
|
|
2416
|
+
(L) => l ? /* @__PURE__ */ e("div", { children: l({ event: L, variant: "full" }) }, L.id) : /* @__PURE__ */ e(
|
|
2417
|
+
Ce,
|
|
2356
2418
|
{
|
|
2357
|
-
event:
|
|
2419
|
+
event: L,
|
|
2358
2420
|
variant: "full",
|
|
2359
2421
|
badgeVariant: o,
|
|
2360
|
-
onClick:
|
|
2361
|
-
disablePopover: !!
|
|
2362
|
-
renderPopover:
|
|
2422
|
+
onClick: i,
|
|
2423
|
+
disablePopover: !!i && !x,
|
|
2424
|
+
renderPopover: x,
|
|
2363
2425
|
showTime: !0,
|
|
2364
2426
|
showDescription: !0,
|
|
2365
2427
|
showParticipants: !0
|
|
2366
2428
|
},
|
|
2367
|
-
|
|
2429
|
+
L.id
|
|
2368
2430
|
)
|
|
2369
2431
|
) })
|
|
2370
|
-
] },
|
|
2432
|
+
] }, y);
|
|
2371
2433
|
}) })
|
|
2372
2434
|
] });
|
|
2373
2435
|
}
|
|
2374
2436
|
export {
|
|
2375
2437
|
dn as A,
|
|
2376
|
-
|
|
2438
|
+
le as B,
|
|
2377
2439
|
nn as C,
|
|
2378
2440
|
At as D,
|
|
2379
2441
|
Je as E,
|
|
2380
2442
|
ln as M,
|
|
2381
|
-
|
|
2443
|
+
ee as P,
|
|
2382
2444
|
et as T,
|
|
2383
2445
|
sn as W,
|
|
2384
2446
|
Kt as a,
|
|
2385
2447
|
on as b,
|
|
2386
|
-
|
|
2448
|
+
Ce as c,
|
|
2387
2449
|
Ze as d,
|
|
2388
2450
|
an as e,
|
|
2389
2451
|
tn as f,
|
|
2390
|
-
|
|
2391
|
-
|
|
2452
|
+
J as g,
|
|
2453
|
+
te as h,
|
|
2392
2454
|
Tt as i,
|
|
2393
|
-
|
|
2394
|
-
|
|
2455
|
+
se as j,
|
|
2456
|
+
Z as k,
|
|
2395
2457
|
rn as l,
|
|
2396
|
-
|
|
2458
|
+
ie as m,
|
|
2397
2459
|
ct as n,
|
|
2398
2460
|
he as o,
|
|
2399
|
-
|
|
2400
|
-
|
|
2461
|
+
Re as p,
|
|
2462
|
+
je as q,
|
|
2401
2463
|
ke as r,
|
|
2402
2464
|
De as s,
|
|
2403
2465
|
Lt as t
|
|
2404
2466
|
};
|
|
2405
|
-
//# sourceMappingURL=agenda-view-
|
|
2467
|
+
//# sourceMappingURL=agenda-view-DM01Fpvr.js.map
|