calendarkit-pro 1.1.0 → 1.2.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.
package/dist/index.js CHANGED
@@ -36,6 +36,8 @@ var React15__namespace = /*#__PURE__*/_interopNamespace(React15);
36
36
  function cn(...inputs) {
37
37
  return tailwindMerge.twMerge(clsx.clsx(inputs));
38
38
  }
39
+ var isEventDragDisabled = (event) => event?.draggable === false;
40
+ var isEventResizeDisabled = (event) => event?.resizable === false || event?.resizable === void 0 && isEventDragDisabled(event);
39
41
 
40
42
  // src/components/ui/button.tsx
41
43
  var buttonVariants = classVarianceAuthority.cva(
@@ -178,18 +180,30 @@ var getMonthGrid = (date, weekStartOn = 0) => {
178
180
  end: endDate
179
181
  });
180
182
  };
183
+ var uses24HourClock = (locale) => {
184
+ if (!locale) return false;
185
+ return !/[ap]\.?m/i.test(dateFns.format(new Date(2e3, 0, 1, 13, 0), "p", { locale }));
186
+ };
181
187
  var MiniCalendar = ({
182
188
  currentDate,
183
189
  onDateChange,
184
190
  onViewChange,
185
- className
191
+ className,
192
+ locale
186
193
  }) => {
187
194
  const [viewDate, setViewDate] = React15__namespace.default.useState(currentDate);
188
195
  React15__namespace.default.useEffect(() => {
189
196
  setViewDate(currentDate);
190
197
  }, [currentDate]);
191
- const days = React15__namespace.default.useMemo(() => getMonthGrid(viewDate), [viewDate]);
192
- const weekDays = ["S", "M", "T", "W", "T", "F", "S"];
198
+ const weekStartsOn = locale?.options?.weekStartsOn ?? 0;
199
+ const days = React15__namespace.default.useMemo(
200
+ () => getMonthGrid(viewDate, weekStartsOn),
201
+ [viewDate, weekStartsOn]
202
+ );
203
+ const weekDays = locale?.localize ? [0, 1, 2, 3, 4, 5, 6].map((d) => {
204
+ const dayIndex = (d + weekStartsOn) % 7;
205
+ return locale.localize.day(dayIndex, { width: "narrow" });
206
+ }) : ["S", "M", "T", "W", "T", "F", "S"];
193
207
  const handlePrev = () => {
194
208
  const newDate = dateFns.subMonths(viewDate, 1);
195
209
  setViewDate(newDate);
@@ -206,7 +220,7 @@ var MiniCalendar = ({
206
220
  onDateChange(day);
207
221
  if (onViewChange) onViewChange("day");
208
222
  };
209
- return /* @__PURE__ */ React15__namespace.default.createElement("div", { className: cn("px-4 w-[260px]", className) }, /* @__PURE__ */ React15__namespace.default.createElement("div", { className: "flex items-center justify-between mb-4" }, /* @__PURE__ */ React15__namespace.default.createElement("span", { className: "text-sm font-semibold text-foreground capitalize" }, dateFns.format(viewDate, "MMMM yyyy")), /* @__PURE__ */ React15__namespace.default.createElement("div", { className: "flex items-center bg-muted/40 rounded-lg p-0.5" }, /* @__PURE__ */ React15__namespace.default.createElement(
223
+ return /* @__PURE__ */ React15__namespace.default.createElement("div", { className: cn("px-4 w-[260px]", className) }, /* @__PURE__ */ React15__namespace.default.createElement("div", { className: "flex items-center justify-between mb-4" }, /* @__PURE__ */ React15__namespace.default.createElement("span", { className: "text-sm font-semibold text-foreground capitalize" }, dateFns.format(viewDate, "MMMM yyyy", { locale })), /* @__PURE__ */ React15__namespace.default.createElement("div", { className: "flex items-center bg-muted/40 rounded-lg p-0.5" }, /* @__PURE__ */ React15__namespace.default.createElement(
210
224
  Button,
211
225
  {
212
226
  variant: "ghost",
@@ -258,7 +272,8 @@ var Sidebar = ({
258
272
  readOnly,
259
273
  calendars,
260
274
  onCalendarToggle,
261
- translations
275
+ translations,
276
+ locale
262
277
  }) => {
263
278
  const [calendarsOpen, setCalendarsOpen] = React15.useState(true);
264
279
  const [timezoneOpen, setTimezoneOpen] = React15.useState(false);
@@ -285,7 +300,7 @@ var Sidebar = ({
285
300
  }
286
301
  };
287
302
  const timezones = [
288
- { value: "", label: "Local Time", acronym: "LOC" },
303
+ { value: "", label: translations?.localTime || "Local Time", acronym: "LOC" },
289
304
  { value: "UTC", label: "UTC", acronym: "UTC" },
290
305
  { value: "America/New_York", label: "New York", acronym: "EST" },
291
306
  { value: "America/Chicago", label: "Chicago", acronym: "CST" },
@@ -335,7 +350,7 @@ var Sidebar = ({
335
350
  },
336
351
  /* @__PURE__ */ React15__namespace.default.createElement(lucideReact.Plus, { className: "w-5 h-5" }),
337
352
  /* @__PURE__ */ React15__namespace.default.createElement("span", { className: "text-sm" }, translations?.create || "Create")
338
- )), /* @__PURE__ */ React15__namespace.default.createElement(MiniCalendar, { currentDate, onDateChange, onViewChange }), /* @__PURE__ */ React15__namespace.default.createElement("div", { className: "flex-1 px-4 space-y-5 mt-5" }, /* @__PURE__ */ React15__namespace.default.createElement("div", { className: "bg-muted/20 rounded-2xl p-3 border-[0px] border-border/30" }, /* @__PURE__ */ React15__namespace.default.createElement(
353
+ )), /* @__PURE__ */ React15__namespace.default.createElement(MiniCalendar, { currentDate, onDateChange, onViewChange, locale }), /* @__PURE__ */ React15__namespace.default.createElement("div", { className: "flex-1 px-4 space-y-5 mt-5" }, /* @__PURE__ */ React15__namespace.default.createElement("div", { className: "bg-muted/20 rounded-2xl p-3 border-[0px] border-border/30" }, /* @__PURE__ */ React15__namespace.default.createElement(
339
354
  "div",
340
355
  {
341
356
  className: "flex items-center justify-between cursor-pointer hover:bg-accent/50 p-2 -m-1 rounded-xl mb-2 transition-all duration-200",
@@ -405,9 +420,11 @@ var Sidebar = ({
405
420
  ))))))));
406
421
  };
407
422
  var DraggableEvent = ({ event, children, className, style: propStyle, ...props }) => {
423
+ const dragDisabled = isEventDragDisabled(event);
408
424
  const { attributes, listeners, setNodeRef, transform, isDragging } = core.useDraggable({
409
425
  id: event.id,
410
- data: { event }
426
+ data: { event },
427
+ disabled: dragDisabled
411
428
  });
412
429
  const style = {
413
430
  ...propStyle,
@@ -429,7 +446,7 @@ var DraggableEvent = ({ event, children, className, style: propStyle, ...props }
429
446
  ...listeners,
430
447
  ...attributes,
431
448
  ...props,
432
- className: cn("touch-none", className)
449
+ className: cn(!dragDisabled && "touch-none", className)
433
450
  },
434
451
  children
435
452
  );
@@ -488,12 +505,16 @@ var MonthView = ({
488
505
  timezone,
489
506
  locale
490
507
  }) => {
491
- const days = React15.useMemo(() => getMonthGrid(currentDate), [currentDate]);
508
+ const weekStartsOn = locale?.options?.weekStartsOn ?? 1;
509
+ const days = React15.useMemo(
510
+ () => getMonthGrid(currentDate, weekStartsOn),
511
+ [currentDate, weekStartsOn]
512
+ );
492
513
  const weekDays = React15.useMemo(() => {
493
- const start = dateFns.startOfWeek(currentDate, { weekStartsOn: 1 });
494
- const end = dateFns.endOfWeek(currentDate, { weekStartsOn: 1 });
514
+ const start = dateFns.startOfWeek(currentDate, { weekStartsOn });
515
+ const end = dateFns.endOfWeek(currentDate, { weekStartsOn });
495
516
  return dateFns.eachDayOfInterval({ start, end });
496
- }, [currentDate]);
517
+ }, [currentDate, weekStartsOn]);
497
518
  const getZonedDate = React15.useCallback((date) => {
498
519
  return timezone ? dateFnsTz.toZonedTime(date, timezone) : date;
499
520
  }, [timezone]);
@@ -552,11 +573,13 @@ var ResizableEvent = ({
552
573
  style,
553
574
  readonly
554
575
  }) => {
576
+ const resizeLocked = readonly || isEventResizeDisabled(event);
555
577
  const [isResizing, setIsResizing] = React15.useState(false);
556
578
  const [resizeHeight, setResizeHeight] = React15.useState(null);
557
579
  const containerRef = React15.useRef(null);
558
580
  const startYRef = React15.useRef(0);
559
581
  const startHeightRef = React15.useRef(0);
582
+ const resizeHeightRef = React15.useRef(null);
560
583
  const handleResizeStart = React15.useCallback((e) => {
561
584
  e.preventDefault();
562
585
  e.stopPropagation();
@@ -574,13 +597,15 @@ var ResizableEvent = ({
574
597
  // Minimum height based on minDuration
575
598
  startHeightRef.current + snappedDelta
576
599
  );
600
+ resizeHeightRef.current = newHeight;
577
601
  setResizeHeight(newHeight);
578
602
  };
579
603
  const handleEnd = () => {
580
604
  setIsResizing(false);
581
- if (resizeHeight !== null && containerRef.current && onResize) {
605
+ const finalHeight = resizeHeightRef.current;
606
+ if (finalHeight !== null && containerRef.current && onResize) {
582
607
  const originalHeight = startHeightRef.current;
583
- const heightDiff = (resizeHeight || originalHeight) - originalHeight;
608
+ const heightDiff = finalHeight - originalHeight;
584
609
  const minutesDiff = heightDiff / hourHeight * 60;
585
610
  const newEnd = new Date(event.end);
586
611
  newEnd.setMinutes(newEnd.getMinutes() + minutesDiff);
@@ -588,6 +613,7 @@ var ResizableEvent = ({
588
613
  onResize(event, newEnd);
589
614
  }
590
615
  }
616
+ resizeHeightRef.current = null;
591
617
  setResizeHeight(null);
592
618
  document.removeEventListener("mousemove", handleMove);
593
619
  document.removeEventListener("mouseup", handleEnd);
@@ -598,7 +624,10 @@ var ResizableEvent = ({
598
624
  document.addEventListener("mouseup", handleEnd);
599
625
  document.addEventListener("touchmove", handleMove, { passive: false });
600
626
  document.addEventListener("touchend", handleEnd);
601
- }, [event, hourHeight, minDuration, onResize, resizeHeight]);
627
+ }, [event, hourHeight, minDuration, onResize]);
628
+ const handlePointerDown = React15.useCallback((e) => {
629
+ e.stopPropagation();
630
+ }, []);
602
631
  return /* @__PURE__ */ React15__namespace.default.createElement(
603
632
  "div",
604
633
  {
@@ -614,13 +643,14 @@ var ResizableEvent = ({
614
643
  "div",
615
644
  {
616
645
  className: cn(
617
- readonly ? "cursor-default" : "cursor-ns-resize group-hover:opacity-100",
646
+ resizeLocked ? "cursor-default" : "cursor-ns-resize group-hover:opacity-100",
618
647
  "absolute bottom-0 left-0 right-0 h-3 z-20 flex items-center justify-center",
619
648
  "opacity-0 transition-opacity",
620
649
  isResizing && "opacity-100"
621
650
  ),
622
- onMouseDown: readonly ? void 0 : handleResizeStart,
623
- onTouchStart: readonly ? void 0 : handleResizeStart
651
+ onPointerDown: resizeLocked ? void 0 : handlePointerDown,
652
+ onMouseDown: resizeLocked ? void 0 : handleResizeStart,
653
+ onTouchStart: resizeLocked ? void 0 : handleResizeStart
624
654
  },
625
655
  /* @__PURE__ */ React15__namespace.default.createElement("div", { className: cn(
626
656
  "w-8 h-1 rounded-full transition-all",
@@ -642,8 +672,9 @@ var WeekView = ({
642
672
  locale,
643
673
  readonly
644
674
  }) => {
645
- const start = dateFns.startOfWeek(currentDate, { weekStartsOn: 1 });
646
- const end = dateFns.endOfWeek(currentDate, { weekStartsOn: 1 });
675
+ const weekStartsOn = locale?.options?.weekStartsOn ?? 1;
676
+ const start = dateFns.startOfWeek(currentDate, { weekStartsOn });
677
+ const end = dateFns.endOfWeek(currentDate, { weekStartsOn });
647
678
  const weekDays = dateFns.eachDayOfInterval({ start, end });
648
679
  const hours = Array.from({ length: 24 }, (_, i) => i);
649
680
  const hourHeight = 60;
@@ -690,15 +721,15 @@ var WeekView = ({
690
721
  }
691
722
  return /* @__PURE__ */ React15__namespace.default.createElement("div", { className: "flex flex-col items-center justify-center leading-tight" }, /* @__PURE__ */ React15__namespace.default.createElement("span", null, displayTime), /* @__PURE__ */ React15__namespace.default.createElement("span", { className: "text-[10px] opacity-75" }, "(", acronym, ")"));
692
723
  };
693
- const timeFormat = locale?.code === "fr" ? "H:mm" : "h a";
694
- const eventTimeFormat = locale?.code === "fr" ? "H:mm" : "h:mm a";
695
- const nowFormat = locale?.code === "fr" ? "H:mm" : "h:mm";
724
+ const is24h = uses24HourClock(locale);
725
+ const timeFormat = is24h ? "H:mm" : "h a";
726
+ const eventTimeFormat = is24h ? "H:mm" : "h:mm a";
727
+ const nowFormat = is24h ? "H:mm" : "h:mm";
696
728
  return /* @__PURE__ */ React15__namespace.default.createElement("div", { className: "flex flex-col h-full bg-background border-[0.5px] border-border/50 rounded-2xl overflow-hidden min-w-[800px] md:min-w-0 shadow-sm" }, /* @__PURE__ */ React15__namespace.default.createElement(
697
729
  "div",
698
730
  {
699
731
  ref: scrollContainerRef,
700
- className: "flex-1 overflow-y-auto scrollbar-hide relative bg-background scroll-smooth",
701
- style: { scrollbarGutter: "stable" }
732
+ className: "flex-1 overflow-y-auto scrollbar-hide relative bg-background scroll-smooth"
702
733
  },
703
734
  /* @__PURE__ */ React15__namespace.default.createElement("div", { className: "flex border-b-[0.5px] border-border/50 bg-gradient-to-r from-muted/20 via-background to-muted/20 z-20 sticky top-0 backdrop-blur-sm" }, /* @__PURE__ */ React15__namespace.default.createElement("div", { className: "flex-none p-3 text-center text-xs font-semibold text-muted-foreground w-16 flex items-center justify-center border-r-[0.5px] border-border/30 bg-muted/10" }, getTimezoneDisplay(timezone)), /* @__PURE__ */ React15__namespace.default.createElement("div", { className: "flex-1 grid grid-cols-7" }, weekDays.map((day, index) => /* @__PURE__ */ React15__namespace.default.createElement("div", { key: day.toISOString(), className: cn("py-3 px-2 text-center", index > 0 && "border-l-[0.5px] border-border/30") }, /* @__PURE__ */ React15__namespace.default.createElement("div", { className: "text-[10px] font-semibold text-muted-foreground uppercase tracking-wider mb-1.5" }, dateFns.format(day, "EEE", { locale })), /* @__PURE__ */ React15__namespace.default.createElement("div", { className: cn(
704
735
  "w-9 h-9 flex items-center justify-center rounded-xl mx-auto text-sm font-semibold transition-all duration-200",
@@ -813,7 +844,7 @@ var WeekView = ({
813
844
  className: cn(
814
845
  "rounded-md border shadow-sm transition-all hover:shadow-md group overflow-hidden relative",
815
846
  "glass",
816
- readonly ? "cursor-default" : "cursor-grab active:cursor-grabbing",
847
+ readonly || isEventDragDisabled(event) ? "cursor-default" : "cursor-grab active:cursor-grabbing",
817
848
  !event.color && "border-primary/20 bg-primary/10",
818
849
  isShortEvent ? "px-1 flex items-center justify-center" : "p-2",
819
850
  // Add active border for overlapped events to distinguish them
@@ -900,9 +931,10 @@ var DayView = ({
900
931
  const zonedStart = getZonedDate(e.start);
901
932
  return dateFns.isSameDay(zonedStart, currentDate);
902
933
  });
903
- const timeFormat = locale?.code === "fr" ? "H:mm" : "h a";
904
- const eventTimeFormat = locale?.code === "fr" ? "H:mm" : "h:mm a";
905
- const nowFormat = locale?.code === "fr" ? "H:mm" : "h:mm a";
934
+ const is24h = uses24HourClock(locale);
935
+ const timeFormat = is24h ? "H:mm" : "h a";
936
+ const eventTimeFormat = is24h ? "H:mm" : "h:mm a";
937
+ const nowFormat = is24h ? "H:mm" : "h:mm a";
906
938
  return /* @__PURE__ */ React15__namespace.default.createElement("div", { className: "flex flex-col h-full bg-background border-[0.5px] border-border/50 rounded-2xl overflow-hidden shadow-sm" }, /* @__PURE__ */ React15__namespace.default.createElement("div", { className: "px-6 py-4 border-b-[0.5px] border-border/50 bg-gradient-to-r from-muted/20 via-background to-muted/20 text-center shrink-0" }, /* @__PURE__ */ React15__namespace.default.createElement("div", { className: "flex items-center justify-center gap-3" }, /* @__PURE__ */ React15__namespace.default.createElement("h2", { className: "text-xl font-semibold capitalize text-foreground" }, dateFns.format(currentDate, "EEEE, MMMM d, yyyy", { locale })), dateFns.isToday(currentDate) && /* @__PURE__ */ React15__namespace.default.createElement("span", { className: "text-xs font-semibold bg-primary text-primary-foreground px-3 py-1 rounded-full shadow-md shadow-primary/20" }, "Today"))), /* @__PURE__ */ React15__namespace.default.createElement("div", { ref: scrollContainerRef, className: "flex-1 overflow-y-auto relative" }, /* @__PURE__ */ React15__namespace.default.createElement("div", { className: "flex relative", style: { height: hours.length * hourHeight } }, /* @__PURE__ */ React15__namespace.default.createElement("div", { className: "w-20 bg-muted/5 border-r-[0.5px] border-border/30 relative" }, hours.map((hour) => /* @__PURE__ */ React15__namespace.default.createElement(
907
939
  "div",
908
940
  {
@@ -1007,7 +1039,7 @@ var DayView = ({
1007
1039
  className: cn(
1008
1040
  "h-full rounded-lg border-[0.5px] shadow-sm overflow-hidden transition-all hover:shadow-lg hover:z-20 group",
1009
1041
  "glass backdrop-blur-sm",
1010
- readonly ? "cursor-default" : "cursor-grab active:cursor-grabbing",
1042
+ readonly || isEventDragDisabled(event) ? "cursor-default" : "cursor-grab active:cursor-grabbing",
1011
1043
  !event.color && "bg-primary/10 border-primary/20",
1012
1044
  isShortEvent ? "px-2 flex items-center" : "px-3 py-2",
1013
1045
  count > 1 && "border-l-4"
@@ -1044,7 +1076,7 @@ var DayView = ({
1044
1076
  /* @__PURE__ */ React15__namespace.default.createElement("div", { className: "absolute -left-1.5 w-3 h-3 bg-primary rounded-full shadow-lg shadow-primary/40 ring-2 ring-background animate-pulse" })
1045
1077
  )))));
1046
1078
  };
1047
- var AgendaEmptyState = ({ onCreateEvent, translations }) => /* @__PURE__ */ React15__namespace.default.createElement("div", { className: "flex flex-col items-center justify-center h-full min-h-[400px] py-12" }, /* @__PURE__ */ React15__namespace.default.createElement("div", { className: "relative mb-8" }, /* @__PURE__ */ React15__namespace.default.createElement("div", { className: "p-8 bg-gradient-to-br from-green-50 to-blue-50 dark:from-green-900/10 dark:to-blue-900/10 rounded-3xl border border-border/30" }, /* @__PURE__ */ React15__namespace.default.createElement("div", { className: "flex items-center gap-4" }, /* @__PURE__ */ React15__namespace.default.createElement("div", { className: "w-12 h-12 rounded-2xl bg-green-100 dark:bg-green-900/30 flex items-center justify-center" }, /* @__PURE__ */ React15__namespace.default.createElement("svg", { className: "w-6 h-6 text-green-600 dark:text-green-400", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2 }, /* @__PURE__ */ React15__namespace.default.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M5 13l4 4L19 7" }))), /* @__PURE__ */ React15__namespace.default.createElement("div", { className: "text-left" }, /* @__PURE__ */ React15__namespace.default.createElement("div", { className: "font-medium text-foreground" }, "All caught up!"), /* @__PURE__ */ React15__namespace.default.createElement("div", { className: "text-sm text-muted-foreground" }, "No events scheduled"))))), /* @__PURE__ */ React15__namespace.default.createElement("div", { className: "text-center max-w-sm" }, /* @__PURE__ */ React15__namespace.default.createElement("h3", { className: "text-lg font-semibold text-foreground mb-2" }, translations?.noUpcoming || "Your schedule is clear"), /* @__PURE__ */ React15__namespace.default.createElement("p", { className: "text-sm text-muted-foreground mb-6" }, "No upcoming events to show. Create a new event to start planning."), onCreateEvent && /* @__PURE__ */ React15__namespace.default.createElement(
1079
+ var AgendaEmptyState = ({ onCreateEvent, translations }) => /* @__PURE__ */ React15__namespace.default.createElement("div", { className: "flex flex-col items-center justify-center h-full min-h-[400px] py-12" }, /* @__PURE__ */ React15__namespace.default.createElement("div", { className: "relative mb-8" }, /* @__PURE__ */ React15__namespace.default.createElement("div", { className: "p-8 bg-gradient-to-br from-green-50 to-blue-50 dark:from-green-900/10 dark:to-blue-900/10 rounded-3xl border border-border/30" }, /* @__PURE__ */ React15__namespace.default.createElement("div", { className: "flex items-center gap-4" }, /* @__PURE__ */ React15__namespace.default.createElement("div", { className: "w-12 h-12 rounded-2xl bg-green-100 dark:bg-green-900/30 flex items-center justify-center" }, /* @__PURE__ */ React15__namespace.default.createElement("svg", { className: "w-6 h-6 text-green-600 dark:text-green-400", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2 }, /* @__PURE__ */ React15__namespace.default.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M5 13l4 4L19 7" }))), /* @__PURE__ */ React15__namespace.default.createElement("div", { className: "text-left" }, /* @__PURE__ */ React15__namespace.default.createElement("div", { className: "font-medium text-foreground" }, translations?.allCaughtUp || "All caught up!"), /* @__PURE__ */ React15__namespace.default.createElement("div", { className: "text-sm text-muted-foreground" }, translations?.noEventsScheduled || "No events scheduled"))))), /* @__PURE__ */ React15__namespace.default.createElement("div", { className: "text-center max-w-sm" }, /* @__PURE__ */ React15__namespace.default.createElement("h3", { className: "text-lg font-semibold text-foreground mb-2" }, translations?.noUpcoming || "Your schedule is clear"), /* @__PURE__ */ React15__namespace.default.createElement("p", { className: "text-sm text-muted-foreground mb-6" }, translations?.noUpcomingHint || "No upcoming events to show. Create a new event to start planning."), onCreateEvent && /* @__PURE__ */ React15__namespace.default.createElement(
1048
1080
  "button",
1049
1081
  {
1050
1082
  onClick: onCreateEvent,
@@ -1061,17 +1093,22 @@ var formatDuration = (start, end) => {
1061
1093
  if (remainingMinutes === 0) return `${hours}h`;
1062
1094
  return `${hours}h ${remainingMinutes}m`;
1063
1095
  };
1064
- var getDateLabel = (date) => {
1065
- if (dateFns.isToday(date)) return "Today";
1066
- if (dateFns.isTomorrow(date)) return "Tomorrow";
1067
- return dateFns.format(date, "EEEE");
1096
+ var getDateLabel = (date, locale, translations) => {
1097
+ if (dateFns.isToday(date)) return translations?.today || "Today";
1098
+ if (dateFns.isTomorrow(date)) return translations?.tomorrow || "Tomorrow";
1099
+ return dateFns.format(date, "EEEE", { locale });
1068
1100
  };
1069
1101
  var AgendaView = ({
1070
1102
  currentDate,
1071
1103
  events,
1072
1104
  onEventClick,
1073
- onCreateEvent
1105
+ onCreateEvent,
1106
+ locale,
1107
+ translations
1074
1108
  }) => {
1109
+ const is24h = uses24HourClock(locale);
1110
+ const timePattern = is24h ? "H:mm" : "h:mm a";
1111
+ const compactTimePattern = is24h ? "H:mm" : "h:mm";
1075
1112
  const groupedEvents = React15.useMemo(() => {
1076
1113
  const startDate = dateFns.startOfDay(currentDate);
1077
1114
  const groups = [];
@@ -1098,7 +1135,7 @@ var AgendaView = ({
1098
1135
  hidden: { opacity: 0, x: -20 },
1099
1136
  show: { opacity: 1, x: 0 }
1100
1137
  };
1101
- return /* @__PURE__ */ React15__namespace.default.createElement("div", { className: "flex flex-col h-full bg-background overflow-y-auto" }, groupedEvents.length === 0 ? /* @__PURE__ */ React15__namespace.default.createElement(AgendaEmptyState, { onCreateEvent }) : /* @__PURE__ */ React15__namespace.default.createElement(
1138
+ return /* @__PURE__ */ React15__namespace.default.createElement("div", { className: "flex flex-col h-full bg-background overflow-y-auto" }, groupedEvents.length === 0 ? /* @__PURE__ */ React15__namespace.default.createElement(AgendaEmptyState, { onCreateEvent, translations }) : /* @__PURE__ */ React15__namespace.default.createElement(
1102
1139
  framerMotion.motion.div,
1103
1140
  {
1104
1141
  className: "max-w-3xl mx-auto w-full pb-10 px-4 md:px-6",
@@ -1116,10 +1153,10 @@ var AgendaView = ({
1116
1153
  /* @__PURE__ */ React15__namespace.default.createElement("div", { className: "sticky top-0 bg-background/95 backdrop-blur-md py-4 z-10 border-b border-border/50" }, /* @__PURE__ */ React15__namespace.default.createElement("div", { className: "flex items-center gap-4" }, /* @__PURE__ */ React15__namespace.default.createElement("div", { className: cn(
1117
1154
  "flex flex-col items-center justify-center w-16 h-16 rounded-2xl transition-all",
1118
1155
  dateFns.isToday(group.date) ? "bg-primary text-primary-foreground shadow-lg shadow-primary/30" : "bg-muted/50 text-foreground"
1119
- ) }, /* @__PURE__ */ React15__namespace.default.createElement("span", { className: "text-2xl font-bold leading-none" }, dateFns.format(group.date, "d")), /* @__PURE__ */ React15__namespace.default.createElement("span", { className: "text-xs font-medium uppercase tracking-wide opacity-80" }, dateFns.format(group.date, "MMM"))), /* @__PURE__ */ React15__namespace.default.createElement("div", { className: "flex flex-col" }, /* @__PURE__ */ React15__namespace.default.createElement("span", { className: cn(
1156
+ ) }, /* @__PURE__ */ React15__namespace.default.createElement("span", { className: "text-2xl font-bold leading-none" }, dateFns.format(group.date, "d")), /* @__PURE__ */ React15__namespace.default.createElement("span", { className: "text-xs font-medium uppercase tracking-wide opacity-80" }, dateFns.format(group.date, "MMM", { locale }))), /* @__PURE__ */ React15__namespace.default.createElement("div", { className: "flex flex-col" }, /* @__PURE__ */ React15__namespace.default.createElement("span", { className: cn(
1120
1157
  "text-lg font-semibold",
1121
1158
  dateFns.isToday(group.date) && "text-primary"
1122
- ) }, getDateLabel(group.date)), /* @__PURE__ */ React15__namespace.default.createElement("span", { className: "text-sm text-muted-foreground" }, group.events.length, " event", group.events.length !== 1 ? "s" : "")))),
1159
+ ) }, getDateLabel(group.date, locale, translations)), /* @__PURE__ */ React15__namespace.default.createElement("span", { className: "text-sm text-muted-foreground" }, group.events.length, " ", group.events.length !== 1 ? translations?.eventPlural || "events" : translations?.eventSingular || "event")))),
1123
1160
  /* @__PURE__ */ React15__namespace.default.createElement("div", { className: "py-4 space-y-3" }, group.events.map((event, eventIndex) => /* @__PURE__ */ React15__namespace.default.createElement(
1124
1161
  framerMotion.motion.div,
1125
1162
  {
@@ -1141,14 +1178,14 @@ var AgendaView = ({
1141
1178
  style: { backgroundColor: event.color || "var(--primary)" }
1142
1179
  }
1143
1180
  ),
1144
- /* @__PURE__ */ React15__namespace.default.createElement("div", { className: "flex flex-col items-center min-w-[70px] pl-2" }, event.allDay ? /* @__PURE__ */ React15__namespace.default.createElement("div", { className: "flex flex-col items-center" }, /* @__PURE__ */ React15__namespace.default.createElement("span", { className: "text-xs font-semibold text-muted-foreground bg-muted/80 px-2.5 py-1 rounded-full" }, "All Day")) : /* @__PURE__ */ React15__namespace.default.createElement("div", { className: "flex flex-col items-center" }, /* @__PURE__ */ React15__namespace.default.createElement("span", { className: "text-base font-semibold text-foreground" }, dateFns.format(event.start, "h:mm")), /* @__PURE__ */ React15__namespace.default.createElement("span", { className: "text-xs text-muted-foreground uppercase" }, dateFns.format(event.start, "a")), /* @__PURE__ */ React15__namespace.default.createElement("div", { className: "w-px h-3 bg-border my-1" }), /* @__PURE__ */ React15__namespace.default.createElement("span", { className: "text-xs text-muted-foreground/70 font-medium" }, formatDuration(event.start, event.end)))),
1181
+ /* @__PURE__ */ React15__namespace.default.createElement("div", { className: "flex flex-col items-center min-w-[70px] pl-2" }, event.allDay ? /* @__PURE__ */ React15__namespace.default.createElement("div", { className: "flex flex-col items-center" }, /* @__PURE__ */ React15__namespace.default.createElement("span", { className: "text-xs font-semibold text-muted-foreground bg-muted/80 px-2.5 py-1 rounded-full" }, translations?.allDay || "All Day")) : /* @__PURE__ */ React15__namespace.default.createElement("div", { className: "flex flex-col items-center" }, /* @__PURE__ */ React15__namespace.default.createElement("span", { className: "text-base font-semibold text-foreground" }, dateFns.format(event.start, compactTimePattern, { locale })), !is24h && /* @__PURE__ */ React15__namespace.default.createElement("span", { className: "text-xs text-muted-foreground uppercase" }, dateFns.format(event.start, "a")), /* @__PURE__ */ React15__namespace.default.createElement("div", { className: "w-px h-3 bg-border my-1" }), /* @__PURE__ */ React15__namespace.default.createElement("span", { className: "text-xs text-muted-foreground/70 font-medium" }, formatDuration(event.start, event.end)))),
1145
1182
  /* @__PURE__ */ React15__namespace.default.createElement("div", { className: "flex-1 min-w-0 space-y-2" }, /* @__PURE__ */ React15__namespace.default.createElement("div", { className: "flex items-start justify-between gap-2" }, /* @__PURE__ */ React15__namespace.default.createElement("h4", { className: "text-base font-semibold text-foreground group-hover:text-primary transition-colors line-clamp-1" }, event.title), /* @__PURE__ */ React15__namespace.default.createElement(
1146
1183
  "div",
1147
1184
  {
1148
1185
  className: "w-3 h-3 rounded-full shrink-0 mt-1.5",
1149
1186
  style: { backgroundColor: event.color || "var(--primary)" }
1150
1187
  }
1151
- )), event.description && /* @__PURE__ */ React15__namespace.default.createElement("p", { className: "text-sm text-muted-foreground line-clamp-2 leading-relaxed" }, event.description), /* @__PURE__ */ React15__namespace.default.createElement("div", { className: "flex flex-wrap items-center gap-3 pt-1" }, !event.allDay && /* @__PURE__ */ React15__namespace.default.createElement("div", { className: "flex items-center gap-1.5 text-xs text-muted-foreground" }, /* @__PURE__ */ React15__namespace.default.createElement(lucideReact.Clock, { className: "w-3.5 h-3.5" }), /* @__PURE__ */ React15__namespace.default.createElement("span", null, dateFns.format(event.start, "h:mm a"), " - ", dateFns.format(event.end, "h:mm a"))), event.guests && event.guests.length > 0 && /* @__PURE__ */ React15__namespace.default.createElement("div", { className: "flex items-center gap-1.5 text-xs text-muted-foreground" }, /* @__PURE__ */ React15__namespace.default.createElement(lucideReact.Users, { className: "w-3.5 h-3.5" }), /* @__PURE__ */ React15__namespace.default.createElement("span", null, event.guests.length, " guest", event.guests.length !== 1 ? "s" : "")), event.attachments && event.attachments.length > 0 && /* @__PURE__ */ React15__namespace.default.createElement("div", { className: "flex items-center gap-1.5 text-xs text-muted-foreground" }, /* @__PURE__ */ React15__namespace.default.createElement(lucideReact.Paperclip, { className: "w-3.5 h-3.5" }), /* @__PURE__ */ React15__namespace.default.createElement("span", null, event.attachments.length)), event.reminders && event.reminders.length > 0 && /* @__PURE__ */ React15__namespace.default.createElement("div", { className: "flex items-center gap-1.5 text-xs text-muted-foreground" }, /* @__PURE__ */ React15__namespace.default.createElement(lucideReact.Bell, { className: "w-3.5 h-3.5" }), /* @__PURE__ */ React15__namespace.default.createElement("span", null, event.reminders.length)))),
1188
+ )), event.description && /* @__PURE__ */ React15__namespace.default.createElement("p", { className: "text-sm text-muted-foreground line-clamp-2 leading-relaxed" }, event.description), /* @__PURE__ */ React15__namespace.default.createElement("div", { className: "flex flex-wrap items-center gap-3 pt-1" }, !event.allDay && /* @__PURE__ */ React15__namespace.default.createElement("div", { className: "flex items-center gap-1.5 text-xs text-muted-foreground" }, /* @__PURE__ */ React15__namespace.default.createElement(lucideReact.Clock, { className: "w-3.5 h-3.5" }), /* @__PURE__ */ React15__namespace.default.createElement("span", null, dateFns.format(event.start, timePattern, { locale }), " - ", dateFns.format(event.end, timePattern, { locale }))), event.guests && event.guests.length > 0 && /* @__PURE__ */ React15__namespace.default.createElement("div", { className: "flex items-center gap-1.5 text-xs text-muted-foreground" }, /* @__PURE__ */ React15__namespace.default.createElement(lucideReact.Users, { className: "w-3.5 h-3.5" }), /* @__PURE__ */ React15__namespace.default.createElement("span", null, event.guests.length, " ", event.guests.length !== 1 ? translations?.guestsCount || "guests" : translations?.guestCount || "guest")), event.attachments && event.attachments.length > 0 && /* @__PURE__ */ React15__namespace.default.createElement("div", { className: "flex items-center gap-1.5 text-xs text-muted-foreground" }, /* @__PURE__ */ React15__namespace.default.createElement(lucideReact.Paperclip, { className: "w-3.5 h-3.5" }), /* @__PURE__ */ React15__namespace.default.createElement("span", null, event.attachments.length)), event.reminders && event.reminders.length > 0 && /* @__PURE__ */ React15__namespace.default.createElement("div", { className: "flex items-center gap-1.5 text-xs text-muted-foreground" }, /* @__PURE__ */ React15__namespace.default.createElement(lucideReact.Bell, { className: "w-3.5 h-3.5" }), /* @__PURE__ */ React15__namespace.default.createElement("span", null, event.reminders.length)))),
1152
1189
  /* @__PURE__ */ React15__namespace.default.createElement("div", { className: "absolute right-4 top-1/2 -translate-y-1/2 opacity-0 group-hover:opacity-100 transition-opacity" }, /* @__PURE__ */ React15__namespace.default.createElement("svg", { className: "w-5 h-5 text-muted-foreground", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2" }, /* @__PURE__ */ React15__namespace.default.createElement("path", { d: "M9 18l6-6-6-6" })))
1153
1190
  )))
1154
1191
  ))
@@ -1165,7 +1202,7 @@ var ResourceView = ({
1165
1202
  const containerRef = React15.useRef(null);
1166
1203
  const hours = Array.from({ length: 24 }, (_, i) => i);
1167
1204
  const hourWidth = 100;
1168
- const timeFormat = locale?.code === "fr" ? "H:mm" : "h a";
1205
+ const timeFormat = uses24HourClock(locale) ? "H:mm" : "h a";
1169
1206
  const getEventStyle = (event) => {
1170
1207
  const start = new Date(event.start);
1171
1208
  const end = new Date(event.end);
@@ -2044,6 +2081,146 @@ var useEventContextMenu = () => {
2044
2081
  };
2045
2082
  };
2046
2083
 
2084
+ // src/locales/index.ts
2085
+ var en = {
2086
+ today: "Today",
2087
+ month: "Month",
2088
+ week: "Week",
2089
+ day: "Day",
2090
+ agenda: "Agenda",
2091
+ resource: "Resources",
2092
+ createEvent: "Create Event",
2093
+ editEvent: "Edit Event",
2094
+ delete: "Delete",
2095
+ save: "Save",
2096
+ cancel: "Cancel",
2097
+ title: "Add title",
2098
+ start: "Start",
2099
+ end: "End",
2100
+ allDay: "All Day",
2101
+ description: "Description",
2102
+ repeat: "Repeat",
2103
+ noRepeat: "Does not repeat",
2104
+ selectCalendar: "Select Calendar",
2105
+ selectType: "Select Type",
2106
+ daily: "Daily",
2107
+ weekly: "Weekly",
2108
+ monthly: "Monthly",
2109
+ yearly: "Yearly",
2110
+ search: "Search events...",
2111
+ allTypes: "All Types",
2112
+ timezone: "Time zone",
2113
+ localTime: "Local Time",
2114
+ create: "Create",
2115
+ calendars: "Calendars",
2116
+ event: "Event",
2117
+ task: "Task",
2118
+ appointmentSchedule: "Appointment schedule",
2119
+ new: "New",
2120
+ dateAndTime: "Date & Time",
2121
+ whosJoining: "Who's joining?",
2122
+ suggestedTimes: "Suggested times for guests",
2123
+ viewSuggestions: "View suggestions",
2124
+ whereWillItBe: "Where will it be?",
2125
+ location: "Enter address",
2126
+ descriptionAndAttachments: "Description",
2127
+ dragAndDrop: "Drag & drop files or",
2128
+ guests: "Guests",
2129
+ addGuests: "Add guests",
2130
+ addAttachment: "Upload files",
2131
+ moreOptions: "More options",
2132
+ doesNotRepeat: "Does not repeat",
2133
+ locationHelpText: 'Enter a physical address (e.g. "123 Main St") to generate the map.',
2134
+ notes: "Notes...",
2135
+ guestCount: "guest",
2136
+ guestsCount: "guests",
2137
+ repeatFor: "Repeat for",
2138
+ times: "times",
2139
+ until: "Until",
2140
+ endRepeat: "End repeat",
2141
+ never: "Never",
2142
+ afterOccurrences: "After occurrences",
2143
+ onDate: "On date",
2144
+ tomorrow: "Tomorrow",
2145
+ edit: "Edit",
2146
+ duplicate: "Duplicate",
2147
+ eventSingular: "event",
2148
+ eventPlural: "events",
2149
+ allCaughtUp: "All caught up!",
2150
+ noEventsScheduled: "No events scheduled",
2151
+ noUpcoming: "Your schedule is clear",
2152
+ noUpcomingHint: "No upcoming events to show. Create a new event to start planning."
2153
+ };
2154
+ var fr = {
2155
+ today: "Aujourd'hui",
2156
+ month: "Mois",
2157
+ week: "Semaine",
2158
+ day: "Jour",
2159
+ agenda: "Agenda",
2160
+ resource: "Ressources",
2161
+ createEvent: "Cr\xE9er un \xE9v\xE9nement",
2162
+ editEvent: "Modifier l'\xE9v\xE9nement",
2163
+ delete: "Supprimer",
2164
+ save: "Enregistrer",
2165
+ cancel: "Annuler",
2166
+ title: "Ajouter un titre",
2167
+ start: "D\xE9but",
2168
+ end: "Fin",
2169
+ allDay: "Toute la journ\xE9e",
2170
+ description: "Description",
2171
+ repeat: "R\xE9p\xE9ter",
2172
+ noRepeat: "Ne se r\xE9p\xE8te pas",
2173
+ selectCalendar: "S\xE9lectionner un calendrier",
2174
+ selectType: "S\xE9lectionner un type",
2175
+ daily: "Quotidien",
2176
+ weekly: "Hebdomadaire",
2177
+ monthly: "Mensuel",
2178
+ yearly: "Annuel",
2179
+ search: "Rechercher...",
2180
+ allTypes: "Tous les types",
2181
+ timezone: "Fuseau horaire",
2182
+ localTime: "Heure locale",
2183
+ create: "Cr\xE9er",
2184
+ calendars: "Calendriers",
2185
+ event: "\xC9v\xE9nement",
2186
+ task: "T\xE2che",
2187
+ appointmentSchedule: "Planning de rendez-vous",
2188
+ new: "Nouveau",
2189
+ dateAndTime: "Date et heure",
2190
+ whosJoining: "Qui participe ?",
2191
+ suggestedTimes: "Horaires sugg\xE9r\xE9s",
2192
+ viewSuggestions: "Voir les suggestions",
2193
+ whereWillItBe: "O\xF9 aura lieu ?",
2194
+ location: "Entrer une adresse",
2195
+ descriptionAndAttachments: "Description",
2196
+ dragAndDrop: "Glisser-d\xE9poser des fichiers ou",
2197
+ guests: "Invit\xE9s",
2198
+ addGuests: "Ajouter des invit\xE9s",
2199
+ addAttachment: "T\xE9l\xE9charger des fichiers",
2200
+ moreOptions: "Plus d'options",
2201
+ doesNotRepeat: "Ne se r\xE9p\xE8te pas",
2202
+ locationHelpText: 'Entrez une adresse physique (ex: "123 Rue Principale") pour g\xE9n\xE9rer la carte.',
2203
+ notes: "Notes...",
2204
+ guestCount: "invit\xE9",
2205
+ guestsCount: "invit\xE9s",
2206
+ repeatFor: "R\xE9p\xE9ter pendant",
2207
+ times: "fois",
2208
+ until: "Jusqu'au",
2209
+ endRepeat: "Fin de r\xE9p\xE9tition",
2210
+ never: "Jamais",
2211
+ afterOccurrences: "Apr\xE8s occurrences",
2212
+ onDate: "\xC0 la date",
2213
+ tomorrow: "Demain",
2214
+ edit: "Modifier",
2215
+ duplicate: "Dupliquer",
2216
+ eventSingular: "\xE9v\xE9nement",
2217
+ eventPlural: "\xE9v\xE9nements",
2218
+ allCaughtUp: "Tout est \xE0 jour !",
2219
+ noEventsScheduled: "Aucun \xE9v\xE9nement pr\xE9vu",
2220
+ noUpcoming: "Votre planning est libre",
2221
+ noUpcomingHint: "Aucun \xE9v\xE9nement \xE0 venir. Cr\xE9ez un nouvel \xE9v\xE9nement pour commencer \xE0 planifier."
2222
+ };
2223
+
2047
2224
  // src/lib/theme.ts
2048
2225
  function colorToHsl(color) {
2049
2226
  let r = 0, g = 0, b = 0;
@@ -2530,33 +2707,12 @@ var Scheduler = ({
2530
2707
  };
2531
2708
  const id = React15.useId();
2532
2709
  const swipeRef = useViewSwipe(handlePrev, handleNext, true);
2710
+ const languagePack = language === "fr" ? fr : en;
2533
2711
  const t = {
2534
- today: "Today",
2535
- month: "Month",
2536
- week: "Week",
2537
- day: "Day",
2538
- agenda: "Agenda",
2539
- resource: "Resource",
2540
- createEvent: "Create Event",
2541
- editEvent: "Edit Event",
2542
- delete: "Delete",
2543
- save: "Save",
2544
- cancel: "Cancel",
2545
- title: "Title",
2546
- start: "Start",
2547
- end: "End",
2548
- allDay: "All Day",
2549
- description: "Description",
2550
- repeat: "Repeat",
2551
- noRepeat: "Does not repeat",
2552
- selectCalendar: "Select Calendar",
2553
- selectType: "Select Type",
2554
- daily: "Daily",
2555
- weekly: "Weekly",
2556
- monthly: "Monthly",
2557
- yearly: "Yearly",
2712
+ ...languagePack,
2558
2713
  ...translations
2559
2714
  };
2715
+ const overlayTimeFormat = uses24HourClock(locale) ? "H:mm" : "h:mm a";
2560
2716
  const handleDragStart = (event) => {
2561
2717
  const { active } = event;
2562
2718
  const draggedEvent = expandedEvents.find((e) => e.id === active.id);
@@ -2658,7 +2814,8 @@ var Scheduler = ({
2658
2814
  readOnly,
2659
2815
  calendars,
2660
2816
  onCalendarToggle,
2661
- translations: t
2817
+ translations: t,
2818
+ locale
2662
2819
  }
2663
2820
  )
2664
2821
  ), /* @__PURE__ */ React15__namespace.default.createElement("div", { className: "flex-1 flex flex-col overflow-hidden relative" }, isLoading ? /* @__PURE__ */ React15__namespace.default.createElement("div", { className: "flex-1 overflow-auto p-0 md:p-4" }, /* @__PURE__ */ React15__namespace.default.createElement("div", { className: "h-full min-w-full" }, view === "month" && /* @__PURE__ */ React15__namespace.default.createElement(MonthViewSkeleton, null), view === "week" && /* @__PURE__ */ React15__namespace.default.createElement(WeekViewSkeleton, null), view === "day" && /* @__PURE__ */ React15__namespace.default.createElement(DayViewSkeleton, null), view === "agenda" && /* @__PURE__ */ React15__namespace.default.createElement(AgendaViewSkeleton, null), view === "resource" && /* @__PURE__ */ React15__namespace.default.createElement(WeekViewSkeleton, null))) : /* @__PURE__ */ React15__namespace.default.createElement("div", { ref: swipeRef, className: "flex-1 overflow-auto p-0 md:p-4 touch-pan-y" }, /* @__PURE__ */ React15__namespace.default.createElement("div", { className: "h-full min-w-full" }, /* @__PURE__ */ React15__namespace.default.createElement(framerMotion.AnimatePresence, { mode: "wait", initial: false }, /* @__PURE__ */ React15__namespace.default.createElement(
@@ -2729,7 +2886,9 @@ var Scheduler = ({
2729
2886
  currentDate,
2730
2887
  events: filteredEvents,
2731
2888
  onEventClick: handleEventClickInternal,
2732
- onCreateEvent: handleCreateEvent
2889
+ onCreateEvent: handleCreateEvent,
2890
+ locale,
2891
+ translations: t
2733
2892
  }
2734
2893
  ),
2735
2894
  view === "resource" && resources && /* @__PURE__ */ React15__namespace.default.createElement(
@@ -2802,9 +2961,9 @@ var Scheduler = ({
2802
2961
  closeContextMenu();
2803
2962
  },
2804
2963
  translations: {
2805
- edit: t.editEvent || "Edit",
2964
+ edit: t.edit || t.editEvent || "Edit",
2806
2965
  delete: t.delete || "Delete",
2807
- duplicate: "Duplicate"
2966
+ duplicate: t.duplicate || "Duplicate"
2808
2967
  }
2809
2968
  }
2810
2969
  ),
@@ -2832,7 +2991,7 @@ var Scheduler = ({
2832
2991
  className: "absolute left-0 top-0 bottom-0 w-1 rounded-l-lg",
2833
2992
  style: { backgroundColor: activeDragEvent.color || "var(--primary)" }
2834
2993
  }
2835
- ), /* @__PURE__ */ React15__namespace.default.createElement("div", { className: "pl-2" }, /* @__PURE__ */ React15__namespace.default.createElement("div", { className: "font-semibold truncate text-sm" }, activeDragEvent.title), (view === "week" || view === "day") && getDragHeight() && getDragHeight() > 40 && /* @__PURE__ */ React15__namespace.default.createElement("div", { className: "text-xs opacity-80 mt-0.5 flex items-center gap-1" }, /* @__PURE__ */ React15__namespace.default.createElement("svg", { className: "w-3 h-3", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2" }, /* @__PURE__ */ React15__namespace.default.createElement("circle", { cx: "12", cy: "12", r: "10" }), /* @__PURE__ */ React15__namespace.default.createElement("path", { d: "M12 6v6l4 2" })), dateFns.format(activeDragEvent.start, "h:mm a"), " - ", dateFns.format(activeDragEvent.end, "h:mm a"))), /* @__PURE__ */ React15__namespace.default.createElement("div", { className: "absolute bottom-1.5 right-1.5 opacity-60" }, /* @__PURE__ */ React15__namespace.default.createElement("svg", { className: "w-4 h-4", viewBox: "0 0 24 24", fill: "currentColor" }, /* @__PURE__ */ React15__namespace.default.createElement("circle", { cx: "9", cy: "5", r: "1.5" }), /* @__PURE__ */ React15__namespace.default.createElement("circle", { cx: "15", cy: "5", r: "1.5" }), /* @__PURE__ */ React15__namespace.default.createElement("circle", { cx: "9", cy: "12", r: "1.5" }), /* @__PURE__ */ React15__namespace.default.createElement("circle", { cx: "15", cy: "12", r: "1.5" }), /* @__PURE__ */ React15__namespace.default.createElement("circle", { cx: "9", cy: "19", r: "1.5" }), /* @__PURE__ */ React15__namespace.default.createElement("circle", { cx: "15", cy: "19", r: "1.5" }))))
2994
+ ), /* @__PURE__ */ React15__namespace.default.createElement("div", { className: "pl-2" }, /* @__PURE__ */ React15__namespace.default.createElement("div", { className: "font-semibold truncate text-sm" }, activeDragEvent.title), (view === "week" || view === "day") && getDragHeight() && getDragHeight() > 40 && /* @__PURE__ */ React15__namespace.default.createElement("div", { className: "text-xs opacity-80 mt-0.5 flex items-center gap-1" }, /* @__PURE__ */ React15__namespace.default.createElement("svg", { className: "w-3 h-3", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2" }, /* @__PURE__ */ React15__namespace.default.createElement("circle", { cx: "12", cy: "12", r: "10" }), /* @__PURE__ */ React15__namespace.default.createElement("path", { d: "M12 6v6l4 2" })), dateFns.format(activeDragEvent.start, overlayTimeFormat, { locale }), " - ", dateFns.format(activeDragEvent.end, overlayTimeFormat, { locale }))), /* @__PURE__ */ React15__namespace.default.createElement("div", { className: "absolute bottom-1.5 right-1.5 opacity-60" }, /* @__PURE__ */ React15__namespace.default.createElement("svg", { className: "w-4 h-4", viewBox: "0 0 24 24", fill: "currentColor" }, /* @__PURE__ */ React15__namespace.default.createElement("circle", { cx: "9", cy: "5", r: "1.5" }), /* @__PURE__ */ React15__namespace.default.createElement("circle", { cx: "15", cy: "5", r: "1.5" }), /* @__PURE__ */ React15__namespace.default.createElement("circle", { cx: "9", cy: "12", r: "1.5" }), /* @__PURE__ */ React15__namespace.default.createElement("circle", { cx: "15", cy: "12", r: "1.5" }), /* @__PURE__ */ React15__namespace.default.createElement("circle", { cx: "9", cy: "19", r: "1.5" }), /* @__PURE__ */ React15__namespace.default.createElement("circle", { cx: "15", cy: "19", r: "1.5" }))))
2836
2995
  ) : null)
2837
2996
  )
2838
2997
  );