@mlw-packages/react-components 1.9.15 → 1.10.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.mjs CHANGED
@@ -5,7 +5,7 @@ import { Slot } from '@radix-ui/react-slot';
5
5
  import { cva } from 'class-variance-authority';
6
6
  import { clsx } from 'clsx';
7
7
  import { twMerge } from 'tailwind-merge';
8
- import { XIcon, CircleNotchIcon, MagnifyingGlassIcon, CaretUpIcon, CaretDownIcon, CheckIcon, CaretRightIcon, CircleIcon, CloudArrowUpIcon, MinusIcon, CaretUpDownIcon, PencilSimpleIcon, ArrowsLeftRightIcon, FloppyDiskIcon, PlusIcon, TrashIcon, SidebarSimpleIcon, FilePdfIcon, FileDocIcon, FileXlsIcon, FilePptIcon, FileCsvIcon, FileTextIcon, FileImageIcon, FileVideoIcon, FileAudioIcon, FileZipIcon, FileIcon, DotsSixVerticalIcon, InfoIcon, WarningIcon, XCircleIcon, CheckCircleIcon, SunIcon, MoonIcon, CaretLeftIcon, DownloadSimpleIcon, UploadSimpleIcon, CopyIcon, ArrowClockwiseIcon, ArrowLeftIcon, GearIcon, BellIcon, DotsThreeIcon, FunnelIcon, HeartIcon, StarIcon, EyeIcon, EyeSlashIcon, LockIcon, LockOpenIcon, FolderIcon, ArrowRightIcon as ArrowRightIcon$1, ArrowsOutIcon, DownloadIcon, CalendarBlankIcon, CalendarIcon, CaretLeft, CaretRight, ArrowDownIcon, ClockUserIcon, EyeSlash, Eye, ArrowRight, ArrowUpRightIcon, ArrowDownRightIcon, FunnelSimpleIcon, FileArchiveIcon, TerminalIcon, CodeIcon, CalendarDotIcon as CalendarDotIcon$1, DesktopIcon } from '@phosphor-icons/react';
8
+ import { XIcon, CircleNotchIcon, MagnifyingGlassIcon, CaretUpIcon, CaretDownIcon, CheckIcon, CaretRightIcon, CircleIcon, CloudArrowUpIcon, MinusIcon, CaretUpDownIcon, PencilSimpleIcon, ArrowsLeftRightIcon, FloppyDiskIcon, PlusIcon, TrashIcon, SidebarSimpleIcon, FilePdfIcon, FileDocIcon, FileXlsIcon, FilePptIcon, FileCsvIcon, FileTextIcon, FileImageIcon, FileVideoIcon, FileAudioIcon, FileZipIcon, FileIcon, DotsSixVerticalIcon, InfoIcon, WarningIcon, XCircleIcon, CheckCircleIcon, SunIcon, MoonIcon, CaretLeftIcon, DownloadSimpleIcon, UploadSimpleIcon, CopyIcon, ArrowClockwiseIcon, ArrowLeftIcon, GearIcon, BellIcon, DotsThreeIcon, FunnelIcon, HeartIcon, StarIcon, EyeIcon, EyeSlashIcon, LockIcon, LockOpenIcon, FolderIcon, ArrowRightIcon as ArrowRightIcon$1, ArrowsOutIcon, DownloadIcon, CalendarBlankIcon, CalendarIcon, MapPinIcon, CalendarDotsIcon, ClockIcon, AlignLeftIcon, CaretLeft, CaretRight, ArrowDownIcon, ClockUserIcon, EyeSlash, Eye, ArrowRight, ArrowUpRightIcon, ArrowDownRightIcon, FunnelSimpleIcon, PencilIcon, FileArchiveIcon, TerminalIcon, CodeIcon, CalendarDotIcon as CalendarDotIcon$1, DesktopIcon } from '@phosphor-icons/react';
9
9
  import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
10
10
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
11
11
  import * as DialogPrimitive from '@radix-ui/react-dialog';
@@ -17,7 +17,7 @@ import 'react-router-dom';
17
17
  import { Command } from 'cmdk';
18
18
  import { AnimatePresence, motion, useMotionValue, useSpring, useTransform } from 'framer-motion';
19
19
  import * as PopoverPrimitive from '@radix-ui/react-popover';
20
- import { XIcon as XIcon$1, CalendarDotIcon, DotsThreeIcon as DotsThreeIcon$1, Check, CheckIcon as CheckIcon$1 } from '@phosphor-icons/react/dist/ssr';
20
+ import { XIcon as XIcon$1, CalendarDotIcon, CaretLeftIcon as CaretLeftIcon$1, CaretRightIcon as CaretRightIcon$1, MapPinIcon as MapPinIcon$1, DotsThreeIcon as DotsThreeIcon$1, Check, CheckIcon as CheckIcon$1 } from '@phosphor-icons/react/dist/ssr';
21
21
  import * as SelectPrimitive from '@radix-ui/react-select';
22
22
  import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
23
23
  import * as AvatarPrimitive from '@radix-ui/react-avatar';
@@ -35,7 +35,7 @@ import * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu';
35
35
  import { Drawer } from 'vaul';
36
36
  import * as ContextMenuPrimitive from '@radix-ui/react-context-menu';
37
37
  import { Prism } from 'react-syntax-highlighter';
38
- import { format, startOfMonth, endOfMonth, eachDayOfInterval, isToday, isSameDay, differenceInMinutes, isPast, startOfDay, eachHourOfInterval, addHours, getHours, getMinutes, areIntervalsOverlapping, startOfWeek, endOfWeek, isSameMonth, addDays, isBefore, differenceInDays, addMinutes, subMonths, subWeeks, addMonths, addWeeks, isWithinInterval, add } from 'date-fns';
38
+ import { format, startOfMonth, endOfMonth, eachDayOfInterval, isToday, isSameDay, differenceInMinutes, isPast, startOfDay, eachHourOfInterval, addHours, getHours, getMinutes, areIntervalsOverlapping, startOfWeek, endOfWeek, isSameMonth, differenceInCalendarDays, addDays, differenceInDays, isBefore, addMinutes, subMonths, subWeeks, addMonths, addWeeks, isWithinInterval, add, max, min } from 'date-fns';
39
39
  import { ptBR } from 'date-fns/locale';
40
40
  import ptBR3 from 'date-fns/locale/pt-BR';
41
41
  import { useSensors, useSensor, MouseSensor, TouchSensor, PointerSensor, DndContext, DragOverlay, useDroppable, useDraggable } from '@dnd-kit/core';
