An open source design system that's fully customizable and agent ready
TypeScript
polish(docsite): XDS components, foundation previews, support section (#1704)
rubyycheungf85516ea4229
diff --git a/apps/sandbox/public/docsite/figma-logo.png b/apps/sandbox/public/docsite/figma-logo.pngnew file mode 100644index 0000000000..2e377c3339Binary files /dev/null and b/apps/sandbox/public/docsite/figma-logo.png differdiff --git a/apps/sandbox/public/docsite/foundation-preview.png b/apps/sandbox/public/docsite/foundation-preview.pngnew file mode 100644index 0000000000..caf2cd7cc9Binary files /dev/null and b/apps/sandbox/public/docsite/foundation-preview.png differdiff --git a/apps/sandbox/public/docsite/hero-bg.png b/apps/sandbox/public/docsite/hero-bg.pngnew file mode 100644index 0000000000..d9e7ef86d6Binary files /dev/null and b/apps/sandbox/public/docsite/hero-bg.png differdiff --git a/apps/sandbox/src/app/(fullscreen)/pages/docsite/DocsView.tsx b/apps/sandbox/src/app/(fullscreen)/pages/docsite/DocsView.tsxindex 11abd865f7..fafec81efd 100644--- a/apps/sandbox/src/app/(fullscreen)/pages/docsite/DocsView.tsx+++ b/apps/sandbox/src/app/(fullscreen)/pages/docsite/DocsView.tsx@@ -31,11 +31,15 @@ import {ChatIcon,ChartsIcon,DownloadIcon,+ SendIcon,} from './docsite-icons';import {XDSBadge} from '@xds/core/Badge';import {XDSIcon} from '@xds/core/Icon';import {XDSDivider} from '@xds/core/Divider';import {XDSTabList, XDSTab} from '@xds/core/TabList';+import {XDSTextInput} from '@xds/core/TextInput';+import {XDSChatComposer} from '@xds/core/Chat';+import {XDSLink} from '@xds/core/Link';import {COMPONENT_PREVIEWS} from './ComponentPreviews';import {SEARCH_COMMANDS, basePath} from './constants';import {@@ -58,144 +62,36 @@ const localStyles = stylex.create({const FOUNDATION_ITEMS: {title: string;description: string;- visual: React.ReactNode;}[] = [{title: 'Colors',description:- 'Semantic color tokens for surfaces, text, borders, and accents.',- visual: (- <div style={{display: 'flex', gap: 6}}>- {['#0066FF', '#111111', '#6B7280', '#DC2626', '#059669', '#D97706'].map(- c => (- <div- key={c}- style={{- width: 28,- height: 28,- borderRadius: 6,- backgroundColor: c,- }}- />- ),- )}- </div>- ),+ 'A semantic palette that adapts across themes. Use surface, text, border, and accent tokens instead of raw hex values so your UI stays consistent in light, dark, and custom themes.',},{title: 'Typography',description:- 'Type scale from display headings down to captions and labels.',- visual: (- <div style={{display: 'flex', alignItems: 'baseline', gap: 10}}>- <span style={{fontSize: 32, fontWeight: 700, lineHeight: 1}}>Ag</span>- <span- style={{fontSize: 18, fontWeight: 600, lineHeight: 1, opacity: 0.6}}>- Ag- </span>- <span- style={{fontSize: 13, fontWeight: 400, lineHeight: 1, opacity: 0.4}}>- Ag- </span>- </div>- ),+ 'A type scale from display-1 down to supporting text, with weight and color options. Establishes visual hierarchy without guessing font sizes.',},{title: 'Spacing',description:- 'Consistent 4px-based spacing scale for padding, margins, and gaps.',- visual: (- <div style={{display: 'flex', alignItems: 'flex-end', gap: 4}}>- {[4, 8, 12, 16, 24, 32].map(s => (- <div- key={s}- style={{- width: 16,- height: s,- borderRadius: 3,- backgroundColor: 'var(--color-icon-accent, #0066FF)',- opacity: 0.15 + (s / 32) * 0.85,- }}- />- ))}- </div>- ),+ 'A 4px-based scale (0–10) used for padding, margins, and gaps. Keeps layouts aligned to a consistent rhythm across every component and page.',},{title: 'Radius',- description: 'Border radius tokens from sharp corners to fully rounded.',- visual: (- <div style={{display: 'flex', gap: 8, alignItems: 'center'}}>- {[2, 6, 10, 16, 999].map(r => (- <div- key={r}- style={{- width: 32,- height: 32,- borderRadius: r,- border: '2px solid var(--color-border-default, #d0d0d0)',- backgroundColor: 'var(--color-background-muted, #f5f5f5)',- }}- />- ))}- </div>- ),+ description:+ 'Border radius tokens from sharp (2px) to fully rounded (pill). Controls, cards, and containers each have a designated radius so shapes feel intentional.',},{title: 'Motion',- description: 'Duration and easing curves for transitions and animations.',- visual: (- <div style={{display: 'flex', gap: 6, alignItems: 'center'}}>- {['150ms', '250ms', '400ms'].map((d, i) => (- <div key={d} style={{textAlign: 'center'}}>- <div- style={{- width: 24 + i * 6,- height: 4,- borderRadius: 2,- backgroundColor: 'var(--color-icon-accent, #0066FF)',- opacity: 0.4 + i * 0.25,- }}- />- <span- style={{- fontSize: 10,- color: 'var(--color-text-secondary)',- marginTop: 4,- display: 'block',- fontFamily: 'monospace',- }}>- {d}- </span>- </div>- ))}- </div>- ),+ description:+ 'Duration and easing presets for transitions and animations. Fast (150ms) for micro-interactions, medium (250ms) for panels, slow (400ms) for page transitions.',},{title: 'Elevation',description:- 'Shadow tokens for layered surfaces, cards, popovers, and dialogs.',- visual: (- <div style={{display: 'flex', gap: 10, alignItems: 'center'}}>- {[- '0 1px 2px rgba(0,0,0,0.06)',- '0 2px 8px rgba(0,0,0,0.1)',- '0 8px 24px rgba(0,0,0,0.14)',- ].map((shadow, i) => (- <div- key={i}- style={{- width: 32,- height: 24,- borderRadius: 6,- backgroundColor: '#fff',- boxShadow: shadow,- }}- />- ))}- </div>- ),+ 'Layered shadow tokens that communicate depth. Cards sit at level 1, popovers at level 2, dialogs at level 3 — no manual box-shadow needed.',},];@@ -241,15 +137,16 @@ const LIBRARY_PACKAGES: {const RESOURCE_ITEMS: {title: string;description: string;- icon: React.ComponentType<React.SVGProps<SVGSVGElement>>;+ icon?: React.ComponentType<React.SVGProps<SVGSVGElement>>;+ image?: string;iconBg: string;iconColor: string;}[] = [{title: 'Figma Library',description: 'Design files, tokens, and component specs for designers.',- icon: PaletteIcon,- iconBg: '#F3E8FF',+ image: `${basePath}/docsite/figma-logo.png`,+ iconBg: 'transparent',iconColor: '#7C3AED',},{@@ -650,12 +547,12 @@ function WhatsNewPage() {label={entry.type}variant={entry.type === 'Release'- ? 'success'+ ? 'green': entry.type === 'Improvement'- ? 'info'+ ? 'blue': entry.type === 'Fix'- ? 'warning'- : 'error'+ ? 'orange'+ : 'red'}/></XDSStack>@@ -716,6 +613,223 @@ function WhatsNewPage() {);}+// ---------------------------------------------------------------------------+// GettingStartedPage component+// ---------------------------------------------------------------------------++const INSTALL_CODE = `# Install the core package+npm install @xds/core++# Or with yarn+yarn add @xds/core`;++const PROVIDER_CODE = `import {XDSThemeProvider} from '@xds/core/ThemeProvider';+import '@xds/theme-default';++export default function App({children}) {+ return (+ <XDSThemeProvider>+ {children}+ </XDSThemeProvider>+ );+}`;++const FIRST_COMPONENT_CODE = `import {XDSButton} from '@xds/core/Button';+import {XDSStack} from '@xds/core/Layout';+import {XDSHeading, XDSText} from '@xds/core/Text';++export function WelcomeCard() {+ return (+ <XDSStack direction="vertical" gap={4}>+ <XDSHeading level={1}>Welcome</XDSHeading>+ <XDSText type="body">+ You're ready to build with XDS.+ </XDSText>+ <XDSButton+ label="Get started"+ variant="primary"+ onClick={() => console.log('clicked')}+ />+ </XDSStack>+ );+}`;++const THEME_CODE = `# Install a theme+npm install @xds/theme-neutral++# Available themes:+# @xds/theme-default — Clean blue accent+# @xds/theme-neutral — Warm gray palette+# @xds/theme-daily — Soft blues for everyday tools`;++const CLI_CODE = `# Install the CLI+npm install -g @xds/cli++# Scaffold a new project+xds init my-app++# Generate a page template+xds template dashboard++# Eject a component for customization+xds swizzle Button++# Load agent docs for AI assistants+xds docs`;++function CodeBlock({code, label}: {code: string; label?: string}) {+ return (+ <div+ style={{+ backgroundColor: '#1a1a2e',+ borderRadius: 12,+ overflow: 'hidden',+ }}>+ {label && (+ <div+ style={{+ padding: '8px 16px',+ borderBottom: '1px solid rgba(255,255,255,0.08)',+ }}>+ <XDSText+ type="supporting"+ style={{+ color: 'rgba(255,255,255,0.5)',+ fontFamily: 'monospace',+ fontSize: 12,+ }}>+ {label}+ </XDSText>+ </div>+ )}+ <pre+ style={{+ margin: 0,+ padding: 20,+ fontFamily: "'SF Mono', 'Fira Code', monospace",+ fontSize: 13,+ lineHeight: 1.6,+ color: '#e0e0e0',+ overflowX: 'auto',+ }}>+ {code}+ </pre>+ </div>+ );+}++const GETTING_STARTED_STEPS: {+ step: string;+ title: string;+ description: string;+ code: string;+ codeLabel?: string;+}[] = [+ {+ step: '01',+ title: 'Install',+ description:+ 'Add @xds/core to your project. XDS works with any React framework — Next.js, Vite, Remix, or plain React.',+ code: INSTALL_CODE,+ codeLabel: 'Terminal',+ },+ {+ step: '02',+ title: 'Add the theme provider',+ description:+ 'Wrap your app in XDSThemeProvider. This sets up design tokens for colors, typography, spacing, and radius that all components inherit.',+ code: PROVIDER_CODE,+ codeLabel: 'app/layout.tsx',+ },+ {+ step: '03',+ title: 'Use a component',+ description:+ 'Import any component from its subpath. Each component is individually tree-shakeable — you only ship what you use.',+ code: FIRST_COMPONENT_CODE,+ codeLabel: 'app/page.tsx',+ },+ {+ step: '04',+ title: 'Pick a theme',+ description:+ 'Swap the entire look and feel by installing a different theme package. Colors, typography, radius, and elevation all update automatically.',+ code: THEME_CODE,+ codeLabel: 'Terminal',+ },+ {+ step: '05',+ title: 'Use the CLI',+ description:+ 'The XDS CLI scaffolds projects, generates page templates, ejects components for customization, and produces agent docs for AI coding assistants.',+ code: CLI_CODE,+ codeLabel: 'Terminal',+ },+];++function GettingStartedPage() {+ return (+ <div style={{maxWidth: 760, margin: '0 auto', padding: '32px 40px'}}>+ <XDSStack direction="vertical" gap={2}>+ <XDSText type="display-1">Getting Started</XDSText>+ <XDSText type="large" weight="normal" color="secondary">+ Go from zero to a working XDS app in five steps.+ </XDSText>+ </XDSStack>++ <div style={{marginTop: 48}}>+ {GETTING_STARTED_STEPS.map((item, i) => (+ <div+ key={item.step}+ style={{+ marginBottom: i < GETTING_STARTED_STEPS.length - 1 ? 56 : 0,+ }}>+ <XDSStack+ direction="horizontal"+ gap={3}+ vAlign="center"+ style={{marginBottom: 8}}>+ <XDSText+ type="supporting"+ style={{+ fontFamily: 'monospace',+ fontSize: 12,+ letterSpacing: '0.06em',+ color: 'var(--color-text-accent, #0066FF)',+ fontWeight: 600,+ }}>+ STEP {item.step}+ </XDSText>+ </XDSStack>+ <XDSHeading level={2} style={{marginBottom: 8}}>+ {item.title}+ </XDSHeading>+ <XDSText+ type="body"+ color="secondary"+ style={{marginBottom: 20, maxWidth: 600}}>+ {item.description}+ </XDSText>+ <CodeBlock code={item.code} label={item.codeLabel} />+ </div>+ ))}+ </div>++ <XDSDivider style={{marginTop: 56, marginBottom: 40}} />++ <XDSStack direction="vertical" gap={3} style={{marginBottom: 64}}>+ <XDSHeading level={2}>Next steps</XDSHeading>+ <XDSList density="compact" listStyle="disc">+ <XDSListItem label="Browse the component library in the sidebar" />+ <XDSListItem label="Try Craft to visually explore templates and themes" />+ <XDSListItem label="Run xds docs to generate context for AI coding assistants" />+ <XDSListItem label="Use xds swizzle to eject and customize any component" />+ </XDSList>+ </XDSStack>+ </div>+ );+}+// ---------------------------------------------------------------------------// LibraryOverview component// ---------------------------------------------------------------------------@@ -723,22 +837,21 @@ function WhatsNewPage() {function LibraryOverview({onGetStarted,onSelectComponent,+ onCraft,}: {onGetStarted: () => void;onSelectComponent: (key: string) => void;+ onCraft: () => void;}) {- const totalComponents = COMPONENT_CATEGORIES.reduce(- (sum, cat) => sum + cat.items.length,- 0,- );-return (<div style={{maxWidth: 1200, margin: '0 auto', padding: '32px 40px'}}>{/* ── Section 1: Hero ── */}<divstyle={{marginBottom: 64,- backgroundColor: 'var(--color-background-accent-muted, #e3f2fd)',+ backgroundImage: `url(${basePath}/docsite/hero-bg.png)`,+ backgroundSize: 'cover',+ backgroundPosition: 'center',borderRadius: 24,padding: '64px 60px',display: 'flex',@@ -747,87 +860,44 @@ function LibraryOverview({overflow: 'hidden',minHeight: 340,}}>- <div style={{flex: 1, minWidth: 0}}>- <XDSText type="supporting" color="secondary">- XDS Design System+ <XDSStack+ direction="vertical"+ gap={0}+ hAlign="center"+ style={{flex: 1, minWidth: 0, textAlign: 'center'}}>+ <XDSText type="display-1">+ XDS OSS+ <br />+ for building with AI</XDSText>- <div style={{marginTop: 8}}>- <XDSText type="display-1">Build products faster with XDS.</XDSText>- </div>- <div style={{marginTop: 16, maxWidth: 540}}>- <XDSText type="large" color="secondary">- XDS is an open-source React component library born from years of- building internal tools at Meta. Built with TypeScript and StyleX,- it provides 60+ accessible, themeable components for shipping- polished UIs fast.- </XDSText>- </div>- <div style={{marginTop: 28, display: 'flex', gap: 12}}>+ <XDSStack direction="horizontal" gap={3} style={{marginTop: 28}}><XDSButtonlabel="Get started"variant="primary"size="lg"onClick={onGetStarted}+ style={{width: 180}}/><XDSButtonlabel="Find inspiration"variant="secondary"size="lg"- onClick={() => onSelectComponent('button')}- />- </div>- <div- style={{- marginTop: 32,- display: 'flex',- gap: 32,- }}>- {[- {value: `${totalComponents}+`, label: 'Components'},- {value: '6', label: 'Themes'},- {value: 'MIT', label: 'License'},- ].map(stat => (- <div key={stat.label}>- <XDSText- type="body"- style={{fontWeight: 700, display: 'block'}}>- {stat.value}- </XDSText>- <XDSText type="supporting" color="secondary">- {stat.label}- </XDSText>- </div>- ))}- </div>- </div>- <div- style={{- flex: '0 0 320px',- display: 'flex',- alignItems: 'center',- justifyContent: 'center',- opacity: 0.08,- }}>- <svg width="280" height="148" viewBox="0 0 46 24" fill="currentColor">- <path d="M2.4239 15.8011C2.03945 16.3796 1.66972 16.9538 1.3147 17.524C0.707427 18.4992 1.42354 19.7348 2.57241 19.7348C3.13302 19.7348 3.64463 19.4209 3.91525 18.93C4.29391 18.243 4.71274 17.5352 5.17173 16.8066C5.38894 16.4618 5.60743 16.12 5.82721 15.7812C6.25251 15.1254 6.46516 14.7976 6.76252 14.68C6.99255 14.5891 7.27368 14.5899 7.50317 14.6822C7.79984 14.8014 8.00881 15.1278 8.42675 15.7804C8.64287 16.1179 8.85732 16.46 9.07008 16.8066C9.52175 17.534 9.93823 18.2339 10.3195 18.9063C10.6075 19.4141 11.1428 19.7348 11.7266 19.7348C12.9476 19.7348 13.7063 18.4203 13.0547 17.3877C12.7332 16.8781 12.3991 16.3639 12.0525 15.8453C11.3983 14.8527 10.7379 13.8906 10.0714 12.9592C9.81687 12.6036 9.68962 12.4258 9.64377 12.2384C9.60589 12.0836 9.60492 11.9307 9.64085 11.7754C9.68435 11.5874 9.80856 11.4091 10.057 11.0526C10.7093 10.1164 11.3596 9.15781 12.0078 8.1768C12.3869 7.60474 12.7521 7.03681 13.1035 6.47298C13.71 5.49987 12.9962 4.26519 11.8496 4.26519C11.2943 4.26519 10.7868 4.57405 10.5169 5.05923C10.1399 5.73688 9.72461 6.43721 9.27114 7.16022C9.06143 7.49458 8.8505 7.82569 8.63835 8.15358C8.21478 8.80819 8.003 9.1355 7.70554 9.25334C7.47561 9.34442 7.19397 9.34375 6.96448 9.25156C6.66759 9.13229 6.45853 8.80578 6.04043 8.15276C5.83116 7.82591 5.62351 7.49506 5.41747 7.16022C4.97918 6.44793 4.5738 5.76096 4.20132 5.0993C3.9136 4.58821 3.37617 4.26519 2.78967 4.26519C1.56624 4.26519 0.805692 5.58299 1.45419 6.62041C1.76588 7.11903 2.08912 7.6231 2.4239 8.1326C3.0752 9.10994 3.73263 10.059 4.3962 10.9796C4.65373 11.337 4.7825 11.5156 4.82882 11.7042C4.86709 11.86 4.86797 12.0139 4.83149 12.1702C4.78732 12.3593 4.66122 12.5385 4.40903 12.897C3.74526 13.8406 3.08355 14.8086 2.4239 15.8011Z" />- <path- fillRule="evenodd"- clipRule="evenodd"- d="M22.4734 4.26519C20.4471 4.26519 19.434 4.26519 18.6657 4.67201C18.0456 5.00031 17.5385 5.50739 17.2102 6.12744C16.8034 6.89579 16.8034 7.90892 16.8034 9.9352V14.0648C16.8034 16.0911 16.8034 17.1042 17.2102 17.8726C17.5385 18.4926 18.0456 18.9997 18.6657 19.328C19.434 19.7348 20.4471 19.7348 22.4734 19.7348H23.2039C24.8496 19.7348 26.2644 19.4033 27.4485 18.7403C28.6399 18.07 29.5559 17.1529 30.1963 15.989C30.8367 14.825 31.1569 13.4954 31.1569 12C31.1569 10.5046 30.8367 9.17495 30.1963 8.01105C29.5559 6.84714 28.6399 5.9337 27.4485 5.27072C26.2644 4.60037 24.8496 4.26519 23.2039 4.26519H22.4734ZM20.0092 8.74707C20.0092 8.16814 20.0092 7.87867 20.1255 7.65914C20.2193 7.48198 20.3641 7.33711 20.5413 7.24331C20.7608 7.12707 21.0503 7.12707 21.6292 7.12707H23.1927C24.6522 7.12707 25.7916 7.57274 26.6107 8.46409C27.4299 9.34807 27.8394 10.5267 27.8394 12C27.8394 13.4659 27.4299 14.6446 26.6107 15.5359C25.7916 16.4273 24.6522 16.8729 23.1927 16.8729H21.6292C21.0503 16.8729 20.7608 16.8729 20.5413 16.7567C20.3641 16.6629 20.2193 16.518 20.1255 16.3409C20.0092 16.1213 20.0092 15.8319 20.0092 15.2529V8.74707Z"+ onClick={onCraft}+ style={{width: 180}}/>- <path d="M35.4666 19.2376C36.6134 19.7459 37.9501 20 39.4767 20H39.8006C41.7144 20 43.2261 19.5801 44.3357 18.7403C45.4452 17.9006 46 16.7403 46 15.2597C46 14.3757 45.8213 13.6501 45.4638 13.0829C45.1064 12.5083 44.6559 12.0589 44.1123 11.7348C43.5761 11.4033 43.0325 11.1565 42.4814 10.9945C41.9304 10.8324 41.4575 10.7145 41.0628 10.6409L38.706 10.1878C38.0283 10.0552 37.4698 9.87477 37.0305 9.64641C36.5985 9.41068 36.3826 9.02762 36.3826 8.49724C36.3826 7.96685 36.6395 7.55064 37.1533 7.24862C37.6671 6.93923 38.3857 6.78453 39.3091 6.78453H39.6219C40.3964 6.78453 41.1224 6.93186 41.8001 7.22652C42.0982 7.35474 42.3899 7.5234 42.6754 7.73251C43.326 8.20923 44.2444 8.27802 44.8243 7.71734C45.34 7.21868 45.4053 6.39786 44.8761 5.91349C44.3498 5.43171 43.7638 5.03698 43.1181 4.72928C42.1054 4.24309 40.9511 4 39.6554 4H39.3315C38.0953 4 37.0156 4.19521 36.0922 4.58564C35.1762 4.97606 34.4613 5.52486 33.9475 6.23204C33.4411 6.93186 33.188 7.76059 33.188 8.71823C33.188 9.49171 33.3406 10.1436 33.6459 10.674C33.9587 11.2044 34.3571 11.6354 34.8411 11.9669C35.3326 12.2983 35.8539 12.5599 36.4049 12.7514C36.956 12.9355 37.4698 13.0718 37.9464 13.1602L40.3033 13.6243C40.6905 13.698 41.074 13.8011 41.4538 13.9337C41.841 14.0589 42.1612 14.2431 42.4144 14.4862C42.6676 14.7293 42.7942 15.0608 42.7942 15.4807C42.7942 16.6151 41.7814 17.1823 39.7559 17.1823H39.4432C38.49 17.1823 37.615 17.0055 36.8182 16.6519C36.4847 16.4994 36.1665 16.3134 35.8635 16.0938C35.17 15.5911 34.1857 15.5241 33.5784 16.1282C33.0651 16.6388 32.9912 17.4631 33.5198 17.9578C34.0797 18.4818 34.7287 18.9083 35.4666 19.2376Z" />- </svg>- </div>+ </XDSStack>+ </XDSStack></div>{/* ── Section 2: Foundations ── */}- <div style={{marginBottom: 64}}>- <XDSText type="display-2">Foundations</XDSText>- <div style={{marginTop: 8, marginBottom: 24}}>- <XDSText type="body" color="secondary">- The design tokens and primitives that every component is built on.- </XDSText>- </div>+ <XDSStack direction="vertical" gap={0} style={{marginBottom: 64}}>+ <XDSHeading level={2}>Foundations</XDSHeading>+ <XDSText+ type="body"+ color="secondary"+ style={{marginTop: 8, marginBottom: 24}}>+ The design tokens and primitives that every component is built on.+ </XDSText><divstyle={{display: 'grid',@@ -836,45 +906,53 @@ function LibraryOverview({}}>{FOUNDATION_ITEMS.map(item => (<XDSCard key={item.title} padding={0}>- <div style={{padding: '24px 24px 20px'}}>- <div- style={{- height: 52,- marginBottom: 16,- display: 'flex',- alignItems: 'center',- }}>- {item.visual}- </div>- <XDSText- type="body"- style={{fontWeight: 700, display: 'block'}}>+ <img+ src={`${basePath}/docsite/foundation-preview.png`}+ alt={item.title}+ style={{+ display: 'block',+ width: '100%',+ aspectRatio: '16 / 9',+ objectFit: 'cover',+ borderRadius: '12px 12px 0 0',+ }}+ />+ <XDSStack+ direction="vertical"+ gap={1}+ style={{padding: '16px 20px'}}>+ <XDSText type="body" weight="bold">{item.title}</XDSText>- <div style={{marginTop: 4}}>- <XDSText type="supporting" color="secondary">- {item.description}- </XDSText>- </div>- </div>+ <XDSText type="supporting" color="secondary">+ {item.description}+ </XDSText>+ </XDSStack></XDSCard>))}</div>- </div>+ </XDSStack>{/* ── Section 3: Libraries & Packages ── */}- <div style={{marginBottom: 64}}>- <XDSText type="display-2">Libraries & Packages</XDSText>- <div style={{marginTop: 8, marginBottom: 24}}>- <XDSText type="body" color="secondary">- Install what you need. All packages are published to npm under the{' '}- <span style={{fontFamily: 'monospace'}}>@xds</span> scope.- </XDSText>- </div>+ <XDSStack direction="vertical" gap={0} style={{marginBottom: 64}}>+ <XDSHeading level={2}>Libraries & Packages</XDSHeading>+ <XDSText+ type="body"+ color="secondary"+ style={{marginTop: 8, marginBottom: 24}}>+ Install what you need. All packages are published to npm under the{' '}+ <XDSText+ type="body"+ color="secondary"+ style={{fontFamily: 'monospace'}}>+ @xds+ </XDSText>{' '}+ scope.+ </XDSText><divstyle={{display: 'grid',- gridTemplateColumns: 'repeat(2, 1fr)',+ gridTemplateColumns: 'repeat(4, 1fr)',gap: 16,}}>{LIBRARY_PACKAGES.map(pkg => {@@ -928,20 +1006,15 @@ function LibraryOverview({}/></div>- <div style={{flex: 1}}>- <div- style={{- display: 'flex',- alignItems: 'baseline',- gap: 8,- }}>+ <XDSStack direction="vertical" gap={1} style={{flex: 1}}>+ <XDSStack+ direction="horizontal"+ gap={2}+ style={{alignItems: 'baseline'}}><XDSTexttype="body"- style={{- fontWeight: 700,- fontFamily: 'monospace',- fontSize: 14,- }}>+ weight="bold"+ style={{fontFamily: 'monospace', fontSize: 14}}>{pkg.name}</XDSText>{pkg.version && (@@ -952,28 +1025,27 @@ function LibraryOverview({v{pkg.version}</XDSText>)}- </div>- <div style={{marginTop: 6}}>- <XDSText type="supporting" color="secondary">- {pkg.description}- </XDSText>- </div>- </div>+ </XDSStack>+ <XDSText type="supporting" color="secondary">+ {pkg.description}+ </XDSText>+ </XDSStack></div></XDSCard>);})}</div>- </div>+ </XDSStack>{/* ── Section 3: Resources ── */}- <div style={{marginBottom: 64}}>- <XDSText type="display-2">Resources</XDSText>- <div style={{marginTop: 8, marginBottom: 24}}>- <XDSText type="body" color="secondary">- Everything you need to design, build, and contribute.- </XDSText>- </div>+ <XDSStack direction="vertical" gap={0} style={{marginBottom: 64}}>+ <XDSHeading level={2}>Resources</XDSHeading>+ <XDSText+ type="body"+ color="secondary"+ style={{marginTop: 8, marginBottom: 24}}>+ Everything you need to design, build, and contribute.+ </XDSText><divstyle={{display: 'grid',@@ -981,7 +1053,6 @@ function LibraryOverview({gap: 16,}}>{RESOURCE_ITEMS.map(resource => {- const IconComp = resource.icon;return (<XDSCard key={resource.title} padding={0}><div@@ -1002,21 +1073,29 @@ function LibraryOverview({alignItems: 'center',justifyContent: 'center',flexShrink: 0,+ overflow: 'hidden',}}>- <XDSIcon icon={IconComp} size="md" color="accent" />+ {resource.image ? (+ <img+ src={resource.image}+ alt={resource.title}+ style={{width: 44, height: 44, objectFit: 'contain'}}+ />+ ) : resource.icon ? (+ <XDSIcon icon={resource.icon} size="md" color="accent" />+ ) : null}</div>- <div style={{flex: 1, minWidth: 0}}>- <XDSText- type="body"- style={{fontWeight: 700, display: 'block'}}>+ <XDSStack+ direction="vertical"+ gap={1}+ style={{flex: 1, minWidth: 0}}>+ <XDSText type="body" weight="bold">{resource.title}</XDSText>- <div style={{marginTop: 4}}>- <XDSText type="supporting" color="secondary">- {resource.description}- </XDSText>- </div>- </div>+ <XDSText type="supporting" color="secondary">+ {resource.description}+ </XDSText>+ </XDSStack><XDSIconicon={ExternalLinkIcon}size="sm"@@ -1027,19 +1106,20 @@ function LibraryOverview({);})}</div>- </div>+ </XDSStack>{/* ── Section 4: XDS OSS vs XDS WWW ── */}- <div style={{marginBottom: 64}}>- <XDSText type="display-2">XDS Open Source vs XDS WWW</XDSText>- <div style={{marginTop: 8, marginBottom: 24, maxWidth: 680}}>- <XDSText type="body" color="secondary">- XDS exists in two forms. This library is the open-source version,- which ports the design value from Meta's internal system with a- modern, open architecture. Every component can be forked or swizzled- — you own the code.- </XDSText>- </div>+ <XDSStack direction="vertical" gap={0} style={{marginBottom: 64}}>+ <XDSHeading level={2}>XDS Open Source vs XDS WWW</XDSHeading>+ <XDSText+ type="body"+ color="secondary"+ style={{marginTop: 8, marginBottom: 24, maxWidth: 680}}>+ XDS exists in two forms. This library is the open-source version,+ which ports the design value from Meta's internal system with a+ modern, open architecture. Every component can be forked or swizzled —+ you own the code.+ </XDSText><divstyle={{display: 'grid',@@ -1047,149 +1127,139 @@ function LibraryOverview({gap: 16,}}>{/* OSS card */}- <XDSCard padding={0}>- <div style={{padding: 28}}>- <div- style={{- display: 'flex',- alignItems: 'center',- gap: 10,- marginBottom: 8,- }}>- <div- style={{- width: 10,- height: 10,- borderRadius: '50%',- backgroundColor: '#059669',- flexShrink: 0,- }}- />- <XDSHeading level={3}>XDS Open Source</XDSHeading>- </div>- <XDSText- type="supporting"- color="secondary"- style={{- fontFamily: 'monospace',- display: 'block',- marginBottom: 16,- }}>- @xds/core- </XDSText>- <XDSDivider />+ <XDSCard padding={6}>+ <XDSStack+ direction="horizontal"+ gap={2}+ vAlign="center"+ style={{marginBottom: 8}}><divstyle={{- marginTop: 16,- display: 'flex',- flexDirection: 'column',- gap: 16,- }}>- {OSS_FEATURES.map(feature => (+ width: 10,+ height: 10,+ borderRadius: '50%',+ backgroundColor: '#059669',+ flexShrink: 0,+ }}+ />+ <XDSHeading level={3}>XDS Open Source</XDSHeading>+ </XDSStack>+ <XDSText+ type="supporting"+ color="secondary"+ style={{fontFamily: 'monospace', marginBottom: 16}}>+ @xds/core+ </XDSText>+ <XDSDivider />+ <XDSStack direction="vertical" gap={4} style={{marginTop: 16}}>+ {OSS_FEATURES.map(feature => (+ <XDSStack key={feature.title} direction="horizontal" gap={3}><div- key={feature.title}style={{- display: 'flex',- gap: 12,- }}>- <div- style={{- width: 6,- height: 6,- borderRadius: '50%',- backgroundColor: '#059669',- flexShrink: 0,- marginTop: 7,- }}- />- <div>- <XDSText- type="body"- style={{fontWeight: 600, display: 'block'}}>- {feature.title}- </XDSText>- <XDSText type="supporting" color="secondary">- {feature.desc}- </XDSText>- </div>- </div>- ))}- </div>- </div>+ width: 6,+ height: 6,+ borderRadius: '50%',+ backgroundColor: '#059669',+ flexShrink: 0,+ marginTop: 7,+ }}+ />+ <XDSStack direction="vertical" gap={0}>+ <XDSText type="body" weight="semibold">+ {feature.title}+ </XDSText>+ <XDSText type="supporting" color="secondary">+ {feature.desc}+ </XDSText>+ </XDSStack>+ </XDSStack>+ ))}+ </XDSStack></XDSCard>{/* WWW card */}- <XDSCard padding={0}>- <div style={{padding: 28}}>- <div- style={{- display: 'flex',- alignItems: 'center',- gap: 10,- marginBottom: 8,- }}>- <div- style={{- width: 10,- height: 10,- borderRadius: '50%',- backgroundColor: '#6B7280',- flexShrink: 0,- }}- />- <XDSHeading level={3}>XDS WWW (Internal)</XDSHeading>- </div>- <XDSText- type="supporting"- color="secondary"- style={{- fontFamily: 'monospace',- display: 'block',- marginBottom: 16,- }}>- @xds/core- </XDSText>- <XDSDivider />+ <XDSCard padding={6}>+ <XDSStack+ direction="horizontal"+ gap={2}+ vAlign="center"+ style={{marginBottom: 8}}><divstyle={{- marginTop: 16,- display: 'flex',- flexDirection: 'column',- gap: 16,- }}>- {WWW_FEATURES.map(feature => (+ width: 10,+ height: 10,+ borderRadius: '50%',+ backgroundColor: '#6B7280',+ flexShrink: 0,+ }}+ />+ <XDSHeading level={3}>XDS WWW (Internal)</XDSHeading>+ </XDSStack>+ <XDSText+ type="supporting"+ color="secondary"+ style={{fontFamily: 'monospace', marginBottom: 16}}>+ @xds/core+ </XDSText>+ <XDSDivider />+ <XDSStack direction="vertical" gap={4} style={{marginTop: 16}}>+ {WWW_FEATURES.map(feature => (+ <XDSStack key={feature.title} direction="horizontal" gap={3}><div- key={feature.title}style={{- display: 'flex',- gap: 12,- }}>- <div- style={{- width: 6,- height: 6,- borderRadius: '50%',- backgroundColor: '#6B7280',- flexShrink: 0,- marginTop: 7,- }}- />- <div>- <XDSText- type="body"- style={{fontWeight: 600, display: 'block'}}>- {feature.title}- </XDSText>- <XDSText type="supporting" color="secondary">- {feature.desc}- </XDSText>- </div>- </div>- ))}- </div>- </div>+ width: 6,+ height: 6,+ borderRadius: '50%',+ backgroundColor: '#6B7280',+ flexShrink: 0,+ marginTop: 7,+ }}+ />+ <XDSStack direction="vertical" gap={0}>+ <XDSText type="body" weight="semibold">+ {feature.title}+ </XDSText>+ <XDSText type="supporting" color="secondary">+ {feature.desc}+ </XDSText>+ </XDSStack>+ </XDSStack>+ ))}+ </XDSStack></XDSCard></div>- </div>+ </XDSStack>++ {/* ── Section 5: Have a question? ── */}+ <XDSStack+ direction="vertical"+ gap={3}+ hAlign="center"+ style={{marginBottom: 64, textAlign: 'center'}}>+ <XDSText type="display-1">Need help?</XDSText>+ <XDSText type="body" color="secondary">+ Ask our AI assistant first — it knows the docs better than we do.+ </XDSText>+ <div+ style={{+ width: '100%',+ maxWidth: 560,+ marginTop: 16,+ marginBottom: 16,+ }}>+ <XDSChatComposer+ onSubmit={() => {}}+ placeholder="How do I theme a Button?"+ density="compact"+ />+ </div>+ <XDSText type="supporting" color="secondary">+ Prefer a human? Drop us a message in{' '}+ <XDSLink label="#xds-support" color="secondary">+ #xds-support+ </XDSLink>+ </XDSText>+ </XDSStack>+ <div style={{height: 100}} /></div>);}@@ -1296,7 +1366,7 @@ export function DocsView({/>}centerContent={- <div style={{display: 'flex', gap: 4}}>+ <div style={{display: 'flex', gap: 4, paddingLeft: 260}}>{[{label: 'Home',@@ -1397,9 +1467,12 @@ export function DocsView({setSelectedComponent(key);setActiveNav(key);}}+ onCraft={() => setActiveView('craft')}/>) : selectedComponent === 'whats-new' ? (<WhatsNewPage />+ ) : selectedComponent === 'getting-started' ? (+ <GettingStartedPage />) : (<div style={{maxWidth: 840, margin: '0 auto', padding: '32px 40px'}}>{/* Header */}