@alfadocs/ui-kit-debug 1.50.0 → 1.50.1
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/_chunks/{calendar-zpE9qTM4.js → calendar-E6Yu4lzC.js} +47 -44
- package/dist/_chunks/calendar-E6Yu4lzC.js.map +1 -0
- package/dist/_chunks/{calendar-event-card-DplPh1wv.js → calendar-event-card-DyFSIehr.js} +148 -145
- package/dist/_chunks/{calendar-event-card-DplPh1wv.js.map → calendar-event-card-DyFSIehr.js.map} +1 -1
- package/dist/_chunks/{calendar-workspace-CWRH4x15.js → calendar-workspace-DjbGFjg1.js} +2724 -2717
- package/dist/_chunks/{calendar-workspace-CWRH4x15.js.map → calendar-workspace-DjbGFjg1.js.map} +1 -1
- package/dist/agent-catalog.json +1 -1
- package/dist/components/calendar/calendar.d.ts +6 -0
- package/dist/components/calendar/calendar.d.ts.map +1 -1
- package/dist/components/calendar/index.js +1 -1
- package/dist/components/calendar-event-card/calendar-event-card.d.ts +6 -0
- package/dist/components/calendar-event-card/calendar-event-card.d.ts.map +1 -1
- package/dist/components/calendar-event-card/index.js +1 -1
- package/dist/index.js +3 -3
- package/dist/patterns/calendar/calendar.surface.d.ts.map +1 -1
- package/dist/patterns/calendar/index.js +1 -1
- package/package.json +1 -1
- package/dist/_chunks/calendar-zpE9qTM4.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as R, jsx as d } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as Ke, useRef as v, useEffect as h, useState as le, useMemo as u, useImperativeHandle as ar, useCallback as g } from "react";
|
|
3
3
|
import { useTranslation as De } from "react-i18next";
|
|
4
4
|
import { c as sr } from "./index-D2ZczOXr.js";
|
|
@@ -13,7 +13,7 @@ import pr from "@fullcalendar/timeline";
|
|
|
13
13
|
import vr from "@fullcalendar/interaction";
|
|
14
14
|
import { u as hr } from "./use-prefers-reduced-motion-BMwIQRjB.js";
|
|
15
15
|
import { u as gr } from "./registry-DvAUVLHh.js";
|
|
16
|
-
import { w as yr, C as br } from "./calendar-event-card-
|
|
16
|
+
import { w as yr, C as br } from "./calendar-event-card-DyFSIehr.js";
|
|
17
17
|
import { A as Tr } from "./avatar-BVvjKNTp.js";
|
|
18
18
|
import { B as xr } from "./button-18oBsI3n.js";
|
|
19
19
|
import { R as Dr } from "./resource-chip-DYTG0IQQ.js";
|
|
@@ -220,10 +220,10 @@ const de = {
|
|
|
220
220
|
day: "numeric",
|
|
221
221
|
month: "long",
|
|
222
222
|
year: "numeric"
|
|
223
|
-
},
|
|
223
|
+
}, Nr = [
|
|
224
224
|
{ weekday: "short", day: "numeric", month: "short" },
|
|
225
225
|
{ hour: "numeric", minute: "2-digit" }
|
|
226
|
-
],
|
|
226
|
+
], Rr = {
|
|
227
227
|
resourceTimeGridThreeDays: {
|
|
228
228
|
type: "resourceTimeGrid",
|
|
229
229
|
duration: { days: 3 }
|
|
@@ -242,12 +242,12 @@ const de = {
|
|
|
242
242
|
type: "timeline",
|
|
243
243
|
duration: { days: 3 }
|
|
244
244
|
},
|
|
245
|
-
timeline: { slotLabelFormat:
|
|
245
|
+
timeline: { slotLabelFormat: Nr },
|
|
246
246
|
timeGridDay: { titleFormat: de },
|
|
247
247
|
resourceTimeGridDay: { titleFormat: de },
|
|
248
248
|
timelineDay: { titleFormat: de },
|
|
249
249
|
resourceTimelineDay: { titleFormat: de }
|
|
250
|
-
}, Te = 5,
|
|
250
|
+
}, Te = 5, Er = {
|
|
251
251
|
create: "calendar.modeBanner.create",
|
|
252
252
|
move: "calendar.modeBanner.move",
|
|
253
253
|
copy: "calendar.modeBanner.copy"
|
|
@@ -368,8 +368,8 @@ const Ye = [
|
|
|
368
368
|
"ds:flex-1 ds:text-center ds:truncate type-title-card",
|
|
369
369
|
y
|
|
370
370
|
].filter(Boolean).join(" "), w = ["ds:flex-1 ds:text-center", y].filter(Boolean).join(" ");
|
|
371
|
-
return /* @__PURE__ */
|
|
372
|
-
/* @__PURE__ */
|
|
371
|
+
return /* @__PURE__ */ R("div", { ref: I, className: _, children: [
|
|
372
|
+
/* @__PURE__ */ R("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
373
373
|
/* @__PURE__ */ d(
|
|
374
374
|
"button",
|
|
375
375
|
{
|
|
@@ -450,11 +450,11 @@ const Xe = Ke(
|
|
|
450
450
|
onModeCancel: Ie,
|
|
451
451
|
alertBanner: it,
|
|
452
452
|
hiddenDays: Se,
|
|
453
|
-
loadingDates:
|
|
453
|
+
loadingDates: Ne,
|
|
454
454
|
slotMinTime: at,
|
|
455
455
|
slotMaxTime: st,
|
|
456
456
|
slotDuration: ot,
|
|
457
|
-
snapDuration:
|
|
457
|
+
snapDuration: Re,
|
|
458
458
|
showTime: dt = !0,
|
|
459
459
|
datesAboveResources: ce = !0,
|
|
460
460
|
slotEventOverlap: lt = !1,
|
|
@@ -466,7 +466,7 @@ const Xe = Ke(
|
|
|
466
466
|
toolbarEnd: vt,
|
|
467
467
|
resourceLayout: H = "vertical",
|
|
468
468
|
showResourceInitials: ue = !1,
|
|
469
|
-
resourceLabelVariant:
|
|
469
|
+
resourceLabelVariant: Ee = "text",
|
|
470
470
|
verticalResourceLabels: me = !1,
|
|
471
471
|
selectedEventId: Pe,
|
|
472
472
|
availabilityMode: ht = !1,
|
|
@@ -476,7 +476,7 @@ const Xe = Ke(
|
|
|
476
476
|
zebraRows: yt = !1,
|
|
477
477
|
maskClassName: B
|
|
478
478
|
}, bt) => {
|
|
479
|
-
const { t: m, i18n: M } = De(), C = v(null), S = v(null), A = v(null),
|
|
479
|
+
const { t: m, i18n: M } = De(), C = v(null), S = v(null), A = v(null), N = v(null), O = v(null), Le = v(null), ie = v({
|
|
480
480
|
id: 0,
|
|
481
481
|
x: 0,
|
|
482
482
|
y: 0
|
|
@@ -609,7 +609,7 @@ const Xe = Ke(
|
|
|
609
609
|
if (!r) return;
|
|
610
610
|
const i = `[data-event-id="${CSS.escape(t)}"]`, a = r.querySelector(i);
|
|
611
611
|
if (a) {
|
|
612
|
-
if (
|
|
612
|
+
if (N.current && (clearTimeout(N.current), N.current = null), O.current && O.current !== a && O.current.classList.remove("calendar-event-focused"), a.scrollIntoView({
|
|
613
613
|
behavior: ae ? "auto" : "smooth",
|
|
614
614
|
block: "center"
|
|
615
615
|
}), a.classList.add("calendar-event-focused"), O.current = a, A.current) {
|
|
@@ -618,8 +618,8 @@ const Xe = Ke(
|
|
|
618
618
|
title: p
|
|
619
619
|
});
|
|
620
620
|
}
|
|
621
|
-
|
|
622
|
-
a.classList.remove("calendar-event-focused"), O.current === a && (O.current = null),
|
|
621
|
+
N.current = setTimeout(() => {
|
|
622
|
+
a.classList.remove("calendar-event-focused"), O.current === a && (O.current = null), N.current = null;
|
|
623
623
|
}, 3e3);
|
|
624
624
|
}
|
|
625
625
|
}
|
|
@@ -627,7 +627,7 @@ const Xe = Ke(
|
|
|
627
627
|
}, [ae, b, m, H]);
|
|
628
628
|
ar(bt, () => fe, [fe]), gr(Cr, fe, n), h(
|
|
629
629
|
() => () => {
|
|
630
|
-
|
|
630
|
+
N.current && (clearTimeout(N.current), N.current = null);
|
|
631
631
|
},
|
|
632
632
|
[]
|
|
633
633
|
);
|
|
@@ -684,6 +684,7 @@ const Xe = Ke(
|
|
|
684
684
|
suffix: e.suffix,
|
|
685
685
|
shortTitle: e.shortTitle,
|
|
686
686
|
contextLabel: e.contextLabel,
|
|
687
|
+
contextName: e.contextName,
|
|
687
688
|
privacyModeTitle: e.privacyModeTitle,
|
|
688
689
|
isBookedOnline: e.isBookedOnline ?? !1,
|
|
689
690
|
hasUnassignedPatient: e.hasUnassignedPatient ?? !1,
|
|
@@ -719,7 +720,7 @@ const Xe = Ke(
|
|
|
719
720
|
minute: "2-digit"
|
|
720
721
|
}),
|
|
721
722
|
[]
|
|
722
|
-
),
|
|
723
|
+
), Nt = u(
|
|
723
724
|
() => ({
|
|
724
725
|
hour: "2-digit",
|
|
725
726
|
minute: "2-digit",
|
|
@@ -728,12 +729,12 @@ const Xe = Ke(
|
|
|
728
729
|
hour12: !1
|
|
729
730
|
}),
|
|
730
731
|
[]
|
|
731
|
-
),
|
|
732
|
-
() => new Set(
|
|
733
|
-
[
|
|
734
|
-
), pe = v(
|
|
735
|
-
pe.current =
|
|
736
|
-
const ve = v(!1),
|
|
732
|
+
), E = u(
|
|
733
|
+
() => new Set(Ne ?? []),
|
|
734
|
+
[Ne]
|
|
735
|
+
), pe = v(E);
|
|
736
|
+
pe.current = E;
|
|
737
|
+
const ve = v(!1), Rt = g(
|
|
737
738
|
(e) => {
|
|
738
739
|
const t = new Intl.DateTimeFormat(k, {
|
|
739
740
|
weekday: "short"
|
|
@@ -743,7 +744,7 @@ const Xe = Ke(
|
|
|
743
744
|
const r = new Intl.DateTimeFormat(k, {
|
|
744
745
|
day: "numeric"
|
|
745
746
|
}).format(e.date);
|
|
746
|
-
return /* @__PURE__ */
|
|
747
|
+
return /* @__PURE__ */ R("span", { className: "ds:flex ds:flex-col ds:items-center ds:gap-[var(--spacing-2xs)] ds:py-[var(--spacing-2xs)]", children: [
|
|
747
748
|
/* @__PURE__ */ d("span", { className: "type-eyebrow ds:text-[color:var(--muted-foreground)]", children: t }),
|
|
748
749
|
/* @__PURE__ */ d(
|
|
749
750
|
"span",
|
|
@@ -752,17 +753,17 @@ const Xe = Ke(
|
|
|
752
753
|
children: r
|
|
753
754
|
}
|
|
754
755
|
),
|
|
755
|
-
|
|
756
|
+
E.has(z(e.date)) ? /* @__PURE__ */ d(wr, { children: m("calendar.loadingDay") }) : null
|
|
756
757
|
] });
|
|
757
758
|
},
|
|
758
|
-
[k,
|
|
759
|
+
[k, E, m]
|
|
759
760
|
), Fe = u(
|
|
760
761
|
() => typeof $ == "number" ? { minutes: $ } : $,
|
|
761
762
|
[$]
|
|
762
763
|
), he = u(
|
|
763
764
|
() => B ? B.split(/\s+/).filter(Boolean) : void 0,
|
|
764
765
|
[B]
|
|
765
|
-
),
|
|
766
|
+
), Et = u(() => {
|
|
766
767
|
if (q !== void 0)
|
|
767
768
|
return q === "chairs" ? m("calendar.resourceLabel.chairs") : q === "operators" ? m("calendar.resourceLabel.operators") : q;
|
|
768
769
|
}, [q, m]), se = u(
|
|
@@ -772,7 +773,7 @@ const Xe = Ke(
|
|
|
772
773
|
W.current = se;
|
|
773
774
|
const ge = v(!1), Pt = g(
|
|
774
775
|
(e) => {
|
|
775
|
-
const t =
|
|
776
|
+
const t = E.has(z(e.date)) ? [Lr] : [], r = W.current;
|
|
776
777
|
if (!r.active || !e.view.type.startsWith("resourceTimeGrid"))
|
|
777
778
|
return t;
|
|
778
779
|
const i = e.resource;
|
|
@@ -780,7 +781,7 @@ const Xe = Ke(
|
|
|
780
781
|
`${i.id}:${z(e.date)}`
|
|
781
782
|
) ? [...t, xe] : t;
|
|
782
783
|
},
|
|
783
|
-
[
|
|
784
|
+
[E]
|
|
784
785
|
), Lt = g(
|
|
785
786
|
(e) => {
|
|
786
787
|
const t = W.current;
|
|
@@ -849,6 +850,7 @@ const Xe = Ke(
|
|
|
849
850
|
suffix: t.suffix,
|
|
850
851
|
shortTitle: t.shortTitle,
|
|
851
852
|
contextLabel: t.contextLabel,
|
|
853
|
+
contextName: t.contextName,
|
|
852
854
|
privacyModeTitle: t.privacyModeTitle,
|
|
853
855
|
isBookedOnline: t.isBookedOnline,
|
|
854
856
|
hasUnassignedPatient: t.hasUnassignedPatient,
|
|
@@ -1044,14 +1046,14 @@ const Xe = Ke(
|
|
|
1044
1046
|
"--resource-initials-text-color": a
|
|
1045
1047
|
} : {}
|
|
1046
1048
|
} : void 0;
|
|
1047
|
-
return
|
|
1049
|
+
return Ee === "chip" && !ue ? /* @__PURE__ */ d(
|
|
1048
1050
|
Dr,
|
|
1049
1051
|
{
|
|
1050
1052
|
label: r,
|
|
1051
1053
|
color: i,
|
|
1052
1054
|
orientation: me ? "vertical" : "horizontal"
|
|
1053
1055
|
}
|
|
1054
|
-
) : ue ? /* @__PURE__ */ d(je, { label: r, children: /* @__PURE__ */ d(Tr, { size: "sm", name: r, src: t.avatarSrc }) }) : i ? (i && a && yr(i, a, `resource ${e.resource.id}`), /* @__PURE__ */
|
|
1056
|
+
) : ue ? /* @__PURE__ */ d(je, { label: r, children: /* @__PURE__ */ d(Tr, { size: "sm", name: r, src: t.avatarSrc }) }) : i ? (i && a && yr(i, a, `resource ${e.resource.id}`), /* @__PURE__ */ R("span", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
1055
1057
|
/* @__PURE__ */ d(
|
|
1056
1058
|
"span",
|
|
1057
1059
|
{
|
|
@@ -1063,7 +1065,7 @@ const Xe = Ke(
|
|
|
1063
1065
|
/* @__PURE__ */ d("span", { className: "ds:truncate ds:text-start", children: r })
|
|
1064
1066
|
] })) : /* @__PURE__ */ d("span", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]", children: /* @__PURE__ */ d("span", { className: "ds:truncate ds:text-start", children: r }) });
|
|
1065
1067
|
},
|
|
1066
|
-
[ue,
|
|
1068
|
+
[ue, Ee, me]
|
|
1067
1069
|
), We = u(
|
|
1068
1070
|
() => o == null ? void 0 : o.map((e) => ({
|
|
1069
1071
|
id: e.id,
|
|
@@ -1087,7 +1089,7 @@ const Xe = Ke(
|
|
|
1087
1089
|
U();
|
|
1088
1090
|
const e = requestAnimationFrame(U);
|
|
1089
1091
|
return () => cancelAnimationFrame(e);
|
|
1090
|
-
}, [
|
|
1092
|
+
}, [E, F, U]);
|
|
1091
1093
|
const Yt = g(() => {
|
|
1092
1094
|
var e, t;
|
|
1093
1095
|
(t = (e = C.current) == null ? void 0 : e.getApi()) == null || t.today();
|
|
@@ -1122,7 +1124,7 @@ const Xe = Ke(
|
|
|
1122
1124
|
].filter(Boolean).join(" "), er = re || ne ? {
|
|
1123
1125
|
...re ? { "--calendar-mode-bg": re } : {},
|
|
1124
1126
|
...ne ? { "--calendar-mode-fg": ne } : {}
|
|
1125
|
-
} : void 0, tr = te !== "default" ? nt ?? m(
|
|
1127
|
+
} : void 0, tr = te !== "default" ? nt ?? m(Er[te]) : "", rr = [
|
|
1126
1128
|
"ds:sticky ds:top-0 ds:z-10",
|
|
1127
1129
|
"ds:flex ds:items-center ds:gap-[var(--spacing-sm)]",
|
|
1128
1130
|
"ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]",
|
|
@@ -1147,7 +1149,7 @@ const Xe = Ke(
|
|
|
1147
1149
|
"ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
|
|
1148
1150
|
"ds:motion-reduce:transition-none"
|
|
1149
1151
|
].join(" ");
|
|
1150
|
-
return /* @__PURE__ */
|
|
1152
|
+
return /* @__PURE__ */ R(
|
|
1151
1153
|
"div",
|
|
1152
1154
|
{
|
|
1153
1155
|
ref: S,
|
|
@@ -1168,7 +1170,7 @@ const Xe = Ke(
|
|
|
1168
1170
|
}
|
|
1169
1171
|
),
|
|
1170
1172
|
it,
|
|
1171
|
-
te !== "default" ? /* @__PURE__ */
|
|
1173
|
+
te !== "default" ? /* @__PURE__ */ R(
|
|
1172
1174
|
"div",
|
|
1173
1175
|
{
|
|
1174
1176
|
className: rr,
|
|
@@ -1213,7 +1215,7 @@ const Xe = Ke(
|
|
|
1213
1215
|
plugins: $t,
|
|
1214
1216
|
schedulerLicenseKey: ft,
|
|
1215
1217
|
initialView: Kt,
|
|
1216
|
-
views:
|
|
1218
|
+
views: Rr,
|
|
1217
1219
|
initialDate: f,
|
|
1218
1220
|
locale: k,
|
|
1219
1221
|
direction: Tt,
|
|
@@ -1232,7 +1234,7 @@ const Xe = Ke(
|
|
|
1232
1234
|
resourceOrder: "sequenceNumber",
|
|
1233
1235
|
resourceLabelContent: Ut,
|
|
1234
1236
|
resourceAreaWidth: gt,
|
|
1235
|
-
resourceAreaHeaderContent:
|
|
1237
|
+
resourceAreaHeaderContent: Et,
|
|
1236
1238
|
dayCellClassNames: Pt,
|
|
1237
1239
|
dayCellDidMount: Mt,
|
|
1238
1240
|
dayHeaderClassNames: Gt,
|
|
@@ -1252,13 +1254,13 @@ const Xe = Ke(
|
|
|
1252
1254
|
noEventsText: m("calendar.noEvents"),
|
|
1253
1255
|
titleFormat: kt,
|
|
1254
1256
|
dayHeaderFormat: It,
|
|
1255
|
-
dayHeaderContent:
|
|
1257
|
+
dayHeaderContent: Rt,
|
|
1256
1258
|
eventTimeFormat: St,
|
|
1257
|
-
slotLabelFormat:
|
|
1259
|
+
slotLabelFormat: Nt,
|
|
1258
1260
|
slotMinTime: at ?? "00:00:00",
|
|
1259
1261
|
slotMaxTime: st ?? "24:00:00",
|
|
1260
1262
|
slotDuration: ot ?? "00:30:00",
|
|
1261
|
-
...
|
|
1263
|
+
...Re ? { snapDuration: Re } : {},
|
|
1262
1264
|
slotLabelInterval: "01:00:00",
|
|
1263
1265
|
...Fe !== void 0 ? { defaultTimedEventDuration: Fe } : {},
|
|
1264
1266
|
hiddenDays: Se,
|
|
@@ -1294,7 +1296,7 @@ const Xe = Ke(
|
|
|
1294
1296
|
jsEvent: T.nativeEvent
|
|
1295
1297
|
});
|
|
1296
1298
|
},
|
|
1297
|
-
children: /* @__PURE__ */
|
|
1299
|
+
children: /* @__PURE__ */ R(
|
|
1298
1300
|
"span",
|
|
1299
1301
|
{
|
|
1300
1302
|
className: "calendar-bg-event-label",
|
|
@@ -1309,7 +1311,7 @@ const Xe = Ke(
|
|
|
1309
1311
|
);
|
|
1310
1312
|
return a ? /* @__PURE__ */ d(je, { label: a, children: p }) : p;
|
|
1311
1313
|
}
|
|
1312
|
-
return e.event.title ? /* @__PURE__ */
|
|
1314
|
+
return e.event.title ? /* @__PURE__ */ R("span", { className: "calendar-bg-event-label", children: [
|
|
1313
1315
|
/* @__PURE__ */ d(_e, { size: 12, "aria-hidden": "true" }),
|
|
1314
1316
|
e.event.title
|
|
1315
1317
|
] }) : !0;
|
|
@@ -1321,6 +1323,7 @@ const Xe = Ke(
|
|
|
1321
1323
|
title: b ? ((r = t.privacyModeTitle) == null ? void 0 : r.trim()) || "•••" : e.event.title,
|
|
1322
1324
|
shortTitle: b ? void 0 : t.shortTitle,
|
|
1323
1325
|
contextLabel: t.contextLabel,
|
|
1326
|
+
contextName: t.contextName,
|
|
1324
1327
|
startText: Mr(e.event.start, k),
|
|
1325
1328
|
layout: e.event.allDay || e.view.type.startsWith("dayGrid") ? "month" : e.view.type.startsWith("list") || e.view.type.toLowerCase().includes("timeline") ? "flow" : "grid",
|
|
1326
1329
|
privacyMasked: b,
|
|
@@ -1375,4 +1378,4 @@ export {
|
|
|
1375
1378
|
Cr as c,
|
|
1376
1379
|
be as r
|
|
1377
1380
|
};
|
|
1378
|
-
//# sourceMappingURL=calendar-
|
|
1381
|
+
//# sourceMappingURL=calendar-E6Yu4lzC.js.map
|