The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
WIP color updates
Tim Wilson7289b9ff6fe9
diff --git a/apps/web/app/app.dub.co/embed/referrals/activity.tsx b/apps/web/app/app.dub.co/embed/referrals/activity.tsxindex bbfd248dc3..39d2c63cc4 100644--- a/apps/web/app/app.dub.co/embed/referrals/activity.tsx+++ b/apps/web/app/app.dub.co/embed/referrals/activity.tsx@@ -23,7 +23,7 @@ export function ReferralsEmbedActivity({);return (- <div className="grid h-full grid-cols-3 divide-x divide-neutral-200 rounded-lg border border-neutral-200 bg-white sm:col-span-2">+ <div className="border-border-subtle bg-bg-default divide-border-subtle grid h-full grid-cols-3 divide-x rounded-lg border sm:col-span-2">{[{label: "Clicks",@@ -43,11 +43,11 @@ export function ReferralsEmbedActivity({].map(({ label, value, description }) => (<div key={label} className="relative flex flex-col justify-between p-4"><div>- <span className="flex items-center gap-1 text-sm text-neutral-500">+ <span className="text-content-subtle flex items-center gap-1 text-sm">{label}<InfoTooltip content={description} /></span>- <span className="text-base font-medium leading-none text-neutral-700">+ <span className="text-content-default text-base font-medium leading-none">{nFormatter(value, { full: true })}</span></div>diff --git a/apps/web/app/app.dub.co/embed/referrals/earnings.tsx b/apps/web/app/app.dub.co/embed/referrals/earnings.tsxindex 316ea33ae7..c60e095910 100644--- a/apps/web/app/app.dub.co/embed/referrals/earnings.tsx+++ b/apps/web/app/app.dub.co/embed/referrals/earnings.tsx@@ -81,8 +81,8 @@ export function ReferralsEmbedEarnings({ salesCount }: { salesCount: number }) {rowCount: salesCount,emptyState: (<div className="flex w-full flex-col items-center justify-center gap-2">- <Gift className="size-6 text-neutral-400" />- <p className="max-w-sm text-balance text-center text-xs text-neutral-400">+ <Gift className="text-content-muted size-6" />+ <p className="text-content-muted max-w-sm text-balance text-center text-xs">No earnings yet. When you refer a friend and they make a purchase,they'll show up here.</p>@@ -98,7 +98,7 @@ export function ReferralsEmbedEarnings({ salesCount }: { salesCount: number }) {<Table{...tableProps}table={table}- containerClassName="rounded-md border border-neutral-200"+ containerClassName="rounded-md border border-border-subtle"scrollWrapperClassName="min-h-[22rem]"/></motion.div>diff --git a/apps/web/app/app.dub.co/embed/referrals/faq.tsx b/apps/web/app/app.dub.co/embed/referrals/faq.tsxindex ce8e3b33d5..6d4c8661c9 100644--- a/apps/web/app/app.dub.co/embed/referrals/faq.tsx+++ b/apps/web/app/app.dub.co/embed/referrals/faq.tsx@@ -54,17 +54,20 @@ export function ReferralsEmbedFAQ({];return (<motion.div- className="rounded-lg border border-neutral-100 bg-white px-4 py-2 sm:px-8 sm:py-4"+ className="border-border-muted bg-bg-default rounded-lg border px-4 py-2 sm:px-8 sm:py-4"{...TAB_ITEM_ANIMATION_SETTINGS}><Accordion type="multiple">{items.map((item, idx) => (<AccordionItem key={idx} value={idx.toString()}>- <AccordionTrigger className="py-2 text-neutral-700" variant="plus">+ <AccordionTrigger+ className="text-content-default py-2"+ variant="plus"+ ><h3 className="text-left text-sm sm:text-base">{item.title}</h3></AccordionTrigger><AccordionContent>- <BlockMarkdown className="py-2 text-left text-sm text-neutral-500 sm:text-base">+ <BlockMarkdown className="text-content-subtle py-2 text-left text-sm sm:text-base">{item.content}</BlockMarkdown></AccordionContent>diff --git a/apps/web/app/app.dub.co/embed/referrals/leaderboard.tsx b/apps/web/app/app.dub.co/embed/referrals/leaderboard.tsxindex e221298eaf..c27b9a4fd9 100644--- a/apps/web/app/app.dub.co/embed/referrals/leaderboard.tsx+++ b/apps/web/app/app.dub.co/embed/referrals/leaderboard.tsx@@ -33,7 +33,7 @@ export function ReferralsEmbedLeaderboard() {<CrownclassName={cn("size-4", {"text-amber-400": row.index === 0,- "text-neutral-400": row.index === 1,+ "text-content-muted": row.index === 1,"text-yellow-900": row.index === 2,})}/>@@ -66,8 +66,8 @@ export function ReferralsEmbedLeaderboard() {description="No partners have been added to this program yet."cardContent={() => (<>- <Users className="size-4 text-neutral-700" />- <div className="h-2.5 w-24 min-w-0 rounded-sm bg-neutral-200" />+ <Users className="text-content-default size-4" />+ <div className="bg-bg-emphasis h-2.5 w-24 min-w-0 rounded-sm" /></>)}className="border-none md:min-h-fit"@@ -80,7 +80,7 @@ export function ReferralsEmbedLeaderboard() {return (<motion.div- className="relative rounded-md border border-neutral-200"+ className="border-border-subtle relative rounded-md border"{...TAB_ITEM_ANIMATION_SETTINGS}><Tablediff --git a/apps/web/app/app.dub.co/embed/referrals/loading.tsx b/apps/web/app/app.dub.co/embed/referrals/loading.tsxindex fb92714d2e..5be426c29e 100644--- a/apps/web/app/app.dub.co/embed/referrals/loading.tsx+++ b/apps/web/app/app.dub.co/embed/referrals/loading.tsx@@ -5,21 +5,21 @@ export default function EmbedInlineLoading() {return (<div className="flex min-h-screen flex-col"><div className="p-5">- <div className="relative flex flex-col overflow-hidden rounded-lg border border-neutral-300 p-4 md:p-6">+ <div className="border-border-default relative flex flex-col overflow-hidden rounded-lg border p-4 md:p-6"><HeroBackground color="#737373" />- <span className="flex items-center gap-2 text-sm text-neutral-500">+ <span className="text-content-subtle flex items-center gap-2 text-sm"><MoneyBill className="size-4" />Refer and earn</span><div className="relative mt-16 flex flex-col gap-2">- <div className="h-6 w-60 rounded-md bg-neutral-50" />- <div className="h-6 w-40 rounded-md bg-neutral-50" />+ <div className="bg-bg-muted h-6 w-60 rounded-md" />+ <div className="bg-bg-muted h-6 w-40 rounded-md" /></div><span className="mb-1.5 mt-6 block text-sm text-neutral-800">Referral link</span><div className="xs:flex-row relative flex flex-col items-center gap-2">- <div className="xs:w-60 h-10 w-full rounded-md border border-neutral-300 bg-neutral-50" />+ <div className="xs:w-60 border-border-default bg-bg-muted h-10 w-full rounded-md border" /><Buttonicon={<Copy className="size-4" />}text="Copy link"@@ -30,19 +30,19 @@ export default function EmbedInlineLoading() {<ahref="https://dub.partners"target="_blank"- className="mt-4 flex items-center justify-center gap-1.5 text-neutral-500 transition-colors duration-75 hover:text-neutral-700 md:absolute md:bottom-3 md:right-3 md:mt-0 md:translate-x-0"+ className="hover:text-content-default text-content-subtle mt-4 flex items-center justify-center gap-1.5 transition-colors duration-75 md:absolute md:bottom-3 md:right-3 md:mt-0 md:translate-x-0"><p className="text-xs font-medium">Powered by</p>- <Wordmark className="h-3.5 text-neutral-900" />+ <Wordmark className="text-content-emphasis h-3.5" /></a></div><div className="mt-4 grid gap-2 sm:h-32 sm:grid-cols-3">- <div className="h-full w-full rounded-lg border border-neutral-200 bg-neutral-50 sm:col-span-2" />- <div className="h-full w-full rounded-lg border border-neutral-200 bg-neutral-50" />+ <div className="border-border-subtle bg-bg-muted h-full w-full rounded-lg border sm:col-span-2" />+ <div className="border-border-subtle bg-bg-muted h-full w-full rounded-lg border" /></div><div className="mt-4">- <div className="h-10 w-full rounded-lg border border-neutral-200 bg-neutral-50" />- <div className="my-4 h-80 w-full rounded-lg border border-neutral-100 p-2" />+ <div className="border-border-subtle bg-bg-muted h-10 w-full rounded-lg border" />+ <div className="border-border-muted my-4 h-80 w-full rounded-lg border p-2" /></div></div></div>diff --git a/apps/web/app/app.dub.co/embed/referrals/page-client.tsx b/apps/web/app/app.dub.co/embed/referrals/page-client.tsxindex e4a7266cbb..8832a012a0 100644--- a/apps/web/app/app.dub.co/embed/referrals/page-client.tsx+++ b/apps/web/app/app.dub.co/embed/referrals/page-client.tsx@@ -53,7 +53,7 @@ export function ReferralsEmbedPageClient({return (<div- className="flex min-h-screen flex-col"+ className="dark flex min-h-screen flex-col bg-black"style={{ "--accent-color": program.brandColor || "#a8a8a8" } as CSSProperties}@@ -61,14 +61,14 @@ export function ReferralsEmbedPageClient({<div className="p-5"><div className="border-border-default relative flex flex-col overflow-hidden rounded-lg border p-4 md:p-6"><HeroBackground logo={program.logo} color={program.brandColor} />- <span className="flex items-center gap-2 text-sm text-neutral-500">+ <span className="text-content-subtle flex items-center gap-2 text-sm"><MoneyBill className="size-4" />Refer and earn</span>- <div className="relative mt-16 text-lg text-neutral-900 sm:max-w-[50%]">+ <div className="text-content-emphasis relative mt-16 text-lg sm:max-w-[50%]"><ProgramRewardDescription reward={reward} discount={discount} /></div>- <span className="mb-1.5 mt-6 block text-sm text-neutral-800">+ <span className="text-content-default mb-1.5 mt-6 block text-sm">Referral link</span><div className="xs:flex-row relative flex flex-col items-center gap-2">@@ -76,7 +76,7 @@ export function ReferralsEmbedPageClient({type="text"readOnlyvalue={getPrettyUrl(links[0].shortLink)}- className="xs:w-auto h-10 w-full rounded-md border border-neutral-300 px-3 text-sm focus:border-neutral-500 focus:outline-none focus:ring-neutral-500 lg:min-w-64 xl:min-w-72"+ className="xs:w-auto border-border-default text-content-default focus:border-border-emphasis bg-bg-default h-10 w-full rounded-md border px-3 text-sm focus:outline-none focus:ring-neutral-500 lg:min-w-64 xl:min-w-72"/><Buttonicon={@@ -108,12 +108,12 @@ export function ReferralsEmbedPageClient({<ahref="https://dub.partners"target="_blank"- className="flex w-fit items-center gap-1.5 rounded-md border border-black/10 bg-white px-2 py-1 text-neutral-500 transition-colors duration-75 hover:text-neutral-700"+ className="hover:text-content-default text-content-subtle bg-bg-default flex w-fit items-center gap-1.5 rounded-md border border-black/10 px-2 py-1 transition-colors duration-75"><p className="whitespace-nowrap text-xs font-medium leading-none">Powered by</p>- <Wordmark className="h-3.5 text-neutral-900" />+ <Wordmark className="text-content-emphasis h-3.5" /></a></div></div>@@ -135,9 +135,9 @@ export function ReferralsEmbedPageClient({selectAction={(option) => {setSelectedTab(option);}}- className="w-full rounded-lg bg-neutral-50"+ className="bg-bg-muted w-full rounded-lg"optionClassName="w-full flex justify-center py-1.5"- indicatorClassName="bg-white"+ indicatorClassName="bg-bg-default"/><div className="my-4"><AnimatePresence mode="wait">diff --git a/apps/web/app/app.dub.co/embed/referrals/payouts.tsx b/apps/web/app/app.dub.co/embed/referrals/payouts.tsxindex 533c83a102..4b0a8458cb 100644--- a/apps/web/app/app.dub.co/embed/referrals/payouts.tsx+++ b/apps/web/app/app.dub.co/embed/referrals/payouts.tsx@@ -8,10 +8,10 @@ export function ReferralsEmbedPayouts({payouts: { status: PayoutStatus; amount: number }[];}) {return (- <div className="flex flex-col justify-between gap-4 rounded-lg border border-neutral-200 bg-white p-4">+ <div className="border-border-subtle bg-bg-default flex flex-col justify-between gap-4 rounded-lg border p-4"><div className="flex items-center justify-between"><div className="flex items-center gap-1">- <p className="text-sm text-neutral-500">Payouts</p>+ <p className="text-content-subtle text-sm">Payouts</p><InfoTooltip content="Payouts are processed at the start of each month. Your earnings are automatically transferred to your bank account." /></div><a href="https://partners.dub.co/register" target="_blank">@@ -38,8 +38,8 @@ export function ReferralsEmbedPayouts({},].map(({ label, value }) => (<div key={label} className="flex justify-between text-sm">- <span className="font-medium text-neutral-500">{label}</span>- <span className="font-semibold text-neutral-700">+ <span className="text-content-subtle font-medium">{label}</span>+ <span className="text-content-default font-semibold">{currencyFormatter(value / 100, {style: "currency",currency: "USD",diff --git a/apps/web/app/app.dub.co/embed/referrals/quickstart.tsx b/apps/web/app/app.dub.co/embed/referrals/quickstart.tsxindex c2b32bcefd..19fbfa43be 100644--- a/apps/web/app/app.dub.co/embed/referrals/quickstart.tsx+++ b/apps/web/app/app.dub.co/embed/referrals/quickstart.tsx@@ -13,7 +13,7 @@ import {import { cn, DUB_LOGO, TAB_ITEM_ANIMATION_SETTINGS } from "@dub/utils";import { motion } from "framer-motion";-const BUTTON_CLASSNAME = "h-9 rounded-lg bg-neutral-900 hover:bg-neutral-800";+const BUTTON_CLASSNAME = "h-9 rounded-lg bg-bg-inverted hover:bg-neutral-800";export function ReferralsEmbedQuickstart({program,@@ -90,7 +90,7 @@ export function ReferralsEmbedQuickstart({return (<motion.div- className="rounded-lg border border-neutral-100 bg-white p-2"+ className="border-border-muted bg-bg-default rounded-lg border p-2"{...TAB_ITEM_ANIMATION_SETTINGS}>{isMobile ? (@@ -99,11 +99,13 @@ export function ReferralsEmbedQuickstart({{items.map((item) => (<CarouselItemkey={item.title}- className="flex flex-col items-center justify-between gap-4 rounded-lg bg-neutral-50 p-8 text-center"+ className="bg-bg-muted flex flex-col items-center justify-between gap-4 rounded-lg p-8 text-center">{item.illustration}- <h3 className="text-lg font-medium">{item.title}</h3>- <p className="text-pretty text-sm text-neutral-500">+ <h3 className="text-content-emphasis text-lg font-medium">+ {item.title}+ </h3>+ <p className="text-content-subtle text-pretty text-sm">{item.description}</p>{item.cta}@@ -117,11 +119,13 @@ export function ReferralsEmbedQuickstart({{items.map((item) => (<divkey={item.title}- className="flex flex-col items-center justify-between gap-4 rounded-lg bg-neutral-50 p-8 text-center"+ className="bg-bg-muted flex flex-col items-center justify-between gap-4 rounded-lg p-8 text-center">{item.illustration}- <h3 className="text-lg font-medium">{item.title}</h3>- <p className="text-pretty text-sm text-neutral-500">+ <h3 className="text-content-emphasis text-lg font-medium">+ {item.title}+ </h3>+ <p className="text-content-subtle text-pretty text-sm">{item.description}</p>{item.cta}diff --git a/packages/tailwind-config/tailwind.config.ts b/packages/tailwind-config/tailwind.config.tsindex 173b6ec2c9..0145072aea 100644--- a/packages/tailwind-config/tailwind.config.ts+++ b/packages/tailwind-config/tailwind.config.ts@@ -206,32 +206,32 @@ const config: Config = {// Light/dark mode colors- "bg-emphasis": "var(--bg-emphasis)",- "bg-default": "var(--bg-default)",- "bg-subtle": "var(--bg-subtle)",- "bg-muted": "var(--bg-muted)",- "bg-inverted": "var(--bg-inverted)",+ "bg-emphasis": "var(--bg-emphasis, #e5e5e5)",+ "bg-default": "var(--bg-default, #ffffff)",+ "bg-subtle": "var(--bg-subtle, #f5f5f5)",+ "bg-muted": "var(--bg-muted, #fafafa)",+ "bg-inverted": "var(--bg-inverted, #171717)",- "bg-info": "var(--bg-info)",- "bg-success": "var(--bg-success)",- "bg-attention": "var(--bg-attention)",- "bg-error": "var(--bg-error)",+ "bg-info": "var(--bg-info, #dbeafe)",+ "bg-success": "var(--bg-success, #dcfce7)",+ "bg-attention": "var(--bg-attention, #ffedd4)",+ "bg-error": "var(--bg-error, #ffe2e2)",- "border-emphasis": "var(--border-emphasis)",- "border-default": "var(--border-default)",- "border-muted": "var(--border-muted)",- "border-subtle": "var(--border-subtle)",+ "border-emphasis": "var(--border-emphasis, #a1a1a1)",+ "border-default": "var(--border-default, #d4d4d4)",+ "border-subtle": "var(--border-subtle, #e5e5e5)",+ "border-muted": "var(--border-muted, #f5f5f5)",- "content-inverted": "var(--content-inverted)",- "content-muted": "var(--content-muted)",- "content-subtle": "var(--content-subtle)",- "content-default": "var(--content-default)",- "content-emphasis": "var(--content-emphasis)",+ "content-inverted": "var(--content-inverted, #ffffff)",+ "content-muted": "var(--content-muted, #a1a1a1)",+ "content-subtle": "var(--content-subtle, #737373)",+ "content-default": "var(--content-default, #404040)",+ "content-emphasis": "var(--content-emphasis, #171717)",- "content-info": "var(--content-info)",- "content-success": "var(--content-success)",- "content-attention": "var(--content-attention)",- "content-error": "var(--content-error)",+ "content-info": "var(--content-info, #1447e6)",+ "content-success": "var(--content-success, #008236)",+ "content-attention": "var(--content-attention, #ca3500)",+ "content-error": "var(--content-error, #c10007)",},dropShadow: {"card-hover": ["0 8px 12px #222A350d", "0 32px 80px #2f30370f"],diff --git a/packages/ui/src/toggle-group.tsx b/packages/ui/src/toggle-group.tsxindex 703b3d5d22..cb08a3a2c5 100644--- a/packages/ui/src/toggle-group.tsx+++ b/packages/ui/src/toggle-group.tsx@@ -34,7 +34,7 @@ export function ToggleGroup({<motion.divlayoutclassName={cn(- "relative inline-flex items-center gap-1 rounded-xl border border-neutral-200 bg-white p-1",+ "border-border-subtle bg-bg-default relative inline-flex items-center gap-1 rounded-xl border p-1",className,)}style={style}@@ -45,9 +45,9 @@ export function ToggleGroup({type="button"data-selected={option.value === selected}className={cn(- "relative z-10 flex items-center gap-2 px-3 py-1 text-sm font-medium capitalize",+ "text-content-emphasis relative z-10 flex items-center gap-2 px-3 py-1 text-sm font-medium capitalize",{- "z-[11] transition-colors hover:text-neutral-500":+ "hover:text-content-subtle z-[11] transition-colors":option.value !== selected,},optionClassName,@@ -64,7 +64,7 @@ export function ToggleGroup({<motion.divlayoutId={layoutGroupId}className={cn(- "absolute left-0 top-0 -z-[1] h-full w-full rounded-lg border border-neutral-200 bg-neutral-50",+ "border-border-subtle bg-bg-muted absolute left-0 top-0 -z-[1] h-full w-full rounded-lg border",indicatorClassName,)}transition={{ duration: 0.25 }}