@valpro-labs/ui 1.1.8 → 1.1.9
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.
|
@@ -26,7 +26,7 @@ function formatCount(num) {
|
|
|
26
26
|
function MissionCard({ title, xpReward, progress, total, xpLabel = 'XP', className, }) {
|
|
27
27
|
const percent = total > 0 ? Math.min(progress / total, 1) : 0;
|
|
28
28
|
const completed = percent >= 1;
|
|
29
|
-
return (_jsxs(View, { className: cn('w-full gap-y-1', className), children: [_jsxs(View, { className: "flex flex-row items-center justify-between gap-x-2", children: [_jsx(Text, { numberOfLines:
|
|
29
|
+
return (_jsxs(View, { className: cn('w-full gap-y-1', className), children: [_jsxs(View, { className: "flex flex-row items-center justify-between gap-x-2", children: [_jsx(Text, { numberOfLines: 1, ellipsizeMode: "tail", className: "text-foreground flex-1 text-base font-medium", children: title }), _jsxs(Text, { className: cn('shrink-0 text-xs font-bold tabular-nums', completed ? 'text-val-green-ui' : 'text-val-green-ui/50'), children: ["+", xpReward.toLocaleString(), " ", xpLabel] })] }), _jsxs(View, { className: "flex flex-row items-center gap-x-3", children: [_jsx(Progress, { value: percent * 100, className: "bg-muted h-1.5 flex-1", indicatorClassName: cn('shadow-[0_0_8px_rgba(34,255,197,0.5)]', completed ? 'bg-val-green-ui' : 'bg-val-green-ui/50') }), _jsxs(View, { className: "w-20 shrink-0 flex-row items-center justify-center gap-x-0.5", children: [_jsx(Text, { className: "text-muted-foreground flex-1 text-right text-xs leading-none tabular-nums", children: formatCount(progress) }), _jsx(Text, { className: "text-muted-foreground text-xs leading-none", children: "/" }), _jsx(Text, { className: "text-muted-foreground text-xs leading-none tabular-nums", children: formatCount(total) })] })] })] }));
|
|
30
30
|
}
|
|
31
31
|
export { MissionCard };
|
|
32
32
|
//# sourceMappingURL=mission-card.js.map
|