base-themes 0.1.1 → 0.1.3

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.
Files changed (282) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/CODE_OF_CONDUCT.md +22 -0
  3. package/CONTRIBUTING.md +98 -0
  4. package/LICENSE +21 -0
  5. package/README.md +324 -5
  6. package/RELEASE.md +80 -0
  7. package/SECURITY.md +49 -0
  8. package/bin/base-themes.mjs +143 -0
  9. package/dist/base-themes.css +1 -1
  10. package/dist/base-themes.js +857 -302
  11. package/dist/llms-full.txt +288 -0
  12. package/dist/llms.txt +79 -0
  13. package/dist/types/blocks/AuthCard.d.ts +2 -0
  14. package/dist/types/blocks/CommandPaletteBlock.d.ts +2 -0
  15. package/dist/types/blocks/DashboardShell.d.ts +2 -0
  16. package/dist/types/blocks/DataTableBlock.d.ts +2 -0
  17. package/dist/types/blocks/PricingPanel.d.ts +2 -0
  18. package/dist/types/blocks/SettingsForm.d.ts +2 -0
  19. package/dist/types/blocks/TeamActivityFeed.d.ts +2 -0
  20. package/dist/types/blocks/ThemeShowcaseCard.d.ts +2 -0
  21. package/dist/types/blocks/index.d.ts +8 -0
  22. package/dist/types/components/ui/Input.d.ts +3 -0
  23. package/dist/types/components/ui/index.d.ts +1 -1
  24. package/dist/types/lib.d.ts +1 -0
  25. package/docs/adoption-dashboard.md +149 -0
  26. package/docs/analytics-setup.md +145 -0
  27. package/docs/community-gallery-proposal.md +64 -0
  28. package/docs/community-proof-telemetry.md +47 -0
  29. package/docs/contributor-issue-seeds.md +240 -0
  30. package/docs/registry-access-telemetry.md +87 -0
  31. package/docs/release-announcement-kit.md +229 -0
  32. package/docs/search-console-setup.md +111 -0
  33. package/docs/theme-token-contract.md +113 -0
  34. package/examples/dashboard/README.md +24 -0
  35. package/examples/dashboard/index.html +12 -0
  36. package/examples/dashboard/package-lock.json +1212 -0
  37. package/examples/dashboard/package.json +24 -0
  38. package/examples/dashboard/src/App.tsx +115 -0
  39. package/examples/dashboard/src/main.tsx +11 -0
  40. package/examples/dashboard/src/styles.css +129 -0
  41. package/examples/dashboard/src/vite-env.d.ts +4 -0
  42. package/examples/dashboard/tsconfig.app.json +23 -0
  43. package/examples/dashboard/tsconfig.json +7 -0
  44. package/examples/dashboard/tsconfig.node.json +15 -0
  45. package/examples/dashboard/vite.config.ts +6 -0
  46. package/examples/next/README.md +29 -0
  47. package/examples/next/app/base-themes-demo.tsx +70 -0
  48. package/examples/next/app/layout.tsx +16 -0
  49. package/examples/next/app/page.tsx +9 -0
  50. package/examples/next/app/styles.css +106 -0
  51. package/examples/next/next-env.d.ts +6 -0
  52. package/examples/next/next.config.ts +5 -0
  53. package/examples/next/package-lock.json +1199 -0
  54. package/examples/next/package.json +27 -0
  55. package/examples/next/tsconfig.json +36 -0
  56. package/examples/registry-copy/README.md +73 -0
  57. package/examples/registry-copy/plan-copy.mjs +130 -0
  58. package/examples/theme-customization/README.md +26 -0
  59. package/examples/theme-customization/index.html +12 -0
  60. package/examples/theme-customization/package-lock.json +1212 -0
  61. package/examples/theme-customization/package.json +24 -0
  62. package/examples/theme-customization/src/App.tsx +138 -0
  63. package/examples/theme-customization/src/main.tsx +11 -0
  64. package/examples/theme-customization/src/styles.css +138 -0
  65. package/examples/theme-customization/src/vite-env.d.ts +4 -0
  66. package/examples/theme-customization/tsconfig.app.json +23 -0
  67. package/examples/theme-customization/tsconfig.json +7 -0
  68. package/examples/theme-customization/tsconfig.node.json +15 -0
  69. package/examples/theme-customization/vite.config.ts +6 -0
  70. package/examples/vite/README.md +32 -0
  71. package/examples/vite/index.html +12 -0
  72. package/examples/vite/package-lock.json +1200 -0
  73. package/examples/vite/package.json +24 -0
  74. package/examples/vite/src/App.tsx +101 -0
  75. package/examples/vite/src/main.tsx +11 -0
  76. package/examples/vite/src/styles.css +125 -0
  77. package/examples/vite/src/vite-env.d.ts +4 -0
  78. package/examples/vite/tsconfig.app.json +23 -0
  79. package/examples/vite/tsconfig.json +7 -0
  80. package/examples/vite/tsconfig.node.json +15 -0
  81. package/examples/vite/vite.config.ts +6 -0
  82. package/llms-full.txt +288 -0
  83. package/llms.txt +79 -0
  84. package/package.json +157 -14
  85. package/public/previews/base-themes-bauhaus.png +0 -0
  86. package/public/previews/base-themes-bento.png +0 -0
  87. package/public/previews/base-themes-calm.png +0 -0
  88. package/public/previews/base-themes-cyberpunk.png +0 -0
  89. package/public/previews/base-themes-data-dense.png +0 -0
  90. package/public/previews/base-themes-editorial.png +0 -0
  91. package/public/previews/base-themes-enterprise.png +0 -0
  92. package/public/previews/base-themes-fluent.png +0 -0
  93. package/public/previews/base-themes-glass.png +0 -0
  94. package/public/previews/base-themes-linear.png +0 -0
  95. package/public/previews/base-themes-luxury.png +0 -0
  96. package/public/previews/base-themes-material.png +0 -0
  97. package/public/previews/base-themes-minimal.png +0 -0
  98. package/public/previews/base-themes-mono.png +0 -0
  99. package/public/previews/base-themes-neo-brutalism.png +0 -0
  100. package/public/previews/base-themes-playful.png +0 -0
  101. package/public/previews/base-themes-retro.png +0 -0
  102. package/public/previews/base-themes-shadcn.png +0 -0
  103. package/public/previews/base-themes-soft-ui.png +0 -0
  104. package/public/previews/base-themes-terminal.png +0 -0
  105. package/registry/items/accordion.json +101 -0
  106. package/registry/items/alert-dialog.json +107 -0
  107. package/registry/items/autocomplete.json +106 -0
  108. package/registry/items/avatar.json +101 -0
  109. package/registry/items/block-auth-card.json +105 -0
  110. package/registry/items/block-command-palette.json +99 -0
  111. package/registry/items/block-dashboard-shell.json +101 -0
  112. package/registry/items/block-data-table.json +99 -0
  113. package/registry/items/block-pricing-panel.json +99 -0
  114. package/registry/items/block-settings-form.json +107 -0
  115. package/registry/items/block-team-activity-feed.json +99 -0
  116. package/registry/items/block-theme-showcase-card.json +99 -0
  117. package/registry/items/button.json +102 -0
  118. package/registry/items/checkbox-group.json +106 -0
  119. package/registry/items/checkbox.json +102 -0
  120. package/registry/items/collapsible.json +101 -0
  121. package/registry/items/combobox.json +101 -0
  122. package/registry/items/context-menu.json +106 -0
  123. package/registry/items/csp-provider.json +96 -0
  124. package/registry/items/dialog.json +102 -0
  125. package/registry/items/direction-provider.json +101 -0
  126. package/registry/items/drawer.json +101 -0
  127. package/registry/items/field.json +101 -0
  128. package/registry/items/fieldset.json +101 -0
  129. package/registry/items/form.json +101 -0
  130. package/registry/items/input.json +102 -0
  131. package/registry/items/menu.json +101 -0
  132. package/registry/items/menubar.json +106 -0
  133. package/registry/items/meter.json +101 -0
  134. package/registry/items/navigation-menu.json +101 -0
  135. package/registry/items/number-field.json +101 -0
  136. package/registry/items/otp-field.json +101 -0
  137. package/registry/items/popover.json +102 -0
  138. package/registry/items/preview-card.json +101 -0
  139. package/registry/items/progress.json +101 -0
  140. package/registry/items/radio-group.json +102 -0
  141. package/registry/items/radio.json +101 -0
  142. package/registry/items/scroll-area.json +101 -0
  143. package/registry/items/select.json +102 -0
  144. package/registry/items/separator.json +101 -0
  145. package/registry/items/slider.json +102 -0
  146. package/registry/items/switch.json +102 -0
  147. package/registry/items/tabs.json +101 -0
  148. package/registry/items/theme-bauhaus.json +107 -0
  149. package/registry/items/theme-bento.json +107 -0
  150. package/registry/items/theme-calm.json +107 -0
  151. package/registry/items/theme-cyberpunk.json +108 -0
  152. package/registry/items/theme-data-dense.json +107 -0
  153. package/registry/items/theme-editorial.json +107 -0
  154. package/registry/items/theme-enterprise.json +108 -0
  155. package/registry/items/theme-fluent.json +107 -0
  156. package/registry/items/theme-glass.json +107 -0
  157. package/registry/items/theme-linear.json +107 -0
  158. package/registry/items/theme-luxury.json +107 -0
  159. package/registry/items/theme-material.json +107 -0
  160. package/registry/items/theme-minimal.json +107 -0
  161. package/registry/items/theme-mono.json +107 -0
  162. package/registry/items/theme-neo-brutalism.json +107 -0
  163. package/registry/items/theme-playful.json +107 -0
  164. package/registry/items/theme-retro.json +107 -0
  165. package/registry/items/theme-shadcn.json +107 -0
  166. package/registry/items/theme-soft-ui.json +107 -0
  167. package/registry/items/theme-terminal.json +107 -0
  168. package/registry/items/toast.json +106 -0
  169. package/registry/items/toggle-group.json +101 -0
  170. package/registry/items/toggle.json +101 -0
  171. package/registry/items/toolbar.json +101 -0
  172. package/registry/items/tooltip.json +102 -0
  173. package/registry/registry.json +564 -49
  174. package/registry/shadcn-registry.json +415 -0
  175. package/research/telemetry-fixtures/analytics-events.jsonl +9 -0
  176. package/research/telemetry-fixtures/bundle-report.json +44 -0
  177. package/research/telemetry-fixtures/community-proof.csv +5 -0
  178. package/research/telemetry-fixtures/registry-access.jsonl +10 -0
  179. package/research/telemetry-fixtures/search-console-export.csv +4 -0
  180. package/scripts/registry-plan.mjs +434 -0
  181. package/scripts/render-launch-actions.mjs +405 -0
  182. package/scripts/render-launch-status.mjs +373 -0
  183. package/scripts/render-release-announcement.mjs +329 -0
  184. package/scripts/verify-launch-readiness.mjs +415 -0
  185. package/scripts/verify-telemetry-fixtures.mjs +85 -0
  186. package/scripts/verify-telemetry-report.mjs +89 -0
  187. package/skills/base-themes/SKILL.md +156 -43
  188. package/src/blocks/AuthCard.tsx +29 -0
  189. package/src/blocks/Blocks.css +182 -0
  190. package/src/blocks/CommandPaletteBlock.tsx +32 -0
  191. package/src/blocks/DashboardShell.tsx +36 -0
  192. package/src/blocks/DataTableBlock.tsx +44 -0
  193. package/src/blocks/PricingPanel.tsx +28 -0
  194. package/src/blocks/SettingsForm.tsx +37 -0
  195. package/src/blocks/TeamActivityFeed.tsx +38 -0
  196. package/src/blocks/ThemeShowcaseCard.tsx +32 -0
  197. package/src/blocks/index.ts +8 -0
  198. package/src/components/ui/Accordion.css +42 -0
  199. package/src/components/ui/Accordion.tsx +41 -0
  200. package/src/components/ui/AlertDialog.css +40 -0
  201. package/src/components/ui/AlertDialog.tsx +52 -0
  202. package/src/components/ui/Autocomplete.css +3 -0
  203. package/src/components/ui/Autocomplete.tsx +50 -0
  204. package/src/components/ui/Avatar.css +45 -0
  205. package/src/components/ui/Avatar.tsx +36 -0
  206. package/src/components/ui/Button.css +79 -0
  207. package/src/components/ui/Button.tsx +20 -0
  208. package/src/components/ui/Checkbox.css +37 -0
  209. package/src/components/ui/Checkbox.tsx +32 -0
  210. package/src/components/ui/CheckboxGroup.tsx +21 -0
  211. package/src/components/ui/Collapsible.css +34 -0
  212. package/src/components/ui/Collapsible.tsx +29 -0
  213. package/src/components/ui/Combobox.css +75 -0
  214. package/src/components/ui/Combobox.tsx +53 -0
  215. package/src/components/ui/ContextMenu.css +9 -0
  216. package/src/components/ui/ContextMenu.tsx +47 -0
  217. package/src/components/ui/CspProvider.tsx +10 -0
  218. package/src/components/ui/Dialog.css +41 -0
  219. package/src/components/ui/Dialog.tsx +45 -0
  220. package/src/components/ui/DirectionProvider.tsx +17 -0
  221. package/src/components/ui/Drawer.css +77 -0
  222. package/src/components/ui/Drawer.tsx +56 -0
  223. package/src/components/ui/Field.css +19 -0
  224. package/src/components/ui/Field.tsx +24 -0
  225. package/src/components/ui/Fieldset.css +16 -0
  226. package/src/components/ui/Fieldset.tsx +19 -0
  227. package/src/components/ui/Form.css +5 -0
  228. package/src/components/ui/Form.tsx +12 -0
  229. package/src/components/ui/Input.css +50 -0
  230. package/src/components/ui/Input.tsx +62 -0
  231. package/src/components/ui/Menu.css +59 -0
  232. package/src/components/ui/Menu.tsx +50 -0
  233. package/src/components/ui/Menubar.css +26 -0
  234. package/src/components/ui/Menubar.tsx +42 -0
  235. package/src/components/ui/Meter.css +45 -0
  236. package/src/components/ui/Meter.tsx +37 -0
  237. package/src/components/ui/NavigationMenu.css +103 -0
  238. package/src/components/ui/NavigationMenu.tsx +64 -0
  239. package/src/components/ui/NumberField.css +38 -0
  240. package/src/components/ui/NumberField.tsx +28 -0
  241. package/src/components/ui/OtpField.css +28 -0
  242. package/src/components/ui/OtpField.tsx +24 -0
  243. package/src/components/ui/Popover.css +25 -0
  244. package/src/components/ui/Popover.tsx +37 -0
  245. package/src/components/ui/PreviewCard.css +33 -0
  246. package/src/components/ui/PreviewCard.tsx +43 -0
  247. package/src/components/ui/Progress.css +33 -0
  248. package/src/components/ui/Progress.tsx +28 -0
  249. package/src/components/ui/Radio.tsx +22 -0
  250. package/src/components/ui/RadioGroup.css +42 -0
  251. package/src/components/ui/RadioGroup.tsx +29 -0
  252. package/src/components/ui/ScrollArea.css +42 -0
  253. package/src/components/ui/ScrollArea.tsx +22 -0
  254. package/src/components/ui/Select.css +86 -0
  255. package/src/components/ui/Select.tsx +39 -0
  256. package/src/components/ui/Separator.css +14 -0
  257. package/src/components/ui/Separator.tsx +12 -0
  258. package/src/components/ui/Slider.css +39 -0
  259. package/src/components/ui/Slider.tsx +21 -0
  260. package/src/components/ui/Switch.css +45 -0
  261. package/src/components/ui/Switch.tsx +29 -0
  262. package/src/components/ui/Tabs.css +72 -0
  263. package/src/components/ui/Tabs.tsx +44 -0
  264. package/src/components/ui/Toast.css +75 -0
  265. package/src/components/ui/Toast.tsx +48 -0
  266. package/src/components/ui/Toggle.tsx +12 -0
  267. package/src/components/ui/ToggleGroup.css +35 -0
  268. package/src/components/ui/ToggleGroup.tsx +30 -0
  269. package/src/components/ui/Toolbar.css +60 -0
  270. package/src/components/ui/Toolbar.tsx +36 -0
  271. package/src/components/ui/Tooltip.css +14 -0
  272. package/src/components/ui/Tooltip.tsx +31 -0
  273. package/src/components/ui/index.ts +83 -0
  274. package/src/components/ui/useDirection.ts +1 -0
  275. package/src/components/ui/useToastManager.ts +11 -0
  276. package/src/docs/blockMeta.json +66 -0
  277. package/src/docs/componentMeta.json +322 -0
  278. package/src/docs/staticPageMeta.json +143 -0
  279. package/src/docs/themeMeta.json +22 -0
  280. package/src/styles/tokenContract.json +61 -0
  281. package/workers/analytics-receiver.mjs +170 -0
  282. package/wrangler.analytics.jsonc +12 -0
