Files
sofa/components/ui/progress.tsx
T
jakeandClaude Opus 4.6 095b64ab42 Simplify auth, remove abstraction layers, add shadcn components
- Delete lib/api/errors.ts and lib/api/auth-guard.ts, inline
  NextResponse.json() error responses directly in route handlers
- Replace non-standard amber CSS variables with primary/primary-foreground
- Regenerate shadcn UI components with biome-ignore comments
- Add CLAUDE.md for repository guidance
- Update dependencies and pnpm lockfile

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 15:00:15 -05:00

84 lines
1.7 KiB
TypeScript

"use client";
import { Progress as ProgressPrimitive } from "@base-ui/react/progress";
import { cn } from "@/lib/utils";
function Progress({
className,
children,
value,
...props
}: ProgressPrimitive.Root.Props) {
return (
<ProgressPrimitive.Root
value={value}
data-slot="progress"
className={cn("flex flex-wrap gap-3", className)}
{...props}
>
{children}
<ProgressTrack>
<ProgressIndicator />
</ProgressTrack>
</ProgressPrimitive.Root>
);
}
function ProgressTrack({ className, ...props }: ProgressPrimitive.Track.Props) {
return (
<ProgressPrimitive.Track
className={cn(
"bg-muted relative flex h-1 w-full items-center overflow-x-hidden rounded-md",
className,
)}
data-slot="progress-track"
{...props}
/>
);
}
function ProgressIndicator({
className,
...props
}: ProgressPrimitive.Indicator.Props) {
return (
<ProgressPrimitive.Indicator
data-slot="progress-indicator"
className={cn("bg-primary h-full transition-all", className)}
{...props}
/>
);
}
function ProgressLabel({ className, ...props }: ProgressPrimitive.Label.Props) {
return (
<ProgressPrimitive.Label
className={cn("text-xs/relaxed font-medium", className)}
data-slot="progress-label"
{...props}
/>
);
}
function ProgressValue({ className, ...props }: ProgressPrimitive.Value.Props) {
return (
<ProgressPrimitive.Value
className={cn(
"text-muted-foreground ml-auto text-xs/relaxed tabular-nums",
className,
)}
data-slot="progress-value"
{...props}
/>
);
}
export {
Progress,
ProgressTrack,
ProgressIndicator,
ProgressLabel,
ProgressValue,
};