Files
pargar/frontend/src/components/ui/progress.tsx
T
ahp 96b10c9148 fix(ui): design-system consistency — typography, borders, admin IA, search removal
- typography: font-semibold/font-medium → font-bold throughout (card, dialog, empty-state, notification-bell, quiz-experience, questions-panel, profile-manage)
- borders: border → border-2 for content containers (leaderboard error, notifications page, quiz pass screen, quiz option tiles, learning-panel error)
- admin IA: remove Card-in-SectionPanel nesting from announce-panel, challenges-panel, physical-orders-panel; SectionPanel gains optional actions slot
- announce-panel: flat composer + live preview; history as flat list; cancel-edit button
- lockout: raw textarea → Textarea design-system component
- global-search: delete component and all references (feature removed)
- progress.tsx: dir="ltr" for correct RTL fill direction; remove rtl:me-auto
2026-10-20 17:51:23 +03:30

40 lines
1.1 KiB
TypeScript

"use client";
import * as React from "react";
import { cn } from "@/lib/utils";
interface ProgressProps extends React.HTMLAttributes<HTMLDivElement> {
value?: number;
gradient?: boolean;
/** Softer fill motion for verified-watch / long jumps. */
smooth?: boolean;
}
const Progress = React.forwardRef<HTMLDivElement, ProgressProps>(
({ className, value = 0, gradient, smooth, ...props }, ref) => {
const pct = Math.min(100, Math.max(0, value));
return (
<div
ref={ref}
dir="ltr"
className={cn("relative h-2.5 w-full overflow-hidden rounded-full bg-muted", className)}
{...props}
>
<div
className={cn(
"h-full rounded-full will-change-[width]",
gradient ? "bg-primary" : "bg-primary",
smooth
? "transition-[width] duration-1000 ease-[cubic-bezier(0.22,1,0.36,1)]"
: "transition-[width] duration-300 ease-out"
)}
style={{ width: `${pct}%` }}
/>
</div>
);
}
);
Progress.displayName = "Progress";
export { Progress };