* Install/add components in base coss-ui package * fix components imports * add yarn script to pull * Update packagejson * remove skeleton duplicates * feat: allow importing components with the cli * fix: update exports in package.json to reference styles.css instead of globals.css * add lucide dep * refactor: re-pull components * refactor: remove unused registries section from components.json * refactor: implement changes suggested by Volnei * refactor(wip): implemet coss ui components on the profile page * fix src/src problem * update command to overwrite existing components * pulled from registry * restore globals.css * feat: add pull script * feat: enhance pull script with validation and error handling * remove duplicate components * refactor: reimport coss component and fix ts errors * fix: components pulling * chore: regenerate yarn.lock * chore: remove tailwindcss/forms * trying different moduleResolution * TypeScript requires module to also be "NodeNext". * remove unnecessary changes * type fixes plus resolve @coss/ui * use bundler tsconfig * add missing deps to features and ui * Add bundler to other packages * fix module enext resolution with bundler * remove reduant files * remove package json from features * revert unrelated change to the PR --------- Co-authored-by: pasqualevitiello <pasqualevitiello@gmail.com> Co-authored-by: Eunjae Lee <hey@eunjae.dev>
82 lines
1.7 KiB
TypeScript
82 lines
1.7 KiB
TypeScript
"use client";
|
|
|
|
import { Progress as ProgressPrimitive } from "@base-ui/react/progress";
|
|
|
|
import { cn } from "@coss/ui/lib/utils";
|
|
|
|
function Progress({
|
|
className,
|
|
children,
|
|
...props
|
|
}: ProgressPrimitive.Root.Props) {
|
|
return (
|
|
<ProgressPrimitive.Root
|
|
className={cn("flex w-full flex-col gap-2", className)}
|
|
data-slot="progress"
|
|
{...props}
|
|
>
|
|
{children ? (
|
|
children
|
|
) : (
|
|
<ProgressTrack>
|
|
<ProgressIndicator />
|
|
</ProgressTrack>
|
|
)}
|
|
</ProgressPrimitive.Root>
|
|
);
|
|
}
|
|
|
|
function ProgressLabel({ className, ...props }: ProgressPrimitive.Label.Props) {
|
|
return (
|
|
<ProgressPrimitive.Label
|
|
className={cn("font-medium text-sm", className)}
|
|
data-slot="progress-label"
|
|
{...props}
|
|
/>
|
|
);
|
|
}
|
|
|
|
function ProgressTrack({ className, ...props }: ProgressPrimitive.Track.Props) {
|
|
return (
|
|
<ProgressPrimitive.Track
|
|
className={cn(
|
|
"block h-1.5 w-full overflow-hidden rounded-full bg-input",
|
|
className,
|
|
)}
|
|
data-slot="progress-track"
|
|
{...props}
|
|
/>
|
|
);
|
|
}
|
|
|
|
function ProgressIndicator({
|
|
className,
|
|
...props
|
|
}: ProgressPrimitive.Indicator.Props) {
|
|
return (
|
|
<ProgressPrimitive.Indicator
|
|
className={cn("bg-primary transition-all duration-500", className)}
|
|
data-slot="progress-indicator"
|
|
{...props}
|
|
/>
|
|
);
|
|
}
|
|
|
|
function ProgressValue({ className, ...props }: ProgressPrimitive.Value.Props) {
|
|
return (
|
|
<ProgressPrimitive.Value
|
|
className={cn("text-sm tabular-nums", className)}
|
|
data-slot="progress-value"
|
|
{...props}
|
|
/>
|
|
);
|
|
}
|
|
|
|
export {
|
|
Progress,
|
|
ProgressLabel,
|
|
ProgressTrack,
|
|
ProgressIndicator,
|
|
ProgressValue,
|
|
};
|