@mlw-packages/react-components 1.7.9 → 1.7.11
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 +65 -49
- package/dist/index.d.mts +12 -15
- package/dist/index.d.ts +12 -15
- package/dist/index.js +619 -512
- package/dist/index.mjs +551 -444
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -495,7 +495,7 @@ function cn(...inputs) {
|
|
|
495
495
|
import { CircleNotchIcon } from "@phosphor-icons/react";
|
|
496
496
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
497
497
|
var buttonVariantsBase = cva(
|
|
498
|
-
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive active:scale-95",
|
|
498
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive [&:not(.no-active-animation)]:active:scale-95",
|
|
499
499
|
{
|
|
500
500
|
variants: {
|
|
501
501
|
variant: {
|
|
@@ -730,7 +730,7 @@ var LabelBase_default = LabelBase;
|
|
|
730
730
|
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
731
731
|
var ErrorMessage = ({ error }) => {
|
|
732
732
|
if (!error) return null;
|
|
733
|
-
return /* @__PURE__ */ jsx4("p", { className: "text-sm text-destructive
|
|
733
|
+
return /* @__PURE__ */ jsx4("p", { className: "text-sm text-destructive", children: error });
|
|
734
734
|
};
|
|
735
735
|
var ErrorMessage_default = ErrorMessage;
|
|
736
736
|
|
|
@@ -1114,7 +1114,7 @@ function Combobox({
|
|
|
1114
1114
|
},
|
|
1115
1115
|
[selected, onChange]
|
|
1116
1116
|
);
|
|
1117
|
-
return /* @__PURE__ */ jsxs6("div", { className: cn("flex flex-col
|
|
1117
|
+
return /* @__PURE__ */ jsxs6("div", { className: cn("flex flex-col w-full min-w-[150px]", className), children: [
|
|
1118
1118
|
label && /* @__PURE__ */ jsx9(LabelBase_default, { className: labelClassname, children: label }),
|
|
1119
1119
|
/* @__PURE__ */ jsx9(
|
|
1120
1120
|
ComboboxBase,
|
|
@@ -1796,7 +1796,7 @@ function Select({
|
|
|
1796
1796
|
className
|
|
1797
1797
|
}) {
|
|
1798
1798
|
return /* @__PURE__ */ jsxs13("div", { "data-testid": testIds.root ?? "select-root", children: [
|
|
1799
|
-
label ? /* @__PURE__ */ jsx18("label", { className: cn("
|
|
1799
|
+
label ? /* @__PURE__ */ jsx18("label", { className: cn("block text-sm font-medium", labelClassname), children: label }) : null,
|
|
1800
1800
|
/* @__PURE__ */ jsxs13(
|
|
1801
1801
|
SelectBase,
|
|
1802
1802
|
{
|
|
@@ -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,
|
|
@@ -10115,60 +10149,64 @@ function CalendarBase2({
|
|
|
10115
10149
|
"rounded-md border bg-background p-3 overflow-hidden flex flex-col",
|
|
10116
10150
|
className
|
|
10117
10151
|
),
|
|
10118
|
-
children: /* @__PURE__ */ jsx63("div", { className: "relative flex-1 flex flex-col min-h-0", children: /* @__PURE__ */ jsx63(AnimatePresence9, { initial: false, mode: "wait", custom: direction, children: /* @__PURE__ */
|
|
10152
|
+
children: /* @__PURE__ */ jsx63("div", { className: "relative flex-1 flex flex-col min-h-0", children: /* @__PURE__ */ jsx63(AnimatePresence9, { initial: false, mode: "wait", custom: direction, children: /* @__PURE__ */ jsxs46(
|
|
10119
10153
|
"div",
|
|
10120
10154
|
{
|
|
10121
10155
|
className: "w-full h-full flex flex-col",
|
|
10122
|
-
children:
|
|
10123
|
-
|
|
10124
|
-
|
|
10125
|
-
|
|
10126
|
-
|
|
10127
|
-
|
|
10128
|
-
|
|
10129
|
-
|
|
10130
|
-
|
|
10131
|
-
|
|
10132
|
-
|
|
10133
|
-
|
|
10134
|
-
|
|
10135
|
-
|
|
10136
|
-
|
|
10137
|
-
|
|
10138
|
-
|
|
10139
|
-
|
|
10140
|
-
|
|
10141
|
-
|
|
10142
|
-
|
|
10143
|
-
|
|
10144
|
-
|
|
10145
|
-
|
|
10146
|
-
|
|
10147
|
-
|
|
10148
|
-
|
|
10149
|
-
|
|
10150
|
-
|
|
10151
|
-
|
|
10152
|
-
|
|
10153
|
-
|
|
10154
|
-
|
|
10155
|
-
|
|
10156
|
-
|
|
10157
|
-
|
|
10158
|
-
|
|
10159
|
-
|
|
10160
|
-
|
|
10161
|
-
|
|
10162
|
-
|
|
10163
|
-
|
|
10164
|
-
|
|
10165
|
-
|
|
10166
|
-
|
|
10167
|
-
|
|
10168
|
-
|
|
10169
|
-
|
|
10170
|
-
|
|
10171
|
-
|
|
10156
|
+
children: [
|
|
10157
|
+
/* @__PURE__ */ jsx63("div", { className: "flex items-center justify-end mb-2 -mt-1" }),
|
|
10158
|
+
/* @__PURE__ */ jsx63(
|
|
10159
|
+
DayPicker2,
|
|
10160
|
+
{
|
|
10161
|
+
showOutsideDays,
|
|
10162
|
+
month,
|
|
10163
|
+
onMonthChange: handleMonthChange,
|
|
10164
|
+
className: "w-full h-full flex flex-col",
|
|
10165
|
+
classNames: {
|
|
10166
|
+
months: "flex flex-col sm:flex-row gap-3 sm:gap-4 w-full",
|
|
10167
|
+
month: "flex-1 min-w-0",
|
|
10168
|
+
caption: "flex items-center justify-between gap-2 pr-1 min-h-[2.25rem] mb-2",
|
|
10169
|
+
caption_label: "text-[clamp(0.85rem,1.4vw,1.125rem)] sm:text-[clamp(0.9rem,1.6vw,1.125rem)] font-semibold capitalize text-left",
|
|
10170
|
+
nav: "flex items-center gap-2",
|
|
10171
|
+
nav_button: cn(
|
|
10172
|
+
buttonVariantsBase({ variant: "outline" }),
|
|
10173
|
+
"h-8 w-8 sm:h-9 sm:w-9 md:h-10 md:w-10 flex items-center justify-center p-0 rounded-md transition-transform duration-150 ease-out focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary/40 active:scale-95"
|
|
10174
|
+
),
|
|
10175
|
+
nav_button_previous: "",
|
|
10176
|
+
nav_button_next: "",
|
|
10177
|
+
table: "w-full min-w-0 flex-1 grid grid-rows-[auto_1fr] gap-2",
|
|
10178
|
+
head_row: "grid grid-cols-7 gap-1 mb-1",
|
|
10179
|
+
head_cell: "text-muted-foreground rounded-md font-semibold text-[clamp(0.575rem,1.2vw,0.75rem)] sm:text-[clamp(0.65rem,1.1vw,0.825rem)] text-center pb-1 uppercase tracking-wider",
|
|
10180
|
+
row: "grid grid-cols-7 gap-1",
|
|
10181
|
+
cell: cn(
|
|
10182
|
+
"min-w-0 h-9 sm:h-10 md:h-10 p-0 relative flex items-center justify-center",
|
|
10183
|
+
"[&:has([aria-selected].day-range-end)]:rounded-r-lg",
|
|
10184
|
+
"[&:has([aria-selected].day-range-start)]:rounded-l-lg",
|
|
10185
|
+
"[&:has([aria-selected].day-outside)]:bg-muted/50",
|
|
10186
|
+
"[&:has([aria-selected])]:bg-muted"
|
|
10187
|
+
),
|
|
10188
|
+
day: cn(
|
|
10189
|
+
buttonVariantsBase({ variant: "ghost" }),
|
|
10190
|
+
"w-full h-full p-0 m-0 flex items-center justify-center text-[clamp(0.775rem,1.2vw,0.95rem)] sm:text-sm",
|
|
10191
|
+
"aria-selected:opacity-100 hover:bg-muted transition-all duration-150 ease-out active:scale-95"
|
|
10192
|
+
),
|
|
10193
|
+
day_selected: "bg-primary text-primary-foreground hover:bg-primary/90 focus:bg-primary/90 font-semibold hover:text-white",
|
|
10194
|
+
day_today: "bg-muted text-foreground font-bold ring-2 ring-primary/30 ring-inset",
|
|
10195
|
+
day_outside: "text-muted-foreground/40 opacity-60 aria-selected:bg-muted/50 aria-selected:text-foreground",
|
|
10196
|
+
day_disabled: "text-muted-foreground/30 opacity-40 cursor-not-allowed",
|
|
10197
|
+
day_range_middle: "aria-selected:bg-muted aria-selected:text-foreground",
|
|
10198
|
+
day_hidden: "invisible",
|
|
10199
|
+
button: "p-0 m-0 border-0 outline-none focus:ring-0",
|
|
10200
|
+
...classNames
|
|
10201
|
+
},
|
|
10202
|
+
components: {
|
|
10203
|
+
IconLeft: () => /* @__PURE__ */ jsx63(CaretLeftIcon2, { className: "h-4 w-4" }),
|
|
10204
|
+
IconRight: () => /* @__PURE__ */ jsx63(CaretRightIcon4, { className: "h-4 w-4" })
|
|
10205
|
+
},
|
|
10206
|
+
...props
|
|
10207
|
+
}
|
|
10208
|
+
)
|
|
10209
|
+
]
|
|
10172
10210
|
},
|
|
10173
10211
|
month.toISOString()
|
|
10174
10212
|
) }) })
|
|
@@ -10179,14 +10217,14 @@ CalendarBase2.displayName = "CalendarBase";
|
|
|
10179
10217
|
|
|
10180
10218
|
// src/components/picker/DateTimePicker.tsx
|
|
10181
10219
|
import { ptBR } from "date-fns/locale";
|
|
10182
|
-
import { useEffect as useEffect15, useState as
|
|
10220
|
+
import { useEffect as useEffect15, useState as useState18 } from "react";
|
|
10183
10221
|
|
|
10184
10222
|
// src/components/picker/TimePicker.tsx
|
|
10185
10223
|
import { motion as motion14, AnimatePresence as AnimatePresence10 } from "framer-motion";
|
|
10186
10224
|
import * as React42 from "react";
|
|
10187
10225
|
|
|
10188
10226
|
// src/components/picker/TimePickerInput.tsx
|
|
10189
|
-
import { CaretUpIcon as CaretUpIcon2, CaretDownIcon as
|
|
10227
|
+
import { CaretUpIcon as CaretUpIcon2, CaretDownIcon as CaretDownIcon5 } from "@phosphor-icons/react";
|
|
10190
10228
|
import React41 from "react";
|
|
10191
10229
|
|
|
10192
10230
|
// src/components/picker/utils/time-picker-utils.ts
|
|
@@ -10329,7 +10367,7 @@ function display12HourValue(hours) {
|
|
|
10329
10367
|
}
|
|
10330
10368
|
|
|
10331
10369
|
// src/components/picker/TimePickerInput.tsx
|
|
10332
|
-
import { jsx as jsx64, jsxs as
|
|
10370
|
+
import { jsx as jsx64, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
10333
10371
|
var TimePickerInput = React41.forwardRef(
|
|
10334
10372
|
({
|
|
10335
10373
|
className,
|
|
@@ -10416,7 +10454,7 @@ var TimePickerInput = React41.forwardRef(
|
|
|
10416
10454
|
const baseLabel = getPickerLabel();
|
|
10417
10455
|
return `${baseLabel}, valor atual: ${calculatedValue}.`;
|
|
10418
10456
|
};
|
|
10419
|
-
return /* @__PURE__ */
|
|
10457
|
+
return /* @__PURE__ */ jsxs47("div", { className: "relative group flex flex-col items-center", children: [
|
|
10420
10458
|
getPickerLabel() && /* @__PURE__ */ jsx64(
|
|
10421
10459
|
"label",
|
|
10422
10460
|
{
|
|
@@ -10425,7 +10463,7 @@ var TimePickerInput = React41.forwardRef(
|
|
|
10425
10463
|
children: getPickerLabel()
|
|
10426
10464
|
}
|
|
10427
10465
|
),
|
|
10428
|
-
/* @__PURE__ */
|
|
10466
|
+
/* @__PURE__ */ jsxs47(
|
|
10429
10467
|
"div",
|
|
10430
10468
|
{
|
|
10431
10469
|
className: cn(
|
|
@@ -10452,7 +10490,7 @@ var TimePickerInput = React41.forwardRef(
|
|
|
10452
10490
|
children: /* @__PURE__ */ jsx64(CaretUpIcon2, { size: 14, className: "sm:w-4 sm:h-4" })
|
|
10453
10491
|
}
|
|
10454
10492
|
),
|
|
10455
|
-
/* @__PURE__ */
|
|
10493
|
+
/* @__PURE__ */ jsxs47("div", { className: "relative", children: [
|
|
10456
10494
|
/* @__PURE__ */ jsx64(
|
|
10457
10495
|
"input",
|
|
10458
10496
|
{
|
|
@@ -10516,7 +10554,7 @@ var TimePickerInput = React41.forwardRef(
|
|
|
10516
10554
|
),
|
|
10517
10555
|
tabIndex: -1,
|
|
10518
10556
|
"aria-label": `Decrementar ${getPickerLabel().toLowerCase()}`,
|
|
10519
|
-
children: /* @__PURE__ */ jsx64(
|
|
10557
|
+
children: /* @__PURE__ */ jsx64(CaretDownIcon5, { size: 14, className: "sm:w-4 sm:h-4" })
|
|
10520
10558
|
}
|
|
10521
10559
|
)
|
|
10522
10560
|
]
|
|
@@ -10528,7 +10566,7 @@ var TimePickerInput = React41.forwardRef(
|
|
|
10528
10566
|
TimePickerInput.displayName = "TimePickerInput";
|
|
10529
10567
|
|
|
10530
10568
|
// src/components/picker/TimePicker.tsx
|
|
10531
|
-
import { Fragment as Fragment9, jsx as jsx65, jsxs as
|
|
10569
|
+
import { Fragment as Fragment9, jsx as jsx65, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
10532
10570
|
function TimePicker({
|
|
10533
10571
|
date,
|
|
10534
10572
|
setDate,
|
|
@@ -10553,7 +10591,7 @@ function TimePicker({
|
|
|
10553
10591
|
hidden: { opacity: 0, y: 10 },
|
|
10554
10592
|
visible: { opacity: 1, y: 0 }
|
|
10555
10593
|
};
|
|
10556
|
-
return /* @__PURE__ */
|
|
10594
|
+
return /* @__PURE__ */ jsxs48(
|
|
10557
10595
|
motion14.div,
|
|
10558
10596
|
{
|
|
10559
10597
|
variants: containerVariants,
|
|
@@ -10626,7 +10664,7 @@ function TimePicker({
|
|
|
10626
10664
|
|
|
10627
10665
|
// src/components/picker/DateTimePicker.tsx
|
|
10628
10666
|
import { CalendarBlankIcon, ClockIcon } from "@phosphor-icons/react";
|
|
10629
|
-
import { jsx as jsx66, jsxs as
|
|
10667
|
+
import { jsx as jsx66, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
10630
10668
|
function DateTimePicker({
|
|
10631
10669
|
label,
|
|
10632
10670
|
date,
|
|
@@ -10640,9 +10678,9 @@ function DateTimePicker({
|
|
|
10640
10678
|
className,
|
|
10641
10679
|
error
|
|
10642
10680
|
}) {
|
|
10643
|
-
const [internalDate, setInternalDate] =
|
|
10644
|
-
const [open, setOpen] =
|
|
10645
|
-
const [timePickerOpen, setTimePickerOpen] =
|
|
10681
|
+
const [internalDate, setInternalDate] = useState18(date);
|
|
10682
|
+
const [open, setOpen] = useState18(false);
|
|
10683
|
+
const [timePickerOpen, setTimePickerOpen] = useState18(false);
|
|
10646
10684
|
const handleSelect = (newDay) => {
|
|
10647
10685
|
if (!newDay) return;
|
|
10648
10686
|
if (!internalDate) {
|
|
@@ -10676,21 +10714,21 @@ function DateTimePicker({
|
|
|
10676
10714
|
useEffect15(() => {
|
|
10677
10715
|
setInternalDate(date);
|
|
10678
10716
|
}, [date, open]);
|
|
10679
|
-
return /* @__PURE__ */
|
|
10717
|
+
return /* @__PURE__ */ jsxs49("div", { className: cn("w-full sm:w-auto", className), children: [
|
|
10680
10718
|
label && /* @__PURE__ */ jsx66(LabelBase_default, { children: label }),
|
|
10681
|
-
/* @__PURE__ */
|
|
10719
|
+
/* @__PURE__ */ jsxs49(PopoverBase, { open, onOpenChange: setOpen, children: [
|
|
10682
10720
|
/* @__PURE__ */ jsx66(
|
|
10683
10721
|
PopoverTriggerBase,
|
|
10684
10722
|
{
|
|
10685
10723
|
disabled,
|
|
10686
10724
|
asChild: true,
|
|
10687
10725
|
className: cn(error && "border-red-500"),
|
|
10688
|
-
children: /* @__PURE__ */
|
|
10726
|
+
children: /* @__PURE__ */ jsxs49(
|
|
10689
10727
|
ButtonBase,
|
|
10690
10728
|
{
|
|
10691
10729
|
variant: "outline",
|
|
10692
10730
|
className: cn(
|
|
10693
|
-
"w-full justify-start text-left min-w-0 overflow-hidden ",
|
|
10731
|
+
"w-full justify-start text-left min-w-0 overflow-hidden no-active-animation",
|
|
10694
10732
|
!date && "text-muted-foreground"
|
|
10695
10733
|
),
|
|
10696
10734
|
children: [
|
|
@@ -10720,7 +10758,7 @@ function DateTimePicker({
|
|
|
10720
10758
|
side: "bottom",
|
|
10721
10759
|
avoidCollisions: true,
|
|
10722
10760
|
collisionPadding: 8,
|
|
10723
|
-
children: /* @__PURE__ */
|
|
10761
|
+
children: /* @__PURE__ */ jsxs49("div", { className: "flex flex-col max-h-[calc(100vh-4rem)] overflow-y-auto border-none rounded-md", children: [
|
|
10724
10762
|
/* @__PURE__ */ jsx66(
|
|
10725
10763
|
CalendarBase2,
|
|
10726
10764
|
{
|
|
@@ -10735,13 +10773,13 @@ function DateTimePicker({
|
|
|
10735
10773
|
className: cn("w-full", hideTime && "border-0")
|
|
10736
10774
|
}
|
|
10737
10775
|
),
|
|
10738
|
-
!hideTime && /* @__PURE__ */ jsx66("div", { className: "flex justify-center w-full ", children: /* @__PURE__ */
|
|
10776
|
+
!hideTime && /* @__PURE__ */ jsx66("div", { className: "flex justify-center w-full border-b border-r border-l", children: /* @__PURE__ */ jsxs49(
|
|
10739
10777
|
PopoverBase,
|
|
10740
10778
|
{
|
|
10741
10779
|
open: timePickerOpen,
|
|
10742
10780
|
onOpenChange: setTimePickerOpen,
|
|
10743
10781
|
children: [
|
|
10744
|
-
/* @__PURE__ */ jsx66(PopoverTriggerBase, { asChild: true, children: /* @__PURE__ */
|
|
10782
|
+
/* @__PURE__ */ jsx66(PopoverTriggerBase, { asChild: true, children: /* @__PURE__ */ jsxs49(
|
|
10745
10783
|
ButtonBase,
|
|
10746
10784
|
{
|
|
10747
10785
|
variant: "outline",
|
|
@@ -10751,7 +10789,7 @@ function DateTimePicker({
|
|
|
10751
10789
|
"text-sm sm:text-base font-semibold w-full",
|
|
10752
10790
|
"bg-background hover:bg-accent",
|
|
10753
10791
|
"transition-all duration-200",
|
|
10754
|
-
"shadow-sm hover:shadow-md active
|
|
10792
|
+
"shadow-sm hover:shadow-md no-active-animation"
|
|
10755
10793
|
),
|
|
10756
10794
|
children: [
|
|
10757
10795
|
/* @__PURE__ */ jsx66(ClockIcon, { className: "text-primary flex-shrink-0 w-4 h-4 sm:w-5 sm:h-5" }),
|
|
@@ -10770,7 +10808,7 @@ function DateTimePicker({
|
|
|
10770
10808
|
sideOffset: 8,
|
|
10771
10809
|
avoidCollisions: true,
|
|
10772
10810
|
collisionPadding: 8,
|
|
10773
|
-
children: /* @__PURE__ */
|
|
10811
|
+
children: /* @__PURE__ */ jsxs49("div", { className: "flex flex-col items-center space-y-2 sm:space-y-3", children: [
|
|
10774
10812
|
/* @__PURE__ */ jsx66("h4", { className: "text-sm sm:text-base font-medium text-center", children: "Alterar Hor\xE1rio" }),
|
|
10775
10813
|
/* @__PURE__ */ jsx66(
|
|
10776
10814
|
TimePicker,
|
|
@@ -10786,7 +10824,7 @@ function DateTimePicker({
|
|
|
10786
10824
|
size: "sm",
|
|
10787
10825
|
variant: "destructive",
|
|
10788
10826
|
onClick: () => setTimePickerOpen(false),
|
|
10789
|
-
className: "w-full text-xs sm:text-sm min-h-[36px] sm:min-h-[40px]",
|
|
10827
|
+
className: "w-full text-xs sm:text-sm min-h-[36px] sm:min-h-[40px] no-active-animation",
|
|
10790
10828
|
children: "Fechar"
|
|
10791
10829
|
}
|
|
10792
10830
|
)
|
|
@@ -10795,7 +10833,16 @@ function DateTimePicker({
|
|
|
10795
10833
|
)
|
|
10796
10834
|
]
|
|
10797
10835
|
}
|
|
10798
|
-
) })
|
|
10836
|
+
) }),
|
|
10837
|
+
/* @__PURE__ */ jsx66(
|
|
10838
|
+
ButtonBase,
|
|
10839
|
+
{
|
|
10840
|
+
variant: "destructive",
|
|
10841
|
+
className: "rounded-t-none no-active-animation",
|
|
10842
|
+
onClick: () => setOpen(false),
|
|
10843
|
+
children: "Fechar"
|
|
10844
|
+
}
|
|
10845
|
+
)
|
|
10799
10846
|
] })
|
|
10800
10847
|
}
|
|
10801
10848
|
)
|
|
@@ -10817,7 +10864,7 @@ import {
|
|
|
10817
10864
|
} from "@phosphor-icons/react";
|
|
10818
10865
|
import { motion as motion15, AnimatePresence as AnimatePresence11, useAnimation } from "framer-motion";
|
|
10819
10866
|
import { CalendarDotIcon } from "@phosphor-icons/react/dist/ssr";
|
|
10820
|
-
import { jsx as jsx67, jsxs as
|
|
10867
|
+
import { jsx as jsx67, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
10821
10868
|
var dateFnsLocale = ptBR2?.default ?? ptBR2;
|
|
10822
10869
|
function RangePicker({
|
|
10823
10870
|
value,
|
|
@@ -10841,23 +10888,29 @@ function RangePicker({
|
|
|
10841
10888
|
setRange(void 0);
|
|
10842
10889
|
onChange?.(void 0);
|
|
10843
10890
|
};
|
|
10844
|
-
return /* @__PURE__ */
|
|
10845
|
-
/* @__PURE__ */ jsx67(PopoverTriggerBase, { asChild: true, children: /* @__PURE__ */ jsx67(
|
|
10891
|
+
return /* @__PURE__ */ jsxs50(PopoverBase, { open, onOpenChange: setOpen, children: [
|
|
10892
|
+
/* @__PURE__ */ jsx67(PopoverTriggerBase, { asChild: true, className: cn(error && "border-red-500"), children: /* @__PURE__ */ jsx67(
|
|
10846
10893
|
motion15.div,
|
|
10847
10894
|
{
|
|
10848
10895
|
whileTap: { scale: 0.97 },
|
|
10849
10896
|
whileHover: { scale: open ? 1.03 : 1.01 },
|
|
10850
10897
|
transition: { type: "spring", stiffness: 300, damping: 20 },
|
|
10851
|
-
children: /* @__PURE__ */
|
|
10898
|
+
children: /* @__PURE__ */ jsxs50(
|
|
10852
10899
|
ButtonBase,
|
|
10853
10900
|
{
|
|
10854
10901
|
variant: "outline",
|
|
10855
|
-
className:
|
|
10902
|
+
className: cn(
|
|
10903
|
+
"w-full justify-start text-left min-w-0 overflow-hidden",
|
|
10904
|
+
!range && "text-muted-foreground"
|
|
10905
|
+
),
|
|
10856
10906
|
children: [
|
|
10857
10907
|
/* @__PURE__ */ jsx67(
|
|
10858
10908
|
motion15.span,
|
|
10859
10909
|
{
|
|
10860
|
-
className:
|
|
10910
|
+
className: cn(
|
|
10911
|
+
"truncate flex-1",
|
|
10912
|
+
!range && "text-muted-foreground"
|
|
10913
|
+
),
|
|
10861
10914
|
transition: { duration: 0.2 },
|
|
10862
10915
|
animate: controls,
|
|
10863
10916
|
children: range?.from && range?.to ? `${format2(range.from, "P", {
|
|
@@ -10870,7 +10923,7 @@ function RangePicker({
|
|
|
10870
10923
|
{
|
|
10871
10924
|
animate: open ? { rotate: 8, scale: 1.15 } : { rotate: 0, scale: 1 },
|
|
10872
10925
|
transition: { type: "spring", stiffness: 300, damping: 18 },
|
|
10873
|
-
children: /* @__PURE__ */ jsx67(CalendarBlankIcon2, { className: "w-
|
|
10926
|
+
children: /* @__PURE__ */ jsx67(CalendarBlankIcon2, { className: "flex-shrink-0 w-5 h-5 sm:w-6 sm:h-6" })
|
|
10874
10927
|
}
|
|
10875
10928
|
)
|
|
10876
10929
|
]
|
|
@@ -10884,7 +10937,7 @@ function RangePicker({
|
|
|
10884
10937
|
{
|
|
10885
10938
|
asChild: true,
|
|
10886
10939
|
className: "w-auto min-w-[250px] p-0 shadow-xl overflow-y-hidden",
|
|
10887
|
-
children: /* @__PURE__ */
|
|
10940
|
+
children: /* @__PURE__ */ jsxs50(
|
|
10888
10941
|
motion15.div,
|
|
10889
10942
|
{
|
|
10890
10943
|
initial: { opacity: 0, y: 16 },
|
|
@@ -10954,7 +11007,7 @@ function RangePicker({
|
|
|
10954
11007
|
)
|
|
10955
11008
|
}
|
|
10956
11009
|
) }),
|
|
10957
|
-
/* @__PURE__ */
|
|
11010
|
+
/* @__PURE__ */ jsxs50("div", { className: "flex justify-end gap-2 px-4 pb-4", children: [
|
|
10958
11011
|
/* @__PURE__ */ jsx67("div", { style: { display: "inline-block" }, children: /* @__PURE__ */ jsx67(
|
|
10959
11012
|
motion15.div,
|
|
10960
11013
|
{
|
|
@@ -11020,8 +11073,8 @@ RangePicker.displayName = "RangePicker";
|
|
|
11020
11073
|
|
|
11021
11074
|
// src/components/ui/navigation/ContextMenuBase.tsx
|
|
11022
11075
|
import * as ContextMenuPrimitive from "@radix-ui/react-context-menu";
|
|
11023
|
-
import { CaretRightIcon as CaretRightIcon6, CheckIcon as
|
|
11024
|
-
import { jsx as jsx68, jsxs as
|
|
11076
|
+
import { CaretRightIcon as CaretRightIcon6, CheckIcon as CheckIcon10, CircleIcon as CircleIcon2 } from "@phosphor-icons/react";
|
|
11077
|
+
import { jsx as jsx68, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
11025
11078
|
function ContextMenuBase(props) {
|
|
11026
11079
|
return /* @__PURE__ */ jsx68(ContextMenuPrimitive.Root, { "data-slot": "context-menu", ...props });
|
|
11027
11080
|
}
|
|
@@ -11046,7 +11099,7 @@ function ContextMenuSubTriggerBase({
|
|
|
11046
11099
|
children,
|
|
11047
11100
|
...props
|
|
11048
11101
|
}) {
|
|
11049
|
-
return /* @__PURE__ */
|
|
11102
|
+
return /* @__PURE__ */ jsxs51(
|
|
11050
11103
|
ContextMenuPrimitive.SubTrigger,
|
|
11051
11104
|
{
|
|
11052
11105
|
"data-slot": "context-menu-sub-trigger",
|
|
@@ -11142,7 +11195,7 @@ function ContextMenuCheckboxItemBase({
|
|
|
11142
11195
|
checked,
|
|
11143
11196
|
...props
|
|
11144
11197
|
}) {
|
|
11145
|
-
return /* @__PURE__ */
|
|
11198
|
+
return /* @__PURE__ */ jsxs51(
|
|
11146
11199
|
ContextMenuPrimitive.CheckboxItem,
|
|
11147
11200
|
{
|
|
11148
11201
|
"data-slot": "context-menu-checkbox-item",
|
|
@@ -11157,7 +11210,7 @@ function ContextMenuCheckboxItemBase({
|
|
|
11157
11210
|
checked,
|
|
11158
11211
|
...props,
|
|
11159
11212
|
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(
|
|
11213
|
+
/* @__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
11214
|
children
|
|
11162
11215
|
]
|
|
11163
11216
|
}
|
|
@@ -11168,7 +11221,7 @@ function ContextMenuRadioItemBase({
|
|
|
11168
11221
|
children,
|
|
11169
11222
|
...props
|
|
11170
11223
|
}) {
|
|
11171
|
-
return /* @__PURE__ */
|
|
11224
|
+
return /* @__PURE__ */ jsxs51(
|
|
11172
11225
|
ContextMenuPrimitive.RadioItem,
|
|
11173
11226
|
{
|
|
11174
11227
|
"data-slot": "context-menu-radio-item",
|
|
@@ -11234,7 +11287,7 @@ function ContextMenuShortcutBase({
|
|
|
11234
11287
|
import {
|
|
11235
11288
|
ArrowRightIcon as ArrowRightIcon3,
|
|
11236
11289
|
ArrowsOutIcon,
|
|
11237
|
-
CheckIcon as
|
|
11290
|
+
CheckIcon as CheckIcon11,
|
|
11238
11291
|
CodeIcon,
|
|
11239
11292
|
CopyIcon as CopyIcon2,
|
|
11240
11293
|
DownloadIcon,
|
|
@@ -11245,7 +11298,7 @@ import {
|
|
|
11245
11298
|
} from "@phosphor-icons/react";
|
|
11246
11299
|
import React44 from "react";
|
|
11247
11300
|
import { Prism as SyntaxHighlighter } from "react-syntax-highlighter";
|
|
11248
|
-
import { jsx as jsx69, jsxs as
|
|
11301
|
+
import { jsx as jsx69, jsxs as jsxs52 } from "react/jsx-runtime";
|
|
11249
11302
|
var CodeBlock = ({
|
|
11250
11303
|
language,
|
|
11251
11304
|
filename,
|
|
@@ -11339,23 +11392,23 @@ var CodeBlock = ({
|
|
|
11339
11392
|
return { lines, chars, words };
|
|
11340
11393
|
};
|
|
11341
11394
|
const stats = showStats ? getCodeStats(activeCodeSanitized) : null;
|
|
11342
|
-
return /* @__PURE__ */
|
|
11395
|
+
return /* @__PURE__ */ jsxs52(
|
|
11343
11396
|
"div",
|
|
11344
11397
|
{
|
|
11345
11398
|
className: `relative w-full rounded-xl overflow-hidden shadow-sm border no-underline-code`,
|
|
11346
11399
|
style: cssVars.container,
|
|
11347
11400
|
children: [
|
|
11348
11401
|
/* @__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__ */
|
|
11402
|
+
/* @__PURE__ */ jsxs52("div", { className: `flex items-stretch min-h-[3rem]`, style: cssVars.header, children: [
|
|
11403
|
+
/* @__PURE__ */ jsxs52("div", { className: "flex-1 flex items-center min-w-0 px-3", children: [
|
|
11404
|
+
/* @__PURE__ */ jsxs52("div", { className: "flex gap-2 mr-3 shrink-0", children: [
|
|
11352
11405
|
/* @__PURE__ */ jsx69("div", { className: "w-3 h-3 rounded-full bg-red-500" }),
|
|
11353
11406
|
/* @__PURE__ */ jsx69("div", { className: "w-3 h-3 rounded-full bg-yellow-500" }),
|
|
11354
11407
|
/* @__PURE__ */ jsx69("div", { className: "w-3 h-3 rounded-full bg-green-500" })
|
|
11355
11408
|
] }),
|
|
11356
|
-
breadcrumb.length > 0 && /* @__PURE__ */
|
|
11409
|
+
breadcrumb.length > 0 && /* @__PURE__ */ jsxs52("div", { className: "flex items-center min-w-0", children: [
|
|
11357
11410
|
/* @__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__ */
|
|
11411
|
+
/* @__PURE__ */ jsx69("div", { className: "flex items-center min-w-0 ml-2", children: breadcrumb.map((crumb, index) => /* @__PURE__ */ jsxs52(React44.Fragment, { children: [
|
|
11359
11412
|
/* @__PURE__ */ jsx69(
|
|
11360
11413
|
"span",
|
|
11361
11414
|
{
|
|
@@ -11375,8 +11428,8 @@ var CodeBlock = ({
|
|
|
11375
11428
|
] }, index)) })
|
|
11376
11429
|
] })
|
|
11377
11430
|
] }),
|
|
11378
|
-
/* @__PURE__ */
|
|
11379
|
-
stats && /* @__PURE__ */
|
|
11431
|
+
/* @__PURE__ */ jsxs52("div", { className: "flex items-center justify-end shrink-0 px-2", children: [
|
|
11432
|
+
stats && /* @__PURE__ */ jsxs52(
|
|
11380
11433
|
"div",
|
|
11381
11434
|
{
|
|
11382
11435
|
className: `text-xs mx-2 truncate hidden md:block`,
|
|
@@ -11389,7 +11442,7 @@ var CodeBlock = ({
|
|
|
11389
11442
|
]
|
|
11390
11443
|
}
|
|
11391
11444
|
),
|
|
11392
|
-
/* @__PURE__ */
|
|
11445
|
+
/* @__PURE__ */ jsxs52("div", { className: "flex", children: [
|
|
11393
11446
|
/* @__PURE__ */ jsx69(
|
|
11394
11447
|
"button",
|
|
11395
11448
|
{
|
|
@@ -11415,7 +11468,7 @@ var CodeBlock = ({
|
|
|
11415
11468
|
className: `p-2 transition-colors hover:bg-gray-200 dark:hover:bg-slate-700`,
|
|
11416
11469
|
title: "Copy code",
|
|
11417
11470
|
children: copied ? /* @__PURE__ */ jsx69(
|
|
11418
|
-
|
|
11471
|
+
CheckIcon11,
|
|
11419
11472
|
{
|
|
11420
11473
|
size: "1em",
|
|
11421
11474
|
style: { color: "hsl(var(--primary))" }
|
|
@@ -11434,7 +11487,7 @@ var CodeBlock = ({
|
|
|
11434
11487
|
borderColor: "hsl(var(--border))",
|
|
11435
11488
|
backgroundColor: "hsl(var(--popover))"
|
|
11436
11489
|
},
|
|
11437
|
-
children: tabs.map((tab, index) => /* @__PURE__ */
|
|
11490
|
+
children: tabs.map((tab, index) => /* @__PURE__ */ jsxs52(
|
|
11438
11491
|
"button",
|
|
11439
11492
|
{
|
|
11440
11493
|
onClick: () => setActiveTab(index),
|
|
@@ -11460,7 +11513,7 @@ var CodeBlock = ({
|
|
|
11460
11513
|
borderColor: "hsl(var(--border))",
|
|
11461
11514
|
backgroundColor: "hsl(var(--popover))"
|
|
11462
11515
|
},
|
|
11463
|
-
children: /* @__PURE__ */
|
|
11516
|
+
children: /* @__PURE__ */ jsxs52("div", { className: "flex items-center gap-2 min-w-0", children: [
|
|
11464
11517
|
getLanguageIcon(language),
|
|
11465
11518
|
/* @__PURE__ */ jsx69(
|
|
11466
11519
|
"span",
|
|
@@ -11511,7 +11564,7 @@ var CodeBlock = ({
|
|
|
11511
11564
|
)
|
|
11512
11565
|
}
|
|
11513
11566
|
),
|
|
11514
|
-
showStats && stats && /* @__PURE__ */
|
|
11567
|
+
showStats && stats && /* @__PURE__ */ jsxs52(
|
|
11515
11568
|
"div",
|
|
11516
11569
|
{
|
|
11517
11570
|
className: "px-3 py-2 border-t text-xs flex items-center justify-between min-h-[2.5rem]",
|
|
@@ -11521,18 +11574,18 @@ var CodeBlock = ({
|
|
|
11521
11574
|
color: "hsl(var(--muted-foreground))"
|
|
11522
11575
|
},
|
|
11523
11576
|
children: [
|
|
11524
|
-
/* @__PURE__ */
|
|
11577
|
+
/* @__PURE__ */ jsxs52("div", { className: "flex items-center gap-3 min-w-0", children: [
|
|
11525
11578
|
/* @__PURE__ */ jsx69("span", { className: "truncate", children: activeLanguage.toUpperCase() }),
|
|
11526
|
-
/* @__PURE__ */
|
|
11579
|
+
/* @__PURE__ */ jsxs52("span", { className: "truncate hidden sm:inline", children: [
|
|
11527
11580
|
stats.lines,
|
|
11528
11581
|
" lines"
|
|
11529
11582
|
] }),
|
|
11530
|
-
/* @__PURE__ */
|
|
11583
|
+
/* @__PURE__ */ jsxs52("span", { className: "truncate hidden md:inline", children: [
|
|
11531
11584
|
stats.chars,
|
|
11532
11585
|
" chars"
|
|
11533
11586
|
] })
|
|
11534
11587
|
] }),
|
|
11535
|
-
/* @__PURE__ */
|
|
11588
|
+
/* @__PURE__ */ jsxs52("div", { className: "flex items-center gap-1 shrink-0", children: [
|
|
11536
11589
|
/* @__PURE__ */ jsx69(GearIcon2, { size: "0.75em", style: cssVars.icon }),
|
|
11537
11590
|
/* @__PURE__ */ jsx69("span", { children: "UTF-8" })
|
|
11538
11591
|
] })
|
|
@@ -11545,7 +11598,7 @@ var CodeBlock = ({
|
|
|
11545
11598
|
};
|
|
11546
11599
|
|
|
11547
11600
|
// src/components/ui/data/StatusIndicator.tsx
|
|
11548
|
-
import { jsx as jsx70, jsxs as
|
|
11601
|
+
import { jsx as jsx70, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
11549
11602
|
function StatusIndicator({
|
|
11550
11603
|
color = "green",
|
|
11551
11604
|
size = "sm",
|
|
@@ -11583,7 +11636,7 @@ function StatusIndicator({
|
|
|
11583
11636
|
"flex-shrink-0"
|
|
11584
11637
|
);
|
|
11585
11638
|
if (position === "inline") {
|
|
11586
|
-
return /* @__PURE__ */
|
|
11639
|
+
return /* @__PURE__ */ jsxs53(
|
|
11587
11640
|
"span",
|
|
11588
11641
|
{
|
|
11589
11642
|
className: cn("inline-flex items-center gap-2", className),
|
|
@@ -11595,7 +11648,7 @@ function StatusIndicator({
|
|
|
11595
11648
|
}
|
|
11596
11649
|
);
|
|
11597
11650
|
}
|
|
11598
|
-
return /* @__PURE__ */
|
|
11651
|
+
return /* @__PURE__ */ jsxs53("div", { className: cn("relative inline-flex", className), ...props, children: [
|
|
11599
11652
|
show && /* @__PURE__ */ jsx70(
|
|
11600
11653
|
"span",
|
|
11601
11654
|
{
|
|
@@ -11612,16 +11665,68 @@ function StatusIndicator({
|
|
|
11612
11665
|
}
|
|
11613
11666
|
|
|
11614
11667
|
// src/components/ui/form/DebouncedInput.tsx
|
|
11615
|
-
import { useEffect as useEffect17, useState as
|
|
11668
|
+
import { useEffect as useEffect17, useState as useState20 } from "react";
|
|
11616
11669
|
import { CircleNotchIcon as CircleNotchIcon2 } from "@phosphor-icons/react";
|
|
11617
11670
|
import { jsx as jsx71 } from "react/jsx-runtime";
|
|
11671
|
+
function DebouncedInput({
|
|
11672
|
+
value: initialValue,
|
|
11673
|
+
onChange,
|
|
11674
|
+
debounce = 500,
|
|
11675
|
+
label,
|
|
11676
|
+
labelClassname,
|
|
11677
|
+
leftIcon,
|
|
11678
|
+
rightIcon,
|
|
11679
|
+
showLoadingIndicator = false,
|
|
11680
|
+
className,
|
|
11681
|
+
error,
|
|
11682
|
+
...props
|
|
11683
|
+
}) {
|
|
11684
|
+
const [value, setValue] = useState20(initialValue);
|
|
11685
|
+
const [isDebouncing, setIsDebouncing] = useState20(false);
|
|
11686
|
+
useEffect17(() => {
|
|
11687
|
+
setValue(initialValue);
|
|
11688
|
+
}, [initialValue]);
|
|
11689
|
+
useEffect17(() => {
|
|
11690
|
+
if (value !== initialValue) {
|
|
11691
|
+
setIsDebouncing(true);
|
|
11692
|
+
}
|
|
11693
|
+
const timeout = setTimeout(() => {
|
|
11694
|
+
onChange(value);
|
|
11695
|
+
setIsDebouncing(false);
|
|
11696
|
+
}, debounce);
|
|
11697
|
+
return () => {
|
|
11698
|
+
clearTimeout(timeout);
|
|
11699
|
+
setIsDebouncing(false);
|
|
11700
|
+
};
|
|
11701
|
+
}, [debounce, initialValue, onChange, value]);
|
|
11702
|
+
const renderRightIcon = () => {
|
|
11703
|
+
if (showLoadingIndicator && isDebouncing) {
|
|
11704
|
+
return /* @__PURE__ */ jsx71(CircleNotchIcon2, { className: "h-4 w-4 animate-spin text-muted-foreground" });
|
|
11705
|
+
}
|
|
11706
|
+
return rightIcon;
|
|
11707
|
+
};
|
|
11708
|
+
return /* @__PURE__ */ jsx71(
|
|
11709
|
+
InputBase,
|
|
11710
|
+
{
|
|
11711
|
+
...props,
|
|
11712
|
+
label,
|
|
11713
|
+
labelClassname,
|
|
11714
|
+
leftIcon,
|
|
11715
|
+
rightIcon: renderRightIcon(),
|
|
11716
|
+
className: cn("transition-all duration-200", className),
|
|
11717
|
+
value,
|
|
11718
|
+
onChange: (e) => setValue(e.target.value),
|
|
11719
|
+
error
|
|
11720
|
+
}
|
|
11721
|
+
);
|
|
11722
|
+
}
|
|
11618
11723
|
|
|
11619
11724
|
// src/components/event-calendar/AgendaView.tsx
|
|
11620
11725
|
import { addDays, format as format3, isToday } from "date-fns";
|
|
11621
11726
|
import { ptBR as ptBR3 } from "date-fns/locale";
|
|
11622
11727
|
import { useMemo as useMemo9 } from "react";
|
|
11623
11728
|
import { CalendarIcon as CalendarIcon2 } from "@phosphor-icons/react";
|
|
11624
|
-
import { jsx as jsx72, jsxs as
|
|
11729
|
+
import { jsx as jsx72, jsxs as jsxs54 } from "react/jsx-runtime";
|
|
11625
11730
|
function AgendaView({
|
|
11626
11731
|
currentDate,
|
|
11627
11732
|
events,
|
|
@@ -11642,14 +11747,14 @@ function AgendaView({
|
|
|
11642
11747
|
const hasEvents = days.some(
|
|
11643
11748
|
(day) => getAgendaEventsForDay(events, day).length > 0
|
|
11644
11749
|
);
|
|
11645
|
-
return /* @__PURE__ */ jsx72("div", { className: "border-border/70 border-t px-4", children: !hasEvents ? /* @__PURE__ */
|
|
11750
|
+
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
11751
|
/* @__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: "
|
|
11752
|
+
/* @__PURE__ */ jsx72("h3", { className: "font-medium text-lg", children: "Nenhum evento encontrado" }),
|
|
11753
|
+
/* @__PURE__ */ jsx72("p", { className: "text-muted-foreground", children: "N\xE3o h\xE1 eventos agendados para este per\xEDodo." })
|
|
11649
11754
|
] }) : days.map((day) => {
|
|
11650
11755
|
const dayEvents = getAgendaEventsForDay(events, day);
|
|
11651
11756
|
if (dayEvents.length === 0) return null;
|
|
11652
|
-
return /* @__PURE__ */
|
|
11757
|
+
return /* @__PURE__ */ jsxs54(
|
|
11653
11758
|
"div",
|
|
11654
11759
|
{
|
|
11655
11760
|
className: "relative my-12 border-border/70 border-t",
|
|
@@ -11692,7 +11797,7 @@ import {
|
|
|
11692
11797
|
useSensors
|
|
11693
11798
|
} from "@dnd-kit/core";
|
|
11694
11799
|
import { addMinutes, differenceInMinutes } from "date-fns";
|
|
11695
|
-
import { useId as useId2, useRef as useRef9, useState as
|
|
11800
|
+
import { useId as useId2, useRef as useRef9, useState as useState21 } from "react";
|
|
11696
11801
|
|
|
11697
11802
|
// src/components/event-calendar/hooks.ts
|
|
11698
11803
|
import { createContext as createContext5, useContext as useContext6 } from "react";
|
|
@@ -11709,21 +11814,21 @@ var CalendarDndContext = createContext5({
|
|
|
11709
11814
|
var useCalendarDnd = () => useContext6(CalendarDndContext);
|
|
11710
11815
|
|
|
11711
11816
|
// src/components/event-calendar/CalendarDND.tsx
|
|
11712
|
-
import { jsx as jsx73, jsxs as
|
|
11817
|
+
import { jsx as jsx73, jsxs as jsxs55 } from "react/jsx-runtime";
|
|
11713
11818
|
function CalendarDndProvider({
|
|
11714
11819
|
children,
|
|
11715
11820
|
onEventUpdate
|
|
11716
11821
|
}) {
|
|
11717
|
-
const [activeEvent, setActiveEvent] =
|
|
11718
|
-
const [activeId, setActiveId] =
|
|
11719
|
-
const [activeView, setActiveView] =
|
|
11822
|
+
const [activeEvent, setActiveEvent] = useState21(null);
|
|
11823
|
+
const [activeId, setActiveId] = useState21(null);
|
|
11824
|
+
const [activeView, setActiveView] = useState21(
|
|
11720
11825
|
null
|
|
11721
11826
|
);
|
|
11722
|
-
const [currentTime, setCurrentTime] =
|
|
11723
|
-
const [eventHeight, setEventHeight] =
|
|
11724
|
-
const [isMultiDay, setIsMultiDay] =
|
|
11725
|
-
const [multiDayWidth, setMultiDayWidth] =
|
|
11726
|
-
const [dragHandlePosition, setDragHandlePosition] =
|
|
11827
|
+
const [currentTime, setCurrentTime] = useState21(null);
|
|
11828
|
+
const [eventHeight, setEventHeight] = useState21(null);
|
|
11829
|
+
const [isMultiDay, setIsMultiDay] = useState21(false);
|
|
11830
|
+
const [multiDayWidth, setMultiDayWidth] = useState21(null);
|
|
11831
|
+
const [dragHandlePosition, setDragHandlePosition] = useState21(null);
|
|
11727
11832
|
const eventDimensions = useRef9({ height: 0 });
|
|
11728
11833
|
const sensors = useSensors(
|
|
11729
11834
|
useSensor(MouseSensor, {
|
|
@@ -11882,7 +11987,7 @@ function CalendarDndProvider({
|
|
|
11882
11987
|
onDragOver: handleDragOver,
|
|
11883
11988
|
onDragStart: handleDragStart,
|
|
11884
11989
|
sensors,
|
|
11885
|
-
children: /* @__PURE__ */
|
|
11990
|
+
children: /* @__PURE__ */ jsxs55(
|
|
11886
11991
|
CalendarDndContext.Provider,
|
|
11887
11992
|
{
|
|
11888
11993
|
value: {
|
|
@@ -11949,7 +12054,7 @@ import {
|
|
|
11949
12054
|
startOfDay
|
|
11950
12055
|
} from "date-fns";
|
|
11951
12056
|
import { useMemo as useMemo10 } from "react";
|
|
11952
|
-
import { jsx as jsx74, jsxs as
|
|
12057
|
+
import { jsx as jsx74, jsxs as jsxs56 } from "react/jsx-runtime";
|
|
11953
12058
|
function DayView({
|
|
11954
12059
|
currentDate,
|
|
11955
12060
|
events,
|
|
@@ -12052,8 +12157,8 @@ function DayView({
|
|
|
12052
12157
|
currentDate,
|
|
12053
12158
|
"day"
|
|
12054
12159
|
);
|
|
12055
|
-
return /* @__PURE__ */
|
|
12056
|
-
showAllDaySection && /* @__PURE__ */ jsx74("div", { className: "border-border/70 border-t bg-muted/50", children: /* @__PURE__ */
|
|
12160
|
+
return /* @__PURE__ */ jsxs56("div", { className: "contents", "data-slot": "day-view", children: [
|
|
12161
|
+
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
12162
|
/* @__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
12163
|
/* @__PURE__ */ jsx74("div", { className: "relative border-border/70 border-r p-1 last:border-r-0", children: allDayEvents.map((event) => {
|
|
12059
12164
|
const eventStart = new Date(event.start);
|
|
@@ -12074,16 +12179,16 @@ function DayView({
|
|
|
12074
12179
|
);
|
|
12075
12180
|
}) })
|
|
12076
12181
|
] }) }),
|
|
12077
|
-
/* @__PURE__ */
|
|
12182
|
+
/* @__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
12183
|
/* @__PURE__ */ jsx74("div", { children: hours.map((hour, index) => /* @__PURE__ */ jsx74(
|
|
12079
12184
|
"div",
|
|
12080
12185
|
{
|
|
12081
12186
|
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, "
|
|
12187
|
+
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
12188
|
},
|
|
12084
12189
|
hour.toString()
|
|
12085
12190
|
)) }),
|
|
12086
|
-
/* @__PURE__ */
|
|
12191
|
+
/* @__PURE__ */ jsxs56("div", { className: "relative", children: [
|
|
12087
12192
|
positionedEvents.map((positionedEvent) => /* @__PURE__ */ jsx74(
|
|
12088
12193
|
"div",
|
|
12089
12194
|
{
|
|
@@ -12113,7 +12218,7 @@ function DayView({
|
|
|
12113
12218
|
{
|
|
12114
12219
|
className: "pointer-events-none absolute right-0 left-0 z-20",
|
|
12115
12220
|
style: { top: `${currentTimePosition}%` },
|
|
12116
|
-
children: /* @__PURE__ */
|
|
12221
|
+
children: /* @__PURE__ */ jsxs56("div", { className: "relative flex items-center", children: [
|
|
12117
12222
|
/* @__PURE__ */ jsx74("div", { className: "-left-1 absolute h-2 w-2 rounded-full bg-primary" }),
|
|
12118
12223
|
/* @__PURE__ */ jsx74("div", { className: "h-[2px] w-full bg-primary" })
|
|
12119
12224
|
] })
|
|
@@ -12163,7 +12268,7 @@ function DayView({
|
|
|
12163
12268
|
import { useDraggable } from "@dnd-kit/core";
|
|
12164
12269
|
import { CSS } from "@dnd-kit/utilities";
|
|
12165
12270
|
import { differenceInDays } from "date-fns";
|
|
12166
|
-
import { useRef as useRef10, useState as
|
|
12271
|
+
import { useRef as useRef10, useState as useState22 } from "react";
|
|
12167
12272
|
import { jsx as jsx75 } from "react/jsx-runtime";
|
|
12168
12273
|
function DraggableEvent({
|
|
12169
12274
|
event,
|
|
@@ -12179,7 +12284,7 @@ function DraggableEvent({
|
|
|
12179
12284
|
}) {
|
|
12180
12285
|
const { activeId } = useCalendarDnd();
|
|
12181
12286
|
const elementRef = useRef10(null);
|
|
12182
|
-
const [dragHandlePosition, setDragHandlePosition] =
|
|
12287
|
+
const [dragHandlePosition, setDragHandlePosition] = useState22(null);
|
|
12183
12288
|
const eventStart = new Date(event.start);
|
|
12184
12289
|
const eventEnd = new Date(event.end);
|
|
12185
12290
|
const isMultiDayEvent2 = isMultiDay || event.allDay || differenceInDays(eventEnd, eventStart) >= 1;
|
|
@@ -12314,7 +12419,7 @@ import {
|
|
|
12314
12419
|
subWeeks
|
|
12315
12420
|
} from "date-fns";
|
|
12316
12421
|
import { ptBR as ptBR4 } from "date-fns/locale";
|
|
12317
|
-
import { useEffect as useEffect18, useMemo as useMemo11, useState as
|
|
12422
|
+
import { useEffect as useEffect18, useMemo as useMemo11, useState as useState23, useCallback as useCallback12 } from "react";
|
|
12318
12423
|
import { toast as toast3 } from "sonner";
|
|
12319
12424
|
import {
|
|
12320
12425
|
ArrowDownIcon,
|
|
@@ -12323,7 +12428,7 @@ import {
|
|
|
12323
12428
|
CalendarIcon as CalendarIcon3,
|
|
12324
12429
|
PlusIcon as PlusIcon3
|
|
12325
12430
|
} from "@phosphor-icons/react";
|
|
12326
|
-
import { Fragment as Fragment10, jsx as jsx77, jsxs as
|
|
12431
|
+
import { Fragment as Fragment10, jsx as jsx77, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
12327
12432
|
function EventCalendar({
|
|
12328
12433
|
events = [],
|
|
12329
12434
|
onEventAdd,
|
|
@@ -12332,9 +12437,9 @@ function EventCalendar({
|
|
|
12332
12437
|
className,
|
|
12333
12438
|
initialView = "month"
|
|
12334
12439
|
}) {
|
|
12335
|
-
const [currentDate, setCurrentDate] =
|
|
12336
|
-
const [view, setView] =
|
|
12337
|
-
const [isFading, setIsFading] =
|
|
12440
|
+
const [currentDate, setCurrentDate] = useState23(/* @__PURE__ */ new Date());
|
|
12441
|
+
const [view, setView] = useState23(initialView);
|
|
12442
|
+
const [isFading, setIsFading] = useState23(false);
|
|
12338
12443
|
const FADE_DURATION = 220;
|
|
12339
12444
|
const changeView = useCallback12(
|
|
12340
12445
|
(next) => {
|
|
@@ -12347,8 +12452,8 @@ function EventCalendar({
|
|
|
12347
12452
|
},
|
|
12348
12453
|
[view]
|
|
12349
12454
|
);
|
|
12350
|
-
const [isPaging, setIsPaging] =
|
|
12351
|
-
const [pageDirection, setPageDirection] =
|
|
12455
|
+
const [isPaging, setIsPaging] = useState23(false);
|
|
12456
|
+
const [pageDirection, setPageDirection] = useState23(
|
|
12352
12457
|
null
|
|
12353
12458
|
);
|
|
12354
12459
|
const PAGE_DURATION = 200;
|
|
@@ -12366,8 +12471,8 @@ function EventCalendar({
|
|
|
12366
12471
|
},
|
|
12367
12472
|
[]
|
|
12368
12473
|
);
|
|
12369
|
-
const [isEventDialogOpen, setIsEventDialogOpen] =
|
|
12370
|
-
const [selectedEvent, setSelectedEvent] =
|
|
12474
|
+
const [isEventDialogOpen, setIsEventDialogOpen] = useState23(false);
|
|
12475
|
+
const [selectedEvent, setSelectedEvent] = useState23(
|
|
12371
12476
|
null
|
|
12372
12477
|
);
|
|
12373
12478
|
useEffect18(() => {
|
|
@@ -12526,7 +12631,7 @@ function EventCalendar({
|
|
|
12526
12631
|
const year = format5(currentDate, "yyyy", { locale: ptBR4 });
|
|
12527
12632
|
const short = `${dayNum} de ${month} de ${year}`;
|
|
12528
12633
|
const long = `${format5(currentDate, "EEE", { locale: ptBR4 })}, ${dayNum} de ${month} de ${year}`;
|
|
12529
|
-
return /* @__PURE__ */
|
|
12634
|
+
return /* @__PURE__ */ jsxs57(Fragment10, { children: [
|
|
12530
12635
|
/* @__PURE__ */ jsx77("span", { "aria-hidden": "true", className: "min-[480px]:hidden", children: short }),
|
|
12531
12636
|
/* @__PURE__ */ jsx77("span", { "aria-hidden": "true", className: "max-[479px]:hidden min-md:hidden", children: short }),
|
|
12532
12637
|
/* @__PURE__ */ jsx77("span", { className: "max-md:hidden", children: long })
|
|
@@ -12553,8 +12658,8 @@ function EventCalendar({
|
|
|
12553
12658
|
"--event-height": `${EventHeight}px`,
|
|
12554
12659
|
"--week-cells-height": `${WeekCellsHeight}px`
|
|
12555
12660
|
},
|
|
12556
|
-
children: /* @__PURE__ */
|
|
12557
|
-
/* @__PURE__ */
|
|
12661
|
+
children: /* @__PURE__ */ jsxs57(CalendarDndProvider, { onEventUpdate: handleEventUpdate, children: [
|
|
12662
|
+
/* @__PURE__ */ jsxs57(
|
|
12558
12663
|
"div",
|
|
12559
12664
|
{
|
|
12560
12665
|
className: cn(
|
|
@@ -12562,8 +12667,8 @@ function EventCalendar({
|
|
|
12562
12667
|
className
|
|
12563
12668
|
),
|
|
12564
12669
|
children: [
|
|
12565
|
-
/* @__PURE__ */
|
|
12566
|
-
/* @__PURE__ */
|
|
12670
|
+
/* @__PURE__ */ jsxs57("div", { className: "flex items-center gap-1 sm:gap-4", children: [
|
|
12671
|
+
/* @__PURE__ */ jsxs57(
|
|
12567
12672
|
ButtonBase,
|
|
12568
12673
|
{
|
|
12569
12674
|
className: "max-[479px]:aspect-square max-[479px]:p-0!",
|
|
@@ -12582,7 +12687,7 @@ function EventCalendar({
|
|
|
12582
12687
|
]
|
|
12583
12688
|
}
|
|
12584
12689
|
),
|
|
12585
|
-
/* @__PURE__ */
|
|
12690
|
+
/* @__PURE__ */ jsxs57("div", { className: "flex items-center sm:gap-2", children: [
|
|
12586
12691
|
/* @__PURE__ */ jsx77(
|
|
12587
12692
|
ButtonBase,
|
|
12588
12693
|
{
|
|
@@ -12606,15 +12711,15 @@ function EventCalendar({
|
|
|
12606
12711
|
] }),
|
|
12607
12712
|
/* @__PURE__ */ jsx77("h2", { className: "font-semibold text-sm sm:text-lg md:text-xl", children: viewTitle })
|
|
12608
12713
|
] }),
|
|
12609
|
-
/* @__PURE__ */
|
|
12610
|
-
/* @__PURE__ */
|
|
12611
|
-
/* @__PURE__ */ jsx77(DropDownMenuTriggerBase, { asChild: true, children: /* @__PURE__ */
|
|
12714
|
+
/* @__PURE__ */ jsxs57("div", { className: "flex items-center gap-2", children: [
|
|
12715
|
+
/* @__PURE__ */ jsxs57(DropDownMenuBase, { children: [
|
|
12716
|
+
/* @__PURE__ */ jsx77(DropDownMenuTriggerBase, { asChild: true, children: /* @__PURE__ */ jsxs57(
|
|
12612
12717
|
ButtonBase,
|
|
12613
12718
|
{
|
|
12614
12719
|
className: "gap-1.5 max-[479px]:h-8",
|
|
12615
12720
|
variant: "outline",
|
|
12616
12721
|
children: [
|
|
12617
|
-
/* @__PURE__ */
|
|
12722
|
+
/* @__PURE__ */ jsxs57("span", { children: [
|
|
12618
12723
|
/* @__PURE__ */ jsx77("span", { "aria-hidden": "true", className: "min-[480px]:hidden", children: (() => {
|
|
12619
12724
|
const labels = {
|
|
12620
12725
|
month: "M\xEAs",
|
|
@@ -12645,26 +12750,26 @@ function EventCalendar({
|
|
|
12645
12750
|
]
|
|
12646
12751
|
}
|
|
12647
12752
|
) }),
|
|
12648
|
-
/* @__PURE__ */
|
|
12649
|
-
/* @__PURE__ */
|
|
12753
|
+
/* @__PURE__ */ jsxs57(DropDownMenuContentBase, { align: "end", className: "min-w-32", children: [
|
|
12754
|
+
/* @__PURE__ */ jsxs57(DropDownMenuItemBase, { onClick: () => changeView("month"), children: [
|
|
12650
12755
|
"M\xEAs ",
|
|
12651
12756
|
/* @__PURE__ */ jsx77(DropDownMenuShortcutBase, { children: "M" })
|
|
12652
12757
|
] }),
|
|
12653
|
-
/* @__PURE__ */
|
|
12758
|
+
/* @__PURE__ */ jsxs57(DropDownMenuItemBase, { onClick: () => changeView("week"), children: [
|
|
12654
12759
|
"Semana ",
|
|
12655
12760
|
/* @__PURE__ */ jsx77(DropDownMenuShortcutBase, { children: "S" })
|
|
12656
12761
|
] }),
|
|
12657
|
-
/* @__PURE__ */
|
|
12762
|
+
/* @__PURE__ */ jsxs57(DropDownMenuItemBase, { onClick: () => changeView("day"), children: [
|
|
12658
12763
|
"Dia ",
|
|
12659
12764
|
/* @__PURE__ */ jsx77(DropDownMenuShortcutBase, { children: "D" })
|
|
12660
12765
|
] }),
|
|
12661
|
-
/* @__PURE__ */
|
|
12766
|
+
/* @__PURE__ */ jsxs57(DropDownMenuItemBase, { onClick: () => changeView("agenda"), children: [
|
|
12662
12767
|
"Agenda ",
|
|
12663
12768
|
/* @__PURE__ */ jsx77(DropDownMenuShortcutBase, { children: "A" })
|
|
12664
12769
|
] })
|
|
12665
12770
|
] })
|
|
12666
12771
|
] }),
|
|
12667
|
-
/* @__PURE__ */
|
|
12772
|
+
/* @__PURE__ */ jsxs57(
|
|
12668
12773
|
ButtonBase,
|
|
12669
12774
|
{
|
|
12670
12775
|
className: "max-[479px]:aspect-square max-[479px]:p-0!",
|
|
@@ -12690,7 +12795,7 @@ function EventCalendar({
|
|
|
12690
12795
|
]
|
|
12691
12796
|
}
|
|
12692
12797
|
),
|
|
12693
|
-
/* @__PURE__ */
|
|
12798
|
+
/* @__PURE__ */ jsxs57(
|
|
12694
12799
|
"div",
|
|
12695
12800
|
{
|
|
12696
12801
|
className: cn(
|
|
@@ -12757,12 +12862,12 @@ function EventCalendar({
|
|
|
12757
12862
|
|
|
12758
12863
|
// src/components/event-calendar/EventDialog.tsx
|
|
12759
12864
|
import { format as format6, isBefore } from "date-fns";
|
|
12760
|
-
import { useCallback as useCallback13, useEffect as useEffect19, useMemo as useMemo12, useState as
|
|
12865
|
+
import { useCallback as useCallback13, useEffect as useEffect19, useMemo as useMemo12, useState as useState24 } from "react";
|
|
12761
12866
|
import { RadioGroup as RadioGroup3, RadioGroupItem } from "@radix-ui/react-radio-group";
|
|
12762
12867
|
import { motion as motion16 } from "framer-motion";
|
|
12763
12868
|
import { ptBR as ptBR5 } from "date-fns/locale";
|
|
12764
12869
|
import { CalendarIcon as CalendarIcon4, TrashIcon as TrashIcon3 } from "@phosphor-icons/react";
|
|
12765
|
-
import { jsx as jsx78, jsxs as
|
|
12870
|
+
import { jsx as jsx78, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
12766
12871
|
function EventDialog({
|
|
12767
12872
|
event,
|
|
12768
12873
|
isOpen,
|
|
@@ -12770,18 +12875,18 @@ function EventDialog({
|
|
|
12770
12875
|
onSave,
|
|
12771
12876
|
onDelete
|
|
12772
12877
|
}) {
|
|
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] =
|
|
12878
|
+
const [title, setTitle] = useState24("");
|
|
12879
|
+
const [description, setDescription] = useState24("");
|
|
12880
|
+
const [startDate, setStartDate] = useState24(/* @__PURE__ */ new Date());
|
|
12881
|
+
const [endDate, setEndDate] = useState24(/* @__PURE__ */ new Date());
|
|
12882
|
+
const [startTime, setStartTime] = useState24(`${DefaultStartHour}:00`);
|
|
12883
|
+
const [endTime, setEndTime] = useState24(`${DefaultEndHour}:00`);
|
|
12884
|
+
const [allDay, setAllDay] = useState24(false);
|
|
12885
|
+
const [location, setLocation] = useState24("");
|
|
12886
|
+
const [color, setColor] = useState24("sky");
|
|
12887
|
+
const [error, setError] = useState24(null);
|
|
12888
|
+
const [startDateOpen, setStartDateOpen] = useState24(false);
|
|
12889
|
+
const [endDateOpen, setEndDateOpen] = useState24(false);
|
|
12785
12890
|
useEffect19(() => {
|
|
12786
12891
|
}, [event]);
|
|
12787
12892
|
const resetForm = useCallback13(() => {
|
|
@@ -12920,7 +13025,7 @@ function EventDialog({
|
|
|
12920
13025
|
},
|
|
12921
13026
|
exit: { opacity: 0, y: 8, scale: 0.995, transition: { duration: 0.12 } }
|
|
12922
13027
|
};
|
|
12923
|
-
return /* @__PURE__ */ jsx78(DialogBase, { onOpenChange: (open) => !open && onClose(), open: isOpen, children: /* @__PURE__ */ jsx78(DialogContentBase, { className: "sm:max-w-[425px]", children: /* @__PURE__ */
|
|
13028
|
+
return /* @__PURE__ */ jsx78(DialogBase, { onOpenChange: (open) => !open && onClose(), open: isOpen, children: /* @__PURE__ */ jsx78(DialogContentBase, { className: "sm:max-w-[425px]", children: /* @__PURE__ */ jsxs58(
|
|
12924
13029
|
motion16.div,
|
|
12925
13030
|
{
|
|
12926
13031
|
variants: dialogVariants2,
|
|
@@ -12928,13 +13033,13 @@ function EventDialog({
|
|
|
12928
13033
|
animate: "visible",
|
|
12929
13034
|
exit: "exit",
|
|
12930
13035
|
children: [
|
|
12931
|
-
/* @__PURE__ */
|
|
13036
|
+
/* @__PURE__ */ jsxs58(DialogHeaderBase, { children: [
|
|
12932
13037
|
/* @__PURE__ */ jsx78(DialogTitleBase, { children: event?.id ? "Editar evento" : "Criar evento" }),
|
|
12933
13038
|
/* @__PURE__ */ jsx78(DialogDescriptionBase, { className: "sr-only", children: event?.id ? "Edite os detalhes deste evento" : "Adicione um novo evento ao seu calend\xE1rio" })
|
|
12934
13039
|
] }),
|
|
12935
13040
|
error && /* @__PURE__ */ jsx78("div", { className: "rounded-md bg-destructive/15 px-3 py-2 text-destructive text-sm", children: error }),
|
|
12936
|
-
/* @__PURE__ */
|
|
12937
|
-
/* @__PURE__ */
|
|
13041
|
+
/* @__PURE__ */ jsxs58("div", { className: "grid gap-4 py-4", children: [
|
|
13042
|
+
/* @__PURE__ */ jsxs58("div", { className: "*:not-first:mt-1.5", children: [
|
|
12938
13043
|
/* @__PURE__ */ jsx78(
|
|
12939
13044
|
LabelBase_default,
|
|
12940
13045
|
{
|
|
@@ -12952,7 +13057,7 @@ function EventDialog({
|
|
|
12952
13057
|
}
|
|
12953
13058
|
)
|
|
12954
13059
|
] }),
|
|
12955
|
-
/* @__PURE__ */
|
|
13060
|
+
/* @__PURE__ */ jsxs58("div", { className: "*:not-first:mt-1.5", children: [
|
|
12956
13061
|
/* @__PURE__ */ jsx78(
|
|
12957
13062
|
LabelBase_default,
|
|
12958
13063
|
{
|
|
@@ -12971,8 +13076,8 @@ function EventDialog({
|
|
|
12971
13076
|
}
|
|
12972
13077
|
)
|
|
12973
13078
|
] }),
|
|
12974
|
-
/* @__PURE__ */
|
|
12975
|
-
/* @__PURE__ */
|
|
13079
|
+
/* @__PURE__ */ jsxs58("div", { className: "flex gap-4", children: [
|
|
13080
|
+
/* @__PURE__ */ jsxs58("div", { className: "flex-1 *:not-first:mt-1.5", children: [
|
|
12976
13081
|
/* @__PURE__ */ jsx78(
|
|
12977
13082
|
LabelBase_default,
|
|
12978
13083
|
{
|
|
@@ -12981,13 +13086,13 @@ function EventDialog({
|
|
|
12981
13086
|
children: "Data de in\xEDcio"
|
|
12982
13087
|
}
|
|
12983
13088
|
),
|
|
12984
|
-
/* @__PURE__ */
|
|
13089
|
+
/* @__PURE__ */ jsxs58(
|
|
12985
13090
|
PopoverBase,
|
|
12986
13091
|
{
|
|
12987
13092
|
onOpenChange: setStartDateOpen,
|
|
12988
13093
|
open: startDateOpen,
|
|
12989
13094
|
children: [
|
|
12990
|
-
/* @__PURE__ */ jsx78(PopoverTriggerBase, { asChild: true, children: /* @__PURE__ */
|
|
13095
|
+
/* @__PURE__ */ jsx78(PopoverTriggerBase, { asChild: true, children: /* @__PURE__ */ jsxs58(
|
|
12991
13096
|
ButtonBase,
|
|
12992
13097
|
{
|
|
12993
13098
|
className: cn(
|
|
@@ -13040,7 +13145,7 @@ function EventDialog({
|
|
|
13040
13145
|
}
|
|
13041
13146
|
)
|
|
13042
13147
|
] }),
|
|
13043
|
-
!allDay && /* @__PURE__ */
|
|
13148
|
+
!allDay && /* @__PURE__ */ jsxs58("div", { className: "min-w-28 *:not-first:mt-1.5", children: [
|
|
13044
13149
|
/* @__PURE__ */ jsx78(
|
|
13045
13150
|
LabelBase_default,
|
|
13046
13151
|
{
|
|
@@ -13049,14 +13154,14 @@ function EventDialog({
|
|
|
13049
13154
|
children: "Hor\xE1rio de in\xEDcio"
|
|
13050
13155
|
}
|
|
13051
13156
|
),
|
|
13052
|
-
/* @__PURE__ */
|
|
13157
|
+
/* @__PURE__ */ jsxs58(SelectBase, { onValueChange: setStartTime, value: startTime, children: [
|
|
13053
13158
|
/* @__PURE__ */ jsx78(SelectTriggerBase, { id: "start-time", children: /* @__PURE__ */ jsx78(SelectValueBase, { placeholder: "Selecionar hor\xE1rio" }) }),
|
|
13054
13159
|
/* @__PURE__ */ jsx78(SelectContentBase, { children: timeOptions.map((option) => /* @__PURE__ */ jsx78(SelectItemBase, { value: option.value, children: option.label }, option.value)) })
|
|
13055
13160
|
] })
|
|
13056
13161
|
] })
|
|
13057
13162
|
] }),
|
|
13058
|
-
/* @__PURE__ */
|
|
13059
|
-
/* @__PURE__ */
|
|
13163
|
+
/* @__PURE__ */ jsxs58("div", { className: "flex gap-4", children: [
|
|
13164
|
+
/* @__PURE__ */ jsxs58("div", { className: "flex-1 *:not-first:mt-1.5", children: [
|
|
13060
13165
|
/* @__PURE__ */ jsx78(
|
|
13061
13166
|
LabelBase_default,
|
|
13062
13167
|
{
|
|
@@ -13065,8 +13170,8 @@ function EventDialog({
|
|
|
13065
13170
|
children: "Data de t\xE9rmino"
|
|
13066
13171
|
}
|
|
13067
13172
|
),
|
|
13068
|
-
/* @__PURE__ */
|
|
13069
|
-
/* @__PURE__ */ jsx78(PopoverTriggerBase, { asChild: true, children: /* @__PURE__ */
|
|
13173
|
+
/* @__PURE__ */ jsxs58(PopoverBase, { onOpenChange: setEndDateOpen, open: endDateOpen, children: [
|
|
13174
|
+
/* @__PURE__ */ jsx78(PopoverTriggerBase, { asChild: true, children: /* @__PURE__ */ jsxs58(
|
|
13070
13175
|
ButtonBase,
|
|
13071
13176
|
{
|
|
13072
13177
|
className: cn(
|
|
@@ -13115,7 +13220,7 @@ function EventDialog({
|
|
|
13115
13220
|
) })
|
|
13116
13221
|
] })
|
|
13117
13222
|
] }),
|
|
13118
|
-
!allDay && /* @__PURE__ */
|
|
13223
|
+
!allDay && /* @__PURE__ */ jsxs58("div", { className: "min-w-28 *:not-first:mt-1.5", children: [
|
|
13119
13224
|
/* @__PURE__ */ jsx78(
|
|
13120
13225
|
LabelBase_default,
|
|
13121
13226
|
{
|
|
@@ -13124,13 +13229,13 @@ function EventDialog({
|
|
|
13124
13229
|
children: "Hor\xE1rio de t\xE9rmino"
|
|
13125
13230
|
}
|
|
13126
13231
|
),
|
|
13127
|
-
/* @__PURE__ */
|
|
13232
|
+
/* @__PURE__ */ jsxs58(SelectBase, { onValueChange: setEndTime, value: endTime, children: [
|
|
13128
13233
|
/* @__PURE__ */ jsx78(SelectTriggerBase, { id: "end-time", children: /* @__PURE__ */ jsx78(SelectValueBase, { placeholder: "Selecionar hor\xE1rio" }) }),
|
|
13129
13234
|
/* @__PURE__ */ jsx78(SelectContentBase, { children: timeOptions.map((option) => /* @__PURE__ */ jsx78(SelectItemBase, { value: option.value, children: option.label }, option.value)) })
|
|
13130
13235
|
] })
|
|
13131
13236
|
] })
|
|
13132
13237
|
] }),
|
|
13133
|
-
/* @__PURE__ */ jsx78("div", { className: "flex items-center gap-2", children: /* @__PURE__ */
|
|
13238
|
+
/* @__PURE__ */ jsx78("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsxs58(
|
|
13134
13239
|
ButtonBase,
|
|
13135
13240
|
{
|
|
13136
13241
|
"aria-pressed": allDay,
|
|
@@ -13150,7 +13255,7 @@ function EventDialog({
|
|
|
13150
13255
|
]
|
|
13151
13256
|
}
|
|
13152
13257
|
) }),
|
|
13153
|
-
/* @__PURE__ */
|
|
13258
|
+
/* @__PURE__ */ jsxs58("div", { className: "*:not-first:mt-1.5", children: [
|
|
13154
13259
|
/* @__PURE__ */ jsx78(
|
|
13155
13260
|
LabelBase_default,
|
|
13156
13261
|
{
|
|
@@ -13168,7 +13273,7 @@ function EventDialog({
|
|
|
13168
13273
|
}
|
|
13169
13274
|
)
|
|
13170
13275
|
] }),
|
|
13171
|
-
/* @__PURE__ */
|
|
13276
|
+
/* @__PURE__ */ jsxs58("fieldset", { className: "space-y-4", children: [
|
|
13172
13277
|
/* @__PURE__ */ jsx78("legend", { className: "font-medium text-foreground text-sm leading-none", children: "Cor do evento" }),
|
|
13173
13278
|
/* @__PURE__ */ jsx78(
|
|
13174
13279
|
RadioGroup3,
|
|
@@ -13196,7 +13301,7 @@ function EventDialog({
|
|
|
13196
13301
|
)
|
|
13197
13302
|
] })
|
|
13198
13303
|
] }),
|
|
13199
|
-
/* @__PURE__ */
|
|
13304
|
+
/* @__PURE__ */ jsxs58(DialogFooterBase, { className: "flex-row sm:justify-between", children: [
|
|
13200
13305
|
event?.id && /* @__PURE__ */ jsx78(
|
|
13201
13306
|
ButtonBase,
|
|
13202
13307
|
{
|
|
@@ -13207,7 +13312,7 @@ function EventDialog({
|
|
|
13207
13312
|
children: /* @__PURE__ */ jsx78(TrashIcon3, { "aria-hidden": "true", size: 16 })
|
|
13208
13313
|
}
|
|
13209
13314
|
),
|
|
13210
|
-
/* @__PURE__ */
|
|
13315
|
+
/* @__PURE__ */ jsxs58("div", { className: "flex flex-1 justify-end gap-2", children: [
|
|
13211
13316
|
/* @__PURE__ */ jsx78(ButtonBase, { onClick: onClose, variant: "outline", children: "Cancelar" }),
|
|
13212
13317
|
/* @__PURE__ */ jsx78(ButtonBase, { onClick: handleSave, disabled: Boolean(error), children: "Salvar" })
|
|
13213
13318
|
] })
|
|
@@ -13218,11 +13323,11 @@ function EventDialog({
|
|
|
13218
13323
|
}
|
|
13219
13324
|
|
|
13220
13325
|
// src/components/event-calendar/EventItem.tsx
|
|
13221
|
-
import { differenceInMinutes as differenceInMinutes3, format as format7,
|
|
13326
|
+
import { differenceInMinutes as differenceInMinutes3, format as format7, isPast } from "date-fns";
|
|
13222
13327
|
import { useMemo as useMemo13 } from "react";
|
|
13223
|
-
import { Fragment as Fragment11, jsx as jsx79, jsxs as
|
|
13328
|
+
import { Fragment as Fragment11, jsx as jsx79, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
13224
13329
|
var formatTimeWithOptionalMinutes = (date) => {
|
|
13225
|
-
return format7(date,
|
|
13330
|
+
return format7(date, "HH:mm");
|
|
13226
13331
|
};
|
|
13227
13332
|
function EventWrapper({
|
|
13228
13333
|
event,
|
|
@@ -13324,7 +13429,7 @@ function EventItem({
|
|
|
13324
13429
|
onClick,
|
|
13325
13430
|
onMouseDown,
|
|
13326
13431
|
onTouchStart,
|
|
13327
|
-
children: children || /* @__PURE__ */
|
|
13432
|
+
children: children || /* @__PURE__ */ jsxs59("span", { className: "flex items-center gap-2 truncate", children: [
|
|
13328
13433
|
!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
13434
|
/* @__PURE__ */ jsx79("span", { className: "truncate font-medium", children: event.title })
|
|
13330
13435
|
] })
|
|
@@ -13352,17 +13457,17 @@ function EventItem({
|
|
|
13352
13457
|
onClick,
|
|
13353
13458
|
onMouseDown,
|
|
13354
13459
|
onTouchStart,
|
|
13355
|
-
children: durationMinutes < 45 ? /* @__PURE__ */
|
|
13460
|
+
children: durationMinutes < 45 ? /* @__PURE__ */ jsxs59("div", { className: "flex items-center justify-between w-full", children: [
|
|
13356
13461
|
/* @__PURE__ */ jsx79("div", { className: "truncate", children: event.title }),
|
|
13357
13462
|
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__ */
|
|
13463
|
+
] }) : /* @__PURE__ */ jsxs59(Fragment11, { children: [
|
|
13359
13464
|
/* @__PURE__ */ jsx79("div", { className: "truncate font-medium", children: event.title }),
|
|
13360
13465
|
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
13466
|
] })
|
|
13362
13467
|
}
|
|
13363
13468
|
);
|
|
13364
13469
|
}
|
|
13365
|
-
return /* @__PURE__ */
|
|
13470
|
+
return /* @__PURE__ */ jsxs59(
|
|
13366
13471
|
"button",
|
|
13367
13472
|
{
|
|
13368
13473
|
className: cn(
|
|
@@ -13380,14 +13485,14 @@ function EventItem({
|
|
|
13380
13485
|
...dndAttributes,
|
|
13381
13486
|
children: [
|
|
13382
13487
|
/* @__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__ */
|
|
13488
|
+
/* @__PURE__ */ jsxs59("div", { className: "text-xs opacity-70 flex items-center gap-2", children: [
|
|
13489
|
+
event.allDay ? /* @__PURE__ */ jsx79("span", { className: "uppercase", children: "All day" }) : /* @__PURE__ */ jsxs59("span", { className: "uppercase", children: [
|
|
13385
13490
|
formatTimeWithOptionalMinutes(displayStart),
|
|
13386
13491
|
" -",
|
|
13387
13492
|
" ",
|
|
13388
13493
|
formatTimeWithOptionalMinutes(displayEnd)
|
|
13389
13494
|
] }),
|
|
13390
|
-
event.location && /* @__PURE__ */
|
|
13495
|
+
event.location && /* @__PURE__ */ jsxs59("span", { className: "opacity-80 flex items-center gap-1", children: [
|
|
13391
13496
|
"-",
|
|
13392
13497
|
/* @__PURE__ */ jsx79("span", { className: "truncate", children: event.location })
|
|
13393
13498
|
] })
|
|
@@ -13416,7 +13521,7 @@ import { ptBR as ptBR6 } from "date-fns/locale";
|
|
|
13416
13521
|
import { useEffect as useEffect20, useMemo as useMemo14, useRef as useRef11 } from "react";
|
|
13417
13522
|
import { motion as motion17 } from "framer-motion";
|
|
13418
13523
|
import { XIcon as XIcon11 } from "@phosphor-icons/react";
|
|
13419
|
-
import { jsx as jsx80, jsxs as
|
|
13524
|
+
import { jsx as jsx80, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
13420
13525
|
function EventsPopup({
|
|
13421
13526
|
date,
|
|
13422
13527
|
events,
|
|
@@ -13466,7 +13571,7 @@ function EventsPopup({
|
|
|
13466
13571
|
}
|
|
13467
13572
|
return positionCopy;
|
|
13468
13573
|
}, [position]);
|
|
13469
|
-
return /* @__PURE__ */
|
|
13574
|
+
return /* @__PURE__ */ jsxs60(
|
|
13470
13575
|
motion17.div,
|
|
13471
13576
|
{
|
|
13472
13577
|
className: "absolute z-50 max-h-96 w-80 overflow-auto rounded-md border bg-background shadow-lg",
|
|
@@ -13480,7 +13585,7 @@ function EventsPopup({
|
|
|
13480
13585
|
exit: { opacity: 0, scale: 0.98, y: -6 },
|
|
13481
13586
|
transition: { duration: 0.18 },
|
|
13482
13587
|
children: [
|
|
13483
|
-
/* @__PURE__ */
|
|
13588
|
+
/* @__PURE__ */ jsxs60("div", { className: "sticky top-0 flex items-center justify-between border-b bg-background p-3", children: [
|
|
13484
13589
|
/* @__PURE__ */ jsx80("h3", { className: "font-medium", children: (() => {
|
|
13485
13590
|
const dayNum = format8(date, "d", { locale: ptBR6 });
|
|
13486
13591
|
const month = format8(date, "MMMM", { locale: ptBR6 });
|
|
@@ -13491,7 +13596,7 @@ function EventsPopup({
|
|
|
13491
13596
|
/* @__PURE__ */ jsx80(
|
|
13492
13597
|
"button",
|
|
13493
13598
|
{
|
|
13494
|
-
"aria-label": "
|
|
13599
|
+
"aria-label": "Fechar",
|
|
13495
13600
|
className: "rounded-full p-1 hover:bg-muted",
|
|
13496
13601
|
onClick: onClose,
|
|
13497
13602
|
type: "button",
|
|
@@ -13499,7 +13604,7 @@ function EventsPopup({
|
|
|
13499
13604
|
}
|
|
13500
13605
|
)
|
|
13501
13606
|
] }),
|
|
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: "
|
|
13607
|
+
/* @__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
13608
|
const eventStart = new Date(event.start);
|
|
13504
13609
|
const eventEnd = new Date(event.end);
|
|
13505
13610
|
const isFirstDay = isSameDay2(date, eventStart);
|
|
@@ -13529,10 +13634,11 @@ function EventsPopup({
|
|
|
13529
13634
|
|
|
13530
13635
|
// src/components/event-calendar/hooks/use-current-time-indicator.ts
|
|
13531
13636
|
import { endOfWeek as endOfWeek2, isSameDay as isSameDay3, isWithinInterval, startOfWeek as startOfWeek2 } from "date-fns";
|
|
13532
|
-
import {
|
|
13637
|
+
import { ptBR as ptBR7 } from "date-fns/locale";
|
|
13638
|
+
import { useEffect as useEffect21, useState as useState25 } from "react";
|
|
13533
13639
|
function useCurrentTimeIndicator(currentDate, view) {
|
|
13534
|
-
const [currentTimePosition, setCurrentTimePosition] =
|
|
13535
|
-
const [currentTimeVisible, setCurrentTimeVisible] =
|
|
13640
|
+
const [currentTimePosition, setCurrentTimePosition] = useState25(0);
|
|
13641
|
+
const [currentTimeVisible, setCurrentTimeVisible] = useState25(false);
|
|
13536
13642
|
useEffect21(() => {
|
|
13537
13643
|
const calculateTimePosition = () => {
|
|
13538
13644
|
const now = /* @__PURE__ */ new Date();
|
|
@@ -13546,8 +13652,8 @@ function useCurrentTimeIndicator(currentDate, view) {
|
|
|
13546
13652
|
if (view === "day") {
|
|
13547
13653
|
isCurrentTimeVisible = isSameDay3(now, currentDate);
|
|
13548
13654
|
} else if (view === "week") {
|
|
13549
|
-
const startOfWeekDate = startOfWeek2(currentDate, {
|
|
13550
|
-
const endOfWeekDate = endOfWeek2(currentDate, {
|
|
13655
|
+
const startOfWeekDate = startOfWeek2(currentDate, { locale: ptBR7 });
|
|
13656
|
+
const endOfWeekDate = endOfWeek2(currentDate, { locale: ptBR7 });
|
|
13551
13657
|
isCurrentTimeVisible = isWithinInterval(now, {
|
|
13552
13658
|
end: endOfWeekDate,
|
|
13553
13659
|
start: startOfWeekDate
|
|
@@ -13564,14 +13670,14 @@ function useCurrentTimeIndicator(currentDate, view) {
|
|
|
13564
13670
|
}
|
|
13565
13671
|
|
|
13566
13672
|
// src/components/event-calendar/hooks/use-event-visibility.ts
|
|
13567
|
-
import { useLayoutEffect as useLayoutEffect2, useMemo as useMemo15, useRef as useRef12, useState as
|
|
13673
|
+
import { useLayoutEffect as useLayoutEffect2, useMemo as useMemo15, useRef as useRef12, useState as useState26 } from "react";
|
|
13568
13674
|
function useEventVisibility({
|
|
13569
13675
|
eventHeight,
|
|
13570
13676
|
eventGap
|
|
13571
13677
|
}) {
|
|
13572
13678
|
const contentRef = useRef12(null);
|
|
13573
13679
|
const observerRef = useRef12(null);
|
|
13574
|
-
const [contentHeight, setContentHeight] =
|
|
13680
|
+
const [contentHeight, setContentHeight] = useState26(null);
|
|
13575
13681
|
useLayoutEffect2(() => {
|
|
13576
13682
|
if (!contentRef.current) return;
|
|
13577
13683
|
const updateHeight = () => {
|
|
@@ -13622,9 +13728,9 @@ import {
|
|
|
13622
13728
|
startOfMonth,
|
|
13623
13729
|
startOfWeek as startOfWeek3
|
|
13624
13730
|
} from "date-fns";
|
|
13625
|
-
import { ptBR as
|
|
13626
|
-
import { useEffect as useEffect22, useMemo as useMemo16, useState as
|
|
13627
|
-
import { jsx as jsx81, jsxs as
|
|
13731
|
+
import { ptBR as ptBR8 } from "date-fns/locale";
|
|
13732
|
+
import { useEffect as useEffect22, useMemo as useMemo16, useState as useState27 } from "react";
|
|
13733
|
+
import { jsx as jsx81, jsxs as jsxs61 } from "react/jsx-runtime";
|
|
13628
13734
|
function MonthView({
|
|
13629
13735
|
currentDate,
|
|
13630
13736
|
events,
|
|
@@ -13641,7 +13747,7 @@ function MonthView({
|
|
|
13641
13747
|
const weekdays = useMemo16(() => {
|
|
13642
13748
|
return Array.from({ length: 7 }).map((_, i) => {
|
|
13643
13749
|
const date = addDays3(startOfWeek3(/* @__PURE__ */ new Date(), { weekStartsOn: 0 }), i);
|
|
13644
|
-
const short = format9(date, "EEE", { locale:
|
|
13750
|
+
const short = format9(date, "EEE", { locale: ptBR8 });
|
|
13645
13751
|
return short.charAt(0).toUpperCase() + short.slice(1);
|
|
13646
13752
|
});
|
|
13647
13753
|
}, []);
|
|
@@ -13661,7 +13767,7 @@ function MonthView({
|
|
|
13661
13767
|
e.stopPropagation();
|
|
13662
13768
|
onEventSelect(event);
|
|
13663
13769
|
};
|
|
13664
|
-
const [isMounted, setIsMounted] =
|
|
13770
|
+
const [isMounted, setIsMounted] = useState27(false);
|
|
13665
13771
|
const { contentRef, getVisibleEventCount } = useEventVisibility({
|
|
13666
13772
|
eventGap: EventGap,
|
|
13667
13773
|
eventHeight: EventHeight
|
|
@@ -13669,7 +13775,7 @@ function MonthView({
|
|
|
13669
13775
|
useEffect22(() => {
|
|
13670
13776
|
setIsMounted(true);
|
|
13671
13777
|
}, []);
|
|
13672
|
-
return /* @__PURE__ */
|
|
13778
|
+
return /* @__PURE__ */ jsxs61("div", { className: "contents", "data-slot": "month-view", children: [
|
|
13673
13779
|
/* @__PURE__ */ jsx81("div", { className: "grid grid-cols-7 border-border/70 border-b", children: weekdays.map((day) => /* @__PURE__ */ jsx81(
|
|
13674
13780
|
"div",
|
|
13675
13781
|
{
|
|
@@ -13700,7 +13806,7 @@ function MonthView({
|
|
|
13700
13806
|
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
13807
|
"data-outside-cell": !isCurrentMonth || void 0,
|
|
13702
13808
|
"data-today": isToday2(day) || void 0,
|
|
13703
|
-
children: /* @__PURE__ */
|
|
13809
|
+
children: /* @__PURE__ */ jsxs61(
|
|
13704
13810
|
DroppableCell,
|
|
13705
13811
|
{
|
|
13706
13812
|
date: day,
|
|
@@ -13712,7 +13818,7 @@ function MonthView({
|
|
|
13712
13818
|
},
|
|
13713
13819
|
children: [
|
|
13714
13820
|
/* @__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__ */
|
|
13821
|
+
/* @__PURE__ */ jsxs61(
|
|
13716
13822
|
"div",
|
|
13717
13823
|
{
|
|
13718
13824
|
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 +13845,9 @@ function MonthView({
|
|
|
13739
13845
|
isLastDay,
|
|
13740
13846
|
onClick: (e) => handleEventClick(event, e),
|
|
13741
13847
|
view: "month",
|
|
13742
|
-
children: /* @__PURE__ */
|
|
13743
|
-
!event.allDay && /* @__PURE__ */
|
|
13744
|
-
format9(new Date(event.start), "
|
|
13848
|
+
children: /* @__PURE__ */ jsxs61("div", { "aria-hidden": true, className: "invisible", children: [
|
|
13849
|
+
!event.allDay && /* @__PURE__ */ jsxs61("span", { children: [
|
|
13850
|
+
format9(new Date(event.start), "HH:mm"),
|
|
13745
13851
|
" "
|
|
13746
13852
|
] }),
|
|
13747
13853
|
event.title
|
|
@@ -13771,8 +13877,8 @@ function MonthView({
|
|
|
13771
13877
|
event.id
|
|
13772
13878
|
);
|
|
13773
13879
|
}),
|
|
13774
|
-
hasMore && /* @__PURE__ */
|
|
13775
|
-
/* @__PURE__ */ jsx81(PopoverTriggerBase, { asChild: true, children: /* @__PURE__ */
|
|
13880
|
+
hasMore && /* @__PURE__ */ jsxs61(PopoverBase, { modal: true, children: [
|
|
13881
|
+
/* @__PURE__ */ jsx81(PopoverTriggerBase, { asChild: true, children: /* @__PURE__ */ jsxs61(
|
|
13776
13882
|
"button",
|
|
13777
13883
|
{
|
|
13778
13884
|
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 +13887,10 @@ function MonthView({
|
|
|
13781
13887
|
"aria-label": `Show ${remainingCount} more events on ${format9(
|
|
13782
13888
|
day,
|
|
13783
13889
|
"PPP",
|
|
13784
|
-
{ locale:
|
|
13890
|
+
{ locale: ptBR8 }
|
|
13785
13891
|
)}`,
|
|
13786
13892
|
children: [
|
|
13787
|
-
/* @__PURE__ */
|
|
13893
|
+
/* @__PURE__ */ jsxs61("span", { className: "font-medium", children: [
|
|
13788
13894
|
"+ ",
|
|
13789
13895
|
remainingCount
|
|
13790
13896
|
] }),
|
|
@@ -13800,8 +13906,8 @@ function MonthView({
|
|
|
13800
13906
|
style: {
|
|
13801
13907
|
"--event-height": `${EventHeight}px`
|
|
13802
13908
|
},
|
|
13803
|
-
children: /* @__PURE__ */
|
|
13804
|
-
/* @__PURE__ */ jsx81("div", { className: "font-medium text-sm", children: format9(day, "EEE d", { locale:
|
|
13909
|
+
children: /* @__PURE__ */ jsxs61("div", { className: "space-y-2", children: [
|
|
13910
|
+
/* @__PURE__ */ jsx81("div", { className: "font-medium text-sm", children: format9(day, "EEE d", { locale: ptBR8 }) }),
|
|
13805
13911
|
/* @__PURE__ */ jsx81("div", { className: "space-y-1", children: sortEvents(allEvents).map((event) => {
|
|
13806
13912
|
const eventStart = new Date(event.start);
|
|
13807
13913
|
const eventEnd = new Date(event.end);
|
|
@@ -13930,16 +14036,16 @@ import {
|
|
|
13930
14036
|
endOfWeek as endOfWeek4,
|
|
13931
14037
|
format as format10,
|
|
13932
14038
|
getHours as getHours2,
|
|
13933
|
-
getMinutes as
|
|
14039
|
+
getMinutes as getMinutes2,
|
|
13934
14040
|
isBefore as isBefore2,
|
|
13935
14041
|
isSameDay as isSameDay6,
|
|
13936
14042
|
isToday as isToday3,
|
|
13937
14043
|
startOfDay as startOfDay2,
|
|
13938
14044
|
startOfWeek as startOfWeek4
|
|
13939
14045
|
} from "date-fns";
|
|
13940
|
-
import { ptBR as
|
|
14046
|
+
import { ptBR as ptBR9 } from "date-fns/locale";
|
|
13941
14047
|
import { useMemo as useMemo17 } from "react";
|
|
13942
|
-
import { jsx as jsx82, jsxs as
|
|
14048
|
+
import { jsx as jsx82, jsxs as jsxs62 } from "react/jsx-runtime";
|
|
13943
14049
|
function WeekView({
|
|
13944
14050
|
currentDate,
|
|
13945
14051
|
events,
|
|
@@ -14000,8 +14106,8 @@ function WeekView({
|
|
|
14000
14106
|
const eventEnd = new Date(event.end);
|
|
14001
14107
|
const adjustedStart = isSameDay6(day, eventStart) ? eventStart : dayStart;
|
|
14002
14108
|
const adjustedEnd = isSameDay6(day, eventEnd) ? eventEnd : addHours2(dayStart, 24);
|
|
14003
|
-
const startHour = getHours2(adjustedStart) +
|
|
14004
|
-
const endHour = getHours2(adjustedEnd) +
|
|
14109
|
+
const startHour = getHours2(adjustedStart) + getMinutes2(adjustedStart) / 60;
|
|
14110
|
+
const endHour = getHours2(adjustedEnd) + getMinutes2(adjustedEnd) / 60;
|
|
14005
14111
|
const top = (startHour - StartHour) * WeekCellsHeight;
|
|
14006
14112
|
const height = (endHour - startHour) * WeekCellsHeight;
|
|
14007
14113
|
let columnIndex = 0;
|
|
@@ -14056,27 +14162,27 @@ function WeekView({
|
|
|
14056
14162
|
currentDate,
|
|
14057
14163
|
"week"
|
|
14058
14164
|
);
|
|
14059
|
-
return /* @__PURE__ */
|
|
14060
|
-
/* @__PURE__ */
|
|
14165
|
+
return /* @__PURE__ */ jsxs62("div", { className: "flex h-full flex-col", "data-slot": "week-view", children: [
|
|
14166
|
+
/* @__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
14167
|
/* @__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__ */
|
|
14168
|
+
days.map((day) => /* @__PURE__ */ jsxs62(
|
|
14063
14169
|
"div",
|
|
14064
14170
|
{
|
|
14065
14171
|
className: "py-2 text-center text-muted-foreground/70 text-sm data-today:font-medium data-today:text-foreground",
|
|
14066
14172
|
"data-today": isToday3(day) || void 0,
|
|
14067
14173
|
children: [
|
|
14068
|
-
/* @__PURE__ */
|
|
14069
|
-
format10(day, "EEE", { locale:
|
|
14174
|
+
/* @__PURE__ */ jsxs62("span", { "aria-hidden": "true", className: "sm:hidden", children: [
|
|
14175
|
+
format10(day, "EEE", { locale: ptBR9 })[0],
|
|
14070
14176
|
" ",
|
|
14071
|
-
format10(day, "d", { locale:
|
|
14177
|
+
format10(day, "d", { locale: ptBR9 })
|
|
14072
14178
|
] }),
|
|
14073
|
-
/* @__PURE__ */ jsx82("span", { className: "max-sm:hidden", children: format10(day, "EEE dd", { locale:
|
|
14179
|
+
/* @__PURE__ */ jsx82("span", { className: "max-sm:hidden", children: format10(day, "EEE dd", { locale: ptBR9 }) })
|
|
14074
14180
|
]
|
|
14075
14181
|
},
|
|
14076
14182
|
day.toString()
|
|
14077
14183
|
))
|
|
14078
14184
|
] }),
|
|
14079
|
-
showAllDaySection && /* @__PURE__ */ jsx82("div", { className: "border-border/70 border-b bg-muted/50", children: /* @__PURE__ */
|
|
14185
|
+
showAllDaySection && /* @__PURE__ */ jsx82("div", { className: "border-border/70 border-b bg-muted/50", children: /* @__PURE__ */ jsxs62("div", { className: "grid grid-cols-8", children: [
|
|
14080
14186
|
/* @__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
14187
|
days.map((day, dayIndex) => {
|
|
14082
14188
|
const dayAllDayEvents = allDayEvents.filter((event) => {
|
|
@@ -14124,16 +14230,16 @@ function WeekView({
|
|
|
14124
14230
|
);
|
|
14125
14231
|
})
|
|
14126
14232
|
] }) }),
|
|
14127
|
-
/* @__PURE__ */
|
|
14233
|
+
/* @__PURE__ */ jsxs62("div", { className: "grid flex-1 grid-cols-8 overflow-hidden", children: [
|
|
14128
14234
|
/* @__PURE__ */ jsx82("div", { className: "grid auto-cols-fr border-border/70 border-r", children: hours.map((hour, index) => /* @__PURE__ */ jsx82(
|
|
14129
14235
|
"div",
|
|
14130
14236
|
{
|
|
14131
14237
|
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, "
|
|
14238
|
+
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
14239
|
},
|
|
14134
14240
|
hour.toString()
|
|
14135
14241
|
)) }),
|
|
14136
|
-
days.map((day, dayIndex) => /* @__PURE__ */
|
|
14242
|
+
days.map((day, dayIndex) => /* @__PURE__ */ jsxs62(
|
|
14137
14243
|
"div",
|
|
14138
14244
|
{
|
|
14139
14245
|
className: "relative grid auto-cols-fr border-border/70 border-r last:border-r-0",
|
|
@@ -14169,7 +14275,7 @@ function WeekView({
|
|
|
14169
14275
|
{
|
|
14170
14276
|
className: "pointer-events-none absolute right-0 left-0 z-20",
|
|
14171
14277
|
style: { top: `${currentTimePosition}%` },
|
|
14172
|
-
children: /* @__PURE__ */
|
|
14278
|
+
children: /* @__PURE__ */ jsxs62("div", { className: "relative flex items-center", children: [
|
|
14173
14279
|
/* @__PURE__ */ jsx82("div", { className: "-left-1 absolute h-2 w-2 rounded-full bg-primary" }),
|
|
14174
14280
|
/* @__PURE__ */ jsx82("div", { className: "h-[2px] w-full bg-primary" })
|
|
14175
14281
|
] })
|
|
@@ -14219,10 +14325,10 @@ function WeekView({
|
|
|
14219
14325
|
}
|
|
14220
14326
|
|
|
14221
14327
|
// src/hooks/use-drag.tsx
|
|
14222
|
-
import { useState as
|
|
14328
|
+
import { useState as useState28, useCallback as useCallback14, useRef as useRef13, useEffect as useEffect23 } from "react";
|
|
14223
14329
|
var useDrag = (options = {}) => {
|
|
14224
|
-
const [isDragging, setIsDragging] =
|
|
14225
|
-
const [positions, setPositions] =
|
|
14330
|
+
const [isDragging, setIsDragging] = useState28(null);
|
|
14331
|
+
const [positions, setPositions] = useState28({});
|
|
14226
14332
|
const dragStartPos = useRef13(null);
|
|
14227
14333
|
const dragId = useRef13(null);
|
|
14228
14334
|
const handleMouseDown = useCallback14((id, e) => {
|
|
@@ -14376,6 +14482,7 @@ export {
|
|
|
14376
14482
|
CopyButton,
|
|
14377
14483
|
DateTimePicker,
|
|
14378
14484
|
DayView,
|
|
14485
|
+
DebouncedInput,
|
|
14379
14486
|
DefaultEndHour,
|
|
14380
14487
|
DefaultStartHour,
|
|
14381
14488
|
DestructiveDialog,
|