mirror of
https://github.com/escalante29/WealthySmart.git
synced 2026-07-17 10:28:47 +02:00
- PageHeader + StatTile standardize the four header and three stat-tile variants found in the audit; Inicio and Salarios migrated as proof. - chart tokens replaced with a teal-anchored categorical scale, CVD- ordered and validated (six checks, light + dark surfaces). - Registry adds: empty, field, item, spinner, progress, toggle-group, input-group, popover, kbd (+ toggle dep). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
82 lines
1.7 KiB
TypeScript
82 lines
1.7 KiB
TypeScript
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(
|
|
"relative flex h-1 w-full items-center overflow-x-hidden rounded-full bg-muted",
|
|
className
|
|
)}
|
|
data-slot="progress-track"
|
|
{...props}
|
|
/>
|
|
)
|
|
}
|
|
|
|
function ProgressIndicator({
|
|
className,
|
|
...props
|
|
}: ProgressPrimitive.Indicator.Props) {
|
|
return (
|
|
<ProgressPrimitive.Indicator
|
|
data-slot="progress-indicator"
|
|
className={cn("h-full bg-primary transition-all", className)}
|
|
{...props}
|
|
/>
|
|
)
|
|
}
|
|
|
|
function ProgressLabel({ className, ...props }: ProgressPrimitive.Label.Props) {
|
|
return (
|
|
<ProgressPrimitive.Label
|
|
className={cn("text-sm font-medium", className)}
|
|
data-slot="progress-label"
|
|
{...props}
|
|
/>
|
|
)
|
|
}
|
|
|
|
function ProgressValue({ className, ...props }: ProgressPrimitive.Value.Props) {
|
|
return (
|
|
<ProgressPrimitive.Value
|
|
className={cn(
|
|
"ml-auto text-sm text-muted-foreground tabular-nums",
|
|
className
|
|
)}
|
|
data-slot="progress-value"
|
|
{...props}
|
|
/>
|
|
)
|
|
}
|
|
|
|
export {
|
|
Progress,
|
|
ProgressTrack,
|
|
ProgressIndicator,
|
|
ProgressLabel,
|
|
ProgressValue,
|
|
}
|