The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
WIP
Tim Wilson00311a6a7f9b
diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/layout.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/layout.tsxindex 1528aae23f..40af67a0ab 100644--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/layout.tsx+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/layout.tsx@@ -1,4 +1,5 @@import SettingsLayout from "@/ui/layout/settings-layout";+import { Gear2, Globe, Key, Receipt2, ShieldCheck, Users6 } from "@dub/ui";import { ReactNode } from "react";export default function WorkspaceSettingsLayout({@@ -9,22 +10,32 @@ export default function WorkspaceSettingsLayout({const tabs = [{name: "General",+ icon: Gear2,segment: null,},+ {+ name: "Domains",+ icon: Globe,+ segment: "domains",+ },{name: "Billing",+ icon: Receipt2,segment: "billing",},{name: "People",+ icon: Users6,segment: "people",},{name: "API Keys",+ icon: Key,segment: "tokens",},{name: "Security",+ icon: ShieldCheck,segment: "security",},];diff --git a/apps/web/app/app.dub.co/(dashboard)/settings/layout.tsx b/apps/web/app/app.dub.co/(dashboard)/settings/layout.tsxindex 6483e5ae05..4e9b215193 100644--- a/apps/web/app/app.dub.co/(dashboard)/settings/layout.tsx+++ b/apps/web/app/app.dub.co/(dashboard)/settings/layout.tsx@@ -1,4 +1,5 @@import SettingsLayout from "@/ui/layout/settings-layout";+import { Gear2, Key } from "@dub/ui";import { ReactNode } from "react";export default function PersonalSettingsLayout({@@ -9,10 +10,12 @@ export default function PersonalSettingsLayout({const tabs = [{name: "General",+ icon: Gear2,segment: null,},{name: "API Keys",+ icon: Key,segment: "tokens",},];diff --git a/apps/web/ui/layout/settings-layout.tsx b/apps/web/ui/layout/settings-layout.tsxindex 23c3db46fe..a75b2c5f5b 100644--- a/apps/web/ui/layout/settings-layout.tsx+++ b/apps/web/ui/layout/settings-layout.tsx@@ -1,5 +1,5 @@import NavLink from "@/ui/layout/settings-nav-link";-import { MaxWidthWrapper } from "@dub/ui";+import { Icon, MaxWidthWrapper } from "@dub/ui";import { ReactNode } from "react";export default function SettingsLayout({@@ -8,6 +8,7 @@ export default function SettingsLayout({}: {tabs: {name: string;+ icon: Icon;segment: string | null;}[];children: ReactNode;@@ -25,8 +26,10 @@ export default function SettingsLayout({</div><MaxWidthWrapper className="grid items-start gap-5 py-10 lg:grid-cols-5"><div className="top-36 flex gap-1 lg:sticky lg:grid">- {tabs.map(({ name, segment }) => (- <NavLink segment={segment}>{name}</NavLink>+ {tabs.map(({ name, segment, icon }) => (+ <NavLink segment={segment} icon={icon}>+ {name}+ </NavLink>))}</div><div className="grid gap-5 lg:col-span-4">{children}</div>diff --git a/apps/web/ui/layout/settings-nav-link.tsx b/apps/web/ui/layout/settings-nav-link.tsxindex 6142a64895..5d29f06ab1 100644--- a/apps/web/ui/layout/settings-nav-link.tsx+++ b/apps/web/ui/layout/settings-nav-link.tsx@@ -1,5 +1,6 @@"use client";+import { Icon } from "@dub/ui";import { cn } from "@dub/utils";import Link from "next/link";import { useParams, useSelectedLayoutSegment } from "next/navigation";@@ -7,9 +8,11 @@ import { ReactNode } from "react";export default function NavLink({segment,+ icon: Icon,children,}: {segment: string | null;+ icon: Icon;children: ReactNode;}) {const selectedLayoutSegment = useSelectedLayoutSegment();@@ -21,17 +24,28 @@ export default function NavLink({segment ? `/${segment}` : ""}`;+ const isSelected = selectedLayoutSegment === segment;+return (<Linkkey={href}href={href}className={cn(- "rounded-md p-2.5 text-sm transition-all duration-75 hover:bg-gray-100 active:bg-gray-200",- {- "font-semibold text-black": selectedLayoutSegment === segment,- },+ "flex items-center gap-2.5 rounded-lg p-2 text-sm text-gray-950 outline-none transition-all duration-75",+ "ring-black/50 focus-visible:ring-2",+ isSelected+ ? "bg-gray-950/5"+ : "hover:bg-gray-950/5 active:bg-gray-950/10",)}>+ {Icon && (+ <Icon+ className={cn(+ "h-4 w-4",+ isSelected ? "text-gray-950" : "text-gray-700",+ )}+ />+ )}{children}</Link>);diff --git a/packages/ui/src/icons/index.tsx b/packages/ui/src/icons/index.tsxindex 20514c75bf..ee91290d1f 100644--- a/packages/ui/src/icons/index.tsx+++ b/packages/ui/src/icons/index.tsx@@ -1,3 +1,6 @@+import { LucideIcon } from "lucide-react";+import { ComponentType, SVGProps } from "react";+// custom iconsexport { default as Copy } from "./copy";export { default as ExpandingArrow } from "./expanding-arrow";@@ -24,3 +27,5 @@ export { default as YouTube } from "./youtube";// Nucleo iconsexport * from "./nucleo";++export type Icon = LucideIcon | ComponentType<SVGProps<SVGSVGElement>>;diff --git a/packages/ui/src/icons/nucleo/gear2.tsx b/packages/ui/src/icons/nucleo/gear2.tsxnew file mode 100644index 0000000000..9019a2430d--- /dev/null+++ b/packages/ui/src/icons/nucleo/gear2.tsx@@ -0,0 +1,185 @@+import { SVGProps } from "react";++export function Gear2(props: SVGProps<SVGSVGElement>) {+ return (+ <svg viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg" {...props}>+ <g fill="currentColor">+ <line+ fill="none"+ stroke="currentColor"+ strokeLinecap="round"+ strokeLinejoin="round"+ strokeWidth="1.5"+ x1="6.25"+ x2="9"+ y1="4.237"+ y2="9"+ />+ <line+ fill="none"+ stroke="currentColor"+ strokeLinecap="round"+ strokeLinejoin="round"+ strokeWidth="1.5"+ x1="6.25"+ x2="9"+ y1="13.764"+ y2="9"+ />+ <line+ fill="none"+ stroke="currentColor"+ strokeLinecap="round"+ strokeLinejoin="round"+ strokeWidth="1.5"+ x1="14.5"+ x2="9"+ y1="9"+ y2="9"+ />+ <line+ fill="none"+ stroke="currentColor"+ strokeLinecap="round"+ strokeLinejoin="round"+ strokeWidth="1.5"+ x1="9"+ x2="9"+ y1="1.75"+ y2="3.5"+ />+ <line+ fill="none"+ stroke="currentColor"+ strokeLinecap="round"+ strokeLinejoin="round"+ strokeWidth="1.5"+ x1="2.721"+ x2="4.237"+ y1="5.375"+ y2="6.25"+ />+ <line+ fill="none"+ stroke="currentColor"+ strokeLinecap="round"+ strokeLinejoin="round"+ strokeWidth="1.5"+ x1="1.75"+ x2="3.5"+ y1="9"+ y2="9"+ />+ <line+ fill="none"+ stroke="currentColor"+ strokeLinecap="round"+ strokeLinejoin="round"+ strokeWidth="1.5"+ x1="16.25"+ x2="14.5"+ y1="9"+ y2="9"+ />+ <line+ fill="none"+ stroke="currentColor"+ strokeLinecap="round"+ strokeLinejoin="round"+ strokeWidth="1.5"+ x1="2.721"+ x2="4.237"+ y1="12.625"+ y2="11.75"+ />+ <line+ fill="none"+ stroke="currentColor"+ strokeLinecap="round"+ strokeLinejoin="round"+ strokeWidth="1.5"+ x1="9"+ x2="9"+ y1="16.25"+ y2="14.5"+ />+ <line+ fill="none"+ stroke="currentColor"+ strokeLinecap="round"+ strokeLinejoin="round"+ strokeWidth="1.5"+ x1="12.625"+ x2="11.75"+ y1="15.279"+ y2="13.763"+ />+ <line+ fill="none"+ stroke="currentColor"+ strokeLinecap="round"+ strokeLinejoin="round"+ strokeWidth="1.5"+ x1="5.375"+ x2="6.25"+ y1="15.279"+ y2="13.763"+ />+ <line+ fill="none"+ stroke="currentColor"+ strokeLinecap="round"+ strokeLinejoin="round"+ strokeWidth="1.5"+ x1="15.279"+ x2="13.763"+ y1="12.625"+ y2="11.75"+ />+ <line+ fill="none"+ stroke="currentColor"+ strokeLinecap="round"+ strokeLinejoin="round"+ strokeWidth="1.5"+ x1="15.279"+ x2="13.763"+ y1="5.375"+ y2="6.25"+ />+ <line+ fill="none"+ stroke="currentColor"+ strokeLinecap="round"+ strokeLinejoin="round"+ strokeWidth="1.5"+ x1="12.625"+ x2="11.75"+ y1="2.721"+ y2="4.237"+ />+ <line+ fill="none"+ stroke="currentColor"+ strokeLinecap="round"+ strokeLinejoin="round"+ strokeWidth="1.5"+ x1="5.375"+ x2="6.25"+ y1="2.721"+ y2="4.237"+ />+ <circle+ cx="9"+ cy="9"+ fill="none"+ r="5.5"+ stroke="currentColor"+ strokeLinecap="round"+ strokeLinejoin="round"+ strokeWidth="1.5"+ />+ </g>+ </svg>+ );+}diff --git a/packages/ui/src/icons/nucleo/index.ts b/packages/ui/src/icons/nucleo/index.tsindex 2cd4f05d13..0a89851c56 100644--- a/packages/ui/src/icons/nucleo/index.ts+++ b/packages/ui/src/icons/nucleo/index.ts@@ -7,6 +7,7 @@ export * from "./filter-bars";export * from "./flag-wavy";export * from "./gaming-console";export * from "./gear";+export * from "./gear2";export * from "./globe";export * from "./hyperlink";export * from "./invoice-dollar";@@ -14,10 +15,13 @@ export * from "./key";export * from "./mobile-phone";export * from "./office-building";export * from "./qrcode";+export * from "./receipt2";export * from "./referred-via";+export * from "./shield-check";export * from "./sliders";export * from "./tablet";export * from "./tag";export * from "./tv";+export * from "./users6";export * from "./watch";export * from "./window";diff --git a/packages/ui/src/icons/nucleo/receipt2.tsx b/packages/ui/src/icons/nucleo/receipt2.tsxnew file mode 100644index 0000000000..ffcecc8e52--- /dev/null+++ b/packages/ui/src/icons/nucleo/receipt2.tsx@@ -0,0 +1,73 @@+import { SVGProps } from "react";++export function Receipt2(props: SVGProps<SVGSVGElement>) {+ return (+ <svg viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg" {...props}>+ <g fill="currentColor">+ <line+ fill="none"+ stroke="currentColor"+ strokeLinecap="round"+ strokeLinejoin="round"+ strokeWidth="1.5"+ x1="16.25"+ x2="1.75"+ y1="2.75"+ y2="2.75"+ />+ <line+ fill="none"+ stroke="currentColor"+ strokeLinecap="round"+ strokeLinejoin="round"+ strokeWidth="1.5"+ x1="5.75"+ x2="9.25"+ y1="11.25"+ y2="11.25"+ />+ <line+ fill="none"+ stroke="currentColor"+ strokeLinecap="round"+ strokeLinejoin="round"+ strokeWidth="1.5"+ x1="5.75"+ x2="9.25"+ y1="8.25"+ y2="8.25"+ />+ <line+ fill="none"+ stroke="currentColor"+ strokeLinecap="round"+ strokeLinejoin="round"+ strokeWidth="1.5"+ x1="11.75"+ x2="12.25"+ y1="11.25"+ y2="11.25"+ />+ <line+ fill="none"+ stroke="currentColor"+ strokeLinecap="round"+ strokeLinejoin="round"+ strokeWidth="1.5"+ x1="11.75"+ x2="12.25"+ y1="8.25"+ y2="8.25"+ />+ <polyline+ fill="none"+ points="14.75 5.75 14.75 16.25 12 14.75 9 16.25 6 14.75 3.25 16.25 3.25 5.75"+ stroke="currentColor"+ strokeLinecap="round"+ strokeLinejoin="round"+ strokeWidth="1.5"+ />+ </g>+ </svg>+ );+}diff --git a/packages/ui/src/icons/nucleo/shield-check.tsx b/packages/ui/src/icons/nucleo/shield-check.tsxnew file mode 100644index 0000000000..cd68b7281b--- /dev/null+++ b/packages/ui/src/icons/nucleo/shield-check.tsx@@ -0,0 +1,32 @@+import { SVGProps } from "react";++export function ShieldCheck(props: SVGProps<SVGSVGElement>) {+ return (+ <svg+ height="18"+ width="18"+ viewBox="0 0 18 18"+ xmlns="http://www.w3.org/2000/svg"+ {...props}+ >+ <g fill="currentColor">+ <path+ d="M9.305,1.848l5.25,1.68c.414,.133,.695,.518,.695,.952v6.52c0,3.03-4.684,4.748-5.942,5.155-.203,.066-.413,.066-.616,0-1.258-.407-5.942-2.125-5.942-5.155V4.48c0-.435,.281-.82,.695-.952l5.25-1.68c.198-.063,.411-.063,.61,0Z"+ fill="none"+ stroke="currentColor"+ strokeLinecap="round"+ strokeLinejoin="round"+ strokeWidth="1.5"+ />+ <polyline+ fill="none"+ points="6.497 9.75 8.106 11.25 11.503 6.75"+ stroke="currentColor"+ strokeLinecap="round"+ strokeLinejoin="round"+ strokeWidth="1.5"+ />+ </g>+ </svg>+ );+}diff --git a/packages/ui/src/icons/nucleo/users6.tsx b/packages/ui/src/icons/nucleo/users6.tsxnew file mode 100644index 0000000000..bad3296ff4--- /dev/null+++ b/packages/ui/src/icons/nucleo/users6.tsx@@ -0,0 +1,70 @@+import { SVGProps } from "react";++export function Users6(props: SVGProps<SVGSVGElement>) {+ return (+ <svg+ height="18"+ width="18"+ viewBox="0 0 18 18"+ xmlns="http://www.w3.org/2000/svg"+ {...props}+ >+ <g fill="currentColor">+ <circle+ cx="9"+ cy="7"+ fill="none"+ r="2"+ stroke="currentColor"+ strokeLinecap="round"+ strokeLinejoin="round"+ strokeWidth="1.5"+ />+ <circle+ cx="13.75"+ cy="3.25"+ fill="none"+ r="1.5"+ stroke="currentColor"+ strokeLinecap="round"+ strokeLinejoin="round"+ strokeWidth="1.5"+ />+ <circle+ cx="4.25"+ cy="3.25"+ fill="none"+ r="1.5"+ stroke="currentColor"+ strokeLinecap="round"+ strokeLinejoin="round"+ strokeWidth="1.5"+ />+ <path+ d="M5.801,15.776c-.489-.148-.818-.635-.709-1.135,.393-1.797,1.993-3.142,3.908-3.142s3.515,1.345,3.908,3.142c.109,.499-.219,.987-.709,1.135-.821,.248-1.911,.474-3.199,.474s-2.378-.225-3.199-.474Z"+ fill="none"+ stroke="currentColor"+ strokeLinecap="round"+ strokeLinejoin="round"+ strokeWidth="1.5"+ />+ <path+ d="M13.584,7.248c.055-.002,.11-.004,.166-.004,1.673,0,3.079,1.147,3.473,2.697,.13,.511-.211,1.02-.718,1.167-.643,.186-1.457,.352-2.403,.385"+ fill="none"+ stroke="currentColor"+ strokeLinecap="round"+ strokeLinejoin="round"+ strokeWidth="1.5"+ />+ <path+ d="M4.416,7.248c-.055-.002-.11-.004-.166-.004-1.673,0-3.079,1.147-3.473,2.697-.13,.511,.211,1.02,.718,1.167,.643,.186,1.457,.352,2.403,.385"+ fill="none"+ stroke="currentColor"+ strokeLinecap="round"+ strokeLinejoin="round"+ strokeWidth="1.5"+ />+ </g>+ </svg>+ );+}