@underverse-ui/underverse 0.2.56 → 0.2.57
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.cjs +1180 -1351
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -3
- package/dist/index.d.ts +5 -3
- package/dist/index.js +1188 -1359
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -253,7 +253,7 @@ var Button = (0, import_react.forwardRef)(
|
|
|
253
253
|
gradient = false,
|
|
254
254
|
...rest
|
|
255
255
|
}, ref) => {
|
|
256
|
-
const baseStyles = asContainer ? "relative inline-flex justify-center rounded-
|
|
256
|
+
const baseStyles = asContainer ? "relative inline-flex justify-center rounded-xl font-medium transition-colors duration-150 ease-soft outline-none focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background active:translate-y-px" : "relative inline-flex items-center justify-center gap-2 rounded-xl font-medium overflow-hidden transition-colors duration-150 ease-soft outline-none focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background active:translate-y-px";
|
|
257
257
|
const finalVariant = gradient ? "gradient" : variant;
|
|
258
258
|
const variantStyle = VARIANT_STYLES_BTN[finalVariant] || VARIANT_STYLES_BTN.default;
|
|
259
259
|
const sizeStyle = SIZE_STYLES_BTN[size] || SIZE_STYLES_BTN.md;
|
|
@@ -440,7 +440,7 @@ var Badge = ({
|
|
|
440
440
|
}
|
|
441
441
|
);
|
|
442
442
|
}
|
|
443
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { className: cn(baseClasses, "rounded-
|
|
443
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { className: cn(baseClasses, "rounded-lg gap-1", sizeStyles[size], className), onClick: handleClick, role: "status", children: [
|
|
444
444
|
Icon && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
445
445
|
Icon,
|
|
446
446
|
{
|
|
@@ -593,7 +593,7 @@ var Card = ({
|
|
|
593
593
|
"div",
|
|
594
594
|
{
|
|
595
595
|
className: cn(
|
|
596
|
-
"rounded-
|
|
596
|
+
"rounded-2xl md:rounded-3xl bg-card text-card-foreground transition-[transform,box-shadow,border-color,background-color] duration-300 ease-soft",
|
|
597
597
|
"shadow-sm md:hover:shadow-md mx-2 md:mx-0 border border-border",
|
|
598
598
|
hoverable && "md:hover:-translate-y-0.5 md:hover:border-primary/15",
|
|
599
599
|
clickable && "cursor-pointer active:translate-y-px md:hover:bg-accent/5",
|
|
@@ -604,7 +604,7 @@ var Card = ({
|
|
|
604
604
|
onMouseLeave: () => setIsHovered(false),
|
|
605
605
|
onClick,
|
|
606
606
|
...rest,
|
|
607
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: cn("relative overflow-hidden rounded-
|
|
607
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: cn("relative overflow-hidden rounded-2xl md:rounded-3xl", innerClassName), children: [
|
|
608
608
|
(hoverable || clickable) && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
609
609
|
"div",
|
|
610
610
|
{
|
|
@@ -662,7 +662,7 @@ var Checkbox = React3.forwardRef(
|
|
|
662
662
|
"div",
|
|
663
663
|
{
|
|
664
664
|
className: cn(
|
|
665
|
-
"w-5 h-5 border rounded-
|
|
665
|
+
"w-5 h-5 border rounded-md flex items-center justify-center transition-all duration-200 ease-soft",
|
|
666
666
|
"hover:shadow-sm active:scale-95",
|
|
667
667
|
isChecked ? "bg-primary border-primary shadow-md text-primary-foreground" : "bg-background border-input hover:border-accent-foreground/30 hover:bg-accent/10"
|
|
668
668
|
),
|
|
@@ -1160,7 +1160,7 @@ var Input = (0, import_react3.forwardRef)(
|
|
|
1160
1160
|
setIsFocused(false);
|
|
1161
1161
|
onBlurProp?.(e);
|
|
1162
1162
|
};
|
|
1163
|
-
const radiusClass = size === "sm" ? "rounded-
|
|
1163
|
+
const radiusClass = size === "sm" ? "rounded-lg" : "rounded-xl";
|
|
1164
1164
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: cn("w-full group", containerSpacing), children: [
|
|
1165
1165
|
label && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex items-center justify-between", children: [
|
|
1166
1166
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
@@ -1264,7 +1264,7 @@ var Input = (0, import_react3.forwardRef)(
|
|
|
1264
1264
|
rest.onChange?.({ target: { value: "" } });
|
|
1265
1265
|
},
|
|
1266
1266
|
className: cn(
|
|
1267
|
-
"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors rounded-
|
|
1267
|
+
"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors rounded-md",
|
|
1268
1268
|
"focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1",
|
|
1269
1269
|
"active:bg-accent active:text-accent-foreground",
|
|
1270
1270
|
sizeStyles8[size].button
|
|
@@ -1483,7 +1483,7 @@ var NumberInput = (0, import_react3.forwardRef)(
|
|
|
1483
1483
|
onClick: handleIncrement,
|
|
1484
1484
|
disabled: max !== void 0 && currentValue >= max,
|
|
1485
1485
|
className: cn(
|
|
1486
|
-
"flex items-center justify-center w-4 h-4 rounded-
|
|
1486
|
+
"flex items-center justify-center w-4 h-4 rounded-md transition-colors",
|
|
1487
1487
|
"hover:bg-accent focus:outline-none focus:bg-accent",
|
|
1488
1488
|
"disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:bg-transparent",
|
|
1489
1489
|
"text-muted-foreground hover:text-foreground"
|
|
@@ -1499,7 +1499,7 @@ var NumberInput = (0, import_react3.forwardRef)(
|
|
|
1499
1499
|
onClick: handleDecrement,
|
|
1500
1500
|
disabled: min !== void 0 && currentValue <= min,
|
|
1501
1501
|
className: cn(
|
|
1502
|
-
"flex items-center justify-center w-4 h-4 rounded-
|
|
1502
|
+
"flex items-center justify-center w-4 h-4 rounded-md transition-colors",
|
|
1503
1503
|
"hover:bg-accent focus:outline-none focus:bg-accent",
|
|
1504
1504
|
"disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:bg-transparent",
|
|
1505
1505
|
"text-muted-foreground hover:text-foreground"
|
|
@@ -1571,7 +1571,7 @@ var Textarea = (0, import_react3.forwardRef)(
|
|
|
1571
1571
|
onFocus: () => setIsFocused(true),
|
|
1572
1572
|
onBlur: () => setIsFocused(false),
|
|
1573
1573
|
className: cn(
|
|
1574
|
-
"w-full rounded-
|
|
1574
|
+
"w-full rounded-xl px-4 py-3 text-sm text-foreground transition-all duration-200",
|
|
1575
1575
|
"placeholder:text-muted-foreground focus:outline-none min-h-20",
|
|
1576
1576
|
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
1577
1577
|
variantStyles6[variant],
|
|
@@ -1635,23 +1635,23 @@ var TagInput = (0, import_react4.forwardRef)(
|
|
|
1635
1635
|
const moreLabel = labels?.moreCount?.replace("{count}", String(hiddenCount)) ?? `+${hiddenCount} more`;
|
|
1636
1636
|
const sizeStyles8 = {
|
|
1637
1637
|
sm: {
|
|
1638
|
-
container: "min-h-8 p-1.5 gap-1",
|
|
1638
|
+
container: "min-h-8 p-1.5 gap-1 rounded-lg",
|
|
1639
1639
|
input: "text-xs",
|
|
1640
|
-
tag: "px-1.5 py-0.5 text-xs gap-1",
|
|
1640
|
+
tag: "px-1.5 py-0.5 text-xs gap-1 rounded-md",
|
|
1641
1641
|
tagIcon: "h-3 w-3",
|
|
1642
1642
|
button: "h-7 text-xs px-2"
|
|
1643
1643
|
},
|
|
1644
1644
|
md: {
|
|
1645
|
-
container: "min-h-10 p-2 gap-1.5",
|
|
1645
|
+
container: "min-h-10 p-2 gap-1.5 rounded-xl",
|
|
1646
1646
|
input: "text-sm",
|
|
1647
|
-
tag: "px-2 py-1 text-sm gap-1.5",
|
|
1647
|
+
tag: "px-2 py-1 text-sm gap-1.5 rounded-lg",
|
|
1648
1648
|
tagIcon: "h-3.5 w-3.5",
|
|
1649
1649
|
button: "h-8 text-sm px-3"
|
|
1650
1650
|
},
|
|
1651
1651
|
lg: {
|
|
1652
|
-
container: "min-h-12 p-2.5 gap-2",
|
|
1652
|
+
container: "min-h-12 p-2.5 gap-2 rounded-xl",
|
|
1653
1653
|
input: "text-base",
|
|
1654
|
-
tag: "px-2.5 py-1.5 text-base gap-2",
|
|
1654
|
+
tag: "px-2.5 py-1.5 text-base gap-2 rounded-lg",
|
|
1655
1655
|
tagIcon: "h-4 w-4",
|
|
1656
1656
|
button: "h-9 text-base px-4"
|
|
1657
1657
|
}
|
|
@@ -1741,7 +1741,7 @@ var TagInput = (0, import_react4.forwardRef)(
|
|
|
1741
1741
|
onClick: handleContainerClick,
|
|
1742
1742
|
className: cn(
|
|
1743
1743
|
"flex flex-wrap items-center cursor-text",
|
|
1744
|
-
"bg-background border border-input
|
|
1744
|
+
"bg-background border border-input",
|
|
1745
1745
|
"transition-all duration-200",
|
|
1746
1746
|
"hover:border-accent-foreground/20",
|
|
1747
1747
|
isFocused && "ring-1 ring-ring ring-offset-1 ring-offset-background border-transparent shadow-md",
|
|
@@ -1753,7 +1753,7 @@ var TagInput = (0, import_react4.forwardRef)(
|
|
|
1753
1753
|
"span",
|
|
1754
1754
|
{
|
|
1755
1755
|
className: cn(
|
|
1756
|
-
"inline-flex items-center
|
|
1756
|
+
"inline-flex items-center",
|
|
1757
1757
|
"bg-primary/10 text-primary font-mono",
|
|
1758
1758
|
"animate-in fade-in-0 zoom-in-95 duration-200",
|
|
1759
1759
|
sizeStyles8[size].tag
|
|
@@ -1770,7 +1770,7 @@ var TagInput = (0, import_react4.forwardRef)(
|
|
|
1770
1770
|
},
|
|
1771
1771
|
disabled,
|
|
1772
1772
|
className: cn(
|
|
1773
|
-
"flex items-center justify-center rounded-
|
|
1773
|
+
"flex items-center justify-center rounded-md",
|
|
1774
1774
|
"text-primary/70 hover:text-primary hover:bg-primary/20",
|
|
1775
1775
|
"transition-colors duration-150",
|
|
1776
1776
|
"focus:outline-none focus-visible:ring-1 focus-visible:ring-primary",
|
|
@@ -1793,7 +1793,7 @@ var TagInput = (0, import_react4.forwardRef)(
|
|
|
1793
1793
|
setIsExpanded(true);
|
|
1794
1794
|
},
|
|
1795
1795
|
className: cn(
|
|
1796
|
-
"inline-flex items-center
|
|
1796
|
+
"inline-flex items-center cursor-pointer",
|
|
1797
1797
|
"bg-muted text-muted-foreground hover:bg-muted/80",
|
|
1798
1798
|
"transition-colors duration-150",
|
|
1799
1799
|
"focus:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
@@ -1812,7 +1812,7 @@ var TagInput = (0, import_react4.forwardRef)(
|
|
|
1812
1812
|
setIsExpanded(false);
|
|
1813
1813
|
},
|
|
1814
1814
|
className: cn(
|
|
1815
|
-
"inline-flex items-center
|
|
1815
|
+
"inline-flex items-center cursor-pointer",
|
|
1816
1816
|
"bg-muted/50 text-muted-foreground hover:bg-muted/80",
|
|
1817
1817
|
"transition-colors duration-150",
|
|
1818
1818
|
"focus:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
@@ -1905,27 +1905,25 @@ var Textarea2 = (0, import_react5.forwardRef)(
|
|
|
1905
1905
|
"hover:border-accent-foreground/20",
|
|
1906
1906
|
"focus:border-primary focus:ring-2 focus:ring-primary/20"
|
|
1907
1907
|
),
|
|
1908
|
-
filled: cn(
|
|
1909
|
-
|
|
1910
|
-
"hover:bg-muted/80",
|
|
1911
|
-
"focus:bg-background focus:ring-2 focus:ring-primary/20"
|
|
1912
|
-
),
|
|
1913
|
-
outlined: cn(
|
|
1914
|
-
"border-2 border-border bg-transparent",
|
|
1915
|
-
"hover:border-primary/50",
|
|
1916
|
-
"focus:border-primary focus:ring-0"
|
|
1917
|
-
)
|
|
1908
|
+
filled: cn("border-0 bg-muted", "hover:bg-muted/80", "focus:bg-background focus:ring-2 focus:ring-primary/20"),
|
|
1909
|
+
outlined: cn("border-2 border-border bg-transparent", "hover:border-primary/50", "focus:border-primary focus:ring-0")
|
|
1918
1910
|
};
|
|
1919
1911
|
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "w-full space-y-2", children: [
|
|
1920
1912
|
label && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex items-center", children: [
|
|
1921
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
1922
|
-
"
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1913
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
1914
|
+
"label",
|
|
1915
|
+
{
|
|
1916
|
+
className: cn(
|
|
1917
|
+
"text-sm font-medium transition-colors duration-200",
|
|
1918
|
+
isFocused ? "text-primary" : "text-foreground",
|
|
1919
|
+
error && "text-destructive"
|
|
1920
|
+
),
|
|
1921
|
+
children: [
|
|
1922
|
+
label,
|
|
1923
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "text-destructive ml-1", children: "*" })
|
|
1924
|
+
]
|
|
1925
|
+
}
|
|
1926
|
+
),
|
|
1929
1927
|
error && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "text-xs text-destructive ml-auto animate-in slide-in-from-right-2 duration-200", "aria-live": "polite", role: "alert", children: error })
|
|
1930
1928
|
] }),
|
|
1931
1929
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "relative group", children: [
|
|
@@ -1938,7 +1936,7 @@ var Textarea2 = (0, import_react5.forwardRef)(
|
|
|
1938
1936
|
onFocus: () => setIsFocused(true),
|
|
1939
1937
|
onBlur: () => setIsFocused(false),
|
|
1940
1938
|
className: cn(
|
|
1941
|
-
"w-full rounded-
|
|
1939
|
+
"w-full rounded-xl transition-all duration-200 ease-soft resize-y",
|
|
1942
1940
|
"text-foreground placeholder:text-muted-foreground",
|
|
1943
1941
|
"focus:outline-none shadow-sm focus:shadow-md",
|
|
1944
1942
|
"backdrop-blur-sm",
|
|
@@ -1950,17 +1948,28 @@ var Textarea2 = (0, import_react5.forwardRef)(
|
|
|
1950
1948
|
...rest
|
|
1951
1949
|
}
|
|
1952
1950
|
),
|
|
1953
|
-
variant === "default" && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1954
|
-
"
|
|
1955
|
-
|
|
1956
|
-
|
|
1951
|
+
variant === "default" && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1952
|
+
"div",
|
|
1953
|
+
{
|
|
1954
|
+
className: cn(
|
|
1955
|
+
"absolute bottom-0 left-0 h-0.5 bg-linear-to-r from-primary to-primary/60 transition-all duration-300 ease-soft",
|
|
1956
|
+
isFocused ? "w-full opacity-100" : "w-0 opacity-0"
|
|
1957
|
+
)
|
|
1958
|
+
}
|
|
1959
|
+
),
|
|
1957
1960
|
isFocused && variant !== "outlined" && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "absolute inset-0 rounded-lg bg-primary/5 -z-10 animate-pulse" })
|
|
1958
1961
|
] }),
|
|
1959
|
-
description && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1960
|
-
"
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1962
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1963
|
+
"p",
|
|
1964
|
+
{
|
|
1965
|
+
className: cn(
|
|
1966
|
+
"text-xs transition-colors duration-200",
|
|
1967
|
+
isFocused ? "text-primary/70" : "text-muted-foreground",
|
|
1968
|
+
error && "text-destructive/70"
|
|
1969
|
+
),
|
|
1970
|
+
children: description
|
|
1971
|
+
}
|
|
1972
|
+
)
|
|
1964
1973
|
] });
|
|
1965
1974
|
}
|
|
1966
1975
|
);
|
|
@@ -2121,7 +2130,7 @@ function SmartImage({
|
|
|
2121
2130
|
alt,
|
|
2122
2131
|
className,
|
|
2123
2132
|
ratioClass,
|
|
2124
|
-
roundedClass = "rounded-
|
|
2133
|
+
roundedClass = "rounded-xl",
|
|
2125
2134
|
fill = true,
|
|
2126
2135
|
width,
|
|
2127
2136
|
height,
|
|
@@ -2309,14 +2318,7 @@ var Avatar_default = Avatar;
|
|
|
2309
2318
|
|
|
2310
2319
|
// ../../components/ui/Skeleton.tsx
|
|
2311
2320
|
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
2312
|
-
var Skeleton = ({
|
|
2313
|
-
className,
|
|
2314
|
-
width,
|
|
2315
|
-
height,
|
|
2316
|
-
variant = "rectangular",
|
|
2317
|
-
animation = "pulse",
|
|
2318
|
-
lines = 1
|
|
2319
|
-
}) => {
|
|
2321
|
+
var Skeleton = ({ className, width, height, variant = "rectangular", animation = "pulse", lines = 1 }) => {
|
|
2320
2322
|
const variantClasses2 = {
|
|
2321
2323
|
rectangular: "rounded-md",
|
|
2322
2324
|
circular: "rounded-full",
|
|
@@ -2347,79 +2349,32 @@ var Skeleton = ({
|
|
|
2347
2349
|
index
|
|
2348
2350
|
)) });
|
|
2349
2351
|
}
|
|
2350
|
-
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2351
|
-
"div",
|
|
2352
|
-
{
|
|
2353
|
-
className: cn(
|
|
2354
|
-
"bg-muted",
|
|
2355
|
-
variantClasses2[variant],
|
|
2356
|
-
animationClasses[animation],
|
|
2357
|
-
className
|
|
2358
|
-
),
|
|
2359
|
-
style: { width, height }
|
|
2360
|
-
}
|
|
2361
|
-
);
|
|
2352
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: cn("bg-muted", variantClasses2[variant], animationClasses[animation], className), style: { width, height } });
|
|
2362
2353
|
};
|
|
2363
|
-
var SkeletonAvatar = ({
|
|
2364
|
-
size = "md",
|
|
2365
|
-
className
|
|
2366
|
-
}) => {
|
|
2354
|
+
var SkeletonAvatar = ({ size = "md", className }) => {
|
|
2367
2355
|
const sizeClasses2 = {
|
|
2368
2356
|
sm: "w-8 h-8",
|
|
2369
2357
|
md: "w-10 h-10",
|
|
2370
2358
|
lg: "w-12 h-12"
|
|
2371
2359
|
};
|
|
2372
|
-
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2373
|
-
Skeleton,
|
|
2374
|
-
{
|
|
2375
|
-
variant: "circular",
|
|
2376
|
-
className: cn(sizeClasses2[size], className)
|
|
2377
|
-
}
|
|
2378
|
-
);
|
|
2360
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Skeleton, { variant: "circular", className: cn(sizeClasses2[size], className) });
|
|
2379
2361
|
};
|
|
2380
|
-
var SkeletonButton = ({
|
|
2381
|
-
size = "md",
|
|
2382
|
-
className
|
|
2383
|
-
}) => {
|
|
2362
|
+
var SkeletonButton = ({ size = "md", className }) => {
|
|
2384
2363
|
const sizeClasses2 = {
|
|
2385
2364
|
sm: "h-8 w-20",
|
|
2386
2365
|
md: "h-10 w-24",
|
|
2387
2366
|
lg: "h-12 w-28"
|
|
2388
2367
|
};
|
|
2389
|
-
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2390
|
-
Skeleton,
|
|
2391
|
-
{
|
|
2392
|
-
variant: "rounded",
|
|
2393
|
-
className: cn(sizeClasses2[size], className)
|
|
2394
|
-
}
|
|
2395
|
-
);
|
|
2368
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Skeleton, { variant: "rounded", className: cn(sizeClasses2[size], className) });
|
|
2396
2369
|
};
|
|
2397
|
-
var SkeletonText = ({
|
|
2398
|
-
lines
|
|
2399
|
-
className,
|
|
2400
|
-
width = "100%"
|
|
2401
|
-
}) => {
|
|
2402
|
-
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2403
|
-
Skeleton,
|
|
2404
|
-
{
|
|
2405
|
-
variant: "text",
|
|
2406
|
-
lines,
|
|
2407
|
-
width,
|
|
2408
|
-
className
|
|
2409
|
-
}
|
|
2410
|
-
);
|
|
2370
|
+
var SkeletonText = ({ lines = 3, className, width = "100%" }) => {
|
|
2371
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Skeleton, { variant: "text", lines, width, className });
|
|
2411
2372
|
};
|
|
2412
|
-
var SkeletonCard = ({
|
|
2413
|
-
showAvatar = true,
|
|
2414
|
-
showImage = false,
|
|
2415
|
-
textLines = 3,
|
|
2416
|
-
className,
|
|
2417
|
-
children
|
|
2418
|
-
}) => {
|
|
2373
|
+
var SkeletonCard = ({ showAvatar = true, showImage = false, textLines = 3, className, children }) => {
|
|
2419
2374
|
if (children) {
|
|
2420
2375
|
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: cn("p-4 space-y-4 rounded-lg bg-card outline-none focus:outline-none", className), children });
|
|
2421
2376
|
}
|
|
2422
|
-
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: cn("p-4 space-y-4 rounded-
|
|
2377
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: cn("p-4 space-y-4 rounded-2xl bg-card outline-none focus:outline-none", className), children: [
|
|
2423
2378
|
showAvatar && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex items-center space-x-3", children: [
|
|
2424
2379
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(SkeletonAvatar, {}),
|
|
2425
2380
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "space-y-2", children: [
|
|
@@ -2427,7 +2382,7 @@ var SkeletonCard = ({
|
|
|
2427
2382
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Skeleton, { className: "h-3 w-16" })
|
|
2428
2383
|
] })
|
|
2429
2384
|
] }),
|
|
2430
|
-
showImage && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Skeleton, { className: "h-48 w-full rounded-
|
|
2385
|
+
showImage && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Skeleton, { className: "h-48 w-full rounded-xl" }),
|
|
2431
2386
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(SkeletonText, { lines: textLines }),
|
|
2432
2387
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex space-x-2", children: [
|
|
2433
2388
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(SkeletonButton, { size: "sm" }),
|
|
@@ -2436,7 +2391,7 @@ var SkeletonCard = ({
|
|
|
2436
2391
|
] });
|
|
2437
2392
|
};
|
|
2438
2393
|
var SkeletonPost = ({ className }) => {
|
|
2439
|
-
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: cn("p-6 space-y-4 rounded-
|
|
2394
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: cn("p-6 space-y-4 rounded-3xl bg-card outline-none focus:outline-none", className), children: [
|
|
2440
2395
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex items-center space-x-3", children: [
|
|
2441
2396
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(SkeletonAvatar, { size: "lg" }),
|
|
2442
2397
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "space-y-2", children: [
|
|
@@ -2445,7 +2400,7 @@ var SkeletonPost = ({ className }) => {
|
|
|
2445
2400
|
] })
|
|
2446
2401
|
] }),
|
|
2447
2402
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(SkeletonText, { lines: 2 }),
|
|
2448
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Skeleton, { className: "h-64 w-full rounded-
|
|
2403
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Skeleton, { className: "h-64 w-full rounded-2xl" }),
|
|
2449
2404
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex items-center space-x-4", children: [
|
|
2450
2405
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Skeleton, { className: "h-3 w-16" }),
|
|
2451
2406
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Skeleton, { className: "h-3 w-20" }),
|
|
@@ -2458,36 +2413,17 @@ var SkeletonPost = ({ className }) => {
|
|
|
2458
2413
|
] }) })
|
|
2459
2414
|
] });
|
|
2460
2415
|
};
|
|
2461
|
-
var SkeletonMessage = ({
|
|
2462
|
-
own
|
|
2463
|
-
showAvatar = true,
|
|
2464
|
-
className
|
|
2465
|
-
}) => {
|
|
2466
|
-
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: cn(
|
|
2467
|
-
"flex items-end space-x-2",
|
|
2468
|
-
own && "flex-row-reverse space-x-reverse",
|
|
2469
|
-
className
|
|
2470
|
-
), children: [
|
|
2416
|
+
var SkeletonMessage = ({ own = false, showAvatar = true, className }) => {
|
|
2417
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: cn("flex items-end space-x-2", own && "flex-row-reverse space-x-reverse", className), children: [
|
|
2471
2418
|
showAvatar && !own && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(SkeletonAvatar, { size: "sm" }),
|
|
2472
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: cn(
|
|
2473
|
-
"
|
|
2474
|
-
own ? "items-end" : "items-start"
|
|
2475
|
-
), children: [
|
|
2476
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Skeleton, { className: cn(
|
|
2477
|
-
"h-10 rounded-2xl",
|
|
2478
|
-
own ? "w-32 bg-primary/20" : "w-40 bg-muted"
|
|
2479
|
-
) }),
|
|
2419
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: cn("max-w-xs space-y-1", own ? "items-end" : "items-start"), children: [
|
|
2420
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Skeleton, { className: cn("h-10 rounded-3xl", own ? "w-32 bg-primary/20" : "w-40 bg-muted") }),
|
|
2480
2421
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Skeleton, { className: "h-3 w-12" })
|
|
2481
2422
|
] })
|
|
2482
2423
|
] });
|
|
2483
2424
|
};
|
|
2484
|
-
var SkeletonList = ({
|
|
2485
|
-
items
|
|
2486
|
-
itemHeight = 60,
|
|
2487
|
-
showAvatar = true,
|
|
2488
|
-
className
|
|
2489
|
-
}) => {
|
|
2490
|
-
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: cn("space-y-3", className), children: Array.from({ length: items }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex items-center space-x-3 p-3 rounded-lg", children: [
|
|
2425
|
+
var SkeletonList = ({ items = 5, itemHeight = 60, showAvatar = true, className }) => {
|
|
2426
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: cn("space-y-3", className), children: Array.from({ length: items }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex items-center space-x-3 p-3 rounded-xl", children: [
|
|
2491
2427
|
showAvatar && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(SkeletonAvatar, {}),
|
|
2492
2428
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex-1 space-y-2", children: [
|
|
2493
2429
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Skeleton, { className: "h-4 w-3/4" }),
|
|
@@ -2496,11 +2432,7 @@ var SkeletonList = ({
|
|
|
2496
2432
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Skeleton, { className: "h-6 w-16" })
|
|
2497
2433
|
] }, index)) });
|
|
2498
2434
|
};
|
|
2499
|
-
var SkeletonTable = ({
|
|
2500
|
-
rows = 5,
|
|
2501
|
-
columns = 4,
|
|
2502
|
-
className
|
|
2503
|
-
}) => {
|
|
2435
|
+
var SkeletonTable = ({ rows = 5, columns = 4, className }) => {
|
|
2504
2436
|
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: cn("space-y-3", className), children: [
|
|
2505
2437
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "flex space-x-4 p-3", children: Array.from({ length: columns }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Skeleton, { className: "h-4 flex-1" }, index)) }),
|
|
2506
2438
|
Array.from({ length: rows }).map((_, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "flex space-x-4 p-3", children: Array.from({ length: columns }).map((_2, colIndex) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Skeleton, { className: "h-4 flex-1" }, colIndex)) }, rowIndex))
|
|
@@ -2558,10 +2490,7 @@ var Progress = ({
|
|
|
2558
2490
|
label && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { id: labelId, className: "font-medium text-foreground", children: label }),
|
|
2559
2491
|
getStatusIcon()
|
|
2560
2492
|
] }),
|
|
2561
|
-
showValue && !indeterminate && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: cn(
|
|
2562
|
-
"text-sm font-medium",
|
|
2563
|
-
isComplete ? "text-success" : isError ? "text-destructive" : "text-muted-foreground"
|
|
2564
|
-
), children: isComplete ? "Complete" : isError ? "Error" : `${Math.round(percentage)}%` })
|
|
2493
|
+
showValue && !indeterminate && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: cn("text-sm font-medium", isComplete ? "text-success" : isError ? "text-destructive" : "text-muted-foreground"), children: isComplete ? "Complete" : isError ? "Error" : `${Math.round(percentage)}%` })
|
|
2565
2494
|
] }),
|
|
2566
2495
|
description && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { id: descId, className: "text-sm text-muted-foreground", children: description })
|
|
2567
2496
|
] }),
|
|
@@ -2574,11 +2503,7 @@ var Progress = ({
|
|
|
2574
2503
|
"aria-valuenow": indeterminate ? void 0 : Math.round(percentage),
|
|
2575
2504
|
"aria-labelledby": label ? labelId : void 0,
|
|
2576
2505
|
"aria-describedby": description ? descId : void 0,
|
|
2577
|
-
className: cn(
|
|
2578
|
-
"w-full bg-muted/50 rounded-full overflow-hidden backdrop-blur-sm",
|
|
2579
|
-
"border border-border/50",
|
|
2580
|
-
sizeStyles2[size]
|
|
2581
|
-
),
|
|
2506
|
+
className: cn("w-full bg-muted/50 rounded-full overflow-hidden backdrop-blur-sm", "border border-border/50", sizeStyles2[size]),
|
|
2582
2507
|
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2583
2508
|
"div",
|
|
2584
2509
|
{
|
|
@@ -2651,24 +2576,10 @@ var CircularProgress = ({
|
|
|
2651
2576
|
{
|
|
2652
2577
|
width: size,
|
|
2653
2578
|
height: size,
|
|
2654
|
-
className: cn(
|
|
2655
|
-
"transform -rotate-90",
|
|
2656
|
-
indeterminate && "animate-spin"
|
|
2657
|
-
),
|
|
2579
|
+
className: cn("transform -rotate-90", indeterminate && "animate-spin"),
|
|
2658
2580
|
style: { animationDuration: indeterminate ? "2s" : void 0 },
|
|
2659
2581
|
children: [
|
|
2660
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2661
|
-
"circle",
|
|
2662
|
-
{
|
|
2663
|
-
cx: size / 2,
|
|
2664
|
-
cy: size / 2,
|
|
2665
|
-
r: radius,
|
|
2666
|
-
stroke: "currentColor",
|
|
2667
|
-
strokeWidth,
|
|
2668
|
-
fill: "transparent",
|
|
2669
|
-
className: trackColor
|
|
2670
|
-
}
|
|
2671
|
-
),
|
|
2582
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("circle", { cx: size / 2, cy: size / 2, r: radius, stroke: "currentColor", strokeWidth, fill: "transparent", className: trackColor }),
|
|
2672
2583
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2673
2584
|
"circle",
|
|
2674
2585
|
{
|
|
@@ -2695,23 +2606,14 @@ var CircularProgress = ({
|
|
|
2695
2606
|
),
|
|
2696
2607
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "absolute inset-0 flex flex-col items-center justify-center text-center", children: children ? children : /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
|
|
2697
2608
|
getContentIcon(),
|
|
2698
|
-
showValue && !indeterminate && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: cn(
|
|
2699
|
-
"text-sm font-semibold",
|
|
2700
|
-
isComplete ? "text-success" : isError ? "text-destructive" : "text-foreground"
|
|
2701
|
-
), children: isComplete ? "\u2713" : isError ? "\u2717" : `${Math.round(percentage)}%` }),
|
|
2609
|
+
showValue && !indeterminate && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: cn("text-sm font-semibold", isComplete ? "text-success" : isError ? "text-destructive" : "text-foreground"), children: isComplete ? "\u2713" : isError ? "\u2717" : `${Math.round(percentage)}%` }),
|
|
2702
2610
|
indeterminate && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react5.Clock, { className: "w-4 h-4 text-muted-foreground animate-pulse" })
|
|
2703
2611
|
] }) })
|
|
2704
2612
|
]
|
|
2705
2613
|
}
|
|
2706
2614
|
);
|
|
2707
2615
|
};
|
|
2708
|
-
var StepProgress = ({
|
|
2709
|
-
steps,
|
|
2710
|
-
currentStep,
|
|
2711
|
-
className,
|
|
2712
|
-
variant = "primary",
|
|
2713
|
-
size = "md"
|
|
2714
|
-
}) => {
|
|
2616
|
+
var StepProgress = ({ steps, currentStep, className, variant = "primary", size = "md" }) => {
|
|
2715
2617
|
const stepSizes = {
|
|
2716
2618
|
sm: "w-6 h-6 text-xs",
|
|
2717
2619
|
md: "w-8 h-8 text-sm",
|
|
@@ -2732,19 +2634,9 @@ var StepProgress = ({
|
|
|
2732
2634
|
"rounded-full border-2 flex items-center justify-center font-medium transition-all duration-300",
|
|
2733
2635
|
"shadow-sm hover:shadow-md",
|
|
2734
2636
|
stepSizes[size],
|
|
2735
|
-
status === "completed" && [
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
],
|
|
2739
|
-
status === "current" && [
|
|
2740
|
-
"border-primary bg-primary/10 text-primary",
|
|
2741
|
-
"ring-2 ring-primary/20 ring-offset-2",
|
|
2742
|
-
"shadow-primary/20"
|
|
2743
|
-
],
|
|
2744
|
-
status === "upcoming" && [
|
|
2745
|
-
"border-muted-foreground/30 text-muted-foreground bg-background",
|
|
2746
|
-
"hover:border-muted-foreground/50"
|
|
2747
|
-
]
|
|
2637
|
+
status === "completed" && ["border-success bg-success text-success-foreground", "shadow-success/20"],
|
|
2638
|
+
status === "current" && ["border-primary bg-primary/10 text-primary", "ring-2 ring-primary/20 ring-offset-2", "shadow-primary/20"],
|
|
2639
|
+
status === "upcoming" && ["border-muted-foreground/30 text-muted-foreground bg-background", "hover:border-muted-foreground/50"]
|
|
2748
2640
|
),
|
|
2749
2641
|
children: status === "completed" ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react5.Check, { className: "w-3 h-3" }) : index + 1
|
|
2750
2642
|
}
|
|
@@ -2761,25 +2653,11 @@ var StepProgress = ({
|
|
|
2761
2653
|
children: step
|
|
2762
2654
|
}
|
|
2763
2655
|
),
|
|
2764
|
-
index < steps.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2765
|
-
"div",
|
|
2766
|
-
{
|
|
2767
|
-
className: cn(
|
|
2768
|
-
"flex-1 h-0.5 mx-4 transition-colors duration-200",
|
|
2769
|
-
index < currentStep ? variantStyles2[variant] : "bg-muted"
|
|
2770
|
-
)
|
|
2771
|
-
}
|
|
2772
|
-
)
|
|
2656
|
+
index < steps.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: cn("flex-1 h-0.5 mx-4 transition-colors duration-200", index < currentStep ? variantStyles2[variant] : "bg-muted") })
|
|
2773
2657
|
] }, step);
|
|
2774
2658
|
}) }) });
|
|
2775
2659
|
};
|
|
2776
|
-
var MiniProgress = ({
|
|
2777
|
-
value,
|
|
2778
|
-
max = 100,
|
|
2779
|
-
className,
|
|
2780
|
-
variant = "primary",
|
|
2781
|
-
showValue = false
|
|
2782
|
-
}) => {
|
|
2660
|
+
var MiniProgress = ({ value, max = 100, className, variant = "primary", showValue = false }) => {
|
|
2783
2661
|
const percentage = Math.min(Math.max(value / max * 100, 0), 100);
|
|
2784
2662
|
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: cn("flex items-center gap-2", className), children: [
|
|
2785
2663
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
@@ -2790,16 +2668,7 @@ var MiniProgress = ({
|
|
|
2790
2668
|
"aria-valuemin": 0,
|
|
2791
2669
|
"aria-valuemax": max,
|
|
2792
2670
|
"aria-valuenow": Math.round(percentage),
|
|
2793
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2794
|
-
"div",
|
|
2795
|
-
{
|
|
2796
|
-
className: cn(
|
|
2797
|
-
"h-full transition-all duration-500 ease-out rounded-full",
|
|
2798
|
-
variantStyles2[variant]
|
|
2799
|
-
),
|
|
2800
|
-
style: { width: `${percentage}%` }
|
|
2801
|
-
}
|
|
2802
|
-
)
|
|
2671
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: cn("h-full transition-all duration-500 ease-out rounded-full", variantStyles2[variant]), style: { width: `${percentage}%` } })
|
|
2803
2672
|
}
|
|
2804
2673
|
),
|
|
2805
2674
|
showValue && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: "text-xs font-medium text-muted-foreground min-w-10 text-right", children: [
|
|
@@ -2808,13 +2677,7 @@ var MiniProgress = ({
|
|
|
2808
2677
|
] })
|
|
2809
2678
|
] });
|
|
2810
2679
|
};
|
|
2811
|
-
var BatteryProgress = ({
|
|
2812
|
-
value,
|
|
2813
|
-
max = 100,
|
|
2814
|
-
className,
|
|
2815
|
-
charging = false,
|
|
2816
|
-
showValue = false
|
|
2817
|
-
}) => {
|
|
2680
|
+
var BatteryProgress = ({ value, max = 100, className, charging = false, showValue = false }) => {
|
|
2818
2681
|
const percentage = Math.min(Math.max(value / max * 100, 0), 100);
|
|
2819
2682
|
const getVariant = () => {
|
|
2820
2683
|
if (charging) return "info";
|
|
@@ -2823,65 +2686,53 @@ var BatteryProgress = ({
|
|
|
2823
2686
|
return "success";
|
|
2824
2687
|
};
|
|
2825
2688
|
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: cn("flex items-center gap-2", className), children: [
|
|
2826
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2689
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
2690
|
+
"div",
|
|
2691
|
+
{
|
|
2692
|
+
className: "relative",
|
|
2693
|
+
role: "progressbar",
|
|
2694
|
+
"aria-label": "Battery level",
|
|
2695
|
+
"aria-valuemin": 0,
|
|
2696
|
+
"aria-valuemax": max,
|
|
2697
|
+
"aria-valuenow": Math.round(percentage),
|
|
2698
|
+
children: [
|
|
2699
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "w-6 h-3 border-2 border-foreground/20 rounded-md relative", children: [
|
|
2700
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "absolute -right-1 top-0.5 w-0.5 h-1 bg-foreground/20 rounded-r-sm" }),
|
|
2701
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2702
|
+
"div",
|
|
2703
|
+
{
|
|
2704
|
+
className: cn("h-full transition-all duration-500 ease-out rounded-md", variantStyles2[getVariant()], charging && "animate-pulse"),
|
|
2705
|
+
style: { width: `${percentage}%` }
|
|
2706
|
+
}
|
|
2707
|
+
)
|
|
2708
|
+
] }),
|
|
2709
|
+
charging && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "w-2 h-2 text-info-foreground", children: "\u26A1" }) })
|
|
2710
|
+
]
|
|
2711
|
+
}
|
|
2712
|
+
),
|
|
2713
|
+
showValue && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: cn("text-xs font-medium", percentage <= 20 ? "text-destructive" : "text-muted-foreground"), children: [
|
|
2847
2714
|
Math.round(percentage),
|
|
2848
2715
|
"%"
|
|
2849
2716
|
] })
|
|
2850
2717
|
] });
|
|
2851
2718
|
};
|
|
2852
|
-
var SegmentedProgress = ({
|
|
2853
|
-
segments,
|
|
2854
|
-
activeSegments,
|
|
2855
|
-
className,
|
|
2856
|
-
variant = "primary",
|
|
2857
|
-
size = "md"
|
|
2858
|
-
}) => {
|
|
2719
|
+
var SegmentedProgress = ({ segments, activeSegments, className, variant = "primary", size = "md" }) => {
|
|
2859
2720
|
const segmentSizes = {
|
|
2860
2721
|
sm: "h-1",
|
|
2861
2722
|
md: "h-2",
|
|
2862
2723
|
lg: "h-3"
|
|
2863
2724
|
};
|
|
2864
|
-
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2725
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: cn("flex gap-1", className), role: "progressbar", "aria-valuemin": 0, "aria-valuemax": segments, "aria-valuenow": activeSegments, children: Array.from({ length: segments }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2865
2726
|
"div",
|
|
2866
2727
|
{
|
|
2867
|
-
className: cn(
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
className: cn(
|
|
2876
|
-
"flex-1 rounded-full transition-all duration-300",
|
|
2877
|
-
segmentSizes[size],
|
|
2878
|
-
index < activeSegments ? variantStyles2[variant] : "bg-muted/50"
|
|
2879
|
-
)
|
|
2880
|
-
},
|
|
2881
|
-
index
|
|
2882
|
-
))
|
|
2883
|
-
}
|
|
2884
|
-
);
|
|
2728
|
+
className: cn(
|
|
2729
|
+
"flex-1 rounded-full transition-all duration-300",
|
|
2730
|
+
segmentSizes[size],
|
|
2731
|
+
index < activeSegments ? variantStyles2[variant] : "bg-muted/50"
|
|
2732
|
+
)
|
|
2733
|
+
},
|
|
2734
|
+
index
|
|
2735
|
+
)) });
|
|
2885
2736
|
};
|
|
2886
2737
|
var LoadingProgress = ({
|
|
2887
2738
|
value,
|
|
@@ -3084,7 +2935,7 @@ var Modal = ({
|
|
|
3084
2935
|
{
|
|
3085
2936
|
ref: modalContentRef,
|
|
3086
2937
|
className: cn(
|
|
3087
|
-
"relative w-full rounded-
|
|
2938
|
+
"relative w-full rounded-2xl md:rounded-3xl bg-card text-card-foreground shadow-xl",
|
|
3088
2939
|
"transition-all duration-200 ease-out",
|
|
3089
2940
|
maxWidthClass,
|
|
3090
2941
|
fullWidth && "mx-0",
|
|
@@ -3111,7 +2962,7 @@ var Modal = ({
|
|
|
3111
2962
|
onClick: onClose,
|
|
3112
2963
|
"aria-label": "Close modal",
|
|
3113
2964
|
className: cn(
|
|
3114
|
-
"rounded-
|
|
2965
|
+
"rounded-lg opacity-70 ring-offset-background transition-opacity",
|
|
3115
2966
|
"hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
3116
2967
|
"disabled:pointer-events-none "
|
|
3117
2968
|
),
|
|
@@ -3237,7 +3088,7 @@ var ToastComponent = ({ toast, onRemove }) => {
|
|
|
3237
3088
|
"div",
|
|
3238
3089
|
{
|
|
3239
3090
|
className: cn(
|
|
3240
|
-
"relative w-80 rounded-r-
|
|
3091
|
+
"relative w-80 rounded-r-xl border border-l-0 backdrop-blur-md transition-all duration-300 pointer-events-auto overflow-hidden",
|
|
3241
3092
|
"bg-card shadow-xl",
|
|
3242
3093
|
"animate-in slide-in-from-right-full",
|
|
3243
3094
|
config.containerClassName,
|
|
@@ -3281,7 +3132,7 @@ var ToastComponent = ({ toast, onRemove }) => {
|
|
|
3281
3132
|
{
|
|
3282
3133
|
onClick: handleRemove,
|
|
3283
3134
|
className: cn(
|
|
3284
|
-
"rounded-
|
|
3135
|
+
"rounded-lg p-1 hover:bg-accent hover:text-accent-foreground",
|
|
3285
3136
|
"transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-primary/50"
|
|
3286
3137
|
),
|
|
3287
3138
|
"aria-label": "Close toast",
|
|
@@ -3319,6 +3170,62 @@ var variantStyles3 = {
|
|
|
3319
3170
|
error: "bg-destructive text-destructive-foreground border-destructive/20",
|
|
3320
3171
|
success: "bg-success text-success-foreground border-success/20"
|
|
3321
3172
|
};
|
|
3173
|
+
function assignRef(ref, value) {
|
|
3174
|
+
if (!ref) return;
|
|
3175
|
+
if (typeof ref === "function") {
|
|
3176
|
+
ref(value);
|
|
3177
|
+
return;
|
|
3178
|
+
}
|
|
3179
|
+
try {
|
|
3180
|
+
ref.current = value;
|
|
3181
|
+
} catch {
|
|
3182
|
+
}
|
|
3183
|
+
}
|
|
3184
|
+
var clamp = (value, min, max) => Math.max(min, Math.min(max, value));
|
|
3185
|
+
function getTransformOrigin(side) {
|
|
3186
|
+
switch (side) {
|
|
3187
|
+
case "top":
|
|
3188
|
+
return "center bottom";
|
|
3189
|
+
case "bottom":
|
|
3190
|
+
return "center top";
|
|
3191
|
+
case "left":
|
|
3192
|
+
return "right center";
|
|
3193
|
+
case "right":
|
|
3194
|
+
return "left center";
|
|
3195
|
+
}
|
|
3196
|
+
}
|
|
3197
|
+
function computeTooltipPosition(args) {
|
|
3198
|
+
const { triggerRect, contentSize, placement, offset, padding, viewport } = args;
|
|
3199
|
+
let side = placement;
|
|
3200
|
+
const fitsTop = triggerRect.top - offset - contentSize.height >= padding;
|
|
3201
|
+
const fitsBottom = triggerRect.bottom + offset + contentSize.height <= viewport.height - padding;
|
|
3202
|
+
const fitsLeft = triggerRect.left - offset - contentSize.width >= padding;
|
|
3203
|
+
const fitsRight = triggerRect.right + offset + contentSize.width <= viewport.width - padding;
|
|
3204
|
+
if (side === "top" && !fitsTop && fitsBottom) side = "bottom";
|
|
3205
|
+
if (side === "bottom" && !fitsBottom && fitsTop) side = "top";
|
|
3206
|
+
if (side === "left" && !fitsLeft && fitsRight) side = "right";
|
|
3207
|
+
if (side === "right" && !fitsRight && fitsLeft) side = "left";
|
|
3208
|
+
const centerX = triggerRect.left + triggerRect.width / 2;
|
|
3209
|
+
const centerY = triggerRect.top + triggerRect.height / 2;
|
|
3210
|
+
let left = 0;
|
|
3211
|
+
let top = 0;
|
|
3212
|
+
if (side === "top") {
|
|
3213
|
+
top = triggerRect.top - offset - contentSize.height;
|
|
3214
|
+
left = centerX - contentSize.width / 2;
|
|
3215
|
+
} else if (side === "bottom") {
|
|
3216
|
+
top = triggerRect.bottom + offset;
|
|
3217
|
+
left = centerX - contentSize.width / 2;
|
|
3218
|
+
} else if (side === "left") {
|
|
3219
|
+
top = centerY - contentSize.height / 2;
|
|
3220
|
+
left = triggerRect.left - offset - contentSize.width;
|
|
3221
|
+
} else {
|
|
3222
|
+
top = centerY - contentSize.height / 2;
|
|
3223
|
+
left = triggerRect.right + offset;
|
|
3224
|
+
}
|
|
3225
|
+
left = clamp(left, padding, viewport.width - contentSize.width - padding);
|
|
3226
|
+
top = clamp(top, padding, viewport.height - contentSize.height - padding);
|
|
3227
|
+
return { top, left, side };
|
|
3228
|
+
}
|
|
3322
3229
|
var Tooltip = ({
|
|
3323
3230
|
children,
|
|
3324
3231
|
content,
|
|
@@ -3329,54 +3236,52 @@ var Tooltip = ({
|
|
|
3329
3236
|
variant = "default"
|
|
3330
3237
|
}) => {
|
|
3331
3238
|
const [isOpen, setIsOpen] = React13.useState(false);
|
|
3332
|
-
const [position, setPosition] = React13.useState(null);
|
|
3333
3239
|
const [isMounted, setIsMounted] = React13.useState(false);
|
|
3334
3240
|
const triggerRef = React13.useRef(null);
|
|
3241
|
+
const positionerRef = React13.useRef(null);
|
|
3242
|
+
const panelRef = React13.useRef(null);
|
|
3335
3243
|
const timeoutRef = React13.useRef(void 0);
|
|
3244
|
+
const lastAppliedRef = React13.useRef(null);
|
|
3336
3245
|
React13.useEffect(() => {
|
|
3337
3246
|
setIsMounted(true);
|
|
3338
3247
|
}, []);
|
|
3339
3248
|
const delayOpen = typeof delay === "object" ? delay.open || 700 : delay;
|
|
3340
3249
|
const delayClose = typeof delay === "object" ? delay.close || 300 : delay;
|
|
3341
|
-
const
|
|
3342
|
-
|
|
3343
|
-
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
const
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
-
|
|
3355
|
-
|
|
3356
|
-
|
|
3357
|
-
|
|
3358
|
-
|
|
3359
|
-
|
|
3360
|
-
|
|
3361
|
-
|
|
3362
|
-
|
|
3363
|
-
|
|
3364
|
-
|
|
3365
|
-
const
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
}
|
|
3373
|
-
setPosition({ top, left });
|
|
3374
|
-
};
|
|
3250
|
+
const offset = 8;
|
|
3251
|
+
const padding = 8;
|
|
3252
|
+
const updatePosition = React13.useCallback(() => {
|
|
3253
|
+
const triggerEl = triggerRef.current;
|
|
3254
|
+
const positionerEl = positionerRef.current;
|
|
3255
|
+
const panelEl = panelRef.current;
|
|
3256
|
+
if (!triggerEl || !positionerEl || !panelEl) return;
|
|
3257
|
+
const triggerRect = triggerEl.getBoundingClientRect();
|
|
3258
|
+
const measuredWidth = panelEl.offsetWidth;
|
|
3259
|
+
const measuredHeight = panelEl.offsetHeight;
|
|
3260
|
+
const rect = panelEl.getBoundingClientRect();
|
|
3261
|
+
const contentWidth = measuredWidth || rect.width;
|
|
3262
|
+
const contentHeight = measuredHeight || rect.height;
|
|
3263
|
+
const next = computeTooltipPosition({
|
|
3264
|
+
triggerRect,
|
|
3265
|
+
contentSize: { width: contentWidth, height: contentHeight },
|
|
3266
|
+
placement,
|
|
3267
|
+
offset,
|
|
3268
|
+
padding,
|
|
3269
|
+
viewport: { width: window.innerWidth, height: window.innerHeight }
|
|
3270
|
+
});
|
|
3271
|
+
const top = Math.round(next.top);
|
|
3272
|
+
const left = Math.round(next.left);
|
|
3273
|
+
const prev = lastAppliedRef.current;
|
|
3274
|
+
const same = prev && Math.abs(prev.top - top) < 0.5 && Math.abs(prev.left - left) < 0.5 && prev.side === next.side;
|
|
3275
|
+
if (same) return;
|
|
3276
|
+
lastAppliedRef.current = { top, left, side: next.side };
|
|
3277
|
+
positionerEl.style.transform = `translate3d(${left}px, ${top}px, 0)`;
|
|
3278
|
+
panelEl.style.transformOrigin = getTransformOrigin(next.side);
|
|
3279
|
+
if (positionerEl.style.visibility !== "visible") positionerEl.style.visibility = "visible";
|
|
3280
|
+
}, [placement]);
|
|
3375
3281
|
const handleMouseEnter = () => {
|
|
3376
3282
|
if (disabled) return;
|
|
3377
3283
|
clearTimeout(timeoutRef.current);
|
|
3378
3284
|
timeoutRef.current = setTimeout(() => {
|
|
3379
|
-
calculatePosition();
|
|
3380
3285
|
setIsOpen(true);
|
|
3381
3286
|
}, delayOpen);
|
|
3382
3287
|
};
|
|
@@ -3388,45 +3293,117 @@ var Tooltip = ({
|
|
|
3388
3293
|
};
|
|
3389
3294
|
const handleFocus = () => {
|
|
3390
3295
|
if (disabled) return;
|
|
3391
|
-
calculatePosition();
|
|
3392
3296
|
setIsOpen(true);
|
|
3393
3297
|
};
|
|
3394
3298
|
const handleBlur = () => {
|
|
3395
3299
|
setIsOpen(false);
|
|
3396
3300
|
};
|
|
3301
|
+
React13.useEffect(() => {
|
|
3302
|
+
return () => clearTimeout(timeoutRef.current);
|
|
3303
|
+
}, []);
|
|
3304
|
+
React13.useLayoutEffect(() => {
|
|
3305
|
+
if (!isOpen) {
|
|
3306
|
+
lastAppliedRef.current = null;
|
|
3307
|
+
return;
|
|
3308
|
+
}
|
|
3309
|
+
updatePosition();
|
|
3310
|
+
let raf1 = 0;
|
|
3311
|
+
let raf2 = 0;
|
|
3312
|
+
raf1 = window.requestAnimationFrame(() => {
|
|
3313
|
+
updatePosition();
|
|
3314
|
+
raf2 = window.requestAnimationFrame(() => updatePosition());
|
|
3315
|
+
});
|
|
3316
|
+
return () => {
|
|
3317
|
+
cancelAnimationFrame(raf1);
|
|
3318
|
+
cancelAnimationFrame(raf2);
|
|
3319
|
+
};
|
|
3320
|
+
}, [isOpen, updatePosition]);
|
|
3321
|
+
React13.useEffect(() => {
|
|
3322
|
+
if (!isOpen) return;
|
|
3323
|
+
let raf = 0;
|
|
3324
|
+
const handler = () => {
|
|
3325
|
+
cancelAnimationFrame(raf);
|
|
3326
|
+
raf = window.requestAnimationFrame(() => updatePosition());
|
|
3327
|
+
};
|
|
3328
|
+
handler();
|
|
3329
|
+
window.addEventListener("resize", handler);
|
|
3330
|
+
window.addEventListener("scroll", handler, true);
|
|
3331
|
+
document.addEventListener("scroll", handler, true);
|
|
3332
|
+
return () => {
|
|
3333
|
+
cancelAnimationFrame(raf);
|
|
3334
|
+
window.removeEventListener("resize", handler);
|
|
3335
|
+
window.removeEventListener("scroll", handler, true);
|
|
3336
|
+
document.removeEventListener("scroll", handler, true);
|
|
3337
|
+
};
|
|
3338
|
+
}, [isOpen, updatePosition]);
|
|
3339
|
+
React13.useEffect(() => {
|
|
3340
|
+
if (!isOpen) return;
|
|
3341
|
+
if (typeof ResizeObserver === "undefined") return;
|
|
3342
|
+
const ro = new ResizeObserver(() => updatePosition());
|
|
3343
|
+
if (triggerRef.current) ro.observe(triggerRef.current);
|
|
3344
|
+
if (panelRef.current) ro.observe(panelRef.current);
|
|
3345
|
+
return () => ro.disconnect();
|
|
3346
|
+
}, [isOpen, updatePosition]);
|
|
3397
3347
|
if (disabled || !content) {
|
|
3398
3348
|
return children;
|
|
3399
3349
|
}
|
|
3400
3350
|
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
|
|
3401
3351
|
React13.cloneElement(children, {
|
|
3402
|
-
ref:
|
|
3403
|
-
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
|
|
3352
|
+
ref: (node) => {
|
|
3353
|
+
triggerRef.current = node;
|
|
3354
|
+
assignRef(children.props?.ref, node);
|
|
3355
|
+
},
|
|
3356
|
+
onMouseEnter: (e) => {
|
|
3357
|
+
handleMouseEnter();
|
|
3358
|
+
if (typeof children.props?.onMouseEnter === "function") children.props.onMouseEnter(e);
|
|
3359
|
+
},
|
|
3360
|
+
onMouseLeave: (e) => {
|
|
3361
|
+
handleMouseLeave();
|
|
3362
|
+
if (typeof children.props?.onMouseLeave === "function") children.props.onMouseLeave(e);
|
|
3363
|
+
},
|
|
3364
|
+
onFocus: (e) => {
|
|
3365
|
+
handleFocus();
|
|
3366
|
+
if (typeof children.props?.onFocus === "function") children.props.onFocus(e);
|
|
3367
|
+
},
|
|
3368
|
+
onBlur: (e) => {
|
|
3369
|
+
handleBlur();
|
|
3370
|
+
if (typeof children.props?.onBlur === "function") children.props.onBlur(e);
|
|
3371
|
+
}
|
|
3407
3372
|
}),
|
|
3408
|
-
isMounted && isOpen &&
|
|
3373
|
+
isMounted && isOpen && (0, import_react_dom2.createPortal)(
|
|
3409
3374
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
3410
3375
|
"div",
|
|
3411
3376
|
{
|
|
3412
|
-
|
|
3377
|
+
ref: positionerRef,
|
|
3413
3378
|
style: {
|
|
3414
3379
|
position: "fixed",
|
|
3415
|
-
top:
|
|
3416
|
-
left:
|
|
3417
|
-
transform:
|
|
3380
|
+
top: 0,
|
|
3381
|
+
left: 0,
|
|
3382
|
+
transform: "translate3d(0, 0, 0)",
|
|
3418
3383
|
zIndex: 99999,
|
|
3419
|
-
|
|
3420
|
-
|
|
3421
|
-
|
|
3384
|
+
visibility: "hidden",
|
|
3385
|
+
pointerEvents: "none",
|
|
3386
|
+
willChange: "transform"
|
|
3422
3387
|
},
|
|
3423
|
-
|
|
3424
|
-
"
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
|
|
3388
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
3389
|
+
"div",
|
|
3390
|
+
{
|
|
3391
|
+
ref: panelRef,
|
|
3392
|
+
role: "tooltip",
|
|
3393
|
+
style: {
|
|
3394
|
+
opacity: 1,
|
|
3395
|
+
transition: "opacity 150ms",
|
|
3396
|
+
transformOrigin: getTransformOrigin(placement)
|
|
3397
|
+
},
|
|
3398
|
+
className: cn(
|
|
3399
|
+
"px-3 py-2 text-sm font-medium rounded-xl shadow-lg border",
|
|
3400
|
+
"max-w-xs wrap-break-word backdrop-blur-sm",
|
|
3401
|
+
variantStyles3[variant],
|
|
3402
|
+
className
|
|
3403
|
+
),
|
|
3404
|
+
children: content
|
|
3405
|
+
}
|
|
3406
|
+
)
|
|
3430
3407
|
}
|
|
3431
3408
|
),
|
|
3432
3409
|
document.body
|
|
@@ -3650,7 +3627,7 @@ var useShadCNAnimations = () => {
|
|
|
3650
3627
|
|
|
3651
3628
|
// ../../components/ui/Popover.tsx
|
|
3652
3629
|
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
3653
|
-
function
|
|
3630
|
+
function assignRef2(ref, value) {
|
|
3654
3631
|
if (!ref) return;
|
|
3655
3632
|
if (typeof ref === "function") {
|
|
3656
3633
|
ref(value);
|
|
@@ -3661,7 +3638,7 @@ function assignRef(ref, value) {
|
|
|
3661
3638
|
} catch {
|
|
3662
3639
|
}
|
|
3663
3640
|
}
|
|
3664
|
-
function
|
|
3641
|
+
function getTransformOrigin2(side, align) {
|
|
3665
3642
|
if (side === "top") return `${align === "end" ? "right" : "left"} bottom`;
|
|
3666
3643
|
if (side === "bottom") return `${align === "end" ? "right" : "left"} top`;
|
|
3667
3644
|
if (side === "left") return "right top";
|
|
@@ -3683,7 +3660,7 @@ function normalizePlacement(placement) {
|
|
|
3683
3660
|
}
|
|
3684
3661
|
}
|
|
3685
3662
|
}
|
|
3686
|
-
var
|
|
3663
|
+
var clamp2 = (value, min, max) => Math.max(min, Math.min(max, value));
|
|
3687
3664
|
function overflowAmount(left, width, viewportWidth, padding) {
|
|
3688
3665
|
const min = padding;
|
|
3689
3666
|
const max = viewportWidth - padding;
|
|
@@ -3730,14 +3707,14 @@ function computePopoverPosition(args) {
|
|
|
3730
3707
|
if (align === "end" && endOverflow > 0 && startOverflow < endOverflow) align = "start";
|
|
3731
3708
|
left = align === "end" ? leftEnd : leftStart;
|
|
3732
3709
|
top = side === "top" ? triggerRect.top - offset - contentSize.height : triggerRect.bottom + offset;
|
|
3733
|
-
left =
|
|
3734
|
-
top =
|
|
3710
|
+
left = clamp2(left, padding, viewport.width - contentSize.width - padding);
|
|
3711
|
+
top = clamp2(top, padding, viewport.height - contentSize.height - padding);
|
|
3735
3712
|
return { top, left, side, align };
|
|
3736
3713
|
}
|
|
3737
3714
|
top = triggerRect.top;
|
|
3738
3715
|
left = side === "left" ? triggerRect.left - offset - contentSize.width : triggerRect.right + offset;
|
|
3739
|
-
left =
|
|
3740
|
-
top =
|
|
3716
|
+
left = clamp2(left, padding, viewport.width - contentSize.width - padding);
|
|
3717
|
+
top = clamp2(top, padding, viewport.height - contentSize.height - padding);
|
|
3741
3718
|
return { top, left, side, align };
|
|
3742
3719
|
}
|
|
3743
3720
|
var Popover = ({
|
|
@@ -3804,7 +3781,7 @@ var Popover = ({
|
|
|
3804
3781
|
if (applied) return;
|
|
3805
3782
|
lastAppliedRef.current = { top, left, side: next.side, align: next.align, width: widthPx };
|
|
3806
3783
|
positionerEl.style.transform = `translate3d(${left}px, ${top}px, 0)`;
|
|
3807
|
-
panelEl.style.transformOrigin =
|
|
3784
|
+
panelEl.style.transformOrigin = getTransformOrigin2(next.side, next.align);
|
|
3808
3785
|
if (positionerEl.style.visibility !== "visible") positionerEl.style.visibility = "visible";
|
|
3809
3786
|
if (positionerEl.style.pointerEvents !== "auto") positionerEl.style.pointerEvents = "auto";
|
|
3810
3787
|
}, [placement, matchTriggerWidth, contentWidth]);
|
|
@@ -3919,7 +3896,7 @@ var Popover = ({
|
|
|
3919
3896
|
role: "dialog",
|
|
3920
3897
|
"aria-modal": modal || void 0,
|
|
3921
3898
|
style: {
|
|
3922
|
-
transformOrigin:
|
|
3899
|
+
transformOrigin: getTransformOrigin2(initialPlacement.side, initialPlacement.align)
|
|
3923
3900
|
},
|
|
3924
3901
|
className: cn(
|
|
3925
3902
|
// shadcn-like enter animation
|
|
@@ -3930,7 +3907,7 @@ var Popover = ({
|
|
|
3930
3907
|
"div",
|
|
3931
3908
|
{
|
|
3932
3909
|
className: cn(
|
|
3933
|
-
"rounded-
|
|
3910
|
+
"rounded-xl border bg-popover text-popover-foreground shadow-md",
|
|
3934
3911
|
"backdrop-blur-sm bg-popover/95 border-border/60 p-4",
|
|
3935
3912
|
contentClassName
|
|
3936
3913
|
),
|
|
@@ -3950,7 +3927,7 @@ var Popover = ({
|
|
|
3950
3927
|
return React14.cloneElement(triggerEl, {
|
|
3951
3928
|
ref: (node) => {
|
|
3952
3929
|
triggerRef.current = node;
|
|
3953
|
-
|
|
3930
|
+
assignRef2(triggerEl.props?.ref, node);
|
|
3954
3931
|
},
|
|
3955
3932
|
onClick: (e) => {
|
|
3956
3933
|
e.preventDefault();
|
|
@@ -3961,10 +3938,10 @@ var Popover = ({
|
|
|
3961
3938
|
}
|
|
3962
3939
|
},
|
|
3963
3940
|
"aria-expanded": isOpen,
|
|
3964
|
-
"aria-haspopup": "dialog",
|
|
3941
|
+
"aria-haspopup": triggerEl.props?.["aria-haspopup"] ?? "dialog",
|
|
3965
3942
|
className: cn(
|
|
3966
3943
|
triggerEl.props?.className,
|
|
3967
|
-
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background
|
|
3944
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background"
|
|
3968
3945
|
)
|
|
3969
3946
|
});
|
|
3970
3947
|
})(),
|
|
@@ -4170,7 +4147,7 @@ var SlideOver = (props) => {
|
|
|
4170
4147
|
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Sheet, { ...props, side: "right", variant: "overlay", size: "lg" });
|
|
4171
4148
|
};
|
|
4172
4149
|
var BottomSheet = ({ snapPoints = ["25%", "50%", "90%"], defaultSnap = 1, ...props }) => {
|
|
4173
|
-
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Sheet, { ...props, side: "bottom", variant: "overlay", className: cn("rounded-t-
|
|
4150
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Sheet, { ...props, side: "bottom", variant: "overlay", className: cn("rounded-t-3xl", props.className) });
|
|
4174
4151
|
};
|
|
4175
4152
|
var SidebarSheet = ({ navigation, children, ...props }) => {
|
|
4176
4153
|
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Sheet, { ...props, side: "left", variant: "push", size: "md", children: [
|
|
@@ -4234,7 +4211,7 @@ var Alert = ({ title, description, variant = "default", className, icon, dismiss
|
|
|
4234
4211
|
"div",
|
|
4235
4212
|
{
|
|
4236
4213
|
className: cn(
|
|
4237
|
-
"relative w-full rounded-r-
|
|
4214
|
+
"relative w-full rounded-r-xl border border-l-0 overflow-hidden",
|
|
4238
4215
|
"flex items-start gap-3 p-4 pl-5",
|
|
4239
4216
|
"backdrop-blur-md",
|
|
4240
4217
|
config.containerClassName,
|
|
@@ -4254,7 +4231,7 @@ var Alert = ({ title, description, variant = "default", className, icon, dismiss
|
|
|
4254
4231
|
"button",
|
|
4255
4232
|
{
|
|
4256
4233
|
onClick: handleClose,
|
|
4257
|
-
className: "rounded-
|
|
4234
|
+
className: "rounded-lg p-1 hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
4258
4235
|
"aria-label": closeAriaLabel || t("closeAlert"),
|
|
4259
4236
|
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react9.X, { className: "h-4 w-4" })
|
|
4260
4237
|
}
|
|
@@ -4414,7 +4391,7 @@ var variantStyles4 = {
|
|
|
4414
4391
|
simple: "text-muted-foreground hover:text-foreground underline-offset-4 hover:underline",
|
|
4415
4392
|
slash: "text-muted-foreground hover:text-foreground",
|
|
4416
4393
|
arrow: "text-muted-foreground hover:text-foreground",
|
|
4417
|
-
pill: "text-muted-foreground hover:text-foreground hover:bg-accent rounded-
|
|
4394
|
+
pill: "text-muted-foreground hover:text-foreground hover:bg-accent rounded-lg transition-colors"
|
|
4418
4395
|
};
|
|
4419
4396
|
var Breadcrumb = ({
|
|
4420
4397
|
items,
|
|
@@ -4465,72 +4442,57 @@ var Breadcrumb = ({
|
|
|
4465
4442
|
const handleCollapseToggle = () => {
|
|
4466
4443
|
setIsCollapsed(!isCollapsed);
|
|
4467
4444
|
};
|
|
4468
|
-
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
4469
|
-
|
|
4470
|
-
|
|
4471
|
-
|
|
4472
|
-
|
|
4473
|
-
|
|
4474
|
-
|
|
4475
|
-
|
|
4476
|
-
|
|
4477
|
-
|
|
4478
|
-
|
|
4479
|
-
"
|
|
4480
|
-
|
|
4481
|
-
|
|
4482
|
-
className: cn(
|
|
4483
|
-
"inline-flex items-center gap-1 transition-all duration-200",
|
|
4484
|
-
"hover:bg-accent rounded-md",
|
|
4485
|
-
sizeStyles5[size].padding,
|
|
4486
|
-
"focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-1"
|
|
4487
|
-
),
|
|
4488
|
-
"aria-label": "Show all breadcrumb items",
|
|
4489
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_lucide_react11.MoreHorizontal, { className: sizeStyles5[size].icon })
|
|
4490
|
-
}
|
|
4491
|
-
) : item.href && !isLast && !item.disabled ? /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
4492
|
-
import_link.default,
|
|
4493
|
-
{
|
|
4494
|
-
href: item.href,
|
|
4495
|
-
className: cn(
|
|
4496
|
-
"inline-flex items-center gap-1 font-medium transition-all duration-200",
|
|
4497
|
-
variantStyles4[variant],
|
|
4498
|
-
variant === "pill" && sizeStyles5[size].padding,
|
|
4499
|
-
"focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-1 rounded-sm"
|
|
4500
|
-
),
|
|
4501
|
-
children: [
|
|
4502
|
-
Icon && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Icon, { className: sizeStyles5[size].icon }),
|
|
4503
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { children: item.label })
|
|
4504
|
-
]
|
|
4505
|
-
}
|
|
4506
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
4507
|
-
"span",
|
|
4508
|
-
{
|
|
4509
|
-
className: cn(
|
|
4510
|
-
"inline-flex items-center gap-1 font-medium",
|
|
4511
|
-
isLast ? "text-foreground" : item.disabled ? "text-muted-foreground/60 cursor-not-allowed" : "text-muted-foreground",
|
|
4512
|
-
variant === "pill" && !isLast && sizeStyles5[size].padding
|
|
4513
|
-
),
|
|
4514
|
-
"aria-current": isLast ? "page" : void 0,
|
|
4515
|
-
children: [
|
|
4516
|
-
Icon && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Icon, { className: sizeStyles5[size].icon }),
|
|
4517
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { children: item.label })
|
|
4518
|
-
]
|
|
4519
|
-
}
|
|
4445
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("nav", { className: cn("flex w-full items-center", sizeStyles5[size].text, className), "aria-label": "Breadcrumb navigation", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("ol", { className: cn("flex items-center", sizeStyles5[size].spacing), children: processedItems.map((item, index) => {
|
|
4446
|
+
const isLast = index === processedItems.length - 1;
|
|
4447
|
+
const isCollapsedIndicator = item.label === "...";
|
|
4448
|
+
const Icon = item.icon;
|
|
4449
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("li", { className: "flex items-center", children: [
|
|
4450
|
+
isCollapsedIndicator ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
4451
|
+
"button",
|
|
4452
|
+
{
|
|
4453
|
+
onClick: handleCollapseToggle,
|
|
4454
|
+
className: cn(
|
|
4455
|
+
"inline-flex items-center gap-1 transition-all duration-200",
|
|
4456
|
+
"hover:bg-accent rounded-md",
|
|
4457
|
+
sizeStyles5[size].padding,
|
|
4458
|
+
"focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-1"
|
|
4520
4459
|
),
|
|
4521
|
-
|
|
4522
|
-
|
|
4523
|
-
|
|
4524
|
-
|
|
4525
|
-
|
|
4526
|
-
|
|
4527
|
-
|
|
4528
|
-
|
|
4529
|
-
|
|
4530
|
-
|
|
4531
|
-
|
|
4532
|
-
|
|
4533
|
-
|
|
4460
|
+
"aria-label": "Show all breadcrumb items",
|
|
4461
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_lucide_react11.MoreHorizontal, { className: sizeStyles5[size].icon })
|
|
4462
|
+
}
|
|
4463
|
+
) : item.href && !isLast && !item.disabled ? /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
4464
|
+
import_link.default,
|
|
4465
|
+
{
|
|
4466
|
+
href: item.href,
|
|
4467
|
+
className: cn(
|
|
4468
|
+
"inline-flex items-center gap-1 font-medium transition-all duration-200",
|
|
4469
|
+
variantStyles4[variant],
|
|
4470
|
+
variant === "pill" && sizeStyles5[size].padding,
|
|
4471
|
+
"focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-1 rounded-md"
|
|
4472
|
+
),
|
|
4473
|
+
children: [
|
|
4474
|
+
Icon && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Icon, { className: sizeStyles5[size].icon }),
|
|
4475
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { children: item.label })
|
|
4476
|
+
]
|
|
4477
|
+
}
|
|
4478
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
4479
|
+
"span",
|
|
4480
|
+
{
|
|
4481
|
+
className: cn(
|
|
4482
|
+
"inline-flex items-center gap-1 font-medium",
|
|
4483
|
+
isLast ? "text-foreground" : item.disabled ? "text-muted-foreground/60 cursor-not-allowed" : "text-muted-foreground",
|
|
4484
|
+
variant === "pill" && !isLast && sizeStyles5[size].padding
|
|
4485
|
+
),
|
|
4486
|
+
"aria-current": isLast ? "page" : void 0,
|
|
4487
|
+
children: [
|
|
4488
|
+
Icon && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Icon, { className: sizeStyles5[size].icon }),
|
|
4489
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { children: item.label })
|
|
4490
|
+
]
|
|
4491
|
+
}
|
|
4492
|
+
),
|
|
4493
|
+
!isLast && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: cn("mx-1", sizeStyles5[size].spacing), role: "presentation", "aria-hidden": "true", children: getSeparator() })
|
|
4494
|
+
] }, `${item.label}-${index}`);
|
|
4495
|
+
}) }) });
|
|
4534
4496
|
};
|
|
4535
4497
|
var Breadcrumb_default = Breadcrumb;
|
|
4536
4498
|
|
|
@@ -4572,12 +4534,12 @@ var variantStyles5 = {
|
|
|
4572
4534
|
},
|
|
4573
4535
|
card: {
|
|
4574
4536
|
container: "space-y-1",
|
|
4575
|
-
tab: "rounded-
|
|
4537
|
+
tab: "rounded-xl border border-transparent transition-all duration-200",
|
|
4576
4538
|
activeTab: "bg-primary text-primary-foreground border-primary",
|
|
4577
4539
|
inactiveTab: "text-muted-foreground hover:text-foreground hover:bg-accent/50 hover:border-border hover:shadow-sm"
|
|
4578
4540
|
},
|
|
4579
4541
|
"underline-card": {
|
|
4580
|
-
container: "border-b border-border bg-card rounded-t-
|
|
4542
|
+
container: "border-b border-border bg-card rounded-t-2xl",
|
|
4581
4543
|
tab: "relative transition-all duration-200 pb-3 px-4 border-b-2 border-transparent hover:border-primary/50 hover:bg-accent/30",
|
|
4582
4544
|
activeTab: "text-primary border-primary font-medium bg-accent/20",
|
|
4583
4545
|
inactiveTab: "text-muted-foreground hover:text-foreground"
|
|
@@ -4690,13 +4652,7 @@ var Tabs = ({
|
|
|
4690
4652
|
tab.value
|
|
4691
4653
|
);
|
|
4692
4654
|
}),
|
|
4693
|
-
variant === "underline" && orientation === "horizontal" && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
4694
|
-
"div",
|
|
4695
|
-
{
|
|
4696
|
-
className: "absolute bottom-0 h-0.5 bg-primary transition-all duration-300 ease-out",
|
|
4697
|
-
style: underlineStyle
|
|
4698
|
-
}
|
|
4699
|
-
)
|
|
4655
|
+
variant === "underline" && orientation === "horizontal" && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "absolute bottom-0 h-0.5 bg-primary transition-all duration-300 ease-out", style: underlineStyle })
|
|
4700
4656
|
] }),
|
|
4701
4657
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
4702
4658
|
"div",
|
|
@@ -4705,7 +4661,7 @@ var Tabs = ({
|
|
|
4705
4661
|
id: `${baseId}-panel-${tabs.findIndex((t) => t.value === active)}`,
|
|
4706
4662
|
"aria-labelledby": `${baseId}-tab-${tabs.findIndex((t) => t.value === active)}`,
|
|
4707
4663
|
className: cn(
|
|
4708
|
-
"bg-card rounded-
|
|
4664
|
+
"bg-card rounded-xl border border-border shadow-sm text-card-foreground transition-all duration-200",
|
|
4709
4665
|
sizeStyles6[size].content,
|
|
4710
4666
|
orientation === "vertical" && "flex-1"
|
|
4711
4667
|
),
|
|
@@ -4716,46 +4672,17 @@ var Tabs = ({
|
|
|
4716
4672
|
] });
|
|
4717
4673
|
};
|
|
4718
4674
|
var SimpleTabs = ({ tabs, defaultValue, className }) => {
|
|
4719
|
-
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
4720
|
-
Tabs,
|
|
4721
|
-
{
|
|
4722
|
-
tabs,
|
|
4723
|
-
defaultValue,
|
|
4724
|
-
className,
|
|
4725
|
-
variant: "default",
|
|
4726
|
-
size: "sm"
|
|
4727
|
-
}
|
|
4728
|
-
);
|
|
4675
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Tabs, { tabs, defaultValue, className, variant: "default", size: "sm" });
|
|
4729
4676
|
};
|
|
4730
4677
|
var PillTabs = ({ contained = true, ...props }) => {
|
|
4731
|
-
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
4732
|
-
Tabs,
|
|
4733
|
-
{
|
|
4734
|
-
...props,
|
|
4735
|
-
variant: "pills",
|
|
4736
|
-
className: cn(contained && "max-w-fit", props.className)
|
|
4737
|
-
}
|
|
4738
|
-
);
|
|
4678
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Tabs, { ...props, variant: "pills", className: cn(contained && "max-w-fit", props.className) });
|
|
4739
4679
|
};
|
|
4740
|
-
var VerticalTabs = ({
|
|
4741
|
-
sidebarWidth
|
|
4742
|
-
className,
|
|
4743
|
-
...props
|
|
4744
|
-
}) => {
|
|
4745
|
-
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: cn("flex gap-6", className), children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: cn(sidebarWidth, "shrink-0"), children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
4746
|
-
Tabs,
|
|
4747
|
-
{
|
|
4748
|
-
...props,
|
|
4749
|
-
orientation: "vertical",
|
|
4750
|
-
variant: "card",
|
|
4751
|
-
className: "w-full"
|
|
4752
|
-
}
|
|
4753
|
-
) }) });
|
|
4680
|
+
var VerticalTabs = ({ sidebarWidth = "w-48", className, ...props }) => {
|
|
4681
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: cn("flex gap-6", className), children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: cn(sidebarWidth, "shrink-0"), children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Tabs, { ...props, orientation: "vertical", variant: "card", className: "w-full" }) }) });
|
|
4754
4682
|
};
|
|
4755
4683
|
|
|
4756
4684
|
// ../../components/ui/DropdownMenu.tsx
|
|
4757
4685
|
var import_react11 = __toESM(require("react"), 1);
|
|
4758
|
-
var import_react_dom5 = require("react-dom");
|
|
4759
4686
|
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
4760
4687
|
var DropdownMenu = ({
|
|
4761
4688
|
trigger,
|
|
@@ -4770,72 +4697,26 @@ var DropdownMenu = ({
|
|
|
4770
4697
|
items
|
|
4771
4698
|
}) => {
|
|
4772
4699
|
const [internalOpen, setInternalOpen] = (0, import_react11.useState)(false);
|
|
4773
|
-
const [position, setPosition] = (0, import_react11.useState)(null);
|
|
4774
4700
|
const triggerRef = import_react11.default.useRef(null);
|
|
4775
|
-
const
|
|
4701
|
+
const menuRef = import_react11.default.useRef(null);
|
|
4776
4702
|
const itemsRef = import_react11.default.useRef([]);
|
|
4777
4703
|
const [activeIndex, setActiveIndex] = (0, import_react11.useState)(-1);
|
|
4778
4704
|
useShadCNAnimations();
|
|
4779
4705
|
const open = isOpen !== void 0 ? isOpen : internalOpen;
|
|
4780
4706
|
const setOpen = onOpenChange || setInternalOpen;
|
|
4781
4707
|
import_react11.default.useEffect(() => {
|
|
4782
|
-
if (open && triggerRef.current && contentRef.current) {
|
|
4783
|
-
const rect = triggerRef.current.getBoundingClientRect();
|
|
4784
|
-
const menuRect = contentRef.current.getBoundingClientRect();
|
|
4785
|
-
const viewportHeight = window.innerHeight;
|
|
4786
|
-
let top = rect.bottom + 4;
|
|
4787
|
-
let left = rect.left;
|
|
4788
|
-
if (rect.bottom + menuRect.height > viewportHeight && rect.top > menuRect.height) {
|
|
4789
|
-
top = rect.top - menuRect.height - 4;
|
|
4790
|
-
}
|
|
4791
|
-
switch (placement) {
|
|
4792
|
-
case "top":
|
|
4793
|
-
case "top-start":
|
|
4794
|
-
top = rect.top - menuRect.height - 4;
|
|
4795
|
-
break;
|
|
4796
|
-
case "top-end":
|
|
4797
|
-
top = rect.top - menuRect.height - 4;
|
|
4798
|
-
left = rect.right - menuRect.width;
|
|
4799
|
-
break;
|
|
4800
|
-
case "bottom":
|
|
4801
|
-
case "bottom-start":
|
|
4802
|
-
break;
|
|
4803
|
-
case "bottom-end":
|
|
4804
|
-
left = rect.right - menuRect.width;
|
|
4805
|
-
break;
|
|
4806
|
-
case "left":
|
|
4807
|
-
top = rect.top;
|
|
4808
|
-
left = rect.left - menuRect.width - 4;
|
|
4809
|
-
break;
|
|
4810
|
-
case "right":
|
|
4811
|
-
top = rect.top;
|
|
4812
|
-
left = rect.right + 4;
|
|
4813
|
-
break;
|
|
4814
|
-
}
|
|
4815
|
-
setPosition({ top, left });
|
|
4816
|
-
}
|
|
4817
4708
|
if (open) setActiveIndex(-1);
|
|
4818
|
-
}, [open
|
|
4709
|
+
}, [open]);
|
|
4819
4710
|
import_react11.default.useEffect(() => {
|
|
4820
4711
|
if (!open) return;
|
|
4821
|
-
const handleClickOutside = (event) => {
|
|
4822
|
-
const target = event.target;
|
|
4823
|
-
if (triggerRef.current && !triggerRef.current.contains(target)) {
|
|
4824
|
-
const dropdown = document.querySelector("[data-dropdown-menu]");
|
|
4825
|
-
if (dropdown && !dropdown.contains(target)) {
|
|
4826
|
-
setOpen(false);
|
|
4827
|
-
}
|
|
4828
|
-
}
|
|
4829
|
-
};
|
|
4830
|
-
const handleEscape = (event) => {
|
|
4831
|
-
if (event.key === "Escape") {
|
|
4832
|
-
setOpen(false);
|
|
4833
|
-
}
|
|
4834
|
-
};
|
|
4835
|
-
document.addEventListener("mousedown", handleClickOutside);
|
|
4836
|
-
document.addEventListener("keydown", handleEscape);
|
|
4837
4712
|
const handleKeyNav = (e) => {
|
|
4838
|
-
|
|
4713
|
+
const active = document.activeElement;
|
|
4714
|
+
const triggerEl = triggerRef.current;
|
|
4715
|
+
const menuEl = menuRef.current;
|
|
4716
|
+
if (!active || !triggerEl || !menuEl) return;
|
|
4717
|
+
const isInMenu = menuEl.contains(active);
|
|
4718
|
+
const isOnTrigger = triggerEl.contains(active);
|
|
4719
|
+
if (!isInMenu && !isOnTrigger) return;
|
|
4839
4720
|
const enabled = itemsRef.current.filter((el) => el && !el.disabled);
|
|
4840
4721
|
if (enabled.length === 0) return;
|
|
4841
4722
|
if (e.key === "ArrowDown") {
|
|
@@ -4860,97 +4741,88 @@ var DropdownMenu = ({
|
|
|
4860
4741
|
};
|
|
4861
4742
|
document.addEventListener("keydown", handleKeyNav);
|
|
4862
4743
|
return () => {
|
|
4863
|
-
document.removeEventListener("mousedown", handleClickOutside);
|
|
4864
|
-
document.removeEventListener("keydown", handleEscape);
|
|
4865
4744
|
document.removeEventListener("keydown", handleKeyNav);
|
|
4866
4745
|
};
|
|
4867
|
-
}, [open,
|
|
4868
|
-
const handleTriggerClick = () => {
|
|
4869
|
-
if (!disabled) {
|
|
4870
|
-
setOpen(!open);
|
|
4871
|
-
}
|
|
4872
|
-
};
|
|
4746
|
+
}, [open, activeIndex]);
|
|
4873
4747
|
const handleItemClick = (itemOnClick) => {
|
|
4874
4748
|
itemOnClick();
|
|
4875
4749
|
if (closeOnSelect) {
|
|
4876
4750
|
setOpen(false);
|
|
4877
4751
|
}
|
|
4878
4752
|
};
|
|
4879
|
-
const
|
|
4880
|
-
|
|
4753
|
+
const menuBody = /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { ref: menuRef, "data-dropdown-menu": true, "data-state": open ? "open" : "closed", role: "menu", className: cn("min-w-40", className), children: items ? items.map((item, index) => {
|
|
4754
|
+
const IconComponent = item.icon;
|
|
4755
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
4756
|
+
"button",
|
|
4757
|
+
{
|
|
4758
|
+
ref: (el) => {
|
|
4759
|
+
if (el) itemsRef.current[index] = el;
|
|
4760
|
+
},
|
|
4761
|
+
onClick: () => handleItemClick(item.onClick),
|
|
4762
|
+
disabled: item.disabled,
|
|
4763
|
+
role: "menuitem",
|
|
4764
|
+
tabIndex: -1,
|
|
4765
|
+
style: {
|
|
4766
|
+
animationDelay: open ? `${Math.min(index * 20, 200)}ms` : "0ms"
|
|
4767
|
+
},
|
|
4768
|
+
className: cn(
|
|
4769
|
+
"dropdown-item flex w-full items-center gap-2 px-2.5 py-1.5 text-sm rounded-lg",
|
|
4770
|
+
"outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
|
|
4771
|
+
"hover:bg-accent hover:text-accent-foreground",
|
|
4772
|
+
"focus:bg-accent focus:text-accent-foreground",
|
|
4773
|
+
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
4774
|
+
item.destructive && "text-destructive hover:bg-destructive/10 focus:bg-destructive/10"
|
|
4775
|
+
),
|
|
4776
|
+
children: [
|
|
4777
|
+
IconComponent && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(IconComponent, { className: "h-4 w-4" }),
|
|
4778
|
+
item.label
|
|
4779
|
+
]
|
|
4780
|
+
},
|
|
4781
|
+
index
|
|
4782
|
+
);
|
|
4783
|
+
}) : children });
|
|
4784
|
+
const enhancedTrigger = import_react11.default.cloneElement(trigger, {
|
|
4785
|
+
ref: triggerRef,
|
|
4786
|
+
"aria-haspopup": "menu",
|
|
4787
|
+
"aria-expanded": open,
|
|
4788
|
+
onKeyDown: (e) => {
|
|
4789
|
+
if (disabled) return;
|
|
4790
|
+
if (e.key === "ArrowDown") {
|
|
4791
|
+
e.preventDefault();
|
|
4792
|
+
setOpen(true);
|
|
4793
|
+
requestAnimationFrame(() => itemsRef.current.find((el) => el && !el.disabled)?.focus());
|
|
4794
|
+
} else if (e.key === "ArrowUp") {
|
|
4795
|
+
e.preventDefault();
|
|
4796
|
+
setOpen(true);
|
|
4797
|
+
requestAnimationFrame(() => {
|
|
4798
|
+
const enabled = itemsRef.current.filter((el) => el && !el.disabled);
|
|
4799
|
+
enabled[enabled.length - 1]?.focus();
|
|
4800
|
+
});
|
|
4801
|
+
} else if (e.key === "Escape") {
|
|
4802
|
+
e.preventDefault();
|
|
4803
|
+
setOpen(false);
|
|
4804
|
+
}
|
|
4805
|
+
if (typeof trigger.props?.onKeyDown === "function") {
|
|
4806
|
+
trigger.props.onKeyDown(e);
|
|
4807
|
+
}
|
|
4808
|
+
},
|
|
4809
|
+
className: cn(
|
|
4810
|
+
trigger.props?.className,
|
|
4811
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background"
|
|
4812
|
+
)
|
|
4813
|
+
});
|
|
4814
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
4815
|
+
Popover,
|
|
4881
4816
|
{
|
|
4882
|
-
|
|
4883
|
-
|
|
4884
|
-
|
|
4885
|
-
|
|
4886
|
-
|
|
4887
|
-
|
|
4888
|
-
|
|
4889
|
-
zIndex: 9999,
|
|
4890
|
-
visibility: position ? "visible" : "hidden",
|
|
4891
|
-
transformOrigin: "top center"
|
|
4892
|
-
},
|
|
4893
|
-
"data-state": open ? "open" : "closed",
|
|
4894
|
-
role: "menu",
|
|
4895
|
-
className: cn("z-9999 min-w-40", className),
|
|
4896
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
4897
|
-
"div",
|
|
4898
|
-
{
|
|
4899
|
-
className: cn(
|
|
4900
|
-
"rounded-md border bg-popover text-popover-foreground shadow-md",
|
|
4901
|
-
"backdrop-blur-sm bg-popover/95 border-border/60 p-1",
|
|
4902
|
-
contentClassName
|
|
4903
|
-
),
|
|
4904
|
-
children: items ? items.map((item, index) => {
|
|
4905
|
-
const IconComponent = item.icon;
|
|
4906
|
-
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
4907
|
-
"button",
|
|
4908
|
-
{
|
|
4909
|
-
ref: (el) => {
|
|
4910
|
-
if (el) itemsRef.current[index] = el;
|
|
4911
|
-
},
|
|
4912
|
-
onClick: () => handleItemClick(item.onClick),
|
|
4913
|
-
disabled: item.disabled,
|
|
4914
|
-
role: "menuitem",
|
|
4915
|
-
tabIndex: -1,
|
|
4916
|
-
style: {
|
|
4917
|
-
animationDelay: open ? `${Math.min(index * 20, 200)}ms` : "0ms"
|
|
4918
|
-
},
|
|
4919
|
-
className: cn(
|
|
4920
|
-
"dropdown-item flex w-full items-center gap-2 px-2.5 py-1.5 text-sm rounded-sm",
|
|
4921
|
-
"outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
|
|
4922
|
-
"hover:bg-accent hover:text-accent-foreground",
|
|
4923
|
-
"focus:bg-accent focus:text-accent-foreground",
|
|
4924
|
-
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
4925
|
-
item.destructive && "text-destructive hover:bg-destructive/10 focus:bg-destructive/10"
|
|
4926
|
-
),
|
|
4927
|
-
children: [
|
|
4928
|
-
IconComponent && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(IconComponent, { className: "h-4 w-4" }),
|
|
4929
|
-
item.label
|
|
4930
|
-
]
|
|
4931
|
-
},
|
|
4932
|
-
index
|
|
4933
|
-
);
|
|
4934
|
-
}) : children
|
|
4935
|
-
}
|
|
4936
|
-
)
|
|
4817
|
+
open,
|
|
4818
|
+
onOpenChange: setOpen,
|
|
4819
|
+
trigger: enhancedTrigger,
|
|
4820
|
+
placement,
|
|
4821
|
+
disabled,
|
|
4822
|
+
contentClassName: cn("p-1", contentClassName),
|
|
4823
|
+
children: menuBody
|
|
4937
4824
|
}
|
|
4938
|
-
)
|
|
4939
|
-
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_jsx_runtime24.Fragment, { children: [
|
|
4940
|
-
import_react11.default.cloneElement(trigger, {
|
|
4941
|
-
ref: triggerRef,
|
|
4942
|
-
onClick: handleTriggerClick,
|
|
4943
|
-
"aria-expanded": open,
|
|
4944
|
-
"aria-haspopup": "menu",
|
|
4945
|
-
className: cn(
|
|
4946
|
-
// keep original classes on trigger
|
|
4947
|
-
trigger.props?.className,
|
|
4948
|
-
// ensure focus-visible ring for trigger too
|
|
4949
|
-
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background"
|
|
4950
|
-
)
|
|
4951
|
-
}),
|
|
4952
|
-
dropdownContent && typeof window !== "undefined" && (0, import_react_dom5.createPortal)(dropdownContent, document.body)
|
|
4953
|
-
] });
|
|
4825
|
+
);
|
|
4954
4826
|
};
|
|
4955
4827
|
var DropdownMenuItem = ({ children, onClick, disabled, destructive, className }) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
4956
4828
|
"button",
|
|
@@ -4958,7 +4830,7 @@ var DropdownMenuItem = ({ children, onClick, disabled, destructive, className })
|
|
|
4958
4830
|
onClick,
|
|
4959
4831
|
disabled,
|
|
4960
4832
|
className: cn(
|
|
4961
|
-
"flex w-full items-center gap-2 px-3 py-2 text-sm rounded-
|
|
4833
|
+
"flex w-full items-center gap-2 px-3 py-2 text-sm rounded-lg transition-colors",
|
|
4962
4834
|
"hover:bg-accent hover:text-accent-foreground",
|
|
4963
4835
|
"focus:bg-accent focus:text-accent-foreground focus:outline-none",
|
|
4964
4836
|
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
@@ -4976,7 +4848,7 @@ var SelectDropdown = ({ options, value, onChange, placeholder = "Select...", cla
|
|
|
4976
4848
|
"button",
|
|
4977
4849
|
{
|
|
4978
4850
|
className: cn(
|
|
4979
|
-
"inline-flex items-center justify-between gap-2 px-3 py-2 text-sm rounded-
|
|
4851
|
+
"inline-flex items-center justify-between gap-2 px-3 py-2 text-sm rounded-xl border bg-background border-border/60",
|
|
4980
4852
|
"hover:bg-accent/50",
|
|
4981
4853
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
|
|
4982
4854
|
className
|
|
@@ -5002,7 +4874,6 @@ var import_lucide_react13 = require("lucide-react");
|
|
|
5002
4874
|
// ../../components/ui/Combobox.tsx
|
|
5003
4875
|
var React20 = __toESM(require("react"), 1);
|
|
5004
4876
|
var import_react12 = require("react");
|
|
5005
|
-
var import_react_dom6 = require("react-dom");
|
|
5006
4877
|
var import_lucide_react12 = require("lucide-react");
|
|
5007
4878
|
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
5008
4879
|
var getOptionLabel = (option) => {
|
|
@@ -5047,55 +4918,7 @@ var Combobox = ({
|
|
|
5047
4918
|
() => enableSearch ? options.filter((o) => getOptionLabel(o).toLowerCase().includes(query.toLowerCase())) : options,
|
|
5048
4919
|
[options, query, enableSearch]
|
|
5049
4920
|
);
|
|
5050
|
-
const [dropdownPosition, setDropdownPosition] = React20.useState(null);
|
|
5051
4921
|
const triggerRef = React20.useRef(null);
|
|
5052
|
-
const dropdownRef = React20.useRef(null);
|
|
5053
|
-
const calculatePosition = React20.useCallback(() => {
|
|
5054
|
-
if (!triggerRef.current) return null;
|
|
5055
|
-
const rect = triggerRef.current.getBoundingClientRect();
|
|
5056
|
-
const scrollTop = window.pageYOffset || document.documentElement.scrollTop;
|
|
5057
|
-
const scrollLeft = window.pageXOffset || document.documentElement.scrollLeft;
|
|
5058
|
-
return {
|
|
5059
|
-
top: rect.bottom + scrollTop + 4,
|
|
5060
|
-
left: rect.left + scrollLeft,
|
|
5061
|
-
width: rect.width
|
|
5062
|
-
};
|
|
5063
|
-
}, []);
|
|
5064
|
-
React20.useEffect(() => {
|
|
5065
|
-
if (!open) return;
|
|
5066
|
-
const handler = () => {
|
|
5067
|
-
const pos = calculatePosition();
|
|
5068
|
-
if (pos) setDropdownPosition(pos);
|
|
5069
|
-
};
|
|
5070
|
-
window.addEventListener("resize", handler);
|
|
5071
|
-
window.addEventListener("scroll", handler, true);
|
|
5072
|
-
return () => {
|
|
5073
|
-
window.removeEventListener("resize", handler);
|
|
5074
|
-
window.removeEventListener("scroll", handler, true);
|
|
5075
|
-
};
|
|
5076
|
-
}, [open, calculatePosition]);
|
|
5077
|
-
React20.useEffect(() => {
|
|
5078
|
-
if (!open) return;
|
|
5079
|
-
const handleClickOutside = (event) => {
|
|
5080
|
-
const target = event.target;
|
|
5081
|
-
const triggerEl = triggerRef.current;
|
|
5082
|
-
const dropdownEl = dropdownRef.current;
|
|
5083
|
-
if (triggerEl && !triggerEl.contains(target) && dropdownEl && !dropdownEl.contains(target)) {
|
|
5084
|
-
setOpen(false);
|
|
5085
|
-
}
|
|
5086
|
-
};
|
|
5087
|
-
const handleEscape = (event) => {
|
|
5088
|
-
if (event.key === "Escape") {
|
|
5089
|
-
setOpen(false);
|
|
5090
|
-
}
|
|
5091
|
-
};
|
|
5092
|
-
document.addEventListener("mousedown", handleClickOutside);
|
|
5093
|
-
document.addEventListener("keydown", handleEscape);
|
|
5094
|
-
return () => {
|
|
5095
|
-
document.removeEventListener("mousedown", handleClickOutside);
|
|
5096
|
-
document.removeEventListener("keydown", handleEscape);
|
|
5097
|
-
};
|
|
5098
|
-
}, [open]);
|
|
5099
4922
|
const handleSelect = (option) => {
|
|
5100
4923
|
const val = getOptionValue(option);
|
|
5101
4924
|
if (val !== void 0 && val !== null) {
|
|
@@ -5121,110 +4944,91 @@ var Combobox = ({
|
|
|
5121
4944
|
}, [open, enableSearch]);
|
|
5122
4945
|
const selectedOption = findOptionByValue(options, value);
|
|
5123
4946
|
const displayValue = selectedOption ? getOptionLabel(selectedOption) : "";
|
|
5124
|
-
const
|
|
5125
|
-
"div",
|
|
5126
|
-
|
|
5127
|
-
|
|
5128
|
-
|
|
5129
|
-
|
|
5130
|
-
|
|
5131
|
-
|
|
5132
|
-
|
|
5133
|
-
|
|
5134
|
-
|
|
5135
|
-
|
|
5136
|
-
|
|
5137
|
-
|
|
5138
|
-
|
|
5139
|
-
|
|
5140
|
-
|
|
5141
|
-
|
|
5142
|
-
|
|
5143
|
-
|
|
5144
|
-
|
|
5145
|
-
|
|
5146
|
-
|
|
5147
|
-
|
|
5148
|
-
|
|
5149
|
-
|
|
5150
|
-
|
|
5151
|
-
|
|
5152
|
-
|
|
5153
|
-
|
|
5154
|
-
|
|
5155
|
-
|
|
5156
|
-
|
|
5157
|
-
const next = prev === null ? 0 : prev + 1;
|
|
5158
|
-
return next >= filteredOptions.length ? 0 : next;
|
|
5159
|
-
});
|
|
5160
|
-
} else if (e.key === "ArrowUp") {
|
|
5161
|
-
e.preventDefault();
|
|
5162
|
-
setActiveIndex((prev) => {
|
|
5163
|
-
const next = prev === null ? filteredOptions.length - 1 : prev - 1;
|
|
5164
|
-
return next < 0 ? filteredOptions.length - 1 : next;
|
|
5165
|
-
});
|
|
5166
|
-
} else if (e.key === "Enter") {
|
|
5167
|
-
e.preventDefault();
|
|
5168
|
-
if (activeIndex !== null && filteredOptions[activeIndex]) {
|
|
5169
|
-
handleSelect(filteredOptions[activeIndex]);
|
|
5170
|
-
}
|
|
5171
|
-
} else if (e.key === "Escape") {
|
|
5172
|
-
e.preventDefault();
|
|
5173
|
-
setOpen(false);
|
|
5174
|
-
}
|
|
5175
|
-
},
|
|
5176
|
-
placeholder: searchPlaceholder,
|
|
5177
|
-
className: "w-full rounded-md bg-background/50 py-2 pl-8 pr-3 text-sm border-0 focus:outline-none focus:bg-background/80 transition-colors placeholder:text-muted-foreground/60",
|
|
5178
|
-
"aria-autocomplete": "list",
|
|
5179
|
-
"aria-activedescendant": activeIndex != null ? `combobox-item-${activeIndex}` : void 0
|
|
4947
|
+
const dropdownBody = /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { "data-combobox-dropdown": true, "data-state": open ? "open" : "closed", role: "listbox", id: `${resolvedId}-listbox`, className: "w-full", children: [
|
|
4948
|
+
enableSearch && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "relative p-3 border-b border-border/50 bg-muted/20", children: [
|
|
4949
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react12.Search, { className: "absolute left-6 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground transition-colors" }),
|
|
4950
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4951
|
+
"input",
|
|
4952
|
+
{
|
|
4953
|
+
ref: inputRef,
|
|
4954
|
+
value: query,
|
|
4955
|
+
onChange: (e) => {
|
|
4956
|
+
setQuery(e.target.value);
|
|
4957
|
+
setActiveIndex(null);
|
|
4958
|
+
},
|
|
4959
|
+
onKeyDown: (e) => {
|
|
4960
|
+
if (e.key === "ArrowDown") {
|
|
4961
|
+
e.preventDefault();
|
|
4962
|
+
setActiveIndex((prev) => {
|
|
4963
|
+
const next = prev === null ? 0 : prev + 1;
|
|
4964
|
+
return next >= filteredOptions.length ? 0 : next;
|
|
4965
|
+
});
|
|
4966
|
+
} else if (e.key === "ArrowUp") {
|
|
4967
|
+
e.preventDefault();
|
|
4968
|
+
setActiveIndex((prev) => {
|
|
4969
|
+
const next = prev === null ? filteredOptions.length - 1 : prev - 1;
|
|
4970
|
+
return next < 0 ? filteredOptions.length - 1 : next;
|
|
4971
|
+
});
|
|
4972
|
+
} else if (e.key === "Enter") {
|
|
4973
|
+
e.preventDefault();
|
|
4974
|
+
if (activeIndex !== null && filteredOptions[activeIndex]) {
|
|
4975
|
+
handleSelect(filteredOptions[activeIndex]);
|
|
4976
|
+
}
|
|
4977
|
+
} else if (e.key === "Escape") {
|
|
4978
|
+
e.preventDefault();
|
|
4979
|
+
setOpen(false);
|
|
5180
4980
|
}
|
|
5181
|
-
|
|
5182
|
-
|
|
5183
|
-
|
|
5184
|
-
|
|
5185
|
-
|
|
5186
|
-
|
|
5187
|
-
|
|
5188
|
-
|
|
5189
|
-
|
|
5190
|
-
|
|
5191
|
-
|
|
5192
|
-
|
|
5193
|
-
|
|
5194
|
-
|
|
5195
|
-
|
|
5196
|
-
|
|
5197
|
-
|
|
5198
|
-
|
|
5199
|
-
|
|
5200
|
-
|
|
5201
|
-
|
|
5202
|
-
|
|
5203
|
-
|
|
5204
|
-
|
|
5205
|
-
|
|
5206
|
-
|
|
5207
|
-
|
|
5208
|
-
|
|
5209
|
-
|
|
5210
|
-
|
|
5211
|
-
|
|
5212
|
-
|
|
5213
|
-
|
|
5214
|
-
|
|
5215
|
-
|
|
5216
|
-
|
|
5217
|
-
|
|
5218
|
-
|
|
5219
|
-
|
|
5220
|
-
|
|
5221
|
-
|
|
5222
|
-
|
|
5223
|
-
|
|
5224
|
-
|
|
5225
|
-
|
|
5226
|
-
}
|
|
5227
|
-
|
|
4981
|
+
},
|
|
4982
|
+
placeholder: searchPlaceholder,
|
|
4983
|
+
className: "w-full rounded-xl bg-background/50 py-2 pl-8 pr-3 text-sm border-0 focus:outline-none focus:bg-background/80 transition-colors placeholder:text-muted-foreground/60",
|
|
4984
|
+
"aria-autocomplete": "list",
|
|
4985
|
+
"aria-activedescendant": activeIndex != null ? `combobox-item-${activeIndex}` : void 0
|
|
4986
|
+
}
|
|
4987
|
+
)
|
|
4988
|
+
] }),
|
|
4989
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "max-h-64 overflow-y-auto overscroll-contain", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("ul", { className: "p-1 space-y-1", children: loading2 ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("li", { className: "px-3 py-8 text-center", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex flex-col items-center gap-2 animate-in fade-in-0 zoom-in-95 duration-300", children: [
|
|
4990
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react12.Loader2, { className: "h-6 w-6 animate-spin text-primary" }),
|
|
4991
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "text-sm text-muted-foreground", children: loadingText || "Loading\u2026" })
|
|
4992
|
+
] }) }) : filteredOptions.length > 0 ? filteredOptions.map((item, index) => {
|
|
4993
|
+
const itemValue = getOptionValue(item);
|
|
4994
|
+
const itemLabel = getOptionLabel(item);
|
|
4995
|
+
const isSelected = itemValue === value;
|
|
4996
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
4997
|
+
"li",
|
|
4998
|
+
{
|
|
4999
|
+
ref: (node) => {
|
|
5000
|
+
listRef.current[index] = node;
|
|
5001
|
+
},
|
|
5002
|
+
id: `combobox-item-${index}`,
|
|
5003
|
+
role: "option",
|
|
5004
|
+
tabIndex: -1,
|
|
5005
|
+
"aria-selected": isSelected,
|
|
5006
|
+
onClick: () => handleSelect(item),
|
|
5007
|
+
style: {
|
|
5008
|
+
animationDelay: open ? `${Math.min(index * 20, 200)}ms` : "0ms"
|
|
5009
|
+
},
|
|
5010
|
+
className: cn(
|
|
5011
|
+
"dropdown-item group flex cursor-pointer items-center justify-between rounded-lg px-2.5 py-1.5 text-sm",
|
|
5012
|
+
"outline-none focus:outline-none focus-visible:outline-none",
|
|
5013
|
+
"hover:bg-accent hover:text-accent-foreground",
|
|
5014
|
+
"focus:bg-accent focus:text-accent-foreground",
|
|
5015
|
+
"data-disabled:pointer-events-none data-disabled:opacity-50",
|
|
5016
|
+
index === activeIndex && "bg-accent text-accent-foreground",
|
|
5017
|
+
isSelected && "bg-accent text-accent-foreground"
|
|
5018
|
+
),
|
|
5019
|
+
children: [
|
|
5020
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "truncate", children: itemLabel }),
|
|
5021
|
+
isSelected && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react12.Check, { className: "h-4 w-4 text-primary" })
|
|
5022
|
+
]
|
|
5023
|
+
},
|
|
5024
|
+
`${itemValue}-${index}`
|
|
5025
|
+
);
|
|
5026
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("li", { className: "px-3 py-8 text-center text-muted-foreground text-sm", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex flex-col items-center gap-2 animate-in fade-in-0 zoom-in-95 duration-300", children: [
|
|
5027
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react12.SearchX, { className: "h-8 w-8 opacity-40 text-muted-foreground" }),
|
|
5028
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "text-sm", children: emptyText }),
|
|
5029
|
+
query && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("button", { type: "button", onClick: () => setQuery(""), className: "text-xs text-primary hover:underline", children: "Clear" })
|
|
5030
|
+
] }) }) }) })
|
|
5031
|
+
] });
|
|
5228
5032
|
const sizeStyles8 = {
|
|
5229
5033
|
// Keep consistent with Input size heights
|
|
5230
5034
|
sm: "h-8 py-1.5 text-sm md:h-7 md:text-xs",
|
|
@@ -5232,8 +5036,68 @@ var Combobox = ({
|
|
|
5232
5036
|
lg: "h-12 py-3 text-base"
|
|
5233
5037
|
};
|
|
5234
5038
|
const labelSize = size === "sm" ? "text-xs" : size === "lg" ? "text-base" : "text-sm";
|
|
5235
|
-
const radiusClass = size === "sm" ? "rounded-
|
|
5039
|
+
const radiusClass = size === "sm" ? "rounded-lg" : "rounded-xl";
|
|
5236
5040
|
const verticalGap = size === "sm" ? "space-y-1.5" : "space-y-2";
|
|
5041
|
+
const triggerButtonBaseProps = {
|
|
5042
|
+
ref: triggerRef,
|
|
5043
|
+
type: "button",
|
|
5044
|
+
disabled,
|
|
5045
|
+
role: "combobox",
|
|
5046
|
+
"aria-haspopup": "listbox",
|
|
5047
|
+
"aria-expanded": open,
|
|
5048
|
+
"aria-controls": `${resolvedId}-listbox`,
|
|
5049
|
+
id: resolvedId,
|
|
5050
|
+
"aria-labelledby": labelId,
|
|
5051
|
+
onKeyDown: (e) => {
|
|
5052
|
+
if (disabled) return;
|
|
5053
|
+
if (e.key === "ArrowDown" || e.key === "Enter" || e.key === " ") {
|
|
5054
|
+
e.preventDefault();
|
|
5055
|
+
setOpen(true);
|
|
5056
|
+
} else if (e.key === "Escape") {
|
|
5057
|
+
e.preventDefault();
|
|
5058
|
+
setOpen(false);
|
|
5059
|
+
}
|
|
5060
|
+
},
|
|
5061
|
+
className: cn(
|
|
5062
|
+
"flex w-full items-center justify-between border border-input bg-background px-3",
|
|
5063
|
+
radiusClass,
|
|
5064
|
+
sizeStyles8[size],
|
|
5065
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
|
|
5066
|
+
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
5067
|
+
"hover:bg-accent/5 transition-colors hover:border-primary/40 focus:border-primary",
|
|
5068
|
+
className
|
|
5069
|
+
)
|
|
5070
|
+
};
|
|
5071
|
+
const triggerContents = /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_jsx_runtime25.Fragment, { children: [
|
|
5072
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: cn("truncate", !displayValue && "text-muted-foreground", fontBold && "font-bold"), children: displayValue || placeholder }),
|
|
5073
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex items-center gap-1 ml-2", children: [
|
|
5074
|
+
allowClear && value && !disabled && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
5075
|
+
"div",
|
|
5076
|
+
{
|
|
5077
|
+
role: "button",
|
|
5078
|
+
tabIndex: 0,
|
|
5079
|
+
"aria-label": "Clear selection",
|
|
5080
|
+
onClick: handleClear,
|
|
5081
|
+
onKeyDown: (e) => (e.key === "Enter" || e.key === " ") && handleClear(e),
|
|
5082
|
+
className: "opacity-0 group-hover:opacity-100 transition-opacity p-0.5 rounded-md hover:bg-destructive/10 text-muted-foreground hover:text-destructive",
|
|
5083
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react12.X, { className: "h-3 w-3" })
|
|
5084
|
+
}
|
|
5085
|
+
),
|
|
5086
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react12.ChevronDown, { className: cn("h-4 w-4 text-muted-foreground transition-all duration-200", open && "rotate-180 scale-110 text-primary") })
|
|
5087
|
+
] })
|
|
5088
|
+
] });
|
|
5089
|
+
const triggerButtonForPopover = /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("button", { ...triggerButtonBaseProps, children: triggerContents });
|
|
5090
|
+
const triggerButtonInline = /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
5091
|
+
"button",
|
|
5092
|
+
{
|
|
5093
|
+
...triggerButtonBaseProps,
|
|
5094
|
+
onClick: () => {
|
|
5095
|
+
if (disabled) return;
|
|
5096
|
+
setOpen((prev) => !prev);
|
|
5097
|
+
},
|
|
5098
|
+
children: triggerContents
|
|
5099
|
+
}
|
|
5100
|
+
);
|
|
5237
5101
|
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: cn("w-full group", verticalGap), children: [
|
|
5238
5102
|
label && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "flex items-center justify-between", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
5239
5103
|
"label",
|
|
@@ -5252,57 +5116,22 @@ var Combobox = ({
|
|
|
5252
5116
|
]
|
|
5253
5117
|
}
|
|
5254
5118
|
) }),
|
|
5255
|
-
/* @__PURE__ */ (0, import_jsx_runtime25.
|
|
5256
|
-
|
|
5119
|
+
usePortal ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
5120
|
+
Popover,
|
|
5257
5121
|
{
|
|
5258
|
-
|
|
5259
|
-
|
|
5260
|
-
|
|
5261
|
-
|
|
5262
|
-
|
|
5263
|
-
"
|
|
5264
|
-
"
|
|
5265
|
-
|
|
5266
|
-
"aria-labelledby": labelId,
|
|
5267
|
-
onClick: () => {
|
|
5268
|
-
const next = !open;
|
|
5269
|
-
if (next) {
|
|
5270
|
-
const pos = calculatePosition();
|
|
5271
|
-
if (pos) setDropdownPosition(pos);
|
|
5272
|
-
}
|
|
5273
|
-
setOpen(next);
|
|
5274
|
-
},
|
|
5275
|
-
className: cn(
|
|
5276
|
-
"flex w-full items-center justify-between border border-input bg-background px-3",
|
|
5277
|
-
radiusClass,
|
|
5278
|
-
sizeStyles8[size],
|
|
5279
|
-
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
|
|
5280
|
-
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
5281
|
-
"hover:bg-accent/5 transition-colors hover:border-primary/40 focus:border-primary",
|
|
5282
|
-
className
|
|
5283
|
-
),
|
|
5284
|
-
children: [
|
|
5285
|
-
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: cn("truncate", !displayValue && "text-muted-foreground", fontBold && "font-bold"), children: displayValue || placeholder }),
|
|
5286
|
-
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex items-center gap-1 ml-2", children: [
|
|
5287
|
-
allowClear && value && !disabled && // FIX: Use a div instead of a nested button
|
|
5288
|
-
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
5289
|
-
"div",
|
|
5290
|
-
{
|
|
5291
|
-
role: "button",
|
|
5292
|
-
tabIndex: 0,
|
|
5293
|
-
"aria-label": "Clear selection",
|
|
5294
|
-
onClick: handleClear,
|
|
5295
|
-
onKeyDown: (e) => (e.key === "Enter" || e.key === " ") && handleClear(e),
|
|
5296
|
-
className: "opacity-0 group-hover:opacity-100 transition-opacity p-0.5 rounded hover:bg-destructive/10 text-muted-foreground hover:text-destructive",
|
|
5297
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react12.X, { className: "h-3 w-3" })
|
|
5298
|
-
}
|
|
5299
|
-
),
|
|
5300
|
-
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react12.ChevronDown, { className: cn("h-4 w-4 text-muted-foreground transition-all duration-200", open && "rotate-180 scale-110 text-primary") })
|
|
5301
|
-
] })
|
|
5302
|
-
]
|
|
5122
|
+
open,
|
|
5123
|
+
onOpenChange: setOpen,
|
|
5124
|
+
trigger: triggerButtonForPopover,
|
|
5125
|
+
placement: "bottom-start",
|
|
5126
|
+
matchTriggerWidth: true,
|
|
5127
|
+
className: "z-9999",
|
|
5128
|
+
contentClassName: "p-0",
|
|
5129
|
+
children: dropdownBody
|
|
5303
5130
|
}
|
|
5304
|
-
),
|
|
5305
|
-
|
|
5131
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "relative", children: [
|
|
5132
|
+
triggerButtonInline,
|
|
5133
|
+
open && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "absolute left-0 top-full mt-1 z-50 w-full", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "rounded-xl border bg-popover text-popover-foreground shadow-md backdrop-blur-sm bg-popover/95 border-border/60", children: dropdownBody }) })
|
|
5134
|
+
] })
|
|
5306
5135
|
] });
|
|
5307
5136
|
};
|
|
5308
5137
|
|
|
@@ -5401,7 +5230,7 @@ var Pagination = ({
|
|
|
5401
5230
|
disabled: disabled || page === 1,
|
|
5402
5231
|
className: cn(
|
|
5403
5232
|
sizeClass.btn,
|
|
5404
|
-
"p-0 rounded transition-colors hidden sm:flex items-center justify-center",
|
|
5233
|
+
"p-0 rounded-lg transition-colors hidden sm:flex items-center justify-center",
|
|
5405
5234
|
disabled || page === 1 ? "opacity-40 cursor-not-allowed" : "hover:bg-accent hover:text-accent-foreground"
|
|
5406
5235
|
),
|
|
5407
5236
|
title: labels?.firstPage || t("firstPage"),
|
|
@@ -5416,7 +5245,7 @@ var Pagination = ({
|
|
|
5416
5245
|
disabled: disabled || page === 1,
|
|
5417
5246
|
className: cn(
|
|
5418
5247
|
sizeClass.btn,
|
|
5419
|
-
"p-0 rounded transition-colors flex items-center justify-center",
|
|
5248
|
+
"p-0 rounded-lg transition-colors flex items-center justify-center",
|
|
5420
5249
|
disabled || page === 1 ? "opacity-40 cursor-not-allowed" : "hover:bg-accent hover:text-accent-foreground"
|
|
5421
5250
|
),
|
|
5422
5251
|
title: labels?.previousPage || t("previousPage"),
|
|
@@ -5432,7 +5261,7 @@ var Pagination = ({
|
|
|
5432
5261
|
disabled,
|
|
5433
5262
|
className: cn(
|
|
5434
5263
|
sizeClass.page,
|
|
5435
|
-
"rounded font-medium transition-colors",
|
|
5264
|
+
"rounded-lg font-medium transition-colors",
|
|
5436
5265
|
page === p ? "bg-primary text-primary-foreground" : "hover:bg-accent hover:text-accent-foreground",
|
|
5437
5266
|
disabled && "opacity-40 cursor-not-allowed"
|
|
5438
5267
|
),
|
|
@@ -5450,7 +5279,7 @@ var Pagination = ({
|
|
|
5450
5279
|
disabled: disabled || page === totalPages,
|
|
5451
5280
|
className: cn(
|
|
5452
5281
|
sizeClass.btn,
|
|
5453
|
-
"p-0 rounded transition-colors flex items-center justify-center",
|
|
5282
|
+
"p-0 rounded-lg transition-colors flex items-center justify-center",
|
|
5454
5283
|
disabled || page === totalPages ? "opacity-40 cursor-not-allowed" : "hover:bg-accent hover:text-accent-foreground"
|
|
5455
5284
|
),
|
|
5456
5285
|
title: labels?.nextPage || t("nextPage"),
|
|
@@ -5465,7 +5294,7 @@ var Pagination = ({
|
|
|
5465
5294
|
disabled: disabled || page === totalPages,
|
|
5466
5295
|
className: cn(
|
|
5467
5296
|
sizeClass.btn,
|
|
5468
|
-
"p-0 rounded transition-colors hidden sm:flex items-center justify-center",
|
|
5297
|
+
"p-0 rounded-lg transition-colors hidden sm:flex items-center justify-center",
|
|
5469
5298
|
disabled || page === totalPages ? "opacity-40 cursor-not-allowed" : "hover:bg-accent hover:text-accent-foreground"
|
|
5470
5299
|
),
|
|
5471
5300
|
title: labels?.lastPage || t("lastPage"),
|
|
@@ -5525,7 +5354,7 @@ var SimplePagination = ({
|
|
|
5525
5354
|
disabled: disabled || page === 1,
|
|
5526
5355
|
className: cn(
|
|
5527
5356
|
sizeClass.btn,
|
|
5528
|
-
"p-0 rounded transition-colors flex items-center justify-center",
|
|
5357
|
+
"p-0 rounded-lg transition-colors flex items-center justify-center",
|
|
5529
5358
|
disabled || page === 1 ? "opacity-40 cursor-not-allowed" : "hover:bg-accent hover:text-accent-foreground"
|
|
5530
5359
|
),
|
|
5531
5360
|
"aria-label": "Previous page",
|
|
@@ -5544,7 +5373,7 @@ var SimplePagination = ({
|
|
|
5544
5373
|
disabled: disabled || page === totalPages,
|
|
5545
5374
|
className: cn(
|
|
5546
5375
|
sizeClass.btn,
|
|
5547
|
-
"p-0 rounded transition-colors flex items-center justify-center",
|
|
5376
|
+
"p-0 rounded-lg transition-colors flex items-center justify-center",
|
|
5548
5377
|
disabled || page === totalPages ? "opacity-40 cursor-not-allowed" : "hover:bg-accent hover:text-accent-foreground"
|
|
5549
5378
|
),
|
|
5550
5379
|
"aria-label": "Next page",
|
|
@@ -5564,7 +5393,7 @@ var CompactPagination = ({ page, totalPages, onChange, className, disabled = fal
|
|
|
5564
5393
|
onClick: () => onChange(1),
|
|
5565
5394
|
disabled: disabled || page === 1,
|
|
5566
5395
|
className: cn(
|
|
5567
|
-
"h-6 w-6 p-0 rounded transition-colors flex items-center justify-center",
|
|
5396
|
+
"h-6 w-6 p-0 rounded-lg transition-colors flex items-center justify-center",
|
|
5568
5397
|
disabled || page === 1 ? "opacity-40 cursor-not-allowed" : "hover:bg-accent hover:text-accent-foreground"
|
|
5569
5398
|
),
|
|
5570
5399
|
title: "First page",
|
|
@@ -5578,7 +5407,7 @@ var CompactPagination = ({ page, totalPages, onChange, className, disabled = fal
|
|
|
5578
5407
|
onClick: () => onChange(Math.max(1, page - 1)),
|
|
5579
5408
|
disabled: disabled || page === 1,
|
|
5580
5409
|
className: cn(
|
|
5581
|
-
"h-6 w-6 p-0 rounded transition-colors flex items-center justify-center",
|
|
5410
|
+
"h-6 w-6 p-0 rounded-lg transition-colors flex items-center justify-center",
|
|
5582
5411
|
disabled || page === 1 ? "opacity-40 cursor-not-allowed" : "hover:bg-accent hover:text-accent-foreground"
|
|
5583
5412
|
),
|
|
5584
5413
|
title: "Previous page",
|
|
@@ -5597,7 +5426,7 @@ var CompactPagination = ({ page, totalPages, onChange, className, disabled = fal
|
|
|
5597
5426
|
onClick: () => onChange(Math.min(totalPages, page + 1)),
|
|
5598
5427
|
disabled: disabled || page === totalPages,
|
|
5599
5428
|
className: cn(
|
|
5600
|
-
"h-6 w-6 p-0 rounded transition-colors flex items-center justify-center",
|
|
5429
|
+
"h-6 w-6 p-0 rounded-lg transition-colors flex items-center justify-center",
|
|
5601
5430
|
disabled || page === totalPages ? "opacity-40 cursor-not-allowed" : "hover:bg-accent hover:text-accent-foreground"
|
|
5602
5431
|
),
|
|
5603
5432
|
title: "Next page",
|
|
@@ -5611,7 +5440,7 @@ var CompactPagination = ({ page, totalPages, onChange, className, disabled = fal
|
|
|
5611
5440
|
onClick: () => onChange(totalPages),
|
|
5612
5441
|
disabled: disabled || page === totalPages,
|
|
5613
5442
|
className: cn(
|
|
5614
|
-
"h-6 w-6 p-0 rounded transition-colors flex items-center justify-center",
|
|
5443
|
+
"h-6 w-6 p-0 rounded-lg transition-colors flex items-center justify-center",
|
|
5615
5444
|
disabled || page === totalPages ? "opacity-40 cursor-not-allowed" : "hover:bg-accent hover:text-accent-foreground"
|
|
5616
5445
|
),
|
|
5617
5446
|
title: "Last page",
|
|
@@ -5682,7 +5511,7 @@ var Section = import_react13.default.forwardRef(
|
|
|
5682
5511
|
variant === "gradient" ? getGradientClasses() : variantClasses2[variant],
|
|
5683
5512
|
spacingClasses[spacing],
|
|
5684
5513
|
paddingXClasses[paddingX],
|
|
5685
|
-
outlined && "rounded-
|
|
5514
|
+
outlined && "rounded-2xl md:rounded-3xl border border-border/60",
|
|
5686
5515
|
contained && "container mx-auto",
|
|
5687
5516
|
className
|
|
5688
5517
|
),
|
|
@@ -5710,7 +5539,7 @@ var ScrollArea = (0, import_react14.forwardRef)(
|
|
|
5710
5539
|
"div",
|
|
5711
5540
|
{
|
|
5712
5541
|
ref,
|
|
5713
|
-
className: cn("relative overflow-hidden", variantClasses[variant], outlined && "rounded-
|
|
5542
|
+
className: cn("relative overflow-hidden", variantClasses[variant], outlined && "rounded-xl border border-border/60", className),
|
|
5714
5543
|
...props,
|
|
5715
5544
|
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: cn("h-full w-full overflow-y-auto scroll-area-viewport", contentClassName), children })
|
|
5716
5545
|
}
|
|
@@ -5862,7 +5691,7 @@ var DatePicker = ({
|
|
|
5862
5691
|
"datepicker-day rounded-lg focus:outline-none relative",
|
|
5863
5692
|
"transition-all duration-200 font-medium",
|
|
5864
5693
|
isPastDate && "opacity-30 cursor-not-allowed text-muted-foreground",
|
|
5865
|
-
isSelected ? "bg-
|
|
5694
|
+
isSelected ? "bg-linear-to-br from-primary to-primary/80 text-primary-foreground font-bold shadow-lg shadow-primary/30 scale-110 z-10 hover:from-primary hover:to-primary/70" : !isPastDate && "hover:bg-accent/80 hover:text-accent-foreground hover:scale-105 focus:bg-accent focus:text-accent-foreground",
|
|
5866
5695
|
isToday2 && !isSelected && "bg-primary/15 text-primary font-bold ring-2 ring-primary/30"
|
|
5867
5696
|
),
|
|
5868
5697
|
children: [
|
|
@@ -5937,7 +5766,7 @@ var DatePicker = ({
|
|
|
5937
5766
|
},
|
|
5938
5767
|
className: cn(
|
|
5939
5768
|
"flex-1 px-3 py-2 text-xs font-semibold rounded-xl",
|
|
5940
|
-
"bg-
|
|
5769
|
+
"bg-linear-to-r from-primary/10 to-primary/5 border border-primary/30",
|
|
5941
5770
|
"text-primary hover:from-primary/20 hover:to-primary/10 hover:border-primary/50",
|
|
5942
5771
|
"transition-all duration-300 flex items-center justify-center gap-2",
|
|
5943
5772
|
"hover:scale-[1.02] active:scale-[0.98] hover:shadow-md hover:shadow-primary/10"
|
|
@@ -5959,7 +5788,7 @@ var DatePicker = ({
|
|
|
5959
5788
|
},
|
|
5960
5789
|
className: cn(
|
|
5961
5790
|
"flex-1 px-3 py-2 text-xs font-semibold rounded-xl",
|
|
5962
|
-
"bg-
|
|
5791
|
+
"bg-linear-to-r from-destructive/10 to-destructive/5 border border-destructive/30",
|
|
5963
5792
|
"text-destructive hover:from-destructive/20 hover:to-destructive/10 hover:border-destructive/50",
|
|
5964
5793
|
"transition-all duration-300 flex items-center justify-center gap-2",
|
|
5965
5794
|
"hover:scale-[1.02] active:scale-[0.98] hover:shadow-md hover:shadow-destructive/10"
|
|
@@ -6219,7 +6048,7 @@ var DateRangePicker = ({ startDate, endDate, onChange, placeholder = "Select dat
|
|
|
6219
6048
|
!isPastDate && !isInRange && !isRangeStart && !isRangeEnd && "hover:bg-accent/80 hover:text-accent-foreground hover:scale-105 rounded-lg",
|
|
6220
6049
|
// Range selection styling - smooth continuous background with gradient
|
|
6221
6050
|
isInRange && "bg-primary/15 text-foreground",
|
|
6222
|
-
(isRangeStart || isRangeEnd) && "bg-
|
|
6051
|
+
(isRangeStart || isRangeEnd) && "bg-linear-to-br from-primary to-primary/80 text-primary-foreground hover:from-primary hover:to-primary/70 shadow-lg shadow-primary/25",
|
|
6223
6052
|
// Only round the actual start and end of the range
|
|
6224
6053
|
isRangeStart && !isRangeEnd && "rounded-l-lg rounded-r-none",
|
|
6225
6054
|
isRangeEnd && !isRangeStart && "rounded-r-lg rounded-l-none",
|
|
@@ -6505,17 +6334,20 @@ function Calendar2({
|
|
|
6505
6334
|
}
|
|
6506
6335
|
}
|
|
6507
6336
|
};
|
|
6508
|
-
const isDateDisabled = React24.useCallback(
|
|
6509
|
-
|
|
6510
|
-
|
|
6511
|
-
|
|
6512
|
-
|
|
6513
|
-
|
|
6514
|
-
|
|
6515
|
-
|
|
6516
|
-
|
|
6517
|
-
|
|
6518
|
-
|
|
6337
|
+
const isDateDisabled = React24.useCallback(
|
|
6338
|
+
(d) => {
|
|
6339
|
+
if (minDate && d < new Date(minDate.getFullYear(), minDate.getMonth(), minDate.getDate())) return true;
|
|
6340
|
+
if (maxDate && d > new Date(maxDate.getFullYear(), maxDate.getMonth(), maxDate.getDate())) return true;
|
|
6341
|
+
if (Array.isArray(disabledDates)) {
|
|
6342
|
+
return disabledDates.some((dd) => isSameDay(dd, d));
|
|
6343
|
+
}
|
|
6344
|
+
if (typeof disabledDates === "function") {
|
|
6345
|
+
return disabledDates(d);
|
|
6346
|
+
}
|
|
6347
|
+
return false;
|
|
6348
|
+
},
|
|
6349
|
+
[minDate, maxDate, disabledDates]
|
|
6350
|
+
);
|
|
6519
6351
|
const SIZE_STYLES3 = {
|
|
6520
6352
|
sm: { day: "w-8 h-8 text-[12px]", grid: dense ? "gap-0.5" : "gap-1", head: "text-[11px]", header: "text-sm" },
|
|
6521
6353
|
md: { day: "w-9 h-9 text-sm", grid: dense ? "gap-1" : "gap-1.5", head: "text-xs", header: "text-sm" },
|
|
@@ -6524,9 +6356,9 @@ function Calendar2({
|
|
|
6524
6356
|
};
|
|
6525
6357
|
const sz = SIZE_STYLES3[size];
|
|
6526
6358
|
const VARIANT_STYLES2 = {
|
|
6527
|
-
default: "border border-border rounded-
|
|
6528
|
-
bordered: "border-2 border-border rounded-
|
|
6529
|
-
card: "border border-border rounded-
|
|
6359
|
+
default: "border border-border rounded-2xl bg-card",
|
|
6360
|
+
bordered: "border-2 border-border rounded-2xl bg-card shadow-sm",
|
|
6361
|
+
card: "border border-border rounded-3xl bg-card shadow-lg",
|
|
6530
6362
|
minimal: "bg-transparent"
|
|
6531
6363
|
};
|
|
6532
6364
|
const weekDays = React24.useMemo(() => {
|
|
@@ -6552,7 +6384,7 @@ function Calendar2({
|
|
|
6552
6384
|
onClick: () => handleClickDay(d),
|
|
6553
6385
|
disabled,
|
|
6554
6386
|
className: cn(
|
|
6555
|
-
"rounded-
|
|
6387
|
+
"rounded-lg flex items-center justify-center relative",
|
|
6556
6388
|
sz.day,
|
|
6557
6389
|
!inMonth && "text-muted-foreground/60",
|
|
6558
6390
|
disabled && "opacity-40 cursor-not-allowed",
|
|
@@ -6595,9 +6427,27 @@ function Calendar2({
|
|
|
6595
6427
|
}, [display, view, weekStartsOn, maxBound]);
|
|
6596
6428
|
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: cn("w-full", className), ...rest, children: [
|
|
6597
6429
|
showHeader && /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex items-center justify-between mb-2", children: [
|
|
6598
|
-
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
6430
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
6431
|
+
"button",
|
|
6432
|
+
{
|
|
6433
|
+
onClick: () => goByView(-1),
|
|
6434
|
+
disabled: prevDisabled,
|
|
6435
|
+
className: cn("p-1 rounded-lg hover:bg-accent", prevDisabled && "opacity-40 cursor-not-allowed hover:bg-transparent"),
|
|
6436
|
+
"aria-label": labels?.prev || (display === "week" ? "Previous week" : "Previous month"),
|
|
6437
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react15.ChevronLeft, { className: "h-4 w-4" })
|
|
6438
|
+
}
|
|
6439
|
+
),
|
|
6599
6440
|
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "text-sm font-semibold", children: display === "week" ? `${labels?.month ? labels.month(weekDays[0]) : weekDays[0].toLocaleDateString("en-US", { month: "short" })} ${weekDays[0].getDate()} \u2013 ${labels?.month ? labels.month(weekDays[6]) : weekDays[6].toLocaleDateString("en-US", { month: "short" })} ${weekDays[6].getDate()}` : labels?.month ? labels.month(view) : view.toLocaleDateString("en-US", { month: "long", year: "numeric" }) }),
|
|
6600
|
-
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
6441
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
6442
|
+
"button",
|
|
6443
|
+
{
|
|
6444
|
+
onClick: () => goByView(1),
|
|
6445
|
+
disabled: nextDisabled,
|
|
6446
|
+
className: cn("p-1 rounded-lg hover:bg-accent", nextDisabled && "opacity-40 cursor-not-allowed hover:bg-transparent"),
|
|
6447
|
+
"aria-label": labels?.next || (display === "week" ? "Next week" : "Next month"),
|
|
6448
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react15.ChevronRight, { className: "h-4 w-4" })
|
|
6449
|
+
}
|
|
6450
|
+
)
|
|
6601
6451
|
] }),
|
|
6602
6452
|
display === "week" ? /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_jsx_runtime30.Fragment, { children: [
|
|
6603
6453
|
showWeekdays && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: cn("grid grid-cols-7", sz.grid, "mb-1 text-center text-muted-foreground font-medium"), children: weekdays.map((w) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: cn(sz.head), children: w }, `w-${w}`)) }),
|
|
@@ -6614,7 +6464,7 @@ function Calendar2({
|
|
|
6614
6464
|
onClick: () => handleClickDay(d),
|
|
6615
6465
|
disabled,
|
|
6616
6466
|
className: cn(
|
|
6617
|
-
"rounded-
|
|
6467
|
+
"rounded-lg flex items-center justify-center relative",
|
|
6618
6468
|
sz.day,
|
|
6619
6469
|
disabled && "opacity-40 cursor-not-allowed",
|
|
6620
6470
|
isToday2 && !selectedDay && "ring-1 ring-primary/50",
|
|
@@ -6750,12 +6600,12 @@ function WheelColumn({
|
|
|
6750
6600
|
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
6751
6601
|
"div",
|
|
6752
6602
|
{
|
|
6753
|
-
className: "pointer-events-none absolute inset-x-2 top-1/2 -translate-y-1/2 rounded-lg bg-
|
|
6603
|
+
className: "pointer-events-none absolute inset-x-2 top-1/2 -translate-y-1/2 rounded-lg bg-linear-to-r from-primary/20 via-primary/15 to-primary/20 border border-primary/30 shadow-sm shadow-primary/10",
|
|
6754
6604
|
style: { height: itemHeight }
|
|
6755
6605
|
}
|
|
6756
6606
|
),
|
|
6757
|
-
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "pointer-events-none absolute inset-x-0 top-0 h-12 bg-
|
|
6758
|
-
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "pointer-events-none absolute inset-x-0 bottom-0 h-12 bg-
|
|
6607
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "pointer-events-none absolute inset-x-0 top-0 h-12 bg-linear-to-b from-background/95 via-background/60 to-transparent z-10" }),
|
|
6608
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "pointer-events-none absolute inset-x-0 bottom-0 h-12 bg-linear-to-t from-background/95 via-background/60 to-transparent z-10" }),
|
|
6759
6609
|
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
6760
6610
|
"div",
|
|
6761
6611
|
{
|
|
@@ -7103,7 +6953,7 @@ function TimePicker({
|
|
|
7103
6953
|
emit(next);
|
|
7104
6954
|
};
|
|
7105
6955
|
const timePickerContent = /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "space-y-4", children: [
|
|
7106
|
-
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "flex items-center justify-center py-2 px-3 rounded-xl bg-
|
|
6956
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "flex items-center justify-center py-2 px-3 rounded-xl bg-linear-to-r from-primary/10 via-primary/5 to-primary/10 border border-primary/20", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "text-2xl font-bold tabular-nums tracking-wide text-foreground", children: display }) }),
|
|
7107
6957
|
allowManualInput && /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "relative", children: [
|
|
7108
6958
|
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
7109
6959
|
Input_default,
|
|
@@ -7126,7 +6976,7 @@ function TimePicker({
|
|
|
7126
6976
|
type: "button",
|
|
7127
6977
|
className: cn(
|
|
7128
6978
|
"group relative px-3 py-2.5 text-xs font-medium rounded-xl border border-border/50 overflow-hidden",
|
|
7129
|
-
"bg-
|
|
6979
|
+
"bg-linear-to-br from-background to-muted/30",
|
|
7130
6980
|
"hover:border-primary/40 hover:shadow-md transition-all duration-300",
|
|
7131
6981
|
animate && "hover:scale-[1.02] active:scale-[0.98]"
|
|
7132
6982
|
),
|
|
@@ -7136,7 +6986,7 @@ function TimePicker({
|
|
|
7136
6986
|
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
7137
6987
|
"div",
|
|
7138
6988
|
{
|
|
7139
|
-
className: cn("absolute inset-0 opacity-0 group-hover:opacity-100 transition-opacity duration-300", "bg-
|
|
6989
|
+
className: cn("absolute inset-0 opacity-0 group-hover:opacity-100 transition-opacity duration-300", "bg-linear-to-r", color),
|
|
7140
6990
|
style: { opacity: 0.08 }
|
|
7141
6991
|
}
|
|
7142
6992
|
),
|
|
@@ -7155,7 +7005,7 @@ function TimePicker({
|
|
|
7155
7005
|
type: "button",
|
|
7156
7006
|
className: cn(
|
|
7157
7007
|
"px-3 py-2.5 text-xs font-medium rounded-xl border border-border/50",
|
|
7158
|
-
"bg-
|
|
7008
|
+
"bg-linear-to-br from-background to-muted/30",
|
|
7159
7009
|
"hover:border-primary/40 hover:bg-primary/5 hover:shadow-md transition-all duration-300",
|
|
7160
7010
|
animate && "hover:scale-[1.02] active:scale-[0.98]"
|
|
7161
7011
|
),
|
|
@@ -7264,7 +7114,7 @@ function TimePicker({
|
|
|
7264
7114
|
className: cn(
|
|
7265
7115
|
"relative px-4 py-3 rounded-lg transition-all duration-300 text-sm font-bold overflow-hidden",
|
|
7266
7116
|
"focus-visible:ring-2 focus-visible:ring-primary/50 focus-visible:ring-offset-1",
|
|
7267
|
-
isSelected && "bg-
|
|
7117
|
+
isSelected && "bg-linear-to-r from-primary to-primary/80 text-primary-foreground shadow-lg shadow-primary/25",
|
|
7268
7118
|
!isSelected && "text-muted-foreground hover:text-foreground hover:bg-muted/50",
|
|
7269
7119
|
animate && "hover:scale-[1.02] active:scale-[0.98]"
|
|
7270
7120
|
),
|
|
@@ -7278,7 +7128,7 @@ function TimePicker({
|
|
|
7278
7128
|
emit(next);
|
|
7279
7129
|
},
|
|
7280
7130
|
children: [
|
|
7281
|
-
isSelected && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "absolute inset-0 bg-
|
|
7131
|
+
isSelected && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "absolute inset-0 bg-linear-to-tr from-white/20 to-transparent" }),
|
|
7282
7132
|
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "relative", children: p })
|
|
7283
7133
|
]
|
|
7284
7134
|
},
|
|
@@ -7296,7 +7146,7 @@ function TimePicker({
|
|
|
7296
7146
|
type: "button",
|
|
7297
7147
|
className: cn(
|
|
7298
7148
|
"flex-1 px-4 py-2.5 text-xs font-semibold rounded-xl",
|
|
7299
|
-
"bg-
|
|
7149
|
+
"bg-linear-to-r from-primary/10 to-primary/5 border border-primary/30",
|
|
7300
7150
|
"text-primary hover:from-primary/20 hover:to-primary/10 hover:border-primary/50",
|
|
7301
7151
|
"transition-all duration-300 flex items-center justify-center gap-2",
|
|
7302
7152
|
animate && "hover:scale-[1.02] active:scale-[0.98] hover:shadow-md hover:shadow-primary/10"
|
|
@@ -7318,7 +7168,7 @@ function TimePicker({
|
|
|
7318
7168
|
type: "button",
|
|
7319
7169
|
className: cn(
|
|
7320
7170
|
"flex-1 px-4 py-2.5 text-xs font-semibold rounded-xl",
|
|
7321
|
-
"bg-
|
|
7171
|
+
"bg-linear-to-r from-destructive/10 to-destructive/5 border border-destructive/30",
|
|
7322
7172
|
"text-destructive hover:from-destructive/20 hover:to-destructive/10 hover:border-destructive/50",
|
|
7323
7173
|
"transition-all duration-300 flex items-center justify-center gap-2",
|
|
7324
7174
|
animate && "hover:scale-[1.02] active:scale-[0.98] hover:shadow-md hover:shadow-destructive/10"
|
|
@@ -7526,7 +7376,7 @@ var DateTimePicker = ({
|
|
|
7526
7376
|
type: "button",
|
|
7527
7377
|
disabled,
|
|
7528
7378
|
className: cn(
|
|
7529
|
-
"flex w-full items-center justify-between rounded-
|
|
7379
|
+
"flex w-full items-center justify-between rounded-xl border border-input bg-background px-3 py-2 text-sm",
|
|
7530
7380
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
7531
7381
|
disabled && "opacity-50 cursor-not-allowed",
|
|
7532
7382
|
!displayValue && "text-muted-foreground"
|
|
@@ -7543,7 +7393,7 @@ var DateTimePicker = ({
|
|
|
7543
7393
|
e.stopPropagation();
|
|
7544
7394
|
onChange(void 0);
|
|
7545
7395
|
},
|
|
7546
|
-
className: "hover:text-foreground p-0.5 rounded-
|
|
7396
|
+
className: "hover:text-foreground p-0.5 rounded-md hover:bg-accent",
|
|
7547
7397
|
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_lucide_react17.X, { className: "h-4 w-4" })
|
|
7548
7398
|
}
|
|
7549
7399
|
),
|
|
@@ -7553,7 +7403,7 @@ var DateTimePicker = ({
|
|
|
7553
7403
|
}
|
|
7554
7404
|
),
|
|
7555
7405
|
contentClassName: cn(
|
|
7556
|
-
"w-auto p-0",
|
|
7406
|
+
"w-auto p-0 rounded-2xl",
|
|
7557
7407
|
// Keep the popover usable on small viewports
|
|
7558
7408
|
"max-w-[calc(100vw-1rem)] max-h-[calc(100vh-6rem)] overflow-auto"
|
|
7559
7409
|
),
|
|
@@ -7609,7 +7459,6 @@ var DateTimePicker = ({
|
|
|
7609
7459
|
// ../../components/ui/MultiCombobox.tsx
|
|
7610
7460
|
var React27 = __toESM(require("react"), 1);
|
|
7611
7461
|
var import_react16 = require("react");
|
|
7612
|
-
var import_react_dom7 = require("react-dom");
|
|
7613
7462
|
var import_lucide_react18 = require("lucide-react");
|
|
7614
7463
|
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
7615
7464
|
var MultiCombobox = ({
|
|
@@ -7638,56 +7487,8 @@ var MultiCombobox = ({
|
|
|
7638
7487
|
const [activeIndex, setActiveIndex] = React27.useState(null);
|
|
7639
7488
|
const inputRef = React27.useRef(null);
|
|
7640
7489
|
const listRef = React27.useRef([]);
|
|
7641
|
-
const [dropdownPosition, setDropdownPosition] = React27.useState(null);
|
|
7642
7490
|
const triggerRef = React27.useRef(null);
|
|
7643
|
-
const dropdownRef = React27.useRef(null);
|
|
7644
7491
|
useShadCNAnimations();
|
|
7645
|
-
const calculatePosition = React27.useCallback(() => {
|
|
7646
|
-
if (!triggerRef.current) return null;
|
|
7647
|
-
const rect = triggerRef.current.getBoundingClientRect();
|
|
7648
|
-
const scrollTop = window.pageYOffset || document.documentElement.scrollTop;
|
|
7649
|
-
const scrollLeft = window.pageXOffset || document.documentElement.scrollLeft;
|
|
7650
|
-
return {
|
|
7651
|
-
top: rect.bottom + scrollTop + 4,
|
|
7652
|
-
left: rect.left + scrollLeft,
|
|
7653
|
-
width: rect.width
|
|
7654
|
-
};
|
|
7655
|
-
}, []);
|
|
7656
|
-
React27.useEffect(() => {
|
|
7657
|
-
if (!open) return;
|
|
7658
|
-
const handler = () => {
|
|
7659
|
-
const pos = calculatePosition();
|
|
7660
|
-
if (pos) setDropdownPosition(pos);
|
|
7661
|
-
};
|
|
7662
|
-
window.addEventListener("resize", handler);
|
|
7663
|
-
window.addEventListener("scroll", handler, true);
|
|
7664
|
-
return () => {
|
|
7665
|
-
window.removeEventListener("resize", handler);
|
|
7666
|
-
window.removeEventListener("scroll", handler, true);
|
|
7667
|
-
};
|
|
7668
|
-
}, [open, calculatePosition]);
|
|
7669
|
-
React27.useEffect(() => {
|
|
7670
|
-
if (!open) return;
|
|
7671
|
-
const handleClickOutside = (event) => {
|
|
7672
|
-
const target = event.target;
|
|
7673
|
-
const triggerEl = triggerRef.current;
|
|
7674
|
-
const dropdownEl = dropdownRef.current;
|
|
7675
|
-
if (triggerEl && !triggerEl.contains(target) && dropdownEl && !dropdownEl.contains(target)) {
|
|
7676
|
-
setOpen(false);
|
|
7677
|
-
}
|
|
7678
|
-
};
|
|
7679
|
-
const handleEscape = (event) => {
|
|
7680
|
-
if (event.key === "Escape") {
|
|
7681
|
-
setOpen(false);
|
|
7682
|
-
}
|
|
7683
|
-
};
|
|
7684
|
-
document.addEventListener("mousedown", handleClickOutside);
|
|
7685
|
-
document.addEventListener("keydown", handleEscape);
|
|
7686
|
-
return () => {
|
|
7687
|
-
document.removeEventListener("mousedown", handleClickOutside);
|
|
7688
|
-
document.removeEventListener("keydown", handleEscape);
|
|
7689
|
-
};
|
|
7690
|
-
}, [open]);
|
|
7691
7492
|
const normalizedOptions = React27.useMemo(
|
|
7692
7493
|
() => options.map((o) => typeof o === "string" ? { value: o, label: o } : { value: o.value, label: o.label }),
|
|
7693
7494
|
[options]
|
|
@@ -7751,11 +7552,151 @@ var MultiCombobox = ({
|
|
|
7751
7552
|
item: "text-base px-3 py-3",
|
|
7752
7553
|
tag: "px-2.5 py-1 text-sm"
|
|
7753
7554
|
}
|
|
7754
|
-
};
|
|
7755
|
-
const autoId = (0, import_react16.useId)();
|
|
7756
|
-
const resolvedId = id ? String(id) : `multicombobox-${autoId}`;
|
|
7757
|
-
const labelId = label ? `${resolvedId}-label` : void 0;
|
|
7758
|
-
const labelSize = size === "sm" ? "text-xs" : size === "lg" ? "text-base" : "text-sm";
|
|
7555
|
+
};
|
|
7556
|
+
const autoId = (0, import_react16.useId)();
|
|
7557
|
+
const resolvedId = id ? String(id) : `multicombobox-${autoId}`;
|
|
7558
|
+
const labelId = label ? `${resolvedId}-label` : void 0;
|
|
7559
|
+
const labelSize = size === "sm" ? "text-xs" : size === "lg" ? "text-base" : "text-sm";
|
|
7560
|
+
const listboxId = `${resolvedId}-listbox`;
|
|
7561
|
+
const dropdownBody = /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { "data-combobox-dropdown": true, "data-state": open ? "open" : "closed", className: "w-full", children: [
|
|
7562
|
+
showClear && value.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "px-3 py-2 border-b border-border/60 flex justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
7563
|
+
"button",
|
|
7564
|
+
{
|
|
7565
|
+
type: "button",
|
|
7566
|
+
onClick: (e) => {
|
|
7567
|
+
e.preventDefault();
|
|
7568
|
+
e.stopPropagation();
|
|
7569
|
+
handleClearAll();
|
|
7570
|
+
},
|
|
7571
|
+
className: "text-xs text-muted-foreground hover:underline cursor-pointer",
|
|
7572
|
+
children: "Clear all"
|
|
7573
|
+
}
|
|
7574
|
+
) }),
|
|
7575
|
+
enableSearch && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "relative border-b border-border/60", children: [
|
|
7576
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react18.Search, { className: cn("absolute left-2 top-2.5 text-muted-foreground", sizeStyles8[size].icon) }),
|
|
7577
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
7578
|
+
"input",
|
|
7579
|
+
{
|
|
7580
|
+
ref: inputRef,
|
|
7581
|
+
value: query,
|
|
7582
|
+
onChange: (e) => {
|
|
7583
|
+
setQuery(e.target.value);
|
|
7584
|
+
setActiveIndex(null);
|
|
7585
|
+
},
|
|
7586
|
+
onKeyDown: handleKeyDown,
|
|
7587
|
+
placeholder,
|
|
7588
|
+
className: cn("w-full rounded-t-xl bg-transparent focus:outline-none cursor-text", sizeStyles8[size].search)
|
|
7589
|
+
}
|
|
7590
|
+
)
|
|
7591
|
+
] }),
|
|
7592
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
7593
|
+
"ul",
|
|
7594
|
+
{
|
|
7595
|
+
id: listboxId,
|
|
7596
|
+
role: "listbox",
|
|
7597
|
+
className: cn("max-h-60 overflow-y-auto p-1", size === "lg" ? "text-base" : size === "sm" ? "text-xs" : "text-sm"),
|
|
7598
|
+
children: loading2 ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("li", { className: "px-3 py-8 text-center", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex flex-col items-center gap-2 animate-in fade-in-0 zoom-in-95 duration-300", children: [
|
|
7599
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react18.Loader2, { className: "h-6 w-6 animate-spin text-primary" }),
|
|
7600
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "text-muted-foreground", children: loadingText })
|
|
7601
|
+
] }) }) : filtered.length ? filtered.map((item, index) => {
|
|
7602
|
+
const isSelected = value.includes(item.value);
|
|
7603
|
+
const isDisabled = disabledOptions.includes(item.value);
|
|
7604
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
7605
|
+
"li",
|
|
7606
|
+
{
|
|
7607
|
+
ref: (node) => {
|
|
7608
|
+
listRef.current[index] = node;
|
|
7609
|
+
},
|
|
7610
|
+
onClick: (e) => {
|
|
7611
|
+
e.preventDefault();
|
|
7612
|
+
e.stopPropagation();
|
|
7613
|
+
toggleSelect(item.value);
|
|
7614
|
+
inputRef.current?.focus();
|
|
7615
|
+
},
|
|
7616
|
+
style: {
|
|
7617
|
+
animationDelay: open ? `${Math.min(index * 20, 200)}ms` : "0ms"
|
|
7618
|
+
},
|
|
7619
|
+
className: cn(
|
|
7620
|
+
"dropdown-item flex cursor-pointer items-center justify-between rounded-lg transition-colors",
|
|
7621
|
+
sizeStyles8[size].item,
|
|
7622
|
+
"hover:bg-accent hover:text-accent-foreground",
|
|
7623
|
+
index === activeIndex && "bg-accent text-accent-foreground",
|
|
7624
|
+
isDisabled && "opacity-50 cursor-not-allowed pointer-events-none"
|
|
7625
|
+
),
|
|
7626
|
+
children: [
|
|
7627
|
+
item.label,
|
|
7628
|
+
isSelected && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react18.Check, { className: sizeStyles8[size].icon })
|
|
7629
|
+
]
|
|
7630
|
+
},
|
|
7631
|
+
item.value
|
|
7632
|
+
);
|
|
7633
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("li", { className: cn("px-3 py-8 text-center text-muted-foreground", size === "lg" ? "text-base" : size === "sm" ? "text-xs" : "text-sm"), children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex flex-col items-center gap-2 animate-in fade-in-0 zoom-in-95 duration-300", children: [
|
|
7634
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react18.SearchX, { className: "h-8 w-8 opacity-40 text-muted-foreground" }),
|
|
7635
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { children: emptyText }),
|
|
7636
|
+
query && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("button", { type: "button", onClick: () => setQuery(""), className: "text-xs text-primary hover:underline", children: "Clear search" })
|
|
7637
|
+
] }) })
|
|
7638
|
+
}
|
|
7639
|
+
)
|
|
7640
|
+
] });
|
|
7641
|
+
const triggerButton = /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
7642
|
+
"button",
|
|
7643
|
+
{
|
|
7644
|
+
ref: triggerRef,
|
|
7645
|
+
type: "button",
|
|
7646
|
+
disabled,
|
|
7647
|
+
id: resolvedId,
|
|
7648
|
+
"aria-labelledby": labelId,
|
|
7649
|
+
role: "combobox",
|
|
7650
|
+
"aria-haspopup": "listbox",
|
|
7651
|
+
"aria-expanded": open,
|
|
7652
|
+
"aria-controls": listboxId,
|
|
7653
|
+
className: cn(
|
|
7654
|
+
"flex w-full items-center gap-2 rounded-xl border border-input bg-background shadow-sm min-h-10",
|
|
7655
|
+
"px-3 py-2",
|
|
7656
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
|
|
7657
|
+
"disabled:cursor-not-allowed disabled:opacity-50"
|
|
7658
|
+
),
|
|
7659
|
+
children: [
|
|
7660
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "flex items-center gap-1 flex-wrap min-h-6 flex-1", children: value.length > 0 ? showTags ? value.map((itemValue) => {
|
|
7661
|
+
const option = normalizedOptions.find((o) => o.value === itemValue);
|
|
7662
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("span", { className: "inline-flex items-center gap-1 bg-accent text-accent-foreground rounded-lg px-2 py-1 text-xs", children: [
|
|
7663
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "truncate max-w-30", children: option ? displayFormat(option) : itemValue }),
|
|
7664
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
7665
|
+
"span",
|
|
7666
|
+
{
|
|
7667
|
+
role: "button",
|
|
7668
|
+
tabIndex: 0,
|
|
7669
|
+
"aria-label": `Remove ${option ? displayFormat(option) : itemValue}`,
|
|
7670
|
+
onClick: (e) => {
|
|
7671
|
+
e.preventDefault();
|
|
7672
|
+
e.stopPropagation();
|
|
7673
|
+
handleRemove(itemValue);
|
|
7674
|
+
},
|
|
7675
|
+
onKeyDown: (e) => {
|
|
7676
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
7677
|
+
e.preventDefault();
|
|
7678
|
+
e.stopPropagation();
|
|
7679
|
+
handleRemove(itemValue);
|
|
7680
|
+
}
|
|
7681
|
+
},
|
|
7682
|
+
className: "hover:text-destructive transition-colors cursor-pointer select-none",
|
|
7683
|
+
children: "\xD7"
|
|
7684
|
+
}
|
|
7685
|
+
)
|
|
7686
|
+
] }, itemValue);
|
|
7687
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("span", { className: "truncate text-sm", children: [
|
|
7688
|
+
value.length,
|
|
7689
|
+
" selected"
|
|
7690
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "text-muted-foreground", children: placeholder || "Select..." }) }),
|
|
7691
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
7692
|
+
import_lucide_react18.ChevronDown,
|
|
7693
|
+
{
|
|
7694
|
+
className: cn("opacity-50 transition-all duration-200", sizeStyles8[size].icon, open && "rotate-180 scale-110 text-primary opacity-100")
|
|
7695
|
+
}
|
|
7696
|
+
)
|
|
7697
|
+
]
|
|
7698
|
+
}
|
|
7699
|
+
);
|
|
7759
7700
|
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: cn("w-full space-y-2 group", className), children: [
|
|
7760
7701
|
title && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "flex items-center justify-between", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
7761
7702
|
"label",
|
|
@@ -7787,177 +7728,19 @@ var MultiCombobox = ({
|
|
|
7787
7728
|
]
|
|
7788
7729
|
}
|
|
7789
7730
|
),
|
|
7790
|
-
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
7791
|
-
|
|
7792
|
-
"button",
|
|
7731
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
7732
|
+
Popover,
|
|
7793
7733
|
{
|
|
7794
|
-
|
|
7795
|
-
|
|
7796
|
-
|
|
7797
|
-
|
|
7798
|
-
|
|
7799
|
-
|
|
7800
|
-
|
|
7801
|
-
|
|
7802
|
-
const pos = calculatePosition();
|
|
7803
|
-
if (pos) setDropdownPosition(pos);
|
|
7804
|
-
}
|
|
7805
|
-
setOpen(next);
|
|
7806
|
-
},
|
|
7807
|
-
className: cn(
|
|
7808
|
-
"flex w-full items-center gap-2 rounded-lg border border-input bg-background shadow-sm min-h-10",
|
|
7809
|
-
"px-3 py-2",
|
|
7810
|
-
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
|
|
7811
|
-
"disabled:cursor-not-allowed disabled:opacity-50"
|
|
7812
|
-
),
|
|
7813
|
-
children: [
|
|
7814
|
-
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "flex items-center gap-1 flex-wrap min-h-6 flex-1", children: value.length > 0 ? showTags ? value.map((itemValue) => {
|
|
7815
|
-
const option = normalizedOptions.find((o) => o.value === itemValue);
|
|
7816
|
-
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("span", { className: "inline-flex items-center gap-1 bg-accent text-accent-foreground rounded px-2 py-1 text-xs", children: [
|
|
7817
|
-
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "truncate max-w-[120px]", children: option ? displayFormat(option) : itemValue }),
|
|
7818
|
-
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
7819
|
-
"span",
|
|
7820
|
-
{
|
|
7821
|
-
role: "button",
|
|
7822
|
-
tabIndex: 0,
|
|
7823
|
-
"aria-label": `Remove ${option ? displayFormat(option) : itemValue}`,
|
|
7824
|
-
onClick: (e) => {
|
|
7825
|
-
e.preventDefault();
|
|
7826
|
-
e.stopPropagation();
|
|
7827
|
-
handleRemove(itemValue);
|
|
7828
|
-
},
|
|
7829
|
-
onKeyDown: (e) => {
|
|
7830
|
-
if (e.key === "Enter" || e.key === " ") {
|
|
7831
|
-
e.preventDefault();
|
|
7832
|
-
e.stopPropagation();
|
|
7833
|
-
handleRemove(itemValue);
|
|
7834
|
-
}
|
|
7835
|
-
},
|
|
7836
|
-
className: "hover:text-destructive transition-colors cursor-pointer select-none",
|
|
7837
|
-
children: "\xD7"
|
|
7838
|
-
}
|
|
7839
|
-
)
|
|
7840
|
-
] }, itemValue);
|
|
7841
|
-
}) : /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("span", { className: "truncate text-sm", children: [
|
|
7842
|
-
value.length,
|
|
7843
|
-
" selected"
|
|
7844
|
-
] }) : /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "text-muted-foreground", children: placeholder || "Select..." }) }),
|
|
7845
|
-
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
7846
|
-
import_lucide_react18.ChevronDown,
|
|
7847
|
-
{
|
|
7848
|
-
className: cn("opacity-50 transition-all duration-200", sizeStyles8[size].icon, open && "rotate-180 scale-110 text-primary opacity-100")
|
|
7849
|
-
}
|
|
7850
|
-
)
|
|
7851
|
-
]
|
|
7734
|
+
open,
|
|
7735
|
+
onOpenChange: setOpen,
|
|
7736
|
+
trigger: triggerButton,
|
|
7737
|
+
placement: "bottom-start",
|
|
7738
|
+
matchTriggerWidth: true,
|
|
7739
|
+
className: "z-9999",
|
|
7740
|
+
contentClassName: "p-0",
|
|
7741
|
+
children: dropdownBody
|
|
7852
7742
|
}
|
|
7853
|
-
)
|
|
7854
|
-
open && dropdownPosition && typeof window !== "undefined" ? (0, import_react_dom7.createPortal)(
|
|
7855
|
-
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
7856
|
-
"div",
|
|
7857
|
-
{
|
|
7858
|
-
ref: dropdownRef,
|
|
7859
|
-
"data-combobox-dropdown": true,
|
|
7860
|
-
style: {
|
|
7861
|
-
position: "absolute",
|
|
7862
|
-
top: dropdownPosition?.top || 0,
|
|
7863
|
-
left: dropdownPosition?.left || 0,
|
|
7864
|
-
width: dropdownPosition?.width || 200,
|
|
7865
|
-
zIndex: 9999,
|
|
7866
|
-
transformOrigin: "top center"
|
|
7867
|
-
},
|
|
7868
|
-
"data-state": open ? "open" : "closed",
|
|
7869
|
-
className: "z-9999",
|
|
7870
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
7871
|
-
"div",
|
|
7872
|
-
{
|
|
7873
|
-
className: cn("rounded-md border bg-popover text-popover-foreground shadow-md", "backdrop-blur-sm bg-popover/95 border-border/60"),
|
|
7874
|
-
children: [
|
|
7875
|
-
showClear && value.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "px-3 py-2 border-b border-border/60 flex justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
7876
|
-
"button",
|
|
7877
|
-
{
|
|
7878
|
-
type: "button",
|
|
7879
|
-
onClick: (e) => {
|
|
7880
|
-
e.preventDefault();
|
|
7881
|
-
e.stopPropagation();
|
|
7882
|
-
handleClearAll();
|
|
7883
|
-
},
|
|
7884
|
-
className: "text-xs text-muted-foreground hover:underline cursor-pointer",
|
|
7885
|
-
children: "Clear all"
|
|
7886
|
-
}
|
|
7887
|
-
) }),
|
|
7888
|
-
enableSearch && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "relative border-b border-border/60", children: [
|
|
7889
|
-
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react18.Search, { className: cn("absolute left-2 top-2.5 text-muted-foreground", sizeStyles8[size].icon) }),
|
|
7890
|
-
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
7891
|
-
"input",
|
|
7892
|
-
{
|
|
7893
|
-
ref: inputRef,
|
|
7894
|
-
value: query,
|
|
7895
|
-
onChange: (e) => {
|
|
7896
|
-
setQuery(e.target.value);
|
|
7897
|
-
setActiveIndex(null);
|
|
7898
|
-
},
|
|
7899
|
-
onKeyDown: handleKeyDown,
|
|
7900
|
-
placeholder,
|
|
7901
|
-
className: cn("w-full rounded-t-md bg-transparent focus:outline-none cursor-text", sizeStyles8[size].search)
|
|
7902
|
-
}
|
|
7903
|
-
)
|
|
7904
|
-
] }),
|
|
7905
|
-
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("ul", { className: cn("max-h-60 overflow-y-auto p-1", size === "lg" ? "text-base" : size === "sm" ? "text-xs" : "text-sm"), children: loading2 ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("li", { className: "px-3 py-8 text-center", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex flex-col items-center gap-2 animate-in fade-in-0 zoom-in-95 duration-300", children: [
|
|
7906
|
-
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react18.Loader2, { className: "h-6 w-6 animate-spin text-primary" }),
|
|
7907
|
-
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "text-muted-foreground", children: loadingText })
|
|
7908
|
-
] }) }) : filtered.length ? filtered.map((item, index) => {
|
|
7909
|
-
const isSelected = value.includes(item.value);
|
|
7910
|
-
const isDisabled = disabledOptions.includes(item.value);
|
|
7911
|
-
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
7912
|
-
"li",
|
|
7913
|
-
{
|
|
7914
|
-
ref: (node) => {
|
|
7915
|
-
listRef.current[index] = node;
|
|
7916
|
-
},
|
|
7917
|
-
onClick: (e) => {
|
|
7918
|
-
e.preventDefault();
|
|
7919
|
-
e.stopPropagation();
|
|
7920
|
-
toggleSelect(item.value);
|
|
7921
|
-
inputRef.current?.focus();
|
|
7922
|
-
},
|
|
7923
|
-
style: {
|
|
7924
|
-
animationDelay: open ? `${Math.min(index * 20, 200)}ms` : "0ms"
|
|
7925
|
-
},
|
|
7926
|
-
className: cn(
|
|
7927
|
-
"dropdown-item flex cursor-pointer items-center justify-between rounded-sm transition-colors",
|
|
7928
|
-
sizeStyles8[size].item,
|
|
7929
|
-
"hover:bg-accent hover:text-accent-foreground",
|
|
7930
|
-
index === activeIndex && "bg-accent text-accent-foreground",
|
|
7931
|
-
isDisabled && "opacity-50 cursor-not-allowed pointer-events-none"
|
|
7932
|
-
),
|
|
7933
|
-
children: [
|
|
7934
|
-
item.label,
|
|
7935
|
-
isSelected && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react18.Check, { className: sizeStyles8[size].icon })
|
|
7936
|
-
]
|
|
7937
|
-
},
|
|
7938
|
-
item.value
|
|
7939
|
-
);
|
|
7940
|
-
}) : /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
7941
|
-
"li",
|
|
7942
|
-
{
|
|
7943
|
-
className: cn(
|
|
7944
|
-
"px-3 py-8 text-center text-muted-foreground",
|
|
7945
|
-
size === "lg" ? "text-base" : size === "sm" ? "text-xs" : "text-sm"
|
|
7946
|
-
),
|
|
7947
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex flex-col items-center gap-2 animate-in fade-in-0 zoom-in-95 duration-300", children: [
|
|
7948
|
-
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react18.SearchX, { className: "h-8 w-8 opacity-40 text-muted-foreground" }),
|
|
7949
|
-
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { children: emptyText }),
|
|
7950
|
-
query && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("button", { type: "button", onClick: () => setQuery(""), className: "text-xs text-primary hover:underline", children: "Clear search" })
|
|
7951
|
-
] })
|
|
7952
|
-
}
|
|
7953
|
-
) })
|
|
7954
|
-
]
|
|
7955
|
-
}
|
|
7956
|
-
)
|
|
7957
|
-
}
|
|
7958
|
-
),
|
|
7959
|
-
document.body
|
|
7960
|
-
) : null
|
|
7743
|
+
)
|
|
7961
7744
|
] });
|
|
7962
7745
|
};
|
|
7963
7746
|
|
|
@@ -8059,14 +7842,7 @@ var sizeStyles7 = {
|
|
|
8059
7842
|
};
|
|
8060
7843
|
var RadioGroupItem = React28.forwardRef(
|
|
8061
7844
|
({ value, id, disabled, className, children, label, description, icon }, ref) => {
|
|
8062
|
-
const {
|
|
8063
|
-
value: selectedValue,
|
|
8064
|
-
onValueChange,
|
|
8065
|
-
name,
|
|
8066
|
-
disabled: groupDisabled,
|
|
8067
|
-
size = "md",
|
|
8068
|
-
variant = "default"
|
|
8069
|
-
} = useRadioGroup();
|
|
7845
|
+
const { value: selectedValue, onValueChange, name, disabled: groupDisabled, size = "md", variant = "default" } = useRadioGroup();
|
|
8070
7846
|
const isDisabled = disabled || groupDisabled;
|
|
8071
7847
|
const isSelected = selectedValue === value;
|
|
8072
7848
|
const Icon = icon;
|
|
@@ -8076,7 +7852,7 @@ var RadioGroupItem = React28.forwardRef(
|
|
|
8076
7852
|
"div",
|
|
8077
7853
|
{
|
|
8078
7854
|
className: cn(
|
|
8079
|
-
"relative rounded-
|
|
7855
|
+
"relative rounded-xl border transition-all duration-200 cursor-pointer",
|
|
8080
7856
|
"hover:bg-accent/50 focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2",
|
|
8081
7857
|
isSelected && "border-primary bg-primary/5 ring-1 ring-primary/20",
|
|
8082
7858
|
isDisabled && "cursor-not-allowed opacity-50",
|
|
@@ -8107,10 +7883,7 @@ var RadioGroupItem = React28.forwardRef(
|
|
|
8107
7883
|
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
8108
7884
|
"span",
|
|
8109
7885
|
{
|
|
8110
|
-
className: cn(
|
|
8111
|
-
"flex items-center justify-center w-full h-full rounded-full transition-all duration-200",
|
|
8112
|
-
isSelected && "bg-primary"
|
|
8113
|
-
),
|
|
7886
|
+
className: cn("flex items-center justify-center w-full h-full rounded-full transition-all duration-200", isSelected && "bg-primary"),
|
|
8114
7887
|
children: isSelected && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: cn("bg-primary-foreground rounded-full", sizeStyles7[size].dot) })
|
|
8115
7888
|
}
|
|
8116
7889
|
)
|
|
@@ -8119,17 +7892,7 @@ var RadioGroupItem = React28.forwardRef(
|
|
|
8119
7892
|
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex-1 min-w-0", children: [
|
|
8120
7893
|
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
8121
7894
|
Icon && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Icon, { className: "h-4 w-4 text-foreground" }),
|
|
8122
|
-
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
8123
|
-
"label",
|
|
8124
|
-
{
|
|
8125
|
-
htmlFor: radioId,
|
|
8126
|
-
className: cn(
|
|
8127
|
-
"font-medium text-foreground cursor-pointer",
|
|
8128
|
-
sizeStyles7[size].text
|
|
8129
|
-
),
|
|
8130
|
-
children: label || children
|
|
8131
|
-
}
|
|
8132
|
-
)
|
|
7895
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("label", { htmlFor: radioId, className: cn("font-medium text-foreground cursor-pointer", sizeStyles7[size].text), children: label || children })
|
|
8133
7896
|
] }),
|
|
8134
7897
|
description && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { className: "text-muted-foreground mt-1 text-xs", children: description })
|
|
8135
7898
|
] })
|
|
@@ -8164,7 +7927,7 @@ var RadioGroupItem = React28.forwardRef(
|
|
|
8164
7927
|
id: radioId,
|
|
8165
7928
|
disabled: isDisabled,
|
|
8166
7929
|
className: cn(
|
|
8167
|
-
"inline-flex items-center justify-center gap-2 rounded-
|
|
7930
|
+
"inline-flex items-center justify-center gap-2 rounded-lg border font-medium transition-all duration-200",
|
|
8168
7931
|
"focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
8169
7932
|
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
8170
7933
|
isSelected ? "border-primary bg-primary text-primary-foreground shadow-sm" : "border-border bg-background hover:bg-accent hover:text-accent-foreground",
|
|
@@ -8213,16 +7976,7 @@ var RadioGroupItem = React28.forwardRef(
|
|
|
8213
7976
|
sizeStyles7[size].radio
|
|
8214
7977
|
),
|
|
8215
7978
|
onClick: () => onValueChange?.(value),
|
|
8216
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
8217
|
-
"span",
|
|
8218
|
-
{
|
|
8219
|
-
className: cn(
|
|
8220
|
-
"flex items-center justify-center w-full h-full rounded-full transition-all duration-200",
|
|
8221
|
-
isSelected && "bg-primary"
|
|
8222
|
-
),
|
|
8223
|
-
children: isSelected && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: cn("bg-primary-foreground rounded-full", sizeStyles7[size].dot) })
|
|
8224
|
-
}
|
|
8225
|
-
)
|
|
7979
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: cn("flex items-center justify-center w-full h-full rounded-full transition-all duration-200", isSelected && "bg-primary"), children: isSelected && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: cn("bg-primary-foreground rounded-full", sizeStyles7[size].dot) }) })
|
|
8226
7980
|
}
|
|
8227
7981
|
),
|
|
8228
7982
|
(label || children) && /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
@@ -8628,7 +8382,7 @@ function OverlayControls({
|
|
|
8628
8382
|
"absolute inset-0 flex items-center pointer-events-none z-50",
|
|
8629
8383
|
keyboardFeedback.type === "seek" && (keyboardFeedback.value ?? 0) > 0 ? "justify-end pr-32" : keyboardFeedback.type === "seek" && (keyboardFeedback.value ?? 0) < 0 ? "justify-start pl-32" : "justify-center"
|
|
8630
8384
|
),
|
|
8631
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "bg-black/50 backdrop-blur-sm rounded-
|
|
8385
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "bg-black/50 backdrop-blur-sm rounded-2xl px-6 py-4 shadow-xl border border-white/10 animate-in fade-in zoom-in duration-200", children: [
|
|
8632
8386
|
keyboardFeedback.type === "play" && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_lucide_react19.Play, { className: "w-16 h-16 text-white", fill: "white" }),
|
|
8633
8387
|
keyboardFeedback.type === "pause" && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_lucide_react19.Pause, { className: "w-16 h-16 text-white", fill: "white" }),
|
|
8634
8388
|
keyboardFeedback.type === "seek" && /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
@@ -8690,7 +8444,7 @@ function OverlayControls({
|
|
|
8690
8444
|
noFocus: true
|
|
8691
8445
|
}
|
|
8692
8446
|
),
|
|
8693
|
-
previewData && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "absolute bottom-full mb-2 transform -translate-x-1/2 pointer-events-none z-30", style: { left: `${previewData.x}px` }, children: previewData.url ? /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "bg-background/95 backdrop-blur rounded-
|
|
8447
|
+
previewData && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "absolute bottom-full mb-2 transform -translate-x-1/2 pointer-events-none z-30", style: { left: `${previewData.x}px` }, children: previewData.url ? /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "bg-background/95 backdrop-blur rounded-xl border border-border shadow-lg overflow-hidden", children: [
|
|
8694
8448
|
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("img", { src: previewData.url, alt: "Preview", className: "w-40 h-24 object-cover" }),
|
|
8695
8449
|
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "px-2 py-1 text-xs font-mono text-center bg-background/80", children: formatTime3(previewData.time) })
|
|
8696
8450
|
] }) : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "px-3 py-1.5 rounded-md bg-background/90 backdrop-blur border border-border shadow-lg", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "text-xs font-mono text-center", children: formatTime3(previewData.time) }) }) })
|
|
@@ -8799,7 +8553,7 @@ function OverlayControls({
|
|
|
8799
8553
|
onChangeRate(r);
|
|
8800
8554
|
setRateOpen(false);
|
|
8801
8555
|
},
|
|
8802
|
-
className: cn("block w-full text-left px-3 py-1 text-sm rounded hover:bg-accent", rate === r && "bg-accent"),
|
|
8556
|
+
className: cn("block w-full text-left px-3 py-1 text-sm rounded-lg hover:bg-accent", rate === r && "bg-accent"),
|
|
8803
8557
|
children: [
|
|
8804
8558
|
r,
|
|
8805
8559
|
"x"
|
|
@@ -8922,7 +8676,7 @@ function CategoryTreeSelect(props) {
|
|
|
8922
8676
|
!viewOnly && "cursor-pointer",
|
|
8923
8677
|
!viewOnly && !isSelected && "hover:bg-accent/60 hover:shadow-sm",
|
|
8924
8678
|
// Selected state
|
|
8925
|
-
!viewOnly && isSelected && "bg-
|
|
8679
|
+
!viewOnly && isSelected && "bg-linear-to-r from-primary/15 via-primary/10 to-primary/5 shadow-sm"
|
|
8926
8680
|
),
|
|
8927
8681
|
style: { paddingLeft: `${level * 1.25 + 0.75}rem` },
|
|
8928
8682
|
children: [
|
|
@@ -8930,7 +8684,7 @@ function CategoryTreeSelect(props) {
|
|
|
8930
8684
|
"span",
|
|
8931
8685
|
{
|
|
8932
8686
|
"aria-hidden": true,
|
|
8933
|
-
className: "absolute left-0 top-2 bottom-2 w-1 rounded-full bg-
|
|
8687
|
+
className: "absolute left-0 top-2 bottom-2 w-1 rounded-full bg-linear-to-b from-primary to-primary/70 shadow-sm shadow-primary/30"
|
|
8934
8688
|
}
|
|
8935
8689
|
),
|
|
8936
8690
|
hasChildren ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
@@ -8966,7 +8720,7 @@ function CategoryTreeSelect(props) {
|
|
|
8966
8720
|
"w-5 h-5 border-2 rounded-full flex items-center justify-center transition-all duration-200",
|
|
8967
8721
|
isSelected ? "border-primary bg-primary/10 shadow-sm shadow-primary/20" : "border-muted-foreground/30 hover:border-primary/50"
|
|
8968
8722
|
),
|
|
8969
|
-
children: isSelected && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "w-2.5 h-2.5 rounded-full bg-
|
|
8723
|
+
children: isSelected && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "w-2.5 h-2.5 rounded-full bg-linear-to-br from-primary to-primary/80 shadow-sm" })
|
|
8970
8724
|
}
|
|
8971
8725
|
),
|
|
8972
8726
|
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
@@ -8989,7 +8743,7 @@ function CategoryTreeSelect(props) {
|
|
|
8989
8743
|
{
|
|
8990
8744
|
className: cn(
|
|
8991
8745
|
"w-5 h-5 border-2 rounded-lg flex items-center justify-center transition-all duration-200",
|
|
8992
|
-
isSelected ? "bg-
|
|
8746
|
+
isSelected ? "bg-linear-to-br from-primary to-primary/80 border-primary shadow-sm shadow-primary/25" : "border-muted-foreground/30 hover:border-primary/50 hover:bg-primary/5"
|
|
8993
8747
|
),
|
|
8994
8748
|
children: isSelected && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_lucide_react20.Check, { className: "w-3 h-3 text-primary-foreground", strokeWidth: 3 })
|
|
8995
8749
|
}
|
|
@@ -9233,7 +8987,7 @@ function ImageUpload({
|
|
|
9233
8987
|
"div",
|
|
9234
8988
|
{
|
|
9235
8989
|
className: cn(
|
|
9236
|
-
"relative border-2 border-dashed rounded-
|
|
8990
|
+
"relative border-2 border-dashed rounded-xl p-8 text-center transition-all duration-200",
|
|
9237
8991
|
isDragging && !disabled ? "border-primary bg-primary/5 scale-[1.02]" : "border-border hover:border-primary/50",
|
|
9238
8992
|
disabled && "opacity-50 cursor-not-allowed",
|
|
9239
8993
|
uploading && "pointer-events-none"
|
|
@@ -9242,7 +8996,7 @@ function ImageUpload({
|
|
|
9242
8996
|
onDragLeave: handleDragLeave,
|
|
9243
8997
|
onDrop: handleDrop,
|
|
9244
8998
|
children: [
|
|
9245
|
-
uploading && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "absolute inset-0 bg-background/80 flex items-center justify-center rounded-
|
|
8999
|
+
uploading && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "absolute inset-0 bg-background/80 flex items-center justify-center rounded-xl", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
9246
9000
|
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_lucide_react21.Loader2, { className: "w-6 h-6 animate-spin text-primary" }),
|
|
9247
9001
|
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "text-sm font-medium", children: "Uploading..." })
|
|
9248
9002
|
] }) }),
|
|
@@ -9271,7 +9025,7 @@ function ImageUpload({
|
|
|
9271
9025
|
),
|
|
9272
9026
|
showPreview && uploadedImages.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "space-y-3", children: [
|
|
9273
9027
|
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("h4", { className: "text-sm font-medium", children: "Uploaded Images" }),
|
|
9274
|
-
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-4", children: uploadedImages.map((image) => /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "relative group bg-card border border-border rounded-
|
|
9028
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-4", children: uploadedImages.map((image) => /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "relative group bg-card border border-border rounded-xl p-3", children: [
|
|
9275
9029
|
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
9276
9030
|
Button_default,
|
|
9277
9031
|
{
|
|
@@ -9282,7 +9036,7 @@ function ImageUpload({
|
|
|
9282
9036
|
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_lucide_react21.X, { className: "w-3 h-3" })
|
|
9283
9037
|
}
|
|
9284
9038
|
),
|
|
9285
|
-
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: cn("mx-auto mb-2 overflow-hidden rounded-
|
|
9039
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: cn("mx-auto mb-2 overflow-hidden rounded-lg", previewSizes[previewSize]), children: [
|
|
9286
9040
|
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
9287
9041
|
"img",
|
|
9288
9042
|
{
|
|
@@ -9478,7 +9232,7 @@ function Carousel({
|
|
|
9478
9232
|
"div",
|
|
9479
9233
|
{
|
|
9480
9234
|
ref: carouselRef,
|
|
9481
|
-
className: cn("relative w-full overflow-hidden focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2 rounded-
|
|
9235
|
+
className: cn("relative w-full overflow-hidden focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2 rounded-2xl", className),
|
|
9482
9236
|
onMouseEnter: () => setIsPaused(true),
|
|
9483
9237
|
onMouseLeave: () => setIsPaused(false),
|
|
9484
9238
|
role: "region",
|
|
@@ -9597,7 +9351,7 @@ function Carousel({
|
|
|
9597
9351
|
{
|
|
9598
9352
|
onClick: () => scrollTo(idx),
|
|
9599
9353
|
className: cn(
|
|
9600
|
-
"shrink-0 w-16 h-16 rounded-
|
|
9354
|
+
"shrink-0 w-16 h-16 rounded-lg overflow-hidden border-2 transition-all focus:outline-none focus:ring-2 focus:ring-primary",
|
|
9601
9355
|
idx === currentIndex ? "border-primary scale-110" : "border-transparent opacity-70 hover:opacity-100"
|
|
9602
9356
|
),
|
|
9603
9357
|
"aria-label": `Thumbnail ${idx + 1}`,
|
|
@@ -9709,24 +9463,16 @@ function FallingIcons({
|
|
|
9709
9463
|
filter: `drop-shadow(0 0 ${4 * intensity}px ${glowColor}) drop-shadow(0 0 ${8 * intensity}px ${glowColor})`
|
|
9710
9464
|
};
|
|
9711
9465
|
}, [glow, glowColor, glowIntensity]);
|
|
9712
|
-
const FallbackIcon = import_react20.default.useMemo(
|
|
9713
|
-
|
|
9714
|
-
|
|
9715
|
-
|
|
9716
|
-
|
|
9717
|
-
alt: "",
|
|
9718
|
-
className: cn("w-full h-full object-cover rounded-sm", imgClassName),
|
|
9719
|
-
draggable: false
|
|
9720
|
-
}
|
|
9721
|
-
) : Icon || FallbackIcon;
|
|
9466
|
+
const FallbackIcon = import_react20.default.useMemo(
|
|
9467
|
+
() => (props) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": "true", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("circle", { cx: "12", cy: "12", r: "10" }) }),
|
|
9468
|
+
[]
|
|
9469
|
+
);
|
|
9470
|
+
const TheIcon = imageUrl ? ({ className: imgClassName }) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("img", { src: imageUrl, alt: "", className: cn("w-full h-full object-cover rounded-lg", imgClassName), draggable: false }) : Icon || FallbackIcon;
|
|
9722
9471
|
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
9723
9472
|
"div",
|
|
9724
9473
|
{
|
|
9725
9474
|
ref: containerRef,
|
|
9726
|
-
className: cn(
|
|
9727
|
-
fullScreen ? "fixed inset-0 overflow-hidden pointer-events-none" : "relative w-full h-full overflow-hidden",
|
|
9728
|
-
areaClassName
|
|
9729
|
-
),
|
|
9475
|
+
className: cn(fullScreen ? "fixed inset-0 overflow-hidden pointer-events-none" : "relative w-full h-full overflow-hidden", areaClassName),
|
|
9730
9476
|
style: { zIndex },
|
|
9731
9477
|
children: [
|
|
9732
9478
|
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("style", { children: `
|
|
@@ -9762,141 +9508,131 @@ function FallingIcons({
|
|
|
9762
9508
|
}
|
|
9763
9509
|
}
|
|
9764
9510
|
` }),
|
|
9765
|
-
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
9766
|
-
|
|
9767
|
-
|
|
9768
|
-
|
|
9769
|
-
|
|
9770
|
-
|
|
9771
|
-
|
|
9772
|
-
|
|
9773
|
-
|
|
9774
|
-
|
|
9775
|
-
|
|
9776
|
-
|
|
9777
|
-
|
|
9778
|
-
|
|
9779
|
-
|
|
9780
|
-
|
|
9781
|
-
|
|
9782
|
-
|
|
9783
|
-
|
|
9784
|
-
|
|
9785
|
-
|
|
9786
|
-
|
|
9787
|
-
|
|
9788
|
-
|
|
9789
|
-
|
|
9790
|
-
|
|
9791
|
-
|
|
9511
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: cn("absolute inset-0 pointer-events-none", className), "aria-hidden": true, children: particles.map((p, i) => {
|
|
9512
|
+
const swayDuration = p.fallDur * (0.8 + i % 5 * 0.05);
|
|
9513
|
+
const spinDuration = Math.max(1, p.spinDur);
|
|
9514
|
+
const handlePop = () => {
|
|
9515
|
+
setParticles((prev) => {
|
|
9516
|
+
const next = prev.slice();
|
|
9517
|
+
const np = makeParticle();
|
|
9518
|
+
np.delay = -Math.random() * 8;
|
|
9519
|
+
next[i] = np;
|
|
9520
|
+
return next;
|
|
9521
|
+
});
|
|
9522
|
+
};
|
|
9523
|
+
const trailParticles = trail ? Array.from({ length: Math.min(5, Math.max(1, trailLength)) }) : [];
|
|
9524
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_react20.default.Fragment, { children: [
|
|
9525
|
+
trail && trailParticles.map((_, trailIndex) => {
|
|
9526
|
+
const trailDelay = p.delay - (trailIndex + 1) * 0.15;
|
|
9527
|
+
const trailOpacity = 1 - (trailIndex + 1) * (1 / (trailParticles.length + 1));
|
|
9528
|
+
const trailScale = 1 - (trailIndex + 1) * 0.15;
|
|
9529
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
9530
|
+
"span",
|
|
9531
|
+
{
|
|
9532
|
+
className: cn("absolute top-0 will-change-transform pointer-events-none uv-falling-particle", colorClassName),
|
|
9533
|
+
style: {
|
|
9534
|
+
left: `${p.leftPct}%`,
|
|
9535
|
+
animationDelay: `${trailDelay}s`,
|
|
9536
|
+
animationDuration: `${p.fallDur}s`,
|
|
9537
|
+
animationName: FallName,
|
|
9538
|
+
animationTimingFunction: easingMap[easingFunction] || "linear",
|
|
9539
|
+
animationIterationCount: "infinite",
|
|
9540
|
+
opacity: trailOpacity * 0.4,
|
|
9541
|
+
["--fall"]: `${fallDist ?? (typeof window !== "undefined" ? window.innerHeight + 200 : 1200)}px`
|
|
9542
|
+
},
|
|
9543
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
9792
9544
|
"span",
|
|
9793
9545
|
{
|
|
9794
|
-
className:
|
|
9546
|
+
className: "inline-block uv-sway",
|
|
9795
9547
|
style: {
|
|
9796
|
-
|
|
9797
|
-
|
|
9798
|
-
animationDuration: `${
|
|
9799
|
-
|
|
9800
|
-
animationTimingFunction: easingMap[easingFunction] || "linear",
|
|
9548
|
+
transform: `translateX(-50%) scale(${trailScale})`,
|
|
9549
|
+
animationName: SwayName,
|
|
9550
|
+
animationDuration: `${swayDuration}s`,
|
|
9551
|
+
animationTimingFunction: "ease-in-out",
|
|
9801
9552
|
animationIterationCount: "infinite",
|
|
9802
|
-
|
|
9803
|
-
["--fall"]: `${fallDist ?? (typeof window !== "undefined" ? window.innerHeight + 200 : 1200)}px`
|
|
9553
|
+
["--amp"]: `${Math.round(p.driftAmp)}px`
|
|
9804
9554
|
},
|
|
9805
9555
|
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
9806
9556
|
"span",
|
|
9807
9557
|
{
|
|
9808
|
-
className: "
|
|
9558
|
+
className: "block",
|
|
9809
9559
|
style: {
|
|
9810
|
-
|
|
9811
|
-
|
|
9812
|
-
|
|
9813
|
-
animationTimingFunction: "ease-in-out",
|
|
9814
|
-
animationIterationCount: "infinite",
|
|
9815
|
-
["--amp"]: `${Math.round(p.driftAmp)}px`
|
|
9560
|
+
width: p.size,
|
|
9561
|
+
height: p.size,
|
|
9562
|
+
...glowStyles
|
|
9816
9563
|
},
|
|
9817
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
9818
|
-
"span",
|
|
9819
|
-
{
|
|
9820
|
-
className: "block",
|
|
9821
|
-
style: {
|
|
9822
|
-
width: p.size,
|
|
9823
|
-
height: p.size,
|
|
9824
|
-
...glowStyles
|
|
9825
|
-
},
|
|
9826
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(TheIcon, { className: cn("w-full h-full text-primary/70", colorClassName) })
|
|
9827
|
-
}
|
|
9828
|
-
)
|
|
9564
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(TheIcon, { className: cn("w-full h-full text-primary/70", colorClassName) })
|
|
9829
9565
|
}
|
|
9830
9566
|
)
|
|
9831
|
-
}
|
|
9832
|
-
|
|
9833
|
-
|
|
9834
|
-
}
|
|
9835
|
-
|
|
9567
|
+
}
|
|
9568
|
+
)
|
|
9569
|
+
},
|
|
9570
|
+
`${p.key}-trail-${trailIndex}`
|
|
9571
|
+
);
|
|
9572
|
+
}),
|
|
9573
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
9574
|
+
"span",
|
|
9575
|
+
{
|
|
9576
|
+
className: cn("absolute top-0 will-change-transform pointer-events-auto uv-falling-particle", colorClassName),
|
|
9577
|
+
style: {
|
|
9578
|
+
left: `${p.leftPct}%`,
|
|
9579
|
+
animationDelay: `${p.delay}s`,
|
|
9580
|
+
animationDuration: `${p.fallDur}s`,
|
|
9581
|
+
animationName: FallName,
|
|
9582
|
+
animationTimingFunction: easingMap[easingFunction] || "linear",
|
|
9583
|
+
animationIterationCount: "infinite",
|
|
9584
|
+
["--fall"]: `${fallDist ?? (typeof window !== "undefined" ? window.innerHeight + 200 : 1200)}px`
|
|
9585
|
+
},
|
|
9586
|
+
onMouseEnter: handlePop,
|
|
9587
|
+
onAnimationIteration: (ev) => {
|
|
9588
|
+
if (ev.currentTarget !== ev.target) return;
|
|
9589
|
+
if (!randomizeEachLoop) return;
|
|
9590
|
+
if (ev.animationName !== FallName) return;
|
|
9591
|
+
setParticles((prev) => {
|
|
9592
|
+
const next = prev.slice();
|
|
9593
|
+
const np = makeParticle();
|
|
9594
|
+
np.delay = -Math.random() * 4;
|
|
9595
|
+
next[i] = np;
|
|
9596
|
+
return next;
|
|
9597
|
+
});
|
|
9598
|
+
},
|
|
9599
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
9836
9600
|
"span",
|
|
9837
9601
|
{
|
|
9838
|
-
className:
|
|
9602
|
+
className: "inline-block uv-sway",
|
|
9839
9603
|
style: {
|
|
9840
|
-
|
|
9841
|
-
|
|
9842
|
-
animationDuration: `${
|
|
9843
|
-
|
|
9844
|
-
animationTimingFunction: easingMap[easingFunction] || "linear",
|
|
9604
|
+
transform: `translateX(-50%)`,
|
|
9605
|
+
animationName: SwayName,
|
|
9606
|
+
animationDuration: `${swayDuration}s`,
|
|
9607
|
+
animationTimingFunction: "ease-in-out",
|
|
9845
9608
|
animationIterationCount: "infinite",
|
|
9846
|
-
["--
|
|
9847
|
-
},
|
|
9848
|
-
onMouseEnter: handlePop,
|
|
9849
|
-
onAnimationIteration: (ev) => {
|
|
9850
|
-
if (ev.currentTarget !== ev.target) return;
|
|
9851
|
-
if (!randomizeEachLoop) return;
|
|
9852
|
-
if (ev.animationName !== FallName) return;
|
|
9853
|
-
setParticles((prev) => {
|
|
9854
|
-
const next = prev.slice();
|
|
9855
|
-
const np = makeParticle();
|
|
9856
|
-
np.delay = -Math.random() * 4;
|
|
9857
|
-
next[i] = np;
|
|
9858
|
-
return next;
|
|
9859
|
-
});
|
|
9609
|
+
["--amp"]: `${Math.round(p.driftAmp)}px`
|
|
9860
9610
|
},
|
|
9861
9611
|
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
9862
9612
|
"span",
|
|
9863
9613
|
{
|
|
9864
|
-
className:
|
|
9614
|
+
className: cn(
|
|
9615
|
+
"block uv-spin hover:animate-[var(--popName)_0.35s_ease-out_forwards]",
|
|
9616
|
+
physicsRotation ? "animate-[var(--physicsSpinName)_var(--spinDur)_ease-in-out_infinite]" : spin && "animate-[var(--spinName)_var(--spinDur)_linear_infinite]"
|
|
9617
|
+
),
|
|
9865
9618
|
style: {
|
|
9866
|
-
|
|
9867
|
-
|
|
9868
|
-
|
|
9869
|
-
|
|
9870
|
-
|
|
9871
|
-
["--
|
|
9619
|
+
width: p.size,
|
|
9620
|
+
height: p.size,
|
|
9621
|
+
["--spinName"]: SpinName,
|
|
9622
|
+
["--physicsSpinName"]: PhysicsSpinName,
|
|
9623
|
+
["--spinDur"]: `${spinDuration}s`,
|
|
9624
|
+
["--popName"]: PopName,
|
|
9625
|
+
...glowStyles
|
|
9872
9626
|
},
|
|
9873
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
9874
|
-
"span",
|
|
9875
|
-
{
|
|
9876
|
-
className: cn(
|
|
9877
|
-
"block uv-spin hover:animate-[var(--popName)_0.35s_ease-out_forwards]",
|
|
9878
|
-
physicsRotation ? "animate-[var(--physicsSpinName)_var(--spinDur)_ease-in-out_infinite]" : spin && "animate-[var(--spinName)_var(--spinDur)_linear_infinite]"
|
|
9879
|
-
),
|
|
9880
|
-
style: {
|
|
9881
|
-
width: p.size,
|
|
9882
|
-
height: p.size,
|
|
9883
|
-
["--spinName"]: SpinName,
|
|
9884
|
-
["--physicsSpinName"]: PhysicsSpinName,
|
|
9885
|
-
["--spinDur"]: `${spinDuration}s`,
|
|
9886
|
-
["--popName"]: PopName,
|
|
9887
|
-
...glowStyles
|
|
9888
|
-
},
|
|
9889
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(TheIcon, { className: cn("w-full h-full text-primary/70", colorClassName) })
|
|
9890
|
-
}
|
|
9891
|
-
)
|
|
9627
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(TheIcon, { className: cn("w-full h-full text-primary/70", colorClassName) })
|
|
9892
9628
|
}
|
|
9893
9629
|
)
|
|
9894
9630
|
}
|
|
9895
9631
|
)
|
|
9896
|
-
|
|
9897
|
-
|
|
9898
|
-
}
|
|
9899
|
-
)
|
|
9632
|
+
}
|
|
9633
|
+
)
|
|
9634
|
+
] }, p.key);
|
|
9635
|
+
}) })
|
|
9900
9636
|
]
|
|
9901
9637
|
}
|
|
9902
9638
|
);
|
|
@@ -9924,8 +9660,8 @@ var ListItemSkeleton = ({ size }) => {
|
|
|
9924
9660
|
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: cn("flex items-center gap-3 animate-pulse p-2"), children: [
|
|
9925
9661
|
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: cn("rounded-full bg-muted shrink-0", sz.avatar) }),
|
|
9926
9662
|
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "flex-1 space-y-2", children: [
|
|
9927
|
-
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "h-4 bg-muted rounded w-3/4" }),
|
|
9928
|
-
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "h-3 bg-muted rounded w-1/2" })
|
|
9663
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "h-4 bg-muted rounded-md w-3/4" }),
|
|
9664
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "h-3 bg-muted rounded-md w-1/2" })
|
|
9929
9665
|
] })
|
|
9930
9666
|
] });
|
|
9931
9667
|
};
|
|
@@ -9953,12 +9689,12 @@ var ListRoot = React34.forwardRef(
|
|
|
9953
9689
|
const hasChildren = childCount > 0;
|
|
9954
9690
|
const variantClasses2 = {
|
|
9955
9691
|
plain: "",
|
|
9956
|
-
outlined: "rounded-
|
|
9957
|
-
soft: "rounded-
|
|
9958
|
-
bordered: "border border-border rounded-
|
|
9959
|
-
card: "rounded-
|
|
9692
|
+
outlined: "rounded-xl md:rounded-2xl bg-card text-card-foreground border border-border shadow-sm",
|
|
9693
|
+
soft: "rounded-xl bg-muted/40 border border-border/60",
|
|
9694
|
+
bordered: "border border-border rounded-xl",
|
|
9695
|
+
card: "rounded-xl bg-card shadow-md border border-border",
|
|
9960
9696
|
flush: "",
|
|
9961
|
-
striped: "rounded-
|
|
9697
|
+
striped: "rounded-xl border border-border overflow-hidden"
|
|
9962
9698
|
};
|
|
9963
9699
|
if (loading2) {
|
|
9964
9700
|
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
@@ -10101,7 +9837,7 @@ var List_default = List;
|
|
|
10101
9837
|
|
|
10102
9838
|
// ../../components/ui/Watermark.tsx
|
|
10103
9839
|
var React35 = __toESM(require("react"), 1);
|
|
10104
|
-
var
|
|
9840
|
+
var import_react_dom5 = require("react-dom");
|
|
10105
9841
|
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
10106
9842
|
var PRESETS2 = {
|
|
10107
9843
|
confidential: { text: "CONFIDENTIAL", color: "rgba(220, 38, 38, 0.15)", rotate: -22, fontSize: 16, fontWeight: "bold" },
|
|
@@ -10383,7 +10119,7 @@ var Watermark = ({
|
|
|
10383
10119
|
if (fullPage) {
|
|
10384
10120
|
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_jsx_runtime42.Fragment, { children: [
|
|
10385
10121
|
children,
|
|
10386
|
-
typeof window !== "undefined" ? (0,
|
|
10122
|
+
typeof window !== "undefined" ? (0, import_react_dom5.createPortal)(overlay, document.body) : null
|
|
10387
10123
|
] });
|
|
10388
10124
|
}
|
|
10389
10125
|
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: cn("relative", className), style, ...rest, children: [
|
|
@@ -10398,10 +10134,46 @@ var React36 = __toESM(require("react"), 1);
|
|
|
10398
10134
|
var import_lucide_react24 = require("lucide-react");
|
|
10399
10135
|
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
10400
10136
|
var SIZE_STYLE = {
|
|
10401
|
-
sm: {
|
|
10402
|
-
|
|
10403
|
-
|
|
10404
|
-
|
|
10137
|
+
sm: {
|
|
10138
|
+
dot: "h-2.5 w-2.5",
|
|
10139
|
+
iconDot: "h-6 w-6",
|
|
10140
|
+
padY: "py-3",
|
|
10141
|
+
densePadY: "py-2",
|
|
10142
|
+
title: "text-sm",
|
|
10143
|
+
desc: "text-xs",
|
|
10144
|
+
time: "text-[11px]",
|
|
10145
|
+
icon: "h-3.5 w-3.5"
|
|
10146
|
+
},
|
|
10147
|
+
md: {
|
|
10148
|
+
dot: "h-3 w-3",
|
|
10149
|
+
iconDot: "h-8 w-8",
|
|
10150
|
+
padY: "py-4",
|
|
10151
|
+
densePadY: "py-2.5",
|
|
10152
|
+
title: "text-base",
|
|
10153
|
+
desc: "text-sm",
|
|
10154
|
+
time: "text-xs",
|
|
10155
|
+
icon: "h-4 w-4"
|
|
10156
|
+
},
|
|
10157
|
+
lg: {
|
|
10158
|
+
dot: "h-3.5 w-3.5",
|
|
10159
|
+
iconDot: "h-10 w-10",
|
|
10160
|
+
padY: "py-5",
|
|
10161
|
+
densePadY: "py-3",
|
|
10162
|
+
title: "text-lg",
|
|
10163
|
+
desc: "text-sm",
|
|
10164
|
+
time: "text-xs",
|
|
10165
|
+
icon: "h-5 w-5"
|
|
10166
|
+
},
|
|
10167
|
+
xl: {
|
|
10168
|
+
dot: "h-4 w-4",
|
|
10169
|
+
iconDot: "h-12 w-12",
|
|
10170
|
+
padY: "py-6",
|
|
10171
|
+
densePadY: "py-3.5",
|
|
10172
|
+
title: "text-xl",
|
|
10173
|
+
desc: "text-base",
|
|
10174
|
+
time: "text-sm",
|
|
10175
|
+
icon: "h-6 w-6"
|
|
10176
|
+
}
|
|
10405
10177
|
};
|
|
10406
10178
|
var STATUS_COLOR = {
|
|
10407
10179
|
default: "bg-muted/60",
|
|
@@ -10436,13 +10208,7 @@ var Marker = ({ index, last, size, color, status = "default", lineColor, lineSty
|
|
|
10436
10208
|
style: dotColor ? { background: color } : void 0
|
|
10437
10209
|
}
|
|
10438
10210
|
),
|
|
10439
|
-
!last && showLine && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
10440
|
-
"div",
|
|
10441
|
-
{
|
|
10442
|
-
className: cn("flex-1 border-l-2", LINE_STYLE_MAP[lineStyle]),
|
|
10443
|
-
style: { borderColor: lineColor || "hsl(var(--border))" }
|
|
10444
|
-
}
|
|
10445
|
-
)
|
|
10211
|
+
!last && showLine && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: cn("flex-1 border-l-2", LINE_STYLE_MAP[lineStyle]), style: { borderColor: lineColor || "hsl(var(--border))" } })
|
|
10446
10212
|
] });
|
|
10447
10213
|
};
|
|
10448
10214
|
var TimelineRoot = React36.forwardRef(
|
|
@@ -10467,12 +10233,7 @@ var TimelineRoot = React36.forwardRef(
|
|
|
10467
10233
|
"div",
|
|
10468
10234
|
{
|
|
10469
10235
|
ref,
|
|
10470
|
-
className: cn(
|
|
10471
|
-
"relative",
|
|
10472
|
-
mode === "horizontal" && "flex gap-4 overflow-x-auto",
|
|
10473
|
-
mode === "vertical" && "space-y-0",
|
|
10474
|
-
className
|
|
10475
|
-
),
|
|
10236
|
+
className: cn("relative", mode === "horizontal" && "flex gap-4 overflow-x-auto", mode === "vertical" && "space-y-0", className),
|
|
10476
10237
|
...rest,
|
|
10477
10238
|
children: mode === "vertical" ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "space-y-0", children: content }) : content
|
|
10478
10239
|
}
|
|
@@ -10516,11 +10277,11 @@ var TimelineItem = React36.forwardRef(
|
|
|
10516
10277
|
const padding = ctx.dense ? sz.densePadY : sz.padY;
|
|
10517
10278
|
const variantClasses2 = {
|
|
10518
10279
|
default: "",
|
|
10519
|
-
outlined: "rounded-
|
|
10520
|
-
card: "rounded-
|
|
10280
|
+
outlined: "rounded-xl border border-border bg-card shadow-sm px-4 py-3",
|
|
10281
|
+
card: "rounded-2xl border border-border bg-card shadow-md px-5 py-4",
|
|
10521
10282
|
minimal: "border-l-2 pl-4 py-2",
|
|
10522
|
-
modern: "rounded-
|
|
10523
|
-
gradient: "rounded-
|
|
10283
|
+
modern: "rounded-xl bg-linear-to-r from-card to-muted/20 border border-border/50 px-5 py-4 backdrop-blur-sm",
|
|
10284
|
+
gradient: "rounded-2xl bg-linear-to-br from-primary/10 via-card to-accent/10 border border-primary/20 px-5 py-4 shadow-lg"
|
|
10524
10285
|
};
|
|
10525
10286
|
const contentBox = /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: cn("min-w-0 flex-1", variantClasses2[ctx.variant]), children: [
|
|
10526
10287
|
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "flex items-start justify-between gap-2", children: [
|
|
@@ -10546,25 +10307,87 @@ var TimelineItem = React36.forwardRef(
|
|
|
10546
10307
|
collapsible && isExpanded && expandContent && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "mt-3 pt-3 border-t border-border/50 text-sm", children: expandContent })
|
|
10547
10308
|
] });
|
|
10548
10309
|
const markerWidth = Icon || dot ? "w-auto" : "w-6";
|
|
10549
|
-
const leftSide = /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
10550
|
-
|
|
10551
|
-
|
|
10552
|
-
|
|
10553
|
-
|
|
10554
|
-
|
|
10555
|
-
|
|
10556
|
-
|
|
10310
|
+
const leftSide = /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
10311
|
+
"div",
|
|
10312
|
+
{
|
|
10313
|
+
className: cn("flex items-stretch gap-4", padding, ctx.animate && "animate-in slide-in-from-left duration-500"),
|
|
10314
|
+
style: { animationDelay: ctx.animate ? `${(idx ?? 0) * 100}ms` : void 0 },
|
|
10315
|
+
children: [
|
|
10316
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: cn("shrink-0 flex items-stretch", markerWidth), children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
10317
|
+
Marker,
|
|
10318
|
+
{
|
|
10319
|
+
index: idx ?? 0,
|
|
10320
|
+
last: isLast,
|
|
10321
|
+
size: ctx.size,
|
|
10322
|
+
color,
|
|
10323
|
+
status,
|
|
10324
|
+
lineColor: ctx.lineColor,
|
|
10325
|
+
lineStyle: ctx.lineStyle,
|
|
10326
|
+
active,
|
|
10327
|
+
dot,
|
|
10328
|
+
icon: Icon,
|
|
10329
|
+
showLine: ctx.showLine
|
|
10330
|
+
}
|
|
10331
|
+
) }),
|
|
10332
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "flex-1", children: contentBox })
|
|
10333
|
+
]
|
|
10334
|
+
}
|
|
10335
|
+
);
|
|
10336
|
+
const rightSide = /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
10337
|
+
"div",
|
|
10338
|
+
{
|
|
10339
|
+
className: cn("flex items-stretch gap-4", padding, ctx.animate && "animate-in slide-in-from-right duration-500"),
|
|
10340
|
+
style: { animationDelay: ctx.animate ? `${(idx ?? 0) * 100}ms` : void 0 },
|
|
10341
|
+
children: [
|
|
10342
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "flex-1 flex justify-end", children: contentBox }),
|
|
10343
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: cn("shrink-0 flex items-stretch", markerWidth), children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
10344
|
+
Marker,
|
|
10345
|
+
{
|
|
10346
|
+
index: idx ?? 0,
|
|
10347
|
+
last: isLast,
|
|
10348
|
+
size: ctx.size,
|
|
10349
|
+
color,
|
|
10350
|
+
status,
|
|
10351
|
+
lineColor: ctx.lineColor,
|
|
10352
|
+
lineStyle: ctx.lineStyle,
|
|
10353
|
+
active,
|
|
10354
|
+
dot,
|
|
10355
|
+
icon: Icon,
|
|
10356
|
+
showLine: ctx.showLine
|
|
10357
|
+
}
|
|
10358
|
+
) })
|
|
10359
|
+
]
|
|
10360
|
+
}
|
|
10361
|
+
);
|
|
10557
10362
|
const horizontalItem = /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
10558
10363
|
"div",
|
|
10559
10364
|
{
|
|
10560
|
-
className: cn(
|
|
10561
|
-
"flex flex-col items-center gap-2 min-w-[200px]",
|
|
10562
|
-
ctx.animate && "animate-in fade-in-50 zoom-in-95 duration-500"
|
|
10563
|
-
),
|
|
10365
|
+
className: cn("flex flex-col items-center gap-2 min-w-[200px]", ctx.animate && "animate-in fade-in-50 zoom-in-95 duration-500"),
|
|
10564
10366
|
style: { animationDelay: ctx.animate ? `${(idx ?? 0) * 100}ms` : void 0 },
|
|
10565
10367
|
children: [
|
|
10566
|
-
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
10567
|
-
|
|
10368
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
10369
|
+
Marker,
|
|
10370
|
+
{
|
|
10371
|
+
index: idx ?? 0,
|
|
10372
|
+
last: isLast,
|
|
10373
|
+
size: ctx.size,
|
|
10374
|
+
color,
|
|
10375
|
+
status,
|
|
10376
|
+
lineColor: ctx.lineColor,
|
|
10377
|
+
lineStyle: ctx.lineStyle,
|
|
10378
|
+
active,
|
|
10379
|
+
dot,
|
|
10380
|
+
icon: Icon,
|
|
10381
|
+
showLine: false
|
|
10382
|
+
}
|
|
10383
|
+
),
|
|
10384
|
+
!isLast && ctx.showLine && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
10385
|
+
"div",
|
|
10386
|
+
{
|
|
10387
|
+
className: cn("h-px w-full border-t-2", LINE_STYLE_MAP[ctx.lineStyle]),
|
|
10388
|
+
style: { borderColor: ctx.lineColor || "hsl(var(--border))" }
|
|
10389
|
+
}
|
|
10390
|
+
),
|
|
10568
10391
|
contentBox
|
|
10569
10392
|
]
|
|
10570
10393
|
}
|
|
@@ -10586,7 +10409,7 @@ var Timeline_default = Timeline;
|
|
|
10586
10409
|
var React37 = __toESM(require("react"), 1);
|
|
10587
10410
|
var import_lucide_react25 = require("lucide-react");
|
|
10588
10411
|
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
10589
|
-
var
|
|
10412
|
+
var clamp3 = (n, min, max) => Math.max(min, Math.min(max, n));
|
|
10590
10413
|
function hexToRgb(hex) {
|
|
10591
10414
|
const str = hex.replace(/^#/, "").trim();
|
|
10592
10415
|
if (str.length === 3) {
|
|
@@ -10604,7 +10427,7 @@ function hexToRgb(hex) {
|
|
|
10604
10427
|
return null;
|
|
10605
10428
|
}
|
|
10606
10429
|
function rgbToHex(r, g, b) {
|
|
10607
|
-
return `#${[r, g, b].map((v) =>
|
|
10430
|
+
return `#${[r, g, b].map((v) => clamp3(Math.round(v), 0, 255).toString(16).padStart(2, "0")).join("")}`;
|
|
10608
10431
|
}
|
|
10609
10432
|
function rgbToHsl(r, g, b) {
|
|
10610
10433
|
r /= 255;
|
|
@@ -10665,10 +10488,10 @@ function parseAnyColor(input) {
|
|
|
10665
10488
|
}
|
|
10666
10489
|
const rgbaMatch = s.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})(?:\s*,\s*(\d*\.?\d+))?\s*\)/i);
|
|
10667
10490
|
if (rgbaMatch) {
|
|
10668
|
-
const r =
|
|
10669
|
-
const g =
|
|
10670
|
-
const b =
|
|
10671
|
-
const a = rgbaMatch[4] != null ?
|
|
10491
|
+
const r = clamp3(parseInt(rgbaMatch[1], 10), 0, 255);
|
|
10492
|
+
const g = clamp3(parseInt(rgbaMatch[2], 10), 0, 255);
|
|
10493
|
+
const b = clamp3(parseInt(rgbaMatch[3], 10), 0, 255);
|
|
10494
|
+
const a = rgbaMatch[4] != null ? clamp3(parseFloat(rgbaMatch[4]), 0, 1) : 1;
|
|
10672
10495
|
return { r, g, b, a };
|
|
10673
10496
|
}
|
|
10674
10497
|
const hslaMatch = s.match(/hsla?\(\s*(\d{1,3}(?:\.\d+)?)\s*,?\s*(\d{1,3}(?:\.\d+)?)%?\s*,?\s*(\d{1,3}(?:\.\d+)?)%?(?:\s*,?\s*(\d*\.?\d+))?\s*\)/i);
|
|
@@ -10676,7 +10499,7 @@ function parseAnyColor(input) {
|
|
|
10676
10499
|
const h = parseFloat(hslaMatch[1]);
|
|
10677
10500
|
const sl = parseFloat(hslaMatch[2]);
|
|
10678
10501
|
const l = parseFloat(hslaMatch[3]);
|
|
10679
|
-
const a = hslaMatch[4] != null ?
|
|
10502
|
+
const a = hslaMatch[4] != null ? clamp3(parseFloat(hslaMatch[4]), 0, 1) : 1;
|
|
10680
10503
|
const rgb = hslToRgb(h, sl, l);
|
|
10681
10504
|
return { ...rgb, a };
|
|
10682
10505
|
}
|
|
@@ -10689,12 +10512,12 @@ function formatOutput({ r, g, b, a }, withAlpha, format) {
|
|
|
10689
10512
|
if (format === "hsl" || format === "hsla") {
|
|
10690
10513
|
const hsl = rgbToHsl(r, g, b);
|
|
10691
10514
|
if (format === "hsla" || withAlpha) {
|
|
10692
|
-
return `hsla(${Math.round(hsl.h)}, ${Math.round(hsl.s)}%, ${Math.round(hsl.l)}%, ${
|
|
10515
|
+
return `hsla(${Math.round(hsl.h)}, ${Math.round(hsl.s)}%, ${Math.round(hsl.l)}%, ${clamp3(a, 0, 1)})`;
|
|
10693
10516
|
}
|
|
10694
10517
|
return `hsl(${Math.round(hsl.h)}, ${Math.round(hsl.s)}%, ${Math.round(hsl.l)}%)`;
|
|
10695
10518
|
}
|
|
10696
10519
|
if (withAlpha || a !== 1) {
|
|
10697
|
-
return `rgba(${
|
|
10520
|
+
return `rgba(${clamp3(r, 0, 255)}, ${clamp3(g, 0, 255)}, ${clamp3(b, 0, 255)}, ${clamp3(a, 0, 1)})`;
|
|
10698
10521
|
}
|
|
10699
10522
|
return rgbToHex(r, g, b);
|
|
10700
10523
|
}
|
|
@@ -10748,11 +10571,7 @@ var Swatch = ({
|
|
|
10748
10571
|
"button",
|
|
10749
10572
|
{
|
|
10750
10573
|
type: "button",
|
|
10751
|
-
className: cn(
|
|
10752
|
-
sizeClasses2[size],
|
|
10753
|
-
"rounded-md border border-border shadow-sm hover:scale-110 transition-transform",
|
|
10754
|
-
onClick && "cursor-pointer"
|
|
10755
|
-
),
|
|
10574
|
+
className: cn(sizeClasses2[size], "rounded-lg border border-border shadow-sm hover:scale-110 transition-transform", onClick && "cursor-pointer"),
|
|
10756
10575
|
style: { backgroundColor: color },
|
|
10757
10576
|
onClick,
|
|
10758
10577
|
"aria-label": ariaLabel
|
|
@@ -10832,7 +10651,7 @@ function ColorPicker({
|
|
|
10832
10651
|
emit(next);
|
|
10833
10652
|
};
|
|
10834
10653
|
const setAlpha = (aPct) => {
|
|
10835
|
-
const a =
|
|
10654
|
+
const a = clamp3(aPct / 100, 0, 1);
|
|
10836
10655
|
const next = { ...rgba, a };
|
|
10837
10656
|
setRgba(next);
|
|
10838
10657
|
emit(next);
|
|
@@ -10874,7 +10693,7 @@ function ColorPicker({
|
|
|
10874
10693
|
type: "button",
|
|
10875
10694
|
disabled,
|
|
10876
10695
|
className: cn(
|
|
10877
|
-
"w-full px-3 rounded-
|
|
10696
|
+
"w-full px-3 rounded-xl border border-input bg-background flex items-center justify-between",
|
|
10878
10697
|
sizeClasses2[size],
|
|
10879
10698
|
"hover:border-accent-foreground/30 transition-colors",
|
|
10880
10699
|
disabled && "opacity-50 cursor-not-allowed",
|
|
@@ -10886,10 +10705,7 @@ function ColorPicker({
|
|
|
10886
10705
|
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
10887
10706
|
"span",
|
|
10888
10707
|
{
|
|
10889
|
-
className: cn(
|
|
10890
|
-
"rounded border border-border shadow-sm",
|
|
10891
|
-
size === "sm" ? "h-4 w-4" : size === "lg" ? "h-6 w-6" : "h-5 w-5"
|
|
10892
|
-
),
|
|
10708
|
+
className: cn("rounded-md border border-border shadow-sm", size === "sm" ? "h-4 w-4" : size === "lg" ? "h-6 w-6" : "h-5 w-5"),
|
|
10893
10709
|
style: { backgroundColor: withAlpha ? `rgba(${rgba.r}, ${rgba.g}, ${rgba.b}, ${rgba.a})` : hexForInput }
|
|
10894
10710
|
}
|
|
10895
10711
|
),
|
|
@@ -10914,16 +10730,24 @@ function ColorPicker({
|
|
|
10914
10730
|
placement: "bottom-start",
|
|
10915
10731
|
matchTriggerWidth: variant === "minimal",
|
|
10916
10732
|
contentWidth: contentWidthByVariant[variant],
|
|
10917
|
-
contentClassName: cn("p-3 rounded-
|
|
10733
|
+
contentClassName: cn("p-3 rounded-xl border border-border bg-card shadow-lg", contentClassName),
|
|
10918
10734
|
children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "space-y-3", children: [
|
|
10919
10735
|
variant !== "minimal" && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
10920
|
-
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
10736
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
10737
|
+
"input",
|
|
10738
|
+
{
|
|
10739
|
+
type: "color",
|
|
10740
|
+
value: hexForInput,
|
|
10741
|
+
onChange: handleNativeChange,
|
|
10742
|
+
className: "h-9 w-9 rounded-lg cursor-pointer border border-border"
|
|
10743
|
+
}
|
|
10744
|
+
),
|
|
10921
10745
|
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
10922
10746
|
"button",
|
|
10923
10747
|
{
|
|
10924
10748
|
type: "button",
|
|
10925
10749
|
onClick: tryEyedropper,
|
|
10926
|
-
className: cn("h-9 px-3 rounded-
|
|
10750
|
+
className: cn("h-9 px-3 rounded-lg border border-border text-xs hover:bg-accent/10 transition-colors flex items-center gap-1.5"),
|
|
10927
10751
|
children: [
|
|
10928
10752
|
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_lucide_react25.Pipette, { className: "w-3.5 h-3.5" }),
|
|
10929
10753
|
variant === "full" && "Pick"
|
|
@@ -10936,7 +10760,7 @@ function ColorPicker({
|
|
|
10936
10760
|
type: "button",
|
|
10937
10761
|
onClick: copyToClipboard,
|
|
10938
10762
|
className: cn(
|
|
10939
|
-
"h-9 px-3 rounded-
|
|
10763
|
+
"h-9 px-3 rounded-lg border border-border text-xs hover:bg-accent/10 transition-colors flex items-center gap-1.5",
|
|
10940
10764
|
copied && "bg-green-500/10 border-green-500/30"
|
|
10941
10765
|
),
|
|
10942
10766
|
children: [
|
|
@@ -10950,7 +10774,7 @@ function ColorPicker({
|
|
|
10950
10774
|
{
|
|
10951
10775
|
type: "button",
|
|
10952
10776
|
onClick: clear,
|
|
10953
|
-
className: "ml-auto h-9 px-2 rounded-
|
|
10777
|
+
className: "ml-auto h-9 px-2 rounded-lg border border-border text-xs hover:bg-destructive/10 transition-colors flex items-center gap-1",
|
|
10954
10778
|
children: [
|
|
10955
10779
|
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_lucide_react25.X, { className: "w-3.5 h-3.5" }),
|
|
10956
10780
|
variant === "full" && "Clear"
|
|
@@ -10976,14 +10800,27 @@ function ColorPicker({
|
|
|
10976
10800
|
type: "button",
|
|
10977
10801
|
onClick: copyToClipboard,
|
|
10978
10802
|
className: cn(
|
|
10979
|
-
"h-9 w-9 rounded-
|
|
10803
|
+
"h-9 w-9 rounded-lg border border-border hover:bg-accent/10 transition-colors flex items-center justify-center",
|
|
10980
10804
|
copied && "bg-green-500/10 border-green-500/30"
|
|
10981
10805
|
),
|
|
10982
10806
|
children: copied ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_lucide_react25.Check, { className: "w-3.5 h-3.5 text-green-600" }) : /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_lucide_react25.Copy, { className: "w-3.5 h-3.5" })
|
|
10983
10807
|
}
|
|
10984
10808
|
)
|
|
10985
10809
|
] }),
|
|
10986
|
-
withAlpha && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "pt-1", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
10810
|
+
withAlpha && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "pt-1", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
10811
|
+
Slider,
|
|
10812
|
+
{
|
|
10813
|
+
min: 0,
|
|
10814
|
+
max: 100,
|
|
10815
|
+
step: 1,
|
|
10816
|
+
value: alphaPct,
|
|
10817
|
+
onChange: (v) => setAlpha(v),
|
|
10818
|
+
label: "Alpha",
|
|
10819
|
+
showValue: true,
|
|
10820
|
+
formatValue: (v) => `${v}%`,
|
|
10821
|
+
size: "sm"
|
|
10822
|
+
}
|
|
10823
|
+
) }),
|
|
10987
10824
|
variant !== "minimal" && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { children: [
|
|
10988
10825
|
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "text-xs font-medium text-muted-foreground mb-2 flex items-center gap-1.5", children: [
|
|
10989
10826
|
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_lucide_react25.Palette, { className: "w-3.5 h-3.5" }),
|
|
@@ -11120,14 +10957,14 @@ function joinAreas(areas) {
|
|
|
11120
10957
|
}
|
|
11121
10958
|
function getVariantClasses(variant = "default", outlined) {
|
|
11122
10959
|
if (outlined) {
|
|
11123
|
-
return "rounded-
|
|
10960
|
+
return "rounded-xl md:rounded-2xl bg-card text-card-foreground border border-border shadow-sm";
|
|
11124
10961
|
}
|
|
11125
10962
|
const variants = {
|
|
11126
10963
|
default: "",
|
|
11127
|
-
bordered: "border border-border rounded-
|
|
11128
|
-
card: "rounded-
|
|
11129
|
-
flat: "bg-muted/30 rounded-
|
|
11130
|
-
glass: "bg-background/80 backdrop-blur-sm border border-border/50 rounded-
|
|
10964
|
+
bordered: "border border-border rounded-xl",
|
|
10965
|
+
card: "rounded-xl md:rounded-2xl bg-card text-card-foreground border border-border shadow-sm",
|
|
10966
|
+
flat: "bg-muted/30 rounded-xl",
|
|
10967
|
+
glass: "bg-background/80 backdrop-blur-sm border border-border/50 rounded-xl shadow-lg"
|
|
11131
10968
|
};
|
|
11132
10969
|
return variants[variant] || "";
|
|
11133
10970
|
}
|
|
@@ -11203,12 +11040,7 @@ var GridRoot = import_react21.default.forwardRef(
|
|
|
11203
11040
|
"div",
|
|
11204
11041
|
{
|
|
11205
11042
|
ref,
|
|
11206
|
-
className: cn(
|
|
11207
|
-
baseClass,
|
|
11208
|
-
getVariantClasses(variant, outlined),
|
|
11209
|
-
animated && "transition-all duration-300 ease-in-out",
|
|
11210
|
-
className
|
|
11211
|
-
),
|
|
11043
|
+
className: cn(baseClass, getVariantClasses(variant, outlined), animated && "transition-all duration-300 ease-in-out", className),
|
|
11212
11044
|
style,
|
|
11213
11045
|
...rest,
|
|
11214
11046
|
children: [
|
|
@@ -11267,10 +11099,7 @@ var GridItem = import_react21.default.forwardRef(
|
|
|
11267
11099
|
"div",
|
|
11268
11100
|
{
|
|
11269
11101
|
ref,
|
|
11270
|
-
className: cn(
|
|
11271
|
-
hoverable && "transition-all duration-200 hover:scale-[1.02] hover:shadow-md cursor-pointer",
|
|
11272
|
-
className
|
|
11273
|
-
),
|
|
11102
|
+
className: cn(hoverable && "transition-all duration-200 hover:scale-[1.02] hover:shadow-md cursor-pointer", className),
|
|
11274
11103
|
style: st,
|
|
11275
11104
|
...rest
|
|
11276
11105
|
}
|
|
@@ -11287,7 +11116,7 @@ var import_react23 = require("react");
|
|
|
11287
11116
|
|
|
11288
11117
|
// ../../components/ui/ChartTooltip.tsx
|
|
11289
11118
|
var import_react22 = require("react");
|
|
11290
|
-
var
|
|
11119
|
+
var import_react_dom6 = require("react-dom");
|
|
11291
11120
|
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
11292
11121
|
function ChartTooltip({ x, y, visible, label, value, color, secondaryLabel, secondaryValue, items, containerRef }) {
|
|
11293
11122
|
const [isMounted, setIsMounted] = (0, import_react22.useState)(false);
|
|
@@ -11320,7 +11149,7 @@ function ChartTooltip({ x, y, visible, label, value, color, secondaryLabel, seco
|
|
|
11320
11149
|
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
11321
11150
|
"div",
|
|
11322
11151
|
{
|
|
11323
|
-
className: cn("bg-popover text-popover-foreground border border-border", "rounded-
|
|
11152
|
+
className: cn("bg-popover text-popover-foreground border border-border", "rounded-xl shadow-xl px-3 py-2 text-sm", "backdrop-blur-sm"),
|
|
11324
11153
|
style: {
|
|
11325
11154
|
minWidth: "80px",
|
|
11326
11155
|
width: "max-content",
|
|
@@ -11358,7 +11187,7 @@ function ChartTooltip({ x, y, visible, label, value, color, secondaryLabel, seco
|
|
|
11358
11187
|
]
|
|
11359
11188
|
}
|
|
11360
11189
|
);
|
|
11361
|
-
return (0,
|
|
11190
|
+
return (0, import_react_dom6.createPortal)(tooltipContent, document.body);
|
|
11362
11191
|
}
|
|
11363
11192
|
|
|
11364
11193
|
// ../../components/ui/LineChart.tsx
|
|
@@ -11859,7 +11688,7 @@ function PieChart({
|
|
|
11859
11688
|
className: "flex items-center gap-2 text-sm",
|
|
11860
11689
|
style: animated ? { opacity: 0, animation: `fadeIn 0.3s ease-out ${i * 0.1 + 0.3}s forwards` } : void 0,
|
|
11861
11690
|
children: [
|
|
11862
|
-
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "w-3 h-3 rounded-
|
|
11691
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "w-3 h-3 rounded-md shrink-0", style: { backgroundColor: seg.color } }),
|
|
11863
11692
|
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "text-muted-foreground", children: seg.label }),
|
|
11864
11693
|
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "text-foreground font-medium ml-auto", children: showPercentage ? `${(seg.percentage * 100).toFixed(0)}%` : seg.value })
|
|
11865
11694
|
]
|
|
@@ -12115,7 +11944,7 @@ function AreaChart({
|
|
|
12115
11944
|
className: "flex items-center gap-2 text-sm",
|
|
12116
11945
|
style: animated ? { opacity: 0, animation: `fadeIn 0.3s ease-out ${i * 0.1 + 0.5}s forwards` } : void 0,
|
|
12117
11946
|
children: [
|
|
12118
|
-
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "w-3 h-3 rounded-
|
|
11947
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "w-3 h-3 rounded-md", style: { backgroundColor: s.color } }),
|
|
12119
11948
|
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "text-muted-foreground", children: s.name })
|
|
12120
11949
|
]
|
|
12121
11950
|
},
|
|
@@ -12458,7 +12287,7 @@ function RadarChart({
|
|
|
12458
12287
|
className: "flex items-center gap-2 text-sm",
|
|
12459
12288
|
style: animated ? { opacity: 0, animation: `fadeIn 0.3s ease-out ${i * 0.1 + 0.5}s forwards` } : void 0,
|
|
12460
12289
|
children: [
|
|
12461
|
-
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "w-3 h-3 rounded-
|
|
12290
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "w-3 h-3 rounded-md", style: { backgroundColor: s.color } }),
|
|
12462
12291
|
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "text-muted-foreground", children: s.name })
|
|
12463
12292
|
]
|
|
12464
12293
|
},
|
|
@@ -12754,7 +12583,7 @@ var Table = import_react31.default.forwardRef(({ className, containerClassName,
|
|
|
12754
12583
|
{
|
|
12755
12584
|
className: cn(
|
|
12756
12585
|
"relative w-full overflow-auto",
|
|
12757
|
-
"rounded-
|
|
12586
|
+
"rounded-2xl md:rounded-3xl border border-border",
|
|
12758
12587
|
"bg-card text-card-foreground shadow-sm",
|
|
12759
12588
|
"backdrop-blur-sm transition-all duration-300",
|
|
12760
12589
|
containerClassName
|
|
@@ -12971,7 +12800,7 @@ function DataTable({
|
|
|
12971
12800
|
"button",
|
|
12972
12801
|
{
|
|
12973
12802
|
className: cn(
|
|
12974
|
-
"p-1 rounded-
|
|
12803
|
+
"p-1 rounded-lg transition-all duration-200 hover:bg-accent",
|
|
12975
12804
|
sort?.key === col.key ? "opacity-100 bg-accent" : "opacity-60 hover:opacity-100"
|
|
12976
12805
|
),
|
|
12977
12806
|
onClick: () => {
|
|
@@ -13019,7 +12848,7 @@ function DataTable({
|
|
|
13019
12848
|
"button",
|
|
13020
12849
|
{
|
|
13021
12850
|
className: cn(
|
|
13022
|
-
"p-1.5 rounded-
|
|
12851
|
+
"p-1.5 rounded-lg hover:bg-accent text-muted-foreground hover:text-foreground transition-colors",
|
|
13023
12852
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
|
|
13024
12853
|
filters[col.key] && "bg-accent text-foreground"
|
|
13025
12854
|
),
|
|
@@ -13153,7 +12982,7 @@ function DataTable({
|
|
|
13153
12982
|
setVisibleCols((prev) => prev.includes(c.key) ? prev.filter((k) => k !== c.key) : [...prev, c.key]);
|
|
13154
12983
|
},
|
|
13155
12984
|
children: [
|
|
13156
|
-
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("input", { type: "checkbox", className: "mr-2 rounded border-border", readOnly: true, checked: visibleCols.includes(c.key) }),
|
|
12985
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("input", { type: "checkbox", className: "mr-2 rounded-md border-border", readOnly: true, checked: visibleCols.includes(c.key) }),
|
|
13157
12986
|
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "truncate", children: c.title })
|
|
13158
12987
|
]
|
|
13159
12988
|
},
|
|
@@ -13178,7 +13007,7 @@ function DataTable({
|
|
|
13178
13007
|
toolbar
|
|
13179
13008
|
] })
|
|
13180
13009
|
] }),
|
|
13181
|
-
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: cn("relative rounded-md border border-border/50 overflow-hidden", loading2 && "opacity-60 pointer-events-none"), children: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
|
|
13010
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: cn("relative rounded-2xl md:rounded-3xl border border-border/50 overflow-hidden", loading2 && "opacity-60 pointer-events-none"), children: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
|
|
13182
13011
|
Table,
|
|
13183
13012
|
{
|
|
13184
13013
|
containerClassName: "border-0 md:border-0 rounded-none md:rounded-none shadow-none bg-transparent",
|
|
@@ -13222,8 +13051,8 @@ function DataTable({
|
|
|
13222
13051
|
col.align === "right" && "text-right",
|
|
13223
13052
|
col.align === "center" && "text-center",
|
|
13224
13053
|
columnDividers && colIdx > 0 && "border-l border-border/60",
|
|
13225
|
-
isLastRow && col === visibleColumns[0] && "rounded-bl-md",
|
|
13226
|
-
isLastRow && col === visibleColumns[visibleColumns.length - 1] && "rounded-br-md"
|
|
13054
|
+
isLastRow && col === visibleColumns[0] && "rounded-bl-2xl md:rounded-bl-3xl",
|
|
13055
|
+
isLastRow && col === visibleColumns[visibleColumns.length - 1] && "rounded-br-2xl md:rounded-br-3xl"
|
|
13227
13056
|
),
|
|
13228
13057
|
children: col.render ? col.render(value, row, idx) : String(value ?? "")
|
|
13229
13058
|
},
|
|
@@ -13267,7 +13096,7 @@ function DataTable({
|
|
|
13267
13096
|
{
|
|
13268
13097
|
onClick: () => setCurPage(p),
|
|
13269
13098
|
className: cn(
|
|
13270
|
-
"h-7 min-w-7 px-1.5 rounded text-xs font-medium transition-colors",
|
|
13099
|
+
"h-7 min-w-7 px-1.5 rounded-lg text-xs font-medium transition-colors",
|
|
13271
13100
|
curPage === p ? "bg-primary text-primary-foreground" : "hover:bg-accent hover:text-accent-foreground"
|
|
13272
13101
|
),
|
|
13273
13102
|
children: p
|
|
@@ -13620,7 +13449,7 @@ function AccessDenied({
|
|
|
13620
13449
|
// ../../components/ui/ThemeToggleHeadless.tsx
|
|
13621
13450
|
var import_lucide_react31 = require("lucide-react");
|
|
13622
13451
|
var import_react33 = require("react");
|
|
13623
|
-
var
|
|
13452
|
+
var import_react_dom7 = require("react-dom");
|
|
13624
13453
|
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
13625
13454
|
function ThemeToggleHeadless({
|
|
13626
13455
|
theme,
|
|
@@ -13673,8 +13502,8 @@ function ThemeToggleHeadless({
|
|
|
13673
13502
|
}
|
|
13674
13503
|
),
|
|
13675
13504
|
isOpen && /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_jsx_runtime62.Fragment, { children: [
|
|
13676
|
-
typeof window !== "undefined" && (0,
|
|
13677
|
-
typeof window !== "undefined" && dropdownPosition && (0,
|
|
13505
|
+
typeof window !== "undefined" && (0, import_react_dom7.createPortal)(/* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "fixed inset-0 z-9998", onClick: () => setIsOpen(false) }), document.body),
|
|
13506
|
+
typeof window !== "undefined" && dropdownPosition && (0, import_react_dom7.createPortal)(
|
|
13678
13507
|
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
13679
13508
|
"div",
|
|
13680
13509
|
{
|
|
@@ -13722,7 +13551,7 @@ function ThemeToggleHeadless({
|
|
|
13722
13551
|
|
|
13723
13552
|
// ../../components/ui/LanguageSwitcherHeadless.tsx
|
|
13724
13553
|
var import_react34 = require("react");
|
|
13725
|
-
var
|
|
13554
|
+
var import_react_dom8 = require("react-dom");
|
|
13726
13555
|
var import_lucide_react32 = require("lucide-react");
|
|
13727
13556
|
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
13728
13557
|
function LanguageSwitcherHeadless({
|
|
@@ -13770,8 +13599,8 @@ function LanguageSwitcherHeadless({
|
|
|
13770
13599
|
}
|
|
13771
13600
|
),
|
|
13772
13601
|
isOpen && /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(import_jsx_runtime63.Fragment, { children: [
|
|
13773
|
-
typeof window !== "undefined" && (0,
|
|
13774
|
-
typeof window !== "undefined" && dropdownPosition && (0,
|
|
13602
|
+
typeof window !== "undefined" && (0, import_react_dom8.createPortal)(/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "fixed inset-0 z-9998", onClick: () => setIsOpen(false) }), document.body),
|
|
13603
|
+
typeof window !== "undefined" && dropdownPosition && (0, import_react_dom8.createPortal)(
|
|
13775
13604
|
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
13776
13605
|
"div",
|
|
13777
13606
|
{
|