@mlw-packages/react-components 1.10.0 → 1.10.2

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
@@ -1,6 +1,6 @@
1
1
  import './index.css';
2
2
  import * as React32 from 'react';
3
- import React32__default, { forwardRef, useState, useEffect, createContext, useMemo, useRef, useCallback, useContext, useId, useLayoutEffect } from 'react';
3
+ import React32__default, { forwardRef, useState, useEffect, createContext, useMemo, useRef, useCallback, useId, useContext, useLayoutEffect } from 'react';
4
4
  import { Slot } from '@radix-ui/react-slot';
5
5
  import { cva } from 'class-variance-authority';
6
6
  import { clsx } from 'clsx';
@@ -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, differenceInCalendarDays, addDays, differenceInDays, isBefore, addMinutes, subMonths, subWeeks, addMonths, addWeeks, isWithinInterval, add, max, min } from 'date-fns';
38
+ import { format, startOfMonth, endOfMonth, eachDayOfInterval, isToday, isSameDay, differenceInCalendarDays, differenceInMinutes, isPast, startOfDay, eachHourOfInterval, addHours, getHours, getMinutes, areIntervalsOverlapping, startOfWeek, endOfWeek, isSameMonth, addDays, startOfYear, endOfYear, eachMonthOfInterval, differenceInDays, isBefore, addMinutes, subMonths, subWeeks, subYears, addMonths, addWeeks, addYears, 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';
@@ -8979,8 +8979,40 @@ var StartHourAgenda = 0;
8979
8979
  var EndHourAgenda = 24;
8980
8980
  var DefaultStartHourAgenda = 9;
8981
8981
  var DefaultEndHourAgenda = 10;
8982
- function getEventColorClassesAgenda(color) {
8983
- const eventColor = color || "sky";
8982
+ function getAutoColorAgenda(id) {
8983
+ const colors2 = [
8984
+ "sky",
8985
+ "amber",
8986
+ "violet",
8987
+ "rose",
8988
+ "emerald",
8989
+ "orange",
8990
+ "green",
8991
+ "blue",
8992
+ "red",
8993
+ "purple",
8994
+ "indigo",
8995
+ "teal",
8996
+ "pink",
8997
+ "cyan",
8998
+ "lime",
8999
+ "fuchsia"
9000
+ ];
9001
+ let hash = 0;
9002
+ for (let i = 0; i < id.length; i++) {
9003
+ hash = id.charCodeAt(i) + ((hash << 5) - hash);
9004
+ }
9005
+ const index = Math.abs(hash) % colors2.length;
9006
+ return colors2[index];
9007
+ }
9008
+ function getEventColorClassesAgenda(color, eventId) {
9009
+ let eventColor = color;
9010
+ if (!eventColor && eventId) {
9011
+ eventColor = getAutoColorAgenda(eventId);
9012
+ }
9013
+ if (!eventColor) {
9014
+ eventColor = "sky";
9015
+ }
8984
9016
  switch (eventColor) {
8985
9017
  case "sky":
8986
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";
@@ -9125,6 +9157,28 @@ function addMinutesToDateAgenda(date, minutes) {
9125
9157
  function addHoursToDateAgenda(date, hours) {
9126
9158
  return addMinutesToDateAgenda(date, Math.round(hours * 60));
9127
9159
  }
9160
+ function formatDurationAgenda(event) {
9161
+ const start = getEventStartDate(event);
9162
+ const end = getEventEndDate(event);
9163
+ if (!start) return "";
9164
+ const fmt = (d) => format(d, "d 'de' MMM", { locale: ptBR });
9165
+ if (!end || isSameDay(start, end)) {
9166
+ return fmt(start) + (event.allDay ? " \xB7 Dia todo" : " \xB7 " + format(start, "HH:mm"));
9167
+ }
9168
+ const days = differenceInCalendarDays(end, start) + 1;
9169
+ return `${fmt(start)} \u2192 ${fmt(end)} \xB7 ${days} dias`;
9170
+ }
9171
+ function formatDurationAgendaDays(event) {
9172
+ const start = getEventStartDate(event);
9173
+ const end = getEventEndDate(event);
9174
+ if (!start) return "";
9175
+ const fmt = (d) => format(d, "d 'de' MMM", { locale: ptBR });
9176
+ if (!end || isSameDay(start, end)) {
9177
+ return fmt(start) + (event.allDay ? " \xB7 Dia todo" : " \xB7 " + format(start, "HH:mm"));
9178
+ }
9179
+ const days = differenceInCalendarDays(end, start) + 1;
9180
+ return `${days} dias`;
9181
+ }
9128
9182
  function useCurrentTimeIndicatorAgenda(currentDate, view) {
9129
9183
  const [currentTimePosition, setCurrentTimePosition] = useState(0);
9130
9184
  const [currentTimeVisible, setCurrentTimeVisible] = useState(false);
@@ -9193,7 +9247,7 @@ function EventWrapper({
9193
9247
  return void 0;
9194
9248
  })();
9195
9249
  const isEventInPast = displayEnd ? isPast(displayEnd) : false;
9196
- const colorClasses = hasValidTimeForWrapper ? getEventColorClassesAgenda(event.color) : "bg-gray-200/50 hover:bg-gray-200/40 text-gray-900/80 dark:bg-gray-700/25 dark:text-gray-200/90 shadow-none ";
9250
+ const colorClasses = hasValidTimeForWrapper ? getEventColorClassesAgenda(event.color, event.id) : "bg-gray-200/50 hover:bg-gray-200/40 text-gray-900/80 dark:bg-gray-700/25 dark:text-gray-200/90 shadow-none ";
9197
9251
  return /* @__PURE__ */ jsx(
9198
9252
  "button",
9199
9253
  {
@@ -9238,7 +9292,7 @@ function EventItemAgenda({
9238
9292
  const startDate = getEventStartDate(event);
9239
9293
  const endDate = getEventEndDate(event);
9240
9294
  const hasValidTime = !!startDate || !!endDate;
9241
- const colorClasses = hasValidTime ? getEventColorClassesAgenda(eventColor) : "bg-gray-200/50 hover:bg-gray-200/40 text-gray-900/80 dark:bg-gray-700/25 dark:text-gray-200/90 shadow-none";
9295
+ const colorClasses = hasValidTime ? getEventColorClassesAgenda(eventColor, event.id) : "bg-gray-200/50 hover:bg-gray-200/40 text-gray-900/80 dark:bg-gray-700/25 dark:text-gray-200/90 shadow-none";
9242
9296
  const displayStart = useMemo(() => {
9243
9297
  if (!hasValidTime) return void 0;
9244
9298
  if (startDate) return currentTime || startDate;
@@ -9398,7 +9452,7 @@ function EventItemAgenda({
9398
9452
  {
9399
9453
  className: cn(
9400
9454
  "flex w-full flex-col gap-2 rounded-lg p-3 text-left outline-none transition-shadow duration-150 ease-out hover:bg-white/3 focus-visible:ring-2 focus-visible:ring-ring/50 focus-visible:border-ring data-past-event:line-through data-past-event:opacity-90 border-2 border-border",
9401
- getEventColorClassesAgenda(eventColor),
9455
+ getEventColorClassesAgenda(eventColor, event.id),
9402
9456
  className
9403
9457
  ),
9404
9458
  "aria-label": ariaLabel,
@@ -9644,21 +9698,38 @@ function DayViewAgenda({
9644
9698
  const { currentTimePosition, currentTimeVisible } = useCurrentTimeIndicatorAgenda(currentDate, "day");
9645
9699
  return /* @__PURE__ */ jsxs("div", { className: "contents", "data-slot": "day-view", children: [
9646
9700
  showAllDaySection && /* @__PURE__ */ jsx("div", { className: "border-border/70 border-t bg-muted/50", children: /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-[3rem_1fr] sm:grid-cols-[4rem_1fr]", children: [
9647
- /* @__PURE__ */ jsx("div", { className: "relative", 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: "All day" }) }),
9701
+ /* @__PURE__ */ jsx("div", { className: "relative border-border/70 border-r flex items-center justify-center p-1", children: /* @__PURE__ */ jsx("span", { className: "text-center text-[10px] text-muted-foreground/70 sm:text-xs", children: "Todo Dia" }) }),
9648
9702
  /* @__PURE__ */ jsx("div", { className: "relative border-border/70 border-r p-1 last:border-r-0", children: allDayEvents.map((event) => {
9649
9703
  const eventStart = getEventStartDate(event);
9650
9704
  const eventEnd = getEventEndDate(event) ?? getEventStartDate(event);
9651
9705
  const isFirstDay = eventStart ? isSameDay(currentDate, eventStart) : false;
9652
9706
  const isLastDay = eventEnd ? isSameDay(currentDate, eventEnd) : false;
9653
9707
  return /* @__PURE__ */ jsx(
9654
- EventItemAgenda,
9708
+ TooltipProviderBase,
9655
9709
  {
9656
- event,
9657
- isFirstDay,
9658
- isLastDay,
9659
- onClick: (e) => handleEventClick(event, e),
9660
- view: "month",
9661
- children: /* @__PURE__ */ jsx("div", { children: event.title })
9710
+ delayDuration: 400,
9711
+ children: /* @__PURE__ */ jsxs(TooltipBase, { children: [
9712
+ /* @__PURE__ */ jsx(TooltipTriggerBase, { asChild: true, children: /* @__PURE__ */ jsx("div", { className: "w-full", children: /* @__PURE__ */ jsx(
9713
+ EventItemAgenda,
9714
+ {
9715
+ event,
9716
+ isFirstDay,
9717
+ isLastDay,
9718
+ onClick: (e) => handleEventClick(event, e),
9719
+ view: "month",
9720
+ children: /* @__PURE__ */ jsx("div", { children: event.title })
9721
+ }
9722
+ ) }) }),
9723
+ /* @__PURE__ */ jsxs(TooltipContentBase, { side: "top", children: [
9724
+ /* @__PURE__ */ jsx("p", { className: "font-semibold truncate max-w-[200px]", children: event.title }),
9725
+ /* @__PURE__ */ jsx("p", { className: "opacity-80 mt-0.5 leading-snug", children: formatDurationAgenda(event) }),
9726
+ event.location && /* @__PURE__ */ jsxs("p", { className: "opacity-60 mt-0.5 truncate text-[11px] max-w-[200px] flex items-center gap-1", children: [
9727
+ /* @__PURE__ */ jsx(MapPinIcon, { size: 14 }),
9728
+ " ",
9729
+ event.location
9730
+ ] })
9731
+ ] })
9732
+ ] })
9662
9733
  },
9663
9734
  `spanning-${event.id}`
9664
9735
  );
@@ -9691,17 +9762,37 @@ function DayViewAgenda({
9691
9762
  width: `${positionedEvent.width * 100}%`,
9692
9763
  zIndex: positionedEvent.zIndex
9693
9764
  },
9694
- children: /* @__PURE__ */ jsx(
9695
- EventItemAgenda,
9696
- {
9697
- event: evt,
9698
- view: "day",
9699
- isFirstDay,
9700
- isLastDay,
9701
- onClick: (e) => handleEventClick(evt, e),
9702
- showTime: true
9703
- }
9704
- )
9765
+ children: /* @__PURE__ */ jsx(TooltipProviderBase, { delayDuration: 400, children: /* @__PURE__ */ jsxs(TooltipBase, { children: [
9766
+ /* @__PURE__ */ jsx(TooltipTriggerBase, { asChild: true, children: /* @__PURE__ */ jsx("div", { className: "size-full", children: /* @__PURE__ */ jsx(
9767
+ EventItemAgenda,
9768
+ {
9769
+ event: evt,
9770
+ view: "day",
9771
+ isFirstDay,
9772
+ isLastDay,
9773
+ onClick: (e) => handleEventClick(evt, e),
9774
+ showTime: true
9775
+ }
9776
+ ) }) }),
9777
+ /* @__PURE__ */ jsxs(
9778
+ TooltipContentBase,
9779
+ {
9780
+ side: "top",
9781
+ sideOffset: 6,
9782
+ className: "max-w-[220px] space-y-0.5",
9783
+ children: [
9784
+ /* @__PURE__ */ jsx("p", { className: "font-semibold text-sm leading-snug", children: evt.title }),
9785
+ /* @__PURE__ */ jsx("p", { className: "text-xs opacity-90", children: formatDurationAgenda(evt) }),
9786
+ evt.location && /* @__PURE__ */ jsxs("p", { className: "text-xs flex items-center gap-2", children: [
9787
+ /* @__PURE__ */ jsx(MapPinIcon, { size: 15 }),
9788
+ " ",
9789
+ evt.location
9790
+ ] }),
9791
+ evt.description && /* @__PURE__ */ jsx("p", { className: "text-xs opacity-75 line-clamp-2", children: evt.description })
9792
+ ]
9793
+ }
9794
+ )
9795
+ ] }) })
9705
9796
  },
9706
9797
  positionedEvent.event.id
9707
9798
  );
@@ -9995,7 +10086,8 @@ function EventAgenda({
9995
10086
  className,
9996
10087
  initialView = "month",
9997
10088
  initialDate,
9998
- onClick
10089
+ onClick,
10090
+ showYearView = false
9999
10091
  }) {
10000
10092
  const [currentDate, setCurrentDate] = useState(
10001
10093
  initialDate && new Date(initialDate) || /* @__PURE__ */ new Date()
@@ -10008,6 +10100,7 @@ function EventAgenda({
10008
10100
  else if (view === "day") setCurrentDate((d) => addDays(d, -1));
10009
10101
  else if (view === "agenda")
10010
10102
  setCurrentDate((d) => addDays(d, -AgendaDaysToShowAgenda));
10103
+ else if (view === "year") setCurrentDate((d) => subYears(d, 1));
10011
10104
  };
10012
10105
  const goNext = () => {
10013
10106
  if (view === "month") setCurrentDate((d) => addMonths(d, 1));
@@ -10015,6 +10108,7 @@ function EventAgenda({
10015
10108
  else if (view === "day") setCurrentDate((d) => addDays(d, 1));
10016
10109
  else if (view === "agenda")
10017
10110
  setCurrentDate((d) => addDays(d, AgendaDaysToShowAgenda));
10111
+ else if (view === "year") setCurrentDate((d) => addYears(d, 1));
10018
10112
  };
10019
10113
  const handleEventSelect = (event, e) => {
10020
10114
  try {
@@ -10052,7 +10146,8 @@ function EventAgenda({
10052
10146
  month: { full: "M\xEAs", short: "M" },
10053
10147
  week: { full: "Semana", short: "S" },
10054
10148
  day: { full: "Dia", short: "D" },
10055
- agenda: { full: "Agenda", short: "A" }
10149
+ agenda: { full: "Agenda", short: "A" },
10150
+ year: { full: "Ano", short: "An" }
10056
10151
  };
10057
10152
  const entry = labels[v] || { full: v, short: v };
10058
10153
  return condensed ? entry.short : entry.full;
@@ -10076,12 +10171,18 @@ function EventAgenda({
10076
10171
  const start = currentDate;
10077
10172
  return capitalize2(format(start, "MMMM yyyy", { locale: ptBR }));
10078
10173
  }
10174
+ if (view === "year") {
10175
+ return format(currentDate, "yyyy");
10176
+ }
10079
10177
  return capitalize2(format(currentDate, "MMMM yyyy", { locale: ptBR }));
10080
10178
  }, [currentDate, view]);
10081
- const selectItems = ["month", "week", "day", "agenda"].map((v) => ({
10082
- label: viewLabel(v),
10083
- value: v
10084
- }));
10179
+ const availableViews = showYearView ? ["year", "month", "week", "day", "agenda"] : ["month", "week", "day", "agenda"];
10180
+ const selectItems = availableViews.map(
10181
+ (v) => ({
10182
+ label: viewLabel(v),
10183
+ value: v
10184
+ })
10185
+ );
10085
10186
  return /* @__PURE__ */ jsxs(
10086
10187
  "div",
10087
10188
  {
@@ -10136,46 +10237,51 @@ function EventAgenda({
10136
10237
  }
10137
10238
  ) })
10138
10239
  ] }),
10139
- /* @__PURE__ */ jsxs(
10140
- "div",
10141
- {
10142
- className: "flex flex-col transition-all duration-200 ease-in-out",
10143
- children: [
10144
- view === "month" && /* @__PURE__ */ jsx(
10145
- MonthViewAgenda,
10146
- {
10147
- currentDate,
10148
- events,
10149
- onEventSelect: handleEventSelect
10150
- }
10151
- ),
10152
- view === "week" && /* @__PURE__ */ jsx(
10153
- WeekViewAgenda,
10154
- {
10155
- currentDate,
10156
- events,
10157
- onEventSelect: handleEventSelect
10158
- }
10159
- ),
10160
- view === "day" && /* @__PURE__ */ jsx(
10161
- DayViewAgenda,
10162
- {
10163
- currentDate,
10164
- events,
10165
- onEventSelect: handleEventSelect
10166
- }
10167
- ),
10168
- view === "agenda" && /* @__PURE__ */ jsx(
10169
- Agenda,
10170
- {
10171
- currentDate,
10172
- events,
10173
- onEventSelect: handleEventSelect
10174
- }
10175
- )
10176
- ]
10177
- }
10178
- )
10240
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col transition-all duration-200 ease-in-out", children: [
10241
+ view === "month" && /* @__PURE__ */ jsx(
10242
+ MonthViewAgenda,
10243
+ {
10244
+ currentDate,
10245
+ events,
10246
+ onEventSelect: handleEventSelect
10247
+ }
10248
+ ),
10249
+ view === "week" && /* @__PURE__ */ jsx(
10250
+ WeekViewAgenda,
10251
+ {
10252
+ currentDate,
10253
+ events,
10254
+ onEventSelect: handleEventSelect
10255
+ }
10256
+ ),
10257
+ view === "day" && /* @__PURE__ */ jsx(
10258
+ DayViewAgenda,
10259
+ {
10260
+ currentDate,
10261
+ events,
10262
+ onEventSelect: handleEventSelect
10263
+ }
10264
+ ),
10265
+ view === "agenda" && /* @__PURE__ */ jsx(
10266
+ Agenda,
10267
+ {
10268
+ currentDate,
10269
+ events,
10270
+ onEventSelect: handleEventSelect
10271
+ }
10272
+ ),
10273
+ view === "year" && /* @__PURE__ */ jsx(
10274
+ YearViewAgenda,
10275
+ {
10276
+ currentDate,
10277
+ events,
10278
+ onMonthSelect: (monthDate) => {
10279
+ setCurrentDate(monthDate);
10280
+ setView("month");
10281
+ }
10282
+ }
10283
+ )
10284
+ ] })
10179
10285
  ] }),
10180
10286
  selectedEvent && React32__default.isValidElement(onClick) ? React32__default.cloneElement(onClick, {
10181
10287
  event: selectedEvent,
@@ -10250,11 +10356,13 @@ function useEventVisibilityAgenda({
10250
10356
  const getVisibleEventCount = useMemo(() => {
10251
10357
  return (totalEvents) => {
10252
10358
  if (!contentHeight) return totalEvents;
10253
- const maxEvents = Math.floor(contentHeight / (eventHeight + eventGap));
10254
- if (totalEvents <= maxEvents) {
10359
+ const availableHeight = contentHeight + eventGap + 4;
10360
+ const slotHeight = eventHeight + eventGap;
10361
+ const maxSlots = Math.floor(availableHeight / slotHeight);
10362
+ if (totalEvents <= maxSlots) {
10255
10363
  return totalEvents;
10256
10364
  }
10257
- return maxEvents > 0 ? maxEvents - 1 : 0;
10365
+ return maxSlots > 0 ? maxSlots - 1 : 0;
10258
10366
  };
10259
10367
  }, [contentHeight, eventHeight, eventGap]);
10260
10368
  return {
@@ -10326,17 +10434,6 @@ function computeMultiDayBars(events, weekDays) {
10326
10434
  }
10327
10435
  return bars;
10328
10436
  }
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
10437
  function MultiDayOverlay({
10341
10438
  bars,
10342
10439
  weekIndex,
@@ -10359,7 +10456,7 @@ function MultiDayOverlay({
10359
10456
  /* @__PURE__ */ jsx(TooltipTriggerBase, { asChild: true, children: /* @__PURE__ */ jsx(
10360
10457
  "div",
10361
10458
  {
10362
- className: "absolute pointer-events-auto px-1.5",
10459
+ className: "absolute pointer-events-auto px-[5px]",
10363
10460
  style: {
10364
10461
  left: continuesFromPrev ? `${colStart / 7 * 100}%` : `calc(${colStart / 7 * 100}% + 3px)`,
10365
10462
  right: continuesToNext ? `${100 - (colStart + colSpan) / 7 * 100}%` : `calc(${100 - (colStart + colSpan) / 7 * 100}% + 3px)`,
@@ -10379,7 +10476,10 @@ function MultiDayOverlay({
10379
10476
  onEventSelect(event, e);
10380
10477
  },
10381
10478
  view: "month",
10382
- className: cn("w-full", isHovered && "[filter:brightness(0.92)]"),
10479
+ className: cn(
10480
+ "w-full",
10481
+ isHovered && "[filter:brightness(0.92)]"
10482
+ ),
10383
10483
  children: /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-0.5 w-full min-w-0", children: [
10384
10484
  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
10485
  !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") }),
@@ -10403,7 +10503,7 @@ function MultiDayOverlay({
10403
10503
  ) }),
10404
10504
  /* @__PURE__ */ jsxs(TooltipContentBase, { side: "top", children: [
10405
10505
  /* @__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) }),
10506
+ /* @__PURE__ */ jsx("p", { className: "opacity-80 mt-0.5 leading-snug", children: formatDurationAgenda(event) }),
10407
10507
  event.location && /* @__PURE__ */ jsxs("p", { className: "opacity-60 mt-0.5 truncate text-[11px] max-w-[200px]", children: [
10408
10508
  /* @__PURE__ */ jsx(MapPinIcon, { size: 15 }),
10409
10509
  " ",
@@ -10579,7 +10679,7 @@ function MonthViewAgenda({
10579
10679
  "div",
10580
10680
  {
10581
10681
  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",
10682
+ className: "flex-1 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-1",
10583
10683
  children: [
10584
10684
  Array.from({ length: dayMultiDayRowCount }).map(
10585
10685
  (_, si) => /* @__PURE__ */ jsx(
@@ -10601,20 +10701,31 @@ function MonthViewAgenda({
10601
10701
  {
10602
10702
  "aria-hidden": isHidden ? "true" : void 0,
10603
10703
  className: "aria-hidden:hidden",
10604
- children: /* @__PURE__ */ jsx(
10605
- EventItemAgenda,
10606
- {
10607
- event,
10608
- isFirstDay: true,
10609
- isLastDay: true,
10610
- onClick: (e) => handleEventClick(event, e),
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 })
10704
+ children: /* @__PURE__ */ jsx(TooltipProviderBase, { delayDuration: 400, children: /* @__PURE__ */ jsxs(TooltipBase, { children: [
10705
+ /* @__PURE__ */ jsx(TooltipTriggerBase, { asChild: true, children: /* @__PURE__ */ jsx("div", { className: "w-full", children: /* @__PURE__ */ jsx(
10706
+ EventItemAgenda,
10707
+ {
10708
+ event,
10709
+ isFirstDay: true,
10710
+ isLastDay: true,
10711
+ onClick: (e) => handleEventClick(event, e),
10712
+ view: "month",
10713
+ children: /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-1 sm:gap-1.5 truncate text-[11px] relative z-10", children: [
10714
+ !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") }),
10715
+ /* @__PURE__ */ jsx("span", { className: "font-semibold truncate", children: event.title })
10716
+ ] })
10717
+ }
10718
+ ) }) }),
10719
+ /* @__PURE__ */ jsxs(TooltipContentBase, { side: "top", children: [
10720
+ /* @__PURE__ */ jsx("p", { className: "font-semibold truncate max-w-[200px]", children: event.title }),
10721
+ /* @__PURE__ */ jsx("p", { className: "opacity-80 mt-0.5 leading-snug", children: formatDurationAgenda(event) }),
10722
+ event.location && /* @__PURE__ */ jsxs("p", { className: "opacity-60 mt-0.5 truncate text-[11px] max-w-[200px] flex items-center gap-1", children: [
10723
+ /* @__PURE__ */ jsx(MapPinIcon, { size: 14 }),
10724
+ " ",
10725
+ event.location
10615
10726
  ] })
10616
- }
10617
- )
10727
+ ] })
10728
+ ] }) })
10618
10729
  },
10619
10730
  event.id
10620
10731
  );
@@ -10629,7 +10740,7 @@ function MonthViewAgenda({
10629
10740
  type: "button",
10630
10741
  onClick: (e) => e.stopPropagation(),
10631
10742
  "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",
10743
+ className: "mt-auto 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
10744
  children: /* @__PURE__ */ jsxs("span", { className: "font-semibold", children: [
10634
10745
  "+ ",
10635
10746
  remainingCount,
@@ -10972,7 +11083,7 @@ function WeekViewAgenda({
10972
11083
  return /* @__PURE__ */ jsxs("div", { className: "flex h-full flex-col overflow-hidden", "data-slot": "week-view", children: [
10973
11084
  /* @__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
11085
  /* @__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") }) }),
11086
+ /* @__PURE__ */ jsx("div", { className: "py-2 text-center text-muted-foreground/70 text-[10px] sm:text-sm", children: /* @__PURE__ */ jsx("span", { className: "", children: "Hor\xE1rios" }) }),
10976
11087
  days.map((day) => /* @__PURE__ */ jsxs(
10977
11088
  "div",
10978
11089
  {
@@ -10985,7 +11096,7 @@ function WeekViewAgenda({
10985
11096
  format(day, "d", { locale: ptBR })
10986
11097
  ] }),
10987
11098
  /* @__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 }) })
11099
+ /* @__PURE__ */ jsx("span", { className: "hidden md:inline", children: format(day, "EEE dd", { locale: ptBR }) })
10989
11100
  ]
10990
11101
  },
10991
11102
  day.toString()
@@ -10993,7 +11104,7 @@ function WeekViewAgenda({
10993
11104
  ] }),
10994
11105
  showAllDaySection && /* @__PURE__ */ jsxs("div", { className: "border-border/70 border-b bg-muted/50", children: [
10995
11106
  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" }) }),
11107
+ /* @__PURE__ */ jsx("div", { className: "relative border-border/70 border-r flex items-center justify-center p-1", children: /* @__PURE__ */ jsx("span", { className: "text-center text-[10px] text-muted-foreground/70 sm:text-xs", children: "Todo dia" }) }),
10997
11108
  /* @__PURE__ */ jsxs(
10998
11109
  "div",
10999
11110
  {
@@ -11018,38 +11129,48 @@ function WeekViewAgenda({
11018
11129
  slot
11019
11130
  } = bar;
11020
11131
  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
- );
11132
+ return /* @__PURE__ */ jsx(TooltipProviderBase, { delayDuration: 400, children: /* @__PURE__ */ jsxs(TooltipBase, { children: [
11133
+ /* @__PURE__ */ jsx(TooltipTriggerBase, { asChild: true, children: /* @__PURE__ */ jsx(
11134
+ "div",
11135
+ {
11136
+ className: "absolute px-0.5",
11137
+ style: {
11138
+ left: `calc(${colStart / 7 * 100}% + 2px)`,
11139
+ width: `calc(${colSpan / 7 * 100}% - 4px)`,
11140
+ top: EventGapAgenda + slot * rowH,
11141
+ height: EventHeightAgenda
11142
+ },
11143
+ children: /* @__PURE__ */ jsx(
11144
+ EventItemAgenda,
11145
+ {
11146
+ event,
11147
+ isFirstDay,
11148
+ isLastDay,
11149
+ onClick: (e) => {
11150
+ e.stopPropagation();
11151
+ handleEventClick(event, e);
11152
+ },
11153
+ view: "month",
11154
+ className: "h-full",
11155
+ children: /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-1 min-w-0 w-full", children: [
11156
+ !isFirstDay && colStart === 0 && /* @__PURE__ */ jsx("span", { className: "shrink-0 text-[11px] font-bold opacity-60", children: /* @__PURE__ */ jsx(CaretLeftIcon$1, {}) }),
11157
+ showTitle && /* @__PURE__ */ jsx("span", { className: "truncate text-xs font-medium", children: event.title }),
11158
+ !isLastDay && colStart + colSpan === 7 && /* @__PURE__ */ jsx("span", { className: "shrink-0 ml-auto text-[11px] font-bold opacity-60", children: /* @__PURE__ */ jsx(CaretRightIcon$1, {}) })
11159
+ ] })
11160
+ }
11161
+ )
11162
+ }
11163
+ ) }),
11164
+ /* @__PURE__ */ jsxs(TooltipContentBase, { side: "top", children: [
11165
+ /* @__PURE__ */ jsx("p", { className: "font-semibold truncate max-w-[200px]", children: event.title }),
11166
+ /* @__PURE__ */ jsx("p", { className: "opacity-80 mt-0.5 leading-snug", children: formatDurationAgenda(event) }),
11167
+ event.location && /* @__PURE__ */ jsxs("p", { className: "opacity-60 mt-0.5 truncate text-[11px] max-w-[200px] flex items-center gap-1", children: [
11168
+ /* @__PURE__ */ jsx(MapPinIcon$1, { size: 14 }),
11169
+ " ",
11170
+ event.location
11171
+ ] })
11172
+ ] })
11173
+ ] }) }, event.id);
11053
11174
  })
11054
11175
  ]
11055
11176
  }
@@ -11063,7 +11184,7 @@ function WeekViewAgenda({
11063
11184
  trueAllDayEvents.length > 0 && "border-t border-border/40"
11064
11185
  ),
11065
11186
  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" }) }),
11187
+ /* @__PURE__ */ jsx("div", { className: "relative border-border/70 border-r flex items-center justify-center p-1", children: /* @__PURE__ */ jsx("span", { className: "text-center text-[10px] text-muted-foreground/70 sm:text-xs", children: "Evento" }) }),
11067
11188
  /* @__PURE__ */ jsxs(
11068
11189
  "div",
11069
11190
  {
@@ -11089,54 +11210,64 @@ function WeekViewAgenda({
11089
11210
  } = bar;
11090
11211
  const eventStart = getEventStartDate(event) ?? /* @__PURE__ */ new Date();
11091
11212
  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
- )
11137
- },
11138
- event.id
11139
- );
11213
+ return /* @__PURE__ */ jsx(TooltipProviderBase, { delayDuration: 400, children: /* @__PURE__ */ jsxs(TooltipBase, { children: [
11214
+ /* @__PURE__ */ jsx(TooltipTriggerBase, { asChild: true, children: /* @__PURE__ */ jsx(
11215
+ "div",
11216
+ {
11217
+ className: "absolute px-0.5",
11218
+ style: {
11219
+ left: `calc(${colStart / 7 * 100}% + 2px)`,
11220
+ width: `calc(${colSpan / 7 * 100}% - 4px)`,
11221
+ top: EventGapAgenda + slot * rowH,
11222
+ height: EventHeightAgenda
11223
+ },
11224
+ children: /* @__PURE__ */ jsx(
11225
+ EventItemAgenda,
11226
+ {
11227
+ event,
11228
+ isFirstDay,
11229
+ isLastDay,
11230
+ onClick: (e) => {
11231
+ e.stopPropagation();
11232
+ handleEventClick(event, e);
11233
+ },
11234
+ view: "month",
11235
+ className: "h-full border-dashed",
11236
+ children: /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-1 min-w-0 w-full", children: [
11237
+ !isFirstDay && colStart === 0 && /* @__PURE__ */ jsx("span", { className: "shrink-0 text-[11px] font-bold opacity-60", children: /* @__PURE__ */ jsx(CaretLeftIcon$1, {}) }),
11238
+ showTitle && /* @__PURE__ */ jsxs(Fragment, { children: [
11239
+ 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") }),
11240
+ /* @__PURE__ */ jsx("span", { className: "truncate text-xs font-medium", children: event.title }),
11241
+ isFirstDay && (() => {
11242
+ const evStart = getEventStartDate(event);
11243
+ const evEnd = getEventEndDate(event);
11244
+ if (!evStart || !evEnd) return null;
11245
+ const d = Math.round(
11246
+ (evEnd.getTime() - evStart.getTime()) / 864e5
11247
+ ) + 1;
11248
+ if (d < 2) return null;
11249
+ return /* @__PURE__ */ jsxs("span", { className: "shrink-0 inline-flex items-end font-bold leading-none px-1 py-0.5 text-[10px]", children: [
11250
+ d,
11251
+ "d"
11252
+ ] });
11253
+ })()
11254
+ ] }),
11255
+ !isLastDay && colStart + colSpan === 7 && /* @__PURE__ */ jsx("span", { className: "shrink-0 ml-auto text-[11px] font-bold opacity-60", children: /* @__PURE__ */ jsx(CaretRightIcon$1, {}) })
11256
+ ] })
11257
+ }
11258
+ )
11259
+ }
11260
+ ) }),
11261
+ /* @__PURE__ */ jsxs(TooltipContentBase, { side: "top", children: [
11262
+ /* @__PURE__ */ jsx("p", { className: "font-semibold truncate max-w-[200px]", children: event.title }),
11263
+ /* @__PURE__ */ jsx("p", { className: "opacity-80 mt-0.5 leading-snug", children: formatDurationAgenda(event) }),
11264
+ event.location && /* @__PURE__ */ jsxs("p", { className: "opacity-60 mt-0.5 truncate text-[11px] max-w-[200px] flex items-center gap-1", children: [
11265
+ /* @__PURE__ */ jsx(MapPinIcon$1, { size: 14 }),
11266
+ " ",
11267
+ event.location
11268
+ ] })
11269
+ ] })
11270
+ ] }) }, event.id);
11140
11271
  })
11141
11272
  ]
11142
11273
  }
@@ -11161,9 +11292,7 @@ function WeekViewAgenda({
11161
11292
  "data-today": isToday(day) || void 0,
11162
11293
  children: [
11163
11294
  (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;
11295
+ const timeLabel = formatDurationAgenda(positionedEvent.event);
11167
11296
  return /* @__PURE__ */ jsx(TooltipProviderBase, { children: /* @__PURE__ */ jsxs(TooltipBase, { delayDuration: 250, children: [
11168
11297
  /* @__PURE__ */ jsx(
11169
11298
  "div",
@@ -11199,7 +11328,7 @@ function WeekViewAgenda({
11199
11328
  className: "max-w-[220px] space-y-0.5",
11200
11329
  children: [
11201
11330
  /* @__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 }),
11331
+ /* @__PURE__ */ jsx("p", { className: "text-xs opacity-90", children: timeLabel }),
11203
11332
  positionedEvent.event.location && /* @__PURE__ */ jsxs("p", { className: "text-xs flex items-center gap-2", children: [
11204
11333
  /* @__PURE__ */ jsx(MapPinIcon$1, { size: 15 }),
11205
11334
  " ",
@@ -11274,25 +11403,105 @@ function WeekViewAgenda({
11274
11403
  )
11275
11404
  ] });
11276
11405
  }
11406
+ function YearViewAgenda({
11407
+ currentDate,
11408
+ events,
11409
+ onMonthSelect
11410
+ }) {
11411
+ const start = startOfYear(currentDate);
11412
+ const end = endOfYear(currentDate);
11413
+ const months = useMemo(() => {
11414
+ return eachMonthOfInterval({ start, end });
11415
+ }, [start, end]);
11416
+ const eventDates = useMemo(() => {
11417
+ return new Set(
11418
+ events.map((e) => getEventStartDate(e)).filter((d) => !!d).map((d) => format(d, "yyyy-MM-dd"))
11419
+ );
11420
+ }, [events]);
11421
+ return /* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-1 overflow-y-auto max-h-[calc(100vh-200px)] lg:max-h-[750px] scrollbar-thin scrollbar-thumb-muted-foreground/20 scrollbar-track-transparent", children: months.map((month) => /* @__PURE__ */ jsxs(
11422
+ "div",
11423
+ {
11424
+ className: "flex flex-col p-4 rounded-lg border border-border/70 bg-card hover:bg-muted/5 transition-colors cursor-pointer group",
11425
+ onClick: () => onMonthSelect(month),
11426
+ children: [
11427
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-2", children: [
11428
+ /* @__PURE__ */ jsx("h3", { className: "font-semibold text-sm capitalize text-foreground group-hover:text-primary transition-colors", children: format(month, "MMMM", { locale: ptBR }) }),
11429
+ /* @__PURE__ */ jsx("span", { className: "text-[10px] text-muted-foreground/50 uppercase tracking-wider opacity-0 group-hover:opacity-100 transition-opacity", children: "Detalhes" })
11430
+ ] }),
11431
+ /* @__PURE__ */ jsx(MonthMiniGrid, { month, eventDates })
11432
+ ]
11433
+ },
11434
+ month.toString()
11435
+ )) });
11436
+ }
11437
+ function MonthMiniGrid({
11438
+ month,
11439
+ eventDates
11440
+ }) {
11441
+ const days = useMemo(() => {
11442
+ const monthStart = startOfMonth(month);
11443
+ const calendarStart = startOfWeek(monthStart, { weekStartsOn: 0 });
11444
+ const daysArr = [];
11445
+ const curr = new Date(calendarStart);
11446
+ for (let i = 0; i < 42; i++) {
11447
+ daysArr.push(new Date(curr));
11448
+ curr.setDate(curr.getDate() + 1);
11449
+ }
11450
+ return daysArr;
11451
+ }, [month]);
11452
+ const weekdays = ["D", "S", "T", "Q", "Q", "S", "S"];
11453
+ return /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-7 gap-y-1 text-[11px]", children: [
11454
+ weekdays.map((wd, i) => /* @__PURE__ */ jsx(
11455
+ "div",
11456
+ {
11457
+ className: "text-center font-medium text-muted-foreground/70 py-1",
11458
+ children: wd
11459
+ },
11460
+ `${wd}-${i}`
11461
+ )),
11462
+ days.map((day) => {
11463
+ const isCurrentMonth = day.getMonth() === month.getMonth();
11464
+ const dateStr = format(day, "yyyy-MM-dd");
11465
+ const hasEvent = eventDates.has(dateStr);
11466
+ const isDayToday = isToday(day);
11467
+ return /* @__PURE__ */ jsxs(
11468
+ "div",
11469
+ {
11470
+ className: cn(
11471
+ "relative flex items-center justify-center p-1 rounded-sm aspect-square transition-colors",
11472
+ !isCurrentMonth && "opacity-0 pointer-events-none",
11473
+ isDayToday && "bg-blue-500 text-white font-semibold rounded-lg",
11474
+ isCurrentMonth && !isDayToday && "hover:bg-muted/50 text-foreground"
11475
+ ),
11476
+ children: [
11477
+ isCurrentMonth && format(day, "d"),
11478
+ isCurrentMonth && hasEvent && !isDayToday && /* @__PURE__ */ jsx("div", { className: "absolute bottom-0.5 left-1/2 -translate-x-1/2 w-1 h-1 rounded-full bg-blue-500" })
11479
+ ]
11480
+ },
11481
+ day.toString()
11482
+ );
11483
+ })
11484
+ ] });
11485
+ }
11277
11486
  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"
11487
+ sky: "from-sky-400 via-sky-500 to-cyan-500",
11488
+ amber: "from-amber-400 via-amber-500 to-orange-400",
11489
+ violet: "from-violet-400 via-violet-500 to-purple-600",
11490
+ rose: "from-rose-400 via-rose-500 to-pink-500",
11491
+ emerald: "from-emerald-400 via-emerald-500 to-teal-500",
11492
+ orange: "from-orange-400 via-orange-500 to-amber-500",
11493
+ green: "from-green-400 via-green-500 to-emerald-500",
11494
+ blue: "from-blue-400 via-blue-500 to-indigo-500",
11495
+ red: "from-red-400 via-red-500 to-rose-500",
11496
+ purple: "from-purple-400 via-purple-500 to-violet-600",
11497
+ indigo: "from-indigo-400 via-indigo-500 to-blue-600",
11498
+ teal: "from-teal-400 via-teal-500 to-cyan-500",
11499
+ pink: "from-pink-400 via-pink-500 to-rose-400",
11500
+ cyan: "from-cyan-400 via-cyan-500 to-sky-500",
11501
+ lime: "from-lime-400 via-lime-500 to-green-500",
11502
+ fuchsia: "from-fuchsia-400 via-fuchsia-500 to-purple-500"
11294
11503
  };
11295
- function formatDuration2(minutes) {
11504
+ function formatDuration(minutes) {
11296
11505
  if (minutes <= 0) return "";
11297
11506
  const h = Math.floor(minutes / 60);
11298
11507
  const m = minutes % 60;
@@ -11312,7 +11521,7 @@ function EventDetailModalAgenda({
11312
11521
  }) {
11313
11522
  const [open, setOpen] = useState(true);
11314
11523
  if (!event) return null;
11315
- const color = event.color ?? "sky";
11524
+ const color = event.color ?? getAutoColorAgenda(event.id);
11316
11525
  const bannerGradient = colorBannerMap[color] ?? colorBannerMap.sky;
11317
11526
  const startDate = getEventStartDate(event);
11318
11527
  const endDate = getEventEndDate(event);
@@ -11357,83 +11566,60 @@ function EventDetailModalAgenda({
11357
11566
  setOpen(v);
11358
11567
  if (!v) onClose?.();
11359
11568
  },
11360
- children: /* @__PURE__ */ jsxs(DialogContentBase, { className: "p-0 overflow-hidden gap-0 border-none shadow-xl sm:max-w-md", children: [
11569
+ children: /* @__PURE__ */ jsxs(DialogContentBase, { className: "p-0 overflow-hidden gap-0 border-none shadow-2xl sm:max-w-md rounded-2xl", children: [
11361
11570
  /* @__PURE__ */ jsxs(
11362
11571
  "div",
11363
11572
  {
11364
11573
  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",
11574
+ "relative bg-gradient-to-br w-full flex flex-col justify-end px-7 pt-14 pb-7 select-none overflow-hidden",
11366
11575
  bannerGradient
11367
11576
  ),
11368
11577
  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" }),
11578
+ /* @__PURE__ */ jsx("div", { className: "pointer-events-none absolute inset-0 bg-gradient-to-br from-white/20 via-transparent to-black/10" }),
11579
+ /* @__PURE__ */ jsx("div", { className: "absolute top-4 left-5 flex items-center gap-2 z-10", children: dateSection.isAllDay ? /* @__PURE__ */ jsxs(Badge, { className: "bg-black/20 text-white border border-white/20 backdrop-blur-sm shadow-none gap-1 text-[11px] font-medium", children: [
11580
+ /* @__PURE__ */ jsx(SunIcon, { size: 11, weight: "bold" }),
11371
11581
  "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)
11582
+ ] }) : isMultiDay ? /* @__PURE__ */ jsxs(Badge, { className: "bg-black/20 text-white border border-white/20 backdrop-blur-sm shadow-none gap-1 text-[11px] font-medium", children: [
11583
+ /* @__PURE__ */ jsx(CalendarDotsIcon, { size: 11, weight: "bold" }),
11584
+ formatDurationAgendaDays(event)
11585
+ ] }) : durationMinutes > 0 ? /* @__PURE__ */ jsxs(Badge, { className: "bg-black/20 text-white border border-white/20 backdrop-blur-sm shadow-none gap-1 text-[11px] font-medium", children: [
11586
+ /* @__PURE__ */ jsx(ClockIcon, { size: 11, weight: "bold" }),
11587
+ formatDuration(durationMinutes)
11378
11588
  ] }) : 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 })
11589
+ /* @__PURE__ */ jsx("h2", { className: "relative z-10 text-2xl sm:text-[1.75rem] font-bold text-white leading-tight tracking-tight drop-shadow-sm", children: event.title })
11380
11590
  ]
11381
11591
  }
11382
11592
  ),
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 }) })
11593
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col px-7 py-6 bg-background", children: [
11594
+ /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-4 py-4", children: [
11595
+ /* @__PURE__ */ jsx("div", { className: "mt-0.5 p-2 rounded-xl bg-muted border border-border shrink-0", children: /* @__PURE__ */ jsx(CalendarDotsIcon, { size: 18, weight: "duotone", className: "text-primary" }) }),
11596
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-0.5 min-w-0", children: [
11597
+ /* @__PURE__ */ jsx("span", { className: "text-[13px] font-semibold text-foreground leading-snug", children: dateSection.primary }),
11598
+ dateSection.secondary && /* @__PURE__ */ jsx("div", { className: "flex items-center gap-1.5 mt-0.5", children: isMultiDay && !event.allDay || isMultiDay && dateSection.isAllDay ? /* @__PURE__ */ jsxs(Fragment, { children: [
11599
+ /* @__PURE__ */ jsx(ArrowRightIcon$1, { size: 11, className: "shrink-0 text-muted-foreground/60" }),
11600
+ /* @__PURE__ */ jsx("span", { className: "text-[12px] font-medium text-muted-foreground", children: dateSection.secondary })
11601
+ ] }) : /* @__PURE__ */ jsx("span", { className: "text-[12px] font-medium text-muted-foreground", children: dateSection.secondary }) })
11405
11602
  ] })
11406
11603
  ] }),
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
- ] })
11604
+ (event.location || event.description) && /* @__PURE__ */ jsx(SeparatorBase, { className: "opacity-40" }),
11605
+ event.location && /* @__PURE__ */ jsxs(Fragment, { children: [
11606
+ /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-4 py-4", children: [
11607
+ /* @__PURE__ */ jsx("div", { className: "mt-0.5 p-2 rounded-xl bg-muted border border-border shrink-0", children: /* @__PURE__ */ jsx(MapPinIcon, { size: 18, weight: "duotone", className: "text-primary" }) }),
11608
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-0.5 min-w-0", children: [
11609
+ /* @__PURE__ */ jsx("span", { className: "text-[10px] font-medium uppercase tracking-widest text-muted-foreground/60", children: "Localiza\xE7\xE3o" }),
11610
+ /* @__PURE__ */ jsx("span", { className: "text-[13px] font-medium text-foreground leading-snug", children: event.location })
11611
+ ] })
11612
+ ] }),
11613
+ event.description && /* @__PURE__ */ jsx(SeparatorBase, { className: "opacity-40" })
11421
11614
  ] }),
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 })
11615
+ event.description && /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-4 py-4", children: [
11616
+ /* @__PURE__ */ jsx("div", { className: "mt-0.5 p-2 rounded-xl bg-muted border border-border shrink-0", children: /* @__PURE__ */ jsx(AlignLeftIcon, { size: 18, weight: "duotone", className: "text-primary" }) }),
11617
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-0.5 min-w-0", children: [
11618
+ /* @__PURE__ */ jsx("span", { className: "text-[10px] font-medium uppercase tracking-widest text-muted-foreground/60", children: "Descri\xE7\xE3o" }),
11619
+ /* @__PURE__ */ jsx("p", { className: "text-[13px] text-muted-foreground leading-relaxed font-normal", children: event.description })
11434
11620
  ] })
11435
11621
  ] }),
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." })
11622
+ !event.location && !event.description && /* @__PURE__ */ jsx("p", { className: "py-4 text-[11px] text-muted-foreground/40 italic text-center", children: "Nenhum detalhe adicional dispon\xEDvel." })
11437
11623
  ] })
11438
11624
  ] })
11439
11625
  }
@@ -14670,8 +14856,8 @@ var createValueFormatter = (customFormatter, formatBR) => {
14670
14856
  });
14671
14857
  const prefixFormats = ["R$", "$", "\u20AC", "\xA3"];
14672
14858
  const suffixFormats = ["%", "kg", "km", "m", "L", "un", "t", "h", "min", "s"];
14673
- const getFormattedValue = (baseValue, format19) => {
14674
- const trimmedFormat = format19.trim();
14859
+ const getFormattedValue = (baseValue, format21) => {
14860
+ const trimmedFormat = format21.trim();
14675
14861
  if (prefixFormats.includes(trimmedFormat)) {
14676
14862
  return `${trimmedFormat} ${baseValue}`;
14677
14863
  }
@@ -14696,8 +14882,8 @@ var createValueFormatter = (customFormatter, formatBR) => {
14696
14882
  num = Number.isNaN(parsed) ? NaN : parsed;
14697
14883
  }
14698
14884
  const baseFormatted = formatBR && !Number.isNaN(num) ? nf.format(num) : String(formattedValue ?? value ?? "");
14699
- const format19 = propsDataKey && formatterMap[propsDataKey] ? formatterMap[propsDataKey] : "";
14700
- return format19 ? getFormattedValue(baseFormatted, format19) : baseFormatted;
14885
+ const format21 = propsDataKey && formatterMap[propsDataKey] ? formatterMap[propsDataKey] : "";
14886
+ return format21 ? getFormattedValue(baseFormatted, format21) : baseFormatted;
14701
14887
  };
14702
14888
  }
14703
14889
  if (typeof customFormatter === "function") {
@@ -16349,8 +16535,578 @@ var SystemTooltip = ({
16349
16535
  ) });
16350
16536
  };
16351
16537
  var SystemTooltip_default = SystemTooltip;
16538
+ var useIsTruncated = (ref) => {
16539
+ const [truncated, setTruncated] = useState(false);
16540
+ useEffect(() => {
16541
+ const el = ref.current;
16542
+ if (!el) return;
16543
+ const check = () => setTruncated(el.scrollWidth > el.offsetWidth);
16544
+ check();
16545
+ const ro = new ResizeObserver(check);
16546
+ ro.observe(el);
16547
+ return () => ro.disconnect();
16548
+ }, [ref]);
16549
+ return truncated;
16550
+ };
16551
+ var NameTooltip = ({
16552
+ name,
16553
+ description
16554
+ }) => {
16555
+ const nameRef = useRef(null);
16556
+ const descRef = useRef(null);
16557
+ const isNameTruncated = useIsTruncated(nameRef);
16558
+ const isDescTruncated = useIsTruncated(descRef);
16559
+ const showTooltip = isNameTruncated || isDescTruncated;
16560
+ return /* @__PURE__ */ jsx(TooltipProviderBase, { children: /* @__PURE__ */ jsxs(TooltipBase, { children: [
16561
+ /* @__PURE__ */ jsx(TooltipTriggerBase, { asChild: true, children: /* @__PURE__ */ jsxs("div", { className: "cursor-default", children: [
16562
+ /* @__PURE__ */ jsx(
16563
+ "h3",
16564
+ {
16565
+ ref: nameRef,
16566
+ className: "text-xl font-bold text-foreground tracking-tight truncate",
16567
+ children: name
16568
+ }
16569
+ ),
16570
+ description && /* @__PURE__ */ jsx(
16571
+ "p",
16572
+ {
16573
+ ref: descRef,
16574
+ className: "text-xs text-foreground/70 truncate mt-0.5",
16575
+ children: description
16576
+ }
16577
+ )
16578
+ ] }) }),
16579
+ showTooltip && /* @__PURE__ */ jsxs(TooltipContentBase, { sideOffset: 8, className: "z-[10001]", children: [
16580
+ /* @__PURE__ */ jsx("p", { className: "font-semibold", children: name }),
16581
+ description && /* @__PURE__ */ jsx("p", { className: "text-xs text-foreground/70 mt-0.5", children: description })
16582
+ ] })
16583
+ ] }) });
16584
+ };
16585
+ var SystemNode = ({ label }) => {
16586
+ const truncated = label.length > 9 ? label.substring(0, 9) + "\u2026" : label;
16587
+ const needsTooltip = label.length > 9;
16588
+ const circle = /* @__PURE__ */ jsx("div", { className: "w-[76px] h-[76px] rounded-full bg-primary flex items-center justify-center shrink-0 z-10 cursor-default", children: /* @__PURE__ */ jsx("span", { className: "text-[10px] font-bold text-primary-foreground text-center px-2 leading-tight select-none", children: truncated }) });
16589
+ if (!needsTooltip) return circle;
16590
+ return /* @__PURE__ */ jsx(TooltipProviderBase, { children: /* @__PURE__ */ jsxs(TooltipBase, { children: [
16591
+ /* @__PURE__ */ jsx(TooltipTriggerBase, { asChild: true, children: circle }),
16592
+ /* @__PURE__ */ jsx(TooltipContentBase, { sideOffset: 8, className: "z-[10001]", children: label })
16593
+ ] }) });
16594
+ };
16595
+ var Beam = ({ isInput, containerRef, leftRef, rightRef }) => {
16596
+ const gradientId = useId();
16597
+ const [pathD, setPathD] = useState("");
16598
+ const [svgSize, setSvgSize] = useState({ w: 0, h: 0 });
16599
+ useEffect(() => {
16600
+ let rafId;
16601
+ const update = () => {
16602
+ const container = containerRef.current;
16603
+ const left = leftRef.current;
16604
+ const right = rightRef.current;
16605
+ if (!container || !left || !right) return;
16606
+ const cr = container.getBoundingClientRect();
16607
+ const lr = left.getBoundingClientRect();
16608
+ const rr = right.getBoundingClientRect();
16609
+ const cx1 = lr.left - cr.left + lr.width / 2;
16610
+ const cy1 = lr.top - cr.top + lr.height / 2;
16611
+ const cx2 = rr.left - cr.left + rr.width / 2;
16612
+ const cy2 = rr.top - cr.top + rr.height / 2;
16613
+ const dx = cx2 - cx1, dy = cy2 - cy1;
16614
+ const dist = Math.sqrt(dx * dx + dy * dy);
16615
+ if (dist === 0) return;
16616
+ const ux = dx / dist, uy = dy / dist;
16617
+ const r1 = lr.width / 2;
16618
+ const r2 = rr.width / 2;
16619
+ setSvgSize({ w: cr.width, h: cr.height });
16620
+ setPathD(
16621
+ `M ${cx1 + ux * r1},${cy1 + uy * r1} L ${cx2 - ux * r2},${cy2 - uy * r2}`
16622
+ );
16623
+ };
16624
+ const schedule = () => {
16625
+ cancelAnimationFrame(rafId);
16626
+ rafId = requestAnimationFrame(update);
16627
+ };
16628
+ requestAnimationFrame(() => requestAnimationFrame(update));
16629
+ schedule();
16630
+ const ro = new ResizeObserver(schedule);
16631
+ if (containerRef.current) ro.observe(containerRef.current);
16632
+ if (leftRef.current) ro.observe(leftRef.current);
16633
+ if (rightRef.current) ro.observe(rightRef.current);
16634
+ const mo = new MutationObserver(schedule);
16635
+ mo.observe(document.documentElement, {
16636
+ attributes: true,
16637
+ attributeFilter: ["class", "style"]
16638
+ });
16639
+ mo.observe(document.body, {
16640
+ attributes: true,
16641
+ attributeFilter: ["class", "style"]
16642
+ });
16643
+ return () => {
16644
+ cancelAnimationFrame(rafId);
16645
+ ro.disconnect();
16646
+ mo.disconnect();
16647
+ };
16648
+ }, [containerRef, leftRef, rightRef]);
16649
+ const animX1 = isInput ? ["90%", "-10%"] : ["10%", "110%"];
16650
+ const animX2 = isInput ? ["100%", "0%"] : ["0%", "100%"];
16651
+ if (!pathD) return null;
16652
+ return /* @__PURE__ */ jsxs(
16653
+ "svg",
16654
+ {
16655
+ className: "pointer-events-none absolute left-0 top-0",
16656
+ width: svgSize.w,
16657
+ height: svgSize.h,
16658
+ fill: "none",
16659
+ children: [
16660
+ /* @__PURE__ */ jsx(
16661
+ "path",
16662
+ {
16663
+ d: pathD,
16664
+ className: "stroke-primary",
16665
+ strokeWidth: 2,
16666
+ strokeOpacity: 0.2,
16667
+ strokeLinecap: "round"
16668
+ }
16669
+ ),
16670
+ /* @__PURE__ */ jsx(
16671
+ motion.path,
16672
+ {
16673
+ d: pathD,
16674
+ stroke: `url(#${gradientId})`,
16675
+ strokeWidth: 2,
16676
+ strokeLinecap: "round",
16677
+ initial: { strokeOpacity: 0 },
16678
+ animate: { strokeOpacity: 1 },
16679
+ transition: { duration: 1 }
16680
+ }
16681
+ ),
16682
+ /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsxs(
16683
+ motion.linearGradient,
16684
+ {
16685
+ id: gradientId,
16686
+ gradientUnits: "userSpaceOnUse",
16687
+ initial: { x1: "0%", x2: "0%", y1: "0%", y2: "0%" },
16688
+ animate: {
16689
+ x1: animX1,
16690
+ x2: animX2,
16691
+ y1: ["0%", "0%"],
16692
+ y2: ["0%", "0%"]
16693
+ },
16694
+ transition: {
16695
+ duration: 4,
16696
+ ease: [0.16, 1, 0.3, 1],
16697
+ repeat: Infinity,
16698
+ repeatDelay: 0
16699
+ },
16700
+ children: [
16701
+ /* @__PURE__ */ jsx("stop", { stopColor: "hsl(var(--primary))", stopOpacity: "0" }),
16702
+ /* @__PURE__ */ jsx("stop", { stopColor: "hsl(var(--primary))" }),
16703
+ /* @__PURE__ */ jsx("stop", { offset: "32.5%", stopColor: "hsl(var(--primary))" }),
16704
+ /* @__PURE__ */ jsx("stop", { offset: "100%", stopColor: "hsl(var(--primary))", stopOpacity: "0" })
16705
+ ]
16706
+ }
16707
+ ) })
16708
+ ]
16709
+ }
16710
+ );
16711
+ };
16712
+ var SystemsDiagram = ({ isInput, currentSystem, externalSystem }) => {
16713
+ const containerRef = useRef(null);
16714
+ const leftRef = useRef(null);
16715
+ const rightRef = useRef(null);
16716
+ return /* @__PURE__ */ jsxs(
16717
+ "div",
16718
+ {
16719
+ ref: containerRef,
16720
+ className: "relative flex items-center justify-between py-1 px-3",
16721
+ children: [
16722
+ /* @__PURE__ */ jsx("div", { ref: leftRef, children: /* @__PURE__ */ jsx(SystemNode, { label: isInput ? externalSystem : currentSystem }) }),
16723
+ /* @__PURE__ */ jsx("div", { ref: rightRef, children: /* @__PURE__ */ jsx(SystemNode, { label: isInput ? currentSystem : externalSystem }) }),
16724
+ /* @__PURE__ */ jsx(
16725
+ Beam,
16726
+ {
16727
+ isInput,
16728
+ containerRef,
16729
+ leftRef,
16730
+ rightRef
16731
+ }
16732
+ )
16733
+ ]
16734
+ }
16735
+ );
16736
+ };
16737
+ var CopyData = ({ value }) => {
16738
+ const [copied, setCopied] = useState(false);
16739
+ const handleCopy = useCallback(() => {
16740
+ navigator.clipboard.writeText(value).then(() => {
16741
+ setCopied(true);
16742
+ setTimeout(() => setCopied(false), 1500);
16743
+ });
16744
+ }, [value]);
16745
+ return /* @__PURE__ */ jsx(TooltipProviderBase, { children: /* @__PURE__ */ jsxs(TooltipBase, { children: [
16746
+ /* @__PURE__ */ jsx(TooltipTriggerBase, { asChild: true, children: /* @__PURE__ */ jsx(
16747
+ "button",
16748
+ {
16749
+ onClick: handleCopy,
16750
+ className: "shrink-0 p-0.5 rounded transition-colors text-muted-foreground/40 hover:text-foreground hover:bg-muted",
16751
+ style: { cursor: "pointer" },
16752
+ children: copied ? /* @__PURE__ */ jsx("svg", { width: "12", height: "12", viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ jsx(
16753
+ "path",
16754
+ {
16755
+ d: "M3 8l3.5 3.5L13 4.5",
16756
+ stroke: "currentColor",
16757
+ strokeWidth: "2",
16758
+ strokeLinecap: "round",
16759
+ strokeLinejoin: "round"
16760
+ }
16761
+ ) }) : /* @__PURE__ */ jsxs("svg", { width: "12", height: "12", viewBox: "0 0 16 16", fill: "none", children: [
16762
+ /* @__PURE__ */ jsx(
16763
+ "rect",
16764
+ {
16765
+ x: "5",
16766
+ y: "5",
16767
+ width: "8",
16768
+ height: "9",
16769
+ rx: "1.5",
16770
+ stroke: "currentColor",
16771
+ strokeWidth: "1.5"
16772
+ }
16773
+ ),
16774
+ /* @__PURE__ */ jsx(
16775
+ "path",
16776
+ {
16777
+ d: "M3 11V3.5A1.5 1.5 0 0 1 4.5 2H11",
16778
+ stroke: "currentColor",
16779
+ strokeWidth: "1.5",
16780
+ strokeLinecap: "round"
16781
+ }
16782
+ )
16783
+ ] })
16784
+ }
16785
+ ) }),
16786
+ /* @__PURE__ */ jsx(TooltipContentBase, { sideOffset: 6, className: "z-[10001]", children: copied ? "Copiado!" : "Copiar" })
16787
+ ] }) });
16788
+ };
16789
+ var propertyLabels = {
16790
+ Nome: "Nome",
16791
+ tipo: "Tipo",
16792
+ Tipo: "Tipo",
16793
+ Protocolos: "Protocolos",
16794
+ Ambiente: "Ambiente",
16795
+ Setor: "Setor",
16796
+ Contato: "Contato",
16797
+ Sustentacao: "Sustenta\xE7\xE3o",
16798
+ Destino: "Destino",
16799
+ Origem: "Origem"
16800
+ };
16801
+ var IntegrationCard = ({ title, details }) => {
16802
+ const titleRef = useRef(null);
16803
+ const isTitleTruncated = useIsTruncated(titleRef);
16804
+ const blackList = ["id", "elementId", "identity"];
16805
+ const entries = details ? Object.entries(details).filter(
16806
+ ([key, value]) => value !== void 0 && value !== null && value !== "" && !blackList.includes(key)
16807
+ ) : [];
16808
+ return /* @__PURE__ */ jsxs("div", { className: "rounded-sm border border-border/40 bg-muted/20 overflow-hidden", children: [
16809
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 px-3 py-2 border-b border-border/30", children: [
16810
+ /* @__PURE__ */ jsx(TooltipProviderBase, { children: /* @__PURE__ */ jsxs(TooltipBase, { children: [
16811
+ /* @__PURE__ */ jsx(TooltipTriggerBase, { asChild: true, children: /* @__PURE__ */ jsx(
16812
+ "span",
16813
+ {
16814
+ ref: titleRef,
16815
+ className: "text-sm font-bold text-foreground truncate flex-1 cursor-default",
16816
+ children: title
16817
+ }
16818
+ ) }),
16819
+ isTitleTruncated && /* @__PURE__ */ jsx(TooltipContentBase, { sideOffset: 6, className: "z-[10001]", children: title })
16820
+ ] }) }),
16821
+ entries.length > 0 && /* @__PURE__ */ jsx(
16822
+ CopyData,
16823
+ {
16824
+ value: entries.map(([k, v]) => `${propertyLabels[k] || k}: ${String(v)}`).join("\n")
16825
+ }
16826
+ )
16827
+ ] }),
16828
+ entries.length > 0 && /* @__PURE__ */ jsx("div", { className: "divide-y divide-border/20", children: entries.map(([key, value]) => {
16829
+ const label = propertyLabels[key] || key;
16830
+ return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 px-3 py-1.5", children: [
16831
+ /* @__PURE__ */ jsxs("span", { className: "text-xs font-semibold text-muted-foreground shrink-0 w-[40%] sm:w-[38%]", children: [
16832
+ label,
16833
+ ":"
16834
+ ] }),
16835
+ /* @__PURE__ */ jsx("span", { className: "text-xs text-foreground break-all flex-1", children: String(value) })
16836
+ ] }, key);
16837
+ }) })
16838
+ ] });
16839
+ };
16840
+ var TooltipBodyComponent = ({ data, isLoading, connections, isInput, externalSystem }) => /* @__PURE__ */ jsxs("div", { className: "px-3 py-3 space-y-3 overflow-y-auto flex-1 [&::-webkit-scrollbar]:w-1 [&::-webkit-scrollbar-track]:bg-transparent [&::-webkit-scrollbar-thumb]:bg-muted-foreground/20 [&::-webkit-scrollbar-thumb]:rounded-full hover:[&::-webkit-scrollbar-thumb]:bg-muted-foreground/40 transition-colors", children: [
16841
+ isLoading ? /* @__PURE__ */ jsxs("div", { className: "space-y-1.5", children: [
16842
+ /* @__PURE__ */ jsx(SkeletonBase, { className: "h-6 w-3/4" }),
16843
+ /* @__PURE__ */ jsx(SkeletonBase, { className: "h-3.5 w-1/2" })
16844
+ ] }) : /* @__PURE__ */ jsx(NameTooltip, { name: data.name, description: data.description }),
16845
+ /* @__PURE__ */ jsx("div", { className: "border-t border-border/20" }),
16846
+ isLoading ? /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
16847
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between py-1", children: [
16848
+ /* @__PURE__ */ jsx(SkeletonBase, { className: "w-[76px] h-[76px] rounded-full" }),
16849
+ /* @__PURE__ */ jsx(SkeletonBase, { className: "w-[76px] h-[76px] rounded-full" })
16850
+ ] }),
16851
+ /* @__PURE__ */ jsx("div", { className: "border-t border-border/20" }),
16852
+ [1, 2].map((i) => /* @__PURE__ */ jsxs(
16853
+ "div",
16854
+ {
16855
+ className: "rounded-lg border border-border/20 overflow-hidden",
16856
+ children: [
16857
+ /* @__PURE__ */ jsx(SkeletonBase, { className: "h-8 w-full" }),
16858
+ [1, 2, 3].map((j) => /* @__PURE__ */ jsx(SkeletonBase, { className: "h-7 w-full mt-px" }, j))
16859
+ ]
16860
+ },
16861
+ i
16862
+ ))
16863
+ ] }) : connections.length === 0 ? /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground text-center py-4", children: "Nenhuma conex\xE3o encontrada" }) : /* @__PURE__ */ jsxs(Fragment, { children: [
16864
+ /* @__PURE__ */ jsx(
16865
+ SystemsDiagram,
16866
+ {
16867
+ isInput,
16868
+ currentSystem: data.name,
16869
+ externalSystem
16870
+ }
16871
+ ),
16872
+ /* @__PURE__ */ jsx("div", { className: "border-t border-border/20" }),
16873
+ /* @__PURE__ */ jsx("div", { className: "flex items-center gap-", children: /* @__PURE__ */ jsx("span", { className: "text-[10px] font-bold text-muted-foreground uppercase", children: isInput ? "Informa\xE7\xF5es de Entrada" : "Informa\xE7\xF5es de Sa\xEDda" }) }),
16874
+ /* @__PURE__ */ jsx("div", { className: "space-y-2", children: connections.map((conn) => /* @__PURE__ */ jsx(
16875
+ IntegrationCard,
16876
+ {
16877
+ title: conn.name,
16878
+ details: conn.integration
16879
+ },
16880
+ conn.id
16881
+ )) })
16882
+ ] })
16883
+ ] });
16884
+ var TooltipBody = React32__default.memo(TooltipBodyComponent);
16885
+ var tooltipVariants3 = {
16886
+ hidden: {
16887
+ opacity: 0,
16888
+ scale: 0.96,
16889
+ transition: { type: "spring", stiffness: 400, damping: 28 }
16890
+ },
16891
+ visible: {
16892
+ opacity: 1,
16893
+ scale: 1,
16894
+ transition: { type: "spring", stiffness: 300, damping: 28 }
16895
+ },
16896
+ exit: {
16897
+ opacity: 0,
16898
+ scale: 0.96,
16899
+ transition: { type: "spring", stiffness: 400, damping: 28 }
16900
+ }
16901
+ };
16902
+ var IntegrationTooltip = ({
16903
+ id,
16904
+ data,
16905
+ position,
16906
+ title = "Conex\xF5es",
16907
+ isLoading = false,
16908
+ systemName,
16909
+ onMouseDown,
16910
+ onClose,
16911
+ onPositionChange
16912
+ }) => {
16913
+ const isMobile = useIsMobile();
16914
+ const [localPos, setLocalPos] = useState(position);
16915
+ const [dragging, setDragging] = useState(false);
16916
+ const offsetRef = useRef({ x: 0, y: 0 });
16917
+ const lastMouse = useRef({ x: 0, y: 0 });
16918
+ useEffect(() => setLocalPos(position), [position]);
16919
+ useEffect(() => {
16920
+ let rafId = null;
16921
+ const handleMouseMove = (e) => {
16922
+ if (!dragging) return;
16923
+ lastMouse.current = { x: e.clientX, y: e.clientY };
16924
+ if (rafId) cancelAnimationFrame(rafId);
16925
+ rafId = requestAnimationFrame(() => {
16926
+ const newLeft = lastMouse.current.x - offsetRef.current.x;
16927
+ const newTop = lastMouse.current.y - offsetRef.current.y;
16928
+ const p = {
16929
+ top: Math.max(0, Math.min(newTop, window.innerHeight - 200)),
16930
+ left: Math.max(0, Math.min(newLeft, window.innerWidth - 320))
16931
+ };
16932
+ setLocalPos(p);
16933
+ onPositionChange?.(id, p);
16934
+ });
16935
+ };
16936
+ const handleMouseUp = () => {
16937
+ if (dragging) {
16938
+ setDragging(false);
16939
+ if (rafId) cancelAnimationFrame(rafId);
16940
+ }
16941
+ };
16942
+ if (dragging) {
16943
+ document.addEventListener("mousemove", handleMouseMove, {
16944
+ passive: true
16945
+ });
16946
+ document.addEventListener("mouseup", handleMouseUp);
16947
+ document.body.style.cursor = "grabbing";
16948
+ document.body.style.userSelect = "none";
16949
+ }
16950
+ return () => {
16951
+ if (rafId) cancelAnimationFrame(rafId);
16952
+ document.removeEventListener("mousemove", handleMouseMove);
16953
+ document.removeEventListener("mouseup", handleMouseUp);
16954
+ document.body.style.cursor = "";
16955
+ document.body.style.userSelect = "";
16956
+ };
16957
+ }, [dragging, id, onPositionChange]);
16958
+ const handleMouseDownLocal = useCallback(
16959
+ (e) => {
16960
+ e.preventDefault();
16961
+ e.stopPropagation();
16962
+ const rect = e.currentTarget.closest(".fixed")?.getBoundingClientRect();
16963
+ if (!rect) return;
16964
+ offsetRef.current = { x: e.clientX - rect.left, y: e.clientY - rect.top };
16965
+ setDragging(true);
16966
+ onMouseDown?.(id, e);
16967
+ },
16968
+ [id, onMouseDown]
16969
+ );
16970
+ const handleTouchStartLocal = useCallback(
16971
+ (e) => {
16972
+ e.stopPropagation();
16973
+ const touch = e.touches[0];
16974
+ if (!touch) return;
16975
+ const rect = e.currentTarget.closest(".fixed")?.getBoundingClientRect();
16976
+ if (!rect) return;
16977
+ offsetRef.current = {
16978
+ x: touch.clientX - rect.left,
16979
+ y: touch.clientY - rect.top
16980
+ };
16981
+ setDragging(true);
16982
+ onMouseDown?.(id, e);
16983
+ },
16984
+ [id, onMouseDown]
16985
+ );
16986
+ const inputConnections = useMemo(
16987
+ () => data.connections.filter((c) => c.type === "entrada"),
16988
+ [data.connections]
16989
+ );
16990
+ const outputConnections = useMemo(
16991
+ () => data.connections.filter((c) => c.type === "saida"),
16992
+ [data.connections]
16993
+ );
16994
+ const isInput = inputConnections.length > 0;
16995
+ const connections = isInput ? inputConnections : outputConnections;
16996
+ const externalSystem = systemName ?? connections[0]?.name ?? "Sistema";
16997
+ const header = /* @__PURE__ */ jsxs(
16998
+ "div",
16999
+ {
17000
+ className: "flex items-center justify-between py-1 border-b border-border/10 bg-muted/30 shrink-0",
17001
+ onMouseDown: handleMouseDownLocal,
17002
+ onTouchStart: handleTouchStartLocal,
17003
+ style: {
17004
+ touchAction: "none",
17005
+ cursor: dragging ? "grabbing" : "grab"
17006
+ },
17007
+ children: [
17008
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 px-3", children: [
17009
+ /* @__PURE__ */ jsx(DotsSixVerticalIcon, { size: 16, className: "text-primary" }),
17010
+ /* @__PURE__ */ jsx("span", { className: "text-xs font-semibold text-muted-foreground uppercase tracking-wider", children: title })
17011
+ ] }),
17012
+ /* @__PURE__ */ jsx(
17013
+ ButtonBase,
17014
+ {
17015
+ variant: "ghost",
17016
+ size: "icon",
17017
+ onClick: () => onClose(id),
17018
+ className: "text-muted-foreground hover:text-destructive transition-colors hover:bg-destructive/10 mr-1",
17019
+ style: { cursor: "pointer" },
17020
+ children: /* @__PURE__ */ jsx(XIcon, { size: 16 })
17021
+ }
17022
+ )
17023
+ ]
17024
+ }
17025
+ );
17026
+ const bodyProps = { data, isLoading, connections, isInput, externalSystem };
17027
+ if (isMobile) {
17028
+ return /* @__PURE__ */ jsx(AnimatePresence, { children: /* @__PURE__ */ jsxs(Fragment, { children: [
17029
+ /* @__PURE__ */ jsx(
17030
+ motion.div,
17031
+ {
17032
+ className: "fixed inset-0 z-[9999] bg-black/40 backdrop-blur-[2px]",
17033
+ initial: { opacity: 0 },
17034
+ animate: { opacity: 1 },
17035
+ exit: { opacity: 0 },
17036
+ onClick: () => onClose(id)
17037
+ },
17038
+ `overlay-${id}`
17039
+ ),
17040
+ /* @__PURE__ */ jsxs(
17041
+ motion.div,
17042
+ {
17043
+ className: "fixed bottom-0 left-0 right-0 z-[10000] bg-card border-t border-border/50 rounded-t-2xl shadow-2xl flex flex-col",
17044
+ style: { maxHeight: "85dvh" },
17045
+ initial: { y: "100%" },
17046
+ animate: { y: 0 },
17047
+ exit: { y: "100%" },
17048
+ transition: { type: "spring", stiffness: 320, damping: 36 },
17049
+ onClick: (e) => e.stopPropagation(),
17050
+ children: [
17051
+ /* @__PURE__ */ jsx("div", { className: "flex justify-center pt-2.5 pb-1 shrink-0", children: /* @__PURE__ */ jsx("div", { className: "w-10 h-1 rounded-full bg-border" }) }),
17052
+ header,
17053
+ /* @__PURE__ */ jsx("div", { className: "overflow-y-auto flex-1 pb-[env(safe-area-inset-bottom)]", children: /* @__PURE__ */ jsx(TooltipBody, { ...bodyProps }) })
17054
+ ]
17055
+ },
17056
+ `sheet-${id}`
17057
+ )
17058
+ ] }) });
17059
+ }
17060
+ return /* @__PURE__ */ jsx(AnimatePresence, { children: /* @__PURE__ */ jsxs(
17061
+ motion.div,
17062
+ {
17063
+ className: "fixed bg-card/95 backdrop-blur-md border border-border/50 rounded-lg shadow-2xl z-[10000] w-[calc(100vw-32px)] max-w-sm sm:w-80 overflow-hidden flex flex-col",
17064
+ variants: tooltipVariants3,
17065
+ initial: "hidden",
17066
+ animate: "visible",
17067
+ exit: "exit",
17068
+ style: { top: localPos.top, left: localPos.left },
17069
+ onClick: (e) => e.stopPropagation(),
17070
+ children: [
17071
+ header,
17072
+ /* @__PURE__ */ jsx("div", { className: "max-h-[60vh] sm:max-h-[520px] overflow-hidden flex flex-col", children: /* @__PURE__ */ jsx(TooltipBody, { ...bodyProps }) })
17073
+ ]
17074
+ },
17075
+ id
17076
+ ) });
17077
+ };
17078
+ var IntegrationTooltip_default = IntegrationTooltip;
17079
+
17080
+ // src/components/ui/charts/components/tooltips/utils/integrationTooltipUtils.ts
17081
+ function processIntegrationData(integrations, targetSystemName) {
17082
+ const connections = [];
17083
+ integrations.forEach((integration) => {
17084
+ const origemNome = integration.origem.properties.nome;
17085
+ const destinoNome = integration.destino.properties.nome;
17086
+ if (origemNome === targetSystemName) {
17087
+ connections.push({
17088
+ id: integration.r.elementId,
17089
+ name: destinoNome,
17090
+ type: "saida",
17091
+ integration: integration.r.properties
17092
+ });
17093
+ }
17094
+ if (destinoNome === targetSystemName) {
17095
+ connections.push({
17096
+ id: integration.r.elementId,
17097
+ name: origemNome,
17098
+ type: "entrada",
17099
+ integration: integration.r.properties
17100
+ });
17101
+ }
17102
+ });
17103
+ return {
17104
+ name: targetSystemName,
17105
+ connections
17106
+ };
17107
+ }
16352
17108
 
