@mlw-packages/react-components 1.10.7 → 1.10.9
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 +59 -5
- package/dist/index.d.mts +24 -40
- package/dist/index.d.ts +24 -40
- package/dist/index.js +565 -342
- package/dist/index.mjs +565 -341
- 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
|
)
|
|
@@ -4129,7 +4135,7 @@ var CollapsibleTriggerBase = React32__namespace.forwardRef(({ className, childre
|
|
|
4129
4135
|
{
|
|
4130
4136
|
ref,
|
|
4131
4137
|
className: cn(
|
|
4132
|
-
"flex w-full items-center justify-between p-3 text-left font-medium transition-all duration-500 ease-
|
|
4138
|
+
"flex w-full items-center justify-between p-3 text-left font-medium transition-all duration-500 ease-in-out hover:bg-accent hover:text-accent-foreground rounded-md outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 [&[data-state=open]_.caret-icon]:rotate-180",
|
|
4133
4139
|
className
|
|
4134
4140
|
),
|
|
4135
4141
|
"data-slot": "collapsible-trigger",
|
|
@@ -4139,7 +4145,7 @@ var CollapsibleTriggerBase = React32__namespace.forwardRef(({ className, childre
|
|
|
4139
4145
|
leftIcon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-shrink-0 [&>svg]:size-4", children: leftIcon }),
|
|
4140
4146
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children })
|
|
4141
4147
|
] }),
|
|
4142
|
-
showCaret && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "caret-icon flex-shrink-0 transition-transform duration-500 ease-
|
|
4148
|
+
showCaret && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "caret-icon flex-shrink-0 transition-transform duration-500 ease-in-out", children: /* @__PURE__ */ jsxRuntime.jsx(react.CaretUpDownIcon, { className: "h-4 w-4" }) })
|
|
4143
4149
|
]
|
|
4144
4150
|
}
|
|
4145
4151
|
);
|
|
@@ -5416,7 +5422,7 @@ var TabsTriggerBase = React32__namespace.forwardRef(({ className, animation = "d
|
|
|
5416
5422
|
"data-[state=active]:text-primary",
|
|
5417
5423
|
className
|
|
5418
5424
|
);
|
|
5419
|
-
const animationClasses = animation === "none" ? "" : animation === "scale" ? "transform transition-transform data-[state=active]:scale-105" : "after:absolute after:bottom-0 after:left-0 after:h-[2px] after:w-full after:scale-x-0 after:bg-primary after:origin-left after:transition-transform after:duration-500 after:
|
|
5425
|
+
const animationClasses = animation === "none" ? "" : animation === "scale" ? "transform transition-transform data-[state=active]:scale-105" : "after:absolute after:bottom-0 after:left-0 after:h-[2px] after:w-full after:scale-x-0 after:bg-primary after:origin-left after:transition-transform after:duration-500 after:[transition-timing-function:cubic-bezier(0.34,1.56,0.64,1)] data-[state=active]:after:scale-x-100";
|
|
5420
5426
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5421
5427
|
TabsPrimitive__namespace.Trigger,
|
|
5422
5428
|
{
|
|
@@ -8639,7 +8645,8 @@ function Agenda({
|
|
|
8639
8645
|
currentDate,
|
|
8640
8646
|
events,
|
|
8641
8647
|
onEventSelect,
|
|
8642
|
-
showUndatedEvents = true
|
|
8648
|
+
showUndatedEvents = true,
|
|
8649
|
+
noTime = false
|
|
8643
8650
|
}) {
|
|
8644
8651
|
const isValidDate5 = (d) => {
|
|
8645
8652
|
try {
|
|
@@ -8708,6 +8715,7 @@ function Agenda({
|
|
|
8708
8715
|
event,
|
|
8709
8716
|
onClick: onEventSelect ? (e) => handleEventClick(event, e) : void 0,
|
|
8710
8717
|
view: "agenda",
|
|
8718
|
+
noTime,
|
|
8711
8719
|
className: onEventSelect ? void 0 : "hover:shadow-none hover:scale-100"
|
|
8712
8720
|
},
|
|
8713
8721
|
event.id
|
|
@@ -8972,6 +8980,9 @@ var StartHourAgenda = 0;
|
|
|
8972
8980
|
var EndHourAgenda = 24;
|
|
8973
8981
|
var DefaultStartHourAgenda = 9;
|
|
8974
8982
|
var DefaultEndHourAgenda = 10;
|
|
8983
|
+
function startOfLocalDay(d) {
|
|
8984
|
+
return new Date(d.getFullYear(), d.getMonth(), d.getDate());
|
|
8985
|
+
}
|
|
8975
8986
|
function getAutoColorAgenda(id) {
|
|
8976
8987
|
const colors2 = [
|
|
8977
8988
|
"sky",
|
|
@@ -9082,7 +9093,9 @@ function getSpanningEventsForDayAgenda(events, day) {
|
|
|
9082
9093
|
const eventStart = getEventStartDate(event);
|
|
9083
9094
|
const eventEnd = getEventEndDate(event);
|
|
9084
9095
|
if (!eventStart || !eventEnd) return false;
|
|
9085
|
-
|
|
9096
|
+
const startDay = startOfLocalDay(eventStart);
|
|
9097
|
+
const endDay = startOfLocalDay(eventEnd);
|
|
9098
|
+
return !dateFns.isSameDay(day, eventStart) && (dateFns.isSameDay(day, eventEnd) || day > startDay && day < endDay);
|
|
9086
9099
|
});
|
|
9087
9100
|
}
|
|
9088
9101
|
function getAllEventsForDayAgenda(events, day) {
|
|
@@ -9090,7 +9103,9 @@ function getAllEventsForDayAgenda(events, day) {
|
|
|
9090
9103
|
const eventStart = getEventStartDate(event);
|
|
9091
9104
|
const eventEnd = getEventEndDate(event);
|
|
9092
9105
|
if (!eventStart) return false;
|
|
9093
|
-
|
|
9106
|
+
const startDay = startOfLocalDay(eventStart);
|
|
9107
|
+
const endDay = eventEnd ? startOfLocalDay(eventEnd) : null;
|
|
9108
|
+
return dateFns.isSameDay(day, eventStart) || (endDay ? dateFns.isSameDay(day, eventEnd) : false) || (endDay ? day > startDay && day < endDay : false);
|
|
9094
9109
|
});
|
|
9095
9110
|
}
|
|
9096
9111
|
function getAgendaEventsForDayAgenda(events, day) {
|
|
@@ -9098,7 +9113,9 @@ function getAgendaEventsForDayAgenda(events, day) {
|
|
|
9098
9113
|
const eventStart = getEventStartDate(event);
|
|
9099
9114
|
const eventEnd = getEventEndDate(event);
|
|
9100
9115
|
if (!eventStart) return false;
|
|
9101
|
-
|
|
9116
|
+
const startDay = startOfLocalDay(eventStart);
|
|
9117
|
+
const endDay = eventEnd ? startOfLocalDay(eventEnd) : null;
|
|
9118
|
+
return dateFns.isSameDay(day, eventStart) || (eventEnd ? dateFns.isSameDay(day, eventEnd) : false) || (endDay ? day > startDay && day < endDay : false);
|
|
9102
9119
|
}).sort((a, b) => getEventStartTimestamp(a) - getEventStartTimestamp(b));
|
|
9103
9120
|
}
|
|
9104
9121
|
function getEventStartDate(event) {
|
|
@@ -9269,6 +9286,7 @@ function EventItemAgenda({
|
|
|
9269
9286
|
view,
|
|
9270
9287
|
onClick,
|
|
9271
9288
|
showTime,
|
|
9289
|
+
noTime = false,
|
|
9272
9290
|
currentTime,
|
|
9273
9291
|
isFirstDay = true,
|
|
9274
9292
|
isLastDay = true,
|
|
@@ -9347,9 +9365,10 @@ function EventItemAgenda({
|
|
|
9347
9365
|
ariaLabel,
|
|
9348
9366
|
isFirstDay,
|
|
9349
9367
|
isLastDay,
|
|
9368
|
+
noTime,
|
|
9350
9369
|
onClick,
|
|
9351
9370
|
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) }),
|
|
9371
|
+
!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
9372
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9354
9373
|
"span",
|
|
9355
9374
|
{
|
|
@@ -9403,6 +9422,7 @@ function EventItemAgenda({
|
|
|
9403
9422
|
ariaLabel,
|
|
9404
9423
|
isFirstDay,
|
|
9405
9424
|
isLastDay,
|
|
9425
|
+
noTime,
|
|
9406
9426
|
onClick,
|
|
9407
9427
|
onMouseDown,
|
|
9408
9428
|
onTouchStart,
|
|
@@ -9426,15 +9446,16 @@ function EventItemAgenda({
|
|
|
9426
9446
|
ariaLabel,
|
|
9427
9447
|
isFirstDay,
|
|
9428
9448
|
isLastDay,
|
|
9449
|
+
noTime,
|
|
9429
9450
|
onClick,
|
|
9430
9451
|
onMouseDown,
|
|
9431
9452
|
onTouchStart,
|
|
9432
9453
|
children: isCompact ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1 w-full min-w-0 overflow-hidden", children: [
|
|
9433
9454
|
/* @__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) })
|
|
9455
|
+
!noTime && showTime && hasValidTime && displayStart && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 opacity-75 leading-none", children: formatTimeWithOptionalMinutes(displayStart) })
|
|
9435
9456
|
] }) : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-0.5 w-full min-w-0 overflow-hidden h-full", children: [
|
|
9436
9457
|
/* @__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() })
|
|
9458
|
+
!noTime && showTime && hasValidTime && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "opacity-75 leading-none truncate", children: getEventTime() })
|
|
9438
9459
|
] })
|
|
9439
9460
|
}
|
|
9440
9461
|
);
|
|
@@ -9513,7 +9534,7 @@ function EventItemAgenda({
|
|
|
9513
9534
|
children: event.title
|
|
9514
9535
|
}
|
|
9515
9536
|
),
|
|
9516
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9537
|
+
!noTime && /* @__PURE__ */ jsxRuntime.jsx(
|
|
9517
9538
|
"div",
|
|
9518
9539
|
{
|
|
9519
9540
|
className: cn(
|
|
@@ -9576,7 +9597,8 @@ function DayViewAgenda({
|
|
|
9576
9597
|
currentDate,
|
|
9577
9598
|
events,
|
|
9578
9599
|
onEventSelect,
|
|
9579
|
-
showUndatedEvents
|
|
9600
|
+
showUndatedEvents,
|
|
9601
|
+
noTime = false
|
|
9580
9602
|
}) {
|
|
9581
9603
|
const hours = React32.useMemo(() => {
|
|
9582
9604
|
const dayStart = dateFns.startOfDay(currentDate);
|
|
@@ -9764,7 +9786,8 @@ function DayViewAgenda({
|
|
|
9764
9786
|
isFirstDay,
|
|
9765
9787
|
isLastDay,
|
|
9766
9788
|
onClick: (e) => handleEventClick(evt, e),
|
|
9767
|
-
showTime: true
|
|
9789
|
+
showTime: true,
|
|
9790
|
+
noTime
|
|
9768
9791
|
}
|
|
9769
9792
|
) }) }),
|
|
9770
9793
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -10081,7 +10104,8 @@ function EventAgenda({
|
|
|
10081
10104
|
initialView = "month",
|
|
10082
10105
|
initialDate,
|
|
10083
10106
|
onClick,
|
|
10084
|
-
showYearView = false
|
|
10107
|
+
showYearView = false,
|
|
10108
|
+
noTime = false
|
|
10085
10109
|
}) {
|
|
10086
10110
|
const [currentDate, setCurrentDate] = React32.useState(
|
|
10087
10111
|
initialDate && new Date(initialDate) || /* @__PURE__ */ new Date()
|
|
@@ -10237,7 +10261,8 @@ function EventAgenda({
|
|
|
10237
10261
|
{
|
|
10238
10262
|
currentDate,
|
|
10239
10263
|
events,
|
|
10240
|
-
onEventSelect: handleEventSelect
|
|
10264
|
+
onEventSelect: handleEventSelect,
|
|
10265
|
+
noTime
|
|
10241
10266
|
}
|
|
10242
10267
|
),
|
|
10243
10268
|
view === "week" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -10245,7 +10270,8 @@ function EventAgenda({
|
|
|
10245
10270
|
{
|
|
10246
10271
|
currentDate,
|
|
10247
10272
|
events,
|
|
10248
|
-
onEventSelect: handleEventSelect
|
|
10273
|
+
onEventSelect: handleEventSelect,
|
|
10274
|
+
noTime
|
|
10249
10275
|
}
|
|
10250
10276
|
),
|
|
10251
10277
|
view === "day" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -10253,7 +10279,8 @@ function EventAgenda({
|
|
|
10253
10279
|
{
|
|
10254
10280
|
currentDate,
|
|
10255
10281
|
events,
|
|
10256
|
-
onEventSelect: handleEventSelect
|
|
10282
|
+
onEventSelect: handleEventSelect,
|
|
10283
|
+
noTime
|
|
10257
10284
|
}
|
|
10258
10285
|
),
|
|
10259
10286
|
view === "agenda" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -10261,7 +10288,8 @@ function EventAgenda({
|
|
|
10261
10288
|
{
|
|
10262
10289
|
currentDate,
|
|
10263
10290
|
events,
|
|
10264
|
-
onEventSelect: handleEventSelect
|
|
10291
|
+
onEventSelect: handleEventSelect,
|
|
10292
|
+
noTime
|
|
10265
10293
|
}
|
|
10266
10294
|
),
|
|
10267
10295
|
view === "year" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -10279,7 +10307,8 @@ function EventAgenda({
|
|
|
10279
10307
|
] }),
|
|
10280
10308
|
selectedEvent && React32__namespace.default.isValidElement(onClick) ? React32__namespace.default.cloneElement(onClick, {
|
|
10281
10309
|
event: selectedEvent,
|
|
10282
|
-
onClose: () => setSelectedEvent(null)
|
|
10310
|
+
onClose: () => setSelectedEvent(null),
|
|
10311
|
+
noTime
|
|
10283
10312
|
}) : null
|
|
10284
10313
|
]
|
|
10285
10314
|
}
|
|
@@ -10365,12 +10394,17 @@ function useEventVisibilityAgenda({
|
|
|
10365
10394
|
getVisibleEventCount
|
|
10366
10395
|
};
|
|
10367
10396
|
}
|
|
10397
|
+
function startOfDay2(d) {
|
|
10398
|
+
return new Date(d.getFullYear(), d.getMonth(), d.getDate());
|
|
10399
|
+
}
|
|
10368
10400
|
function clampToWeek(date, weekStart, weekEnd) {
|
|
10369
10401
|
return dateFns.max([dateFns.min([date, weekEnd]), weekStart]);
|
|
10370
10402
|
}
|
|
10371
10403
|
function dayCol(date, weekStart) {
|
|
10404
|
+
const dateDay = startOfDay2(date);
|
|
10405
|
+
const weekStartDay = startOfDay2(weekStart);
|
|
10372
10406
|
const diff = Math.round(
|
|
10373
|
-
(
|
|
10407
|
+
(dateDay.getTime() - weekStartDay.getTime()) / (1e3 * 60 * 60 * 24)
|
|
10374
10408
|
);
|
|
10375
10409
|
return Math.max(0, Math.min(6, diff));
|
|
10376
10410
|
}
|
|
@@ -10382,7 +10416,7 @@ function computeMultiDayBars(events, weekDays) {
|
|
|
10382
10416
|
const start = getEventStartDate(ev);
|
|
10383
10417
|
const end = getEventEndDate(ev) ?? start;
|
|
10384
10418
|
if (!start || !end) return false;
|
|
10385
|
-
return start <= weekEnd && end >= weekStart;
|
|
10419
|
+
return startOfDay2(start) <= startOfDay2(weekEnd) && startOfDay2(end) >= startOfDay2(weekStart);
|
|
10386
10420
|
});
|
|
10387
10421
|
const sorted = [...multiDayEvents].sort((a, b) => {
|
|
10388
10422
|
const aS = getEventStartDate(a) ?? /* @__PURE__ */ new Date(0);
|
|
@@ -10433,7 +10467,8 @@ function MultiDayOverlay({
|
|
|
10433
10467
|
weekIndex,
|
|
10434
10468
|
hoveredEventId,
|
|
10435
10469
|
onHover,
|
|
10436
|
-
onEventSelect
|
|
10470
|
+
onEventSelect,
|
|
10471
|
+
noTime = false
|
|
10437
10472
|
}) {
|
|
10438
10473
|
if (bars.length === 0) return null;
|
|
10439
10474
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 pointer-events-none mt-1", children: bars.map((bar) => {
|
|
@@ -10476,7 +10511,7 @@ function MultiDayOverlay({
|
|
|
10476
10511
|
),
|
|
10477
10512
|
children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-0.5 w-full min-w-0", children: [
|
|
10478
10513
|
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") }),
|
|
10514
|
+
!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
10515
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-semibold text-[11px] sm:text-xs truncate min-w-0 leading-none flex-1", children: event.title }),
|
|
10481
10516
|
isFirstDay && (() => {
|
|
10482
10517
|
const evStart = getEventStartDate(event);
|
|
@@ -10498,7 +10533,7 @@ function MultiDayOverlay({
|
|
|
10498
10533
|
/* @__PURE__ */ jsxRuntime.jsxs(TooltipContentBase, { side: "top", children: [
|
|
10499
10534
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "font-semibold truncate max-w-[200px]", children: event.title }),
|
|
10500
10535
|
/* @__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: [
|
|
10536
|
+
event.location && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "opacity-60 mt-0.5 truncate text-[11px] max-w-[200px] flex items-center", children: [
|
|
10502
10537
|
/* @__PURE__ */ jsxRuntime.jsx(react.MapPinIcon, { size: 15 }),
|
|
10503
10538
|
" ",
|
|
10504
10539
|
event.location
|
|
@@ -10514,7 +10549,8 @@ function MonthViewAgenda({
|
|
|
10514
10549
|
currentDate,
|
|
10515
10550
|
events,
|
|
10516
10551
|
onEventSelect,
|
|
10517
|
-
showUndatedEvents
|
|
10552
|
+
showUndatedEvents,
|
|
10553
|
+
noTime = false
|
|
10518
10554
|
}) {
|
|
10519
10555
|
const days = React32.useMemo(() => {
|
|
10520
10556
|
const monthStart = dateFns.startOfMonth(currentDate);
|
|
@@ -10704,8 +10740,9 @@ function MonthViewAgenda({
|
|
|
10704
10740
|
isLastDay: true,
|
|
10705
10741
|
onClick: (e) => handleEventClick(event, e),
|
|
10706
10742
|
view: "month",
|
|
10743
|
+
noTime,
|
|
10707
10744
|
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") }),
|
|
10745
|
+
!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
10746
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-semibold truncate", children: event.title })
|
|
10710
10747
|
] })
|
|
10711
10748
|
}
|
|
@@ -10747,28 +10784,36 @@ function MonthViewAgenda({
|
|
|
10747
10784
|
PopoverContentBase,
|
|
10748
10785
|
{
|
|
10749
10786
|
align: "center",
|
|
10750
|
-
className: "max-w-52 p-3",
|
|
10787
|
+
className: "max-w-52 p-3 border-border",
|
|
10751
10788
|
style: {
|
|
10752
10789
|
"--event-height": `${EventHeightAgenda}px`
|
|
10753
10790
|
},
|
|
10754
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10755
|
-
|
|
10756
|
-
|
|
10757
|
-
|
|
10758
|
-
|
|
10759
|
-
|
|
10760
|
-
|
|
10761
|
-
{
|
|
10762
|
-
event
|
|
10763
|
-
|
|
10764
|
-
|
|
10765
|
-
|
|
10766
|
-
|
|
10767
|
-
|
|
10768
|
-
|
|
10769
|
-
|
|
10770
|
-
|
|
10771
|
-
|
|
10791
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10792
|
+
"div",
|
|
10793
|
+
{
|
|
10794
|
+
className: "space-y-2 ",
|
|
10795
|
+
onClick: (e) => e.stopPropagation(),
|
|
10796
|
+
children: [
|
|
10797
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "font-semibold text-sm", children: dateFns.format(day, "EEE d", { locale: locale.ptBR }) }),
|
|
10798
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-1", children: sortEventsAgenda(allEvents).map((event) => {
|
|
10799
|
+
const s = getEventStartDate(event) ?? getEventEndDate(event) ?? /* @__PURE__ */ new Date();
|
|
10800
|
+
const e2 = getEventEndDate(event) ?? getEventStartDate(event) ?? /* @__PURE__ */ new Date();
|
|
10801
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10802
|
+
EventItemAgenda,
|
|
10803
|
+
{
|
|
10804
|
+
noTime: true,
|
|
10805
|
+
event,
|
|
10806
|
+
isFirstDay: dateFns.isSameDay(day, s),
|
|
10807
|
+
isLastDay: dateFns.isSameDay(day, e2),
|
|
10808
|
+
onClick: (e) => handleEventClick(event, e),
|
|
10809
|
+
view: "month"
|
|
10810
|
+
},
|
|
10811
|
+
event.id
|
|
10812
|
+
);
|
|
10813
|
+
}) })
|
|
10814
|
+
]
|
|
10815
|
+
}
|
|
10816
|
+
)
|
|
10772
10817
|
}
|
|
10773
10818
|
)
|
|
10774
10819
|
] })
|
|
@@ -10786,7 +10831,8 @@ function MonthViewAgenda({
|
|
|
10786
10831
|
weekIndex,
|
|
10787
10832
|
hoveredEventId,
|
|
10788
10833
|
onHover: handleHover,
|
|
10789
|
-
onEventSelect
|
|
10834
|
+
onEventSelect,
|
|
10835
|
+
noTime
|
|
10790
10836
|
}
|
|
10791
10837
|
)
|
|
10792
10838
|
]
|
|
@@ -10819,6 +10865,7 @@ function DraggableEvent({
|
|
|
10819
10865
|
event,
|
|
10820
10866
|
view,
|
|
10821
10867
|
showTime,
|
|
10868
|
+
noTime,
|
|
10822
10869
|
onClick,
|
|
10823
10870
|
height,
|
|
10824
10871
|
isMultiDay,
|
|
@@ -10912,6 +10959,7 @@ function DraggableEvent({
|
|
|
10912
10959
|
onMouseDown: handleMouseDown,
|
|
10913
10960
|
onTouchStart: handleTouchStart,
|
|
10914
10961
|
showTime,
|
|
10962
|
+
noTime,
|
|
10915
10963
|
view,
|
|
10916
10964
|
totalCols
|
|
10917
10965
|
}
|
|
@@ -10924,7 +10972,8 @@ function WeekViewAgenda({
|
|
|
10924
10972
|
events,
|
|
10925
10973
|
onEventSelect,
|
|
10926
10974
|
onEventCreate,
|
|
10927
|
-
showUndatedEvents
|
|
10975
|
+
showUndatedEvents,
|
|
10976
|
+
noTime = false
|
|
10928
10977
|
}) {
|
|
10929
10978
|
const days = React32.useMemo(() => {
|
|
10930
10979
|
const weekStart = dateFns.startOfWeek(currentDate, { weekStartsOn: 0 });
|
|
@@ -10957,7 +11006,7 @@ function WeekViewAgenda({
|
|
|
10957
11006
|
return days.some((day) => {
|
|
10958
11007
|
if (eventStart && dateFns.isSameDay(day, eventStart)) return true;
|
|
10959
11008
|
if (eventEnd && dateFns.isSameDay(day, eventEnd)) return true;
|
|
10960
|
-
if (eventStart && eventEnd && day > eventStart && day < eventEnd)
|
|
11009
|
+
if (eventStart && eventEnd && day > startOfLocalDay(eventStart) && day < startOfLocalDay(eventEnd))
|
|
10961
11010
|
return true;
|
|
10962
11011
|
return false;
|
|
10963
11012
|
});
|
|
@@ -10989,7 +11038,7 @@ function WeekViewAgenda({
|
|
|
10989
11038
|
if (event.start == null) return false;
|
|
10990
11039
|
const eventStart = getEventStartDate(event);
|
|
10991
11040
|
const eventEnd = getEventEndDate(event) ?? getEventStartDate(event);
|
|
10992
|
-
return (eventStart ? dateFns.isSameDay(day, eventStart) : false) || (eventEnd ? dateFns.isSameDay(day, eventEnd) : false) || (eventStart && eventEnd ? eventStart
|
|
11041
|
+
return (eventStart ? dateFns.isSameDay(day, eventStart) : false) || (eventEnd ? dateFns.isSameDay(day, eventEnd) : false) || (eventStart && eventEnd ? day > startOfLocalDay(eventStart) && day < startOfLocalDay(eventEnd) : false);
|
|
10993
11042
|
});
|
|
10994
11043
|
const sortedEvents = [...dayEvents].sort((a, b) => {
|
|
10995
11044
|
const aStart = getEventStartDate(a) ?? getEventEndDate(a) ?? /* @__PURE__ */ new Date();
|
|
@@ -11230,7 +11279,7 @@ function WeekViewAgenda({
|
|
|
11230
11279
|
children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-1 min-w-0 w-full", children: [
|
|
11231
11280
|
!isFirstDay && colStart === 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 text-[11px] font-bold opacity-60", children: /* @__PURE__ */ jsxRuntime.jsx(ssr.CaretLeftIcon, {}) }),
|
|
11232
11281
|
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") }),
|
|
11282
|
+
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
11283
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate text-xs font-medium", children: event.title }),
|
|
11235
11284
|
isFirstDay && (() => {
|
|
11236
11285
|
const evStart = getEventStartDate(event);
|
|
@@ -11308,6 +11357,7 @@ function WeekViewAgenda({
|
|
|
11308
11357
|
onClick: (e) => handleEventClick(positionedEvent.event, e),
|
|
11309
11358
|
draggable: false,
|
|
11310
11359
|
showTime: true,
|
|
11360
|
+
noTime,
|
|
11311
11361
|
view: "week",
|
|
11312
11362
|
totalCols: positionedEvent.totalCols
|
|
11313
11363
|
}
|
|
@@ -11511,7 +11561,8 @@ function capitalize(s) {
|
|
|
11511
11561
|
}
|
|
11512
11562
|
function EventDetailModalAgenda({
|
|
11513
11563
|
event,
|
|
11514
|
-
onClose
|
|
11564
|
+
onClose,
|
|
11565
|
+
noTime = false
|
|
11515
11566
|
}) {
|
|
11516
11567
|
const [open, setOpen] = React32.useState(true);
|
|
11517
11568
|
if (!event) return null;
|
|
@@ -11576,7 +11627,7 @@ function EventDetailModalAgenda({
|
|
|
11576
11627
|
] }) : 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
11628
|
/* @__PURE__ */ jsxRuntime.jsx(react.CalendarDotsIcon, { size: 11, weight: "bold" }),
|
|
11578
11629
|
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: [
|
|
11630
|
+
] }) : !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
11631
|
/* @__PURE__ */ jsxRuntime.jsx(react.ClockIcon, { size: 11, weight: "bold" }),
|
|
11581
11632
|
formatDuration(durationMinutes)
|
|
11582
11633
|
] }) : null }),
|
|
@@ -11586,11 +11637,24 @@ function EventDetailModalAgenda({
|
|
|
11586
11637
|
),
|
|
11587
11638
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col px-7 py-6 bg-background", children: [
|
|
11588
11639
|
/* @__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(
|
|
11640
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-0.5 p-2 rounded-xl bg-muted border border-border shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
11641
|
+
react.CalendarDotsIcon,
|
|
11642
|
+
{
|
|
11643
|
+
size: 18,
|
|
11644
|
+
weight: "duotone",
|
|
11645
|
+
className: "text-primary"
|
|
11646
|
+
}
|
|
11647
|
+
) }),
|
|
11590
11648
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-0.5 min-w-0", children: [
|
|
11591
11649
|
/* @__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(
|
|
11650
|
+
!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: [
|
|
11651
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11652
|
+
react.ArrowRightIcon,
|
|
11653
|
+
{
|
|
11654
|
+
size: 11,
|
|
11655
|
+
className: "shrink-0 text-muted-foreground/60"
|
|
11656
|
+
}
|
|
11657
|
+
),
|
|
11594
11658
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[12px] font-medium text-muted-foreground", children: dateSection.secondary })
|
|
11595
11659
|
] }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[12px] font-medium text-muted-foreground", children: dateSection.secondary }) })
|
|
11596
11660
|
] })
|
|
@@ -11598,7 +11662,14 @@ function EventDetailModalAgenda({
|
|
|
11598
11662
|
(event.location || event.description) && /* @__PURE__ */ jsxRuntime.jsx(SeparatorBase, { className: "opacity-40" }),
|
|
11599
11663
|
event.location && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
11600
11664
|
/* @__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(
|
|
11665
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-0.5 p-2 rounded-xl bg-muted border border-border shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
11666
|
+
react.MapPinIcon,
|
|
11667
|
+
{
|
|
11668
|
+
size: 18,
|
|
11669
|
+
weight: "duotone",
|
|
11670
|
+
className: "text-primary"
|
|
11671
|
+
}
|
|
11672
|
+
) }),
|
|
11602
11673
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-0.5 min-w-0", children: [
|
|
11603
11674
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] font-medium uppercase tracking-widest text-muted-foreground/60", children: "Localiza\xE7\xE3o" }),
|
|
11604
11675
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[13px] font-medium text-foreground leading-snug", children: event.location })
|
|
@@ -11607,7 +11678,14 @@ function EventDetailModalAgenda({
|
|
|
11607
11678
|
event.description && /* @__PURE__ */ jsxRuntime.jsx(SeparatorBase, { className: "opacity-40" })
|
|
11608
11679
|
] }),
|
|
11609
11680
|
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(
|
|
11681
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-0.5 p-2 rounded-xl bg-muted border border-border shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
11682
|
+
react.AlignLeftIcon,
|
|
11683
|
+
{
|
|
11684
|
+
size: 18,
|
|
11685
|
+
weight: "duotone",
|
|
11686
|
+
className: "text-primary"
|
|
11687
|
+
}
|
|
11688
|
+
) }),
|
|
11611
11689
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-0.5 min-w-0", children: [
|
|
11612
11690
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] font-medium uppercase tracking-widest text-muted-foreground/60", children: "Descri\xE7\xE3o" }),
|
|
11613
11691
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[13px] text-muted-foreground leading-relaxed font-normal", children: event.description })
|
|
@@ -14651,7 +14729,7 @@ var detectXAxis = (data) => {
|
|
|
14651
14729
|
return stringFields[0] || Object.keys(firstItem)[0] || "name";
|
|
14652
14730
|
};
|
|
14653
14731
|
var generateAdditionalColors = (baseColors, count) => {
|
|
14654
|
-
const
|
|
14732
|
+
const hexToRgb2 = (hex) => {
|
|
14655
14733
|
const clean = hex.replace("#", "");
|
|
14656
14734
|
const bigint = parseInt(
|
|
14657
14735
|
clean.length === 3 ? clean.split("").map((c) => c + c).join("") : clean,
|
|
@@ -14700,7 +14778,7 @@ var generateAdditionalColors = (baseColors, count) => {
|
|
|
14700
14778
|
};
|
|
14701
14779
|
return `#${f(0)}${f(8)}${f(4)}`;
|
|
14702
14780
|
};
|
|
14703
|
-
const anchors = baseColors.map((c) => rgbToHsl(
|
|
14781
|
+
const anchors = baseColors.map((c) => rgbToHsl(hexToRgb2(c)));
|
|
14704
14782
|
const colors2 = [...baseColors];
|
|
14705
14783
|
let i = 0;
|
|
14706
14784
|
while (colors2.length < count) {
|
|
@@ -16537,7 +16615,7 @@ var IntegrationCard = ({ title, details }) => {
|
|
|
16537
16615
|
}) })
|
|
16538
16616
|
] });
|
|
16539
16617
|
};
|
|
16540
|
-
var
|
|
16618
|
+
var Name = ({
|
|
16541
16619
|
name,
|
|
16542
16620
|
description
|
|
16543
16621
|
}) => {
|
|
@@ -16571,16 +16649,24 @@ var NameTooltip = ({
|
|
|
16571
16649
|
] })
|
|
16572
16650
|
] }) });
|
|
16573
16651
|
};
|
|
16574
|
-
var SystemNode = ({ label }) => {
|
|
16652
|
+
var SystemNode = React32__namespace.default.forwardRef(({ label }, ref) => {
|
|
16575
16653
|
const truncated = label.length > 9 ? label.substring(0, 9) + "\u2026" : label;
|
|
16576
16654
|
const needsTooltip = label.length > 9;
|
|
16577
|
-
const circle = /* @__PURE__ */ jsxRuntime.jsx(
|
|
16655
|
+
const circle = /* @__PURE__ */ jsxRuntime.jsx(
|
|
16656
|
+
"div",
|
|
16657
|
+
{
|
|
16658
|
+
ref,
|
|
16659
|
+
className: "w-[76px] h-[76px] rounded-full bg-primary flex items-center justify-center shrink-0 z-10 cursor-default",
|
|
16660
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] font-bold text-primary-foreground text-center px-2 leading-tight select-none", children: truncated })
|
|
16661
|
+
}
|
|
16662
|
+
);
|
|
16578
16663
|
if (!needsTooltip) return circle;
|
|
16579
16664
|
return /* @__PURE__ */ jsxRuntime.jsx(TooltipProviderBase, { children: /* @__PURE__ */ jsxRuntime.jsxs(TooltipBase, { children: [
|
|
16580
16665
|
/* @__PURE__ */ jsxRuntime.jsx(TooltipTriggerBase, { asChild: true, children: circle }),
|
|
16581
16666
|
/* @__PURE__ */ jsxRuntime.jsx(TooltipContentBase, { sideOffset: 8, className: "z-[10001]", children: label })
|
|
16582
16667
|
] }) });
|
|
16583
|
-
};
|
|
16668
|
+
});
|
|
16669
|
+
SystemNode.displayName = "SystemNode";
|
|
16584
16670
|
var Beam = ({ isInput, containerRef, leftRef, rightRef }) => {
|
|
16585
16671
|
const gradientId = React32.useId();
|
|
16586
16672
|
const [pathD, setPathD] = React32.useState("");
|
|
@@ -16705,10 +16791,10 @@ var SystemsDiagram = ({ isInput, currentSystem, externalSystem }) => {
|
|
|
16705
16791
|
"div",
|
|
16706
16792
|
{
|
|
16707
16793
|
ref: containerRef,
|
|
16708
|
-
className: "relative flex items-center justify-between py-1
|
|
16794
|
+
className: "relative flex items-center justify-between py-1",
|
|
16709
16795
|
children: [
|
|
16710
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
16711
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
16796
|
+
/* @__PURE__ */ jsxRuntime.jsx(SystemNode, { ref: leftRef, label: isInput ? externalSystem : currentSystem }),
|
|
16797
|
+
/* @__PURE__ */ jsxRuntime.jsx(SystemNode, { ref: rightRef, label: isInput ? currentSystem : externalSystem }),
|
|
16712
16798
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
16713
16799
|
Beam,
|
|
16714
16800
|
{
|
|
@@ -16722,11 +16808,11 @@ var SystemsDiagram = ({ isInput, currentSystem, externalSystem }) => {
|
|
|
16722
16808
|
}
|
|
16723
16809
|
);
|
|
16724
16810
|
};
|
|
16725
|
-
var
|
|
16811
|
+
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: [
|
|
16726
16812
|
isLoading ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1.5", children: [
|
|
16727
16813
|
/* @__PURE__ */ jsxRuntime.jsx(SkeletonBase, { className: "h-6 w-3/4" }),
|
|
16728
16814
|
/* @__PURE__ */ jsxRuntime.jsx(SkeletonBase, { className: "h-3.5 w-1/2" })
|
|
16729
|
-
] }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
16815
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsx(Name, { name: data.name, description: data.description }),
|
|
16730
16816
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "border-t border-border/20" }),
|
|
16731
16817
|
isLoading ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-3", children: [
|
|
16732
16818
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between py-1", children: [
|
|
@@ -16755,7 +16841,7 @@ var TooltipBodyComponent = ({ data, isLoading, connections, isInput, externalSys
|
|
|
16755
16841
|
}
|
|
16756
16842
|
),
|
|
16757
16843
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "border-t border-border/20" }),
|
|
16758
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center
|
|
16844
|
+
/* @__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" }) }),
|
|
16759
16845
|
/* @__PURE__ */ jsxRuntime.jsx("div", { children: connections.map((conn) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
16760
16846
|
IntegrationCard,
|
|
16761
16847
|
{
|
|
@@ -16765,271 +16851,8 @@ var TooltipBodyComponent = ({ data, isLoading, connections, isInput, externalSys
|
|
|
16765
16851
|
conn.id
|
|
16766
16852
|
)) })
|
|
16767
16853
|
] })
|
|
16768
|
-
] })
|
|
16769
|
-
|
|
16770
|
-
var tooltipVariants3 = {
|
|
16771
|
-
hidden: {
|
|
16772
|
-
opacity: 0,
|
|
16773
|
-
scale: 0.96,
|
|
16774
|
-
transition: { type: "spring", stiffness: 400, damping: 28 }
|
|
16775
|
-
},
|
|
16776
|
-
visible: {
|
|
16777
|
-
opacity: 1,
|
|
16778
|
-
scale: 1,
|
|
16779
|
-
transition: { type: "spring", stiffness: 300, damping: 28 }
|
|
16780
|
-
},
|
|
16781
|
-
exit: {
|
|
16782
|
-
opacity: 0,
|
|
16783
|
-
scale: 0.96,
|
|
16784
|
-
transition: { type: "spring", stiffness: 400, damping: 28 }
|
|
16785
|
-
}
|
|
16786
|
-
};
|
|
16787
|
-
var IntegrationTooltip = ({
|
|
16788
|
-
id,
|
|
16789
|
-
data,
|
|
16790
|
-
position,
|
|
16791
|
-
title = "Conex\xF5es",
|
|
16792
|
-
isLoading = false,
|
|
16793
|
-
systemName,
|
|
16794
|
-
onMouseDown,
|
|
16795
|
-
onClose,
|
|
16796
|
-
onPositionChange
|
|
16797
|
-
}) => {
|
|
16798
|
-
const isMobile = useIsMobile();
|
|
16799
|
-
const [localPos, setLocalPos] = React32.useState(position);
|
|
16800
|
-
const [dragging, setDragging] = React32.useState(false);
|
|
16801
|
-
const offsetRef = React32.useRef({ x: 0, y: 0 });
|
|
16802
|
-
const lastMouse = React32.useRef({ x: 0, y: 0 });
|
|
16803
|
-
const tooltipRef = React32.useRef(null);
|
|
16804
|
-
const currentPosRef = React32.useRef(position);
|
|
16805
|
-
React32.useEffect(() => {
|
|
16806
|
-
currentPosRef.current = position;
|
|
16807
|
-
setLocalPos(position);
|
|
16808
|
-
}, [position]);
|
|
16809
|
-
React32.useEffect(() => {
|
|
16810
|
-
let rafId = null;
|
|
16811
|
-
const handleMouseMove = (e) => {
|
|
16812
|
-
if (!dragging) return;
|
|
16813
|
-
lastMouse.current = { x: e.clientX, y: e.clientY };
|
|
16814
|
-
if (rafId) cancelAnimationFrame(rafId);
|
|
16815
|
-
rafId = requestAnimationFrame(() => {
|
|
16816
|
-
const newLeft = lastMouse.current.x - offsetRef.current.x;
|
|
16817
|
-
const newTop = lastMouse.current.y - offsetRef.current.y;
|
|
16818
|
-
const p = {
|
|
16819
|
-
top: Math.max(0, Math.min(newTop, window.innerHeight - 200)),
|
|
16820
|
-
left: Math.max(0, Math.min(newLeft, window.innerWidth - 320))
|
|
16821
|
-
};
|
|
16822
|
-
currentPosRef.current = p;
|
|
16823
|
-
if (tooltipRef.current) {
|
|
16824
|
-
tooltipRef.current.style.top = `${p.top}px`;
|
|
16825
|
-
tooltipRef.current.style.left = `${p.left}px`;
|
|
16826
|
-
}
|
|
16827
|
-
onPositionChange?.(id, p);
|
|
16828
|
-
});
|
|
16829
|
-
};
|
|
16830
|
-
const handleMouseUp = () => {
|
|
16831
|
-
if (dragging) {
|
|
16832
|
-
setDragging(false);
|
|
16833
|
-
setLocalPos(currentPosRef.current);
|
|
16834
|
-
if (rafId) cancelAnimationFrame(rafId);
|
|
16835
|
-
}
|
|
16836
|
-
};
|
|
16837
|
-
if (dragging) {
|
|
16838
|
-
document.addEventListener("mousemove", handleMouseMove, {
|
|
16839
|
-
passive: true
|
|
16840
|
-
});
|
|
16841
|
-
document.addEventListener("mouseup", handleMouseUp);
|
|
16842
|
-
document.body.style.cursor = "grabbing";
|
|
16843
|
-
document.body.style.userSelect = "none";
|
|
16844
|
-
}
|
|
16845
|
-
return () => {
|
|
16846
|
-
if (rafId) cancelAnimationFrame(rafId);
|
|
16847
|
-
document.removeEventListener("mousemove", handleMouseMove);
|
|
16848
|
-
document.removeEventListener("mouseup", handleMouseUp);
|
|
16849
|
-
document.body.style.cursor = "";
|
|
16850
|
-
document.body.style.userSelect = "";
|
|
16851
|
-
};
|
|
16852
|
-
}, [dragging, id, onPositionChange]);
|
|
16853
|
-
const handleMouseDownLocal = React32.useCallback(
|
|
16854
|
-
(e) => {
|
|
16855
|
-
e.preventDefault();
|
|
16856
|
-
e.stopPropagation();
|
|
16857
|
-
const rect = e.currentTarget.closest(".fixed")?.getBoundingClientRect();
|
|
16858
|
-
if (!rect) return;
|
|
16859
|
-
offsetRef.current = { x: e.clientX - rect.left, y: e.clientY - rect.top };
|
|
16860
|
-
setDragging(true);
|
|
16861
|
-
onMouseDown?.(id, e);
|
|
16862
|
-
},
|
|
16863
|
-
[id, onMouseDown]
|
|
16864
|
-
);
|
|
16865
|
-
const handleTouchStartLocal = React32.useCallback(
|
|
16866
|
-
(e) => {
|
|
16867
|
-
e.stopPropagation();
|
|
16868
|
-
const touch = e.touches[0];
|
|
16869
|
-
if (!touch) return;
|
|
16870
|
-
const rect = e.currentTarget.closest(".fixed")?.getBoundingClientRect();
|
|
16871
|
-
if (!rect) return;
|
|
16872
|
-
offsetRef.current = {
|
|
16873
|
-
x: touch.clientX - rect.left,
|
|
16874
|
-
y: touch.clientY - rect.top
|
|
16875
|
-
};
|
|
16876
|
-
setDragging(true);
|
|
16877
|
-
onMouseDown?.(id, e);
|
|
16878
|
-
},
|
|
16879
|
-
[id, onMouseDown]
|
|
16880
|
-
);
|
|
16881
|
-
const inputConnections = React32.useMemo(
|
|
16882
|
-
() => data.connections.filter((c) => c.type === "entrada"),
|
|
16883
|
-
[data.connections]
|
|
16884
|
-
);
|
|
16885
|
-
const outputConnections = React32.useMemo(
|
|
16886
|
-
() => data.connections.filter((c) => c.type === "saida"),
|
|
16887
|
-
[data.connections]
|
|
16888
|
-
);
|
|
16889
|
-
const isInput = inputConnections.length > 0;
|
|
16890
|
-
const connections = isInput ? inputConnections : outputConnections;
|
|
16891
|
-
const externalSystem = systemName ?? connections[0]?.name ?? "Sistema";
|
|
16892
|
-
const header = /* @__PURE__ */ jsxRuntime.jsxs(
|
|
16893
|
-
"div",
|
|
16894
|
-
{
|
|
16895
|
-
className: "flex items-center justify-between py-1 border-b border-border/10 bg-muted/30 shrink-0 max-w-lg",
|
|
16896
|
-
onMouseDown: handleMouseDownLocal,
|
|
16897
|
-
onTouchStart: handleTouchStartLocal,
|
|
16898
|
-
style: {
|
|
16899
|
-
touchAction: "none",
|
|
16900
|
-
cursor: dragging ? "grabbing" : "grab"
|
|
16901
|
-
},
|
|
16902
|
-
children: [
|
|
16903
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 px-3", children: [
|
|
16904
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.DotsSixVerticalIcon, { size: 16, className: "text-primary" }),
|
|
16905
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-semibold text-muted-foreground uppercase tracking-wider", children: title })
|
|
16906
|
-
] }),
|
|
16907
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
16908
|
-
ButtonBase,
|
|
16909
|
-
{
|
|
16910
|
-
variant: "ghost",
|
|
16911
|
-
size: "icon",
|
|
16912
|
-
onClick: () => onClose(id),
|
|
16913
|
-
className: "text-muted-foreground hover:text-destructive transition-colors hover:bg-destructive/10 mr-1",
|
|
16914
|
-
style: { cursor: "pointer" },
|
|
16915
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(react.XIcon, { size: 16 })
|
|
16916
|
-
}
|
|
16917
|
-
)
|
|
16918
|
-
]
|
|
16919
|
-
}
|
|
16920
|
-
);
|
|
16921
|
-
const bodyProps = { data, isLoading, connections, isInput, externalSystem };
|
|
16922
|
-
if (isMobile) {
|
|
16923
|
-
return /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { children: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
16924
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
16925
|
-
framerMotion.motion.div,
|
|
16926
|
-
{
|
|
16927
|
-
className: "fixed inset-0 z-[9999] bg-black/40 backdrop-blur-[2px]",
|
|
16928
|
-
initial: { opacity: 0 },
|
|
16929
|
-
animate: { opacity: 1 },
|
|
16930
|
-
exit: { opacity: 0 },
|
|
16931
|
-
onClick: () => onClose(id)
|
|
16932
|
-
},
|
|
16933
|
-
`overlay-${id}`
|
|
16934
|
-
),
|
|
16935
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
16936
|
-
framerMotion.motion.div,
|
|
16937
|
-
{
|
|
16938
|
-
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",
|
|
16939
|
-
style: { maxHeight: "85dvh" },
|
|
16940
|
-
initial: { y: "100%" },
|
|
16941
|
-
animate: { y: 0 },
|
|
16942
|
-
exit: { y: "100%" },
|
|
16943
|
-
transition: { type: "spring", stiffness: 320, damping: 36 },
|
|
16944
|
-
onClick: (e) => e.stopPropagation(),
|
|
16945
|
-
children: [
|
|
16946
|
-
/* @__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" }) }),
|
|
16947
|
-
header,
|
|
16948
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 min-h-0", children: /* @__PURE__ */ jsxRuntime.jsx(TooltipBody, { ...bodyProps }) })
|
|
16949
|
-
]
|
|
16950
|
-
},
|
|
16951
|
-
`sheet-${id}`
|
|
16952
|
-
)
|
|
16953
|
-
] }) });
|
|
16954
|
-
}
|
|
16955
|
-
return /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
16956
|
-
framerMotion.motion.div,
|
|
16957
|
-
{
|
|
16958
|
-
ref: tooltipRef,
|
|
16959
|
-
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 max-h-[60vh] sm:max-h-[520px]",
|
|
16960
|
-
variants: tooltipVariants3,
|
|
16961
|
-
initial: "hidden",
|
|
16962
|
-
animate: "visible",
|
|
16963
|
-
exit: "exit",
|
|
16964
|
-
style: { top: localPos.top, left: localPos.left },
|
|
16965
|
-
onClick: (e) => e.stopPropagation(),
|
|
16966
|
-
children: [
|
|
16967
|
-
header,
|
|
16968
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 min-h-0", children: /* @__PURE__ */ jsxRuntime.jsx(TooltipBody, { ...bodyProps }) })
|
|
16969
|
-
]
|
|
16970
|
-
},
|
|
16971
|
-
id
|
|
16972
|
-
) });
|
|
16973
|
-
};
|
|
16974
|
-
var IntegrationTooltip_default = IntegrationTooltip;
|
|
16975
|
-
|
|
16976
|
-
// src/components/ui/charts/components/tooltips/utils/integrationTooltipUtils.ts
|
|
16977
|
-
function processIntegrationData(integrations, targetSystemName) {
|
|
16978
|
-
const connections = [];
|
|
16979
|
-
integrations.forEach((integration) => {
|
|
16980
|
-
const origemNome = integration.origem.properties.nome;
|
|
16981
|
-
const destinoNome = integration.destino.properties.nome;
|
|
16982
|
-
if (origemNome === targetSystemName) {
|
|
16983
|
-
connections.push({
|
|
16984
|
-
id: integration.r.elementId,
|
|
16985
|
-
name: destinoNome,
|
|
16986
|
-
type: "saida",
|
|
16987
|
-
integration: integration.r.properties
|
|
16988
|
-
});
|
|
16989
|
-
}
|
|
16990
|
-
if (destinoNome === targetSystemName) {
|
|
16991
|
-
connections.push({
|
|
16992
|
-
id: integration.r.elementId,
|
|
16993
|
-
name: origemNome,
|
|
16994
|
-
type: "entrada",
|
|
16995
|
-
integration: integration.r.properties
|
|
16996
|
-
});
|
|
16997
|
-
}
|
|
16998
|
-
});
|
|
16999
|
-
return {
|
|
17000
|
-
name: targetSystemName,
|
|
17001
|
-
connections
|
|
17002
|
-
};
|
|
17003
|
-
}
|
|
17004
|
-
|
|
17005
|
-
// src/components/ui/charts/components/tooltips/utils/systemTooltipUtils.ts
|
|
17006
|
-
function processNeo4jData(integrations, targetSystemName) {
|
|
17007
|
-
const connections = [];
|
|
17008
|
-
integrations.forEach((integration) => {
|
|
17009
|
-
const origemNome = integration.origem.properties.nome;
|
|
17010
|
-
const destinoNome = integration.destino.properties.nome;
|
|
17011
|
-
if (origemNome === targetSystemName) {
|
|
17012
|
-
connections.push({
|
|
17013
|
-
id: integration.r.elementId,
|
|
17014
|
-
name: destinoNome,
|
|
17015
|
-
type: "saida",
|
|
17016
|
-
integration: integration.r.properties
|
|
17017
|
-
});
|
|
17018
|
-
}
|
|
17019
|
-
if (destinoNome === targetSystemName) {
|
|
17020
|
-
connections.push({
|
|
17021
|
-
id: integration.r.elementId,
|
|
17022
|
-
name: origemNome,
|
|
17023
|
-
type: "entrada",
|
|
17024
|
-
integration: integration.r.properties
|
|
17025
|
-
});
|
|
17026
|
-
}
|
|
17027
|
-
});
|
|
17028
|
-
return {
|
|
17029
|
-
name: targetSystemName,
|
|
17030
|
-
connections
|
|
17031
|
-
};
|
|
17032
|
-
}
|
|
16854
|
+
] });
|
|
16855
|
+
React32__namespace.default.memo(BodyComponent);
|
|
17033
16856
|
var Brush = ({
|
|
17034
16857
|
data,
|
|
17035
16858
|
legend,
|
|
@@ -19659,6 +19482,35 @@ var TimeSeries = ({
|
|
|
19659
19482
|
) });
|
|
19660
19483
|
};
|
|
19661
19484
|
var TimeSeries_default = TimeSeries;
|
|
19485
|
+
|
|
19486
|
+
// src/components/ui/charts/components/tooltips/utils/systemTooltipUtils.ts
|
|
19487
|
+
function processNeo4jData(integrations, targetSystemName) {
|
|
19488
|
+
const connections = [];
|
|
19489
|
+
integrations.forEach((integration) => {
|
|
19490
|
+
const origemNome = integration.origem.properties.nome;
|
|
19491
|
+
const destinoNome = integration.destino.properties.nome;
|
|
19492
|
+
if (origemNome === targetSystemName) {
|
|
19493
|
+
connections.push({
|
|
19494
|
+
id: integration.r.elementId,
|
|
19495
|
+
name: destinoNome,
|
|
19496
|
+
type: "saida",
|
|
19497
|
+
integration: integration.r.properties
|
|
19498
|
+
});
|
|
19499
|
+
}
|
|
19500
|
+
if (destinoNome === targetSystemName) {
|
|
19501
|
+
connections.push({
|
|
19502
|
+
id: integration.r.elementId,
|
|
19503
|
+
name: origemNome,
|
|
19504
|
+
type: "entrada",
|
|
19505
|
+
integration: integration.r.properties
|
|
19506
|
+
});
|
|
19507
|
+
}
|
|
19508
|
+
});
|
|
19509
|
+
return {
|
|
19510
|
+
name: targetSystemName,
|
|
19511
|
+
connections
|
|
19512
|
+
};
|
|
19513
|
+
}
|
|
19662
19514
|
function NumericInput({
|
|
19663
19515
|
value,
|
|
19664
19516
|
onChange,
|
|
@@ -19750,6 +19602,378 @@ function NumericInput({
|
|
|
19750
19602
|
] })
|
|
19751
19603
|
] });
|
|
19752
19604
|
}
|
|
19605
|
+
function hexToRgb(hex) {
|
|
19606
|
+
const clean = hex.replace("#", "");
|
|
19607
|
+
if (clean.length !== 6) return null;
|
|
19608
|
+
const num = parseInt(clean, 16);
|
|
19609
|
+
return { r: num >> 16 & 255, g: num >> 8 & 255, b: num & 255 };
|
|
19610
|
+
}
|
|
19611
|
+
function isValidHex(hex) {
|
|
19612
|
+
return /^#[0-9A-Fa-f]{6}$/.test(hex);
|
|
19613
|
+
}
|
|
19614
|
+
var DEFAULT_SWATCHES = [
|
|
19615
|
+
"#000000",
|
|
19616
|
+
"#ffffff",
|
|
19617
|
+
"#6B7280",
|
|
19618
|
+
"#EF4444",
|
|
19619
|
+
"#F97316",
|
|
19620
|
+
"#F59E0B",
|
|
19621
|
+
"#84CC16",
|
|
19622
|
+
"#22C55E",
|
|
19623
|
+
"#14B8A6",
|
|
19624
|
+
"#06B6D4",
|
|
19625
|
+
"#3B82F6",
|
|
19626
|
+
"#8B5CF6",
|
|
19627
|
+
"#EC4899",
|
|
19628
|
+
"#F43F5E",
|
|
19629
|
+
"#D97706",
|
|
19630
|
+
"#0EA5E9"
|
|
19631
|
+
];
|
|
19632
|
+
var ColorPickerBase = React32__namespace.forwardRef(
|
|
19633
|
+
({
|
|
19634
|
+
value = "#3B82F6",
|
|
19635
|
+
onChange,
|
|
19636
|
+
opacity = 1,
|
|
19637
|
+
onOpacityChange,
|
|
19638
|
+
swatches = DEFAULT_SWATCHES,
|
|
19639
|
+
label,
|
|
19640
|
+
error,
|
|
19641
|
+
disabled = false,
|
|
19642
|
+
className,
|
|
19643
|
+
"data-testid": dataTestId = "color-picker-base"
|
|
19644
|
+
}, ref) => {
|
|
19645
|
+
const [hexInput, setHexInput] = React32__namespace.useState(value.toUpperCase());
|
|
19646
|
+
React32__namespace.useEffect(() => {
|
|
19647
|
+
setHexInput(value.toUpperCase());
|
|
19648
|
+
}, [value]);
|
|
19649
|
+
const rgb = hexToRgb(value) ?? { r: 59, g: 130, b: 246 };
|
|
19650
|
+
const rgbString = `rgb(${rgb.r}, ${rgb.g}, ${rgb.b})`;
|
|
19651
|
+
const opacityPercent = Math.round(opacity * 100);
|
|
19652
|
+
const handleNativeChange = (e) => {
|
|
19653
|
+
onChange?.(e.target.value.toUpperCase());
|
|
19654
|
+
};
|
|
19655
|
+
const handleHexInput = (e) => {
|
|
19656
|
+
const raw = e.target.value;
|
|
19657
|
+
setHexInput(raw.toUpperCase());
|
|
19658
|
+
const withHash = raw.startsWith("#") ? raw : `#${raw}`;
|
|
19659
|
+
if (isValidHex(withHash)) onChange?.(withHash.toUpperCase());
|
|
19660
|
+
};
|
|
19661
|
+
const handleHexBlur = () => {
|
|
19662
|
+
const withHash = hexInput.startsWith("#") ? hexInput : `#${hexInput}`;
|
|
19663
|
+
if (!isValidHex(withHash)) setHexInput(value.toUpperCase());
|
|
19664
|
+
};
|
|
19665
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
19666
|
+
"div",
|
|
19667
|
+
{
|
|
19668
|
+
ref,
|
|
19669
|
+
className: cn("flex flex-col w-full min-w-[150px]", className),
|
|
19670
|
+
"data-testid": dataTestId,
|
|
19671
|
+
children: [
|
|
19672
|
+
label && /* @__PURE__ */ jsxRuntime.jsx(LabelBase_default, { className: "mb-1", children: label }),
|
|
19673
|
+
/* @__PURE__ */ jsxRuntime.jsxs(PopoverBase, { children: [
|
|
19674
|
+
/* @__PURE__ */ jsxRuntime.jsx(PopoverTriggerBase, { asChild: true, disabled, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
19675
|
+
ButtonBase,
|
|
19676
|
+
{
|
|
19677
|
+
variant: "outline",
|
|
19678
|
+
size: "select",
|
|
19679
|
+
disabled,
|
|
19680
|
+
"data-testid": `${dataTestId}-trigger`,
|
|
19681
|
+
className: cn(
|
|
19682
|
+
"w-full justify-start font-normal",
|
|
19683
|
+
error && "border-destructive"
|
|
19684
|
+
),
|
|
19685
|
+
children: [
|
|
19686
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
19687
|
+
"span",
|
|
19688
|
+
{
|
|
19689
|
+
className: "inline-block size-4 rounded-sm border border-border shrink-0",
|
|
19690
|
+
style: {
|
|
19691
|
+
backgroundColor: `rgba(${rgb.r}, ${rgb.g}, ${rgb.b}, ${opacity})`
|
|
19692
|
+
}
|
|
19693
|
+
}
|
|
19694
|
+
),
|
|
19695
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-mono text-xs tracking-wide", children: value.toUpperCase() }),
|
|
19696
|
+
onOpacityChange && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "ml-auto text-muted-foreground text-xs", children: [
|
|
19697
|
+
opacityPercent,
|
|
19698
|
+
"%"
|
|
19699
|
+
] })
|
|
19700
|
+
]
|
|
19701
|
+
}
|
|
19702
|
+
) }),
|
|
19703
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
19704
|
+
PopoverContentBase,
|
|
19705
|
+
{
|
|
19706
|
+
className: "w-64 p-3 flex flex-col gap-3",
|
|
19707
|
+
align: "start",
|
|
19708
|
+
children: [
|
|
19709
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-8 gap-1", children: swatches.map((swatch) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
19710
|
+
"button",
|
|
19711
|
+
{
|
|
19712
|
+
type: "button",
|
|
19713
|
+
title: swatch,
|
|
19714
|
+
"data-testid": `${dataTestId}-swatch`,
|
|
19715
|
+
onClick: () => onChange?.(swatch),
|
|
19716
|
+
className: cn(
|
|
19717
|
+
"size-6 rounded-md border transition hover:scale-110 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
19718
|
+
value.toUpperCase() === swatch.toUpperCase() ? "border-ring ring-2 ring-ring/50 scale-110" : "border-border"
|
|
19719
|
+
),
|
|
19720
|
+
style: { backgroundColor: swatch }
|
|
19721
|
+
},
|
|
19722
|
+
swatch
|
|
19723
|
+
)) }),
|
|
19724
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
19725
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative size-9 shrink-0 rounded-md border border-border overflow-hidden cursor-pointer", children: [
|
|
19726
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
19727
|
+
"input",
|
|
19728
|
+
{
|
|
19729
|
+
type: "color",
|
|
19730
|
+
value,
|
|
19731
|
+
onChange: handleNativeChange,
|
|
19732
|
+
"data-testid": `${dataTestId}-native`,
|
|
19733
|
+
className: "absolute inset-0 w-full h-full opacity-0 cursor-pointer"
|
|
19734
|
+
}
|
|
19735
|
+
),
|
|
19736
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
19737
|
+
"span",
|
|
19738
|
+
{
|
|
19739
|
+
className: "absolute inset-0 rounded-md pointer-events-none",
|
|
19740
|
+
style: { backgroundColor: rgbString }
|
|
19741
|
+
}
|
|
19742
|
+
)
|
|
19743
|
+
] }),
|
|
19744
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1 flex-1 rounded-md border border-input bg-background h-9 px-2", children: [
|
|
19745
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground text-xs font-mono", children: "#" }),
|
|
19746
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
19747
|
+
"input",
|
|
19748
|
+
{
|
|
19749
|
+
type: "text",
|
|
19750
|
+
maxLength: 6,
|
|
19751
|
+
value: hexInput.startsWith("#") ? hexInput.slice(1) : hexInput,
|
|
19752
|
+
onChange: handleHexInput,
|
|
19753
|
+
onBlur: handleHexBlur,
|
|
19754
|
+
"data-testid": `${dataTestId}-hex-input`,
|
|
19755
|
+
className: "flex-1 bg-transparent text-xs font-mono text-foreground focus:outline-none uppercase tracking-widest placeholder:text-muted-foreground",
|
|
19756
|
+
placeholder: "RRGGBB"
|
|
19757
|
+
}
|
|
19758
|
+
)
|
|
19759
|
+
] })
|
|
19760
|
+
] }),
|
|
19761
|
+
onOpacityChange && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
19762
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
19763
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-muted-foreground", children: "Opacidade" }),
|
|
19764
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-xs font-mono text-foreground", children: [
|
|
19765
|
+
opacityPercent,
|
|
19766
|
+
"%"
|
|
19767
|
+
] })
|
|
19768
|
+
] }),
|
|
19769
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
|
|
19770
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
19771
|
+
"div",
|
|
19772
|
+
{
|
|
19773
|
+
className: "absolute inset-y-0 left-0 right-0 my-auto h-1.5 rounded-full pointer-events-none",
|
|
19774
|
+
style: {
|
|
19775
|
+
backgroundImage: "repeating-conic-gradient(#ccc 0% 25%, #fff 0% 50%)",
|
|
19776
|
+
backgroundSize: "8px 8px"
|
|
19777
|
+
}
|
|
19778
|
+
}
|
|
19779
|
+
),
|
|
19780
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
19781
|
+
"div",
|
|
19782
|
+
{
|
|
19783
|
+
className: "absolute inset-y-0 left-0 right-0 my-auto h-1.5 rounded-full pointer-events-none",
|
|
19784
|
+
style: {
|
|
19785
|
+
background: `linear-gradient(to right, transparent, ${rgbString})`
|
|
19786
|
+
}
|
|
19787
|
+
}
|
|
19788
|
+
),
|
|
19789
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
19790
|
+
SlideBase,
|
|
19791
|
+
{
|
|
19792
|
+
min: 0,
|
|
19793
|
+
max: 100,
|
|
19794
|
+
step: 1,
|
|
19795
|
+
value: [opacityPercent],
|
|
19796
|
+
onValueChange: ([val]) => onOpacityChange(val / 100),
|
|
19797
|
+
"data-testid": `${dataTestId}-opacity`,
|
|
19798
|
+
className: "relative"
|
|
19799
|
+
}
|
|
19800
|
+
)
|
|
19801
|
+
] })
|
|
19802
|
+
] })
|
|
19803
|
+
]
|
|
19804
|
+
}
|
|
19805
|
+
)
|
|
19806
|
+
] }),
|
|
19807
|
+
/* @__PURE__ */ jsxRuntime.jsx(ErrorMessage, { error })
|
|
19808
|
+
]
|
|
19809
|
+
}
|
|
19810
|
+
);
|
|
19811
|
+
}
|
|
19812
|
+
);
|
|
19813
|
+
ColorPickerBase.displayName = "ColorPickerBase";
|
|
19814
|
+
var TagChip = ({
|
|
19815
|
+
label,
|
|
19816
|
+
onRemove,
|
|
19817
|
+
disabled,
|
|
19818
|
+
testid
|
|
19819
|
+
}) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
19820
|
+
"span",
|
|
19821
|
+
{
|
|
19822
|
+
className: cn(
|
|
19823
|
+
"inline-flex items-center gap-1 rounded-md px-2 py-0.5 text-xs font-medium",
|
|
19824
|
+
"bg-primary/10 text-primary border border-primary/20",
|
|
19825
|
+
"transition-colors"
|
|
19826
|
+
),
|
|
19827
|
+
"data-testid": testid,
|
|
19828
|
+
children: [
|
|
19829
|
+
label,
|
|
19830
|
+
!disabled && /* @__PURE__ */ jsxRuntime.jsx(
|
|
19831
|
+
"button",
|
|
19832
|
+
{
|
|
19833
|
+
type: "button",
|
|
19834
|
+
onClick: onRemove,
|
|
19835
|
+
"data-testid": `${testid}-remove`,
|
|
19836
|
+
"aria-label": `Remover ${label}`,
|
|
19837
|
+
className: cn(
|
|
19838
|
+
"inline-flex items-center justify-center rounded-full size-3.5",
|
|
19839
|
+
"hover:bg-primary/20 text-primary/70 hover:text-primary",
|
|
19840
|
+
"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-primary",
|
|
19841
|
+
"transition-colors"
|
|
19842
|
+
),
|
|
19843
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(react.XIcon, { weight: "bold", className: "size-2.5" })
|
|
19844
|
+
}
|
|
19845
|
+
)
|
|
19846
|
+
]
|
|
19847
|
+
}
|
|
19848
|
+
);
|
|
19849
|
+
var TagInput = React32__namespace.forwardRef(
|
|
19850
|
+
({
|
|
19851
|
+
tags = [],
|
|
19852
|
+
onTagsChange,
|
|
19853
|
+
maxTags,
|
|
19854
|
+
allowDuplicates = false,
|
|
19855
|
+
separators = [","],
|
|
19856
|
+
label,
|
|
19857
|
+
error,
|
|
19858
|
+
disabled = false,
|
|
19859
|
+
placeholder = "Digite e pressione Enter...",
|
|
19860
|
+
className,
|
|
19861
|
+
"data-testid": dataTestId = "tag-input",
|
|
19862
|
+
onKeyDown,
|
|
19863
|
+
onBlur,
|
|
19864
|
+
...props
|
|
19865
|
+
}, ref) => {
|
|
19866
|
+
const [inputValue, setInputValue] = React32__namespace.useState("");
|
|
19867
|
+
const isMaxReached = maxTags !== void 0 && tags.length >= maxTags;
|
|
19868
|
+
const addTag = (raw) => {
|
|
19869
|
+
const trimmed = raw.trim();
|
|
19870
|
+
if (!trimmed) return;
|
|
19871
|
+
if (!allowDuplicates && tags.includes(trimmed)) {
|
|
19872
|
+
setInputValue("");
|
|
19873
|
+
return;
|
|
19874
|
+
}
|
|
19875
|
+
if (isMaxReached) return;
|
|
19876
|
+
onTagsChange?.([...tags, trimmed]);
|
|
19877
|
+
setInputValue("");
|
|
19878
|
+
};
|
|
19879
|
+
const removeTag = (index) => {
|
|
19880
|
+
onTagsChange?.(tags.filter((_, i) => i !== index));
|
|
19881
|
+
};
|
|
19882
|
+
const handleKeyDown = (e) => {
|
|
19883
|
+
onKeyDown?.(e);
|
|
19884
|
+
if (e.key === "Enter") {
|
|
19885
|
+
e.preventDefault();
|
|
19886
|
+
addTag(inputValue);
|
|
19887
|
+
return;
|
|
19888
|
+
}
|
|
19889
|
+
if (e.key === "Backspace" && inputValue === "" && tags.length > 0) {
|
|
19890
|
+
removeTag(tags.length - 1);
|
|
19891
|
+
return;
|
|
19892
|
+
}
|
|
19893
|
+
if (separators.includes(e.key)) {
|
|
19894
|
+
e.preventDefault();
|
|
19895
|
+
addTag(inputValue);
|
|
19896
|
+
}
|
|
19897
|
+
};
|
|
19898
|
+
const handleBlur = (e) => {
|
|
19899
|
+
onBlur?.(e);
|
|
19900
|
+
if (inputValue.trim()) {
|
|
19901
|
+
addTag(inputValue);
|
|
19902
|
+
}
|
|
19903
|
+
};
|
|
19904
|
+
const handleChange = (e) => {
|
|
19905
|
+
const val = e.target.value;
|
|
19906
|
+
const hasSeparator = separators.some((sep) => val.includes(sep));
|
|
19907
|
+
if (hasSeparator) {
|
|
19908
|
+
const parts = val.split(new RegExp(`[${separators.join("")}]`));
|
|
19909
|
+
parts.slice(0, -1).forEach((part) => addTag(part));
|
|
19910
|
+
setInputValue(parts[parts.length - 1]);
|
|
19911
|
+
} else {
|
|
19912
|
+
setInputValue(val);
|
|
19913
|
+
}
|
|
19914
|
+
};
|
|
19915
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
19916
|
+
"div",
|
|
19917
|
+
{
|
|
19918
|
+
className: cn("flex flex-col w-full min-w-[150px]"),
|
|
19919
|
+
"data-testid": dataTestId,
|
|
19920
|
+
children: [
|
|
19921
|
+
label && /* @__PURE__ */ jsxRuntime.jsx(LabelBase_default, { className: "mb-1", children: label }),
|
|
19922
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
19923
|
+
"div",
|
|
19924
|
+
{
|
|
19925
|
+
className: cn(
|
|
19926
|
+
"flex flex-wrap items-center gap-1.5 min-h-9 rounded-md border bg-background px-2 py-1.5 transition",
|
|
19927
|
+
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",
|
|
19928
|
+
disabled && "opacity-50 pointer-events-none",
|
|
19929
|
+
className
|
|
19930
|
+
),
|
|
19931
|
+
children: [
|
|
19932
|
+
tags.map((tag, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
19933
|
+
TagChip,
|
|
19934
|
+
{
|
|
19935
|
+
label: tag,
|
|
19936
|
+
disabled,
|
|
19937
|
+
onRemove: () => removeTag(i),
|
|
19938
|
+
testid: `${dataTestId}-tag-${i}`
|
|
19939
|
+
},
|
|
19940
|
+
`${tag}-${i}`
|
|
19941
|
+
)),
|
|
19942
|
+
!isMaxReached && /* @__PURE__ */ jsxRuntime.jsx(
|
|
19943
|
+
"input",
|
|
19944
|
+
{
|
|
19945
|
+
ref,
|
|
19946
|
+
type: "text",
|
|
19947
|
+
value: inputValue,
|
|
19948
|
+
onChange: handleChange,
|
|
19949
|
+
onKeyDown: handleKeyDown,
|
|
19950
|
+
onBlur: handleBlur,
|
|
19951
|
+
disabled,
|
|
19952
|
+
placeholder: tags.length === 0 ? placeholder : "",
|
|
19953
|
+
"data-testid": `${dataTestId}-input`,
|
|
19954
|
+
className: cn(
|
|
19955
|
+
"flex-1 min-w-[120px] bg-transparent text-sm text-foreground",
|
|
19956
|
+
"placeholder:text-muted-foreground focus:outline-none",
|
|
19957
|
+
"disabled:cursor-not-allowed"
|
|
19958
|
+
),
|
|
19959
|
+
...props
|
|
19960
|
+
}
|
|
19961
|
+
),
|
|
19962
|
+
isMaxReached && tags.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-xs text-muted-foreground ml-1", children: [
|
|
19963
|
+
"M\xE1x. ",
|
|
19964
|
+
maxTags,
|
|
19965
|
+
" tags"
|
|
19966
|
+
] })
|
|
19967
|
+
]
|
|
19968
|
+
}
|
|
19969
|
+
),
|
|
19970
|
+
/* @__PURE__ */ jsxRuntime.jsx(ErrorMessage, { error })
|
|
19971
|
+
]
|
|
19972
|
+
}
|
|
19973
|
+
);
|
|
19974
|
+
}
|
|
19975
|
+
);
|
|
19976
|
+
TagInput.displayName = "TagInput";
|
|
19753
19977
|
function Leaderboard({
|
|
19754
19978
|
items,
|
|
19755
19979
|
order: initialOrder = "desc",
|
|
@@ -21178,7 +21402,6 @@ exports.InputOTPBase = InputOTPBase;
|
|
|
21178
21402
|
exports.InputOTPGroupBase = InputOTPGroupBase;
|
|
21179
21403
|
exports.InputOTPSeparatorBase = InputOTPSeparatorBase;
|
|
21180
21404
|
exports.InputOTPSlotBase = InputOTPSlotBase;
|
|
21181
|
-
exports.IntegrationTooltip = IntegrationTooltip_default;
|
|
21182
21405
|
exports.LabelBase = LabelBase_default;
|
|
21183
21406
|
exports.Leaderboard = Leaderboard;
|
|
21184
21407
|
exports.LikeButton = LikeButton;
|
|
@@ -21384,7 +21607,6 @@ exports.isValidHour = isValidHour;
|
|
|
21384
21607
|
exports.isValidMinuteOrSecond = isValidMinuteOrSecond;
|
|
21385
21608
|
exports.niceCeil = niceCeil;
|
|
21386
21609
|
exports.normalizeAttendDate = normalizeAttendDate;
|
|
21387
|
-
exports.processIntegrationData = processIntegrationData;
|
|
21388
21610
|
exports.processNeo4jData = processNeo4jData;
|
|
21389
21611
|
exports.renderInsideBarLabel = renderInsideBarLabel;
|
|
21390
21612
|
exports.renderPillLabel = pillLabelRenderer_default;
|
|
@@ -21397,6 +21619,7 @@ exports.setMinutes = setMinutes;
|
|
|
21397
21619
|
exports.setSeconds = setSeconds;
|
|
21398
21620
|
exports.sortEvents = sortEvents;
|
|
21399
21621
|
exports.sortEventsAgenda = sortEventsAgenda;
|
|
21622
|
+
exports.startOfLocalDay = startOfLocalDay;
|
|
21400
21623
|
exports.toast = toast;
|
|
21401
21624
|
exports.useBiaxial = useBiaxial;
|
|
21402
21625
|
exports.useCalendarDnd = useCalendarDnd;
|