An open source design system that's fully customizable and agent ready
TypeScript
feat(sandbox): register Stone, Gothic, and Chocolate themes (#2033)
rubyycheung8c43652e7a58
diff --git a/apps/sandbox/package.json b/apps/sandbox/package.jsonindex dcbc9b683c..a69a20c0d6 100644--- a/apps/sandbox/package.json+++ b/apps/sandbox/package.json@@ -3,7 +3,7 @@"version": "0.0.1","private": true,"scripts": {- "build:deps": "yarn workspace @xds/theme-default build && yarn workspace @xds/theme-neutral build && yarn workspace @xds/theme-brutalist build && yarn workspace @xds/theme-matcha build && yarn workspace @xds/theme-daily build",+ "build:deps": "yarn workspace @xds/theme-default build && yarn workspace @xds/theme-neutral build && yarn workspace @xds/theme-brutalist build && yarn workspace @xds/theme-matcha build && yarn workspace @xds/theme-daily build && yarn workspace @xds/theme-stone build && yarn workspace @xds/theme-gothic build && yarn workspace @xds/theme-chocolate build","generate:versions": "node scripts/generate-versions.js","generate:changelog": "node scripts/generate-changelog.js","generate:cli": "node scripts/generate-cli-registry.mjs",@@ -28,7 +28,10 @@"next": "^15.5.15","react": "^19.2.5","react-dom": "^19.2.5",- "recharts": "^2.15.3"+ "recharts": "^2.15.3",+ "@xds/theme-stone": "*",+ "@xds/theme-gothic": "*",+ "@xds/theme-chocolate": "*"},"devDependencies": {"@babel/preset-react": "^7.25.0",diff --git a/apps/sandbox/src/app/(fullscreen)/PreviewShell.tsx b/apps/sandbox/src/app/(fullscreen)/PreviewShell.tsxindex 0168eb2ee0..d62e067732 100644--- a/apps/sandbox/src/app/(fullscreen)/PreviewShell.tsx+++ b/apps/sandbox/src/app/(fullscreen)/PreviewShell.tsx@@ -859,6 +859,9 @@ export function PreviewShell({children}: {children: React.ReactNode}) {{label: 'Brutalist', onClick: () => setThemeName('brutalist')},{label: 'Matcha', onClick: () => setThemeName('matcha')},{label: 'Daily', onClick: () => setThemeName('daily')},+ {label: 'Stone', onClick: () => setThemeName('stone')},+ {label: 'Gothic', onClick: () => setThemeName('gothic')},+ {label: 'Chocolate', onClick: () => setThemeName('chocolate')},]}/><XDSButtondiff --git a/apps/sandbox/src/app/(fullscreen)/pages/example-cards/page.tsx b/apps/sandbox/src/app/(fullscreen)/pages/example-cards/page.tsxindex d359c83577..74d43805e2 100644--- a/apps/sandbox/src/app/(fullscreen)/pages/example-cards/page.tsx+++ b/apps/sandbox/src/app/(fullscreen)/pages/example-cards/page.tsx@@ -114,6 +114,9 @@ export default function ExampleCardsPage() {'Meta','WhatsApp','Daily',+ 'Stone',+ 'Gothic',+ 'Chocolate',];const modeOptions = ['Light', 'Dark'];diff --git a/apps/sandbox/src/app/SandboxNav.tsx b/apps/sandbox/src/app/SandboxNav.tsxindex d1ae55cb10..6b0a65e117 100644--- a/apps/sandbox/src/app/SandboxNav.tsx+++ b/apps/sandbox/src/app/SandboxNav.tsx@@ -57,6 +57,9 @@ function SandboxHeader() {{label: 'Brutalist', onClick: () => setThemeName('brutalist')},{label: 'Matcha', onClick: () => setThemeName('matcha')},{label: 'Daily', onClick: () => setThemeName('daily')},+ {label: 'Stone', onClick: () => setThemeName('stone')},+ {label: 'Gothic', onClick: () => setThemeName('gothic')},+ {label: 'Chocolate', onClick: () => setThemeName('chocolate')},];const modeItems = [diff --git a/apps/sandbox/src/app/globals.css b/apps/sandbox/src/app/globals.cssindex a56edb0ceb..e2d68260bb 100644--- a/apps/sandbox/src/app/globals.css+++ b/apps/sandbox/src/app/globals.css@@ -5,5 +5,8 @@@import "@xds/theme-brutalist/theme.css";@import "@xds/theme-matcha/theme.css";@import "@xds/theme-daily/theme.css";+@import "@xds/theme-stone/theme.css";+@import "@xds/theme-gothic/theme.css";+@import "@xds/theme-chocolate/theme.css";@stylex;diff --git a/apps/sandbox/src/app/providers.tsx b/apps/sandbox/src/app/providers.tsxindex 7e86a03e68..c72820be31 100644--- a/apps/sandbox/src/app/providers.tsx+++ b/apps/sandbox/src/app/providers.tsx@@ -8,6 +8,9 @@ import {neutralTheme} from '@xds/theme-neutral/built';import {brutalistTheme} from '@xds/theme-brutalist/built';import {matchaTheme} from '@xds/theme-matcha/built';import {dailyTheme} from '@xds/theme-daily/built';+import {stoneTheme} from '@xds/theme-stone/built';+import {gothicTheme} from '@xds/theme-gothic/built';+import {chocolateTheme} from '@xds/theme-chocolate/built';import type {XDSDefinedTheme, ThemeMode} from '@xds/core/theme';const themes: Record<string, XDSDefinedTheme> = {@@ -16,6 +19,9 @@ const themes: Record<string, XDSDefinedTheme> = {brutalist: brutalistTheme,matcha: matchaTheme,daily: dailyTheme,+ stone: stoneTheme,+ gothic: gothicTheme,+ chocolate: chocolateTheme,};type ThemeContextValue = {