@@ -653,7 +653,7 @@ var DialogContentBase = React32.forwardRef(
653
653
  onWheel: userOnWheel,
654
654
  children: [
655
655
  children,
656
- /* @__PURE__ */ jsxs(DialogPrimitive.Close, { className: "absolute right-3 top-3 sm:right-4 sm:top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground z-10 touch-manipulation", children: [
656
+ /* @__PURE__ */ jsxs(DialogPrimitive.Close, { className: "absolute right-3 top-3 sm:right-4 sm:top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-n\n 0 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground z-10 touch-manipulation", children: [
657
657
  /* @__PURE__ */ jsx(XIcon, { className: "h-6 w-6 sm:h-4 sm:w-4 hover:text-red-500 font-extrabold" }),
658
658
  /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
659
659
  ] })
@@ -1171,6 +1171,8 @@ var Toaster = ({ testId, ...props }) => {
1171
1171
  className: "toaster group",
1172
1172
  position: "top-center",
1173
1173
  duration: 4e3,
1174
+ swipeDirections: ["top", "bottom", "left", "right"],
1175
+ closeButton: true,
1174
1176
  toastOptions: {
1175
1177
  style: {
1176
1178
  backdropFilter: "blur(8px)",
@@ -1184,9 +1186,8 @@ var Toaster = ({ testId, ...props }) => {
1184
1186
  shadow-xl rounded-lg
1185
1187
  border-l-4
1186
1188
 
1187
- flex items-center gap-3
1189
+ flex items-center gap-3 pr-10
1188
1190
  transition-all duration-300
1189
- hover:scale-[1.02] hover:shadow-2xl
1190
1191
  data-[type=success]:border-l-green-500 data-[type=success]:bg-green-50/95 data-[type=success]:text-green-800 data-[type=success]:border-green-500 data-
1191
1192
  data-[type=error]:border-l-red-500 data-[type=error]:bg-red-50/95 data-[type=error]:text-red-800 data-[type=error]:border-red-500
1192
1193
  data-[type=warning]:border-l-yellow-500 data-[type=warning]:bg-yellow-50/95 data-[type=warning]:text-yellow-800 data-[type=warning]:border-yellow-500
@@ -1212,6 +1213,13 @@ var Toaster = ({ testId, ...props }) => {
1212
1213
  hover:bg-neutral-200 hover:scale-105
1213
1214
  transition-all duration-200
1214
1215
  active:scale-95
1216
+ `,
1217
+ closeButton: `
1218
+ !bg-transparent hover:!bg-black/5 dark:hover:!bg-white/10
1219
+ !border-0 !text-neutral-400 hover:!text-neutral-900 dark:hover:!text-neutral-100
1220
+ transition-all duration-200 !left-[auto] !right-3 !top-1/2 !-translate-y-1/2
1221
+ !w-7 !h-7 !rounded-lg flex items-center justify-center
1222
+ active:scale-95
1215
1223
  `
1216
1224
  }
1217
1225
  },
@@ -2007,7 +2015,7 @@ var CommandDebouncedInputBase = React32.forwardRef(
2007
2015
  }, ref) => /* @__PURE__ */ jsxs(
2008
2016
  "div",
2009
2017
  {
2010
- className: "flex items-center px-3 border-border border-b",
2018
+ className: "flex items-center px-3 border-border border-b focus:ring-0",
2011
2019
  "cmdk-input-wrapper": "",
2012
2020
  children: [
2013
2021
  /* @__PURE__ */ jsx(MagnifyingGlassIcon, { className: "mr-2 h-4 w-4 shrink-0 text-primary" }),
@@ -7440,15 +7448,15 @@ function isValid12Hour(value) {
7440
7448
  function isValidMinuteOrSecond(value) {
7441
7449
  return /^[0-5][0-9]$/.test(value);
7442
7450
  }
7443
- function getValidNumber(value, { max, min = 0, loop = false }) {
7451
+ function getValidNumber(value, { max: max2, min: min2 = 0, loop = false }) {
7444
7452
  let numericValue = parseInt(value, 10);
7445
7453
  if (!isNaN(numericValue)) {
7446
7454
  if (!loop) {
7447
- if (numericValue > max) numericValue = max;
7448
- if (numericValue < min) numericValue = min;
7455
+ if (numericValue > max2) numericValue = max2;
7456
+ if (numericValue < min2) numericValue = min2;
7449
7457
  } else {
7450
- if (numericValue > max) numericValue = min;
7451
- if (numericValue < min) numericValue = max;
7458
+ if (numericValue > max2) numericValue = min2;
7459
+ if (numericValue < min2) numericValue = max2;
7452
7460
  }
7453
7461
  return numericValue.toString().padStart(2, "0");
7454
7462
  }
@@ -7466,11 +7474,11 @@ function getValidMinuteOrSecond(value) {
7466
7474
  if (isValidMinuteOrSecond(value)) return value;
7467
7475
  return getValidNumber(value, { max: 59 });
7468
7476
  }
7469
- function getValidArrowNumber(value, { min, max, step }) {
7477
+ function getValidArrowNumber(value, { min: min2, max: max2, step }) {
7470
7478
  let numericValue = parseInt(value, 10);
7471
7479
  if (!isNaN(numericValue)) {
7472
7480
  numericValue += step;
7473
- return getValidNumber(String(numericValue), { min, max, loop: true });
7481
+ return getValidNumber(String(numericValue), { min: min2, max: max2, loop: true });
7474
7482
  }
7475
7483
  return "00";
7476
7484
  }
@@ -7581,19 +7589,19 @@ function visualForItem(item, value) {
7581
7589
  var ITEM_HEIGHT = 38.5;
7582
7590
  var VISIBLE_ITEMS = 5;
7583
7591
  var CENTER_INDEX = Math.floor(VISIBLE_ITEMS / 2);
7584
- function getItems(max, step = 1) {
7585
- return Array.from({ length: Math.ceil(max / step) }, (_, i) => i * step);
7592
+ function getItems(max2, step = 1) {
7593
+ return Array.from({ length: Math.ceil(max2 / step) }, (_, i) => i * step);
7586
7594
  }
7587
7595
 
7588
7596
  // src/components/ui/picker/hooks/useScrollColumn.tsx
7589
7597
  function useScrollColumn({
7590
7598
  value,
7591
7599
  onChange,
7592
- max,
7600
+ max: max2,
7593
7601
  step = 1
7594
7602
  }) {
7595
7603
  const containerRef = useRef(null);
7596
- const items = getItems(max, step);
7604
+ const items = getItems(max2, step);
7597
7605
  const scrollTimeoutRef = useRef(null);
7598
7606
  const isScrollingRef = useRef(false);
7599
7607
  const [isDragging, setIsDragging] = useState(false);
@@ -7661,7 +7669,7 @@ function useScrollColumn({
7661
7669
  function ScrollColumn({
7662
7670
  value,
7663
7671
  onChange,
7664
- max,
7672
+ max: max2,
7665
7673
  label,
7666
7674
  step = 1
7667
7675
  }) {
@@ -7676,7 +7684,7 @@ function ScrollColumn({
7676
7684
  handleMouseMove,
7677
7685
  handleMouseUp,
7678
7686
  isDragging
7679
- } = useScrollColumn({ value, onChange, max, step });
7687
+ } = useScrollColumn({ value, onChange, max: max2, step });
7680
7688
  return /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center", children: [
7681
7689
  /* @__PURE__ */ jsx("span", { className: "text-muted-foreground rounded-md font-semibold text-sm text-center pb-2 uppercase tracking-wider", children: label }),
7682
7690
  /* @__PURE__ */ jsxs("div", { className: cn("relative w-20"), children: [
@@ -8688,7 +8696,7 @@ function Agenda({
8688
8696
  "span",
8689
8697
  {
8690
8698
  className: twMerge(
8691
- "-top-3 absolute left-0 flex h-6 items-center bg-background pe-4 data-today:font-extrabold sm:pe-4 text-sm sm:text-md md:text-md font-bold min-w-0",
8699
+ "-top-3 absolute left-0 flex h-6 items-center bg-background pe-2 data-today:font-extrabold sm:pe-4 text-xs sm:text-sm md:text-base font-bold min-w-0",
8692
8700
  isToday(day) ? "text-blue-500" : ""
8693
8701
  ),
8694
8702
  "data-today": isToday(day) || void 0,
@@ -8975,19 +8983,39 @@ function getEventColorClassesAgenda(color) {
8975
8983
  const eventColor = color || "sky";
8976
8984
  switch (eventColor) {
8977
8985
  case "sky":
8978
- return "bg-sky-100 hover:bg-sky-200 text-sky-900 border dark:bg-sky-500/30 dark:hover:bg-sky-500/40 dark:text-sky-50 dark:border-sky-400/40 shadow-sky-500/15 hover:shadow-sky-500/25 transition-all duration-200";
8986
+ return "bg-sky-100 hover:bg-sky-200/80 text-sky-900 border border-sky-200/70 dark:bg-sky-500/25 dark:hover:bg-sky-500/35 dark:text-sky-50 dark:border-sky-400/30 transition-colors duration-150";
8979
8987
  case "amber":
8980
- return "bg-amber-100 hover:bg-amber-200 text-amber-900 border dark:bg-amber-500/30 dark:hover:bg-amber-500/40 dark:text-amber-50 dark:border-amber-400/40 shadow-amber-500/15 hover:shadow-amber-500/25 transition-all duration-200";
8988
+ return "bg-amber-100 hover:bg-amber-200/80 text-amber-900 border border-amber-200/70 dark:bg-amber-500/25 dark:hover:bg-amber-500/35 dark:text-amber-50 dark:border-amber-400/30 transition-colors duration-150";
8981
8989
  case "violet":
8982
- return "bg-violet-100 hover:bg-violet-200 text-violet-900 border dark:bg-violet-500/30 dark:hover:bg-violet-500/40 dark:text-violet-50 dark:border-violet-400/40 shadow-violet-500/15 hover:shadow-violet-500/25 transition-all duration-200";
8990
+ return "bg-violet-100 hover:bg-violet-200/80 text-violet-900 border border-violet-200/70 dark:bg-violet-500/25 dark:hover:bg-violet-500/35 dark:text-violet-50 dark:border-violet-400/30 transition-colors duration-150";
8983
8991
  case "rose":
8984
- return "bg-rose-100 hover:bg-rose-200 text-rose-900 border dark:bg-rose-500/30 dark:hover:bg-rose-500/40 dark:text-rose-50 dark:border-rose-400/40 shadow-rose-500/15 hover:shadow-rose-500/25 transition-all duration-200";
8992
+ return "bg-rose-100 hover:bg-rose-200/80 text-rose-900 border border-rose-200/70 dark:bg-rose-500/25 dark:hover:bg-rose-500/35 dark:text-rose-50 dark:border-rose-400/30 transition-colors duration-150";
8985
8993
  case "emerald":
8986
- return "bg-emerald-100 hover:bg-emerald-200 text-emerald-900 border dark:bg-emerald-500/30 dark:hover:bg-emerald-500/40 dark:text-emerald-50 dark:border-emerald-400/40 shadow-emerald-500/15 hover:shadow-emerald-500/25 transition-all duration-200";
8994
+ return "bg-emerald-100 hover:bg-emerald-200/80 text-emerald-900 border border-emerald-200/70 dark:bg-emerald-500/25 dark:hover:bg-emerald-500/35 dark:text-emerald-50 dark:border-emerald-400/30 transition-colors duration-150";
8987
8995
  case "orange":
8988
- return "bg-orange-100 hover:bg-orange-200 text-orange-900 border dark:bg-orange-500/30 dark:hover:bg-orange-500/40 dark:text-orange-50 dark:border-orange-400/40 shadow-orange-500/15 hover:shadow-orange-500/25 transition-all duration-200";
8996
+ return "bg-orange-100 hover:bg-orange-200/80 text-orange-900 border border-orange-200/70 dark:bg-orange-500/25 dark:hover:bg-orange-500/35 dark:text-orange-50 dark:border-orange-400/30 transition-colors duration-150";
8997
+ case "green":
8998
+ return "bg-green-100 hover:bg-green-200/80 text-green-900 border border-green-200/70 dark:bg-green-500/25 dark:hover:bg-green-500/35 dark:text-green-50 dark:border-green-400/30 transition-colors duration-150";
8999
+ case "blue":
9000
+ return "bg-blue-100 hover:bg-blue-200/80 text-blue-900 border border-blue-200/70 dark:bg-blue-500/25 dark:hover:bg-blue-500/35 dark:text-blue-50 dark:border-blue-400/30 transition-colors duration-150";
9001
+ case "red":
9002
+ return "bg-red-100 hover:bg-red-200/80 text-red-900 border border-red-200/70 dark:bg-red-500/25 dark:hover:bg-red-500/35 dark:text-red-50 dark:border-red-400/30 transition-colors duration-150";
9003
+ case "purple":
9004
+ return "bg-purple-100 hover:bg-purple-200/80 text-purple-900 border border-purple-200/70 dark:bg-purple-500/25 dark:hover:bg-purple-500/35 dark:text-purple-50 dark:border-purple-400/30 transition-colors duration-150";
9005
+ case "indigo":
9006
+ return "bg-indigo-100 hover:bg-indigo-200/80 text-indigo-900 border border-indigo-200/70 dark:bg-indigo-500/25 dark:hover:bg-indigo-500/35 dark:text-indigo-50 dark:border-indigo-400/30 transition-colors duration-150";
9007
+ case "teal":
9008
+ return "bg-teal-100 hover:bg-teal-200/80 text-teal-900 border border-teal-200/70 dark:bg-teal-500/25 dark:hover:bg-teal-500/35 dark:text-teal-50 dark:border-teal-400/30 transition-colors duration-150";
9009
+ case "pink":
9010
+ return "bg-pink-100 hover:bg-pink-200/80 text-pink-900 border border-pink-200/70 dark:bg-pink-500/25 dark:hover:bg-pink-500/35 dark:text-pink-50 dark:border-pink-400/30 transition-colors duration-150";
9011
+ case "cyan":
9012
+ return "bg-cyan-100 hover:bg-cyan-200/80 text-cyan-900 border border-cyan-200/70 dark:bg-cyan-500/25 dark:hover:bg-cyan-500/35 dark:text-cyan-50 dark:border-cyan-400/30 transition-colors duration-150";
9013
+ case "lime":
9014
+ return "bg-lime-100 hover:bg-lime-200/80 text-lime-900 border border-lime-200/70 dark:bg-lime-500/25 dark:hover:bg-lime-500/35 dark:text-lime-50 dark:border-lime-400/30 transition-colors duration-150";
9015
+ case "fuchsia":
9016
+ return "bg-fuchsia-100 hover:bg-fuchsia-200/80 text-fuchsia-900 border border-fuchsia-200/70 dark:bg-fuchsia-500/25 dark:hover:bg-fuchsia-500/35 dark:text-fuchsia-50 dark:border-fuchsia-400/30 transition-colors duration-150";
8989
9017
  default:
8990
- return "bg-sky-100 hover:bg-sky-200 text-sky-900 border dark:bg-sky-500/30 dark:hover:bg-sky-500/40 dark:text-sky-50 dark:border-sky-400/40 shadow-sky-500/15 hover:shadow-sky-500/25 transition-all duration-200";
9018
+ return "bg-sky-100 hover:bg-sky-200/80 text-sky-900 border border-sky-200/70 dark:bg-sky-500/25 dark:hover:bg-sky-500/35 dark:text-sky-50 dark:border-sky-400/30 transition-colors duration-150";
8991
9019
  }
8992
9020
  }
8993
9021
  function getBorderRadiusClassesAgenda(isFirstDay, isLastDay) {
@@ -9058,6 +9086,9 @@ function getEventEndDate(event) {
9058
9086
  if (start && typeof event.duration === "number" && !isNaN(event.duration)) {
9059
9087
  return addMinutesToDateAgenda(start, event.duration);
9060
9088
  }
9089
+ if (start && !event.allDay) {
9090
+ return addMinutesToDateAgenda(start, 60);
9091
+ }
9061
9092
  return void 0;
9062
9093
  }
9063
9094
  function isValidDate(d) {
@@ -9167,7 +9198,7 @@ function EventWrapper({
9167
9198
  "button",
9168
9199
  {
9169
9200
  className: cn(
9170
- "flex w-full select-none px-3 py-1 text-left font-medium outline-none transition-transform duration-150 ease-out backdrop-blur-sm focus-visible:ring-2 focus-visible:ring-ring/50 focus-visible:border-ring data-dragging:cursor-grabbing data-past-event:line-through data-dragging:shadow-lg sm:px-3 rounded-lg shadow-sm hover:shadow-md border ",
9201
+ "flex w-full select-none text-left font-medium outline-none transition-colors duration-150 ease-out backdrop-blur-sm focus-visible:ring-2 focus-visible:ring-ring/50 focus-visible:border-ring data-dragging:cursor-grabbing data-past-event:line-through data-dragging:shadow-lg rounded-lg border",
9171
9202
  className?.includes("overflow-visible") ? "" : "overflow-hidden",
9172
9203
  colorClasses,
9173
9204
  getBorderRadiusClassesAgenda(isFirstDay, isLastDay),
@@ -9200,7 +9231,8 @@ function EventItemAgenda({
9200
9231
  dndAttributes,
9201
9232
  onMouseDown,
9202
9233
  onTouchStart,
9203
- agendaOnly = false
9234
+ agendaOnly = false,
9235
+ totalCols = 1
9204
9236
  }) {
9205
9237
  const eventColor = event.color;
9206
9238
  const startDate = getEventStartDate(event);
@@ -9258,7 +9290,7 @@ function EventItemAgenda({
9258
9290
  EventWrapper,
9259
9291
  {
9260
9292
  className: cn(
9261
- "mt-[var(--event-gap)] h-[var(--event-height)] items-center sm:text-xs",
9293
+ "mt-[var(--event-gap)] h-[var(--event-height)] items-center px-1.5 sm:px-3 py-1 sm:text-xs",
9262
9294
  className
9263
9295
  ),
9264
9296
  currentTime,
@@ -9286,13 +9318,58 @@ function EventItemAgenda({
9286
9318
  );
9287
9319
  }
9288
9320
  if (view === "week" || view === "day") {
9321
+ const isCompact = durationMinutes < 45;
9322
+ const isDay = view === "day";
9323
+ const tier = isDay ? 1 : totalCols >= 5 ? 3 : totalCols >= 3 ? 2 : 1;
9324
+ if (tier === 3) {
9325
+ return /* @__PURE__ */ jsx(
9326
+ "button",
9327
+ {
9328
+ type: "button",
9329
+ className: cn(
9330
+ "h-full w-full rounded border overflow-hidden cursor-pointer",
9331
+ colorClasses,
9332
+ className
9333
+ ),
9334
+ onClick,
9335
+ onMouseDown,
9336
+ onTouchStart,
9337
+ "aria-label": ariaLabel,
9338
+ ...dndListeners,
9339
+ ...dndAttributes
9340
+ }
9341
+ );
9342
+ }
9343
+ if (tier === 2) {
9344
+ return /* @__PURE__ */ jsx(
9345
+ EventWrapper,
9346
+ {
9347
+ className: cn(
9348
+ "h-full px-1 py-0.5 overflow-hidden text-[9px]",
9349
+ isCompact ? "flex-row items-center" : "flex-col items-start",
9350
+ className
9351
+ ),
9352
+ currentTime,
9353
+ dndAttributes,
9354
+ dndListeners,
9355
+ event,
9356
+ ariaLabel,
9357
+ isFirstDay,
9358
+ isLastDay,
9359
+ onClick,
9360
+ onMouseDown,
9361
+ onTouchStart,
9362
+ children: /* @__PURE__ */ jsx("span", { className: "font-semibold leading-none truncate w-full block", children: event.title })
9363
+ }
9364
+ );
9365
+ }
9289
9366
  return /* @__PURE__ */ jsx(
9290
9367
  EventWrapper,
9291
9368
  {
9292
9369
  className: cn(
9293
- "py-1",
9294
- durationMinutes < 45 ? "items-center" : "flex-col",
9295
- view === "week" ? "text-[10px] sm:text-xs" : "text-xs",
9370
+ "h-full py-0.5 px-1.5 overflow-hidden",
9371
+ isCompact ? "items-center flex-row" : "flex-col items-start",
9372
+ isDay ? "text-xs" : "text-[10px]",
9296
9373
  className
9297
9374
  ),
9298
9375
  currentTime,
@@ -9303,26 +9380,14 @@ function EventItemAgenda({
9303
9380
  isFirstDay,
9304
9381
  isLastDay,
9305
9382
  onClick,
9306
- children: durationMinutes < 45 ? /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between w-full", children: [
9307
- /* @__PURE__ */ jsx(
9308
- "div",
9309
- {
9310
- className: cn("truncate text-sm sm:text-base md:text-lg min-w-0"),
9311
- children: event.title
9312
- }
9313
- ),
9314
- showTime && hasValidTime && displayStart && /* @__PURE__ */ jsx("span", { className: "ml-2 flex items-center gap-3 bg-white/10 py-0.5 rounded-full opacity-90 text-sm sm:text-base md:text-lg min-w-0", children: formatTimeWithOptionalMinutes(displayStart) })
9315
- ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
9316
- /* @__PURE__ */ jsx(
9317
- "div",
9318
- {
9319
- className: cn(
9320
- "truncate font-medium text-sm sm:text-base md:text-lg min-w-0"
9321
- ),
9322
- children: event.title
9323
- }
9324
- ),
9325
- showTime && hasValidTime && /* @__PURE__ */ jsx("div", { className: "truncate font-normal opacity-70 text-sm sm:text-base", children: /* @__PURE__ */ jsx("span", { className: "inline-block bg-white/5 px-0.5 py-0.5 rounded-full", children: getEventTime() }) })
9383
+ onMouseDown,
9384
+ onTouchStart,
9385
+ children: isCompact ? /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 w-full min-w-0 overflow-hidden", children: [
9386
+ /* @__PURE__ */ jsx("span", { className: "truncate font-semibold leading-none min-w-0", children: event.title }),
9387
+ showTime && hasValidTime && displayStart && /* @__PURE__ */ jsx("span", { className: "shrink-0 opacity-75 leading-none", children: formatTimeWithOptionalMinutes(displayStart) })
9388
+ ] }) : /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-0.5 w-full min-w-0 overflow-hidden h-full", children: [
9389
+ /* @__PURE__ */ jsx("span", { className: "font-semibold leading-snug truncate", children: event.title }),
9390
+ showTime && hasValidTime && /* @__PURE__ */ jsx("span", { className: "opacity-75 leading-none truncate", children: getEventTime() })
9326
9391
  ] })
9327
9392
  }
9328
9393
  );
@@ -9494,7 +9559,6 @@ function DayViewAgenda({
9494
9559
  });
9495
9560
  }, [dayEvents]);
9496
9561
  const positionedEvents = useMemo(() => {
9497
- const result = [];
9498
9562
  const dayStart = startOfDay(currentDate);
9499
9563
  const sortedEvents = [...timeEvents].sort((a, b) => {
9500
9564
  const aStart = getEventStartDate(a) ?? getEventEndDate(a) ?? /* @__PURE__ */ new Date();
@@ -9508,57 +9572,69 @@ function DayViewAgenda({
9508
9572
  return bDuration - aDuration;
9509
9573
  });
9510
9574
  const columns = [];
9575
+ const layouts = [];
9511
9576
  for (const event of sortedEvents) {
9512
9577
  const eventStart = getEventStartDate(event) ?? getEventEndDate(event) ?? /* @__PURE__ */ new Date();
9513
- const eventEnd = getEventEndDate(event) ?? getEventStartDate(event) ?? /* @__PURE__ */ new Date();
9578
+ const rawEnd = getEventEndDate(event) ?? getEventStartDate(event) ?? /* @__PURE__ */ new Date();
9579
+ const eventEnd = rawEnd <= eventStart ? new Date(eventStart.getTime() + 30 * 60 * 1e3) : rawEnd;
9514
9580
  const adjustedStart = isSameDay(currentDate, eventStart) ? eventStart : dayStart;
9515
9581
  const adjustedEnd = isSameDay(currentDate, eventEnd) ? eventEnd : addHours(dayStart, 24);
9516
9582
  const startHour = getHours(adjustedStart) + getMinutes(adjustedStart) / 60;
9517
9583
  const endHour = getHours(adjustedEnd) + getMinutes(adjustedEnd) / 60;
9518
9584
  const top = (startHour - StartHourAgenda) * WeekCellsHeightAgenda;
9519
- const height = (endHour - startHour) * WeekCellsHeightAgenda;
9520
- let columnIndex = 0;
9521
- let placed = false;
9522
- while (!placed) {
9523
- const col = columns[columnIndex] || [];
9524
- if (col.length === 0) {
9525
- columns[columnIndex] = col;
9526
- placed = true;
9527
- } else {
9528
- const overlaps = col.some((c) => {
9529
- const cStart = getEventStartDate(c.event) ?? getEventEndDate(c.event) ?? /* @__PURE__ */ new Date();
9530
- const cEnd = getEventEndDate(c.event) ?? getEventStartDate(c.event) ?? /* @__PURE__ */ new Date();
9531
- return areIntervalsOverlapping(
9532
- { end: adjustedEnd, start: adjustedStart },
9533
- { end: cEnd, start: cStart }
9534
- );
9535
- });
9536
- if (!overlaps) {
9537
- placed = true;
9538
- } else {
9539
- columnIndex++;
9540
- }
9541
- }
9585
+ const height = Math.max(
9586
+ (endHour - startHour) * WeekCellsHeightAgenda,
9587
+ 24
9588
+ );
9589
+ let col = 0;
9590
+ while (true) {
9591
+ const colSlots = columns[col] ?? [];
9592
+ const hasConflict = colSlots.some(
9593
+ (slot) => areIntervalsOverlapping(
9594
+ { start: adjustedStart, end: adjustedEnd },
9595
+ { start: slot.start, end: slot.end },
9596
+ { inclusive: false }
9597
+ )
9598
+ );
9599
+ if (!hasConflict) break;
9600
+ col++;
9542
9601
  }
9543
- const currentColumn = columns[columnIndex] || [];
9544
- columns[columnIndex] = currentColumn;
9545
- currentColumn.push({
9546
- end: adjustedEnd,
9547
- event,
9548
- start: adjustedStart
9549
- });
9550
- const width = columnIndex === 0 ? 1 : 0.9;
9551
- const left = columnIndex === 0 ? 0 : columnIndex * 0.1;
9552
- result.push({
9602
+ if (!columns[col]) columns[col] = [];
9603
+ columns[col].push({ start: adjustedStart, end: adjustedEnd });
9604
+ layouts.push({
9553
9605
  event,
9554
- height,
9555
- left,
9606
+ adjustedStart,
9607
+ adjustedEnd,
9556
9608
  top,
9557
- width,
9558
- zIndex: 10 + columnIndex
9609
+ height,
9610
+ col,
9611
+ totalCols: 0
9559
9612
  });
9560
9613
  }
9561
- return result;
9614
+ for (const layout of layouts) {
9615
+ let maxCol = layout.col;
9616
+ for (const other of layouts) {
9617
+ if (other === layout) continue;
9618
+ if (areIntervalsOverlapping(
9619
+ { start: layout.adjustedStart, end: layout.adjustedEnd },
9620
+ { start: other.adjustedStart, end: other.adjustedEnd },
9621
+ { inclusive: false }
9622
+ )) {
9623
+ maxCol = Math.max(maxCol, other.col);
9624
+ }
9625
+ }
9626
+ layout.totalCols = maxCol + 1;
9627
+ }
9628
+ return layouts.map(
9629
+ ({ event, top, height, col, totalCols }) => ({
9630
+ event,
9631
+ top,
9632
+ height,
9633
+ left: col / totalCols,
9634
+ width: 1 / totalCols,
9635
+ zIndex: 10 + col
9636
+ })
9637
+ );
9562
9638
  }, [currentDate, timeEvents]);
9563
9639
  const handleEventClick = (event, e) => {
9564
9640
  e.stopPropagation();
@@ -9593,7 +9669,7 @@ function DayViewAgenda({
9593
9669
  "div",
9594
9670
  {
9595
9671
  className: "relative h-[var(--week-cells-height)] border-border/70 border-b last:border-b-0",
9596
- children: index > 0 && /* @__PURE__ */ jsx("span", { className: "-top-3 absolute left-0 flex h-6 w-16 max-w-full items-center justify-end bg-background pe-2 text-[10px] text-muted-foreground/70 sm:pe-4 sm:text-xs", children: format(hour, "HH:mm") })
9672
+ children: index > 0 && /* @__PURE__ */ jsx("span", { className: "-top-3 absolute left-0 flex h-6 w-16 max-w-full items-center justify-end bg-background pe-1 sm:pe-4 text-[9px] sm:text-xs text-muted-foreground/70", children: format(hour, "HH:mm") })
9597
9673
  },
9598
9674
  hour.toString()
9599
9675
  )) }),
@@ -9982,25 +10058,25 @@ function EventAgenda({
9982
10058
  return condensed ? entry.short : entry.full;
9983
10059
  };
9984
10060
  const viewTitle = useMemo(() => {
9985
- const capitalize = (s) => s ? s.charAt(0).toUpperCase() + s.slice(1) : s;
10061
+ const capitalize2 = (s) => s ? s.charAt(0).toUpperCase() + s.slice(1) : s;
9986
10062
  if (view === "month")
9987
- return capitalize(format(currentDate, "MMMM yyyy", { locale: ptBR }));
10063
+ return capitalize2(format(currentDate, "MMMM yyyy", { locale: ptBR }));
9988
10064
  if (view === "week") {
9989
10065
  const start = startOfWeek(currentDate, { weekStartsOn: 1 });
9990
10066
  const end = endOfWeek(currentDate, { weekStartsOn: 1 });
9991
10067
  if (isSameMonth(start, end))
9992
- return capitalize(format(start, "MMMM yyyy", { locale: ptBR }));
9993
- const s1 = capitalize(format(start, "MMM", { locale: ptBR }));
9994
- const s2 = capitalize(format(end, "MMM yyyy", { locale: ptBR }));
10068
+ return capitalize2(format(start, "MMMM yyyy", { locale: ptBR }));
10069
+ const s1 = capitalize2(format(start, "MMM", { locale: ptBR }));
10070
+ const s2 = capitalize2(format(end, "MMM yyyy", { locale: ptBR }));
9995
10071
  return `${s1} - ${s2}`;
9996
10072
  }
9997
10073
  if (view === "day")
9998
10074
  return format(currentDate, "d 'de' MMMM 'de' yyyy", { locale: ptBR });
9999
10075
  if (view === "agenda") {
10000
10076
  const start = currentDate;
10001
- return capitalize(format(start, "MMMM yyyy", { locale: ptBR }));
10077
+ return capitalize2(format(start, "MMMM yyyy", { locale: ptBR }));
10002
10078
  }
10003
- return capitalize(format(currentDate, "MMMM yyyy", { locale: ptBR }));
10079
+ return capitalize2(format(currentDate, "MMMM yyyy", { locale: ptBR }));
10004
10080
  }, [currentDate, view]);
10005
10081
  const selectItems = ["month", "week", "day", "agenda"].map((v) => ({
10006
10082
  label: viewLabel(v),
@@ -10187,6 +10263,159 @@ function useEventVisibilityAgenda({
10187
10263
  getVisibleEventCount
10188
10264
  };
10189
10265
  }
10266
+ function clampToWeek(date, weekStart, weekEnd) {
10267
+ return max([min([date, weekEnd]), weekStart]);
10268
+ }
10269
+ function dayCol(date, weekStart) {
10270
+ const diff = Math.round(
10271
+ (date.getTime() - weekStart.getTime()) / (1e3 * 60 * 60 * 24)
10272
+ );
10273
+ return Math.max(0, Math.min(6, diff));
10274
+ }
10275
+ function computeMultiDayBars(events, weekDays) {
10276
+ const weekStart = weekDays[0];
10277
+ const weekEnd = weekDays[6];
10278
+ const multiDayEvents = events.filter((ev) => {
10279
+ if (!isMultiDayEventAgenda(ev)) return false;
10280
+ const start = getEventStartDate(ev);
10281
+ const end = getEventEndDate(ev) ?? start;
10282
+ if (!start || !end) return false;
10283
+ return start <= weekEnd && end >= weekStart;
10284
+ });
10285
+ const sorted = [...multiDayEvents].sort((a, b) => {
10286
+ const aS = getEventStartDate(a) ?? /* @__PURE__ */ new Date(0);
10287
+ const bS = getEventStartDate(b) ?? /* @__PURE__ */ new Date(0);
10288
+ const aE = getEventEndDate(a) ?? aS;
10289
+ const bE = getEventEndDate(b) ?? bS;
10290
+ const diff = bE.getTime() - bS.getTime() - (aE.getTime() - aS.getTime());
10291
+ return diff !== 0 ? diff : aS.getTime() - bS.getTime();
10292
+ });
10293
+ const slotOccupancy = [];
10294
+ const bars = [];
10295
+ for (const event of sorted) {
10296
+ const evStart = getEventStartDate(event);
10297
+ const evEnd = getEventEndDate(event) ?? evStart;
10298
+ const cStart = clampToWeek(evStart, weekStart, weekEnd);
10299
+ const cEnd = clampToWeek(evEnd, weekStart, weekEnd);
10300
+ const sc = dayCol(cStart, weekStart);
10301
+ const ec = dayCol(cEnd, weekStart);
10302
+ let slot = 0;
10303
+ for (; ; ) {
10304
+ if (!slotOccupancy[slot]) slotOccupancy[slot] = Array(7).fill(false);
10305
+ let free = true;
10306
+ for (let c = sc; c <= ec; c++) {
10307
+ if (slotOccupancy[slot][c]) {
10308
+ free = false;
10309
+ break;
10310
+ }
10311
+ }
10312
+ if (free) {
10313
+ for (let c = sc; c <= ec; c++) slotOccupancy[slot][c] = true;
10314
+ break;
10315
+ }
10316
+ slot++;
10317
+ }
10318
+ bars.push({
10319
+ event,
10320
+ colStart: sc,
10321
+ colSpan: ec - sc + 1,
10322
+ isFirstDay: isSameDay(cStart, evStart),
10323
+ isLastDay: isSameDay(cEnd, evEnd),
10324
+ slot
10325
+ });
10326
+ }
10327
+ return bars;
10328
+ }
10329
+ function formatDuration(event) {
10330
+ const start = getEventStartDate(event);
10331
+ const end = getEventEndDate(event);
10332
+ if (!start) return "";
10333
+ const fmt = (d) => format(d, "d 'de' MMM", { locale: ptBR });
10334
+ if (!end || isSameDay(start, end)) {
10335
+ return fmt(start) + (event.allDay ? " \xB7 Dia todo" : " \xB7 " + format(start, "HH:mm"));
10336
+ }
10337
+ const days = differenceInCalendarDays(end, start) + 1;
10338
+ return `${fmt(start)} \u2192 ${fmt(end)} \xB7 ${days} dias`;
10339
+ }
10340
+ function MultiDayOverlay({
10341
+ bars,
10342
+ weekIndex,
10343
+ hoveredEventId,
10344
+ onHover,
10345
+ onEventSelect
10346
+ }) {
10347
+ if (bars.length === 0) return null;
10348
+ return /* @__PURE__ */ jsx("div", { className: "absolute inset-0 pointer-events-none mt-1", children: bars.map((bar) => {
10349
+ const { event, colStart, colSpan, isFirstDay, isLastDay, slot } = bar;
10350
+ const isHovered = hoveredEventId === event.id;
10351
+ const eventStart = getEventStartDate(event) ?? getEventEndDate(event) ?? /* @__PURE__ */ new Date();
10352
+ const continuesFromPrev = !isFirstDay;
10353
+ const continuesToNext = !isLastDay;
10354
+ return /* @__PURE__ */ jsx(
10355
+ TooltipProviderBase,
10356
+ {
10357
+ delayDuration: 400,
10358
+ children: /* @__PURE__ */ jsxs(TooltipBase, { children: [
10359
+ /* @__PURE__ */ jsx(TooltipTriggerBase, { asChild: true, children: /* @__PURE__ */ jsx(
10360
+ "div",
10361
+ {
10362
+ className: "absolute pointer-events-auto px-1.5",
10363
+ style: {
10364
+ left: continuesFromPrev ? `${colStart / 7 * 100}%` : `calc(${colStart / 7 * 100}% + 3px)`,
10365
+ right: continuesToNext ? `${100 - (colStart + colSpan) / 7 * 100}%` : `calc(${100 - (colStart + colSpan) / 7 * 100}% + 3px)`,
10366
+ top: `calc(34px + ${slot} * (var(--event-height) + var(--event-gap)) + var(--event-gap))`,
10367
+ zIndex: isHovered ? 10 : 1
10368
+ },
10369
+ onMouseEnter: () => onHover(event.id),
10370
+ onMouseLeave: () => onHover(null),
10371
+ children: /* @__PURE__ */ jsx(
10372
+ EventItemAgenda,
10373
+ {
10374
+ event,
10375
+ isFirstDay,
10376
+ isLastDay,
10377
+ onClick: (e) => {
10378
+ e.stopPropagation();
10379
+ onEventSelect(event, e);
10380
+ },
10381
+ view: "month",
10382
+ className: cn("w-full", isHovered && "[filter:brightness(0.92)]"),
10383
+ children: /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-0.5 w-full min-w-0", children: [
10384
+ continuesFromPrev && /* @__PURE__ */ jsx("span", { className: "shrink-0 opacity-50 leading-none mr-0.5 flex items-center", children: /* @__PURE__ */ jsx(CaretLeftIcon, { size: 10, weight: "bold" }) }),
10385
+ !event.allDay && isFirstDay && /* @__PURE__ */ jsx("span", { className: "shrink-0 font-normal opacity-75 text-[10px] bg-white/15 px-1 py-0.5 rounded-full leading-none", children: format(eventStart, "HH:mm") }),
10386
+ /* @__PURE__ */ jsx("span", { className: "font-semibold text-[11px] sm:text-xs truncate min-w-0 leading-none flex-1", children: event.title }),
10387
+ isFirstDay && (() => {
10388
+ const evStart = getEventStartDate(event);
10389
+ const evEnd = getEventEndDate(event);
10390
+ if (!evStart || !evEnd) return null;
10391
+ const totalDays = differenceInCalendarDays(evEnd, evStart) + 1;
10392
+ if (totalDays < 2) return null;
10393
+ return /* @__PURE__ */ jsxs("span", { className: "shrink-0 font-bold leading-none text-[10px] opacity-55 ml-0.5", children: [
10394
+ totalDays,
10395
+ "d"
10396
+ ] });
10397
+ })(),
10398
+ continuesToNext && /* @__PURE__ */ jsx("span", { className: "shrink-0 opacity-50 leading-none ml-0.5 flex items-center", children: /* @__PURE__ */ jsx(CaretRightIcon, { size: 10, weight: "bold" }) })
10399
+ ] })
10400
+ }
10401
+ )
10402
+ }
10403
+ ) }),
10404
+ /* @__PURE__ */ jsxs(TooltipContentBase, { side: "top", children: [
10405
+ /* @__PURE__ */ jsx("p", { className: "font-semibold truncate max-w-[200px]", children: event.title }),
10406
+ /* @__PURE__ */ jsx("p", { className: "opacity-80 mt-0.5 leading-snug", children: formatDuration(event) }),
10407
+ event.location && /* @__PURE__ */ jsxs("p", { className: "opacity-60 mt-0.5 truncate text-[11px] max-w-[200px]", children: [
10408
+ /* @__PURE__ */ jsx(MapPinIcon, { size: 15 }),
10409
+ " ",
10410
+ event.location
10411
+ ] })
10412
+ ] })
10413
+ ] })
10414
+ },
10415
+ `bar-${event.id}-w${weekIndex}`
10416
+ );
10417
+ }) });
10418
+ }
10190
10419
  function MonthViewAgenda({
10191
10420
  currentDate,
10192
10421
  events,
@@ -10200,13 +10429,14 @@ function MonthViewAgenda({
10200
10429
  const calendarEnd = endOfWeek(monthEnd, { weekStartsOn: 0 });
10201
10430
  return eachDayOfInterval({ end: calendarEnd, start: calendarStart });
10202
10431
  }, [currentDate]);
10203
- const weekdays = useMemo(() => {
10204
- return Array.from({ length: 7 }).map((_, i) => {
10432
+ const weekdays = useMemo(
10433
+ () => Array.from({ length: 7 }).map((_, i) => {
10205
10434
  const date = addDays(startOfWeek(/* @__PURE__ */ new Date(), { weekStartsOn: 0 }), i);
10206
10435
  const short = format(date, "EEE", { locale: ptBR });
10207
10436
  return short.charAt(0).toUpperCase() + short.slice(1);
10208
- });
10209
- }, []);
10437
+ }),
10438
+ []
10439
+ );
10210
10440
  const weeks = useMemo(() => {
10211
10441
  const result = [];
10212
10442
  let week = [];
@@ -10219,11 +10449,24 @@ function MonthViewAgenda({
10219
10449
  }
10220
10450
  return result;
10221
10451
  }, [days]);
10222
- const handleEventClick = (event, e) => {
10223
- e.stopPropagation();
10224
- onEventSelect(event, e);
10225
- };
10452
+ const todayColIndex = useMemo(() => (/* @__PURE__ */ new Date()).getDay(), []);
10226
10453
  const [isMounted, setIsMounted] = useState(false);
10454
+ const [hoveredEventId, setHoveredEventId] = useState(null);
10455
+ const hoverLeaveTimerRef = useRef(null);
10456
+ const handleHover = useCallback((id) => {
10457
+ if (id !== null) {
10458
+ if (hoverLeaveTimerRef.current) {
10459
+ clearTimeout(hoverLeaveTimerRef.current);
10460
+ hoverLeaveTimerRef.current = null;
10461
+ }
10462
+ setHoveredEventId(id);
10463
+ } else {
10464
+ hoverLeaveTimerRef.current = setTimeout(() => {
10465
+ setHoveredEventId(null);
10466
+ hoverLeaveTimerRef.current = null;
10467
+ }, 150);
10468
+ }
10469
+ }, []);
10227
10470
  const { contentRef, getVisibleEventCount } = useEventVisibilityAgenda({
10228
10471
  eventGap: EventGapAgenda,
10229
10472
  eventHeight: EventHeightAgenda
@@ -10231,202 +10474,221 @@ function MonthViewAgenda({
10231
10474
  useEffect(() => {
10232
10475
  setIsMounted(true);
10233
10476
  }, []);
10477
+ const eventsWithStart = useMemo(
10478
+ () => events.filter((ev) => {
10479
+ try {
10480
+ if (ev.start == null) return false;
10481
+ const t = ev.start instanceof Date ? ev.start.getTime() : new Date(String(ev.start)).getTime();
10482
+ return !isNaN(t);
10483
+ } catch {
10484
+ return false;
10485
+ }
10486
+ }),
10487
+ [events]
10488
+ );
10489
+ const handleEventClick = (event, e) => {
10490
+ e.stopPropagation();
10491
+ onEventSelect(event, e);
10492
+ };
10234
10493
  return /* @__PURE__ */ jsxs("div", { className: "contents", "data-slot": "month-view", children: [
10235
- /* @__PURE__ */ jsx("div", { className: "grid grid-cols-7 border-border/70 border-b", children: weekdays.map((day) => /* @__PURE__ */ jsxs(
10236
- "div",
10237
- {
10238
- className: "py-1 px-1 text-center text-muted-foreground/70 text-xs uppercase sm:tracking-wide bg-muted/5 leading-none",
10239
- children: [
10240
- /* @__PURE__ */ jsx("span", { className: "hidden sm:inline", children: day }),
10241
- /* @__PURE__ */ jsx("span", { className: "inline sm:hidden", children: day.charAt(0) })
10242
- ]
10243
- },
10244
- day
10245
- )) }),
10246
- /* @__PURE__ */ jsx("div", { className: "grid flex-1 auto-rows-fr", children: weeks.map((week, weekIndex) => /* @__PURE__ */ jsx(
10247
- "div",
10248
- {
10249
- className: "grid grid-cols-7 [&:last-child>*]:border-b-0",
10250
- children: week.map((day, dayIndex) => {
10251
- if (!day) return null;
10252
- const eventsWithStart = events.filter((ev) => {
10253
- try {
10254
- if (ev.start == null) return false;
10255
- const t = ev.start instanceof Date ? ev.start.getTime() : new Date(String(ev.start)).getTime();
10256
- return !isNaN(t);
10257
- } catch {
10258
- return false;
10259
- }
10260
- });
10261
- const dayEvents = getEventsForDayAgenda(eventsWithStart, day);
10262
- const spanningEvents = getSpanningEventsForDayAgenda(
10263
- eventsWithStart,
10264
- day
10265
- );
10266
- const isCurrentMonth = isSameMonth(day, currentDate);
10267
- const cellId = `month-cell-${day.toISOString()}`;
10268
- const allDayEvents = [...spanningEvents, ...dayEvents];
10269
- const allEvents = getAllEventsForDayAgenda(events, day);
10270
- const isReferenceCell = weekIndex === 0 && dayIndex === 0;
10271
- const visibleCount = isMounted ? getVisibleEventCount(allDayEvents.length) : void 0;
10272
- const hasMore = visibleCount !== void 0 && allDayEvents.length > visibleCount;
10273
- const remainingCount = hasMore ? allDayEvents.length - visibleCount : 0;
10274
- return /* @__PURE__ */ jsx(
10275
- "div",
10276
- {
10277
- className: "group border-border/70 border-r border-b last:border-r-0 data-outside-cell:bg-muted/25 data-outside-cell:text-muted-foreground/70 hover:bg-muted/5 transition-colors p-1 sm:p-2",
10278
- "data-outside-cell": !isCurrentMonth || void 0,
10279
- "data-today": isToday(day) || void 0,
10280
- children: /* @__PURE__ */ jsxs(
10281
- DroppableCellAgenda,
10494
+ /* @__PURE__ */ jsx("div", { className: "grid grid-cols-7 border-border/70 border-b", children: weekdays.map((day, i) => {
10495
+ const isTodayCol = i === todayColIndex;
10496
+ return /* @__PURE__ */ jsxs(
10497
+ "div",
10498
+ {
10499
+ className: cn(
10500
+ "py-1.5 px-1 text-center text-xs uppercase sm:tracking-wide leading-none transition-colors",
10501
+ isTodayCol ? "bg-blue-50 dark:bg-blue-950/30 text-blue-600 dark:text-blue-400 font-bold" : "bg-muted/5 text-muted-foreground/70"
10502
+ ),
10503
+ children: [
10504
+ /* @__PURE__ */ jsx("span", { className: "hidden sm:inline", children: day }),
10505
+ /* @__PURE__ */ jsx("span", { className: "inline sm:hidden", children: day.charAt(0) })
10506
+ ]
10507
+ },
10508
+ day
10509
+ );
10510
+ }) }),
10511
+ /* @__PURE__ */ jsx("div", { className: "grid flex-1 auto-rows-fr", children: weeks.map((week, weekIndex) => {
10512
+ const multiDayBars = computeMultiDayBars(eventsWithStart, week);
10513
+ return /* @__PURE__ */ jsxs(
10514
+ "div",
10515
+ {
10516
+ className: "grid grid-cols-7 [&:last-child>*]:border-b-0 relative p-0",
10517
+ children: [
10518
+ week.map((day, dayIndex) => {
10519
+ if (!day) return null;
10520
+ const isTodayCell = isToday(day);
10521
+ const isTodayCol = dayIndex === todayColIndex;
10522
+ const isCurrentMonth = isSameMonth(day, currentDate);
10523
+ const cellId = `month-cell-${day.toISOString()}`;
10524
+ const dayEvents = getEventsForDayAgenda(eventsWithStart, day);
10525
+ const spanningEvents = getSpanningEventsForDayAgenda(
10526
+ eventsWithStart,
10527
+ day
10528
+ );
10529
+ const allDayEvents = [...spanningEvents, ...dayEvents];
10530
+ const allEvents = getAllEventsForDayAgenda(events, day);
10531
+ const isReferenceCell = weekIndex === 0 && dayIndex === 0;
10532
+ const dayBars = multiDayBars.filter(
10533
+ (b) => dayIndex >= b.colStart && dayIndex < b.colStart + b.colSpan
10534
+ );
10535
+ const dayMaxSlot = dayBars.length > 0 ? Math.max(...dayBars.map((b) => b.slot)) : -1;
10536
+ const dayMultiDayRowCount = dayMaxSlot + 1;
10537
+ const singleEvents = sortEventsAgenda(allDayEvents).filter(
10538
+ (e) => !isMultiDayEventAgenda(e)
10539
+ );
10540
+ const visibleCount = isMounted ? getVisibleEventCount(
10541
+ singleEvents.length + dayMultiDayRowCount
10542
+ ) : void 0;
10543
+ const visibleAfterMultiday = visibleCount !== void 0 ? Math.max(0, visibleCount - dayMultiDayRowCount) : void 0;
10544
+ const hasMore = visibleAfterMultiday !== void 0 && singleEvents.length > visibleAfterMultiday;
10545
+ const remainingCount = hasMore ? singleEvents.length - (visibleAfterMultiday ?? 0) : 0;
10546
+ return /* @__PURE__ */ jsx(
10547
+ "div",
10282
10548
  {
10283
- date: day,
10284
- id: cellId,
10285
- onClick: () => {
10286
- const startTime = new Date(day);
10287
- startTime.setHours(DefaultStartHourAgenda, 0, 0);
10288
- },
10289
- children: [
10290
- /* @__PURE__ */ jsx(
10291
- "div",
10292
- {
10293
- className: twMerge(
10294
- `mt-1 inline-flex w-6 h-6 sm:w-7 sm:h-7 items-center justify-center border rounded-md text-xs sm:text-sm font-semibold text-muted-foreground`,
10295
- isToday(day) ? "bg-blue-500 text-white" : ""
10549
+ "data-outside-cell": !isCurrentMonth || void 0,
10550
+ "data-today": isTodayCell || void 0,
10551
+ className: cn(
10552
+ "group border-border/70 border-r border-b last:border-r-0 transition-colors py-0.5 relative",
10553
+ !isCurrentMonth && "bg-muted/20 text-muted-foreground/60",
10554
+ isTodayCol && isCurrentMonth && !isTodayCell && "bg-blue-50/20 dark:bg-blue-950/10",
10555
+ isTodayCell && "bg-blue-50/50 dark:bg-blue-950/20",
10556
+ "hover:bg-muted/5"
10557
+ ),
10558
+ children: /* @__PURE__ */ jsxs(
10559
+ DroppableCellAgenda,
10560
+ {
10561
+ date: day,
10562
+ id: cellId,
10563
+ onClick: () => {
10564
+ const t = new Date(day);
10565
+ t.setHours(DefaultStartHourAgenda, 0, 0);
10566
+ },
10567
+ children: [
10568
+ /* @__PURE__ */ jsx(
10569
+ "div",
10570
+ {
10571
+ className: twMerge(
10572
+ "mt-1 inline-flex w-6 h-6 sm:w-7 sm:h-7 items-center justify-center rounded-lg text-xs sm:text-sm font-semibold border",
10573
+ isTodayCell ? "bg-blue-500 text-white border-blue-500 shadow-sm shadow-blue-400/40" : "text-muted-foreground border-transparent"
10574
+ ),
10575
+ children: format(day, "d")
10576
+ }
10296
10577
  ),
10297
- children: format(day, "d")
10298
- }
10299
- ),
10300
- /* @__PURE__ */ jsxs(
10301
- "div",
10302
- {
10303
- className: "min-h-[calc((var(--event-height)+var(--event-gap))*2)] sm:min-h-[calc((var(--event-height)+var(--event-gap))*3)] lg:min-h-[calc((var(--event-height)+var(--event-gap))*4)] px-1 py-0.5 sm:py-1",
10304
- ref: isReferenceCell ? contentRef : null,
10305
- children: [
10306
- sortEventsAgenda(allDayEvents).map((event, index) => {
10307
- const eventStart = getEventStartDate(event) ?? getEventEndDate(event) ?? /* @__PURE__ */ new Date();
10308
- const eventEnd = getEventEndDate(event) ?? getEventStartDate(event) ?? /* @__PURE__ */ new Date();
10309
- const isFirstDay = isSameDay(day, eventStart);
10310
- const isLastDay = isSameDay(day, eventEnd);
10311
- const isHidden = isMounted && visibleCount && index >= visibleCount;
10312
- if (!visibleCount) return null;
10313
- if (!isFirstDay) {
10314
- return /* @__PURE__ */ jsx(
10315
- "div",
10316
- {
10317
- "aria-hidden": isHidden ? "true" : void 0,
10318
- className: "aria-hidden:hidden",
10319
- children: /* @__PURE__ */ jsx(
10320
- EventItemAgenda,
10321
- {
10322
- event,
10323
- isFirstDay,
10324
- isLastDay,
10325
- onClick: (e) => handleEventClick(event, e),
10326
- view: "month",
10327
- children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-1 truncate text-[12px] text-foreground" })
10328
- }
10329
- )
10330
- },
10331
- `spanning-${event.id}-${day.toISOString().slice(0, 10)}`
10332
- );
10333
- }
10334
- const isMultiDay = !isLastDay;
10335
- return /* @__PURE__ */ jsx(
10336
- "div",
10337
- {
10338
- "aria-hidden": isHidden ? "true" : void 0,
10339
- className: "aria-hidden:hidden relative",
10340
- children: /* @__PURE__ */ jsx(
10341
- EventItemAgenda,
10578
+ /* @__PURE__ */ jsxs(
10579
+ "div",
10580
+ {
10581
+ ref: isReferenceCell ? contentRef : null,
10582
+ className: "min-h-[calc((var(--event-height)+var(--event-gap))*2)] sm:min-h-[calc((var(--event-height)+var(--event-gap))*3)] lg:min-h-[calc((var(--event-height)+var(--event-gap))*4)] px-1 py-0.5 sm:py-1",
10583
+ children: [
10584
+ Array.from({ length: dayMultiDayRowCount }).map(
10585
+ (_, si) => /* @__PURE__ */ jsx(
10586
+ "div",
10342
10587
  {
10343
- event,
10344
- isFirstDay,
10345
- isLastDay,
10346
- onClick: (e) => handleEventClick(event, e),
10347
- view: "month",
10348
- className: isMultiDay ? "overflow-visible" : "",
10349
- children: /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-1 sm:gap-2 truncate text-[12px] text-foreground relative z-10", children: [
10350
- !event.allDay && /* @__PURE__ */ jsx("span", { className: "truncate font-normal opacity-80 text-[10px] sm:text-[11px] bg-white/10 px-1 py-0.5 rounded-full", children: format(eventStart, "HH:mm") }),
10351
- /* @__PURE__ */ jsx(
10352
- "span",
10353
- {
10354
- className: `font-medium text-xs sm:text-sm ${isMultiDay ? "whitespace-nowrap" : "truncate"}`,
10355
- children: event.title
10356
- }
10357
- )
10358
- ] })
10359
- }
10588
+ "aria-hidden": "true",
10589
+ className: "mt-[var(--event-gap)] h-[var(--event-height)] w-full",
10590
+ style: { opacity: 0, pointerEvents: "none" }
10591
+ },
10592
+ `spacer-${si}`
10360
10593
  )
10361
- },
10362
- event.id
10363
- );
10364
- }),
10365
- hasMore && /* @__PURE__ */ jsxs(PopoverBase, { modal: true, children: [
10366
- /* @__PURE__ */ jsx(PopoverTriggerBase, { asChild: true, children: /* @__PURE__ */ jsxs(
10367
- "button",
10368
- {
10369
- className: "mt-[var(--event-gap)] flex h-[var(--event-height)] w-full select-none items-center overflow-hidden px-2 text-left text-[10px] text-muted-foreground outline-none backdrop-blur-md rounded-md transition hover:bg-muted/60 hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 sm:text-xs",
10370
- onClick: (e) => e.stopPropagation(),
10371
- type: "button",
10372
- "aria-label": `Show ${remainingCount} more events on ${format(
10373
- day,
10374
- "PPP",
10375
- { locale: ptBR }
10376
- )}`,
10377
- children: [
10378
- /* @__PURE__ */ jsxs("span", { className: "font-medium", children: [
10379
- "+ ",
10380
- remainingCount
10381
- ] }),
10382
- /* @__PURE__ */ jsx("span", { className: "sr-only", children: " more" })
10383
- ]
10384
- }
10385
- ) }),
10386
- /* @__PURE__ */ jsx(
10387
- PopoverContentBase,
10388
- {
10389
- align: "center",
10390
- className: "max-w-52 p-3",
10391
- style: {
10392
- "--event-height": `${EventHeightAgenda}px`
10393
- },
10394
- children: /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
10395
- /* @__PURE__ */ jsx("div", { className: "font-medium text-sm", children: format(day, "EEE d", { locale: ptBR }) }),
10396
- /* @__PURE__ */ jsx("div", { className: "space-y-1", children: sortEventsAgenda(allEvents).map((event) => {
10397
- const eventStart = getEventStartDate(event) ?? getEventEndDate(event) ?? /* @__PURE__ */ new Date();
10398
- const eventEnd = getEventEndDate(event) ?? getEventStartDate(event) ?? /* @__PURE__ */ new Date();
10399
- const isFirstDay = isSameDay(day, eventStart);
10400
- const isLastDay = isSameDay(day, eventEnd);
10401
- return /* @__PURE__ */ jsx(
10594
+ ),
10595
+ singleEvents.map((event, index) => {
10596
+ if (!isMounted) return null;
10597
+ const isHidden = visibleAfterMultiday !== void 0 && index >= visibleAfterMultiday;
10598
+ const eventStart = getEventStartDate(event) ?? getEventEndDate(event) ?? /* @__PURE__ */ new Date();
10599
+ return /* @__PURE__ */ jsx(
10600
+ "div",
10601
+ {
10602
+ "aria-hidden": isHidden ? "true" : void 0,
10603
+ className: "aria-hidden:hidden",
10604
+ children: /* @__PURE__ */ jsx(
10402
10605
  EventItemAgenda,
10403
10606
  {
10404
10607
  event,
10405
- isFirstDay,
10406
- isLastDay,
10608
+ isFirstDay: true,
10609
+ isLastDay: true,
10407
10610
  onClick: (e) => handleEventClick(event, e),
10408
- view: "month"
10409
- },
10410
- event.id
10411
- );
10412
- }) })
10413
- ] })
10414
- }
10415
- )
10416
- ] })
10417
- ]
10418
- }
10419
- )
10420
- ]
10421
- }
10422
- )
10423
- },
10424
- day.toString()
10425
- );
10426
- })
10427
- },
10428
- `week-${weekIndex}`
10429
- )) }),
10611
+ view: "month",
10612
+ children: /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-1 sm:gap-1.5 truncate text-[11px] relative z-10", children: [
10613
+ !event.allDay && /* @__PURE__ */ jsx("span", { className: "font-normal opacity-80 text-[10px] sm:text-[11px] bg-white/10 px-1 py-0.5 rounded-full", children: format(eventStart, "HH:mm") }),
10614
+ /* @__PURE__ */ jsx("span", { className: "font-semibold truncate", children: event.title })
10615
+ ] })
10616
+ }
10617
+ )
10618
+ },
10619
+ event.id
10620
+ );
10621
+ })
10622
+ ]
10623
+ }
10624
+ ),
10625
+ hasMore && /* @__PURE__ */ jsxs(PopoverBase, { modal: true, children: [
10626
+ /* @__PURE__ */ jsx(PopoverTriggerBase, { asChild: true, children: /* @__PURE__ */ jsx(
10627
+ "button",
10628
+ {
10629
+ type: "button",
10630
+ onClick: (e) => e.stopPropagation(),
10631
+ "aria-label": `Mostrar mais ${remainingCount} eventos`,
10632
+ className: "mt-[var(--event-gap)] flex h-[var(--event-height)] w-full select-none items-center overflow-hidden px-2 text-left text-[10px] text-muted-foreground outline-none rounded-md transition hover:bg-muted/60 hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 sm:text-xs",
10633
+ children: /* @__PURE__ */ jsxs("span", { className: "font-semibold", children: [
10634
+ "+ ",
10635
+ remainingCount,
10636
+ " ",
10637
+ /* @__PURE__ */ jsx("span", { className: "hidden sm:inline", children: "mais" })
10638
+ ] })
10639
+ }
10640
+ ) }),
10641
+ /* @__PURE__ */ jsx(
10642
+ PopoverContentBase,
10643
+ {
10644
+ align: "center",
10645
+ className: "max-w-52 p-3",
10646
+ style: {
10647
+ "--event-height": `${EventHeightAgenda}px`
10648
+ },
10649
+ children: /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
10650
+ /* @__PURE__ */ jsx("p", { className: "font-semibold text-sm", children: format(day, "EEE d", { locale: ptBR }) }),
10651
+ /* @__PURE__ */ jsx("div", { className: "space-y-1", children: sortEventsAgenda(allEvents).map((event) => {
10652
+ const s = getEventStartDate(event) ?? getEventEndDate(event) ?? /* @__PURE__ */ new Date();
10653
+ const e2 = getEventEndDate(event) ?? getEventStartDate(event) ?? /* @__PURE__ */ new Date();
10654
+ return /* @__PURE__ */ jsx(
10655
+ EventItemAgenda,
10656
+ {
10657
+ event,
10658
+ isFirstDay: isSameDay(day, s),
10659
+ isLastDay: isSameDay(day, e2),
10660
+ onClick: (e) => handleEventClick(event, e),
10661
+ view: "month"
10662
+ },
10663
+ event.id
10664
+ );
10665
+ }) })
10666
+ ] })
10667
+ }
10668
+ )
10669
+ ] })
10670
+ ]
10671
+ }
10672
+ )
10673
+ },
10674
+ day.toString()
10675
+ );
10676
+ }),
10677
+ /* @__PURE__ */ jsx(
10678
+ MultiDayOverlay,
10679
+ {
10680
+ bars: multiDayBars,
10681
+ weekIndex,
10682
+ hoveredEventId,
10683
+ onHover: handleHover,
10684
+ onEventSelect
10685
+ }
10686
+ )
10687
+ ]
10688
+ },
10689
+ `week-${weekIndex}`
10690
+ );
10691
+ }) }),
10430
10692
  /* @__PURE__ */ jsx(
10431
10693
  UndatedEvents,
10432
10694
  {
@@ -10459,7 +10721,8 @@ function DraggableEvent({
10459
10721
  isFirstDay = true,
10460
10722
  isLastDay = true,
10461
10723
  "aria-hidden": ariaHidden,
10462
- draggable = true
10724
+ draggable = true,
10725
+ totalCols
10463
10726
  }) {
10464
10727
  const { activeId } = useCalendarDndAgenda();
10465
10728
  const elementRef = useRef(null);
@@ -10544,7 +10807,8 @@ function DraggableEvent({
10544
10807
  onMouseDown: handleMouseDown,
10545
10808
  onTouchStart: handleTouchStart,
10546
10809
  showTime,
10547
- view
10810
+ view,
10811
+ totalCols
10548
10812
  }
10549
10813
  )
10550
10814
  }
@@ -10558,14 +10822,10 @@ function WeekViewAgenda({
10558
10822
  showUndatedEvents
10559
10823
  }) {
10560
10824
  const days = useMemo(() => {
10561
- const weekStart2 = startOfWeek(currentDate, { weekStartsOn: 0 });
10825
+ const weekStart = startOfWeek(currentDate, { weekStartsOn: 0 });
10562
10826
  const weekEnd = endOfWeek(currentDate, { weekStartsOn: 0 });
10563
- return eachDayOfInterval({ end: weekEnd, start: weekStart2 });
10827
+ return eachDayOfInterval({ end: weekEnd, start: weekStart });
10564
10828
  }, [currentDate]);
10565
- const weekStart = useMemo(
10566
- () => startOfWeek(currentDate, { weekStartsOn: 0 }),
10567
- [currentDate]
10568
- );
10569
10829
  const hours = useMemo(() => {
10570
10830
  const dayStart = startOfDay(currentDate);
10571
10831
  return eachHourOfInterval({
@@ -10598,6 +10858,25 @@ function WeekViewAgenda({
10598
10858
  });
10599
10859
  });
10600
10860
  }, [events, days]);
10861
+ const trueAllDayEvents = useMemo(
10862
+ () => allDayEvents.filter((e) => e.allDay),
10863
+ [allDayEvents]
10864
+ );
10865
+ const multiDayTimedEvents = useMemo(
10866
+ () => allDayEvents.filter((e) => !e.allDay),
10867
+ [allDayEvents]
10868
+ );
10869
+ const rowH = EventHeightAgenda + EventGapAgenda;
10870
+ const allDayBarData = useMemo(() => {
10871
+ const bars = computeMultiDayBars(trueAllDayEvents, days);
10872
+ const maxSlot = bars.length > 0 ? Math.max(...bars.map((b) => b.slot)) : 0;
10873
+ return { bars, sectionH: (maxSlot + 1) * rowH + EventGapAgenda * 2 };
10874
+ }, [trueAllDayEvents, days, rowH]);
10875
+ const multiDayBarData = useMemo(() => {
10876
+ const bars = computeMultiDayBars(multiDayTimedEvents, days);
10877
+ const maxSlot = bars.length > 0 ? Math.max(...bars.map((b) => b.slot)) : 0;
10878
+ return { bars, sectionH: (maxSlot + 1) * rowH + EventGapAgenda * 2 };
10879
+ }, [multiDayTimedEvents, days, rowH]);
10601
10880
  const processedDayEvents = useMemo(() => {
10602
10881
  const result = days.map((day) => {
10603
10882
  const dayEvents = events.filter((event) => {
@@ -10618,56 +10897,69 @@ function WeekViewAgenda({
10618
10897
  const bDuration = differenceInMinutes(bEnd, bStart);
10619
10898
  return bDuration - aDuration;
10620
10899
  });
10621
- const positionedEvents = [];
10622
10900
  const dayStart = startOfDay(day);
10623
10901
  const columns = [];
10902
+ const layouts = [];
10624
10903
  for (const event of sortedEvents) {
10625
10904
  const eventStart = getEventStartDate(event) ?? getEventEndDate(event) ?? /* @__PURE__ */ new Date();
10626
- const eventEnd = getEventEndDate(event) ?? getEventStartDate(event) ?? /* @__PURE__ */ new Date();
10905
+ const rawEnd = getEventEndDate(event) ?? getEventStartDate(event) ?? /* @__PURE__ */ new Date();
10906
+ const eventEnd = rawEnd <= eventStart ? new Date(eventStart.getTime() + 30 * 60 * 1e3) : rawEnd;
10627
10907
  const adjustedStart = isSameDay(day, eventStart) ? eventStart : dayStart;
10628
10908
  const adjustedEnd = isSameDay(day, eventEnd) ? eventEnd : addHours(dayStart, 24);
10629
10909
  const startHour = getHours(adjustedStart) + getMinutes(adjustedStart) / 60;
10630
10910
  const endHour = getHours(adjustedEnd) + getMinutes(adjustedEnd) / 60;
10631
10911
  const top = (startHour - StartHour) * WeekCellsHeightAgenda;
10632
- const height = (endHour - startHour) * WeekCellsHeightAgenda;
10633
- let columnIndex = 0;
10634
- let placed = false;
10635
- while (!placed) {
10636
- const col = columns[columnIndex] || [];
10637
- if (col.length === 0) {
10638
- columns[columnIndex] = col;
10639
- placed = true;
10640
- } else {
10641
- const overlaps = col.some((c) => {
10642
- const cStart = getEventStartDate(c.event) ?? getEventEndDate(c.event) ?? /* @__PURE__ */ new Date();
10643
- const cEnd = getEventEndDate(c.event) ?? getEventStartDate(c.event) ?? /* @__PURE__ */ new Date();
10644
- return areIntervalsOverlapping(
10645
- { end: adjustedEnd, start: adjustedStart },
10646
- { end: cEnd, start: cStart }
10647
- );
10648
- });
10649
- if (!overlaps) {
10650
- placed = true;
10651
- } else {
10652
- columnIndex++;
10653
- }
10654
- }
10912
+ const height = Math.max(
10913
+ (endHour - startHour) * WeekCellsHeightAgenda,
10914
+ 24
10915
+ );
10916
+ let col = 0;
10917
+ while (true) {
10918
+ const colSlots = columns[col] ?? [];
10919
+ const hasConflict = colSlots.some(
10920
+ (slot) => areIntervalsOverlapping(
10921
+ { start: adjustedStart, end: adjustedEnd },
10922
+ { start: slot.start, end: slot.end },
10923
+ { inclusive: false }
10924
+ )
10925
+ );
10926
+ if (!hasConflict) break;
10927
+ col++;
10655
10928
  }
10656
- const currentColumn = columns[columnIndex] || [];
10657
- columns[columnIndex] = currentColumn;
10658
- currentColumn.push({ end: adjustedEnd, event });
10659
- const width = columnIndex === 0 ? 1 : 0.9;
10660
- const left = columnIndex === 0 ? 0 : columnIndex * 0.1;
10661
- positionedEvents.push({
10929
+ if (!columns[col]) columns[col] = [];
10930
+ columns[col].push({ start: adjustedStart, end: adjustedEnd });
10931
+ layouts.push({
10662
10932
  event,
10663
- height,
10664
- left,
10933
+ adjustedStart,
10934
+ adjustedEnd,
10665
10935
  top,
10666
- width,
10667
- zIndex: 10 + columnIndex
10936
+ height,
10937
+ col,
10938
+ totalCols: 0
10668
10939
  });
10669
10940
  }
10670
- return positionedEvents;
10941
+ for (const layout of layouts) {
10942
+ let maxCol = layout.col;
10943
+ for (const other of layouts) {
10944
+ if (other === layout) continue;
10945
+ if (areIntervalsOverlapping(
10946
+ { start: layout.adjustedStart, end: layout.adjustedEnd },
10947
+ { start: other.adjustedStart, end: other.adjustedEnd },
10948
+ { inclusive: false }
10949
+ )) {
10950
+ maxCol = Math.max(maxCol, other.col);
10951
+ }
10952
+ }
10953
+ layout.totalCols = maxCol + 1;
10954
+ }
10955
+ return layouts.map(({ event, top, height, col, totalCols }) => ({
10956
+ event,
10957
+ top,
10958
+ height,
10959
+ left: col / totalCols,
10960
+ width: 1 / totalCols,
10961
+ zIndex: 10 + col
10962
+ }));
10671
10963
  });
10672
10964
  return result;
10673
10965
  }, [days, events]);
@@ -10677,178 +10969,476 @@ function WeekViewAgenda({
10677
10969
  };
10678
10970
  const showAllDaySection = allDayEvents.length > 0;
10679
10971
  const { currentTimePosition, currentTimeVisible } = useCurrentTimeIndicatorAgenda(currentDate, "week");
10680
- return /* @__PURE__ */ jsxs("div", { className: "flex h-full flex-col", "data-slot": "week-view", children: [
10681
- /* @__PURE__ */ jsxs("div", { className: "sticky top-0 z-30 grid grid-cols-8 border-border/70 border-b bg-background", children: [
10682
- /* @__PURE__ */ jsx("div", { className: "py-2 text-center text-muted-foreground/70 text-sm", children: /* @__PURE__ */ jsx("span", { className: "max-[479px]:sr-only", children: format(/* @__PURE__ */ new Date(), "O") }) }),
10683
- days.map((day) => /* @__PURE__ */ jsxs(
10684
- "div",
10685
- {
10686
- className: "py-2 text-center text-muted-foreground/70 text-sm data-today:font-medium data-today:text-foreground",
10687
- "data-today": isToday(day) || void 0,
10688
- children: [
10689
- /* @__PURE__ */ jsxs("span", { "aria-hidden": "true", className: "sm:hidden", children: [
10690
- format(day, "EEE", { locale: ptBR })[0],
10691
- " ",
10692
- format(day, "d", { locale: ptBR })
10693
- ] }),
10694
- /* @__PURE__ */ jsx("span", { className: "max-sm:hidden", children: format(day, "EEE dd", { locale: ptBR }) })
10695
- ]
10696
- },
10697
- day.toString()
10698
- ))
10699
- ] }),
10700
- showAllDaySection && /* @__PURE__ */ jsx("div", { className: "border-border/70 border-b bg-muted/50", children: /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-8", children: [
10701
- /* @__PURE__ */ jsx("div", { className: "relative border-border/70 border-r", children: /* @__PURE__ */ jsx("span", { className: "absolute bottom-0 left-0 h-6 w-16 max-w-full pe-2 text-right text-[10px] text-muted-foreground/70 sm:pe-4 sm:text-xs", children: "Todo Dia" }) }),
10702
- days.map((day, dayIndex) => {
10703
- const dayAllDayEvents = allDayEvents.filter((event) => {
10704
- const eventStart = getEventStartDate(event);
10705
- const eventEnd = getEventEndDate(event) ?? getEventStartDate(event);
10706
- if (!eventStart && !eventEnd) return false;
10707
- return eventStart && isSameDay(day, eventStart) || eventStart && eventEnd && day > eventStart && day < eventEnd || eventEnd && isSameDay(day, eventEnd);
10708
- });
10709
- return /* @__PURE__ */ jsx(
10972
+ return /* @__PURE__ */ jsxs("div", { className: "flex h-full flex-col overflow-hidden", "data-slot": "week-view", children: [
10973
+ /* @__PURE__ */ jsx("div", { className: "flex-1 overflow-auto", children: /* @__PURE__ */ jsxs("div", { className: "min-w-[600px] sm:min-w-full flex flex-col h-full", children: [
10974
+ /* @__PURE__ */ jsxs("div", { className: "sticky top-0 z-30 grid grid-cols-8 border-border/70 border-b bg-background", children: [
10975
+ /* @__PURE__ */ jsx("div", { className: "py-2 text-center text-muted-foreground/70 text-[10px] sm:text-sm", children: /* @__PURE__ */ jsx("span", { className: "max-[479px]:sr-only", children: format(/* @__PURE__ */ new Date(), "O") }) }),
10976
+ days.map((day) => /* @__PURE__ */ jsxs(
10710
10977
  "div",
10711
10978
  {
10712
- className: "relative border-border/70 border-r p-1 last:border-r-0",
10979
+ className: "py-2 text-center text-muted-foreground/70 text-[10px] sm:text-sm data-today:font-medium data-today:text-foreground",
10713
10980
  "data-today": isToday(day) || void 0,
10714
- children: dayAllDayEvents.map((event) => {
10715
- const eventStart = getEventStartDate(event);
10716
- const eventEnd = getEventEndDate(event) ?? getEventStartDate(event);
10717
- const isFirstDay = eventStart ? isSameDay(day, eventStart) : false;
10718
- const isLastDay = eventEnd ? isSameDay(day, eventEnd) : false;
10719
- const isFirstVisibleDay = eventStart ? dayIndex === 0 && isBefore(eventStart, weekStart) : false;
10720
- const shouldShowTitle = isFirstDay || isFirstVisibleDay;
10721
- return /* @__PURE__ */ jsx(
10722
- EventItemAgenda,
10723
- {
10724
- event,
10725
- isFirstDay,
10726
- isLastDay,
10727
- onClick: (e) => handleEventClick(event, e),
10728
- view: "month",
10729
- children: /* @__PURE__ */ jsx(
10730
- "div",
10731
- {
10732
- "aria-hidden": !shouldShowTitle,
10733
- className: cn(
10734
- "truncate",
10735
- !shouldShowTitle && "invisible"
10736
- ),
10737
- children: event.title
10738
- }
10739
- )
10740
- },
10741
- `spanning-${event.id}`
10742
- );
10743
- })
10981
+ children: [
10982
+ /* @__PURE__ */ jsxs("span", { "aria-hidden": "true", className: "sm:hidden", children: [
10983
+ format(day, "EEE", { locale: ptBR })[0],
10984
+ " ",
10985
+ format(day, "d", { locale: ptBR })
10986
+ ] }),
10987
+ /* @__PURE__ */ jsx("span", { className: "hidden sm:inline md:hidden", children: format(day, "EEE d", { locale: ptBR }) }),
10988
+ /* @__PURE__ */ jsx("span", { className: "max-md:hidden", children: format(day, "EEE dd", { locale: ptBR }) })
10989
+ ]
10744
10990
  },
10745
10991
  day.toString()
10746
- );
10747
- })
10748
- ] }) }),
10749
- /* @__PURE__ */ jsxs("div", { className: "grid flex-1 grid-cols-8 overflow-hidden", children: [
10750
- /* @__PURE__ */ jsx("div", { className: "grid auto-cols-fr border-border/70 border-r", children: hours.map((hour, index) => /* @__PURE__ */ jsx(
10751
- "div",
10752
- {
10753
- className: "relative min-h-[var(--week-cells-height)] border-border/70 border-b last:border-b-0",
10754
- children: index > 0 && /* @__PURE__ */ jsx("span", { className: "-top-3 absolute left-0 flex h-6 w-16 max-w-full items-center justify-end bg-background pe-2 text-[10px] text-muted-foreground/70 sm:pe-4 sm:text-xs", children: format(hour, "HH:mm") })
10755
- },
10756
- hour.toString()
10757
- )) }),
10758
- days.map((day, dayIndex) => /* @__PURE__ */ jsxs(
10759
- "div",
10760
- {
10761
- className: "relative grid auto-cols-fr border-border/70 border-r last:border-r-0",
10762
- "data-today": isToday(day) || void 0,
10763
- children: [
10764
- (processedDayEvents[dayIndex] ?? []).map((positionedEvent) => /* @__PURE__ */ jsx(
10765
- "div",
10766
- {
10767
- className: "absolute z-10 px-0.5",
10768
- onClick: (e) => e.stopPropagation(),
10769
- style: {
10770
- height: `${positionedEvent.height}px`,
10771
- left: `${positionedEvent.left * 100}%`,
10772
- top: `${positionedEvent.top}px`,
10773
- width: `${positionedEvent.width * 100}%`,
10774
- zIndex: positionedEvent.zIndex
10775
- },
10776
- children: /* @__PURE__ */ jsx("div", { className: "size-full", children: /* @__PURE__ */ jsx(
10777
- DraggableEvent,
10778
- {
10779
- event: positionedEvent.event,
10780
- height: positionedEvent.height,
10781
- onClick: (e) => handleEventClick(positionedEvent.event, e),
10782
- draggable: false,
10783
- showTime: true,
10784
- view: "week"
10785
- }
10786
- ) })
10787
- },
10788
- positionedEvent.event.id
10789
- )),
10790
- currentTimeVisible && isToday(day) && /* @__PURE__ */ jsx(
10791
- "div",
10792
- {
10793
- className: "pointer-events-none absolute right-0 left-0 z-20",
10794
- style: { top: `${currentTimePosition}%` },
10795
- children: /* @__PURE__ */ jsxs("div", { className: "relative flex items-center", children: [
10796
- /* @__PURE__ */ jsx("div", { className: "-left-1 absolute h-2 w-2 rounded-full bg-primary" }),
10797
- /* @__PURE__ */ jsx("div", { className: "h-[2px] w-full bg-primary" })
10798
- ] })
10799
- }
10992
+ ))
10993
+ ] }),
10994
+ showAllDaySection && /* @__PURE__ */ jsxs("div", { className: "border-border/70 border-b bg-muted/50", children: [
10995
+ trueAllDayEvents.length > 0 && /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-8", children: [
10996
+ /* @__PURE__ */ jsx("div", { className: "relative border-border/70 border-r", children: /* @__PURE__ */ jsx("span", { className: "absolute bottom-0 left-0 h-6 w-16 max-w-full pe-2 text-right text-[10px] text-muted-foreground/70 sm:pe-4 sm:text-xs", children: "Todo dia" }) }),
10997
+ /* @__PURE__ */ jsxs(
10998
+ "div",
10999
+ {
11000
+ className: "col-span-7 relative",
11001
+ style: { height: allDayBarData.sectionH },
11002
+ children: [
11003
+ /* @__PURE__ */ jsx("div", { className: "absolute inset-0 grid grid-cols-7 pointer-events-none", children: days.map((day) => /* @__PURE__ */ jsx(
11004
+ "div",
11005
+ {
11006
+ className: "border-r last:border-r-0 border-border/70",
11007
+ "data-today": isToday(day) || void 0
11008
+ },
11009
+ day.toString()
11010
+ )) }),
11011
+ allDayBarData.bars.map((bar) => {
11012
+ const {
11013
+ event,
11014
+ colStart,
11015
+ colSpan,
11016
+ isFirstDay,
11017
+ isLastDay,
11018
+ slot
11019
+ } = bar;
11020
+ const showTitle = isFirstDay || !isFirstDay && colStart === 0;
11021
+ return /* @__PURE__ */ jsx(
11022
+ "div",
11023
+ {
11024
+ className: "absolute px-0.5",
11025
+ style: {
11026
+ left: `calc(${colStart / 7 * 100}% + 2px)`,
11027
+ width: `calc(${colSpan / 7 * 100}% - 4px)`,
11028
+ top: EventGapAgenda + slot * rowH,
11029
+ height: EventHeightAgenda
11030
+ },
11031
+ children: /* @__PURE__ */ jsx(
11032
+ EventItemAgenda,
11033
+ {
11034
+ event,
11035
+ isFirstDay,
11036
+ isLastDay,
11037
+ onClick: (e) => {
11038
+ e.stopPropagation();
11039
+ handleEventClick(event, e);
11040
+ },
11041
+ view: "month",
11042
+ className: "h-full",
11043
+ children: /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-1 min-w-0 w-full", children: [
11044
+ !isFirstDay && colStart === 0 && /* @__PURE__ */ jsx("span", { className: "shrink-0 text-[11px] font-bold opacity-60", children: /* @__PURE__ */ jsx(CaretLeftIcon$1, {}) }),
11045
+ showTitle && /* @__PURE__ */ jsx("span", { className: "truncate text-xs font-medium", children: event.title }),
11046
+ !isLastDay && colStart + colSpan === 7 && /* @__PURE__ */ jsx("span", { className: "shrink-0 ml-auto text-[11px] font-bold opacity-60", children: /* @__PURE__ */ jsx(CaretRightIcon$1, {}) })
11047
+ ] })
11048
+ }
11049
+ )
11050
+ },
11051
+ event.id
11052
+ );
11053
+ })
11054
+ ]
11055
+ }
11056
+ )
11057
+ ] }),
11058
+ multiDayTimedEvents.length > 0 && /* @__PURE__ */ jsxs(
11059
+ "div",
11060
+ {
11061
+ className: cn(
11062
+ "grid grid-cols-8",
11063
+ trueAllDayEvents.length > 0 && "border-t border-border/40"
10800
11064
  ),
10801
- hours.map((hour) => {
10802
- const hourValue = getHours(hour);
10803
- return /* @__PURE__ */ jsx(
11065
+ children: [
11066
+ /* @__PURE__ */ jsx("div", { className: "relative border-border/70 border-r", children: /* @__PURE__ */ jsx("span", { className: "absolute bottom-0 left-0 h-6 w-16 max-w-full px-1 text-muted-foreground/70 sm:text-xs", children: "Evento" }) }),
11067
+ /* @__PURE__ */ jsxs(
10804
11068
  "div",
10805
11069
  {
10806
- className: "relative min-h-[var(--week-cells-height)] border-border/70 border-b last:border-b-0",
10807
- children: [0, 1, 2, 3].map((quarter) => {
10808
- const quarterHourTime = hourValue + quarter * 0.25;
10809
- return /* @__PURE__ */ jsx(
10810
- DroppableCellAgenda,
11070
+ className: "col-span-7 relative",
11071
+ style: { height: multiDayBarData.sectionH },
11072
+ children: [
11073
+ /* @__PURE__ */ jsx("div", { className: "absolute inset-0 grid grid-cols-7 pointer-events-none", children: days.map((day) => /* @__PURE__ */ jsx(
11074
+ "div",
10811
11075
  {
10812
- className: cn(
10813
- "absolute h-[calc(var(--week-cells-height)/4)] w-full",
10814
- quarter === 0 && "top-0",
10815
- quarter === 1 && "top-[calc(var(--week-cells-height)/4)]",
10816
- quarter === 2 && "top-[calc(var(--week-cells-height)/4*2)]",
10817
- quarter === 3 && "top-[calc(var(--week-cells-height)/4*)]"
10818
- ),
10819
- date: day,
10820
- id: `week-cell-${day.toISOString()}-${quarterHourTime}`,
10821
- onClick: () => {
10822
- const startTime = new Date(day);
10823
- startTime.setHours(hourValue);
10824
- startTime.setMinutes(quarter * 15);
10825
- if (onEventCreate) onEventCreate(startTime);
11076
+ className: "border-r last:border-r-0 border-border/70",
11077
+ "data-today": isToday(day) || void 0
11078
+ },
11079
+ day.toString()
11080
+ )) }),
11081
+ multiDayBarData.bars.map((bar) => {
11082
+ const {
11083
+ event,
11084
+ colStart,
11085
+ colSpan,
11086
+ isFirstDay,
11087
+ isLastDay,
11088
+ slot
11089
+ } = bar;
11090
+ const eventStart = getEventStartDate(event) ?? /* @__PURE__ */ new Date();
11091
+ const showTitle = isFirstDay || !isFirstDay && colStart === 0;
11092
+ return /* @__PURE__ */ jsx(
11093
+ "div",
11094
+ {
11095
+ className: "absolute px-0.5",
11096
+ style: {
11097
+ left: `calc(${colStart / 7 * 100}% + 2px)`,
11098
+ width: `calc(${colSpan / 7 * 100}% - 4px)`,
11099
+ top: EventGapAgenda + slot * rowH,
11100
+ height: EventHeightAgenda
11101
+ },
11102
+ children: /* @__PURE__ */ jsx(
11103
+ EventItemAgenda,
11104
+ {
11105
+ event,
11106
+ isFirstDay,
11107
+ isLastDay,
11108
+ onClick: (e) => {
11109
+ e.stopPropagation();
11110
+ handleEventClick(event, e);
11111
+ },
11112
+ view: "month",
11113
+ className: "h-full border-dashed",
11114
+ children: /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-1 min-w-0 w-full", children: [
11115
+ !isFirstDay && colStart === 0 && /* @__PURE__ */ jsx("span", { className: "shrink-0 text-[11px] font-bold opacity-60", children: /* @__PURE__ */ jsx(CaretLeftIcon$1, {}) }),
11116
+ showTitle && /* @__PURE__ */ jsxs(Fragment, { children: [
11117
+ isFirstDay && /* @__PURE__ */ jsx("span", { className: "font-normal opacity-80 text-[10px] sm:text-[11px] bg-white/10 px-1 py-0.5 rounded-full", children: format(eventStart, "HH:mm") }),
11118
+ /* @__PURE__ */ jsx("span", { className: "truncate text-xs font-medium", children: event.title }),
11119
+ isFirstDay && (() => {
11120
+ const evStart = getEventStartDate(event);
11121
+ const evEnd = getEventEndDate(event);
11122
+ if (!evStart || !evEnd) return null;
11123
+ const d = Math.round(
11124
+ (evEnd.getTime() - evStart.getTime()) / 864e5
11125
+ ) + 1;
11126
+ if (d < 2) return null;
11127
+ return /* @__PURE__ */ jsxs("span", { className: "shrink-0 inline-flex items-end font-bold leading-none px-1 py-0.5 text-[10px]", children: [
11128
+ d,
11129
+ "d"
11130
+ ] });
11131
+ })()
11132
+ ] }),
11133
+ !isLastDay && colStart + colSpan === 7 && /* @__PURE__ */ jsx("span", { className: "shrink-0 ml-auto text-[11px] font-bold opacity-60", children: /* @__PURE__ */ jsx(CaretRightIcon$1, {}) })
11134
+ ] })
11135
+ }
11136
+ )
10826
11137
  },
10827
- time: quarterHourTime
11138
+ event.id
11139
+ );
11140
+ })
11141
+ ]
11142
+ }
11143
+ )
11144
+ ]
11145
+ }
11146
+ )
11147
+ ] }),
11148
+ /* @__PURE__ */ jsxs("div", { className: "grid flex-1 grid-cols-8", children: [
11149
+ /* @__PURE__ */ jsx("div", { className: "grid auto-cols-fr border-border/70 border-r", children: hours.map((hour, index) => /* @__PURE__ */ jsx(
11150
+ "div",
11151
+ {
11152
+ className: "relative min-h-[var(--week-cells-height)] border-border/70 border-b last:border-b-0",
11153
+ children: index > 0 && /* @__PURE__ */ jsx("span", { className: "-top-3 absolute left-0 flex h-6 w-16 max-w-full items-center justify-end bg-background pe-1 sm:pe-4 text-[9px] sm:text-xs text-muted-foreground/70", children: format(hour, "HH:mm") })
11154
+ },
11155
+ hour.toString()
11156
+ )) }),
11157
+ days.map((day, dayIndex) => /* @__PURE__ */ jsxs(
11158
+ "div",
11159
+ {
11160
+ className: "relative grid auto-cols-fr border-border/70 border-r last:border-r-0",
11161
+ "data-today": isToday(day) || void 0,
11162
+ children: [
11163
+ (processedDayEvents[dayIndex] ?? []).map((positionedEvent) => {
11164
+ const evStart = getEventStartDate(positionedEvent.event);
11165
+ const evEnd = getEventEndDate(positionedEvent.event);
11166
+ const timeLabel = evStart ? evEnd ? `${format(evStart, "HH:mm")} \u2013 ${format(evEnd, "HH:mm")}` : format(evStart, "HH:mm") : void 0;
11167
+ return /* @__PURE__ */ jsx(TooltipProviderBase, { children: /* @__PURE__ */ jsxs(TooltipBase, { delayDuration: 250, children: [
11168
+ /* @__PURE__ */ jsx(
11169
+ "div",
11170
+ {
11171
+ className: "absolute z-10 px-0.5",
11172
+ onClick: (e) => e.stopPropagation(),
11173
+ style: {
11174
+ height: `${positionedEvent.height}px`,
11175
+ left: `${positionedEvent.left * 100}%`,
11176
+ top: `${positionedEvent.top}px`,
11177
+ width: `${positionedEvent.width * 100}%`,
11178
+ zIndex: positionedEvent.zIndex
10828
11179
  },
10829
- `${hour.toString()}-${quarter}`
10830
- );
10831
- })
10832
- },
10833
- hour.toString()
10834
- );
10835
- })
10836
- ]
10837
- },
10838
- day.toString()
10839
- ))
10840
- ] }),
11180
+ children: /* @__PURE__ */ jsx(TooltipTriggerBase, { asChild: true, children: /* @__PURE__ */ jsx("div", { className: "size-full", children: /* @__PURE__ */ jsx(
11181
+ DraggableEvent,
11182
+ {
11183
+ event: positionedEvent.event,
11184
+ height: positionedEvent.height,
11185
+ onClick: (e) => handleEventClick(positionedEvent.event, e),
11186
+ draggable: false,
11187
+ showTime: true,
11188
+ view: "week",
11189
+ totalCols: positionedEvent.totalCols
11190
+ }
11191
+ ) }) })
11192
+ }
11193
+ ),
11194
+ /* @__PURE__ */ jsxs(
11195
+ TooltipContentBase,
11196
+ {
11197
+ side: "right",
11198
+ sideOffset: 6,
11199
+ className: "max-w-[220px] space-y-0.5",
11200
+ children: [
11201
+ /* @__PURE__ */ jsx("p", { className: "font-semibold text-sm leading-snug", children: positionedEvent.event.title }),
11202
+ timeLabel && /* @__PURE__ */ jsx("p", { className: "text-xs opacity-90", children: timeLabel }),
11203
+ positionedEvent.event.location && /* @__PURE__ */ jsxs("p", { className: "text-xs flex items-center gap-2", children: [
11204
+ /* @__PURE__ */ jsx(MapPinIcon$1, { size: 15 }),
11205
+ " ",
11206
+ positionedEvent.event.location
11207
+ ] }),
11208
+ positionedEvent.event.description && /* @__PURE__ */ jsx("p", { className: "text-xs opacity-75 line-clamp-2", children: positionedEvent.event.description })
11209
+ ]
11210
+ }
11211
+ )
11212
+ ] }) }, positionedEvent.event.id);
11213
+ }),
11214
+ currentTimeVisible && isToday(day) && /* @__PURE__ */ jsx(
11215
+ "div",
11216
+ {
11217
+ className: "pointer-events-none absolute right-0 left-0 z-20",
11218
+ style: { top: `${currentTimePosition}%` },
11219
+ children: /* @__PURE__ */ jsxs("div", { className: "relative flex items-center", children: [
11220
+ /* @__PURE__ */ jsx("div", { className: "-left-1 absolute h-2 w-2 rounded-full bg-primary" }),
11221
+ /* @__PURE__ */ jsx("div", { className: "h-[2px] w-full bg-primary" })
11222
+ ] })
11223
+ }
11224
+ ),
11225
+ hours.map((hour) => {
11226
+ const hourValue = getHours(hour);
11227
+ return /* @__PURE__ */ jsx(
11228
+ "div",
11229
+ {
11230
+ className: "relative min-h-[var(--week-cells-height)] border-border/70 border-b last:border-b-0",
11231
+ children: [0, 1, 2, 3].map((quarter) => {
11232
+ const quarterHourTime = hourValue + quarter * 0.25;
11233
+ return /* @__PURE__ */ jsx(
11234
+ DroppableCellAgenda,
11235
+ {
11236
+ className: cn(
11237
+ "absolute h-[calc(var(--week-cells-height)/4)] w-full",
11238
+ quarter === 0 && "top-0",
11239
+ quarter === 1 && "top-[calc(var(--week-cells-height)/4)]",
11240
+ quarter === 2 && "top-[calc(var(--week-cells-height)/4*2)]",
11241
+ quarter === 3 && "top-[calc(var(--week-cells-height)/4*3)]"
11242
+ ),
11243
+ date: day,
11244
+ id: `week-cell-${day.toISOString()}-${quarterHourTime}`,
11245
+ onClick: () => {
11246
+ const startTime = new Date(day);
11247
+ startTime.setHours(hourValue);
11248
+ startTime.setMinutes(quarter * 15);
11249
+ if (onEventCreate) onEventCreate(startTime);
11250
+ },
11251
+ time: quarterHourTime
11252
+ },
11253
+ `${hour.toString()}-${quarter}`
11254
+ );
11255
+ })
11256
+ },
11257
+ hour.toString()
11258
+ );
11259
+ })
11260
+ ]
11261
+ },
11262
+ day.toString()
11263
+ ))
11264
+ ] })
11265
+ ] }) }),
10841
11266
  /* @__PURE__ */ jsx(
10842
11267
  UndatedEvents,
10843
11268
  {
10844
11269
  events,
10845
11270
  onEventSelect,
10846
11271
  show: showUndatedEvents,
10847
- className: "my-"
11272
+ className: "my-4"
10848
11273
  }
10849
11274
  )
10850
11275
  ] });
10851
11276
  }
11277
+ var colorBannerMap = {
11278
+ sky: "from-sky-400 to-sky-500",
11279
+ amber: "from-amber-400 to-amber-500",
11280
+ violet: "from-violet-400 to-violet-500",
11281
+ rose: "from-rose-400 to-rose-500",
11282
+ emerald: "from-emerald-400 to-emerald-500",
11283
+ orange: "from-orange-400 to-orange-500",
11284
+ green: "from-green-400 to-green-500",
11285
+ blue: "from-blue-400 to-blue-500",
11286
+ red: "from-red-400 to-red-500",
11287
+ purple: "from-purple-400 to-purple-500",
11288
+ indigo: "from-indigo-400 to-indigo-500",
11289
+ teal: "from-teal-400 to-teal-500",
11290
+ pink: "from-pink-400 to-pink-500",
11291
+ cyan: "from-cyan-400 to-cyan-500",
11292
+ lime: "from-lime-400 to-lime-500",
11293
+ fuchsia: "from-fuchsia-400 to-fuchsia-500"
11294
+ };
11295
+ function formatDuration2(minutes) {
11296
+ if (minutes <= 0) return "";
11297
+ const h = Math.floor(minutes / 60);
11298
+ const m = minutes % 60;
11299
+ if (h === 0) return `${m}min`;
11300
+ if (m === 0) return `${h}h`;
11301
+ return `${h}h ${m}min`;
11302
+ }
11303
+ function formatDateFull(date) {
11304
+ return format(date, "EEE',' d 'de' MMMM 'de' yyyy", { locale: ptBR });
11305
+ }
11306
+ function capitalize(s) {
11307
+ return s ? s.charAt(0).toUpperCase() + s.slice(1) : s;
11308
+ }
11309
+ function EventDetailModalAgenda({
11310
+ event,
11311
+ onClose
11312
+ }) {
11313
+ const [open, setOpen] = useState(true);
11314
+ if (!event) return null;
11315
+ const color = event.color ?? "sky";
11316
+ const bannerGradient = colorBannerMap[color] ?? colorBannerMap.sky;
11317
+ const startDate = getEventStartDate(event);
11318
+ const endDate = getEventEndDate(event);
11319
+ const isMultiDay = isMultiDayEventAgenda(event);
11320
+ const durationMinutes = startDate && endDate ? differenceInMinutes(endDate, startDate) : 0;
11321
+ const dateSection = (() => {
11322
+ if (!startDate) {
11323
+ return { primary: "Sem data definida", secondary: null, isAllDay: false };
11324
+ }
11325
+ if (event.allDay) {
11326
+ if (isMultiDay && endDate && !isSameDay(startDate, endDate)) {
11327
+ return {
11328
+ primary: `${capitalize(formatDateFull(startDate))}`,
11329
+ secondary: `${capitalize(formatDateFull(endDate))}`,
11330
+ isAllDay: true
11331
+ };
11332
+ }
11333
+ return {
11334
+ primary: capitalize(formatDateFull(startDate)),
11335
+ secondary: null,
11336
+ isAllDay: true
11337
+ };
11338
+ }
11339
+ if (isMultiDay && endDate) {
11340
+ const startStr = capitalize(
11341
+ format(startDate, "d MMM yyyy, HH:mm", { locale: ptBR })
11342
+ );
11343
+ const endStr = capitalize(
11344
+ format(endDate, "d MMM yyyy, HH:mm", { locale: ptBR })
11345
+ );
11346
+ return { primary: startStr, secondary: endStr, isAllDay: false };
11347
+ }
11348
+ const dateStr = capitalize(formatDateFull(startDate));
11349
+ const timeStr = endDate ? `${format(startDate, "HH:mm")} \u2013 ${format(endDate, "HH:mm")}` : format(startDate, "HH:mm");
11350
+ return { primary: dateStr, secondary: timeStr, isAllDay: false };
11351
+ })();
11352
+ return /* @__PURE__ */ jsx(
11353
+ DialogBase,
11354
+ {
11355
+ open,
11356
+ onOpenChange: (v) => {
11357
+ setOpen(v);
11358
+ if (!v) onClose?.();
11359
+ },
11360
+ children: /* @__PURE__ */ jsxs(DialogContentBase, { className: "p-0 overflow-hidden gap-0 border-none shadow-xl sm:max-w-md", children: [
11361
+ /* @__PURE__ */ jsxs(
11362
+ "div",
11363
+ {
11364
+ className: cn(
11365
+ "relative bg-gradient-to-tl w-full flex flex-col justify-end px-6 pt-12 pb-8 select-none transition-all duration-300",
11366
+ bannerGradient
11367
+ ),
11368
+ children: [
11369
+ /* @__PURE__ */ jsx("div", { className: "absolute top-4 left-6 flex items-center gap-2", children: dateSection.isAllDay ? /* @__PURE__ */ jsxs(Badge, { className: "bg-white/20 text-white backdrop-blur-md", children: [
11370
+ /* @__PURE__ */ jsx(SunIcon, { size: 12, weight: "bold" }),
11371
+ "Dia todo"
11372
+ ] }) : isMultiDay ? /* @__PURE__ */ jsxs(Badge, { className: "bg-white/20 text-white backdrop-blur-md", children: [
11373
+ /* @__PURE__ */ jsx(CalendarDotsIcon, { size: 12, weight: "bold" }),
11374
+ "Multi-dia"
11375
+ ] }) : durationMinutes > 0 ? /* @__PURE__ */ jsxs(Badge, { className: "bg-white/20 text-white backdrop-blur-md", children: [
11376
+ /* @__PURE__ */ jsx(ClockIcon, { size: 12, weight: "bold" }),
11377
+ formatDuration2(durationMinutes)
11378
+ ] }) : null }),
11379
+ /* @__PURE__ */ jsx("h2", { className: "text-2xl sm:text-3xl font-bold text-white leading-tight tracking-tight drop-shadow-md", children: event.title })
11380
+ ]
11381
+ }
11382
+ ),
11383
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-6 px-6 py-8 bg-background", children: [
11384
+ /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-4", children: [
11385
+ /* @__PURE__ */ jsx("div", { className: "p-2 rounded-lg bg-muted/50 border border-border", children: /* @__PURE__ */ jsx(
11386
+ CalendarDotsIcon,
11387
+ {
11388
+ size: 20,
11389
+ weight: "duotone",
11390
+ className: "text-primary"
11391
+ }
11392
+ ) }),
11393
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1", children: [
11394
+ /* @__PURE__ */ jsx("span", { className: "text-sm font-semibold text-foreground leading-none", children: dateSection.primary }),
11395
+ dateSection.secondary && /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2 text-sm text-muted-foreground mt-0.5", children: isMultiDay && !event.allDay || isMultiDay && dateSection.isAllDay ? /* @__PURE__ */ jsxs(Fragment, { children: [
11396
+ /* @__PURE__ */ jsx(
11397
+ ArrowRightIcon$1,
11398
+ {
11399
+ size: 12,
11400
+ className: "shrink-0 opacity-70"
11401
+ }
11402
+ ),
11403
+ /* @__PURE__ */ jsx("span", { className: "font-medium", children: dateSection.secondary })
11404
+ ] }) : /* @__PURE__ */ jsx("span", { className: "font-medium text-foreground/70", children: dateSection.secondary }) })
11405
+ ] })
11406
+ ] }),
11407
+ /* @__PURE__ */ jsx(SeparatorBase, { className: "opacity-50" }),
11408
+ event.location && /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-4", children: [
11409
+ /* @__PURE__ */ jsx("div", { className: "p-2 rounded-lg bg-muted/50 border border-border", children: /* @__PURE__ */ jsx(
11410
+ MapPinIcon,
11411
+ {
11412
+ size: 20,
11413
+ weight: "duotone",
11414
+ className: "text-primary"
11415
+ }
11416
+ ) }),
11417
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1", children: [
11418
+ /* @__PURE__ */ jsx("span", { className: "text-xs font-medium text-muted-foreground uppercase tracking-wider", children: "Localiza\xE7\xE3o" }),
11419
+ /* @__PURE__ */ jsx("span", { className: "text-sm text-foreground font-medium", children: event.location })
11420
+ ] })
11421
+ ] }),
11422
+ event.description && /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-4", children: [
11423
+ /* @__PURE__ */ jsx("div", { className: "p-2 rounded-lg bg-muted/50 border border-border", children: /* @__PURE__ */ jsx(
11424
+ AlignLeftIcon,
11425
+ {
11426
+ size: 20,
11427
+ weight: "duotone",
11428
+ className: "text-primary"
11429
+ }
11430
+ ) }),
11431
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1", children: [
11432
+ /* @__PURE__ */ jsx("span", { className: "text-xs font-medium text-muted-foreground uppercase tracking-wider", children: "Descri\xE7\xE3o" }),
11433
+ /* @__PURE__ */ jsx("div", { className: "text-sm text-muted-foreground leading-relaxed font-normal", children: event.description })
11434
+ ] })
11435
+ ] }),
11436
+ !event.location && !event.description && /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground/60 italic text-center py-2 border border-dashed border-border rounded-lg", children: "Nenhum detalhe adicional dispon\xEDvel." })
11437
+ ] })
11438
+ ] })
11439
+ }
11440
+ );
11441
+ }
10852
11442
  function AgendaView({
10853
11443
  currentDate,
10854
11444
  events,
@@ -11694,23 +12284,23 @@ function EventCalendar({
11694
12284
  });
11695
12285
  };
11696
12286
  const viewTitle = useMemo(() => {
11697
- const capitalize = (s) => s && s.length > 0 ? s.charAt(0).toUpperCase() + s.slice(1) : s;
12287
+ const capitalize2 = (s) => s && s.length > 0 ? s.charAt(0).toUpperCase() + s.slice(1) : s;
11698
12288
  if (view === "month") {
11699
- return capitalize(format(currentDate, "MMMM yyyy", { locale: ptBR }));
12289
+ return capitalize2(format(currentDate, "MMMM yyyy", { locale: ptBR }));
11700
12290
  }
11701
12291
  if (view === "week") {
11702
12292
  const start = startOfWeek(currentDate, { weekStartsOn: 1 });
11703
12293
  const end = endOfWeek(currentDate, { weekStartsOn: 1 });
11704
12294
  if (isSameMonth(start, end)) {
11705
- return capitalize(format(start, "MMMM yyyy", { locale: ptBR }));
12295
+ return capitalize2(format(start, "MMMM yyyy", { locale: ptBR }));
11706
12296
  }
11707
- const s1 = capitalize(format(start, "MMM", { locale: ptBR }));
11708
- const s2 = capitalize(format(end, "MMM yyyy", { locale: ptBR }));
12297
+ const s1 = capitalize2(format(start, "MMM", { locale: ptBR }));
12298
+ const s2 = capitalize2(format(end, "MMM yyyy", { locale: ptBR }));
11709
12299
  return `${s1} - ${s2}`;
11710
12300
  }
11711
12301
  if (view === "day") {
11712
12302
  const dayNum = format(currentDate, "d", { locale: ptBR });
11713
- const month = capitalize(format(currentDate, "MMMM", { locale: ptBR }));
12303
+ const month = capitalize2(format(currentDate, "MMMM", { locale: ptBR }));
11714
12304
  const year = format(currentDate, "yyyy", { locale: ptBR });
11715
12305
  const short = `${dayNum} de ${month} de ${year}`;
11716
12306
  const long = `${format(currentDate, "EEE", {
@@ -11726,13 +12316,13 @@ function EventCalendar({
11726
12316
  const start = currentDate;
11727
12317
  const end = addDays(currentDate, AgendaDaysToShow - 1);
11728
12318
  if (isSameMonth(start, end)) {
11729
- return capitalize(format(start, "MMMM yyyy", { locale: ptBR }));
12319
+ return capitalize2(format(start, "MMMM yyyy", { locale: ptBR }));
11730
12320
  }
11731
- const s1 = capitalize(format(start, "MMM", { locale: ptBR }));
11732
- const s2 = capitalize(format(end, "MMM yyyy", { locale: ptBR }));
12321
+ const s1 = capitalize2(format(start, "MMM", { locale: ptBR }));
12322
+ const s2 = capitalize2(format(end, "MMM yyyy", { locale: ptBR }));
11733
12323
  return `${s1} - ${s2}`;
11734
12324
  }
11735
- return capitalize(format(currentDate, "MMMM yyyy", { locale: ptBR }));
12325
+ return capitalize2(format(currentDate, "MMMM yyyy", { locale: ptBR }));
11736
12326
  }, [currentDate, view]);
11737
12327
  const calendarContent = /* @__PURE__ */ jsxs(Fragment, { children: [
11738
12328
  /* @__PURE__ */ jsxs(
@@ -13892,14 +14482,14 @@ var generateAdditionalColors = (baseColors, count) => {
13892
14482
  r /= 255;
13893
14483
  g /= 255;
13894
14484
  b /= 255;
13895
- const max = Math.max(r, g, b), min = Math.min(r, g, b);
14485
+ const max2 = Math.max(r, g, b), min2 = Math.min(r, g, b);
13896
14486
  let h = 0;
13897
14487
  let s = 0;
13898
- const l = (max + min) / 2;
13899
- if (max !== min) {
13900
- const d = max - min;
13901
- s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
13902
- switch (max) {
14488
+ const l = (max2 + min2) / 2;
14489
+ if (max2 !== min2) {
14490
+ const d = max2 - min2;
14491
+ s = l > 0.5 ? d / (2 - max2 - min2) : d / (max2 + min2);
14492
+ switch (max2) {
13903
14493
  case r:
13904
14494
  h = (g - b) / d + (g < b ? 6 : 0);
13905
14495
  break;
@@ -14016,25 +14606,25 @@ var computeNiceMax = (maxValue) => {
14016
14606
  return niceCeil(padded);
14017
14607
  };
14018
14608
  var getMaxDataValue = (data, keys) => {
14019
- let max = 0;
14609
+ let max2 = 0;
14020
14610
  for (const row of data) {
14021
14611
  for (const key of keys) {
14022
14612
  const v = row[key];
14023
- if (typeof v === "number" && Number.isFinite(v) && v > max) max = v;
14613
+ if (typeof v === "number" && Number.isFinite(v) && v > max2) max2 = v;
14024
14614
  }
14025
14615
  }
14026
- return max;
14616
+ return max2;
14027
14617
  };
14028
14618
  var getMinDataValue = (data, keys) => {
14029
- let min = 0;
14619
+ let min2 = 0;
14030
14620
  for (const row of data) {
14031
14621
  for (const key of keys) {
14032
14622
  const v = row[key];
14033
- if (typeof v === "number" && Number.isFinite(v) && v < min)
14034
- min = v;
14623
+ if (typeof v === "number" && Number.isFinite(v) && v < min2)
14624
+ min2 = v;
14035
14625
  }
14036
14626
  }
14037
- return min;
14627
+ return min2;
14038
14628
  };
14039
14629
  var computeChartWidth = (width, dataLength, series, niceMaxLeft, niceMaxRight) => {
14040
14630
  if (typeof width === "number") return width;
@@ -14080,8 +14670,8 @@ var createValueFormatter = (customFormatter, formatBR) => {
14080
14670
  });
14081
14671
  const prefixFormats = ["R$", "$", "\u20AC", "\xA3"];
14082
14672
  const suffixFormats = ["%", "kg", "km", "m", "L", "un", "t", "h", "min", "s"];
14083
- const getFormattedValue = (baseValue, format17) => {
14084
- const trimmedFormat = format17.trim();
14673
+ const getFormattedValue = (baseValue, format19) => {
14674
+ const trimmedFormat = format19.trim();
14085
14675
  if (prefixFormats.includes(trimmedFormat)) {
14086
14676
  return `${trimmedFormat} ${baseValue}`;
14087
14677
  }
@@ -14106,8 +14696,8 @@ var createValueFormatter = (customFormatter, formatBR) => {
14106
14696
  num = Number.isNaN(parsed) ? NaN : parsed;
14107
14697
  }
14108
14698
  const baseFormatted = formatBR && !Number.isNaN(num) ? nf.format(num) : String(formattedValue ?? value ?? "");
14109
- const format17 = propsDataKey && formatterMap[propsDataKey] ? formatterMap[propsDataKey] : "";
14110
- return format17 ? getFormattedValue(baseFormatted, format17) : baseFormatted;
14699
+ const format19 = propsDataKey && formatterMap[propsDataKey] ? formatterMap[propsDataKey] : "";
14700
+ return format19 ? getFormattedValue(baseFormatted, format19) : baseFormatted;
14111
14701
  };
14112
14702
  }
14113
14703
  if (typeof customFormatter === "function") {
@@ -18420,8 +19010,8 @@ var TimeSeries_default = TimeSeries;
18420
19010
  function NumericInput({
18421
19011
  value,
18422
19012
  onChange,
18423
- min,
18424
- max,
19013
+ min: min2,
19014
+ max: max2,
18425
19015
  label,
18426
19016
  className,
18427
19017
  error,
@@ -18438,21 +19028,21 @@ function NumericInput({
18438
19028
  if (!hasChanged || isLoading || disabled) return;
18439
19029
  onChange(internalValue);
18440
19030
  };
18441
- function handleNumberChange(value2, currentValue = 0, max2 = 9999999, min2 = 0) {
19031
+ function handleNumberChange(value2, currentValue = 0, max3 = 9999999, min3 = 0) {
18442
19032
  const numbersOnly = value2.replace(/\D/g, "");
18443
19033
  if (numbersOnly === "") {
18444
19034
  return 0;
18445
19035
  }
18446
19036
  const numValue = Number(numbersOnly);
18447
- if (numValue < min2) {
19037
+ if (numValue < min3) {
18448
19038
  if (tooltip_on_overflow) {
18449
- toast$1.warning("O valor deve ser maior que " + min2.toString());
19039
+ toast$1.warning("O valor deve ser maior que " + min3.toString());
18450
19040
  }
18451
- return min2;
19041
+ return min3;
18452
19042
  }
18453
- if (numValue > max2) {
19043
+ if (numValue > max3) {
18454
19044
  if (tooltip_on_overflow) {
18455
- toast$1.warning("O valor deve ser menor que " + max2.toString());
19045
+ toast$1.warning("O valor deve ser menor que " + max3.toString());
18456
19046
  }
18457
19047
  return currentValue;
18458
19048
  }
@@ -18474,8 +19064,8 @@ function NumericInput({
18474
19064
  const processedValue = handleNumberChange(
18475
19065
  e.currentTarget.value,
18476
19066
  internalValue,
18477
- max,
18478
- min
19067
+ max2,
19068
+ min2
18479
19069
  );
18480
19070
  setInternalValue(processedValue);
18481
19071
  },
@@ -19293,6 +19883,12 @@ function useMediaQuery(query) {
19293
19883
  }, [query]);
19294
19884
  return value;
19295
19885
  }
19886
+ var CRUD_ITEMS = [
19887
+ { id: "edit", label: "Editar", icon: PencilIcon },
19888
+ { id: "copy", label: "Copiar", icon: CopyIcon },
19889
+ { id: "download", label: "Baixar", icon: DownloadIcon },
19890
+ { id: "delete", label: "Excluir", icon: TrashIcon, color: "danger" }
19891
+ ];
19296
19892
  var FULL_CIRCLE = 360;
19297
19893
  var START_ANGLE = -90;
19298
19894
  function degToRad(deg) {
@@ -19318,7 +19914,7 @@ function slicePath(index, total, wedgeRadius, innerRadius) {
19318
19914
  }
19319
19915
  function RadialMenu({
19320
19916
  children,
19321
- menuItems,
19917
+ menuItems = CRUD_ITEMS,
19322
19918
  size = 240,
19323
19919
  iconSize = 24,
19324
19920
  bandWidth = 60,
@@ -19329,44 +19925,13 @@ function RadialMenu({
19329
19925
  }) {
19330
19926
  const isMobile = useMediaQuery("(max-width: 768px)");
19331
19927
  const radius = size / 2;
19332
- const outerRingOuterRadius = radius;
19333
- const outerRingInnerRadius = outerRingOuterRadius - outerRingWidth;
19928
+ const outerRingInnerRadius = radius - outerRingWidth;
19334
19929
  const wedgeOuterRadius = outerRingInnerRadius - outerGap;
19335
19930
  const wedgeInnerRadius = wedgeOuterRadius - bandWidth;
19336
19931
  const iconRingRadius = (wedgeOuterRadius + wedgeInnerRadius) / 2;
19337
19932
  const centerRadius = Math.max(wedgeInnerRadius - innerGap, 0);
19338
19933
  const slice = 360 / menuItems.length;
19339
19934
  const [activeIndex, setActiveIndex] = React32.useState(null);
19340
- const timerRef = React32.useRef(null);
19341
- const isLongPress = React32.useRef(false);
19342
- const handleTouchStart = (e) => {
19343
- isLongPress.current = false;
19344
- const touch = e.touches[0];
19345
- const { clientX, clientY } = touch;
19346
- timerRef.current = setTimeout(() => {
19347
- isLongPress.current = true;
19348
- const event = new MouseEvent("contextmenu", {
19349
- bubbles: true,
19350
- cancelable: true,
19351
- view: window,
19352
- clientX,
19353
- clientY,
19354
- button: 2,
19355
- buttons: 2
19356
- });
19357
- e.target.dispatchEvent(event);
19358
- }, 1e3);
19359
- };
19360
- const handleTouchEnd = () => {
19361
- if (timerRef.current) {
19362
- clearTimeout(timerRef.current);
19363
- }
19364
- };
19365
- const handleTouchMove = () => {
19366
- if (timerRef.current) {
19367
- clearTimeout(timerRef.current);
19368
- }
19369
- };
19370
19935
  const containerVariants = {
19371
19936
  hidden: { opacity: 0, scale: 0.8 },
19372
19937
  visible: {
@@ -19396,22 +19961,13 @@ function RadialMenu({
19396
19961
  }
19397
19962
  };
19398
19963
  return /* @__PURE__ */ jsxs(ContextMenuBase, { children: [
19399
- /* @__PURE__ */ jsx(ContextMenuTriggerBase, { asChild: true, children: /* @__PURE__ */ jsx(
19400
- "div",
19401
- {
19402
- className: "select-none outline-none group touch-none",
19403
- onTouchStart: handleTouchStart,
19404
- onTouchEnd: handleTouchEnd,
19405
- onTouchMove: handleTouchMove,
19406
- children: children || /* @__PURE__ */ jsx("div", { className: "size-80 flex justify-center items-center border-2 border-dashed border-muted-foreground/20 rounded-xl bg-muted/5 text-muted-foreground hover:bg-muted/10 transition-colors", children: "Right-click or Long-press here (1s)" })
19407
- }
19408
- ) }),
19964
+ /* @__PURE__ */ jsx(ContextMenuTriggerBase, { asChild: true, children: /* @__PURE__ */ jsx("div", { className: "select-none outline-none group touch-none", children: children || /* @__PURE__ */ jsx("div", { className: "size-80 flex justify-center items-center border-2 border-dashed border-muted-foreground/20 rounded-xl bg-muted/5 cursor-context-menu", children: "Clique com bot\xE3o direito" }) }) }),
19409
19965
  /* @__PURE__ */ jsx(
19410
19966
  ContextMenuContentBase,
19411
19967
  {
19412
19968
  className: "p-0 border-none bg-transparent shadow-none overflow-visible -translate-x-1/2 -translate-y-1/2",
19413
19969
  style: { width: size, height: size },
19414
- children: /* @__PURE__ */ jsx(AnimatePresence, { mode: "wait", children: /* @__PURE__ */ jsxs(
19970
+ children: /* @__PURE__ */ jsx(AnimatePresence, { mode: "wait", children: /* @__PURE__ */ jsx(
19415
19971
  motion.div,
19416
19972
  {
19417
19973
  className: "relative size-full drop-shadow-xl will-change-transform",
@@ -19419,92 +19975,73 @@ function RadialMenu({
19419
19975
  initial: "hidden",
19420
19976
  animate: "visible",
19421
19977
  exit: "exit",
19422
- children: [
19423
- /* @__PURE__ */ jsx("div", { className: "absolute inset-0 rounded-full bg-background/5 blur-2xl -z-10" }),
19424
- /* @__PURE__ */ jsxs(
19425
- "svg",
19426
- {
19427
- className: "absolute inset-0 size-full overflow-visible",
19428
- viewBox: `${-radius} ${-radius} ${radius * 2} ${radius * 2}`,
19429
- children: [
19430
- /* @__PURE__ */ jsx(
19431
- motion.circle,
19978
+ children: /* @__PURE__ */ jsxs(
19979
+ "svg",
19980
+ {
19981
+ className: "absolute inset-0 size-full overflow-visible",
19982
+ viewBox: `${-radius} ${-radius} ${radius * 2} ${radius * 2}`,
19983
+ children: [
19984
+ /* @__PURE__ */ jsx(motion.circle, { r: centerRadius, className: "fill-background stroke-border stroke-1" }),
19985
+ /* @__PURE__ */ jsx(AnimatePresence, { children: activeIndex !== null && /* @__PURE__ */ jsx(
19986
+ motion.text,
19987
+ {
19988
+ initial: { opacity: 0, y: 5 },
19989
+ animate: { opacity: 1, y: 0 },
19990
+ exit: { opacity: 0 },
19991
+ textAnchor: "middle",
19992
+ dominantBaseline: "middle",
19993
+ className: "fill-foreground text-[11px] font-bold uppercase tracking-tighter pointer-events-none",
19994
+ children: menuItems[activeIndex].label
19995
+ }
19996
+ ) }),
19997
+ menuItems.map((item, index) => {
19998
+ const Icon = item.icon;
19999
+ const midDeg = START_ANGLE + slice * index;
20000
+ const { x: iconX, y: iconY } = polarToCartesian(iconRingRadius, midDeg);
20001
+ const isActive = activeIndex === index;
20002
+ const ICON_BOX = iconSize * 2.5;
20003
+ return /* @__PURE__ */ jsxs(
20004
+ motion.g,
19432
20005
  {
19433
- r: centerRadius,
19434
- initial: { scale: 0 },
19435
- animate: { scale: 1 },
19436
- transition: isMobile ? { duration: 0 } : {
19437
- type: "spring",
19438
- stiffness: 300,
19439
- delay: 0.2
19440
- },
19441
- className: "fill-background stroke-border stroke-1 shadow-inner"
19442
- }
19443
- ),
19444
- menuItems.map((item, index) => {
19445
- const Icon = item.icon;
19446
- const midDeg = START_ANGLE + slice * index;
19447
- const { x: iconX, y: iconY } = polarToCartesian(
19448
- iconRingRadius,
19449
- midDeg
19450
- );
19451
- const isActive = activeIndex === index;
19452
- const ICON_BOX = iconSize * 2.5;
19453
- return /* @__PURE__ */ jsxs(
19454
- motion.g,
19455
- {
19456
- variants: itemVariants2,
19457
- className: "cursor-pointer outline-none",
19458
- onMouseEnter: () => setActiveIndex(index),
19459
- onMouseLeave: () => setActiveIndex(null),
19460
- onClick: () => onSelect?.(item),
19461
- style: { originX: "0px", originY: "0px" },
19462
- children: [
19463
- /* @__PURE__ */ jsx(
19464
- "path",
19465
- {
19466
- d: slicePath(
19467
- index,
19468
- menuItems.length,
19469
- wedgeOuterRadius,
19470
- wedgeInnerRadius
19471
- ),
19472
- className: cn(
19473
- "transition-colors duration-200 stroke-1",
19474
- isActive ? "fill-primary stroke-primary-foreground/20" : "fill-background/90 stroke-border/50 hover:fill-accent"
19475
- )
19476
- }
19477
- ),
19478
- /* @__PURE__ */ jsx(
19479
- "foreignObject",
19480
- {
19481
- x: iconX - ICON_BOX / 2,
19482
- y: iconY - ICON_BOX / 2,
19483
- width: ICON_BOX,
19484
- height: ICON_BOX,
19485
- className: "pointer-events-none",
19486
- children: /* @__PURE__ */ jsx("div", { className: "size-full flex items-center justify-center", children: /* @__PURE__ */ jsx(
19487
- Icon,
19488
- {
19489
- size: iconSize,
19490
- weight: isActive ? "fill" : "regular",
19491
- className: cn(
19492
- "transition-all duration-200",
19493
- isActive ? "text-primary-foreground " : "text-muted-foreground"
19494
- )
19495
- }
19496
- ) })
19497
- }
19498
- )
19499
- ]
20006
+ variants: itemVariants2,
20007
+ className: "cursor-pointer outline-none",
20008
+ onMouseEnter: () => setActiveIndex(index),
20009
+ onMouseLeave: () => setActiveIndex(null),
20010
+ onClick: (e) => {
20011
+ e.stopPropagation();
20012
+ onSelect?.(item);
19500
20013
  },
19501
- item.id
19502
- );
19503
- })
19504
- ]
19505
- }
19506
- )
19507
- ]
20014
+ style: { originX: "0px", originY: "0px" },
20015
+ children: [
20016
+ /* @__PURE__ */ jsx(
20017
+ "path",
20018
+ {
20019
+ d: slicePath(index, menuItems.length, wedgeOuterRadius, wedgeInnerRadius),
20020
+ className: cn(
20021
+ "transition-colors duration-200 stroke-1",
20022
+ isActive ? item.color === "danger" ? "fill-destructive stroke-destructive-foreground/20" : "fill-primary stroke-primary-foreground/20" : "fill-background/90 stroke-border/50 hover:fill-accent"
20023
+ )
20024
+ }
20025
+ ),
20026
+ /* @__PURE__ */ jsx("foreignObject", { x: iconX - ICON_BOX / 2, y: iconY - ICON_BOX / 2, width: ICON_BOX, height: ICON_BOX, className: "pointer-events-none", children: /* @__PURE__ */ jsx("div", { className: "size-full flex items-center justify-center", children: /* @__PURE__ */ jsx(
20027
+ Icon,
20028
+ {
20029
+ size: iconSize,
20030
+ weight: isActive ? "fill" : "regular",
20031
+ className: cn(
20032
+ "transition-all duration-200",
20033
+ isActive ? "text-primary-foreground" : item.color === "danger" ? "text-destructive" : "text-muted-foreground"
20034
+ )
20035
+ }
20036
+ ) }) })
20037
+ ]
20038
+ },
20039
+ item.id
20040
+ );
20041
+ })
20042
+ ]
20043
+ }
20044
+ )
19508
20045
  }
19509
20046
  ) })
19510
20047
  }
@@ -19521,6 +20058,8 @@ function ControlledCombobox({
19521
20058
  searchPlaceholder,
19522
20059
  empty = "Nenhum dado encontrado",
19523
20060
  error,
20061
+ label,
20062
+ labelClassname,
19524
20063
  testIds = {},
19525
20064
  onClear,
19526
20065
  hasSelected = false,
@@ -19534,9 +20073,10 @@ function ControlledCombobox({
19534
20073
  return /* @__PURE__ */ jsxs(
19535
20074
  "div",
19536
20075
  {
19537
- className: "col-span-1 w-full",
20076
+ className: "w-full flex flex-col",
19538
20077
  "data-testid": testIds.root ?? "combobox-base-root",
19539
20078
  children: [
20079
+ label && /* @__PURE__ */ jsx(LabelBase_default, { className: labelClassname, children: label }),
19540
20080
  /* @__PURE__ */ jsxs(
19541
20081
  PopoverBase,
19542
20082
  {
@@ -19595,16 +20135,16 @@ function ControlledCombobox({
19595
20135
  /* @__PURE__ */ jsx(
19596
20136
  PopoverContentBase,
19597
20137
  {
19598
- className: "max-h-[--radix-popover-content-available-height] w-[--radix-popover-trigger-width] p-0 border-none",
20138
+ className: "max-h-[--radix-popover-content-available-height] w-[--radix-popover-trigger-width] p-0 border-none focus:ring-0 focus:outline-none",
19599
20139
  "data-testid": testIds.popover ?? "combobox-popover",
19600
20140
  children: /* @__PURE__ */ jsxs(
19601
20141
  CommandBase,
19602
20142
  {
19603
- className: "dark:text-white hover:bg-rsecondary",
20143
+ className: "dark:text-white hover:bg-rsecondary focus:ring-0 focus:outline-none",
19604
20144
  "data-testid": testIds.command ?? "combobox-command",
19605
20145
  filter: onSearchChange ? () => 1 : (value, search2) => {
19606
- const label = items.find((item) => item.value === value)?.label || value;
19607
- if (label.toLowerCase().includes(search2.toLowerCase()))
20146
+ const label2 = items.find((item) => item.value === value)?.label || value;
20147
+ if (label2.toLowerCase().includes(search2.toLowerCase()))
19608
20148
  return 1;
19609
20149
  return 0;
19610
20150
  },
@@ -19626,6 +20166,7 @@ function ControlledCombobox({
19626
20166
  {
19627
20167
  "data-testid": testIds.list ?? "combobox-list",
19628
20168
  onEndReached,
20169
+ className: "focus:ring-0 focus:outline-none",
19629
20170
  children: [
19630
20171
  /* @__PURE__ */ jsx(CommandEmptyBase, { "data-testid": testIds.empty ?? "combobox-empty", children: loading ? "Carregando..." : empty }),
19631
20172
  /* @__PURE__ */ jsx(CommandGroupBase, { "data-testid": testIds.group ?? "combobox-group", children: items.map((item) => {
@@ -19690,4 +20231,4 @@ function ControlledCombobox({
19690
20231
  );
19691
20232
  }
19692
20233
 
19693
- export { AddButton, Agenda, AgendaDaysToShow, AgendaDaysToShowAgenda, AgendaView, AlertDialogActionBase, AlertDialogBase, AlertDialogCancelBase, AlertDialogContentBase, AlertDialogDescriptionBase, AlertDialogFooterBase, AlertDialogHeaderBase, AlertDialogOverlayBase, AlertDialogPortalBase, AlertDialogTitleBase, AlertDialogTriggerBase, AvatarBase, AvatarCombobox, AvatarFallbackBase, AvatarImageBase, BackButton, Badge, BreadcrumbBase, BreadcrumbEllipsisBase, BreadcrumbItemBase, BreadcrumbLinkBase, BreadcrumbListBase, BreadcrumbPageBase, BreadcrumbSeparatorBase, Brush_default as Brush, ButtonBase, ButtonGroupBase, CENTER_INDEX, CalendarBase, CalendarDndProvider, CalendarDndProviderAgenda, CardBase, CardContentBase, CardDescriptionBase, CardFooterBase, CardHeaderBase, CardTitleBase, CarouselBase, ChangeButton, Chart_default as Chart, ChartControls, ChartHeader, ChartTotalLegend_default as ChartTotalLegend, CheckButton, CheckboxBase, CheckboxTree, CloseAllButton_default as CloseAllButton, CloseButton, CodeBlock, CollapsibleBase, CollapsibleContentBase, CollapsibleTriggerBase, Combobox, CommandBase, CommandDebouncedInputBase, CommandDialogBase, CommandEmptyBase, CommandGroupBase, CommandInputBase, CommandItemBase, CommandListBase, CommandSeparatorBase, CommandShortcutBase, ContextMenuBase, ContextMenuCheckboxItemBase, ContextMenuContentBase, ContextMenuGroupBase, ContextMenuItemBase, ContextMenuLabelBase, ContextMenuPortalBase, ContextMenuRadioGroupBase, ContextMenuRadioItemBase, ContextMenuSeparatorBase, ContextMenuShortcutBase, ContextMenuSubBase, ContextMenuSubContentBase, ContextMenuSubTriggerBase, ContextMenuTriggerBase, ControlledCombobox, CopyButton, DateTimePicker, DayView, DayViewAgenda, DebouncedInput, DefaultEndHour, DefaultEndHourAgenda, DefaultStartHour, DefaultStartHourAgenda, DestructiveDialog, DialogBase, DialogCloseBase, DialogContentBase, DialogDescriptionBase, DialogFooterBase, DialogHeaderBase, DialogOverlayBase, DialogPortalBase, DialogTitleBase, DialogTriggerBase, DownloadButton, DraggableEvent2 as DraggableEvent, DraggableTooltip_default as DraggableTooltip, DrawerBase, DrawerCloseBase, DrawerContentBase, DrawerDescriptionBase, DrawerFooterBase, DrawerHeaderBase, DrawerOverlayBase, DrawerPortalBase, DrawerTitleBase, DrawerTriggerBase, DropDownMenuBase, DropDownMenuCheckboxItemBase, DropDownMenuContentBase, DropDownMenuGroupBase, DropDownMenuItemBase, DropDownMenuLabelBase, DropDownMenuPortalBase, DropDownMenuRadioGroupBase, DropDownMenuRadioItemBase, DropDownMenuSeparatorBase, DropDownMenuShortcutBase, DropDownMenuSubBase, DropDownMenuSubContentBase, DropDownMenuSubTriggerBase, DropDownMenuTriggerBase, DroppableCell, DroppableCellAgenda, EditButton, EndHour, EndHourAgenda, ErrorMessage_default as ErrorMessage, EventAgenda, EventCalendar, EventDialog, EventGap, EventGapAgenda, EventHeight, EventHeightAgenda, EventItem, EventItemAgenda, EventsPopup, FavoriteButton, FileUploader, FilterButton, HideButton, Highlights_default as Highlights, HorizontalChart_default as HorizontalChart, HorizontalLegend_default as HorizontalLegend, HoverCardBase, HoverCardContentBase, HoverCardTriggerBase, ITEM_HEIGHT, InputBase, InputOTPBase, InputOTPGroupBase, InputOTPSeparatorBase, InputOTPSlotBase, LabelBase_default as LabelBase, Leaderboard, LikeButton, LoadingBase, LockButton, ModalBase, ModalCloseBase, ModalContentBase, ModalDescriptionBase, ModalFooterBase, ModalHeaderBase, ModalOverlayBase, ModalPortalBase, ModalTitleBase, ModalTriggerBase, ModeToggleBase, MonthView, MonthViewAgenda, MoreButton, MultiCombobox, MultiSelect, MultiSelectBase, MultiSelectContentBase, MultiSelectGroupBase, MultiSelectItemBase, MultiSelectSeparatorBase, MultiSelectTriggerBase, MultiSelectValueBase, NavigationMenuBase, NavigationMenuContentBase, NavigationMenuIndicatorBase, NavigationMenuItemBase, NavigationMenuLinkBase, NavigationMenuListBase, NavigationMenuTriggerBase, NavigationMenuViewportBase, NoData_default as NoData, NotificationButton, NumericInput, PeriodsDropdown_default as PeriodsDropdown, PopoverAnchorBase, PopoverBase, PopoverContentBase, PopoverTriggerBase, ProgressBase, ProgressCirclesBase, ProgressPanelsBase, ProgressSegmentsBase, RadialMenu, RangePicker, RefreshButton, SaveButton, ScrollAreaBase, ScrollBarBase, SearchButton, Select, SelectBase, SelectContentBase, SelectEmpty, SelectGroupBase, SelectItemBase, SelectLabelBase, SelectScrollDownButtonBase, SelectScrollUpButtonBase, SelectSeparatorBase, SelectTriggerBase, SelectValueBase, SeparatorBase, SettingsButton, SheetBase, SheetCloseBase, SheetContentBase, SheetDescriptionBase, SheetFooterBase, SheetHeaderBase, SheetOverlayBase, SheetPortalBase, SheetTitleBase, SheetTriggerBase, ShowOnly_default as ShowOnly, SidebarBase, SidebarContentBase, SidebarFooterBase, SidebarGroupActionBase, SidebarGroupBase, SidebarGroupContentBase, SidebarGroupLabelBase, SidebarHeaderBase, SidebarInputBase, SidebarInsetBase, SidebarMenuActionBase, SidebarMenuBadgeBase, SidebarMenuBase, SidebarMenuButtonBase, SidebarMenuItemBase, SidebarMenuSkeletonBase, SidebarMenuSubBase, SidebarMenuSubButtonBase, SidebarMenuSubItemBase, SidebarProviderBase, SidebarRailBase, SidebarSeparatorBase, SidebarTriggerBase, SkeletonBase, SlideBase, StartHour, StartHourAgenda, StatusIndicator, SwitchBase, SystemTooltip_default as SystemTooltip, TableBase, TableBodyBase, TableCaptionBase, TableCellBase, TableFooterBase, TableHeadBase, TableHeaderBase, TableRowBase, TabsBase, TabsContentBase, TabsListBase, TabsTriggerBase, TextAreaBase, ThemeProviderBase, TimePicker, TimePickerInput, TimeSeries_default as TimeSeries, Toaster, TooltipBase, TooltipContentBase, TooltipProviderBase, TooltipSimple_default as TooltipSimple, TooltipTriggerBase, TooltipWithTotal_default as TooltipWithTotal, UndatedEvents, UniversalTooltipRenderer, UnlockButton, UploadButton, UseSideBarBase, VISIBLE_ITEMS, ViewButton, VisibilityButton, WeekCellsHeight, WeekCellsHeightAgenda, WeekView, WeekViewAgenda, adaptDataForTooltip, addHoursToDate, addHoursToDateAgenda, addMinutesToDateAgenda, badgeVariants, buttonVariantsBase, compactTick, computeChartWidth, computeNiceMax, computeYAxisTickWidth, convert12HourTo24Hour, createValueFormatter, createYTickFormatter, detectDataFields, detectXAxis, display12HourValue, formatFieldName, formatLinePercentage, generateAdditionalColors, generateColorMap, getAgendaEventsForDay, getAgendaEventsForDayAgenda, getAllEventsForDay, getAllEventsForDayAgenda, getArrowByType, getBorderRadiusClasses, getBorderRadiusClassesAgenda, getDateByType, getEventColorClasses, getEventColorClassesAgenda, getEventEndDate, getEventStartDate, getEventsForDay, getEventsForDayAgenda, getItems, getMaxDataValue, getMinDataValue, getSpanningEventsForDay, getSpanningEventsForDayAgenda, getValid12Hour, getValidArrow12Hour, getValidArrowHour, getValidArrowMinuteOrSecond, getValidArrowNumber, getValidHour, getValidMinuteOrSecond, getValidNumber, isMultiDayEvent, isMultiDayEventAgenda, isValid12Hour, isValidHour, isValidMinuteOrSecond, niceCeil, normalizeAttendDate, processNeo4jData, renderInsideBarLabel, pillLabelRenderer_default as renderPillLabel, resolveChartMargins, resolveContainerPaddingLeft, set12Hours, setDateByType, setHours, setMinutes, setSeconds, sortEvents, sortEventsAgenda, toast, useBiaxial, useCalendarDnd, useCalendarDndAgenda, useChartClick, useChartDimensions, useChartHighlights, useChartLayout, useChartMinMax, useChartTooltips, useCurrentTimeIndicator, useCurrentTimeIndicatorAgenda, useDrag, useEventVisibility, useEventVisibilityAgenda, useIsMobile, useOpenTooltipForPeriod, useProcessedData, useSeriesOpacity, useTheme, useTimeSeriesRange, visualForItem };
20234
+ export { AddButton, Agenda, AgendaDaysToShow, AgendaDaysToShowAgenda, AgendaView, AlertDialogActionBase, AlertDialogBase, AlertDialogCancelBase, AlertDialogContentBase, AlertDialogDescriptionBase, AlertDialogFooterBase, AlertDialogHeaderBase, AlertDialogOverlayBase, AlertDialogPortalBase, AlertDialogTitleBase, AlertDialogTriggerBase, AvatarBase, AvatarCombobox, AvatarFallbackBase, AvatarImageBase, BackButton, Badge, BreadcrumbBase, BreadcrumbEllipsisBase, BreadcrumbItemBase, BreadcrumbLinkBase, BreadcrumbListBase, BreadcrumbPageBase, BreadcrumbSeparatorBase, Brush_default as Brush, ButtonBase, ButtonGroupBase, CENTER_INDEX, CalendarBase, CalendarDndProvider, CalendarDndProviderAgenda, CardBase, CardContentBase, CardDescriptionBase, CardFooterBase, CardHeaderBase, CardTitleBase, CarouselBase, ChangeButton, Chart_default as Chart, ChartControls, ChartHeader, ChartTotalLegend_default as ChartTotalLegend, CheckButton, CheckboxBase, CheckboxTree, CloseAllButton_default as CloseAllButton, CloseButton, CodeBlock, CollapsibleBase, CollapsibleContentBase, CollapsibleTriggerBase, Combobox, CommandBase, CommandDebouncedInputBase, CommandDialogBase, CommandEmptyBase, CommandGroupBase, CommandInputBase, CommandItemBase, CommandListBase, CommandSeparatorBase, CommandShortcutBase, ContextMenuBase, ContextMenuCheckboxItemBase, ContextMenuContentBase, ContextMenuGroupBase, ContextMenuItemBase, ContextMenuLabelBase, ContextMenuPortalBase, ContextMenuRadioGroupBase, ContextMenuRadioItemBase, ContextMenuSeparatorBase, ContextMenuShortcutBase, ContextMenuSubBase, ContextMenuSubContentBase, ContextMenuSubTriggerBase, ContextMenuTriggerBase, ControlledCombobox, CopyButton, DateTimePicker, DayView, DayViewAgenda, DebouncedInput, DefaultEndHour, DefaultEndHourAgenda, DefaultStartHour, DefaultStartHourAgenda, DestructiveDialog, DialogBase, DialogCloseBase, DialogContentBase, DialogDescriptionBase, DialogFooterBase, DialogHeaderBase, DialogOverlayBase, DialogPortalBase, DialogTitleBase, DialogTriggerBase, DownloadButton, DraggableEvent2 as DraggableEvent, DraggableTooltip_default as DraggableTooltip, DrawerBase, DrawerCloseBase, DrawerContentBase, DrawerDescriptionBase, DrawerFooterBase, DrawerHeaderBase, DrawerOverlayBase, DrawerPortalBase, DrawerTitleBase, DrawerTriggerBase, DropDownMenuBase, DropDownMenuCheckboxItemBase, DropDownMenuContentBase, DropDownMenuGroupBase, DropDownMenuItemBase, DropDownMenuLabelBase, DropDownMenuPortalBase, DropDownMenuRadioGroupBase, DropDownMenuRadioItemBase, DropDownMenuSeparatorBase, DropDownMenuShortcutBase, DropDownMenuSubBase, DropDownMenuSubContentBase, DropDownMenuSubTriggerBase, DropDownMenuTriggerBase, DroppableCell, DroppableCellAgenda, EditButton, EndHour, EndHourAgenda, ErrorMessage_default as ErrorMessage, EventAgenda, EventCalendar, EventDetailModalAgenda, EventDialog, EventGap, EventGapAgenda, EventHeight, EventHeightAgenda, EventItem, EventItemAgenda, EventsPopup, FavoriteButton, FileUploader, FilterButton, HideButton, Highlights_default as Highlights, HorizontalChart_default as HorizontalChart, HorizontalLegend_default as HorizontalLegend, HoverCardBase, HoverCardContentBase, HoverCardTriggerBase, ITEM_HEIGHT, InputBase, InputOTPBase, InputOTPGroupBase, InputOTPSeparatorBase, InputOTPSlotBase, LabelBase_default as LabelBase, Leaderboard, LikeButton, LoadingBase, LockButton, ModalBase, ModalCloseBase, ModalContentBase, ModalDescriptionBase, ModalFooterBase, ModalHeaderBase, ModalOverlayBase, ModalPortalBase, ModalTitleBase, ModalTriggerBase, ModeToggleBase, MonthView, MonthViewAgenda, MoreButton, MultiCombobox, MultiDayOverlay, MultiSelect, MultiSelectBase, MultiSelectContentBase, MultiSelectGroupBase, MultiSelectItemBase, MultiSelectSeparatorBase, MultiSelectTriggerBase, MultiSelectValueBase, NavigationMenuBase, NavigationMenuContentBase, NavigationMenuIndicatorBase, NavigationMenuItemBase, NavigationMenuLinkBase, NavigationMenuListBase, NavigationMenuTriggerBase, NavigationMenuViewportBase, NoData_default as NoData, NotificationButton, NumericInput, PeriodsDropdown_default as PeriodsDropdown, PopoverAnchorBase, PopoverBase, PopoverContentBase, PopoverTriggerBase, ProgressBase, ProgressCirclesBase, ProgressPanelsBase, ProgressSegmentsBase, RadialMenu, RangePicker, RefreshButton, SaveButton, ScrollAreaBase, ScrollBarBase, SearchButton, Select, SelectBase, SelectContentBase, SelectEmpty, SelectGroupBase, SelectItemBase, SelectLabelBase, SelectScrollDownButtonBase, SelectScrollUpButtonBase, SelectSeparatorBase, SelectTriggerBase, SelectValueBase, SeparatorBase, SettingsButton, SheetBase, SheetCloseBase, SheetContentBase, SheetDescriptionBase, SheetFooterBase, SheetHeaderBase, SheetOverlayBase, SheetPortalBase, SheetTitleBase, SheetTriggerBase, ShowOnly_default as ShowOnly, SidebarBase, SidebarContentBase, SidebarFooterBase, SidebarGroupActionBase, SidebarGroupBase, SidebarGroupContentBase, SidebarGroupLabelBase, SidebarHeaderBase, SidebarInputBase, SidebarInsetBase, SidebarMenuActionBase, SidebarMenuBadgeBase, SidebarMenuBase, SidebarMenuButtonBase, SidebarMenuItemBase, SidebarMenuSkeletonBase, SidebarMenuSubBase, SidebarMenuSubButtonBase, SidebarMenuSubItemBase, SidebarProviderBase, SidebarRailBase, SidebarSeparatorBase, SidebarTriggerBase, SkeletonBase, SlideBase, StartHour, StartHourAgenda, StatusIndicator, SwitchBase, SystemTooltip_default as SystemTooltip, TableBase, TableBodyBase, TableCaptionBase, TableCellBase, TableFooterBase, TableHeadBase, TableHeaderBase, TableRowBase, TabsBase, TabsContentBase, TabsListBase, TabsTriggerBase, TextAreaBase, ThemeProviderBase, TimePicker, TimePickerInput, TimeSeries_default as TimeSeries, Toaster, TooltipBase, TooltipContentBase, TooltipProviderBase, TooltipSimple_default as TooltipSimple, TooltipTriggerBase, TooltipWithTotal_default as TooltipWithTotal, UndatedEvents, UniversalTooltipRenderer, UnlockButton, UploadButton, UseSideBarBase, VISIBLE_ITEMS, ViewButton, VisibilityButton, WeekCellsHeight, WeekCellsHeightAgenda, WeekView, WeekViewAgenda, adaptDataForTooltip, addHoursToDate, addHoursToDateAgenda, addMinutesToDateAgenda, badgeVariants, buttonVariantsBase, compactTick, computeChartWidth, computeNiceMax, computeYAxisTickWidth, convert12HourTo24Hour, createValueFormatter, createYTickFormatter, detectDataFields, detectXAxis, display12HourValue, formatFieldName, formatLinePercentage, generateAdditionalColors, generateColorMap, getAgendaEventsForDay, getAgendaEventsForDayAgenda, getAllEventsForDay, getAllEventsForDayAgenda, getArrowByType, getBorderRadiusClasses, getBorderRadiusClassesAgenda, getDateByType, getEventColorClasses, getEventColorClassesAgenda, getEventEndDate, getEventStartDate, getEventsForDay, getEventsForDayAgenda, getItems, getMaxDataValue, getMinDataValue, getSpanningEventsForDay, getSpanningEventsForDayAgenda, getValid12Hour, getValidArrow12Hour, getValidArrowHour, getValidArrowMinuteOrSecond, getValidArrowNumber, getValidHour, getValidMinuteOrSecond, getValidNumber, isMultiDayEvent, isMultiDayEventAgenda, isValid12Hour, isValidHour, isValidMinuteOrSecond, niceCeil, normalizeAttendDate, processNeo4jData, renderInsideBarLabel, pillLabelRenderer_default as renderPillLabel, resolveChartMargins, resolveContainerPaddingLeft, set12Hours, setDateByType, setHours, setMinutes, setSeconds, sortEvents, sortEventsAgenda, toast, useBiaxial, useCalendarDnd, useCalendarDndAgenda, useChartClick, useChartDimensions, useChartHighlights, useChartLayout, useChartMinMax, useChartTooltips, useCurrentTimeIndicator, useCurrentTimeIndicatorAgenda, useDrag, useEventVisibility, useEventVisibilityAgenda, useIsMobile, useOpenTooltipForPeriod, useProcessedData, useSeriesOpacity, useTheme, useTimeSeriesRange, visualForItem };