@mlw-packages/react-components 1.7.9 → 1.7.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 +52 -49
- package/dist/index.d.mts +4 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +548 -454
- package/dist/index.mjs +479 -385
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1864,8 +1864,22 @@ function Select({
|
|
|
1864
1864
|
}
|
|
1865
1865
|
|
|
1866
1866
|
// src/components/selects/AvatarSelect.tsx
|
|
1867
|
-
import { useId } from "react";
|
|
1867
|
+
import { useId, useState as useState4 } from "react";
|
|
1868
|
+
import { CaretDownIcon as CaretDownIcon3, CheckIcon as CheckIcon5 } from "@phosphor-icons/react";
|
|
1868
1869
|
import { Fragment as Fragment4, jsx as jsx19, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1870
|
+
var DEFAULT_COLORS = [
|
|
1871
|
+
"bg-purple-100 text-purple-700",
|
|
1872
|
+
"bg-green-100 text-green-700",
|
|
1873
|
+
"bg-blue-100 text-blue-700"
|
|
1874
|
+
];
|
|
1875
|
+
var getColor = (value, colors2 = DEFAULT_COLORS) => {
|
|
1876
|
+
let hash = 0;
|
|
1877
|
+
for (let i = 0; i < value.length; i++) {
|
|
1878
|
+
hash = value.charCodeAt(i) + ((hash << 5) - hash);
|
|
1879
|
+
}
|
|
1880
|
+
const index = Math.abs(hash) % colors2.length;
|
|
1881
|
+
return colors2[index];
|
|
1882
|
+
};
|
|
1869
1883
|
var Square = ({
|
|
1870
1884
|
className,
|
|
1871
1885
|
children
|
|
@@ -1892,13 +1906,18 @@ function AvatarSelect({
|
|
|
1892
1906
|
selected,
|
|
1893
1907
|
label,
|
|
1894
1908
|
labelClassname,
|
|
1895
|
-
className
|
|
1909
|
+
className,
|
|
1910
|
+
colors: colors2
|
|
1896
1911
|
}) {
|
|
1912
|
+
const [open, setOpen] = useState4(false);
|
|
1897
1913
|
const id = useId();
|
|
1914
|
+
const allItems = items || (groupItems ? Object.values(groupItems).flat() : []);
|
|
1915
|
+
const selectedItem = allItems.find((item) => item.value === selected);
|
|
1898
1916
|
const renderItem = (item) => {
|
|
1899
1917
|
const avatarContent = item.avatar ?? item.label.charAt(0).toUpperCase();
|
|
1918
|
+
const colorClass = item.avatarClassName ?? getColor(item.value, colors2);
|
|
1900
1919
|
return /* @__PURE__ */ jsxs14(Fragment4, { children: [
|
|
1901
|
-
/* @__PURE__ */ jsx19(Square, { className:
|
|
1920
|
+
/* @__PURE__ */ jsx19(Square, { className: colorClass, children: avatarContent }),
|
|
1902
1921
|
/* @__PURE__ */ jsx19("span", { className: "truncate", children: item.label })
|
|
1903
1922
|
] });
|
|
1904
1923
|
};
|
|
@@ -1911,96 +1930,96 @@ function AvatarSelect({
|
|
|
1911
1930
|
children: label
|
|
1912
1931
|
}
|
|
1913
1932
|
) : null,
|
|
1914
|
-
/* @__PURE__ */ jsxs14(
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
" [&>span]:flex [&>span]:items-center [&>span]:gap-2 [&>span_[data-square]]:shrink-0",
|
|
1927
|
-
error && "border-red-500",
|
|
1928
|
-
className
|
|
1929
|
-
),
|
|
1930
|
-
"data-testid": testIds.trigger ?? "avatar-select-trigger",
|
|
1931
|
-
disabled,
|
|
1932
|
-
children: /* @__PURE__ */ jsx19(
|
|
1933
|
-
SelectValueBase,
|
|
1934
|
-
{
|
|
1935
|
-
placeholder,
|
|
1936
|
-
"data-testid": testIds.value ?? "avatar-select-value"
|
|
1937
|
-
}
|
|
1938
|
-
)
|
|
1939
|
-
}
|
|
1933
|
+
/* @__PURE__ */ jsxs14(PopoverBase, { open, onOpenChange: setOpen, children: [
|
|
1934
|
+
/* @__PURE__ */ jsx19(PopoverTriggerBase, { asChild: true, children: /* @__PURE__ */ jsxs14(
|
|
1935
|
+
ButtonBase,
|
|
1936
|
+
{
|
|
1937
|
+
id,
|
|
1938
|
+
variant: "select",
|
|
1939
|
+
role: "combobox",
|
|
1940
|
+
"aria-expanded": open,
|
|
1941
|
+
className: cn(
|
|
1942
|
+
"w-full justify-between px-3 font-normal",
|
|
1943
|
+
error && "border-red-500",
|
|
1944
|
+
className
|
|
1940
1945
|
),
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1946
|
+
disabled,
|
|
1947
|
+
"data-testid": testIds.trigger ?? "avatar-select-trigger",
|
|
1948
|
+
children: [
|
|
1949
|
+
selectedItem ? /* @__PURE__ */ jsx19("span", { className: "flex items-center gap-2 truncate", children: renderItem(selectedItem) }) : /* @__PURE__ */ jsx19("span", { className: "text-muted-foreground", children: placeholder }),
|
|
1950
|
+
/* @__PURE__ */ jsx19(CaretDownIcon3, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })
|
|
1951
|
+
]
|
|
1952
|
+
}
|
|
1953
|
+
) }),
|
|
1954
|
+
/* @__PURE__ */ jsx19(
|
|
1955
|
+
PopoverContentBase,
|
|
1956
|
+
{
|
|
1957
|
+
className: "w-[--radix-popover-trigger-width] p-0",
|
|
1958
|
+
align: "start",
|
|
1959
|
+
"data-testid": testIds.content ?? "avatar-select-content",
|
|
1960
|
+
children: /* @__PURE__ */ jsxs14(CommandBase, { children: [
|
|
1961
|
+
/* @__PURE__ */ jsx19(CommandInputBase, { placeholder: "Search..." }),
|
|
1962
|
+
/* @__PURE__ */ jsxs14(CommandListBase, { children: [
|
|
1963
|
+
/* @__PURE__ */ jsx19(CommandEmptyBase, { children: "No results found." }),
|
|
1964
|
+
groupItems ? Object.keys(groupItems).map((key) => /* @__PURE__ */ jsx19(CommandGroupBase, { heading: key, children: groupItems[key].map((item) => /* @__PURE__ */ jsxs14(
|
|
1965
|
+
CommandItemBase,
|
|
1947
1966
|
{
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
)
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
"
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
)
|
|
1992
|
-
}
|
|
1993
|
-
)
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
),
|
|
1967
|
+
value: item.label,
|
|
1968
|
+
onSelect: () => {
|
|
1969
|
+
onChange(item.value);
|
|
1970
|
+
setOpen(false);
|
|
1971
|
+
},
|
|
1972
|
+
"data-testid": testIds.item?.(String(item.value)) ?? `avatar-select-item-${item.value}`,
|
|
1973
|
+
children: [
|
|
1974
|
+
renderItem(item),
|
|
1975
|
+
/* @__PURE__ */ jsx19(
|
|
1976
|
+
CheckIcon5,
|
|
1977
|
+
{
|
|
1978
|
+
className: cn(
|
|
1979
|
+
"ml-auto h-4 w-4",
|
|
1980
|
+
selected === item.value ? "opacity-100" : "opacity-0"
|
|
1981
|
+
)
|
|
1982
|
+
}
|
|
1983
|
+
)
|
|
1984
|
+
]
|
|
1985
|
+
},
|
|
1986
|
+
item.value
|
|
1987
|
+
)) }, key)) : /* @__PURE__ */ jsx19(CommandGroupBase, { children: items.map((item) => /* @__PURE__ */ jsxs14(
|
|
1988
|
+
CommandItemBase,
|
|
1989
|
+
{
|
|
1990
|
+
value: item.label,
|
|
1991
|
+
onSelect: () => {
|
|
1992
|
+
onChange(item.value);
|
|
1993
|
+
setOpen(false);
|
|
1994
|
+
},
|
|
1995
|
+
"data-testid": testIds.item?.(String(item.value)) ?? `avatar-select-item-${item.value}`,
|
|
1996
|
+
children: [
|
|
1997
|
+
renderItem(item),
|
|
1998
|
+
/* @__PURE__ */ jsx19(
|
|
1999
|
+
CheckIcon5,
|
|
2000
|
+
{
|
|
2001
|
+
className: cn(
|
|
2002
|
+
"ml-auto h-4 w-4",
|
|
2003
|
+
selected === item.value ? "opacity-100" : "opacity-0"
|
|
2004
|
+
)
|
|
2005
|
+
}
|
|
2006
|
+
)
|
|
2007
|
+
]
|
|
2008
|
+
},
|
|
2009
|
+
item.value
|
|
2010
|
+
)) })
|
|
2011
|
+
] })
|
|
2012
|
+
] })
|
|
2013
|
+
}
|
|
2014
|
+
)
|
|
2015
|
+
] }),
|
|
1997
2016
|
/* @__PURE__ */ jsx19(ErrorMessage_default, { error })
|
|
1998
2017
|
] });
|
|
1999
2018
|
}
|
|
2000
2019
|
|
|
2001
2020
|
// src/components/charts/Chart.tsx
|
|
2002
2021
|
import {
|
|
2003
|
-
useState as
|
|
2022
|
+
useState as useState7,
|
|
2004
2023
|
useEffect as useEffect5,
|
|
2005
2024
|
useCallback as useCallback5,
|
|
2006
2025
|
useMemo as useMemo5,
|
|
@@ -2167,7 +2186,7 @@ var resolveChartMargins = (margins, chartMargins, showLabels) => {
|
|
|
2167
2186
|
import { toast } from "sonner";
|
|
2168
2187
|
|
|
2169
2188
|
// src/components/charts/components/controls/PeriodsDropdown.tsx
|
|
2170
|
-
import { useState as
|
|
2189
|
+
import { useState as useState5, useRef, useEffect as useEffect3 } from "react";
|
|
2171
2190
|
import { motion as motion6, AnimatePresence as AnimatePresence5 } from "framer-motion";
|
|
2172
2191
|
import { DotsThreeIcon } from "@phosphor-icons/react/dist/ssr";
|
|
2173
2192
|
import { Check } from "@phosphor-icons/react/dist/ssr";
|
|
@@ -2190,7 +2209,7 @@ function PeriodsDropdown({
|
|
|
2190
2209
|
activePeriods
|
|
2191
2210
|
}) {
|
|
2192
2211
|
const periods = processedData.map((d) => String(d.name));
|
|
2193
|
-
const [open, setOpen] =
|
|
2212
|
+
const [open, setOpen] = useState5(false);
|
|
2194
2213
|
const wrapperRef = useRef(null);
|
|
2195
2214
|
const firstItemRef = useRef(null);
|
|
2196
2215
|
const listRef = useRef(null);
|
|
@@ -2346,7 +2365,7 @@ var ShowOnly_default = ShowOnly;
|
|
|
2346
2365
|
|
|
2347
2366
|
// src/components/charts/components/controls/Highlights.tsx
|
|
2348
2367
|
import { motion as motion8, AnimatePresence as AnimatePresence6 } from "framer-motion";
|
|
2349
|
-
import { CheckIcon as
|
|
2368
|
+
import { CheckIcon as CheckIcon6 } from "@phosphor-icons/react/dist/ssr";
|
|
2350
2369
|
import { jsx as jsx22, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
2351
2370
|
var Highlights = ({
|
|
2352
2371
|
allKeys,
|
|
@@ -2455,7 +2474,7 @@ var Highlights = ({
|
|
|
2455
2474
|
isHighlighted ? "" : "opacity-0 pointer-events-none"
|
|
2456
2475
|
),
|
|
2457
2476
|
style: { width: 18, height: 18 },
|
|
2458
|
-
children: /* @__PURE__ */ jsx22(
|
|
2477
|
+
children: /* @__PURE__ */ jsx22(CheckIcon6, {})
|
|
2459
2478
|
}
|
|
2460
2479
|
)
|
|
2461
2480
|
]
|
|
@@ -2555,7 +2574,7 @@ var CloseAllButton_default = CloseAllButton;
|
|
|
2555
2574
|
import React12, {
|
|
2556
2575
|
useEffect as useEffect4,
|
|
2557
2576
|
useRef as useRef2,
|
|
2558
|
-
useState as
|
|
2577
|
+
useState as useState6,
|
|
2559
2578
|
useCallback as useCallback4,
|
|
2560
2579
|
useMemo as useMemo4
|
|
2561
2580
|
} from "react";
|
|
@@ -2666,12 +2685,12 @@ var DraggableTooltipComponent = ({
|
|
|
2666
2685
|
)
|
|
2667
2686
|
] });
|
|
2668
2687
|
});
|
|
2669
|
-
const [localPos, setLocalPos] =
|
|
2670
|
-
const [dragging, setDragging] =
|
|
2688
|
+
const [localPos, setLocalPos] = useState6(position);
|
|
2689
|
+
const [dragging, setDragging] = useState6(false);
|
|
2671
2690
|
const offsetRef = useRef2({ x: 0, y: 0 });
|
|
2672
2691
|
const lastMouse = useRef2({ x: 0, y: 0 });
|
|
2673
|
-
const [alignmentGuides, setAlignmentGuides] =
|
|
2674
|
-
const [globalTooltipCountLocal, setGlobalTooltipCountLocal] =
|
|
2692
|
+
const [alignmentGuides, setAlignmentGuides] = useState6([]);
|
|
2693
|
+
const [globalTooltipCountLocal, setGlobalTooltipCountLocal] = useState6(0);
|
|
2675
2694
|
useEffect4(() => setLocalPos(position), [position]);
|
|
2676
2695
|
const getAllTooltips = useCallback4(() => {
|
|
2677
2696
|
const response = [];
|
|
@@ -3520,14 +3539,14 @@ var pillLabelRenderer_default = renderPillLabel;
|
|
|
3520
3539
|
|
|
3521
3540
|
// src/components/charts/Chart.tsx
|
|
3522
3541
|
import { jsx as jsx28, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
3523
|
-
var
|
|
3542
|
+
var DEFAULT_COLORS2 = ["#55af7d", "#8e68ff", "#2273e1"];
|
|
3524
3543
|
var Chart = ({
|
|
3525
3544
|
data,
|
|
3526
3545
|
series,
|
|
3527
3546
|
className,
|
|
3528
3547
|
height = 350,
|
|
3529
3548
|
width = "100%",
|
|
3530
|
-
colors: colors2 =
|
|
3549
|
+
colors: colors2 = DEFAULT_COLORS2,
|
|
3531
3550
|
gridColor,
|
|
3532
3551
|
showGrid = true,
|
|
3533
3552
|
showTooltip = true,
|
|
@@ -3574,11 +3593,11 @@ var Chart = ({
|
|
|
3574
3593
|
return { xAxisConfig: xAxisConfig2, mapperConfig: mapperConfig2 };
|
|
3575
3594
|
}, [data, xAxis, labelMap]);
|
|
3576
3595
|
const { xAxisConfig, mapperConfig } = smartConfig;
|
|
3577
|
-
const [activeTooltips, setActiveTooltips] =
|
|
3578
|
-
const [highlightedSeries, setHighlightedSeries] =
|
|
3596
|
+
const [activeTooltips, setActiveTooltips] = useState7([]);
|
|
3597
|
+
const [highlightedSeries, setHighlightedSeries] = useState7(
|
|
3579
3598
|
/* @__PURE__ */ new Set()
|
|
3580
3599
|
);
|
|
3581
|
-
const [showOnlyHighlighted, setShowOnlyHighlighted] =
|
|
3600
|
+
const [showOnlyHighlighted, setShowOnlyHighlighted] = useState7(false);
|
|
3582
3601
|
useEffect5(() => {
|
|
3583
3602
|
if (highlightedSeries.size === 0 && showOnlyHighlighted) {
|
|
3584
3603
|
setShowOnlyHighlighted(false);
|
|
@@ -3589,7 +3608,7 @@ var Chart = ({
|
|
|
3589
3608
|
name: String(item[xAxisConfig.dataKey] || "N/A")
|
|
3590
3609
|
}));
|
|
3591
3610
|
const wrapperRef = useRef3(null);
|
|
3592
|
-
const [measuredWidth, setMeasuredWidth] =
|
|
3611
|
+
const [measuredWidth, setMeasuredWidth] = useState7(null);
|
|
3593
3612
|
useLayoutEffect(() => {
|
|
3594
3613
|
const el = wrapperRef.current;
|
|
3595
3614
|
if (!el) return;
|
|
@@ -4317,7 +4336,7 @@ var Chart = ({
|
|
|
4317
4336
|
var Chart_default = Chart;
|
|
4318
4337
|
|
|
4319
4338
|
// src/components/charts/BarChart.tsx
|
|
4320
|
-
import { useState as
|
|
4339
|
+
import { useState as useState8, useEffect as useEffect6, useCallback as useCallback6, useMemo as useMemo6 } from "react";
|
|
4321
4340
|
import {
|
|
4322
4341
|
BarChart as RechartsBarChart,
|
|
4323
4342
|
Bar as Bar2,
|
|
@@ -4330,13 +4349,13 @@ import {
|
|
|
4330
4349
|
LabelList as LabelList2
|
|
4331
4350
|
} from "recharts";
|
|
4332
4351
|
import { jsx as jsx29, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
4333
|
-
var
|
|
4352
|
+
var DEFAULT_COLORS3 = ["#55af7d", "#8e68ff", "#2273e1"];
|
|
4334
4353
|
var BarChart = ({
|
|
4335
4354
|
data,
|
|
4336
4355
|
className,
|
|
4337
4356
|
height = 350,
|
|
4338
4357
|
width = 900,
|
|
4339
|
-
colors: colors2 =
|
|
4358
|
+
colors: colors2 = DEFAULT_COLORS3,
|
|
4340
4359
|
gridColor,
|
|
4341
4360
|
showGrid = true,
|
|
4342
4361
|
showTooltip = true,
|
|
@@ -4409,14 +4428,14 @@ var BarChart = ({
|
|
|
4409
4428
|
return { xAxisConfig: xAxisConfig2, mapperConfig: mapperConfig2 };
|
|
4410
4429
|
}, [data, xAxis, mapper, yAxis, autoDetect, labelMap]);
|
|
4411
4430
|
const { xAxisConfig, mapperConfig } = smartConfig;
|
|
4412
|
-
const [activeTooltips, setActiveTooltips] =
|
|
4413
|
-
const [isDragging, setIsDragging] =
|
|
4414
|
-
const [dragOffset, setDragOffset] =
|
|
4431
|
+
const [activeTooltips, setActiveTooltips] = useState8([]);
|
|
4432
|
+
const [isDragging, setIsDragging] = useState8(null);
|
|
4433
|
+
const [dragOffset, setDragOffset] = useState8({
|
|
4415
4434
|
x: 0,
|
|
4416
4435
|
y: 0
|
|
4417
4436
|
});
|
|
4418
|
-
const [globalTooltipCount, setGlobalTooltipCount] =
|
|
4419
|
-
const [alignmentGuides, setAlignmentGuides] =
|
|
4437
|
+
const [globalTooltipCount, setGlobalTooltipCount] = useState8(0);
|
|
4438
|
+
const [alignmentGuides, setAlignmentGuides] = useState8([]);
|
|
4420
4439
|
const processedData = data.map((item) => ({
|
|
4421
4440
|
...item,
|
|
4422
4441
|
name: String(item[xAxisConfig.dataKey] || "N/A")
|
|
@@ -4992,7 +5011,7 @@ var BarChart = ({
|
|
|
4992
5011
|
var BarChart_default = BarChart;
|
|
4993
5012
|
|
|
4994
5013
|
// src/components/charts/LineChart.tsx
|
|
4995
|
-
import { useState as
|
|
5014
|
+
import { useState as useState9, useEffect as useEffect7, useCallback as useCallback7, useMemo as useMemo7 } from "react";
|
|
4996
5015
|
import {
|
|
4997
5016
|
LineChart as RechartsLineChart,
|
|
4998
5017
|
Line as Line2,
|
|
@@ -5009,13 +5028,13 @@ var defaultData = [
|
|
|
5009
5028
|
{ name: "B", value: 200 },
|
|
5010
5029
|
{ name: "C", value: 150 }
|
|
5011
5030
|
];
|
|
5012
|
-
var
|
|
5031
|
+
var DEFAULT_COLORS4 = ["#55af7d", "#8e68ff", "#2273e1"];
|
|
5013
5032
|
var CustomLineChart = ({
|
|
5014
5033
|
data = defaultData,
|
|
5015
5034
|
className,
|
|
5016
5035
|
height = 300,
|
|
5017
5036
|
width = "100%",
|
|
5018
|
-
colors: colors2 =
|
|
5037
|
+
colors: colors2 = DEFAULT_COLORS4,
|
|
5019
5038
|
gridColor,
|
|
5020
5039
|
showGrid = true,
|
|
5021
5040
|
showTooltip = true,
|
|
@@ -5035,14 +5054,14 @@ var CustomLineChart = ({
|
|
|
5035
5054
|
containerPaddingLeft,
|
|
5036
5055
|
16
|
|
5037
5056
|
);
|
|
5038
|
-
const [activeTooltips, setActiveTooltips] =
|
|
5039
|
-
const [isDragging, setIsDragging] =
|
|
5040
|
-
const [dragOffset, setDragOffset] =
|
|
5057
|
+
const [activeTooltips, setActiveTooltips] = useState9([]);
|
|
5058
|
+
const [isDragging, setIsDragging] = useState9(null);
|
|
5059
|
+
const [dragOffset, setDragOffset] = useState9({
|
|
5041
5060
|
x: 0,
|
|
5042
5061
|
y: 0
|
|
5043
5062
|
});
|
|
5044
|
-
const [globalTooltipCount, setGlobalTooltipCount] =
|
|
5045
|
-
const [alignmentGuides, setAlignmentGuides] =
|
|
5063
|
+
const [globalTooltipCount, setGlobalTooltipCount] = useState9(0);
|
|
5064
|
+
const [alignmentGuides, setAlignmentGuides] = useState9([]);
|
|
5046
5065
|
const generateColors = (dataKeys2) => {
|
|
5047
5066
|
const colorMap = {};
|
|
5048
5067
|
const allColors = generateAdditionalColors(colors2, dataKeys2.length);
|
|
@@ -5588,7 +5607,7 @@ var defaultData2 = [
|
|
|
5588
5607
|
{ name: "Suporte", value: 1e3 },
|
|
5589
5608
|
{ name: "Outros", value: 800 }
|
|
5590
5609
|
];
|
|
5591
|
-
var
|
|
5610
|
+
var DEFAULT_COLORS5 = [
|
|
5592
5611
|
"#55af7d",
|
|
5593
5612
|
// verde do projeto
|
|
5594
5613
|
"#8e68ff",
|
|
@@ -5646,7 +5665,7 @@ var CustomPieChart = ({
|
|
|
5646
5665
|
centerX = "50%",
|
|
5647
5666
|
centerY = "50%"
|
|
5648
5667
|
}) => {
|
|
5649
|
-
const finalColors = colors2 ||
|
|
5668
|
+
const finalColors = colors2 || DEFAULT_COLORS5;
|
|
5650
5669
|
return /* @__PURE__ */ jsx31("div", { className: cn("w-full rounded-lg bg-card p-4", className), children: /* @__PURE__ */ jsx31(ResponsiveContainer2, { width, height, children: /* @__PURE__ */ jsxs26(RechartsPieChart, { children: [
|
|
5651
5670
|
/* @__PURE__ */ jsx31(
|
|
5652
5671
|
Pie,
|
|
@@ -5686,12 +5705,12 @@ var CustomPieChart = ({
|
|
|
5686
5705
|
var PieChart_default = CustomPieChart;
|
|
5687
5706
|
|
|
5688
5707
|
// src/components/charts/hooks/useChartHighlights.tsx
|
|
5689
|
-
import { useState as
|
|
5708
|
+
import { useState as useState10, useCallback as useCallback8 } from "react";
|
|
5690
5709
|
var useChartHighlights = () => {
|
|
5691
|
-
const [highlightedSeries, setHighlightedSeries] =
|
|
5710
|
+
const [highlightedSeries, setHighlightedSeries] = useState10(
|
|
5692
5711
|
/* @__PURE__ */ new Set()
|
|
5693
5712
|
);
|
|
5694
|
-
const [showOnlyHighlighted, setShowOnlyHighlighted] =
|
|
5713
|
+
const [showOnlyHighlighted, setShowOnlyHighlighted] = useState10(false);
|
|
5695
5714
|
const toggleHighlight = useCallback8((key) => {
|
|
5696
5715
|
setHighlightedSeries((prev) => {
|
|
5697
5716
|
const next = new Set(prev);
|
|
@@ -5977,7 +5996,7 @@ import * as React18 from "react";
|
|
|
5977
5996
|
import { motion as motion10, AnimatePresence as AnimatePresence8 } from "framer-motion";
|
|
5978
5997
|
import {
|
|
5979
5998
|
CloudArrowUpIcon,
|
|
5980
|
-
CheckIcon as
|
|
5999
|
+
CheckIcon as CheckIcon7,
|
|
5981
6000
|
XIcon as XIcon5,
|
|
5982
6001
|
FileTextIcon,
|
|
5983
6002
|
FilePdfIcon,
|
|
@@ -6309,7 +6328,7 @@ var FileUploader = React18.forwardRef(
|
|
|
6309
6328
|
),
|
|
6310
6329
|
transition: { duration: 0.3 },
|
|
6311
6330
|
children: [
|
|
6312
|
-
/* @__PURE__ */ jsx36("div", { className: "h-4 w-4 text-primary flex items-center justify-center", children: /* @__PURE__ */ jsx36(
|
|
6331
|
+
/* @__PURE__ */ jsx36("div", { className: "h-4 w-4 text-primary flex items-center justify-center", children: /* @__PURE__ */ jsx36(CheckIcon7, { size: 16, className: "text-emerald-500" }) }),
|
|
6313
6332
|
/* @__PURE__ */ jsxs27(
|
|
6314
6333
|
motion10.span,
|
|
6315
6334
|
{
|
|
@@ -7243,28 +7262,43 @@ var toast2 = {
|
|
|
7243
7262
|
// src/components/ui/form/CheckBoxBase.tsx
|
|
7244
7263
|
import * as React24 from "react";
|
|
7245
7264
|
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
7246
|
-
import { CheckIcon as
|
|
7265
|
+
import { CheckIcon as CheckIcon8, MinusIcon } from "@phosphor-icons/react";
|
|
7247
7266
|
import { motion as motion11 } from "framer-motion";
|
|
7248
|
-
import { jsx as jsx44 } from "react/jsx-runtime";
|
|
7267
|
+
import { jsx as jsx44, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
7249
7268
|
var CheckboxBase = React24.forwardRef(({ className, testid: dataTestId = "checkbox-base", ...props }, ref) => /* @__PURE__ */ jsx44(
|
|
7250
7269
|
CheckboxPrimitive.Root,
|
|
7251
7270
|
{
|
|
7252
7271
|
ref,
|
|
7253
7272
|
className: cn(
|
|
7254
|
-
"peer h-4 w-4 shrink-0 rounded-md border border-primary shadow-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground transition-colors",
|
|
7273
|
+
"peer h-4 w-4 shrink-0 rounded-md border border-primary shadow-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=indeterminate]:bg-primary data-[state=indeterminate]:text-primary-foreground transition-colors",
|
|
7255
7274
|
className
|
|
7256
7275
|
),
|
|
7257
7276
|
"data-testid": dataTestId,
|
|
7258
7277
|
...props,
|
|
7259
|
-
children: /* @__PURE__ */ jsx44(CheckboxPrimitive.Indicator, { asChild: true, children: /* @__PURE__ */
|
|
7278
|
+
children: /* @__PURE__ */ jsx44(CheckboxPrimitive.Indicator, { asChild: true, children: /* @__PURE__ */ jsxs33(
|
|
7260
7279
|
motion11.div,
|
|
7261
7280
|
{
|
|
7262
7281
|
initial: { scale: 0, opacity: 0, rotate: -90 },
|
|
7263
7282
|
animate: { scale: 1, opacity: 1, rotate: 0 },
|
|
7264
7283
|
exit: { scale: 0, opacity: 0, rotate: 90 },
|
|
7265
7284
|
transition: { type: "spring", stiffness: 500, damping: 30 },
|
|
7266
|
-
className: "flex items-center justify-center text-current",
|
|
7267
|
-
children:
|
|
7285
|
+
className: "flex items-center justify-center text-current group",
|
|
7286
|
+
children: [
|
|
7287
|
+
/* @__PURE__ */ jsx44(
|
|
7288
|
+
CheckIcon8,
|
|
7289
|
+
{
|
|
7290
|
+
className: "h-4 w-4 hidden group-data-[state=checked]:block",
|
|
7291
|
+
weight: "bold"
|
|
7292
|
+
}
|
|
7293
|
+
),
|
|
7294
|
+
/* @__PURE__ */ jsx44(
|
|
7295
|
+
MinusIcon,
|
|
7296
|
+
{
|
|
7297
|
+
className: "h-4 w-4 hidden group-data-[state=indeterminate]:block",
|
|
7298
|
+
weight: "bold"
|
|
7299
|
+
}
|
|
7300
|
+
)
|
|
7301
|
+
]
|
|
7268
7302
|
}
|
|
7269
7303
|
) })
|
|
7270
7304
|
}
|
|
@@ -7275,13 +7309,13 @@ CheckboxBase.displayName = CheckboxPrimitive.Root.displayName;
|
|
|
7275
7309
|
import * as React25 from "react";
|
|
7276
7310
|
import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
|
|
7277
7311
|
import { CaretUpDownIcon } from "@phosphor-icons/react";
|
|
7278
|
-
import { jsx as jsx45, jsxs as
|
|
7312
|
+
import { jsx as jsx45, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
7279
7313
|
var CollapsibleBase = React25.forwardRef(({ ...props }, ref) => {
|
|
7280
7314
|
return /* @__PURE__ */ jsx45(CollapsiblePrimitive.Root, { ref, "data-slot": "collapsible", ...props });
|
|
7281
7315
|
});
|
|
7282
7316
|
CollapsibleBase.displayName = CollapsiblePrimitive.Root.displayName;
|
|
7283
7317
|
var CollapsibleTriggerBase = React25.forwardRef(({ className, children, leftIcon, showCaret = true, ...props }, ref) => {
|
|
7284
|
-
return /* @__PURE__ */
|
|
7318
|
+
return /* @__PURE__ */ jsxs34(
|
|
7285
7319
|
CollapsiblePrimitive.CollapsibleTrigger,
|
|
7286
7320
|
{
|
|
7287
7321
|
ref,
|
|
@@ -7292,7 +7326,7 @@ var CollapsibleTriggerBase = React25.forwardRef(({ className, children, leftIcon
|
|
|
7292
7326
|
"data-slot": "collapsible-trigger",
|
|
7293
7327
|
...props,
|
|
7294
7328
|
children: [
|
|
7295
|
-
/* @__PURE__ */
|
|
7329
|
+
/* @__PURE__ */ jsxs34("div", { className: "flex items-center gap-2", children: [
|
|
7296
7330
|
leftIcon && /* @__PURE__ */ jsx45("span", { className: "flex-shrink-0 [&>svg]:size-4", children: leftIcon }),
|
|
7297
7331
|
/* @__PURE__ */ jsx45("span", { children })
|
|
7298
7332
|
] }),
|
|
@@ -7322,7 +7356,7 @@ CollapsibleContentBase.displayName = CollapsiblePrimitive.CollapsibleContent.dis
|
|
|
7322
7356
|
// src/components/ui/form/HoverCardBase.tsx
|
|
7323
7357
|
import * as React26 from "react";
|
|
7324
7358
|
import * as HoverCardPrimitive from "@radix-ui/react-hover-card";
|
|
7325
|
-
import { jsx as jsx46, jsxs as
|
|
7359
|
+
import { jsx as jsx46, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
7326
7360
|
function HoverCardBase(props) {
|
|
7327
7361
|
return /* @__PURE__ */ jsx46(HoverCardPrimitive.Root, { ...props });
|
|
7328
7362
|
}
|
|
@@ -7331,7 +7365,7 @@ function HoverCardTriggerBase(props) {
|
|
|
7331
7365
|
}
|
|
7332
7366
|
var HoverCardContentBase = React26.forwardRef(
|
|
7333
7367
|
({ className, align = "center", sideOffset = 6, children, ...props }, ref) => {
|
|
7334
|
-
return /* @__PURE__ */ jsx46(HoverCardPrimitive.Portal, { children: /* @__PURE__ */
|
|
7368
|
+
return /* @__PURE__ */ jsx46(HoverCardPrimitive.Portal, { children: /* @__PURE__ */ jsxs35(
|
|
7335
7369
|
HoverCardPrimitive.Content,
|
|
7336
7370
|
{
|
|
7337
7371
|
ref,
|
|
@@ -7377,8 +7411,8 @@ HoverCardContentBase.displayName = HoverCardPrimitive.Content.displayName;
|
|
|
7377
7411
|
// src/components/ui/form/Input-OTP-Base.tsx
|
|
7378
7412
|
import * as React27 from "react";
|
|
7379
7413
|
import { OTPInput, OTPInputContext } from "input-otp";
|
|
7380
|
-
import { MinusIcon } from "@phosphor-icons/react";
|
|
7381
|
-
import { jsx as jsx47, jsxs as
|
|
7414
|
+
import { MinusIcon as MinusIcon2 } from "@phosphor-icons/react";
|
|
7415
|
+
import { jsx as jsx47, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
7382
7416
|
function InputOTPBase({
|
|
7383
7417
|
className,
|
|
7384
7418
|
containerClassName,
|
|
@@ -7414,7 +7448,7 @@ function InputOTPSlotBase({
|
|
|
7414
7448
|
}) {
|
|
7415
7449
|
const inputOTPContext = React27.useContext(OTPInputContext);
|
|
7416
7450
|
const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {};
|
|
7417
|
-
return /* @__PURE__ */
|
|
7451
|
+
return /* @__PURE__ */ jsxs36(
|
|
7418
7452
|
"div",
|
|
7419
7453
|
{
|
|
7420
7454
|
"data-slot": "input-otp-slot",
|
|
@@ -7432,13 +7466,13 @@ function InputOTPSlotBase({
|
|
|
7432
7466
|
);
|
|
7433
7467
|
}
|
|
7434
7468
|
function InputOTPSeparatorBase({ ...props }) {
|
|
7435
|
-
return /* @__PURE__ */ jsx47("div", { "data-slot": "input-otp-separator", role: "separator", ...props, children: /* @__PURE__ */ jsx47(
|
|
7469
|
+
return /* @__PURE__ */ jsx47("div", { "data-slot": "input-otp-separator", role: "separator", ...props, children: /* @__PURE__ */ jsx47(MinusIcon2, {}) });
|
|
7436
7470
|
}
|
|
7437
7471
|
|
|
7438
7472
|
// src/components/ui/form/SliderBase.tsx
|
|
7439
7473
|
import * as React28 from "react";
|
|
7440
7474
|
import * as SliderPrimitive from "@radix-ui/react-slider";
|
|
7441
|
-
import { jsx as jsx48, jsxs as
|
|
7475
|
+
import { jsx as jsx48, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
7442
7476
|
var SlideBase = React28.forwardRef(
|
|
7443
7477
|
({
|
|
7444
7478
|
className,
|
|
@@ -7449,13 +7483,13 @@ var SlideBase = React28.forwardRef(
|
|
|
7449
7483
|
...props
|
|
7450
7484
|
}, ref) => {
|
|
7451
7485
|
const isVertical = orientation === "vertical";
|
|
7452
|
-
return /* @__PURE__ */
|
|
7486
|
+
return /* @__PURE__ */ jsxs37(
|
|
7453
7487
|
"div",
|
|
7454
7488
|
{
|
|
7455
7489
|
className: cn("flex flex-col gap-1", isVertical ? "h-full " : "w-full"),
|
|
7456
7490
|
children: [
|
|
7457
7491
|
label && /* @__PURE__ */ jsx48(LabelBase_default, { className: "py-2", children: label }),
|
|
7458
|
-
/* @__PURE__ */
|
|
7492
|
+
/* @__PURE__ */ jsxs37(
|
|
7459
7493
|
"div",
|
|
7460
7494
|
{
|
|
7461
7495
|
className: cn(
|
|
@@ -7464,7 +7498,7 @@ var SlideBase = React28.forwardRef(
|
|
|
7464
7498
|
),
|
|
7465
7499
|
children: [
|
|
7466
7500
|
leftIcon && /* @__PURE__ */ jsx48("div", { className: "flex items-center justify-center", children: leftIcon }),
|
|
7467
|
-
/* @__PURE__ */
|
|
7501
|
+
/* @__PURE__ */ jsxs37(
|
|
7468
7502
|
SliderPrimitive.Root,
|
|
7469
7503
|
{
|
|
7470
7504
|
ref,
|
|
@@ -7534,7 +7568,7 @@ import {
|
|
|
7534
7568
|
GearIcon,
|
|
7535
7569
|
BellIcon,
|
|
7536
7570
|
DotsThreeIcon as DotsThreeIcon2,
|
|
7537
|
-
CheckIcon as
|
|
7571
|
+
CheckIcon as CheckIcon9,
|
|
7538
7572
|
FunnelIcon,
|
|
7539
7573
|
HeartIcon,
|
|
7540
7574
|
StarIcon,
|
|
@@ -8027,7 +8061,7 @@ var CheckButton = ({
|
|
|
8027
8061
|
),
|
|
8028
8062
|
...props,
|
|
8029
8063
|
children: /* @__PURE__ */ jsx49(
|
|
8030
|
-
|
|
8064
|
+
CheckIcon9,
|
|
8031
8065
|
{
|
|
8032
8066
|
size: 18,
|
|
8033
8067
|
className: "transition-transform duration-200 group-hover:scale-110"
|
|
@@ -8280,7 +8314,7 @@ SwitchBase.displayName = SwitchPrimitives.Root.displayName;
|
|
|
8280
8314
|
import * as React31 from "react";
|
|
8281
8315
|
import { motion as motion12 } from "framer-motion";
|
|
8282
8316
|
import { TrashIcon as TrashIcon2 } from "@phosphor-icons/react";
|
|
8283
|
-
import { jsx as jsx51, jsxs as
|
|
8317
|
+
import { jsx as jsx51, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
8284
8318
|
var TextAreaBase = React31.forwardRef(
|
|
8285
8319
|
({ className, clearable = false, onClear, ...props }, ref) => {
|
|
8286
8320
|
const [isFocused, setIsFocused] = React31.useState(false);
|
|
@@ -8328,7 +8362,7 @@ var TextAreaBase = React31.forwardRef(
|
|
|
8328
8362
|
React31.useEffect(() => {
|
|
8329
8363
|
setHasContent(!!props.value || !!props.defaultValue);
|
|
8330
8364
|
}, [props.value, props.defaultValue]);
|
|
8331
|
-
return /* @__PURE__ */
|
|
8365
|
+
return /* @__PURE__ */ jsxs38("div", { className: "relative", children: [
|
|
8332
8366
|
/* @__PURE__ */ jsx51(
|
|
8333
8367
|
"textarea",
|
|
8334
8368
|
{
|
|
@@ -8352,7 +8386,7 @@ var TextAreaBase = React31.forwardRef(
|
|
|
8352
8386
|
...props
|
|
8353
8387
|
}
|
|
8354
8388
|
),
|
|
8355
|
-
clearable && hasContent && /* @__PURE__ */ jsx51(TooltipProviderBase, { children: /* @__PURE__ */
|
|
8389
|
+
clearable && hasContent && /* @__PURE__ */ jsx51(TooltipProviderBase, { children: /* @__PURE__ */ jsxs38(
|
|
8356
8390
|
TooltipBase,
|
|
8357
8391
|
{
|
|
8358
8392
|
open: showConfirmTooltip,
|
|
@@ -8379,14 +8413,14 @@ var TextAreaBase = React31.forwardRef(
|
|
|
8379
8413
|
children: /* @__PURE__ */ jsx51(TrashIcon2, { size: 16, weight: "regular" })
|
|
8380
8414
|
}
|
|
8381
8415
|
) }),
|
|
8382
|
-
/* @__PURE__ */
|
|
8416
|
+
/* @__PURE__ */ jsxs38(
|
|
8383
8417
|
TooltipContentBase,
|
|
8384
8418
|
{
|
|
8385
8419
|
side: "left",
|
|
8386
8420
|
className: "bg-background border border-border shadow-lg p-3 flex flex-col gap-2",
|
|
8387
8421
|
children: [
|
|
8388
8422
|
/* @__PURE__ */ jsx51("p", { className: "text-sm text-foreground font-medium mb-1", children: "Limpar todo o texto?" }),
|
|
8389
|
-
/* @__PURE__ */
|
|
8423
|
+
/* @__PURE__ */ jsxs38("div", { className: "flex gap-2", children: [
|
|
8390
8424
|
/* @__PURE__ */ jsx51(
|
|
8391
8425
|
"button",
|
|
8392
8426
|
{
|
|
@@ -8432,7 +8466,7 @@ var TextAreaBase = React31.forwardRef(
|
|
|
8432
8466
|
children: /* @__PURE__ */ jsx51("div", { className: "absolute inset-0 rounded-lg bg-gradient-to-r from-ring/20 via-ring/10 to-ring/20 blur-sm" })
|
|
8433
8467
|
}
|
|
8434
8468
|
),
|
|
8435
|
-
isFocused && hasContent && props.maxLength && /* @__PURE__ */
|
|
8469
|
+
isFocused && hasContent && props.maxLength && /* @__PURE__ */ jsxs38(
|
|
8436
8470
|
motion12.div,
|
|
8437
8471
|
{
|
|
8438
8472
|
initial: { opacity: 0, y: -10 },
|
|
@@ -8455,7 +8489,7 @@ TextAreaBase.displayName = "TextAreaBase";
|
|
|
8455
8489
|
import * as React32 from "react";
|
|
8456
8490
|
import useEmblaCarousel from "embla-carousel-react";
|
|
8457
8491
|
import { ArrowLeftIcon as ArrowLeftIcon2, ArrowRightIcon as ArrowRightIcon2 } from "@phosphor-icons/react";
|
|
8458
|
-
import { jsx as jsx52, jsxs as
|
|
8492
|
+
import { jsx as jsx52, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
8459
8493
|
var CarouselContext = React32.createContext(null);
|
|
8460
8494
|
function useCarousel() {
|
|
8461
8495
|
const context = React32.useContext(CarouselContext);
|
|
@@ -8599,7 +8633,7 @@ function CarouselPreviousBase({
|
|
|
8599
8633
|
}) {
|
|
8600
8634
|
const { orientation, scrollPrev, canScrollPrev } = useCarousel();
|
|
8601
8635
|
const btnRef = React32.useRef(null);
|
|
8602
|
-
return /* @__PURE__ */
|
|
8636
|
+
return /* @__PURE__ */ jsxs39(
|
|
8603
8637
|
ButtonBase,
|
|
8604
8638
|
{
|
|
8605
8639
|
"data-slot": "carousel-previous",
|
|
@@ -8629,7 +8663,7 @@ function CarouselNextBase({
|
|
|
8629
8663
|
}) {
|
|
8630
8664
|
const { orientation, scrollNext, canScrollNext } = useCarousel();
|
|
8631
8665
|
const btnRef = React32.useRef(null);
|
|
8632
|
-
return /* @__PURE__ */
|
|
8666
|
+
return /* @__PURE__ */ jsxs39(
|
|
8633
8667
|
ButtonBase,
|
|
8634
8668
|
{
|
|
8635
8669
|
"data-slot": "carousel-next",
|
|
@@ -8829,7 +8863,7 @@ TabsContentBase.displayName = TabsPrimitive.Content.displayName;
|
|
|
8829
8863
|
// src/components/ui/navigation/BreadcrumbBase.tsx
|
|
8830
8864
|
import { Slot as Slot4 } from "@radix-ui/react-slot";
|
|
8831
8865
|
import { CaretRightIcon as CaretRightIcon3, DotsThreeIcon as DotsThreeIcon3 } from "@phosphor-icons/react";
|
|
8832
|
-
import { jsx as jsx56, jsxs as
|
|
8866
|
+
import { jsx as jsx56, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
8833
8867
|
function BreadcrumbBase({ ...props }) {
|
|
8834
8868
|
return /* @__PURE__ */ jsx56("nav", { "aria-label": "breadcrumb", "data-slot": "breadcrumb", ...props });
|
|
8835
8869
|
}
|
|
@@ -8905,7 +8939,7 @@ function BreadcrumbEllipsisBase({
|
|
|
8905
8939
|
className,
|
|
8906
8940
|
...props
|
|
8907
8941
|
}) {
|
|
8908
|
-
return /* @__PURE__ */
|
|
8942
|
+
return /* @__PURE__ */ jsxs40(
|
|
8909
8943
|
"span",
|
|
8910
8944
|
{
|
|
8911
8945
|
"data-slot": "breadcrumb-ellipsis",
|
|
@@ -8923,15 +8957,15 @@ function BreadcrumbEllipsisBase({
|
|
|
8923
8957
|
|
|
8924
8958
|
// src/components/ui/navigation/NavigationMenuBase.tsx
|
|
8925
8959
|
import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu";
|
|
8926
|
-
import { CaretDownIcon as
|
|
8927
|
-
import { jsx as jsx57, jsxs as
|
|
8960
|
+
import { CaretDownIcon as CaretDownIcon4 } from "@phosphor-icons/react";
|
|
8961
|
+
import { jsx as jsx57, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
8928
8962
|
function NavigationMenuBase({
|
|
8929
8963
|
className,
|
|
8930
8964
|
children,
|
|
8931
8965
|
viewport = true,
|
|
8932
8966
|
...props
|
|
8933
8967
|
}) {
|
|
8934
|
-
return /* @__PURE__ */
|
|
8968
|
+
return /* @__PURE__ */ jsxs41(
|
|
8935
8969
|
NavigationMenuPrimitive.Root,
|
|
8936
8970
|
{
|
|
8937
8971
|
"data-slot": "navigation-menu",
|
|
@@ -8982,7 +9016,7 @@ function NavigationMenuTriggerBase({
|
|
|
8982
9016
|
children,
|
|
8983
9017
|
...props
|
|
8984
9018
|
}) {
|
|
8985
|
-
return /* @__PURE__ */
|
|
9019
|
+
return /* @__PURE__ */ jsxs41(
|
|
8986
9020
|
NavigationMenuPrimitive.Trigger,
|
|
8987
9021
|
{
|
|
8988
9022
|
"data-slot": "navigation-menu-trigger",
|
|
@@ -8991,7 +9025,7 @@ function NavigationMenuTriggerBase({
|
|
|
8991
9025
|
children: [
|
|
8992
9026
|
children,
|
|
8993
9027
|
/* @__PURE__ */ jsx57(
|
|
8994
|
-
|
|
9028
|
+
CaretDownIcon4,
|
|
8995
9029
|
{
|
|
8996
9030
|
className: "relative top-[1px] ml-1 size-3 transition duration-300 group-data-[state=open]:rotate-180",
|
|
8997
9031
|
"aria-hidden": "true"
|
|
@@ -9095,7 +9129,7 @@ import * as React37 from "react";
|
|
|
9095
9129
|
import * as SheetPrimitive from "@radix-ui/react-dialog";
|
|
9096
9130
|
import { cva as cva4 } from "class-variance-authority";
|
|
9097
9131
|
import { XIcon as XIcon8 } from "@phosphor-icons/react";
|
|
9098
|
-
import { jsx as jsx58, jsxs as
|
|
9132
|
+
import { jsx as jsx58, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
9099
9133
|
var SheetBase = SheetPrimitive.Root;
|
|
9100
9134
|
var SheetTriggerBase = SheetPrimitive.Trigger;
|
|
9101
9135
|
var SheetCloseBase = SheetPrimitive.Close;
|
|
@@ -9128,16 +9162,16 @@ var sheetVariants = cva4(
|
|
|
9128
9162
|
}
|
|
9129
9163
|
}
|
|
9130
9164
|
);
|
|
9131
|
-
var SheetContentBase = React37.forwardRef(({ side = "right", className, children, ...props }, ref) => /* @__PURE__ */
|
|
9165
|
+
var SheetContentBase = React37.forwardRef(({ side = "right", className, children, ...props }, ref) => /* @__PURE__ */ jsxs42(SheetPortalBase, { children: [
|
|
9132
9166
|
/* @__PURE__ */ jsx58(SheetOverlayBase, {}),
|
|
9133
|
-
/* @__PURE__ */
|
|
9167
|
+
/* @__PURE__ */ jsxs42(
|
|
9134
9168
|
SheetPrimitive.Content,
|
|
9135
9169
|
{
|
|
9136
9170
|
ref,
|
|
9137
9171
|
className: cn(sheetVariants({ side }), className),
|
|
9138
9172
|
...props,
|
|
9139
9173
|
children: [
|
|
9140
|
-
/* @__PURE__ */
|
|
9174
|
+
/* @__PURE__ */ jsxs42(SheetPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary", children: [
|
|
9141
9175
|
/* @__PURE__ */ jsx58(XIcon8, { className: "h-4 w-4" }),
|
|
9142
9176
|
/* @__PURE__ */ jsx58("span", { className: "sr-only", children: "Close" })
|
|
9143
9177
|
] }),
|
|
@@ -9196,7 +9230,7 @@ SheetDescriptionBase.displayName = SheetPrimitive.Description.displayName;
|
|
|
9196
9230
|
|
|
9197
9231
|
// src/components/ui/navigation/SidebarBase.tsx
|
|
9198
9232
|
import { SidebarSimpleIcon } from "@phosphor-icons/react";
|
|
9199
|
-
import { jsx as jsx59, jsxs as
|
|
9233
|
+
import { jsx as jsx59, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
9200
9234
|
var SIDEBAR_COOKIE_NAME = "sidebar:state";
|
|
9201
9235
|
var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
9202
9236
|
var SIDEBAR_WIDTH = "16rem";
|
|
@@ -9324,7 +9358,7 @@ var SidebarBase = React38.forwardRef(
|
|
|
9324
9358
|
}
|
|
9325
9359
|
) });
|
|
9326
9360
|
}
|
|
9327
|
-
return /* @__PURE__ */
|
|
9361
|
+
return /* @__PURE__ */ jsxs43(
|
|
9328
9362
|
"div",
|
|
9329
9363
|
{
|
|
9330
9364
|
ref,
|
|
@@ -9374,7 +9408,7 @@ var SidebarBase = React38.forwardRef(
|
|
|
9374
9408
|
SidebarBase.displayName = "SidebarBase";
|
|
9375
9409
|
var SidebarTriggerBase = React38.forwardRef(({ className, onClick, ...props }, ref) => {
|
|
9376
9410
|
const { toggleSidebar } = UseSideBarBase();
|
|
9377
|
-
return /* @__PURE__ */ jsx59("div", { children: /* @__PURE__ */
|
|
9411
|
+
return /* @__PURE__ */ jsx59("div", { children: /* @__PURE__ */ jsxs43(
|
|
9378
9412
|
ButtonBase,
|
|
9379
9413
|
{
|
|
9380
9414
|
ref,
|
|
@@ -9630,7 +9664,7 @@ var SidebarMenuButtonBase = React38.forwardRef(
|
|
|
9630
9664
|
children: tooltip
|
|
9631
9665
|
};
|
|
9632
9666
|
}
|
|
9633
|
-
return /* @__PURE__ */
|
|
9667
|
+
return /* @__PURE__ */ jsxs43(TooltipBase, { children: [
|
|
9634
9668
|
/* @__PURE__ */ jsx59(TooltipTriggerBase, { asChild: true, children: button }),
|
|
9635
9669
|
/* @__PURE__ */ jsx59(
|
|
9636
9670
|
TooltipContentBase,
|
|
@@ -9690,7 +9724,7 @@ var SidebarMenuSkeletonBase = React38.forwardRef(({ className, showIcon = false,
|
|
|
9690
9724
|
const width = React38.useMemo(() => {
|
|
9691
9725
|
return `${Math.floor(Math.random() * 40) + 50}%`;
|
|
9692
9726
|
}, []);
|
|
9693
|
-
return /* @__PURE__ */
|
|
9727
|
+
return /* @__PURE__ */ jsxs43(
|
|
9694
9728
|
"div",
|
|
9695
9729
|
{
|
|
9696
9730
|
ref,
|
|
@@ -9761,7 +9795,7 @@ SidebarMenuSubButtonBase.displayName = "SidebarMenuSubButtonBase";
|
|
|
9761
9795
|
|
|
9762
9796
|
// src/components/ui/overlays/DrawerBase.tsx
|
|
9763
9797
|
import { Drawer as DrawerPrimitive } from "vaul";
|
|
9764
|
-
import { jsx as jsx60, jsxs as
|
|
9798
|
+
import { jsx as jsx60, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
9765
9799
|
function DrawerBase({
|
|
9766
9800
|
...props
|
|
9767
9801
|
}) {
|
|
@@ -9803,9 +9837,9 @@ function DrawerContentBase({
|
|
|
9803
9837
|
children,
|
|
9804
9838
|
...props
|
|
9805
9839
|
}) {
|
|
9806
|
-
return /* @__PURE__ */
|
|
9840
|
+
return /* @__PURE__ */ jsxs44(DrawerPortalBase, { children: [
|
|
9807
9841
|
/* @__PURE__ */ jsx60(DrawerOverlayBase, {}),
|
|
9808
|
-
/* @__PURE__ */
|
|
9842
|
+
/* @__PURE__ */ jsxs44(
|
|
9809
9843
|
DrawerPrimitive.Content,
|
|
9810
9844
|
{
|
|
9811
9845
|
"data-slot": "drawer-content",
|
|
@@ -9883,7 +9917,7 @@ function DrawerDescriptionBase({
|
|
|
9883
9917
|
}
|
|
9884
9918
|
|
|
9885
9919
|
// src/hooks/use-universal-tooltip.tsx
|
|
9886
|
-
import { createContext as createContext4, useContext as useContext5, useState as
|
|
9920
|
+
import { createContext as createContext4, useContext as useContext5, useState as useState16, useCallback as useCallback11, useEffect as useEffect14, useRef as useRef7 } from "react";
|
|
9887
9921
|
import { jsx as jsx61 } from "react/jsx-runtime";
|
|
9888
9922
|
var UniversalTooltipContext = createContext4(null);
|
|
9889
9923
|
var useUniversalTooltip = () => {
|
|
@@ -9942,7 +9976,7 @@ var useTooltip = () => {
|
|
|
9942
9976
|
|
|
9943
9977
|
// src/components/ui/UniversalTooltipRenderer.tsx
|
|
9944
9978
|
import { XIcon as XIcon9 } from "@phosphor-icons/react/dist/ssr";
|
|
9945
|
-
import { jsx as jsx62, jsxs as
|
|
9979
|
+
import { jsx as jsx62, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
9946
9980
|
var UniversalTooltipRenderer = ({
|
|
9947
9981
|
className,
|
|
9948
9982
|
showCloseButton = true,
|
|
@@ -9959,8 +9993,8 @@ var UniversalTooltipRenderer = ({
|
|
|
9959
9993
|
clearAllTooltips
|
|
9960
9994
|
} = useUniversalTooltip();
|
|
9961
9995
|
const { removeTooltip, handleElementMouseDown } = useTooltip();
|
|
9962
|
-
return /* @__PURE__ */
|
|
9963
|
-
showCloseAllButton && tooltips.length > 1 && /* @__PURE__ */ jsx62("div", { className: "fixed top-6 left-1/2 transform -translate-x-1/2 z-50 pointer-events-auto animate-in fade-in slide-in-from-top-2 duration-300", children: /* @__PURE__ */
|
|
9996
|
+
return /* @__PURE__ */ jsxs45("div", { className: cn("fixed inset-0 pointer-events-none z-50", className), children: [
|
|
9997
|
+
showCloseAllButton && tooltips.length > 1 && /* @__PURE__ */ jsx62("div", { className: "fixed top-6 left-1/2 transform -translate-x-1/2 z-50 pointer-events-auto animate-in fade-in slide-in-from-top-2 duration-300", children: /* @__PURE__ */ jsxs45(
|
|
9964
9998
|
"button",
|
|
9965
9999
|
{
|
|
9966
10000
|
onClick: clearAllTooltips,
|
|
@@ -9982,7 +10016,7 @@ var UniversalTooltipRenderer = ({
|
|
|
9982
10016
|
const endX = isHorizontal ? Math.max(guide.sourceTooltip.left + guide.sourceTooltip.width / 2, guide.targetTooltip.left + guide.targetTooltip.width / 2) : guide.targetTooltip.left + guide.targetTooltip.width / 2;
|
|
9983
10017
|
const startY = isHorizontal ? guide.sourceTooltip.top + guide.sourceTooltip.height / 2 : Math.min(guide.sourceTooltip.top + guide.sourceTooltip.height / 2, guide.targetTooltip.top + guide.targetTooltip.height / 2);
|
|
9984
10018
|
const endY = isHorizontal ? guide.targetTooltip.top + guide.targetTooltip.height / 2 : Math.max(guide.sourceTooltip.top + guide.sourceTooltip.height / 2, guide.targetTooltip.top + guide.targetTooltip.height / 2);
|
|
9985
|
-
return /* @__PURE__ */
|
|
10019
|
+
return /* @__PURE__ */ jsxs45("div", { className: "pointer-events-none", children: [
|
|
9986
10020
|
/* @__PURE__ */ jsx62(
|
|
9987
10021
|
"div",
|
|
9988
10022
|
{
|
|
@@ -10036,7 +10070,7 @@ var UniversalTooltipRenderer = ({
|
|
|
10036
10070
|
)
|
|
10037
10071
|
] }, index);
|
|
10038
10072
|
}),
|
|
10039
|
-
tooltips.map((tooltip) => /* @__PURE__ */
|
|
10073
|
+
tooltips.map((tooltip) => /* @__PURE__ */ jsxs45(
|
|
10040
10074
|
"div",
|
|
10041
10075
|
{
|
|
10042
10076
|
className: cn(
|
|
@@ -10050,8 +10084,8 @@ var UniversalTooltipRenderer = ({
|
|
|
10050
10084
|
},
|
|
10051
10085
|
onMouseDown: (e) => handleElementMouseDown(tooltip.id, e),
|
|
10052
10086
|
children: [
|
|
10053
|
-
/* @__PURE__ */
|
|
10054
|
-
/* @__PURE__ */
|
|
10087
|
+
/* @__PURE__ */ jsxs45("div", { className: "flex items-center justify-between p-3 border-b bg-muted/20 rounded-t-lg", children: [
|
|
10088
|
+
/* @__PURE__ */ jsxs45("div", { className: "flex items-center gap-2", children: [
|
|
10055
10089
|
/* @__PURE__ */ jsx62("div", { className: "w-2 h-2 bg-primary rounded-full" }),
|
|
10056
10090
|
/* @__PURE__ */ jsx62("span", { className: "text-sm font-medium text-muted-foreground", children: "Tooltip" })
|
|
10057
10091
|
] }),
|
|
@@ -10091,7 +10125,7 @@ import {
|
|
|
10091
10125
|
CalendarIcon
|
|
10092
10126
|
} from "@phosphor-icons/react";
|
|
10093
10127
|
import { AnimatePresence as AnimatePresence9 } from "framer-motion";
|
|
10094
|
-
import { jsx as jsx63, jsxs as
|
|
10128
|
+
import { jsx as jsx63, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
10095
10129
|
function CalendarBase2({
|
|
10096
10130
|
className,
|
|
10097
10131
|
classNames,
|
|
@@ -10179,14 +10213,14 @@ CalendarBase2.displayName = "CalendarBase";
|
|
|
10179
10213
|
|
|
10180
10214
|
// src/components/picker/DateTimePicker.tsx
|
|
10181
10215
|
import { ptBR } from "date-fns/locale";
|
|
10182
|
-
import { useEffect as useEffect15, useState as
|
|
10216
|
+
import { useEffect as useEffect15, useState as useState18 } from "react";
|
|
10183
10217
|
|
|
10184
10218
|
// src/components/picker/TimePicker.tsx
|
|
10185
10219
|
import { motion as motion14, AnimatePresence as AnimatePresence10 } from "framer-motion";
|
|
10186
10220
|
import * as React42 from "react";
|
|
10187
10221
|
|
|
10188
10222
|
// src/components/picker/TimePickerInput.tsx
|
|
10189
|
-
import { CaretUpIcon as CaretUpIcon2, CaretDownIcon as
|
|
10223
|
+
import { CaretUpIcon as CaretUpIcon2, CaretDownIcon as CaretDownIcon5 } from "@phosphor-icons/react";
|
|
10190
10224
|
import React41 from "react";
|
|
10191
10225
|
|
|
10192
10226
|
// src/components/picker/utils/time-picker-utils.ts
|
|
@@ -10329,7 +10363,7 @@ function display12HourValue(hours) {
|
|
|
10329
10363
|
}
|
|
10330
10364
|
|
|
10331
10365
|
// src/components/picker/TimePickerInput.tsx
|
|
10332
|
-
import { jsx as jsx64, jsxs as
|
|
10366
|
+
import { jsx as jsx64, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
10333
10367
|
var TimePickerInput = React41.forwardRef(
|
|
10334
10368
|
({
|
|
10335
10369
|
className,
|
|
@@ -10416,7 +10450,7 @@ var TimePickerInput = React41.forwardRef(
|
|
|
10416
10450
|
const baseLabel = getPickerLabel();
|
|
10417
10451
|
return `${baseLabel}, valor atual: ${calculatedValue}.`;
|
|
10418
10452
|
};
|
|
10419
|
-
return /* @__PURE__ */
|
|
10453
|
+
return /* @__PURE__ */ jsxs47("div", { className: "relative group flex flex-col items-center", children: [
|
|
10420
10454
|
getPickerLabel() && /* @__PURE__ */ jsx64(
|
|
10421
10455
|
"label",
|
|
10422
10456
|
{
|
|
@@ -10425,7 +10459,7 @@ var TimePickerInput = React41.forwardRef(
|
|
|
10425
10459
|
children: getPickerLabel()
|
|
10426
10460
|
}
|
|
10427
10461
|
),
|
|
10428
|
-
/* @__PURE__ */
|
|
10462
|
+
/* @__PURE__ */ jsxs47(
|
|
10429
10463
|
"div",
|
|
10430
10464
|
{
|
|
10431
10465
|
className: cn(
|
|
@@ -10452,7 +10486,7 @@ var TimePickerInput = React41.forwardRef(
|
|
|
10452
10486
|
children: /* @__PURE__ */ jsx64(CaretUpIcon2, { size: 14, className: "sm:w-4 sm:h-4" })
|
|
10453
10487
|
}
|
|
10454
10488
|
),
|
|
10455
|
-
/* @__PURE__ */
|
|
10489
|
+
/* @__PURE__ */ jsxs47("div", { className: "relative", children: [
|
|
10456
10490
|
/* @__PURE__ */ jsx64(
|
|
10457
10491
|
"input",
|
|
10458
10492
|
{
|
|
@@ -10516,7 +10550,7 @@ var TimePickerInput = React41.forwardRef(
|
|
|
10516
10550
|
),
|
|
10517
10551
|
tabIndex: -1,
|
|
10518
10552
|
"aria-label": `Decrementar ${getPickerLabel().toLowerCase()}`,
|
|
10519
|
-
children: /* @__PURE__ */ jsx64(
|
|
10553
|
+
children: /* @__PURE__ */ jsx64(CaretDownIcon5, { size: 14, className: "sm:w-4 sm:h-4" })
|
|
10520
10554
|
}
|
|
10521
10555
|
)
|
|
10522
10556
|
]
|
|
@@ -10528,7 +10562,7 @@ var TimePickerInput = React41.forwardRef(
|
|
|
10528
10562
|
TimePickerInput.displayName = "TimePickerInput";
|
|
10529
10563
|
|
|
10530
10564
|
// src/components/picker/TimePicker.tsx
|
|
10531
|
-
import { Fragment as Fragment9, jsx as jsx65, jsxs as
|
|
10565
|
+
import { Fragment as Fragment9, jsx as jsx65, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
10532
10566
|
function TimePicker({
|
|
10533
10567
|
date,
|
|
10534
10568
|
setDate,
|
|
@@ -10553,7 +10587,7 @@ function TimePicker({
|
|
|
10553
10587
|
hidden: { opacity: 0, y: 10 },
|
|
10554
10588
|
visible: { opacity: 1, y: 0 }
|
|
10555
10589
|
};
|
|
10556
|
-
return /* @__PURE__ */
|
|
10590
|
+
return /* @__PURE__ */ jsxs48(
|
|
10557
10591
|
motion14.div,
|
|
10558
10592
|
{
|
|
10559
10593
|
variants: containerVariants,
|
|
@@ -10626,7 +10660,7 @@ function TimePicker({
|
|
|
10626
10660
|
|
|
10627
10661
|
// src/components/picker/DateTimePicker.tsx
|
|
10628
10662
|
import { CalendarBlankIcon, ClockIcon } from "@phosphor-icons/react";
|
|
10629
|
-
import { jsx as jsx66, jsxs as
|
|
10663
|
+
import { jsx as jsx66, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
10630
10664
|
function DateTimePicker({
|
|
10631
10665
|
label,
|
|
10632
10666
|
date,
|
|
@@ -10640,9 +10674,9 @@ function DateTimePicker({
|
|
|
10640
10674
|
className,
|
|
10641
10675
|
error
|
|
10642
10676
|
}) {
|
|
10643
|
-
const [internalDate, setInternalDate] =
|
|
10644
|
-
const [open, setOpen] =
|
|
10645
|
-
const [timePickerOpen, setTimePickerOpen] =
|
|
10677
|
+
const [internalDate, setInternalDate] = useState18(date);
|
|
10678
|
+
const [open, setOpen] = useState18(false);
|
|
10679
|
+
const [timePickerOpen, setTimePickerOpen] = useState18(false);
|
|
10646
10680
|
const handleSelect = (newDay) => {
|
|
10647
10681
|
if (!newDay) return;
|
|
10648
10682
|
if (!internalDate) {
|
|
@@ -10676,16 +10710,16 @@ function DateTimePicker({
|
|
|
10676
10710
|
useEffect15(() => {
|
|
10677
10711
|
setInternalDate(date);
|
|
10678
10712
|
}, [date, open]);
|
|
10679
|
-
return /* @__PURE__ */
|
|
10713
|
+
return /* @__PURE__ */ jsxs49("div", { className: cn("w-full sm:w-auto", className), children: [
|
|
10680
10714
|
label && /* @__PURE__ */ jsx66(LabelBase_default, { children: label }),
|
|
10681
|
-
/* @__PURE__ */
|
|
10715
|
+
/* @__PURE__ */ jsxs49(PopoverBase, { open, onOpenChange: setOpen, children: [
|
|
10682
10716
|
/* @__PURE__ */ jsx66(
|
|
10683
10717
|
PopoverTriggerBase,
|
|
10684
10718
|
{
|
|
10685
10719
|
disabled,
|
|
10686
10720
|
asChild: true,
|
|
10687
10721
|
className: cn(error && "border-red-500"),
|
|
10688
|
-
children: /* @__PURE__ */
|
|
10722
|
+
children: /* @__PURE__ */ jsxs49(
|
|
10689
10723
|
ButtonBase,
|
|
10690
10724
|
{
|
|
10691
10725
|
variant: "outline",
|
|
@@ -10720,7 +10754,7 @@ function DateTimePicker({
|
|
|
10720
10754
|
side: "bottom",
|
|
10721
10755
|
avoidCollisions: true,
|
|
10722
10756
|
collisionPadding: 8,
|
|
10723
|
-
children: /* @__PURE__ */
|
|
10757
|
+
children: /* @__PURE__ */ jsxs49("div", { className: "flex flex-col max-h-[calc(100vh-4rem)] overflow-y-auto border-none rounded-md", children: [
|
|
10724
10758
|
/* @__PURE__ */ jsx66(
|
|
10725
10759
|
CalendarBase2,
|
|
10726
10760
|
{
|
|
@@ -10735,13 +10769,13 @@ function DateTimePicker({
|
|
|
10735
10769
|
className: cn("w-full", hideTime && "border-0")
|
|
10736
10770
|
}
|
|
10737
10771
|
),
|
|
10738
|
-
!hideTime && /* @__PURE__ */ jsx66("div", { className: "flex justify-center w-full ", children: /* @__PURE__ */
|
|
10772
|
+
!hideTime && /* @__PURE__ */ jsx66("div", { className: "flex justify-center w-full ", children: /* @__PURE__ */ jsxs49(
|
|
10739
10773
|
PopoverBase,
|
|
10740
10774
|
{
|
|
10741
10775
|
open: timePickerOpen,
|
|
10742
10776
|
onOpenChange: setTimePickerOpen,
|
|
10743
10777
|
children: [
|
|
10744
|
-
/* @__PURE__ */ jsx66(PopoverTriggerBase, { asChild: true, children: /* @__PURE__ */
|
|
10778
|
+
/* @__PURE__ */ jsx66(PopoverTriggerBase, { asChild: true, children: /* @__PURE__ */ jsxs49(
|
|
10745
10779
|
ButtonBase,
|
|
10746
10780
|
{
|
|
10747
10781
|
variant: "outline",
|
|
@@ -10770,7 +10804,7 @@ function DateTimePicker({
|
|
|
10770
10804
|
sideOffset: 8,
|
|
10771
10805
|
avoidCollisions: true,
|
|
10772
10806
|
collisionPadding: 8,
|
|
10773
|
-
children: /* @__PURE__ */
|
|
10807
|
+
children: /* @__PURE__ */ jsxs49("div", { className: "flex flex-col items-center space-y-2 sm:space-y-3", children: [
|
|
10774
10808
|
/* @__PURE__ */ jsx66("h4", { className: "text-sm sm:text-base font-medium text-center", children: "Alterar Hor\xE1rio" }),
|
|
10775
10809
|
/* @__PURE__ */ jsx66(
|
|
10776
10810
|
TimePicker,
|
|
@@ -10817,7 +10851,7 @@ import {
|
|
|
10817
10851
|
} from "@phosphor-icons/react";
|
|
10818
10852
|
import { motion as motion15, AnimatePresence as AnimatePresence11, useAnimation } from "framer-motion";
|
|
10819
10853
|
import { CalendarDotIcon } from "@phosphor-icons/react/dist/ssr";
|
|
10820
|
-
import { jsx as jsx67, jsxs as
|
|
10854
|
+
import { jsx as jsx67, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
10821
10855
|
var dateFnsLocale = ptBR2?.default ?? ptBR2;
|
|
10822
10856
|
function RangePicker({
|
|
10823
10857
|
value,
|
|
@@ -10841,23 +10875,29 @@ function RangePicker({
|
|
|
10841
10875
|
setRange(void 0);
|
|
10842
10876
|
onChange?.(void 0);
|
|
10843
10877
|
};
|
|
10844
|
-
return /* @__PURE__ */
|
|
10845
|
-
/* @__PURE__ */ jsx67(PopoverTriggerBase, { asChild: true, children: /* @__PURE__ */ jsx67(
|
|
10878
|
+
return /* @__PURE__ */ jsxs50(PopoverBase, { open, onOpenChange: setOpen, children: [
|
|
10879
|
+
/* @__PURE__ */ jsx67(PopoverTriggerBase, { asChild: true, className: cn(error && "border-red-500"), children: /* @__PURE__ */ jsx67(
|
|
10846
10880
|
motion15.div,
|
|
10847
10881
|
{
|
|
10848
10882
|
whileTap: { scale: 0.97 },
|
|
10849
10883
|
whileHover: { scale: open ? 1.03 : 1.01 },
|
|
10850
10884
|
transition: { type: "spring", stiffness: 300, damping: 20 },
|
|
10851
|
-
children: /* @__PURE__ */
|
|
10885
|
+
children: /* @__PURE__ */ jsxs50(
|
|
10852
10886
|
ButtonBase,
|
|
10853
10887
|
{
|
|
10854
10888
|
variant: "outline",
|
|
10855
|
-
className:
|
|
10889
|
+
className: cn(
|
|
10890
|
+
"w-full justify-start text-left min-w-0 overflow-hidden",
|
|
10891
|
+
!range && "text-muted-foreground"
|
|
10892
|
+
),
|
|
10856
10893
|
children: [
|
|
10857
10894
|
/* @__PURE__ */ jsx67(
|
|
10858
10895
|
motion15.span,
|
|
10859
10896
|
{
|
|
10860
|
-
className:
|
|
10897
|
+
className: cn(
|
|
10898
|
+
"truncate flex-1",
|
|
10899
|
+
!range && "text-muted-foreground"
|
|
10900
|
+
),
|
|
10861
10901
|
transition: { duration: 0.2 },
|
|
10862
10902
|
animate: controls,
|
|
10863
10903
|
children: range?.from && range?.to ? `${format2(range.from, "P", {
|
|
@@ -10870,7 +10910,7 @@ function RangePicker({
|
|
|
10870
10910
|
{
|
|
10871
10911
|
animate: open ? { rotate: 8, scale: 1.15 } : { rotate: 0, scale: 1 },
|
|
10872
10912
|
transition: { type: "spring", stiffness: 300, damping: 18 },
|
|
10873
|
-
children: /* @__PURE__ */ jsx67(CalendarBlankIcon2, { className: "w-
|
|
10913
|
+
children: /* @__PURE__ */ jsx67(CalendarBlankIcon2, { className: "flex-shrink-0 w-5 h-5 sm:w-6 sm:h-6" })
|
|
10874
10914
|
}
|
|
10875
10915
|
)
|
|
10876
10916
|
]
|
|
@@ -10884,7 +10924,7 @@ function RangePicker({
|
|
|
10884
10924
|
{
|
|
10885
10925
|
asChild: true,
|
|
10886
10926
|
className: "w-auto min-w-[250px] p-0 shadow-xl overflow-y-hidden",
|
|
10887
|
-
children: /* @__PURE__ */
|
|
10927
|
+
children: /* @__PURE__ */ jsxs50(
|
|
10888
10928
|
motion15.div,
|
|
10889
10929
|
{
|
|
10890
10930
|
initial: { opacity: 0, y: 16 },
|
|
@@ -10954,7 +10994,7 @@ function RangePicker({
|
|
|
10954
10994
|
)
|
|
10955
10995
|
}
|
|
10956
10996
|
) }),
|
|
10957
|
-
/* @__PURE__ */
|
|
10997
|
+
/* @__PURE__ */ jsxs50("div", { className: "flex justify-end gap-2 px-4 pb-4", children: [
|
|
10958
10998
|
/* @__PURE__ */ jsx67("div", { style: { display: "inline-block" }, children: /* @__PURE__ */ jsx67(
|
|
10959
10999
|
motion15.div,
|
|
10960
11000
|
{
|
|
@@ -11020,8 +11060,8 @@ RangePicker.displayName = "RangePicker";
|
|
|
11020
11060
|
|
|
11021
11061
|
// src/components/ui/navigation/ContextMenuBase.tsx
|
|
11022
11062
|
import * as ContextMenuPrimitive from "@radix-ui/react-context-menu";
|
|
11023
|
-
import { CaretRightIcon as CaretRightIcon6, CheckIcon as
|
|
11024
|
-
import { jsx as jsx68, jsxs as
|
|
11063
|
+
import { CaretRightIcon as CaretRightIcon6, CheckIcon as CheckIcon10, CircleIcon as CircleIcon2 } from "@phosphor-icons/react";
|
|
11064
|
+
import { jsx as jsx68, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
11025
11065
|
function ContextMenuBase(props) {
|
|
11026
11066
|
return /* @__PURE__ */ jsx68(ContextMenuPrimitive.Root, { "data-slot": "context-menu", ...props });
|
|
11027
11067
|
}
|
|
@@ -11046,7 +11086,7 @@ function ContextMenuSubTriggerBase({
|
|
|
11046
11086
|
children,
|
|
11047
11087
|
...props
|
|
11048
11088
|
}) {
|
|
11049
|
-
return /* @__PURE__ */
|
|
11089
|
+
return /* @__PURE__ */ jsxs51(
|
|
11050
11090
|
ContextMenuPrimitive.SubTrigger,
|
|
11051
11091
|
{
|
|
11052
11092
|
"data-slot": "context-menu-sub-trigger",
|
|
@@ -11142,7 +11182,7 @@ function ContextMenuCheckboxItemBase({
|
|
|
11142
11182
|
checked,
|
|
11143
11183
|
...props
|
|
11144
11184
|
}) {
|
|
11145
|
-
return /* @__PURE__ */
|
|
11185
|
+
return /* @__PURE__ */ jsxs51(
|
|
11146
11186
|
ContextMenuPrimitive.CheckboxItem,
|
|
11147
11187
|
{
|
|
11148
11188
|
"data-slot": "context-menu-checkbox-item",
|
|
@@ -11157,7 +11197,7 @@ function ContextMenuCheckboxItemBase({
|
|
|
11157
11197
|
checked,
|
|
11158
11198
|
...props,
|
|
11159
11199
|
children: [
|
|
11160
|
-
/* @__PURE__ */ jsx68("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx68(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx68(
|
|
11200
|
+
/* @__PURE__ */ jsx68("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx68(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx68(CheckIcon10, { className: "size-4" }) }) }),
|
|
11161
11201
|
children
|
|
11162
11202
|
]
|
|
11163
11203
|
}
|
|
@@ -11168,7 +11208,7 @@ function ContextMenuRadioItemBase({
|
|
|
11168
11208
|
children,
|
|
11169
11209
|
...props
|
|
11170
11210
|
}) {
|
|
11171
|
-
return /* @__PURE__ */
|
|
11211
|
+
return /* @__PURE__ */ jsxs51(
|
|
11172
11212
|
ContextMenuPrimitive.RadioItem,
|
|
11173
11213
|
{
|
|
11174
11214
|
"data-slot": "context-menu-radio-item",
|
|
@@ -11234,7 +11274,7 @@ function ContextMenuShortcutBase({
|
|
|
11234
11274
|
import {
|
|
11235
11275
|
ArrowRightIcon as ArrowRightIcon3,
|
|
11236
11276
|
ArrowsOutIcon,
|
|
11237
|
-
CheckIcon as
|
|
11277
|
+
CheckIcon as CheckIcon11,
|
|
11238
11278
|
CodeIcon,
|
|
11239
11279
|
CopyIcon as CopyIcon2,
|
|
11240
11280
|
DownloadIcon,
|
|
@@ -11245,7 +11285,7 @@ import {
|
|
|
11245
11285
|
} from "@phosphor-icons/react";
|
|
11246
11286
|
import React44 from "react";
|
|
11247
11287
|
import { Prism as SyntaxHighlighter } from "react-syntax-highlighter";
|
|
11248
|
-
import { jsx as jsx69, jsxs as
|
|
11288
|
+
import { jsx as jsx69, jsxs as jsxs52 } from "react/jsx-runtime";
|
|
11249
11289
|
var CodeBlock = ({
|
|
11250
11290
|
language,
|
|
11251
11291
|
filename,
|
|
@@ -11339,23 +11379,23 @@ var CodeBlock = ({
|
|
|
11339
11379
|
return { lines, chars, words };
|
|
11340
11380
|
};
|
|
11341
11381
|
const stats = showStats ? getCodeStats(activeCodeSanitized) : null;
|
|
11342
|
-
return /* @__PURE__ */
|
|
11382
|
+
return /* @__PURE__ */ jsxs52(
|
|
11343
11383
|
"div",
|
|
11344
11384
|
{
|
|
11345
11385
|
className: `relative w-full rounded-xl overflow-hidden shadow-sm border no-underline-code`,
|
|
11346
11386
|
style: cssVars.container,
|
|
11347
11387
|
children: [
|
|
11348
11388
|
/* @__PURE__ */ jsx69("style", { children: `.no-underline-code a { text-decoration: none !important; text-shadow: none !important; box-shadow: none !important; } .no-underline-code code a { text-decoration: none !important; }` }),
|
|
11349
|
-
/* @__PURE__ */
|
|
11350
|
-
/* @__PURE__ */
|
|
11351
|
-
/* @__PURE__ */
|
|
11389
|
+
/* @__PURE__ */ jsxs52("div", { className: `flex items-stretch min-h-[3rem]`, style: cssVars.header, children: [
|
|
11390
|
+
/* @__PURE__ */ jsxs52("div", { className: "flex-1 flex items-center min-w-0 px-3", children: [
|
|
11391
|
+
/* @__PURE__ */ jsxs52("div", { className: "flex gap-2 mr-3 shrink-0", children: [
|
|
11352
11392
|
/* @__PURE__ */ jsx69("div", { className: "w-3 h-3 rounded-full bg-red-500" }),
|
|
11353
11393
|
/* @__PURE__ */ jsx69("div", { className: "w-3 h-3 rounded-full bg-yellow-500" }),
|
|
11354
11394
|
/* @__PURE__ */ jsx69("div", { className: "w-3 h-3 rounded-full bg-green-500" })
|
|
11355
11395
|
] }),
|
|
11356
|
-
breadcrumb.length > 0 && /* @__PURE__ */
|
|
11396
|
+
breadcrumb.length > 0 && /* @__PURE__ */ jsxs52("div", { className: "flex items-center min-w-0", children: [
|
|
11357
11397
|
/* @__PURE__ */ jsx69(FolderIcon, { size: "1em", style: cssVars.icon }),
|
|
11358
|
-
/* @__PURE__ */ jsx69("div", { className: "flex items-center min-w-0 ml-2", children: breadcrumb.map((crumb, index) => /* @__PURE__ */
|
|
11398
|
+
/* @__PURE__ */ jsx69("div", { className: "flex items-center min-w-0 ml-2", children: breadcrumb.map((crumb, index) => /* @__PURE__ */ jsxs52(React44.Fragment, { children: [
|
|
11359
11399
|
/* @__PURE__ */ jsx69(
|
|
11360
11400
|
"span",
|
|
11361
11401
|
{
|
|
@@ -11375,8 +11415,8 @@ var CodeBlock = ({
|
|
|
11375
11415
|
] }, index)) })
|
|
11376
11416
|
] })
|
|
11377
11417
|
] }),
|
|
11378
|
-
/* @__PURE__ */
|
|
11379
|
-
stats && /* @__PURE__ */
|
|
11418
|
+
/* @__PURE__ */ jsxs52("div", { className: "flex items-center justify-end shrink-0 px-2", children: [
|
|
11419
|
+
stats && /* @__PURE__ */ jsxs52(
|
|
11380
11420
|
"div",
|
|
11381
11421
|
{
|
|
11382
11422
|
className: `text-xs mx-2 truncate hidden md:block`,
|
|
@@ -11389,7 +11429,7 @@ var CodeBlock = ({
|
|
|
11389
11429
|
]
|
|
11390
11430
|
}
|
|
11391
11431
|
),
|
|
11392
|
-
/* @__PURE__ */
|
|
11432
|
+
/* @__PURE__ */ jsxs52("div", { className: "flex", children: [
|
|
11393
11433
|
/* @__PURE__ */ jsx69(
|
|
11394
11434
|
"button",
|
|
11395
11435
|
{
|
|
@@ -11415,7 +11455,7 @@ var CodeBlock = ({
|
|
|
11415
11455
|
className: `p-2 transition-colors hover:bg-gray-200 dark:hover:bg-slate-700`,
|
|
11416
11456
|
title: "Copy code",
|
|
11417
11457
|
children: copied ? /* @__PURE__ */ jsx69(
|
|
11418
|
-
|
|
11458
|
+
CheckIcon11,
|
|
11419
11459
|
{
|
|
11420
11460
|
size: "1em",
|
|
11421
11461
|
style: { color: "hsl(var(--primary))" }
|
|
@@ -11434,7 +11474,7 @@ var CodeBlock = ({
|
|
|
11434
11474
|
borderColor: "hsl(var(--border))",
|
|
11435
11475
|
backgroundColor: "hsl(var(--popover))"
|
|
11436
11476
|
},
|
|
11437
|
-
children: tabs.map((tab, index) => /* @__PURE__ */
|
|
11477
|
+
children: tabs.map((tab, index) => /* @__PURE__ */ jsxs52(
|
|
11438
11478
|
"button",
|
|
11439
11479
|
{
|
|
11440
11480
|
onClick: () => setActiveTab(index),
|
|
@@ -11460,7 +11500,7 @@ var CodeBlock = ({
|
|
|
11460
11500
|
borderColor: "hsl(var(--border))",
|
|
11461
11501
|
backgroundColor: "hsl(var(--popover))"
|
|
11462
11502
|
},
|
|
11463
|
-
children: /* @__PURE__ */
|
|
11503
|
+
children: /* @__PURE__ */ jsxs52("div", { className: "flex items-center gap-2 min-w-0", children: [
|
|
11464
11504
|
getLanguageIcon(language),
|
|
11465
11505
|
/* @__PURE__ */ jsx69(
|
|
11466
11506
|
"span",
|
|
@@ -11511,7 +11551,7 @@ var CodeBlock = ({
|
|
|
11511
11551
|
)
|
|
11512
11552
|
}
|
|
11513
11553
|
),
|
|
11514
|
-
showStats && stats && /* @__PURE__ */
|
|
11554
|
+
showStats && stats && /* @__PURE__ */ jsxs52(
|
|
11515
11555
|
"div",
|
|
11516
11556
|
{
|
|
11517
11557
|
className: "px-3 py-2 border-t text-xs flex items-center justify-between min-h-[2.5rem]",
|
|
@@ -11521,18 +11561,18 @@ var CodeBlock = ({
|
|
|
11521
11561
|
color: "hsl(var(--muted-foreground))"
|
|
11522
11562
|
},
|
|
11523
11563
|
children: [
|
|
11524
|
-
/* @__PURE__ */
|
|
11564
|
+
/* @__PURE__ */ jsxs52("div", { className: "flex items-center gap-3 min-w-0", children: [
|
|
11525
11565
|
/* @__PURE__ */ jsx69("span", { className: "truncate", children: activeLanguage.toUpperCase() }),
|
|
11526
|
-
/* @__PURE__ */
|
|
11566
|
+
/* @__PURE__ */ jsxs52("span", { className: "truncate hidden sm:inline", children: [
|
|
11527
11567
|
stats.lines,
|
|
11528
11568
|
" lines"
|
|
11529
11569
|
] }),
|
|
11530
|
-
/* @__PURE__ */
|
|
11570
|
+
/* @__PURE__ */ jsxs52("span", { className: "truncate hidden md:inline", children: [
|
|
11531
11571
|
stats.chars,
|
|
11532
11572
|
" chars"
|
|
11533
11573
|
] })
|
|
11534
11574
|
] }),
|
|
11535
|
-
/* @__PURE__ */
|
|
11575
|
+
/* @__PURE__ */ jsxs52("div", { className: "flex items-center gap-1 shrink-0", children: [
|
|
11536
11576
|
/* @__PURE__ */ jsx69(GearIcon2, { size: "0.75em", style: cssVars.icon }),
|
|
11537
11577
|
/* @__PURE__ */ jsx69("span", { children: "UTF-8" })
|
|
11538
11578
|
] })
|
|
@@ -11545,7 +11585,7 @@ var CodeBlock = ({
|
|
|
11545
11585
|
};
|
|
11546
11586
|
|
|
11547
11587
|
// src/components/ui/data/StatusIndicator.tsx
|
|
11548
|
-
import { jsx as jsx70, jsxs as
|
|
11588
|
+
import { jsx as jsx70, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
11549
11589
|
function StatusIndicator({
|
|
11550
11590
|
color = "green",
|
|
11551
11591
|
size = "sm",
|
|
@@ -11583,7 +11623,7 @@ function StatusIndicator({
|
|
|
11583
11623
|
"flex-shrink-0"
|
|
11584
11624
|
);
|
|
11585
11625
|
if (position === "inline") {
|
|
11586
|
-
return /* @__PURE__ */
|
|
11626
|
+
return /* @__PURE__ */ jsxs53(
|
|
11587
11627
|
"span",
|
|
11588
11628
|
{
|
|
11589
11629
|
className: cn("inline-flex items-center gap-2", className),
|
|
@@ -11595,7 +11635,7 @@ function StatusIndicator({
|
|
|
11595
11635
|
}
|
|
11596
11636
|
);
|
|
11597
11637
|
}
|
|
11598
|
-
return /* @__PURE__ */
|
|
11638
|
+
return /* @__PURE__ */ jsxs53("div", { className: cn("relative inline-flex", className), ...props, children: [
|
|
11599
11639
|
show && /* @__PURE__ */ jsx70(
|
|
11600
11640
|
"span",
|
|
11601
11641
|
{
|
|
@@ -11612,16 +11652,68 @@ function StatusIndicator({
|
|
|
11612
11652
|
}
|
|
11613
11653
|
|
|
11614
11654
|
// src/components/ui/form/DebouncedInput.tsx
|
|
11615
|
-
import { useEffect as useEffect17, useState as
|
|
11655
|
+
import { useEffect as useEffect17, useState as useState20 } from "react";
|
|
11616
11656
|
import { CircleNotchIcon as CircleNotchIcon2 } from "@phosphor-icons/react";
|
|
11617
11657
|
import { jsx as jsx71 } from "react/jsx-runtime";
|
|
11658
|
+
function DebouncedInput({
|
|
11659
|
+
value: initialValue,
|
|
11660
|
+
onChange,
|
|
11661
|
+
debounce = 500,
|
|
11662
|
+
label,
|
|
11663
|
+
labelClassname,
|
|
11664
|
+
leftIcon,
|
|
11665
|
+
rightIcon,
|
|
11666
|
+
showLoadingIndicator = false,
|
|
11667
|
+
className,
|
|
11668
|
+
error,
|
|
11669
|
+
...props
|
|
11670
|
+
}) {
|
|
11671
|
+
const [value, setValue] = useState20(initialValue);
|
|
11672
|
+
const [isDebouncing, setIsDebouncing] = useState20(false);
|
|
11673
|
+
useEffect17(() => {
|
|
11674
|
+
setValue(initialValue);
|
|
11675
|
+
}, [initialValue]);
|
|
11676
|
+
useEffect17(() => {
|
|
11677
|
+
if (value !== initialValue) {
|
|
11678
|
+
setIsDebouncing(true);
|
|
11679
|
+
}
|
|
11680
|
+
const timeout = setTimeout(() => {
|
|
11681
|
+
onChange(value);
|
|
11682
|
+
setIsDebouncing(false);
|
|
11683
|
+
}, debounce);
|
|
11684
|
+
return () => {
|
|
11685
|
+
clearTimeout(timeout);
|
|
11686
|
+
setIsDebouncing(false);
|
|
11687
|
+
};
|
|
11688
|
+
}, [debounce, initialValue, onChange, value]);
|
|
11689
|
+
const renderRightIcon = () => {
|
|
11690
|
+
if (showLoadingIndicator && isDebouncing) {
|
|
11691
|
+
return /* @__PURE__ */ jsx71(CircleNotchIcon2, { className: "h-4 w-4 animate-spin text-muted-foreground" });
|
|
11692
|
+
}
|
|
11693
|
+
return rightIcon;
|
|
11694
|
+
};
|
|
11695
|
+
return /* @__PURE__ */ jsx71(
|
|
11696
|
+
InputBase,
|
|
11697
|
+
{
|
|
11698
|
+
...props,
|
|
11699
|
+
label,
|
|
11700
|
+
labelClassname,
|
|
11701
|
+
leftIcon,
|
|
11702
|
+
rightIcon: renderRightIcon(),
|
|
11703
|
+
className: cn("transition-all duration-200", className),
|
|
11704
|
+
value,
|
|
11705
|
+
onChange: (e) => setValue(e.target.value),
|
|
11706
|
+
error
|
|
11707
|
+
}
|
|
11708
|
+
);
|
|
11709
|
+
}
|
|
11618
11710
|
|
|
11619
11711
|
// src/components/event-calendar/AgendaView.tsx
|
|
11620
11712
|
import { addDays, format as format3, isToday } from "date-fns";
|
|
11621
11713
|
import { ptBR as ptBR3 } from "date-fns/locale";
|
|
11622
11714
|
import { useMemo as useMemo9 } from "react";
|
|
11623
11715
|
import { CalendarIcon as CalendarIcon2 } from "@phosphor-icons/react";
|
|
11624
|
-
import { jsx as jsx72, jsxs as
|
|
11716
|
+
import { jsx as jsx72, jsxs as jsxs54 } from "react/jsx-runtime";
|
|
11625
11717
|
function AgendaView({
|
|
11626
11718
|
currentDate,
|
|
11627
11719
|
events,
|
|
@@ -11642,14 +11734,14 @@ function AgendaView({
|
|
|
11642
11734
|
const hasEvents = days.some(
|
|
11643
11735
|
(day) => getAgendaEventsForDay(events, day).length > 0
|
|
11644
11736
|
);
|
|
11645
|
-
return /* @__PURE__ */ jsx72("div", { className: "border-border/70 border-t px-4", children: !hasEvents ? /* @__PURE__ */
|
|
11737
|
+
return /* @__PURE__ */ jsx72("div", { className: "border-border/70 border-t px-4", children: !hasEvents ? /* @__PURE__ */ jsxs54("div", { className: "flex min-h-[70svh] flex-col items-center justify-center py-16 text-center", children: [
|
|
11646
11738
|
/* @__PURE__ */ jsx72(CalendarIcon2, { className: "mb-2 text-muted-foreground/50", size: 32 }),
|
|
11647
|
-
/* @__PURE__ */ jsx72("h3", { className: "font-medium text-lg", children: "
|
|
11648
|
-
/* @__PURE__ */ jsx72("p", { className: "text-muted-foreground", children: "
|
|
11739
|
+
/* @__PURE__ */ jsx72("h3", { className: "font-medium text-lg", children: "Nenhum evento encontrado" }),
|
|
11740
|
+
/* @__PURE__ */ jsx72("p", { className: "text-muted-foreground", children: "N\xE3o h\xE1 eventos agendados para este per\xEDodo." })
|
|
11649
11741
|
] }) : days.map((day) => {
|
|
11650
11742
|
const dayEvents = getAgendaEventsForDay(events, day);
|
|
11651
11743
|
if (dayEvents.length === 0) return null;
|
|
11652
|
-
return /* @__PURE__ */
|
|
11744
|
+
return /* @__PURE__ */ jsxs54(
|
|
11653
11745
|
"div",
|
|
11654
11746
|
{
|
|
11655
11747
|
className: "relative my-12 border-border/70 border-t",
|
|
@@ -11692,7 +11784,7 @@ import {
|
|
|
11692
11784
|
useSensors
|
|
11693
11785
|
} from "@dnd-kit/core";
|
|
11694
11786
|
import { addMinutes, differenceInMinutes } from "date-fns";
|
|
11695
|
-
import { useId as useId2, useRef as useRef9, useState as
|
|
11787
|
+
import { useId as useId2, useRef as useRef9, useState as useState21 } from "react";
|
|
11696
11788
|
|
|
11697
11789
|
// src/components/event-calendar/hooks.ts
|
|
11698
11790
|
import { createContext as createContext5, useContext as useContext6 } from "react";
|
|
@@ -11709,21 +11801,21 @@ var CalendarDndContext = createContext5({
|
|
|
11709
11801
|
var useCalendarDnd = () => useContext6(CalendarDndContext);
|
|
11710
11802
|
|
|
11711
11803
|
// src/components/event-calendar/CalendarDND.tsx
|
|
11712
|
-
import { jsx as jsx73, jsxs as
|
|
11804
|
+
import { jsx as jsx73, jsxs as jsxs55 } from "react/jsx-runtime";
|
|
11713
11805
|
function CalendarDndProvider({
|
|
11714
11806
|
children,
|
|
11715
11807
|
onEventUpdate
|
|
11716
11808
|
}) {
|
|
11717
|
-
const [activeEvent, setActiveEvent] =
|
|
11718
|
-
const [activeId, setActiveId] =
|
|
11719
|
-
const [activeView, setActiveView] =
|
|
11809
|
+
const [activeEvent, setActiveEvent] = useState21(null);
|
|
11810
|
+
const [activeId, setActiveId] = useState21(null);
|
|
11811
|
+
const [activeView, setActiveView] = useState21(
|
|
11720
11812
|
null
|
|
11721
11813
|
);
|
|
11722
|
-
const [currentTime, setCurrentTime] =
|
|
11723
|
-
const [eventHeight, setEventHeight] =
|
|
11724
|
-
const [isMultiDay, setIsMultiDay] =
|
|
11725
|
-
const [multiDayWidth, setMultiDayWidth] =
|
|
11726
|
-
const [dragHandlePosition, setDragHandlePosition] =
|
|
11814
|
+
const [currentTime, setCurrentTime] = useState21(null);
|
|
11815
|
+
const [eventHeight, setEventHeight] = useState21(null);
|
|
11816
|
+
const [isMultiDay, setIsMultiDay] = useState21(false);
|
|
11817
|
+
const [multiDayWidth, setMultiDayWidth] = useState21(null);
|
|
11818
|
+
const [dragHandlePosition, setDragHandlePosition] = useState21(null);
|
|
11727
11819
|
const eventDimensions = useRef9({ height: 0 });
|
|
11728
11820
|
const sensors = useSensors(
|
|
11729
11821
|
useSensor(MouseSensor, {
|
|
@@ -11882,7 +11974,7 @@ function CalendarDndProvider({
|
|
|
11882
11974
|
onDragOver: handleDragOver,
|
|
11883
11975
|
onDragStart: handleDragStart,
|
|
11884
11976
|
sensors,
|
|
11885
|
-
children: /* @__PURE__ */
|
|
11977
|
+
children: /* @__PURE__ */ jsxs55(
|
|
11886
11978
|
CalendarDndContext.Provider,
|
|
11887
11979
|
{
|
|
11888
11980
|
value: {
|
|
@@ -11949,7 +12041,7 @@ import {
|
|
|
11949
12041
|
startOfDay
|
|
11950
12042
|
} from "date-fns";
|
|
11951
12043
|
import { useMemo as useMemo10 } from "react";
|
|
11952
|
-
import { jsx as jsx74, jsxs as
|
|
12044
|
+
import { jsx as jsx74, jsxs as jsxs56 } from "react/jsx-runtime";
|
|
11953
12045
|
function DayView({
|
|
11954
12046
|
currentDate,
|
|
11955
12047
|
events,
|
|
@@ -12052,8 +12144,8 @@ function DayView({
|
|
|
12052
12144
|
currentDate,
|
|
12053
12145
|
"day"
|
|
12054
12146
|
);
|
|
12055
|
-
return /* @__PURE__ */
|
|
12056
|
-
showAllDaySection && /* @__PURE__ */ jsx74("div", { className: "border-border/70 border-t bg-muted/50", children: /* @__PURE__ */
|
|
12147
|
+
return /* @__PURE__ */ jsxs56("div", { className: "contents", "data-slot": "day-view", children: [
|
|
12148
|
+
showAllDaySection && /* @__PURE__ */ jsx74("div", { className: "border-border/70 border-t bg-muted/50", children: /* @__PURE__ */ jsxs56("div", { className: "grid grid-cols-[3rem_1fr] sm:grid-cols-[4rem_1fr]", children: [
|
|
12057
12149
|
/* @__PURE__ */ jsx74("div", { className: "relative", children: /* @__PURE__ */ jsx74("span", { className: "absolute bottom-0 left-0 h-6 w-16 max-w-full pe-2 text-right text-[10px] text-muted-foreground/70 sm:pe-4 sm:text-xs", children: "All day" }) }),
|
|
12058
12150
|
/* @__PURE__ */ jsx74("div", { className: "relative border-border/70 border-r p-1 last:border-r-0", children: allDayEvents.map((event) => {
|
|
12059
12151
|
const eventStart = new Date(event.start);
|
|
@@ -12074,16 +12166,16 @@ function DayView({
|
|
|
12074
12166
|
);
|
|
12075
12167
|
}) })
|
|
12076
12168
|
] }) }),
|
|
12077
|
-
/* @__PURE__ */
|
|
12169
|
+
/* @__PURE__ */ jsxs56("div", { className: "grid flex-1 grid-cols-[3rem_1fr] overflow-hidden border-border/70 border-t sm:grid-cols-[4rem_1fr]", children: [
|
|
12078
12170
|
/* @__PURE__ */ jsx74("div", { children: hours.map((hour, index) => /* @__PURE__ */ jsx74(
|
|
12079
12171
|
"div",
|
|
12080
12172
|
{
|
|
12081
12173
|
className: "relative h-[var(--week-cells-height)] border-border/70 border-b last:border-b-0",
|
|
12082
|
-
children: index > 0 && /* @__PURE__ */ jsx74("span", { className: "-top-3 absolute left-0 flex h-6 w-16 max-w-full items-center justify-end bg-background pe-2 text-[10px] text-muted-foreground/70 sm:pe-4 sm:text-xs", children: format4(hour, "
|
|
12174
|
+
children: index > 0 && /* @__PURE__ */ jsx74("span", { className: "-top-3 absolute left-0 flex h-6 w-16 max-w-full items-center justify-end bg-background pe-2 text-[10px] text-muted-foreground/70 sm:pe-4 sm:text-xs", children: format4(hour, "HH:mm") })
|
|
12083
12175
|
},
|
|
12084
12176
|
hour.toString()
|
|
12085
12177
|
)) }),
|
|
12086
|
-
/* @__PURE__ */
|
|
12178
|
+
/* @__PURE__ */ jsxs56("div", { className: "relative", children: [
|
|
12087
12179
|
positionedEvents.map((positionedEvent) => /* @__PURE__ */ jsx74(
|
|
12088
12180
|
"div",
|
|
12089
12181
|
{
|
|
@@ -12113,7 +12205,7 @@ function DayView({
|
|
|
12113
12205
|
{
|
|
12114
12206
|
className: "pointer-events-none absolute right-0 left-0 z-20",
|
|
12115
12207
|
style: { top: `${currentTimePosition}%` },
|
|
12116
|
-
children: /* @__PURE__ */
|
|
12208
|
+
children: /* @__PURE__ */ jsxs56("div", { className: "relative flex items-center", children: [
|
|
12117
12209
|
/* @__PURE__ */ jsx74("div", { className: "-left-1 absolute h-2 w-2 rounded-full bg-primary" }),
|
|
12118
12210
|
/* @__PURE__ */ jsx74("div", { className: "h-[2px] w-full bg-primary" })
|
|
12119
12211
|
] })
|
|
@@ -12163,7 +12255,7 @@ function DayView({
|
|
|
12163
12255
|
import { useDraggable } from "@dnd-kit/core";
|
|
12164
12256
|
import { CSS } from "@dnd-kit/utilities";
|
|
12165
12257
|
import { differenceInDays } from "date-fns";
|
|
12166
|
-
import { useRef as useRef10, useState as
|
|
12258
|
+
import { useRef as useRef10, useState as useState22 } from "react";
|
|
12167
12259
|
import { jsx as jsx75 } from "react/jsx-runtime";
|
|
12168
12260
|
function DraggableEvent({
|
|
12169
12261
|
event,
|
|
@@ -12179,7 +12271,7 @@ function DraggableEvent({
|
|
|
12179
12271
|
}) {
|
|
12180
12272
|
const { activeId } = useCalendarDnd();
|
|
12181
12273
|
const elementRef = useRef10(null);
|
|
12182
|
-
const [dragHandlePosition, setDragHandlePosition] =
|
|
12274
|
+
const [dragHandlePosition, setDragHandlePosition] = useState22(null);
|
|
12183
12275
|
const eventStart = new Date(event.start);
|
|
12184
12276
|
const eventEnd = new Date(event.end);
|
|
12185
12277
|
const isMultiDayEvent2 = isMultiDay || event.allDay || differenceInDays(eventEnd, eventStart) >= 1;
|
|
@@ -12314,7 +12406,7 @@ import {
|
|
|
12314
12406
|
subWeeks
|
|
12315
12407
|
} from "date-fns";
|
|
12316
12408
|
import { ptBR as ptBR4 } from "date-fns/locale";
|
|
12317
|
-
import { useEffect as useEffect18, useMemo as useMemo11, useState as
|
|
12409
|
+
import { useEffect as useEffect18, useMemo as useMemo11, useState as useState23, useCallback as useCallback12 } from "react";
|
|
12318
12410
|
import { toast as toast3 } from "sonner";
|
|
12319
12411
|
import {
|
|
12320
12412
|
ArrowDownIcon,
|
|
@@ -12323,7 +12415,7 @@ import {
|
|
|
12323
12415
|
CalendarIcon as CalendarIcon3,
|
|
12324
12416
|
PlusIcon as PlusIcon3
|
|
12325
12417
|
} from "@phosphor-icons/react";
|
|
12326
|
-
import { Fragment as Fragment10, jsx as jsx77, jsxs as
|
|
12418
|
+
import { Fragment as Fragment10, jsx as jsx77, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
12327
12419
|
function EventCalendar({
|
|
12328
12420
|
events = [],
|
|
12329
12421
|
onEventAdd,
|
|
@@ -12332,9 +12424,9 @@ function EventCalendar({
|
|
|
12332
12424
|
className,
|
|
12333
12425
|
initialView = "month"
|
|
12334
12426
|
}) {
|
|
12335
|
-
const [currentDate, setCurrentDate] =
|
|
12336
|
-
const [view, setView] =
|
|
12337
|
-
const [isFading, setIsFading] =
|
|
12427
|
+
const [currentDate, setCurrentDate] = useState23(/* @__PURE__ */ new Date());
|
|
12428
|
+
const [view, setView] = useState23(initialView);
|
|
12429
|
+
const [isFading, setIsFading] = useState23(false);
|
|
12338
12430
|
const FADE_DURATION = 220;
|
|
12339
12431
|
const changeView = useCallback12(
|
|
12340
12432
|
(next) => {
|
|
@@ -12347,8 +12439,8 @@ function EventCalendar({
|
|
|
12347
12439
|
},
|
|
12348
12440
|
[view]
|
|
12349
12441
|
);
|
|
12350
|
-
const [isPaging, setIsPaging] =
|
|
12351
|
-
const [pageDirection, setPageDirection] =
|
|
12442
|
+
const [isPaging, setIsPaging] = useState23(false);
|
|
12443
|
+
const [pageDirection, setPageDirection] = useState23(
|
|
12352
12444
|
null
|
|
12353
12445
|
);
|
|
12354
12446
|
const PAGE_DURATION = 200;
|
|
@@ -12366,8 +12458,8 @@ function EventCalendar({
|
|
|
12366
12458
|
},
|
|
12367
12459
|
[]
|
|
12368
12460
|
);
|
|
12369
|
-
const [isEventDialogOpen, setIsEventDialogOpen] =
|
|
12370
|
-
const [selectedEvent, setSelectedEvent] =
|
|
12461
|
+
const [isEventDialogOpen, setIsEventDialogOpen] = useState23(false);
|
|
12462
|
+
const [selectedEvent, setSelectedEvent] = useState23(
|
|
12371
12463
|
null
|
|
12372
12464
|
);
|
|
12373
12465
|
useEffect18(() => {
|
|
@@ -12526,7 +12618,7 @@ function EventCalendar({
|
|
|
12526
12618
|
const year = format5(currentDate, "yyyy", { locale: ptBR4 });
|
|
12527
12619
|
const short = `${dayNum} de ${month} de ${year}`;
|
|
12528
12620
|
const long = `${format5(currentDate, "EEE", { locale: ptBR4 })}, ${dayNum} de ${month} de ${year}`;
|
|
12529
|
-
return /* @__PURE__ */
|
|
12621
|
+
return /* @__PURE__ */ jsxs57(Fragment10, { children: [
|
|
12530
12622
|
/* @__PURE__ */ jsx77("span", { "aria-hidden": "true", className: "min-[480px]:hidden", children: short }),
|
|
12531
12623
|
/* @__PURE__ */ jsx77("span", { "aria-hidden": "true", className: "max-[479px]:hidden min-md:hidden", children: short }),
|
|
12532
12624
|
/* @__PURE__ */ jsx77("span", { className: "max-md:hidden", children: long })
|
|
@@ -12553,8 +12645,8 @@ function EventCalendar({
|
|
|
12553
12645
|
"--event-height": `${EventHeight}px`,
|
|
12554
12646
|
"--week-cells-height": `${WeekCellsHeight}px`
|
|
12555
12647
|
},
|
|
12556
|
-
children: /* @__PURE__ */
|
|
12557
|
-
/* @__PURE__ */
|
|
12648
|
+
children: /* @__PURE__ */ jsxs57(CalendarDndProvider, { onEventUpdate: handleEventUpdate, children: [
|
|
12649
|
+
/* @__PURE__ */ jsxs57(
|
|
12558
12650
|
"div",
|
|
12559
12651
|
{
|
|
12560
12652
|
className: cn(
|
|
@@ -12562,8 +12654,8 @@ function EventCalendar({
|
|
|
12562
12654
|
className
|
|
12563
12655
|
),
|
|
12564
12656
|
children: [
|
|
12565
|
-
/* @__PURE__ */
|
|
12566
|
-
/* @__PURE__ */
|
|
12657
|
+
/* @__PURE__ */ jsxs57("div", { className: "flex items-center gap-1 sm:gap-4", children: [
|
|
12658
|
+
/* @__PURE__ */ jsxs57(
|
|
12567
12659
|
ButtonBase,
|
|
12568
12660
|
{
|
|
12569
12661
|
className: "max-[479px]:aspect-square max-[479px]:p-0!",
|
|
@@ -12582,7 +12674,7 @@ function EventCalendar({
|
|
|
12582
12674
|
]
|
|
12583
12675
|
}
|
|
12584
12676
|
),
|
|
12585
|
-
/* @__PURE__ */
|
|
12677
|
+
/* @__PURE__ */ jsxs57("div", { className: "flex items-center sm:gap-2", children: [
|
|
12586
12678
|
/* @__PURE__ */ jsx77(
|
|
12587
12679
|
ButtonBase,
|
|
12588
12680
|
{
|
|
@@ -12606,15 +12698,15 @@ function EventCalendar({
|
|
|
12606
12698
|
] }),
|
|
12607
12699
|
/* @__PURE__ */ jsx77("h2", { className: "font-semibold text-sm sm:text-lg md:text-xl", children: viewTitle })
|
|
12608
12700
|
] }),
|
|
12609
|
-
/* @__PURE__ */
|
|
12610
|
-
/* @__PURE__ */
|
|
12611
|
-
/* @__PURE__ */ jsx77(DropDownMenuTriggerBase, { asChild: true, children: /* @__PURE__ */
|
|
12701
|
+
/* @__PURE__ */ jsxs57("div", { className: "flex items-center gap-2", children: [
|
|
12702
|
+
/* @__PURE__ */ jsxs57(DropDownMenuBase, { children: [
|
|
12703
|
+
/* @__PURE__ */ jsx77(DropDownMenuTriggerBase, { asChild: true, children: /* @__PURE__ */ jsxs57(
|
|
12612
12704
|
ButtonBase,
|
|
12613
12705
|
{
|
|
12614
12706
|
className: "gap-1.5 max-[479px]:h-8",
|
|
12615
12707
|
variant: "outline",
|
|
12616
12708
|
children: [
|
|
12617
|
-
/* @__PURE__ */
|
|
12709
|
+
/* @__PURE__ */ jsxs57("span", { children: [
|
|
12618
12710
|
/* @__PURE__ */ jsx77("span", { "aria-hidden": "true", className: "min-[480px]:hidden", children: (() => {
|
|
12619
12711
|
const labels = {
|
|
12620
12712
|
month: "M\xEAs",
|
|
@@ -12645,26 +12737,26 @@ function EventCalendar({
|
|
|
12645
12737
|
]
|
|
12646
12738
|
}
|
|
12647
12739
|
) }),
|
|
12648
|
-
/* @__PURE__ */
|
|
12649
|
-
/* @__PURE__ */
|
|
12740
|
+
/* @__PURE__ */ jsxs57(DropDownMenuContentBase, { align: "end", className: "min-w-32", children: [
|
|
12741
|
+
/* @__PURE__ */ jsxs57(DropDownMenuItemBase, { onClick: () => changeView("month"), children: [
|
|
12650
12742
|
"M\xEAs ",
|
|
12651
12743
|
/* @__PURE__ */ jsx77(DropDownMenuShortcutBase, { children: "M" })
|
|
12652
12744
|
] }),
|
|
12653
|
-
/* @__PURE__ */
|
|
12745
|
+
/* @__PURE__ */ jsxs57(DropDownMenuItemBase, { onClick: () => changeView("week"), children: [
|
|
12654
12746
|
"Semana ",
|
|
12655
12747
|
/* @__PURE__ */ jsx77(DropDownMenuShortcutBase, { children: "S" })
|
|
12656
12748
|
] }),
|
|
12657
|
-
/* @__PURE__ */
|
|
12749
|
+
/* @__PURE__ */ jsxs57(DropDownMenuItemBase, { onClick: () => changeView("day"), children: [
|
|
12658
12750
|
"Dia ",
|
|
12659
12751
|
/* @__PURE__ */ jsx77(DropDownMenuShortcutBase, { children: "D" })
|
|
12660
12752
|
] }),
|
|
12661
|
-
/* @__PURE__ */
|
|
12753
|
+
/* @__PURE__ */ jsxs57(DropDownMenuItemBase, { onClick: () => changeView("agenda"), children: [
|
|
12662
12754
|
"Agenda ",
|
|
12663
12755
|
/* @__PURE__ */ jsx77(DropDownMenuShortcutBase, { children: "A" })
|
|
12664
12756
|
] })
|
|
12665
12757
|
] })
|
|
12666
12758
|
] }),
|
|
12667
|
-
/* @__PURE__ */
|
|
12759
|
+
/* @__PURE__ */ jsxs57(
|
|
12668
12760
|
ButtonBase,
|
|
12669
12761
|
{
|
|
12670
12762
|
className: "max-[479px]:aspect-square max-[479px]:p-0!",
|
|
@@ -12690,7 +12782,7 @@ function EventCalendar({
|
|
|
12690
12782
|
]
|
|
12691
12783
|
}
|
|
12692
12784
|
),
|
|
12693
|
-
/* @__PURE__ */
|
|
12785
|
+
/* @__PURE__ */ jsxs57(
|
|
12694
12786
|
"div",
|
|
12695
12787
|
{
|
|
12696
12788
|
className: cn(
|
|
@@ -12757,12 +12849,12 @@ function EventCalendar({
|
|
|
12757
12849
|
|
|
12758
12850
|
// src/components/event-calendar/EventDialog.tsx
|
|
12759
12851
|
import { format as format6, isBefore } from "date-fns";
|
|
12760
|
-
import { useCallback as useCallback13, useEffect as useEffect19, useMemo as useMemo12, useState as
|
|
12852
|
+
import { useCallback as useCallback13, useEffect as useEffect19, useMemo as useMemo12, useState as useState24 } from "react";
|
|
12761
12853
|
import { RadioGroup as RadioGroup3, RadioGroupItem } from "@radix-ui/react-radio-group";
|
|
12762
12854
|
import { motion as motion16 } from "framer-motion";
|
|
12763
12855
|
import { ptBR as ptBR5 } from "date-fns/locale";
|
|
12764
12856
|
import { CalendarIcon as CalendarIcon4, TrashIcon as TrashIcon3 } from "@phosphor-icons/react";
|
|
12765
|
-
import { jsx as jsx78, jsxs as
|
|
12857
|
+
import { jsx as jsx78, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
12766
12858
|
function EventDialog({
|
|
12767
12859
|
event,
|
|
12768
12860
|
isOpen,
|
|
@@ -12770,18 +12862,18 @@ function EventDialog({
|
|
|
12770
12862
|
onSave,
|
|
12771
12863
|
onDelete
|
|
12772
12864
|
}) {
|
|
12773
|
-
const [title, setTitle] =
|
|
12774
|
-
const [description, setDescription] =
|
|
12775
|
-
const [startDate, setStartDate] =
|
|
12776
|
-
const [endDate, setEndDate] =
|
|
12777
|
-
const [startTime, setStartTime] =
|
|
12778
|
-
const [endTime, setEndTime] =
|
|
12779
|
-
const [allDay, setAllDay] =
|
|
12780
|
-
const [location, setLocation] =
|
|
12781
|
-
const [color, setColor] =
|
|
12782
|
-
const [error, setError] =
|
|
12783
|
-
const [startDateOpen, setStartDateOpen] =
|
|
12784
|
-
const [endDateOpen, setEndDateOpen] =
|
|
12865
|
+
const [title, setTitle] = useState24("");
|
|
12866
|
+
const [description, setDescription] = useState24("");
|
|
12867
|
+
const [startDate, setStartDate] = useState24(/* @__PURE__ */ new Date());
|
|
12868
|
+
const [endDate, setEndDate] = useState24(/* @__PURE__ */ new Date());
|
|
12869
|
+
const [startTime, setStartTime] = useState24(`${DefaultStartHour}:00`);
|
|
12870
|
+
const [endTime, setEndTime] = useState24(`${DefaultEndHour}:00`);
|
|
12871
|
+
const [allDay, setAllDay] = useState24(false);
|
|
12872
|
+
const [location, setLocation] = useState24("");
|
|
12873
|
+
const [color, setColor] = useState24("sky");
|
|
12874
|
+
const [error, setError] = useState24(null);
|
|
12875
|
+
const [startDateOpen, setStartDateOpen] = useState24(false);
|
|
12876
|
+
const [endDateOpen, setEndDateOpen] = useState24(false);
|
|
12785
12877
|
useEffect19(() => {
|
|
12786
12878
|
}, [event]);
|
|
12787
12879
|
const resetForm = useCallback13(() => {
|
|
@@ -12920,7 +13012,7 @@ function EventDialog({
|
|
|
12920
13012
|
},
|
|
12921
13013
|
exit: { opacity: 0, y: 8, scale: 0.995, transition: { duration: 0.12 } }
|
|
12922
13014
|
};
|
|
12923
|
-
return /* @__PURE__ */ jsx78(DialogBase, { onOpenChange: (open) => !open && onClose(), open: isOpen, children: /* @__PURE__ */ jsx78(DialogContentBase, { className: "sm:max-w-[425px]", children: /* @__PURE__ */
|
|
13015
|
+
return /* @__PURE__ */ jsx78(DialogBase, { onOpenChange: (open) => !open && onClose(), open: isOpen, children: /* @__PURE__ */ jsx78(DialogContentBase, { className: "sm:max-w-[425px]", children: /* @__PURE__ */ jsxs58(
|
|
12924
13016
|
motion16.div,
|
|
12925
13017
|
{
|
|
12926
13018
|
variants: dialogVariants2,
|
|
@@ -12928,13 +13020,13 @@ function EventDialog({
|
|
|
12928
13020
|
animate: "visible",
|
|
12929
13021
|
exit: "exit",
|
|
12930
13022
|
children: [
|
|
12931
|
-
/* @__PURE__ */
|
|
13023
|
+
/* @__PURE__ */ jsxs58(DialogHeaderBase, { children: [
|
|
12932
13024
|
/* @__PURE__ */ jsx78(DialogTitleBase, { children: event?.id ? "Editar evento" : "Criar evento" }),
|
|
12933
13025
|
/* @__PURE__ */ jsx78(DialogDescriptionBase, { className: "sr-only", children: event?.id ? "Edite os detalhes deste evento" : "Adicione um novo evento ao seu calend\xE1rio" })
|
|
12934
13026
|
] }),
|
|
12935
13027
|
error && /* @__PURE__ */ jsx78("div", { className: "rounded-md bg-destructive/15 px-3 py-2 text-destructive text-sm", children: error }),
|
|
12936
|
-
/* @__PURE__ */
|
|
12937
|
-
/* @__PURE__ */
|
|
13028
|
+
/* @__PURE__ */ jsxs58("div", { className: "grid gap-4 py-4", children: [
|
|
13029
|
+
/* @__PURE__ */ jsxs58("div", { className: "*:not-first:mt-1.5", children: [
|
|
12938
13030
|
/* @__PURE__ */ jsx78(
|
|
12939
13031
|
LabelBase_default,
|
|
12940
13032
|
{
|
|
@@ -12952,7 +13044,7 @@ function EventDialog({
|
|
|
12952
13044
|
}
|
|
12953
13045
|
)
|
|
12954
13046
|
] }),
|
|
12955
|
-
/* @__PURE__ */
|
|
13047
|
+
/* @__PURE__ */ jsxs58("div", { className: "*:not-first:mt-1.5", children: [
|
|
12956
13048
|
/* @__PURE__ */ jsx78(
|
|
12957
13049
|
LabelBase_default,
|
|
12958
13050
|
{
|
|
@@ -12971,8 +13063,8 @@ function EventDialog({
|
|
|
12971
13063
|
}
|
|
12972
13064
|
)
|
|
12973
13065
|
] }),
|
|
12974
|
-
/* @__PURE__ */
|
|
12975
|
-
/* @__PURE__ */
|
|
13066
|
+
/* @__PURE__ */ jsxs58("div", { className: "flex gap-4", children: [
|
|
13067
|
+
/* @__PURE__ */ jsxs58("div", { className: "flex-1 *:not-first:mt-1.5", children: [
|
|
12976
13068
|
/* @__PURE__ */ jsx78(
|
|
12977
13069
|
LabelBase_default,
|
|
12978
13070
|
{
|
|
@@ -12981,13 +13073,13 @@ function EventDialog({
|
|
|
12981
13073
|
children: "Data de in\xEDcio"
|
|
12982
13074
|
}
|
|
12983
13075
|
),
|
|
12984
|
-
/* @__PURE__ */
|
|
13076
|
+
/* @__PURE__ */ jsxs58(
|
|
12985
13077
|
PopoverBase,
|
|
12986
13078
|
{
|
|
12987
13079
|
onOpenChange: setStartDateOpen,
|
|
12988
13080
|
open: startDateOpen,
|
|
12989
13081
|
children: [
|
|
12990
|
-
/* @__PURE__ */ jsx78(PopoverTriggerBase, { asChild: true, children: /* @__PURE__ */
|
|
13082
|
+
/* @__PURE__ */ jsx78(PopoverTriggerBase, { asChild: true, children: /* @__PURE__ */ jsxs58(
|
|
12991
13083
|
ButtonBase,
|
|
12992
13084
|
{
|
|
12993
13085
|
className: cn(
|
|
@@ -13040,7 +13132,7 @@ function EventDialog({
|
|
|
13040
13132
|
}
|
|
13041
13133
|
)
|
|
13042
13134
|
] }),
|
|
13043
|
-
!allDay && /* @__PURE__ */
|
|
13135
|
+
!allDay && /* @__PURE__ */ jsxs58("div", { className: "min-w-28 *:not-first:mt-1.5", children: [
|
|
13044
13136
|
/* @__PURE__ */ jsx78(
|
|
13045
13137
|
LabelBase_default,
|
|
13046
13138
|
{
|
|
@@ -13049,14 +13141,14 @@ function EventDialog({
|
|
|
13049
13141
|
children: "Hor\xE1rio de in\xEDcio"
|
|
13050
13142
|
}
|
|
13051
13143
|
),
|
|
13052
|
-
/* @__PURE__ */
|
|
13144
|
+
/* @__PURE__ */ jsxs58(SelectBase, { onValueChange: setStartTime, value: startTime, children: [
|
|
13053
13145
|
/* @__PURE__ */ jsx78(SelectTriggerBase, { id: "start-time", children: /* @__PURE__ */ jsx78(SelectValueBase, { placeholder: "Selecionar hor\xE1rio" }) }),
|
|
13054
13146
|
/* @__PURE__ */ jsx78(SelectContentBase, { children: timeOptions.map((option) => /* @__PURE__ */ jsx78(SelectItemBase, { value: option.value, children: option.label }, option.value)) })
|
|
13055
13147
|
] })
|
|
13056
13148
|
] })
|
|
13057
13149
|
] }),
|
|
13058
|
-
/* @__PURE__ */
|
|
13059
|
-
/* @__PURE__ */
|
|
13150
|
+
/* @__PURE__ */ jsxs58("div", { className: "flex gap-4", children: [
|
|
13151
|
+
/* @__PURE__ */ jsxs58("div", { className: "flex-1 *:not-first:mt-1.5", children: [
|
|
13060
13152
|
/* @__PURE__ */ jsx78(
|
|
13061
13153
|
LabelBase_default,
|
|
13062
13154
|
{
|
|
@@ -13065,8 +13157,8 @@ function EventDialog({
|
|
|
13065
13157
|
children: "Data de t\xE9rmino"
|
|
13066
13158
|
}
|
|
13067
13159
|
),
|
|
13068
|
-
/* @__PURE__ */
|
|
13069
|
-
/* @__PURE__ */ jsx78(PopoverTriggerBase, { asChild: true, children: /* @__PURE__ */
|
|
13160
|
+
/* @__PURE__ */ jsxs58(PopoverBase, { onOpenChange: setEndDateOpen, open: endDateOpen, children: [
|
|
13161
|
+
/* @__PURE__ */ jsx78(PopoverTriggerBase, { asChild: true, children: /* @__PURE__ */ jsxs58(
|
|
13070
13162
|
ButtonBase,
|
|
13071
13163
|
{
|
|
13072
13164
|
className: cn(
|
|
@@ -13115,7 +13207,7 @@ function EventDialog({
|
|
|
13115
13207
|
) })
|
|
13116
13208
|
] })
|
|
13117
13209
|
] }),
|
|
13118
|
-
!allDay && /* @__PURE__ */
|
|
13210
|
+
!allDay && /* @__PURE__ */ jsxs58("div", { className: "min-w-28 *:not-first:mt-1.5", children: [
|
|
13119
13211
|
/* @__PURE__ */ jsx78(
|
|
13120
13212
|
LabelBase_default,
|
|
13121
13213
|
{
|
|
@@ -13124,13 +13216,13 @@ function EventDialog({
|
|
|
13124
13216
|
children: "Hor\xE1rio de t\xE9rmino"
|
|
13125
13217
|
}
|
|
13126
13218
|
),
|
|
13127
|
-
/* @__PURE__ */
|
|
13219
|
+
/* @__PURE__ */ jsxs58(SelectBase, { onValueChange: setEndTime, value: endTime, children: [
|
|
13128
13220
|
/* @__PURE__ */ jsx78(SelectTriggerBase, { id: "end-time", children: /* @__PURE__ */ jsx78(SelectValueBase, { placeholder: "Selecionar hor\xE1rio" }) }),
|
|
13129
13221
|
/* @__PURE__ */ jsx78(SelectContentBase, { children: timeOptions.map((option) => /* @__PURE__ */ jsx78(SelectItemBase, { value: option.value, children: option.label }, option.value)) })
|
|
13130
13222
|
] })
|
|
13131
13223
|
] })
|
|
13132
13224
|
] }),
|
|
13133
|
-
/* @__PURE__ */ jsx78("div", { className: "flex items-center gap-2", children: /* @__PURE__ */
|
|
13225
|
+
/* @__PURE__ */ jsx78("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsxs58(
|
|
13134
13226
|
ButtonBase,
|
|
13135
13227
|
{
|
|
13136
13228
|
"aria-pressed": allDay,
|
|
@@ -13150,7 +13242,7 @@ function EventDialog({
|
|
|
13150
13242
|
]
|
|
13151
13243
|
}
|
|
13152
13244
|
) }),
|
|
13153
|
-
/* @__PURE__ */
|
|
13245
|
+
/* @__PURE__ */ jsxs58("div", { className: "*:not-first:mt-1.5", children: [
|
|
13154
13246
|
/* @__PURE__ */ jsx78(
|
|
13155
13247
|
LabelBase_default,
|
|
13156
13248
|
{
|
|
@@ -13168,7 +13260,7 @@ function EventDialog({
|
|
|
13168
13260
|
}
|
|
13169
13261
|
)
|
|
13170
13262
|
] }),
|
|
13171
|
-
/* @__PURE__ */
|
|
13263
|
+
/* @__PURE__ */ jsxs58("fieldset", { className: "space-y-4", children: [
|
|
13172
13264
|
/* @__PURE__ */ jsx78("legend", { className: "font-medium text-foreground text-sm leading-none", children: "Cor do evento" }),
|
|
13173
13265
|
/* @__PURE__ */ jsx78(
|
|
13174
13266
|
RadioGroup3,
|
|
@@ -13196,7 +13288,7 @@ function EventDialog({
|
|
|
13196
13288
|
)
|
|
13197
13289
|
] })
|
|
13198
13290
|
] }),
|
|
13199
|
-
/* @__PURE__ */
|
|
13291
|
+
/* @__PURE__ */ jsxs58(DialogFooterBase, { className: "flex-row sm:justify-between", children: [
|
|
13200
13292
|
event?.id && /* @__PURE__ */ jsx78(
|
|
13201
13293
|
ButtonBase,
|
|
13202
13294
|
{
|
|
@@ -13207,7 +13299,7 @@ function EventDialog({
|
|
|
13207
13299
|
children: /* @__PURE__ */ jsx78(TrashIcon3, { "aria-hidden": "true", size: 16 })
|
|
13208
13300
|
}
|
|
13209
13301
|
),
|
|
13210
|
-
/* @__PURE__ */
|
|
13302
|
+
/* @__PURE__ */ jsxs58("div", { className: "flex flex-1 justify-end gap-2", children: [
|
|
13211
13303
|
/* @__PURE__ */ jsx78(ButtonBase, { onClick: onClose, variant: "outline", children: "Cancelar" }),
|
|
13212
13304
|
/* @__PURE__ */ jsx78(ButtonBase, { onClick: handleSave, disabled: Boolean(error), children: "Salvar" })
|
|
13213
13305
|
] })
|
|
@@ -13218,11 +13310,11 @@ function EventDialog({
|
|
|
13218
13310
|
}
|
|
13219
13311
|
|
|
13220
13312
|
// src/components/event-calendar/EventItem.tsx
|
|
13221
|
-
import { differenceInMinutes as differenceInMinutes3, format as format7,
|
|
13313
|
+
import { differenceInMinutes as differenceInMinutes3, format as format7, isPast } from "date-fns";
|
|
13222
13314
|
import { useMemo as useMemo13 } from "react";
|
|
13223
|
-
import { Fragment as Fragment11, jsx as jsx79, jsxs as
|
|
13315
|
+
import { Fragment as Fragment11, jsx as jsx79, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
13224
13316
|
var formatTimeWithOptionalMinutes = (date) => {
|
|
13225
|
-
return format7(date,
|
|
13317
|
+
return format7(date, "HH:mm");
|
|
13226
13318
|
};
|
|
13227
13319
|
function EventWrapper({
|
|
13228
13320
|
event,
|
|
@@ -13324,7 +13416,7 @@ function EventItem({
|
|
|
13324
13416
|
onClick,
|
|
13325
13417
|
onMouseDown,
|
|
13326
13418
|
onTouchStart,
|
|
13327
|
-
children: children || /* @__PURE__ */
|
|
13419
|
+
children: children || /* @__PURE__ */ jsxs59("span", { className: "flex items-center gap-2 truncate", children: [
|
|
13328
13420
|
!event.allDay && /* @__PURE__ */ jsx79("span", { className: "truncate font-normal opacity-80 sm:text-[11px] bg-white/10 px-2 py-0.5 rounded-full text-[11px]", children: formatTimeWithOptionalMinutes(displayStart) }),
|
|
13329
13421
|
/* @__PURE__ */ jsx79("span", { className: "truncate font-medium", children: event.title })
|
|
13330
13422
|
] })
|
|
@@ -13352,17 +13444,17 @@ function EventItem({
|
|
|
13352
13444
|
onClick,
|
|
13353
13445
|
onMouseDown,
|
|
13354
13446
|
onTouchStart,
|
|
13355
|
-
children: durationMinutes < 45 ? /* @__PURE__ */
|
|
13447
|
+
children: durationMinutes < 45 ? /* @__PURE__ */ jsxs59("div", { className: "flex items-center justify-between w-full", children: [
|
|
13356
13448
|
/* @__PURE__ */ jsx79("div", { className: "truncate", children: event.title }),
|
|
13357
13449
|
showTime && /* @__PURE__ */ jsx79("span", { className: "ml-2 inline-block bg-white/10 px-2 py-0.5 rounded-full text-[11px] opacity-90", children: formatTimeWithOptionalMinutes(displayStart) })
|
|
13358
|
-
] }) : /* @__PURE__ */
|
|
13450
|
+
] }) : /* @__PURE__ */ jsxs59(Fragment11, { children: [
|
|
13359
13451
|
/* @__PURE__ */ jsx79("div", { className: "truncate font-medium", children: event.title }),
|
|
13360
13452
|
showTime && /* @__PURE__ */ jsx79("div", { className: "truncate font-normal opacity-70 sm:text-[11px]", children: /* @__PURE__ */ jsx79("span", { className: "inline-block bg-white/5 px-2 py-0.5 rounded-full", children: getEventTime() }) })
|
|
13361
13453
|
] })
|
|
13362
13454
|
}
|
|
13363
13455
|
);
|
|
13364
13456
|
}
|
|
13365
|
-
return /* @__PURE__ */
|
|
13457
|
+
return /* @__PURE__ */ jsxs59(
|
|
13366
13458
|
"button",
|
|
13367
13459
|
{
|
|
13368
13460
|
className: cn(
|
|
@@ -13380,14 +13472,14 @@ function EventItem({
|
|
|
13380
13472
|
...dndAttributes,
|
|
13381
13473
|
children: [
|
|
13382
13474
|
/* @__PURE__ */ jsx79("div", { className: "font-medium text-sm", children: event.title }),
|
|
13383
|
-
/* @__PURE__ */
|
|
13384
|
-
event.allDay ? /* @__PURE__ */ jsx79("span", { className: "uppercase", children: "All day" }) : /* @__PURE__ */
|
|
13475
|
+
/* @__PURE__ */ jsxs59("div", { className: "text-xs opacity-70 flex items-center gap-2", children: [
|
|
13476
|
+
event.allDay ? /* @__PURE__ */ jsx79("span", { className: "uppercase", children: "All day" }) : /* @__PURE__ */ jsxs59("span", { className: "uppercase", children: [
|
|
13385
13477
|
formatTimeWithOptionalMinutes(displayStart),
|
|
13386
13478
|
" -",
|
|
13387
13479
|
" ",
|
|
13388
13480
|
formatTimeWithOptionalMinutes(displayEnd)
|
|
13389
13481
|
] }),
|
|
13390
|
-
event.location && /* @__PURE__ */
|
|
13482
|
+
event.location && /* @__PURE__ */ jsxs59("span", { className: "opacity-80 flex items-center gap-1", children: [
|
|
13391
13483
|
"-",
|
|
13392
13484
|
/* @__PURE__ */ jsx79("span", { className: "truncate", children: event.location })
|
|
13393
13485
|
] })
|
|
@@ -13416,7 +13508,7 @@ import { ptBR as ptBR6 } from "date-fns/locale";
|
|
|
13416
13508
|
import { useEffect as useEffect20, useMemo as useMemo14, useRef as useRef11 } from "react";
|
|
13417
13509
|
import { motion as motion17 } from "framer-motion";
|
|
13418
13510
|
import { XIcon as XIcon11 } from "@phosphor-icons/react";
|
|
13419
|
-
import { jsx as jsx80, jsxs as
|
|
13511
|
+
import { jsx as jsx80, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
13420
13512
|
function EventsPopup({
|
|
13421
13513
|
date,
|
|
13422
13514
|
events,
|
|
@@ -13466,7 +13558,7 @@ function EventsPopup({
|
|
|
13466
13558
|
}
|
|
13467
13559
|
return positionCopy;
|
|
13468
13560
|
}, [position]);
|
|
13469
|
-
return /* @__PURE__ */
|
|
13561
|
+
return /* @__PURE__ */ jsxs60(
|
|
13470
13562
|
motion17.div,
|
|
13471
13563
|
{
|
|
13472
13564
|
className: "absolute z-50 max-h-96 w-80 overflow-auto rounded-md border bg-background shadow-lg",
|
|
@@ -13480,7 +13572,7 @@ function EventsPopup({
|
|
|
13480
13572
|
exit: { opacity: 0, scale: 0.98, y: -6 },
|
|
13481
13573
|
transition: { duration: 0.18 },
|
|
13482
13574
|
children: [
|
|
13483
|
-
/* @__PURE__ */
|
|
13575
|
+
/* @__PURE__ */ jsxs60("div", { className: "sticky top-0 flex items-center justify-between border-b bg-background p-3", children: [
|
|
13484
13576
|
/* @__PURE__ */ jsx80("h3", { className: "font-medium", children: (() => {
|
|
13485
13577
|
const dayNum = format8(date, "d", { locale: ptBR6 });
|
|
13486
13578
|
const month = format8(date, "MMMM", { locale: ptBR6 });
|
|
@@ -13491,7 +13583,7 @@ function EventsPopup({
|
|
|
13491
13583
|
/* @__PURE__ */ jsx80(
|
|
13492
13584
|
"button",
|
|
13493
13585
|
{
|
|
13494
|
-
"aria-label": "
|
|
13586
|
+
"aria-label": "Fechar",
|
|
13495
13587
|
className: "rounded-full p-1 hover:bg-muted",
|
|
13496
13588
|
onClick: onClose,
|
|
13497
13589
|
type: "button",
|
|
@@ -13499,7 +13591,7 @@ function EventsPopup({
|
|
|
13499
13591
|
}
|
|
13500
13592
|
)
|
|
13501
13593
|
] }),
|
|
13502
|
-
/* @__PURE__ */ jsx80("div", { className: "space-y-2 p-3", children: events.length === 0 ? /* @__PURE__ */ jsx80("div", { className: "py-2 text-muted-foreground text-sm", children: "
|
|
13594
|
+
/* @__PURE__ */ jsx80("div", { className: "space-y-2 p-3", children: events.length === 0 ? /* @__PURE__ */ jsx80("div", { className: "py-2 text-muted-foreground text-sm", children: "Nenhum evento" }) : events.map((event) => {
|
|
13503
13595
|
const eventStart = new Date(event.start);
|
|
13504
13596
|
const eventEnd = new Date(event.end);
|
|
13505
13597
|
const isFirstDay = isSameDay2(date, eventStart);
|
|
@@ -13529,10 +13621,11 @@ function EventsPopup({
|
|
|
13529
13621
|
|
|
13530
13622
|
// src/components/event-calendar/hooks/use-current-time-indicator.ts
|
|
13531
13623
|
import { endOfWeek as endOfWeek2, isSameDay as isSameDay3, isWithinInterval, startOfWeek as startOfWeek2 } from "date-fns";
|
|
13532
|
-
import {
|
|
13624
|
+
import { ptBR as ptBR7 } from "date-fns/locale";
|
|
13625
|
+
import { useEffect as useEffect21, useState as useState25 } from "react";
|
|
13533
13626
|
function useCurrentTimeIndicator(currentDate, view) {
|
|
13534
|
-
const [currentTimePosition, setCurrentTimePosition] =
|
|
13535
|
-
const [currentTimeVisible, setCurrentTimeVisible] =
|
|
13627
|
+
const [currentTimePosition, setCurrentTimePosition] = useState25(0);
|
|
13628
|
+
const [currentTimeVisible, setCurrentTimeVisible] = useState25(false);
|
|
13536
13629
|
useEffect21(() => {
|
|
13537
13630
|
const calculateTimePosition = () => {
|
|
13538
13631
|
const now = /* @__PURE__ */ new Date();
|
|
@@ -13546,8 +13639,8 @@ function useCurrentTimeIndicator(currentDate, view) {
|
|
|
13546
13639
|
if (view === "day") {
|
|
13547
13640
|
isCurrentTimeVisible = isSameDay3(now, currentDate);
|
|
13548
13641
|
} else if (view === "week") {
|
|
13549
|
-
const startOfWeekDate = startOfWeek2(currentDate, {
|
|
13550
|
-
const endOfWeekDate = endOfWeek2(currentDate, {
|
|
13642
|
+
const startOfWeekDate = startOfWeek2(currentDate, { locale: ptBR7 });
|
|
13643
|
+
const endOfWeekDate = endOfWeek2(currentDate, { locale: ptBR7 });
|
|
13551
13644
|
isCurrentTimeVisible = isWithinInterval(now, {
|
|
13552
13645
|
end: endOfWeekDate,
|
|
13553
13646
|
start: startOfWeekDate
|
|
@@ -13564,14 +13657,14 @@ function useCurrentTimeIndicator(currentDate, view) {
|
|
|
13564
13657
|
}
|
|
13565
13658
|
|
|
13566
13659
|
// src/components/event-calendar/hooks/use-event-visibility.ts
|
|
13567
|
-
import { useLayoutEffect as useLayoutEffect2, useMemo as useMemo15, useRef as useRef12, useState as
|
|
13660
|
+
import { useLayoutEffect as useLayoutEffect2, useMemo as useMemo15, useRef as useRef12, useState as useState26 } from "react";
|
|
13568
13661
|
function useEventVisibility({
|
|
13569
13662
|
eventHeight,
|
|
13570
13663
|
eventGap
|
|
13571
13664
|
}) {
|
|
13572
13665
|
const contentRef = useRef12(null);
|
|
13573
13666
|
const observerRef = useRef12(null);
|
|
13574
|
-
const [contentHeight, setContentHeight] =
|
|
13667
|
+
const [contentHeight, setContentHeight] = useState26(null);
|
|
13575
13668
|
useLayoutEffect2(() => {
|
|
13576
13669
|
if (!contentRef.current) return;
|
|
13577
13670
|
const updateHeight = () => {
|
|
@@ -13622,9 +13715,9 @@ import {
|
|
|
13622
13715
|
startOfMonth,
|
|
13623
13716
|
startOfWeek as startOfWeek3
|
|
13624
13717
|
} from "date-fns";
|
|
13625
|
-
import { ptBR as
|
|
13626
|
-
import { useEffect as useEffect22, useMemo as useMemo16, useState as
|
|
13627
|
-
import { jsx as jsx81, jsxs as
|
|
13718
|
+
import { ptBR as ptBR8 } from "date-fns/locale";
|
|
13719
|
+
import { useEffect as useEffect22, useMemo as useMemo16, useState as useState27 } from "react";
|
|
13720
|
+
import { jsx as jsx81, jsxs as jsxs61 } from "react/jsx-runtime";
|
|
13628
13721
|
function MonthView({
|
|
13629
13722
|
currentDate,
|
|
13630
13723
|
events,
|
|
@@ -13641,7 +13734,7 @@ function MonthView({
|
|
|
13641
13734
|
const weekdays = useMemo16(() => {
|
|
13642
13735
|
return Array.from({ length: 7 }).map((_, i) => {
|
|
13643
13736
|
const date = addDays3(startOfWeek3(/* @__PURE__ */ new Date(), { weekStartsOn: 0 }), i);
|
|
13644
|
-
const short = format9(date, "EEE", { locale:
|
|
13737
|
+
const short = format9(date, "EEE", { locale: ptBR8 });
|
|
13645
13738
|
return short.charAt(0).toUpperCase() + short.slice(1);
|
|
13646
13739
|
});
|
|
13647
13740
|
}, []);
|
|
@@ -13661,7 +13754,7 @@ function MonthView({
|
|
|
13661
13754
|
e.stopPropagation();
|
|
13662
13755
|
onEventSelect(event);
|
|
13663
13756
|
};
|
|
13664
|
-
const [isMounted, setIsMounted] =
|
|
13757
|
+
const [isMounted, setIsMounted] = useState27(false);
|
|
13665
13758
|
const { contentRef, getVisibleEventCount } = useEventVisibility({
|
|
13666
13759
|
eventGap: EventGap,
|
|
13667
13760
|
eventHeight: EventHeight
|
|
@@ -13669,7 +13762,7 @@ function MonthView({
|
|
|
13669
13762
|
useEffect22(() => {
|
|
13670
13763
|
setIsMounted(true);
|
|
13671
13764
|
}, []);
|
|
13672
|
-
return /* @__PURE__ */
|
|
13765
|
+
return /* @__PURE__ */ jsxs61("div", { className: "contents", "data-slot": "month-view", children: [
|
|
13673
13766
|
/* @__PURE__ */ jsx81("div", { className: "grid grid-cols-7 border-border/70 border-b", children: weekdays.map((day) => /* @__PURE__ */ jsx81(
|
|
13674
13767
|
"div",
|
|
13675
13768
|
{
|
|
@@ -13700,7 +13793,7 @@ function MonthView({
|
|
|
13700
13793
|
className: "group border-border/70 border-r border-b last:border-r-0 data-outside-cell:bg-muted/25 data-outside-cell:text-muted-foreground/70 hover:bg-muted/5 transition-colors p-2",
|
|
13701
13794
|
"data-outside-cell": !isCurrentMonth || void 0,
|
|
13702
13795
|
"data-today": isToday2(day) || void 0,
|
|
13703
|
-
children: /* @__PURE__ */
|
|
13796
|
+
children: /* @__PURE__ */ jsxs61(
|
|
13704
13797
|
DroppableCell,
|
|
13705
13798
|
{
|
|
13706
13799
|
date: day,
|
|
@@ -13712,7 +13805,7 @@ function MonthView({
|
|
|
13712
13805
|
},
|
|
13713
13806
|
children: [
|
|
13714
13807
|
/* @__PURE__ */ jsx81("div", { className: "mt-1 inline-flex w-7 h-7 items-center justify-center rounded-full text-sm font-semibold text-muted-foreground group-data-today:bg-primary group-data-today:text-primary-foreground", children: format9(day, "d") }),
|
|
13715
|
-
/* @__PURE__ */
|
|
13808
|
+
/* @__PURE__ */ jsxs61(
|
|
13716
13809
|
"div",
|
|
13717
13810
|
{
|
|
13718
13811
|
className: "min-h-[calc((var(--event-height)+var(--event-gap))*2)] sm:min-h-[calc((var(--event-height)+var(--event-gap))*3)] lg:min-h-[calc((var(--event-height)+var(--event-gap))*4)] px-1 py-1",
|
|
@@ -13739,9 +13832,9 @@ function MonthView({
|
|
|
13739
13832
|
isLastDay,
|
|
13740
13833
|
onClick: (e) => handleEventClick(event, e),
|
|
13741
13834
|
view: "month",
|
|
13742
|
-
children: /* @__PURE__ */
|
|
13743
|
-
!event.allDay && /* @__PURE__ */
|
|
13744
|
-
format9(new Date(event.start), "
|
|
13835
|
+
children: /* @__PURE__ */ jsxs61("div", { "aria-hidden": true, className: "invisible", children: [
|
|
13836
|
+
!event.allDay && /* @__PURE__ */ jsxs61("span", { children: [
|
|
13837
|
+
format9(new Date(event.start), "HH:mm"),
|
|
13745
13838
|
" "
|
|
13746
13839
|
] }),
|
|
13747
13840
|
event.title
|
|
@@ -13771,8 +13864,8 @@ function MonthView({
|
|
|
13771
13864
|
event.id
|
|
13772
13865
|
);
|
|
13773
13866
|
}),
|
|
13774
|
-
hasMore && /* @__PURE__ */
|
|
13775
|
-
/* @__PURE__ */ jsx81(PopoverTriggerBase, { asChild: true, children: /* @__PURE__ */
|
|
13867
|
+
hasMore && /* @__PURE__ */ jsxs61(PopoverBase, { modal: true, children: [
|
|
13868
|
+
/* @__PURE__ */ jsx81(PopoverTriggerBase, { asChild: true, children: /* @__PURE__ */ jsxs61(
|
|
13776
13869
|
"button",
|
|
13777
13870
|
{
|
|
13778
13871
|
className: "mt-[var(--event-gap)] flex h-[var(--event-height)] w-full select-none items-center overflow-hidden px-2 text-left text-[10px] text-muted-foreground outline-none backdrop-blur-md rounded-md transition hover:bg-muted/60 hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 sm:text-xs",
|
|
@@ -13781,10 +13874,10 @@ function MonthView({
|
|
|
13781
13874
|
"aria-label": `Show ${remainingCount} more events on ${format9(
|
|
13782
13875
|
day,
|
|
13783
13876
|
"PPP",
|
|
13784
|
-
{ locale:
|
|
13877
|
+
{ locale: ptBR8 }
|
|
13785
13878
|
)}`,
|
|
13786
13879
|
children: [
|
|
13787
|
-
/* @__PURE__ */
|
|
13880
|
+
/* @__PURE__ */ jsxs61("span", { className: "font-medium", children: [
|
|
13788
13881
|
"+ ",
|
|
13789
13882
|
remainingCount
|
|
13790
13883
|
] }),
|
|
@@ -13800,8 +13893,8 @@ function MonthView({
|
|
|
13800
13893
|
style: {
|
|
13801
13894
|
"--event-height": `${EventHeight}px`
|
|
13802
13895
|
},
|
|
13803
|
-
children: /* @__PURE__ */
|
|
13804
|
-
/* @__PURE__ */ jsx81("div", { className: "font-medium text-sm", children: format9(day, "EEE d", { locale:
|
|
13896
|
+
children: /* @__PURE__ */ jsxs61("div", { className: "space-y-2", children: [
|
|
13897
|
+
/* @__PURE__ */ jsx81("div", { className: "font-medium text-sm", children: format9(day, "EEE d", { locale: ptBR8 }) }),
|
|
13805
13898
|
/* @__PURE__ */ jsx81("div", { className: "space-y-1", children: sortEvents(allEvents).map((event) => {
|
|
13806
13899
|
const eventStart = new Date(event.start);
|
|
13807
13900
|
const eventEnd = new Date(event.end);
|
|
@@ -13930,16 +14023,16 @@ import {
|
|
|
13930
14023
|
endOfWeek as endOfWeek4,
|
|
13931
14024
|
format as format10,
|
|
13932
14025
|
getHours as getHours2,
|
|
13933
|
-
getMinutes as
|
|
14026
|
+
getMinutes as getMinutes2,
|
|
13934
14027
|
isBefore as isBefore2,
|
|
13935
14028
|
isSameDay as isSameDay6,
|
|
13936
14029
|
isToday as isToday3,
|
|
13937
14030
|
startOfDay as startOfDay2,
|
|
13938
14031
|
startOfWeek as startOfWeek4
|
|
13939
14032
|
} from "date-fns";
|
|
13940
|
-
import { ptBR as
|
|
14033
|
+
import { ptBR as ptBR9 } from "date-fns/locale";
|
|
13941
14034
|
import { useMemo as useMemo17 } from "react";
|
|
13942
|
-
import { jsx as jsx82, jsxs as
|
|
14035
|
+
import { jsx as jsx82, jsxs as jsxs62 } from "react/jsx-runtime";
|
|
13943
14036
|
function WeekView({
|
|
13944
14037
|
currentDate,
|
|
13945
14038
|
events,
|
|
@@ -14000,8 +14093,8 @@ function WeekView({
|
|
|
14000
14093
|
const eventEnd = new Date(event.end);
|
|
14001
14094
|
const adjustedStart = isSameDay6(day, eventStart) ? eventStart : dayStart;
|
|
14002
14095
|
const adjustedEnd = isSameDay6(day, eventEnd) ? eventEnd : addHours2(dayStart, 24);
|
|
14003
|
-
const startHour = getHours2(adjustedStart) +
|
|
14004
|
-
const endHour = getHours2(adjustedEnd) +
|
|
14096
|
+
const startHour = getHours2(adjustedStart) + getMinutes2(adjustedStart) / 60;
|
|
14097
|
+
const endHour = getHours2(adjustedEnd) + getMinutes2(adjustedEnd) / 60;
|
|
14005
14098
|
const top = (startHour - StartHour) * WeekCellsHeight;
|
|
14006
14099
|
const height = (endHour - startHour) * WeekCellsHeight;
|
|
14007
14100
|
let columnIndex = 0;
|
|
@@ -14056,27 +14149,27 @@ function WeekView({
|
|
|
14056
14149
|
currentDate,
|
|
14057
14150
|
"week"
|
|
14058
14151
|
);
|
|
14059
|
-
return /* @__PURE__ */
|
|
14060
|
-
/* @__PURE__ */
|
|
14152
|
+
return /* @__PURE__ */ jsxs62("div", { className: "flex h-full flex-col", "data-slot": "week-view", children: [
|
|
14153
|
+
/* @__PURE__ */ jsxs62("div", { className: "sticky top-0 z-30 grid grid-cols-8 border-border/70 border-b bg-background/80 backdrop-blur-md", children: [
|
|
14061
14154
|
/* @__PURE__ */ jsx82("div", { className: "py-2 text-center text-muted-foreground/70 text-sm", children: /* @__PURE__ */ jsx82("span", { className: "max-[479px]:sr-only", children: format10(/* @__PURE__ */ new Date(), "O") }) }),
|
|
14062
|
-
days.map((day) => /* @__PURE__ */
|
|
14155
|
+
days.map((day) => /* @__PURE__ */ jsxs62(
|
|
14063
14156
|
"div",
|
|
14064
14157
|
{
|
|
14065
14158
|
className: "py-2 text-center text-muted-foreground/70 text-sm data-today:font-medium data-today:text-foreground",
|
|
14066
14159
|
"data-today": isToday3(day) || void 0,
|
|
14067
14160
|
children: [
|
|
14068
|
-
/* @__PURE__ */
|
|
14069
|
-
format10(day, "EEE", { locale:
|
|
14161
|
+
/* @__PURE__ */ jsxs62("span", { "aria-hidden": "true", className: "sm:hidden", children: [
|
|
14162
|
+
format10(day, "EEE", { locale: ptBR9 })[0],
|
|
14070
14163
|
" ",
|
|
14071
|
-
format10(day, "d", { locale:
|
|
14164
|
+
format10(day, "d", { locale: ptBR9 })
|
|
14072
14165
|
] }),
|
|
14073
|
-
/* @__PURE__ */ jsx82("span", { className: "max-sm:hidden", children: format10(day, "EEE dd", { locale:
|
|
14166
|
+
/* @__PURE__ */ jsx82("span", { className: "max-sm:hidden", children: format10(day, "EEE dd", { locale: ptBR9 }) })
|
|
14074
14167
|
]
|
|
14075
14168
|
},
|
|
14076
14169
|
day.toString()
|
|
14077
14170
|
))
|
|
14078
14171
|
] }),
|
|
14079
|
-
showAllDaySection && /* @__PURE__ */ jsx82("div", { className: "border-border/70 border-b bg-muted/50", children: /* @__PURE__ */
|
|
14172
|
+
showAllDaySection && /* @__PURE__ */ jsx82("div", { className: "border-border/70 border-b bg-muted/50", children: /* @__PURE__ */ jsxs62("div", { className: "grid grid-cols-8", children: [
|
|
14080
14173
|
/* @__PURE__ */ jsx82("div", { className: "relative border-border/70 border-r", children: /* @__PURE__ */ jsx82("span", { className: "absolute bottom-0 left-0 h-6 w-16 max-w-full pe-2 text-right text-[10px] text-muted-foreground/70 sm:pe-4 sm:text-xs", children: "All day" }) }),
|
|
14081
14174
|
days.map((day, dayIndex) => {
|
|
14082
14175
|
const dayAllDayEvents = allDayEvents.filter((event) => {
|
|
@@ -14124,16 +14217,16 @@ function WeekView({
|
|
|
14124
14217
|
);
|
|
14125
14218
|
})
|
|
14126
14219
|
] }) }),
|
|
14127
|
-
/* @__PURE__ */
|
|
14220
|
+
/* @__PURE__ */ jsxs62("div", { className: "grid flex-1 grid-cols-8 overflow-hidden", children: [
|
|
14128
14221
|
/* @__PURE__ */ jsx82("div", { className: "grid auto-cols-fr border-border/70 border-r", children: hours.map((hour, index) => /* @__PURE__ */ jsx82(
|
|
14129
14222
|
"div",
|
|
14130
14223
|
{
|
|
14131
14224
|
className: "relative min-h-[var(--week-cells-height)] border-border/70 border-b last:border-b-0",
|
|
14132
|
-
children: index > 0 && /* @__PURE__ */ jsx82("span", { className: "-top-3 absolute left-0 flex h-6 w-16 max-w-full items-center justify-end bg-background pe-2 text-[10px] text-muted-foreground/70 sm:pe-4 sm:text-xs", children: format10(hour, "
|
|
14225
|
+
children: index > 0 && /* @__PURE__ */ jsx82("span", { className: "-top-3 absolute left-0 flex h-6 w-16 max-w-full items-center justify-end bg-background pe-2 text-[10px] text-muted-foreground/70 sm:pe-4 sm:text-xs", children: format10(hour, "HH:mm") })
|
|
14133
14226
|
},
|
|
14134
14227
|
hour.toString()
|
|
14135
14228
|
)) }),
|
|
14136
|
-
days.map((day, dayIndex) => /* @__PURE__ */
|
|
14229
|
+
days.map((day, dayIndex) => /* @__PURE__ */ jsxs62(
|
|
14137
14230
|
"div",
|
|
14138
14231
|
{
|
|
14139
14232
|
className: "relative grid auto-cols-fr border-border/70 border-r last:border-r-0",
|
|
@@ -14169,7 +14262,7 @@ function WeekView({
|
|
|
14169
14262
|
{
|
|
14170
14263
|
className: "pointer-events-none absolute right-0 left-0 z-20",
|
|
14171
14264
|
style: { top: `${currentTimePosition}%` },
|
|
14172
|
-
children: /* @__PURE__ */
|
|
14265
|
+
children: /* @__PURE__ */ jsxs62("div", { className: "relative flex items-center", children: [
|
|
14173
14266
|
/* @__PURE__ */ jsx82("div", { className: "-left-1 absolute h-2 w-2 rounded-full bg-primary" }),
|
|
14174
14267
|
/* @__PURE__ */ jsx82("div", { className: "h-[2px] w-full bg-primary" })
|
|
14175
14268
|
] })
|
|
@@ -14219,10 +14312,10 @@ function WeekView({
|
|
|
14219
14312
|
}
|
|
14220
14313
|
|
|
14221
14314
|
// src/hooks/use-drag.tsx
|
|
14222
|
-
import { useState as
|
|
14315
|
+
import { useState as useState28, useCallback as useCallback14, useRef as useRef13, useEffect as useEffect23 } from "react";
|
|
14223
14316
|
var useDrag = (options = {}) => {
|
|
14224
|
-
const [isDragging, setIsDragging] =
|
|
14225
|
-
const [positions, setPositions] =
|
|
14317
|
+
const [isDragging, setIsDragging] = useState28(null);
|
|
14318
|
+
const [positions, setPositions] = useState28({});
|
|
14226
14319
|
const dragStartPos = useRef13(null);
|
|
14227
14320
|
const dragId = useRef13(null);
|
|
14228
14321
|
const handleMouseDown = useCallback14((id, e) => {
|
|
@@ -14376,6 +14469,7 @@ export {
|
|
|
14376
14469
|
CopyButton,
|
|
14377
14470
|
DateTimePicker,
|
|
14378
14471
|
DayView,
|
|
14472
|
+
DebouncedInput,
|
|
14379
14473
|
DefaultEndHour,
|
|
14380
14474
|
DefaultStartHour,
|
|
14381
14475
|
DestructiveDialog,
|