@behavioral-agentic-design-system/core 0.5.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +15 -8
- package/scripts/build-fonts.cjs +90 -0
- package/scripts/build-tokens.cjs +84 -8
- package/src/api/brand-fonts.ts +280 -0
- package/src/api/brand-mark.ts +146 -0
- package/src/api/layers/file.ts +4 -2
- package/src/api/layers.ts +23 -1
- package/src/app/font-ready.tsx +1 -1
- package/src/app/layout.tsx +3 -9
- package/src/app/preview/cards/page.tsx +1 -1
- package/src/app/preview/login/page.tsx +5 -0
- package/src/app/shell.tsx +90 -29
- package/src/components/admin-menu.stories.tsx +68 -0
- package/src/components/admin-menu.tsx +59 -0
- package/src/components/brand-mark.tsx +64 -0
- package/src/components/customize/brand-mark-section.tsx +265 -0
- package/src/components/customize/font-pickers.tsx +293 -0
- package/src/components/customize/save-bar.tsx +11 -5
- package/src/components/customize-tab.tsx +329 -24
- package/src/components/dev-identity-badge.tsx +92 -0
- package/src/components/home-tab.tsx +1022 -374
- package/src/components/layers-tab.tsx +38 -9
- package/src/components/ui/alert.tsx +10 -2
- package/src/components/ui/button.tsx +1 -1
- package/src/components/ui/calendar.tsx +1 -1
- package/src/components/ui/chart.tsx +13 -3
- package/src/components/ui/checkbox.tsx +1 -1
- package/src/components/ui/radio-group.tsx +1 -1
- package/src/components/ui/sidebar.tsx +6 -1
- package/src/components/ui/sonner.tsx +18 -0
- package/src/components/ui/switch.tsx +7 -1
- package/src/components/ui/tabs.tsx +1 -1
- package/src/hooks/use-global-brand-mark.ts +64 -0
- package/src/hooks/use-global-mono-font.ts +13 -3
- package/src/hooks/use-global-primary-color.ts +145 -8
- package/src/hooks/use-global-sans-font.ts +5 -3
- package/src/hooks/use-global-serif-font.ts +14 -4
- package/src/lib/storage.ts +31 -2
- package/src/lib/svg-sanitize.ts +272 -0
- package/src/styles.css +76 -46
- package/src/tokens.default.json +4 -4
- package/src/tokens.json +172 -78
|
@@ -32,6 +32,9 @@ import {
|
|
|
32
32
|
Combine,
|
|
33
33
|
GitCompare,
|
|
34
34
|
KeyRound,
|
|
35
|
+
ChevronRight,
|
|
36
|
+
MessageSquare,
|
|
37
|
+
Briefcase,
|
|
35
38
|
} from "lucide-react";
|
|
36
39
|
import { brand } from "@/brand.config";
|
|
37
40
|
import {
|
|
@@ -45,10 +48,24 @@ import { Badge } from "@behavioral-agentic-design-system/core/components/ui/badg
|
|
|
45
48
|
import { Button } from "@behavioral-agentic-design-system/core/components/ui/button";
|
|
46
49
|
import { Separator } from "@behavioral-agentic-design-system/core/components/ui/separator";
|
|
47
50
|
import { ScrollArea } from "@behavioral-agentic-design-system/core/components/ui/scroll-area";
|
|
51
|
+
import {
|
|
52
|
+
Dialog,
|
|
53
|
+
DialogContent,
|
|
54
|
+
DialogDescription,
|
|
55
|
+
DialogHeader,
|
|
56
|
+
DialogTitle,
|
|
57
|
+
DialogTrigger,
|
|
58
|
+
} from "@behavioral-agentic-design-system/core/components/ui/dialog";
|
|
59
|
+
import { BrandMark } from "@behavioral-agentic-design-system/core/components/brand-mark";
|
|
48
60
|
import registry from "@/layer-5-component-registry/component-registry.json";
|
|
49
61
|
import tokens from "@/packages/core/src/tokens.json";
|
|
50
62
|
import corePkg from "@/packages/core/package.json";
|
|
51
63
|
import { BadsUpdateBanner } from "@behavioral-agentic-design-system/core/components/bads-update-banner";
|
|
64
|
+
import { useShellNav } from "@behavioral-agentic-design-system/core/app/shell";
|
|
65
|
+
|
|
66
|
+
type HomeTabProps = {
|
|
67
|
+
onBrowseComponents?: () => void;
|
|
68
|
+
};
|
|
52
69
|
|
|
53
70
|
type RegistryEntry = {
|
|
54
71
|
usage?: string;
|
|
@@ -76,63 +93,128 @@ const SHIPPED_LAYERS = [
|
|
|
76
93
|
name: "Brand & Voice",
|
|
77
94
|
note: "framework, voice, microcopy",
|
|
78
95
|
status: "shipped",
|
|
96
|
+
details: [
|
|
97
|
+
"Ensures every surface feels like the same brand — consistency builds trust and makes the product feel intentional",
|
|
98
|
+
"Brand position, story, and platform (audience, vision, promise, values)",
|
|
99
|
+
"4 personality axes (Friendly, Daring, Radiant, Genuine)",
|
|
100
|
+
"Headline + microcopy banks with tone shifts by surface type",
|
|
101
|
+
],
|
|
79
102
|
},
|
|
80
103
|
{
|
|
81
104
|
n: "2",
|
|
82
105
|
name: "Ethics & Responsibility",
|
|
83
106
|
note: "decision trees, anti-patterns, AI ethics",
|
|
84
107
|
status: "shipped",
|
|
108
|
+
details: [
|
|
109
|
+
"Builds user trust and protects the brand from legal + reputational risk — responsible decisions compound into loyal users",
|
|
110
|
+
"5 ethical principles (Transparency, Equity, Privacy-First, Consent-Driven, Anti-Dark-Patterns)",
|
|
111
|
+
"9 anti-patterns we never ship",
|
|
112
|
+
"AI labeling + algorithmic transparency rules",
|
|
113
|
+
"Pre-commit ethics linter",
|
|
114
|
+
],
|
|
85
115
|
},
|
|
86
116
|
{
|
|
87
117
|
n: "3",
|
|
88
118
|
name: "Foundation",
|
|
89
119
|
note: "primitives, motion, icons, a11y",
|
|
90
120
|
status: "shipped",
|
|
121
|
+
details: [
|
|
122
|
+
"Creates a solid visual and interaction foundation so everything feels connected and works smoothly — no random inconsistencies",
|
|
123
|
+
"Color primitive palette (blue, slate, neutral scales)",
|
|
124
|
+
"Motion tokens + reduced-motion support",
|
|
125
|
+
"Icon system at strokeWidth 1.5",
|
|
126
|
+
"WCAG 2.2 AAA baseline baked in",
|
|
127
|
+
],
|
|
91
128
|
},
|
|
92
129
|
{
|
|
93
130
|
n: "4",
|
|
94
131
|
name: "Semantic Tokens",
|
|
95
132
|
note: "light + dark, perceptually tuned",
|
|
96
133
|
status: "shipped",
|
|
134
|
+
details: [
|
|
135
|
+
"Separates design intent from component code — change a brand color once and it ripples everywhere, enabling fast visual iterations",
|
|
136
|
+
"Full light + dark theme pairs",
|
|
137
|
+
"Generated CSS variables via pnpm build:tokens",
|
|
138
|
+
"Perceptually tuned contrast ratios",
|
|
139
|
+
"Tokens.json as single source of truth",
|
|
140
|
+
],
|
|
97
141
|
},
|
|
98
142
|
{
|
|
99
143
|
n: "5",
|
|
100
144
|
name: "Component Registry",
|
|
101
145
|
note: `${componentCount} components, full a11y contracts`,
|
|
102
146
|
status: "shipped",
|
|
147
|
+
details: [
|
|
148
|
+
"Reduces development time by providing pre-built, tested components — teams ship faster when they don't reinvent the button",
|
|
149
|
+
`${componentCount} components with full props + variant docs`,
|
|
150
|
+
"Per-component a11y contracts (role, keyboard, focus, target size)",
|
|
151
|
+
"Anti-patterns listed per component",
|
|
152
|
+
"component-registry.json as machine-readable manifest",
|
|
153
|
+
],
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
n: "6",
|
|
157
|
+
name: "Patterns & Rules",
|
|
158
|
+
note: "decision trees for component picks",
|
|
159
|
+
status: "deferred",
|
|
160
|
+
details: [
|
|
161
|
+
"Provides decision trees for common UX choices — ensures consistent patterns that users recognize across surfaces",
|
|
162
|
+
"Deferred to v2",
|
|
163
|
+
"Will include decision trees for component selection",
|
|
164
|
+
"Pattern library for common UX flows",
|
|
165
|
+
],
|
|
103
166
|
},
|
|
104
167
|
{
|
|
105
168
|
n: "7",
|
|
106
169
|
name: "Agent Interface",
|
|
107
170
|
note: "rules for Cursor, Claude Code, v0",
|
|
108
171
|
status: "shipped",
|
|
172
|
+
details: [
|
|
173
|
+
"Lets AI tools (Claude Code, Cursor, v0) generate code that respects the system — designs ship faster with fewer manual tweaks",
|
|
174
|
+
"CLAUDE.md with full agent instructions",
|
|
175
|
+
".cursorrules for Cursor",
|
|
176
|
+
"system-prompt.md for v0 sessions",
|
|
177
|
+
"AGENTS.md with loading precedence + escalation rules",
|
|
178
|
+
],
|
|
109
179
|
},
|
|
110
180
|
{
|
|
111
181
|
n: "8",
|
|
112
182
|
name: "Documentation",
|
|
113
|
-
note: "
|
|
183
|
+
note: "Storybook + preview app",
|
|
114
184
|
status: "shipped",
|
|
185
|
+
details: [
|
|
186
|
+
"Makes every component discoverable and learnable — designers and engineers self-serve instead of asking questions",
|
|
187
|
+
"Storybook coverage for every component (Default + all variants)",
|
|
188
|
+
"Preview app with Components, Cards, Dashboard, Mail, Pricing tabs",
|
|
189
|
+
"Chromatic visual regression wired to CI",
|
|
190
|
+
],
|
|
115
191
|
},
|
|
116
192
|
{
|
|
117
|
-
n: "
|
|
193
|
+
n: "9",
|
|
118
194
|
name: "Enforcement",
|
|
119
195
|
note: "pre-commit warnings, AI fix path",
|
|
120
196
|
status: "shipped",
|
|
197
|
+
details: [
|
|
198
|
+
"Catches accessibility and brand violations before they ship — prevents costly bugs and ensures quality standards stick",
|
|
199
|
+
"pnpm wcag:audit — AAA contrast check on every token pair",
|
|
200
|
+
"pnpm a11y:lint — static scan for token violations + a11y issues",
|
|
201
|
+
"pnpm check:stories — blocks commits missing story updates",
|
|
202
|
+
],
|
|
121
203
|
},
|
|
122
204
|
{
|
|
123
|
-
n: "
|
|
205
|
+
n: "10",
|
|
124
206
|
name: "Automate",
|
|
125
|
-
note: "
|
|
207
|
+
note: "token build, story coverage, Chromatic",
|
|
126
208
|
status: "shipped",
|
|
209
|
+
details: [
|
|
210
|
+
"Eliminates repetitive manual work — one token change ripples everywhere, CI catches regressions automatically",
|
|
211
|
+
"pnpm build:tokens regenerates styles.css + globals.css from tokens.json",
|
|
212
|
+
"pnpm fix:stories seeds missing story files from component source",
|
|
213
|
+
"Chromatic CI on every push to main",
|
|
214
|
+
],
|
|
127
215
|
},
|
|
128
216
|
] as const;
|
|
129
217
|
|
|
130
|
-
const DEFERRED_LAYERS = [
|
|
131
|
-
{ n: "6", name: "Patterns & Rules", note: "decision trees for component picks" },
|
|
132
|
-
{ n: "9", name: "Documentation (Advanced)", note: "search, versioning, telemetry" },
|
|
133
|
-
{ n: "12", name: "Automate (Advanced)", note: "Figma sync, agent PRs, full a11y CI" },
|
|
134
|
-
] as const;
|
|
135
|
-
|
|
136
218
|
const COMPONENT_GROUPS = [
|
|
137
219
|
{
|
|
138
220
|
title: "Inputs",
|
|
@@ -204,6 +286,72 @@ const A11Y_COMMITMENTS = [
|
|
|
204
286
|
},
|
|
205
287
|
];
|
|
206
288
|
|
|
289
|
+
const COMPONENT_ADDITION_STEPS = [
|
|
290
|
+
{
|
|
291
|
+
title: "Prove the gap",
|
|
292
|
+
detail:
|
|
293
|
+
"Start with the registry. Compose existing primitives first; add a new component only when the product need cannot be solved by an existing component or approved variant.",
|
|
294
|
+
icon: Combine,
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
title: "Write the contract",
|
|
298
|
+
detail:
|
|
299
|
+
"Document usage, props, defaults, anti-patterns, and the full a11y contract in component-registry.json before the implementation becomes public API.",
|
|
300
|
+
icon: Database,
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
title: "Build from tokens",
|
|
304
|
+
detail:
|
|
305
|
+
"Use semantic color, spacing, type, radius, shadow, and motion tokens. No hardcoded values, no one-off styling, and no component behavior outside the registry.",
|
|
306
|
+
icon: Palette,
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
title: "Story every state",
|
|
310
|
+
detail:
|
|
311
|
+
"Ship Default, variants, disabled, loading, error, empty, and realistic-use stories so Chromatic and humans can review the actual surface area.",
|
|
312
|
+
icon: BookOpen,
|
|
313
|
+
},
|
|
314
|
+
] as const;
|
|
315
|
+
|
|
316
|
+
const COMPONENT_QUALITY_GATES = [
|
|
317
|
+
{
|
|
318
|
+
label: "Schema validation",
|
|
319
|
+
detail:
|
|
320
|
+
"Tokens and registry entries must stay structurally valid, so agents and humans read the same source of truth.",
|
|
321
|
+
icon: KeyRound,
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
label: "Story coverage",
|
|
325
|
+
detail:
|
|
326
|
+
"Every changed component needs matching stories before commit, including states that tend to regress quietly.",
|
|
327
|
+
icon: FolderGit2,
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
label: "Token and contrast lint",
|
|
331
|
+
detail:
|
|
332
|
+
"Hardcoded styling, low-contrast token pairs, missing labels, and source-level a11y issues are caught early.",
|
|
333
|
+
icon: ShieldCheck,
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
label: "Target-size audit",
|
|
337
|
+
detail:
|
|
338
|
+
"Interactive components are checked against the touch-target floor so small icon controls do not slip through.",
|
|
339
|
+
icon: Accessibility,
|
|
340
|
+
},
|
|
341
|
+
{
|
|
342
|
+
label: "Pixel regression",
|
|
343
|
+
detail:
|
|
344
|
+
"Storybook snapshots catch pixel-level drift across variants, themes, and viewport sizes before a visual change becomes baseline.",
|
|
345
|
+
icon: Eye,
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
label: "Route-level visual diff",
|
|
349
|
+
detail:
|
|
350
|
+
"Playwright full-page snapshots catch layout shifts that isolated component stories can miss.",
|
|
351
|
+
icon: GitCompare,
|
|
352
|
+
},
|
|
353
|
+
] as const;
|
|
354
|
+
|
|
207
355
|
function MetricCard({
|
|
208
356
|
icon: Icon,
|
|
209
357
|
value,
|
|
@@ -265,6 +413,119 @@ function CodeBlock({ children }: { children: string }) {
|
|
|
265
413
|
);
|
|
266
414
|
}
|
|
267
415
|
|
|
416
|
+
function CopyableCodeBlock({ code }: { code: string }) {
|
|
417
|
+
const [copied, setCopied] = useState(false);
|
|
418
|
+
const handleCopy = async () => {
|
|
419
|
+
try {
|
|
420
|
+
await navigator.clipboard.writeText(code);
|
|
421
|
+
setCopied(true);
|
|
422
|
+
setTimeout(() => setCopied(false), 2000);
|
|
423
|
+
} catch {}
|
|
424
|
+
};
|
|
425
|
+
return (
|
|
426
|
+
<div className="relative">
|
|
427
|
+
<pre className="bg-muted text-foreground rounded-lg p-4 pr-12 text-sm font-mono overflow-x-auto border">
|
|
428
|
+
<code>{code}</code>
|
|
429
|
+
</pre>
|
|
430
|
+
<Button
|
|
431
|
+
type="button"
|
|
432
|
+
size="icon"
|
|
433
|
+
variant="ghost"
|
|
434
|
+
onClick={handleCopy}
|
|
435
|
+
className="absolute top-2 right-2 size-8"
|
|
436
|
+
aria-label={copied ? "Copied" : "Copy to clipboard"}
|
|
437
|
+
>
|
|
438
|
+
{copied ? (
|
|
439
|
+
<Check className="h-3.5 w-3.5" strokeWidth={1.5} />
|
|
440
|
+
) : (
|
|
441
|
+
<ClipboardCopy className="h-3.5 w-3.5" strokeWidth={1.5} />
|
|
442
|
+
)}
|
|
443
|
+
</Button>
|
|
444
|
+
</div>
|
|
445
|
+
);
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
function QuickstartDialog({ trigger }: { trigger: React.ReactNode }) {
|
|
449
|
+
const pkg = corePkg.name;
|
|
450
|
+
return (
|
|
451
|
+
<Dialog>
|
|
452
|
+
<DialogTrigger asChild>{trigger}</DialogTrigger>
|
|
453
|
+
<DialogContent className="max-w-2xl max-h-[85vh] overflow-y-auto">
|
|
454
|
+
<DialogHeader>
|
|
455
|
+
<DialogTitle className="flex items-center gap-2">
|
|
456
|
+
<Terminal className="h-5 w-5" strokeWidth={1.5} />
|
|
457
|
+
Install in your product
|
|
458
|
+
</DialogTitle>
|
|
459
|
+
<DialogDescription>
|
|
460
|
+
Everything you need to consume this design system from another codebase.
|
|
461
|
+
</DialogDescription>
|
|
462
|
+
</DialogHeader>
|
|
463
|
+
|
|
464
|
+
<div className="space-y-5 pt-2">
|
|
465
|
+
<div>
|
|
466
|
+
<h3 className="text-sm font-semibold mb-2">1. Install the package</h3>
|
|
467
|
+
<CopyableCodeBlock code={`pnpm add ${pkg}`} />
|
|
468
|
+
</div>
|
|
469
|
+
|
|
470
|
+
<div>
|
|
471
|
+
<h3 className="text-sm font-semibold mb-2">2. Import the styles</h3>
|
|
472
|
+
<CopyableCodeBlock code={`import "${pkg}/styles.css";`} />
|
|
473
|
+
<p className="text-sm text-muted-foreground mt-2">
|
|
474
|
+
Add to your root layout (Next.js) or entry file (Vite, CRA). One import wires up every token, base layer, and reduced-motion rule.
|
|
475
|
+
</p>
|
|
476
|
+
</div>
|
|
477
|
+
|
|
478
|
+
<div>
|
|
479
|
+
<h3 className="text-sm font-semibold mb-2">3. Use components</h3>
|
|
480
|
+
<CopyableCodeBlock
|
|
481
|
+
code={`import { Button, Card, Input } from "${pkg}/components/ui";
|
|
482
|
+
|
|
483
|
+
export function Example() {
|
|
484
|
+
return (
|
|
485
|
+
<Card>
|
|
486
|
+
<Button>Start here</Button>
|
|
487
|
+
<Input placeholder="Enter text..." />
|
|
488
|
+
</Card>
|
|
489
|
+
);
|
|
490
|
+
}`}
|
|
491
|
+
/>
|
|
492
|
+
</div>
|
|
493
|
+
|
|
494
|
+
<div>
|
|
495
|
+
<h3 className="text-sm font-semibold mb-2">4. Customize tokens</h3>
|
|
496
|
+
<p className="text-sm text-muted-foreground">
|
|
497
|
+
Edit <code className="font-mono text-xs text-foreground">tokens.json</code> and run{" "}
|
|
498
|
+
<code className="font-mono text-xs text-foreground">pnpm build:tokens</code> to regenerate{" "}
|
|
499
|
+
<code className="font-mono text-xs text-foreground">styles.css</code>. Or use the Customize tab to preview overrides in your browser before promoting them.
|
|
500
|
+
</p>
|
|
501
|
+
</div>
|
|
502
|
+
|
|
503
|
+
<div>
|
|
504
|
+
<h3 className="text-sm font-semibold mb-2">Reference docs</h3>
|
|
505
|
+
<ul className="text-sm text-muted-foreground space-y-1.5 list-disc pl-5">
|
|
506
|
+
<li>
|
|
507
|
+
<code className="font-mono text-xs text-foreground">README.md</code> — getting started
|
|
508
|
+
</li>
|
|
509
|
+
<li>
|
|
510
|
+
<code className="font-mono text-xs text-foreground">DESIGN.md</code> — visual system, layout rhythm, AAA floor
|
|
511
|
+
</li>
|
|
512
|
+
<li>
|
|
513
|
+
<code className="font-mono text-xs text-foreground">COMPONENT_INDEX.md</code> — human-readable component guide
|
|
514
|
+
</li>
|
|
515
|
+
<li>
|
|
516
|
+
<code className="font-mono text-xs text-foreground">CLAUDE.md</code> — agent/AI integration rules
|
|
517
|
+
</li>
|
|
518
|
+
<li>
|
|
519
|
+
<code className="font-mono text-xs text-foreground">layer-5-component-registry/component-registry.json</code> — machine-readable component manifest
|
|
520
|
+
</li>
|
|
521
|
+
</ul>
|
|
522
|
+
</div>
|
|
523
|
+
</div>
|
|
524
|
+
</DialogContent>
|
|
525
|
+
</Dialog>
|
|
526
|
+
);
|
|
527
|
+
}
|
|
528
|
+
|
|
268
529
|
// One-shot setup prompt — pasted into a fresh Claude Code session to run the
|
|
269
530
|
// full onboarding (rename + brand + voice + microcopy + ethics + tokens +
|
|
270
531
|
// components + patterns). Mirrors prompts/setup.md so home stays in sync.
|
|
@@ -514,7 +775,394 @@ Operating rules:
|
|
|
514
775
|
|
|
515
776
|
Begin with step 1.`;
|
|
516
777
|
|
|
517
|
-
export function HomeTab() {
|
|
778
|
+
export function HomeTab({ onBrowseComponents }: HomeTabProps) {
|
|
779
|
+
const [openLayers, setOpenLayers] = useState<Set<string>>(new Set());
|
|
780
|
+
const { setTab } = useShellNav();
|
|
781
|
+
const handleBrowseComponents = () => {
|
|
782
|
+
if (onBrowseComponents) {
|
|
783
|
+
onBrowseComponents();
|
|
784
|
+
return;
|
|
785
|
+
}
|
|
786
|
+
|
|
787
|
+
document.getElementById("components")?.scrollIntoView({
|
|
788
|
+
behavior: "smooth",
|
|
789
|
+
block: "start",
|
|
790
|
+
});
|
|
791
|
+
};
|
|
792
|
+
|
|
793
|
+
// This fork has been customized (renamed from BADS)
|
|
794
|
+
const isFreshFork = false; // swimtopia is an already-customized fork
|
|
795
|
+
const isCustomizedFork = !brand.isUpstreamTemplate;
|
|
796
|
+
|
|
797
|
+
const toggleLayer = (n: string) => {
|
|
798
|
+
setOpenLayers((prev) => {
|
|
799
|
+
const next = new Set(prev);
|
|
800
|
+
if (next.has(n)) next.delete(n);
|
|
801
|
+
else next.add(n);
|
|
802
|
+
return next;
|
|
803
|
+
});
|
|
804
|
+
};
|
|
805
|
+
|
|
806
|
+
// Fresh fork: minimal onboarding view
|
|
807
|
+
if (isFreshFork) {
|
|
808
|
+
return (
|
|
809
|
+
<ScrollArea className="size-full">
|
|
810
|
+
<div className="max-w-4xl mx-auto px-8 py-12 space-y-8">
|
|
811
|
+
<section className="space-y-6">
|
|
812
|
+
<div className="space-y-3">
|
|
813
|
+
<h1 className="text-4xl font-semibold tracking-tight">
|
|
814
|
+
Welcome to BADS
|
|
815
|
+
</h1>
|
|
816
|
+
<p className="text-lg text-muted-foreground max-w-2xl leading-relaxed">
|
|
817
|
+
This is a fresh fork of the Behavioral Agentic Design System. In a few
|
|
818
|
+
minutes, you can customize it for your product — brand colors, typography,
|
|
819
|
+
voice, ethics, and more. The system guides you through every step.
|
|
820
|
+
</p>
|
|
821
|
+
</div>
|
|
822
|
+
|
|
823
|
+
<div className="flex items-center gap-2 flex-wrap pt-2">
|
|
824
|
+
<Button size="sm" variant="default" className="gap-2" asChild>
|
|
825
|
+
<a href="#setup">
|
|
826
|
+
<Wand2 className="h-4 w-4" strokeWidth={1.5} /> Set up now
|
|
827
|
+
</a>
|
|
828
|
+
</Button>
|
|
829
|
+
<Button size="sm" variant="outline" className="gap-2" asChild>
|
|
830
|
+
<a href="https://github.com/matthewlarn/behavioral-agentic-design-system" target="_blank" rel="noreferrer">
|
|
831
|
+
<BookOpen className="h-4 w-4" strokeWidth={1.5} /> Learn more
|
|
832
|
+
</a>
|
|
833
|
+
</Button>
|
|
834
|
+
</div>
|
|
835
|
+
</section>
|
|
836
|
+
|
|
837
|
+
<Separator />
|
|
838
|
+
|
|
839
|
+
<section className="space-y-6" id="setup">
|
|
840
|
+
<div className="space-y-2 max-w-2xl">
|
|
841
|
+
<h2 className="text-2xl font-semibold tracking-tight">Set it up in one prompt</h2>
|
|
842
|
+
<p className="text-base text-muted-foreground leading-relaxed">
|
|
843
|
+
Paste the prompt below into a Claude Code session. Claude will walk you through
|
|
844
|
+
the full setup — rename, brand context, voice, tokens, components — with a
|
|
845
|
+
commit at every step.
|
|
846
|
+
</p>
|
|
847
|
+
</div>
|
|
848
|
+
<CopyablePromptCard
|
|
849
|
+
title="Run the full setup with one prompt"
|
|
850
|
+
description="Paste into Claude Code at the repo root. Includes rename, brand context, voice, microcopy, tokens, and components."
|
|
851
|
+
prompt={SETUP_PROMPT}
|
|
852
|
+
icon={Wand2}
|
|
853
|
+
highlighted
|
|
854
|
+
/>
|
|
855
|
+
</section>
|
|
856
|
+
|
|
857
|
+
<Separator />
|
|
858
|
+
|
|
859
|
+
<footer className="text-sm text-muted-foreground py-8">
|
|
860
|
+
<p>
|
|
861
|
+
<Sparkles className="h-3.5 w-3.5 inline mr-1" strokeWidth={1.5} />
|
|
862
|
+
This is a BADS fork. Questions? Check out the{" "}
|
|
863
|
+
<a href="https://github.com/matthewlarn/behavioral-agentic-design-system" className="underline hover:text-foreground">
|
|
864
|
+
full documentation
|
|
865
|
+
</a>
|
|
866
|
+
.
|
|
867
|
+
</p>
|
|
868
|
+
</footer>
|
|
869
|
+
</div>
|
|
870
|
+
</ScrollArea>
|
|
871
|
+
);
|
|
872
|
+
}
|
|
873
|
+
|
|
874
|
+
// Customized client fork: dashboard view focused on their design system
|
|
875
|
+
if (isCustomizedFork) {
|
|
876
|
+
return (
|
|
877
|
+
<ScrollArea className="size-full">
|
|
878
|
+
<div className="max-w-6xl mx-auto px-8 py-12 space-y-12">
|
|
879
|
+
{/* HERO */}
|
|
880
|
+
<section className="space-y-6">
|
|
881
|
+
<div className="flex items-start gap-5">
|
|
882
|
+
<div className="h-16 w-16 rounded-2xl bg-primary flex items-center justify-center shrink-0 shadow-sm text-primary-foreground">
|
|
883
|
+
<BrandMark size={32} />
|
|
884
|
+
</div>
|
|
885
|
+
<div className="space-y-3 flex-1">
|
|
886
|
+
<h1 className="text-4xl font-semibold tracking-tight">
|
|
887
|
+
{brand.name}
|
|
888
|
+
</h1>
|
|
889
|
+
<p className="text-lg text-muted-foreground leading-relaxed">
|
|
890
|
+
Your design system. Built on BADS.
|
|
891
|
+
</p>
|
|
892
|
+
</div>
|
|
893
|
+
</div>
|
|
894
|
+
|
|
895
|
+
<div className="flex items-center gap-2 flex-wrap pt-2">
|
|
896
|
+
<Button
|
|
897
|
+
size="sm"
|
|
898
|
+
variant="default"
|
|
899
|
+
className="gap-2"
|
|
900
|
+
onClick={() => setTab("colors")}
|
|
901
|
+
>
|
|
902
|
+
<Wand2 className="h-4 w-4" strokeWidth={1.5} /> Customize
|
|
903
|
+
</Button>
|
|
904
|
+
<Button size="sm" variant="outline" className="gap-2" onClick={handleBrowseComponents} type="button">
|
|
905
|
+
<Package className="h-4 w-4" strokeWidth={1.5} /> Components
|
|
906
|
+
</Button>
|
|
907
|
+
<Button
|
|
908
|
+
size="sm"
|
|
909
|
+
variant="outline"
|
|
910
|
+
className="gap-2"
|
|
911
|
+
onClick={() => setTab("components")}
|
|
912
|
+
>
|
|
913
|
+
<Package className="h-4 w-4" strokeWidth={1.5} /> Components
|
|
914
|
+
</Button>
|
|
915
|
+
<QuickstartDialog
|
|
916
|
+
trigger={
|
|
917
|
+
<Button size="sm" variant="outline" className="gap-2">
|
|
918
|
+
<Terminal className="h-4 w-4" strokeWidth={1.5} /> Install
|
|
919
|
+
</Button>
|
|
920
|
+
}
|
|
921
|
+
/>
|
|
922
|
+
</div>
|
|
923
|
+
</section>
|
|
924
|
+
|
|
925
|
+
<Separator />
|
|
926
|
+
|
|
927
|
+
{/* METRICS */}
|
|
928
|
+
<section className="space-y-6">
|
|
929
|
+
<SectionHeading
|
|
930
|
+
eyebrow="At a glance"
|
|
931
|
+
title="Your design system"
|
|
932
|
+
/>
|
|
933
|
+
<div className="grid grid-cols-2 md:grid-cols-4 gap-4">
|
|
934
|
+
<MetricCard
|
|
935
|
+
icon={Package}
|
|
936
|
+
value={componentCount}
|
|
937
|
+
label="Components"
|
|
938
|
+
/>
|
|
939
|
+
<MetricCard
|
|
940
|
+
icon={Palette}
|
|
941
|
+
value={semanticTokenCount}
|
|
942
|
+
label="Semantic tokens"
|
|
943
|
+
/>
|
|
944
|
+
<MetricCard
|
|
945
|
+
icon={ShieldCheck}
|
|
946
|
+
value="AAA"
|
|
947
|
+
label="WCAG-ready"
|
|
948
|
+
/>
|
|
949
|
+
<MetricCard
|
|
950
|
+
icon={Heart}
|
|
951
|
+
value={brand.colors.length}
|
|
952
|
+
label="Brand colors"
|
|
953
|
+
/>
|
|
954
|
+
</div>
|
|
955
|
+
</section>
|
|
956
|
+
|
|
957
|
+
<Separator />
|
|
958
|
+
|
|
959
|
+
{/* BRAND SNAPSHOT */}
|
|
960
|
+
<section className="space-y-6">
|
|
961
|
+
<SectionHeading
|
|
962
|
+
eyebrow="Identity"
|
|
963
|
+
title="Brand at a glance"
|
|
964
|
+
/>
|
|
965
|
+
<div className="grid md:grid-cols-3 gap-4">
|
|
966
|
+
{/* Color */}
|
|
967
|
+
<Card className="gap-0">
|
|
968
|
+
<CardHeader className="pb-2">
|
|
969
|
+
<CardTitle className="text-base flex items-center gap-2">
|
|
970
|
+
<Palette className="h-4 w-4 text-muted-foreground" strokeWidth={1.5} />
|
|
971
|
+
Colors
|
|
972
|
+
</CardTitle>
|
|
973
|
+
</CardHeader>
|
|
974
|
+
<CardContent className="flex-1 flex flex-col gap-3">
|
|
975
|
+
<div className="h-20 rounded-lg bg-primary border" />
|
|
976
|
+
{brand.colors.length > 1 && (
|
|
977
|
+
<div
|
|
978
|
+
className="grid gap-1.5"
|
|
979
|
+
style={{
|
|
980
|
+
gridTemplateColumns: `repeat(${Math.min(brand.colors.length - 1, 8)}, minmax(0, 1fr))`,
|
|
981
|
+
}}
|
|
982
|
+
>
|
|
983
|
+
{brand.colors.slice(1).map((c) => (
|
|
984
|
+
<div
|
|
985
|
+
key={c.id}
|
|
986
|
+
className="aspect-square rounded border"
|
|
987
|
+
style={{ backgroundColor: c.primary }}
|
|
988
|
+
title={`${c.label} · ${c.primary}`}
|
|
989
|
+
/>
|
|
990
|
+
))}
|
|
991
|
+
</div>
|
|
992
|
+
)}
|
|
993
|
+
<Button
|
|
994
|
+
size="sm"
|
|
995
|
+
variant="outline"
|
|
996
|
+
className="mt-auto w-full gap-2"
|
|
997
|
+
onClick={() => setTab("colors")}
|
|
998
|
+
>
|
|
999
|
+
<Wand2 className="h-3.5 w-3.5" strokeWidth={1.5} /> Customize
|
|
1000
|
+
</Button>
|
|
1001
|
+
</CardContent>
|
|
1002
|
+
</Card>
|
|
1003
|
+
|
|
1004
|
+
{/* Type */}
|
|
1005
|
+
<Card className="gap-0">
|
|
1006
|
+
<CardHeader className="pb-2">
|
|
1007
|
+
<CardTitle className="text-base flex items-center gap-2">
|
|
1008
|
+
<Type className="h-4 w-4 text-muted-foreground" strokeWidth={1.5} />
|
|
1009
|
+
Typography
|
|
1010
|
+
</CardTitle>
|
|
1011
|
+
</CardHeader>
|
|
1012
|
+
<CardContent className="flex-1 flex flex-col gap-3">
|
|
1013
|
+
<div className="space-y-1">
|
|
1014
|
+
<p className="text-2xl font-semibold leading-none">The quick brown fox</p>
|
|
1015
|
+
<p className="text-base">Body text at 18px by default.</p>
|
|
1016
|
+
</div>
|
|
1017
|
+
<dl className="grid grid-cols-[auto_1fr] gap-x-3 gap-y-1 text-xs">
|
|
1018
|
+
<dt className="text-muted-foreground">Sans</dt>
|
|
1019
|
+
<dd className="font-sans truncate">Season</dd>
|
|
1020
|
+
<dt className="text-muted-foreground">Serif</dt>
|
|
1021
|
+
<dd className="font-serif truncate">Season Serif</dd>
|
|
1022
|
+
<dt className="text-muted-foreground">Mono</dt>
|
|
1023
|
+
<dd className="font-mono truncate">JetBrains Mono</dd>
|
|
1024
|
+
</dl>
|
|
1025
|
+
<Button
|
|
1026
|
+
size="sm"
|
|
1027
|
+
variant="outline"
|
|
1028
|
+
className="mt-auto w-full gap-2"
|
|
1029
|
+
onClick={() => setTab("colors")}
|
|
1030
|
+
>
|
|
1031
|
+
<Wand2 className="h-3.5 w-3.5" strokeWidth={1.5} /> Customize
|
|
1032
|
+
</Button>
|
|
1033
|
+
</CardContent>
|
|
1034
|
+
</Card>
|
|
1035
|
+
|
|
1036
|
+
{/* Voice */}
|
|
1037
|
+
<Card className="gap-0">
|
|
1038
|
+
<CardHeader className="pb-2">
|
|
1039
|
+
<CardTitle className="text-base flex items-center gap-2">
|
|
1040
|
+
<Heart className="h-4 w-4 text-muted-foreground" strokeWidth={1.5} />
|
|
1041
|
+
Voice
|
|
1042
|
+
</CardTitle>
|
|
1043
|
+
</CardHeader>
|
|
1044
|
+
<CardContent className="flex-1 flex flex-col gap-3">
|
|
1045
|
+
<div className="flex flex-wrap gap-1.5">
|
|
1046
|
+
<Badge variant="secondary" className="text-xs">Friendly</Badge>
|
|
1047
|
+
<Badge variant="secondary" className="text-xs">Daring</Badge>
|
|
1048
|
+
<Badge variant="secondary" className="text-xs">Radiant</Badge>
|
|
1049
|
+
<Badge variant="secondary" className="text-xs">Genuine</Badge>
|
|
1050
|
+
</div>
|
|
1051
|
+
<p className="text-sm text-muted-foreground italic leading-snug">
|
|
1052
|
+
“Run a whole season without juggling spreadsheets.”
|
|
1053
|
+
</p>
|
|
1054
|
+
<Button size="sm" variant="outline" className="mt-auto w-full gap-2" asChild>
|
|
1055
|
+
<a href="#layers">
|
|
1056
|
+
<BookOpen className="h-3.5 w-3.5" strokeWidth={1.5} /> Edit
|
|
1057
|
+
</a>
|
|
1058
|
+
</Button>
|
|
1059
|
+
</CardContent>
|
|
1060
|
+
</Card>
|
|
1061
|
+
</div>
|
|
1062
|
+
</section>
|
|
1063
|
+
|
|
1064
|
+
<Separator />
|
|
1065
|
+
|
|
1066
|
+
{/* NEXT STEPS */}
|
|
1067
|
+
<section className="space-y-6">
|
|
1068
|
+
<SectionHeading
|
|
1069
|
+
eyebrow="What's next"
|
|
1070
|
+
title="Get started using your system"
|
|
1071
|
+
/>
|
|
1072
|
+
<div className="grid md:grid-cols-2 gap-4">
|
|
1073
|
+
<Card>
|
|
1074
|
+
<CardHeader>
|
|
1075
|
+
<CardTitle className="text-base flex items-center gap-2">
|
|
1076
|
+
<Eye className="h-4 w-4 text-muted-foreground" strokeWidth={1.5} /> Preview components
|
|
1077
|
+
</CardTitle>
|
|
1078
|
+
<CardDescription>Browse all components in the showcase</CardDescription>
|
|
1079
|
+
</CardHeader>
|
|
1080
|
+
<CardContent>
|
|
1081
|
+
<Button
|
|
1082
|
+
size="sm"
|
|
1083
|
+
variant="outline"
|
|
1084
|
+
className="w-full gap-2"
|
|
1085
|
+
onClick={() => setTab("components")}
|
|
1086
|
+
>
|
|
1087
|
+
<Package className="h-4 w-4" strokeWidth={1.5} /> View
|
|
1088
|
+
</Button>
|
|
1089
|
+
</CardContent>
|
|
1090
|
+
</Card>
|
|
1091
|
+
<Card>
|
|
1092
|
+
<CardHeader>
|
|
1093
|
+
<CardTitle className="text-base flex items-center gap-2">
|
|
1094
|
+
<Terminal className="h-4 w-4 text-muted-foreground" strokeWidth={1.5} /> Install in your product
|
|
1095
|
+
</CardTitle>
|
|
1096
|
+
<CardDescription>Copy the npm install command</CardDescription>
|
|
1097
|
+
</CardHeader>
|
|
1098
|
+
<CardContent>
|
|
1099
|
+
<QuickstartDialog
|
|
1100
|
+
trigger={
|
|
1101
|
+
<Button size="sm" variant="outline" className="w-full gap-2">
|
|
1102
|
+
<Code2 className="h-4 w-4" strokeWidth={1.5} /> Install
|
|
1103
|
+
</Button>
|
|
1104
|
+
}
|
|
1105
|
+
/>
|
|
1106
|
+
</CardContent>
|
|
1107
|
+
</Card>
|
|
1108
|
+
<Card>
|
|
1109
|
+
<CardHeader>
|
|
1110
|
+
<CardTitle className="text-base flex items-center gap-2">
|
|
1111
|
+
<Layers className="h-4 w-4 text-muted-foreground" strokeWidth={1.5} /> Customize colors + fonts
|
|
1112
|
+
</CardTitle>
|
|
1113
|
+
<CardDescription>Edit tokens in the Customize tab</CardDescription>
|
|
1114
|
+
</CardHeader>
|
|
1115
|
+
<CardContent>
|
|
1116
|
+
<Button
|
|
1117
|
+
size="sm"
|
|
1118
|
+
variant="outline"
|
|
1119
|
+
className="w-full gap-2"
|
|
1120
|
+
onClick={() => setTab("colors")}
|
|
1121
|
+
>
|
|
1122
|
+
<Wand2 className="h-4 w-4" strokeWidth={1.5} /> Customize
|
|
1123
|
+
</Button>
|
|
1124
|
+
</CardContent>
|
|
1125
|
+
</Card>
|
|
1126
|
+
<Card>
|
|
1127
|
+
<CardHeader>
|
|
1128
|
+
<CardTitle className="text-base flex items-center gap-2">
|
|
1129
|
+
<BookOpen className="h-4 w-4 text-muted-foreground" strokeWidth={1.5} /> Read the docs
|
|
1130
|
+
</CardTitle>
|
|
1131
|
+
<CardDescription>CLAUDE.md, DESIGN.md, and more</CardDescription>
|
|
1132
|
+
</CardHeader>
|
|
1133
|
+
<CardContent>
|
|
1134
|
+
<Button
|
|
1135
|
+
size="sm"
|
|
1136
|
+
variant="outline"
|
|
1137
|
+
className="w-full gap-2"
|
|
1138
|
+
onClick={() => setTab("layers")}
|
|
1139
|
+
>
|
|
1140
|
+
<FileText className="h-4 w-4" strokeWidth={1.5} /> Docs
|
|
1141
|
+
</Button>
|
|
1142
|
+
</CardContent>
|
|
1143
|
+
</Card>
|
|
1144
|
+
</div>
|
|
1145
|
+
</section>
|
|
1146
|
+
|
|
1147
|
+
<Separator />
|
|
1148
|
+
|
|
1149
|
+
{/* FOOTER */}
|
|
1150
|
+
<footer className="text-sm text-muted-foreground py-8">
|
|
1151
|
+
<p>
|
|
1152
|
+
<Sparkles className="h-3.5 w-3.5 inline mr-1" strokeWidth={1.5} />
|
|
1153
|
+
Built on{" "}
|
|
1154
|
+
<a href="https://github.com/matthewlarn/behavioral-agentic-design-system" className="underline hover:text-foreground">
|
|
1155
|
+
BADS
|
|
1156
|
+
</a>
|
|
1157
|
+
. Components, tokens, and brand voice — all in one system.
|
|
1158
|
+
</p>
|
|
1159
|
+
</footer>
|
|
1160
|
+
</div>
|
|
1161
|
+
</ScrollArea>
|
|
1162
|
+
);
|
|
1163
|
+
}
|
|
1164
|
+
|
|
1165
|
+
// Full home tab for upstream BADS
|
|
518
1166
|
return (
|
|
519
1167
|
<ScrollArea className="size-full">
|
|
520
1168
|
{/* Entrance animation: each top-level section fades up in sequence on
|
|
@@ -561,8 +1209,8 @@ export function HomeTab() {
|
|
|
561
1209
|
</div>
|
|
562
1210
|
|
|
563
1211
|
<div className="flex items-start gap-5">
|
|
564
|
-
<div className="h-16 w-16 rounded-2xl bg-primary flex items-center justify-center shrink-0 shadow-sm">
|
|
565
|
-
<
|
|
1212
|
+
<div className="h-16 w-16 rounded-2xl bg-primary flex items-center justify-center shrink-0 shadow-sm text-primary-foreground">
|
|
1213
|
+
<BrandMark size={32} />
|
|
566
1214
|
</div>
|
|
567
1215
|
<div className="space-y-3">
|
|
568
1216
|
<h1 className="text-5xl font-semibold tracking-tight">
|
|
@@ -583,25 +1231,21 @@ export function HomeTab() {
|
|
|
583
1231
|
<Wand2 className="h-4 w-4" strokeWidth={1.5} /> Onboard with AI
|
|
584
1232
|
</a>
|
|
585
1233
|
</Button>
|
|
586
|
-
<Button
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
1234
|
+
<Button
|
|
1235
|
+
size="sm"
|
|
1236
|
+
variant="outline"
|
|
1237
|
+
className="gap-2"
|
|
1238
|
+
onClick={() => setTab("components")}
|
|
1239
|
+
>
|
|
1240
|
+
<Package className="h-4 w-4" strokeWidth={1.5} /> Browse components
|
|
590
1241
|
</Button>
|
|
591
|
-
<Button
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
<
|
|
598
|
-
<GitCompare className="h-4 w-4" strokeWidth={1.5} /> Wire up Chromatic
|
|
599
|
-
</a>
|
|
600
|
-
</Button>
|
|
601
|
-
<Button size="sm" variant="ghost" className="gap-2" asChild>
|
|
602
|
-
<a href="#docs">
|
|
603
|
-
<BookOpen className="h-4 w-4" strokeWidth={1.5} /> Read the docs
|
|
604
|
-
</a>
|
|
1242
|
+
<Button
|
|
1243
|
+
size="sm"
|
|
1244
|
+
variant="ghost"
|
|
1245
|
+
className="gap-2"
|
|
1246
|
+
onClick={() => setTab("layers")}
|
|
1247
|
+
>
|
|
1248
|
+
<BookOpen className="h-4 w-4" strokeWidth={1.5} /> Read the docs
|
|
605
1249
|
</Button>
|
|
606
1250
|
</div>
|
|
607
1251
|
</section>
|
|
@@ -632,7 +1276,7 @@ export function HomeTab() {
|
|
|
632
1276
|
icon={Layers}
|
|
633
1277
|
value={SHIPPED_LAYERS.length}
|
|
634
1278
|
label="Layers shipped"
|
|
635
|
-
hint=
|
|
1279
|
+
hint="All 10 layers complete"
|
|
636
1280
|
/>
|
|
637
1281
|
<MetricCard
|
|
638
1282
|
icon={ShieldCheck}
|
|
@@ -647,71 +1291,96 @@ export function HomeTab() {
|
|
|
647
1291
|
<section className="space-y-6">
|
|
648
1292
|
<SectionHeading
|
|
649
1293
|
eyebrow="The stack"
|
|
650
|
-
title="
|
|
1294
|
+
title="Ten layers, all shipped"
|
|
651
1295
|
description="A layered architecture where lower layers are the ingredients and higher layers are the recipes. v1 ships everything you need to leave the system in a good place. v2 is gated behind real signals — added only when a real problem asks for them."
|
|
652
1296
|
/>
|
|
653
|
-
<div className="
|
|
654
|
-
{SHIPPED_LAYERS.map((layer) =>
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
<
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
</Badge>
|
|
673
|
-
</CardContent>
|
|
674
|
-
</Card>
|
|
675
|
-
))}
|
|
676
|
-
</div>
|
|
677
|
-
|
|
678
|
-
<details className="group">
|
|
679
|
-
<summary className="text-sm text-muted-foreground cursor-pointer hover:text-foreground select-none inline-flex items-center gap-1">
|
|
680
|
-
Deferred to v2 ({DEFERRED_LAYERS.length})
|
|
681
|
-
<ArrowUpRight
|
|
682
|
-
className="h-3.5 w-3.5 transition-transform group-open:rotate-45"
|
|
683
|
-
strokeWidth={1.5}
|
|
684
|
-
/>
|
|
685
|
-
</summary>
|
|
686
|
-
<div className="grid md:grid-cols-2 gap-3 mt-4">
|
|
687
|
-
{DEFERRED_LAYERS.map((layer) => (
|
|
688
|
-
<Card key={layer.n} className="border-dashed">
|
|
689
|
-
<CardContent className="py-4 flex items-start gap-3">
|
|
690
|
-
<Circle
|
|
691
|
-
className="h-5 w-5 text-muted-foreground/50 mt-0.5 shrink-0"
|
|
1297
|
+
<div className="space-y-2">
|
|
1298
|
+
{SHIPPED_LAYERS.map((layer) => {
|
|
1299
|
+
const isOpen = openLayers.has(layer.n);
|
|
1300
|
+
const isDeferred = layer.status === "deferred";
|
|
1301
|
+
return (
|
|
1302
|
+
<button
|
|
1303
|
+
key={layer.n}
|
|
1304
|
+
onClick={() => toggleLayer(layer.n)}
|
|
1305
|
+
className={`w-full text-left transition-colors rounded-lg border ${
|
|
1306
|
+
isDeferred
|
|
1307
|
+
? "border-dashed hover:bg-accent/40"
|
|
1308
|
+
: "hover:bg-accent/40"
|
|
1309
|
+
}`}
|
|
1310
|
+
>
|
|
1311
|
+
<div className="p-4 flex items-start gap-3">
|
|
1312
|
+
<ChevronRight
|
|
1313
|
+
className={`h-5 w-5 text-muted-foreground mt-0.5 shrink-0 transition-transform ${
|
|
1314
|
+
isOpen ? "rotate-90" : ""
|
|
1315
|
+
}`}
|
|
692
1316
|
strokeWidth={1.5}
|
|
693
1317
|
/>
|
|
1318
|
+
{isDeferred ? (
|
|
1319
|
+
<Circle
|
|
1320
|
+
className="h-5 w-5 text-muted-foreground/50 mt-0.5 shrink-0"
|
|
1321
|
+
strokeWidth={1.5}
|
|
1322
|
+
/>
|
|
1323
|
+
) : (
|
|
1324
|
+
<CheckCircle2
|
|
1325
|
+
className="h-5 w-5 text-primary mt-0.5 shrink-0"
|
|
1326
|
+
strokeWidth={1.5}
|
|
1327
|
+
/>
|
|
1328
|
+
)}
|
|
694
1329
|
<div className="flex-1 min-w-0">
|
|
695
|
-
<div className="flex items-baseline gap-2">
|
|
1330
|
+
<div className="flex items-baseline gap-2 flex-wrap">
|
|
696
1331
|
<span className="text-xs font-mono text-muted-foreground">
|
|
697
1332
|
Layer {layer.n}
|
|
698
1333
|
</span>
|
|
699
|
-
<span
|
|
1334
|
+
<span
|
|
1335
|
+
className={`font-semibold ${
|
|
1336
|
+
isDeferred ? "text-muted-foreground" : ""
|
|
1337
|
+
}`}
|
|
1338
|
+
>
|
|
700
1339
|
{layer.name}
|
|
701
1340
|
</span>
|
|
702
1341
|
</div>
|
|
703
|
-
<p className="text-sm text-muted-foreground mt-0.5">
|
|
1342
|
+
<p className="text-sm text-muted-foreground mt-0.5">
|
|
1343
|
+
{layer.note}
|
|
1344
|
+
</p>
|
|
704
1345
|
</div>
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
1346
|
+
</div>
|
|
1347
|
+
|
|
1348
|
+
{isOpen && (
|
|
1349
|
+
<div className="px-4 pb-4 ml-8 border-l border-border space-y-2">
|
|
1350
|
+
{layer.details.map((detail, idx) => (
|
|
1351
|
+
<div key={idx} className="flex gap-2 text-sm">
|
|
1352
|
+
<span className="text-muted-foreground shrink-0">•</span>
|
|
1353
|
+
<span className="text-foreground/80">{detail}</span>
|
|
1354
|
+
</div>
|
|
1355
|
+
))}
|
|
1356
|
+
</div>
|
|
1357
|
+
)}
|
|
1358
|
+
</button>
|
|
1359
|
+
);
|
|
1360
|
+
})}
|
|
1361
|
+
</div>
|
|
713
1362
|
</section>
|
|
714
1363
|
|
|
1364
|
+
<Separator />
|
|
1365
|
+
|
|
1366
|
+
{/* ONBOARD */}
|
|
1367
|
+
<section className="space-y-10" id="onboard">
|
|
1368
|
+
<SectionHeading
|
|
1369
|
+
eyebrow="Quickstart"
|
|
1370
|
+
title="Get the design system running"
|
|
1371
|
+
description="This is an engineer's guide. Fork the repo, then run the setup flow below. Claude Code will guide you through renaming the fork, importing brand + tokens + components from your product, linting accessibility, and syncing everything to git — pausing for input at each step."
|
|
1372
|
+
/>
|
|
1373
|
+
<CopyablePromptCard
|
|
1374
|
+
title="Run the full setup with one prompt"
|
|
1375
|
+
description="Copy this prompt, paste it into Claude Code at the repo root. Claude walks you through rename, source discovery, token setup, component registry, and accessibility baseline — committing at each step."
|
|
1376
|
+
prompt={SETUP_PROMPT}
|
|
1377
|
+
icon={Wand2}
|
|
1378
|
+
highlighted
|
|
1379
|
+
/>
|
|
1380
|
+
</section>
|
|
1381
|
+
|
|
1382
|
+
<Separator />
|
|
1383
|
+
|
|
715
1384
|
{/* BRAND SNAPSHOT */}
|
|
716
1385
|
<section className="space-y-6">
|
|
717
1386
|
<SectionHeading
|
|
@@ -814,6 +1483,84 @@ export function HomeTab() {
|
|
|
814
1483
|
</div>
|
|
815
1484
|
</section>
|
|
816
1485
|
|
|
1486
|
+
{/* COMPONENT QUALITY */}
|
|
1487
|
+
<section className="space-y-6">
|
|
1488
|
+
<SectionHeading
|
|
1489
|
+
eyebrow="Adding components"
|
|
1490
|
+
title="From component idea to pixel-perfect baseline"
|
|
1491
|
+
description="New components move through a constrained path: prove the need, write the registry contract, build from tokens, story every state, then let automated checks catch drift before release."
|
|
1492
|
+
/>
|
|
1493
|
+
<div className="grid lg:grid-cols-2 gap-4">
|
|
1494
|
+
<Card>
|
|
1495
|
+
<CardHeader>
|
|
1496
|
+
<CardTitle className="text-base flex items-center gap-2">
|
|
1497
|
+
<Package className="h-4 w-4 text-muted-foreground" strokeWidth={1.5} />
|
|
1498
|
+
How a component gets added
|
|
1499
|
+
</CardTitle>
|
|
1500
|
+
<CardDescription>
|
|
1501
|
+
The registry is the gate. Implementation follows the contract.
|
|
1502
|
+
</CardDescription>
|
|
1503
|
+
</CardHeader>
|
|
1504
|
+
<CardContent className="space-y-4">
|
|
1505
|
+
{COMPONENT_ADDITION_STEPS.map((step, index) => {
|
|
1506
|
+
const Icon = step.icon;
|
|
1507
|
+
return (
|
|
1508
|
+
<div key={step.title} className="flex gap-3">
|
|
1509
|
+
<div className="h-9 w-9 rounded-lg border bg-muted flex items-center justify-center shrink-0">
|
|
1510
|
+
<Icon className="h-4 w-4 text-primary" strokeWidth={1.5} />
|
|
1511
|
+
</div>
|
|
1512
|
+
<div className="space-y-1">
|
|
1513
|
+
<div className="flex items-center gap-2 flex-wrap">
|
|
1514
|
+
<span className="text-xs font-mono text-muted-foreground">
|
|
1515
|
+
0{index + 1}
|
|
1516
|
+
</span>
|
|
1517
|
+
<p className="text-sm font-medium">{step.title}</p>
|
|
1518
|
+
</div>
|
|
1519
|
+
<p className="text-sm text-muted-foreground leading-relaxed">
|
|
1520
|
+
{step.detail}
|
|
1521
|
+
</p>
|
|
1522
|
+
</div>
|
|
1523
|
+
</div>
|
|
1524
|
+
);
|
|
1525
|
+
})}
|
|
1526
|
+
</CardContent>
|
|
1527
|
+
</Card>
|
|
1528
|
+
|
|
1529
|
+
<Card>
|
|
1530
|
+
<CardHeader>
|
|
1531
|
+
<CardTitle className="text-base flex items-center gap-2">
|
|
1532
|
+
<Zap className="h-4 w-4 text-muted-foreground" strokeWidth={1.5} />
|
|
1533
|
+
Quality gates before it ships
|
|
1534
|
+
</CardTitle>
|
|
1535
|
+
<CardDescription>
|
|
1536
|
+
Pixel quality is protected by schema, a11y, story, and visual-regression checks.
|
|
1537
|
+
</CardDescription>
|
|
1538
|
+
</CardHeader>
|
|
1539
|
+
<CardContent>
|
|
1540
|
+
<div className="divide-y divide-border">
|
|
1541
|
+
{COMPONENT_QUALITY_GATES.map((gate) => {
|
|
1542
|
+
const Icon = gate.icon;
|
|
1543
|
+
return (
|
|
1544
|
+
<div key={gate.label} className="py-3 first:pt-0 last:pb-0 flex gap-3">
|
|
1545
|
+
<Icon
|
|
1546
|
+
className="h-4 w-4 text-primary mt-0.5 shrink-0"
|
|
1547
|
+
strokeWidth={1.5}
|
|
1548
|
+
/>
|
|
1549
|
+
<div className="space-y-1 min-w-0">
|
|
1550
|
+
<p className="text-sm font-medium">{gate.label}</p>
|
|
1551
|
+
<p className="text-sm text-muted-foreground leading-relaxed">
|
|
1552
|
+
{gate.detail}
|
|
1553
|
+
</p>
|
|
1554
|
+
</div>
|
|
1555
|
+
</div>
|
|
1556
|
+
);
|
|
1557
|
+
})}
|
|
1558
|
+
</div>
|
|
1559
|
+
</CardContent>
|
|
1560
|
+
</Card>
|
|
1561
|
+
</div>
|
|
1562
|
+
</section>
|
|
1563
|
+
|
|
817
1564
|
{/* ACCESSIBILITY */}
|
|
818
1565
|
<section className="space-y-6">
|
|
819
1566
|
<SectionHeading
|
|
@@ -829,9 +1576,9 @@ export function HomeTab() {
|
|
|
829
1576
|
className="h-5 w-5 text-primary mt-0.5 shrink-0"
|
|
830
1577
|
strokeWidth={1.5}
|
|
831
1578
|
/>
|
|
832
|
-
<div>
|
|
833
|
-
<p className="font-medium text-sm">{c.label}</p>
|
|
834
|
-
<p className="text-sm text-muted-foreground">{c.detail}</p>
|
|
1579
|
+
<div className="min-w-0 space-y-0.5">
|
|
1580
|
+
<p className="m-0 font-medium text-sm leading-tight">{c.label}</p>
|
|
1581
|
+
<p className="m-0 text-sm text-muted-foreground leading-snug">{c.detail}</p>
|
|
835
1582
|
</div>
|
|
836
1583
|
</CardContent>
|
|
837
1584
|
</Card>
|
|
@@ -873,331 +1620,237 @@ export function HomeTab() {
|
|
|
873
1620
|
</p>
|
|
874
1621
|
</section>
|
|
875
1622
|
|
|
876
|
-
|
|
877
|
-
|
|
1623
|
+
<Separator />
|
|
1624
|
+
|
|
1625
|
+
{/* QUICKSTART */}
|
|
1626
|
+
<section className="space-y-6" id="quickstart">
|
|
878
1627
|
<SectionHeading
|
|
879
|
-
eyebrow="
|
|
880
|
-
title="
|
|
881
|
-
description="
|
|
882
|
-
/>
|
|
883
|
-
<CopyablePromptCard
|
|
884
|
-
title="Run the full onboarding with one prompt"
|
|
885
|
-
description="Paste this into a Claude Code session at the root of this repo. Claude will walk through the rename, source discovery, brand context, voice, microcopy, ethics, tokens, components, and patterns — pausing at each step for your input."
|
|
886
|
-
prompt={SETUP_PROMPT}
|
|
887
|
-
icon={Wand2}
|
|
888
|
-
highlighted
|
|
1628
|
+
eyebrow="For engineers"
|
|
1629
|
+
title="Everything you need to know"
|
|
1630
|
+
description="Installation, setup, customization, and reference docs for consuming and extending this system."
|
|
889
1631
|
/>
|
|
890
1632
|
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
/>
|
|
916
|
-
<CopyablePromptCard
|
|
917
|
-
title="Triangulate all three"
|
|
918
|
-
description="Combo prompt for mature products. Reads codebase + site + knowledge base, surfaces contradictions explicitly as the most-important artifact (the human's homework)."
|
|
919
|
-
prompt={EXTRACT_COMBO}
|
|
920
|
-
icon={Combine}
|
|
921
|
-
/>
|
|
1633
|
+
{/* Installation */}
|
|
1634
|
+
<div>
|
|
1635
|
+
<h3 className="text-sm font-semibold mb-3">Installation & Setup</h3>
|
|
1636
|
+
<div className="grid md:grid-cols-2 gap-4">
|
|
1637
|
+
<Card>
|
|
1638
|
+
<CardHeader>
|
|
1639
|
+
<CardTitle className="text-sm flex items-center gap-2">
|
|
1640
|
+
<Terminal className="h-4 w-4" strokeWidth={1.5} /> Install the package
|
|
1641
|
+
</CardTitle>
|
|
1642
|
+
</CardHeader>
|
|
1643
|
+
<CardContent>
|
|
1644
|
+
<CodeBlock>{`pnpm add ${corePkg.name}`}</CodeBlock>
|
|
1645
|
+
</CardContent>
|
|
1646
|
+
</Card>
|
|
1647
|
+
<Card>
|
|
1648
|
+
<CardHeader>
|
|
1649
|
+
<CardTitle className="text-sm flex items-center gap-2">
|
|
1650
|
+
<Palette className="h-4 w-4" strokeWidth={1.5} /> Import styles globally
|
|
1651
|
+
</CardTitle>
|
|
1652
|
+
</CardHeader>
|
|
1653
|
+
<CardContent>
|
|
1654
|
+
<CodeBlock>{`import "${corePkg.name}/styles.css";`}</CodeBlock>
|
|
1655
|
+
</CardContent>
|
|
1656
|
+
</Card>
|
|
922
1657
|
</div>
|
|
923
1658
|
</div>
|
|
924
1659
|
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
<code className="font-mono text-xs">prompts/README.md</code>. Works for personal
|
|
929
|
-
products, internal tools, agency work, anything.
|
|
930
|
-
</p>
|
|
931
|
-
</section>
|
|
932
|
-
|
|
933
|
-
{/* CHROMATIC */}
|
|
934
|
-
<section className="space-y-6" id="chromatic">
|
|
935
|
-
<SectionHeading
|
|
936
|
-
eyebrow="Visual regression"
|
|
937
|
-
title="Wire up Chromatic"
|
|
938
|
-
description="Every Storybook story snapshotted on every PR — light + dark, multiple viewports, with per-story a11y captured by addon-a11y. The infrastructure is already in this fork. The only thing left is connecting it to your Chromatic project."
|
|
939
|
-
/>
|
|
940
|
-
<div className="grid lg:grid-cols-3 gap-4">
|
|
1660
|
+
{/* Component Usage */}
|
|
1661
|
+
<div>
|
|
1662
|
+
<h3 className="text-sm font-semibold mb-3">Using Components</h3>
|
|
941
1663
|
<Card>
|
|
942
|
-
<CardHeader
|
|
943
|
-
<CardTitle className="text-sm flex items-center gap-2">
|
|
944
|
-
<GitCompare className="h-4 w-4 text-muted-foreground" strokeWidth={1.5} />
|
|
945
|
-
1. Create the project
|
|
946
|
-
</CardTitle>
|
|
947
|
-
</CardHeader>
|
|
948
|
-
<CardContent className="text-sm text-muted-foreground space-y-2">
|
|
949
|
-
<p>
|
|
950
|
-
Sign in at{" "}
|
|
951
|
-
<code className="font-mono text-xs text-foreground">
|
|
952
|
-
chromatic.com/start
|
|
953
|
-
</code>{" "}
|
|
954
|
-
with the GitHub account that owns this repo. Click{" "}
|
|
955
|
-
<em>Add project</em> and pick this fork. Copy the token (starts with{" "}
|
|
956
|
-
<code className="font-mono text-xs text-foreground">chpt_</code>).
|
|
957
|
-
</p>
|
|
958
|
-
</CardContent>
|
|
959
|
-
</Card>
|
|
960
|
-
<Card>
|
|
961
|
-
<CardHeader className="pb-3">
|
|
962
|
-
<CardTitle className="text-sm flex items-center gap-2">
|
|
963
|
-
<KeyRound className="h-4 w-4 text-muted-foreground" strokeWidth={1.5} />
|
|
964
|
-
2. Add the secret
|
|
965
|
-
</CardTitle>
|
|
966
|
-
</CardHeader>
|
|
967
|
-
<CardContent className="text-sm text-muted-foreground space-y-2">
|
|
968
|
-
<p>
|
|
969
|
-
GitHub → repo → Settings → Secrets and variables → Actions → New
|
|
970
|
-
repository secret. Name it{" "}
|
|
971
|
-
<code className="font-mono text-xs text-foreground">
|
|
972
|
-
CHROMATIC_PROJECT_TOKEN
|
|
973
|
-
</code>
|
|
974
|
-
, paste the token, save. Don't commit it anywhere.
|
|
975
|
-
</p>
|
|
976
|
-
</CardContent>
|
|
977
|
-
</Card>
|
|
978
|
-
<Card>
|
|
979
|
-
<CardHeader className="pb-3">
|
|
1664
|
+
<CardHeader>
|
|
980
1665
|
<CardTitle className="text-sm flex items-center gap-2">
|
|
981
|
-
<
|
|
982
|
-
3. Seed the baseline
|
|
1666
|
+
<Code2 className="h-4 w-4" strokeWidth={1.5} /> Import and use
|
|
983
1667
|
</CardTitle>
|
|
984
1668
|
</CardHeader>
|
|
985
|
-
<CardContent
|
|
986
|
-
<
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
1669
|
+
<CardContent>
|
|
1670
|
+
<CodeBlock>{`import { Button, Card, Input } from "${corePkg.name}/components/ui";
|
|
1671
|
+
|
|
1672
|
+
export function Example() {
|
|
1673
|
+
return (
|
|
1674
|
+
<Card>
|
|
1675
|
+
<Button>Start here</Button>
|
|
1676
|
+
<Input placeholder="Enter text..." />
|
|
1677
|
+
</Card>
|
|
1678
|
+
);
|
|
1679
|
+
}`}</CodeBlock>
|
|
994
1680
|
</CardContent>
|
|
995
1681
|
</Card>
|
|
1682
|
+
<p className="text-sm text-muted-foreground mt-3">
|
|
1683
|
+
All components are unstyled by default and accept Tailwind class strings via <code className="font-mono text-xs text-foreground">className</code>. Full component registry with props, variants, and a11y contracts at <code className="font-mono text-xs text-foreground">layer-5-component-registry/component-registry.json</code>.
|
|
1684
|
+
</p>
|
|
996
1685
|
</div>
|
|
997
1686
|
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1687
|
+
{/* Customization */}
|
|
1688
|
+
<div>
|
|
1689
|
+
<h3 className="text-sm font-semibold mb-3">Customization</h3>
|
|
1690
|
+
<div className="grid md:grid-cols-2 gap-4">
|
|
1691
|
+
<Card>
|
|
1692
|
+
<CardHeader>
|
|
1693
|
+
<CardTitle className="text-sm flex items-center gap-2">
|
|
1694
|
+
<Palette className="h-4 w-4" strokeWidth={1.5} /> Tokens & theme
|
|
1695
|
+
</CardTitle>
|
|
1696
|
+
</CardHeader>
|
|
1697
|
+
<CardContent className="text-sm text-muted-foreground space-y-2">
|
|
1698
|
+
<p>Edit <code className="font-mono text-xs text-foreground">tokens.json</code> to customize colors, spacing, typography, and motion. Run <code className="font-mono text-xs text-foreground">pnpm build:tokens</code> to regenerate CSS variables.</p>
|
|
1699
|
+
</CardContent>
|
|
1700
|
+
</Card>
|
|
1701
|
+
<Card>
|
|
1702
|
+
<CardHeader>
|
|
1703
|
+
<CardTitle className="text-sm flex items-center gap-2">
|
|
1704
|
+
<Sparkles className="h-4 w-4" strokeWidth={1.5} /> Brand config
|
|
1705
|
+
</CardTitle>
|
|
1706
|
+
</CardHeader>
|
|
1707
|
+
<CardContent className="text-sm text-muted-foreground space-y-2">
|
|
1708
|
+
<p>Update <code className="font-mono text-xs text-foreground">brand.config.ts</code> with your mission, audience, product surfaces, and brand colors. This flows into the preview shell header and the Customize tab.</p>
|
|
1709
|
+
</CardContent>
|
|
1710
|
+
</Card>
|
|
1711
|
+
</div>
|
|
1712
|
+
</div>
|
|
1004
1713
|
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
<
|
|
1008
|
-
<
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1714
|
+
{/* Development */}
|
|
1715
|
+
<div>
|
|
1716
|
+
<h3 className="text-sm font-semibold mb-3">Development</h3>
|
|
1717
|
+
<div className="grid md:grid-cols-2 gap-4">
|
|
1718
|
+
<Card>
|
|
1719
|
+
<CardHeader>
|
|
1720
|
+
<CardTitle className="text-sm flex items-center gap-2">
|
|
1721
|
+
<FileText className="h-4 w-4" strokeWidth={1.5} /> Storybook
|
|
1722
|
+
</CardTitle>
|
|
1723
|
+
</CardHeader>
|
|
1724
|
+
<CardContent className="text-sm text-muted-foreground">
|
|
1725
|
+
<CodeBlock>{`pnpm storybook`}</CodeBlock>
|
|
1726
|
+
<p className="mt-2">Test matrix: every component, all variants, all sizes, disabled/loading/error states.</p>
|
|
1727
|
+
</CardContent>
|
|
1728
|
+
</Card>
|
|
1729
|
+
<Card>
|
|
1730
|
+
<CardHeader>
|
|
1731
|
+
<CardTitle className="text-sm flex items-center gap-2">
|
|
1732
|
+
<Eye className="h-4 w-4" strokeWidth={1.5} /> Preview app
|
|
1733
|
+
</CardTitle>
|
|
1734
|
+
</CardHeader>
|
|
1735
|
+
<CardContent className="text-sm text-muted-foreground">
|
|
1736
|
+
<CodeBlock>{`pnpm dev`}</CodeBlock>
|
|
1737
|
+
<p className="mt-2">Live preview with all tabs: Components, Cards, Dashboard, Mail, Pricing, Customize, Layers.</p>
|
|
1738
|
+
</CardContent>
|
|
1739
|
+
</Card>
|
|
1740
|
+
</div>
|
|
1741
|
+
</div>
|
|
1018
1742
|
|
|
1019
|
-
|
|
1743
|
+
{/* Reference */}
|
|
1744
|
+
<div>
|
|
1745
|
+
<h3 className="text-sm font-semibold mb-3">Reference</h3>
|
|
1746
|
+
<div className="grid md:grid-cols-2 gap-4">
|
|
1747
|
+
<Card>
|
|
1748
|
+
<CardHeader>
|
|
1749
|
+
<CardTitle className="text-sm">TypeScript support</CardTitle>
|
|
1750
|
+
</CardHeader>
|
|
1751
|
+
<CardContent className="text-sm text-muted-foreground">
|
|
1752
|
+
Full TypeScript support. All components export prop types. CVA variants are fully typed.
|
|
1753
|
+
</CardContent>
|
|
1754
|
+
</Card>
|
|
1755
|
+
<Card>
|
|
1756
|
+
<CardHeader>
|
|
1757
|
+
<CardTitle className="text-sm">Browser & Node support</CardTitle>
|
|
1758
|
+
</CardHeader>
|
|
1759
|
+
<CardContent className="text-sm text-muted-foreground">
|
|
1760
|
+
Node 18+. Browsers: Chrome, Firefox, Safari, Edge (latest 2 versions). ESM only.
|
|
1761
|
+
</CardContent>
|
|
1762
|
+
</Card>
|
|
1763
|
+
<Card>
|
|
1764
|
+
<CardHeader>
|
|
1765
|
+
<CardTitle className="text-sm">Accessibility</CardTitle>
|
|
1766
|
+
</CardHeader>
|
|
1767
|
+
<CardContent className="text-sm text-muted-foreground">
|
|
1768
|
+
WCAG 2.2 AAA baseline. 7:1 contrast, 44×44px touch targets, full keyboard support, <code className="font-mono text-xs text-foreground">prefers-reduced-motion</code> honored.
|
|
1769
|
+
</CardContent>
|
|
1770
|
+
</Card>
|
|
1771
|
+
<Card>
|
|
1772
|
+
<CardHeader>
|
|
1773
|
+
<CardTitle className="text-sm">Pre-commit checks</CardTitle>
|
|
1774
|
+
</CardHeader>
|
|
1775
|
+
<CardContent className="text-sm text-muted-foreground">
|
|
1776
|
+
<code className="font-mono text-xs text-foreground">pnpm a11y</code> runs contrast audit + a11y lint. <code className="font-mono text-xs text-foreground">pnpm check:stories</code> blocks commits without story coverage.
|
|
1777
|
+
</CardContent>
|
|
1778
|
+
</Card>
|
|
1779
|
+
</div>
|
|
1780
|
+
</div>
|
|
1020
1781
|
|
|
1021
|
-
|
|
1022
|
-
|
|
1782
|
+
{/* Docs Reference */}
|
|
1783
|
+
<Card id="docs" className="scroll-mt-24">
|
|
1784
|
+
<CardHeader>
|
|
1785
|
+
<CardTitle className="text-sm">Full docs</CardTitle>
|
|
1786
|
+
</CardHeader>
|
|
1787
|
+
<CardContent className="text-sm text-muted-foreground space-y-2">
|
|
1788
|
+
<p>
|
|
1789
|
+
See <code className="font-mono text-xs text-foreground">README.md</code> for getting started, <code className="font-mono text-xs text-foreground">DESIGN.md</code> for design principles and layout rhythm, <code className="font-mono text-xs text-foreground">COMPONENT_INDEX.md</code> for the human-readable component guide, and <code className="font-mono text-xs text-foreground">CLAUDE.md</code> for agent/AI integration rules.
|
|
1790
|
+
</p>
|
|
1791
|
+
</CardContent>
|
|
1792
|
+
</Card>
|
|
1793
|
+
</section>
|
|
1794
|
+
|
|
1795
|
+
{/* FEEDBACK */}
|
|
1796
|
+
<section className="space-y-6">
|
|
1023
1797
|
<SectionHeading
|
|
1024
|
-
eyebrow="
|
|
1025
|
-
title="
|
|
1026
|
-
description="
|
|
1798
|
+
eyebrow="Questions?"
|
|
1799
|
+
title="Feedback or need help?"
|
|
1800
|
+
description="Found a bug? Have an idea? Let me know what's working and what's not."
|
|
1027
1801
|
/>
|
|
1028
1802
|
<div className="grid md:grid-cols-2 gap-4">
|
|
1029
1803
|
<Card>
|
|
1030
1804
|
<CardHeader>
|
|
1031
1805
|
<CardTitle className="text-base flex items-center gap-2">
|
|
1032
|
-
<
|
|
1806
|
+
<MessageSquare className="h-4 w-4" strokeWidth={1.5} /> Report feedback
|
|
1033
1807
|
</CardTitle>
|
|
1034
1808
|
</CardHeader>
|
|
1035
|
-
<CardContent>
|
|
1036
|
-
|
|
1809
|
+
<CardContent className="text-sm text-muted-foreground">
|
|
1810
|
+
Open an issue at{" "}
|
|
1811
|
+
{brand.repo ? (
|
|
1812
|
+
<a
|
|
1813
|
+
href={`${brand.repo}/issues`}
|
|
1814
|
+
target="_blank"
|
|
1815
|
+
rel="noreferrer"
|
|
1816
|
+
className="font-mono text-xs text-link underline-offset-4 hover:underline"
|
|
1817
|
+
>
|
|
1818
|
+
{brand.repo.replace(/^https?:\/\//, "")}/issues
|
|
1819
|
+
</a>
|
|
1820
|
+
) : (
|
|
1821
|
+
<code className="font-mono text-xs text-foreground">
|
|
1822
|
+
github repo not configured
|
|
1823
|
+
</code>
|
|
1824
|
+
)}
|
|
1825
|
+
.
|
|
1037
1826
|
</CardContent>
|
|
1038
1827
|
</Card>
|
|
1039
1828
|
<Card>
|
|
1040
1829
|
<CardHeader>
|
|
1041
1830
|
<CardTitle className="text-base flex items-center gap-2">
|
|
1042
|
-
<
|
|
1831
|
+
<Briefcase className="h-4 w-4" strokeWidth={1.5} /> Hire me
|
|
1043
1832
|
</CardTitle>
|
|
1044
1833
|
</CardHeader>
|
|
1045
|
-
<CardContent>
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
</CardTitle>
|
|
1054
|
-
</CardHeader>
|
|
1055
|
-
<CardContent>
|
|
1056
|
-
<CodeBlock>{`import { Button } from "${corePkg.name}/components/ui/button";
|
|
1057
|
-
|
|
1058
|
-
export function Example() {
|
|
1059
|
-
return <Button>Get started</Button>;
|
|
1060
|
-
}`}</CodeBlock>
|
|
1834
|
+
<CardContent className="text-sm text-muted-foreground">
|
|
1835
|
+
I do fractional design leadership work. Let's talk about your project.{" "}
|
|
1836
|
+
<a
|
|
1837
|
+
href="mailto:hello@d3signstudio.com"
|
|
1838
|
+
className="text-primary hover:underline font-medium"
|
|
1839
|
+
>
|
|
1840
|
+
hello@d3signstudio.com
|
|
1841
|
+
</a>
|
|
1061
1842
|
</CardContent>
|
|
1062
1843
|
</Card>
|
|
1063
1844
|
</div>
|
|
1064
1845
|
</section>
|
|
1065
1846
|
|
|
1066
|
-
{/* DOCS */}
|
|
1067
|
-
<section className="space-y-6" id="docs">
|
|
1068
|
-
<SectionHeading
|
|
1069
|
-
eyebrow="Documentation"
|
|
1070
|
-
title="Where to look next"
|
|
1071
|
-
description="Everything that ships with this system is in the repo. Designers, engineers, and AI all read from the same source."
|
|
1072
|
-
/>
|
|
1073
|
-
<div className="grid md:grid-cols-2 lg:grid-cols-3 gap-3">
|
|
1074
|
-
{[
|
|
1075
|
-
{
|
|
1076
|
-
file: "README.md",
|
|
1077
|
-
label: "Read me first",
|
|
1078
|
-
desc: "Project overview, install, scripts.",
|
|
1079
|
-
icon: BookOpen,
|
|
1080
|
-
},
|
|
1081
|
-
{
|
|
1082
|
-
file: "DESIGN.md",
|
|
1083
|
-
label: "Design principles",
|
|
1084
|
-
desc: "Visual system, layout rhythm, a11y floors.",
|
|
1085
|
-
icon: Eye,
|
|
1086
|
-
},
|
|
1087
|
-
{
|
|
1088
|
-
file: "CLAUDE.md",
|
|
1089
|
-
label: "AI instructions",
|
|
1090
|
-
desc: "How agents work in this repo. Read by Cursor + Claude Code.",
|
|
1091
|
-
icon: Sparkles,
|
|
1092
|
-
},
|
|
1093
|
-
{
|
|
1094
|
-
file: "DESIGN_SYSTEM_STACK.md",
|
|
1095
|
-
label: "The stack",
|
|
1096
|
-
desc: "All ten layers — what's shipped and what's deferred.",
|
|
1097
|
-
icon: Layers,
|
|
1098
|
-
},
|
|
1099
|
-
{
|
|
1100
|
-
file: "COMPONENT_INDEX.md",
|
|
1101
|
-
label: "Component index",
|
|
1102
|
-
desc: "Human-readable component guide.",
|
|
1103
|
-
icon: Package,
|
|
1104
|
-
},
|
|
1105
|
-
{
|
|
1106
|
-
file: "CLIENT_ONBOARDING.md",
|
|
1107
|
-
label: "Onboarding",
|
|
1108
|
-
desc: "How this system was set up for you, end to end.",
|
|
1109
|
-
icon: FileText,
|
|
1110
|
-
},
|
|
1111
|
-
{
|
|
1112
|
-
file: "docs/chromatic-setup.md",
|
|
1113
|
-
label: "Chromatic setup",
|
|
1114
|
-
desc: "Wire up visual regression on this fork. One-time, ~5 minutes.",
|
|
1115
|
-
icon: GitCompare,
|
|
1116
|
-
},
|
|
1117
|
-
].map((doc) => (
|
|
1118
|
-
<Card key={doc.file}>
|
|
1119
|
-
<CardContent className="py-4 flex items-start gap-3">
|
|
1120
|
-
<doc.icon
|
|
1121
|
-
className="h-5 w-5 text-muted-foreground mt-0.5 shrink-0"
|
|
1122
|
-
strokeWidth={1.5}
|
|
1123
|
-
/>
|
|
1124
|
-
<div className="min-w-0 flex-1">
|
|
1125
|
-
<p className="font-medium text-sm">{doc.label}</p>
|
|
1126
|
-
<p className="text-sm text-muted-foreground">{doc.desc}</p>
|
|
1127
|
-
<p className="text-xs font-mono text-muted-foreground mt-1.5 truncate">
|
|
1128
|
-
{doc.file}
|
|
1129
|
-
</p>
|
|
1130
|
-
</div>
|
|
1131
|
-
</CardContent>
|
|
1132
|
-
</Card>
|
|
1133
|
-
))}
|
|
1134
|
-
</div>
|
|
1135
|
-
</section>
|
|
1136
|
-
|
|
1137
|
-
{/* WHAT TO DO NEXT */}
|
|
1138
|
-
<section className="space-y-6">
|
|
1139
|
-
<SectionHeading
|
|
1140
|
-
eyebrow="Handoff"
|
|
1141
|
-
title="What to do next"
|
|
1142
|
-
description="A short, ordered list. Do them in sequence — each one unlocks the next."
|
|
1143
|
-
/>
|
|
1144
|
-
<Card>
|
|
1145
|
-
<CardContent className="py-6 space-y-5">
|
|
1146
|
-
{[
|
|
1147
|
-
{
|
|
1148
|
-
step: "01",
|
|
1149
|
-
title: "Walk the Customize tab",
|
|
1150
|
-
body: "Try the brand color, fonts, type scale, and density controls. Save when you find a combo you like — it writes back to tokens.json.",
|
|
1151
|
-
},
|
|
1152
|
-
{
|
|
1153
|
-
step: "02",
|
|
1154
|
-
title: "Skim the Layers tab",
|
|
1155
|
-
body: "Every governance doc — voice, ethics, a11y — is editable from here. Edits commit to git in one click.",
|
|
1156
|
-
},
|
|
1157
|
-
{
|
|
1158
|
-
step: "03",
|
|
1159
|
-
title: "Read CLAUDE.md and DESIGN.md",
|
|
1160
|
-
body: "These two files teach humans and AI how to work in the system. They're the most-read files in the repo.",
|
|
1161
|
-
},
|
|
1162
|
-
{
|
|
1163
|
-
step: "04",
|
|
1164
|
-
title: "Wire up Chromatic visual regression",
|
|
1165
|
-
body: "Create a Chromatic project for the fork, add the CHROMATIC_PROJECT_TOKEN GitHub secret, and let the first push to main seed the baseline. Walk-through in the Visual regression section above; full reference at docs/chromatic-setup.md.",
|
|
1166
|
-
},
|
|
1167
|
-
{
|
|
1168
|
-
step: "05",
|
|
1169
|
-
title: "Install in your product",
|
|
1170
|
-
body: "Use the quickstart above. The package is already published — just point your app at it.",
|
|
1171
|
-
},
|
|
1172
|
-
{
|
|
1173
|
-
step: "06",
|
|
1174
|
-
title: "Tell us when you outgrow v1",
|
|
1175
|
-
body: "v2 layers (search, Figma sync, agent PRs) get added when a real signal asks for them. We'll know it's time when you do.",
|
|
1176
|
-
},
|
|
1177
|
-
].map((item) => (
|
|
1178
|
-
<div key={item.step} className="flex items-start gap-4">
|
|
1179
|
-
<div className="text-2xl font-mono font-semibold text-muted-foreground shrink-0 w-12">
|
|
1180
|
-
{item.step}
|
|
1181
|
-
</div>
|
|
1182
|
-
<div className="space-y-1 flex-1 min-w-0">
|
|
1183
|
-
<p className="font-semibold">{item.title}</p>
|
|
1184
|
-
<p className="text-sm text-muted-foreground leading-relaxed">
|
|
1185
|
-
{item.body}
|
|
1186
|
-
</p>
|
|
1187
|
-
</div>
|
|
1188
|
-
</div>
|
|
1189
|
-
))}
|
|
1190
|
-
</CardContent>
|
|
1191
|
-
</Card>
|
|
1192
|
-
</section>
|
|
1193
|
-
|
|
1194
1847
|
{/* FOOTER */}
|
|
1195
1848
|
<Separator />
|
|
1196
1849
|
<footer className="space-y-3 pb-8">
|
|
1197
1850
|
<div className="flex items-center justify-between flex-wrap gap-4">
|
|
1198
1851
|
<div className="flex items-center gap-2">
|
|
1199
|
-
<div className="h-7 w-7 rounded-md bg-primary flex items-center justify-center">
|
|
1200
|
-
<
|
|
1852
|
+
<div className="h-7 w-7 rounded-md bg-primary flex items-center justify-center text-primary-foreground">
|
|
1853
|
+
<BrandMark size={16} />
|
|
1201
1854
|
</div>
|
|
1202
1855
|
<span className="font-semibold">{brand.name}</span>
|
|
1203
1856
|
<Badge variant="outline" className="text-xs">
|
|
@@ -1215,11 +1868,6 @@ export function Example() {
|
|
|
1215
1868
|
<span className="font-mono">{corePkg.name}</span>
|
|
1216
1869
|
</div>
|
|
1217
1870
|
</div>
|
|
1218
|
-
<p className="text-xs text-muted-foreground">
|
|
1219
|
-
<Zap className="h-3 w-3 inline mr-1" strokeWidth={1.5} />
|
|
1220
|
-
This dashboard reads live from <span className="font-mono">tokens.json</span>{" "}
|
|
1221
|
-
and the component registry. Every number updates as the system evolves.
|
|
1222
|
-
</p>
|
|
1223
1871
|
</footer>
|
|
1224
1872
|
</div>
|
|
1225
1873
|
</ScrollArea>
|