16353
- // src/components/ui/charts/components/tooltips/systemTooltipUtils.ts
17109
+ // src/components/ui/charts/components/tooltips/utils/systemTooltipUtils.ts
16354
17110
  function processNeo4jData(integrations, targetSystemName) {
16355
17111
  const connections = [];
16356
17112
  integrations.forEach((integration) => {
@@ -20231,4 +20987,4 @@ function ControlledCombobox({
20231
20987
  );
20232
20988
  }
20233
20989
 
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 };
20990
+ export { AddButton, Agenda, AgendaDaysToShow, AgendaDaysToShowAgenda, AgendaView, AlertDialogActionBase, AlertDialogBase, AlertDialogCancelBase, AlertDialogContentBase, AlertDialogDescriptionBase, AlertDialogFooterBase, AlertDialogHeaderBase, AlertDialogOverlayBase, AlertDialogPortalBase, AlertDialogTitleBase, AlertDialogTriggerBase, AvatarBase, AvatarCombobox, AvatarFallbackBase, AvatarImageBase, BackButton, Badge, Beam, 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, CopyData, 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, IntegrationCard, IntegrationTooltip_default as IntegrationTooltip, 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, NameTooltip, 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, SystemNode, SystemTooltip_default as SystemTooltip, SystemsDiagram, TableBase, TableBodyBase, TableCaptionBase, TableCellBase, TableFooterBase, TableHeadBase, TableHeaderBase, TableRowBase, TabsBase, TabsContentBase, TabsListBase, TabsTriggerBase, TextAreaBase, ThemeProviderBase, TimePicker, TimePickerInput, TimeSeries_default as TimeSeries, Toaster, TooltipBase, TooltipBody, TooltipContentBase, TooltipProviderBase, TooltipSimple_default as TooltipSimple, TooltipTriggerBase, TooltipWithTotal_default as TooltipWithTotal, UndatedEvents, UniversalTooltipRenderer, UnlockButton, UploadButton, UseSideBarBase, VISIBLE_ITEMS, ViewButton, VisibilityButton, WeekCellsHeight, WeekCellsHeightAgenda, WeekView, WeekViewAgenda, YearViewAgenda, adaptDataForTooltip, addHoursToDate, addHoursToDateAgenda, addMinutesToDateAgenda, badgeVariants, buttonVariantsBase, compactTick, computeChartWidth, computeNiceMax, computeYAxisTickWidth, convert12HourTo24Hour, createValueFormatter, createYTickFormatter, detectDataFields, detectXAxis, display12HourValue, formatDurationAgenda, formatDurationAgendaDays, formatFieldName, formatLinePercentage, generateAdditionalColors, generateColorMap, getAgendaEventsForDay, getAgendaEventsForDayAgenda, getAllEventsForDay, getAllEventsForDayAgenda, getArrowByType, getAutoColorAgenda, 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, processIntegrationData, 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, useIsTruncated, useOpenTooltipForPeriod, useProcessedData, useSeriesOpacity, useTheme, useTimeSeriesRange, visualForItem };