@underverse-ui/underverse 0.1.13 → 0.1.15
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 +564 -7
- 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 +545 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -35,6 +35,7 @@ __export(index_exports, {
|
|
|
35
35
|
Avatar: () => Avatar_default,
|
|
36
36
|
Badge: () => Badge_default,
|
|
37
37
|
BadgeBase: () => Badge,
|
|
38
|
+
BatteryProgress: () => BatteryProgress,
|
|
38
39
|
BottomSheet: () => BottomSheet,
|
|
39
40
|
Breadcrumb: () => Breadcrumb_default,
|
|
40
41
|
Button: () => Button_default,
|
|
@@ -43,6 +44,7 @@ __export(index_exports, {
|
|
|
43
44
|
Carousel: () => Carousel,
|
|
44
45
|
CategoryTreeSelect: () => CategoryTreeSelect,
|
|
45
46
|
Checkbox: () => Checkbox,
|
|
47
|
+
CircularProgress: () => CircularProgress,
|
|
46
48
|
ClientOnly: () => ClientOnly,
|
|
47
49
|
Combobox: () => Combobox,
|
|
48
50
|
CompactPagination: () => CompactPagination,
|
|
@@ -52,6 +54,8 @@ __export(index_exports, {
|
|
|
52
54
|
DateUtils: () => date_exports,
|
|
53
55
|
Drawer: () => Drawer,
|
|
54
56
|
DropdownMenu: () => DropdownMenu_default,
|
|
57
|
+
DropdownMenuItem: () => DropdownMenuItem,
|
|
58
|
+
DropdownMenuSeparator: () => DropdownMenuSeparator,
|
|
55
59
|
FloatingContacts: () => FloatingContacts,
|
|
56
60
|
Form: () => Form,
|
|
57
61
|
FormActions: () => FormActions,
|
|
@@ -75,7 +79,9 @@ __export(index_exports, {
|
|
|
75
79
|
LanguageSwitcherHeadless: () => LanguageSwitcherHeadless,
|
|
76
80
|
LoadingBar: () => LoadingBar,
|
|
77
81
|
LoadingDots: () => LoadingDots,
|
|
82
|
+
LoadingProgress: () => LoadingProgress,
|
|
78
83
|
LoadingSpinner: () => LoadingSpinner,
|
|
84
|
+
MiniProgress: () => MiniProgress,
|
|
79
85
|
Modal: () => Modal_default,
|
|
80
86
|
MultiCombobox: () => MultiCombobox,
|
|
81
87
|
NotificationBadge: () => NotificationBadge,
|
|
@@ -86,21 +92,34 @@ __export(index_exports, {
|
|
|
86
92
|
PasswordInput: () => PasswordInput,
|
|
87
93
|
PillTabs: () => PillTabs,
|
|
88
94
|
Popover: () => Popover,
|
|
89
|
-
Progress: () =>
|
|
95
|
+
Progress: () => Progress,
|
|
90
96
|
PulseBadge: () => PulseBadge,
|
|
91
|
-
RadioGroup: () =>
|
|
97
|
+
RadioGroup: () => RadioGroup,
|
|
98
|
+
RadioGroupItem: () => RadioGroupItem,
|
|
92
99
|
SIZE_STYLES_BTN: () => SIZE_STYLES_BTN,
|
|
93
100
|
ScrollArea: () => ScrollArea,
|
|
101
|
+
SearchInput: () => SearchInput,
|
|
94
102
|
Section: () => Section_default,
|
|
103
|
+
SegmentedProgress: () => SegmentedProgress,
|
|
104
|
+
SelectDropdown: () => SelectDropdown,
|
|
95
105
|
Sheet: () => Sheet,
|
|
96
106
|
SidebarSheet: () => SidebarSheet,
|
|
97
107
|
SimplePagination: () => SimplePagination,
|
|
98
108
|
SimpleTabs: () => SimpleTabs,
|
|
99
109
|
Skeleton: () => Skeleton_default,
|
|
110
|
+
SkeletonAvatar: () => SkeletonAvatar,
|
|
111
|
+
SkeletonButton: () => SkeletonButton,
|
|
112
|
+
SkeletonCard: () => SkeletonCard,
|
|
113
|
+
SkeletonList: () => SkeletonList,
|
|
114
|
+
SkeletonMessage: () => SkeletonMessage,
|
|
115
|
+
SkeletonPost: () => SkeletonPost,
|
|
116
|
+
SkeletonTable: () => SkeletonTable,
|
|
117
|
+
SkeletonText: () => SkeletonText,
|
|
100
118
|
SlideOver: () => SlideOver,
|
|
101
119
|
Slider: () => Slider,
|
|
102
120
|
SmartImage: () => SmartImage,
|
|
103
121
|
StatusBadge: () => StatusBadge,
|
|
122
|
+
StepProgress: () => StepProgress,
|
|
104
123
|
Switch: () => Switch_default,
|
|
105
124
|
Table: () => Table,
|
|
106
125
|
TableBody: () => TableBody,
|
|
@@ -1564,6 +1583,148 @@ var Skeleton = ({
|
|
|
1564
1583
|
}
|
|
1565
1584
|
);
|
|
1566
1585
|
};
|
|
1586
|
+
var SkeletonAvatar = ({
|
|
1587
|
+
size = "md",
|
|
1588
|
+
className
|
|
1589
|
+
}) => {
|
|
1590
|
+
const sizeClasses2 = {
|
|
1591
|
+
sm: "w-8 h-8",
|
|
1592
|
+
md: "w-10 h-10",
|
|
1593
|
+
lg: "w-12 h-12"
|
|
1594
|
+
};
|
|
1595
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1596
|
+
Skeleton,
|
|
1597
|
+
{
|
|
1598
|
+
variant: "circular",
|
|
1599
|
+
className: cn(sizeClasses2[size], className)
|
|
1600
|
+
}
|
|
1601
|
+
);
|
|
1602
|
+
};
|
|
1603
|
+
var SkeletonButton = ({
|
|
1604
|
+
size = "md",
|
|
1605
|
+
className
|
|
1606
|
+
}) => {
|
|
1607
|
+
const sizeClasses2 = {
|
|
1608
|
+
sm: "h-8 w-20",
|
|
1609
|
+
md: "h-10 w-24",
|
|
1610
|
+
lg: "h-12 w-28"
|
|
1611
|
+
};
|
|
1612
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1613
|
+
Skeleton,
|
|
1614
|
+
{
|
|
1615
|
+
variant: "rounded",
|
|
1616
|
+
className: cn(sizeClasses2[size], className)
|
|
1617
|
+
}
|
|
1618
|
+
);
|
|
1619
|
+
};
|
|
1620
|
+
var SkeletonText = ({
|
|
1621
|
+
lines = 3,
|
|
1622
|
+
className,
|
|
1623
|
+
width = "100%"
|
|
1624
|
+
}) => {
|
|
1625
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1626
|
+
Skeleton,
|
|
1627
|
+
{
|
|
1628
|
+
variant: "text",
|
|
1629
|
+
lines,
|
|
1630
|
+
width,
|
|
1631
|
+
className
|
|
1632
|
+
}
|
|
1633
|
+
);
|
|
1634
|
+
};
|
|
1635
|
+
var SkeletonCard = ({
|
|
1636
|
+
showAvatar = true,
|
|
1637
|
+
showImage = false,
|
|
1638
|
+
textLines = 3,
|
|
1639
|
+
className
|
|
1640
|
+
}) => {
|
|
1641
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: cn("p-4 space-y-4 rounded-lg border bg-card", className), children: [
|
|
1642
|
+
showAvatar && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex items-center space-x-3", children: [
|
|
1643
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonAvatar, {}),
|
|
1644
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "space-y-2", children: [
|
|
1645
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Skeleton, { className: "h-4 w-24" }),
|
|
1646
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Skeleton, { className: "h-3 w-16" })
|
|
1647
|
+
] })
|
|
1648
|
+
] }),
|
|
1649
|
+
showImage && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Skeleton, { className: "h-48 w-full rounded-md" }),
|
|
1650
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonText, { lines: textLines }),
|
|
1651
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex space-x-2", children: [
|
|
1652
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonButton, { size: "sm" }),
|
|
1653
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonButton, { size: "sm" })
|
|
1654
|
+
] })
|
|
1655
|
+
] });
|
|
1656
|
+
};
|
|
1657
|
+
var SkeletonPost = ({ className }) => {
|
|
1658
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: cn("p-6 space-y-4 rounded-xl border bg-card", className), children: [
|
|
1659
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex items-center space-x-3", children: [
|
|
1660
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonAvatar, { size: "lg" }),
|
|
1661
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "space-y-2", children: [
|
|
1662
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Skeleton, { className: "h-4 w-32" }),
|
|
1663
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Skeleton, { className: "h-3 w-20" })
|
|
1664
|
+
] })
|
|
1665
|
+
] }),
|
|
1666
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonText, { lines: 2 }),
|
|
1667
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Skeleton, { className: "h-64 w-full rounded-lg" }),
|
|
1668
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex items-center space-x-4", children: [
|
|
1669
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Skeleton, { className: "h-3 w-16" }),
|
|
1670
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Skeleton, { className: "h-3 w-20" }),
|
|
1671
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Skeleton, { className: "h-3 w-12" })
|
|
1672
|
+
] }),
|
|
1673
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "flex items-center justify-between pt-2 border-t border-border", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex space-x-4", children: [
|
|
1674
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Skeleton, { className: "h-8 w-16" }),
|
|
1675
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Skeleton, { className: "h-8 w-20" }),
|
|
1676
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Skeleton, { className: "h-8 w-16" })
|
|
1677
|
+
] }) })
|
|
1678
|
+
] });
|
|
1679
|
+
};
|
|
1680
|
+
var SkeletonMessage = ({
|
|
1681
|
+
own = false,
|
|
1682
|
+
showAvatar = true,
|
|
1683
|
+
className
|
|
1684
|
+
}) => {
|
|
1685
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: cn(
|
|
1686
|
+
"flex items-end space-x-2",
|
|
1687
|
+
own && "flex-row-reverse space-x-reverse",
|
|
1688
|
+
className
|
|
1689
|
+
), children: [
|
|
1690
|
+
showAvatar && !own && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonAvatar, { size: "sm" }),
|
|
1691
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: cn(
|
|
1692
|
+
"max-w-xs space-y-1",
|
|
1693
|
+
own ? "items-end" : "items-start"
|
|
1694
|
+
), children: [
|
|
1695
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Skeleton, { className: cn(
|
|
1696
|
+
"h-10 rounded-2xl",
|
|
1697
|
+
own ? "w-32 bg-primary/20" : "w-40 bg-muted"
|
|
1698
|
+
) }),
|
|
1699
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Skeleton, { className: "h-3 w-12" })
|
|
1700
|
+
] })
|
|
1701
|
+
] });
|
|
1702
|
+
};
|
|
1703
|
+
var SkeletonList = ({
|
|
1704
|
+
items = 5,
|
|
1705
|
+
itemHeight = 60,
|
|
1706
|
+
showAvatar = true,
|
|
1707
|
+
className
|
|
1708
|
+
}) => {
|
|
1709
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: cn("space-y-3", className), children: Array.from({ length: items }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex items-center space-x-3 p-3 rounded-lg", children: [
|
|
1710
|
+
showAvatar && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SkeletonAvatar, {}),
|
|
1711
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex-1 space-y-2", children: [
|
|
1712
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Skeleton, { className: "h-4 w-3/4" }),
|
|
1713
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Skeleton, { className: "h-3 w-1/2" })
|
|
1714
|
+
] }),
|
|
1715
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Skeleton, { className: "h-6 w-16" })
|
|
1716
|
+
] }, index)) });
|
|
1717
|
+
};
|
|
1718
|
+
var SkeletonTable = ({
|
|
1719
|
+
rows = 5,
|
|
1720
|
+
columns = 4,
|
|
1721
|
+
className
|
|
1722
|
+
}) => {
|
|
1723
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: cn("space-y-3", className), children: [
|
|
1724
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "flex space-x-4 p-3 border-b border-border", children: Array.from({ length: columns }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Skeleton, { className: "h-4 flex-1" }, index)) }),
|
|
1725
|
+
Array.from({ length: rows }).map((_, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "flex space-x-4 p-3", children: Array.from({ length: columns }).map((_2, colIndex) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Skeleton, { className: "h-4 flex-1" }, colIndex)) }, rowIndex))
|
|
1726
|
+
] });
|
|
1727
|
+
};
|
|
1567
1728
|
var Skeleton_default = Skeleton;
|
|
1568
1729
|
|
|
1569
1730
|
// ../../components/ui/Progress.tsx
|
|
@@ -1662,7 +1823,356 @@ var Progress = ({
|
|
|
1662
1823
|
)
|
|
1663
1824
|
] });
|
|
1664
1825
|
};
|
|
1665
|
-
var
|
|
1826
|
+
var CircularProgress = ({
|
|
1827
|
+
value,
|
|
1828
|
+
max = 100,
|
|
1829
|
+
size = 64,
|
|
1830
|
+
strokeWidth = 4,
|
|
1831
|
+
className,
|
|
1832
|
+
variant = "primary",
|
|
1833
|
+
showValue = false,
|
|
1834
|
+
children,
|
|
1835
|
+
indeterminate = false,
|
|
1836
|
+
status = "normal",
|
|
1837
|
+
trackColor = "stroke-muted/20"
|
|
1838
|
+
}) => {
|
|
1839
|
+
const percentage = Math.min(Math.max(value / max * 100, 0), 100);
|
|
1840
|
+
const radius = (size - strokeWidth) / 2;
|
|
1841
|
+
const circumference = radius * Math.PI * 2;
|
|
1842
|
+
const offset = circumference - percentage / 100 * circumference;
|
|
1843
|
+
const isComplete = status === "complete" || percentage >= 100;
|
|
1844
|
+
const isError = status === "error";
|
|
1845
|
+
const variantColors = {
|
|
1846
|
+
default: "stroke-muted-foreground",
|
|
1847
|
+
primary: "stroke-primary",
|
|
1848
|
+
success: "stroke-success",
|
|
1849
|
+
warning: "stroke-warning",
|
|
1850
|
+
danger: "stroke-destructive",
|
|
1851
|
+
info: "stroke-info"
|
|
1852
|
+
};
|
|
1853
|
+
const getContentIcon = () => {
|
|
1854
|
+
if (isComplete) return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react4.Check, { className: "w-5 h-5 text-success" });
|
|
1855
|
+
if (isError) return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react4.X, { className: "w-5 h-5 text-destructive" });
|
|
1856
|
+
return null;
|
|
1857
|
+
};
|
|
1858
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
1859
|
+
"div",
|
|
1860
|
+
{
|
|
1861
|
+
className: cn("relative inline-flex items-center justify-center", className),
|
|
1862
|
+
role: "progressbar",
|
|
1863
|
+
"aria-valuemin": 0,
|
|
1864
|
+
"aria-valuemax": indeterminate ? void 0 : max,
|
|
1865
|
+
"aria-valuenow": indeterminate ? void 0 : Math.round(percentage),
|
|
1866
|
+
"aria-label": children ? void 0 : "Progress",
|
|
1867
|
+
children: [
|
|
1868
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
1869
|
+
"svg",
|
|
1870
|
+
{
|
|
1871
|
+
width: size,
|
|
1872
|
+
height: size,
|
|
1873
|
+
className: cn(
|
|
1874
|
+
"transform -rotate-90",
|
|
1875
|
+
indeterminate && "animate-spin"
|
|
1876
|
+
),
|
|
1877
|
+
style: { animationDuration: indeterminate ? "2s" : void 0 },
|
|
1878
|
+
children: [
|
|
1879
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1880
|
+
"circle",
|
|
1881
|
+
{
|
|
1882
|
+
cx: size / 2,
|
|
1883
|
+
cy: size / 2,
|
|
1884
|
+
r: radius,
|
|
1885
|
+
stroke: "currentColor",
|
|
1886
|
+
strokeWidth,
|
|
1887
|
+
fill: "transparent",
|
|
1888
|
+
className: trackColor
|
|
1889
|
+
}
|
|
1890
|
+
),
|
|
1891
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1892
|
+
"circle",
|
|
1893
|
+
{
|
|
1894
|
+
cx: size / 2,
|
|
1895
|
+
cy: size / 2,
|
|
1896
|
+
r: radius,
|
|
1897
|
+
strokeWidth,
|
|
1898
|
+
fill: "transparent",
|
|
1899
|
+
strokeDasharray: circumference,
|
|
1900
|
+
strokeDashoffset: indeterminate ? circumference * 0.25 : offset,
|
|
1901
|
+
className: cn(
|
|
1902
|
+
"transition-all duration-700 ease-out",
|
|
1903
|
+
isComplete ? "stroke-success" : isError ? "stroke-destructive" : variantColors[variant],
|
|
1904
|
+
"drop-shadow-sm"
|
|
1905
|
+
),
|
|
1906
|
+
strokeLinecap: "round",
|
|
1907
|
+
style: {
|
|
1908
|
+
filter: `drop-shadow(0 0 4px ${isComplete ? "hsl(var(--success) / 0.3)" : isError ? "hsl(var(--destructive) / 0.3)" : "hsl(var(--primary) / 0.2)"})`
|
|
1909
|
+
}
|
|
1910
|
+
}
|
|
1911
|
+
)
|
|
1912
|
+
]
|
|
1913
|
+
}
|
|
1914
|
+
),
|
|
1915
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "absolute inset-0 flex flex-col items-center justify-center text-center", children: children ? children : /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
|
|
1916
|
+
getContentIcon(),
|
|
1917
|
+
showValue && !indeterminate && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: cn(
|
|
1918
|
+
"text-sm font-semibold",
|
|
1919
|
+
isComplete ? "text-success" : isError ? "text-destructive" : "text-foreground"
|
|
1920
|
+
), children: isComplete ? "\u2713" : isError ? "\u2717" : `${Math.round(percentage)}%` }),
|
|
1921
|
+
indeterminate && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react4.Clock, { className: "w-4 h-4 text-muted-foreground animate-pulse" })
|
|
1922
|
+
] }) })
|
|
1923
|
+
]
|
|
1924
|
+
}
|
|
1925
|
+
);
|
|
1926
|
+
};
|
|
1927
|
+
var StepProgress = ({
|
|
1928
|
+
steps,
|
|
1929
|
+
currentStep,
|
|
1930
|
+
className,
|
|
1931
|
+
variant = "primary",
|
|
1932
|
+
size = "md"
|
|
1933
|
+
}) => {
|
|
1934
|
+
const stepSizes = {
|
|
1935
|
+
sm: "w-6 h-6 text-xs",
|
|
1936
|
+
md: "w-8 h-8 text-sm",
|
|
1937
|
+
lg: "w-10 h-10 text-base"
|
|
1938
|
+
};
|
|
1939
|
+
const getStepStatus = (stepIndex) => {
|
|
1940
|
+
if (stepIndex < currentStep) return "completed";
|
|
1941
|
+
if (stepIndex === currentStep) return "current";
|
|
1942
|
+
return "upcoming";
|
|
1943
|
+
};
|
|
1944
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: cn("w-full", className), role: "list", "aria-label": "Progress steps", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "flex items-center justify-between", children: steps.map((step, index) => {
|
|
1945
|
+
const status = getStepStatus(index);
|
|
1946
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex items-center", role: "listitem", "aria-current": status === "current" ? "step" : void 0, children: [
|
|
1947
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1948
|
+
"div",
|
|
1949
|
+
{
|
|
1950
|
+
className: cn(
|
|
1951
|
+
"rounded-full border-2 flex items-center justify-center font-medium transition-all duration-300",
|
|
1952
|
+
"shadow-sm hover:shadow-md",
|
|
1953
|
+
stepSizes[size],
|
|
1954
|
+
status === "completed" && [
|
|
1955
|
+
"border-success bg-success text-success-foreground",
|
|
1956
|
+
"shadow-success/20"
|
|
1957
|
+
],
|
|
1958
|
+
status === "current" && [
|
|
1959
|
+
"border-primary bg-primary/10 text-primary",
|
|
1960
|
+
"ring-2 ring-primary/20 ring-offset-2",
|
|
1961
|
+
"shadow-primary/20"
|
|
1962
|
+
],
|
|
1963
|
+
status === "upcoming" && [
|
|
1964
|
+
"border-muted-foreground/30 text-muted-foreground bg-background",
|
|
1965
|
+
"hover:border-muted-foreground/50"
|
|
1966
|
+
]
|
|
1967
|
+
),
|
|
1968
|
+
children: status === "completed" ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react4.Check, { className: "w-3 h-3" }) : index + 1
|
|
1969
|
+
}
|
|
1970
|
+
),
|
|
1971
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1972
|
+
"span",
|
|
1973
|
+
{
|
|
1974
|
+
className: cn(
|
|
1975
|
+
"ml-2 text-sm font-medium transition-colors duration-200",
|
|
1976
|
+
status === "completed" && variantStyles2[variant].replace("bg-", "text-"),
|
|
1977
|
+
status === "current" && "text-foreground",
|
|
1978
|
+
status === "upcoming" && "text-muted-foreground"
|
|
1979
|
+
),
|
|
1980
|
+
children: step
|
|
1981
|
+
}
|
|
1982
|
+
),
|
|
1983
|
+
index < steps.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1984
|
+
"div",
|
|
1985
|
+
{
|
|
1986
|
+
className: cn(
|
|
1987
|
+
"flex-1 h-0.5 mx-4 transition-colors duration-200",
|
|
1988
|
+
index < currentStep ? variantStyles2[variant] : "bg-muted"
|
|
1989
|
+
)
|
|
1990
|
+
}
|
|
1991
|
+
)
|
|
1992
|
+
] }, step);
|
|
1993
|
+
}) }) });
|
|
1994
|
+
};
|
|
1995
|
+
var MiniProgress = ({
|
|
1996
|
+
value,
|
|
1997
|
+
max = 100,
|
|
1998
|
+
className,
|
|
1999
|
+
variant = "primary",
|
|
2000
|
+
showValue = false
|
|
2001
|
+
}) => {
|
|
2002
|
+
const percentage = Math.min(Math.max(value / max * 100, 0), 100);
|
|
2003
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: cn("flex items-center gap-2", className), children: [
|
|
2004
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2005
|
+
"div",
|
|
2006
|
+
{
|
|
2007
|
+
className: "flex-1 h-1.5 bg-muted/50 rounded-full overflow-hidden",
|
|
2008
|
+
role: "progressbar",
|
|
2009
|
+
"aria-valuemin": 0,
|
|
2010
|
+
"aria-valuemax": max,
|
|
2011
|
+
"aria-valuenow": Math.round(percentage),
|
|
2012
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2013
|
+
"div",
|
|
2014
|
+
{
|
|
2015
|
+
className: cn(
|
|
2016
|
+
"h-full transition-all duration-500 ease-out rounded-full",
|
|
2017
|
+
variantStyles2[variant]
|
|
2018
|
+
),
|
|
2019
|
+
style: { width: `${percentage}%` }
|
|
2020
|
+
}
|
|
2021
|
+
)
|
|
2022
|
+
}
|
|
2023
|
+
),
|
|
2024
|
+
showValue && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("span", { className: "text-xs font-medium text-muted-foreground min-w-[2.5rem] text-right", children: [
|
|
2025
|
+
Math.round(percentage),
|
|
2026
|
+
"%"
|
|
2027
|
+
] })
|
|
2028
|
+
] });
|
|
2029
|
+
};
|
|
2030
|
+
var BatteryProgress = ({
|
|
2031
|
+
value,
|
|
2032
|
+
max = 100,
|
|
2033
|
+
className,
|
|
2034
|
+
charging = false,
|
|
2035
|
+
showValue = false
|
|
2036
|
+
}) => {
|
|
2037
|
+
const percentage = Math.min(Math.max(value / max * 100, 0), 100);
|
|
2038
|
+
const getVariant = () => {
|
|
2039
|
+
if (charging) return "info";
|
|
2040
|
+
if (percentage <= 20) return "danger";
|
|
2041
|
+
if (percentage <= 50) return "warning";
|
|
2042
|
+
return "success";
|
|
2043
|
+
};
|
|
2044
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: cn("flex items-center gap-2", className), children: [
|
|
2045
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "relative", role: "progressbar", "aria-label": "Battery level", "aria-valuemin": 0, "aria-valuemax": max, "aria-valuenow": Math.round(percentage), children: [
|
|
2046
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "w-6 h-3 border-2 border-foreground/20 rounded-sm relative", children: [
|
|
2047
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "absolute -right-1 top-0.5 w-0.5 h-1 bg-foreground/20 rounded-r-sm" }),
|
|
2048
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2049
|
+
"div",
|
|
2050
|
+
{
|
|
2051
|
+
className: cn(
|
|
2052
|
+
"h-full transition-all duration-500 ease-out rounded-sm",
|
|
2053
|
+
variantStyles2[getVariant()],
|
|
2054
|
+
charging && "animate-pulse"
|
|
2055
|
+
),
|
|
2056
|
+
style: { width: `${percentage}%` }
|
|
2057
|
+
}
|
|
2058
|
+
)
|
|
2059
|
+
] }),
|
|
2060
|
+
charging && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "w-2 h-2 text-info-foreground", children: "\u26A1" }) })
|
|
2061
|
+
] }),
|
|
2062
|
+
showValue && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("span", { className: cn(
|
|
2063
|
+
"text-xs font-medium",
|
|
2064
|
+
percentage <= 20 ? "text-destructive" : "text-muted-foreground"
|
|
2065
|
+
), children: [
|
|
2066
|
+
Math.round(percentage),
|
|
2067
|
+
"%"
|
|
2068
|
+
] })
|
|
2069
|
+
] });
|
|
2070
|
+
};
|
|
2071
|
+
var SegmentedProgress = ({
|
|
2072
|
+
segments,
|
|
2073
|
+
activeSegments,
|
|
2074
|
+
className,
|
|
2075
|
+
variant = "primary",
|
|
2076
|
+
size = "md"
|
|
2077
|
+
}) => {
|
|
2078
|
+
const segmentSizes = {
|
|
2079
|
+
sm: "h-1",
|
|
2080
|
+
md: "h-2",
|
|
2081
|
+
lg: "h-3"
|
|
2082
|
+
};
|
|
2083
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2084
|
+
"div",
|
|
2085
|
+
{
|
|
2086
|
+
className: cn("flex gap-1", className),
|
|
2087
|
+
role: "progressbar",
|
|
2088
|
+
"aria-valuemin": 0,
|
|
2089
|
+
"aria-valuemax": segments,
|
|
2090
|
+
"aria-valuenow": activeSegments,
|
|
2091
|
+
children: Array.from({ length: segments }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2092
|
+
"div",
|
|
2093
|
+
{
|
|
2094
|
+
className: cn(
|
|
2095
|
+
"flex-1 rounded-full transition-all duration-300",
|
|
2096
|
+
segmentSizes[size],
|
|
2097
|
+
index < activeSegments ? variantStyles2[variant] : "bg-muted/50"
|
|
2098
|
+
)
|
|
2099
|
+
},
|
|
2100
|
+
index
|
|
2101
|
+
))
|
|
2102
|
+
}
|
|
2103
|
+
);
|
|
2104
|
+
};
|
|
2105
|
+
var LoadingProgress = ({
|
|
2106
|
+
value,
|
|
2107
|
+
max = 100,
|
|
2108
|
+
className,
|
|
2109
|
+
variant = "primary",
|
|
2110
|
+
label,
|
|
2111
|
+
status = "loading",
|
|
2112
|
+
speed,
|
|
2113
|
+
timeRemaining
|
|
2114
|
+
}) => {
|
|
2115
|
+
const percentage = Math.min(Math.max(value / max * 100, 0), 100);
|
|
2116
|
+
const getStatusIcon = () => {
|
|
2117
|
+
switch (status) {
|
|
2118
|
+
case "complete":
|
|
2119
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react4.Check, { className: "w-4 h-4 text-success" });
|
|
2120
|
+
case "error":
|
|
2121
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react4.X, { className: "w-4 h-4 text-destructive" });
|
|
2122
|
+
case "paused":
|
|
2123
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react4.Clock, { className: "w-4 h-4 text-warning" });
|
|
2124
|
+
default:
|
|
2125
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "w-2 h-2 bg-primary rounded-full animate-bounce" });
|
|
2126
|
+
}
|
|
2127
|
+
};
|
|
2128
|
+
const getStatusColor = () => {
|
|
2129
|
+
switch (status) {
|
|
2130
|
+
case "complete":
|
|
2131
|
+
return "success";
|
|
2132
|
+
case "error":
|
|
2133
|
+
return "danger";
|
|
2134
|
+
case "paused":
|
|
2135
|
+
return "warning";
|
|
2136
|
+
default:
|
|
2137
|
+
return variant;
|
|
2138
|
+
}
|
|
2139
|
+
};
|
|
2140
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: cn("w-full space-y-2", className), children: [
|
|
2141
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex items-center justify-between text-sm", children: [
|
|
2142
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
2143
|
+
getStatusIcon(),
|
|
2144
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "font-medium text-foreground", children: label })
|
|
2145
|
+
] }),
|
|
2146
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "text-muted-foreground", children: status === "complete" ? "Complete" : `${Math.round(percentage)}%` })
|
|
2147
|
+
] }),
|
|
2148
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2149
|
+
"div",
|
|
2150
|
+
{
|
|
2151
|
+
className: "w-full h-2 bg-muted/50 rounded-full overflow-hidden",
|
|
2152
|
+
role: "progressbar",
|
|
2153
|
+
"aria-valuemin": 0,
|
|
2154
|
+
"aria-valuemax": max,
|
|
2155
|
+
"aria-valuenow": Math.round(percentage),
|
|
2156
|
+
"aria-label": label || "Loading progress",
|
|
2157
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2158
|
+
"div",
|
|
2159
|
+
{
|
|
2160
|
+
className: cn(
|
|
2161
|
+
"h-full transition-all duration-300 ease-out rounded-full",
|
|
2162
|
+
variantStyles2[getStatusColor()],
|
|
2163
|
+
status === "loading" && "animate-pulse"
|
|
2164
|
+
),
|
|
2165
|
+
style: { width: `${percentage}%` }
|
|
2166
|
+
}
|
|
2167
|
+
)
|
|
2168
|
+
}
|
|
2169
|
+
),
|
|
2170
|
+
(speed || timeRemaining) && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex justify-between text-xs text-muted-foreground", children: [
|
|
2171
|
+
speed && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { children: speed }),
|
|
2172
|
+
timeRemaining && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { children: timeRemaining })
|
|
2173
|
+
] })
|
|
2174
|
+
] });
|
|
2175
|
+
};
|
|
1666
2176
|
|
|
1667
2177
|
// ../../components/ui/Modal.tsx
|
|
1668
2178
|
var React9 = __toESM(require("react"), 1);
|
|
@@ -3378,6 +3888,31 @@ var DropdownMenuItem = ({ children, onClick, disabled, destructive, className })
|
|
|
3378
3888
|
children
|
|
3379
3889
|
}
|
|
3380
3890
|
);
|
|
3891
|
+
var DropdownMenuSeparator = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: cn("h-px bg-border my-1", className) });
|
|
3892
|
+
var SelectDropdown = ({ options, value, onChange, placeholder = "Select...", className }) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
3893
|
+
DropdownMenu,
|
|
3894
|
+
{
|
|
3895
|
+
trigger: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
3896
|
+
"button",
|
|
3897
|
+
{
|
|
3898
|
+
className: cn(
|
|
3899
|
+
"inline-flex items-center justify-between gap-2 px-3 py-2 text-sm rounded-md border bg-background",
|
|
3900
|
+
"hover:bg-accent/50",
|
|
3901
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
|
|
3902
|
+
className
|
|
3903
|
+
),
|
|
3904
|
+
children: [
|
|
3905
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "truncate max-w-[16rem] text-foreground/90", children: value || placeholder }),
|
|
3906
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("svg", { width: "16", height: "16", viewBox: "0 0 20 20", fill: "none", className: "opacity-70", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("path", { d: "M6 8l4 4 4-4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) })
|
|
3907
|
+
]
|
|
3908
|
+
}
|
|
3909
|
+
),
|
|
3910
|
+
items: options.map((option) => ({
|
|
3911
|
+
label: option,
|
|
3912
|
+
onClick: () => onChange(option)
|
|
3913
|
+
}))
|
|
3914
|
+
}
|
|
3915
|
+
);
|
|
3381
3916
|
var DropdownMenu_default = DropdownMenu;
|
|
3382
3917
|
|
|
3383
3918
|
// ../../components/ui/Pagination.tsx
|
|
@@ -5233,7 +5768,6 @@ var RadioGroupItem = React23.forwardRef(
|
|
|
5233
5768
|
}
|
|
5234
5769
|
);
|
|
5235
5770
|
RadioGroupItem.displayName = "RadioGroupItem";
|
|
5236
|
-
var RadioGroup_default = RadioGroup;
|
|
5237
5771
|
|
|
5238
5772
|
// ../../components/ui/Slider.tsx
|
|
5239
5773
|
var React24 = __toESM(require("react"), 1);
|
|
@@ -8171,11 +8705,15 @@ var useFormField = () => {
|
|
|
8171
8705
|
const fieldContext = React31.useContext(FormFieldContext);
|
|
8172
8706
|
const itemContext = React31.useContext(FormItemContext);
|
|
8173
8707
|
const { getFieldState, formState } = useFormContext();
|
|
8174
|
-
const t = (0, import_next_intl8.useTranslations)("Form");
|
|
8175
|
-
const fieldState = getFieldState(fieldContext.name, formState);
|
|
8176
8708
|
if (!fieldContext) {
|
|
8177
|
-
|
|
8709
|
+
try {
|
|
8710
|
+
const t = (0, import_next_intl8.useTranslations)("Form");
|
|
8711
|
+
throw new Error(t("validation.mustBeUsedWithinForm"));
|
|
8712
|
+
} catch {
|
|
8713
|
+
throw new Error("useFormField must be used within FormField");
|
|
8714
|
+
}
|
|
8178
8715
|
}
|
|
8716
|
+
const fieldState = getFieldState(fieldContext.name, formState);
|
|
8179
8717
|
const { id } = itemContext;
|
|
8180
8718
|
return {
|
|
8181
8719
|
id,
|
|
@@ -8940,6 +9478,7 @@ function getUnderverseMessages(locale = "en") {
|
|
|
8940
9478
|
Avatar,
|
|
8941
9479
|
Badge,
|
|
8942
9480
|
BadgeBase,
|
|
9481
|
+
BatteryProgress,
|
|
8943
9482
|
BottomSheet,
|
|
8944
9483
|
Breadcrumb,
|
|
8945
9484
|
Button,
|
|
@@ -8948,6 +9487,7 @@ function getUnderverseMessages(locale = "en") {
|
|
|
8948
9487
|
Carousel,
|
|
8949
9488
|
CategoryTreeSelect,
|
|
8950
9489
|
Checkbox,
|
|
9490
|
+
CircularProgress,
|
|
8951
9491
|
ClientOnly,
|
|
8952
9492
|
Combobox,
|
|
8953
9493
|
CompactPagination,
|
|
@@ -8957,6 +9497,8 @@ function getUnderverseMessages(locale = "en") {
|
|
|
8957
9497
|
DateUtils,
|
|
8958
9498
|
Drawer,
|
|
8959
9499
|
DropdownMenu,
|
|
9500
|
+
DropdownMenuItem,
|
|
9501
|
+
DropdownMenuSeparator,
|
|
8960
9502
|
FloatingContacts,
|
|
8961
9503
|
Form,
|
|
8962
9504
|
FormActions,
|
|
@@ -8980,7 +9522,9 @@ function getUnderverseMessages(locale = "en") {
|
|
|
8980
9522
|
LanguageSwitcherHeadless,
|
|
8981
9523
|
LoadingBar,
|
|
8982
9524
|
LoadingDots,
|
|
9525
|
+
LoadingProgress,
|
|
8983
9526
|
LoadingSpinner,
|
|
9527
|
+
MiniProgress,
|
|
8984
9528
|
Modal,
|
|
8985
9529
|
MultiCombobox,
|
|
8986
9530
|
NotificationBadge,
|
|
@@ -8994,18 +9538,31 @@ function getUnderverseMessages(locale = "en") {
|
|
|
8994
9538
|
Progress,
|
|
8995
9539
|
PulseBadge,
|
|
8996
9540
|
RadioGroup,
|
|
9541
|
+
RadioGroupItem,
|
|
8997
9542
|
SIZE_STYLES_BTN,
|
|
8998
9543
|
ScrollArea,
|
|
9544
|
+
SearchInput,
|
|
8999
9545
|
Section,
|
|
9546
|
+
SegmentedProgress,
|
|
9547
|
+
SelectDropdown,
|
|
9000
9548
|
Sheet,
|
|
9001
9549
|
SidebarSheet,
|
|
9002
9550
|
SimplePagination,
|
|
9003
9551
|
SimpleTabs,
|
|
9004
9552
|
Skeleton,
|
|
9553
|
+
SkeletonAvatar,
|
|
9554
|
+
SkeletonButton,
|
|
9555
|
+
SkeletonCard,
|
|
9556
|
+
SkeletonList,
|
|
9557
|
+
SkeletonMessage,
|
|
9558
|
+
SkeletonPost,
|
|
9559
|
+
SkeletonTable,
|
|
9560
|
+
SkeletonText,
|
|
9005
9561
|
SlideOver,
|
|
9006
9562
|
Slider,
|
|
9007
9563
|
SmartImage,
|
|
9008
9564
|
StatusBadge,
|
|
9565
|
+
StepProgress,
|
|
9009
9566
|
Switch,
|
|
9010
9567
|
Table,
|
|
9011
9568
|
TableBody,
|