@@ -0,0 +1,24 @@
1
+ {
2
+ "name": "base-themes-dashboard-example",
3
+ "private": true,
4
+ "version": "0.0.0",
5
+ "type": "module",
6
+ "scripts": {
7
+ "dev": "vite --host 0.0.0.0 --port 5177",
8
+ "build": "tsc -b && vite build",
9
+ "preview": "vite preview --host 0.0.0.0 --port 4177"
10
+ },
11
+ "dependencies": {
12
+ "@base-ui/react": "^1.5.0",
13
+ "base-themes": "file:../..",
14
+ "react": "^18.2.0",
15
+ "react-dom": "^18.2.0"
16
+ },
17
+ "devDependencies": {
18
+ "@types/react": "^18.3.27",
19
+ "@types/react-dom": "^18.3.7",
20
+ "@vitejs/plugin-react": "^6.0.1",
21
+ "typescript": "~6.0.2",
22
+ "vite": "^8.0.12"
23
+ }
24
+ }
@@ -0,0 +1,115 @@
1
+ import {
2
+ Button,
3
+ DataTableBlock,
4
+ DashboardShell,
5
+ Progress,
6
+ Select,
7
+ Switch,
8
+ Tabs,
9
+ TeamActivityFeed,
10
+ ThemeShowcaseCard,
11
+ type ThemeStyle,
12
+ useTheme,
13
+ } from 'base-themes'
14
+ import registry from 'base-themes/registry.json'
15
+
16
+ const styleChoices = {
17
+ enterprise: 'Enterprise',
18
+ 'data-dense': 'Data dense',
19
+ bento: 'Bento',
20
+ terminal: 'Terminal',
21
+ shadcn: 'shadcn',
22
+ }
23
+
24
+ const pipelineRows = [
25
+ { label: 'Trial installs', value: 243, delta: '+18%' },
26
+ { label: 'Doctor checks', value: 41, delta: '+9%' },
27
+ { label: 'Registry fetches', value: 67, delta: '+24%' },
28
+ ]
29
+
30
+ export function App() {
31
+ const { style, setStyle, resolved, setTheme } = useTheme()
32
+
33
+ return (
34
+ <main className="dashboard-shell-example">
35
+ <section className="dashboard-hero">
36
+ <div>
37
+ <p className="eyebrow">Product dashboard example</p>
38
+ <h1>Operate a Base Themes product screen from the npm package.</h1>
39
+ <p className="hero-copy">
40
+ This example combines shipped blocks, controls, registry metadata, and theme switching into one app-like surface.
41
+ </p>
42
+ </div>
43
+ <div className="hero-controls" aria-label="Dashboard controls">
44
+ <Select
45
+ id="dashboard-style"
46
+ label="Visual style"
47
+ value={style}
48
+ onValueChange={(value) => setStyle(value as ThemeStyle)}
49
+ items={styleChoices}
50
+ />
51
+ <Switch
52
+ id="dashboard-theme"
53
+ label="Dark mode"
54
+ checked={resolved === 'dark'}
55
+ onCheckedChange={(checked) => setTheme(checked ? 'dark' : 'light')}
56
+ />
57
+ <Button type="button">Share report</Button>
58
+ </div>
59
+ </section>
60
+
61
+ <section className="dashboard-kpis" aria-label="Adoption pipeline">
62
+ {pipelineRows.map((row) => (
63
+ <article key={row.label}>
64
+ <span>{row.label}</span>
65
+ <strong>{row.value}</strong>
66
+ <small>{row.delta}</small>
67
+ </article>
68
+ ))}
69
+ <article>
70
+ <span>Registry surface</span>
71
+ <strong>{registry.components.length}</strong>
72
+ <small>{registry.blocks.length} blocks</small>
73
+ </article>
74
+ </section>
75
+
76
+ <section className="dashboard-grid">
77
+ <div className="dashboard-primary">
78
+ <DashboardShell />
79
+ </div>
80
+ <div className="dashboard-secondary">
81
+ <ThemeShowcaseCard />
82
+ </div>
83
+ </section>
84
+
85
+ <section className="dashboard-grid lower">
86
+ <div className="dashboard-primary">
87
+ <DataTableBlock />
88
+ </div>
89
+ <aside className="dashboard-side-panel">
90
+ <Tabs
91
+ defaultValue="release"
92
+ panels={[
93
+ {
94
+ value: 'release',
95
+ label: 'Release',
96
+ title: 'Release readiness',
97
+ content: 'Registry, package smoke, SEO, and example builds are expected to pass before sharing a release.',
98
+ },
99
+ {
100
+ value: 'signals',
101
+ label: 'Signals',
102
+ title: 'Adoption signals',
103
+ content: 'Stars, forks, external issues, registry access, and install-copy events decide the next roadmap.',
104
+ },
105
+ ]}
106
+ />
107
+ <div className="readiness-stack">
108
+ <Progress value={78} showValue aria-label="Release confidence" />
109
+ <TeamActivityFeed />
110
+ </div>
111
+ </aside>
112
+ </section>
113
+ </main>
114
+ )
115
+ }
@@ -0,0 +1,11 @@
1
+ import { StrictMode } from 'react'
2
+ import { createRoot } from 'react-dom/client'
3
+ import { App } from './App'
4
+ import 'base-themes/styles.css'
5
+ import './styles.css'
6
+
7
+ createRoot(document.getElementById('root')!).render(
8
+ <StrictMode>
9
+ <App />
10
+ </StrictMode>,
11
+ )
@@ -0,0 +1,129 @@
1
+ :root {
2
+ color: var(--theme-fg);
3
+ background: var(--theme-bg);
4
+ font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
5
+ }
6
+
7
+ * {
8
+ box-sizing: border-box;
9
+ }
10
+
11
+ body {
12
+ margin: 0;
13
+ min-width: 320px;
14
+ }
15
+
16
+ .dashboard-shell-example {
17
+ width: min(1240px, calc(100vw - 32px));
18
+ margin: 0 auto;
19
+ padding: 32px 0;
20
+ }
21
+
22
+ .dashboard-hero,
23
+ .dashboard-kpis article,
24
+ .dashboard-grid > * {
25
+ border: 1px solid var(--theme-border);
26
+ background: var(--theme-surface);
27
+ box-shadow: var(--theme-shadow);
28
+ }
29
+
30
+ .dashboard-hero {
31
+ display: grid;
32
+ grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
33
+ gap: 24px;
34
+ align-items: end;
35
+ padding: 30px;
36
+ }
37
+
38
+ .eyebrow {
39
+ margin: 0 0 8px;
40
+ color: var(--theme-muted-fg);
41
+ font-size: 0.78rem;
42
+ font-weight: 750;
43
+ text-transform: uppercase;
44
+ }
45
+
46
+ h1 {
47
+ max-width: 780px;
48
+ margin: 0;
49
+ color: var(--theme-fg);
50
+ font-size: clamp(2rem, 4vw, 4.25rem);
51
+ line-height: 1;
52
+ letter-spacing: 0;
53
+ }
54
+
55
+ .hero-copy {
56
+ max-width: 680px;
57
+ margin: 16px 0 0;
58
+ color: var(--theme-muted-fg);
59
+ font-size: 1rem;
60
+ line-height: 1.6;
61
+ }
62
+
63
+ .hero-controls {
64
+ display: grid;
65
+ gap: 14px;
66
+ }
67
+
68
+ .dashboard-kpis {
69
+ display: grid;
70
+ grid-template-columns: repeat(4, minmax(0, 1fr));
71
+ gap: 14px;
72
+ margin: 14px 0;
73
+ }
74
+
75
+ .dashboard-kpis article {
76
+ display: grid;
77
+ gap: 6px;
78
+ padding: 18px;
79
+ }
80
+
81
+ .dashboard-kpis span,
82
+ .dashboard-kpis small {
83
+ color: var(--theme-muted-fg);
84
+ font-size: 0.82rem;
85
+ }
86
+
87
+ .dashboard-kpis strong {
88
+ color: var(--theme-fg);
89
+ font-size: 2rem;
90
+ line-height: 1;
91
+ }
92
+
93
+ .dashboard-grid {
94
+ display: grid;
95
+ grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
96
+ gap: 14px;
97
+ margin-top: 14px;
98
+ }
99
+
100
+ .dashboard-grid.lower {
101
+ grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
102
+ }
103
+
104
+ .dashboard-primary,
105
+ .dashboard-secondary,
106
+ .dashboard-side-panel {
107
+ min-width: 0;
108
+ padding: 18px;
109
+ }
110
+
111
+ .readiness-stack {
112
+ display: grid;
113
+ gap: 16px;
114
+ margin-top: 18px;
115
+ }
116
+
117
+ @media (max-width: 920px) {
118
+ .dashboard-hero,
119
+ .dashboard-grid,
120
+ .dashboard-grid.lower,
121
+ .dashboard-kpis {
122
+ grid-template-columns: 1fr;
123
+ }
124
+
125
+ .dashboard-shell-example {
126
+ width: min(100vw - 24px, 720px);
127
+ padding: 24px 0;
128
+ }
129
+ }
@@ -0,0 +1,4 @@
1
+ /// <reference types="vite/client" />
2
+
3
+ declare module 'base-themes/styles.css'
4
+ declare module '*.css'
@@ -0,0 +1,23 @@
1
+ {
2
+ "compilerOptions": {
3
+ "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
4
+ "target": "ES2023",
5
+ "useDefineForClassFields": true,
6
+ "lib": ["ES2023", "DOM", "DOM.Iterable"],
7
+ "allowJs": false,
8
+ "skipLibCheck": true,
9
+ "esModuleInterop": true,
10
+ "allowSyntheticDefaultImports": true,
11
+ "strict": true,
12
+ "forceConsistentCasingInFileNames": true,
13
+ "module": "ESNext",
14
+ "moduleResolution": "bundler",
15
+ "resolveJsonModule": true,
16
+ "isolatedModules": true,
17
+ "noEmit": true,
18
+ "jsx": "react-jsx",
19
+ "noUnusedLocals": true,
20
+ "noUnusedParameters": true
21
+ },
22
+ "include": ["src"]
23
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "files": [],
3
+ "references": [
4
+ { "path": "./tsconfig.app.json" },
5
+ { "path": "./tsconfig.node.json" }
6
+ ]
7
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "compilerOptions": {
3
+ "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
4
+ "target": "ES2023",
5
+ "lib": ["ES2023"],
6
+ "module": "ESNext",
7
+ "moduleResolution": "bundler",
8
+ "allowSyntheticDefaultImports": true,
9
+ "strict": true,
10
+ "noEmit": true,
11
+ "skipLibCheck": true,
12
+ "types": ["node"]
13
+ },
14
+ "include": ["vite.config.ts"]
15
+ }
@@ -0,0 +1,6 @@
1
+ import { defineConfig } from 'vite'
2
+ import react from '@vitejs/plugin-react'
3
+
4
+ export default defineConfig({
5
+ plugins: [react()],
6
+ })
@@ -0,0 +1,29 @@
1
+ # Base Themes Next.js Example
2
+
3
+ This example verifies that Base Themes works in a Next.js app with SSR.
4
+
5
+ ## Run
6
+
7
+ From this directory:
8
+
9
+ ```bash
10
+ npm install
11
+ npm run build
12
+ npm run dev
13
+ ```
14
+
15
+ From the repository root, run the same build gate used by CI:
16
+
17
+ ```bash
18
+ npm run example:next:build
19
+ ```
20
+
21
+ The example imports only public package surfaces:
22
+
23
+ - `base-themes`
24
+ - `base-themes/styles.css`
25
+ - `base-themes/registry.json`
26
+
27
+ Theme attributes are set on `<html>` in `app/layout.tsx` so CSS variables are available before the page renders.
28
+
29
+ Next.js App Router treats files as Server Components by default. Base Themes components use client-side React hooks through Base UI primitives, so component imports live behind the `'use client'` boundary in `app/base-themes-demo.tsx`.
@@ -0,0 +1,70 @@
1
+ 'use client'
2
+
3
+ import { Button, Field, Fieldset, Input, Progress, Select, Switch, Tabs } from 'base-themes'
4
+ import registry from 'base-themes/registry.json'
5
+
6
+ const densityItems = {
7
+ compact: 'Compact',
8
+ comfortable: 'Comfortable',
9
+ spacious: 'Spacious',
10
+ }
11
+
12
+ export function BaseThemesDemo() {
13
+ return (
14
+ <>
15
+ <section className="hero-panel">
16
+ <div>
17
+ <p className="eyebrow">Next.js App Router install</p>
18
+ <h1>Base Themes works in a framework app.</h1>
19
+ <p>
20
+ This page imports package components, global CSS, and registry metadata with a client component boundary.
21
+ </p>
22
+ </div>
23
+ <div className="stats-grid" aria-label="Registry summary">
24
+ <article>
25
+ <span>{registry.components.length}</span>
26
+ <p>Components</p>
27
+ </article>
28
+ <article>
29
+ <span>{registry.style.variants.length}</span>
30
+ <p>Styles</p>
31
+ </article>
32
+ </div>
33
+ </section>
34
+
35
+ <section className="content-grid">
36
+ <Fieldset legend="Workspace settings">
37
+ <Field label="Project" description="Client-rendered controls inside a server-rendered route.">
38
+ <Input id="project" defaultValue="Design System Migration" />
39
+ </Field>
40
+ <Select id="density" label="Density" defaultValue="comfortable" items={densityItems} />
41
+ <Switch id="summary" label="Send weekly summary" defaultChecked />
42
+ <Button type="button">Save changes</Button>
43
+ </Fieldset>
44
+
45
+ <div className="panel">
46
+ <Tabs
47
+ defaultValue="package"
48
+ panels={[
49
+ {
50
+ value: 'package',
51
+ label: 'Package',
52
+ title: 'Public package surface',
53
+ content: 'Components and CSS are imported from the same paths documented for npm users.',
54
+ },
55
+ {
56
+ value: 'registry',
57
+ label: 'Registry',
58
+ title: `Default style: ${registry.style.default}`,
59
+ content: `Registry homepage: ${registry.homepage}`,
60
+ },
61
+ ]}
62
+ />
63
+ <div className="progress-row">
64
+ <Progress value={78} showValue aria-label="Framework readiness" />
65
+ </div>
66
+ </div>
67
+ </section>
68
+ </>
69
+ )
70
+ }
@@ -0,0 +1,16 @@
1
+ import type { Metadata } from 'next'
2
+ import 'base-themes/styles.css'
3
+ import './styles.css'
4
+
5
+ export const metadata: Metadata = {
6
+ title: 'Base Themes Next.js Example',
7
+ description: 'SSR smoke example for Base Themes in Next.js.',
8
+ }
9
+
10
+ export default function RootLayout({ children }: Readonly<{ children: React.ReactNode }>) {
11
+ return (
12
+ <html lang="en" data-theme="light" data-style="enterprise">
13
+ <body>{children}</body>
14
+ </html>
15
+ )
16
+ }
@@ -0,0 +1,9 @@
1
+ import { BaseThemesDemo } from './base-themes-demo'
2
+
3
+ export default function Page() {
4
+ return (
5
+ <main className="page-shell">
6
+ <BaseThemesDemo />
7
+ </main>
8
+ )
9
+ }
@@ -0,0 +1,106 @@
1
+ :root {
2
+ color: var(--theme-fg);
3
+ background: var(--theme-bg);
4
+ font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
5
+ }
6
+
7
+ * {
8
+ box-sizing: border-box;
9
+ }
10
+
11
+ body {
12
+ margin: 0;
13
+ }
14
+
15
+ .page-shell {
16
+ width: min(1080px, calc(100vw - 32px));
17
+ margin: 0 auto;
18
+ padding: 40px 0;
19
+ }
20
+
21
+ .hero-panel,
22
+ .content-grid > *,
23
+ .stats-grid article {
24
+ border: 1px solid var(--theme-border);
25
+ background: var(--theme-surface);
26
+ box-shadow: var(--theme-shadow);
27
+ }
28
+
29
+ .hero-panel {
30
+ display: grid;
31
+ grid-template-columns: minmax(0, 1fr) 280px;
32
+ gap: 24px;
33
+ padding: 32px;
34
+ }
35
+
36
+ .eyebrow {
37
+ margin: 0 0 8px;
38
+ color: var(--theme-muted-fg);
39
+ font-size: 0.78rem;
40
+ font-weight: 700;
41
+ text-transform: uppercase;
42
+ }
43
+
44
+ h1 {
45
+ max-width: 720px;
46
+ margin: 0;
47
+ font-size: clamp(2rem, 4vw, 4rem);
48
+ line-height: 1;
49
+ letter-spacing: 0;
50
+ }
51
+
52
+ .hero-panel p {
53
+ max-width: 640px;
54
+ color: var(--theme-muted-fg);
55
+ line-height: 1.6;
56
+ }
57
+
58
+ .stats-grid {
59
+ display: grid;
60
+ gap: 12px;
61
+ }
62
+
63
+ .stats-grid article {
64
+ padding: 18px;
65
+ }
66
+
67
+ .stats-grid span {
68
+ display: block;
69
+ font-size: 2rem;
70
+ font-weight: 800;
71
+ }
72
+
73
+ .stats-grid p {
74
+ margin: 4px 0 0;
75
+ }
76
+
77
+ .content-grid {
78
+ display: grid;
79
+ grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
80
+ gap: 16px;
81
+ margin-top: 16px;
82
+ }
83
+
84
+ .content-grid > * {
85
+ padding: 24px;
86
+ }
87
+
88
+ .panel {
89
+ min-width: 0;
90
+ }
91
+
92
+ .progress-row {
93
+ margin-top: 20px;
94
+ }
95
+
96
+ @media (max-width: 800px) {
97
+ .hero-panel,
98
+ .content-grid {
99
+ grid-template-columns: 1fr;
100
+ }
101
+
102
+ .page-shell {
103
+ width: min(100vw - 24px, 680px);
104
+ padding: 24px 0;
105
+ }
106
+ }
@@ -0,0 +1,6 @@
1
+ /// <reference types="next" />
2
+ /// <reference types="next/image-types/global" />
3
+ import "./.next/types/routes.d.ts";
4
+
5
+ // NOTE: This file should not be edited
6
+ // see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
@@ -0,0 +1,5 @@
1
+ import type { NextConfig } from 'next'
2
+
3
+ const nextConfig: NextConfig = {}
4
+
5
+ export default nextConfig