@underverse-ui/underverse 0.1.13 → 0.1.14
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 +557 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +131 -1
- package/dist/index.d.ts +131 -1
- package/dist/index.js +538 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1440,6 +1440,148 @@ var Skeleton = ({
|
|
|
1440
1440
|
}
|
|
1441
1441
|
);
|
|
1442
1442
|
};
|
|
1443
|
+
var SkeletonAvatar = ({
|
|
1444
|
+
size = "md",
|
|
1445
|
+
className
|
|
1446
|
+
}) => {
|
|
1447
|
+
const sizeClasses2 = {
|
|
1448
|
+
sm: "w-8 h-8",
|
|
1449
|
+
md: "w-10 h-10",
|
|
1450
|
+
lg: "w-12 h-12"
|
|
1451
|
+
};
|
|
1452
|
+
return /* @__PURE__ */ jsx10(
|
|
1453
|
+
Skeleton,
|
|
1454
|
+
{
|
|
1455
|
+
variant: "circular",
|
|
1456
|
+
className: cn(sizeClasses2[size], className)
|
|
1457
|
+
}
|
|
1458
|
+
);
|
|
1459
|
+
};
|
|
1460
|
+
var SkeletonButton = ({
|
|
1461
|
+
size = "md",
|
|
1462
|
+
className
|
|
1463
|
+
}) => {
|
|
1464
|
+
const sizeClasses2 = {
|
|
1465
|
+
sm: "h-8 w-20",
|
|
1466
|
+
md: "h-10 w-24",
|
|
1467
|
+
lg: "h-12 w-28"
|
|
1468
|
+
};
|
|
1469
|
+
return /* @__PURE__ */ jsx10(
|
|
1470
|
+
Skeleton,
|
|
1471
|
+
{
|
|
1472
|
+
variant: "rounded",
|
|
1473
|
+
className: cn(sizeClasses2[size], className)
|
|
1474
|
+
}
|
|
1475
|
+
);
|
|
1476
|
+
};
|
|
1477
|
+
var SkeletonText = ({
|
|
1478
|
+
lines = 3,
|
|
1479
|
+
className,
|
|
1480
|
+
width = "100%"
|
|
1481
|
+
}) => {
|
|
1482
|
+
return /* @__PURE__ */ jsx10(
|
|
1483
|
+
Skeleton,
|
|
1484
|
+
{
|
|
1485
|
+
variant: "text",
|
|
1486
|
+
lines,
|
|
1487
|
+
width,
|
|
1488
|
+
className
|
|
1489
|
+
}
|
|
1490
|
+
);
|
|
1491
|
+
};
|
|
1492
|
+
var SkeletonCard = ({
|
|
1493
|
+
showAvatar = true,
|
|
1494
|
+
showImage = false,
|
|
1495
|
+
textLines = 3,
|
|
1496
|
+
className
|
|
1497
|
+
}) => {
|
|
1498
|
+
return /* @__PURE__ */ jsxs9("div", { className: cn("p-4 space-y-4 rounded-lg border bg-card", className), children: [
|
|
1499
|
+
showAvatar && /* @__PURE__ */ jsxs9("div", { className: "flex items-center space-x-3", children: [
|
|
1500
|
+
/* @__PURE__ */ jsx10(SkeletonAvatar, {}),
|
|
1501
|
+
/* @__PURE__ */ jsxs9("div", { className: "space-y-2", children: [
|
|
1502
|
+
/* @__PURE__ */ jsx10(Skeleton, { className: "h-4 w-24" }),
|
|
1503
|
+
/* @__PURE__ */ jsx10(Skeleton, { className: "h-3 w-16" })
|
|
1504
|
+
] })
|
|
1505
|
+
] }),
|
|
1506
|
+
showImage && /* @__PURE__ */ jsx10(Skeleton, { className: "h-48 w-full rounded-md" }),
|
|
1507
|
+
/* @__PURE__ */ jsx10(SkeletonText, { lines: textLines }),
|
|
1508
|
+
/* @__PURE__ */ jsxs9("div", { className: "flex space-x-2", children: [
|
|
1509
|
+
/* @__PURE__ */ jsx10(SkeletonButton, { size: "sm" }),
|
|
1510
|
+
/* @__PURE__ */ jsx10(SkeletonButton, { size: "sm" })
|
|
1511
|
+
] })
|
|
1512
|
+
] });
|
|
1513
|
+
};
|
|
1514
|
+
var SkeletonPost = ({ className }) => {
|
|
1515
|
+
return /* @__PURE__ */ jsxs9("div", { className: cn("p-6 space-y-4 rounded-xl border bg-card", className), children: [
|
|
1516
|
+
/* @__PURE__ */ jsxs9("div", { className: "flex items-center space-x-3", children: [
|
|
1517
|
+
/* @__PURE__ */ jsx10(SkeletonAvatar, { size: "lg" }),
|
|
1518
|
+
/* @__PURE__ */ jsxs9("div", { className: "space-y-2", children: [
|
|
1519
|
+
/* @__PURE__ */ jsx10(Skeleton, { className: "h-4 w-32" }),
|
|
1520
|
+
/* @__PURE__ */ jsx10(Skeleton, { className: "h-3 w-20" })
|
|
1521
|
+
] })
|
|
1522
|
+
] }),
|
|
1523
|
+
/* @__PURE__ */ jsx10(SkeletonText, { lines: 2 }),
|
|
1524
|
+
/* @__PURE__ */ jsx10(Skeleton, { className: "h-64 w-full rounded-lg" }),
|
|
1525
|
+
/* @__PURE__ */ jsxs9("div", { className: "flex items-center space-x-4", children: [
|
|
1526
|
+
/* @__PURE__ */ jsx10(Skeleton, { className: "h-3 w-16" }),
|
|
1527
|
+
/* @__PURE__ */ jsx10(Skeleton, { className: "h-3 w-20" }),
|
|
1528
|
+
/* @__PURE__ */ jsx10(Skeleton, { className: "h-3 w-12" })
|
|
1529
|
+
] }),
|
|
1530
|
+
/* @__PURE__ */ jsx10("div", { className: "flex items-center justify-between pt-2 border-t border-border", children: /* @__PURE__ */ jsxs9("div", { className: "flex space-x-4", children: [
|
|
1531
|
+
/* @__PURE__ */ jsx10(Skeleton, { className: "h-8 w-16" }),
|
|
1532
|
+
/* @__PURE__ */ jsx10(Skeleton, { className: "h-8 w-20" }),
|
|
1533
|
+
/* @__PURE__ */ jsx10(Skeleton, { className: "h-8 w-16" })
|
|
1534
|
+
] }) })
|
|
1535
|
+
] });
|
|
1536
|
+
};
|
|
1537
|
+
var SkeletonMessage = ({
|
|
1538
|
+
own = false,
|
|
1539
|
+
showAvatar = true,
|
|
1540
|
+
className
|
|
1541
|
+
}) => {
|
|
1542
|
+
return /* @__PURE__ */ jsxs9("div", { className: cn(
|
|
1543
|
+
"flex items-end space-x-2",
|
|
1544
|
+
own && "flex-row-reverse space-x-reverse",
|
|
1545
|
+
className
|
|
1546
|
+
), children: [
|
|
1547
|
+
showAvatar && !own && /* @__PURE__ */ jsx10(SkeletonAvatar, { size: "sm" }),
|
|
1548
|
+
/* @__PURE__ */ jsxs9("div", { className: cn(
|
|
1549
|
+
"max-w-xs space-y-1",
|
|
1550
|
+
own ? "items-end" : "items-start"
|
|
1551
|
+
), children: [
|
|
1552
|
+
/* @__PURE__ */ jsx10(Skeleton, { className: cn(
|
|
1553
|
+
"h-10 rounded-2xl",
|
|
1554
|
+
own ? "w-32 bg-primary/20" : "w-40 bg-muted"
|
|
1555
|
+
) }),
|
|
1556
|
+
/* @__PURE__ */ jsx10(Skeleton, { className: "h-3 w-12" })
|
|
1557
|
+
] })
|
|
1558
|
+
] });
|
|
1559
|
+
};
|
|
1560
|
+
var SkeletonList = ({
|
|
1561
|
+
items = 5,
|
|
1562
|
+
itemHeight = 60,
|
|
1563
|
+
showAvatar = true,
|
|
1564
|
+
className
|
|
1565
|
+
}) => {
|
|
1566
|
+
return /* @__PURE__ */ jsx10("div", { className: cn("space-y-3", className), children: Array.from({ length: items }).map((_, index) => /* @__PURE__ */ jsxs9("div", { className: "flex items-center space-x-3 p-3 rounded-lg", children: [
|
|
1567
|
+
showAvatar && /* @__PURE__ */ jsx10(SkeletonAvatar, {}),
|
|
1568
|
+
/* @__PURE__ */ jsxs9("div", { className: "flex-1 space-y-2", children: [
|
|
1569
|
+
/* @__PURE__ */ jsx10(Skeleton, { className: "h-4 w-3/4" }),
|
|
1570
|
+
/* @__PURE__ */ jsx10(Skeleton, { className: "h-3 w-1/2" })
|
|
1571
|
+
] }),
|
|
1572
|
+
/* @__PURE__ */ jsx10(Skeleton, { className: "h-6 w-16" })
|
|
1573
|
+
] }, index)) });
|
|
1574
|
+
};
|
|
1575
|
+
var SkeletonTable = ({
|
|
1576
|
+
rows = 5,
|
|
1577
|
+
columns = 4,
|
|
1578
|
+
className
|
|
1579
|
+
}) => {
|
|
1580
|
+
return /* @__PURE__ */ jsxs9("div", { className: cn("space-y-3", className), children: [
|
|
1581
|
+
/* @__PURE__ */ jsx10("div", { className: "flex space-x-4 p-3 border-b border-border", children: Array.from({ length: columns }).map((_, index) => /* @__PURE__ */ jsx10(Skeleton, { className: "h-4 flex-1" }, index)) }),
|
|
1582
|
+
Array.from({ length: rows }).map((_, rowIndex) => /* @__PURE__ */ jsx10("div", { className: "flex space-x-4 p-3", children: Array.from({ length: columns }).map((_2, colIndex) => /* @__PURE__ */ jsx10(Skeleton, { className: "h-4 flex-1" }, colIndex)) }, rowIndex))
|
|
1583
|
+
] });
|
|
1584
|
+
};
|
|
1443
1585
|
var Skeleton_default = Skeleton;
|
|
1444
1586
|
|
|
1445
1587
|
// ../../components/ui/Progress.tsx
|
|
@@ -1538,7 +1680,356 @@ var Progress = ({
|
|
|
1538
1680
|
)
|
|
1539
1681
|
] });
|
|
1540
1682
|
};
|
|
1541
|
-
var
|
|
1683
|
+
var CircularProgress = ({
|
|
1684
|
+
value,
|
|
1685
|
+
max = 100,
|
|
1686
|
+
size = 64,
|
|
1687
|
+
strokeWidth = 4,
|
|
1688
|
+
className,
|
|
1689
|
+
variant = "primary",
|
|
1690
|
+
showValue = false,
|
|
1691
|
+
children,
|
|
1692
|
+
indeterminate = false,
|
|
1693
|
+
status = "normal",
|
|
1694
|
+
trackColor = "stroke-muted/20"
|
|
1695
|
+
}) => {
|
|
1696
|
+
const percentage = Math.min(Math.max(value / max * 100, 0), 100);
|
|
1697
|
+
const radius = (size - strokeWidth) / 2;
|
|
1698
|
+
const circumference = radius * Math.PI * 2;
|
|
1699
|
+
const offset = circumference - percentage / 100 * circumference;
|
|
1700
|
+
const isComplete = status === "complete" || percentage >= 100;
|
|
1701
|
+
const isError = status === "error";
|
|
1702
|
+
const variantColors = {
|
|
1703
|
+
default: "stroke-muted-foreground",
|
|
1704
|
+
primary: "stroke-primary",
|
|
1705
|
+
success: "stroke-success",
|
|
1706
|
+
warning: "stroke-warning",
|
|
1707
|
+
danger: "stroke-destructive",
|
|
1708
|
+
info: "stroke-info"
|
|
1709
|
+
};
|
|
1710
|
+
const getContentIcon = () => {
|
|
1711
|
+
if (isComplete) return /* @__PURE__ */ jsx11(Check2, { className: "w-5 h-5 text-success" });
|
|
1712
|
+
if (isError) return /* @__PURE__ */ jsx11(X2, { className: "w-5 h-5 text-destructive" });
|
|
1713
|
+
return null;
|
|
1714
|
+
};
|
|
1715
|
+
return /* @__PURE__ */ jsxs10(
|
|
1716
|
+
"div",
|
|
1717
|
+
{
|
|
1718
|
+
className: cn("relative inline-flex items-center justify-center", className),
|
|
1719
|
+
role: "progressbar",
|
|
1720
|
+
"aria-valuemin": 0,
|
|
1721
|
+
"aria-valuemax": indeterminate ? void 0 : max,
|
|
1722
|
+
"aria-valuenow": indeterminate ? void 0 : Math.round(percentage),
|
|
1723
|
+
"aria-label": children ? void 0 : "Progress",
|
|
1724
|
+
children: [
|
|
1725
|
+
/* @__PURE__ */ jsxs10(
|
|
1726
|
+
"svg",
|
|
1727
|
+
{
|
|
1728
|
+
width: size,
|
|
1729
|
+
height: size,
|
|
1730
|
+
className: cn(
|
|
1731
|
+
"transform -rotate-90",
|
|
1732
|
+
indeterminate && "animate-spin"
|
|
1733
|
+
),
|
|
1734
|
+
style: { animationDuration: indeterminate ? "2s" : void 0 },
|
|
1735
|
+
children: [
|
|
1736
|
+
/* @__PURE__ */ jsx11(
|
|
1737
|
+
"circle",
|
|
1738
|
+
{
|
|
1739
|
+
cx: size / 2,
|
|
1740
|
+
cy: size / 2,
|
|
1741
|
+
r: radius,
|
|
1742
|
+
stroke: "currentColor",
|
|
1743
|
+
strokeWidth,
|
|
1744
|
+
fill: "transparent",
|
|
1745
|
+
className: trackColor
|
|
1746
|
+
}
|
|
1747
|
+
),
|
|
1748
|
+
/* @__PURE__ */ jsx11(
|
|
1749
|
+
"circle",
|
|
1750
|
+
{
|
|
1751
|
+
cx: size / 2,
|
|
1752
|
+
cy: size / 2,
|
|
1753
|
+
r: radius,
|
|
1754
|
+
strokeWidth,
|
|
1755
|
+
fill: "transparent",
|
|
1756
|
+
strokeDasharray: circumference,
|
|
1757
|
+
strokeDashoffset: indeterminate ? circumference * 0.25 : offset,
|
|
1758
|
+
className: cn(
|
|
1759
|
+
"transition-all duration-700 ease-out",
|
|
1760
|
+
isComplete ? "stroke-success" : isError ? "stroke-destructive" : variantColors[variant],
|
|
1761
|
+
"drop-shadow-sm"
|
|
1762
|
+
),
|
|
1763
|
+
strokeLinecap: "round",
|
|
1764
|
+
style: {
|
|
1765
|
+
filter: `drop-shadow(0 0 4px ${isComplete ? "hsl(var(--success) / 0.3)" : isError ? "hsl(var(--destructive) / 0.3)" : "hsl(var(--primary) / 0.2)"})`
|
|
1766
|
+
}
|
|
1767
|
+
}
|
|
1768
|
+
)
|
|
1769
|
+
]
|
|
1770
|
+
}
|
|
1771
|
+
),
|
|
1772
|
+
/* @__PURE__ */ jsx11("div", { className: "absolute inset-0 flex flex-col items-center justify-center text-center", children: children ? children : /* @__PURE__ */ jsxs10(Fragment2, { children: [
|
|
1773
|
+
getContentIcon(),
|
|
1774
|
+
showValue && !indeterminate && /* @__PURE__ */ jsx11("span", { className: cn(
|
|
1775
|
+
"text-sm font-semibold",
|
|
1776
|
+
isComplete ? "text-success" : isError ? "text-destructive" : "text-foreground"
|
|
1777
|
+
), children: isComplete ? "\u2713" : isError ? "\u2717" : `${Math.round(percentage)}%` }),
|
|
1778
|
+
indeterminate && /* @__PURE__ */ jsx11(Clock, { className: "w-4 h-4 text-muted-foreground animate-pulse" })
|
|
1779
|
+
] }) })
|
|
1780
|
+
]
|
|
1781
|
+
}
|
|
1782
|
+
);
|
|
1783
|
+
};
|
|
1784
|
+
var StepProgress = ({
|
|
1785
|
+
steps,
|
|
1786
|
+
currentStep,
|
|
1787
|
+
className,
|
|
1788
|
+
variant = "primary",
|
|
1789
|
+
size = "md"
|
|
1790
|
+
}) => {
|
|
1791
|
+
const stepSizes = {
|
|
1792
|
+
sm: "w-6 h-6 text-xs",
|
|
1793
|
+
md: "w-8 h-8 text-sm",
|
|
1794
|
+
lg: "w-10 h-10 text-base"
|
|
1795
|
+
};
|
|
1796
|
+
const getStepStatus = (stepIndex) => {
|
|
1797
|
+
if (stepIndex < currentStep) return "completed";
|
|
1798
|
+
if (stepIndex === currentStep) return "current";
|
|
1799
|
+
return "upcoming";
|
|
1800
|
+
};
|
|
1801
|
+
return /* @__PURE__ */ jsx11("div", { className: cn("w-full", className), role: "list", "aria-label": "Progress steps", children: /* @__PURE__ */ jsx11("div", { className: "flex items-center justify-between", children: steps.map((step, index) => {
|
|
1802
|
+
const status = getStepStatus(index);
|
|
1803
|
+
return /* @__PURE__ */ jsxs10("div", { className: "flex items-center", role: "listitem", "aria-current": status === "current" ? "step" : void 0, children: [
|
|
1804
|
+
/* @__PURE__ */ jsx11(
|
|
1805
|
+
"div",
|
|
1806
|
+
{
|
|
1807
|
+
className: cn(
|
|
1808
|
+
"rounded-full border-2 flex items-center justify-center font-medium transition-all duration-300",
|
|
1809
|
+
"shadow-sm hover:shadow-md",
|
|
1810
|
+
stepSizes[size],
|
|
1811
|
+
status === "completed" && [
|
|
1812
|
+
"border-success bg-success text-success-foreground",
|
|
1813
|
+
"shadow-success/20"
|
|
1814
|
+
],
|
|
1815
|
+
status === "current" && [
|
|
1816
|
+
"border-primary bg-primary/10 text-primary",
|
|
1817
|
+
"ring-2 ring-primary/20 ring-offset-2",
|
|
1818
|
+
"shadow-primary/20"
|
|
1819
|
+
],
|
|
1820
|
+
status === "upcoming" && [
|
|
1821
|
+
"border-muted-foreground/30 text-muted-foreground bg-background",
|
|
1822
|
+
"hover:border-muted-foreground/50"
|
|
1823
|
+
]
|
|
1824
|
+
),
|
|
1825
|
+
children: status === "completed" ? /* @__PURE__ */ jsx11(Check2, { className: "w-3 h-3" }) : index + 1
|
|
1826
|
+
}
|
|
1827
|
+
),
|
|
1828
|
+
/* @__PURE__ */ jsx11(
|
|
1829
|
+
"span",
|
|
1830
|
+
{
|
|
1831
|
+
className: cn(
|
|
1832
|
+
"ml-2 text-sm font-medium transition-colors duration-200",
|
|
1833
|
+
status === "completed" && variantStyles2[variant].replace("bg-", "text-"),
|
|
1834
|
+
status === "current" && "text-foreground",
|
|
1835
|
+
status === "upcoming" && "text-muted-foreground"
|
|
1836
|
+
),
|
|
1837
|
+
children: step
|
|
1838
|
+
}
|
|
1839
|
+
),
|
|
1840
|
+
index < steps.length - 1 && /* @__PURE__ */ jsx11(
|
|
1841
|
+
"div",
|
|
1842
|
+
{
|
|
1843
|
+
className: cn(
|
|
1844
|
+
"flex-1 h-0.5 mx-4 transition-colors duration-200",
|
|
1845
|
+
index < currentStep ? variantStyles2[variant] : "bg-muted"
|
|
1846
|
+
)
|
|
1847
|
+
}
|
|
1848
|
+
)
|
|
1849
|
+
] }, step);
|
|
1850
|
+
}) }) });
|
|
1851
|
+
};
|
|
1852
|
+
var MiniProgress = ({
|
|
1853
|
+
value,
|
|
1854
|
+
max = 100,
|
|
1855
|
+
className,
|
|
1856
|
+
variant = "primary",
|
|
1857
|
+
showValue = false
|
|
1858
|
+
}) => {
|
|
1859
|
+
const percentage = Math.min(Math.max(value / max * 100, 0), 100);
|
|
1860
|
+
return /* @__PURE__ */ jsxs10("div", { className: cn("flex items-center gap-2", className), children: [
|
|
1861
|
+
/* @__PURE__ */ jsx11(
|
|
1862
|
+
"div",
|
|
1863
|
+
{
|
|
1864
|
+
className: "flex-1 h-1.5 bg-muted/50 rounded-full overflow-hidden",
|
|
1865
|
+
role: "progressbar",
|
|
1866
|
+
"aria-valuemin": 0,
|
|
1867
|
+
"aria-valuemax": max,
|
|
1868
|
+
"aria-valuenow": Math.round(percentage),
|
|
1869
|
+
children: /* @__PURE__ */ jsx11(
|
|
1870
|
+
"div",
|
|
1871
|
+
{
|
|
1872
|
+
className: cn(
|
|
1873
|
+
"h-full transition-all duration-500 ease-out rounded-full",
|
|
1874
|
+
variantStyles2[variant]
|
|
1875
|
+
),
|
|
1876
|
+
style: { width: `${percentage}%` }
|
|
1877
|
+
}
|
|
1878
|
+
)
|
|
1879
|
+
}
|
|
1880
|
+
),
|
|
1881
|
+
showValue && /* @__PURE__ */ jsxs10("span", { className: "text-xs font-medium text-muted-foreground min-w-[2.5rem] text-right", children: [
|
|
1882
|
+
Math.round(percentage),
|
|
1883
|
+
"%"
|
|
1884
|
+
] })
|
|
1885
|
+
] });
|
|
1886
|
+
};
|
|
1887
|
+
var BatteryProgress = ({
|
|
1888
|
+
value,
|
|
1889
|
+
max = 100,
|
|
1890
|
+
className,
|
|
1891
|
+
charging = false,
|
|
1892
|
+
showValue = false
|
|
1893
|
+
}) => {
|
|
1894
|
+
const percentage = Math.min(Math.max(value / max * 100, 0), 100);
|
|
1895
|
+
const getVariant = () => {
|
|
1896
|
+
if (charging) return "info";
|
|
1897
|
+
if (percentage <= 20) return "danger";
|
|
1898
|
+
if (percentage <= 50) return "warning";
|
|
1899
|
+
return "success";
|
|
1900
|
+
};
|
|
1901
|
+
return /* @__PURE__ */ jsxs10("div", { className: cn("flex items-center gap-2", className), children: [
|
|
1902
|
+
/* @__PURE__ */ jsxs10("div", { className: "relative", role: "progressbar", "aria-label": "Battery level", "aria-valuemin": 0, "aria-valuemax": max, "aria-valuenow": Math.round(percentage), children: [
|
|
1903
|
+
/* @__PURE__ */ jsxs10("div", { className: "w-6 h-3 border-2 border-foreground/20 rounded-sm relative", children: [
|
|
1904
|
+
/* @__PURE__ */ jsx11("div", { className: "absolute -right-1 top-0.5 w-0.5 h-1 bg-foreground/20 rounded-r-sm" }),
|
|
1905
|
+
/* @__PURE__ */ jsx11(
|
|
1906
|
+
"div",
|
|
1907
|
+
{
|
|
1908
|
+
className: cn(
|
|
1909
|
+
"h-full transition-all duration-500 ease-out rounded-sm",
|
|
1910
|
+
variantStyles2[getVariant()],
|
|
1911
|
+
charging && "animate-pulse"
|
|
1912
|
+
),
|
|
1913
|
+
style: { width: `${percentage}%` }
|
|
1914
|
+
}
|
|
1915
|
+
)
|
|
1916
|
+
] }),
|
|
1917
|
+
charging && /* @__PURE__ */ jsx11("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsx11("div", { className: "w-2 h-2 text-info-foreground", children: "\u26A1" }) })
|
|
1918
|
+
] }),
|
|
1919
|
+
showValue && /* @__PURE__ */ jsxs10("span", { className: cn(
|
|
1920
|
+
"text-xs font-medium",
|
|
1921
|
+
percentage <= 20 ? "text-destructive" : "text-muted-foreground"
|
|
1922
|
+
), children: [
|
|
1923
|
+
Math.round(percentage),
|
|
1924
|
+
"%"
|
|
1925
|
+
] })
|
|
1926
|
+
] });
|
|
1927
|
+
};
|
|
1928
|
+
var SegmentedProgress = ({
|
|
1929
|
+
segments,
|
|
1930
|
+
activeSegments,
|
|
1931
|
+
className,
|
|
1932
|
+
variant = "primary",
|
|
1933
|
+
size = "md"
|
|
1934
|
+
}) => {
|
|
1935
|
+
const segmentSizes = {
|
|
1936
|
+
sm: "h-1",
|
|
1937
|
+
md: "h-2",
|
|
1938
|
+
lg: "h-3"
|
|
1939
|
+
};
|
|
1940
|
+
return /* @__PURE__ */ jsx11(
|
|
1941
|
+
"div",
|
|
1942
|
+
{
|
|
1943
|
+
className: cn("flex gap-1", className),
|
|
1944
|
+
role: "progressbar",
|
|
1945
|
+
"aria-valuemin": 0,
|
|
1946
|
+
"aria-valuemax": segments,
|
|
1947
|
+
"aria-valuenow": activeSegments,
|
|
1948
|
+
children: Array.from({ length: segments }, (_, index) => /* @__PURE__ */ jsx11(
|
|
1949
|
+
"div",
|
|
1950
|
+
{
|
|
1951
|
+
className: cn(
|
|
1952
|
+
"flex-1 rounded-full transition-all duration-300",
|
|
1953
|
+
segmentSizes[size],
|
|
1954
|
+
index < activeSegments ? variantStyles2[variant] : "bg-muted/50"
|
|
1955
|
+
)
|
|
1956
|
+
},
|
|
1957
|
+
index
|
|
1958
|
+
))
|
|
1959
|
+
}
|
|
1960
|
+
);
|
|
1961
|
+
};
|
|
1962
|
+
var LoadingProgress = ({
|
|
1963
|
+
value,
|
|
1964
|
+
max = 100,
|
|
1965
|
+
className,
|
|
1966
|
+
variant = "primary",
|
|
1967
|
+
label,
|
|
1968
|
+
status = "loading",
|
|
1969
|
+
speed,
|
|
1970
|
+
timeRemaining
|
|
1971
|
+
}) => {
|
|
1972
|
+
const percentage = Math.min(Math.max(value / max * 100, 0), 100);
|
|
1973
|
+
const getStatusIcon = () => {
|
|
1974
|
+
switch (status) {
|
|
1975
|
+
case "complete":
|
|
1976
|
+
return /* @__PURE__ */ jsx11(Check2, { className: "w-4 h-4 text-success" });
|
|
1977
|
+
case "error":
|
|
1978
|
+
return /* @__PURE__ */ jsx11(X2, { className: "w-4 h-4 text-destructive" });
|
|
1979
|
+
case "paused":
|
|
1980
|
+
return /* @__PURE__ */ jsx11(Clock, { className: "w-4 h-4 text-warning" });
|
|
1981
|
+
default:
|
|
1982
|
+
return /* @__PURE__ */ jsx11("div", { className: "w-2 h-2 bg-primary rounded-full animate-bounce" });
|
|
1983
|
+
}
|
|
1984
|
+
};
|
|
1985
|
+
const getStatusColor = () => {
|
|
1986
|
+
switch (status) {
|
|
1987
|
+
case "complete":
|
|
1988
|
+
return "success";
|
|
1989
|
+
case "error":
|
|
1990
|
+
return "danger";
|
|
1991
|
+
case "paused":
|
|
1992
|
+
return "warning";
|
|
1993
|
+
default:
|
|
1994
|
+
return variant;
|
|
1995
|
+
}
|
|
1996
|
+
};
|
|
1997
|
+
return /* @__PURE__ */ jsxs10("div", { className: cn("w-full space-y-2", className), children: [
|
|
1998
|
+
/* @__PURE__ */ jsxs10("div", { className: "flex items-center justify-between text-sm", children: [
|
|
1999
|
+
/* @__PURE__ */ jsxs10("div", { className: "flex items-center gap-2", children: [
|
|
2000
|
+
getStatusIcon(),
|
|
2001
|
+
label && /* @__PURE__ */ jsx11("span", { className: "font-medium text-foreground", children: label })
|
|
2002
|
+
] }),
|
|
2003
|
+
/* @__PURE__ */ jsx11("span", { className: "text-muted-foreground", children: status === "complete" ? "Complete" : `${Math.round(percentage)}%` })
|
|
2004
|
+
] }),
|
|
2005
|
+
/* @__PURE__ */ jsx11(
|
|
2006
|
+
"div",
|
|
2007
|
+
{
|
|
2008
|
+
className: "w-full h-2 bg-muted/50 rounded-full overflow-hidden",
|
|
2009
|
+
role: "progressbar",
|
|
2010
|
+
"aria-valuemin": 0,
|
|
2011
|
+
"aria-valuemax": max,
|
|
2012
|
+
"aria-valuenow": Math.round(percentage),
|
|
2013
|
+
"aria-label": label || "Loading progress",
|
|
2014
|
+
children: /* @__PURE__ */ jsx11(
|
|
2015
|
+
"div",
|
|
2016
|
+
{
|
|
2017
|
+
className: cn(
|
|
2018
|
+
"h-full transition-all duration-300 ease-out rounded-full",
|
|
2019
|
+
variantStyles2[getStatusColor()],
|
|
2020
|
+
status === "loading" && "animate-pulse"
|
|
2021
|
+
),
|
|
2022
|
+
style: { width: `${percentage}%` }
|
|
2023
|
+
}
|
|
2024
|
+
)
|
|
2025
|
+
}
|
|
2026
|
+
),
|
|
2027
|
+
(speed || timeRemaining) && /* @__PURE__ */ jsxs10("div", { className: "flex justify-between text-xs text-muted-foreground", children: [
|
|
2028
|
+
speed && /* @__PURE__ */ jsx11("span", { children: speed }),
|
|
2029
|
+
timeRemaining && /* @__PURE__ */ jsx11("span", { children: timeRemaining })
|
|
2030
|
+
] })
|
|
2031
|
+
] });
|
|
2032
|
+
};
|
|
1542
2033
|
|
|
1543
2034
|
// ../../components/ui/Modal.tsx
|
|
1544
2035
|
import * as React9 from "react";
|
|
@@ -3254,6 +3745,31 @@ var DropdownMenuItem = ({ children, onClick, disabled, destructive, className })
|
|
|
3254
3745
|
children
|
|
3255
3746
|
}
|
|
3256
3747
|
);
|
|
3748
|
+
var DropdownMenuSeparator = ({ className }) => /* @__PURE__ */ jsx22("div", { className: cn("h-px bg-border my-1", className) });
|
|
3749
|
+
var SelectDropdown = ({ options, value, onChange, placeholder = "Select...", className }) => /* @__PURE__ */ jsx22(
|
|
3750
|
+
DropdownMenu,
|
|
3751
|
+
{
|
|
3752
|
+
trigger: /* @__PURE__ */ jsxs20(
|
|
3753
|
+
"button",
|
|
3754
|
+
{
|
|
3755
|
+
className: cn(
|
|
3756
|
+
"inline-flex items-center justify-between gap-2 px-3 py-2 text-sm rounded-md border bg-background",
|
|
3757
|
+
"hover:bg-accent/50",
|
|
3758
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
|
|
3759
|
+
className
|
|
3760
|
+
),
|
|
3761
|
+
children: [
|
|
3762
|
+
/* @__PURE__ */ jsx22("span", { className: "truncate max-w-[16rem] text-foreground/90", children: value || placeholder }),
|
|
3763
|
+
/* @__PURE__ */ jsx22("svg", { width: "16", height: "16", viewBox: "0 0 20 20", fill: "none", className: "opacity-70", children: /* @__PURE__ */ jsx22("path", { d: "M6 8l4 4 4-4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) })
|
|
3764
|
+
]
|
|
3765
|
+
}
|
|
3766
|
+
),
|
|
3767
|
+
items: options.map((option) => ({
|
|
3768
|
+
label: option,
|
|
3769
|
+
onClick: () => onChange(option)
|
|
3770
|
+
}))
|
|
3771
|
+
}
|
|
3772
|
+
);
|
|
3257
3773
|
var DropdownMenu_default = DropdownMenu;
|
|
3258
3774
|
|
|
3259
3775
|
// ../../components/ui/Pagination.tsx
|
|
@@ -5109,7 +5625,6 @@ var RadioGroupItem = React23.forwardRef(
|
|
|
5109
5625
|
}
|
|
5110
5626
|
);
|
|
5111
5627
|
RadioGroupItem.displayName = "RadioGroupItem";
|
|
5112
|
-
var RadioGroup_default = RadioGroup;
|
|
5113
5628
|
|
|
5114
5629
|
// ../../components/ui/Slider.tsx
|
|
5115
5630
|
import * as React24 from "react";
|
|
@@ -8815,6 +9330,7 @@ export {
|
|
|
8815
9330
|
Avatar_default as Avatar,
|
|
8816
9331
|
Badge_default as Badge,
|
|
8817
9332
|
Badge as BadgeBase,
|
|
9333
|
+
BatteryProgress,
|
|
8818
9334
|
BottomSheet,
|
|
8819
9335
|
Breadcrumb_default as Breadcrumb,
|
|
8820
9336
|
Button_default as Button,
|
|
@@ -8823,6 +9339,7 @@ export {
|
|
|
8823
9339
|
Carousel,
|
|
8824
9340
|
CategoryTreeSelect,
|
|
8825
9341
|
Checkbox,
|
|
9342
|
+
CircularProgress,
|
|
8826
9343
|
ClientOnly,
|
|
8827
9344
|
Combobox,
|
|
8828
9345
|
CompactPagination,
|
|
@@ -8832,6 +9349,8 @@ export {
|
|
|
8832
9349
|
date_exports as DateUtils,
|
|
8833
9350
|
Drawer,
|
|
8834
9351
|
DropdownMenu_default as DropdownMenu,
|
|
9352
|
+
DropdownMenuItem,
|
|
9353
|
+
DropdownMenuSeparator,
|
|
8835
9354
|
FloatingContacts,
|
|
8836
9355
|
Form,
|
|
8837
9356
|
FormActions,
|
|
@@ -8855,7 +9374,9 @@ export {
|
|
|
8855
9374
|
LanguageSwitcherHeadless,
|
|
8856
9375
|
LoadingBar,
|
|
8857
9376
|
LoadingDots,
|
|
9377
|
+
LoadingProgress,
|
|
8858
9378
|
LoadingSpinner,
|
|
9379
|
+
MiniProgress,
|
|
8859
9380
|
Modal_default as Modal,
|
|
8860
9381
|
MultiCombobox,
|
|
8861
9382
|
NotificationBadge,
|
|
@@ -8866,21 +9387,34 @@ export {
|
|
|
8866
9387
|
PasswordInput,
|
|
8867
9388
|
PillTabs,
|
|
8868
9389
|
Popover,
|
|
8869
|
-
|
|
9390
|
+
Progress,
|
|
8870
9391
|
PulseBadge,
|
|
8871
|
-
|
|
9392
|
+
RadioGroup,
|
|
9393
|
+
RadioGroupItem,
|
|
8872
9394
|
SIZE_STYLES_BTN,
|
|
8873
9395
|
ScrollArea,
|
|
9396
|
+
SearchInput,
|
|
8874
9397
|
Section_default as Section,
|
|
9398
|
+
SegmentedProgress,
|
|
9399
|
+
SelectDropdown,
|
|
8875
9400
|
Sheet,
|
|
8876
9401
|
SidebarSheet,
|
|
8877
9402
|
SimplePagination,
|
|
8878
9403
|
SimpleTabs,
|
|
8879
9404
|
Skeleton_default as Skeleton,
|
|
9405
|
+
SkeletonAvatar,
|
|
9406
|
+
SkeletonButton,
|
|
9407
|
+
SkeletonCard,
|
|
9408
|
+
SkeletonList,
|
|
9409
|
+
SkeletonMessage,
|
|
9410
|
+
SkeletonPost,
|
|
9411
|
+
SkeletonTable,
|
|
9412
|
+
SkeletonText,
|
|
8880
9413
|
SlideOver,
|
|
8881
9414
|
Slider,
|
|
8882
9415
|
SmartImage,
|
|
8883
9416
|
StatusBadge,
|
|
9417
|
+
StepProgress,
|
|
8884
9418
|
Switch_default as Switch,
|
|
8885
9419
|
Table,
|
|
8886
9420
|
TableBody,
|