From 4adf7a7659a46a78934e84fd780d904394db7427 Mon Sep 17 00:00:00 2001 From: mawkone Date: Fri, 15 May 2026 15:49:01 -0700 Subject: [PATCH] feat(ui): remove design tab from primary navigation --- .../[projectId]/(home)/design-system/page.tsx | 11 - .../components/project/design-kit-panels.tsx | 670 ------------------ .../project/design-system-explorer.tsx | 233 ------ .../components/project/project-icon-rail.tsx | 1 - 4 files changed, 915 deletions(-) delete mode 100644 vibn-frontend/app/[workspace]/project/[projectId]/(home)/design-system/page.tsx delete mode 100644 vibn-frontend/components/project/design-kit-panels.tsx delete mode 100644 vibn-frontend/components/project/design-system-explorer.tsx diff --git a/vibn-frontend/app/[workspace]/project/[projectId]/(home)/design-system/page.tsx b/vibn-frontend/app/[workspace]/project/[projectId]/(home)/design-system/page.tsx deleted file mode 100644 index ad627f75..00000000 --- a/vibn-frontend/app/[workspace]/project/[projectId]/(home)/design-system/page.tsx +++ /dev/null @@ -1,11 +0,0 @@ -"use client"; - -/** - * Design systems tab — UI kit / token documentation (reference layouts). - * Distinct from /design in (workspace), which is the scaffold & theme studio. - */ -import { DesignSystemExplorer } from "@/components/project/design-system-explorer"; - -export default function DesignSystemPage() { - return ; -} diff --git a/vibn-frontend/components/project/design-kit-panels.tsx b/vibn-frontend/components/project/design-kit-panels.tsx deleted file mode 100644 index 38a22b18..00000000 --- a/vibn-frontend/components/project/design-kit-panels.tsx +++ /dev/null @@ -1,670 +0,0 @@ -"use client"; - -/** - * Visual panels for the design kit explorer — all driven by ResolvedKitTokens - * so previews stay in sync with the user’s starter kit + overrides. - */ - -import type { CSSProperties, FC, ReactNode } from "react"; -import type { ResolvedKitTokens } from "@/lib/design-kits/resolve"; - -export interface KitSectionItemMeta { - id: string; - title: string; - subtitle?: string; - panelKey: string; -} - -export interface KitSectionMeta { - title: string; - items: KitSectionItemMeta[]; -} - -export const DESIGN_KIT_SECTIONS: KitSectionMeta[] = [ - { - title: "Type", - items: [ - { - id: "t-fw", - title: "Font Weights & Colors", - subtitle: "Weights + semantic text roles (starter font)", - panelKey: "fontWeights", - }, - { - id: "t-scale", - title: "Type Scale", - subtitle: "Pixel/rem steps matched to kit density", - panelKey: "typeScale", - }, - ], - }, - { - title: "Colors", - items: [ - { - id: "c-accent", - title: "Accent scale", - subtitle: "12-step ramp from your accent · CTAs, focus, links", - panelKey: "accentScale", - }, - { - id: "c-gray", - title: "Gray Scale", - subtitle: "12-step neutral — surfaces, borders, text", - panelKey: "grayScale", - }, - { - id: "c-semantic", - title: "Semantic Colors", - subtitle: "Status & tag hues (reference palette)", - panelKey: "semanticColors", - }, - ], - }, - { - title: "Spacing", - items: [ - { id: "s-radius", title: "Border Radius", subtitle: "Derived from radius token", panelKey: "radius" }, - { id: "s-shadow", title: "Box Shadows", subtitle: "Elevation system + focus line", panelKey: "shadows" }, - { id: "s-space", title: "Spacing Tokens", subtitle: "4px base unit spacing scale", panelKey: "spacing" }, - ], - }, - { - title: "Components", - items: [ - { id: "x-btn", title: "Buttons", subtitle: "Primary · accent · danger · ghost", panelKey: "buttons" }, - { id: "x-input", title: "Input Fields", subtitle: "Default · focus · error · disabled", panelKey: "inputs" }, - { id: "x-nav", title: "Navigation Items", subtitle: "Sidebar density preview", panelKey: "nav" }, - { id: "x-tag", title: "Tag Colors", subtitle: "Status chips", panelKey: "tags" }, - ], - }, - { - title: "Brand", - items: [ - { id: "b-icon", title: "Illustration Icons", subtitle: "Placeholder grid · swap with assets", panelKey: "illustrations" }, - { id: "b-logo", title: "Logo & Brand", subtitle: "Mark preview uses accent-on-neutral", panelKey: "logo" }, - ], - }, -]; - -const codeSm: CSSProperties = { - fontFamily: "var(--font-ibm-plex-mono), ui-monospace, monospace", - fontSize: "0.68rem", - color: "#52525b", -}; - -const panelMiniTitle: CSSProperties = { - fontSize: "0.65rem", - fontWeight: 700, - letterSpacing: "0.06em", - color: "#a1a1aa", - marginBottom: 10, -}; - -const inputBase: CSSProperties = { - width: "100%", - boxSizing: "border-box", - padding: "10px 12px", - borderRadius: 8, - border: "1px solid #e4e4e7", - fontSize: "0.82rem", - fontFamily: "inherit", - background: "#fff", -}; - -function densityPad(tokens: ResolvedKitTokens, base: number): number { - return tokens.density === "compact" ? Math.round(base * 0.88) : base; -} - -function SwatchRow({ colors, labels }: { colors: string[]; labels?: Record }) { - return ( -
- {colors.map((c, i) => ( -
-
-
{labels?.[i] ?? i + 1}
-
- ))} -
- ); -} - -export function FontWeightsPanel({ tokens }: { tokens: ResolvedKitTokens }) { - return ( -
-
-
Font weights
- {[ - ["400", "Regular — body, field values"], - ["500", "Medium — buttons, nav, labels"], - ["600", "Semibold — headings, CTAs"], - ].map(([w, desc]) => ( -
-
Aa {w}
-
{desc}
-
- ))} -
-
-
Semantic text colors
- {[ - ["primary", "#18181b", "Headings, record names"], - ["secondary", "#52525b", "Body, descriptions"], - ["tertiary", "#a1a1aa", "Labels, hints"], - ["accent", tokens.accentHex, "Links & emphasis"], - ["danger", "#dc2626", "Errors"], - ].map(([role, hex, desc]) => ( -
- {role} - Sample - {desc} -
- ))} -
-
- ); -} - -export function TypeScalePanel({ tokens }: { tokens: ResolvedKitTokens }) { - const scale = - tokens.density === "compact" - ? [ - { token: "--font-size-xxl", rem: "1.65rem", sample: "Hero title", note: "Hero" }, - { token: "--font-size-xl", rem: "1.38rem", sample: "Page title", note: "Page" }, - { token: "--font-size-lg", rem: "1.12rem", sample: "Section heading", note: "Section" }, - { token: "--font-size-md", rem: "0.94rem", sample: "Body — primary interface size", note: "Body" }, - { token: "--font-size-sm", rem: "0.85rem", sample: "Secondary label", note: "Meta" }, - { token: "--font-size-xs", rem: "0.78rem", sample: "Caption · nav", note: "Dense" }, - ] - : [ - { token: "--font-size-xxl", rem: "1.85rem", sample: "The Open-Source CRM", note: "Hero titles" }, - { token: "--font-size-xl", rem: "1.54rem", sample: "People & Companies", note: "Section titles" }, - { token: "--font-size-lg", rem: "1.23rem", sample: "Section heading", note: "Card headers" }, - { token: "--font-size-md", rem: "1rem", sample: "Body text — primary interface size", note: "Default UI copy" }, - { token: "--font-size-sm", rem: "0.92rem", sample: "Secondary label · timestamp", note: "Meta" }, - { token: "--font-size-xs", rem: "0.85rem", sample: "Caption · nav item", note: "Dense UI" }, - ]; - - const rowPad = densityPad(tokens, 12); - - return ( -
- {scale.map((r) => ( -
-
- {r.token} - {r.rem} -
-
- {r.sample} - {r.note} -
-
- ))} -
- ); -} - -export function AccentScalePanel({ tokens }: { tokens: ResolvedKitTokens }) { - const a = tokens.accentScale; - const md = tokens.radiusMdPx; - return ( -
- -
- - - - Link · accent {tokens.accentHex} - -
-
- ); -} - -export function GrayScalePanel({ tokens }: { tokens: ResolvedKitTokens }) { - return ( -
- -

- Neutrals for surfaces & typography — pair with your accent ramp above. -

-
- ); -} - -export function SemanticColorsPanel({ tokens }: { tokens: ResolvedKitTokens }) { - const named = [ - "red", - "orange", - "yellow", - "grass", - "green", - "cyan", - "blue", - "purple", - "crimson", - "amber", - "lime", - "jade", - "mint", - "iris", - "plum", - "pink", - ]; - const hues = [ - "#ef4444", - "#f97316", - "#eab308", - "#84cc16", - "#22c55e", - "#06b6d4", - "#3b82f6", - "#a855f7", - "#e11d48", - "#f59e0b", - "#65a30d", - "#059669", - "#14b8a6", - "#6366f1", - "#9333ea", - "#ec4899", - ]; - return ( -
-
- {named.map((n, i) => ( -
-
-
{n}
-
- ))} -
-
- {[ - ["Danger", "#fef2f2", "#dc2626"], - ["Success", "#f0fdf4", "#16a34a"], - ["Warning", "#fffbeb", "#ca8a04"], - ["Info", "#eff6ff", "#2563eb"], - ].map(([label, bg, fg]) => ( - - {label} - - ))} -
-

Reference hues for tags & status (not overridden by accent).

-
- ); -} - -export function RadiusPanel({ tokens }: { tokens: ResolvedKitTokens }) { - const rows = [ - { id: "radius-xs", px: tokens.radiusXs, use: "micro chips" }, - { id: "radius-sm", px: tokens.radiusSm, use: "inputs, buttons" }, - { id: "radius-md", px: tokens.radiusMdPx, use: "cards, dropdowns" }, - { id: "radius-xl", px: tokens.radiusXl, use: "large panels" }, - { id: "radius-xxl", px: tokens.radiusXxl, use: "hero surfaces" }, - { id: "radius-pill", px: 999, use: "tags" }, - { id: "radius-full", px: 100, use: "avatars" }, - ]; - const fill = tokens.accentScale[3] ?? "#eceeff"; - return ( -
- {rows.map((x) => ( -
-
= 100 ? "50%" : x.px, - }} - /> -
{x.id}
-
{x.use}
-
- ))} -
- ); -} - -export function ShadowsPanel({ tokens }: { tokens: ResolvedKitTokens }) { - const focus = tokens.accentHex; - const cards = [ - { id: "shadow-light", desc: "Buttons, rows", shadow: "0 1px 2px rgba(0,0,0,0.05)" }, - { id: "shadow-strong", desc: "Dropdowns", shadow: "0 4px 16px rgba(0,0,0,0.08)" }, - { id: "shadow-super-heavy", desc: "Modals", shadow: "0 12px 48px rgba(0,0,0,0.12)" }, - { id: "shadow-underline", desc: "Focus line", shadow: `inset 0 -2px 0 ${focus}` }, - ]; - return ( -
- {cards.map((c) => ( -
-
{c.id}
-
{c.desc}
-
- ))} -
- ); -} - -export function SpacingPanel({ tokens }: { tokens: ResolvedKitTokens }) { - const bar = tokens.accentScale[5] ?? "#9aa6ff"; - const steps = [ - [1, 4, "sibling gap min"], - [2, 8, "button padding"], - [3, 12, "sidebar gap"], - [4, 16, "section padding"], - [6, 24, "card padding"], - [8, 32, "large gap"], - [12, 48, "table row"], - [16, 64, "section spacer"], - ]; - return ( -
-
- SPACING — 4PX BASE · space(n) = n × 4px -
- {steps.map(([n, px, note]) => ( -
- space({n}) - {px}px -
-
-
- {note} -
- ))} -
- ); -} - -export function ButtonsPanel({ tokens }: { tokens: ResolvedKitTokens }) { - const a = tokens.accentScale; - const md = tokens.radiusMdPx; - const accent = a[8] ?? tokens.accentHex; - return ( -
-
Primary
-
- - - - -
-
Secondary · outlined
-
- - -
-
Tertiary · text
-
- - -
-
- ); -} - -function Field({ label, children }: { label: string; children: ReactNode }) { - return ( -
-
{label}
- {children} -
- ); -} - -export function InputsPanel({ tokens }: { tokens: ResolvedKitTokens }) { - const accent = tokens.accentHex; - const md = tokens.radiusMdPx; - return ( -
- - - - - - - - - - - - - - - - -