@alfadocs/ui-kit 1.22.0 → 1.25.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,
@@ -659,24 +661,24 @@ const Le = Be(
659
661
  }
660
662
  })),
661
663
  [s]
662
- ), mt = u(
664
+ ), pt = u(
663
665
  () => ({
664
666
  year: "numeric",
665
667
  month: "long"
666
668
  }),
667
669
  []
668
- ), ft = u(
670
+ ), vt = u(
669
671
  () => ({
670
672
  weekday: "short"
671
673
  }),
672
674
  []
673
- ), pt = u(
675
+ ), ht = u(
674
676
  () => ({
675
677
  hour: "numeric",
676
678
  minute: "2-digit"
677
679
  }),
678
680
  []
679
- ), vt = u(
681
+ ), gt = u(
680
682
  () => ({
681
683
  hour: "2-digit",
682
684
  minute: "2-digit",
@@ -685,7 +687,7 @@ const Le = Be(
685
687
  hour12: !1
686
688
  }),
687
689
  []
688
- ), ht = g(
690
+ ), yt = g(
689
691
  (e) => {
690
692
  const t = new Intl.DateTimeFormat(S, {
691
693
  weekday: "short"
@@ -707,21 +709,21 @@ const Le = Be(
707
709
  ] });
708
710
  },
709
711
  [S]
710
- ), Ee = u(
712
+ ), Pe = u(
711
713
  () => typeof _ == "number" ? { minutes: _ } : _,
712
714
  [_]
713
715
  ), ue = u(
714
716
  () => N ? N.split(/\s+/).filter(Boolean) : void 0,
715
717
  [N]
716
- ), gt = u(() => {
718
+ ), bt = u(() => {
717
719
  if (j !== void 0)
718
720
  return j === "chairs" ? m("calendar.resourceLabel.chairs") : j === "operators" ? m("calendar.resourceLabel.operators") : j;
719
721
  }, [j, m]), ne = u(
720
- () => hr(o, oe),
722
+ () => yr(o, oe),
721
723
  [o, oe]
722
724
  ), M = p(ne);
723
725
  M.current = ne;
724
- const me = p(!1), yt = g(
726
+ const me = p(!1), Tt = g(
725
727
  (e) => {
726
728
  const t = M.current;
727
729
  if (!t.active || !e.view.type.startsWith("resourceTimeGrid"))
@@ -732,7 +734,7 @@ const Le = Be(
732
734
  ) ? [he] : [] : [];
733
735
  },
734
736
  []
735
- ), bt = g(
737
+ ), xt = g(
736
738
  (e) => {
737
739
  const t = M.current;
738
740
  if (!t.active || !e.view.type.startsWith("resourceTimeGrid"))
@@ -743,13 +745,13 @@ const Le = Be(
743
745
  ) ? [he] : [];
744
746
  },
745
747
  []
746
- ), Tt = g(
748
+ ), Dt = g(
747
749
  (e) => {
748
750
  const t = M.current;
749
751
  return !t.active || !e.view.type.startsWith("resourceTimeGrid") ? [] : (t.hiddenCountByDate.get(ge(e.date)) ?? 0) >= t.resourceCount ? [he] : [];
750
752
  },
751
753
  []
752
- ), xt = g((e) => {
754
+ ), wt = g((e) => {
753
755
  const t = M.current;
754
756
  if (!t.active || !e.view.type.startsWith("resourceTimeGrid"))
755
757
  return;
@@ -761,7 +763,7 @@ const Le = Be(
761
763
  r.colSpan !== c && (r.colSpan = c, me.current = !0);
762
764
  }, []), H = g(() => {
763
765
  const e = R.current;
764
- if (!e || !Re.current.startsWith("resourceTimeGrid")) return;
766
+ if (!e || !Ee.current.startsWith("resourceTimeGrid")) return;
765
767
  const t = M.current;
766
768
  !t.active && !me.current || (e.querySelectorAll(
767
769
  "th.fc-col-header-cell.fc-day[data-date]"
@@ -803,7 +805,7 @@ const Le = Be(
803
805
  patientId: t.patientId,
804
806
  operatorId: t.operatorId
805
807
  };
806
- }, Dt = u(() => {
808
+ }, Ct = u(() => {
807
809
  if (h)
808
810
  return (e) => {
809
811
  var r, i;
@@ -816,14 +818,14 @@ const Le = Be(
816
818
  oldResourceId: (r = e.oldResource) == null ? void 0 : r.id,
817
819
  newResourceId: (i = e.newResource) == null ? void 0 : i.id,
818
820
  revert: e.revert
819
- }), w.current)) {
821
+ }), C.current)) {
820
822
  const a = e.event.extendedProps ?? {}, c = y ? a.privacyModeTitle ?? "•••" : e.event.title;
821
- w.current.textContent = m("calendar.eventMoved", {
823
+ C.current.textContent = m("calendar.eventMoved", {
822
824
  title: c
823
825
  });
824
826
  }
825
827
  };
826
- }, [h, y, m]), Ct = u(() => {
828
+ }, [h, y, m]), kt = u(() => {
827
829
  if (k)
828
830
  return (e) => {
829
831
  if (!e.event.end) return;
@@ -836,25 +838,25 @@ const Le = Be(
836
838
  oldEnd: t,
837
839
  newEnd: r,
838
840
  revert: e.revert
839
- }), w.current) {
841
+ }), C.current) {
840
842
  const a = Math.round(
841
843
  (r.getTime() - i.getTime()) / 6e4
842
844
  ), c = e.event.extendedProps ?? {}, b = y ? c.privacyModeTitle ?? "•••" : e.event.title;
843
- w.current.textContent = m("calendar.eventResized", {
845
+ C.current.textContent = m("calendar.eventResized", {
844
846
  title: b,
845
847
  duration: a
846
848
  });
847
849
  }
848
850
  };
849
- }, [k, y, m]), wt = u(() => {
851
+ }, [k, y, m]), It = u(() => {
850
852
  if (x)
851
853
  return (e) => {
852
- e.event.start && (ke.current = e.jsEvent, x(B(e.event), {
854
+ e.event.start && (Ae.current = e.jsEvent, x(B(e.event), {
853
855
  el: e.el,
854
856
  jsEvent: e.jsEvent
855
857
  }));
856
858
  };
857
- }, [x]), kt = u(() => {
859
+ }, [x]), At = u(() => {
858
860
  if (L)
859
861
  return (e) => {
860
862
  var t;
@@ -863,12 +865,12 @@ const Le = Be(
863
865
  jsEvent: e.jsEvent
864
866
  }));
865
867
  };
866
- }, [L]), It = u(() => {
868
+ }, [L]), Rt = u(() => {
867
869
  if (W)
868
870
  return (e) => {
869
871
  e.event.start && e.event.display !== "background" && W(B(e.event));
870
872
  };
871
- }, [W]), At = u(() => {
873
+ }, [W]), St = u(() => {
872
874
  if (F)
873
875
  return (e) => {
874
876
  var t;
@@ -879,20 +881,20 @@ const Le = Be(
879
881
  resourceId: (t = e.resource) == null ? void 0 : t.id
880
882
  });
881
883
  };
882
- }, [F]), Rt = u(() => {
884
+ }, [F]), Et = u(() => {
883
885
  if (D)
884
886
  return (e) => {
885
887
  var r;
886
888
  const t = te.current.id;
887
- t !== 0 && Ae.current === t || (t !== 0 && (Ie.current = t), D({
889
+ t !== 0 && Se.current === t || (t !== 0 && (Re.current = t), D({
888
890
  date: e.date,
889
891
  allDay: e.allDay,
890
892
  resourceId: (r = e.resource) == null ? void 0 : r.id
891
893
  }));
892
894
  };
893
- }, [D]), St = g(
895
+ }, [D]), Nt = g(
894
896
  (e) => {
895
- ct(e.view.title), lt(e.view.type), A == null || A({
897
+ ut(e.view.title), mt(e.view.type), A == null || A({
896
898
  view: d,
897
899
  internalView: e.view.type,
898
900
  start: e.start,
@@ -904,19 +906,19 @@ const Le = Be(
904
906
  }), H();
905
907
  },
906
908
  [A, d, H]
907
- ), Et = u(() => vr(S), [S]), Nt = u(
909
+ ), Pt = u(() => gr(S), [S]), Gt = u(
908
910
  () => [
909
- $t,
910
- Kt,
911
911
  Ut,
912
- Qt,
913
912
  Yt,
914
913
  Xt,
914
+ tr,
915
915
  Jt,
916
- Zt
916
+ Zt,
917
+ Qt,
918
+ er
917
919
  ],
918
920
  []
919
- ), Pt = u(
921
+ ), Mt = u(
920
922
  () => pe(d, z),
921
923
  [d, z]
922
924
  );
@@ -936,7 +938,7 @@ const Le = Be(
936
938
  if (!e || !V.startsWith("resourceTimeGrid") || !D && !x) return;
937
939
  const t = (r) => {
938
940
  var K;
939
- if (r === ke.current) return;
941
+ if (r === Ae.current) return;
940
942
  const i = r.target;
941
943
  if (!(i instanceof Element) || i.closest(
942
944
  ".fc-more-link, a[data-navlink], .fc-popover, .fc-event-mirror"
@@ -950,20 +952,20 @@ const Le = Be(
950
952
  const b = i.closest("[data-event-id]");
951
953
  if (b) {
952
954
  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;
955
+ 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
956
  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 });
957
+ const Me = ie.extendedProps ?? {};
958
+ if (Me.isInternal || Me.isDraft) return;
959
+ const qt = i.closest(".fc-event") ?? b;
960
+ x(B(ie), { el: qt, jsEvent: r });
959
961
  return;
960
962
  }
961
- if (!D || a.id !== 0 && Ie.current === a.id)
963
+ if (!D || a.id !== 0 && Re.current === a.id)
962
964
  return;
963
965
  const q = c.getAttribute("data-date");
964
966
  if (!q) return;
965
967
  const $ = /* @__PURE__ */ new Date(`${q}T00:00:00`);
966
- Number.isNaN($.getTime()) || (a.id !== 0 && (Ae.current = a.id), D({
968
+ Number.isNaN($.getTime()) || (a.id !== 0 && (Se.current = a.id), D({
967
969
  date: $,
968
970
  allDay: !0,
969
971
  resourceId: c.getAttribute("data-resource-id") ?? void 0
@@ -971,7 +973,7 @@ const Le = Be(
971
973
  };
972
974
  return e.addEventListener("click", t), () => e.removeEventListener("click", t);
973
975
  }, [V, D, x]);
974
- const Gt = g(
976
+ const Bt = g(
975
977
  (e) => {
976
978
  const t = e.resource.extendedProps, r = e.resource.title, i = t.color, a = t.shortTitleTextColor, c = i || a ? {
977
979
  ...i ? { "--resource-color": i } : {},
@@ -979,14 +981,14 @@ const Le = Be(
979
981
  "--resource-initials-text-color": a
980
982
  } : {}
981
983
  } : void 0;
982
- return Ce === "chip" && !de ? /* @__PURE__ */ l(
983
- ar,
984
+ return ke === "chip" && !de ? /* @__PURE__ */ l(
985
+ or,
984
986
  {
985
987
  label: r,
986
988
  color: i,
987
989
  orientation: ce ? "vertical" : "horizontal"
988
990
  }
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: [
991
+ ) : 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
992
  /* @__PURE__ */ l(
991
993
  "span",
992
994
  {
@@ -998,8 +1000,8 @@ const Le = Be(
998
1000
  /* @__PURE__ */ l("span", { className: "ds:truncate ds:text-start", children: r })
999
1001
  ] })) : /* @__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
1002
  },
1001
- [de, Ce, ce]
1002
- ), Ne = u(
1003
+ [de, ke, ce]
1004
+ ), Ge = u(
1003
1005
  () => o == null ? void 0 : o.map((e) => ({
1004
1006
  id: e.id,
1005
1007
  title: e.title,
@@ -1018,34 +1020,43 @@ const Le = Be(
1018
1020
  H();
1019
1021
  const e = requestAnimationFrame(H);
1020
1022
  return () => cancelAnimationFrame(e);
1021
- }, [ne, Ne, V, H]);
1022
- const Mt = g(() => {
1023
+ }, [ne, Ge, V, H]);
1024
+ const Ot = g(() => {
1023
1025
  var e, t;
1024
- (t = (e = C.current) == null ? void 0 : e.getApi()) == null || t.today();
1025
- }, []), Bt = g(() => {
1026
+ (t = (e = w.current) == null ? void 0 : e.getApi()) == null || t.today();
1027
+ }, []), Lt = g(() => {
1026
1028
  var e, t;
1027
- (t = (e = C.current) == null ? void 0 : e.getApi()) == null || t.prev();
1028
- }, []), Ot = g(() => {
1029
+ (t = (e = w.current) == null ? void 0 : e.getApi()) == null || t.prev();
1030
+ }, []), Wt = g(() => {
1029
1031
  var e, t;
1030
- (t = (e = C.current) == null ? void 0 : e.getApi()) == null || t.next();
1031
- }, []), Lt = u(
1032
+ (t = (e = w.current) == null ? void 0 : e.getApi()) == null || t.next();
1033
+ }, []), Ft = u(
1032
1034
  () => s.some((e) => e.isDraft),
1033
1035
  [s]
1034
- ), Wt = [
1036
+ ), zt = [
1035
1037
  "fc-theme-alfadocs",
1036
- it ? "calendar-zebra-rows" : null,
1038
+ st ? "calendar-zebra-rows" : null,
1037
1039
  ce ? "calendar-vertical-resource-labels" : null,
1038
- rt ? "calendar-availability-mode" : null,
1040
+ it ? "calendar-availability-mode" : null,
1039
1041
  /* Composing: derived from the events themselves rather than a prop,
1040
1042
  so the dim can never disagree with what is on the grid. */
1041
- Lt ? "calendar-composing-mode" : null,
1043
+ Ft ? "calendar-composing-mode" : null,
1042
1044
  "ds:bg-background ds:text-foreground",
1043
- "ds:rounded-[var(--radius-md)]",
1044
- je
1045
- ].filter(Boolean).join(" "), Ft = Q || ee ? {
1045
+ /* The radius has to CLIP, not just round the box. FullCalendar draws the
1046
+ grid as a table with its own border, and that border squares off the
1047
+ four corners the radius rounds — so the surface read as a hard-edged
1048
+ frame sitting inside a soft one.
1049
+
1050
+ `clip`, not `hidden`: `hidden` makes this a scroll container, which
1051
+ breaks the grid's own sticky header row
1052
+ (`.fc-scrollgrid-section-sticky`). `clip` cuts the corners without
1053
+ creating one. */
1054
+ "ds:rounded-[var(--radius-md)] ds:overflow-clip",
1055
+ Ve
1056
+ ].filter(Boolean).join(" "), jt = Q || ee ? {
1046
1057
  ...Q ? { "--calendar-mode-bg": Q } : {},
1047
1058
  ...ee ? { "--calendar-mode-fg": ee } : {}
1048
- } : void 0, zt = Z !== "default" ? Ve ?? m(pr[Z]) : "", jt = [
1059
+ } : void 0, _t = Z !== "default" ? qe ?? m(hr[Z]) : "", Vt = [
1049
1060
  "ds:sticky ds:top-0 ds:z-10",
1050
1061
  "ds:flex ds:items-center ds:gap-[var(--spacing-sm)]",
1051
1062
  "ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]",
@@ -1055,7 +1066,7 @@ const Le = Be(
1055
1066
  doesn't supply a hex. */
1056
1067
  Q ? "ds:[background-color:var(--calendar-mode-bg)]" : "ds:bg-[var(--muted)]",
1057
1068
  ee ? "ds:[color:var(--calendar-mode-fg)]" : "ds:text-[var(--muted-foreground)]"
1058
- ].filter(Boolean).join(" "), _t = [
1069
+ ].filter(Boolean).join(" "), Ht = [
1059
1070
  "ds:inline-flex ds:items-center ds:justify-center",
1060
1071
  "ds:min-h-[var(--min-target-size)]",
1061
1072
  "ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]",
@@ -1074,7 +1085,7 @@ const Le = Be(
1074
1085
  "div",
1075
1086
  {
1076
1087
  ref: R,
1077
- className: Wt,
1088
+ className: zt,
1078
1089
  role: "region",
1079
1090
  "aria-label": m("calendar.ariaLabel"),
1080
1091
  "data-component": "calendar",
@@ -1084,127 +1095,129 @@ const Le = Be(
1084
1095
  /* @__PURE__ */ l(
1085
1096
  "div",
1086
1097
  {
1087
- ref: w,
1098
+ ref: C,
1088
1099
  "aria-live": "polite",
1089
1100
  "aria-atomic": "true",
1090
1101
  className: ["ds:sr-only", N].filter(Boolean).join(" ")
1091
1102
  }
1092
1103
  ),
1093
- He,
1104
+ $e,
1094
1105
  Z !== "default" ? /* @__PURE__ */ E(
1095
1106
  "div",
1096
1107
  {
1097
- className: jt,
1098
- style: Ft,
1108
+ className: Vt,
1109
+ style: jt,
1099
1110
  role: "status",
1100
1111
  children: [
1101
1112
  /* @__PURE__ */ l(
1102
1113
  "span",
1103
1114
  {
1104
1115
  className: ["ds:flex-1 ds:text-start", N].filter(Boolean).join(" "),
1105
- children: zt
1116
+ children: _t
1106
1117
  }
1107
1118
  ),
1108
- Te ? /* @__PURE__ */ l(
1119
+ De ? /* @__PURE__ */ l(
1109
1120
  "button",
1110
1121
  {
1111
1122
  type: "button",
1112
- onClick: Te,
1113
- className: _t,
1123
+ onClick: De,
1124
+ className: Ht,
1114
1125
  children: m("calendar.modeBanner.cancel")
1115
1126
  }
1116
1127
  ) : null
1117
1128
  ]
1118
1129
  }
1119
1130
  ) : null,
1120
- et !== !1 ? /* @__PURE__ */ l(
1131
+ rt !== !1 ? /* @__PURE__ */ l(
1121
1132
  be,
1122
1133
  {
1123
- title: dt,
1124
- onToday: Mt,
1125
- onPrev: Bt,
1126
- onNext: Ot,
1127
- end: tt,
1134
+ title: lt,
1135
+ onToday: Ot,
1136
+ onPrev: Lt,
1137
+ onNext: Wt,
1138
+ end: nt,
1128
1139
  maskClassName: N
1129
1140
  }
1130
1141
  ) : null,
1131
1142
  /* @__PURE__ */ l(
1132
- qt,
1143
+ Kt,
1133
1144
  {
1134
- ref: C,
1135
- plugins: Nt,
1136
- schedulerLicenseKey: Qe,
1137
- initialView: Pt,
1138
- views: fr,
1145
+ ref: w,
1146
+ plugins: Gt,
1147
+ schedulerLicenseKey: tt,
1148
+ initialView: Mt,
1149
+ views: vr,
1139
1150
  initialDate: f,
1140
1151
  locale: S,
1141
- direction: st,
1142
- firstDay: Et,
1152
+ direction: dt,
1153
+ firstDay: Pt,
1143
1154
  editable: J,
1144
- eventDurationEditable: J === !1 ? !1 : We ?? J,
1145
- selectable: Fe,
1155
+ eventDurationEditable: J === !1 ? !1 : ze ?? J,
1156
+ selectable: Te,
1157
+ selectMirror: je ?? Te,
1158
+ ...xe === void 0 ? {} : { unselectAuto: xe },
1146
1159
  droppable: J,
1147
- dayMaxEvents: Ze,
1148
- height: ze,
1160
+ dayMaxEvents: et,
1161
+ height: _e,
1149
1162
  expandRows: !0,
1150
- events: ut,
1151
- resources: Ne,
1163
+ events: ft,
1164
+ resources: Ge,
1152
1165
  resourceOrder: "sequenceNumber",
1153
- resourceLabelContent: Gt,
1154
- resourceAreaWidth: nt,
1155
- resourceAreaHeaderContent: gt,
1156
- dayCellClassNames: yt,
1157
- dayHeaderClassNames: Tt,
1158
- resourceLabelClassNames: bt,
1159
- dayHeaderDidMount: xt,
1166
+ resourceLabelContent: Bt,
1167
+ resourceAreaWidth: at,
1168
+ resourceAreaHeaderContent: bt,
1169
+ dayCellClassNames: Tt,
1170
+ dayHeaderClassNames: Dt,
1171
+ resourceLabelClassNames: xt,
1172
+ dayHeaderDidMount: wt,
1160
1173
  ...ue ? { slotLaneClassNames: ue } : {},
1161
1174
  eventClassNames: (e) => {
1162
1175
  var t;
1163
1176
  return [
1164
1177
  ...ue ?? [],
1165
- ...we && e.event.id === we ? ["calendar-event-selected"] : [],
1178
+ ...Ie && e.event.id === Ie ? ["calendar-event-selected"] : [],
1166
1179
  ...(t = e.event.extendedProps) != null && t.isDraft ? ["calendar-event-draft"] : []
1167
1180
  ];
1168
1181
  },
1169
1182
  headerToolbar: !1,
1170
1183
  allDayText: m("calendar.allDay"),
1171
1184
  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 } : {},
1185
+ titleFormat: pt,
1186
+ dayHeaderFormat: vt,
1187
+ dayHeaderContent: yt,
1188
+ eventTimeFormat: ht,
1189
+ slotLabelFormat: gt,
1190
+ slotMinTime: Ke ?? "00:00:00",
1191
+ slotMaxTime: Ue ?? "24:00:00",
1192
+ slotDuration: Ye ?? "00:30:00",
1193
+ ...Ce ? { snapDuration: Ce } : {},
1181
1194
  slotLabelInterval: "01:00:00",
1182
- ...Ee !== void 0 ? { defaultTimedEventDuration: Ee } : {},
1183
- hiddenDays: xe,
1195
+ ...Pe !== void 0 ? { defaultTimedEventDuration: Pe } : {},
1196
+ hiddenDays: we,
1184
1197
  datesAboveResources: oe,
1185
- slotEventOverlap: Ye,
1186
- stickyHeaderDates: Xe,
1187
- nowIndicator: Je,
1198
+ slotEventOverlap: Je,
1199
+ stickyHeaderDates: Ze,
1200
+ nowIndicator: Qe,
1188
1201
  eventLongPressDelay: re ? 0 : 1e3,
1189
1202
  eventDragMinDistance: re ? 0 : ve,
1190
1203
  eventContent: (e) => {
1191
1204
  var r;
1192
1205
  const t = e.event.extendedProps ?? {};
1193
1206
  return t.isInternal ? e.event.title ? /* @__PURE__ */ E("span", { className: "calendar-bg-event-label", children: [
1194
- /* @__PURE__ */ l(or, { size: 12, "aria-hidden": "true" }),
1207
+ /* @__PURE__ */ l(cr, { size: 12, "aria-hidden": "true" }),
1195
1208
  e.event.title
1196
1209
  ] }) : !0 : /* @__PURE__ */ l(
1197
- nr,
1210
+ ar,
1198
1211
  {
1199
1212
  eventId: e.event.id,
1200
1213
  title: y ? t.privacyModeTitle ?? "•••" : e.event.title,
1201
1214
  privacyMasked: y,
1202
1215
  suffix: t.suffix,
1203
- rangeText: yr(e, S),
1204
- showTime: Ue,
1216
+ rangeText: Tr(e, S),
1217
+ showTime: Xe,
1205
1218
  allDay: e.event.allDay,
1206
1219
  status: t.status,
1207
- colorStyle: _e,
1220
+ colorStyle: He,
1208
1221
  backgroundColor: t.backgroundColor,
1209
1222
  textColor: t.textColor,
1210
1223
  borderColor: t.borderColor,
@@ -1220,16 +1233,16 @@ const Le = Be(
1220
1233
  }
1221
1234
  );
1222
1235
  },
1223
- eventClick: wt,
1224
- eventMouseEnter: kt,
1225
- eventMouseLeave: It,
1226
- eventDrop: Dt,
1227
- eventResize: Ct,
1236
+ eventClick: It,
1237
+ eventMouseEnter: At,
1238
+ eventMouseLeave: Rt,
1239
+ eventDrop: Ct,
1240
+ eventResize: kt,
1228
1241
  eventDragStart: O,
1229
1242
  eventResizeStart: Y,
1230
- select: At,
1231
- dateClick: Rt,
1232
- datesSet: St,
1243
+ select: St,
1244
+ dateClick: Et,
1245
+ datesSet: Nt,
1233
1246
  ...X ? {
1234
1247
  navLinks: !0,
1235
1248
  navLinkDayClick: (e, t) => X(e, t)
@@ -1241,12 +1254,12 @@ const Le = Be(
1241
1254
  );
1242
1255
  }
1243
1256
  );
1244
- Le.displayName = "Calendar";
1245
- const xr = Le;
1246
- xr.Toolbar = be;
1257
+ Fe.displayName = "Calendar";
1258
+ const wr = Fe;
1259
+ wr.Toolbar = be;
1247
1260
  export {
1248
- xr as C,
1249
- dr as c,
1261
+ wr as C,
1262
+ lr as c,
1250
1263
  pe as r
1251
1264
  };
1252
- //# sourceMappingURL=calendar-BQPyUUPP.js.map
1265
+ //# sourceMappingURL=calendar-CI9MINcR.js.map