Skip to content

OpenReel Video - Professional browser-based video editor. Open source CapCut alternative. 100% browser-based, no installation, no cloud uploads, no watermarks.

TypeScript

feat: add Checkbox, Progress, Skeleton, Alert, Card, ScrollArea from shadcn/ui

Augustus Otu7aaadd4940de
diff --git a/apps/web/src/components/editor/AssetsPanel.tsx b/apps/web/src/components/editor/AssetsPanel.tsx
index 3adadd98..9bba4889 100644
--- a/apps/web/src/components/editor/AssetsPanel.tsx
+++ b/apps/web/src/components/editor/AssetsPanel.tsx
@@ -36,7 +36,7 @@ import { MusicLibraryPanel } from "./inspector/MusicLibraryPanel";
import { MultiCameraPanel } from "./inspector/MultiCameraPanel";
import { TextToSpeechPanel } from "./inspector/TextToSpeechPanel";
import { AspectRatioMatchDialog } from "./dialogs/AspectRatioMatchDialog";
-import { IconButton, Input } from "@openreel/ui";
+import { IconButton, Input, ScrollArea } from "@openreel/ui";
const formatDuration = (seconds: number): string => {
const mins = Math.floor(seconds / 60);
@@ -707,47 +707,48 @@ export const AssetsPanel: React.FC = () => {
{/* Content based on active tab */}
{activeTab === "media" && (
- <div
- className={`flex-1 overflow-y-auto px-5 pb-5 custom-scrollbar ${
- isDragOver ? "bg-primary/5" : ""
- }`}
+ <ScrollArea
+ className={`flex-1 ${isDragOver ? "bg-primary/5" : ""}`}
onDrop={handleDrop}
onDragOver={handleDragOver}
onDragLeave={handleDragLeave}
>
- {filteredItems.length === 0 ? (
- <EmptyState onImport={triggerFileInput} />
- ) : (
- <div className="grid grid-cols-2 gap-3">
- {filteredItems.map((item) => (
- <MediaThumbnail
- key={item.id}
- item={item}
- isSelected={isSelected(item.id)}
- onSelect={() => handleSelectItem(item.id)}
- onDelete={() => handleDeleteItem(item.id)}
- onReplace={() => handleReplaceAsset(item.id)}
- onDragStart={(e) => handleItemDragStart(e, item)}
- onAddToTimeline={() => handleAddToTimeline(item)}
- />
- ))}
- </div>
- )}
+ <div className="px-5 pb-5">
+ {filteredItems.length === 0 ? (
+ <EmptyState onImport={triggerFileInput} />
+ ) : (
+ <div className="grid grid-cols-2 gap-3">
+ {filteredItems.map((item) => (
+ <MediaThumbnail
+ key={item.id}
+ item={item}
+ isSelected={isSelected(item.id)}
+ onSelect={() => handleSelectItem(item.id)}
+ onDelete={() => handleDeleteItem(item.id)}
+ onReplace={() => handleReplaceAsset(item.id)}
+ onDragStart={(e) => handleItemDragStart(e, item)}
+ onAddToTimeline={() => handleAddToTimeline(item)}
+ />
+ ))}
+ </div>
+ )}
- {/* Drop zone indicator */}
- {isDragOver && (
- <div className="absolute inset-4 border-2 border-dashed border-primary rounded-xl flex items-center justify-center bg-primary/5 pointer-events-none z-50 backdrop-blur-sm">
- <div className="text-primary text-sm font-bold bg-background-secondary px-4 py-2 rounded-full shadow-lg">
- Drop files to import
+ {/* Drop zone indicator */}
+ {isDragOver && (
+ <div className="absolute inset-4 border-2 border-dashed border-primary rounded-xl flex items-center justify-center bg-primary/5 pointer-events-none z-50 backdrop-blur-sm">
+ <div className="text-primary text-sm font-bold bg-background-secondary px-4 py-2 rounded-full shadow-lg">
+ Drop files to import
+ </div>
</div>
- </div>
- )}
- </div>
+ )}
+ </div>
+ </ScrollArea>
)}
{/* Graphics Tab Content (Task 16) */}
{activeTab === "graphics" && (
- <div className="flex-1 overflow-y-auto px-5 pb-5 custom-scrollbar">
+ <ScrollArea className="flex-1">
+ <div className="px-5 pb-5">
{/* Backgrounds Section */}
<div className="mb-6">
<div className="flex items-center justify-between mb-3">
@@ -955,13 +956,14 @@ export const AssetsPanel: React.FC = () => {
)}
</div>
</div>
- </div>
+ </div>
+ </ScrollArea>
)}
{/* Text Tab Content */}
{activeTab === "text" && (
- <div className="flex-1 overflow-y-auto px-5 pb-5 custom-scrollbar">
- <div className="space-y-3">
+ <ScrollArea className="flex-1">
+ <div className="px-5 pb-5 space-y-3">
<button
onClick={async () => {
const state = useProjectStore.getState();
@@ -1067,13 +1069,14 @@ export const AssetsPanel: React.FC = () => {
))}
</div>
</div>
- </div>
+ </ScrollArea>
)}
{/* AI Tab Content */}
{activeTab === "ai" && (
- <div className="flex-1 overflow-y-auto p-4 space-y-6">
- <TemplatesBrowserPanel />
+ <ScrollArea className="flex-1">
+ <div className="p-4 space-y-6">
+ <TemplatesBrowserPanel />
<div className="border-t border-border pt-4">
<AutoCaptionPanel />
</div>
@@ -1089,7 +1092,8 @@ export const AssetsPanel: React.FC = () => {
<div className="border-t border-border pt-4">
<MultiCameraPanel />
</div>
- </div>
+ </div>
+ </ScrollArea>
)}
{aspectRatioDialogData && (
diff --git a/apps/web/src/components/editor/ProcessingOverlay.tsx b/apps/web/src/components/editor/ProcessingOverlay.tsx
index 8f15c3b0..2d14f051 100644
--- a/apps/web/src/components/editor/ProcessingOverlay.tsx
+++ b/apps/web/src/components/editor/ProcessingOverlay.tsx
@@ -1,5 +1,6 @@
import React from "react";
import { Loader2, CheckCircle, XCircle, Clock } from "lucide-react";
+import { Progress, ScrollArea } from "@openreel/ui";
import {
useProcessingStore,
PROCESSING_TYPE_LABELS,
@@ -47,12 +48,7 @@ const TaskItem: React.FC<{ task: ProcessingTask }> = ({ task }) => {
</div>
{task.status === "processing" && (
<div className="mt-1">
- <div className="h-1 bg-black/30 rounded-full overflow-hidden">
- <div
- className="h-full bg-blue-500 transition-all duration-300"
- style={{ width: `${task.progress}%` }}
- />
- </div>
+ <Progress value={task.progress} className="h-1 bg-black/30" />
<p className="text-[9px] text-text-muted mt-0.5 truncate">
{task.message}
</p>
@@ -108,19 +104,16 @@ export const ProcessingOverlay: React.FC = () => {
{progress}%
</span>
</div>
- <div className="h-2 bg-black/30 rounded-full overflow-hidden">
- <div
- className="h-full bg-gradient-to-r from-blue-500 to-cyan-500 transition-all duration-300"
- style={{ width: `${progress}%` }}
- />
- </div>
+ <Progress value={progress} className="h-2 bg-black/30" />
</div>
- <div className="space-y-2 max-h-48 overflow-y-auto">
- {activeTasks.map((task) => (
- <TaskItem key={task.id} task={task} />
- ))}
- </div>
+ <ScrollArea className="max-h-48">
+ <div className="space-y-2">
+ {activeTasks.map((task) => (
+ <TaskItem key={task.id} task={task} />
+ ))}
+ </div>
+ </ScrollArea>
<p className="text-[10px] text-text-muted text-center mt-4">
Please wait while effects are being applied...
diff --git a/apps/web/src/components/editor/inspector/HistoryPanel.tsx b/apps/web/src/components/editor/inspector/HistoryPanel.tsx
index 29b7d7ab..f47aa2d8 100644
--- a/apps/web/src/components/editor/inspector/HistoryPanel.tsx
+++ b/apps/web/src/components/editor/inspector/HistoryPanel.tsx
@@ -13,7 +13,7 @@ import {
FileCode,
Smile,
} from "lucide-react";
-import { Input } from "@openreel/ui";
+import { Input, ScrollArea } from "@openreel/ui";
import { useProjectStore } from "../../../stores/project-store";
import type { HistorySnapshot } from "@openreel/core";
@@ -232,7 +232,7 @@ export const HistoryPanel: React.FC = () => {
)}
</div>
- <div className="flex-1 overflow-y-auto">
+ <ScrollArea className="flex-1">
{combinedHistory.length === 0 ? (
<div className="flex flex-col items-center justify-center h-full text-text-muted">
<History size={24} className="mb-2 opacity-30" />
@@ -289,7 +289,7 @@ export const HistoryPanel: React.FC = () => {
})}
</div>
)}
- </div>
+ </ScrollArea>
<div className="p-2 border-t border-border bg-background-tertiary">
<div className="flex items-center justify-between text-[10px] text-text-muted">
diff --git a/apps/web/src/components/editor/inspector/MarkersPanel.tsx b/apps/web/src/components/editor/inspector/MarkersPanel.tsx
index 9cf0f303..49df7422 100644
--- a/apps/web/src/components/editor/inspector/MarkersPanel.tsx
+++ b/apps/web/src/components/editor/inspector/MarkersPanel.tsx
@@ -1,6 +1,6 @@
import React, { useState } from "react";
import { Flag, Plus, Trash2, Edit2, Check, X } from "lucide-react";
-import { Input } from "@openreel/ui";
+import { Input, ScrollArea } from "@openreel/ui";
import { useProjectStore } from "../../../stores/project-store";
import { getPlaybackBridge } from "../../../bridges/playback-bridge";
import type { Marker } from "@openreel/core";
@@ -84,8 +84,9 @@ export const MarkersPanel: React.FC = () => {
<p className="text-[10px] mt-1">Press M at playhead to add markers</p>
</div>
) : (
- <div className="space-y-1 max-h-96 overflow-y-auto">
- {markers
+ <ScrollArea className="max-h-96">
+ <div className="space-y-1">
+ {markers
.sort((a, b) => a.time - b.time)
.map((marker) => (
<div
@@ -171,7 +172,8 @@ export const MarkersPanel: React.FC = () => {
)}
</div>
))}
- </div>
+ </div>
+ </ScrollArea>
)}
</div>
);
diff --git a/apps/web/src/components/editor/inspector/MotionTrackingSection.tsx b/apps/web/src/components/editor/inspector/MotionTrackingSection.tsx
index 6918a09e..ccc07dc5 100644
--- a/apps/web/src/components/editor/inspector/MotionTrackingSection.tsx
+++ b/apps/web/src/components/editor/inspector/MotionTrackingSection.tsx
@@ -12,7 +12,7 @@ import {
Settings2,
RefreshCw,
} from "lucide-react";
-import { Slider } from "@openreel/ui";
+import { Slider, Checkbox, Label } from "@openreel/ui";
import {
getMotionTrackingBridge,
type MotionTrackingState,
@@ -428,46 +428,52 @@ export const MotionTrackingSection: React.FC<MotionTrackingSectionProps> = ({
</div>
<div className="space-y-2">
- <label className="text-[10px] font-medium text-text-secondary">
+ <Label className="text-[10px] font-medium text-text-secondary">
Transform Options
- </label>
+ </Label>
<div className="grid grid-cols-2 gap-2">
- <label className="flex items-center gap-2 p-2 bg-background-tertiary rounded-lg cursor-pointer hover:bg-background-secondary transition-colors">
- <input
- type="checkbox"
+ <div className="flex items-center gap-2 p-2 bg-background-tertiary rounded-lg">
+ <Checkbox
+ id="apply-scale"
checked={applyScale}
- onChange={(e) => {
- setApplyScale(e.target.checked);
+ onCheckedChange={(checked) => {
+ const value = checked === true;
+ setApplyScale(value);
if (isApplied) {
- bridge.setApplyScale(clipId, e.target.checked);
+ bridge.setApplyScale(clipId, value);
}
}}
- className="w-3.5 h-3.5 rounded border-border accent-primary"
/>
- <div className="flex items-center gap-1">
+ <Label
+ htmlFor="apply-scale"
+ className="flex items-center gap-1 cursor-pointer"
+ >
<Maximize2 size={10} className="text-text-muted" />
<span className="text-[10px] text-text-secondary">Scale</span>
- </div>
- </label>
- <label className="flex items-center gap-2 p-2 bg-background-tertiary rounded-lg cursor-pointer hover:bg-background-secondary transition-colors">
- <input
- type="checkbox"
+ </Label>
+ </div>
+ <div className="flex items-center gap-2 p-2 bg-background-tertiary rounded-lg">
+ <Checkbox
+ id="apply-rotation"
checked={applyRotation}
- onChange={(e) => {
- setApplyRotation(e.target.checked);
+ onCheckedChange={(checked) => {
+ const value = checked === true;
+ setApplyRotation(value);
if (isApplied) {
- bridge.setApplyRotation(clipId, e.target.checked);
+ bridge.setApplyRotation(clipId, value);
}
}}
- className="w-3.5 h-3.5 rounded border-border accent-primary"
/>
- <div className="flex items-center gap-1">
+ <Label
+ htmlFor="apply-rotation"
+ className="flex items-center gap-1 cursor-pointer"
+ >
<RotateCcw size={10} className="text-text-muted" />
<span className="text-[10px] text-text-secondary">
Rotation
</span>
- </div>
- </label>
+ </Label>
+ </div>
</div>
</div>
diff --git a/apps/web/src/components/editor/inspector/SpeedSection.tsx b/apps/web/src/components/editor/inspector/SpeedSection.tsx
index 2fb76236..7c3e32d0 100644
--- a/apps/web/src/components/editor/inspector/SpeedSection.tsx
+++ b/apps/web/src/components/editor/inspector/SpeedSection.tsx
@@ -3,6 +3,7 @@ import { RotateCcw } from "lucide-react";
import type { Clip } from "@openreel/core";
import { getSpeedEngine } from "@openreel/core";
import { useProjectStore } from "../../../stores/project-store";
+import { Input, Switch, Label } from "@openreel/ui";
interface SpeedSectionProps {
clip: Clip;
@@ -174,13 +175,13 @@ export const SpeedSection: React.FC<SpeedSectionProps> = ({ clip }) => {
</div>
<div className="space-y-2">
- <label className="text-xs text-text-tertiary">Custom Speed</label>
+ <Label className="text-xs text-text-tertiary">Custom Speed</Label>
<div className="flex gap-2">
- <input
+ <Input
type="number"
- min="0.1"
- max="100"
- step="0.1"
+ min={0.1}
+ max={100}
+ step={0.1}
value={customSpeed}
onChange={(e) => setCustomSpeed(e.target.value)}
onBlur={handleCustomSpeed}
@@ -189,7 +190,7 @@ export const SpeedSection: React.FC<SpeedSectionProps> = ({ clip }) => {
handleCustomSpeed();
}
}}
- className="flex-1 px-3 py-2 bg-background-tertiary border border-border rounded-lg text-sm text-text-primary focus:outline-none focus:border-primary transition-colors"
+ className="flex-1 bg-background-tertiary border-border text-text-primary"
placeholder="1.0"
/>
<span className="flex items-center text-xs text-text-tertiary">
@@ -203,18 +204,14 @@ export const SpeedSection: React.FC<SpeedSectionProps> = ({ clip }) => {
{hasAudio() && (
<div className="flex items-center justify-between p-3 rounded-lg bg-background-tertiary border border-border">
- <span className="text-xs text-text-secondary">
+ <Label htmlFor="affect-audio" className="text-xs text-text-secondary">
Apply speed to audio
- </span>
- <label className="relative inline-flex items-center cursor-pointer">
- <input
- type="checkbox"
- checked={affectAudio}
- onChange={(e) => setAffectAudio(e.target.checked)}
- className="sr-only peer"
- />
- <div className="w-9 h-5 bg-background-elevated peer-focus:outline-none peer-focus:ring-2 peer-focus:ring-primary rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-4 after:w-4 after:transition-all peer-checked:bg-primary"></div>
- </label>
+ </Label>
+ <Switch
+ id="affect-audio"
+ checked={affectAudio}
+ onCheckedChange={setAffectAudio}
+ />
</div>
)}
diff --git a/packages/ui/package.json b/packages/ui/package.json
index 8547c1ee..981a1851 100644
--- a/packages/ui/package.json
+++ b/packages/ui/package.json
@@ -32,12 +32,15 @@
"react-dom": "^18.0.0"
},
"dependencies": {
+ "@radix-ui/react-checkbox": "^1.3.3",
"@radix-ui/react-collapsible": "^1.1.12",
"@radix-ui/react-context-menu": "^2.2.16",
"@radix-ui/react-dialog": "^1.1.15",
"@radix-ui/react-dropdown-menu": "^2.1.16",
"@radix-ui/react-label": "^2.1.8",
"@radix-ui/react-popover": "^1.1.15",
+ "@radix-ui/react-progress": "^1.1.8",
+ "@radix-ui/react-scroll-area": "^1.2.10",
"@radix-ui/react-select": "^2.2.6",
"@radix-ui/react-slider": "^1.3.6",
"@radix-ui/react-slot": "^1.2.3",
diff --git a/packages/ui/src/components/alert.tsx b/packages/ui/src/components/alert.tsx
new file mode 100644
index 00000000..3d1a2efa
--- /dev/null
+++ b/packages/ui/src/components/alert.tsx
@@ -0,0 +1,59 @@
+import * as React from "react"
+import { cva, type VariantProps } from "class-variance-authority"
+
+import { cn } from "@openreel/ui/lib/utils"
+
+const alertVariants = cva(
+ "relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",
+ {
+ variants: {
+ variant: {
+ default: "bg-background text-foreground",
+ destructive:
+ "border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive",
+ },
+ },
+ defaultVariants: {
+ variant: "default",
+ },
+ }
+)
+
+const Alert = React.forwardRef<
+ HTMLDivElement,
+ React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof alertVariants>
+>(({ className, variant, ...props }, ref) => (
+ <div
+ ref={ref}
+ role="alert"
+ className={cn(alertVariants({ variant }), className)}
+ {...props}
+ />
+))
+Alert.displayName = "Alert"
+
+const AlertTitle = React.forwardRef<
+ HTMLParagraphElement,
+ React.HTMLAttributes<HTMLHeadingElement>
+>(({ className, ...props }, ref) => (
+ <h5
+ ref={ref}
+ className={cn("mb-1 font-medium leading-none tracking-tight", className)}
+ {...props}
+ />
+))
+AlertTitle.displayName = "AlertTitle"
+
+const AlertDescription = React.forwardRef<
+ HTMLParagraphElement,
+ React.HTMLAttributes<HTMLParagraphElement>
+>(({ className, ...props }, ref) => (
+ <div
+ ref={ref}
+ className={cn("text-sm [&_p]:leading-relaxed", className)}
+ {...props}
+ />
+))
+AlertDescription.displayName = "AlertDescription"
+
+export { Alert, AlertTitle, AlertDescription }
diff --git a/packages/ui/src/components/card.tsx b/packages/ui/src/components/card.tsx
new file mode 100644
index 00000000..fb97b5e7
--- /dev/null
+++ b/packages/ui/src/components/card.tsx
@@ -0,0 +1,79 @@
+import * as React from "react"
+
+import { cn } from "@openreel/ui/lib/utils"
+
+const Card = React.forwardRef<
+ HTMLDivElement,
+ React.HTMLAttributes<HTMLDivElement>
+>(({ className, ...props }, ref) => (
+ <div
+ ref={ref}
+ className={cn(
+ "rounded-lg border bg-card text-card-foreground shadow-sm",
+ className
+ )}
+ {...props}
+ />
+))
+Card.displayName = "Card"
+
+const CardHeader = React.forwardRef<
+ HTMLDivElement,
+ React.HTMLAttributes<HTMLDivElement>
+>(({ className, ...props }, ref) => (
+ <div
+ ref={ref}
+ className={cn("flex flex-col space-y-1.5 p-6", className)}
+ {...props}
+ />
+))
+CardHeader.displayName = "CardHeader"
+
+const CardTitle = React.forwardRef<
+ HTMLDivElement,
+ React.HTMLAttributes<HTMLDivElement>
+>(({ className, ...props }, ref) => (
+ <div
+ ref={ref}
+ className={cn(
+ "text-2xl font-semibold leading-none tracking-tight",
+ className
+ )}
+ {...props}
+ />
+))
+CardTitle.displayName = "CardTitle"
+
+const CardDescription = React.forwardRef<
+ HTMLDivElement,
+ React.HTMLAttributes<HTMLDivElement>
+>(({ className, ...props }, ref) => (
+ <div
+ ref={ref}
+ className={cn("text-sm text-muted-foreground", className)}
+ {...props}
+ />
+))
+CardDescription.displayName = "CardDescription"
+
+const CardContent = React.forwardRef<
+ HTMLDivElement,
+ React.HTMLAttributes<HTMLDivElement>
+>(({ className, ...props }, ref) => (
+ <div ref={ref} className={cn("p-6 pt-0", className)} {...props} />
+))
+CardContent.displayName = "CardContent"
+
+const CardFooter = React.forwardRef<
+ HTMLDivElement,
+ React.HTMLAttributes<HTMLDivElement>
+>(({ className, ...props }, ref) => (
+ <div
+ ref={ref}
+ className={cn("flex items-center p-6 pt-0", className)}
+ {...props}
+ />
+))
+CardFooter.displayName = "CardFooter"
+
+export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent }
diff --git a/packages/ui/src/components/checkbox.tsx b/packages/ui/src/components/checkbox.tsx
new file mode 100644
index 00000000..ba619e7c
--- /dev/null
+++ b/packages/ui/src/components/checkbox.tsx
@@ -0,0 +1,28 @@
+import * as React from "react"
+import * as CheckboxPrimitive from "@radix-ui/react-checkbox"
+import { Check } from "lucide-react"
+
+import { cn } from "@openreel/ui/lib/utils"
+
+const Checkbox = React.forwardRef<
+ React.ElementRef<typeof CheckboxPrimitive.Root>,
+ React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>
+>(({ className, ...props }, ref) => (
+ <CheckboxPrimitive.Root
+ ref={ref}
+ className={cn(
+ "grid place-content-center peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",
+ className
+ )}
+ {...props}
+ >
+ <CheckboxPrimitive.Indicator
+ className={cn("grid place-content-center text-current")}
+ >
+ <Check className="h-4 w-4" />
+ </CheckboxPrimitive.Indicator>
+ </CheckboxPrimitive.Root>
+))
+Checkbox.displayName = CheckboxPrimitive.Root.displayName
+
+export { Checkbox }
diff --git a/packages/ui/src/components/progress.tsx b/packages/ui/src/components/progress.tsx
new file mode 100644
index 00000000..eb4da3c1
--- /dev/null
+++ b/packages/ui/src/components/progress.tsx
@@ -0,0 +1,26 @@
+import * as React from "react"
+import * as ProgressPrimitive from "@radix-ui/react-progress"
+
+import { cn } from "@openreel/ui/lib/utils"
+
+const Progress = React.forwardRef<
+ React.ElementRef<typeof ProgressPrimitive.Root>,
+ React.ComponentPropsWithoutRef<typeof ProgressPrimitive.Root>
+>(({ className, value, ...props }, ref) => (
+ <ProgressPrimitive.Root
+ ref={ref}
+ className={cn(
+ "relative h-4 w-full overflow-hidden rounded-full bg-secondary",
+ className
+ )}
+ {...props}
+ >
+ <ProgressPrimitive.Indicator
+ className="h-full w-full flex-1 bg-primary transition-all"
+ style={{ transform: `translateX(-${100 - (value || 0)}%)` }}
+ />
+ </ProgressPrimitive.Root>
+))
+Progress.displayName = ProgressPrimitive.Root.displayName
+
+export { Progress }
diff --git a/packages/ui/src/components/scroll-area.tsx b/packages/ui/src/components/scroll-area.tsx
new file mode 100644
index 00000000..35334ebc
--- /dev/null
+++ b/packages/ui/src/components/scroll-area.tsx
@@ -0,0 +1,46 @@
+import * as React from "react"
+import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area"
+
+import { cn } from "@openreel/ui/lib/utils"
+
+const ScrollArea = React.forwardRef<
+ React.ElementRef<typeof ScrollAreaPrimitive.Root>,
+ React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root>
+>(({ className, children, ...props }, ref) => (
+ <ScrollAreaPrimitive.Root
+ ref={ref}
+ className={cn("relative overflow-hidden", className)}
+ {...props}
+ >
+ <ScrollAreaPrimitive.Viewport className="h-full w-full rounded-[inherit]">
+ {children}
+ </ScrollAreaPrimitive.Viewport>
+ <ScrollBar />
+ <ScrollAreaPrimitive.Corner />
+ </ScrollAreaPrimitive.Root>
+))
+ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName
+
+const ScrollBar = React.forwardRef<
+ React.ElementRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>,
+ React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>
+>(({ className, orientation = "vertical", ...props }, ref) => (
+ <ScrollAreaPrimitive.ScrollAreaScrollbar
+ ref={ref}
+ orientation={orientation}
+ className={cn(
+ "flex touch-none select-none transition-colors",
+ orientation === "vertical" &&
+ "h-full w-2.5 border-l border-l-transparent p-[1px]",
+ orientation === "horizontal" &&
+ "h-2.5 flex-col border-t border-t-transparent p-[1px]",
+ className
+ )}
+ {...props}
+ >
+ <ScrollAreaPrimitive.ScrollAreaThumb className="relative flex-1 rounded-full bg-border" />
+ </ScrollAreaPrimitive.ScrollAreaScrollbar>
+))
+ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName
+
+export { ScrollArea, ScrollBar }
diff --git a/packages/ui/src/components/skeleton.tsx b/packages/ui/src/components/skeleton.tsx
new file mode 100644
index 00000000..7c7056a6
--- /dev/null
+++ b/packages/ui/src/components/skeleton.tsx
@@ -0,0 +1,15 @@
+import { cn } from "@openreel/ui/lib/utils"
+
+function Skeleton({
+ className,
+ ...props
+}: React.HTMLAttributes<HTMLDivElement>) {
+ return (
+ <div
+ className={cn("animate-pulse rounded-md bg-muted", className)}
+ {...props}
+ />
+ )
+}
+
+export { Skeleton }
diff --git a/packages/ui/src/index.ts b/packages/ui/src/index.ts
index af621c41..56658ec8 100644
--- a/packages/ui/src/index.ts
+++ b/packages/ui/src/index.ts
@@ -1,6 +1,9 @@
export { cn } from "./lib/utils"
+export { Alert, AlertTitle, AlertDescription } from "./components/alert"
export { Button, buttonVariants, type ButtonProps } from "./components/button"
+export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent } from "./components/card"
+export { Checkbox } from "./components/checkbox"
export { IconButton, type IconButtonProps } from "./components/icon-button"
export { Collapsible, CollapsibleTrigger, CollapsibleContent } from "./components/collapsible"
export {
@@ -52,6 +55,7 @@ export {
export { Input } from "./components/input"
export { Label } from "./components/label"
export { Popover, PopoverTrigger, PopoverContent } from "./components/popover"
+export { Progress } from "./components/progress"
export {
Select,
SelectGroup,
@@ -64,6 +68,8 @@ export {
SelectScrollUpButton,
SelectScrollDownButton,
} from "./components/select"
+export { ScrollArea, ScrollBar } from "./components/scroll-area"
+export { Skeleton } from "./components/skeleton"
export { Slider } from "./components/slider"
export { LabeledSlider, InspectorSlider, type LabeledSliderProps, type InspectorSliderProps } from "./components/labeled-slider"
export { Switch } from "./components/switch"
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 16a1b734..fb1b42fc 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -212,6 +212,9 @@ importers:
packages/ui:
dependencies:
+ '@radix-ui/react-checkbox':
+ specifier: ^1.3.3
'@radix-ui/react-collapsible':
specifier: ^1.1.12
@@ -230,6 +233,12 @@ importers:
'@radix-ui/react-popover':
specifier: ^1.1.15
+ '@radix-ui/react-progress':
+ specifier: ^1.1.8
+ '@radix-ui/react-scroll-area':
+ specifier: ^1.2.10
'@radix-ui/react-select':
specifier: ^2.2.6
@@ -998,6 +1007,19 @@ packages:
'@types/react-dom':
optional: true
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-wBbpv+NQftHDdG86Qc0pIyXk5IR3tM8Vd0nWLKDcX8nNn4nXFOFwsKuqw2okA/1D/mpaAkmuyndrPJTYDNZtFw==}
+ peerDependencies:
+ '@types/react': '*'
+ '@types/react-dom': '*'
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ '@types/react':
+ optional: true
+ '@types/react-dom':
+ optional: true
+
'@radix-ui/[email protected]':
resolution: {integrity: sha512-Uu+mSh4agx2ib1uIGPP4/CKNULyajb3p92LsVXmH2EHVMTfZWpll88XJ0j4W0z3f8NK1eYl1+Mf/szHPmcHzyA==}
peerDependencies:
@@ -1055,6 +1077,15 @@ packages:
'@types/react':
optional: true
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-ieIFACdMpYfMEjF0rEf5KLvfVyIkOz6PDGyNnP+u+4xQ6jny3VCgA4OgXOwNx2aUkxn8zx9fiVcM8CfFYv9Lxw==}
+ peerDependencies:
+ '@types/react': '*'
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ '@types/react':
+ optional: true
+
'@radix-ui/[email protected]':
resolution: {integrity: sha512-TCglVRtzlffRNxRMEyR36DGBLJpeusFcgMVD9PZEzAKnUs1lKCgX5u9BmC2Yg+LL9MgZDugFFs1Vl+Jp4t/PGw==}
peerDependencies:
@@ -1238,6 +1269,19 @@ packages:
'@types/react-dom':
optional: true
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-+gISHcSPUJ7ktBy9RnTqbdKW78bcGke3t6taawyZ71pio1JewwGSJizycs7rLhGTvMJYCQB1DBK4KQsxs7U8dA==}
+ peerDependencies:
+ '@types/react': '*'
+ '@types/react-dom': '*'
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ '@types/react':
+ optional: true
+ '@types/react-dom':
+ optional: true
+
'@radix-ui/[email protected]':
resolution: {integrity: sha512-7A6S9jSgm/S+7MdtNDSb+IU859vQqJ/QAtcYQcfFC6W8RS4IxIZDldLR0xqCFZ6DCyrQLjLPsxtTNch5jVA4lA==}
peerDependencies:
@@ -1251,6 +1295,19 @@ packages:
'@types/react-dom':
optional: true
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-tAXIa1g3sM5CGpVT0uIbUx/U3Gs5N8T52IICuCtObaos1S8fzsrPXG5WObkQN3S6NVl6wKgPhAIiBGbWnvc97A==}
+ peerDependencies:
+ '@types/react': '*'
+ '@types/react-dom': '*'
+ react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc
+ peerDependenciesMeta:
+ '@types/react':
+ optional: true
+ '@types/react-dom':
+ optional: true
+
'@radix-ui/[email protected]':
resolution: {integrity: sha512-I30RydO+bnn2PQztvo25tswPH+wFBjehVGtmagkU78yMdwTwVf12wnAOF+AeP8S2N8xD+5UPbGhkUfPyvT+mwQ==}
peerDependencies:
@@ -3856,6 +3913,22 @@ snapshots:
'@types/react': 18.3.27
'@types/react-dom': 18.3.7(@types/[email protected])
+ dependencies:
+ '@radix-ui/primitive': 1.1.3
+ '@radix-ui/react-compose-refs': 1.1.2(@types/[email protected])([email protected])
+ '@radix-ui/react-context': 1.1.2(@types/[email protected])([email protected])
+ '@radix-ui/react-use-controllable-state': 1.2.2(@types/[email protected])([email protected])
+ '@radix-ui/react-use-previous': 1.1.1(@types/[email protected])([email protected])
+ '@radix-ui/react-use-size': 1.1.1(@types/[email protected])([email protected])
+ react: 18.3.1
+ react-dom: 18.3.1([email protected])
+ optionalDependencies:
+ '@types/react': 18.3.27
+ '@types/react-dom': 18.3.7(@types/[email protected])
+
dependencies:
'@radix-ui/primitive': 1.1.3
@@ -3910,6 +3983,12 @@ snapshots:
optionalDependencies:
'@types/react': 18.3.27
+ dependencies:
+ react: 18.3.1
+ optionalDependencies:
+ '@types/react': 18.3.27
+
dependencies:
'@radix-ui/primitive': 1.1.3
@@ -4104,6 +4183,16 @@ snapshots:
'@types/react': 18.3.27
'@types/react-dom': 18.3.7(@types/[email protected])
+ dependencies:
+ '@radix-ui/react-context': 1.1.3(@types/[email protected])([email protected])
+ react: 18.3.1
+ react-dom: 18.3.1([email protected])
+ optionalDependencies:
+ '@types/react': 18.3.27
+ '@types/react-dom': 18.3.7(@types/[email protected])
+
dependencies:
'@radix-ui/primitive': 1.1.3
@@ -4121,6 +4210,23 @@ snapshots:
'@types/react': 18.3.27
'@types/react-dom': 18.3.7(@types/[email protected])
+ dependencies:
+ '@radix-ui/number': 1.1.1
+ '@radix-ui/primitive': 1.1.3
+ '@radix-ui/react-compose-refs': 1.1.2(@types/[email protected])([email protected])
+ '@radix-ui/react-context': 1.1.2(@types/[email protected])([email protected])
+ '@radix-ui/react-direction': 1.1.1(@types/[email protected])([email protected])
+ '@radix-ui/react-use-callback-ref': 1.1.1(@types/[email protected])([email protected])
+ '@radix-ui/react-use-layout-effect': 1.1.1(@types/[email protected])([email protected])
+ react: 18.3.1
+ react-dom: 18.3.1([email protected])
+ optionalDependencies:
+ '@types/react': 18.3.27
+ '@types/react-dom': 18.3.7(@types/[email protected])
+
dependencies:
'@radix-ui/number': 1.1.1