@mlw-packages/react-components 1.10.8 → 1.10.10
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.css +53 -0
- package/dist/index.d.mts +24 -39
- package/dist/index.d.ts +24 -39
- package/dist/index.js +626 -352
- package/dist/index.mjs +627 -352
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -670,7 +670,7 @@ var DialogOverlayBase = React32__namespace.forwardRef(({ className, testid: data
|
|
|
670
670
|
{
|
|
671
671
|
ref,
|
|
672
672
|
className: cn(
|
|
673
|
-
"fixed inset-0 z-
|
|
673
|
+
"fixed inset-0 z-[200] bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 ",
|
|
674
674
|
className
|
|
675
675
|
),
|
|
676
676
|
"data-testid": dataTestId,
|
|
@@ -688,7 +688,7 @@ var DialogContentBase = React32__namespace.forwardRef(
|
|
|
688
688
|
{
|
|
689
689
|
ref,
|
|
690
690
|
className: cn(
|
|
691
|
-
"fixed left-[50%] top-[50%] z-
|
|
691
|
+
"fixed left-[50%] top-[50%] z-[200] w-[90%] sm:w-lg grid translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg max-h-[100dvh] overflow-y-auto overflow-x-hidden rounded-md border-border",
|
|
692
692
|
className
|
|
693
693
|
),
|
|
694
694
|
"data-testid": dataTestId,
|
|
@@ -696,10 +696,16 @@ var DialogContentBase = React32__namespace.forwardRef(
|
|
|
696
696
|
onWheel: userOnWheel,
|
|
697
697
|
children: [
|
|
698
698
|
children,
|
|
699
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
699
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
700
|
+
DialogPrimitive__namespace.Close,
|
|
701
|
+
{
|
|
702
|
+
className: "absolute right-3 top-3 sm:right-4 sm:top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-n\n 0 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground z-10 touch-manipulation",
|
|
703
|
+
children: [
|
|
704
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.XIcon, { className: "h-6 w-6 sm:h-4 sm:w-4 hover:text-red-500 font-extrabold" }),
|
|
705
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Close" })
|
|
706
|
+
]
|
|
707
|
+
}
|
|
708
|
+
)
|
|
703
709
|
]
|
|
704
710
|
}
|
|
705
711
|
)
|
|
@@ -3475,6 +3481,7 @@ var ThemeIcon = ({ theme }) => {
|
|
|
3475
3481
|
function ModeToggleBase({
|
|
3476
3482
|
themes = ["light", "dark", "system"],
|
|
3477
3483
|
className,
|
|
3484
|
+
directToggle = false,
|
|
3478
3485
|
variant = "ghost"
|
|
3479
3486
|
}) {
|
|
3480
3487
|
const [mounted, setMounted] = React32.useState(false);
|
|
@@ -3525,6 +3532,40 @@ function ModeToggleBase({
|
|
|
3525
3532
|
setTheme(newTheme);
|
|
3526
3533
|
}
|
|
3527
3534
|
};
|
|
3535
|
+
const handleDirectToggle = () => {
|
|
3536
|
+
const currentIndex = themes.indexOf(currentTheme);
|
|
3537
|
+
const nextIndex = (currentIndex + 1) % themes.length;
|
|
3538
|
+
toggleTheme(themes[nextIndex]);
|
|
3539
|
+
};
|
|
3540
|
+
if (directToggle) {
|
|
3541
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3542
|
+
ButtonBase,
|
|
3543
|
+
{
|
|
3544
|
+
ref: buttonRef,
|
|
3545
|
+
variant,
|
|
3546
|
+
size: "icon",
|
|
3547
|
+
className: cn("relative overflow-hidden group", className),
|
|
3548
|
+
onClick: handleDirectToggle,
|
|
3549
|
+
children: [
|
|
3550
|
+
/* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
3551
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3552
|
+
react.SunIcon,
|
|
3553
|
+
{
|
|
3554
|
+
className: `h-[1.2rem] w-[1.2rem] transition-all duration-500 ${isDark ? "rotate-90 scale-0 opacity-0" : "rotate-0 scale-100 opacity-100 group-hover:rotate-12"}`
|
|
3555
|
+
}
|
|
3556
|
+
),
|
|
3557
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3558
|
+
react.MoonIcon,
|
|
3559
|
+
{
|
|
3560
|
+
className: `absolute h-[1.2rem] w-[1.2rem] transition-all duration-500 ${isDark ? "rotate-0 scale-100 opacity-100 group-hover:-rotate-12" : "rotate-90 scale-0 opacity-0"}`
|
|
3561
|
+
}
|
|
3562
|
+
)
|
|
3563
|
+
] }),
|
|
3564
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Toggle theme" })
|
|
3565
|
+
]
|
|
3566
|
+
}
|
|
3567
|
+
);
|
|
3568
|
+
}
|
|
3528
3569
|
return /* @__PURE__ */ jsxRuntime.jsxs(DropDownMenuBase, { children: [
|
|
3529
3570
|
/* @__PURE__ */ jsxRuntime.jsx(DropDownMenuTriggerBase, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3530
3571
|
ButtonBase,
|
|
@@ -8639,7 +8680,8 @@ function Agenda({
|
|
|
8639
8680
|
currentDate,
|
|
8640
8681
|
events,
|
|
8641
8682
|
onEventSelect,
|
|
8642
|
-
showUndatedEvents = true
|
|
8683
|
+
showUndatedEvents = true,
|
|
8684
|
+
noTime = false
|
|
8643
8685
|
}) {
|
|
8644
8686
|
const isValidDate5 = (d) => {
|
|
8645
8687
|
try {
|
|
@@ -8708,6 +8750,7 @@ function Agenda({
|
|
|
8708
8750
|
event,
|
|
8709
8751
|
onClick: onEventSelect ? (e) => handleEventClick(event, e) : void 0,
|
|
8710
8752
|
view: "agenda",
|
|
8753
|
+
noTime,
|
|
8711
8754
|
className: onEventSelect ? void 0 : "hover:shadow-none hover:scale-100"
|
|
8712
8755
|
},
|
|
8713
8756
|
event.id
|
|
@@ -8972,6 +9015,9 @@ var StartHourAgenda = 0;
|
|
|
8972
9015
|
var EndHourAgenda = 24;
|
|
8973
9016
|
var DefaultStartHourAgenda = 9;
|
|
8974
9017
|
var DefaultEndHourAgenda = 10;
|
|
9018
|
+
function startOfLocalDay(d) {
|
|
9019
|
+
return new Date(d.getFullYear(), d.getMonth(), d.getDate());
|
|
9020
|
+
}
|
|
8975
9021
|
function getAutoColorAgenda(id) {
|
|
8976
9022
|
const colors2 = [
|
|
8977
9023
|
"sky",
|
|
@@ -9082,7 +9128,9 @@ function getSpanningEventsForDayAgenda(events, day) {
|
|
|
9082
9128
|
const eventStart = getEventStartDate(event);
|
|
9083
9129
|
const eventEnd = getEventEndDate(event);
|
|
9084
9130
|
if (!eventStart || !eventEnd) return false;
|
|
9085
|
-
|
|
9131
|
+
const startDay = startOfLocalDay(eventStart);
|
|
9132
|
+
const endDay = startOfLocalDay(eventEnd);
|
|
9133
|
+
return !dateFns.isSameDay(day, eventStart) && (dateFns.isSameDay(day, eventEnd) || day > startDay && day < endDay);
|
|
9086
9134
|
});
|
|
9087
9135
|
}
|
|
9088
9136
|
function getAllEventsForDayAgenda(events, day) {
|
|
@@ -9090,7 +9138,9 @@ function getAllEventsForDayAgenda(events, day) {
|
|
|
9090
9138
|
const eventStart = getEventStartDate(event);
|
|
9091
9139
|
const eventEnd = getEventEndDate(event);
|
|
9092
9140
|
if (!eventStart) return false;
|
|
9093
|
-
|
|
9141
|
+
const startDay = startOfLocalDay(eventStart);
|
|
9142
|
+
const endDay = eventEnd ? startOfLocalDay(eventEnd) : null;
|
|
9143
|
+
return dateFns.isSameDay(day, eventStart) || (endDay ? dateFns.isSameDay(day, eventEnd) : false) || (endDay ? day > startDay && day < endDay : false);
|
|
9094
9144
|
});
|
|
9095
9145
|
}
|
|
9096
9146
|
function getAgendaEventsForDayAgenda(events, day) {
|
|
@@ -9098,7 +9148,9 @@ function getAgendaEventsForDayAgenda(events, day) {
|
|
|
9098
9148
|
const eventStart = getEventStartDate(event);
|
|
9099
9149
|
const eventEnd = getEventEndDate(event);
|
|
9100
9150
|
if (!eventStart) return false;
|
|
9101
|
-
|
|
9151
|
+
const startDay = startOfLocalDay(eventStart);
|
|
9152
|
+
const endDay = eventEnd ? startOfLocalDay(eventEnd) : null;
|
|
9153
|
+
return dateFns.isSameDay(day, eventStart) || (eventEnd ? dateFns.isSameDay(day, eventEnd) : false) || (endDay ? day > startDay && day < endDay : false);
|
|
9102
9154
|
}).sort((a, b) => getEventStartTimestamp(a) - getEventStartTimestamp(b));
|
|
9103
9155
|
}
|
|
9104
9156
|
function getEventStartDate(event) {
|
|
@@ -9269,6 +9321,7 @@ function EventItemAgenda({
|
|
|
9269
9321
|
view,
|
|
9270
9322
|
onClick,
|
|
9271
9323
|
showTime,
|
|
9324
|
+
noTime = false,
|
|
9272
9325
|
currentTime,
|
|
9273
9326
|
isFirstDay = true,
|
|
9274
9327
|
isLastDay = true,
|
|
@@ -9347,9 +9400,10 @@ function EventItemAgenda({
|
|
|
9347
9400
|
ariaLabel,
|
|
9348
9401
|
isFirstDay,
|
|
9349
9402
|
isLastDay,
|
|
9403
|
+
noTime,
|
|
9350
9404
|
onClick,
|
|
9351
9405
|
children: children || /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-2 truncate min-w-0", children: [
|
|
9352
|
-
!event.allDay && hasValidTime && displayStart && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate text-sm sm:text-base md:text-lg lg:text-xl opacity-80 bg-white/10 px-2 rounded-full min-w-0", children: formatTimeWithOptionalMinutes(displayStart) }),
|
|
9406
|
+
!noTime && !event.allDay && hasValidTime && displayStart && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate text-sm sm:text-base md:text-lg lg:text-xl opacity-80 bg-white/10 px-2 rounded-full min-w-0", children: formatTimeWithOptionalMinutes(displayStart) }),
|
|
9353
9407
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9354
9408
|
"span",
|
|
9355
9409
|
{
|
|
@@ -9403,6 +9457,7 @@ function EventItemAgenda({
|
|
|
9403
9457
|
ariaLabel,
|
|
9404
9458
|
isFirstDay,
|
|
9405
9459
|
isLastDay,
|
|
9460
|
+
noTime,
|
|
9406
9461
|
onClick,
|
|
9407
9462
|
onMouseDown,
|
|
9408
9463
|
onTouchStart,
|
|
@@ -9426,15 +9481,16 @@ function EventItemAgenda({
|
|
|
9426
9481
|
ariaLabel,
|
|
9427
9482
|
isFirstDay,
|
|
9428
9483
|
isLastDay,
|
|
9484
|
+
noTime,
|
|
9429
9485
|
onClick,
|
|
9430
9486
|
onMouseDown,
|
|
9431
9487
|
onTouchStart,
|
|
9432
9488
|
children: isCompact ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1 w-full min-w-0 overflow-hidden", children: [
|
|
9433
9489
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate font-semibold leading-none min-w-0", children: event.title }),
|
|
9434
|
-
showTime && hasValidTime && displayStart && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 opacity-75 leading-none", children: formatTimeWithOptionalMinutes(displayStart) })
|
|
9490
|
+
!noTime && showTime && hasValidTime && displayStart && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 opacity-75 leading-none", children: formatTimeWithOptionalMinutes(displayStart) })
|
|
9435
9491
|
] }) : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-0.5 w-full min-w-0 overflow-hidden h-full", children: [
|
|
9436
9492
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-semibold leading-snug truncate", children: event.title }),
|
|
9437
|
-
showTime && hasValidTime && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "opacity-75 leading-none truncate", children: getEventTime() })
|
|
9493
|
+
!noTime && showTime && hasValidTime && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "opacity-75 leading-none truncate", children: getEventTime() })
|
|
9438
9494
|
] })
|
|
9439
9495
|
}
|
|
9440
9496
|
);
|
|
@@ -9513,7 +9569,7 @@ function EventItemAgenda({
|
|
|
9513
9569
|
children: event.title
|
|
9514
9570
|
}
|
|
9515
9571
|
),
|
|
9516
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9572
|
+
!noTime && /* @__PURE__ */ jsxRuntime.jsx(
|
|
9517
9573
|
"div",
|
|
9518
9574
|
{
|
|
9519
9575
|
className: cn(
|
|
@@ -9576,7 +9632,8 @@ function DayViewAgenda({
|
|
|
9576
9632
|
currentDate,
|
|
9577
9633
|
events,
|
|
9578
9634
|
onEventSelect,
|
|
9579
|
-
showUndatedEvents
|
|
9635
|
+
showUndatedEvents,
|
|
9636
|
+
noTime = false
|
|
9580
9637
|
}) {
|
|
9581
9638
|
const hours = React32.useMemo(() => {
|
|
9582
9639
|
const dayStart = dateFns.startOfDay(currentDate);
|
|
@@ -9764,7 +9821,8 @@ function DayViewAgenda({
|
|
|
9764
9821
|
isFirstDay,
|
|
9765
9822
|
isLastDay,
|
|
9766
9823
|
onClick: (e) => handleEventClick(evt, e),
|
|
9767
|
-
showTime: true
|
|
9824
|
+
showTime: true,
|
|
9825
|
+
noTime
|
|
9768
9826
|
}
|
|
9769
9827
|
) }) }),
|
|
9770
9828
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -10081,7 +10139,8 @@ function EventAgenda({
|
|
|
10081
10139
|
initialView = "month",
|
|
10082
10140
|
initialDate,
|
|
10083
10141
|
onClick,
|
|
10084
|
-
showYearView = false
|
|
10142
|
+
showYearView = false,
|
|
10143
|
+
noTime = false
|
|
10085
10144
|
}) {
|
|
10086
10145
|
const [currentDate, setCurrentDate] = React32.useState(
|
|
10087
10146
|
initialDate && new Date(initialDate) || /* @__PURE__ */ new Date()
|
|
@@ -10237,7 +10296,8 @@ function EventAgenda({
|
|
|
10237
10296
|
{
|
|
10238
10297
|
currentDate,
|
|
10239
10298
|
events,
|
|
10240
|
-
onEventSelect: handleEventSelect
|
|
10299
|
+
onEventSelect: handleEventSelect,
|
|
10300
|
+
noTime
|
|
10241
10301
|
}
|
|
10242
10302
|
),
|
|
10243
10303
|
view === "week" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -10245,7 +10305,8 @@ function EventAgenda({
|
|
|
10245
10305
|
{
|
|
10246
10306
|
currentDate,
|
|
10247
10307
|
events,
|
|
10248
|
-
onEventSelect: handleEventSelect
|
|
10308
|
+
onEventSelect: handleEventSelect,
|
|
10309
|
+
noTime
|
|
10249
10310
|
}
|
|
10250
10311
|
),
|
|
10251
10312
|
view === "day" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -10253,7 +10314,8 @@ function EventAgenda({
|
|
|
10253
10314
|
{
|
|
10254
10315
|
currentDate,
|
|
10255
10316
|
events,
|
|
10256
|
-
onEventSelect: handleEventSelect
|
|
10317
|
+
onEventSelect: handleEventSelect,
|
|
10318
|
+
noTime
|
|
10257
10319
|
}
|
|
10258
10320
|
),
|
|
10259
10321
|
view === "agenda" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -10261,7 +10323,8 @@ function EventAgenda({
|
|
|
10261
10323
|
{
|
|
10262
10324
|
currentDate,
|
|
10263
10325
|
events,
|
|
10264
|
-
onEventSelect: handleEventSelect
|
|
10326
|
+
onEventSelect: handleEventSelect,
|
|
10327
|
+
noTime
|
|
10265
10328
|
}
|
|
10266
10329
|
),
|
|
10267
10330
|
view === "year" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -10279,7 +10342,8 @@ function EventAgenda({
|
|
|
10279
10342
|
] }),
|
|
10280
10343
|
selectedEvent && React32__namespace.default.isValidElement(onClick) ? React32__namespace.default.cloneElement(onClick, {
|
|
10281
10344
|
event: selectedEvent,
|
|
10282
|
-
onClose: () => setSelectedEvent(null)
|
|
10345
|
+
onClose: () => setSelectedEvent(null),
|
|
10346
|
+
noTime
|
|
10283
10347
|
}) : null
|
|
10284
10348
|
]
|
|
10285
10349
|
}
|
|
@@ -10365,12 +10429,17 @@ function useEventVisibilityAgenda({
|
|
|
10365
10429
|
getVisibleEventCount
|
|
10366
10430
|
};
|
|
10367
10431
|
}
|
|
10432
|
+
function startOfDay2(d) {
|
|
10433
|
+
return new Date(d.getFullYear(), d.getMonth(), d.getDate());
|
|
10434
|
+
}
|
|
10368
10435
|
function clampToWeek(date, weekStart, weekEnd) {
|
|
10369
10436
|
return dateFns.max([dateFns.min([date, weekEnd]), weekStart]);
|
|
10370
10437
|
}
|
|
10371
10438
|
function dayCol(date, weekStart) {
|
|
10439
|
+
const dateDay = startOfDay2(date);
|
|
10440
|
+
const weekStartDay = startOfDay2(weekStart);
|
|
10372
10441
|
const diff = Math.round(
|
|
10373
|
-
(
|
|
10442
|
+
(dateDay.getTime() - weekStartDay.getTime()) / (1e3 * 60 * 60 * 24)
|
|
10374
10443
|
);
|
|
10375
10444
|
return Math.max(0, Math.min(6, diff));
|
|
10376
10445
|
}
|
|
@@ -10382,7 +10451,7 @@ function computeMultiDayBars(events, weekDays) {
|
|
|
10382
10451
|
const start = getEventStartDate(ev);
|
|
10383
10452
|
const end = getEventEndDate(ev) ?? start;
|
|
10384
10453
|
if (!start || !end) return false;
|
|
10385
|
-
return start <= weekEnd && end >= weekStart;
|
|
10454
|
+
return startOfDay2(start) <= startOfDay2(weekEnd) && startOfDay2(end) >= startOfDay2(weekStart);
|
|
10386
10455
|
});
|
|
10387
10456
|
const sorted = [...multiDayEvents].sort((a, b) => {
|
|
10388
10457
|
const aS = getEventStartDate(a) ?? /* @__PURE__ */ new Date(0);
|
|
@@ -10433,7 +10502,8 @@ function MultiDayOverlay({
|
|
|
10433
10502
|
weekIndex,
|
|
10434
10503
|
hoveredEventId,
|
|
10435
10504
|
onHover,
|
|
10436
|
-
onEventSelect
|
|
10505
|
+
onEventSelect,
|
|
10506
|
+
noTime = false
|
|
10437
10507
|
}) {
|
|
10438
10508
|
if (bars.length === 0) return null;
|
|
10439
10509
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 pointer-events-none mt-1", children: bars.map((bar) => {
|
|
@@ -10476,7 +10546,7 @@ function MultiDayOverlay({
|
|
|
10476
10546
|
),
|
|
10477
10547
|
children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-0.5 w-full min-w-0", children: [
|
|
10478
10548
|
continuesFromPrev && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 opacity-50 leading-none mr-0.5 flex items-center", children: /* @__PURE__ */ jsxRuntime.jsx(react.CaretLeftIcon, { size: 10, weight: "bold" }) }),
|
|
10479
|
-
!event.allDay && isFirstDay && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 font-normal opacity-75 text-[10px] bg-white/15 px-1 py-0.5 rounded-full leading-none", children: dateFns.format(eventStart, "HH:mm") }),
|
|
10549
|
+
!noTime && !event.allDay && isFirstDay && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 font-normal opacity-75 text-[10px] bg-white/15 px-1 py-0.5 rounded-full leading-none", children: dateFns.format(eventStart, "HH:mm") }),
|
|
10480
10550
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-semibold text-[11px] sm:text-xs truncate min-w-0 leading-none flex-1", children: event.title }),
|
|
10481
10551
|
isFirstDay && (() => {
|
|
10482
10552
|
const evStart = getEventStartDate(event);
|
|
@@ -10498,7 +10568,7 @@ function MultiDayOverlay({
|
|
|
10498
10568
|
/* @__PURE__ */ jsxRuntime.jsxs(TooltipContentBase, { side: "top", children: [
|
|
10499
10569
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "font-semibold truncate max-w-[200px]", children: event.title }),
|
|
10500
10570
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "opacity-80 mt-0.5 leading-snug", children: formatDurationAgenda(event) }),
|
|
10501
|
-
event.location && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "opacity-60 mt-0.5 truncate text-[11px] max-w-[200px]", children: [
|
|
10571
|
+
event.location && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "opacity-60 mt-0.5 truncate text-[11px] max-w-[200px] flex items-center", children: [
|
|
10502
10572
|
/* @__PURE__ */ jsxRuntime.jsx(react.MapPinIcon, { size: 15 }),
|
|
10503
10573
|
" ",
|
|
10504
10574
|
event.location
|
|
@@ -10514,7 +10584,8 @@ function MonthViewAgenda({
|
|
|
10514
10584
|
currentDate,
|
|
10515
10585
|
events,
|
|
10516
10586
|
onEventSelect,
|
|
10517
|
-
showUndatedEvents
|
|
10587
|
+
showUndatedEvents,
|
|
10588
|
+
noTime = false
|
|
10518
10589
|
}) {
|
|
10519
10590
|
const days = React32.useMemo(() => {
|
|
10520
10591
|
const monthStart = dateFns.startOfMonth(currentDate);
|
|
@@ -10704,8 +10775,9 @@ function MonthViewAgenda({
|
|
|
10704
10775
|
isLastDay: true,
|
|
10705
10776
|
onClick: (e) => handleEventClick(event, e),
|
|
10706
10777
|
view: "month",
|
|
10778
|
+
noTime,
|
|
10707
10779
|
children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-1 sm:gap-1.5 truncate text-[11px] relative z-10", children: [
|
|
10708
|
-
!event.allDay && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-normal opacity-80 text-[10px] sm:text-[11px] bg-white/10 px-1 py-0.5 rounded-full", children: dateFns.format(eventStart, "HH:mm") }),
|
|
10780
|
+
!noTime && !event.allDay && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-normal opacity-80 text-[10px] sm:text-[11px] bg-white/10 px-1 py-0.5 rounded-full", children: dateFns.format(eventStart, "HH:mm") }),
|
|
10709
10781
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-semibold truncate", children: event.title })
|
|
10710
10782
|
] })
|
|
10711
10783
|
}
|
|
@@ -10747,28 +10819,36 @@ function MonthViewAgenda({
|
|
|
10747
10819
|
PopoverContentBase,
|
|
10748
10820
|
{
|
|
10749
10821
|
align: "center",
|
|
10750
|
-
className: "max-w-52 p-3",
|
|
10822
|
+
className: "max-w-52 p-3 border-border",
|
|
10751
10823
|
style: {
|
|
10752
10824
|
"--event-height": `${EventHeightAgenda}px`
|
|
10753
10825
|
},
|
|
10754
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10755
|
-
|
|
10756
|
-
|
|
10757
|
-
|
|
10758
|
-
|
|
10759
|
-
|
|
10760
|
-
|
|
10761
|
-
{
|
|
10762
|
-
event
|
|
10763
|
-
|
|
10764
|
-
|
|
10765
|
-
|
|
10766
|
-
|
|
10767
|
-
|
|
10768
|
-
|
|
10769
|
-
|
|
10770
|
-
|
|
10771
|
-
|
|
10826
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10827
|
+
"div",
|
|
10828
|
+
{
|
|
10829
|
+
className: "space-y-2 ",
|
|
10830
|
+
onClick: (e) => e.stopPropagation(),
|
|
10831
|
+
children: [
|
|
10832
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "font-semibold text-sm", children: dateFns.format(day, "EEE d", { locale: locale.ptBR }) }),
|
|
10833
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-1", children: sortEventsAgenda(allEvents).map((event) => {
|
|
10834
|
+
const s = getEventStartDate(event) ?? getEventEndDate(event) ?? /* @__PURE__ */ new Date();
|
|
10835
|
+
const e2 = getEventEndDate(event) ?? getEventStartDate(event) ?? /* @__PURE__ */ new Date();
|
|
10836
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10837
|
+
EventItemAgenda,
|
|
10838
|
+
{
|
|
10839
|
+
noTime: true,
|
|
10840
|
+
event,
|
|
10841
|
+
isFirstDay: dateFns.isSameDay(day, s),
|
|
10842
|
+
isLastDay: dateFns.isSameDay(day, e2),
|
|
10843
|
+
onClick: (e) => handleEventClick(event, e),
|
|
10844
|
+
view: "month"
|
|
10845
|
+
},
|
|
10846
|
+
event.id
|
|
10847
|
+
);
|
|
10848
|
+
}) })
|
|
10849
|
+
]
|
|
10850
|
+
}
|
|
10851
|
+
)
|
|
10772
10852
|
}
|
|
10773
10853
|
)
|
|
10774
10854
|
] })
|
|
@@ -10786,7 +10866,8 @@ function MonthViewAgenda({
|
|
|
10786
10866
|
weekIndex,
|
|
10787
10867
|
hoveredEventId,
|
|
10788
10868
|
onHover: handleHover,
|
|
10789
|
-
onEventSelect
|
|
10869
|
+
onEventSelect,
|
|
10870
|
+
noTime
|
|
10790
10871
|
}
|
|
10791
10872
|
)
|
|
10792
10873
|
]
|
|
@@ -10819,6 +10900,7 @@ function DraggableEvent({
|
|
|
10819
10900
|
event,
|
|
10820
10901
|
view,
|
|
10821
10902
|
showTime,
|
|
10903
|
+
noTime,
|
|
10822
10904
|
onClick,
|
|
10823
10905
|
height,
|
|
10824
10906
|
isMultiDay,
|
|
@@ -10912,6 +10994,7 @@ function DraggableEvent({
|
|
|
10912
10994
|
onMouseDown: handleMouseDown,
|
|
10913
10995
|
onTouchStart: handleTouchStart,
|
|
10914
10996
|
showTime,
|
|
10997
|
+
noTime,
|
|
10915
10998
|
view,
|
|
10916
10999
|
totalCols
|
|
10917
11000
|
}
|
|
@@ -10924,7 +11007,8 @@ function WeekViewAgenda({
|
|
|
10924
11007
|
events,
|
|
10925
11008
|
onEventSelect,
|
|
10926
11009
|
onEventCreate,
|
|
10927
|
-
showUndatedEvents
|
|
11010
|
+
showUndatedEvents,
|
|
11011
|
+
noTime = false
|
|
10928
11012
|
}) {
|
|
10929
11013
|
const days = React32.useMemo(() => {
|
|
10930
11014
|
const weekStart = dateFns.startOfWeek(currentDate, { weekStartsOn: 0 });
|
|
@@ -10957,7 +11041,7 @@ function WeekViewAgenda({
|
|
|
10957
11041
|
return days.some((day) => {
|
|
10958
11042
|
if (eventStart && dateFns.isSameDay(day, eventStart)) return true;
|
|
10959
11043
|
if (eventEnd && dateFns.isSameDay(day, eventEnd)) return true;
|
|
10960
|
-
if (eventStart && eventEnd && day > eventStart && day < eventEnd)
|
|
11044
|
+
if (eventStart && eventEnd && day > startOfLocalDay(eventStart) && day < startOfLocalDay(eventEnd))
|
|
10961
11045
|
return true;
|
|
10962
11046
|
return false;
|
|
10963
11047
|
});
|
|
@@ -10989,7 +11073,7 @@ function WeekViewAgenda({
|
|
|
10989
11073
|
if (event.start == null) return false;
|
|
10990
11074
|
const eventStart = getEventStartDate(event);
|
|
10991
11075
|
const eventEnd = getEventEndDate(event) ?? getEventStartDate(event);
|
|
10992
|
-
return (eventStart ? dateFns.isSameDay(day, eventStart) : false) || (eventEnd ? dateFns.isSameDay(day, eventEnd) : false) || (eventStart && eventEnd ? eventStart
|
|
11076
|
+
return (eventStart ? dateFns.isSameDay(day, eventStart) : false) || (eventEnd ? dateFns.isSameDay(day, eventEnd) : false) || (eventStart && eventEnd ? day > startOfLocalDay(eventStart) && day < startOfLocalDay(eventEnd) : false);
|
|
10993
11077
|
});
|
|
10994
11078
|
const sortedEvents = [...dayEvents].sort((a, b) => {
|
|
10995
11079
|
const aStart = getEventStartDate(a) ?? getEventEndDate(a) ?? /* @__PURE__ */ new Date();
|
|
@@ -11230,7 +11314,7 @@ function WeekViewAgenda({
|
|
|
11230
11314
|
children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-1 min-w-0 w-full", children: [
|
|
11231
11315
|
!isFirstDay && colStart === 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 text-[11px] font-bold opacity-60", children: /* @__PURE__ */ jsxRuntime.jsx(ssr.CaretLeftIcon, {}) }),
|
|
11232
11316
|
showTitle && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
11233
|
-
isFirstDay && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-normal opacity-80 text-[10px] sm:text-[11px] bg-white/10 px-1 py-0.5 rounded-full", children: dateFns.format(eventStart, "HH:mm") }),
|
|
11317
|
+
isFirstDay && !noTime && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-normal opacity-80 text-[10px] sm:text-[11px] bg-white/10 px-1 py-0.5 rounded-full", children: dateFns.format(eventStart, "HH:mm") }),
|
|
11234
11318
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate text-xs font-medium", children: event.title }),
|
|
11235
11319
|
isFirstDay && (() => {
|
|
11236
11320
|
const evStart = getEventStartDate(event);
|
|
@@ -11308,6 +11392,7 @@ function WeekViewAgenda({
|
|
|
11308
11392
|
onClick: (e) => handleEventClick(positionedEvent.event, e),
|
|
11309
11393
|
draggable: false,
|
|
11310
11394
|
showTime: true,
|
|
11395
|
+
noTime,
|
|
11311
11396
|
view: "week",
|
|
11312
11397
|
totalCols: positionedEvent.totalCols
|
|
11313
11398
|
}
|
|
@@ -11511,7 +11596,8 @@ function capitalize(s) {
|
|
|
11511
11596
|
}
|
|
11512
11597
|
function EventDetailModalAgenda({
|
|
11513
11598
|
event,
|
|
11514
|
-
onClose
|
|
11599
|
+
onClose,
|
|
11600
|
+
noTime = false
|
|
11515
11601
|
}) {
|
|
11516
11602
|
const [open, setOpen] = React32.useState(true);
|
|
11517
11603
|
if (!event) return null;
|
|
@@ -11576,7 +11662,7 @@ function EventDetailModalAgenda({
|
|
|
11576
11662
|
] }) : isMultiDay ? /* @__PURE__ */ jsxRuntime.jsxs(Badge, { className: "bg-black/20 text-white border border-white/20 backdrop-blur-sm shadow-none gap-1 text-[11px] font-medium", children: [
|
|
11577
11663
|
/* @__PURE__ */ jsxRuntime.jsx(react.CalendarDotsIcon, { size: 11, weight: "bold" }),
|
|
11578
11664
|
formatDurationAgendaDays(event)
|
|
11579
|
-
] }) : durationMinutes > 0 ? /* @__PURE__ */ jsxRuntime.jsxs(Badge, { className: "bg-black/20 text-white border border-white/20 backdrop-blur-sm shadow-none gap-1 text-[11px] font-medium", children: [
|
|
11665
|
+
] }) : !noTime && durationMinutes > 0 ? /* @__PURE__ */ jsxRuntime.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
11666
|
/* @__PURE__ */ jsxRuntime.jsx(react.ClockIcon, { size: 11, weight: "bold" }),
|
|
11581
11667
|
formatDuration(durationMinutes)
|
|
11582
11668
|
] }) : null }),
|
|
@@ -11586,11 +11672,24 @@ function EventDetailModalAgenda({
|
|
|
11586
11672
|
),
|
|
11587
11673
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col px-7 py-6 bg-background", children: [
|
|
11588
11674
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-4 py-4", children: [
|
|
11589
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-0.5 p-2 rounded-xl bg-muted border border-border shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
11675
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-0.5 p-2 rounded-xl bg-muted border border-border shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
11676
|
+
react.CalendarDotsIcon,
|
|
11677
|
+
{
|
|
11678
|
+
size: 18,
|
|
11679
|
+
weight: "duotone",
|
|
11680
|
+
className: "text-primary"
|
|
11681
|
+
}
|
|
11682
|
+
) }),
|
|
11590
11683
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-0.5 min-w-0", children: [
|
|
11591
11684
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[13px] font-semibold text-foreground leading-snug", children: dateSection.primary }),
|
|
11592
|
-
dateSection.secondary && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-1.5 mt-0.5", children: isMultiDay && !event.allDay || isMultiDay && dateSection.isAllDay ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
11593
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11685
|
+
!noTime && dateSection.secondary && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-1.5 mt-0.5", children: isMultiDay && !event.allDay || isMultiDay && dateSection.isAllDay ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
11686
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11687
|
+
react.ArrowRightIcon,
|
|
11688
|
+
{
|
|
11689
|
+
size: 11,
|
|
11690
|
+
className: "shrink-0 text-muted-foreground/60"
|
|
11691
|
+
}
|
|
11692
|
+
),
|
|
11594
11693
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[12px] font-medium text-muted-foreground", children: dateSection.secondary })
|
|
11595
11694
|
] }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[12px] font-medium text-muted-foreground", children: dateSection.secondary }) })
|
|
11596
11695
|
] })
|
|
@@ -11598,7 +11697,14 @@ function EventDetailModalAgenda({
|
|
|
11598
11697
|
(event.location || event.description) && /* @__PURE__ */ jsxRuntime.jsx(SeparatorBase, { className: "opacity-40" }),
|
|
11599
11698
|
event.location && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
11600
11699
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-4 py-4", children: [
|
|
11601
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-0.5 p-2 rounded-xl bg-muted border border-border shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
11700
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-0.5 p-2 rounded-xl bg-muted border border-border shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
11701
|
+
react.MapPinIcon,
|
|
11702
|
+
{
|
|
11703
|
+
size: 18,
|
|
11704
|
+
weight: "duotone",
|
|
11705
|
+
className: "text-primary"
|
|
11706
|
+
}
|
|
11707
|
+
) }),
|
|
11602
11708
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-0.5 min-w-0", children: [
|
|
11603
11709
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] font-medium uppercase tracking-widest text-muted-foreground/60", children: "Localiza\xE7\xE3o" }),
|
|
11604
11710
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[13px] font-medium text-foreground leading-snug", children: event.location })
|
|
@@ -11607,7 +11713,14 @@ function EventDetailModalAgenda({
|
|
|
11607
11713
|
event.description && /* @__PURE__ */ jsxRuntime.jsx(SeparatorBase, { className: "opacity-40" })
|
|
11608
11714
|
] }),
|
|
11609
11715
|
event.description && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-4 py-4", children: [
|
|
11610
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-0.5 p-2 rounded-xl bg-muted border border-border shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
11716
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-0.5 p-2 rounded-xl bg-muted border border-border shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
11717
|
+
react.AlignLeftIcon,
|
|
11718
|
+
{
|
|
11719
|
+
size: 18,
|
|
11720
|
+
weight: "duotone",
|
|
11721
|
+
className: "text-primary"
|
|
11722
|
+
}
|
|
11723
|
+
) }),
|
|
11611
11724
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-0.5 min-w-0", children: [
|
|
11612
11725
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] font-medium uppercase tracking-widest text-muted-foreground/60", children: "Descri\xE7\xE3o" }),
|
|
11613
11726
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[13px] text-muted-foreground leading-relaxed font-normal", children: event.description })
|
|
@@ -14651,7 +14764,7 @@ var detectXAxis = (data) => {
|
|
|
14651
14764
|
return stringFields[0] || Object.keys(firstItem)[0] || "name";
|
|
14652
14765
|
};
|
|
14653
14766
|
var generateAdditionalColors = (baseColors, count) => {
|
|
14654
|
-
const
|
|
14767
|
+
const hexToRgb2 = (hex) => {
|
|
14655
14768
|
const clean = hex.replace("#", "");
|
|
14656
14769
|
const bigint = parseInt(
|
|
14657
14770
|
clean.length === 3 ? clean.split("").map((c) => c + c).join("") : clean,
|
|
@@ -14700,7 +14813,7 @@ var generateAdditionalColors = (baseColors, count) => {
|
|
|
14700
14813
|
};
|
|
14701
14814
|
return `#${f(0)}${f(8)}${f(4)}`;
|
|
14702
14815
|
};
|
|
14703
|
-
const anchors = baseColors.map((c) => rgbToHsl(
|
|
14816
|
+
const anchors = baseColors.map((c) => rgbToHsl(hexToRgb2(c)));
|
|
14704
14817
|
const colors2 = [...baseColors];
|
|
14705
14818
|
let i = 0;
|
|
14706
14819
|
while (colors2.length < count) {
|
|
@@ -16571,23 +16684,35 @@ var Name = ({
|
|
|
16571
16684
|
] })
|
|
16572
16685
|
] }) });
|
|
16573
16686
|
};
|
|
16574
|
-
var SystemNode = React32__namespace.default.forwardRef(
|
|
16575
|
-
|
|
16576
|
-
|
|
16577
|
-
|
|
16578
|
-
|
|
16579
|
-
|
|
16580
|
-
|
|
16581
|
-
|
|
16582
|
-
|
|
16583
|
-
|
|
16584
|
-
|
|
16585
|
-
|
|
16586
|
-
|
|
16587
|
-
|
|
16588
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
16589
|
-
|
|
16590
|
-
|
|
16687
|
+
var SystemNode = React32__namespace.default.forwardRef(
|
|
16688
|
+
({ label }, ref) => {
|
|
16689
|
+
const innerRef = React32.useRef(null);
|
|
16690
|
+
const truncated = label.length > 9 ? label.substring(0, 9) + "\u2026" : label;
|
|
16691
|
+
const needsTooltip = label.length > 9;
|
|
16692
|
+
const setRefs = React32.useCallback(
|
|
16693
|
+
(node) => {
|
|
16694
|
+
innerRef.current = node;
|
|
16695
|
+
if (typeof ref === "function") ref(node);
|
|
16696
|
+
else if (ref)
|
|
16697
|
+
ref.current = node;
|
|
16698
|
+
},
|
|
16699
|
+
[ref]
|
|
16700
|
+
);
|
|
16701
|
+
const circle = /* @__PURE__ */ jsxRuntime.jsx(
|
|
16702
|
+
"div",
|
|
16703
|
+
{
|
|
16704
|
+
ref: setRefs,
|
|
16705
|
+
className: "w-[76px] h-[76px] rounded-full bg-primary flex items-center justify-center shrink-0 z-10 cursor-default",
|
|
16706
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] font-bold text-primary-foreground text-center px-2 leading-tight select-none", children: truncated })
|
|
16707
|
+
}
|
|
16708
|
+
);
|
|
16709
|
+
if (!needsTooltip) return circle;
|
|
16710
|
+
return /* @__PURE__ */ jsxRuntime.jsx(TooltipProviderBase, { children: /* @__PURE__ */ jsxRuntime.jsxs(TooltipBase, { children: [
|
|
16711
|
+
/* @__PURE__ */ jsxRuntime.jsx(TooltipTriggerBase, { asChild: true, children: circle }),
|
|
16712
|
+
/* @__PURE__ */ jsxRuntime.jsx(TooltipContentBase, { sideOffset: 8, className: "z-[10001]", children: label })
|
|
16713
|
+
] }) });
|
|
16714
|
+
}
|
|
16715
|
+
);
|
|
16591
16716
|
SystemNode.displayName = "SystemNode";
|
|
16592
16717
|
var Beam = ({ isInput, containerRef, leftRef, rightRef }) => {
|
|
16593
16718
|
const gradientId = React32.useId();
|
|
@@ -16648,7 +16773,7 @@ var Beam = ({ isInput, containerRef, leftRef, rightRef }) => {
|
|
|
16648
16773
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
16649
16774
|
"svg",
|
|
16650
16775
|
{
|
|
16651
|
-
className: "pointer-events-none absolute
|
|
16776
|
+
className: "pointer-events-none absolute",
|
|
16652
16777
|
width: svgSize.w,
|
|
16653
16778
|
height: svgSize.h,
|
|
16654
16779
|
fill: "none",
|
|
@@ -16668,7 +16793,7 @@ var Beam = ({ isInput, containerRef, leftRef, rightRef }) => {
|
|
|
16668
16793
|
{
|
|
16669
16794
|
d: pathD,
|
|
16670
16795
|
stroke: `url(#${gradientId})`,
|
|
16671
|
-
strokeWidth:
|
|
16796
|
+
strokeWidth: 4,
|
|
16672
16797
|
strokeLinecap: "round",
|
|
16673
16798
|
initial: { strokeOpacity: 0 },
|
|
16674
16799
|
animate: { strokeOpacity: 1 },
|
|
@@ -16688,7 +16813,7 @@ var Beam = ({ isInput, containerRef, leftRef, rightRef }) => {
|
|
|
16688
16813
|
y2: ["0%", "0%"]
|
|
16689
16814
|
},
|
|
16690
16815
|
transition: {
|
|
16691
|
-
duration:
|
|
16816
|
+
duration: 2,
|
|
16692
16817
|
ease: [0.16, 1, 0.3, 1],
|
|
16693
16818
|
repeat: Infinity,
|
|
16694
16819
|
repeatDelay: 0
|
|
@@ -16713,10 +16838,22 @@ var SystemsDiagram = ({ isInput, currentSystem, externalSystem }) => {
|
|
|
16713
16838
|
"div",
|
|
16714
16839
|
{
|
|
16715
16840
|
ref: containerRef,
|
|
16716
|
-
className: "relative flex items-center justify-between py-1
|
|
16841
|
+
className: "relative flex items-center justify-between py-1",
|
|
16717
16842
|
children: [
|
|
16718
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
16719
|
-
|
|
16843
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
16844
|
+
SystemNode,
|
|
16845
|
+
{
|
|
16846
|
+
ref: leftRef,
|
|
16847
|
+
label: isInput ? externalSystem : currentSystem
|
|
16848
|
+
}
|
|
16849
|
+
),
|
|
16850
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
16851
|
+
SystemNode,
|
|
16852
|
+
{
|
|
16853
|
+
ref: rightRef,
|
|
16854
|
+
label: isInput ? currentSystem : externalSystem
|
|
16855
|
+
}
|
|
16856
|
+
),
|
|
16720
16857
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
16721
16858
|
Beam,
|
|
16722
16859
|
{
|
|
@@ -16730,12 +16867,11 @@ var SystemsDiagram = ({ isInput, currentSystem, externalSystem }) => {
|
|
|
16730
16867
|
}
|
|
16731
16868
|
);
|
|
16732
16869
|
};
|
|
16733
|
-
var BodyComponent = ({ data, isLoading, connections, isInput, externalSystem }) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-3 py-3 space-y-3 max-
|
|
16870
|
+
var BodyComponent = ({ data, isLoading, connections, isInput, externalSystem }) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-3 py-3 space-y-3 max-h-[460px] overflow-y-auto [&::-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: [
|
|
16734
16871
|
isLoading ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1.5", children: [
|
|
16735
16872
|
/* @__PURE__ */ jsxRuntime.jsx(SkeletonBase, { className: "h-6 w-3/4" }),
|
|
16736
16873
|
/* @__PURE__ */ jsxRuntime.jsx(SkeletonBase, { className: "h-3.5 w-1/2" })
|
|
16737
16874
|
] }) : /* @__PURE__ */ jsxRuntime.jsx(Name, { name: data.name, description: data.description }),
|
|
16738
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "border-t border-border/20" }),
|
|
16739
16875
|
isLoading ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-3", children: [
|
|
16740
16876
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between py-1", children: [
|
|
16741
16877
|
/* @__PURE__ */ jsxRuntime.jsx(SkeletonBase, { className: "w-[76px] h-[76px] rounded-full" }),
|
|
@@ -16762,7 +16898,6 @@ var BodyComponent = ({ data, isLoading, connections, isInput, externalSystem })
|
|
|
16762
16898
|
externalSystem
|
|
16763
16899
|
}
|
|
16764
16900
|
),
|
|
16765
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "border-t border-border/20" }),
|
|
16766
16901
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] font-bold text-muted-foreground uppercase -mb-2", children: isInput ? "Informa\xE7\xF5es de Entrada" : "Informa\xE7\xF5es de Sa\xEDda" }) }),
|
|
16767
16902
|
/* @__PURE__ */ jsxRuntime.jsx("div", { children: connections.map((conn) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
16768
16903
|
IntegrationCard,
|
|
@@ -16774,268 +16909,7 @@ var BodyComponent = ({ data, isLoading, connections, isInput, externalSystem })
|
|
|
16774
16909
|
)) })
|
|
16775
16910
|
] })
|
|
16776
16911
|
] });
|
|
16777
|
-
|
|
16778
|
-
var modalVariants = {
|
|
16779
|
-
hidden: {
|
|
16780
|
-
opacity: 0,
|
|
16781
|
-
scale: 0.96,
|
|
16782
|
-
transition: { type: "spring", stiffness: 400, damping: 28 }
|
|
16783
|
-
},
|
|
16784
|
-
visible: {
|
|
16785
|
-
opacity: 1,
|
|
16786
|
-
scale: 1,
|
|
16787
|
-
transition: { type: "spring", stiffness: 300, damping: 28 }
|
|
16788
|
-
},
|
|
16789
|
-
exit: {
|
|
16790
|
-
opacity: 0,
|
|
16791
|
-
scale: 0.96,
|
|
16792
|
-
transition: { type: "spring", stiffness: 400, damping: 28 }
|
|
16793
|
-
}
|
|
16794
|
-
};
|
|
16795
|
-
var IntegrationModal = ({
|
|
16796
|
-
id,
|
|
16797
|
-
data,
|
|
16798
|
-
position,
|
|
16799
|
-
title = "Conex\xF5es",
|
|
16800
|
-
isLoading = false,
|
|
16801
|
-
systemName,
|
|
16802
|
-
onMouseDown,
|
|
16803
|
-
onClose,
|
|
16804
|
-
onPositionChange
|
|
16805
|
-
}) => {
|
|
16806
|
-
const isMobile = useIsMobile();
|
|
16807
|
-
const [localPos, setLocalPos] = React32.useState(position);
|
|
16808
|
-
const [dragging, setDragging] = React32.useState(false);
|
|
16809
|
-
const offsetRef = React32.useRef({ x: 0, y: 0 });
|
|
16810
|
-
const lastMouse = React32.useRef({ x: 0, y: 0 });
|
|
16811
|
-
const tooltipRef = React32.useRef(null);
|
|
16812
|
-
const currentPosRef = React32.useRef(position);
|
|
16813
|
-
React32.useEffect(() => {
|
|
16814
|
-
currentPosRef.current = position;
|
|
16815
|
-
setLocalPos(position);
|
|
16816
|
-
}, [position]);
|
|
16817
|
-
React32.useEffect(() => {
|
|
16818
|
-
let rafId = null;
|
|
16819
|
-
const handleMouseMove = (e) => {
|
|
16820
|
-
if (!dragging) return;
|
|
16821
|
-
lastMouse.current = { x: e.clientX, y: e.clientY };
|
|
16822
|
-
if (rafId) cancelAnimationFrame(rafId);
|
|
16823
|
-
rafId = requestAnimationFrame(() => {
|
|
16824
|
-
const newLeft = lastMouse.current.x - offsetRef.current.x;
|
|
16825
|
-
const newTop = lastMouse.current.y - offsetRef.current.y;
|
|
16826
|
-
const p = {
|
|
16827
|
-
top: Math.max(0, Math.min(newTop, window.innerHeight - 200)),
|
|
16828
|
-
left: Math.max(0, Math.min(newLeft, window.innerWidth - 320))
|
|
16829
|
-
};
|
|
16830
|
-
currentPosRef.current = p;
|
|
16831
|
-
if (tooltipRef.current) {
|
|
16832
|
-
tooltipRef.current.style.top = `${p.top}px`;
|
|
16833
|
-
tooltipRef.current.style.left = `${p.left}px`;
|
|
16834
|
-
}
|
|
16835
|
-
onPositionChange?.(id, p);
|
|
16836
|
-
});
|
|
16837
|
-
};
|
|
16838
|
-
const handleMouseUp = () => {
|
|
16839
|
-
if (dragging) {
|
|
16840
|
-
setDragging(false);
|
|
16841
|
-
setLocalPos(currentPosRef.current);
|
|
16842
|
-
if (rafId) cancelAnimationFrame(rafId);
|
|
16843
|
-
}
|
|
16844
|
-
};
|
|
16845
|
-
if (dragging) {
|
|
16846
|
-
document.addEventListener("mousemove", handleMouseMove, { passive: true });
|
|
16847
|
-
document.addEventListener("mouseup", handleMouseUp);
|
|
16848
|
-
document.body.style.cursor = "grabbing";
|
|
16849
|
-
document.body.style.userSelect = "none";
|
|
16850
|
-
}
|
|
16851
|
-
return () => {
|
|
16852
|
-
if (rafId) cancelAnimationFrame(rafId);
|
|
16853
|
-
document.removeEventListener("mousemove", handleMouseMove);
|
|
16854
|
-
document.removeEventListener("mouseup", handleMouseUp);
|
|
16855
|
-
document.body.style.cursor = "";
|
|
16856
|
-
document.body.style.userSelect = "";
|
|
16857
|
-
};
|
|
16858
|
-
}, [dragging, id, onPositionChange]);
|
|
16859
|
-
const handleMouseDownLocal = React32.useCallback(
|
|
16860
|
-
(e) => {
|
|
16861
|
-
e.preventDefault();
|
|
16862
|
-
e.stopPropagation();
|
|
16863
|
-
const rect = e.currentTarget.closest(".fixed")?.getBoundingClientRect();
|
|
16864
|
-
if (!rect) return;
|
|
16865
|
-
offsetRef.current = { x: e.clientX - rect.left, y: e.clientY - rect.top };
|
|
16866
|
-
setDragging(true);
|
|
16867
|
-
onMouseDown?.(id, e);
|
|
16868
|
-
},
|
|
16869
|
-
[id, onMouseDown]
|
|
16870
|
-
);
|
|
16871
|
-
const handleTouchStartLocal = React32.useCallback(
|
|
16872
|
-
(e) => {
|
|
16873
|
-
e.stopPropagation();
|
|
16874
|
-
const touch = e.touches[0];
|
|
16875
|
-
if (!touch) return;
|
|
16876
|
-
const rect = e.currentTarget.closest(".fixed")?.getBoundingClientRect();
|
|
16877
|
-
if (!rect) return;
|
|
16878
|
-
offsetRef.current = {
|
|
16879
|
-
x: touch.clientX - rect.left,
|
|
16880
|
-
y: touch.clientY - rect.top
|
|
16881
|
-
};
|
|
16882
|
-
setDragging(true);
|
|
16883
|
-
onMouseDown?.(id, e);
|
|
16884
|
-
},
|
|
16885
|
-
[id, onMouseDown]
|
|
16886
|
-
);
|
|
16887
|
-
const inputConnections = React32.useMemo(
|
|
16888
|
-
() => data.connections.filter((c) => c.type === "entrada"),
|
|
16889
|
-
[data.connections]
|
|
16890
|
-
);
|
|
16891
|
-
const outputConnections = React32.useMemo(
|
|
16892
|
-
() => data.connections.filter((c) => c.type === "saida"),
|
|
16893
|
-
[data.connections]
|
|
16894
|
-
);
|
|
16895
|
-
const isInput = inputConnections.length > 0;
|
|
16896
|
-
const connections = isInput ? inputConnections : outputConnections;
|
|
16897
|
-
const externalSystem = systemName ?? connections[0]?.name ?? "Sistema";
|
|
16898
|
-
const header = /* @__PURE__ */ jsxRuntime.jsxs(
|
|
16899
|
-
"div",
|
|
16900
|
-
{
|
|
16901
|
-
className: "flex items-center justify-between py-1 border-b border-border/10 bg-muted/30 shrink-0 max-w-lg",
|
|
16902
|
-
onMouseDown: handleMouseDownLocal,
|
|
16903
|
-
onTouchStart: handleTouchStartLocal,
|
|
16904
|
-
style: {
|
|
16905
|
-
touchAction: "none",
|
|
16906
|
-
cursor: dragging ? "grabbing" : "grab"
|
|
16907
|
-
},
|
|
16908
|
-
children: [
|
|
16909
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 px-3", children: [
|
|
16910
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.DotsSixVerticalIcon, { size: 16, className: "text-primary" }),
|
|
16911
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-semibold text-muted-foreground uppercase tracking-wider", children: title })
|
|
16912
|
-
] }),
|
|
16913
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
16914
|
-
ButtonBase,
|
|
16915
|
-
{
|
|
16916
|
-
variant: "ghost",
|
|
16917
|
-
size: "icon",
|
|
16918
|
-
onClick: () => onClose(id),
|
|
16919
|
-
className: "text-muted-foreground hover:text-destructive transition-colors hover:bg-destructive/10 mr-1",
|
|
16920
|
-
style: { cursor: "pointer" },
|
|
16921
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(react.XIcon, { size: 16 })
|
|
16922
|
-
}
|
|
16923
|
-
)
|
|
16924
|
-
]
|
|
16925
|
-
}
|
|
16926
|
-
);
|
|
16927
|
-
const bodyProps = { data, isLoading, connections, isInput, externalSystem };
|
|
16928
|
-
if (isMobile) {
|
|
16929
|
-
return /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { children: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
16930
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
16931
|
-
framerMotion.motion.div,
|
|
16932
|
-
{
|
|
16933
|
-
className: "fixed inset-0 z-[9999] bg-black/40 backdrop-blur-[2px]",
|
|
16934
|
-
initial: { opacity: 0 },
|
|
16935
|
-
animate: { opacity: 1 },
|
|
16936
|
-
exit: { opacity: 0 },
|
|
16937
|
-
onClick: () => onClose(id)
|
|
16938
|
-
},
|
|
16939
|
-
`overlay-${id}`
|
|
16940
|
-
),
|
|
16941
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
16942
|
-
framerMotion.motion.div,
|
|
16943
|
-
{
|
|
16944
|
-
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 min-h-0",
|
|
16945
|
-
style: { maxHeight: "85dvh" },
|
|
16946
|
-
initial: { y: "100%" },
|
|
16947
|
-
animate: { y: 0 },
|
|
16948
|
-
exit: { y: "100%" },
|
|
16949
|
-
transition: { type: "spring", stiffness: 320, damping: 36 },
|
|
16950
|
-
onClick: (e) => e.stopPropagation(),
|
|
16951
|
-
children: [
|
|
16952
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-center pt-2.5 pb-1 shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-10 h-1 rounded-full bg-border" }) }),
|
|
16953
|
-
header,
|
|
16954
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 min-h-0 overflow-y-auto [&::-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: /* @__PURE__ */ jsxRuntime.jsx(Body, { ...bodyProps }) })
|
|
16955
|
-
]
|
|
16956
|
-
},
|
|
16957
|
-
`sheet-${id}`
|
|
16958
|
-
)
|
|
16959
|
-
] }) });
|
|
16960
|
-
}
|
|
16961
|
-
return /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
16962
|
-
framerMotion.motion.div,
|
|
16963
|
-
{
|
|
16964
|
-
ref: tooltipRef,
|
|
16965
|
-
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",
|
|
16966
|
-
variants: modalVariants,
|
|
16967
|
-
initial: "hidden",
|
|
16968
|
-
animate: "visible",
|
|
16969
|
-
exit: "exit",
|
|
16970
|
-
style: { top: localPos.top, left: localPos.left },
|
|
16971
|
-
onClick: (e) => e.stopPropagation(),
|
|
16972
|
-
children: [
|
|
16973
|
-
header,
|
|
16974
|
-
/* @__PURE__ */ jsxRuntime.jsx(Body, { ...bodyProps })
|
|
16975
|
-
]
|
|
16976
|
-
},
|
|
16977
|
-
id
|
|
16978
|
-
) });
|
|
16979
|
-
};
|
|
16980
|
-
var IntegrationModal_default = IntegrationModal;
|
|
16981
|
-
|
|
16982
|
-
// src/components/ui/charts/components/tooltips/utils/integrationTooltipUtils.ts
|
|
16983
|
-
function processIntegrationData(integrations, targetSystemName) {
|
|
16984
|
-
const connections = [];
|
|
16985
|
-
integrations.forEach((integration) => {
|
|
16986
|
-
const origemNome = integration.origem.properties.nome;
|
|
16987
|
-
const destinoNome = integration.destino.properties.nome;
|
|
16988
|
-
if (origemNome === targetSystemName) {
|
|
16989
|
-
connections.push({
|
|
16990
|
-
id: integration.r.elementId,
|
|
16991
|
-
name: destinoNome,
|
|
16992
|
-
type: "saida",
|
|
16993
|
-
integration: integration.r.properties
|
|
16994
|
-
});
|
|
16995
|
-
}
|
|
16996
|
-
if (destinoNome === targetSystemName) {
|
|
16997
|
-
connections.push({
|
|
16998
|
-
id: integration.r.elementId,
|
|
16999
|
-
name: origemNome,
|
|
17000
|
-
type: "entrada",
|
|
17001
|
-
integration: integration.r.properties
|
|
17002
|
-
});
|
|
17003
|
-
}
|
|
17004
|
-
});
|
|
17005
|
-
return {
|
|
17006
|
-
name: targetSystemName,
|
|
17007
|
-
connections
|
|
17008
|
-
};
|
|
17009
|
-
}
|
|
17010
|
-
|
|
17011
|
-
// src/components/ui/charts/components/tooltips/utils/systemTooltipUtils.ts
|
|
17012
|
-
function processNeo4jData(integrations, targetSystemName) {
|
|
17013
|
-
const connections = [];
|
|
17014
|
-
integrations.forEach((integration) => {
|
|
17015
|
-
const origemNome = integration.origem.properties.nome;
|
|
17016
|
-
const destinoNome = integration.destino.properties.nome;
|
|
17017
|
-
if (origemNome === targetSystemName) {
|
|
17018
|
-
connections.push({
|
|
17019
|
-
id: integration.r.elementId,
|
|
17020
|
-
name: destinoNome,
|
|
17021
|
-
type: "saida",
|
|
17022
|
-
integration: integration.r.properties
|
|
17023
|
-
});
|
|
17024
|
-
}
|
|
17025
|
-
if (destinoNome === targetSystemName) {
|
|
17026
|
-
connections.push({
|
|
17027
|
-
id: integration.r.elementId,
|
|
17028
|
-
name: origemNome,
|
|
17029
|
-
type: "entrada",
|
|
17030
|
-
integration: integration.r.properties
|
|
17031
|
-
});
|
|
17032
|
-
}
|
|
17033
|
-
});
|
|
17034
|
-
return {
|
|
17035
|
-
name: targetSystemName,
|
|
17036
|
-
connections
|
|
17037
|
-
};
|
|
17038
|
-
}
|
|
16912
|
+
React32__namespace.default.memo(BodyComponent);
|
|
17039
16913
|
var Brush = ({
|
|
17040
16914
|
data,
|
|
17041
16915
|
legend,
|
|
@@ -19665,6 +19539,35 @@ var TimeSeries = ({
|
|
|
19665
19539
|
) });
|
|
19666
19540
|
};
|
|
19667
19541
|
var TimeSeries_default = TimeSeries;
|
|
19542
|
+
|
|
19543
|
+
// src/components/ui/charts/components/tooltips/utils/systemTooltipUtils.ts
|
|
19544
|
+
function processNeo4jData(integrations, targetSystemName) {
|
|
19545
|
+
const connections = [];
|
|
19546
|
+
integrations.forEach((integration) => {
|
|
19547
|
+
const origemNome = integration.origem.properties.nome;
|
|
19548
|
+
const destinoNome = integration.destino.properties.nome;
|
|
19549
|
+
if (origemNome === targetSystemName) {
|
|
19550
|
+
connections.push({
|
|
19551
|
+
id: integration.r.elementId,
|
|
19552
|
+
name: destinoNome,
|
|
19553
|
+
type: "saida",
|
|
19554
|
+
integration: integration.r.properties
|
|
19555
|
+
});
|
|
19556
|
+
}
|
|
19557
|
+
if (destinoNome === targetSystemName) {
|
|
19558
|
+
connections.push({
|
|
19559
|
+
id: integration.r.elementId,
|
|
19560
|
+
name: origemNome,
|
|
19561
|
+
type: "entrada",
|
|
19562
|
+
integration: integration.r.properties
|
|
19563
|
+
});
|
|
19564
|
+
}
|
|
19565
|
+
});
|
|
19566
|
+
return {
|
|
19567
|
+
name: targetSystemName,
|
|
19568
|
+
connections
|
|
19569
|
+
};
|
|
19570
|
+
}
|
|
19668
19571
|
function NumericInput({
|
|
19669
19572
|
value,
|
|
19670
19573
|
onChange,
|
|
@@ -19756,6 +19659,378 @@ function NumericInput({
|
|
|
19756
19659
|
] })
|
|
19757
19660
|
] });
|
|
19758
19661
|
}
|
|
19662
|
+
function hexToRgb(hex) {
|
|
19663
|
+
const clean = hex.replace("#", "");
|
|
19664
|
+
if (clean.length !== 6) return null;
|
|
19665
|
+
const num = parseInt(clean, 16);
|
|
19666
|
+
return { r: num >> 16 & 255, g: num >> 8 & 255, b: num & 255 };
|
|
19667
|
+
}
|
|
19668
|
+
function isValidHex(hex) {
|
|
19669
|
+
return /^#[0-9A-Fa-f]{6}$/.test(hex);
|
|
19670
|
+
}
|
|
19671
|
+
var DEFAULT_SWATCHES = [
|
|
19672
|
+
"#000000",
|
|
19673
|
+
"#ffffff",
|
|
19674
|
+
"#6B7280",
|
|
19675
|
+
"#EF4444",
|
|
19676
|
+
"#F97316",
|
|
19677
|
+
"#F59E0B",
|
|
19678
|
+
"#84CC16",
|
|
19679
|
+
"#22C55E",
|
|
19680
|
+
"#14B8A6",
|
|
19681
|
+
"#06B6D4",
|
|
19682
|
+
"#3B82F6",
|
|
19683
|
+
"#8B5CF6",
|
|
19684
|
+
"#EC4899",
|
|
19685
|
+
"#F43F5E",
|
|
19686
|
+
"#D97706",
|
|
19687
|
+
"#0EA5E9"
|
|
19688
|
+
];
|
|
19689
|
+
var ColorPickerBase = React32__namespace.forwardRef(
|
|
19690
|
+
({
|
|
19691
|
+
value = "#3B82F6",
|
|
19692
|
+
onChange,
|
|
19693
|
+
opacity = 1,
|
|
19694
|
+
onOpacityChange,
|
|
19695
|
+
swatches = DEFAULT_SWATCHES,
|
|
19696
|
+
label,
|
|
19697
|
+
error,
|
|
19698
|
+
disabled = false,
|
|
19699
|
+
className,
|
|
19700
|
+
"data-testid": dataTestId = "color-picker-base"
|
|
19701
|
+
}, ref) => {
|
|
19702
|
+
const [hexInput, setHexInput] = React32__namespace.useState(value.toUpperCase());
|
|
19703
|
+
React32__namespace.useEffect(() => {
|
|
19704
|
+
setHexInput(value.toUpperCase());
|
|
19705
|
+
}, [value]);
|
|
19706
|
+
const rgb = hexToRgb(value) ?? { r: 59, g: 130, b: 246 };
|
|
19707
|
+
const rgbString = `rgb(${rgb.r}, ${rgb.g}, ${rgb.b})`;
|
|
19708
|
+
const opacityPercent = Math.round(opacity * 100);
|
|
19709
|
+
const handleNativeChange = (e) => {
|
|
19710
|
+
onChange?.(e.target.value.toUpperCase());
|
|
19711
|
+
};
|
|
19712
|
+
const handleHexInput = (e) => {
|
|
19713
|
+
const raw = e.target.value;
|
|
19714
|
+
setHexInput(raw.toUpperCase());
|
|
19715
|
+
const withHash = raw.startsWith("#") ? raw : `#${raw}`;
|
|
19716
|
+
if (isValidHex(withHash)) onChange?.(withHash.toUpperCase());
|
|
19717
|
+
};
|
|
19718
|
+
const handleHexBlur = () => {
|
|
19719
|
+
const withHash = hexInput.startsWith("#") ? hexInput : `#${hexInput}`;
|
|
19720
|
+
if (!isValidHex(withHash)) setHexInput(value.toUpperCase());
|
|
19721
|
+
};
|
|
19722
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
19723
|
+
"div",
|
|
19724
|
+
{
|
|
19725
|
+
ref,
|
|
19726
|
+
className: cn("flex flex-col w-full min-w-[150px]", className),
|
|
19727
|
+
"data-testid": dataTestId,
|
|
19728
|
+
children: [
|
|
19729
|
+
label && /* @__PURE__ */ jsxRuntime.jsx(LabelBase_default, { className: "mb-1", children: label }),
|
|
19730
|
+
/* @__PURE__ */ jsxRuntime.jsxs(PopoverBase, { children: [
|
|
19731
|
+
/* @__PURE__ */ jsxRuntime.jsx(PopoverTriggerBase, { asChild: true, disabled, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
19732
|
+
ButtonBase,
|
|
19733
|
+
{
|
|
19734
|
+
variant: "outline",
|
|
19735
|
+
size: "select",
|
|
19736
|
+
disabled,
|
|
19737
|
+
"data-testid": `${dataTestId}-trigger`,
|
|
19738
|
+
className: cn(
|
|
19739
|
+
"w-full justify-start font-normal",
|
|
19740
|
+
error && "border-destructive"
|
|
19741
|
+
),
|
|
19742
|
+
children: [
|
|
19743
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
19744
|
+
"span",
|
|
19745
|
+
{
|
|
19746
|
+
className: "inline-block size-4 rounded-sm border border-border shrink-0",
|
|
19747
|
+
style: {
|
|
19748
|
+
backgroundColor: `rgba(${rgb.r}, ${rgb.g}, ${rgb.b}, ${opacity})`
|
|
19749
|
+
}
|
|
19750
|
+
}
|
|
19751
|
+
),
|
|
19752
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-mono text-xs tracking-wide", children: value.toUpperCase() }),
|
|
19753
|
+
onOpacityChange && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "ml-auto text-muted-foreground text-xs", children: [
|
|
19754
|
+
opacityPercent,
|
|
19755
|
+
"%"
|
|
19756
|
+
] })
|
|
19757
|
+
]
|
|
19758
|
+
}
|
|
19759
|
+
) }),
|
|
19760
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
19761
|
+
PopoverContentBase,
|
|
19762
|
+
{
|
|
19763
|
+
className: "w-64 p-3 flex flex-col gap-3",
|
|
19764
|
+
align: "start",
|
|
19765
|
+
children: [
|
|
19766
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-8 gap-1", children: swatches.map((swatch) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
19767
|
+
"button",
|
|
19768
|
+
{
|
|
19769
|
+
type: "button",
|
|
19770
|
+
title: swatch,
|
|
19771
|
+
"data-testid": `${dataTestId}-swatch`,
|
|
19772
|
+
onClick: () => onChange?.(swatch),
|
|
19773
|
+
className: cn(
|
|
19774
|
+
"size-6 rounded-md border transition hover:scale-110 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
19775
|
+
value.toUpperCase() === swatch.toUpperCase() ? "border-ring ring-2 ring-ring/50 scale-110" : "border-border"
|
|
19776
|
+
),
|
|
19777
|
+
style: { backgroundColor: swatch }
|
|
19778
|
+
},
|
|
19779
|
+
swatch
|
|
19780
|
+
)) }),
|
|
19781
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
19782
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative size-9 shrink-0 rounded-md border border-border overflow-hidden cursor-pointer", children: [
|
|
19783
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
19784
|
+
"input",
|
|
19785
|
+
{
|
|
19786
|
+
type: "color",
|
|
19787
|
+
value,
|
|
19788
|
+
onChange: handleNativeChange,
|
|
19789
|
+
"data-testid": `${dataTestId}-native`,
|
|
19790
|
+
className: "absolute inset-0 w-full h-full opacity-0 cursor-pointer"
|
|
19791
|
+
}
|
|
19792
|
+
),
|
|
19793
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
19794
|
+
"span",
|
|
19795
|
+
{
|
|
19796
|
+
className: "absolute inset-0 rounded-md pointer-events-none",
|
|
19797
|
+
style: { backgroundColor: rgbString }
|
|
19798
|
+
}
|
|
19799
|
+
)
|
|
19800
|
+
] }),
|
|
19801
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1 flex-1 rounded-md border border-input bg-background h-9 px-2", children: [
|
|
19802
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground text-xs font-mono", children: "#" }),
|
|
19803
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
19804
|
+
"input",
|
|
19805
|
+
{
|
|
19806
|
+
type: "text",
|
|
19807
|
+
maxLength: 6,
|
|
19808
|
+
value: hexInput.startsWith("#") ? hexInput.slice(1) : hexInput,
|
|
19809
|
+
onChange: handleHexInput,
|
|
19810
|
+
onBlur: handleHexBlur,
|
|
19811
|
+
"data-testid": `${dataTestId}-hex-input`,
|
|
19812
|
+
className: "flex-1 bg-transparent text-xs font-mono text-foreground focus:outline-none uppercase tracking-widest placeholder:text-muted-foreground",
|
|
19813
|
+
placeholder: "RRGGBB"
|
|
19814
|
+
}
|
|
19815
|
+
)
|
|
19816
|
+
] })
|
|
19817
|
+
] }),
|
|
19818
|
+
onOpacityChange && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
19819
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
19820
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-muted-foreground", children: "Opacidade" }),
|
|
19821
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-xs font-mono text-foreground", children: [
|
|
19822
|
+
opacityPercent,
|
|
19823
|
+
"%"
|
|
19824
|
+
] })
|
|
19825
|
+
] }),
|
|
19826
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
|
|
19827
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
19828
|
+
"div",
|
|
19829
|
+
{
|
|
19830
|
+
className: "absolute inset-y-0 left-0 right-0 my-auto h-1.5 rounded-full pointer-events-none",
|
|
19831
|
+
style: {
|
|
19832
|
+
backgroundImage: "repeating-conic-gradient(#ccc 0% 25%, #fff 0% 50%)",
|
|
19833
|
+
backgroundSize: "8px 8px"
|
|
19834
|
+
}
|
|
19835
|
+
}
|
|
19836
|
+
),
|
|
19837
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
19838
|
+
"div",
|
|
19839
|
+
{
|
|
19840
|
+
className: "absolute inset-y-0 left-0 right-0 my-auto h-1.5 rounded-full pointer-events-none",
|
|
19841
|
+
style: {
|
|
19842
|
+
background: `linear-gradient(to right, transparent, ${rgbString})`
|
|
19843
|
+
}
|
|
19844
|
+
}
|
|
19845
|
+
),
|
|
19846
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
19847
|
+
SlideBase,
|
|
19848
|
+
{
|
|
19849
|
+
min: 0,
|
|
19850
|
+
max: 100,
|
|
19851
|
+
step: 1,
|
|
19852
|
+
value: [opacityPercent],
|
|
19853
|
+
onValueChange: ([val]) => onOpacityChange(val / 100),
|
|
19854
|
+
"data-testid": `${dataTestId}-opacity`,
|
|
19855
|
+
className: "relative"
|
|
19856
|
+
}
|
|
19857
|
+
)
|
|
19858
|
+
] })
|
|
19859
|
+
] })
|
|
19860
|
+
]
|
|
19861
|
+
}
|
|
19862
|
+
)
|
|
19863
|
+
] }),
|
|
19864
|
+
/* @__PURE__ */ jsxRuntime.jsx(ErrorMessage, { error })
|
|
19865
|
+
]
|
|
19866
|
+
}
|
|
19867
|
+
);
|
|
19868
|
+
}
|
|
19869
|
+
);
|
|
19870
|
+
ColorPickerBase.displayName = "ColorPickerBase";
|
|
19871
|
+
var TagChip = ({
|
|
19872
|
+
label,
|
|
19873
|
+
onRemove,
|
|
19874
|
+
disabled,
|
|
19875
|
+
testid
|
|
19876
|
+
}) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
19877
|
+
"span",
|
|
19878
|
+
{
|
|
19879
|
+
className: cn(
|
|
19880
|
+
"inline-flex items-center gap-1 rounded-md px-2 py-0.5 text-xs font-medium",
|
|
19881
|
+
"bg-primary/10 text-primary border border-primary/20",
|
|
19882
|
+
"transition-colors"
|
|
19883
|
+
),
|
|
19884
|
+
"data-testid": testid,
|
|
19885
|
+
children: [
|
|
19886
|
+
label,
|
|
19887
|
+
!disabled && /* @__PURE__ */ jsxRuntime.jsx(
|
|
19888
|
+
"button",
|
|
19889
|
+
{
|
|
19890
|
+
type: "button",
|
|
19891
|
+
onClick: onRemove,
|
|
19892
|
+
"data-testid": `${testid}-remove`,
|
|
19893
|
+
"aria-label": `Remover ${label}`,
|
|
19894
|
+
className: cn(
|
|
19895
|
+
"inline-flex items-center justify-center rounded-full size-3.5",
|
|
19896
|
+
"hover:bg-primary/20 text-primary/70 hover:text-primary",
|
|
19897
|
+
"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-primary",
|
|
19898
|
+
"transition-colors"
|
|
19899
|
+
),
|
|
19900
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(react.XIcon, { weight: "bold", className: "size-2.5" })
|
|
19901
|
+
}
|
|
19902
|
+
)
|
|
19903
|
+
]
|
|
19904
|
+
}
|
|
19905
|
+
);
|
|
19906
|
+
var TagInput = React32__namespace.forwardRef(
|
|
19907
|
+
({
|
|
19908
|
+
tags = [],
|
|
19909
|
+
onTagsChange,
|
|
19910
|
+
maxTags,
|
|
19911
|
+
allowDuplicates = false,
|
|
19912
|
+
separators = [","],
|
|
19913
|
+
label,
|
|
19914
|
+
error,
|
|
19915
|
+
disabled = false,
|
|
19916
|
+
placeholder = "Digite e pressione Enter...",
|
|
19917
|
+
className,
|
|
19918
|
+
"data-testid": dataTestId = "tag-input",
|
|
19919
|
+
onKeyDown,
|
|
19920
|
+
onBlur,
|
|
19921
|
+
...props
|
|
19922
|
+
}, ref) => {
|
|
19923
|
+
const [inputValue, setInputValue] = React32__namespace.useState("");
|
|
19924
|
+
const isMaxReached = maxTags !== void 0 && tags.length >= maxTags;
|
|
19925
|
+
const addTag = (raw) => {
|
|
19926
|
+
const trimmed = raw.trim();
|
|
19927
|
+
if (!trimmed) return;
|
|
19928
|
+
if (!allowDuplicates && tags.includes(trimmed)) {
|
|
19929
|
+
setInputValue("");
|
|
19930
|
+
return;
|
|
19931
|
+
}
|
|
19932
|
+
if (isMaxReached) return;
|
|
19933
|
+
onTagsChange?.([...tags, trimmed]);
|
|
19934
|
+
setInputValue("");
|
|
19935
|
+
};
|
|
19936
|
+
const removeTag = (index) => {
|
|
19937
|
+
onTagsChange?.(tags.filter((_, i) => i !== index));
|
|
19938
|
+
};
|
|
19939
|
+
const handleKeyDown = (e) => {
|
|
19940
|
+
onKeyDown?.(e);
|
|
19941
|
+
if (e.key === "Enter") {
|
|
19942
|
+
e.preventDefault();
|
|
19943
|
+
addTag(inputValue);
|
|
19944
|
+
return;
|
|
19945
|
+
}
|
|
19946
|
+
if (e.key === "Backspace" && inputValue === "" && tags.length > 0) {
|
|
19947
|
+
removeTag(tags.length - 1);
|
|
19948
|
+
return;
|
|
19949
|
+
}
|
|
19950
|
+
if (separators.includes(e.key)) {
|
|
19951
|
+
e.preventDefault();
|
|
19952
|
+
addTag(inputValue);
|
|
19953
|
+
}
|
|
19954
|
+
};
|
|
19955
|
+
const handleBlur = (e) => {
|
|
19956
|
+
onBlur?.(e);
|
|
19957
|
+
if (inputValue.trim()) {
|
|
19958
|
+
addTag(inputValue);
|
|
19959
|
+
}
|
|
19960
|
+
};
|
|
19961
|
+
const handleChange = (e) => {
|
|
19962
|
+
const val = e.target.value;
|
|
19963
|
+
const hasSeparator = separators.some((sep) => val.includes(sep));
|
|
19964
|
+
if (hasSeparator) {
|
|
19965
|
+
const parts = val.split(new RegExp(`[${separators.join("")}]`));
|
|
19966
|
+
parts.slice(0, -1).forEach((part) => addTag(part));
|
|
19967
|
+
setInputValue(parts[parts.length - 1]);
|
|
19968
|
+
} else {
|
|
19969
|
+
setInputValue(val);
|
|
19970
|
+
}
|
|
19971
|
+
};
|
|
19972
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
19973
|
+
"div",
|
|
19974
|
+
{
|
|
19975
|
+
className: cn("flex flex-col w-full min-w-[150px]"),
|
|
19976
|
+
"data-testid": dataTestId,
|
|
19977
|
+
children: [
|
|
19978
|
+
label && /* @__PURE__ */ jsxRuntime.jsx(LabelBase_default, { className: "mb-1", children: label }),
|
|
19979
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
19980
|
+
"div",
|
|
19981
|
+
{
|
|
19982
|
+
className: cn(
|
|
19983
|
+
"flex flex-wrap items-center gap-1.5 min-h-9 rounded-md border bg-background px-2 py-1.5 transition",
|
|
19984
|
+
error ? "border-destructive focus-within:ring-1 focus-within:ring-destructive" : "border-input focus-within:ring-2 focus-within:ring-ring/50 focus-within:border-ring",
|
|
19985
|
+
disabled && "opacity-50 pointer-events-none",
|
|
19986
|
+
className
|
|
19987
|
+
),
|
|
19988
|
+
children: [
|
|
19989
|
+
tags.map((tag, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
19990
|
+
TagChip,
|
|
19991
|
+
{
|
|
19992
|
+
label: tag,
|
|
19993
|
+
disabled,
|
|
19994
|
+
onRemove: () => removeTag(i),
|
|
19995
|
+
testid: `${dataTestId}-tag-${i}`
|
|
19996
|
+
},
|
|
19997
|
+
`${tag}-${i}`
|
|
19998
|
+
)),
|
|
19999
|
+
!isMaxReached && /* @__PURE__ */ jsxRuntime.jsx(
|
|
20000
|
+
"input",
|
|
20001
|
+
{
|
|
20002
|
+
ref,
|
|
20003
|
+
type: "text",
|
|
20004
|
+
value: inputValue,
|
|
20005
|
+
onChange: handleChange,
|
|
20006
|
+
onKeyDown: handleKeyDown,
|
|
20007
|
+
onBlur: handleBlur,
|
|
20008
|
+
disabled,
|
|
20009
|
+
placeholder: tags.length === 0 ? placeholder : "",
|
|
20010
|
+
"data-testid": `${dataTestId}-input`,
|
|
20011
|
+
className: cn(
|
|
20012
|
+
"flex-1 min-w-[120px] bg-transparent text-sm text-foreground",
|
|
20013
|
+
"placeholder:text-muted-foreground focus:outline-none",
|
|
20014
|
+
"disabled:cursor-not-allowed"
|
|
20015
|
+
),
|
|
20016
|
+
...props
|
|
20017
|
+
}
|
|
20018
|
+
),
|
|
20019
|
+
isMaxReached && tags.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-xs text-muted-foreground ml-1", children: [
|
|
20020
|
+
"M\xE1x. ",
|
|
20021
|
+
maxTags,
|
|
20022
|
+
" tags"
|
|
20023
|
+
] })
|
|
20024
|
+
]
|
|
20025
|
+
}
|
|
20026
|
+
),
|
|
20027
|
+
/* @__PURE__ */ jsxRuntime.jsx(ErrorMessage, { error })
|
|
20028
|
+
]
|
|
20029
|
+
}
|
|
20030
|
+
);
|
|
20031
|
+
}
|
|
20032
|
+
);
|
|
20033
|
+
TagInput.displayName = "TagInput";
|
|
19759
20034
|
function Leaderboard({
|
|
19760
20035
|
items,
|
|
19761
20036
|
order: initialOrder = "desc",
|
|
@@ -21184,7 +21459,6 @@ exports.InputOTPBase = InputOTPBase;
|
|
|
21184
21459
|
exports.InputOTPGroupBase = InputOTPGroupBase;
|
|
21185
21460
|
exports.InputOTPSeparatorBase = InputOTPSeparatorBase;
|
|
21186
21461
|
exports.InputOTPSlotBase = InputOTPSlotBase;
|
|
21187
|
-
exports.IntegrationTooltip = IntegrationModal_default;
|
|
21188
21462
|
exports.LabelBase = LabelBase_default;
|
|
21189
21463
|
exports.Leaderboard = Leaderboard;
|
|
21190
21464
|
exports.LikeButton = LikeButton;
|
|
@@ -21390,7 +21664,6 @@ exports.isValidHour = isValidHour;
|
|
|
21390
21664
|
exports.isValidMinuteOrSecond = isValidMinuteOrSecond;
|
|
21391
21665
|
exports.niceCeil = niceCeil;
|
|
21392
21666
|
exports.normalizeAttendDate = normalizeAttendDate;
|
|
21393
|
-
exports.processIntegrationData = processIntegrationData;
|
|
21394
21667
|
exports.processNeo4jData = processNeo4jData;
|
|
21395
21668
|
exports.renderInsideBarLabel = renderInsideBarLabel;
|
|
21396
21669
|
exports.renderPillLabel = pillLabelRenderer_default;
|
|
@@ -21403,6 +21676,7 @@ exports.setMinutes = setMinutes;
|
|
|
21403
21676
|
exports.setSeconds = setSeconds;
|
|
21404
21677
|
exports.sortEvents = sortEvents;
|
|
21405
21678
|
exports.sortEventsAgenda = sortEventsAgenda;
|
|
21679
|
+
exports.startOfLocalDay = startOfLocalDay;
|
|
21406
21680
|
exports.toast = toast;
|
|
21407
21681
|
exports.useBiaxial = useBiaxial;
|
|
21408
21682
|
exports.useCalendarDnd = useCalendarDnd;
|