@alfadocs/ui-kit 1.23.0 → 1.25.1-calendar.0

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.
@@ -1,25 +1,25 @@
1
1
  import { jsxs as E, jsx as l } from "react/jsx-runtime";
2
- import { forwardRef as Be, useRef as p, useEffect as v, useState as se, useMemo as u, useImperativeHandle as Ht, useCallback as g } from "react";
2
+ import { forwardRef as Le, useRef as p, useEffect as v, useState as se, useMemo as u, useImperativeHandle as $t, useCallback as g } from "react";
3
3
  import { useTranslation as ye } from "react-i18next";
4
- import qt from "@fullcalendar/react";
5
- import $t from "@fullcalendar/daygrid";
6
- import Kt from "@fullcalendar/timegrid";
7
- import Ut from "@fullcalendar/list";
8
- import Yt from "@fullcalendar/resource";
9
- import Xt from "@fullcalendar/resource-timegrid";
10
- import Jt from "@fullcalendar/resource-timeline";
11
- import Zt from "@fullcalendar/timeline";
12
- import Qt from "@fullcalendar/interaction";
13
- import { u as er } from "./use-prefers-reduced-motion-BMwIQRjB.js";
14
- import { u as tr } from "./registry-DvAUVLHh.js";
15
- import { w as rr, C as nr } from "./calendar-event-card-66CEEWU6.js";
16
- import { A as ir } from "./avatar-BNQNhoyL.js";
17
- import { R as ar } from "./resource-chip-DYTG0IQQ.js";
18
- import { T as sr } from "./tooltip-DvmfrNvB.js";
19
- import { C as or } from "./check-DrFSN__t.js";
20
- import { C as Ge } from "./chevron-right-I9AeSxH2.js";
21
- import { C as Me } from "./chevron-left-B8cOyH-V.js";
22
- const dr = {
4
+ import Kt from "@fullcalendar/react";
5
+ import Ut from "@fullcalendar/daygrid";
6
+ import Yt from "@fullcalendar/timegrid";
7
+ import Xt from "@fullcalendar/list";
8
+ import Jt from "@fullcalendar/resource";
9
+ import Zt from "@fullcalendar/resource-timegrid";
10
+ import Qt from "@fullcalendar/resource-timeline";
11
+ import er from "@fullcalendar/timeline";
12
+ import tr from "@fullcalendar/interaction";
13
+ import { u as rr } from "./use-prefers-reduced-motion-BMwIQRjB.js";
14
+ import { u as nr } from "./registry-DvAUVLHh.js";
15
+ import { w as ir, C as ar } from "./calendar-event-card-66CEEWU6.js";
16
+ import { A as sr } from "./avatar-BNQNhoyL.js";
17
+ import { R as or } from "./resource-chip-DYTG0IQQ.js";
18
+ import { T as dr } from "./tooltip-DvmfrNvB.js";
19
+ import { C as cr } from "./check-DrFSN__t.js";
20
+ import { C as Be } from "./chevron-right-I9AeSxH2.js";
21
+ import { C as Oe } from "./chevron-left-B8cOyH-V.js";
22
+ const lr = {
23
23
  id: "calendar",
24
24
  capabilities: ["view_change", "range_navigate", "pick"],
25
25
  state: {
@@ -174,7 +174,7 @@ const dr = {
174
174
  description: 'Emitted on every rendered FullCalendar event by the kit event renderer. Used by focusEvent. Cards also carry data-kind="task"|"draft"|"appointment" and data-status for classification.'
175
175
  }
176
176
  }
177
- }, cr = {
177
+ }, ur = {
178
178
  vertical: {
179
179
  Day: "resourceTimeGridDay",
180
180
  ThreeDays: "resourceTimeGridThreeDays",
@@ -185,35 +185,35 @@ const dr = {
185
185
  ThreeDays: "resourceTimelineThreeDays",
186
186
  Week: "resourceTimelineWeek"
187
187
  }
188
- }, lr = /* @__PURE__ */ new Set([
188
+ }, mr = /* @__PURE__ */ new Set([
189
189
  "dayGridMonth",
190
190
  "timeGridWeek",
191
191
  "timeGridThreeDays",
192
192
  "timeGridDay",
193
193
  "listWeek"
194
- ]), ur = {
194
+ ]), fr = {
195
195
  timeGridDay: "timelineDay",
196
196
  timeGridThreeDays: "timelineThreeDays",
197
197
  timeGridWeek: "timelineWeek"
198
198
  };
199
199
  function pe(n, s = "vertical") {
200
- if (lr.has(n))
201
- return s === "horizontal" ? ur[n] ?? n : n;
200
+ if (mr.has(n))
201
+ return s === "horizontal" ? fr[n] ?? n : n;
202
202
  const d = n.replace(/^resourceTimeGrid/, "").replace(
203
203
  /(Chair|Operator)$/,
204
204
  ""
205
205
  );
206
- return cr[s][d];
206
+ return ur[s][d];
207
207
  }
208
208
  const ae = {
209
209
  weekday: "long",
210
210
  day: "numeric",
211
211
  month: "long",
212
212
  year: "numeric"
213
- }, mr = [
213
+ }, pr = [
214
214
  { weekday: "short", day: "numeric", month: "short" },
215
215
  { hour: "numeric", minute: "2-digit" }
216
- ], fr = {
216
+ ], vr = {
217
217
  resourceTimeGridThreeDays: {
218
218
  type: "resourceTimeGrid",
219
219
  duration: { days: 3 }
@@ -232,17 +232,17 @@ const ae = {
232
232
  type: "timeline",
233
233
  duration: { days: 3 }
234
234
  },
235
- timeline: { slotLabelFormat: mr },
235
+ timeline: { slotLabelFormat: pr },
236
236
  timeGridDay: { titleFormat: ae },
237
237
  resourceTimeGridDay: { titleFormat: ae },
238
238
  timelineDay: { titleFormat: ae },
239
239
  resourceTimelineDay: { titleFormat: ae }
240
- }, ve = 5, pr = {
240
+ }, ve = 5, hr = {
241
241
  create: "calendar.modeBanner.create",
242
242
  move: "calendar.modeBanner.move",
243
243
  copy: "calendar.modeBanner.copy"
244
244
  };
245
- function vr(n) {
245
+ function gr(n) {
246
246
  try {
247
247
  const s = new Intl.Locale(n), o = typeof s.getWeekInfo == "function" ? s.getWeekInfo() : s.weekInfo;
248
248
  if (o && typeof o.firstDay == "number")
@@ -256,7 +256,7 @@ function ge(n) {
256
256
  const s = n.getFullYear(), o = String(n.getMonth() + 1).padStart(2, "0"), d = String(n.getDate()).padStart(2, "0");
257
257
  return `${s}-${o}-${d}`;
258
258
  }
259
- function hr(n, s) {
259
+ function yr(n, s) {
260
260
  const o = /* @__PURE__ */ new Set(), d = /* @__PURE__ */ new Map(), f = (n == null ? void 0 : n.length) ?? 0;
261
261
  if (n && s) {
262
262
  for (const T of n)
@@ -273,7 +273,7 @@ function hr(n, s) {
273
273
  active: o.size > 0
274
274
  };
275
275
  }
276
- function gr() {
276
+ function br() {
277
277
  const { i18n: n } = ye(), [s, o] = se(() => {
278
278
  if (typeof document > "u") return !1;
279
279
  const d = document.documentElement.getAttribute("dir"), f = typeof n.dir == "function" ? n.dir() : "ltr";
@@ -291,7 +291,7 @@ function gr() {
291
291
  }), () => d.disconnect();
292
292
  }, [n]), s;
293
293
  }
294
- function yr(n, s) {
294
+ function Tr(n, s) {
295
295
  const o = n.event.start, d = n.event.end ?? n.event.start;
296
296
  if (!(!o || !d))
297
297
  try {
@@ -305,7 +305,7 @@ function yr(n, s) {
305
305
  return;
306
306
  }
307
307
  }
308
- const Oe = [
308
+ const We = [
309
309
  "ds:inline-flex ds:items-center ds:justify-center",
310
310
  "ds:min-h-[var(--min-target-size)]",
311
311
  "ds:bg-[var(--background)] ds:text-[var(--foreground)]",
@@ -318,15 +318,15 @@ const Oe = [
318
318
  "ds:focus-visible:outline-[var(--ring)]",
319
319
  "ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
320
320
  "ds:motion-reduce:transition-none"
321
- ].join(" "), br = [
322
- Oe,
321
+ ].join(" "), xr = [
322
+ We,
323
323
  "ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]"
324
- ].join(" "), Tr = [
325
- Oe,
324
+ ].join(" "), Dr = [
325
+ We,
326
326
  "ds:min-w-[var(--min-target-size)]"
327
- ].join(" "), be = Be(
327
+ ].join(" "), be = Le(
328
328
  ({ title: n, onToday: s, onPrev: o, onNext: d, end: f, className: T, maskClassName: h }, k) => {
329
- const { t: O } = ye(), Y = gr(), x = Y ? Ge : Me, L = Y ? Me : Ge, W = [
329
+ const { t: O } = ye(), Y = br(), x = Y ? Be : Oe, L = Y ? Oe : Be, W = [
330
330
  "ds:calendar-toolbar",
331
331
  "ds:sticky ds:top-0 ds:z-20",
332
332
  "ds:flex ds:items-center ds:gap-[var(--spacing-sm)]",
@@ -335,7 +335,7 @@ const Oe = [
335
335
  "ds:bg-[var(--background)]",
336
336
  "ds:border-b ds:border-[var(--border)]",
337
337
  T
338
- ].filter(Boolean).join(" "), F = [br, h].filter(Boolean).join(" "), A = [Tr, h].filter(Boolean).join(" "), D = [
338
+ ].filter(Boolean).join(" "), F = [xr, h].filter(Boolean).join(" "), A = [Dr, h].filter(Boolean).join(" "), D = [
339
339
  "ds:flex-1 ds:text-center ds:truncate type-title-card",
340
340
  h
341
341
  ].filter(Boolean).join(" "), X = ["ds:flex-1 ds:text-center", h].filter(Boolean).join(" ");
@@ -384,7 +384,7 @@ const Oe = [
384
384
  }
385
385
  );
386
386
  be.displayName = "Calendar.Toolbar";
387
- const Le = Be(
387
+ const Fe = Le(
388
388
  ({
389
389
  id: n,
390
390
  events: s,
@@ -404,53 +404,55 @@ const Le = Be(
404
404
  onDateClick: D,
405
405
  onNavLinkDayClick: X,
406
406
  editable: J = !1,
407
- eventDurationEditable: We,
408
- selectable: Fe = !1,
409
- height: ze,
410
- className: je,
407
+ eventDurationEditable: ze,
408
+ selectable: Te = !1,
409
+ selectMirror: je,
410
+ unselectAuto: xe,
411
+ height: _e,
412
+ className: Ve,
411
413
  privacyMode: y = !1,
412
- eventColorStyle: _e = "solid",
414
+ eventColorStyle: He = "solid",
413
415
  mode: Z = "default",
414
- modeLabel: Ve,
416
+ modeLabel: qe,
415
417
  modeBannerColor: Q,
416
418
  modeBannerTextColor: ee,
417
- onModeCancel: Te,
418
- alertBanner: He,
419
- hiddenDays: xe,
420
- slotMinTime: qe,
421
- slotMaxTime: $e,
422
- slotDuration: Ke,
423
- snapDuration: De,
424
- showTime: Ue = !0,
419
+ onModeCancel: De,
420
+ alertBanner: $e,
421
+ hiddenDays: we,
422
+ slotMinTime: Ke,
423
+ slotMaxTime: Ue,
424
+ slotDuration: Ye,
425
+ snapDuration: Ce,
426
+ showTime: Xe = !0,
425
427
  datesAboveResources: oe = !0,
426
- slotEventOverlap: Ye = !1,
427
- stickyHeaderDates: Xe = !0,
428
- nowIndicator: Je = !0,
429
- dayMaxEvents: Ze = !0,
430
- schedulerLicenseKey: Qe = void 0,
431
- toolbar: et = !0,
432
- toolbarEnd: tt,
428
+ slotEventOverlap: Je = !1,
429
+ stickyHeaderDates: Ze = !0,
430
+ nowIndicator: Qe = !0,
431
+ dayMaxEvents: et = !0,
432
+ schedulerLicenseKey: tt = void 0,
433
+ toolbar: rt = !0,
434
+ toolbarEnd: nt,
433
435
  resourceLayout: z = "vertical",
434
436
  showResourceInitials: de = !1,
435
- resourceLabelVariant: Ce = "text",
437
+ resourceLabelVariant: ke = "text",
436
438
  verticalResourceLabels: ce = !1,
437
- selectedEventId: we,
438
- availabilityMode: rt = !1,
439
- resourceAreaWidth: nt,
439
+ selectedEventId: Ie,
440
+ availabilityMode: it = !1,
441
+ resourceAreaWidth: at,
440
442
  resourceAreaHeader: j,
441
443
  defaultTimedEventDuration: _,
442
- zebraRows: it = !1,
444
+ zebraRows: st = !1,
443
445
  maskClassName: N
444
- }, at) => {
445
- const { t: m, i18n: P } = ye(), C = p(null), R = p(null), w = p(null), I = p(null), G = p(null), ke = p(null), te = p({
446
+ }, ot) => {
447
+ const { t: m, i18n: P } = ye(), w = p(null), R = p(null), C = p(null), I = p(null), G = p(null), Ae = p(null), te = p({
446
448
  id: 0,
447
449
  x: 0,
448
450
  y: 0
449
- }), Ie = p(0), Ae = p(0), S = T ?? P.language ?? "en";
451
+ }), Re = p(0), Se = p(0), S = T ?? P.language ?? "en";
450
452
  v(() => {
451
- }, [xe]), v(() => {
453
+ }, [we]), v(() => {
452
454
  }, [_]);
453
- const [st, ot] = se(() => {
455
+ const [dt, ct] = se(() => {
454
456
  if (typeof document > "u") return "ltr";
455
457
  const e = document.documentElement.getAttribute("dir"), t = typeof P.dir == "function" ? P.dir() : "ltr";
456
458
  return e === "rtl" || t === "rtl" ? "rtl" : "ltr";
@@ -459,7 +461,7 @@ const Le = Be(
459
461
  if (typeof document > "u") return;
460
462
  const e = new MutationObserver(() => {
461
463
  const t = document.documentElement.getAttribute("dir"), r = typeof P.dir == "function" ? P.dir() : "ltr";
462
- ot(t === "rtl" || r === "rtl" ? "rtl" : "ltr");
464
+ ct(t === "rtl" || r === "rtl" ? "rtl" : "ltr");
463
465
  });
464
466
  return e.observe(document.documentElement, {
465
467
  attributes: !0,
@@ -471,7 +473,7 @@ const Le = Be(
471
473
  const t = new MutationObserver(() => {
472
474
  clearTimeout(e), e = setTimeout(() => {
473
475
  var i;
474
- const r = (i = C.current) == null ? void 0 : i.getApi();
476
+ const r = (i = w.current) == null ? void 0 : i.getApi();
475
477
  r && typeof r.render == "function" && r.render();
476
478
  }, 50);
477
479
  });
@@ -490,7 +492,7 @@ const Le = Be(
490
492
  const c = a[0], b = (($ = (q = c == null ? void 0 : c.borderBoxSize) == null ? void 0 : q[0]) == null ? void 0 : $.inlineSize) ?? (c == null ? void 0 : c.contentRect.width) ?? e.getBoundingClientRect().width;
491
493
  b !== r && (r = b, cancelAnimationFrame(t), t = requestAnimationFrame(() => {
492
494
  var K, U;
493
- (U = (K = C.current) == null ? void 0 : K.getApi()) == null || U.updateSize();
495
+ (U = (K = w.current) == null ? void 0 : K.getApi()) == null || U.updateSize();
494
496
  }));
495
497
  });
496
498
  return i.observe(e), () => {
@@ -522,19 +524,19 @@ const Le = Be(
522
524
  attributeFilter: ["aria-hidden"]
523
525
  }), () => r.disconnect();
524
526
  }, [m]);
525
- const re = er(), [dt, ct] = se(""), [V, lt] = se(
527
+ const re = rr(), [lt, ut] = se(""), [V, mt] = se(
526
528
  () => pe(d, z)
527
- ), Re = p(V);
528
- Re.current = V;
529
+ ), Ee = p(V);
530
+ Ee.current = V;
529
531
  const le = u(() => {
530
532
  const e = () => {
531
533
  var t;
532
- return (t = C.current) == null ? void 0 : t.getApi();
534
+ return (t = w.current) == null ? void 0 : t.getApi();
533
535
  };
534
536
  return {
535
537
  getApi: () => {
536
538
  var t;
537
- return (t = C.current) == null ? void 0 : t.getApi();
539
+ return (t = w.current) == null ? void 0 : t.getApi();
538
540
  },
539
541
  today: () => {
540
542
  var t;
@@ -578,9 +580,9 @@ const Le = Be(
578
580
  if (I.current && (clearTimeout(I.current), I.current = null), G.current && G.current !== a && G.current.classList.remove("calendar-event-focused"), a.scrollIntoView({
579
581
  behavior: re ? "auto" : "smooth",
580
582
  block: "center"
581
- }), a.classList.add("calendar-event-focused"), G.current = a, w.current) {
583
+ }), a.classList.add("calendar-event-focused"), G.current = a, C.current) {
582
584
  const c = a.getAttribute("aria-label") ?? t, b = y ? "•••" : c;
583
- w.current.textContent = m("calendar.focusedEvent", {
585
+ C.current.textContent = m("calendar.focusedEvent", {
584
586
  title: b
585
587
  });
586
588
  }
@@ -591,21 +593,21 @@ const Le = Be(
591
593
  }
592
594
  };
593
595
  }, [re, y, m, z]);
594
- Ht(at, () => le, [le]), tr(dr, le, n), v(
596
+ $t(ot, () => le, [le]), nr(lr, le, n), v(
595
597
  () => () => {
596
598
  I.current && (clearTimeout(I.current), I.current = null);
597
599
  },
598
600
  []
599
601
  );
600
- const Se = p(!0);
602
+ const Ne = p(!0);
601
603
  v(() => {
602
- if (Se.current) {
603
- Se.current = !1;
604
+ if (Ne.current) {
605
+ Ne.current = !1;
604
606
  return;
605
607
  }
606
- w.current && (w.current.textContent = m(y ? "calendar.privacyModeOn" : "calendar.privacyModeOff"));
608
+ C.current && (C.current.textContent = m(y ? "calendar.privacyModeOn" : "calendar.privacyModeOff"));
607
609
  }, [y, m]);
608
- const ut = u(
610
+ const ft = u(
609
611
  () => s.map((e) => ({
610
612
  id: e.id,
611
613
  title: e.title,
@@ -628,7 +630,9 @@ const Le = Be(
628
630
  IS how they pick the slot, so it stays editable even on a
629
631
  read-only calendar. The consumer's own `editable` still wins. */
630
632
  ...e.isDraft ? { editable: !0 } : {},
631
- ...e.editable !== void 0 ? { editable: e.editable } : {},
633
+ /* Scheduler separately falls back to the global editable option
634
+ for resource moves. A pinned event must refuse those too. */
635
+ ...e.editable !== void 0 ? { editable: e.editable, resourceEditable: e.editable } : {},
632
636
  ...e.startEditable !== void 0 ? { startEditable: e.startEditable } : {},
633
637
  extendedProps: {
634
638
  status: e.status,
@@ -659,24 +663,24 @@ const Le = Be(
659
663
  }
660
664
  })),
661
665
  [s]
662
- ), mt = u(
666
+ ), pt = u(
663
667
  () => ({
664
668
  year: "numeric",
665
669
  month: "long"
666
670
  }),
667
671
  []
668
- ), ft = u(
672
+ ), vt = u(
669
673
  () => ({
670
674
  weekday: "short"
671
675
  }),
672
676
  []
673
- ), pt = u(
677
+ ), ht = u(
674
678
  () => ({
675
679
  hour: "numeric",
676
680
  minute: "2-digit"
677
681
  }),
678
682
  []
679
- ), vt = u(
683
+ ), gt = u(
680
684
  () => ({
681
685
  hour: "2-digit",
682
686
  minute: "2-digit",
@@ -685,7 +689,7 @@ const Le = Be(
685
689
  hour12: !1
686
690
  }),
687
691
  []
688
- ), ht = g(
692
+ ), yt = g(
689
693
  (e) => {
690
694
  const t = new Intl.DateTimeFormat(S, {
691
695
  weekday: "short"
@@ -707,21 +711,21 @@ const Le = Be(
707
711
  ] });
708
712
  },
709
713
  [S]
710
- ), Ee = u(
714
+ ), Pe = u(
711
715
  () => typeof _ == "number" ? { minutes: _ } : _,
712
716
  [_]
713
717
  ), ue = u(
714
718
  () => N ? N.split(/\s+/).filter(Boolean) : void 0,
715
719
  [N]
716
- ), gt = u(() => {
720
+ ), bt = u(() => {
717
721
  if (j !== void 0)
718
722
  return j === "chairs" ? m("calendar.resourceLabel.chairs") : j === "operators" ? m("calendar.resourceLabel.operators") : j;
719
723
  }, [j, m]), ne = u(
720
- () => hr(o, oe),
724
+ () => yr(o, oe),
721
725
  [o, oe]
722
726
  ), M = p(ne);
723
727
  M.current = ne;
724
- const me = p(!1), yt = g(
728
+ const me = p(!1), Tt = g(
725
729
  (e) => {
726
730
  const t = M.current;
727
731
  if (!t.active || !e.view.type.startsWith("resourceTimeGrid"))
@@ -732,7 +736,7 @@ const Le = Be(
732
736
  ) ? [he] : [] : [];
733
737
  },
734
738
  []
735
- ), bt = g(
739
+ ), xt = g(
736
740
  (e) => {
737
741
  const t = M.current;
738
742
  if (!t.active || !e.view.type.startsWith("resourceTimeGrid"))
@@ -743,13 +747,13 @@ const Le = Be(
743
747
  ) ? [he] : [];
744
748
  },
745
749
  []
746
- ), Tt = g(
750
+ ), Dt = g(
747
751
  (e) => {
748
752
  const t = M.current;
749
753
  return !t.active || !e.view.type.startsWith("resourceTimeGrid") ? [] : (t.hiddenCountByDate.get(ge(e.date)) ?? 0) >= t.resourceCount ? [he] : [];
750
754
  },
751
755
  []
752
- ), xt = g((e) => {
756
+ ), wt = g((e) => {
753
757
  const t = M.current;
754
758
  if (!t.active || !e.view.type.startsWith("resourceTimeGrid"))
755
759
  return;
@@ -761,7 +765,7 @@ const Le = Be(
761
765
  r.colSpan !== c && (r.colSpan = c, me.current = !0);
762
766
  }, []), H = g(() => {
763
767
  const e = R.current;
764
- if (!e || !Re.current.startsWith("resourceTimeGrid")) return;
768
+ if (!e || !Ee.current.startsWith("resourceTimeGrid")) return;
765
769
  const t = M.current;
766
770
  !t.active && !me.current || (e.querySelectorAll(
767
771
  "th.fc-col-header-cell.fc-day[data-date]"
@@ -803,7 +807,7 @@ const Le = Be(
803
807
  patientId: t.patientId,
804
808
  operatorId: t.operatorId
805
809
  };
806
- }, Dt = u(() => {
810
+ }, Ct = u(() => {
807
811
  if (h)
808
812
  return (e) => {
809
813
  var r, i;
@@ -816,14 +820,14 @@ const Le = Be(
816
820
  oldResourceId: (r = e.oldResource) == null ? void 0 : r.id,
817
821
  newResourceId: (i = e.newResource) == null ? void 0 : i.id,
818
822
  revert: e.revert
819
- }), w.current)) {
823
+ }), C.current)) {
820
824
  const a = e.event.extendedProps ?? {}, c = y ? a.privacyModeTitle ?? "•••" : e.event.title;
821
- w.current.textContent = m("calendar.eventMoved", {
825
+ C.current.textContent = m("calendar.eventMoved", {
822
826
  title: c
823
827
  });
824
828
  }
825
829
  };
826
- }, [h, y, m]), Ct = u(() => {
830
+ }, [h, y, m]), kt = u(() => {
827
831
  if (k)
828
832
  return (e) => {
829
833
  if (!e.event.end) return;
@@ -836,25 +840,25 @@ const Le = Be(
836
840
  oldEnd: t,
837
841
  newEnd: r,
838
842
  revert: e.revert
839
- }), w.current) {
843
+ }), C.current) {
840
844
  const a = Math.round(
841
845
  (r.getTime() - i.getTime()) / 6e4
842
846
  ), c = e.event.extendedProps ?? {}, b = y ? c.privacyModeTitle ?? "•••" : e.event.title;
843
- w.current.textContent = m("calendar.eventResized", {
847
+ C.current.textContent = m("calendar.eventResized", {
844
848
  title: b,
845
849
  duration: a
846
850
  });
847
851
  }
848
852
  };
849
- }, [k, y, m]), wt = u(() => {
853
+ }, [k, y, m]), It = u(() => {
850
854
  if (x)
851
855
  return (e) => {
852
- e.event.start && (ke.current = e.jsEvent, x(B(e.event), {
856
+ e.event.start && (Ae.current = e.jsEvent, x(B(e.event), {
853
857
  el: e.el,
854
858
  jsEvent: e.jsEvent
855
859
  }));
856
860
  };
857
- }, [x]), kt = u(() => {
861
+ }, [x]), At = u(() => {
858
862
  if (L)
859
863
  return (e) => {
860
864
  var t;
@@ -863,12 +867,12 @@ const Le = Be(
863
867
  jsEvent: e.jsEvent
864
868
  }));
865
869
  };
866
- }, [L]), It = u(() => {
870
+ }, [L]), Rt = u(() => {
867
871
  if (W)
868
872
  return (e) => {
869
873
  e.event.start && e.event.display !== "background" && W(B(e.event));
870
874
  };
871
- }, [W]), At = u(() => {
875
+ }, [W]), St = u(() => {
872
876
  if (F)
873
877
  return (e) => {
874
878
  var t;
@@ -879,20 +883,20 @@ const Le = Be(
879
883
  resourceId: (t = e.resource) == null ? void 0 : t.id
880
884
  });
881
885
  };
882
- }, [F]), Rt = u(() => {
886
+ }, [F]), Et = u(() => {
883
887
  if (D)
884
888
  return (e) => {
885
889
  var r;
886
890
  const t = te.current.id;
887
- t !== 0 && Ae.current === t || (t !== 0 && (Ie.current = t), D({
891
+ t !== 0 && Se.current === t || (t !== 0 && (Re.current = t), D({
888
892
  date: e.date,
889
893
  allDay: e.allDay,
890
894
  resourceId: (r = e.resource) == null ? void 0 : r.id
891
895
  }));
892
896
  };
893
- }, [D]), St = g(
897
+ }, [D]), Nt = g(
894
898
  (e) => {
895
- ct(e.view.title), lt(e.view.type), A == null || A({
899
+ ut(e.view.title), mt(e.view.type), A == null || A({
896
900
  view: d,
897
901
  internalView: e.view.type,
898
902
  start: e.start,
@@ -904,19 +908,19 @@ const Le = Be(
904
908
  }), H();
905
909
  },
906
910
  [A, d, H]
907
- ), Et = u(() => vr(S), [S]), Nt = u(
911
+ ), Pt = u(() => gr(S), [S]), Gt = u(
908
912
  () => [
909
- $t,
910
- Kt,
911
913
  Ut,
912
- Qt,
913
914
  Yt,
914
915
  Xt,
916
+ tr,
915
917
  Jt,
916
- Zt
918
+ Zt,
919
+ Qt,
920
+ er
917
921
  ],
918
922
  []
919
- ), Pt = u(
923
+ ), Mt = u(
920
924
  () => pe(d, z),
921
925
  [d, z]
922
926
  );
@@ -936,7 +940,7 @@ const Le = Be(
936
940
  if (!e || !V.startsWith("resourceTimeGrid") || !D && !x) return;
937
941
  const t = (r) => {
938
942
  var K;
939
- if (r === ke.current) return;
943
+ if (r === Ae.current) return;
940
944
  const i = r.target;
941
945
  if (!(i instanceof Element) || i.closest(
942
946
  ".fc-more-link, a[data-navlink], .fc-popover, .fc-event-mirror"
@@ -950,20 +954,20 @@ const Le = Be(
950
954
  const b = i.closest("[data-event-id]");
951
955
  if (b) {
952
956
  if (!x) return;
953
- const U = b.getAttribute("data-event-id"), fe = (K = C.current) == null ? void 0 : K.getApi(), ie = U ? fe == null ? void 0 : fe.getEventById(U) : null;
957
+ const U = b.getAttribute("data-event-id"), fe = (K = w.current) == null ? void 0 : K.getApi(), ie = U ? fe == null ? void 0 : fe.getEventById(U) : null;
954
958
  if (!ie || !ie.start) return;
955
- const Pe = ie.extendedProps ?? {};
956
- if (Pe.isInternal || Pe.isDraft) return;
957
- const Vt = i.closest(".fc-event") ?? b;
958
- x(B(ie), { el: Vt, jsEvent: r });
959
+ const Me = ie.extendedProps ?? {};
960
+ if (Me.isInternal || Me.isDraft) return;
961
+ const qt = i.closest(".fc-event") ?? b;
962
+ x(B(ie), { el: qt, jsEvent: r });
959
963
  return;
960
964
  }
961
- if (!D || a.id !== 0 && Ie.current === a.id)
965
+ if (!D || a.id !== 0 && Re.current === a.id)
962
966
  return;
963
967
  const q = c.getAttribute("data-date");
964
968
  if (!q) return;
965
969
  const $ = /* @__PURE__ */ new Date(`${q}T00:00:00`);
966
- Number.isNaN($.getTime()) || (a.id !== 0 && (Ae.current = a.id), D({
970
+ Number.isNaN($.getTime()) || (a.id !== 0 && (Se.current = a.id), D({
967
971
  date: $,
968
972
  allDay: !0,
969
973
  resourceId: c.getAttribute("data-resource-id") ?? void 0
@@ -971,7 +975,7 @@ const Le = Be(
971
975
  };
972
976
  return e.addEventListener("click", t), () => e.removeEventListener("click", t);
973
977
  }, [V, D, x]);
974
- const Gt = g(
978
+ const Bt = g(
975
979
  (e) => {
976
980
  const t = e.resource.extendedProps, r = e.resource.title, i = t.color, a = t.shortTitleTextColor, c = i || a ? {
977
981
  ...i ? { "--resource-color": i } : {},
@@ -979,14 +983,14 @@ const Le = Be(
979
983
  "--resource-initials-text-color": a
980
984
  } : {}
981
985
  } : void 0;
982
- return Ce === "chip" && !de ? /* @__PURE__ */ l(
983
- ar,
986
+ return ke === "chip" && !de ? /* @__PURE__ */ l(
987
+ or,
984
988
  {
985
989
  label: r,
986
990
  color: i,
987
991
  orientation: ce ? "vertical" : "horizontal"
988
992
  }
989
- ) : de ? /* @__PURE__ */ l(sr, { label: r, children: /* @__PURE__ */ l(ir, { size: "sm", name: r, src: t.avatarSrc }) }) : i ? (i && a && rr(i, a, `resource ${e.resource.id}`), /* @__PURE__ */ E("span", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
993
+ ) : de ? /* @__PURE__ */ l(dr, { label: r, children: /* @__PURE__ */ l(sr, { size: "sm", name: r, src: t.avatarSrc }) }) : i ? (i && a && ir(i, a, `resource ${e.resource.id}`), /* @__PURE__ */ E("span", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
990
994
  /* @__PURE__ */ l(
991
995
  "span",
992
996
  {
@@ -998,8 +1002,8 @@ const Le = Be(
998
1002
  /* @__PURE__ */ l("span", { className: "ds:truncate ds:text-start", children: r })
999
1003
  ] })) : /* @__PURE__ */ l("span", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]", children: /* @__PURE__ */ l("span", { className: "ds:truncate ds:text-start", children: r }) });
1000
1004
  },
1001
- [de, Ce, ce]
1002
- ), Ne = u(
1005
+ [de, ke, ce]
1006
+ ), Ge = u(
1003
1007
  () => o == null ? void 0 : o.map((e) => ({
1004
1008
  id: e.id,
1005
1009
  title: e.title,
@@ -1018,34 +1022,43 @@ const Le = Be(
1018
1022
  H();
1019
1023
  const e = requestAnimationFrame(H);
1020
1024
  return () => cancelAnimationFrame(e);
1021
- }, [ne, Ne, V, H]);
1022
- const Mt = g(() => {
1025
+ }, [ne, Ge, V, H]);
1026
+ const Ot = g(() => {
1023
1027
  var e, t;
1024
- (t = (e = C.current) == null ? void 0 : e.getApi()) == null || t.today();
1025
- }, []), Bt = g(() => {
1028
+ (t = (e = w.current) == null ? void 0 : e.getApi()) == null || t.today();
1029
+ }, []), Lt = g(() => {
1026
1030
  var e, t;
1027
- (t = (e = C.current) == null ? void 0 : e.getApi()) == null || t.prev();
1028
- }, []), Ot = g(() => {
1031
+ (t = (e = w.current) == null ? void 0 : e.getApi()) == null || t.prev();
1032
+ }, []), Wt = g(() => {
1029
1033
  var e, t;
1030
- (t = (e = C.current) == null ? void 0 : e.getApi()) == null || t.next();
1031
- }, []), Lt = u(
1034
+ (t = (e = w.current) == null ? void 0 : e.getApi()) == null || t.next();
1035
+ }, []), Ft = u(
1032
1036
  () => s.some((e) => e.isDraft),
1033
1037
  [s]
1034
- ), Wt = [
1038
+ ), zt = [
1035
1039
  "fc-theme-alfadocs",
1036
- it ? "calendar-zebra-rows" : null,
1040
+ st ? "calendar-zebra-rows" : null,
1037
1041
  ce ? "calendar-vertical-resource-labels" : null,
1038
- rt ? "calendar-availability-mode" : null,
1042
+ it ? "calendar-availability-mode" : null,
1039
1043
  /* Composing: derived from the events themselves rather than a prop,
1040
1044
  so the dim can never disagree with what is on the grid. */
1041
- Lt ? "calendar-composing-mode" : null,
1045
+ Ft ? "calendar-composing-mode" : null,
1042
1046
  "ds:bg-background ds:text-foreground",
1043
- "ds:rounded-[var(--radius-md)]",
1044
- je
1045
- ].filter(Boolean).join(" "), Ft = Q || ee ? {
1047
+ /* The radius has to CLIP, not just round the box. FullCalendar draws the
1048
+ grid as a table with its own border, and that border squares off the
1049
+ four corners the radius rounds — so the surface read as a hard-edged
1050
+ frame sitting inside a soft one.
1051
+
1052
+ `clip`, not `hidden`: `hidden` makes this a scroll container, which
1053
+ breaks the grid's own sticky header row
1054
+ (`.fc-scrollgrid-section-sticky`). `clip` cuts the corners without
1055
+ creating one. */
1056
+ "ds:rounded-[var(--radius-md)] ds:overflow-clip",
1057
+ Ve
1058
+ ].filter(Boolean).join(" "), jt = Q || ee ? {
1046
1059
  ...Q ? { "--calendar-mode-bg": Q } : {},
1047
1060
  ...ee ? { "--calendar-mode-fg": ee } : {}
1048
- } : void 0, zt = Z !== "default" ? Ve ?? m(pr[Z]) : "", jt = [
1061
+ } : void 0, _t = Z !== "default" ? qe ?? m(hr[Z]) : "", Vt = [
1049
1062
  "ds:sticky ds:top-0 ds:z-10",
1050
1063
  "ds:flex ds:items-center ds:gap-[var(--spacing-sm)]",
1051
1064
  "ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]",
@@ -1055,7 +1068,7 @@ const Le = Be(
1055
1068
  doesn't supply a hex. */
1056
1069
  Q ? "ds:[background-color:var(--calendar-mode-bg)]" : "ds:bg-[var(--muted)]",
1057
1070
  ee ? "ds:[color:var(--calendar-mode-fg)]" : "ds:text-[var(--muted-foreground)]"
1058
- ].filter(Boolean).join(" "), _t = [
1071
+ ].filter(Boolean).join(" "), Ht = [
1059
1072
  "ds:inline-flex ds:items-center ds:justify-center",
1060
1073
  "ds:min-h-[var(--min-target-size)]",
1061
1074
  "ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]",
@@ -1074,7 +1087,7 @@ const Le = Be(
1074
1087
  "div",
1075
1088
  {
1076
1089
  ref: R,
1077
- className: Wt,
1090
+ className: zt,
1078
1091
  role: "region",
1079
1092
  "aria-label": m("calendar.ariaLabel"),
1080
1093
  "data-component": "calendar",
@@ -1084,127 +1097,129 @@ const Le = Be(
1084
1097
  /* @__PURE__ */ l(
1085
1098
  "div",
1086
1099
  {
1087
- ref: w,
1100
+ ref: C,
1088
1101
  "aria-live": "polite",
1089
1102
  "aria-atomic": "true",
1090
1103
  className: ["ds:sr-only", N].filter(Boolean).join(" ")
1091
1104
  }
1092
1105
  ),
1093
- He,
1106
+ $e,
1094
1107
  Z !== "default" ? /* @__PURE__ */ E(
1095
1108
  "div",
1096
1109
  {
1097
- className: jt,
1098
- style: Ft,
1110
+ className: Vt,
1111
+ style: jt,
1099
1112
  role: "status",
1100
1113
  children: [
1101
1114
  /* @__PURE__ */ l(
1102
1115
  "span",
1103
1116
  {
1104
1117
  className: ["ds:flex-1 ds:text-start", N].filter(Boolean).join(" "),
1105
- children: zt
1118
+ children: _t
1106
1119
  }
1107
1120
  ),
1108
- Te ? /* @__PURE__ */ l(
1121
+ De ? /* @__PURE__ */ l(
1109
1122
  "button",
1110
1123
  {
1111
1124
  type: "button",
1112
- onClick: Te,
1113
- className: _t,
1125
+ onClick: De,
1126
+ className: Ht,
1114
1127
  children: m("calendar.modeBanner.cancel")
1115
1128
  }
1116
1129
  ) : null
1117
1130
  ]
1118
1131
  }
1119
1132
  ) : null,
1120
- et !== !1 ? /* @__PURE__ */ l(
1133
+ rt !== !1 ? /* @__PURE__ */ l(
1121
1134
  be,
1122
1135
  {
1123
- title: dt,
1124
- onToday: Mt,
1125
- onPrev: Bt,
1126
- onNext: Ot,
1127
- end: tt,
1136
+ title: lt,
1137
+ onToday: Ot,
1138
+ onPrev: Lt,
1139
+ onNext: Wt,
1140
+ end: nt,
1128
1141
  maskClassName: N
1129
1142
  }
1130
1143
  ) : null,
1131
1144
  /* @__PURE__ */ l(
1132
- qt,
1145
+ Kt,
1133
1146
  {
1134
- ref: C,
1135
- plugins: Nt,
1136
- schedulerLicenseKey: Qe,
1137
- initialView: Pt,
1138
- views: fr,
1147
+ ref: w,
1148
+ plugins: Gt,
1149
+ schedulerLicenseKey: tt,
1150
+ initialView: Mt,
1151
+ views: vr,
1139
1152
  initialDate: f,
1140
1153
  locale: S,
1141
- direction: st,
1142
- firstDay: Et,
1154
+ direction: dt,
1155
+ firstDay: Pt,
1143
1156
  editable: J,
1144
- eventDurationEditable: J === !1 ? !1 : We ?? J,
1145
- selectable: Fe,
1157
+ eventDurationEditable: J === !1 ? !1 : ze ?? J,
1158
+ selectable: Te,
1159
+ selectMirror: je ?? Te,
1160
+ ...xe === void 0 ? {} : { unselectAuto: xe },
1146
1161
  droppable: J,
1147
- dayMaxEvents: Ze,
1148
- height: ze,
1162
+ dayMaxEvents: et,
1163
+ height: _e,
1149
1164
  expandRows: !0,
1150
- events: ut,
1151
- resources: Ne,
1165
+ events: ft,
1166
+ resources: Ge,
1152
1167
  resourceOrder: "sequenceNumber",
1153
- resourceLabelContent: Gt,
1154
- resourceAreaWidth: nt,
1155
- resourceAreaHeaderContent: gt,
1156
- dayCellClassNames: yt,
1157
- dayHeaderClassNames: Tt,
1158
- resourceLabelClassNames: bt,
1159
- dayHeaderDidMount: xt,
1168
+ resourceLabelContent: Bt,
1169
+ resourceAreaWidth: at,
1170
+ resourceAreaHeaderContent: bt,
1171
+ dayCellClassNames: Tt,
1172
+ dayHeaderClassNames: Dt,
1173
+ resourceLabelClassNames: xt,
1174
+ dayHeaderDidMount: wt,
1160
1175
  ...ue ? { slotLaneClassNames: ue } : {},
1161
1176
  eventClassNames: (e) => {
1162
1177
  var t;
1163
1178
  return [
1164
1179
  ...ue ?? [],
1165
- ...we && e.event.id === we ? ["calendar-event-selected"] : [],
1180
+ ...Ie && e.event.id === Ie ? ["calendar-event-selected"] : [],
1166
1181
  ...(t = e.event.extendedProps) != null && t.isDraft ? ["calendar-event-draft"] : []
1167
1182
  ];
1168
1183
  },
1169
1184
  headerToolbar: !1,
1170
1185
  allDayText: m("calendar.allDay"),
1171
1186
  noEventsText: m("calendar.noEvents"),
1172
- titleFormat: mt,
1173
- dayHeaderFormat: ft,
1174
- dayHeaderContent: ht,
1175
- eventTimeFormat: pt,
1176
- slotLabelFormat: vt,
1177
- slotMinTime: qe ?? "00:00:00",
1178
- slotMaxTime: $e ?? "24:00:00",
1179
- slotDuration: Ke ?? "00:30:00",
1180
- ...De ? { snapDuration: De } : {},
1187
+ titleFormat: pt,
1188
+ dayHeaderFormat: vt,
1189
+ dayHeaderContent: yt,
1190
+ eventTimeFormat: ht,
1191
+ slotLabelFormat: gt,
1192
+ slotMinTime: Ke ?? "00:00:00",
1193
+ slotMaxTime: Ue ?? "24:00:00",
1194
+ slotDuration: Ye ?? "00:30:00",
1195
+ ...Ce ? { snapDuration: Ce } : {},
1181
1196
  slotLabelInterval: "01:00:00",
1182
- ...Ee !== void 0 ? { defaultTimedEventDuration: Ee } : {},
1183
- hiddenDays: xe,
1197
+ ...Pe !== void 0 ? { defaultTimedEventDuration: Pe } : {},
1198
+ hiddenDays: we,
1184
1199
  datesAboveResources: oe,
1185
- slotEventOverlap: Ye,
1186
- stickyHeaderDates: Xe,
1187
- nowIndicator: Je,
1200
+ slotEventOverlap: Je,
1201
+ stickyHeaderDates: Ze,
1202
+ nowIndicator: Qe,
1188
1203
  eventLongPressDelay: re ? 0 : 1e3,
1189
1204
  eventDragMinDistance: re ? 0 : ve,
1190
1205
  eventContent: (e) => {
1191
1206
  var r;
1192
1207
  const t = e.event.extendedProps ?? {};
1193
1208
  return t.isInternal ? e.event.title ? /* @__PURE__ */ E("span", { className: "calendar-bg-event-label", children: [
1194
- /* @__PURE__ */ l(or, { size: 12, "aria-hidden": "true" }),
1209
+ /* @__PURE__ */ l(cr, { size: 12, "aria-hidden": "true" }),
1195
1210
  e.event.title
1196
1211
  ] }) : !0 : /* @__PURE__ */ l(
1197
- nr,
1212
+ ar,
1198
1213
  {
1199
1214
  eventId: e.event.id,
1200
1215
  title: y ? t.privacyModeTitle ?? "•••" : e.event.title,
1201
1216
  privacyMasked: y,
1202
1217
  suffix: t.suffix,
1203
- rangeText: yr(e, S),
1204
- showTime: Ue,
1218
+ rangeText: Tr(e, S),
1219
+ showTime: Xe,
1205
1220
  allDay: e.event.allDay,
1206
1221
  status: t.status,
1207
- colorStyle: _e,
1222
+ colorStyle: He,
1208
1223
  backgroundColor: t.backgroundColor,
1209
1224
  textColor: t.textColor,
1210
1225
  borderColor: t.borderColor,
@@ -1220,16 +1235,16 @@ const Le = Be(
1220
1235
  }
1221
1236
  );
1222
1237
  },
1223
- eventClick: wt,
1224
- eventMouseEnter: kt,
1225
- eventMouseLeave: It,
1226
- eventDrop: Dt,
1227
- eventResize: Ct,
1238
+ eventClick: It,
1239
+ eventMouseEnter: At,
1240
+ eventMouseLeave: Rt,
1241
+ eventDrop: Ct,
1242
+ eventResize: kt,
1228
1243
  eventDragStart: O,
1229
1244
  eventResizeStart: Y,
1230
- select: At,
1231
- dateClick: Rt,
1232
- datesSet: St,
1245
+ select: St,
1246
+ dateClick: Et,
1247
+ datesSet: Nt,
1233
1248
  ...X ? {
1234
1249
  navLinks: !0,
1235
1250
  navLinkDayClick: (e, t) => X(e, t)
@@ -1241,12 +1256,12 @@ const Le = Be(
1241
1256
  );
1242
1257
  }
1243
1258
  );
1244
- Le.displayName = "Calendar";
1245
- const xr = Le;
1246
- xr.Toolbar = be;
1259
+ Fe.displayName = "Calendar";
1260
+ const wr = Fe;
1261
+ wr.Toolbar = be;
1247
1262
  export {
1248
- xr as C,
1249
- dr as c,
1263
+ wr as C,
1264
+ lr as c,
1250
1265
  pe as r
1251
1266
  };
1252
- //# sourceMappingURL=calendar-BQPyUUPP.js.map
1267
+ //# sourceMappingURL=calendar-CBqU-UIR.js.map