mirror of
https://github.com/hanzoai/shadcn.git
synced 2026-10-30 18:22:59 +00:00
Squash merge of shadcn-ui/ui main branch into hanzo/ui, bringing in: - [email protected] through [email protected] releases - New apps/v4 directory structure - Registry system improvements and MCP server - Framework support (Vue, Svelte, React Native) - New templates (vite-app, monorepo-next, laravel) - Zod 4 compatibility (scoped override for zod@>4) - Test fixture corrections for alias resolution All 867 merge conflicts resolved preserving Hanzo customizations. 1020/1020 shadcn tests pass.
81 lines
1.7 KiB
TypeScript
81 lines
1.7 KiB
TypeScript
"use client"
|
|
|
|
import { Progress as ProgressPrimitive } from "@base-ui/react/progress"
|
|
|
|
import { cn } from "@/registry/bases/base/lib/utils"
|
|
|
|
function Progress({
|
|
className,
|
|
children,
|
|
value,
|
|
...props
|
|
}: ProgressPrimitive.Root.Props) {
|
|
return (
|
|
<ProgressPrimitive.Root
|
|
value={value}
|
|
data-slot="progress"
|
|
className={cn("cn-progress-root 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(
|
|
"cn-progress-track relative flex w-full items-center overflow-x-hidden",
|
|
className
|
|
)}
|
|
data-slot="progress-track"
|
|
{...props}
|
|
/>
|
|
)
|
|
}
|
|
|
|
function ProgressIndicator({
|
|
className,
|
|
...props
|
|
}: ProgressPrimitive.Indicator.Props) {
|
|
return (
|
|
<ProgressPrimitive.Indicator
|
|
data-slot="progress-indicator"
|
|
className={cn("cn-progress-indicator h-full transition-all", className)}
|
|
{...props}
|
|
/>
|
|
)
|
|
}
|
|
|
|
function ProgressLabel({ className, ...props }: ProgressPrimitive.Label.Props) {
|
|
return (
|
|
<ProgressPrimitive.Label
|
|
className={cn("cn-progress-label", className)}
|
|
data-slot="progress-label"
|
|
{...props}
|
|
/>
|
|
)
|
|
}
|
|
|
|
function ProgressValue({ className, ...props }: ProgressPrimitive.Value.Props) {
|
|
return (
|
|
<ProgressPrimitive.Value
|
|
className={cn("cn-progress-value", className)}
|
|
data-slot="progress-value"
|
|
{...props}
|
|
/>
|
|
)
|
|
}
|
|
|
|
export {
|
|
Progress,
|
|
ProgressTrack,
|
|
ProgressIndicator,
|
|
ProgressLabel,
|
|
ProgressValue,
|
|
}
|