7k-design-system 1.0.0-alpha.1
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/CHANGELOG.md +45 -0
- package/CONSUMER_GUIDE.md +471 -0
- package/DESIGN.md +1207 -0
- package/LICENSE +21 -0
- package/README.md +192 -0
- package/SKILL.md +252 -0
- package/build/icon.svg +10 -0
- package/build/logo-7k-light.svg +10 -0
- package/build/logo-7k.svg +10 -0
- package/dist/7k-design-system.css +1 -0
- package/dist/animations.css +1 -0
- package/dist/build/icon.svg +10 -0
- package/dist/build/logo-7k-light.svg +10 -0
- package/dist/build/logo-7k.svg +10 -0
- package/dist/components.css +1 -0
- package/dist/fonts/GeistPixel-Circle.ttf +0 -0
- package/dist/fonts/GeistPixel-Grid.ttf +0 -0
- package/dist/fonts/GeistPixel-Line.ttf +0 -0
- package/dist/fonts/GeistPixel-Square.ttf +0 -0
- package/dist/fonts/GeistPixel-Triangle.ttf +0 -0
- package/dist/preview/brand-assets.html +83 -0
- package/dist/preview/brand-assets.html.artifact.json +19 -0
- package/dist/preview/colors-primary.html +101 -0
- package/dist/preview/colors-primary.html.artifact.json +19 -0
- package/dist/preview/components-buttons.html +84 -0
- package/dist/preview/components-buttons.html.artifact.json +19 -0
- package/dist/preview/spacing-tokens.html +79 -0
- package/dist/preview/spacing-tokens.html.artifact.json +19 -0
- package/dist/preview/textures-backgrounds.html +102 -0
- package/dist/preview/textures-backgrounds.html.artifact.json +19 -0
- package/dist/preview/typography-specimens.html +73 -0
- package/dist/preview/typography-specimens.html.artifact.json +19 -0
- package/dist/react/index.cjs +1 -0
- package/dist/react/index.js +129 -0
- package/dist/react/react/components/Badge.d.ts +3 -0
- package/dist/react/react/components/Badge.d.ts.map +1 -0
- package/dist/react/react/components/Badge.stories.d.ts +12 -0
- package/dist/react/react/components/Badge.stories.d.ts.map +1 -0
- package/dist/react/react/components/Button.d.ts +3 -0
- package/dist/react/react/components/Button.d.ts.map +1 -0
- package/dist/react/react/components/Button.stories.d.ts +16 -0
- package/dist/react/react/components/Button.stories.d.ts.map +1 -0
- package/dist/react/react/components/Input.d.ts +3 -0
- package/dist/react/react/components/Input.d.ts.map +1 -0
- package/dist/react/react/components/Input.stories.d.ts +11 -0
- package/dist/react/react/components/Input.stories.d.ts.map +1 -0
- package/dist/react/react/components/ThemeToggle.d.ts +4 -0
- package/dist/react/react/components/ThemeToggle.d.ts.map +1 -0
- package/dist/react/react/components/ThemeToggle.stories.d.ts +7 -0
- package/dist/react/react/components/ThemeToggle.stories.d.ts.map +1 -0
- package/dist/react/react/hooks/useTheme.d.ts +11 -0
- package/dist/react/react/hooks/useTheme.d.ts.map +1 -0
- package/dist/react/react/index.d.ts +8 -0
- package/dist/react/react/index.d.ts.map +1 -0
- package/dist/react/react/theme/ThemeContext.d.ts +3 -0
- package/dist/react/react/theme/ThemeProvider.d.ts +9 -0
- package/dist/react/react/theme/useTheme.d.ts +3 -0
- package/dist/react/react/types.d.ts +33 -0
- package/dist/react/react/types.d.ts.map +1 -0
- package/dist/react/stories/Button.d.ts +17 -0
- package/dist/react/stories/Button.d.ts.map +1 -0
- package/dist/react/stories/Button.stories.d.ts +25 -0
- package/dist/react/stories/Button.stories.d.ts.map +1 -0
- package/dist/react/stories/Components.stories.d.ts +10 -0
- package/dist/react/stories/Components.stories.d.ts.map +1 -0
- package/dist/react/stories/Header.d.ts +14 -0
- package/dist/react/stories/Header.d.ts.map +1 -0
- package/dist/react/stories/Header.stories.d.ts +20 -0
- package/dist/react/stories/Header.stories.d.ts.map +1 -0
- package/dist/react/stories/Page.d.ts +4 -0
- package/dist/react/stories/Page.d.ts.map +1 -0
- package/dist/react/stories/Page.stories.d.ts +14 -0
- package/dist/react/stories/Page.stories.d.ts.map +1 -0
- package/dist/react/stories/Textures.stories.d.ts +11 -0
- package/dist/react/stories/Textures.stories.d.ts.map +1 -0
- package/dist/textures.css +1 -0
- package/dist/tokens.css +1 -0
- package/fonts/GeistPixel-Circle.ttf +0 -0
- package/fonts/GeistPixel-Grid.ttf +0 -0
- package/fonts/GeistPixel-Line.ttf +0 -0
- package/fonts/GeistPixel-Square.ttf +0 -0
- package/fonts/GeistPixel-Triangle.ttf +0 -0
- package/package.json +147 -0
- package/preview/brand-assets.html +83 -0
- package/preview/colors-primary.html +101 -0
- package/preview/components-buttons.html +84 -0
- package/preview/spacing-tokens.html +79 -0
- package/preview/textures-backgrounds.html +102 -0
- package/preview/typography-specimens.html +73 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- Production-ready build pipeline with Vite, PostCSS, and autoprefixer
|
|
12
|
+
- TypeScript configuration and type definitions for React UI kit
|
|
13
|
+
- ESLint, Prettier, and Stylelint configurations for code quality
|
|
14
|
+
- Modular CSS architecture splitting monolithic file into logical imports
|
|
15
|
+
- GitHub Actions CI/CD workflow for automated testing and publishing
|
|
16
|
+
- Vitest testing framework with initial test suite
|
|
17
|
+
- Accessibility testing setup with axe-core
|
|
18
|
+
- Semantic-release for automated versioning and changelog generation
|
|
19
|
+
- `.gitignore`, `LICENSE`, `CHANGELOG.md`, and `CONTRIBUTING.md`
|
|
20
|
+
- Package exports map for modern module resolution (ESM/CJS/UMD)
|
|
21
|
+
- Self-hosted Geist font strategy with CDN fallback
|
|
22
|
+
|
|
23
|
+
### Changed
|
|
24
|
+
- Converted React UI kit from plain JS to TypeScript with proper component patterns
|
|
25
|
+
- Refactored CSS to eliminate hard-coded colors in favor of design tokens
|
|
26
|
+
- Updated `package.json` with proper `exports`, `engines`, and `types` fields
|
|
27
|
+
|
|
28
|
+
### Fixed
|
|
29
|
+
- Missing `dist/` directory issue — now generated by build pipeline
|
|
30
|
+
- Token inconsistency in component classes using literal hex values
|
|
31
|
+
|
|
32
|
+
## [1.0.0-alpha.1] - 2024-XX-XX
|
|
33
|
+
|
|
34
|
+
### Added
|
|
35
|
+
- Initial design system implementation
|
|
36
|
+
- Complete CSS token system with 11-step color ramps
|
|
37
|
+
- 40+ components with 1-bit manga aesthetic
|
|
38
|
+
- 20+ animations with retro digital feel
|
|
39
|
+
- Geist Sans, Geist Mono, and Geist Pixel font system
|
|
40
|
+
- 10 texture categories (scanline, halftone, dot matrix, etc.)
|
|
41
|
+
- Dark-first theming with opt-in light mode
|
|
42
|
+
- React UI kit with 13 components (plain JS, no JSX)
|
|
43
|
+
- Preview HTML cards for token verification
|
|
44
|
+
- Brand assets (SVG logos and icons)
|
|
45
|
+
- Comprehensive design documentation (`DESIGN.md`)
|
|
@@ -0,0 +1,471 @@
|
|
|
1
|
+
# Consumer Guide — Building with 7K Design System
|
|
2
|
+
|
|
3
|
+
This guide shows you how to create a new website or application using the 7K Design System.
|
|
4
|
+
|
|
5
|
+
## Table of Contents
|
|
6
|
+
|
|
7
|
+
1. [Setup](#setup)
|
|
8
|
+
2. [CSS-Only Usage](#css-only-usage)
|
|
9
|
+
3. [React Usage](#react-usage)
|
|
10
|
+
4. [Project Customization](#project-customization)
|
|
11
|
+
5. [Best Practices](#best-practices)
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Setup
|
|
16
|
+
|
|
17
|
+
### 1. Create Your Project
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
# React + Vite (recommended)
|
|
21
|
+
npm create vite@latest my-project -- --template react-ts
|
|
22
|
+
|
|
23
|
+
# Next.js
|
|
24
|
+
npx create-next-app@latest my-project
|
|
25
|
+
|
|
26
|
+
# Or any framework you prefer
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### 2. Install the Design System
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
# When published to npm
|
|
33
|
+
npm install 7k-design-system
|
|
34
|
+
|
|
35
|
+
# Or install from GitHub
|
|
36
|
+
npm install github:7K-Group/7k-design-system
|
|
37
|
+
|
|
38
|
+
# Or clone and link locally
|
|
39
|
+
git clone https://github.com/7K-Group/7k-design-system.git
|
|
40
|
+
cd 7k-design-system
|
|
41
|
+
npm link
|
|
42
|
+
cd ../my-project
|
|
43
|
+
npm link 7k-design-system
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## CSS-Only Usage
|
|
49
|
+
|
|
50
|
+
Use this approach for static sites, vanilla JS projects, or when you want full control over markup.
|
|
51
|
+
|
|
52
|
+
### Import the Full CSS
|
|
53
|
+
|
|
54
|
+
```typescript
|
|
55
|
+
// main.tsx or main.js
|
|
56
|
+
import '7k-design-system/css';
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Import Modular CSS (Tree-shakeable)
|
|
60
|
+
|
|
61
|
+
```typescript
|
|
62
|
+
// Only tokens and base styles
|
|
63
|
+
import '7k-design-system/css/tokens';
|
|
64
|
+
|
|
65
|
+
// Add specific modules as needed
|
|
66
|
+
import '7k-design-system/css/components';
|
|
67
|
+
import '7k-design-system/css/textures';
|
|
68
|
+
import '7k-design-system/css/animations';
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### Use Component Classes
|
|
72
|
+
|
|
73
|
+
```html
|
|
74
|
+
<!-- Buttons -->
|
|
75
|
+
<button class="btn-modern btn-modern-primary">Primary</button>
|
|
76
|
+
<button class="btn-modern btn-modern-secondary">Secondary</button>
|
|
77
|
+
<button class="btn-modern btn-modern-ghost">Ghost</button>
|
|
78
|
+
|
|
79
|
+
<!-- Forms -->
|
|
80
|
+
<input class="input" placeholder="Enter text" />
|
|
81
|
+
<textarea class="textarea" rows="4"></textarea>
|
|
82
|
+
<select class="select-native">
|
|
83
|
+
<option>Option 1</option>
|
|
84
|
+
<option>Option 2</option>
|
|
85
|
+
</select>
|
|
86
|
+
|
|
87
|
+
<!-- Badges -->
|
|
88
|
+
<span class="badge">Default</span>
|
|
89
|
+
<span class="badge badge-success">Success</span>
|
|
90
|
+
<span class="badge badge-danger">Danger</span>
|
|
91
|
+
|
|
92
|
+
<!-- Navigation -->
|
|
93
|
+
<nav style="display: flex; gap: 4px;">
|
|
94
|
+
<a href="#" class="nav-item active">Home</a>
|
|
95
|
+
<a href="#" class="nav-item">About</a>
|
|
96
|
+
<a href="#" class="nav-item">Contact</a>
|
|
97
|
+
</nav>
|
|
98
|
+
|
|
99
|
+
<!-- Textures -->
|
|
100
|
+
<section class="scanline">
|
|
101
|
+
<h1>Hero Section with Scanlines</h1>
|
|
102
|
+
</section>
|
|
103
|
+
|
|
104
|
+
<div class="halftone-md">
|
|
105
|
+
<p>Manga screentone texture</p>
|
|
106
|
+
</div>
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### Use Design Tokens
|
|
110
|
+
|
|
111
|
+
All CSS custom properties are available globally:
|
|
112
|
+
|
|
113
|
+
```css
|
|
114
|
+
.my-component {
|
|
115
|
+
/* Colors */
|
|
116
|
+
background: var(--bg-elevated);
|
|
117
|
+
color: var(--text-primary);
|
|
118
|
+
border: 2px solid var(--border-default);
|
|
119
|
+
|
|
120
|
+
/* Typography */
|
|
121
|
+
font-family: var(--font-sans);
|
|
122
|
+
font-size: var(--text-body);
|
|
123
|
+
line-height: var(--leading-normal);
|
|
124
|
+
|
|
125
|
+
/* Spacing */
|
|
126
|
+
padding: var(--space-4);
|
|
127
|
+
gap: var(--space-2);
|
|
128
|
+
|
|
129
|
+
/* Brand accent */
|
|
130
|
+
border-color: var(--brand-primary);
|
|
131
|
+
}
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
## React Usage
|
|
137
|
+
|
|
138
|
+
Use this approach for React applications. Components are thin wrappers around CSS classes with proper TypeScript support.
|
|
139
|
+
|
|
140
|
+
### 1. Wrap Your App with ThemeProvider
|
|
141
|
+
|
|
142
|
+
```tsx
|
|
143
|
+
// App.tsx
|
|
144
|
+
import { ThemeProvider } from '7k-design-system/react';
|
|
145
|
+
import '7k-design-system/css';
|
|
146
|
+
|
|
147
|
+
function App() {
|
|
148
|
+
return (
|
|
149
|
+
<ThemeProvider defaultTheme="dark">
|
|
150
|
+
<YourApp />
|
|
151
|
+
</ThemeProvider>
|
|
152
|
+
);
|
|
153
|
+
}
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
### 2. Use Components
|
|
157
|
+
|
|
158
|
+
```tsx
|
|
159
|
+
// pages/Home.tsx
|
|
160
|
+
import { Button, Input, Badge, ThemeToggle } from '7k-design-system/react';
|
|
161
|
+
|
|
162
|
+
function Home() {
|
|
163
|
+
return (
|
|
164
|
+
<div style={{ padding: '24px' }}>
|
|
165
|
+
<header style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
|
|
166
|
+
<h1 className="display">Welcome</h1>
|
|
167
|
+
<ThemeToggle />
|
|
168
|
+
</header>
|
|
169
|
+
|
|
170
|
+
<section style={{ display: 'flex', gap: '12px', marginTop: '24px' }}>
|
|
171
|
+
<Button variant="primary">Get Started</Button>
|
|
172
|
+
<Button variant="secondary">Learn More</Button>
|
|
173
|
+
<Button variant="ghost">Documentation</Button>
|
|
174
|
+
</section>
|
|
175
|
+
|
|
176
|
+
<section style={{ marginTop: '24px', maxWidth: '400px' }}>
|
|
177
|
+
<Input placeholder="Enter your email" type="email" />
|
|
178
|
+
</section>
|
|
179
|
+
|
|
180
|
+
<section style={{ display: 'flex', gap: '8px', marginTop: '24px' }}>
|
|
181
|
+
<Badge>Draft</Badge>
|
|
182
|
+
<Badge variant="success">Published</Badge>
|
|
183
|
+
<Badge variant="warning">Review</Badge>
|
|
184
|
+
</section>
|
|
185
|
+
</div>
|
|
186
|
+
);
|
|
187
|
+
}
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
### 3. Use the Theme Hook
|
|
191
|
+
|
|
192
|
+
```tsx
|
|
193
|
+
import { useTheme } from '7k-design-system/react';
|
|
194
|
+
|
|
195
|
+
function ThemeAwareComponent() {
|
|
196
|
+
const { theme, toggleTheme, setTheme } = useTheme();
|
|
197
|
+
|
|
198
|
+
return (
|
|
199
|
+
<div>
|
|
200
|
+
<p>Current theme: {theme}</p>
|
|
201
|
+
<button onClick={toggleTheme}>Toggle</button>
|
|
202
|
+
<button onClick={() => setTheme('dark')}>Force Dark</button>
|
|
203
|
+
<button onClick={() => setTheme('light')}>Force Light</button>
|
|
204
|
+
</div>
|
|
205
|
+
);
|
|
206
|
+
}
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
### 4. Component Props Reference
|
|
210
|
+
|
|
211
|
+
#### Button
|
|
212
|
+
|
|
213
|
+
```tsx
|
|
214
|
+
<Button
|
|
215
|
+
variant="primary" // 'primary' | 'secondary' | 'ghost' | 'glow' | 'glow-cyan' | 'glow-grid' | 'danger'
|
|
216
|
+
size="md" // 'sm' | 'md' | 'lg'
|
|
217
|
+
disabled={false}
|
|
218
|
+
onClick={() => {}}
|
|
219
|
+
type="button" // 'button' | 'submit' | 'reset'
|
|
220
|
+
>
|
|
221
|
+
Click me
|
|
222
|
+
</Button>
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
#### Input
|
|
226
|
+
|
|
227
|
+
```tsx
|
|
228
|
+
<Input
|
|
229
|
+
type="text" // any HTML input type
|
|
230
|
+
placeholder="Hint"
|
|
231
|
+
disabled={false}
|
|
232
|
+
value={value}
|
|
233
|
+
onChange={(value) => setValue(value)}
|
|
234
|
+
/>
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
#### Badge
|
|
238
|
+
|
|
239
|
+
```tsx
|
|
240
|
+
<Badge
|
|
241
|
+
variant="default" // 'default' | 'success' | 'warning' | 'danger' | 'info' | 'neutral'
|
|
242
|
+
>
|
|
243
|
+
Status
|
|
244
|
+
</Badge>
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
---
|
|
248
|
+
|
|
249
|
+
## Project Customization
|
|
250
|
+
|
|
251
|
+
Each 7K sub-project can override the accent color while keeping the same base design.
|
|
252
|
+
|
|
253
|
+
### Override Accent Colors
|
|
254
|
+
|
|
255
|
+
```css
|
|
256
|
+
/* project-neon.css */
|
|
257
|
+
.project-neon {
|
|
258
|
+
/* Circle project — cyan accent */
|
|
259
|
+
--accent-circle: var(--cyan-500);
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
/* project-grid.css */
|
|
263
|
+
.project-grid {
|
|
264
|
+
/* Grid project — acid green accent */
|
|
265
|
+
--accent-grid: var(--acid-500);
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
/* project-ember.css */
|
|
269
|
+
.project-ember {
|
|
270
|
+
/* Line project — orange accent */
|
|
271
|
+
--accent-line: var(--ember-500);
|
|
272
|
+
}
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
### Apply to Root Element
|
|
276
|
+
|
|
277
|
+
```tsx
|
|
278
|
+
// App.tsx
|
|
279
|
+
function App() {
|
|
280
|
+
return (
|
|
281
|
+
<ThemeProvider>
|
|
282
|
+
<div className="project-neon">
|
|
283
|
+
<YourApp />
|
|
284
|
+
</div>
|
|
285
|
+
</ThemeProvider>
|
|
286
|
+
);
|
|
287
|
+
}
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
### Custom Component Styles
|
|
291
|
+
|
|
292
|
+
```css
|
|
293
|
+
/* Always use tokens, never hard-code */
|
|
294
|
+
.my-hero {
|
|
295
|
+
background: var(--bg-base);
|
|
296
|
+
color: var(--text-primary);
|
|
297
|
+
border: 2px solid var(--border-default);
|
|
298
|
+
padding: var(--space-8);
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
.my-hero-accent {
|
|
302
|
+
/* Use project accent */
|
|
303
|
+
border-color: var(--accent-circle);
|
|
304
|
+
box-shadow: 0 0 20px color-mix(in srgb, var(--accent-circle) 25%, transparent);
|
|
305
|
+
}
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
---
|
|
309
|
+
|
|
310
|
+
## Best Practices
|
|
311
|
+
|
|
312
|
+
### DO
|
|
313
|
+
|
|
314
|
+
- **Use tokens** — Always reference `var(--*)` instead of hard-coding colors
|
|
315
|
+
- **Import once** — Import CSS at your app entry point, not in every component
|
|
316
|
+
- **Use ThemeProvider** — Wrap your app to enable theme switching
|
|
317
|
+
- **Apply textures sparingly** — One texture per section, don't nest them
|
|
318
|
+
- **Use mono labels** — Add `.mono-label` class to section headers for the blueprint aesthetic
|
|
319
|
+
|
|
320
|
+
```tsx
|
|
321
|
+
<section>
|
|
322
|
+
<span className="mono-label">FEATURES</span>
|
|
323
|
+
<h2>What We Build</h2>
|
|
324
|
+
</section>
|
|
325
|
+
```
|
|
326
|
+
|
|
327
|
+
### DON'T
|
|
328
|
+
|
|
329
|
+
- **Don't hard-code colors** — Avoid hex values; use design tokens
|
|
330
|
+
- **Don't import CSS in components** — Import once at app level
|
|
331
|
+
- **Don't mix textures** — Don't put `.scanline` inside `.halftone`
|
|
332
|
+
- **Don't override component internals** — Style via props or wrapper classes
|
|
333
|
+
- **Don't forget data-theme** — Light mode requires `data-theme="light"` on <html>
|
|
334
|
+
|
|
335
|
+
### File Structure for a New Project
|
|
336
|
+
|
|
337
|
+
```
|
|
338
|
+
my-project/
|
|
339
|
+
├── src/
|
|
340
|
+
│ ├── main.tsx # Import design system CSS here
|
|
341
|
+
│ ├── App.tsx # ThemeProvider wrapper
|
|
342
|
+
│ ├── components/ # Your app components
|
|
343
|
+
│ │ ├── Navbar.tsx
|
|
344
|
+
│ │ ├── Hero.tsx
|
|
345
|
+
│ │ └── Footer.tsx
|
|
346
|
+
│ ├── pages/ # Page components
|
|
347
|
+
│ │ ├── Home.tsx
|
|
348
|
+
│ │ └── About.tsx
|
|
349
|
+
│ └── styles/
|
|
350
|
+
│ └── project-neon.css # Project-specific overrides
|
|
351
|
+
├── public/
|
|
352
|
+
│ └── fonts/ # If self-hosting Geist Pixel
|
|
353
|
+
├── index.html
|
|
354
|
+
└── package.json
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
### Example: Complete Landing Page
|
|
358
|
+
|
|
359
|
+
```tsx
|
|
360
|
+
// src/pages/Home.tsx
|
|
361
|
+
import { Button, ThemeToggle } from '7k-design-system/react';
|
|
362
|
+
|
|
363
|
+
export function Home() {
|
|
364
|
+
return (
|
|
365
|
+
<div className="project-neon">
|
|
366
|
+
<nav style={{
|
|
367
|
+
position: 'sticky',
|
|
368
|
+
top: 0,
|
|
369
|
+
display: 'flex',
|
|
370
|
+
justifyContent: 'space-between',
|
|
371
|
+
padding: '12px 24px',
|
|
372
|
+
background: 'var(--bg-base)',
|
|
373
|
+
borderBottom: '2px solid var(--border-default)'
|
|
374
|
+
}}>
|
|
375
|
+
<span className="mono-label">7K GROUP</span>
|
|
376
|
+
<ThemeToggle />
|
|
377
|
+
</nav>
|
|
378
|
+
|
|
379
|
+
<section
|
|
380
|
+
className="scanline"
|
|
381
|
+
style={{
|
|
382
|
+
minHeight: '80vh',
|
|
383
|
+
display: 'flex',
|
|
384
|
+
flexDirection: 'column',
|
|
385
|
+
alignItems: 'center',
|
|
386
|
+
justifyContent: 'center',
|
|
387
|
+
textAlign: 'center',
|
|
388
|
+
padding: 'var(--space-8)'
|
|
389
|
+
}}
|
|
390
|
+
>
|
|
391
|
+
<span className="mono-label" style={{ color: 'var(--brand-primary)' }}>
|
|
392
|
+
EST. 2024
|
|
393
|
+
</span>
|
|
394
|
+
<h1 className="display" style={{ marginTop: 'var(--space-4)' }}>
|
|
395
|
+
Built for Midnight
|
|
396
|
+
</h1>
|
|
397
|
+
<p className="body-lg" style={{ maxWidth: '600px', marginTop: 'var(--space-4)' }}>
|
|
398
|
+
A multi-project technology company crafting infrastructure,
|
|
399
|
+
AI pipelines, and digital products.
|
|
400
|
+
</p>
|
|
401
|
+
<div style={{ display: 'flex', gap: 'var(--space-3)', marginTop: 'var(--space-6)' }}>
|
|
402
|
+
<Button variant="glow">Explore Projects</Button>
|
|
403
|
+
<Button variant="secondary">View Docs</Button>
|
|
404
|
+
</div>
|
|
405
|
+
</section>
|
|
406
|
+
|
|
407
|
+
<section
|
|
408
|
+
className="halftone-md"
|
|
409
|
+
style={{ padding: 'var(--space-8)' }}
|
|
410
|
+
>
|
|
411
|
+
<span className="mono-label">PHILOSOPHY</span>
|
|
412
|
+
<h2 className="h2">Dark First</h2>
|
|
413
|
+
<p className="body">
|
|
414
|
+
We design for the dark. Light mode is opt-in, not default.
|
|
415
|
+
</p>
|
|
416
|
+
</section>
|
|
417
|
+
</div>
|
|
418
|
+
);
|
|
419
|
+
}
|
|
420
|
+
```
|
|
421
|
+
|
|
422
|
+
---
|
|
423
|
+
|
|
424
|
+
## Troubleshooting
|
|
425
|
+
|
|
426
|
+
### Fonts not loading?
|
|
427
|
+
|
|
428
|
+
Make sure Geist Sans/Mono CDN is accessible or self-host them:
|
|
429
|
+
|
|
430
|
+
```bash
|
|
431
|
+
npm install geist
|
|
432
|
+
```
|
|
433
|
+
|
|
434
|
+
```typescript
|
|
435
|
+
import 'geist/font/sans.css';
|
|
436
|
+
import 'geist/font/mono.css';
|
|
437
|
+
```
|
|
438
|
+
|
|
439
|
+
### Light mode not working?
|
|
440
|
+
|
|
441
|
+
Ensure `data-theme="light"` is set on the root element. The ThemeProvider handles this automatically.
|
|
442
|
+
|
|
443
|
+
### CSS classes not applying?
|
|
444
|
+
|
|
445
|
+
Check that you're importing the CSS:
|
|
446
|
+
|
|
447
|
+
```typescript
|
|
448
|
+
import '7k-design-system/css';
|
|
449
|
+
```
|
|
450
|
+
|
|
451
|
+
### TypeScript errors?
|
|
452
|
+
|
|
453
|
+
Make sure your `tsconfig.json` includes:
|
|
454
|
+
|
|
455
|
+
```json
|
|
456
|
+
{
|
|
457
|
+
"compilerOptions": {
|
|
458
|
+
"moduleResolution": "bundler",
|
|
459
|
+
"allowSyntheticDefaultImports": true
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
```
|
|
463
|
+
|
|
464
|
+
---
|
|
465
|
+
|
|
466
|
+
## Next Steps
|
|
467
|
+
|
|
468
|
+
1. Run `npm run storybook` in the design system repo to explore all components
|
|
469
|
+
2. Open `preview/*.html` files to see token values rendered
|
|
470
|
+
3. Read `DESIGN.md` for detailed design principles and constraints
|
|
471
|
+
4. Check `CONTRIBUTING.md` if you want to contribute back
|