Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

Dashboard: Darkmode (#484)

Ameer Al Ashhabe24a99f1e3e6
diff --git a/apps/web/app/blog/[slug]/page.tsx b/apps/web/app/blog/[slug]/page.tsx
index 5904d765c..687442c6a 100644
--- a/apps/web/app/blog/[slug]/page.tsx
+++ b/apps/web/app/blog/[slug]/page.tsx
@@ -23,7 +23,17 @@ export async function generateMetadata({
return;
}
- let { title, publishedAt: publishedTime, description, image } = post.metadata;
+ let {
+ title,
+ publishedAt: publishedTime,
+ description,
+ image,
+ } = post.metadata as {
+ title: string;
+ publishedAt: string;
+ description: string;
+ image: string;
+ };
let ogImage = `${clientEnv.NEXT_PUBLIC_WEB_URL}${image}`;
return {
@@ -76,10 +86,16 @@ export default async function PostPage({ params }: PostProps) {
<div className="wrapper">
<header>
- <h1 className="mb-2">{post.metadata.title}</h1>
- <p className="space-x-1 text-xs text-gray-500">
+ <h1 className="mb-2 font-semibold">{post.metadata.title}</h1>
+ <p className="space-x-1 text-xs text-gray-12">
<span>
- {format(parseISO(post.metadata.publishedAt), "MMMM dd, yyyy")}
+ {format(
+ parseISO(
+ (post.metadata as any).publishedAt ||
+ new Date().toISOString()
+ ),
+ "MMMM dd, yyyy"
+ )}
</span>
<span>—</span>
<span>{readingTime} min read</span>
diff --git a/apps/web/app/blog/_components/Share.tsx b/apps/web/app/blog/_components/Share.tsx
index 83c5580ed..44062f8c7 100644
--- a/apps/web/app/blog/_components/Share.tsx
+++ b/apps/web/app/blog/_components/Share.tsx
@@ -1,8 +1,8 @@
"use client";
-import toast from "react-hot-toast";
-import { useState } from "react";
import { clientEnv } from "@cap/env";
+import { useState } from "react";
+import toast from "react-hot-toast";
interface ShareProps {
post: {
@@ -19,7 +19,7 @@ export function Share({ post }: ShareProps) {
return (
<>
- <div className="mt-6 py-6 px-3 bg-gray-100 text-center rounded-xl">
+ <div className="mt-6 py-6 px-3 bg-gray-1 text-center rounded-xl">
<h3 className="mb-2 mt-0 text-lg font-semibold">Share this post</h3>
<div className="flex justify-center gap-4">
<a
diff --git a/apps/web/app/blog/_components/UpdatePage.tsx b/apps/web/app/blog/_components/UpdatePage.tsx
index ce59aaf3f..edd40dcab 100644
--- a/apps/web/app/blog/_components/UpdatePage.tsx
+++ b/apps/web/app/blog/_components/UpdatePage.tsx
@@ -29,7 +29,7 @@ export const UpdatePage = ({ postSlug }: { postSlug: string }) => {
<header>
<h1 className="mb-2">{post.metadata.title}</h1>
- <p className="space-x-1 text-xs text-gray-500">
+ <p className="space-x-1 text-xs text-gray-12">
<span>
{format(parseISO(post.metadata.publishedAt), "MMMM dd, yyyy")}
</span>
diff --git a/apps/web/app/dashboard/_components/AdminNavbar/AdminDesktopNav.tsx b/apps/web/app/dashboard/_components/AdminNavbar/AdminDesktopNav.tsx
index b48f5b321..8d0bfcf1e 100644
--- a/apps/web/app/dashboard/_components/AdminNavbar/AdminDesktopNav.tsx
+++ b/apps/web/app/dashboard/_components/AdminNavbar/AdminDesktopNav.tsx
@@ -11,9 +11,7 @@ import { AdminNavItems } from "./AdminNavItems";
export const AdminDesktopNav = () => {
const { platform } = useDetectPlatform();
- const [sidebarCollapsed, setSidebarCollapsed] = useState(
- localStorage.getItem("sidebarCollapsed") === "true"
- );
+ const [sidebarCollapsed, setSidebarCollapsed] = useState(false);
const toggleCollapse = () => {
setSidebarCollapsed(!sidebarCollapsed);
localStorage.setItem("sidebarCollapsed", String(!sidebarCollapsed));
@@ -80,12 +78,12 @@ export const AdminDesktopNav = () => {
>
<button
onClick={toggleCollapse}
- className="absolute right-[-12px] hover:border-gray-400 top-[50%] transform -translate-y-1/2 bg-gray-50 rounded-full p-1 border border-gray-200 hover:bg-gray-50 transition-colors z-10"
+ className="absolute right-[-12px] hover:border-gray-4 hover:bg-gray-3 top-[50%] transform -translate-y-1/2 rounded-full p-1 border bg-gray-2 border-gray-3 transition-colors z-10"
>
{sidebarCollapsed ? (
- <ChevronRight size={16} className="text-gray-500" />
+ <ChevronRight size={16} className="text-gray-12" />
) : (
- <ChevronLeft size={16} className="text-gray-500" />
+ <ChevronLeft size={16} className="text-gray-12" />
)}
</button>
</Tooltip>
diff --git a/apps/web/app/dashboard/_components/AdminNavbar/AdminMobileNav.tsx b/apps/web/app/dashboard/_components/AdminNavbar/AdminMobileNav.tsx
index 09ab80ed9..8248948f8 100644
--- a/apps/web/app/dashboard/_components/AdminNavbar/AdminMobileNav.tsx
+++ b/apps/web/app/dashboard/_components/AdminNavbar/AdminMobileNav.tsx
@@ -1,5 +1,8 @@
"use client";
+import { useTheme } from "@/app/dashboard/_components/DynamicSharedLayout";
import { LogoBadge } from "@cap/ui";
+import { faMoon, faSun } from "@fortawesome/free-solid-svg-icons";
+import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { useClickAway } from "@uidotdev/usehooks";
import { AnimatePresence, motion } from "framer-motion";
import { Menu, X } from "lucide-react";
@@ -12,6 +15,7 @@ export const AdminMobileNav = () => {
const sidebarRef: MutableRefObject<HTMLDivElement> = useClickAway(() =>
setSidebarOpen(false)
);
+ const { theme, setThemeHandler } = useTheme();
return (
<>
<AnimatePresence mode="wait">
@@ -20,7 +24,7 @@ export const AdminMobileNav = () => {
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
exit={{ opacity: 0 }}
- className="flex fixed inset-0 z-[1000000] lg:hidden bg-gray-200/50"
+ className="flex fixed inset-0 z-[1000000] lg:hidden bg-gray-1/50"
>
<motion.div
ref={sidebarRef}
@@ -30,32 +34,44 @@ export const AdminMobileNav = () => {
transition: { duration: 0.3, bounce: 0.2, type: "spring" },
}}
exit={{ x: "100%" }}
- className="relative flex-1 flex flex-col ml-auto max-w-xs w-[275px] pt-5 pb-4 px-4 bg-gray-50"
+ className="relative flex-1 flex flex-col ml-auto max-w-xs w-[275px] border-l border-gray-3 pt-5 pb-4 px-4 bg-gray-2"
>
<div
className="flex justify-end items-center mb-6 w-full rounded-full"
onClick={() => setSidebarOpen(false)}
>
- <X className="text-gray-500 size-7" aria-hidden="true" />
+ <X className="text-gray-12 size-7" aria-hidden="true" />
</div>
-
<AdminNavItems />
</motion.div>
</motion.div>
)}
</AnimatePresence>
- <div className="flex fixed z-50 justify-between w-full h-16 bg-gray-50 border-b lg:border-none lg:hidden">
+ <div className="flex fixed z-50 justify-between w-full h-16 border-b border-gray-3 bg-gray-1 lg:border-none lg:hidden">
<div className="flex flex-shrink-0 items-center px-4 h-full lg:hidden">
<Link className="block" href="/dashboard">
<LogoBadge className="block w-auto h-8" />
</Link>
</div>
- <button
- className="flex flex-col gap-2 justify-center items-center px-5 text-white border-l lg:hidden"
- onClick={() => setSidebarOpen(true)}
- >
- <Menu className="text-gray-500 size-7" aria-hidden="true" />
- </button>
+ <div className="flex gap-4 items-center h-full">
+ <div
+ onClick={() => {
+ setThemeHandler(theme === "light" ? "dark" : "light");
+ }}
+ className="flex justify-center items-center rounded-full border transition-colors cursor-pointer lg:hidden bg-gray-4 hover:border-gray-6 hover:bg-gray-5 size-9 border-gray-5"
+ >
+ <FontAwesomeIcon
+ className="text-gray-12 size-3.5"
+ icon={theme === "dark" ? faSun : faMoon}
+ />
+ </div>
+ <button
+ className="flex flex-col gap-2 justify-center items-center px-5 h-full text-white border-l border-gray-3 lg:hidden"
+ onClick={() => setSidebarOpen(true)}
+ >
+ <Menu className="text-gray-12 size-7" aria-hidden="true" />
+ </button>
+ </div>
</div>
</>
);
diff --git a/apps/web/app/dashboard/_components/AdminNavbar/AdminNavItems.tsx b/apps/web/app/dashboard/_components/AdminNavbar/AdminNavItems.tsx
index 2bfe8abda..0bee53d92 100644
--- a/apps/web/app/dashboard/_components/AdminNavbar/AdminNavItems.tsx
+++ b/apps/web/app/dashboard/_components/AdminNavbar/AdminNavItems.tsx
@@ -1,5 +1,6 @@
"use client";
import {
+ Button,
Command,
CommandEmpty,
CommandGroup,
@@ -98,7 +99,7 @@ export const AdminNavItems = ({ collapsed }: { collapsed?: boolean }) => {
<PopoverTrigger asChild>
<div
className={
- "p-3 w-full rounded-xl border border-gray-200 cursor-pointer"
+ "px-3 py-2.5 w-full rounded-xl border cursor-pointer bg-gray-3 border-gray-4"
}
>
<div
@@ -109,21 +110,22 @@ export const AdminNavItems = ({ collapsed }: { collapsed?: boolean }) => {
<div className="flex justify-between items-center w-full text-left">
<div className="flex items-center">
<Avatar
- className="flex-shrink-0 size-5"
+ letterClass="text-gray-1 text-xs"
+ className="relative flex-shrink-0 size-5"
name={activeSpace?.space.name ?? "No space found"}
/>
- <p className="ml-2.5 text-sm font-medium truncate">
+ <p className="ml-2.5 text-sm text-gray-12 font-medium truncate">
{activeSpace?.space.name ?? "No space found"}
</p>
</div>
{!collapsed && (
- <ChevronDown className="w-[20px] h-auto text-gray-400" />
+ <ChevronDown className="w-5 h-auto text-gray-8" />
)}
</div>
</div>
<PopoverContent
className={clsx(
- "p-0 w-[calc(100%-12px)] bg-white z-[60]",
+ "p-0 w-[calc(100%-12px)] z-[60]",
collapsed ? "ml-3" : "mx-auto"
)}
>
@@ -153,11 +155,15 @@ export const AdminNavItems = ({ collapsed }: { collapsed?: boolean }) => {
</CommandItem>
);
})}
- <DialogTrigger className="w-full">
- <CommandItem className="bg-gray-100 rounded-lg border border-gray-200 aria-selected:bg-gray-200">
- <Plus className="mr-1 w-4 h-auto" />
- <span className="text-sm">Add new space</span>
- </CommandItem>
+ <DialogTrigger className="mt-3 w-full">
+ <Button
+ variant="dark"
+ size="sm"
+ className="flex gap-1 items-center w-full"
+ >
+ <Plus className="w-4 h-auto" />
+ Add new space
+ </Button>
</DialogTrigger>
</CommandGroup>
</Command>
@@ -194,7 +200,7 @@ export const AdminNavItems = ({ collapsed }: { collapsed?: boolean }) => {
layoutId="underline"
id="underline"
className={clsx(
- "absolute inset-0 mx-auto text-gray-400 bg-transparent rounded-xl border-gray-200 shadow-sm border-[1px] shadow-gray-200"
+ "absolute inset-0 mx-auto rounded-xl shadow-sm border-gray-5 text-gray-8 border-[1px] shadow-gray-2"
)}
/>
) : null}
@@ -207,16 +213,20 @@ export const AdminNavItems = ({ collapsed }: { collapsed?: boolean }) => {
passHref
prefetch={false}
href={item.href}
- className={classNames("hover:opacity-75", navItemClass)}
+ className={classNames(
+ "relative transition-opacity duration-200 hover:opacity-75 z-3",
+ navItemClass
+ )}
>
<FontAwesomeIcon
icon={item.icon as IconDefinition}
className={classNames(
- "flex-shrink-0 w-5 h-5 stroke-[1.5px] text-gray-400"
+ "flex-shrink-0 w-5 h-5 transition-colors duration-200 stroke-[1.5px]",
+ collapsed ? "text-gray-12" : "text-gray-10"
)}
aria-hidden="true"
/>
- <span className="text-base ml-2.5 text-gray-400 truncate">
+ <span className="text-base ml-2.5 text-gray-12 truncate">
{item.name}
</span>
</Link>
@@ -229,7 +239,7 @@ export const AdminNavItems = ({ collapsed }: { collapsed?: boolean }) => {
collapsed={collapsed ?? false}
subscribed={isSubscribed}
/>
- <p className="mt-4 text-xs text-center text-gray-400 truncate">
+ <p className="mt-4 text-xs text-center truncate text-gray-10">
Cap Software, Inc. {new Date().getFullYear()}.
</p>
</div>
diff --git a/apps/web/app/dashboard/_components/DashboardInner.tsx b/apps/web/app/dashboard/_components/DashboardInner.tsx
index e53221fcf..6bbd43381 100644
--- a/apps/web/app/dashboard/_components/DashboardInner.tsx
+++ b/apps/web/app/dashboard/_components/DashboardInner.tsx
@@ -8,24 +8,29 @@ import {
PopoverContent,
PopoverTrigger,
} from "@cap/ui";
-import { MoreVertical, Sparkles } from "lucide-react";
+import { MoreVertical } from "lucide-react";
import { useState } from "react";
-import { useSharedContext } from "@/app/dashboard/_components/DynamicSharedLayout";
+import {
+ useSharedContext,
+ useTheme,
+} from "@/app/dashboard/_components/DynamicSharedLayout";
import { Avatar } from "@/app/s/[videoId]/_components/tabs/Activity";
+import { UpgradeModal } from "@/components/UpgradeModal";
import {
+ faCrown,
faGear,
faHome,
faMessage,
+ faMoon,
faSignOut,
- faCrown,
+ faSun,
} from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import clsx from "clsx";
import { signOut } from "next-auth/react";
import Link from "next/link";
import { usePathname } from "next/navigation";
-import { UpgradeModal } from "@/components/UpgradeModal";
export default function DashboardInner({
children,
@@ -40,21 +45,35 @@ export default function DashboardInner({
"/dashboard/settings/account": "Account Settings",
};
const title = titles[pathname] || "";
+ const { theme, setThemeHandler } = useTheme();
return (
<div className="flex flex-col pt-5 min-h-screen lg:gap-5">
{/* Top Bar */}
<div
className={clsx(
- "flex sticky z-50 justify-between items-center px-5 mt-10 w-full h-16 bg-gray-50 border-b border-gray-200 lg:border-b-0 lg:pl-0 lg:pr-5 lg:top-0 lg:relative top-[64px] lg:mt-0 lg:h-8"
+ "flex sticky z-50 justify-between items-center px-5 mt-10 w-full h-16 border-b bg-gray-1 lg:bg-transparent border-gray-3 lg:border-b-0 lg:pl-0 lg:pr-5 lg:top-0 lg:relative top-[64px] lg:mt-0 lg:h-8"
)}
>
- <p className="relative text-xl text-gray-500 lg:text-2xl">{title}</p>
- <User />
+ <p className="relative text-xl text-gray-12 lg:text-2xl">{title}</p>
+ <div className="flex gap-4 items-center">
+ <div
+ onClick={() => {
+ setThemeHandler(theme === "light" ? "dark" : "light");
+ }}
+ className="hidden justify-center items-center rounded-full border transition-colors cursor-pointer lg:flex bg-gray-4 hover:border-gray-6 hover:bg-gray-5 size-9 border-gray-5"
+ >
+ <FontAwesomeIcon
+ className="text-gray-12 size-3.5"
+ icon={theme === "dark" ? faMoon : faSun}
+ />
+ </div>
+ <User />
+ </div>
</div>
{/* Content Area */}
<div
className={clsx(
- "flex overflow-auto flex-col flex-1 p-5 pb-5 bg-gray-100 border border-gray-200 lg:rounded-tl-2xl lg:p-8"
+ "flex overflow-auto flex-col flex-1 p-5 pb-5 border bg-gray-1 border-gray-3 lg:rounded-tl-2xl lg:p-8"
)}
>
<div className="flex flex-col gap-4">{children}</div>
@@ -75,42 +94,42 @@ const User = () => {
/>
<Popover open={menuOpen} onOpenChange={setMenuOpen}>
<PopoverTrigger asChild>
- <div className="flex gap-2 justify-between items-center p-2 rounded-lg transition-colors cursor-pointer lg:gap-6 hover:bg-gray-100">
+ <div className="flex gap-2 justify-between items-center p-2 rounded-lg transition-colors cursor-pointer group lg:gap-6 hover:bg-gray-5">
<div className="flex items-center">
<Avatar
letterClass="text-xs lg:text-md"
name={user.name ?? "User"}
- className="size-[24px]"
+ className="size-[24px] text-gray-12"
/>
- <span className="ml-2 text-sm lg:ml-3 lg:text-md">
+ <span className="ml-2 text-sm lg:ml-3 lg:text-md text-gray-12">
{user.name ?? "User"}
</span>
</div>
- <MoreVertical className="w-5 h-5 text-gray-400 group-hover:text-gray-500" />
+ <MoreVertical className="w-5 h-5 transition-colors text-gray-10 group-hover:text-gray-12" />
</div>
</PopoverTrigger>
- <PopoverContent className="p-1 w-48 bg-gray-50">
+ <PopoverContent className="p-1 w-48">
<Command>
<CommandGroup>
<Link href="/home">
<CommandItem
- className="px-2 py-1.5 rounded-lg transition-colors duration-300 cursor-pointer hover:bg-gray-100 group"
+ className="px-2 py-1.5 rounded-lg transition-colors duration-300 cursor-pointer hover:bg-gray-5 group"
onSelect={() => {
setMenuOpen(false);
}}
>
<FontAwesomeIcon
icon={faHome}
- className="mr-2 text-gray-400 transition-colors duration-300 size-3.5 group-hover:text-gray-500"
+ className="mr-2 text-gray-11 transition-colors duration-300 size-3.5 group-hover:text-gray-12"
/>
- <span className="text-[13px] transition-colors duration-300 text-gray-400 group-hover:text-gray-500">
+ <span className="text-[13px] transition-colors duration-300 text-gray-11 group-hover:text-gray-12">
Homepage
</span>
</CommandItem>
</Link>
{!isSubscribed && (
<CommandItem
- className="px-2 py-1.5 rounded-lg transition-colors duration-300 cursor-pointer hover:bg-gray-100 group"
+ className="px-2 py-1.5 rounded-lg transition-colors duration-300 cursor-pointer hover:bg-gray-5 group"
onSelect={() => {
setMenuOpen(false);
setUpgradeModalOpen(true);
@@ -120,50 +139,50 @@ const User = () => {
icon={faCrown}
className="mr-2 text-amber-400 transition-colors duration-300 size-3.5 group-hover:text-amber-500"
/>
- <span className="text-[13px] transition-colors duration-300 text-gray-400 group-hover:text-gray-500">
+ <span className="text-[13px] transition-colors duration-300 text-gray-11 group-hover:text-gray-12">
Upgrade to Pro
</span>
</CommandItem>
)}
<Link href="/dashboard/settings/account">
<CommandItem
- className="px-2 py-1.5 rounded-lg transition-colors duration-300 cursor-pointer hover:bg-gray-100 group"
+ className="px-2 py-1.5 rounded-lg transition-colors duration-300 cursor-pointer hover:bg-gray-5 group"
onSelect={() => {
setMenuOpen(false);
}}
>
<FontAwesomeIcon
icon={faGear}
- className="mr-2 text-gray-400 transition-colors duration-300 size-3.5 group-hover:text-gray-500"
+ className="mr-2 text-gray-11 transition-colors duration-300 size-3.5 group-hover:text-gray-12"
/>
- <span className="text-[13px] transition-colors duration-300 text-gray-400 group-hover:text-gray-500">
+ <span className="text-[13px] transition-colors duration-300 text-gray-11 group-hover:text-gray-12">
Settings
</span>
</CommandItem>
</Link>
<CommandItem
- className="px-2 py-1.5 rounded-lg transition-colors duration-300 cursor-pointer hover:bg-gray-100 group"
+ className="px-2 py-1.5 rounded-lg transition-colors duration-300 cursor-pointer hover:bg-gray-5 group"
onSelect={() =>
window.open("https://cap.link/discord", "_blank")
}
>
<FontAwesomeIcon
icon={faMessage}
- className="mr-2 text-gray-400 transition-colors duration-300 size-3 group-hover:text-gray-500"
+ className="mr-2 text-gray-11 transition-colors duration-300 size-3.5 group-hover:text-gray-12"
/>
- <span className="text-[13px] transition-colors duration-300 text-gray-400 group-hover:text-gray-500">
+ <span className="text-[13px] transition-colors duration-300 text-gray-11 group-hover:text-gray-12">
Chat Support
</span>
</CommandItem>
<CommandItem
- className="px-2 py-1.5 rounded-lg transition-colors duration-300 cursor-pointer hover:bg-gray-100 group"
+ className="px-2 py-1.5 rounded-lg transition-colors duration-300 cursor-pointer hover:bg-gray-5 group"
onSelect={() => signOut()}
>
<FontAwesomeIcon
icon={faSignOut}
- className="mr-2 text-gray-400 transition-colors duration-300 size-3.5 group-hover:text-gray-500"
+ className="mr-2 text-gray-11 transition-colors duration-300 size-3.5 group-hover:text-gray-12"
/>
- <span className="text-[13px] transition-colors duration-300 text-gray-400 group-hover:text-gray-500">
+ <span className="text-[13px] transition-colors duration-300 text-gray-11 group-hover:text-gray-12">
Sign Out
</span>
</CommandItem>
diff --git a/apps/web/app/dashboard/_components/DynamicSharedLayout.tsx b/apps/web/app/dashboard/_components/DynamicSharedLayout.tsx
index a3e2f578d..a3100fa9f 100644
--- a/apps/web/app/dashboard/_components/DynamicSharedLayout.tsx
+++ b/apps/web/app/dashboard/_components/DynamicSharedLayout.tsx
@@ -2,7 +2,8 @@
import AdminMobileNav from "@/app/dashboard/_components/AdminNavbar/AdminMobileNav";
import { Space } from "@/app/dashboard/layout";
import { users } from "@cap/database/schema";
-import React, { createContext, useContext } from "react";
+import Cookies from "js-cookie";
+import React, { createContext, useContext, useEffect, useState } from "react";
import AdminDesktopNav from "./AdminNavbar/AdminDesktopNav";
type SharedContext = {
@@ -12,44 +13,76 @@ type SharedContext = {
isSubscribed: boolean;
};
+type ITheme = "light" | "dark";
+
const Context = createContext<SharedContext>({} as SharedContext);
+const ThemeContext = createContext<{
+ theme: ITheme;
+ setThemeHandler: (newTheme: ITheme) => void;
+}>({
+ theme: "light",
+ setThemeHandler: () => {},
+});
+
+export const useTheme = () => useContext(ThemeContext);
+
export default function DynamicSharedLayout({
children,
spaceData,
activeSpace,
user,
isSubscribed,
+ initialTheme,
}: {
children: React.ReactNode;
spaceData: SharedContext["spaceData"];
activeSpace: SharedContext["activeSpace"];
user: SharedContext["user"];
isSubscribed: SharedContext["isSubscribed"];
+ initialTheme: ITheme;
}) {
+ const [theme, setTheme] = useState<ITheme>(initialTheme);
+ const setThemeHandler = (newTheme: ITheme) => {
+ setTheme(newTheme);
+ Cookies.set("theme", newTheme, {
+ expires: 365,
+ });
+ document.body.className = newTheme;
+ };
+ useEffect(() => {
+ if (Cookies.get("theme")) {
+ document.body.className = Cookies.get("theme") as ITheme;
+ }
+ return () => {
+ document.body.className = "light";
+ };
+ }, [theme]);
return (
- <Context.Provider
- value={{
- spaceData,
- activeSpace,
- user,
- isSubscribed,
- }}
- >
- {/* CSS Grid layout for dashboard */}
- <div className="grid grid-cols-[auto,1fr] grid-rows-[auto,1fr] h-screen min-h-screen">
- {/* Sidebar */}
- <aside className="z-10 col-span-1 row-span-2">
- <AdminDesktopNav />
- </aside>
- {/* Header/topbar is now expected to be rendered by children if needed */}
- {/* Main content area */}
- <div className="overflow-y-auto col-span-1 row-span-2 focus:outline-none">
- <AdminMobileNav />
- {children}
+ <ThemeContext.Provider value={{ theme, setThemeHandler }}>
+ <Context.Provider
+ value={{
+ spaceData,
+ activeSpace,
+ user,
+ isSubscribed,
+ }}
+ >
+ {/* CSS Grid layout for dashboard */}
+ <div className="grid grid-cols-[auto,1fr] bg-gray-2 grid-rows-[auto,1fr] h-screen min-h-screen">
+ {/* Sidebar */}
+ <aside className="z-10 col-span-1 row-span-2">
+ <AdminDesktopNav />
+ </aside>
+ {/* Header/topbar is now expected to be rendered by children if needed */}
+ {/* Main content area */}
+ <div className="overflow-y-auto col-span-1 row-span-2 focus:outline-none">
+ <AdminMobileNav />
+ {children}
+ </div>
</div>
- </div>
- </Context.Provider>
+ </Context.Provider>
+ </ThemeContext.Provider>
);
}
diff --git a/apps/web/app/dashboard/_components/actions.ts b/apps/web/app/dashboard/_components/actions.ts
new file mode 100644
index 000000000..b07c9af7b
--- /dev/null
+++ b/apps/web/app/dashboard/_components/actions.ts
@@ -0,0 +1,7 @@
+"use server";
+import { cookies } from "next/headers";
+
+export const setTheme = async (newTheme: "light" | "dark") => {
+ const cookieStore = cookies();
+ cookieStore.set("theme", newTheme);
+};
\ No newline at end of file
diff --git a/apps/web/app/dashboard/caps/Caps.tsx b/apps/web/app/dashboard/caps/Caps.tsx
index 895c1a34a..227021087 100644
--- a/apps/web/app/dashboard/caps/Caps.tsx
+++ b/apps/web/app/dashboard/caps/Caps.tsx
@@ -1,17 +1,18 @@
"use client";
+import { deleteVideo } from "@/actions/videos/delete";
import { useSharedContext } from "@/app/dashboard/_components/DynamicSharedLayout";
import { apiClient } from "@/utils/web-api";
import { VideoMetadata } from "@cap/database/types";
+import { Button } from "@cap/ui";
+import { faTrash } from "@fortawesome/free-solid-svg-icons";
+import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
+import { AnimatePresence, motion } from "framer-motion";
import { useRouter, useSearchParams } from "next/navigation";
-import { useEffect, useState } from "react";
+import { useEffect, useRef, useState } from "react";
import toast from "react-hot-toast";
-import { CapCard, CapCardProps } from "./components/CapCard";
+import { CapCard } from "./components/CapCard";
import { CapPagination } from "./components/CapPagination";
import { EmptyCapState } from "./components/EmptyCapState";
-import { Button } from "@cap/ui";
-import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
-import { faTrash } from "@fortawesome/free-solid-svg-icons";
-import { deleteVideo } from "@/actions/videos/delete";
type VideoData = {
id: string;
@@ -42,6 +43,8 @@ export const Caps = ({
const limit = 15;
const totalPages = Math.ceil(count / limit);
const [selectedCaps, setSelectedCaps] = useState<string[]>([]);
+ const previousCountRef = useRef<number>(0);
+ const [animateDirection, setAnimateDirection] = useState<"up" | "down">("up");
const [isDeleting, setIsDeleting] = useState(false);
const anyCapSelected = selectedCaps.length > 0;
@@ -89,12 +92,18 @@ export const Caps = ({
}
};
- const toggleCapSelection = (capId: string) => {
- setSelectedCaps((prevSelected) =>
- prevSelected.includes(capId)
- ? prevSelected.filter((id) => id !== capId)
- : [...prevSelected, capId]
- );
+ const handleCapSelection = (capId: string) => {
+ setSelectedCaps((prev) => {
+ const newSelection = prev.includes(capId)
+ ? prev.filter((id) => id !== capId)
+ : [...prev, capId];
+
+ // Set animation direction based on count change
+ previousCountRef.current = prev.length;
+ setAnimateDirection(newSelection.length > prev.length ? "up" : "down");
+
+ return newSelection;
+ });
};
const deleteSelectedCaps = async () => {
@@ -160,7 +169,7 @@ export const Caps = ({
}
return (
- <div className="flex flex-col w-full relative">
+ <div className="flex relative flex-col w-full">
<div className="grid grid-cols-1 gap-4 sm:gap-6 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-5">
{data.map((cap) => (
<CapCard
@@ -171,7 +180,7 @@ export const Caps = ({
userId={user?.id}
userSpaces={userSpaces}
isSelected={selectedCaps.includes(cap.id)}
- onSelectToggle={() => toggleCapSelection(cap.id)}
+ onSelectToggle={() => handleCapSelection(cap.id)}
anyCapSelected={anyCapSelected}
/>
))}
@@ -182,35 +191,72 @@ export const Caps = ({
</div>
)}
- {selectedCaps.length > 0 && (
- <div className="fixed bottom-4 left-1/2 transform -translate-x-1/2 bg-white shadow-lg rounded-xl border border-gray-200 px-6 py-4 flex justify-between items-center z-50 w-full max-w-xl mx-auto">
- <div className="text-sm font-medium text-gray-400">
- {selectedCaps.length} cap{selectedCaps.length !== 1 ? "s" : ""}{" "}
- selected
- </div>
- <div className="flex gap-2 ml-4">
- <Button
- style={{ minWidth: "auto" }}
- variant="destructive"
- onClick={deleteSelectedCaps}
- disabled={isDeleting}
- className="text-sm w-[50px]"
- spinner={isDeleting}
- size="sm"
- >
- <FontAwesomeIcon icon={faTrash} />
- </Button>
- <Button
- variant="white"
- onClick={() => setSelectedCaps([])}
- className="text-sm"
- size="sm"
- >
- Cancel
- </Button>
- </div>
- </div>
- )}
+ <AnimatePresence>
+ {selectedCaps.length > 0 && (
+ <motion.div
+ className="flex fixed right-0 left-0 bottom-4 z-50 justify-between items-center px-6 py-3 mx-auto w-full max-w-xl rounded-xl border shadow-lg border-gray-3 bg-gray-2"
+ initial={{ opacity: 0, y: 10, scale: 0.9 }}
+ animate={{ opacity: 1, y: 0, scale: 1 }}
+ exit={{
+ opacity: 0,
+ y: 10,
+ scale: 0.9,
+ transition: { duration: 0.2 },
+ }}
+ transition={{
+ type: "spring",
+ damping: 15,
+ stiffness: 200,
+ }}
+ >
+ <div className="flex gap-1 text-sm font-medium text-gray-12">
+ <AnimatePresence initial={false} mode="wait">
+ <motion.div
+ initial={{
+ opacity: 0,
+ y: animateDirection === "up" ? 10 : -10,
+ scale: 0.9,
+ }}
+ animate={{ opacity: 1, y: 0, scale: 1 }}
+ key={selectedCaps.length}
+ layoutId="selected-caps-count"
+ className="tabular-nums"
+ exit={{
+ opacity: 0,
+ y: animateDirection === "up" ? -10 : 10,
+ scale: 0.9,
+ }}
+ transition={{ duration: 0.1, ease: "easeInOut" }}
+ >
+ {selectedCaps.length}
+ </motion.div>
+ </AnimatePresence>
+ cap{selectedCaps.length !== 1 ? "s" : ""} selected
+ </div>
+ <div className="flex gap-2 ml-4">
+ <Button
+ variant="dark"
+ onClick={() => setSelectedCaps([])}
+ className="text-sm"
+ size="sm"
+ >
+ Cancel
+ </Button>
+ <Button
+ style={{ minWidth: "auto" }}
+ variant="destructive"
+ onClick={deleteSelectedCaps}
+ disabled={isDeleting}
+ className="text-sm w-[40px]"
+ spinner={isDeleting}
+ size="sm"
+ >
+ <FontAwesomeIcon icon={faTrash} />
+ </Button>
+ </div>
+ </motion.div>
+ )}
+ </AnimatePresence>
</div>
);
};
diff --git a/apps/web/app/dashboard/caps/components/CapCard.tsx b/apps/web/app/dashboard/caps/components/CapCard.tsx
index 0324f1b02..c4506a51a 100644
--- a/apps/web/app/dashboard/caps/components/CapCard.tsx
+++ b/apps/web/app/dashboard/caps/components/CapCard.tsx
@@ -9,12 +9,13 @@ import { VideoMetadata } from "@cap/database/types";
import { clientEnv, NODE_ENV } from "@cap/env";
import { Button } from "@cap/ui";
import {
+ faCheck,
faChevronDown,
faLink,
faTrash,
- faCheck,
} from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
+import clsx from "clsx";
import moment from "moment";
import Link from "next/link";
import { useRouter } from "next/navigation";
@@ -29,14 +30,16 @@ export interface CapCardProps {
createdAt: Date;
totalComments: number;
totalReactions: number;
- sharedSpaces: { id: string; name: string }[];
- ownerName: string;
+ sharedSpaces?: { id: string; name: string }[];
+ ownerName: string | null;
metadata?: VideoMetadata;
};
+ children?: React.ReactNode;
analytics: number;
- onDelete: (videoId: string) => Promise<void>;
- userId: string;
- userSpaces: { id: string; name: string }[];
+ onDelete?: (videoId: string) => Promise<void>;
+ userId?: string;
+ userSpaces?: { id: string; name: string }[];
+ sharedCapCard?: boolean;
isSelected?: boolean;
onSelectToggle?: () => void;
anyCapSelected?: boolean;
@@ -45,9 +48,11 @@ export interface CapCardProps {
export const CapCard: React.FC<CapCardProps> = ({
cap,
analytics,
+ children,
onDelete,
userId,
userSpaces,
+ sharedCapCard = false,
isSelected = false,
onSelectToggle,
anyCapSelected = false,
@@ -97,7 +102,7 @@ export const CapCard: React.FC<CapCardProps> = ({
const handleSharingUpdated = (updatedSharedSpaces: string[]) => {
setSharedSpaces(
- userSpaces.filter((space) => updatedSharedSpaces.includes(space.id))
+ userSpaces?.filter((space) => updatedSharedSpaces.includes(space.id))
);
router.refresh();
};
@@ -105,10 +110,12 @@ export const CapCard: React.FC<CapCardProps> = ({
const isOwner = userId === cap.ownerId;
const renderSharedStatus = () => {
- const baseClassName =
- "text-sm text-gray-400 transition-colors duration-300 hover:text-gray-500 cursor-pointer flex items-center mb-1";
+ const baseClassName = clsx(
+ "text-sm text-gray-10 transition-colors duration-200 flex items-center mb-1",
+ sharedCapCard ? "cursor-default" : "hover:text-gray-12 cursor-pointer"
+ );
if (isOwner) {
- if (cap.sharedSpaces.length === 0) {
+ if (cap.sharedSpaces?.length === 0) {
return (
<p
className={baseClassName}
@@ -241,127 +248,139 @@ export const CapCard: React.FC<CapCardProps> = ({
onClose={() => setIsSharingDialogOpen(false)}
capId={cap.id}
capName={cap.name}
- sharedSpaces={sharedSpaces}
+ sharedSpaces={sharedSpaces || []}
userSpaces={userSpaces}
onSharingUpdated={handleSharingUpdated}
/>
<div
- className={`flex relative flex-col gap-4 w-full h-full bg-gray-50 rounded-2xl border-gray-200 transition-colors duration-300 group ${
+ onClick={handleCardClick}
+ className={clsx(
+ "flex relative flex-col gap-4 w-full h-full rounded-xl cursor-default bg-gray-2 border-gray-3 group border-[1px]",
isSelected
- ? "border-blue-500 border-[1px]"
+ ? "!border-blue-10 border-[1px]"
: anyCapSelected
- ? "border-blue-300 border-[1px]"
- : "hover:border-blue-300 border-[1px]"
- } ${anyCapSelected ? "cursor-pointer" : ""}`}
- onClick={anyCapSelected ? handleCardClick : undefined}
+ ? "border-blue-10 border-[1px] hover:border-blue-10"
+ : "hover:border-blue-10"
+ )}
>
- {anyCapSelected && (
+ {anyCapSelected && !sharedCapCard && (
<div
className="absolute inset-0 z-10"
onClick={handleCardClick}
></div>
)}
- <div
- className={`flex absolute duration-200 ${
- anyCapSelected ? "opacity-0" : "group-hover:opacity-100 opacity-0"
- } top-2 right-2 z-[20] flex-col gap-2`}
- >
- <Tooltip content="Copy link">
- <Button
- onClick={(e) => {
- e.stopPropagation();
- handleCopy(capUrl);
- }}
- className="!size-8 delay-0 hover:opacity-80 rounded-full min-w-fit !p-0"
- variant="white"
- size="sm"
- >
- {!copyPressed ? (
+ {!sharedCapCard && (
+ <div
+ className={clsx(
+ "flex absolute duration-200",
+ anyCapSelected
+ ? "opacity-0"
+ : "opacity-0 group-hover:opacity-100",
+ "top-2 right-2 flex-col gap-2 z-[20]"
+ )}
+ >
+ <Tooltip content="Copy link">
+ <Button
+ onClick={(e) => {
+ e.stopPropagation();
+ handleCopy(capUrl);
+ }}
+ className="!size-8 delay-0 hover:opacity-80 rounded-full min-w-fit !p-0"
+ variant="white"
+ size="sm"
+ >
+ {!copyPressed ? (
+ <FontAwesomeIcon
+ className="text-gray-12 size-4"
+ icon={faLink}
+ />
+ ) : (
+ <svg
+ xmlns="http://www.w3.org/2000/svg"
+ width="24"
+ height="24"
+ viewBox="0 0 24 24"
+ fill="none"
+ stroke="currentColor"
+ strokeWidth="2"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ className="text-gray-12 size-5 svgpathanimation"
+ >
+ <path d="M20 6 9 17l-5-5" />
+ </svg>
+ )}
+ </Button>
+ </Tooltip>
+ <Tooltip content="Delete Cap">
+ <Button
+ onClick={(e) => {
+ e.stopPropagation();
+ onDelete?.(cap.id);
+ }}
+ className="!size-8 delay-100 hover:opacity-80 rounded-full min-w-fit !p-0"
+ variant="white"
+ size="sm"
+ >
<FontAwesomeIcon
- className="text-gray-400 size-4"
- icon={faLink}
+ className="text-gray-12 size-2.5"
+ icon={faTrash}
/>
- ) : (
- <svg
- xmlns="http://www.w3.org/2000/svg"
- width="24"
- height="24"
- viewBox="0 0 24 24"
- fill="none"
- stroke="currentColor"
- strokeWidth="2"
- strokeLinecap="round"
- strokeLinejoin="round"
- className="text-gray-400 size-5 svgpathanimation"
- >
- <path d="M20 6 9 17l-5-5" />
- </svg>
- )}
- </Button>
- </Tooltip>
- <Tooltip content="Delete Cap">
- <Button
- onClick={(e) => {
- e.stopPropagation();
- onDelete(cap.id);
- }}
- className="!size-8 delay-100 hover:opacity-80 rounded-full min-w-fit !p-0"
- variant="white"
- size="sm"
- >
- <FontAwesomeIcon
- className="text-gray-400 size-2.5"
- icon={faTrash}
- />
- </Button>
- </Tooltip>
- </div>
-
- <div
- className={`absolute top-2 left-2 z-[20] duration-200 ${
- isSelected || anyCapSelected
- ? "opacity-100"
- : "group-hover:opacity-100 opacity-0"
- }`}
- onClick={(e) => {
- e.stopPropagation();
- handleSelectClick(e);
- }}
- >
+ </Button>
+ </Tooltip>
+ </div>
+ )}
+ {/* Selection checkbox */}
+ {!sharedCapCard && onSelectToggle && (
<div
- className={`flex items-center justify-center w-6 h-6 rounded-md border cursor-pointer hover:bg-gray-200/60 transition-colors ${
- isSelected
- ? "bg-blue-500 border-blue-500"
- : "border-gray-400 bg-white/80"
+ className={`absolute top-2 left-2 z-[20] duration-200 ${
+ isSelected || anyCapSelected
+ ? "opacity-100"
+ : "group-hover:opacity-100 opacity-0"
}`}
+ onClick={(e) => {
+ e.stopPropagation();
+ handleSelectClick(e);
+ }}
>
- {isSelected && (
- <FontAwesomeIcon icon={faCheck} className="text-white size-3" />
- )}
+ <div
+ className={clsx(
+ "flex justify-center items-center w-6 h-6 rounded-md border transition-colors cursor-pointer hover:bg-gray-3/60",
+ isSelected
+ ? "bg-blue-10 border-blue-10"
+ : "border-white-95 bg-gray-1/80"
+ )}
+ >
+ {isSelected && (
+ <FontAwesomeIcon icon={faCheck} className="text-white size-3" />
+ )}
+ </div>
</div>
- </div>
-
- <div className="relative">
- <Link
- className={`block group ${
- anyCapSelected ? "pointer-events-none" : ""
- }`}
- href={capUrl}
- >
- <VideoThumbnail
- imageClass={`${
- anyCapSelected ? "opacity-50" : "group-hover:opacity-50"
- } transition-opacity duration-200`}
- userId={cap.ownerId}
- videoId={cap.id}
- alt={`${cap.name} Thumbnail`}
- />
- </Link>
- </div>
-
- <div className="flex flex-col flex-grow gap-3 px-4 pb-4 w-full">
+ )}
+ <Link
+ className={clsx(
+ "block group",
+ anyCapSelected && "cursor-pointer pointer-events-none"
+ )}
+ href={capUrl}
+ >
+ <VideoThumbnail
+ imageClass={`${
+ anyCapSelected ? "opacity-50" : "group-hover:opacity-50"
+ } transition-opacity duration-200`}
+ userId={cap.ownerId}
+ videoId={cap.id}
+ alt={`${cap.name} Thumbnail`}
+ />
+ </Link>
+ <div
+ className={clsx(
+ "flex flex-col flex-grow gap-3 px-4 pb-4 w-full",
+ !sharedCapCard ? "cursor-pointer" : "cursor-default"
+ )}
+ >
<div>
- {isEditing ? (
+ {isEditing && !sharedCapCard ? (
<textarea
rows={1}
value={title}
@@ -369,14 +388,16 @@ export const CapCard: React.FC<CapCardProps> = ({
onBlur={() => handleTitleBlur(cap.name)}
onKeyDown={(e) => handleTitleKeyDown(e, cap.name)}
autoFocus
- className="text-md resize-none truncate w-full border-0 outline-0 leading-[1.25rem] text-gray-500 font-medium mb-1"
+ className="text-md resize-none bg-transparent truncate w-full border-0 outline-0 leading-[1.25rem] text-gray-12 font-medium mb-1"
/>
) : (
<p
- className="text-md truncate leading-[1.25rem] text-gray-500 font-medium mb-1"
+ className="text-md truncate leading-[1.25rem] text-gray-12 font-medium mb-1"
onClick={() => {
- if (userId === cap.ownerId) {
- setIsEditing(true);
+ if (!sharedCapCard) {
+ if (userId === cap.ownerId) {
+ setIsEditing(true);
+ }
}
}}
>
@@ -384,8 +405,8 @@ export const CapCard: React.FC<CapCardProps> = ({
</p>
)}
{renderSharedStatus()}
- <p className="mb-1">
- {isDateEditing ? (
+ <div className="mb-1">
+ {isDateEditing && !sharedCapCard ? (
<div className="flex items-center">
<input
type="text"
@@ -394,14 +415,14 @@ export const CapCard: React.FC<CapCardProps> = ({
onBlur={handleDateBlur}
onKeyDown={handleDateKeyDown}
autoFocus
- className="text-sm truncate mt-2 leading-[1.25rem] text-gray-400 bg-transparent focus:outline-none"
+ className="text-sm truncate mt-2 leading-[1.25rem] text-gray-10 bg-transparent focus:outline-none"
placeholder="YYYY-MM-DD HH:mm:ss"
/>
</div>
) : (
<Tooltip content={`Cap created at ${effectiveDate}`}>
<p
- className="text-sm truncate mt-2 leading-[1.25rem] text-gray-400 cursor-pointer flex items-center"
+ className="text-sm truncate mt-2 leading-[1.25rem] text-gray-10 cursor-pointer flex items-center"
onClick={handleDateClick}
>
{showFullDate
@@ -410,8 +431,9 @@ export const CapCard: React.FC<CapCardProps> = ({
</p>
</Tooltip>
)}
- </p>
+ </div>
</div>
+ {children}
<CapCardAnalytics
capId={cap.id}
displayCount={displayCount}
diff --git a/apps/web/app/dashboard/caps/components/CapCardActions.tsx b/apps/web/app/dashboard/caps/components/CapCardActions.tsx
index ab7101594..2cdb4a17c 100644
--- a/apps/web/app/dashboard/caps/components/CapCardActions.tsx
+++ b/apps/web/app/dashboard/caps/components/CapCardActions.tsx
@@ -1,4 +1,4 @@
-import { serverEnv, clientEnv, NODE_ENV } from "@cap/env";
+import { clientEnv, NODE_ENV } from "@cap/env";
import { LinkIcon, Trash } from "lucide-react";
import { toast } from "react-hot-toast";
import { Tooltip } from "react-tooltip";
@@ -29,7 +29,7 @@ export const CapCardActions: React.FC<CapCardActionsProps> = ({
<div className="absolute top-2 right-2 space-y-2 z-20">
<button
type="button"
- className="cursor-pointer border border-gray-300 relative bg-white hover:bg-gray-200 w-8 h-8 m-0 p-0 rounded-full flex items-center justify-center transition-all"
+ className="cursor-pointer border border-gray-300 relative bg-gray-1 hover:bg-gray-200 w-8 h-8 m-0 p-0 rounded-full flex items-center justify-center transition-all"
onClick={copyLink}
data-tooltip-id={capId + "_copy"}
data-tooltip-content="Copy shareable Cap link"
@@ -39,7 +39,7 @@ export const CapCardActions: React.FC<CapCardActionsProps> = ({
</button>
<button
type="button"
- className="cursor-pointer border border-gray-300 relative bg-white hover:bg-gray-200 w-8 h-8 m-0 p-0 rounded-full flex items-center justify-center transition-all"
+ className="cursor-pointer border border-gray-300 relative bg-gray-1 hover:bg-gray-200 w-8 h-8 m-0 p-0 rounded-full flex items-center justify-center transition-all"
onClick={() => onDelete(capId)}
data-tooltip-id={capId + "_delete"}
data-tooltip-content="Delete your Cap recording"
diff --git a/apps/web/app/dashboard/caps/components/CapCardAnalytics.tsx b/apps/web/app/dashboard/caps/components/CapCardAnalytics.tsx
index 9b44d2e32..169cf7f06 100644
--- a/apps/web/app/dashboard/caps/components/CapCardAnalytics.tsx
+++ b/apps/web/app/dashboard/caps/components/CapCardAnalytics.tsx
@@ -18,21 +18,21 @@ export const CapCardAnalytics: React.FC<CapCardAnalyticsProps> = ({
return (
<div className="flex flex-wrap gap-4 items-center text-sm text-gray-60">
<Tooltip content={`${displayCount} unique views`}>
- <div className="flex gap-1 items-center">
- <FontAwesomeIcon className="text-gray-400 size-4" icon={faEye} />
- <span className="text-sm text-gray-500">{displayCount ?? "-"}</span>
+ <div className="flex gap-2 items-center">
+ <FontAwesomeIcon className="text-gray-8 size-4" icon={faEye} />
+ <span className="text-sm text-gray-12">{displayCount ?? "-"}</span>
</div>
</Tooltip>
<Tooltip content={`${totalComments} comments`}>
- <div className="flex gap-1 items-center">
- <FontAwesomeIcon className="text-gray-400 size-4" icon={faComment} />
- <span className="text-sm text-gray-500">{totalComments}</span>
+ <div className="flex gap-2 items-center">
+ <FontAwesomeIcon className="text-gray-8 size-4" icon={faComment} />
+ <span className="text-sm text-gray-12">{totalComments}</span>
</div>
</Tooltip>
<Tooltip content={`${totalReactions} reactions`}>
- <div className="flex gap-1 items-center">
- <FontAwesomeIcon className="text-gray-400 size-4" icon={faSmile} />
- <span className="text-sm text-gray-500">{totalReactions}</span>
+ <div className="flex gap-2 items-center">
+ <FontAwesomeIcon className="text-gray-8 size-4" icon={faSmile} />
+ <span className="text-sm text-gray-12">{totalReactions}</span>
</div>
</Tooltip>
</div>
diff --git a/apps/web/app/dashboard/caps/components/EmptyCapState.tsx b/apps/web/app/dashboard/caps/components/EmptyCapState.tsx
index a74bfe5ea..e0c7debf6 100644
--- a/apps/web/app/dashboard/caps/components/EmptyCapState.tsx
+++ b/apps/web/app/dashboard/caps/components/EmptyCapState.tsx
@@ -18,10 +18,10 @@ export const EmptyCapState: React.FC<EmptyCapStateProps> = ({ userName }) => {
<EmptyCap className="h-[150px] w-[400px]" />
</div>
<div className="flex flex-col items-center">
- <p className="mb-1 text-xl font-semibold text-gray-500">
+ <p className="mb-1 text-xl font-semibold text-gray-1">
Hey{userName ? ` ${userName}` : ""}! Record your first Cap
</p>
- <p className="max-w-md text-gray-400 text-md">
+ <p className="max-w-md text-gray-8 text-md">
Craft your narrative with Cap - get projects done quicker.
</p>
</div>
diff --git a/apps/web/app/dashboard/caps/components/SharingDialog.tsx b/apps/web/app/dashboard/caps/components/SharingDialog.tsx
index 2897f0634..778491ef4 100644
--- a/apps/web/app/dashboard/caps/components/SharingDialog.tsx
+++ b/apps/web/app/dashboard/caps/components/SharingDialog.tsx
@@ -13,7 +13,7 @@ interface SharingDialogProps {
capId: string;
capName: string;
sharedSpaces: { id: string; name: string }[];
- userSpaces: { id: string; name: string }[];
+ userSpaces?: { id: string; name: string }[];
onSharingUpdated: (updatedSharedSpaces: string[]) => void;
}
@@ -71,7 +71,7 @@ export const SharingDialog: React.FC<SharingDialogProps> = ({
}
};
- const filteredSpaces = userSpaces.filter((space) =>
+ const filteredSpaces = userSpaces?.filter((space) =>
space.name.toLowerCase().includes(searchTerm.toLowerCase())
);
@@ -90,7 +90,7 @@ export const SharingDialog: React.FC<SharingDialogProps> = ({
leave="duration-200 ease-in"
leaveFrom="opacity-100"
leaveTo="opacity-0"
- className="fixed inset-0 bg-black/30"
+ className="fixed inset-0 bg-black/60"
/>
<Transition.Child
enter="ease-out duration-300"
@@ -99,22 +99,22 @@ export const SharingDialog: React.FC<SharingDialogProps> = ({
leave="ease-in duration-200"
leaveFrom="opacity-100 scale-100"
leaveTo="opacity-0 scale-95"
- className="flex fixed inset-0 justify-center items-center p-4"
+ className="flex fixed inset-0 justify-center items-center p-4 bg-gray-1/70"
>
- <Dialog.Panel className="w-full max-w-md bg-white rounded-xl">
- <Dialog.Title className="p-5 font-semibold border-b flex items-center gap-3 border-gray-200 text-[16px]">
- <div className="flex justify-center items-center bg-gray-100 rounded-full border border-gray-200 size-10">
+ <Dialog.Panel className="w-full max-w-md rounded-xl border bg-gray-1 border-gray-2">
+ <Dialog.Title className="p-5 font-semibold border-b flex gap-3 border-gray-2 text-[16px]">
+ <div className="flex justify-center items-center rounded-full border border-gray-3 bg-gray-2 size-10">
<FontAwesomeIcon
- className="text-gray-400 size-3"
+ className="text-gray-10 size-3"
icon={faShareNodes}
/>
</div>
<div className="flex flex-col">
- <p className="text-gray-500 text-md">
+ <p className="text-gray-12 text-md">
Share{" "}
- <span className="font-bold text-gray-500">{capName}</span>
+ <span className="font-bold text-gray-12">{capName}</span>
</p>
- <p className="text-sm text-gray-400">
+ <p className="text-sm text-gray-10">
Select the spaces you would like to share with
</p>
</div>
@@ -129,28 +129,28 @@ export const SharingDialog: React.FC<SharingDialogProps> = ({
onChange={(e) => setSearchTerm(e.target.value)}
/>
<Search
- className="absolute right-3 top-1/2 text-gray-400 transform -translate-y-1/2"
+ className="absolute right-3 top-1/2 transform -translate-y-1/2 text-gray-10"
size={20}
/>
</div>
<div className="overflow-y-auto max-h-60">
- {filteredSpaces.length > 0 ? (
+ {filteredSpaces && filteredSpaces.length > 0 ? (
filteredSpaces.map((space) => (
<div
key={space.id}
className={clsx(
- `flex items-center border group transition-colors duration-300 border-gray-200 justify-between p-3 rounded-2xl cursor-pointer`,
+ `flex items-center border transition-colors duration-200 border-gray-3 justify-between p-3 rounded-xl cursor-pointer`,
selectedSpaces.has(space.id)
- ? "bg-gray-100"
- : "hover:bg-gray-100"
+ ? "bg-gray-1"
+ : "hover:bg-gray-3 hover:border-gray-4"
)}
onClick={() => handleToggleSpace(space.id)}
>
<div className="flex items-center">
- <div className="flex justify-center items-center mr-3 w-8 h-8 font-semibold text-white bg-blue-500 rounded-md">
+ <div className="flex justify-center items-center mr-3 w-8 h-8 font-semibold rounded-md bg-blue-10 text-gray-12">
{space.name.charAt(0).toUpperCase()}
</div>
- <span className="text-sm transition-colors duration-300 group-hover:text-gray-500">
+ <span className="text-sm transition-colors duration-200 text-gray-12">
{space.name}
</span>
</div>
@@ -159,18 +159,18 @@ export const SharingDialog: React.FC<SharingDialogProps> = ({
Added
</span>
) : (
- <Plus className="text-gray-400" size={20} />
+ <Plus className="text-gray-10" size={20} />
)}
</div>
))
) : (
<div className="flex gap-2 justify-center items-center pt-2 text-sm">
- <p className="font-medium text-gray-500">No spaces found</p>
+ <p className="text-gray-12">No spaces found</p>
</div>
)}
</div>
</div>
- <div className="flex justify-end p-5 space-x-2 border-t border-gray-200">
+ <div className="flex justify-end p-5 space-x-2 border-t border-gray-2">
<Button size="sm" variant="gray" onClick={onClose}>
Cancel
</Button>
diff --git a/apps/web/app/dashboard/layout.tsx b/apps/web/app/dashboard/layout.tsx
index 9c24901ca..30132a7bc 100644
--- a/apps/web/app/dashboard/layout.tsx
+++ b/apps/web/app/dashboard/layout.tsx
@@ -9,6 +9,7 @@ import {
users,
} from "@cap/database/schema";
import { count, eq, inArray, or, sql } from "drizzle-orm";
+import { cookies } from "next/headers";
import { redirect } from "next/navigation";
export type Space = {
@@ -133,12 +134,15 @@ export default async function DashboardLayout({
user.stripeSubscriptionStatus !== "cancelled") ||
!!user.thirdPartyStripeSubscriptionId;
+ const theme = cookies().get("theme")?.value ?? "light";
+
return (
<DynamicSharedLayout
spaceData={spaceSelect}
activeSpace={findActiveSpace || null}
user={user}
isSubscribed={isSubscribed}
+ initialTheme={theme as "light" | "dark"}
>
<div className="full-layout">
<DashboardTemplate>{children}</DashboardTemplate>
diff --git a/apps/web/app/dashboard/settings/workspace/Workspace.tsx b/apps/web/app/dashboard/settings/workspace/Workspace.tsx
index 62e9eddbd..33078f1e2 100644
--- a/apps/web/app/dashboard/settings/workspace/Workspace.tsx
+++ b/apps/web/app/dashboard/settings/workspace/Workspace.tsx
@@ -160,23 +160,20 @@ export const Workspace = () => {
<div className="flex flex-col flex-1 gap-6 justify-center lg:flex-row">
<Card className="flex flex-col flex-1 gap-3 justify-center items-center">
- <FontAwesomeIcon className="text-gray-400 size-5" icon={faChair} />
- <p>
+ <FontAwesomeIcon className="text-gray-10 size-5" icon={faChair} />
+ <p className="text-gray-12">
Seats Remaining
- <span className="ml-2 font-bold text-gray-500">
+ <span className="ml-2 font-bold text-gray-12">
{(activeSpace?.inviteQuota ?? 1) -
(activeSpace?.totalInvites ?? 0)}
</span>
</p>
</Card>
<Card className="flex flex-col flex-1 gap-3 justify-center items-center">
- <FontAwesomeIcon
- className="text-gray-400 size-5"
- icon={faUserGroup}
- />
- <p>
+ <FontAwesomeIcon className="text-gray-10 size-5" icon={faUserGroup} />
+ <p className="text-gray-12">
Seats Capacity
- <span className="ml-2 font-bold text-gray-500">
+ <span className="ml-2 font-bold text-gray-12">
{activeSpace?.inviteQuota}
</span>
</p>
@@ -189,7 +186,7 @@ export const Workspace = () => {
<div className="flex-1 w-full">
<div className="space-y-1">
<Label htmlFor="workspaceName">Name</Label>
- <p className="text-sm text-gray-400">
+ <p className="text-sm text-gray-10">
Changing the name will update how your workspace appears to
others members.
</p>
@@ -209,7 +206,7 @@ export const Workspace = () => {
<div className="flex-1 w-full">
<div className="space-y-1">
<Label htmlFor="allowedEmailDomain">Access email domain</Label>
- <p className="mt-1 text-sm text-gray-400">
+ <p className="mt-1 text-sm text-gray-10">
Only emails from this domain can access shared videos.{" "}
<b>Leave blank to allow everyone.</b>
</p>
@@ -264,13 +261,13 @@ export const Workspace = () => {
</div> */}
{/* <div
onClick={() => fileInputRef.current?.click()}
- className="w-full hover:bg-gray-100 transition-all duration-300 gap-3 border-gray-300 mt-4 border px-4 flex items-center justify-center py-[14px] border-dashed rounded-2xl"
+ className="w-full hover:bg-gray-1 transition-all duration-300 gap-3 border-gray-300 mt-4 border px-4 flex items-center justify-center py-[14px] border-dashed rounded-2xl"
>
<FontAwesomeIcon
- className="text-gray-400 size-5"
+ className="text-gray-10 size-5"
icon={faCloudUpload}
/>
- <p className="text-xs text-gray-400 truncate">
+ <p className="text-xs truncate text-gray-10">
Choose a file or drag & drop it here
</p>
</div> */}
@@ -313,7 +310,7 @@ export const Workspace = () => {
<Button
type="button"
size="sm"
- variant="white"
+ variant="dark"
onClick={() => {
if (!isOwner) {
showOwnerToast();
@@ -404,7 +401,7 @@ export const Workspace = () => {
<Button
type="button"
size="sm"
- variant="gray"
+ variant="dark"
onClick={handleManageBilling}
disabled={!isOwner}
>
@@ -441,7 +438,7 @@ export const Workspace = () => {
{inviteEmails.map((email) => (
<div
key={email}
- className="flex justify-between items-center p-2 bg-gray-100 rounded"
+ className="flex justify-between items-center p-2 rounded bg-gray-1"
>
<span>{email}</span>
<Button
diff --git a/apps/web/app/dashboard/settings/workspace/components/CustomDomain.tsx b/apps/web/app/dashboard/settings/workspace/components/CustomDomain.tsx
index ac49f0cfc..db3d561bd 100644
--- a/apps/web/app/dashboard/settings/workspace/components/CustomDomain.tsx
+++ b/apps/web/app/dashboard/settings/workspace/components/CustomDomain.tsx
@@ -320,17 +320,13 @@ export function CustomDomain() {
<div className="px-4 py-3">
<dl className="grid gap-4">
<div className="grid grid-cols-[100px,1fr] items-center">
- <dt className="text-sm font-medium text-gray-500">
- Type
- </dt>
+ <dt className="text-sm font-medium text-gray-1">Type</dt>
<dd className="text-sm text-gray-900">
{domainConfig?.verification?.[0]?.type}
</dd>
</div>
<div className="grid grid-cols-[100px,1fr] items-center">
- <dt className="text-sm font-medium text-gray-500">
- Name
- </dt>
+ <dt className="text-sm font-medium text-gray-1">Name</dt>
<dd className="flex gap-2 items-center text-sm text-gray-900">
<div className="flex items-center gap-1.5 bg-gray-50 px-2 py-1 rounded flex-1 min-w-0">
<code className="truncate">
@@ -344,13 +340,13 @@ export function CustomDomain() {
domainConfig?.verification?.[0]?.domain;
if (domain) handleCopy(domain, "name");
}}
- className="p-1 rounded-md transition-colors hover:bg-gray-100 shrink-0"
+ className="p-1 rounded-md transition-colors hover:bg-gray-1 shrink-0"
title="Copy to clipboard"
>
{copiedField === "name" ? (
<Check className="w-4 h-4 text-green-500" />
) : (
- <Copy className="w-4 h-4 text-gray-500" />
+ <Copy className="w-4 h-4 text-gray-1" />
)}
</button>
)}
@@ -358,9 +354,7 @@ export function CustomDomain() {
</dd>
</div>
<div className="grid grid-cols-[100px,1fr] items-center">
- <dt className="text-sm font-medium text-gray-500">
- Value
- </dt>
+ <dt className="text-sm font-medium text-gray-1">Value</dt>
<dd className="flex gap-2 items-center text-sm text-gray-900">
<div className="flex items-center gap-1.5 bg-gray-50 p-2 rounded flex-1 min-w-0">
<code className="font-mono text-xs break-all">
@@ -374,13 +368,13 @@ export function CustomDomain() {
domainConfig?.verification?.[0]?.value;
if (value) handleCopy(value, "value");
}}
- className="p-1 rounded-md transition-colors hover:bg-gray-100 shrink-0"
+ className="p-1 rounded-md transition-colors hover:bg-gray-1 shrink-0"
title="Copy to clipboard"
>
{copiedField === "value" ? (
<Check className="w-4 h-4 text-green-500" />
) : (
- <Copy className="w-4 h-4 text-gray-500" />
+ <Copy className="w-4 h-4 text-gray-1" />
)}
</button>
)}
@@ -410,7 +404,7 @@ export function CustomDomain() {
{domainConfig.currentAValues &&
domainConfig.currentAValues.length > 0 && (
<div className="grid grid-cols-[100px,1fr] items-center">
- <dt className="text-sm font-medium text-gray-500">
+ <dt className="text-sm font-medium text-gray-1">
Current
</dt>
<dd className="text-sm text-gray-600">
@@ -445,7 +439,7 @@ export function CustomDomain() {
</div>
)}
<div className="grid grid-cols-[100px,1fr] items-center">
- <dt className="text-sm font-medium text-gray-500">
+ <dt className="text-sm font-medium text-gray-1">
Required
</dt>
<dd className="flex gap-2 items-center">
@@ -463,13 +457,13 @@ export function CustomDomain() {
"value"
)
}
- className="p-1 rounded-md transition-colors hover:bg-gray-100 shrink-0"
+ className="p-1 rounded-md transition-colors hover:bg-gray-1 shrink-0"
title="Copy to clipboard"
>
{copiedField === "value" ? (
<Check className="w-4 h-4 text-green-500" />
) : (
- <Copy className="w-4 h-4 text-gray-500" />
+ <Copy className="w-4 h-4 text-gray-1" />
)}
</button>
)}
diff --git a/apps/web/app/dashboard/settings/workspace/loading.tsx b/apps/web/app/dashboard/settings/workspace/loading.tsx
index b727c45c6..1620b6331 100644
--- a/apps/web/app/dashboard/settings/workspace/loading.tsx
+++ b/apps/web/app/dashboard/settings/workspace/loading.tsx
@@ -10,31 +10,57 @@ export default function Loading() {
{/* Seats stats cards */}
<div className="flex flex-col gap-6 md:flex-row">
{/* Seats Remaining card */}
- <div className="flex flex-col flex-1 gap-3 justify-center items-center p-5 bg-gray-50 rounded-2xl border border-gray-200">
+ <div className="flex flex-col flex-1 gap-3 justify-center items-center p-5 rounded-2xl border bg-gray-3 border-gray-4">
<div className="overflow-hidden w-5 h-5 rounded-full">
- <Skeleton width={20} height={20} />
+ <Skeleton
+ baseColor="var(--gray-4)"
+ highlightColor="var(--gray-5)"
+ width={20}
+ height={20}
+ />
</div>
<div className="flex items-center">
<span className="text-sm">
- <Skeleton width={100} />
+ <Skeleton
+ baseColor="var(--gray-4)"
+ highlightColor="var(--gray-5)"
+ width={100}
+ />
</span>
<span className="ml-2 font-bold">
- <Skeleton width={20} />
+ <Skeleton
+ baseColor="var(--gray-4)"
+ highlightColor="var(--gray-5)"
+ width={20}
+ />
</span>
</div>
</div>
{/* Seats Capacity card */}
- <div className="flex flex-col flex-1 gap-3 justify-center items-center p-5 bg-gray-50 rounded-2xl border border-gray-200">
+ <div className="flex flex-col flex-1 gap-3 justify-center items-center p-5 rounded-2xl border bg-gray-3 border-gray-4">
<div className="overflow-hidden w-5 h-5 rounded-full">
- <Skeleton width={20} height={20} />
+ <Skeleton
+ baseColor="var(--gray-4)"
+ highlightColor="var(--gray-5)"
+ width={20}
+ height={20}
+ />
</div>
<div className="flex items-center">
<span className="text-sm">
- <Skeleton width={100} />
+ <Skeleton
+ baseColor="var(--gray-4)"
+ highlightColor="var(--gray-5)"
+ width={100}
+ />
</span>
<span className="ml-2 font-bold">
- <Skeleton width={20} />
+ <Skeleton
+ baseColor="var(--gray-4)"
+ highlightColor="var(--gray-5)"
+ width={20}
+ />
</span>
</div>
</div>
@@ -43,55 +69,138 @@ export default function Loading() {
{/* Workspace details and Custom domain */}
<div className="flex flex-col gap-6 items-stretch xl:flex-row">
{/* Workspace details card */}
- <div className="flex flex-col flex-1 justify-between p-5 bg-gray-50 rounded-2xl border border-gray-200">
+ <div className="flex flex-col flex-1 justify-between p-5 rounded-2xl border bg-gray-3 border-gray-4">
<div className="flex flex-col gap-6 lg:flex-row">
{/* Name field */}
<div className="flex-1 space-y-2">
<div>
- <Skeleton width={60} height={16} className="mb-1" />
- <Skeleton width={200} height={12} />
+ <Skeleton
+ baseColor="var(--gray-4)"
+ highlightColor="var(--gray-5)"
+ width={60}
+ height={16}
+ className="mb-1"
+ />
+ <Skeleton
+ baseColor="var(--gray-4)"
+ highlightColor="var(--gray-5)"
+ width={200}
+ height={12}
+ />
</div>
- <Skeleton height={48} className="mt-4 rounded-xl" />
+ <Skeleton
+ baseColor="var(--gray-4)"
+ highlightColor="var(--gray-5)"
+ height={48}
+ className="mt-4 rounded-xl"
+ />
</div>
{/* Email domain field */}
<div className="flex-1 space-y-2">
<div>
- <Skeleton width={120} height={16} className="mb-1" />
- <Skeleton width={200} height={12} />
+ <Skeleton
+ baseColor="var(--gray-4)"
+ highlightColor="var(--gray-5)"
+ width={120}
+ height={16}
+ className="mb-1"
+ />
+ <Skeleton
+ baseColor="var(--gray-4)"
+ highlightColor="var(--gray-5)"
+ width={200}
+ height={12}
+ />
</div>
- <Skeleton height={48} className="mt-4 rounded-xl" />
+ <Skeleton
+ baseColor="var(--gray-4)"
+ highlightColor="var(--gray-5)"
+ height={48}
+ className="mt-4 rounded-xl"
+ />
</div>
</div>
{/* Save button */}
<div className="mt-8 mb-2">
- <Skeleton width={80} height={36} className="rounded-xl" />
+ <Skeleton
+ baseColor="var(--gray-4)"
+ highlightColor="var(--gray-5)"
+ width={80}
+ height={36}
+ className="rounded-xl"
+ />
</div>
</div>
{/* Custom domain card */}
- <div className="flex-1 p-5 bg-gray-50 rounded-2xl border border-gray-200">
+ <div className="flex-1 p-5 rounded-2xl border bg-gray-3 border-gray-4">
<div className="space-y-2">
- <Skeleton width={100} height={16} className="mb-1" />
- <Skeleton width={300} height={12} />
- <Skeleton width={280} height={12} />
+ <Skeleton
+ baseColor="var(--gray-4)"
+ highlightColor="var(--gray-5)"
+ width={100}
+ height={16}
+ className="mb-1"
+ />
+ <Skeleton
+ baseColor="var(--gray-4)"
+ highlightColor="var(--gray-5)"
+ width={300}
+ height={12}
+ />
+ <Skeleton
+ baseColor="var(--gray-4)"
+ highlightColor="var(--gray-5)"
+ width={280}
+ height={12}
+ />
</div>
<div className="mt-4 space-y-4">
{/* Domain input */}
- <Skeleton height={48} className="rounded-xl" />
+ <Skeleton
+ baseColor="var(--gray-4)"
+ highlightColor="var(--gray-5)"
+ height={48}
+ className="rounded-xl"
+ />
{/* Status and buttons */}
<div className="flex justify-between items-center">
- <Skeleton width={150} height={24} className="rounded-md" />
+ <Skeleton
+ baseColor="var(--gray-4)"
+ highlightColor="var(--gray-5)"
+ width={150}
+ height={24}
+ className="rounded-md"
+ />
</div>
<div className="flex flex-wrap justify-between mt-4">
- <Skeleton width={80} height={36} className="rounded-xl" />
+ <Skeleton
+ baseColor="var(--gray-4)"
+ highlightColor="var(--gray-5)"
+ width={80}
+ height={36}
+ className="rounded-xl"
+ />
<div className="flex gap-3">
- <Skeleton width={100} height={36} className="rounded-xl" />
- <Skeleton width={100} height={36} className="rounded-xl" />
+ <Skeleton
+ baseColor="var(--gray-4)"
+ highlightColor="var(--gray-5)"
+ width={100}
+ height={36}
+ className="rounded-xl"
+ />
+ <Skeleton
+ baseColor="var(--gray-4)"
+ highlightColor="var(--gray-5)"
+ width={100}
+ height={36}
+ className="rounded-xl"
+ />
</div>
</div>
</div>
@@ -99,42 +208,125 @@ export default function Loading() {
</div>
{/* Members table */}
- <div className="p-5 bg-gray-50 rounded-2xl border border-gray-200">
+ <div className="p-5 rounded-2xl border bg-gray-3 border-gray-4">
<div className="flex flex-wrap justify-between items-center mb-6">
<div>
- <Skeleton width={80} height={20} className="mb-2" />
- <Skeleton width={180} height={12} />
+ <Skeleton
+ baseColor="var(--gray-4)"
+ highlightColor="var(--gray-5)"
+ width={80}
+ height={20}
+ className="mb-2"
+ />
+ <Skeleton
+ baseColor="var(--gray-4)"
+ highlightColor="var(--gray-5)"
+ width={180}
+ height={12}
+ />
</div>
<div className="flex gap-3">
- <Skeleton width={140} height={36} className="rounded-xl" />
- <Skeleton width={100} height={36} className="rounded-xl" />
+ <Skeleton
+ baseColor="var(--gray-4)"
+ highlightColor="var(--gray-5)"
+ width={140}
+ height={36}
+ className="rounded-xl"
+ />
+ <Skeleton
+ baseColor="var(--gray-4)"
+ highlightColor="var(--gray-5)"
+ width={100}
+ height={36}
+ className="rounded-xl"
+ />
</div>
</div>
{/* Table */}
<div className="mt-5">
{/* Header */}
- <div className="py-3 border-b">
+ <div className="py-3 border-b border-gray-5">
<div className="flex gap-2">
- <Skeleton width="16%" height={16} />
- <Skeleton width="16%" height={16} />
- <Skeleton width="16%" height={16} />
- <Skeleton width="16%" height={16} />
- <Skeleton width="16%" height={16} />
- <Skeleton width="16%" height={16} />
+ <Skeleton
+ baseColor="var(--gray-4)"
+ highlightColor="var(--gray-5)"
+ width="16%"
+ height={16}
+ />
+ <Skeleton
+ baseColor="var(--gray-4)"
+ highlightColor="var(--gray-5)"
+ width="16%"
+ height={16}
+ />
+ <Skeleton
+ baseColor="var(--gray-4)"
+ highlightColor="var(--gray-5)"
+ width="16%"
+ height={16}
+ />
+ <Skeleton
+ baseColor="var(--gray-4)"
+ highlightColor="var(--gray-5)"
+ width="16%"
+ height={16}
+ />
+ <Skeleton
+ baseColor="var(--gray-4)"
+ highlightColor="var(--gray-5)"
+ width="16%"
+ height={16}
+ />
+ <Skeleton
+ baseColor="var(--gray-4)"
+ highlightColor="var(--gray-5)"
+ width="16%"
+ height={16}
+ />
</div>
</div>
{/* Rows */}
{[1, 2, 3].map((i) => (
- <div key={i} className="py-4 border-b">
+ <div key={i} className="py-4 border-b border-gray-5">
<div className="flex gap-2">
- <Skeleton width="16%" height={16} />
- <Skeleton width="16%" height={16} />
- <Skeleton width="16%" height={16} />
- <Skeleton width="16%" height={16} />
- <Skeleton width="16%" height={16} />
- <Skeleton width="16%" height={16} />
+ <Skeleton
+ baseColor="var(--gray-4)"
+ highlightColor="var(--gray-5)"
+ width="16%"
+ height={16}
+ />
+ <Skeleton
+ baseColor="var(--gray-4)"
+ highlightColor="var(--gray-5)"
+ width="16%"
+ height={16}
+ />
+ <Skeleton
+ baseColor="var(--gray-4)"
+ highlightColor="var(--gray-5)"
+ width="16%"
+ height={16}
+ />
+ <Skeleton
+ baseColor="var(--gray-4)"
+ highlightColor="var(--gray-5)"
+ width="16%"
+ height={16}
+ />
+ <Skeleton
+ baseColor="var(--gray-4)"
+ highlightColor="var(--gray-5)"
+ width="16%"
+ height={16}
+ />
+ <Skeleton
+ baseColor="var(--gray-4)"
+ highlightColor="var(--gray-5)"
+ width="16%"
+ height={16}
+ />
</div>
</div>
))}
@@ -142,12 +334,29 @@ export default function Loading() {
</div>
{/* Billing section */}
- <div className="flex flex-wrap justify-between items-center p-5 bg-gray-50 rounded-2xl border border-gray-200">
+ <div className="flex flex-wrap justify-between items-center p-5 rounded-2xl border bg-gray-3 border-gray-4">
<div>
- <Skeleton width={220} height={20} className="mb-2" />
- <Skeleton width={300} height={12} />
+ <Skeleton
+ baseColor="var(--gray-4)"
+ highlightColor="var(--gray-5)"
+ width={220}
+ height={20}
+ className="mb-2"
+ />
+ <Skeleton
+ baseColor="var(--gray-4)"
+ highlightColor="var(--gray-5)"
+ width={300}
+ height={12}
+ />
</div>
- <Skeleton width={120} height={36} className="rounded-xl" />
+ <Skeleton
+ baseColor="var(--gray-4)"
+ highlightColor="var(--gray-5)"
+ width={120}
+ height={36}
+ className="rounded-xl"
+ />
</div>
</div>
)}
diff --git a/apps/web/app/dashboard/shared-caps/components/SharedCapCard.tsx b/apps/web/app/dashboard/shared-caps/components/SharedCapCard.tsx
index fbf807003..2939a480c 100644
--- a/apps/web/app/dashboard/shared-caps/components/SharedCapCard.tsx
+++ b/apps/web/app/dashboard/shared-caps/components/SharedCapCard.tsx
@@ -1,12 +1,7 @@
-import { useSharedContext } from "@/app/dashboard/_components/DynamicSharedLayout";
-import { CapCardAnalytics } from "@/app/dashboard/caps/components/CapCardAnalytics";
-import { Tooltip } from "@/components/Tooltip";
-import { VideoThumbnail } from "@/components/VideoThumbnail";
import { VideoMetadata } from "@cap/database/types";
-import { clientEnv, NODE_ENV } from "@cap/env";
import { faBuilding, faUser } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
-import moment from "moment";
+import { CapCard } from "../../caps/components/CapCard";
interface SharedCapCardProps {
cap: {
@@ -28,74 +23,33 @@ export const SharedCapCard: React.FC<SharedCapCardProps> = ({
analytics,
spaceName,
}) => {
- // Get the effective date (custom or original)
- const effectiveDate = cap.metadata?.customCreatedAt
- ? new Date(cap.metadata.customCreatedAt)
- : cap.createdAt;
-
- const { activeSpace } = useSharedContext();
-
const displayCount =
analytics === 0
? Math.max(cap.totalComments, cap.totalReactions)
: analytics;
return (
- <div className="relative rounded-2xl flex flex-col gap-4 w-full h-full border-gray-200 bg-gray-50 border-[1px]">
- <a
- className="block group"
- href={
- activeSpace?.space.customDomain && activeSpace.space.domainVerified
- ? `https://${activeSpace.space.customDomain}/s/${cap.id}`
- : clientEnv.NEXT_PUBLIC_IS_CAP && NODE_ENV === "production"
- ? `https://cap.link/${cap.id}`
- : `${clientEnv.NEXT_PUBLIC_WEB_URL}/s/${cap.id}`
- }
- >
- <VideoThumbnail
- userId={cap.ownerId}
- videoId={cap.id}
- alt={`${cap.name} Thumbnail`}
- />
- </a>
- <div className="flex flex-col flex-grow gap-3 px-4 pb-4 w-full">
- <div className="flex flex-col gap-1">
- <p className="text-md truncate leading-[1.25rem] text-gray-500 font-medium">
- {cap.name}
- </p>
- <Tooltip content={`Cap created at ${effectiveDate}`}>
- <span className="text-sm truncate leading-[1.25rem] text-gray-400 cursor-pointer flex items-center">
- {moment(effectiveDate).fromNow()}
- </span>
- </Tooltip>
- </div>
- <div className="mb-2 space-y-1">
- {cap.ownerName && (
- <div className="flex gap-2 items-center">
- <FontAwesomeIcon icon={faUser} className="text-gray-400 size-3" />
- <span className="text-sm text-gray-400">{cap.ownerName}</span>
- </div>
- )}
+ <CapCard cap={cap} analytics={displayCount} sharedCapCard>
+ <div className="mb-2 space-y-1">
+ {cap.ownerName && (
<div className="flex gap-2 items-center">
- <FontAwesomeIcon
- icon={faBuilding}
- className="text-gray-400 size-2.5"
- />
- <p className="text-sm text-gray-400">
- Shared with{" "}
- <span className="text-sm font-medium text-gray-500">
- {spaceName}
- </span>
- </p>
+ <FontAwesomeIcon icon={faUser} className="text-gray-10 size-3" />
+ <span className="text-sm text-gray-10">{cap.ownerName}</span>
</div>
+ )}
+ <div className="flex gap-2 items-center">
+ <FontAwesomeIcon
+ icon={faBuilding}
+ className="text-gray-10 size-2.5"
+ />
+ <p className="text-sm pointer-events-none text-gray-10">
+ Shared with{" "}
+ <span className="text-sm font-medium text-gray-12">
+ {spaceName}
+ </span>
+ </p>
</div>
- <CapCardAnalytics
- capId={cap.id}
- displayCount={displayCount}
- totalComments={cap.totalComments}
- totalReactions={cap.totalReactions}
- />
</div>
- </div>
+ </CapCard>
);
};
diff --git a/apps/web/app/dashboard/shared-caps/page.tsx b/apps/web/app/dashboard/shared-caps/page.tsx
index b3294e830..3b3c07bf7 100644
--- a/apps/web/app/dashboard/shared-caps/page.tsx
+++ b/apps/web/app/dashboard/shared-caps/page.tsx
@@ -1,16 +1,16 @@
-import { SharedCaps } from "./SharedCaps";
import { db } from "@cap/database";
+import { getCurrentUser } from "@cap/database/auth/session";
import {
comments,
- videos,
sharedVideos,
+ spaceMembers,
spaces,
users,
- spaceMembers,
+ videos,
} from "@cap/database/schema";
-import { desc, eq, sql, count, and } from "drizzle-orm";
-import { getCurrentUser } from "@cap/database/auth/session";
+import { count, desc, eq, sql } from "drizzle-orm";
import { Metadata } from "next";
+import { SharedCaps } from "./SharedCaps";
export const metadata: Metadata = {
title: "Shared Caps — Cap",
diff --git a/apps/web/app/docs/[...slug]/page.tsx b/apps/web/app/docs/[...slug]/page.tsx
index ebe3802b8..6ac56d1f7 100644
--- a/apps/web/app/docs/[...slug]/page.tsx
+++ b/apps/web/app/docs/[...slug]/page.tsx
@@ -145,7 +145,7 @@ export default async function DocPage(props: DocProps) {
<div className="p-4 rounded-lg border transition-colors hover:border-blue-500">
<h3 className="m-0">{doc.metadata.title}</h3>
{doc.metadata.summary && (
- <p className="m-0 mt-2 text-gray-600 dark:text-gray-400">
+ <p className="m-0 mt-2 text-gray-600 dark:text-gray-8">
{doc.metadata.summary}
</p>
)}
@@ -154,7 +154,7 @@ export default async function DocPage(props: DocProps) {
{doc.metadata.tags.split(", ").map((tag) => (
<span
key={tag}
- className="px-2 py-1 text-xs text-gray-600 bg-gray-100 rounded-full dark:bg-gray-800 dark:text-gray-400"
+ className="px-2 py-1 text-xs text-gray-600 bg-gray-1 rounded-full dark:bg-gray-800 dark:text-gray-8"
>
{tag}
</span>
diff --git a/apps/web/app/globals.css b/apps/web/app/globals.css
index ba7aac0da..c7d901e36 100644
--- a/apps/web/app/globals.css
+++ b/apps/web/app/globals.css
@@ -1,3 +1,10 @@
+@import '@radix-ui/colors/red.css';
+@import '@radix-ui/colors/red-dark.css';
+@import '@radix-ui/colors/gray.css';
+@import '@radix-ui/colors/gray-alpha.css';
+@import '@radix-ui/colors/gray-dark.css';
+@import '@radix-ui/colors/blue.css';
+
@tailwind base;
@tailwind components;
@tailwind utilities;
@@ -240,7 +247,7 @@ p,
span,
input,
label, button {
- @apply tracking-tight text-gray-400 font-normal text-[1rem] leading-[1.5rem];
+ @apply tracking-tight text-gray-10 font-normal text-[1rem] leading-[1.5rem];
}
a,
@@ -413,14 +420,14 @@ label {
ul {
@apply pl-5 list-disc;
}
-
+/*
.embossed {
- @apply bg-white border-2 border-filler-3 relative w-[320px] max-w-full min-h-[60px] rounded-xl z-10;
+ @apply bg-white-a12 border-2 border-filler-3 relative w-[320px] max-w-full min-h-[60px] rounded-xl z-10;
}
.embossed button {
width: 100%;
-}
+} */
.dashboard-page {
@apply flex flex-col;
@@ -435,7 +442,7 @@ ul {
}
.dashboard-page h1, .dashboard-page h2, .dashboard-page h3, .dashboard-page h4, .dashboard-page h5 {
- @apply text-[1rem] font-medium leading-[1.25rem] text-gray-500 !important;
+ @apply text-[1rem] font-medium leading-[1.25rem] text-gray-12 !important;
}
.dashboard-header p {
@@ -519,7 +526,7 @@ footer a {
}
.prose p, .prose li {
- @apply text-gray-500/80 !important;
+ @apply text-gray-12 !important;
}
.new-card-style {
diff --git a/apps/web/app/invite/[inviteId]/InviteAccept.tsx b/apps/web/app/invite/[inviteId]/InviteAccept.tsx
index 5185c3fa8..e3eeb6b59 100644
--- a/apps/web/app/invite/[inviteId]/InviteAccept.tsx
+++ b/apps/web/app/invite/[inviteId]/InviteAccept.tsx
@@ -1,12 +1,12 @@
"use client";
-import { Button, Logo } from "@cap/ui";
import { userSelectProps } from "@cap/database/auth/session";
+import { Button, Logo } from "@cap/ui";
+import { LogOut } from "lucide-react";
+import { signOut } from "next-auth/react";
import { useRouter } from "next/navigation";
import { useState } from "react";
import toast from "react-hot-toast";
-import { signOut } from "next-auth/react";
-import { LogOut } from "lucide-react";
type InviteAcceptProps = {
inviteId: string;
@@ -83,7 +83,7 @@ export function InviteAccept({
};
return (
- <div className="flex flex-col items-center justify-center min-h-screen bg-gray-100 relative">
+ <div className="flex flex-col items-center justify-center min-h-screen bg-gray-1 relative">
<div className="bg-gray-50 p-4 rounded-[20px] border-[1px] border-gray-200 shadow-[0px 8px 16px rgba(18, 22, 31, 0.04)]">
<Logo className="w-20 h-auto mb-4" />
<h1 className="text-xl mb-4">
@@ -106,7 +106,7 @@ export function InviteAccept({
onClick={() => signOut({ callbackUrl: "/login" })}
size="sm"
variant="white"
- className="absolute bottom-4 left-4 text-gray-500 hover:text-gray-700"
+ className="absolute bottom-4 left-4 text-gray-1 hover:text-gray-700"
>
<LogOut className="w-4 h-4 mr-2" />
Sign Out
diff --git a/apps/web/app/layout.tsx b/apps/web/app/layout.tsx
index 84bf36070..e881dacec 100644
--- a/apps/web/app/layout.tsx
+++ b/apps/web/app/layout.tsx
@@ -7,30 +7,11 @@ import { serverEnv } from "@cap/env";
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
import crypto from "crypto";
import type { Metadata } from "next";
-import localFont from "next/font/local";
+import { cookies, headers } from "next/headers";
import { Toaster } from "react-hot-toast";
import { AuthProvider } from "./AuthProvider";
import { PostHogProvider, Providers } from "./providers";
-const SfProDisplay = localFont({
- src: [
- {
- path: "./fonts/SFPRODISPLAYREGULAR.woff2",
- weight: "300",
- },
- {
- path: "./fonts/SFPRODISPLAYBOLD.woff2",
- weight: "700",
- },
- {
- path: "./fonts/SFPRODISPLAYMEDIUM.woff2",
- weight: "500",
- },
- ],
- display: "swap",
- variable: "--font-sf-pro-display",
-});
-
export const metadata: Metadata = {
title: "Cap — Beautiful screen recordings, owned by you.",
description:
@@ -59,6 +40,15 @@ export default async function RootLayout({
.digest("hex");
}
+ const path = headers().get("x-current-path");
+ const isPathDashboard =
+ path?.startsWith("/dashboard") ||
+ path?.startsWith("/login") ||
+ path?.startsWith("/onboarding");
+
+ const cookieStore = await cookies();
+ const theme = cookieStore.get("theme")?.value === "dark" ? "dark" : "light";
+
return (
<html lang="en">
<head>
@@ -85,7 +75,7 @@ export default async function RootLayout({
<meta name="msapplication-TileColor" content="#da532c" />
<meta name="theme-color" content="#ffffff" />
</head>
- <body>
+ <body className={isPathDashboard ? theme : "light"}>
<TooltipPrimitive.Provider>
<PostHogProvider>
<AuthProvider>
diff --git a/apps/web/app/login/form.tsx b/apps/web/app/login/form.tsx
index f9f8f2ee8..341fde040 100644
--- a/apps/web/app/login/form.tsx
+++ b/apps/web/app/login/form.tsx
@@ -27,6 +27,17 @@ export function LoginForm() {
const [showOrgInput, setShowOrgInput] = useState(false);
const [spaceId, setSpaceId] = useState("");
const [spaceName, setSpaceName] = useState<string | null>(null);
+ const theme = localStorage.getItem("theme") || "light";
+
+ useEffect(() => {
+ theme === "dark"
+ ? document.documentElement.classList.add("dark")
+ : document.documentElement.classList.remove("dark");
+ //remove the dark mode when we leave the dashboard
+ return () => {
+ document.documentElement.classList.remove("dark");
+ };
+ }, [theme]);
useEffect(() => {
const error = searchParams?.get("error");
@@ -111,8 +122,8 @@ export function LoginForm() {
};
return (
- <div className="flex justify-center items-center w-full h-screen">
- <div className="overflow-hidden relative w-[calc(100%-5%)] p-[28px] max-w-[472px] bg-gray-100 border border-gray-200 rounded-2xl">
+ <div className="flex justify-center items-center w-full h-screen bg-gray-1">
+ <div className="overflow-hidden relative w-[calc(100%-5%)] p-[28px] max-w-[472px] bg-gray-2 border border-gray-4 rounded-2xl">
<motion.div
key="back-button"
initial={{ opacity: 0, display: "none" }}
@@ -122,7 +133,7 @@ export function LoginForm() {
transition: { duration: 0.2 },
}}
onClick={() => setShowOrgInput(false)}
- className="flex absolute top-5 left-5 z-20 hover:bg-gray-100 gap-2 items-center py-1.5 px-3 text-gray-500 bg-gray-50 rounded-full border border-gray-200 transition-colors duration-300 cursor-pointer "
+ className="flex absolute top-5 left-5 z-20 hover:bg-gray-1 gap-2 items-center py-1.5 px-3 text-gray-12 bg-transparent rounded-full border border-gray-4 transition-colors duration-300 cursor-pointer "
>
<FontAwesomeIcon className="w-2" icon={faArrowLeft} />
<p className="text-xs text-inherit">Back</p>
@@ -131,8 +142,10 @@ export function LoginForm() {
<LogoBadge className="w-[72px] mx-auto" />
</Link>
<div className="flex flex-col justify-center items-center my-7 text-left">
- <h1 className="text-2xl font-semibold">Sign in to Cap</h1>
- <p className="text-[16px] text-gray-400">
+ <h1 className="text-2xl font-semibold text-gray-12">
+ Sign in to Cap
+ </h1>
+ <p className="text-[16px] text-gray-10">
Beautiful screen recordings, owned by you.
</p>
</div>
@@ -143,7 +156,7 @@ export function LoginForm() {
<Button disabled={true} variant="primary" />
<Button disabled={true} variant="secondary" />
<Button disabled={true} variant="destructive" />
- <div className="mx-auto w-3/4 h-5 bg-gray-100 rounded-lg" />
+ <div className="mx-auto w-3/4 h-5 rounded-lg bg-gray-1" />
</>
}
>
@@ -192,7 +205,6 @@ export function LoginForm() {
.then((res) => {
setLoading(false);
if (res?.ok && !res?.error) {
- setEmail("");
setEmailSent(true);
trackEvent("auth_email_sent", {
email_domain: email.split("@")[1],
@@ -222,13 +234,13 @@ export function LoginForm() {
</motion.form>
)}
</AnimatePresence>
- <p className="pt-3 text-xs text-center text-gray-400">
+ <p className="pt-3 text-xs text-center text-gray-8">
By typing your email and clicking continue, you acknowledge that
you have both read and agree to Cap's{" "}
<Link
href="/terms"
target="_blank"
- className="text-xs font-semibold text-gray-500 hover:text-blue-300"
+ className="text-xs font-semibold text-gray-12 hover:text-blue-300"
>
Terms of Service
</Link>{" "}
@@ -236,7 +248,7 @@ export function LoginForm() {
<Link
href="/privacy"
target="_blank"
- className="text-xs font-semibold text-gray-500 hover:text-blue-300"
+ className="text-xs font-semibold text-gray-12 hover:text-blue-300"
>
Privacy Policy
</Link>
@@ -245,7 +257,7 @@ export function LoginForm() {
</div>
{emailSent && (
<button
- className="pt-3 mx-auto text-sm text-gray-500 underline hover:text-gray-400"
+ className="pt-3 mx-auto text-sm underline text-gray-10 hover:text-gray-8"
onClick={() => {
setEmailSent(false);
setEmail("");
@@ -263,7 +275,6 @@ export function LoginForm() {
}
const LoginWithSSO = ({
- setShowOrgInput,
handleSpaceLookup,
spaceId,
setSpaceId,
@@ -287,7 +298,7 @@ const LoginWithSSO = ({
className="w-full max-w-full"
/>
{spaceName && (
- <p className="text-sm text-gray-500">Signing in to: {spaceName}</p>
+ <p className="text-sm text-gray-1">Signing in to: {spaceName}</p>
)}
<div>
<Button type="submit" variant="dark" className="w-full max-w-full">
@@ -357,9 +368,9 @@ const NormalLogin = ({
)} */}
</div>
<div className="flex gap-4 items-center my-4">
- <span className="flex-1 h-px bg-gray-200" />
- <p className="text-sm text-center text-gray-400">OR</p>
- <span className="flex-1 h-px bg-gray-200" />
+ <span className="flex-1 h-px bg-gray-5" />
+ <p className="text-sm text-center text-gray-8">OR</p>
+ <span className="flex-1 h-px bg-gray-5" />
</div>
<div className="flex flex-col gap-3 justify-center items-center">
{!oauthError && (
diff --git a/apps/web/app/onboarding/Onboarding.tsx b/apps/web/app/onboarding/Onboarding.tsx
index b90daea20..950e1af5d 100644
--- a/apps/web/app/onboarding/Onboarding.tsx
+++ b/apps/web/app/onboarding/Onboarding.tsx
@@ -1,16 +1,11 @@
"use client";
-import { users } from "@cap/database/schema";
import { Button, Input } from "@cap/ui";
import { useRouter } from "next/navigation";
import { useState } from "react";
import toast from "react-hot-toast";
-export const Onboarding = ({
- user,
-}: {
- user: typeof users.$inferSelect | null;
-}) => {
+export const Onboarding = () => {
const router = useRouter();
const [firstNameInput, setFirstNameInput] = useState("");
const [loading, setLoading] = useState(false);
@@ -50,7 +45,7 @@ export const Onboarding = ({
return (
<form
- className="relative w-[calc(100%-2%)] p-[28px] max-w-[472px] bg-gray-100 border border-gray-200 rounded-2xl"
+ className="relative w-[calc(100%-2%)] p-[28px] max-w-[472px] bg-gray-2 border border-gray-4 rounded-2xl"
onSubmit={handleSubmit}
>
<div className="space-y-3">
diff --git a/apps/web/app/onboarding/page.tsx b/apps/web/app/onboarding/page.tsx
index bd8c1d641..b8fd43830 100644
--- a/apps/web/app/onboarding/page.tsx
+++ b/apps/web/app/onboarding/page.tsx
@@ -14,20 +14,24 @@ export default async function OnboardingPage() {
user.activeSpaceId.length > 1
) {
redirect("/dashboard");
+ } else if (!user) {
+ redirect("/login");
}
return (
- <div className="flex justify-center items-center w-full h-screen">
+ <div className="flex justify-center items-center w-full h-screen bg-gray-1">
<div className="overflow-hidden relative p-4 space-y-6 w-full max-w-lg sm:rounded-2xl">
<a href="/">
<LogoBadge className="mx-auto w-auto h-14" />
</a>
<div className="flex flex-col justify-center items-center space-y-1 text-center">
- <h1 className="text-3xl font-semibold">Let's get you started</h1>
- <p className="text-2xl text-gray-500">What's your name?</p>
+ <h1 className="text-3xl font-semibold text-gray-12">
+ Let's get you started
+ </h1>
+ <p className="text-2xl text-gray-11">What's your name?</p>
</div>
<div className="flex flex-col space-y-3">
- <Onboarding user={user ?? null} />
+ <Onboarding />
</div>
</div>
</div>
diff --git a/apps/web/app/s/[videoId]/Share.tsx b/apps/web/app/s/[videoId]/Share.tsx
index e528091c4..80c695fd0 100644
--- a/apps/web/app/s/[videoId]/Share.tsx
+++ b/apps/web/app/s/[videoId]/Share.tsx
@@ -1,5 +1,6 @@
"use client";
+import { getVideoAnalytics } from "@/actions/videos/get-analytics";
import { userSelectProps } from "@cap/database/auth/session";
import { comments as commentsSchema, videos } from "@cap/database/schema";
import { clientEnv } from "@cap/env";
@@ -9,7 +10,6 @@ import { ShareHeader } from "./_components/ShareHeader";
import { ShareVideo } from "./_components/ShareVideo";
import { Sidebar } from "./_components/Sidebar";
import { Toolbar } from "./_components/Toolbar";
-import { getVideoAnalytics } from "@/actions/videos/get-analytics";
type CommentWithAuthor = typeof commentsSchema.$inferSelect & {
authorName: string | null;
@@ -133,7 +133,7 @@ export const Share: React.FC<ShareProps> = ({
<a
target="_blank"
href={`${clientEnv.NEXT_PUBLIC_WEB_URL}?ref=video_${data.id}`}
- className="flex justify-center items-center px-4 py-2 mx-auto space-x-2 bg-gray-100 rounded-full new-card-style w-fit"
+ className="flex justify-center items-center px-4 py-2 mx-auto space-x-2 bg-gray-1 rounded-full new-card-style w-fit"
>
<span className="text-sm">Recorded with</span>
<Logo className="w-14 h-auto" />
diff --git a/apps/web/app/s/[videoId]/_components/AuthOverlay.tsx b/apps/web/app/s/[videoId]/_components/AuthOverlay.tsx
index 50dfcb71c..2f905aad1 100644
--- a/apps/web/app/s/[videoId]/_components/AuthOverlay.tsx
+++ b/apps/web/app/s/[videoId]/_components/AuthOverlay.tsx
@@ -1,8 +1,8 @@
-import { Dialog, DialogContent, LogoBadge, Button } from "@cap/ui";
import { NODE_ENV } from "@cap/env";
+import { Button, Dialog, DialogContent, LogoBadge } from "@cap/ui";
import { motion } from "framer-motion";
import { signIn } from "next-auth/react";
-import { useState, useEffect } from "react";
+import { useState } from "react";
import { toast } from "react-hot-toast";
interface AuthOverlayProps {
@@ -34,9 +34,9 @@ export const AuthOverlay: React.FC<AuthOverlayProps> = ({
className="w-[90vw] sm:max-w-md p-6 rounded-xl"
>
<div className="space-y-6">
- <LogoBadge className="h-12 w-auto" />
+ <LogoBadge className="w-auto h-12" />
- <div className="text-left space-y-3">
+ <div className="space-y-3 text-left">
<motion.h1
initial={{ opacity: 0, y: 20 }}
animate={{ opacity: 1, y: 0 }}
@@ -49,7 +49,7 @@ export const AuthOverlay: React.FC<AuthOverlayProps> = ({
initial={{ opacity: 0, y: 20 }}
animate={{ opacity: 1, y: 0 }}
transition={{ delay: 0.2 }}
- className="text-2xl text-gray-500"
+ className="text-2xl text-gray-1"
>
Join the conversation.
</motion.p>
@@ -59,9 +59,9 @@ export const AuthOverlay: React.FC<AuthOverlayProps> = ({
{NODE_ENV !== "development" && (
<>
<Button
- variant="dark"
+ variant="darkgradient"
size="lg"
- className="h-12 text-lg flex items-center justify-center space-x-2"
+ className="flex justify-center items-center space-x-2 h-12 text-lg"
onClick={handleGoogleSignIn}
disabled={loading}
>
@@ -87,11 +87,11 @@ export const AuthOverlay: React.FC<AuthOverlayProps> = ({
</Button>
<div className="relative">
- <div className="absolute inset-0 flex items-center">
+ <div className="flex absolute inset-0 items-center">
<div className="w-full border-t border-blue-100" />
</div>
- <div className="relative flex justify-center">
- <span className="bg-white px-2 text-gray-500 rounded-xl text-xs">
+ <div className="flex relative justify-center">
+ <span className="px-2 text-xs rounded-xl bg-gray-1 text-gray-1">
Or
</span>
</div>
@@ -141,11 +141,11 @@ export const AuthOverlay: React.FC<AuthOverlayProps> = ({
onChange={(e) => {
setEmail(e.target.value);
}}
- className="block w-full appearance-none rounded-full border border-gray-300 px-3 h-12 placeholder-gray-400 shadow-sm focus:border-black focus:outline-none focus:ring-black text-lg"
+ className="block px-3 w-full h-12 text-lg placeholder-gray-400 rounded-full border border-gray-300 shadow-sm appearance-none focus:border-black focus:outline-none focus:ring-black"
/>
{NODE_ENV === "development" && (
- <div className="py-3 px-6 flex items-center justify-center bg-red-600 rounded-xl mt-3">
- <p className="text-white text-lg">
+ <div className="flex justify-center items-center px-6 py-3 mt-3 bg-red-600 rounded-xl">
+ <p className="text-lg text-white">
<span className="font-bold text-white">
Development mode:
</span>{" "}
@@ -167,13 +167,13 @@ export const AuthOverlay: React.FC<AuthOverlayProps> = ({
: "Email sent to your inbox"
: "Continue with Email"}
</Button>
- <p className="text-xs text-gray-500 pt-2">
+ <p className="pt-2 text-xs text-gray-1">
By typing your email and clicking continue, you acknowledge that
you have both read and agree to Cap's{" "}
<a
href="/terms"
target="_blank"
- className="text-gray-600 font-semibold text-xs"
+ className="text-xs font-semibold text-gray-600"
>
Terms of Service
</a>{" "}
@@ -181,7 +181,7 @@ export const AuthOverlay: React.FC<AuthOverlayProps> = ({
<a
href="/privacy"
target="_blank"
- className="text-gray-600 font-semibold text-xs"
+ className="text-xs font-semibold text-gray-600"
>
Privacy Policy
</a>
@@ -193,7 +193,7 @@ export const AuthOverlay: React.FC<AuthOverlayProps> = ({
{emailSent && (
<div>
<button
- className="mt-5 text-sm text-gray-500 underline hover:text-black"
+ className="mt-5 text-sm underline text-gray-1 hover:text-black"
onClick={() => {
setEmailSent(false);
setEmail("");
diff --git a/apps/web/app/s/[videoId]/_components/ShareHeader.tsx b/apps/web/app/s/[videoId]/_components/ShareHeader.tsx
index fd0b752c4..cf5da85b2 100644
--- a/apps/web/app/s/[videoId]/_components/ShareHeader.tsx
+++ b/apps/web/app/s/[videoId]/_components/ShareHeader.tsx
@@ -1,15 +1,15 @@
-import { Button } from "@cap/ui";
+import { editTitle } from "@/actions/videos/edit-title";
+import { UpgradeModal } from "@/components/UpgradeModal";
+import { userSelectProps } from "@cap/database/auth/session";
import { videos } from "@cap/database/schema";
+import { clientEnv, NODE_ENV } from "@cap/env";
+import { Button } from "@cap/ui";
+import { isUserOnProPlan } from "@cap/utils";
+import { Copy, Globe2 } from "lucide-react";
import moment from "moment";
-import { userSelectProps } from "@cap/database/auth/session";
import { useRouter } from "next/navigation";
import { useState } from "react";
import { toast } from "react-hot-toast";
-import { Copy, Globe2 } from "lucide-react";
-import { clientEnv, NODE_ENV } from "@cap/env";
-import { editTitle } from "@/actions/videos/edit-title";
-import { isUserOnProPlan } from "@cap/utils";
-import { UpgradeModal } from "@/components/UpgradeModal";
export const ShareHeader = ({
data,
@@ -75,8 +75,8 @@ export const ShareHeader = ({
return (
<>
<div>
- <div className="md:flex md:items-center md:justify-between space-x-0 md:space-x-6">
- <div className="md:flex items-center md:justify-between md:space-x-6">
+ <div className="space-x-0 md:flex md:items-center md:justify-between md:space-x-6">
+ <div className="items-center md:flex md:justify-between md:space-x-6">
<div className="mb-3 md:mb-0">
<div className="flex items-center space-x-3 lg:min-w-[400px]">
{isEditing ? (
@@ -86,7 +86,7 @@ export const ShareHeader = ({
onBlur={handleBlur}
onKeyDown={handleKeyDown}
autoFocus
- className="text-xl sm:text-2xl font-semibold w-full"
+ className="w-full text-xl font-semibold sm:text-2xl"
/>
) : (
<h1
@@ -104,7 +104,7 @@ export const ShareHeader = ({
</h1>
)}
</div>
- <p className="text-gray-400 text-sm">
+ <p className="text-sm text-gray-8">
{moment(data.createdAt).fromNow()}
</p>
</div>
@@ -120,14 +120,14 @@ export const ShareHeader = ({
}}
>
{getDisplayLink()}
- <Copy className="ml-2 h-4 w-4" />
+ <Copy className="ml-2 w-4 h-4" />
</Button>
{user !== null && !isUserPro && (
<button
- className="cursor-pointer flex items-center text-sm text-gray-400 hover:text-blue-500 mt-1"
+ className="flex items-center mt-1 text-sm text-gray-400 cursor-pointer hover:text-blue-500"
onClick={() => setUpgradeModalOpen(true)}
>
- <Globe2 className="w-4 h-4 mr-1" />
+ <Globe2 className="mr-1 w-4 h-4" />
Connect a custom domain
</button>
)}
@@ -139,7 +139,7 @@ export const ShareHeader = ({
push(`${clientEnv.NEXT_PUBLIC_WEB_URL}/dashboard`);
}}
>
- <span className="hidden lg:block text-white text-sm">
+ <span className="hidden text-sm text-white lg:block">
Go to
</span>{" "}
Dashboard
diff --git a/apps/web/app/s/[videoId]/_components/ShareVideo.tsx b/apps/web/app/s/[videoId]/_components/ShareVideo.tsx
index 6f6f5e966..7acdeafd3 100644
--- a/apps/web/app/s/[videoId]/_components/ShareVideo.tsx
+++ b/apps/web/app/s/[videoId]/_components/ShareVideo.tsx
@@ -1248,14 +1248,14 @@ export const ShareVideo = forwardRef<
})}
</div>
)}
- <div className="absolute top-2.5 w-full h-1 sm:h-1.5 bg-white bg-opacity-50 rounded-full z-10" />
+ <div className="absolute top-2.5 w-full h-1 sm:h-1.5 bg-gray-1 bg-opacity-50 rounded-full z-10" />
<div
- className="absolute top-2.5 h-1 sm:h-1.5 bg-white rounded-full cursor-pointer z-10"
+ className="absolute top-2.5 h-1 sm:h-1.5 bg-gray-1 rounded-full cursor-pointer z-10"
style={{ width: `${watchedPercentage}%` }}
/>
<div
className={clsx(
- "drag-button absolute top-2.5 z-20 -mt-1.5 -ml-2 w-4 h-4 bg-white rounded-full cursor-pointer focus:outline-none",
+ "drag-button absolute top-2.5 z-20 -mt-1.5 -ml-2 w-4 h-4 bg-gray-1 rounded-full cursor-pointer focus:outline-none",
seeking
? "scale-125 transition-transform ring-blue-300 ring-offset-2 ring-2"
: ""
diff --git a/apps/web/app/s/[videoId]/_components/Sidebar.tsx b/apps/web/app/s/[videoId]/_components/Sidebar.tsx
index 58b267d81..a9a065b72 100644
--- a/apps/web/app/s/[videoId]/_components/Sidebar.tsx
+++ b/apps/web/app/s/[videoId]/_components/Sidebar.tsx
@@ -1,13 +1,13 @@
"use client";
-import { useState } from "react";
-import { Activity } from "./tabs/Activity";
-import { Transcript } from "./tabs/Transcript";
-import { Settings } from "./tabs/Settings";
-import { comments as commentsSchema, videos } from "@cap/database/schema";
import { userSelectProps } from "@cap/database/auth/session";
+import { comments as commentsSchema, videos } from "@cap/database/schema";
import { classNames } from "@cap/utils";
import { AnimatePresence, motion } from "framer-motion";
+import { useState } from "react";
+import { Activity } from "./tabs/Activity";
+import { Settings } from "./tabs/Settings";
+import { Transcript } from "./tabs/Transcript";
type TabType = "activity" | "transcript" | "settings";
@@ -123,14 +123,14 @@ export const Sidebar: React.FC<SidebarProps> = ({
}
className={classNames(
"flex-1 px-6 py-3 text-sm font-medium relative transition-colors duration-200",
- "hover:bg-gray-100",
- activeTab === tab.id ? "bg-gray-100" : ""
+ "hover:bg-gray-1",
+ activeTab === tab.id ? "bg-gray-1" : ""
)}
>
<span
className={classNames(
"relative z-10",
- activeTab === tab.id ? "text-gray-500" : "text-gray-400"
+ activeTab === tab.id ? "text-gray-1" : "text-gray-8"
)}
>
{tab.label}
diff --git a/apps/web/app/s/[videoId]/_components/Toolbar.tsx b/apps/web/app/s/[videoId]/_components/Toolbar.tsx
index 7a981e488..093a9363b 100644
--- a/apps/web/app/s/[videoId]/_components/Toolbar.tsx
+++ b/apps/web/app/s/[videoId]/_components/Toolbar.tsx
@@ -1,13 +1,12 @@
"use client";
-import { useEffect, useRef, useState } from "react";
-import { MessageSquare } from "lucide-react";
-import { videos } from "@cap/database/schema";
import { userSelectProps } from "@cap/database/auth/session";
-import { useRouter } from "next/navigation";
+import { videos } from "@cap/database/schema";
+import { clientEnv } from "@cap/env";
import { Button } from "@cap/ui";
+import { useRouter } from "next/navigation";
+import { useEffect, useRef, useState } from "react";
import toast from "react-hot-toast";
import { AuthOverlay } from "./AuthOverlay";
-import { clientEnv } from "@cap/env";
// million-ignore
export const Toolbar = ({
@@ -151,7 +150,7 @@ export const Toolbar = ({
const Emoji = ({ label, emoji }: { label: string; emoji: string }) => (
<div className="relative w-fit">
<button
- className="font-emoji text-xl sm:text-2xl leading-6 bg-transparent p-1 relative transition-bg-color duration-600 inline-flex justify-center items-center align-middle rounded-full ease-in-out hover:bg-gray-200 active:bg-gray-400 active:duration-0"
+ className="inline-flex relative justify-center items-center p-1 text-xl leading-6 align-middle bg-transparent rounded-full ease-in-out font-emoji sm:text-2xl transition-bg-color duration-600 hover:bg-gray-200 active:bg-gray-400 active:duration-0"
role="img"
aria-label={label ? label : ""}
aria-hidden={label ? "false" : "true"}
@@ -161,7 +160,7 @@ export const Toolbar = ({
{currentEmoji && currentEmoji.emoji === emoji && (
<span
key={currentEmoji.id}
- className="font-emoji absolute -top-10 left-0 right-0 mx-auto animate-flyEmoji duration-3000"
+ className="absolute right-0 left-0 -top-10 mx-auto font-emoji animate-flyEmoji duration-3000"
>
{currentEmoji.emoji}
</span>
@@ -228,14 +227,14 @@ export const Toolbar = ({
<div className="flex">
<div className="flex-grow p-1">
{commentBoxOpen === true ? (
- <div className="w-full flex items-center justify-between">
+ <div className="flex justify-between items-center w-full">
<input
autoFocus
type="text"
value={comment}
onChange={(e) => setComment(e.target.value)}
placeholder="Add a comment"
- className="flex-grow h-full outline-none px-3"
+ className="flex-grow px-3 h-full outline-none"
maxLength={255}
onKeyDown={(e) => {
if (e.key === "Enter") {
@@ -276,7 +275,7 @@ export const Toolbar = ({
</div>
</div>
) : (
- <div className="grid items-center justify-center grid-flow-col">
+ <div className="grid grid-flow-col justify-center items-center">
{REACTIONS.map((reaction) => (
<Emoji
key={reaction.emoji}
@@ -288,9 +287,9 @@ export const Toolbar = ({
<div className="flex items-center">
<button
onClick={handleCommentClick}
- className="font-medium bg-gray-200 py-1 px-3 relative transition-bg-color duration-600 flex justify-center items-center rounded-full ease-in-out hover:bg-gray-200 active:bg-gray-400 active:duration-0"
+ className="flex relative justify-center items-center px-3 py-1 font-medium bg-gray-200 rounded-full ease-in-out transition-bg-color duration-600 hover:bg-gray-200 active:bg-gray-400 active:duration-0"
>
- <span className="text-sm text-gray-500 font-medium">
+ <span className="text-sm font-medium text-gray-12">
Comment (c)
</span>
</button>
diff --git a/apps/web/app/s/[videoId]/_components/tabs/Activity.tsx b/apps/web/app/s/[videoId]/_components/tabs/Activity.tsx
index f5479ccb6..1a01c00a2 100644
--- a/apps/web/app/s/[videoId]/_components/tabs/Activity.tsx
+++ b/apps/web/app/s/[videoId]/_components/tabs/Activity.tsx
@@ -33,8 +33,8 @@ export const Avatar: React.FC<{
letterClass?: string;
}> = ({ name, className = "", letterClass = "text-xs" }) => {
const initial = name?.[0]?.toUpperCase() || "A";
- const bgColor = name ? "bg-gray-500" : "bg-gray-200";
- const textColor = name ? "text-white" : "text-gray-500";
+ const bgColor = name ? "bg-gray-12" : "bg-gray-6";
+ const textColor = name ? "text-gray-1" : "text-gray-12";
return (
<div
@@ -95,14 +95,14 @@ const CommentInput: React.FC<CommentInputProps> = ({
return (
<div className="flex items-start space-x-3">
<div className="flex-1">
- <div className="p-4 bg-gray-100 rounded-lg">
+ <div className="p-4 rounded-lg bg-gray-1">
<textarea
ref={inputRef}
value={content}
onChange={(e) => setContent(e.target.value)}
onKeyDown={handleKeyDown}
placeholder={placeholder || "Leave a comment"}
- className="w-full text-[15px] leading-[22px] text-gray-500 bg-transparent focus:outline-none"
+ className="w-full text-[15px] leading-[22px] text-gray-1 bg-transparent focus:outline-none"
/>
<div className="flex mt-2 space-x-2">
<button
@@ -114,7 +114,7 @@ const CommentInput: React.FC<CommentInputProps> = ({
{showCancelButton && onCancel && (
<button
onClick={onCancel}
- className="px-2 py-1.5 bg-gray-100 text-gray-700 text-xs font-medium rounded-full hover:bg-gray-200 focus:outline-none"
+ className="px-2 py-1.5 bg-gray-1 text-gray-700 text-xs font-medium rounded-full hover:bg-gray-200 focus:outline-none"
>
Cancel
</button>
@@ -223,7 +223,7 @@ const Comment: React.FC<{
{comment.authorName || "Anonymous"}
</span>
<span
- className="text-sm text-gray-500"
+ className="text-sm text-gray-1"
data-tooltip-id={`comment-${comment.id}-timestamp`}
data-tooltip-content={formatTimestamp(commentDate)}
>
@@ -244,7 +244,7 @@ const Comment: React.FC<{
{user && !isReplying && canReply && (
<button
onClick={() => onReply(comment.id)}
- className="text-sm text-gray-500 hover:text-gray-700"
+ className="text-sm text-gray-1 hover:text-gray-700"
>
Reply
</button>
@@ -318,8 +318,8 @@ const EmptyState = () => (
d="M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"
/>
</svg>
- <h3 className="text-sm font-medium text-gray-500">No comments yet</h3>
- <p className="text-sm text-gray-400">
+ <h3 className="text-sm font-medium text-gray-1">No comments yet</h3>
+ <p className="text-sm text-gray-8">
Be the first to share your thoughts!
</p>
</div>
@@ -592,7 +592,7 @@ export const Activity: React.FC<ActivityProps> = ({
)}
</div>
- <div className="flex-none p-4 bg-white border-t border-gray-200">
+ <div className="flex-none p-4 border-t border-gray-200 bg-gray-1">
{user ? (
<CommentInput
onSubmit={handleNewComment}
@@ -603,9 +603,9 @@ export const Activity: React.FC<ActivityProps> = ({
) : (
<div
onClick={() => setShowAuthOverlay(true)}
- className="p-4 bg-gray-100 rounded-lg transition-colors cursor-pointer hover:bg-gray-200"
+ className="p-4 rounded-lg transition-colors cursor-pointer bg-gray-1 hover:bg-gray-200"
>
- <span className="text-[15px] leading-[22px] text-gray-500">
+ <span className="text-[15px] leading-[22px] text-gray-1">
Sign in to leave a comment
</span>
</div>
diff --git a/apps/web/app/s/[videoId]/_components/tabs/Settings.tsx b/apps/web/app/s/[videoId]/_components/tabs/Settings.tsx
index a775f092c..d9d94d464 100644
--- a/apps/web/app/s/[videoId]/_components/tabs/Settings.tsx
+++ b/apps/web/app/s/[videoId]/_components/tabs/Settings.tsx
@@ -1,7 +1,7 @@
"use client";
-import { useState } from "react";
import { Switch } from "@cap/ui";
+import { useState } from "react";
interface SettingOption {
id: string;
@@ -48,18 +48,18 @@ export const Settings = () => {
<div className="p-4 border-b border-gray-200">
<h3 className="text-sm font-medium">Settings</h3>
</div>
- <div className="flex-1 overflow-y-auto">
- <div className="space-y-6 p-4">
+ <div className="overflow-y-auto flex-1">
+ <div className="p-4 space-y-6">
{settings.map((setting) => (
- <div key={setting.id} className="flex items-center justify-between">
+ <div key={setting.id} className="flex justify-between items-center">
<div className="flex-1">
- <div className="flex items-center justify-between">
+ <div className="flex justify-between items-center">
<div>
<h4 className="text-sm font-medium text-gray-900">
{setting.label}
</h4>
{setting.description && (
- <p className="text-sm text-gray-500">
+ <p className="text-sm text-gray-12">
{setting.description}
</p>
)}
diff --git a/apps/web/app/s/[videoId]/_components/tabs/Transcript.tsx b/apps/web/app/s/[videoId]/_components/tabs/Transcript.tsx
index 6e29e9841..2bac9d7ad 100644
--- a/apps/web/app/s/[videoId]/_components/tabs/Transcript.tsx
+++ b/apps/web/app/s/[videoId]/_components/tabs/Transcript.tsx
@@ -1,10 +1,10 @@
"use client";
import { videos } from "@cap/database/schema";
-import { useState, useEffect } from "react";
-import { MessageSquare } from "lucide-react";
-import { S3_BUCKET_URL } from "@cap/utils";
import { clientEnv } from "@cap/env";
+import { S3_BUCKET_URL } from "@cap/utils";
+import { MessageSquare } from "lucide-react";
+import { useEffect, useState } from "react";
interface TranscriptProps {
data: typeof videos.$inferSelect;
@@ -219,7 +219,7 @@ export const Transcript: React.FC<TranscriptProps> = ({ data, onSeek }) => {
if (isLoading) {
return (
- <div className="flex items-center justify-center h-full">
+ <div className="flex justify-center items-center h-full">
<svg
xmlns="http://www.w3.org/2000/svg"
className="w-8 h-8"
@@ -248,12 +248,12 @@ export const Transcript: React.FC<TranscriptProps> = ({ data, onSeek }) => {
if (isTranscriptionProcessing) {
return (
- <div className="flex items-center justify-center h-full text-gray-500">
+ <div className="flex justify-center items-center h-full text-gray-1">
<div className="text-center">
<div className="mb-3">
<svg
xmlns="http://www.w3.org/2000/svg"
- className="w-8 h-8 mx-auto"
+ className="mx-auto w-8 h-8"
viewBox="0 0 24 24"
>
<style>
@@ -282,10 +282,10 @@ export const Transcript: React.FC<TranscriptProps> = ({ data, onSeek }) => {
if (hasTimedOut || (!transcriptData.length && !isTranscriptionProcessing)) {
return (
- <div className="flex items-center justify-center h-full text-gray-500">
+ <div className="flex justify-center items-center h-full text-gray-1">
<div className="text-center">
- <MessageSquare className="w-8 h-8 mx-auto mb-2 text-gray-300" />
- <p className="text-sm text-gray-500 font-medium">
+ <MessageSquare className="mx-auto mb-2 w-8 h-8 text-gray-300" />
+ <p className="text-sm font-medium text-gray-1">
No transcript available
</p>
</div>
@@ -295,19 +295,17 @@ export const Transcript: React.FC<TranscriptProps> = ({ data, onSeek }) => {
return (
<div className="flex flex-col h-full">
- <div className="flex-1 overflow-y-auto">
- <div className="space-y-3 p-4">
+ <div className="overflow-y-auto flex-1">
+ <div className="p-4 space-y-3">
{transcriptData.map((entry) => (
<div
key={entry.id}
className={`group rounded-lg p-2 transition-colors cursor-pointer ${
- selectedEntry === entry.id ? "bg-blue-50" : "hover:bg-gray-100"
+ selectedEntry === entry.id ? "bg-blue-50" : "hover:bg-gray-1"
}`}
onClick={() => handleTranscriptClick(entry)}
>
- <div className="text-sm text-gray-500 mb-1">
- {entry.timestamp}
- </div>
+ <div className="mb-1 text-sm text-gray-1">{entry.timestamp}</div>
<div className="text-sm text-gray-900">{entry.text}</div>
</div>
))}
diff --git a/apps/web/app/s/loading.tsx b/apps/web/app/s/loading.tsx
index b86a17bb5..3d293fcf5 100644
--- a/apps/web/app/s/loading.tsx
+++ b/apps/web/app/s/loading.tsx
@@ -91,7 +91,7 @@ export default function Loading() {
{/* Footer placeholder */}
<div className="mt-auto py-4">
- <div className="flex items-center justify-center space-x-2 py-2 px-4 bg-gray-100 border border-gray-200 rounded-full mx-auto w-fit">
+ <div className="flex items-center justify-center space-x-2 py-2 px-4 bg-gray-1 border border-gray-200 rounded-full mx-auto w-fit">
<div className="w-20 h-4 bg-gray-200 rounded animate-pulse"></div>
<div className="w-14 h-6 bg-gray-200 rounded animate-pulse"></div>
</div>
diff --git a/apps/web/components/Footer.tsx b/apps/web/components/Footer.tsx
index 163860eb6..4bf6db6be 100644
--- a/apps/web/components/Footer.tsx
+++ b/apps/web/components/Footer.tsx
@@ -1,8 +1,8 @@
"use client";
-import { usePathname } from "next/navigation";
-import { Logo, LogoBadge } from "@cap/ui";
+import { Logo } from "@cap/ui";
import Link from "next/link";
+import { usePathname } from "next/navigation";
type FooterLink = {
label: string;
href: string;
@@ -111,26 +111,26 @@ export const Footer = () => {
<footer className="p-5">
<div
style={{ boxShadow: "0px 2px 8px rgba(18, 22, 31, 0.02)" }}
- className="mx-auto max-w-[1400px] bg-gray-100 border-[1px] border-gray-200 p-8 lg:p-12 rounded-[20px] mb-10 relative overflow-hidden"
+ className="mx-auto max-w-[1400px] bg-gray-1 border-[1px] border-gray-200 p-8 lg:p-12 rounded-[20px] mb-10 relative overflow-hidden"
>
- <div className="grid grid-cols-1 lg:grid-cols-12 gap-8 items-start justify-between z-10 relative">
+ <div className="grid relative z-10 grid-cols-1 gap-8 justify-between items-start lg:grid-cols-12">
{/* Logo Column */}
- <div className="space-y-2 sm:space-y-4 col-span-12 lg:col-span-5">
+ <div className="col-span-12 space-y-2 sm:space-y-4 lg:col-span-5">
<Logo className="w-[104px] h-auto" />
<div className="w-full">
- <p className="text-gray-500 max-w-sm">
+ <p className="max-w-sm text-gray-12">
Cap is the open source alternative to Loom. Lightweight,
powerful, and cross-platform. Record and share in seconds.
</p>
</div>
- <p className="text-gray-400">
+ <p className="text-gray-10">
© Cap Software, Inc. {new Date().getFullYear()}.
</p>
<div className="flex space-x-3">
- <a className="text-gray-400 text-sm" href="/terms">
+ <a className="text-sm text-gray-10" href="/terms">
Terms of Service
</a>
- <a className="text-gray-400 text-sm" href="/privacy">
+ <a className="text-sm text-gray-10" href="/privacy">
Privacy Policy
</a>
</div>
@@ -138,34 +138,38 @@ export const Footer = () => {
{/* Links Container Column */}
<div className="col-span-12 lg:col-span-7">
- <div className="grid grid-cols-1 xs:grid-cols-2 sm:grid-cols-3 gap-8">
+ <div className="grid grid-cols-1 gap-8 xs:grid-cols-2 sm:grid-cols-3">
{/* Product Column */}
<div className="space-y-4">
- <h3 className="text-lg font-semibold">Product</h3>
+ <h3 className="text-lg font-semibold text-gray-12">Product</h3>
<ul className="space-y-2">
{footerLinks.product.map((link, index) => (
<li key={index}>
- <a
+ <Link
+ className="text-gray-10"
href={link.href}
target={link.isExternal ? "_blank" : undefined}
>
{link.label}
- </a>
+ </Link>
</li>
))}
</ul>
<div className="pt-4">
- <h3 className="text-lg font-semibold">Additional Links</h3>
+ <h3 className="text-lg font-semibold text-gray-12">
+ Additional Links
+ </h3>
<ul className="grid grid-cols-1 gap-2 pt-2">
{footerLinks.additional.map((link, index) => (
<li key={index}>
- <a
+ <Link
+ className="text-gray-10"
href={link.href}
target={link.isExternal ? "_blank" : undefined}
>
{link.label}
- </a>
+ </Link>
</li>
))}
</ul>
@@ -177,27 +181,31 @@ export const Footer = () => {
<ul className="space-y-2">
{footerLinks.help.map((link, index) => (
<li key={index}>
- <a
+ <Link
+ className="text-gray-10"
href={link.href}
target={link.isExternal ? "_blank" : undefined}
>
{link.label}
- </a>
+ </Link>
</li>
))}
</ul>
<div className="pt-4">
- <h3 className="text-lg font-semibold">Use Cases</h3>
+ <h3 className="text-lg font-semibold text-gray-12">
+ Use Cases
+ </h3>
<ul className="grid grid-cols-1 gap-2 pt-2">
{footerLinks.useCases.map((link, index) => (
<li key={index}>
- <a
+ <Link
+ className="text-gray-10"
href={link.href}
target={link.isExternal ? "_blank" : undefined}
>
{link.label}
- </a>
+ </Link>
</li>
))}
</ul>
@@ -206,16 +214,17 @@ export const Footer = () => {
{/* Socials Column */}
<div className="space-y-4">
- <h3 className="text-lg font-semibold">Socials</h3>
+ <h3 className="text-lg font-semibold text-gray-12">Socials</h3>
<ul className="space-y-2">
{footerLinks.socials.map((link, index) => (
<li key={index}>
- <a
+ <Link
+ className="text-gray-10"
href={link.href}
target={link.isExternal ? "_blank" : undefined}
>
{link.label}
- </a>
+ </Link>
</li>
))}
</ul>
@@ -223,19 +232,20 @@ export const Footer = () => {
<div className="pt-4">
<Link
href="/tools"
- className="text-lg font-semibold text-gray-500"
+ className="text-lg font-semibold text-gray-12"
>
Tools
</Link>
<ul className="grid grid-cols-1 gap-2 pt-2">
{footerLinks.tools.map((link, index) => (
<li key={index}>
- <a
+ <Link
+ className="text-gray-10"
href={link.href}
target={link.isExternal ? "_blank" : undefined}
>
{link.label}
- </a>
+ </Link>
</li>
))}
</ul>
diff --git a/apps/web/components/Navbar.tsx b/apps/web/components/Navbar.tsx
index 30503d994..f669881c6 100644
--- a/apps/web/components/Navbar.tsx
+++ b/apps/web/components/Navbar.tsx
@@ -19,7 +19,6 @@ import { Menu, X } from "lucide-react";
import Link from "next/link";
import { usePathname } from "next/navigation";
import { useState } from "react";
-import { seoPages } from "../lib/seo-pages";
const Links = [
{
@@ -96,8 +95,6 @@ const Links = [
export const Navbar = ({ auth }: { auth: boolean }) => {
const pathname = usePathname();
- const isHomePage = pathname === "/";
- const isSeoPage = pathname.slice(1) in seoPages;
const [showMobileMenu, setShowMobileMenu] = useState(false);
if (
@@ -176,7 +173,7 @@ export const Navbar = ({ auth }: { auth: boolean }) => {
Github
</Button>
<Button
- variant="dark"
+ variant="darkgradient"
href={auth === false ? "/login" : "/dashboard"}
size="sm"
className="w-full font-medium sm:w-auto"
@@ -192,7 +189,7 @@ export const Navbar = ({ auth }: { auth: boolean }) => {
</div>
</div>
{showMobileMenu && (
- <div className="fixed top-0 left-0 w-full h-full px-4 bg-white z-[100000] overflow-auto">
+ <div className="fixed top-0 left-0 w-full h-full px-4 bg-gray-1 z-[100000] overflow-auto">
<div
className="bg-gradient-to-b from-white to-[rgba(255,255,255,0.3)]
pt-3 pb-12 sticky top-0 flex items-center justify-between"
diff --git a/apps/web/components/ReadyToGetStarted.tsx b/apps/web/components/ReadyToGetStarted.tsx
index 8d287f34e..5a99c867e 100644
--- a/apps/web/components/ReadyToGetStarted.tsx
+++ b/apps/web/components/ReadyToGetStarted.tsx
@@ -10,7 +10,7 @@ export function ReadyToGetStarted() {
>
<div
id="cloud-4"
- className="absolute top-0 -right-20 opacity-50 z-0 pointer-events-none"
+ className="absolute top-0 -right-20 z-0 opacity-50 pointer-events-none"
>
<img
className="max-w-[40vw] h-auto"
@@ -20,7 +20,7 @@ export function ReadyToGetStarted() {
</div>
<div
id="cloud-5"
- className="absolute bottom-0 left-0 opacity-50 z-0 pointer-events-none"
+ className="absolute bottom-0 left-0 z-0 opacity-50 pointer-events-none"
>
<img
className="max-w-[40vw] h-auto"
@@ -28,9 +28,9 @@ export function ReadyToGetStarted() {
alt="Footer Cloud Two"
/>
</div>
- <div className="wrapper mx-auto h-full flex flex-col justify-center items-center relative z-10">
+ <div className="flex relative z-10 flex-col justify-center items-center mx-auto h-full wrapper">
<div className="text-center max-w-[800px] mx-auto mb-8">
- <h2 className="text-xl sm:text-3xl text-white mb-3">
+ <h2 className="mb-3 text-xl text-white sm:text-3xl">
Beautiful screen recordings, owned by you.
</h2>
<p className="text-[1rem] sm:text-lg text-white">
@@ -39,7 +39,7 @@ export function ReadyToGetStarted() {
S3 bucket support.
</p>
</div>
- <div className="flex flex-col sm:flex-row items-center justify-center space-y-2 sm:space-y-0 sm:space-x-2">
+ <div className="flex flex-col justify-center items-center space-y-2 sm:flex-row sm:space-y-0 sm:space-x-2">
<Button
variant="white"
href="/pricing"
@@ -49,7 +49,7 @@ export function ReadyToGetStarted() {
Get Started
</Button>
<Button
- variant="secondary"
+ variant="primary"
href="/download"
size="lg"
className="w-full sm:w-auto"
diff --git a/apps/web/components/Tooltip.tsx b/apps/web/components/Tooltip.tsx
index 446454983..19d237208 100644
--- a/apps/web/components/Tooltip.tsx
+++ b/apps/web/components/Tooltip.tsx
@@ -29,7 +29,7 @@ const Tooltip = ({
<TooltipPrimitive.Content
side={position}
className={classNames(
- "select-none rounded-lg z-[60] flex items-center gap-2 TooltipContent bg-gray-50 border border-gray-200 px-3 py-2 text-xs leading-none shadow-sm shadow-gray-300/50 data-[state=delayed-open]:data-[side=bottom]:animate-slideUpAndFade data-[state=delayed-open]:data-[side=left]:animate-slideRightAndFade data-[state=delayed-open]:data-[side=right]:animate-slideLeftAndFade data-[state=delayed-open]:data-[side=top]:animate-slideDownAndFade",
+ "select-none rounded-lg z-[60] text-gray-12 flex items-center gap-2 TooltipContent bg-gray-2 border border-gray-3 px-3 py-2 text-xs leading-none shadow-sm shadow-gray-3/50 data-[state=delayed-open]:data-[side=bottom]:animate-slideUpAndFade data-[state=delayed-open]:data-[side=left]:animate-slideRightAndFade data-[state=delayed-open]:data-[side=right]:animate-slideLeftAndFade data-[state=delayed-open]:data-[side=top]:animate-slideDownAndFade",
className
)}
sideOffset={5}
@@ -39,10 +39,10 @@ const Tooltip = ({
<div className="flex gap-1 items-center">
{kbd.map((key, index) => (
<div
- className="flex justify-center items-center px-1 bg-gray-100 rounded-md border border-gray-300 shadow-sm size-5 min-w-fit shadow-gray-300/50"
+ className="flex justify-center items-center px-1 rounded-md border shadow-sm bg-gray-3 border-gray-4 size-5 min-w-fit shadow-gray-3/50"
key={index}
>
- <kbd className="text-[11px] text-gray-400">{key}</kbd>
+ <kbd className="text-[11px] text-gray-10">{key}</kbd>
</div>
))}
</div>
diff --git a/apps/web/components/UpgradeModal.tsx b/apps/web/components/UpgradeModal.tsx
index fb7c28fb2..05e0390cb 100644
--- a/apps/web/components/UpgradeModal.tsx
+++ b/apps/web/components/UpgradeModal.tsx
@@ -1,27 +1,26 @@
"use client";
-import { useState } from "react";
import { Button, Dialog, DialogContent, DialogTitle, Switch } from "@cap/ui";
+import { getProPlanId } from "@cap/utils";
+import { useRive } from "@rive-app/react-canvas";
+import { AnimatePresence, motion } from "framer-motion";
import {
- Share2,
+ BarChart3,
Database,
- Shield,
- Users,
+ Globe,
+ Headphones,
Infinity,
Lock,
- BarChart3,
- Headphones,
- X,
Minus,
Plus,
- Globe,
+ Share2,
+ Shield,
Sparkles,
+ Users,
} from "lucide-react";
-import { getProPlanId } from "@cap/utils";
import { useRouter } from "next/navigation";
+import { useState } from "react";
import toast from "react-hot-toast";
-import { useRive } from "@rive-app/react-canvas";
-import { AnimatePresence, motion } from "framer-motion";
interface UpgradeModalProps {
open: boolean;
@@ -166,7 +165,7 @@ export const UpgradeModal = ({ open, onOpenChange }: UpgradeModalProps) => {
return (
<Dialog open={open} onOpenChange={onOpenChange}>
- <DialogContent className="sm:max-w-[650px] max-h-[90vh] overflow-y-auto p-6">
+ <DialogContent className="sm:max-w-[650px] bg-gray-2 border border-gray-4 max-h-[90vh] overflow-y-auto p-6">
<AnimatePresence mode="wait">
{open && (
<motion.div
@@ -183,22 +182,24 @@ export const UpgradeModal = ({ open, onOpenChange }: UpgradeModalProps) => {
<div className="flex flex-col items-center py-6">
<div className="flex flex-col items-center">
<Pro
- className="w-[100px] h-[80px]"
+ className="w-[250px] h-[120px]"
onMouseEnter={handleProHover}
/>
- <h1 className="text-3xl font-bold mb-3">
+ <h1 className="text-3xl font-bold text-gray-12">
Upgrade to Cap Pro
</h1>
</div>
- <p className="text-lg text-gray-600 mb-1">
+ <p className="mt-1 text-lg text-gray-11">
You can cancel anytime. Early adopter pricing locked in.
</p>
<div className="flex flex-col items-center mt-3 mb-4 w-full">
<div className="flex items-end mb-1">
- <h3 className="text-3xl font-bold">${totalPrice}/mo</h3>
- <span className="text-gray-500 ml-2 mb-1">
+ <h3 className="text-3xl font-medium text-gray-12">
+ ${totalPrice}/mo
+ </h3>
+ <span className="mb-1 ml-2 text-gray-11">
{proQuantity === 1 ? (
`per user, ${billingText}`
) : (
@@ -210,9 +211,9 @@ export const UpgradeModal = ({ open, onOpenChange }: UpgradeModalProps) => {
</span>
</div>
- <div className="flex justify-between items-center w-full max-w-md mt-4">
+ <div className="flex justify-between items-center mt-8 w-full max-w-md">
<div className="flex items-center">
- <span className="mr-3 text-gray-500">Annual billing</span>
+ <span className="mr-3 text-gray-12">Annual billing</span>
<Switch
checked={isAnnual}
onCheckedChange={() => setIsAnnual(!isAnnual)}
@@ -220,25 +221,25 @@ export const UpgradeModal = ({ open, onOpenChange }: UpgradeModalProps) => {
</div>
<div className="flex items-center">
- <span className="mr-3 text-gray-500">Users:</span>
+ <span className="mr-3 text-gray-12">Users:</span>
<div className="flex items-center">
<button
onClick={() =>
proQuantity > 1 && setProQuantity(proQuantity - 1)
}
- className="h-8 w-8 rounded-l-md bg-gray-100 flex items-center justify-center hover:bg-gray-200"
+ className="flex justify-center items-center w-8 h-8 rounded-l-md bg-gray-4 hover:bg-gray-5"
disabled={proQuantity <= 1}
>
- <Minus className="h-4 w-4" />
+ <Minus className="w-4 h-4 text-gray-12" />
</button>
- <div className="h-8 w-10 flex items-center justify-center bg-gray-100">
+ <div className="flex justify-center items-center w-10 h-8 text-gray-12 bg-gray-3">
{proQuantity}
</div>
<button
onClick={() => setProQuantity(proQuantity + 1)}
- className="h-8 w-8 rounded-r-md bg-gray-100 flex items-center justify-center hover:bg-gray-200"
+ className="flex justify-center items-center w-8 h-8 rounded-r-md bg-gray-4 hover:bg-gray-5"
>
- <Plus className="h-4 w-4" />
+ <Plus className="w-4 h-4 text-gray-12" />
</button>
</div>
</div>
@@ -248,26 +249,26 @@ export const UpgradeModal = ({ open, onOpenChange }: UpgradeModalProps) => {
<Button
variant="primary"
onClick={planCheckout}
- className="w-full max-w-md text-lg h-14 rounded-xl"
+ className="w-full max-w-md h-14 text-lg rounded-xl"
disabled={proLoading}
>
{proLoading ? "Loading..." : "Upgrade to Cap Pro"}
</Button>
</div>
- <div className="pt-8 mt-4 border-t border-gray-200">
- <h2 className="text-2xl font-bold text-center mb-10">
+ <div className="pt-8 mt-4 border-t border-gray-5">
+ <h2 className="mb-10 text-2xl font-bold text-center text-gray-12">
Here's what's included
</h2>
- <div className="grid grid-cols-1 md:grid-cols-2 gap-x-10 gap-y-12">
+ <div className="grid grid-cols-1 gap-x-10 gap-y-12 md:grid-cols-2">
{proFeatures.map((feature, index) => (
<div key={index} className="flex flex-col items-center">
<div className="mb-3">{feature.icon}</div>
- <h3 className="text-lg font-bold mb-1">
+ <h3 className="mb-1 text-lg font-medium text-gray-12">
{feature.title}
</h3>
- <p className="text-gray-600 text-center">
+ <p className="text-center text-gray-11">
{feature.description}
</p>
</div>
diff --git a/apps/web/components/VideoThumbnail.tsx b/apps/web/components/VideoThumbnail.tsx
index 54f381768..cf3291275 100644
--- a/apps/web/components/VideoThumbnail.tsx
+++ b/apps/web/components/VideoThumbnail.tsx
@@ -49,7 +49,7 @@ export const VideoThumbnail: React.FC<VideoThumbnailProps> = memo(
return (
<div
- className={`overflow-hidden relative mx-auto w-full bg-black rounded-t-xl max-h-[175px] aspect-video`}
+ className={`overflow-hidden relative mx-auto w-full bg-black rounded-t-xl border-b border-gray-3 max-h-[175px] aspect-video`}
>
<div className="flex absolute top-0 left-0 z-10 justify-center items-center w-full h-full">
{failed ? (
diff --git a/apps/web/components/blog/BlogTemplate.tsx b/apps/web/components/blog/BlogTemplate.tsx
index 329ac66ff..ac9a27f6a 100644
--- a/apps/web/components/blog/BlogTemplate.tsx
+++ b/apps/web/components/blog/BlogTemplate.tsx
@@ -1,10 +1,10 @@
"use client";
import { Button } from "@cap/ui";
+import MuxPlayer from "@mux/mux-player-react";
import Link from "next/link";
-import { formatDate } from "../../lib/utils";
import { useEffect } from "react";
-import MuxPlayer from "@mux/mux-player-react";
+import { formatDate } from "../../lib/utils";
interface BlogPost {
title: string;
@@ -131,7 +131,7 @@ export const BlogTemplate = ({ content }: { content: BlogPost }) => {
<p className="text-xl md:text-2xl mb-8 max-w-3xl mx-auto text-gray-700 fade-in-down animate-delay-1">
{content.description}
</p>
- <div className="flex items-center justify-center space-x-2 text-sm text-gray-500 fade-in-down animate-delay-2">
+ <div className="flex items-center justify-center space-x-2 text-sm text-gray-1 fade-in-down animate-delay-2">
<time dateTime={content.publishedAt}>
{formatDate(content.publishedAt)}
</time>
@@ -196,7 +196,7 @@ export const BlogTemplate = ({ content }: { content: BlogPost }) => {
{content.comparisonTable.rows.map((row, rowIndex) => (
<tr
key={rowIndex}
- className={rowIndex % 2 === 0 ? "bg-white" : "bg-gray-50"}
+ className={rowIndex % 2 === 0 ? "bg-gray-1" : "bg-gray-50"}
>
{row.map((cell, cellIndex) => (
<td
@@ -226,7 +226,7 @@ export const BlogTemplate = ({ content }: { content: BlogPost }) => {
{method.steps.map((step, stepIndex) => (
<div
key={stepIndex}
- className="mb-8 p-6 bg-white rounded-xl shadow-md hover:shadow-xl transition-all duration-300 border border-gray-100 hover:border-blue-100 transform hover:-translate-y-1"
+ className="mb-8 p-6 bg-gray-1 rounded-xl shadow-md hover:shadow-xl transition-all duration-300 border border-gray-100 hover:border-blue-100 transform hover:-translate-y-1"
>
{step.title && (
<h3 className="text-2xl font-semibold text-gray-800 mb-4">
@@ -253,7 +253,7 @@ export const BlogTemplate = ({ content }: { content: BlogPost }) => {
{content.troubleshooting.items.map((item, index) => (
<details
key={index}
- className="bg-white p-6 rounded-xl shadow-md hover:shadow-xl transition-all duration-300 border border-gray-100 hover:border-blue-100"
+ className="bg-gray-1 p-6 rounded-xl shadow-md hover:shadow-xl transition-all duration-300 border border-gray-100 hover:border-blue-100"
>
<summary className="text-xl font-semibold text-gray-800 cursor-pointer">
{item.question}
@@ -320,7 +320,7 @@ export const BlogTemplate = ({ content }: { content: BlogPost }) => {
{content.faqs.map((faq, index) => (
<details
key={index}
- className="bg-white p-6 rounded-xl shadow-md hover:shadow-xl transition-all duration-300 border border-gray-100 hover:border-blue-100"
+ className="bg-gray-1 p-6 rounded-xl shadow-md hover:shadow-xl transition-all duration-300 border border-gray-100 hover:border-blue-100"
>
<summary className="text-xl font-semibold text-gray-800 cursor-pointer">
{faq.question}
@@ -340,7 +340,7 @@ export const BlogTemplate = ({ content }: { content: BlogPost }) => {
<span className="absolute -bottom-2 left-1/2 transform -translate-x-1/2 w-20 h-1 bg-blue-500 rounded-full"></span>
</h2>
- <blockquote className="bg-white p-8 rounded-xl shadow-md hover:shadow-xl transition-all duration-300 border-l-4 border-blue-500 transform hover:-translate-y-1">
+ <blockquote className="bg-gray-1 p-8 rounded-xl shadow-md hover:shadow-xl transition-all duration-300 border-l-4 border-blue-500 transform hover:-translate-y-1">
<p className="text-xl italic text-gray-700 mb-6">
"{content.testimonial.quote}"
</p>
diff --git a/apps/web/components/pages/AboutPage.tsx b/apps/web/components/pages/AboutPage.tsx
index 8c5ae23be..655eb8f3b 100644
--- a/apps/web/components/pages/AboutPage.tsx
+++ b/apps/web/components/pages/AboutPage.tsx
@@ -1,7 +1,6 @@
"use client";
import { Button } from "@cap/ui";
-import { useEffect } from "react";
import MuxPlayer from "@mux/mux-player-react";
export const AboutPage = () => {
@@ -44,7 +43,7 @@ export const AboutPage = () => {
See it in Action
</Button>
<Button
- variant="radialblue"
+ variant="primary"
href="/download"
size="lg"
className="relative z-[20] w-full font-medium text-md sm:w-auto"
@@ -60,10 +59,10 @@ export const AboutPage = () => {
</div>
{/* Main Content */}
- <div className="wrapper py-24 bg-gradient-to-b from-white to-gray-50">
+ <div className="wrapper pb-24">
<div className="max-w-4xl mx-auto">
- <div className="p-8 bg-white rounded-2xl border border-gray-100/60 backdrop-blur-sm mb-12 shadow-[0_0_15px_rgba(0,0,0,0.03)] hover:shadow-[0_5px_30px_rgba(0,0,0,0.05)] transition-all duration-300">
- <p className="text-lg">
+ <div className="mb-48">
+ <p className="text-3xl text-center font-light">
Your recordings shouldn't be locked away in systems you don't
control. At Cap, we're building a screen recording tool that
puts you first, respects your privacy, and gives you full
@@ -91,7 +90,7 @@ export const AboutPage = () => {
</div>
<div className="space-y-8">
- <div className="p-8 bg-white rounded-2xl border border-gray-100/60 backdrop-blur-sm shadow-[0_0_15px_rgba(0,0,0,0.03)] hover:shadow-[0_5px_30px_rgba(0,0,0,0.05)] hover:border-blue-100/40 transition-all duration-300 transform hover:-translate-y-[2px]">
+ <div className="p-8 bg-gray-1 rounded-2xl border border-gray-4 backdrop-blur-sm shadow-[0_0_15px_rgba(0,0,0,0.03)] hover:shadow-[0_5px_30px_rgba(0,0,0,0.05)] transition-all duration-300 transform hover:-translate-y-[2px]">
<h2 className="text-2xl font-semibold mb-4 text-gray-800">
Why Cap?
</h2>
@@ -104,7 +103,7 @@ export const AboutPage = () => {
</div>
<div className="grid grid-cols-1 md:grid-cols-2 gap-8">
- <div className="p-8 bg-white rounded-2xl border border-gray-100/60 backdrop-blur-sm shadow-[0_0_15px_rgba(0,0,0,0.03)] hover:shadow-[0_5px_30px_rgba(0,0,0,0.05)] hover:border-blue-100/40 transition-all duration-300 transform hover:-translate-y-[2px]">
+ <div className="p-8 bg-gray-1 rounded-2xl border border-gray-4 backdrop-blur-sm shadow-[0_0_15px_rgba(0,0,0,0.03)] hover:shadow-[0_5px_30px_rgba(0,0,0,0.05)] transition-all duration-300 transform hover:-translate-y-[2px]">
<div className="bg-blue-50 w-12 h-12 flex items-center justify-center rounded-full mb-4">
<span className="text-blue-500 text-xl font-bold">1</span>
</div>
@@ -120,7 +119,7 @@ export const AboutPage = () => {
</p>
</div>
- <div className="p-8 bg-white rounded-2xl border border-gray-100/60 backdrop-blur-sm shadow-[0_0_15px_rgba(0,0,0,0.03)] hover:shadow-[0_5px_30px_rgba(0,0,0,0.05)] hover:border-blue-100/40 transition-all duration-300 transform hover:-translate-y-[2px]">
+ <div className="p-8 bg-gray-1 rounded-2xl border border-gray-4 backdrop-blur-sm shadow-[0_0_15px_rgba(0,0,0,0.03)] hover:shadow-[0_5px_30px_rgba(0,0,0,0.05)] transition-all duration-300 transform hover:-translate-y-[2px]">
<div className="bg-blue-50 w-12 h-12 flex items-center justify-center rounded-full mb-4">
<span className="text-blue-500 text-xl font-bold">2</span>
</div>
@@ -139,7 +138,7 @@ export const AboutPage = () => {
</div>
</div>
- <div className="p-8 bg-white rounded-2xl border border-gray-100/60 backdrop-blur-sm shadow-[0_0_15px_rgba(0,0,0,0.03)] hover:shadow-[0_5px_30px_rgba(0,0,0,0.05)] hover:border-blue-100/40 transition-all duration-300 transform hover:-translate-y-[2px]">
+ <div className="p-8 bg-gray-1 rounded-2xl border border-gray-4 backdrop-blur-sm shadow-[0_0_15px_rgba(0,0,0,0.03)] hover:shadow-[0_5px_30px_rgba(0,0,0,0.05)] transition-all duration-300 transform hover:-translate-y-[2px]">
<h2 className="text-2xl font-semibold mb-4 text-gray-800">
Two Ways to Record
</h2>
@@ -168,7 +167,7 @@ export const AboutPage = () => {
</div>
</div>
- <div className="p-8 bg-white rounded-2xl border border-gray-100/60 backdrop-blur-sm shadow-[0_0_15px_rgba(0,0,0,0.03)] hover:shadow-[0_5px_30px_rgba(0,0,0,0.05)] hover:border-blue-100/40 transition-all duration-300 transform hover:-translate-y-[2px]">
+ <div className="p-8 bg-gray-1 rounded-2xl border border-gray-4 backdrop-blur-sm shadow-[0_0_15px_rgba(0,0,0,0.03)] hover:shadow-[0_5px_30px_rgba(0,0,0,0.05)] transition-all duration-300 transform hover:-translate-y-[2px]">
<h2 className="text-2xl font-semibold mb-4 text-gray-800">
Privacy First
</h2>
@@ -180,7 +179,7 @@ export const AboutPage = () => {
</p>
</div>
- <div className="p-8 bg-white rounded-2xl border border-gray-100/60 backdrop-blur-sm shadow-[0_0_15px_rgba(0,0,0,0.03)] hover:shadow-[0_5px_30px_rgba(0,0,0,0.05)] hover:border-blue-100/40 transition-all duration-300 transform hover:-translate-y-[2px]">
+ <div className="p-8 bg-gray-1 rounded-2xl border border-gray-4 backdrop-blur-sm shadow-[0_0_15px_rgba(0,0,0,0.03)] hover:shadow-[0_5px_30px_rgba(0,0,0,0.05)]transition-all duration-300 transform hover:-translate-y-[2px]">
<h2 className="text-2xl font-semibold mb-4 text-gray-800">
Open to Everyone
</h2>
@@ -192,7 +191,7 @@ export const AboutPage = () => {
</p>
</div>
- <div className="p-8 bg-white rounded-2xl border border-gray-100/60 backdrop-blur-sm shadow-[0_0_15px_rgba(0,0,0,0.03)] hover:shadow-[0_5px_30px_rgba(0,0,0,0.05)] hover:border-blue-100/40 transition-all duration-300 transform hover:-translate-y-[2px]">
+ <div className="p-8 bg-gray-1 rounded-2xl border border-gray-4 backdrop-blur-sm shadow-[0_0_15px_rgba(0,0,0,0.03)] hover:shadow-[0_5px_30px_rgba(0,0,0,0.05)] transition-all duration-300 transform hover:-translate-y-[2px]">
<h2 className="text-2xl font-semibold mb-4 text-gray-800">
Join Us
</h2>
@@ -207,7 +206,7 @@ export const AboutPage = () => {
</p>
<div className="mt-6">
<Button
- className="inline-flex shadow-[0_4px_14px_rgba(0,0,0,0.1)] hover:shadow-[0_6px_20px_rgba(0,118,255,0.23)] transform hover:-translate-y-[2px] transition-all duration-300"
+ className="inline-flex transform hover:-translate-y-[2px] transition-all duration-300"
href="/download"
variant="primary"
size="lg"
diff --git a/apps/web/components/pages/DocsPage.tsx b/apps/web/components/pages/DocsPage.tsx
index 6180097cc..d8feb5b74 100644
--- a/apps/web/components/pages/DocsPage.tsx
+++ b/apps/web/components/pages/DocsPage.tsx
@@ -30,7 +30,7 @@ export const DocsPage = () => {
</div>
)}
<div className="p-10 space-y-4">
- <h2 className="text-xl text-gray-500 md:text-4xl">
+ <h2 className="text-xl text-gray-1 md:text-4xl">
{doc.metadata.title}
</h2>
<p className="text-gray-600">{doc.metadata.summary}</p>
@@ -39,7 +39,7 @@ export const DocsPage = () => {
doc.metadata.tags.split(", ").map((tag) => (
<p
key={tag}
- className="rounded-md bg-gray-200 font-medium px-2 py-0.5 text-sm text-gray-500"
+ className="rounded-md bg-gray-200 font-medium px-2 py-0.5 text-sm text-gray-1"
>
{tag}
</p>
diff --git a/apps/web/components/pages/DownloadPage.tsx b/apps/web/components/pages/DownloadPage.tsx
index 083206546..6abb54af5 100644
--- a/apps/web/components/pages/DownloadPage.tsx
+++ b/apps/web/components/pages/DownloadPage.tsx
@@ -22,7 +22,7 @@ export const DownloadPage = () => {
{/* Debug toggle button in top-right corner */}
<button
onClick={() => setShowDebug(!showDebug)}
- className="absolute top-4 right-4 px-2 py-1 text-xs text-gray-400 bg-gray-800 rounded hover:text-gray-300"
+ className="absolute top-4 right-4 px-2 py-1 text-xs text-gray-8 bg-gray-800 rounded hover:text-gray-300"
>
{showDebug ? "Hide Debug" : "Debug"}
</button>
@@ -59,7 +59,7 @@ export const DownloadPage = () => {
>
macOS (Apple Silicon)
</button>
- <div className="mt-2 text-xs text-gray-400">
+ <div className="mt-2 text-xs text-gray-8">
Current: {platform}{" "}
{platform === "macos" &&
(isIntel ? "(Intel)" : "(Apple Silicon)")}
@@ -87,7 +87,7 @@ export const DownloadPage = () => {
{getDownloadButtonText(platform, loading, isIntel)}
</Button>
- <div className="text-sm text-gray-400">
+ <div className="text-sm text-gray-8">
{getVersionText(platform)}
</div>
@@ -103,7 +103,7 @@ export const DownloadPage = () => {
className="mx-auto w-full rounded-md shadow-md"
style={{ maxWidth: "300px" }}
/>
- <p className="mt-2 text-sm text-gray-400">
+ <p className="mt-2 text-sm text-gray-8">
Whilst Cap for Windows is in early beta, after downloading and
running the app, follow the steps above to whitelist Cap on
your PC.
@@ -116,14 +116,14 @@ export const DownloadPage = () => {
<PlatformIcons />
<div className="pb-4 mt-6 fade-in-up animate-delay-2">
- <h3 className="mb-2 text-sm font-medium text-gray-400">
+ <h3 className="mb-2 text-sm font-medium text-gray-8">
Other download options:
</h3>
<div className="flex flex-col gap-3 justify-center items-center md:flex-row">
{platform !== "windows" && (
<a
href="/download/windows"
- className="text-sm text-gray-400 transition-all hover:underline"
+ className="text-sm text-gray-8 transition-all hover:underline"
>
Windows (Beta)
</a>
@@ -131,7 +131,7 @@ export const DownloadPage = () => {
{platform === "macos" && isIntel && (
<a
href="/download/apple-silicon"
- className="text-sm text-gray-400 transition-all hover:underline"
+ className="text-sm text-gray-8 transition-all hover:underline"
>
Apple Silicon
</a>
@@ -139,7 +139,7 @@ export const DownloadPage = () => {
{platform === "macos" && !isIntel && (
<a
href="/download/apple-intel"
- className="text-sm text-gray-400 transition-all hover:underline"
+ className="text-sm text-gray-8 transition-all hover:underline"
>
Apple Intel
</a>
@@ -148,13 +148,13 @@ export const DownloadPage = () => {
<>
<a
href="/download/apple-silicon"
- className="text-sm text-gray-400 transition-all hover:underline"
+ className="text-sm text-gray-8 transition-all hover:underline"
>
Apple Silicon
</a>
<a
href="/download/apple-intel"
- className="text-sm text-gray-400 transition-all hover:underline"
+ className="text-sm text-gray-8 transition-all hover:underline"
>
Apple Intel
</a>
@@ -164,39 +164,39 @@ export const DownloadPage = () => {
</div>
{/* Discreet SEO Links */}
- <div className="pt-8 mt-32 text-xs text-gray-500 border-t border-gray-200 opacity-70">
+ <div className="pt-8 mt-32 text-xs text-gray-1 border-t border-gray-200 opacity-70">
<div className="flex flex-wrap gap-y-2 gap-x-4 justify-center mx-auto max-w-lg">
<a
href="/screen-recorder"
- className="text-xs hover:text-gray-400 hover:underline"
+ className="text-xs hover:text-gray-8 hover:underline"
>
Screen Recorder
</a>
<span className="hidden md:inline">•</span>
<a
href="/free-screen-recorder"
- className="text-xs hover:text-gray-400 hover:underline"
+ className="text-xs hover:text-gray-8 hover:underline"
>
Free Screen Recorder
</a>
<span className="hidden md:inline">•</span>
<a
href="/screen-recorder-mac"
- className="text-xs hover:text-gray-400 hover:underline"
+ className="text-xs hover:text-gray-8 hover:underline"
>
Mac Screen Recorder
</a>
<span className="hidden md:inline">•</span>
<a
href="/screen-recorder-windows"
- className="text-xs hover:text-gray-400 hover:underline"
+ className="text-xs hover:text-gray-8 hover:underline"
>
Windows Screen Recorder
</a>
<span className="hidden md:inline">•</span>
<a
href="/screen-recording-software"
- className="text-xs hover:text-gray-400 hover:underline"
+ className="text-xs hover:text-gray-8 hover:underline"
>
Recording Software
</a>
diff --git a/apps/web/components/pages/HomePage/index.tsx b/apps/web/components/pages/HomePage/index.tsx
index c91fcf141..96a9b88fa 100644
--- a/apps/web/components/pages/HomePage/index.tsx
+++ b/apps/web/components/pages/HomePage/index.tsx
@@ -3,6 +3,7 @@
"use client";
import { ReadyToGetStarted } from "@/components/ReadyToGetStarted";
+import { Testimonials } from "@/components/ui/Testimonials";
import {
getDownloadButtonText,
getDownloadUrl,
@@ -23,7 +24,6 @@ import { LogoSection } from "../_components/LogoSection";
import { FeatureCard } from "../SelfHostingPage";
import LeftBlueHue from "./LeftBlueHue";
import PowerfulFeaturesSVG from "./PowerfulFeaturesSVG";
-import { Testimonials } from "@/components/ui/Testimonials";
export const HomePage = () => {
const [videoToggled, setVideoToggled] = useState(false);
const { platform, isIntel } = useDetectPlatform();
@@ -37,19 +37,19 @@ export const HomePage = () => {
<Link
href="https://x.com/richiemcilroy/status/1895526857807733018"
target="_blank"
- className="flex gap-3 transition-opacity duration-300
- hover:opacity-90 mb-[52px] items-center relative z-[20] px-4 py-2
- mx-auto bg-[#2e2e2e] rounded-full border w-fit border-zinc-200"
+ className="flex gap-3 transition-colors duration-300 shadow-sm
+ mb-[52px] items-center relative z-[20] px-3.5 py-1
+ mx-auto bg-gray-1 rounded-full border w-fit border-gray-5 hover:bg-gray-3"
>
- <p className="text-xs text-white sm:text-sm">
+ <p className="text-[13px] text-gray-12">
Launch Week Day 5:{" "}
- <span className="text-xs font-bold text-blue-100 sm:text-sm">
+ <span className="text-[13px] font-bold text-blue-9">
Self-host Cap
</span>
</p>
<FontAwesomeIcon
fontWeight="light"
- className="w-2 text-white"
+ className="w-2 text-gray-12"
icon={faAngleRight}
/>
</Link>
@@ -433,7 +433,7 @@ export const HomePage = () => {
</div>
</div>
</div>
- <div className="wrapper mb-32">
+ <div className="mb-32 wrapper">
<Testimonials
amount={10}
title="What our users say about Cap after hitting record"
@@ -471,7 +471,7 @@ const VideoModal = ({ setVideoToggled }: Props) => {
damping: 20,
}}
ref={ref}
- className="w-[calc(100%-20px)] max-w-[1000px] bg-white rounded-[16px] md:h-[700px] h-[300px]"
+ className="w-[calc(100%-20px)] max-w-[1000px] bg-gray-1 rounded-[16px] md:h-[700px] h-[300px]"
>
<MuxPlayer
playbackId="A6oZoUWVZjOIVZB6XnBMLagYnXE6xhDhp8Hcyky018hk"
diff --git a/apps/web/components/pages/PricingPage.tsx b/apps/web/components/pages/PricingPage.tsx
index c29c5842d..f5a7f4a85 100644
--- a/apps/web/components/pages/PricingPage.tsx
+++ b/apps/web/components/pages/PricingPage.tsx
@@ -10,6 +10,7 @@ import {
Switch,
} from "@cap/ui";
import { getProPlanId } from "@cap/utils";
+import clsx from "clsx";
import { Check } from "lucide-react";
import { useRouter, useSearchParams } from "next/navigation";
import { useEffect, useState } from "react";
@@ -26,7 +27,7 @@ const QuantityButton = ({
return (
<button
onClick={onClick}
- className="px-2 py-0 h-6 w-6 bg-gray-200 rounded-md hover:bg-gray-300 focus:outline-none focus:ring-2 focus:ring-gray-400 flex items-center justify-center"
+ className="flex justify-center items-center px-2 py-0 w-6 h-6 bg-gray-200 rounded-md hover:bg-gray-300 focus:outline-none focus:ring-2 focus:ring-gray-400"
>
{children}
</button>
@@ -223,20 +224,24 @@ export const PricingPage = () => {
<div className="py-12 mt-16 space-y-24 wrapper">
<div>
<div className="text-center">
- <div className={`mb-4 ${initialRender ? "fade-in-down" : ""}`}>
+ <div
+ className={clsx("mb-4", {
+ "fade-in-down animate-delay-1": initialRender,
+ })}
+ >
<SimplePlans />
</div>
<h1
- className={`text-4xl md:text-5xl ${
- initialRender ? "fade-in-down" : ""
- } mb-6`}
+ className={clsx("text-4xl md:text-5xl", {
+ "fade-in-down animate-delay-1 text-gray-12": initialRender,
+ })}
>
Early Adopter Pricing
</h1>
<p
- className={`max-w-[800px] mx-auto mb-8 ${
- initialRender ? "fade-in-down animate-delay-1" : ""
- }`}
+ className={clsx("mx-auto mt-3 mb-8 max-w-[800px]", {
+ "mt-4 fade-in-down animate-delay-1 text-gray-10": initialRender,
+ })}
>
Cap is currently in public beta, and we're offering special early
adopter pricing to our first users. This pricing will be locked in
@@ -246,9 +251,9 @@ export const PricingPage = () => {
<div className="grid grid-cols-1 gap-3 items-stretch md:grid-cols-2">
<Card
- className={`bg-gray-100 rounded-xl min-h-[600px] flex-grow ${
- initialRender ? "fade-in-down animate-delay-2" : ""
- }`}
+ className={clsx("flex-grow rounded-xl bg-gray-1 min-h-[600px]", {
+ "fade-in-down animate-delay-2": initialRender,
+ })}
>
<div className="space-y-4">
<CardHeader>
@@ -347,7 +352,7 @@ export const PricingPage = () => {
<div className="w-5 h-5 m-0 p-0 flex items-center border-[2px] border-green-500 justify-center rounded-full">
<Check className="w-3 h-3 stroke-[4px] stroke-green-500" />
</div>
- <span className="ml-1.5 font-bold text-gray-500">
+ <span className="ml-1.5 font-bold text-gray-12">
{item.text}
</span>
</li>
@@ -360,7 +365,7 @@ export const PricingPage = () => {
</Card>
<Card
- className={`bg-gray-100 rounded-xl min-h-[600px] flex-grow border-blue-500 border-4 ${
+ className={`bg-gray-1 rounded-xl min-h-[600px] flex-grow border-blue-500 border-4 ${
initialRender ? "fade-in-up animate-delay-2" : ""
}`}
>
@@ -459,7 +464,7 @@ export const PricingPage = () => {
<div className="w-5 h-5 m-0 p-0 flex items-center border-[2px] border-green-500 justify-center rounded-full">
<Check className="w-3 h-3 stroke-[4px] stroke-green-500" />
</div>
- <span className="ml-1.5 text-gray-500 font-bold">
+ <span className="ml-1.5 font-bold text-gray-12">
{item.text}
</span>
</li>
diff --git a/apps/web/components/pages/PrivacyPage.tsx b/apps/web/components/pages/PrivacyPage.tsx
index c3188bc15..be0b18a44 100644
--- a/apps/web/components/pages/PrivacyPage.tsx
+++ b/apps/web/components/pages/PrivacyPage.tsx
@@ -7,7 +7,7 @@ export const PrivacyPage = () => {
<h1 className=" text-3xl md:text-4xl fade-in-down animate-delay-1">
Privacy Policy
</h1>
- <p className="text-lg text-gray-400 max-w-lg mx-auto fade-in-down animate-delay-2">
+ <p className="text-lg text-gray-8 max-w-lg mx-auto fade-in-down animate-delay-2">
We've tried to make this privacy policy as simple and digestible as
possible. If you have any questions, please don't hesitate to reach
out to us.
diff --git a/apps/web/components/pages/SelfHostingPage.tsx b/apps/web/components/pages/SelfHostingPage.tsx
index e86449a57..2082b452b 100644
--- a/apps/web/components/pages/SelfHostingPage.tsx
+++ b/apps/web/components/pages/SelfHostingPage.tsx
@@ -30,7 +30,7 @@ export const FeatureCard: React.FC<FeatureCardProps> = ({
style={{
backgroundImage: `url(${bg})`,
}}
- className={`bg-[#FAFAFA]/50 rounded-[12px] p-8 pt-0 h-full backdrop-blur-md relative z-10 flex flex-col overflow-hidden ${className}`}
+ className={`bg-gray-2 rounded-xl border border-gray-4 p-8 pt-0 h-full backdrop-blur-md relative z-10 flex flex-col overflow-hidden ${className}`}
>
<img
src={imagePath}
diff --git a/apps/web/components/pages/TermsPage.tsx b/apps/web/components/pages/TermsPage.tsx
index 244e385a9..230f13958 100644
--- a/apps/web/components/pages/TermsPage.tsx
+++ b/apps/web/components/pages/TermsPage.tsx
@@ -7,7 +7,7 @@ export const TermsPage = () => {
<h1 className=" text-3xl md:text-4xl fade-in-down animate-delay-1">
Terms of Service
</h1>
- <p className="text-lg text-gray-400 max-w-lg mx-auto fade-in-down animate-delay-2">
+ <p className="text-lg text-gray-8 max-w-lg mx-auto fade-in-down animate-delay-2">
We've tried to make this terms of service policy as simple and
digestible as possible. If you have any questions, please don't
hesitate to reach out to us.
diff --git a/apps/web/components/pages/TestimonialsPage.tsx b/apps/web/components/pages/TestimonialsPage.tsx
index 39c4cf30a..aa27983d0 100644
--- a/apps/web/components/pages/TestimonialsPage.tsx
+++ b/apps/web/components/pages/TestimonialsPage.tsx
@@ -1,5 +1,6 @@
"use client";
+import { ReadyToGetStarted } from "../ReadyToGetStarted";
import { Testimonials } from "../ui/Testimonials";
interface TestimonialsPageProps {
@@ -8,12 +9,17 @@ interface TestimonialsPageProps {
export const TestimonialsPage = ({ amount }: TestimonialsPageProps) => {
return (
- <div className="py-28 wrapper">
- <Testimonials
- amount={amount}
- title="What our users say about Cap after hitting record"
- subtitle="Don't just take our word for it. Here's what our users are saying about their experience with Cap."
- />
- </div>
+ <>
+ <div className="py-28 wrapper">
+ <Testimonials
+ amount={amount}
+ title="What our users say about Cap after hitting record"
+ subtitle="Don't just take our word for it. Here's what our users are saying about their experience with Cap."
+ />
+ </div>
+ <div className="wrapper pb-28">
+ <ReadyToGetStarted />
+ </div>
+ </>
);
};
diff --git a/apps/web/components/pages/UpdatesPage.tsx b/apps/web/components/pages/UpdatesPage.tsx
index 9d504f9b4..b3a598599 100644
--- a/apps/web/components/pages/UpdatesPage.tsx
+++ b/apps/web/components/pages/UpdatesPage.tsx
@@ -1,7 +1,7 @@
-import Link from "next/link";
-import Image from "next/image";
+import { BlogPost, getBlogPosts, PostMetadata } from "@/utils/blog";
import { format, parseISO } from "date-fns";
-import { getBlogPosts, PostMetadata, BlogPost } from "@/utils/blog";
+import Image from "next/image";
+import Link from "next/link";
const FEATURED_SLUGS = ["handling-a-stripe-payment-attack", "cap-v03-launch"];
@@ -42,11 +42,11 @@ export const UpdatesPage = () => {
{featuredPosts.length > 0 && (
<div className="mb-6">
- <div className="grid grid-cols-1 md:grid-cols-2 gap-6">
+ <div className="grid grid-cols-1 gap-6 md:grid-cols-2">
{featuredPosts.map((post) => (
<article
key={post.slug}
- className="overflow-hidden w-full rounded-xl border border-gray-300 shadow-sm hover:shadow-md transition-shadow"
+ className="overflow-hidden w-full rounded-xl border transition-shadow border-gray-3 hover:shadow-md"
>
<Link href={`/blog/${post.slug}`}>
{post.metadata.image && (
@@ -57,25 +57,25 @@ export const UpdatesPage = () => {
height={400}
objectFit="cover"
alt={post.metadata.title}
- className="w-full h-48 object-cover"
+ className="object-cover w-full h-48"
/>
</div>
)}
<div className="p-6 space-y-3">
- <h3 className="text-xl font-semibold text-gray-500">
+ <h3 className="text-xl font-semibold text-gray-12">
{post.metadata.title}
</h3>
<div className="flex space-x-2 text-sm">
{"author" in post.metadata && (
<>
- <p className="text-gray-600">
+ <p className="text-gray-10">
by {(post.metadata as PostMetadata).author}
</p>
<span>{` • `}</span>
</>
)}
{"publishedAt" in post.metadata && (
- <p className="text-gray-600">
+ <p className="text-gray-10">
{format(
parseISO(
(post.metadata as PostMetadata).publishedAt
@@ -90,7 +90,7 @@ export const UpdatesPage = () => {
post.metadata.tags.split(", ").map((tag, index) => (
<p
key={index}
- className="rounded-md bg-gray-200 font-medium px-2 py-0.5 text-sm text-gray-500"
+ className="rounded-md bg-gray-3 font-medium px-2 py-0.5 text-sm text-gray-12"
>
{tag}
</p>
@@ -125,20 +125,20 @@ export const UpdatesPage = () => {
</div>
)}
<div className="p-10 space-y-4">
- <h2 className="text-xl text-gray-500 md:text-4xl">
+ <h2 className="text-xl text-gray-12 md:text-4xl">
{post.metadata.title}
</h2>
<div className="flex space-x-2">
{"author" in post.metadata && (
<>
- <p className="text-gray-600">
+ <p className="text-gray-10">
by {(post.metadata as PostMetadata).author}
</p>
<span>{` • `}</span>
</>
)}
{"publishedAt" in post.metadata && (
- <p className="text-gray-600">
+ <p className="text-gray-10">
{format(
parseISO((post.metadata as PostMetadata).publishedAt),
"MMMM dd, yyyy"
@@ -151,7 +151,7 @@ export const UpdatesPage = () => {
post.metadata.tags.split(", ").map((tag, index) => (
<p
key={index}
- className="rounded-md bg-gray-200 font-medium px-2 py-0.5 text-sm text-gray-500"
+ className="rounded-md bg-gray-3 font-medium px-2 py-0.5 text-sm text-gray-12"
>
{tag}
</p>
diff --git a/apps/web/components/seo/SeoPageTemplate.tsx b/apps/web/components/seo/SeoPageTemplate.tsx
index 9019cdc76..ad923a9a4 100644
--- a/apps/web/components/seo/SeoPageTemplate.tsx
+++ b/apps/web/components/seo/SeoPageTemplate.tsx
@@ -1,10 +1,10 @@
"use client";
-import { Button } from "@cap/ui";
import { SeoPageContent } from "@/components/seo/types";
-import { useEffect } from "react";
+import { Button } from "@cap/ui";
import MuxPlayer from "@mux/mux-player-react";
import { motion } from "framer-motion";
+import { useEffect } from "react";
const renderHTML = (content: string) => {
const styledContent = content.replace(
@@ -342,7 +342,7 @@ export const SeoPageTemplate = ({
{content.features.map((feature, index) => (
<div
key={index}
- className="p-8 bg-white rounded-2xl shadow-md hover:shadow-xl transition-all duration-300 border border-gray-100 hover:border-blue-100 transform hover:-translate-y-1"
+ className="p-8 bg-gray-1 rounded-2xl shadow-md hover:shadow-xl transition-all duration-300 border border-gray-100 hover:border-blue-100 transform hover:-translate-y-1"
>
<div className="bg-blue-50 w-12 h-12 flex items-center justify-center rounded-full mb-4">
<span className="text-blue-500 text-xl font-bold">
@@ -404,7 +404,7 @@ export const SeoPageTemplate = ({
{content.comparison.map((item, index) => (
<div
key={index}
- className="p-8 bg-white rounded-2xl shadow-md hover:shadow-xl transition-all duration-300 border border-gray-100 hover:border-blue-100 transform hover:-translate-y-1"
+ className="p-8 bg-gray-1 rounded-2xl shadow-md hover:shadow-xl transition-all duration-300 border border-gray-100 hover:border-blue-100 transform hover:-translate-y-1"
>
<div className="bg-indigo-50 w-12 h-12 flex items-center justify-center rounded-full mb-4">
<span className="text-indigo-500 text-xl font-bold">
@@ -468,7 +468,7 @@ export const SeoPageTemplate = ({
</h2>
</div>
<div className="overflow-x-auto">
- <table className="w-full max-w-4xl mx-auto bg-white rounded-xl shadow-md">
+ <table className="w-full max-w-4xl mx-auto bg-gray-1 rounded-xl shadow-md">
<thead className="bg-blue-50">
<tr>
{content.comparisonTable.headers.map((header, index) => (
@@ -485,7 +485,9 @@ export const SeoPageTemplate = ({
{content.comparisonTable.rows.map((row, rowIndex) => (
<tr
key={rowIndex}
- className={rowIndex % 2 === 0 ? "bg-white" : "bg-gray-50"}
+ className={
+ rowIndex % 2 === 0 ? "bg-gray-1" : "bg-gray-50"
+ }
>
{row.map((cell, cellIndex) => (
<td
@@ -518,7 +520,7 @@ export const SeoPageTemplate = ({
{content.useCases.map((useCase, index) => (
<div
key={index}
- className="p-8 bg-white rounded-2xl shadow-md hover:shadow-xl transition-all duration-300 border border-gray-100 hover:border-blue-100 transform hover:-translate-y-1"
+ className="p-8 bg-gray-1 rounded-2xl shadow-md hover:shadow-xl transition-all duration-300 border border-gray-100 hover:border-blue-100 transform hover:-translate-y-1"
>
<div className="bg-blue-50 w-12 h-12 flex items-center justify-center rounded-full mb-4">
<span className="text-blue-500 text-xl font-bold">
@@ -549,7 +551,7 @@ export const SeoPageTemplate = ({
{content.testimonials.items.map((testimonial, index) => (
<div
key={index}
- className="p-8 bg-white rounded-2xl shadow-md hover:shadow-xl transition-all duration-300 border border-gray-100"
+ className="p-8 bg-gray-1 rounded-2xl shadow-md hover:shadow-xl transition-all duration-300 border border-gray-100"
>
<div className="mb-4 text-blue-500">
<svg
@@ -581,7 +583,7 @@ export const SeoPageTemplate = ({
<span className="absolute -bottom-2 left-1/2 transform -translate-x-1/2 w-20 h-1 bg-blue-500 rounded-full"></span>
</h2>
</div>
- <div className="max-w-3xl mx-auto bg-white p-8 rounded-2xl shadow-md">
+ <div className="max-w-3xl mx-auto bg-gray-1 p-8 rounded-2xl shadow-md">
<ol className="list-none">
{content.migrationGuide.steps.map((step, index) => (
<li key={index} className="mb-6 flex items-start">
@@ -608,7 +610,7 @@ export const SeoPageTemplate = ({
{content.faqs.map((faq, index) => (
<div
key={index}
- className="my-6 p-6 bg-white rounded-xl shadow-sm hover:shadow-md transition-all duration-300 border border-gray-100"
+ className="my-6 p-6 bg-gray-1 rounded-xl shadow-sm hover:shadow-md transition-all duration-300 border border-gray-100"
>
<h2 className="text-xl text-gray-800 font-semibold mb-3">
{faq.question}
diff --git a/apps/web/components/templates/DashboardTemplate.tsx b/apps/web/components/templates/DashboardTemplate.tsx
index d3428a4fb..d40b2b9f2 100644
--- a/apps/web/components/templates/DashboardTemplate.tsx
+++ b/apps/web/components/templates/DashboardTemplate.tsx
@@ -9,9 +9,7 @@ export const DashboardTemplate = ({
}) => {
return (
<div className="dashboard-page">
- <DashboardInner emptyComponent={children}>
- {children && children}
- </DashboardInner>
+ <DashboardInner>{children && children}</DashboardInner>
</div>
);
};
diff --git a/apps/web/components/ui/Testimonials.tsx b/apps/web/components/ui/Testimonials.tsx
index 8b1d469d8..16c89bf85 100644
--- a/apps/web/components/ui/Testimonials.tsx
+++ b/apps/web/components/ui/Testimonials.tsx
@@ -77,7 +77,7 @@ const TestimonialCard = ({ testimonial }: TestimonialCardProps) => {
href={testimonial.url}
target="_blank"
rel="noopener noreferrer"
- className="p-6 bg-gray-100 rounded-xl border border-gray-200 w-full h-auto hover:scale-[1.015] hover:border-blue-500 hover:shadow-lg transition-all duration-300 cursor-pointer block"
+ className="p-6 bg-gray-2 rounded-xl border border-gray-4 w-full h-auto hover:scale-[1.008] hover:border-blue-500 hover:shadow-lg transition-all duration-300 cursor-pointer block"
whileHover={{ scale: 1.03 }}
whileTap={{ scale: 0.98 }}
>
diff --git a/apps/web/middleware.ts b/apps/web/middleware.ts
index 5b9dfd678..25572a9c6 100644
--- a/apps/web/middleware.ts
+++ b/apps/web/middleware.ts
@@ -1,10 +1,9 @@
-import { NextResponse } from "next/server";
-import type { NextRequest } from "next/server";
import { db } from "@cap/database";
import { spaces } from "@cap/database/schema";
-import { eq } from "drizzle-orm";
import { serverEnv } from "@cap/env";
-import { getToken } from "next-auth/jwt";
+import { eq } from "drizzle-orm";
+import type { NextRequest } from "next/server";
+import { NextResponse } from "next/server";
const mainDomains = [
"cap.so",
@@ -20,7 +19,15 @@ export async function middleware(request: NextRequest) {
const hostname = url.hostname;
const path = url.pathname;
+
if (!hostname) return NextResponse.next();
+
+ // we use this to set the theme to light mode outside of the dashboard
+ if (path) {
+ const response = NextResponse.next();
+ response.headers.set("x-current-path", path);
+ return response;
+ }
if (mainDomains.some((d) => hostname.includes(d))) {
// We just let the request go through for main domains, page-level logic will handle redirects
diff --git a/apps/web/package.json b/apps/web/package.json
index 8ed69012f..49f7ec4a1 100644
--- a/apps/web/package.json
+++ b/apps/web/package.json
@@ -31,6 +31,7 @@
"@mux/mux-node": "^8.5.1",
"@mux/mux-player-react": "^3.3.0",
"@octokit/rest": "^20.0.2",
+ "@radix-ui/colors": "^3.0.0",
"@radix-ui/react-tooltip": "^1.2.0",
"@react-email/components": "^0.0.13",
"@react-email/render": "0.0.11",
@@ -43,6 +44,7 @@
"@tanstack/react-store": "^0.5.5",
"@tanstack/store": "^0.5.5",
"@ts-rest/core": "^3.52.1",
+ "@types/js-cookie": "^3.0.6",
"@uidotdev/usehooks": "^2.4.1",
"@workos-inc/node": "^7.34.0",
"aws-sdk": "^2.1530.0",
@@ -57,6 +59,7 @@
"geist": "^1.3.1",
"hls.js": "^1.5.3",
"hono": "^4.7.1",
+ "js-cookie": "^3.0.5",
"jszip": "^3.10.1",
"lodash": "^4.17.21",
"lucide-react": "^0.294.0",
diff --git a/apps/web/utils/platform.tsx b/apps/web/utils/platform.tsx
index f54558e79..525485225 100644
--- a/apps/web/utils/platform.tsx
+++ b/apps/web/utils/platform.tsx
@@ -74,7 +74,7 @@ export const PlatformIcons: React.FC = () => {
width="1em"
height="1em"
fill="currentColor"
- className="size-[24px] text-gray-500 opacity-90"
+ className="size-[24px] text-gray-1 opacity-90"
viewBox="0 0 384 512"
>
<path d="M318.7 268.7c-.2-36.7 16.4-64.4 50-84.8-18.8-26.9-47.2-41.7-84.7-44.6-35.5-2.8-74.3 20.7-88.5 20.7-15 0-49.4-19.7-76.4-19.7C63.3 141.2 4 184.8 4 273.5q0 39.3 14.4 81.2c12.8 36.7 59 126.7 107.2 125.2 25.2-.6 43-17.9 75.8-17.9 31.8 0 48.3 17.9 76.4 17.9 48.6-.7 90.4-82.5 102.6-119.3-65.2-30.7-61.7-90-61.7-91.9m-56.6-164.2c27.3-32.4 24.8-61.9 24-72.5-24.1 1.4-52 16.4-67.9 34.9-17.5 19.8-27.8 44.3-25.6 71.9 26.1 2 49.9-11.4 69.5-34.3" />
@@ -93,7 +93,7 @@ export const PlatformIcons: React.FC = () => {
height="1em"
fill="currentColor"
style={{ marginTop: "1.5px" }}
- className="size-[24px] text-gray-500 opacity-90"
+ className="size-[24px] text-gray-1 opacity-90"
viewBox="0 0 256 256"
>
<path d="M112 144v51.64a8 8 0 0 1-8 8 8.5 8.5 0 0 1-1.43-.13l-64-11.64A8 8 0 0 1 32 184v-40a8 8 0 0 1 8-8h64a8 8 0 0 1 8 8m-2.87-89.78a8 8 0 0 0-6.56-1.73l-64 11.64A8 8 0 0 0 32 72v40a8 8 0 0 0 8 8h64a8 8 0 0 0 8-8V60.36a8 8 0 0 0-2.87-6.14M216 136h-80a8 8 0 0 0-8 8v57.45a8 8 0 0 0 6.57 7.88l80 14.54a7.6 7.6 0 0 0 1.43.13 8 8 0 0 0 8-8v-72a8 8 0 0 0-8-8m5.13-102.14a8 8 0 0 0-6.56-1.73l-80 14.55a8 8 0 0 0-6.57 7.87V112a8 8 0 0 0 8 8h80a8 8 0 0 0 8-8V40a8 8 0 0 0-2.87-6.14" />
diff --git a/packages/database/emails/first-shareable-link.tsx b/packages/database/emails/first-shareable-link.tsx
index 04198dbc3..bb0f27117 100644
--- a/packages/database/emails/first-shareable-link.tsx
+++ b/packages/database/emails/first-shareable-link.tsx
@@ -7,7 +7,6 @@ import {
Html,
Img,
Link,
- Preview,
Section,
Tailwind,
Text,
@@ -27,7 +26,7 @@ export function FirstShareableLink({
<Html>
<Head />
<Tailwind>
- <Body className="mx-auto my-auto bg-white font-sans">
+ <Body className="mx-auto my-auto bg-gray-1 font-sans">
<Container className="mx-auto my-10 max-w-[500px] rounded border border-solid border-gray-200 px-10 py-5">
<Section className="mt-8">
<Img
diff --git a/packages/database/emails/login-link.tsx b/packages/database/emails/login-link.tsx
index dbc299946..a83d23527 100644
--- a/packages/database/emails/login-link.tsx
+++ b/packages/database/emails/login-link.tsx
@@ -26,7 +26,7 @@ export function LoginLink({
<Head />
<Preview>Your Cap Login Link</Preview>
<Tailwind>
- <Body className="mx-auto my-auto bg-white font-sans">
+ <Body className="mx-auto my-auto bg-gray-1 font-sans">
<Container className="mx-auto my-10 max-w-[500px] rounded border border-solid border-gray-200 px-10 py-5">
<Section className="mt-8">
<Img
diff --git a/packages/database/emails/new-comment.tsx b/packages/database/emails/new-comment.tsx
index e98314aba..07177e227 100644
--- a/packages/database/emails/new-comment.tsx
+++ b/packages/database/emails/new-comment.tsx
@@ -32,7 +32,7 @@ export function NewComment({
<Head />
<Preview>New comment on your Cap: {videoName}</Preview>
<Tailwind>
- <Body className="mx-auto my-auto bg-white font-sans">
+ <Body className="mx-auto my-auto bg-gray-1 font-sans">
<Container className="mx-auto my-10 max-w-[500px] rounded border border-solid border-gray-200 px-10 py-5">
<Section className="mt-8">
<Img
diff --git a/packages/database/emails/workspace-invite.tsx b/packages/database/emails/workspace-invite.tsx
index 3fe010db5..f7897ae16 100644
--- a/packages/database/emails/workspace-invite.tsx
+++ b/packages/database/emails/workspace-invite.tsx
@@ -28,7 +28,7 @@ export function WorkspaceInvite({
<Head />
<Preview>Invitation to join {workspaceName} on Cap</Preview>
<Tailwind>
- <Body className="mx-auto my-auto bg-white font-sans">
+ <Body className="mx-auto my-auto bg-gray-1 font-sans">
<Container className="mx-auto my-10 max-w-[500px] rounded border border-solid border-gray-200 px-10 py-5">
<Section className="mt-8">
<Img
diff --git a/packages/ui-solid/src/Button.tsx b/packages/ui-solid/src/Button.tsx
index ef2ff9b76..f968124ec 100644
--- a/packages/ui-solid/src/Button.tsx
+++ b/packages/ui-solid/src/Button.tsx
@@ -13,13 +13,13 @@ const styles = cva(
primary:
"bg-blue-300 text-gray-50 hover:opacity-80 dark:text-gray-500 disabled:bg-blue-200 outline-blue-300",
secondary:
- "bg-gray-200 hover:opacity-80 text-gray-500 disabled:bg-gray-200 disabled:text-gray-400 outline-blue-300",
+ "bg-gray-200 hover:opacity-80 text-gray-500 disabled:bg-gray-200 disabled:text-gray-8 outline-blue-300",
destructive:
"bg-red-300 text-gray-50 dark:text-gray-500 hover:bg-red-400 disabled:bg-red-200 outline-red-300",
white:
- "bg-gray-100 dark:bg-gray-500 hover:opacity-80 text-gray-500 dark:disabled:bg-gray-300 dark:disabled:text-gray-400 dark:text-gray-50 disabled:bg-gray-400 disabled:text-gray-400 outline-blue-300",
+ "bg-gray-1 dark:bg-gray-500 hover:opacity-80 text-gray-500 dark:disabled:bg-gray-300 dark:disabled:text-gray-8 dark:text-gray-50 disabled:bg-gray-400 disabled:text-gray-8 outline-blue-300",
lightdark:
- "bg-gray-500 hover:opacity-80 text-gray-100 dark:disabled:bg-gray-300 dark:disabled:text-gray-400 dark:text-gray-50 disabled:bg-gray-400 disabled:text-gray-400 outline-blue-300",
+ "bg-gray-500 hover:opacity-80 text-gray-100 dark:disabled:bg-gray-300 dark:disabled:text-gray-8 dark:text-gray-50 disabled:bg-gray-400 disabled:text-gray-8 outline-blue-300",
},
size: {
xs: "font-[400] text-[0.75rem] px-[0.5rem] h-[1.25rem] ",
diff --git a/packages/ui-solid/src/SwitchTab.tsx b/packages/ui-solid/src/SwitchTab.tsx
index 8365a9614..8b3181b59 100644
--- a/packages/ui-solid/src/SwitchTab.tsx
+++ b/packages/ui-solid/src/SwitchTab.tsx
@@ -18,7 +18,7 @@ function List(props: ComponentProps<typeof KTabs.List>) {
>
{local.children}
<KTabs.Indicator class="absolute flex p-px inset-0 transition-transform peer-focus-visible:outline outline-2 outline-blue-300 outline-offset-2 rounded-[0.6rem] overflow-hidden">
- <div class="bg-gray-100 flex-1" />
+ <div class="bg-gray-1 flex-1" />
</KTabs.Indicator>
</KTabs.List>
);
@@ -35,7 +35,7 @@ function Trigger<T extends ValidComponent = "button">(
<KTabs.Trigger
{...others}
class={cx(
- "flex-1 text-gray-400 py-1 z-10 ui-selected:text-gray-500 peer outline-none transition-colors duration-100",
+ "flex-1 text-gray-8 py-1 z-10 ui-selected:text-gray-1 peer outline-none transition-colors duration-100",
local.class
)}
/>
diff --git a/packages/ui/src/components/Button.tsx b/packages/ui/src/components/Button.tsx
index 9112f609d..79de39b90 100644
--- a/packages/ui/src/components/Button.tsx
+++ b/packages/ui/src/components/Button.tsx
@@ -13,18 +13,20 @@ const buttonVariants = cva(
variants: {
variant: {
primary:
- "bg-gradient-to-t button-gradient-border from-blue-300 to-[#75A3FF] shadow-[0_0_0_1px] hover:brightness-110 shadow-blue-400 text-gray-50 hover:bg-blue-400 disabled:bg-blue-200",
+ "bg-gradient-to-t button-gradient-border from-blue-10 to-[#75A3FF] shadow-[0_0_0_1px] hover:brightness-110 shadow-blue-11 text-gray-50 hover:bg-blue-9 disabled:bg-blue-200",
red: "bg-gradient-to-t button-gradient-border from-[#772828] to-[#9F3C3C] shadow-[0_0_0_1px] hover:brightness-110 shadow-red-900 text-gray-50 hover:bg-red-400 disabled:bg-red-200",
secondary:
- "bg-blue-400 text-gray-50 hover:bg-blue-500 disabled:bg-blue-200 disabled:text-gray-400 border-blue-300",
+ "bg-blue-400 text-gray-50 hover:bg-blue-500 disabled:bg-blue-200 disabled:text-gray-8 border-blue-300",
destructive:
"bg-gradient-to-t shadow-[0_0_0_1px] shadow-red-900 hover:brightness-110 from-red-600 to-red-400 text-gray-50 button-gradient-border hover:bg-red-400 disabled:bg-red-200 border-red-300",
white:
- "bg-gray-50 text-gray-500 hover:bg-gray-100 border disabled:bg-gray-100 border-gray-200",
- gray: "bg-gray-100 text-gray-500 hover:bg-gray-200 disabled:bg-gray-100 border-gray-200 border",
- dark: "bg-gradient-to-t button-gradient-border from-[#0f0f0f] to-[#404040] shadow-[0_0_0_1px] hover:brightness-110 shadow-[#383838] text-gray-50 hover:bg-[#383838] disabled:bg-[#383838] border-transparent",
+ "bg-gray-2 text-gray-12 hover:border-gray-4 hover:bg-gray-3 border disabled:bg-gray-1 border-gray-3",
+ gray: "bg-gray-4 text-gray-12 hover:bg-gray-6 hover:border-gray-7 disabled:bg-gray-1 border-gray-5 border",
+ dark: "bg-gray-12 text-gray-1 hover:bg-gray-11 border disabled:bg-gray-1 border-gray-12",
+ darkgradient:
+ "bg-gradient-to-t button-gradient-border from-[#0f0f0f] to-[#404040] shadow-[0_0_0_1px] hover:brightness-110 shadow-[#383838] text-gray-50 hover:bg-[#383838] disabled:bg-[#383838] border-transparent",
radialblue:
- "text-gray-50 border button-gradient-border shadow-[0_0_0_1px] shadow-blue-400 disabled:bg-gray-100 border-0 [background:radial-gradient(90%_100%_at_15%_12%,#9BC4FF_0%,#3588FF_100%)] border-transparent hover:opacity-80",
+ "text-gray-50 border button-gradient-border shadow-[0_0_0_1px] shadow-blue-400 disabled:bg-gray-1 border-0 [background:radial-gradient(90%_100%_at_15%_12%,#9BC4FF_0%,#3588FF_100%)] border-transparent hover:opacity-80",
},
size: {
xs: "text-sm h-[32px] px-[0.5rem] ",
diff --git a/packages/ui/src/components/Card.tsx b/packages/ui/src/components/Card.tsx
index ce8ed16d1..694a108ec 100644
--- a/packages/ui/src/components/Card.tsx
+++ b/packages/ui/src/components/Card.tsx
@@ -9,7 +9,7 @@ const Card = forwardRef<
ref={ref}
className={classNames(
!noStyle &&
- "border p-5 bg-gray-50 rounded-2xl border-gray-200 text-card-foreground",
+ "border p-5 bg-gray-2 rounded-2xl border-gray-3 text-card-foreground",
className
)}
{...props}
@@ -50,7 +50,10 @@ const CardDescription = forwardRef<
>(({ className, ...props }, ref) => (
<p
ref={ref}
- className={classNames("text-[0.875rem] leading-[1.25rem]", className)}
+ className={classNames(
+ "text-[0.875rem] text-gray-10 leading-[1.25rem]",
+ className
+ )}
{...props}
/>
));
diff --git a/packages/ui/src/components/Cmdk.tsx b/packages/ui/src/components/Cmdk.tsx
index 73d37518b..ba2ad0f8c 100644
--- a/packages/ui/src/components/Cmdk.tsx
+++ b/packages/ui/src/components/Cmdk.tsx
@@ -41,12 +41,15 @@ const CommandInput = React.forwardRef<
React.ElementRef<typeof CommandPrimitive.Input>,
React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>
>(({ className, ...props }, ref) => (
- <div className="flex items-center px-3 border-b" cmdk-input-wrapper="">
+ <div
+ className="flex items-center px-3 border-b border-gray-4"
+ cmdk-input-wrapper=""
+ >
<Search className="mr-2 w-4 h-4 opacity-50 shrink-0" />
<CommandPrimitive.Input
ref={ref}
className={classNames(
- "flex py-3 w-full h-11 text-sm bg-transparent rounded-md outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
+ "flex py-3 w-full h-11 text-sm bg-transparent rounded-md outline-none text-gray-12 placeholder:text-gray-10 disabled:cursor-not-allowed disabled:opacity-50",
className
)}
{...props}
@@ -120,7 +123,7 @@ const CommandItem = React.forwardRef<
<CommandPrimitive.Item
ref={ref}
className={classNames(
- "relative flex cursor-pointer text-gray-400 select-none items-center rounded-sm px-2 py-2 text-[0.875rem] outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
+ "relative flex cursor-pointer text-gray-8 select-none items-center rounded-sm px-2 py-2 text-[0.875rem] outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
className
)}
{...props}
diff --git a/packages/ui/src/components/Dialog.tsx b/packages/ui/src/components/Dialog.tsx
index efc5afdbe..19d264f4f 100644
--- a/packages/ui/src/components/Dialog.tsx
+++ b/packages/ui/src/components/Dialog.tsx
@@ -1,9 +1,9 @@
"use client";
-import * as React from "react";
+import { classNames } from "@cap/utils";
import * as DialogPrimitive from "@radix-ui/react-dialog";
import { X } from "lucide-react";
-import { classNames } from "@cap/utils";
+import * as React from "react";
const Dialog = DialogPrimitive.Root;
const DialogTrigger = DialogPrimitive.Trigger;
@@ -15,10 +15,7 @@ const DialogOverlay = React.forwardRef<
>(({ className, ...props }, ref) => (
<DialogPrimitive.Overlay
ref={ref}
- className={classNames(
- "fixed inset-0 z-50 bg-black/80 backdrop-blur-sm",
- className
- )}
+ className={classNames("fixed inset-0 z-50 bg-black/60", className)}
{...props}
/>
));
@@ -30,18 +27,18 @@ const DialogContent = React.forwardRef<
>(({ className, children, ...props }, ref) => (
<DialogPortal>
<DialogOverlay />
- <div className="fixed inset-0 z-50 flex items-center justify-center">
+ <div className="flex fixed inset-0 z-50 justify-center items-center">
<DialogPrimitive.Content
ref={ref}
className={classNames(
- "relative bg-white p-6 shadow-lg sm:rounded-lg w-full max-w-lg",
+ "relative p-6 w-full max-w-lg rounded-xl shadow-lg bg-gray-7 border-gray-9",
className
)}
{...props}
>
{children}
<DialogPrimitive.Close className="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground">
- <X className="h-5 w-5" />
+ <X className="w-5 h-5 text-gray-9" />
<span className="sr-only">Close</span>
</DialogPrimitive.Close>
</DialogPrimitive.Content>
@@ -70,7 +67,7 @@ const DialogFooter = ({
}: React.HTMLAttributes<HTMLDivElement>) => (
<div
className={classNames(
- "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2 mt-6 pt-4 border-t border-subtle",
+ "flex flex-col-reverse pt-4 mt-6 border-t sm:flex-row sm:justify-end sm:space-x-2 border-subtle",
className
)}
{...props}
@@ -85,7 +82,7 @@ const DialogTitle = React.forwardRef<
<DialogPrimitive.Title
ref={ref}
className={classNames(
- "text-xl font-bold leading-none tracking-tight",
+ "text-xl font-bold tracking-tight leading-none",
className
)}
{...props}
@@ -107,10 +104,10 @@ DialogDescription.displayName = DialogPrimitive.Description.displayName;
export {
Dialog,
- DialogTrigger,
DialogContent,
- DialogHeader,
+ DialogDescription,
DialogFooter,
+ DialogHeader,
DialogTitle,
- DialogDescription,
+ DialogTrigger,
};
diff --git a/packages/ui/src/components/Dropdown.tsx b/packages/ui/src/components/Dropdown.tsx
index c2d3537e5..c021b17a0 100644
--- a/packages/ui/src/components/Dropdown.tsx
+++ b/packages/ui/src/components/Dropdown.tsx
@@ -1,8 +1,8 @@
"use client";
-import * as React from "react";
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
import { Check, ChevronRight, Circle } from "lucide-react";
+import * as React from "react";
import { classNames } from "@cap/utils";
@@ -27,14 +27,14 @@ const DropdownMenuSubTrigger = React.forwardRef<
<DropdownMenuPrimitive.SubTrigger
ref={ref}
className={classNames(
- "flex cursor-default select-none flex justify-between items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",
+ "flex cursor-default select-none justify-between items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",
inset && "pl-8",
className
)}
{...props}
>
{children}
- <ChevronRight className="ml-auto h-4 w-4" />
+ <ChevronRight className="ml-auto w-4 h-4" />
</DropdownMenuPrimitive.SubTrigger>
));
DropdownMenuSubTrigger.displayName =
@@ -47,7 +47,7 @@ const DropdownMenuSubContent = React.forwardRef<
<DropdownMenuPrimitive.SubContent
ref={ref}
className={classNames(
- "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
+ "z-50 min-w-[8rem] overflow-hidden rounded-xl border bg-gray-1 p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
className
)}
{...props}
@@ -65,7 +65,7 @@ const DropdownMenuContent = React.forwardRef<
ref={ref}
sideOffset={sideOffset}
className={classNames(
- "z-[1000000000] bg-white min-w-[8rem] overflow-hidden rounded-xl border p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
+ "z-[1000000000] bg-gray-1 min-w-[8rem] overflow-hidden rounded-xl border p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
className
)}
{...props}
@@ -107,7 +107,7 @@ const DropdownMenuCheckboxItem = React.forwardRef<
>
<span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
<DropdownMenuPrimitive.ItemIndicator>
- <Check className="h-4 w-4" />
+ <Check className="w-4 h-4" />
</DropdownMenuPrimitive.ItemIndicator>
</span>
{children}
@@ -130,7 +130,7 @@ const DropdownMenuRadioItem = React.forwardRef<
>
<span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
<DropdownMenuPrimitive.ItemIndicator>
- <Circle className="h-2 w-2 fill-current" />
+ <Circle className="w-2 h-2 fill-current" />
</DropdownMenuPrimitive.ItemIndicator>
</span>
{children}
@@ -186,18 +186,18 @@ DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
export {
DropdownMenu,
- DropdownMenuTrigger,
+ DropdownMenuCheckboxItem,
DropdownMenuContent,
+ DropdownMenuGroup,
DropdownMenuItem,
- DropdownMenuCheckboxItem,
- DropdownMenuRadioItem,
DropdownMenuLabel,
+ DropdownMenuPortal,
+ DropdownMenuRadioGroup,
+ DropdownMenuRadioItem,
DropdownMenuSeparator,
DropdownMenuShortcut,
- DropdownMenuGroup,
- DropdownMenuPortal,
DropdownMenuSub,
DropdownMenuSubContent,
DropdownMenuSubTrigger,
- DropdownMenuRadioGroup,
+ DropdownMenuTrigger,
};
diff --git a/packages/ui/src/components/NavigationMenu.tsx b/packages/ui/src/components/NavigationMenu.tsx
index 33ec90dd3..ac30b65a7 100644
--- a/packages/ui/src/components/NavigationMenu.tsx
+++ b/packages/ui/src/components/NavigationMenu.tsx
@@ -1,7 +1,7 @@
-import * as React from "react";
import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu";
import { cva } from "class-variance-authority";
import { ChevronDown } from "lucide-react";
+import * as React from "react";
import { classNames } from "@cap/utils";
@@ -73,7 +73,7 @@ const NavigationMenuContent = React.forwardRef<
<NavigationMenuPrimitive.Content
ref={ref}
className={classNames(
- "bg-white/80 backdrop-blur-md left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto shadow-lg rounded-lg border border-zinc-100/50",
+ "bg-gray-1/80 backdrop-blur-md left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto shadow-lg rounded-lg border border-zinc-100/50",
className
)}
{...props}
@@ -90,7 +90,7 @@ const NavigationMenuViewport = React.forwardRef<
<div className={classNames("flex absolute left-0 top-full justify-center")}>
<NavigationMenuPrimitive.Viewport
className={classNames(
- "origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-lg border border-zinc-100/50 bg-white/80 backdrop-blur-md text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-200 data-[state=open]:duration-200 data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 md:w-[var(--radix-navigation-menu-viewport-width)]",
+ "origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-lg border border-zinc-100/50 bg-gray-1/80 backdrop-blur-md text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-200 data-[state=open]:duration-200 data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 md:w-[var(--radix-navigation-menu-viewport-width)]",
className
)}
ref={ref}
@@ -148,14 +148,14 @@ const ListItem = React.forwardRef<
ListItem.displayName = "ListItem";
export {
- navigationMenuTriggerStyle,
+ ListItem,
NavigationMenu,
- NavigationMenuList,
- NavigationMenuItem,
NavigationMenuContent,
- NavigationMenuTrigger,
- NavigationMenuLink,
NavigationMenuIndicator,
+ NavigationMenuItem,
+ NavigationMenuLink,
+ NavigationMenuList,
+ NavigationMenuTrigger,
+ navigationMenuTriggerStyle,
NavigationMenuViewport,
- ListItem,
};
diff --git a/packages/ui/src/components/Popover.tsx b/packages/ui/src/components/Popover.tsx
index 53ad79e88..2a405937c 100644
--- a/packages/ui/src/components/Popover.tsx
+++ b/packages/ui/src/components/Popover.tsx
@@ -19,7 +19,7 @@ const PopoverContent = React.forwardRef<
align={align}
sideOffset={sideOffset}
className={classNames(
- "z-50 w-72 rounded-lg border border-gray-200 bg-popover p-4 text-popover-foreground shadow-sm outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
+ "z-50 w-72 rounded-xl border border-gray-4 bg-gray-3 p-4 text-gray-12 shadow-sm outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
className
)}
{...props}
diff --git a/packages/ui/src/components/SkeletonRows.tsx b/packages/ui/src/components/SkeletonRows.tsx
index 8b08c800b..ae27621a5 100644
--- a/packages/ui/src/components/SkeletonRows.tsx
+++ b/packages/ui/src/components/SkeletonRows.tsx
@@ -7,7 +7,7 @@ export const SkeletonRows = () => {
return (
<div className="flex flex-col min-h-screen lg:gap-5">
{/* Content Area */}
- <div className="flex overflow-auto flex-col flex-1 bg-gray-100 lg:rounded-tl-2xl">
+ <div className="flex overflow-auto flex-col flex-1 bg-gray-1 lg:rounded-tl-2xl">
<div className="flex flex-col w-full">
<div className="grid grid-cols-1 gap-4 sm:gap-6 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-5">
{Array(15)
@@ -15,35 +15,81 @@ export const SkeletonRows = () => {
.map((_, index) => (
<div
key={index}
- className="flex relative flex-col gap-4 p-4 w-full h-full bg-gray-50 rounded-2xl border-gray-200 border-[1px]"
+ className="flex relative flex-col gap-4 w-full h-full bg-gray-3 rounded-2xl border-gray-4 border-[1px]"
>
{/* Thumbnail */}
- <Skeleton className="h-[150px] w-full aspect-video rounded-lg" />
-
- {/* Title */}
- <div className="flex flex-col gap-1">
- <Skeleton className="h-[20px] w-full max-w-[180px]" />
- <Skeleton className="h-[16px] w-[80px]" />
- </div>
-
- {/* Analytics */}
- <div className="flex flex-wrap gap-3 items-center mt-auto text-sm">
- {/* Views */}
- <div className="flex gap-1 items-center">
- <Skeleton circle width={16} height={16} />
- <Skeleton width={20} height={16} />
+ <Skeleton
+ baseColor="var(--gray-4)"
+ highlightColor="var(--gray-5)"
+ className="h-[150px] w-full aspect-video align-top !rounded-t-2xl !leading-none !rounded-b-none"
+ />
+ <div className="px-4 pb-4">
+ {/* Title */}
+ <div className="flex flex-col gap-1">
+ <Skeleton
+ baseColor="var(--gray-4)"
+ highlightColor="var(--gray-5)"
+ className="h-[20px] w-full max-w-[180px]"
+ />
+ <Skeleton
+ baseColor="var(--gray-4)"
+ highlightColor="var(--gray-5)"
+ className="h-[16px] w-[80px]"
+ />
</div>
- {/* Comments */}
- <div className="flex gap-1 items-center">
- <Skeleton circle width={16} height={16} />
- <Skeleton width={20} height={16} />
- </div>
+ {/* Analytics */}
+ <div className="flex flex-wrap gap-3 items-center mt-auto text-sm">
+ {/* Views */}
+ <div className="flex gap-1 items-center">
+ <Skeleton
+ baseColor="var(--gray-4)"
+ highlightColor="var(--gray-5)"
+ circle
+ width={16}
+ height={16}
+ />
+ <Skeleton
+ baseColor="var(--gray-4)"
+ highlightColor="var(--gray-5)"
+ width={20}
+ height={16}
+ />
+ </div>
+
+ {/* Comments */}
+ <div className="flex gap-1 items-center">
+ <Skeleton
+ baseColor="var(--gray-4)"
+ highlightColor="var(--gray-5)"
+ circle
+ width={16}
+ height={16}
+ />
+ <Skeleton
+ baseColor="var(--gray-4)"
+ highlightColor="var(--gray-5)"
+ width={20}
+ height={16}
+ />
+ </div>
- {/* Reactions */}
- <div className="flex gap-1 items-center">
- <Skeleton circle width={16} height={16} />
- <Skeleton width={20} height={16} />
+ {/* Reactions */}
+ <div className="flex gap-1 items-center">
+ <Skeleton
+ baseColor="var(--gray-4)"
+ highlightColor="var(--gray-5)"
+ circle
+ width={16}
+ height={16}
+ />
+ <Skeleton
+ baseColor="var(--gray-4)"
+ highlightColor="var(--gray-5)"
+ width={20}
+ height={16}
+ />
+ </div>
</div>
</div>
</div>
@@ -52,7 +98,11 @@ export const SkeletonRows = () => {
{/* Pagination */}
<div className="flex justify-center mt-10">
- <Skeleton className="h-[36px] w-[300px]" />
+ <Skeleton
+ baseColor="var(--gray-4)"
+ highlightColor="var(--gray-5)"
+ className="h-[36px] w-[300px]"
+ />
</div>
</div>
</div>
diff --git a/packages/ui/src/components/Switch.tsx b/packages/ui/src/components/Switch.tsx
index 30f3532be..bf035d5cb 100644
--- a/packages/ui/src/components/Switch.tsx
+++ b/packages/ui/src/components/Switch.tsx
@@ -1,7 +1,7 @@
"use client";
-import * as React from "react";
import * as SwitchPrimitives from "@radix-ui/react-switch";
+import * as React from "react";
import { classNames } from "@cap/utils";
@@ -11,7 +11,11 @@ const Switch = React.forwardRef<
>(({ className, ...props }, ref) => (
<SwitchPrimitives.Root
className={classNames(
- "peer inline-flex h-4 w-8 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 bg-blue-400",
+ "peer inline-flex shrink-0 cursor-pointer items-center rounded-full border-transparent transition-colors",
+ "w-11 h-6 p-[0.125rem]",
+ "bg-gray-5 data-[state=checked]:bg-blue-400",
+ "focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-400",
+ "disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-gray-200",
className
)}
{...props}
@@ -19,7 +23,9 @@ const Switch = React.forwardRef<
>
<SwitchPrimitives.Thumb
className={classNames(
- "pointer-events-none block h-4 w-4 rounded-full bg-white shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0 border border-gray-400"
+ "pointer-events-none block rounded-full bg-white shadow-md",
+ "size-5 transition-transform",
+ "data-[state=checked]:translate-x-[calc(100%)] data-[state=unchecked]:translate-x-0"
)}
/>
</SwitchPrimitives.Root>
diff --git a/packages/ui/src/components/Table.tsx b/packages/ui/src/components/Table.tsx
index 158a39f76..c76074b30 100644
--- a/packages/ui/src/components/Table.tsx
+++ b/packages/ui/src/components/Table.tsx
@@ -1,16 +1,16 @@
"use client";
-import * as React from "react";
import { classNames } from "@cap/utils";
+import * as React from "react";
const Table = React.forwardRef<
HTMLTableElement,
React.HTMLAttributes<HTMLTableElement>
>(({ className, ...props }, ref) => (
- <div className="relative w-full overflow-auto">
+ <div className="overflow-auto relative w-full">
<table
ref={ref}
- className={classNames("w-full caption-bottom text-sm", className)}
+ className={classNames("w-full text-sm caption-bottom", className)}
{...props}
/>
</div>
@@ -63,7 +63,7 @@ const TableRow = React.forwardRef<
<tr
ref={ref}
className={classNames(
- "border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",
+ "border-b transition-colors border-gray-5 hover:bg-muted/50 data-[state=selected]:bg-muted",
className
)}
{...props}
@@ -78,7 +78,7 @@ const TableHead = React.forwardRef<
<th
ref={ref}
className={classNames(
- "h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
+ "h-10 px-2 text-left text-gray-12 align-middle font-medium [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
className
)}
{...props}
@@ -93,7 +93,7 @@ const TableCell = React.forwardRef<
<td
ref={ref}
className={classNames(
- "p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
+ "p-2 align-middle text-gray-10 selection:[&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
className
)}
{...props}
@@ -115,11 +115,11 @@ TableCaption.displayName = "TableCaption";
export {
Table,
- TableHeader,
TableBody,
+ TableCaption,
+ TableCell,
TableFooter,
TableHead,
+ TableHeader,
TableRow,
- TableCell,
- TableCaption,
};
diff --git a/packages/ui/src/components/icons/Logo.tsx b/packages/ui/src/components/icons/Logo.tsx
index 874b51b32..0942ad8c1 100644
--- a/packages/ui/src/components/icons/Logo.tsx
+++ b/packages/ui/src/components/icons/Logo.tsx
@@ -53,6 +53,7 @@ export const Logo = ({
/>
{!hideLogoName && (
<path
+ className="fill-gray-12"
fill={white ? "#ffffff" : "#12161F"}
d="M58.416 30.448c-5.404 0-9.212-3.864-9.212-10.36 0-6.384 3.668-10.416 9.268-10.416 5.068 0 7.784 2.66 8.624 7.168l-3.808.196c-.476-2.604-2.072-4.2-4.816-4.2-3.388 0-5.488 2.828-5.488 7.252 0 4.48 2.156 7.196 5.46 7.196 2.94 0 4.508-1.708 4.956-4.564l3.808.196c-.784 4.676-3.752 7.532-8.792 7.532zm16.23-.112c-3.137 0-5.209-1.484-5.209-4.088 0-2.576 1.596-3.948 4.872-4.592l4.956-.98c0-2.1-.98-3.192-2.856-3.192-1.764 0-2.716.812-3.052 2.324l-3.668-.168c.588-3.136 2.996-4.928 6.72-4.928 4.256 0 6.44 2.24 6.44 6.216v5.432c0 .812.28 1.036.84 1.036h.476V30c-.224.056-.812.112-1.288.112-1.624 0-2.828-.588-3.136-2.436-.728 1.596-2.632 2.66-5.096 2.66zm.727-2.604c2.38 0 3.892-1.512 3.892-3.78v-.84l-3.864.784c-1.596.308-2.24.98-2.24 2.016 0 1.176.784 1.82 2.212 1.82zM86.874 34.2V15.048h3.444l.056 2.212c.868-1.652 2.52-2.548 4.48-2.548 4.256 0 6.356 3.5 6.356 7.812s-2.128 7.812-6.384 7.812c-1.904 0-3.556-.924-4.368-2.38V34.2h-3.584zm7.112-6.776c2.184 0 3.5-1.82 3.5-4.9s-1.316-4.9-3.5-4.9-3.528 1.652-3.528 4.9 1.316 4.9 3.528 4.9z"
/>
@@ -61,7 +62,7 @@ export const Logo = ({
{showVersion && (
<span
className={`text-[10px] font-medium ${
- white ? "text-white" : "text-gray-500"
+ white ? "text-white" : "text-gray-1"
}`}
>
v{process.env.appVersion}
@@ -70,7 +71,7 @@ export const Logo = ({
{showBeta && (
<span
className={`text-[10px] font-medium min-w-[52px] ${
- white ? "text-white" : "text-gray-500"
+ white ? "text-white" : "text-gray-1"
}`}
>
Beta v{process.env.appVersion}
diff --git a/packages/ui/src/components/input/Input.tsx b/packages/ui/src/components/input/Input.tsx
index 09dd4e571..d5db0edb6 100644
--- a/packages/ui/src/components/input/Input.tsx
+++ b/packages/ui/src/components/input/Input.tsx
@@ -11,11 +11,11 @@ const Input = React.forwardRef<HTMLInputElement, InputProps>(
<input
type={type}
className={classNames(
- "flex px-4 w-full text-sm font-thin text-gray-500 bg-gray-50 border-gray-200 transition-all duration-300 outline-0 focus:bg-gray-50",
- "rounded-xl hover:bg-gray-100 h-[48px] placeholder:text-gray-400 py-[14px] border-[1px] focus:border-gray-500",
+ "flex px-4 w-full text-sm font-thin transition-all duration-200 text-gray-12 bg-gray-3 border-gray-4 outline-0 focus:bg-gray-3",
+ "rounded-xl hover:bg-gray-4 hover:border-gray-5 h-[48px] placeholder:text-gray-8 py-[14px] border-[1px] focus:border-gray-5",
"file:border-0 file:bg-transparent file:text-sm file:font-medium",
- "disabled:cursor-not-allowed disabled:opacity-50 placeholder:transition-all",
- "ring-0 focus:ring-2 focus:ring-gray-300 focus:ring-offset-2 placeholder:duration-300 hover:placeholder:text-gray-500",
+ "disabled:cursor-not-allowed disabled:bg-gray-1 disabled:bg-gray-2 disabled:text-gray-9 placeholder:transition-all",
+ "ring-0 ring-gray-2 focus:ring-1 focus:ring-gray-12 focus:ring-offset-2 ring-offset-gray-1 placeholder:text-gray-12 placeholder:duration-200",
className
)}
ref={ref}
diff --git a/packages/ui/src/components/input/Label.tsx b/packages/ui/src/components/input/Label.tsx
index 269206007..18282ac7c 100644
--- a/packages/ui/src/components/input/Label.tsx
+++ b/packages/ui/src/components/input/Label.tsx
@@ -6,7 +6,7 @@ import * as React from "react";
import { classNames } from "@cap/utils";
-const labelVariants = cva("text-md text-gray-500 font-medium");
+const labelVariants = cva("text-md text-gray-12 font-medium");
const Label = React.forwardRef<
React.ElementRef<typeof LabelPrimitive.Root>,
diff --git a/packages/ui/style/tailwind.config.js b/packages/ui/style/tailwind.config.js
index 2485c8455..baee6b80f 100644
--- a/packages/ui/style/tailwind.config.js
+++ b/packages/ui/style/tailwind.config.js
@@ -1,4 +1,17 @@
module.exports = function (app, options) {
+
+// Function to generate color scales for Radix colors
+function getColorScale(name, alpha = false) {
+ let scale = {};
+ for (let i = 1; i <= 12; i++) {
+ scale[i] = `var(--${name}-${i})`;
+ // next line only needed if using alpha values
+ if (alpha) scale[`a${i}`] = `var(--${name}-a${i})`
+ }
+
+ return scale;
+}
+
const config = {
content: [
`../../apps/*/pages/**/*.{js,ts,jsx,tsx,mdx}`,
@@ -30,6 +43,8 @@ module.exports = function (app, options) {
},
extend: {
colors: {
+ gray: getColorScale("gray"),
+ blue: getColorScale("blue"),
border: "hsl(var(--border))",
input: "hsl(var(--input))",
ring: "hsl(var(--ring))",
@@ -76,14 +91,6 @@ module.exports = function (app, options) {
DEFAULT: "hsl(var(--card))",
foreground: "hsl(var(--card-foreground))",
},
- gray: {
- 50: "#FFFFFF",
- 100: "#F7F8FA",
- 200: "#E7EAF0",
- 300: "#C9CEDB",
- 400: "#8991A3",
- 500: "#12161F",
- },
"black-transparent": {
5: "rgba(18,22,31,0.05)",
10: "rgba(18,22,31,0.1)",
@@ -98,13 +105,6 @@ module.exports = function (app, options) {
20: "rgba(255,255,255,0.2)",
40: "rgba(255,255,255,0.4)",
},
- blue: {
- 50: "#EBF1FF",
- 100: "#ADC9FF",
- 200: "#85ADFF",
- 300: "#4785FF",
- 400: "#3F75E0",
- },
"blue-transparent": {
10: "rgba(34,64,122,0.1)",
20: "rgba(34,64,122,0.2)",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index d617658bd..16fd70eaa 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -434,12 +434,6 @@ importers:
'@deepgram/sdk':
specifier: ^3.3.4
version: 3.7.0([email protected])
- '@ffmpeg/ffmpeg':
- specifier: ^0.12.10
- version: 0.12.10
- '@ffmpeg/util':
- specifier: ^0.12.1
- version: 0.12.1
'@fortawesome/free-brands-svg-icons':
specifier: ^6.7.2
version: 6.7.2
@@ -470,6 +464,9 @@ importers:
'@octokit/rest':
specifier: ^20.0.2
version: 20.1.1
+ '@radix-ui/colors':
+ specifier: ^3.0.0
+ version: 3.0.0
'@radix-ui/react-tooltip':
specifier: ^1.2.0
@@ -506,6 +503,9 @@ importers:
'@ts-rest/core':
specifier: ^3.52.1
version: 3.52.1(@types/[email protected])([email protected])
+ '@types/js-cookie':
+ specifier: ^3.0.6
+ version: 3.0.6
'@uidotdev/usehooks':
specifier: ^2.4.1
@@ -548,6 +548,9 @@ importers:
hono:
specifier: ^4.7.1
version: 4.7.1
+ js-cookie:
+ specifier: ^3.0.5
+ version: 3.0.5
jszip:
specifier: ^3.10.1
version: 3.10.1
@@ -568,7 +571,7 @@ importers:
next-contentlayer2:
specifier: ^0.5.3
next-mdx-remote:
specifier: ^4.4.1
@@ -3115,18 +3118,6 @@ packages:
resolution: {integrity: sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==}
engines: {node: '>=14'}
- '@ffmpeg/[email protected]':
- resolution: {integrity: sha512-lVtk8PW8e+NUzGZhPTWj2P1J4/NyuCrbDD3O9IGpSeLYtUZKBqZO8CNj1WYGghep/MXoM8e1qVY1GztTkf8YYQ==}
- engines: {node: '>=18.x'}
-
- '@ffmpeg/[email protected]':
- resolution: {integrity: sha512-NJtxwPoLb60/z1Klv0ueshguWQ/7mNm106qdHkB4HL49LXszjhjCCiL+ldHJGQ9ai2Igx0s4F24ghigy//ERdA==}
- engines: {node: '>=16.x'}
-
- '@ffmpeg/[email protected]':
- resolution: {integrity: sha512-10jjfAKWaDyb8+nAkijcsi9wgz/y26LOc1NKJradNMyCIl6usQcBbhkjX5qhALrSBcOy6TOeksunTYa+a03qNQ==}
- engines: {node: '>=18.x'}
-
'@floating-ui/[email protected]':
resolution: {integrity: sha512-7XJ9cPU+yI2QeLS+FCSlqNFZJq8arvswefkZrYI1yQBbftw6FyrZOxYSh+9S7z7TpeWlRt9zJ5IhM1WIL334jA==}
@@ -4364,6 +4355,9 @@ packages:
'@pulumiverse/[email protected]':
resolution: {integrity: sha512-Wdq/vNPNWh/cjzv+VHCjT30gBBhrrmX5J8E8VlNJ8bQ5mkMfEZDPpHaY+6NTFIb6arF+KUGdIsUFsndT50pmeA==}
+ '@radix-ui/[email protected]':
+ resolution: {integrity: sha512-FUOsGBkHrYJwCSEtWRCIfQbZG7q1e6DgxCIOe1SUQzDe/7rXXeA47s8yCn6fuTNQAj1Zq4oTFi9Yjp3wzElcxg==}
+
'@radix-ui/[email protected]':
resolution: {integrity: sha512-3e7rn8FDMin4CgeL7Z/49smCA3rFYY3Ha2rUQ7HRWFadS5iCRw08ZgVT1LaNTCNqgvrUiyczLflrVrF0SRQtNA==}
@@ -6383,6 +6377,9 @@ packages:
resolution: {integrity: sha512-wd+MVEZCHt23V0/L642O5APvspWply/rGY5BcW4SUETo2UzPU3Z26qr8jC2qxpimI2jjx9h7+2cj2FwIr01bXg==}
+ '@types/[email protected]':
+ resolution: {integrity: sha512-wkw9yd1kEXOPnvEeEV1Go1MmxtBJL0RR79aOTAApecWFVu7w0NNXNqhcWgvw2YgZDYadliXkl14pa3WXw5jlCQ==}
+
resolution: {integrity: sha512-k4MGaQl5TGo/iipqb2UDG2UwjXziSWkh0uysQelTlJpX1qGlpUZYm8PnO4DxG1qBomtJUdYJ6qR6xdIah10JLg==}
@@ -14822,9 +14819,9 @@ snapshots:
dependencies:
commander: 9.4.1
dependencies:
- '@contentlayer2/core': 0.5.3([email protected])([email protected])
+ '@contentlayer2/core': 0.5.3([email protected])([email protected])
'@contentlayer2/utils': 0.5.3
clipanion: 3.2.1([email protected])
typanion: 3.14.0
@@ -14835,9 +14832,9 @@ snapshots:
- markdown-wasm
- supports-color
dependencies:
- '@contentlayer2/core': 0.5.3([email protected])([email protected])
+ '@contentlayer2/core': 0.5.3([email protected])([email protected])
transitivePeerDependencies:
- '@effect-ts/otel-node'
- acorn
@@ -14845,13 +14842,13 @@ snapshots:
- markdown-wasm
- supports-color
dependencies:
'@contentlayer2/utils': 0.5.3
camel-case: 4.1.2
comment-json: 4.2.5
gray-matter: 4.0.3
- mdx-bundler: 10.0.3([email protected])([email protected])
+ mdx-bundler: 10.0.3([email protected])([email protected])
rehype-stringify: 10.0.1
remark-frontmatter: 5.0.0
remark-parse: 11.0.0
@@ -14866,9 +14863,9 @@ snapshots:
- acorn
- supports-color
dependencies:
- '@contentlayer2/core': 0.5.3([email protected])([email protected])
+ '@contentlayer2/core': 0.5.3([email protected])([email protected])
'@contentlayer2/utils': 0.5.3
chokidar: 3.6.0
fast-glob: 3.3.3
@@ -14886,10 +14883,10 @@ snapshots:
- markdown-wasm
- supports-color
dependencies:
- '@contentlayer2/core': 0.5.3([email protected])([email protected])
- '@contentlayer2/source-files': 0.5.3([email protected])([email protected])
+ '@contentlayer2/core': 0.5.3([email protected])([email protected])
+ '@contentlayer2/source-files': 0.5.3([email protected])([email protected])
'@contentlayer2/utils': 0.5.3
transitivePeerDependencies:
- '@effect-ts/otel-node'
@@ -15759,14 +15756,6 @@ snapshots:
'@fastify/[email protected]': {}
- '@ffmpeg/[email protected]':
- dependencies:
- '@ffmpeg/types': 0.12.2
-
- '@ffmpeg/[email protected]': {}
-
- '@ffmpeg/[email protected]': {}
-
'@floating-ui/[email protected]':
dependencies:
'@floating-ui/utils': 0.2.8
@@ -16281,9 +16270,9 @@ snapshots:
'@planetscale/database': 1.19.0
mysql2: 3.11.3
dependencies:
- '@mdx-js/mdx': 3.1.0([email protected])
+ '@mdx-js/mdx': 3.1.0([email protected])
'@types/unist': 3.0.3
esbuild: 0.25.2
source-map: 0.7.4
@@ -16315,7 +16304,7 @@ snapshots:
transitivePeerDependencies:
- supports-color
dependencies:
'@types/estree': 1.0.6
'@types/estree-jsx': 1.0.5
@@ -16329,7 +16318,7 @@ snapshots:
hast-util-to-jsx-runtime: 2.3.2
markdown-extensions: 2.0.0
recma-build-jsx: 1.0.0
- recma-jsx: 1.0.0([email protected])
+ recma-jsx: 1.0.0([email protected])
recma-stringify: 1.0.0
rehype-recma: 1.0.0
remark-mdx: 3.1.0
@@ -17309,6 +17298,8 @@ snapshots:
- ts-node
- typescript
+ '@radix-ui/[email protected]': {}
+
'@radix-ui/[email protected]':
dependencies:
'@babel/runtime': 7.25.6
@@ -19525,6 +19516,8 @@ snapshots:
expect: 29.7.0
pretty-format: 29.7.0
+ '@types/[email protected]': {}
+
'@types/[email protected]': {}
'@types/[email protected]': {}
@@ -20062,10 +20055,6 @@ snapshots:
mime-types: 3.0.0
negotiator: 1.0.0
- dependencies:
- acorn: 8.14.0
-
dependencies:
acorn: 8.14.1
@@ -20078,10 +20067,6 @@ snapshots:
dependencies:
acorn: 8.12.1
- dependencies:
- acorn: 8.14.0
-
dependencies:
acorn: 8.14.1
@@ -21017,13 +21002,13 @@ snapshots:
dependencies:
- '@contentlayer2/cli': 0.5.3([email protected])([email protected])
- '@contentlayer2/client': 0.5.3([email protected])([email protected])
- '@contentlayer2/core': 0.5.3([email protected])([email protected])
- '@contentlayer2/source-files': 0.5.3([email protected])([email protected])
- '@contentlayer2/source-remote-files': 0.5.3([email protected])([email protected])
+ '@contentlayer2/cli': 0.5.3([email protected])([email protected])
+ '@contentlayer2/client': 0.5.3([email protected])([email protected])
+ '@contentlayer2/core': 0.5.3([email protected])([email protected])
+ '@contentlayer2/source-files': 0.5.3([email protected])([email protected])
+ '@contentlayer2/source-remote-files': 0.5.3([email protected])([email protected])
'@contentlayer2/utils': 0.5.3
transitivePeerDependencies:
- '@effect-ts/otel-node'
@@ -23333,8 +23318,8 @@ snapshots:
dependencies:
- acorn: 8.14.0
- acorn-import-attributes: 1.9.5([email protected])
+ acorn: 8.14.1
+ acorn-import-attributes: 1.9.5([email protected])
cjs-module-lexer: 1.4.1
module-details-from-path: 1.0.3
@@ -24626,12 +24611,12 @@ snapshots:
dependencies:
'@types/mdast': 4.0.4
dependencies:
'@babel/runtime': 7.25.6
'@esbuild-plugins/node-resolve': 0.2.2([email protected])
'@fal-works/esbuild-plugin-global-externals': 2.1.2
- '@mdx-js/esbuild': 3.1.0([email protected])([email protected])
+ '@mdx-js/esbuild': 3.1.0([email protected])([email protected])
esbuild: 0.25.2
gray-matter: 4.0.3
remark-frontmatter: 5.0.0
@@ -24888,8 +24873,8 @@ snapshots:
dependencies:
- acorn: 8.14.0
- acorn-jsx: 5.3.2([email protected])
+ acorn: 8.14.1
+ acorn-jsx: 5.3.2([email protected])
micromark-extension-mdx-expression: 1.0.8
micromark-extension-mdx-jsx: 1.0.5
micromark-extension-mdx-md: 1.0.1
@@ -25439,11 +25424,11 @@ snapshots:
optionalDependencies:
nodemailer: 6.9.15
dependencies:
- '@contentlayer2/core': 0.5.3([email protected])([email protected])
+ '@contentlayer2/core': 0.5.3([email protected])([email protected])
'@contentlayer2/utils': 0.5.3
- contentlayer2: 0.5.3([email protected])([email protected])
+ contentlayer2: 0.5.3([email protected])([email protected])
react: 18.3.1
react-dom: 18.3.1([email protected])
@@ -26633,9 +26618,9 @@ snapshots:
estree-util-build-jsx: 3.0.1
vfile: 6.0.3
dependencies:
- acorn-jsx: 5.3.2([email protected])
+ acorn-jsx: 5.3.2([email protected])
estree-util-to-js: 2.0.0
recma-parse: 1.0.0
recma-stringify: 1.0.0