Skip to content

Commit f2e1dfe

Browse files
feat(apollo-wind): wip
Co-authored-by: Cursor <cursoragent@cursor.com> Made-with: Cursor
1 parent 20331ca commit f2e1dfe

60 files changed

Lines changed: 8099 additions & 1916 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ plan/*
1010
node_modules/
1111
.pnp
1212
.pnp.js
13+
.pnpm-store
1314

1415
# Build outputs
1516
dist/

packages/apollo-wind/.storybook/main.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ const config: StorybookConfig = {
6464
async viteFinal(config) {
6565
return {
6666
...config,
67+
envDir: resolve(__dirname, '..'),
6768
resolve: {
6869
...config.resolve,
6970
alias: {

packages/apollo-wind/.storybook/preview.tsx

Lines changed: 32 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -63,17 +63,33 @@ const preview: Preview = {
6363
order: [
6464
'Introduction',
6565
'Theme',
66+
[
67+
'Colors',
68+
'Icons',
69+
'Spacing',
70+
'Typography',
71+
'Future',
72+
['*', 'Theme'],
73+
],
6674
'Components',
6775
[
6876
'All Components',
6977
'Core',
7078
'Data Display',
79+
'Feedback',
7180
'Layout',
7281
'Navigation',
7382
'Overlays',
7483
'UiPath',
7584
],
7685
'Templates',
86+
[
87+
'Admin',
88+
'Delegate',
89+
'Flow',
90+
'Maestro',
91+
'Future',
92+
],
7793
'Forms',
7894
'Experiments',
7995
'*',
@@ -94,10 +110,13 @@ const preview: Preview = {
94110
title: 'Theme',
95111
icon: 'paintbrush',
96112
items: [
97-
{ value: 'dark', title: 'Future: Dark' },
113+
{ value: 'legacy-light', title: 'Light' },
114+
{ value: 'legacy-dark', title: 'Dark' },
98115
{ value: 'light', title: 'Future: Light' },
99-
{ value: 'legacy-dark', title: 'Legacy: Dark' },
100-
{ value: 'legacy-light', title: 'Legacy: Light' },
116+
{ value: 'dark', title: 'Future: Dark' },
117+
{ value: 'wireframe', title: 'Demo: Wireframe' },
118+
{ value: 'vertex', title: 'Demo: Vertex' },
119+
{ value: 'canvas', title: 'Demo: Canvas' },
101120
],
102121
dynamicTitle: true,
103122
},
@@ -124,21 +143,22 @@ const preview: Preview = {
124143

125144
// Map the toolbar value to the CSS class that activates the correct
126145
// set of CSS custom properties (surfaces, foregrounds, borders, etc.).
127-
const themeClass =
128-
futureTheme === 'legacy-dark'
129-
? 'legacy-dark'
130-
: futureTheme === 'legacy-light'
131-
? 'legacy-light'
132-
: futureTheme === 'light'
133-
? 'future-light'
134-
: 'future-dark';
146+
const themeClassMap: Record<string, string> = {
147+
'legacy-dark': 'legacy-dark',
148+
'legacy-light': 'legacy-light',
149+
wireframe: 'future-wireframe',
150+
vertex: 'future-vertex',
151+
canvas: 'future-canvas',
152+
light: 'future-light',
153+
};
154+
const themeClass = themeClassMap[futureTheme] ?? 'future-dark';
135155

136156
// Apply the theme class to <html> so every story — including standalone
137157
// component stories that don't manage their own theme — inherits the
138158
// correct CSS variables (shadcn bridge + Future tokens).
139159
useEffect(() => {
140160
const root = document.documentElement;
141-
const allThemeClasses = ['future-dark', 'future-light', 'legacy-dark', 'legacy-light'];
161+
const allThemeClasses = ['future-dark', 'future-light', 'future-wireframe', 'future-vertex', 'future-canvas', 'legacy-dark', 'legacy-light'];
142162
root.classList.remove(...allThemeClasses);
143163
root.classList.add(themeClass);
144164
return () => {

0 commit comments

Comments
 (0)