aibos-design-system 1.0.0 → 1.0.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.
@@ -1,370 +1,372 @@
1
- # How External Users Use This Design System
2
-
3
- **For**: External Developers / npm Package Users
4
- **Quick Start**: Install → Import → Use Classes
5
-
6
- ---
7
-
8
- ## 🚀 Quick Start (3 Steps)
9
-
10
- ### 1. Install
11
-
12
- ```bash
13
- npm install @aibos/design-system
14
- # or
15
- pnpm add @aibos/design-system
16
- # or
17
- yarn add @aibos/design-system
18
- ```
19
-
20
- ### 2. Import CSS
21
-
22
- ```typescript
23
- // In your main entry file (app/layout.tsx, main.tsx, etc.)
24
- import '@aibos/design-system/css';
25
- ```
26
-
27
- ### 3. Use Classes
28
-
29
- ```tsx
30
- <div className="na-card na-p-6">
31
- <h1 className="na-h1">Title</h1>
32
- <div className="na-data">$12,450.00</div>
33
- </div>
34
- ```
35
-
36
- **That's it!** You're ready to use the design system.
37
-
38
- ---
39
-
40
- ## 📦 What You Get
41
-
42
- When you install `@aibos/design-system`, you get:
43
-
44
- - **254 Design Tokens** - Colors, typography, spacing, shadows
45
- - ✅ **171 Semantic Classes** - Ready-to-use `.na-*` components
46
- - ✅ **Beast Mode Patterns** - Advanced CSS patterns (Radio State Machine, Frozen Grids)
47
- - ✅ **TypeScript Definitions** - Full type safety for tokens
48
- - ✅ **Zero Dependencies** - Self-contained CSS (no runtime JS)
49
-
50
- ---
51
-
52
- ## 💻 Framework Examples
53
-
54
- ### React / Next.js
55
-
56
- ```tsx
57
- // app/layout.tsx (Next.js App Router)
58
- import '@aibos/design-system/css';
59
-
60
- export default function RootLayout({ children }) {
61
- return (
62
- <html>
63
- <body>{children}</body>
64
- </html>
65
- );
66
- }
67
- ```
68
-
69
- ```tsx
70
- // components/Card.tsx
71
- export function Card() {
72
- return (
73
- <div className="na-card na-p-6">
74
- <h1 className="na-h1">Card Title</h1>
75
- <div className="na-data">$12,450.00</div>
76
- <div className="na-metadata">PO-88219 • Feed Supply</div>
77
- <button className="na-btn na-btn-primary na-mt-4">
78
- Click Me
79
- </button>
80
- </div>
81
- );
82
- }
83
- ```
84
-
85
- ### Vue 3
86
-
87
- ```typescript
88
- // main.ts
89
- import '@aibos/design-system/css';
90
- import { createApp } from 'vue';
91
- import App from './App.vue';
92
-
93
- createApp(App).mount('#app');
94
- ```
95
-
96
- ```vue
97
- <!-- components/Card.vue -->
98
- <template>
99
- <div class="na-card na-p-6">
100
- <h1 class="na-h1">Card Title</h1>
101
- <div class="na-data">$12,450.00</div>
102
- <button class="na-btn na-btn-primary">Click Me</button>
103
- </div>
104
- </template>
105
- ```
106
-
107
- ### Svelte
108
-
109
- ```typescript
110
- // app.js
111
- import '@aibos/design-system/css';
112
- import App from './App.svelte';
113
-
114
- const app = new App({ target: document.body });
115
- ```
116
-
117
- ```svelte
118
- <!-- components/Card.svelte -->
119
- <div class="na-card na-p-6">
120
- <h1 class="na-h1">Card Title</h1>
121
- <div class="na-data">$12,450.00</div>
122
- </div>
123
- ```
124
-
125
- ### Vanilla HTML
126
-
127
- ```html
128
- <!DOCTYPE html>
129
- <html lang="en">
130
- <head>
131
- <meta charset="UTF-8">
132
- <title>My App</title>
133
- <link rel="stylesheet" href="./node_modules/@aibos/design-system/style.css">
134
- </head>
135
- <body>
136
- <div class="na-card na-p-6">
137
- <h1 class="na-h1">Card Title</h1>
138
- <div class="na-data">$12,450.00</div>
139
- </div>
140
- </body>
141
- </html>
142
- ```
143
-
144
- ---
145
-
146
- ## 🎨 Using Design Tokens
147
-
148
- ### TypeScript
149
-
150
- ```typescript
151
- import tokens from '@aibos/design-system/tokens';
152
- import type { DesignTokens } from '@aibos/design-system/tokens/typescript';
153
-
154
- export function Button() {
155
- return (
156
- <button
157
- className="na-btn"
158
- style={{
159
- backgroundColor: tokens.color.primary,
160
- padding: tokens.spacing[6],
161
- borderRadius: tokens.radius.card,
162
- }}
163
- >
164
- Click me
165
- </button>
166
- );
167
- }
168
- ```
169
-
170
- ### JavaScript
171
-
172
- ```javascript
173
- import tokens from '@aibos/design-system/tokens';
174
-
175
- export function Button() {
176
- return (
177
- <button
178
- className="na-btn"
179
- style={{
180
- backgroundColor: tokens.color.primary,
181
- padding: tokens.spacing[6],
182
- }}
183
- >
184
- Click me
185
- </button>
186
- );
187
- }
188
- ```
189
-
190
- ---
191
-
192
- ## 📚 Common Patterns
193
-
194
- ### Cards
195
-
196
- ```tsx
197
- <div className="na-card na-p-6">
198
- <h2 className="na-h3">Card Title</h2>
199
- <div className="na-data">$12,450.00</div>
200
- <div className="na-metadata">PO-88219 • Feed Supply</div>
201
- </div>
202
- ```
203
-
204
- ### Tables
205
-
206
- ```tsx
207
- <div className="na-table-wrap">
208
- <table className="na-table">
209
- <thead>
210
- <tr>
211
- <th className="na-th">Name</th>
212
- <th className="na-th">Price</th>
213
- <th className="na-th">Status</th>
214
- </tr>
215
- </thead>
216
- <tbody>
217
- <tr className="na-tr">
218
- <td className="na-td">Product A</td>
219
- <td className="na-td na-tabular">$1,234.56</td>
220
- <td className="na-td">
221
- <span className="na-status na-status-ok">Active</span>
222
- </td>
223
- </tr>
224
- </tbody>
225
- </table>
226
- </div>
227
- ```
228
-
229
- ### Buttons
230
-
231
- ```tsx
232
- <button className="na-btn na-btn-primary">Primary</button>
233
- <button className="na-btn na-btn-secondary">Secondary</button>
234
- <button className="na-btn na-iconbtn">⚙️</button>
235
- ```
236
-
237
- ### Status Indicators
238
-
239
- ```tsx
240
- <span className="na-status na-status-ok">Success</span>
241
- <span className="na-status na-status-pending">Pending</span>
242
- <span className="na-status na-status-bad">Error</span>
243
- ```
244
-
245
- ---
246
-
247
- ## 🚀 Beast Mode Patterns
248
-
249
- ### Radio Button State Machine (0ms Latency View Switching)
250
-
251
- ```tsx
252
- <input type="radio" name="view" id="v-grid" className="na-state-radio" defaultChecked />
253
- <input type="radio" name="view" id="v-kanban" className="na-state-radio" />
254
-
255
- <div className="na-view-controls">
256
- <label htmlFor="v-grid" className="na-state-label">Grid</label>
257
- <label htmlFor="v-kanban" className="na-state-label">Kanban</label>
258
- </div>
259
-
260
- <div className="na-viewport">
261
- <div className="na-view-pane" data-view="grid">Grid Content</div>
262
- <div className="na-view-pane" data-view="kanban">Kanban Content</div>
263
- </div>
264
- ```
265
-
266
- ### Bi-Directional Sticky Grid (Frozen Panes)
267
-
268
- ```tsx
269
- <div className="na-grid-frozen">
270
- <table className="na-table-frozen">
271
- <thead>
272
- <tr>
273
- <th className="na-th">Fixed Column</th>
274
- <th className="na-th">Scrollable Column</th>
275
- </tr>
276
- </thead>
277
- <tbody>
278
- <tr>
279
- <td className="na-td">Fixed</td>
280
- <td className="na-td">Scrollable</td>
281
- </tr>
282
- </tbody>
283
- </table>
284
- </div>
285
- ```
286
-
287
- ---
288
-
289
- ## 📖 Documentation
290
-
291
- - **[API Reference](./API_REFERENCE.md)** ⭐ **START HERE** - Typography, spacing, components, colors
292
- - **[Design System Guide](./docs/DESIGN_SYSTEM.md)** - Complete reference
293
- - **[Advanced Patterns](./docs/ADVANCED_PATTERNS.md)** - Beast Mode patterns
294
- - **[Color System](./docs/COLOR_SYSTEM_REFERENCE.md)** - Color tokens
295
- - **[Quick Start](./docs/QUICK_START_GUIDE.md)** - Setup guide
296
-
297
- ---
298
-
299
- ## 🔧 Package Exports
300
-
301
- ```typescript
302
- // CSS (main export)
303
- import '@aibos/design-system/css'
304
- // or
305
- import '@aibos/design-system'
306
-
307
- // Tokens (JSON)
308
- import tokens from '@aibos/design-system/tokens'
309
-
310
- // Tokens (TypeScript)
311
- import type { DesignTokens } from '@aibos/design-system/tokens/typescript'
312
- ```
313
-
314
- ---
315
-
316
- ## ✅ What Makes This Special
317
-
318
- 1. **Zero Framework Overhead** - Pure CSS, no JavaScript runtime
319
- 2. **100% Figma Compliant** - Matches design specs exactly
320
- 3. **Beast Mode Patterns** - Advanced CSS patterns (Radio State Machine, Frozen Grids)
321
- 4. **TypeScript Support** - Full type safety for tokens
322
- 5. **Framework Agnostic** - Works with React, Vue, Svelte, or vanilla HTML
323
- 6. **Production Ready** - 8 production prototypes included
324
-
325
- ---
326
-
327
- ## 🆘 Troubleshooting
328
-
329
- ### CSS not loading?
330
-
331
- Ensure CSS is imported **before** your app code:
332
-
333
- ```typescript
334
- // ✅ Correct
335
- import '@aibos/design-system/css';
336
- import './app.css';
337
-
338
- // ❌ Wrong
339
- import './app.css';
340
- import '@aibos/design-system/css';
341
- ```
342
-
343
- ### TypeScript errors?
344
-
345
- Ensure your `tsconfig.json` has proper module resolution:
346
-
347
- ```json
348
- {
349
- "compilerOptions": {
350
- "moduleResolution": "bundler"
351
- }
352
- }
353
- ```
354
-
355
- ### Classes not working?
356
-
357
- 1. Verify CSS is imported
358
- 2. Check browser DevTools for CSS conflicts
359
- 3. Ensure you're using `.na-*` classes (not arbitrary Tailwind)
360
-
361
- ---
362
-
363
- ## 📝 License
364
-
365
- MIT License - See package.json for details
366
-
367
- ---
368
-
369
- **Ready to use?** Install and start building! 🚀
370
-
1
+ # How External Users Use This Design System
2
+
3
+ **For**: External Developers / npm Package Users
4
+ **Quick Start**: Install → Import → Use Classes
5
+
6
+ ---
7
+
8
+ ## 🚀 Quick Start (3 Steps)
9
+
10
+ ### 1. Install
11
+
12
+ ```bash
13
+ npm install aibos-design-system
14
+ # or
15
+ pnpm add aibos-design-system
16
+ # or
17
+ yarn add aibos-design-system
18
+ ```
19
+
20
+ ### 2. Import CSS
21
+
22
+ ```typescript
23
+ // In your main entry file (app/layout.tsx, main.tsx, etc.)
24
+ import 'aibos-design-system/css';
25
+ // or
26
+ import 'aibos-design-system';
27
+ ```
28
+
29
+ ### 3. Use Classes
30
+
31
+ ```tsx
32
+ <div className="na-card na-p-6">
33
+ <h1 className="na-h1">Title</h1>
34
+ <div className="na-data">$12,450.00</div>
35
+ </div>
36
+ ```
37
+
38
+ **That's it!** You're ready to use the design system.
39
+
40
+ ---
41
+
42
+ ## 📦 What You Get
43
+
44
+ When you install `aibos-design-system`, you get:
45
+
46
+ - ✅ **254 Design Tokens** - Colors, typography, spacing, shadows
47
+ - ✅ **171 Semantic Classes** - Ready-to-use `.na-*` components
48
+ - ✅ **Beast Mode Patterns** - Advanced CSS patterns (Radio State Machine, Frozen Grids)
49
+ - ✅ **TypeScript Definitions** - Full type safety for tokens
50
+ - ✅ **Zero Dependencies** - Self-contained CSS (no runtime JS)
51
+
52
+ ---
53
+
54
+ ## 💻 Framework Examples
55
+
56
+ ### React / Next.js
57
+
58
+ ```tsx
59
+ // app/layout.tsx (Next.js App Router)
60
+ import 'aibos-design-system/css';
61
+
62
+ export default function RootLayout({ children }) {
63
+ return (
64
+ <html>
65
+ <body>{children}</body>
66
+ </html>
67
+ );
68
+ }
69
+ ```
70
+
71
+ ```tsx
72
+ // components/Card.tsx
73
+ export function Card() {
74
+ return (
75
+ <div className="na-card na-p-6">
76
+ <h1 className="na-h1">Card Title</h1>
77
+ <div className="na-data">$12,450.00</div>
78
+ <div className="na-metadata">PO-88219 • Feed Supply</div>
79
+ <button className="na-btn na-btn-primary na-mt-4">
80
+ Click Me
81
+ </button>
82
+ </div>
83
+ );
84
+ }
85
+ ```
86
+
87
+ ### Vue 3
88
+
89
+ ```typescript
90
+ // main.ts
91
+ import 'aibos-design-system/css';
92
+ import { createApp } from 'vue';
93
+ import App from './App.vue';
94
+
95
+ createApp(App).mount('#app');
96
+ ```
97
+
98
+ ```vue
99
+ <!-- components/Card.vue -->
100
+ <template>
101
+ <div class="na-card na-p-6">
102
+ <h1 class="na-h1">Card Title</h1>
103
+ <div class="na-data">$12,450.00</div>
104
+ <button class="na-btn na-btn-primary">Click Me</button>
105
+ </div>
106
+ </template>
107
+ ```
108
+
109
+ ### Svelte
110
+
111
+ ```typescript
112
+ // app.js
113
+ import 'aibos-design-system/css';
114
+ import App from './App.svelte';
115
+
116
+ const app = new App({ target: document.body });
117
+ ```
118
+
119
+ ```svelte
120
+ <!-- components/Card.svelte -->
121
+ <div class="na-card na-p-6">
122
+ <h1 class="na-h1">Card Title</h1>
123
+ <div class="na-data">$12,450.00</div>
124
+ </div>
125
+ ```
126
+
127
+ ### Vanilla HTML
128
+
129
+ ```html
130
+ <!DOCTYPE html>
131
+ <html lang="en">
132
+ <head>
133
+ <meta charset="UTF-8">
134
+ <title>My App</title>
135
+ <link rel="stylesheet" href="./node_modules/aibos-design-system/style.css">
136
+ </head>
137
+ <body>
138
+ <div class="na-card na-p-6">
139
+ <h1 class="na-h1">Card Title</h1>
140
+ <div class="na-data">$12,450.00</div>
141
+ </div>
142
+ </body>
143
+ </html>
144
+ ```
145
+
146
+ ---
147
+
148
+ ## 🎨 Using Design Tokens
149
+
150
+ ### TypeScript
151
+
152
+ ```typescript
153
+ import tokens from 'aibos-design-system/tokens';
154
+ import type { DesignTokens } from 'aibos-design-system/tokens/typescript';
155
+
156
+ export function Button() {
157
+ return (
158
+ <button
159
+ className="na-btn"
160
+ style={{
161
+ backgroundColor: tokens.color.primary,
162
+ padding: tokens.spacing[6],
163
+ borderRadius: tokens.radius.card,
164
+ }}
165
+ >
166
+ Click me
167
+ </button>
168
+ );
169
+ }
170
+ ```
171
+
172
+ ### JavaScript
173
+
174
+ ```javascript
175
+ import tokens from 'aibos-design-system/tokens';
176
+
177
+ export function Button() {
178
+ return (
179
+ <button
180
+ className="na-btn"
181
+ style={{
182
+ backgroundColor: tokens.color.primary,
183
+ padding: tokens.spacing[6],
184
+ }}
185
+ >
186
+ Click me
187
+ </button>
188
+ );
189
+ }
190
+ ```
191
+
192
+ ---
193
+
194
+ ## 📚 Common Patterns
195
+
196
+ ### Cards
197
+
198
+ ```tsx
199
+ <div className="na-card na-p-6">
200
+ <h2 className="na-h3">Card Title</h2>
201
+ <div className="na-data">$12,450.00</div>
202
+ <div className="na-metadata">PO-88219 • Feed Supply</div>
203
+ </div>
204
+ ```
205
+
206
+ ### Tables
207
+
208
+ ```tsx
209
+ <div className="na-table-wrap">
210
+ <table className="na-table">
211
+ <thead>
212
+ <tr>
213
+ <th className="na-th">Name</th>
214
+ <th className="na-th">Price</th>
215
+ <th className="na-th">Status</th>
216
+ </tr>
217
+ </thead>
218
+ <tbody>
219
+ <tr className="na-tr">
220
+ <td className="na-td">Product A</td>
221
+ <td className="na-td na-tabular">$1,234.56</td>
222
+ <td className="na-td">
223
+ <span className="na-status na-status-ok">Active</span>
224
+ </td>
225
+ </tr>
226
+ </tbody>
227
+ </table>
228
+ </div>
229
+ ```
230
+
231
+ ### Buttons
232
+
233
+ ```tsx
234
+ <button className="na-btn na-btn-primary">Primary</button>
235
+ <button className="na-btn na-btn-secondary">Secondary</button>
236
+ <button className="na-btn na-iconbtn">⚙️</button>
237
+ ```
238
+
239
+ ### Status Indicators
240
+
241
+ ```tsx
242
+ <span className="na-status na-status-ok">Success</span>
243
+ <span className="na-status na-status-pending">Pending</span>
244
+ <span className="na-status na-status-bad">Error</span>
245
+ ```
246
+
247
+ ---
248
+
249
+ ## 🚀 Beast Mode Patterns
250
+
251
+ ### Radio Button State Machine (0ms Latency View Switching)
252
+
253
+ ```tsx
254
+ <input type="radio" name="view" id="v-grid" className="na-state-radio" defaultChecked />
255
+ <input type="radio" name="view" id="v-kanban" className="na-state-radio" />
256
+
257
+ <div className="na-view-controls">
258
+ <label htmlFor="v-grid" className="na-state-label">Grid</label>
259
+ <label htmlFor="v-kanban" className="na-state-label">Kanban</label>
260
+ </div>
261
+
262
+ <div className="na-viewport">
263
+ <div className="na-view-pane" data-view="grid">Grid Content</div>
264
+ <div className="na-view-pane" data-view="kanban">Kanban Content</div>
265
+ </div>
266
+ ```
267
+
268
+ ### Bi-Directional Sticky Grid (Frozen Panes)
269
+
270
+ ```tsx
271
+ <div className="na-grid-frozen">
272
+ <table className="na-table-frozen">
273
+ <thead>
274
+ <tr>
275
+ <th className="na-th">Fixed Column</th>
276
+ <th className="na-th">Scrollable Column</th>
277
+ </tr>
278
+ </thead>
279
+ <tbody>
280
+ <tr>
281
+ <td className="na-td">Fixed</td>
282
+ <td className="na-td">Scrollable</td>
283
+ </tr>
284
+ </tbody>
285
+ </table>
286
+ </div>
287
+ ```
288
+
289
+ ---
290
+
291
+ ## 📖 Documentation
292
+
293
+ - **[API Reference](./API_REFERENCE.md)** ⭐ **START HERE** - Typography, spacing, components, colors
294
+ - **[Design System Guide](./docs/DESIGN_SYSTEM.md)** - Complete reference
295
+ - **[Advanced Patterns](./docs/ADVANCED_PATTERNS.md)** - Beast Mode patterns
296
+ - **[Color System](./docs/COLOR_SYSTEM_REFERENCE.md)** - Color tokens
297
+ - **[Quick Start](./docs/QUICK_START_GUIDE.md)** - Setup guide
298
+
299
+ ---
300
+
301
+ ## 🔧 Package Exports
302
+
303
+ ```typescript
304
+ // CSS (main export)
305
+ import 'aibos-design-system/css'
306
+ // or
307
+ import 'aibos-design-system'
308
+
309
+ // Tokens (JSON)
310
+ import tokens from 'aibos-design-system/tokens'
311
+
312
+ // Tokens (TypeScript)
313
+ import type { DesignTokens } from 'aibos-design-system/tokens/typescript'
314
+ ```
315
+
316
+ ---
317
+
318
+ ## What Makes This Special
319
+
320
+ 1. **Zero Framework Overhead** - Pure CSS, no JavaScript runtime
321
+ 2. **100% Figma Compliant** - Matches design specs exactly
322
+ 3. **Beast Mode Patterns** - Advanced CSS patterns (Radio State Machine, Frozen Grids)
323
+ 4. **TypeScript Support** - Full type safety for tokens
324
+ 5. **Framework Agnostic** - Works with React, Vue, Svelte, or vanilla HTML
325
+ 6. **Production Ready** - 8 production prototypes included
326
+
327
+ ---
328
+
329
+ ## 🆘 Troubleshooting
330
+
331
+ ### CSS not loading?
332
+
333
+ Ensure CSS is imported **before** your app code:
334
+
335
+ ```typescript
336
+ // ✅ Correct
337
+ import 'aibos-design-system/css';
338
+ import './app.css';
339
+
340
+ // ❌ Wrong
341
+ import './app.css';
342
+ import 'aibos-design-system/css';
343
+ ```
344
+
345
+ ### TypeScript errors?
346
+
347
+ Ensure your `tsconfig.json` has proper module resolution:
348
+
349
+ ```json
350
+ {
351
+ "compilerOptions": {
352
+ "moduleResolution": "bundler"
353
+ }
354
+ }
355
+ ```
356
+
357
+ ### Classes not working?
358
+
359
+ 1. Verify CSS is imported
360
+ 2. Check browser DevTools for CSS conflicts
361
+ 3. Ensure you're using `.na-*` classes (not arbitrary Tailwind)
362
+
363
+ ---
364
+
365
+ ## 📝 License
366
+
367
+ MIT License - See package.json for details
368
+
369
+ ---
370
+
371
+ **Ready to use?** Install and start building! 🚀
372
+