eidotter 0.26.0 → 0.27.0
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/README.md +2 -1
- package/dist/components/Skeleton/components/Skeleton.d.ts +21 -0
- package/dist/components/Skeleton/components/index.d.ts +2 -0
- package/dist/components/Skeleton/index.d.ts +2 -0
- package/dist/eidotter.css +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.es.js +1635 -1495
- package/dist/index.umd.js +4 -4
- package/guidelines/components.md +805 -768
- package/package.json +4 -4
- package/src/styles/tokens.css +4 -4
- package/tailwind.preset.cjs +2 -0
package/guidelines/components.md
CHANGED
|
@@ -1,771 +1,808 @@
|
|
|
1
|
-
# Component Guide
|
|
2
|
-
|
|
3
|
-
Detailed usage guide for each eidotter component.
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## Button
|
|
8
|
-
|
|
9
|
-
User action trigger with multiple visual styles.
|
|
10
|
-
|
|
11
|
-
### When to Use
|
|
12
|
-
|
|
13
|
-
- **primary**: Main call-to-action (submit, save, confirm)
|
|
14
|
-
- **secondary**: Alternative actions alongside primary
|
|
15
|
-
- **ghost**: Low-emphasis actions (cancel, dismiss)
|
|
16
|
-
- **link**: Inline text actions that navigate
|
|
17
|
-
|
|
18
|
-
### Props
|
|
19
|
-
|
|
20
|
-
| Prop | Type | Default | Description |
|
|
21
|
-
|------|------|---------|-------------|
|
|
22
|
-
| variant | `'primary' \| 'secondary' \| 'ghost' \| 'link'` | `'primary'` | Visual style |
|
|
23
|
-
| size | `'small' \| 'medium' \| 'large'` | `'medium'` | Button size |
|
|
24
|
-
| disabled | `boolean` | `false` | Disable interaction |
|
|
25
|
-
| loading | `boolean` | `false` | Show loading indicator |
|
|
26
|
-
| fullWidth | `boolean` | `false` | Stretch to container width |
|
|
27
|
-
| type | `'button' \| 'submit' \| 'reset'` | `'button'` | HTML button type |
|
|
28
|
-
|
|
29
|
-
### Examples
|
|
30
|
-
|
|
31
|
-
```tsx
|
|
32
|
-
// Primary action
|
|
33
|
-
<Button variant="primary">Save Changes</Button>
|
|
34
|
-
|
|
35
|
-
// Form submission
|
|
36
|
-
<Button type="submit" loading={isSubmitting}>Submit</Button>
|
|
37
|
-
|
|
38
|
-
// Cancel action
|
|
39
|
-
<Button variant="ghost" onClick={onCancel}>Cancel</Button>
|
|
40
|
-
|
|
41
|
-
// Full-width button
|
|
42
|
-
<Button fullWidth variant="primary">Continue</Button>
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
---
|
|
46
|
-
|
|
47
|
-
## Alert
|
|
48
|
-
|
|
49
|
-
Dismissible notification messages with contextual styling.
|
|
50
|
-
|
|
51
|
-
### When to Use
|
|
52
|
-
|
|
53
|
-
- **info**: General information or tips
|
|
54
|
-
- **success**: Successful operations
|
|
55
|
-
- **warning**: Cautionary messages
|
|
56
|
-
- **error**: Error states requiring attention
|
|
57
|
-
|
|
58
|
-
### Props
|
|
59
|
-
|
|
60
|
-
| Prop | Type | Default | Description |
|
|
61
|
-
|------|------|---------|-------------|
|
|
62
|
-
| type | `'info' \| 'success' \| 'warning' \| 'error'` | `'info'` | Alert style |
|
|
63
|
-
| size | `'small' \| 'large'` | `'large'` | Alert size |
|
|
64
|
-
| title | `string` | `'Notification Title'` | Header text |
|
|
65
|
-
| children | `ReactNode` | - | Message content |
|
|
66
|
-
| onClose | `() => void` | - | Show close button when provided |
|
|
67
|
-
| onClickHere | `() => void` | - | Show "Click here" link when provided |
|
|
68
|
-
|
|
69
|
-
### Examples
|
|
70
|
-
|
|
71
|
-
```tsx
|
|
72
|
-
// Success message
|
|
73
|
-
<Alert type="success" title="Saved">
|
|
74
|
-
Your changes have been saved successfully.
|
|
75
|
-
</Alert>
|
|
76
|
-
|
|
77
|
-
// Dismissible warning
|
|
78
|
-
<Alert type="warning" title="Low Storage" onClose={() => setShow(false)}>
|
|
79
|
-
You have less than 10% storage remaining.
|
|
80
|
-
</Alert>
|
|
81
|
-
|
|
82
|
-
// Error with action
|
|
83
|
-
<Alert type="error" title="Connection Lost" onClickHere={handleRetry}>
|
|
84
|
-
Unable to connect to the server.
|
|
85
|
-
</Alert>
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
---
|
|
89
|
-
|
|
90
|
-
## Card
|
|
91
|
-
|
|
92
|
-
Content container with optional header and footer.
|
|
93
|
-
|
|
94
|
-
### When to Use
|
|
95
|
-
|
|
96
|
-
- Group related content visually
|
|
97
|
-
- Create distinct content sections
|
|
98
|
-
- Display item summaries in grids
|
|
99
|
-
|
|
100
|
-
### Props
|
|
101
|
-
|
|
102
|
-
| Prop | Type | Default | Description |
|
|
103
|
-
|------|------|---------|-------------|
|
|
104
|
-
| title | `string` | - | Optional header title |
|
|
105
|
-
| children | `ReactNode` | - | Card body content |
|
|
106
|
-
| footer | `ReactNode` | - | Optional footer content |
|
|
107
|
-
| variant | `'default' \| 'elevated' \| 'bordered' \| 'glow'` | `'default'` | Visual style |
|
|
108
|
-
|
|
109
|
-
### Examples
|
|
110
|
-
|
|
111
|
-
```tsx
|
|
112
|
-
// Simple card
|
|
113
|
-
<Card title="User Profile">
|
|
114
|
-
<p>Welcome back, Commander.</p>
|
|
115
|
-
</Card>
|
|
116
|
-
|
|
117
|
-
// Card with footer actions
|
|
118
|
-
<Card
|
|
119
|
-
title="Settings"
|
|
120
|
-
footer={
|
|
121
|
-
<Button variant="primary">Save</Button>
|
|
122
|
-
}
|
|
123
|
-
>
|
|
124
|
-
<label className="block text-dos-text-primary mb-1">Username</label>
|
|
125
|
-
<Input placeholder="Enter username..." />
|
|
126
|
-
</Card>
|
|
127
|
-
|
|
128
|
-
// Glow variant for emphasis
|
|
129
|
-
<Card variant="glow" title="Featured">
|
|
130
|
-
Highlighted content here.
|
|
131
|
-
</Card>
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
---
|
|
135
|
-
|
|
136
|
-
## Input
|
|
137
|
-
|
|
138
|
-
Text entry field with validation state.
|
|
139
|
-
|
|
140
|
-
### When to Use
|
|
141
|
-
|
|
142
|
-
- Text input in forms
|
|
143
|
-
- Search fields
|
|
144
|
-
- Any single-line text entry
|
|
145
|
-
|
|
146
|
-
### Props
|
|
147
|
-
|
|
148
|
-
| Prop | Type | Default | Description |
|
|
149
|
-
|------|------|---------|-------------|
|
|
150
|
-
| variant | `'default' \| 'error'` | `'default'` | Visual state |
|
|
151
|
-
| disabled | `boolean` | `false` | Disable input |
|
|
152
|
-
| ...rest | `InputHTMLAttributes` | - | All standard input props |
|
|
153
|
-
|
|
154
|
-
### Examples
|
|
155
|
-
|
|
156
|
-
```tsx
|
|
157
|
-
// Basic input
|
|
158
|
-
<Input placeholder="Enter filename..." />
|
|
159
|
-
|
|
160
|
-
// With error state
|
|
161
|
-
<Input variant="error" value={email} placeholder="Email" />
|
|
162
|
-
|
|
163
|
-
// Disabled input
|
|
164
|
-
<Input disabled value="Read-only value" />
|
|
165
|
-
```
|
|
166
|
-
|
|
167
|
-
---
|
|
168
|
-
|
|
169
|
-
## Checkbox
|
|
170
|
-
|
|
171
|
-
Boolean toggle with optional label.
|
|
172
|
-
|
|
173
|
-
### When to Use
|
|
174
|
-
|
|
175
|
-
- Toggle settings on/off
|
|
176
|
-
- Multi-select options
|
|
177
|
-
- Agreement/consent checkboxes
|
|
178
|
-
|
|
179
|
-
### Props
|
|
180
|
-
|
|
181
|
-
| Prop | Type | Default | Description |
|
|
182
|
-
|------|------|---------|-------------|
|
|
183
|
-
| checked | `boolean` | - | Controlled checked state |
|
|
184
|
-
| defaultChecked | `boolean` | - | Initial state (uncontrolled) |
|
|
185
|
-
| onChange | `(checked: boolean) => void` | - | Change callback |
|
|
186
|
-
| label | `string` | - | Label text |
|
|
187
|
-
| disabled | `boolean` | `false` | Disable interaction |
|
|
188
|
-
| name | `string` | - | Form field name |
|
|
189
|
-
|
|
190
|
-
### Examples
|
|
191
|
-
|
|
192
|
-
```tsx
|
|
193
|
-
// With label
|
|
194
|
-
<Checkbox label="Remember me" onChange={setRemember} />
|
|
195
|
-
|
|
196
|
-
// Controlled
|
|
197
|
-
<Checkbox checked={agreed} onChange={setAgreed} label="I agree to terms" />
|
|
198
|
-
|
|
199
|
-
// In a list
|
|
200
|
-
{options.map(opt => (
|
|
201
|
-
<Checkbox key={opt.id} label={opt.name} />
|
|
202
|
-
))}
|
|
203
|
-
```
|
|
204
|
-
|
|
205
|
-
---
|
|
206
|
-
|
|
207
|
-
## Switch
|
|
208
|
-
|
|
209
|
-
Toggle control for binary settings.
|
|
210
|
-
|
|
211
|
-
### When to Use
|
|
212
|
-
|
|
213
|
-
- Settings that apply immediately
|
|
214
|
-
- Feature toggles
|
|
215
|
-
- On/off states (prefer over Checkbox when toggle metaphor fits)
|
|
216
|
-
|
|
217
|
-
### Props
|
|
218
|
-
|
|
219
|
-
| Prop | Type | Default | Description |
|
|
220
|
-
|------|------|---------|-------------|
|
|
221
|
-
| checked | `boolean` | - | Controlled state |
|
|
222
|
-
| defaultChecked | `boolean` | `false` | Initial state |
|
|
223
|
-
| onCheckedChange | `(checked: boolean) => void` | - | Change callback |
|
|
224
|
-
| disabled | `boolean` | `false` | Disable interaction |
|
|
225
|
-
| name | `string` | - | Form field name |
|
|
226
|
-
|
|
227
|
-
### Examples
|
|
228
|
-
|
|
229
|
-
```tsx
|
|
230
|
-
// Basic toggle
|
|
231
|
-
<Switch onCheckedChange={setEnabled} />
|
|
232
|
-
|
|
233
|
-
// Controlled
|
|
234
|
-
<Switch checked={darkMode} onCheckedChange={setDarkMode} />
|
|
235
|
-
|
|
236
|
-
// With external label
|
|
237
|
-
<label>
|
|
238
|
-
Enable notifications
|
|
239
|
-
<Switch checked={notify} onCheckedChange={setNotify} />
|
|
240
|
-
</label>
|
|
241
|
-
```
|
|
242
|
-
|
|
243
|
-
---
|
|
244
|
-
|
|
245
|
-
## Modal
|
|
246
|
-
|
|
247
|
-
Dialog overlay for focused interactions.
|
|
248
|
-
|
|
249
|
-
### When to Use
|
|
250
|
-
|
|
251
|
-
- Confirmations requiring user attention
|
|
252
|
-
- Forms that need focused context
|
|
253
|
-
- Detail views without navigation
|
|
254
|
-
|
|
255
|
-
### Props
|
|
256
|
-
|
|
257
|
-
| Prop | Type | Default | Description |
|
|
258
|
-
|------|------|---------|-------------|
|
|
259
|
-
| isOpen | `boolean` | - | **Required.** Show/hide modal |
|
|
260
|
-
| onClose | `() => void` | - | **Required.** Close callback |
|
|
261
|
-
| title | `string` | - | **Required.** Modal title |
|
|
262
|
-
| children | `ReactNode` | - | Modal body |
|
|
263
|
-
| footer | `ReactNode` | - | Footer actions |
|
|
264
|
-
|
|
265
|
-
### Examples
|
|
266
|
-
|
|
267
|
-
```tsx
|
|
268
|
-
// Confirmation dialog
|
|
269
|
-
<Modal
|
|
270
|
-
isOpen={showConfirm}
|
|
271
|
-
onClose={() => setShowConfirm(false)}
|
|
272
|
-
title="Delete File?"
|
|
273
|
-
footer={
|
|
274
|
-
<>
|
|
275
|
-
<Button variant="ghost" onClick={() => setShowConfirm(false)}>
|
|
276
|
-
Cancel
|
|
277
|
-
</Button>
|
|
278
|
-
<Button variant="primary" onClick={handleDelete}>
|
|
279
|
-
Delete
|
|
280
|
-
</Button>
|
|
281
|
-
</>
|
|
282
|
-
}
|
|
283
|
-
>
|
|
284
|
-
<p>This action cannot be undone.</p>
|
|
285
|
-
</Modal>
|
|
286
|
-
|
|
287
|
-
// Form modal
|
|
288
|
-
<Modal isOpen={showForm} onClose={closeForm} title="New File">
|
|
289
|
-
<Input placeholder="Filename" />
|
|
290
|
-
</Modal>
|
|
291
|
-
```
|
|
292
|
-
|
|
293
|
-
---
|
|
294
|
-
|
|
295
|
-
## Tabs
|
|
296
|
-
|
|
297
|
-
Tab-based navigation for switching views.
|
|
298
|
-
|
|
299
|
-
### When to Use
|
|
300
|
-
|
|
301
|
-
- Content organized into distinct sections
|
|
302
|
-
- Settings with multiple categories
|
|
303
|
-
- Dashboard views
|
|
304
|
-
|
|
305
|
-
### Props
|
|
306
|
-
|
|
307
|
-
| Prop | Type | Default | Description |
|
|
308
|
-
|------|------|---------|-------------|
|
|
309
|
-
| tabs | `TabItem[]` | - | **Required.** Array of `{ id, label, disabled? }` |
|
|
310
|
-
| variant | `'underline' \| 'pills'` | `'underline'` | Tab style |
|
|
311
|
-
| size | `'small' \| 'medium' \| 'large'` | `'medium'` | Tab size |
|
|
312
|
-
| activeTab | `string` | - | Controlled active tab ID |
|
|
313
|
-
| defaultActiveTab | `string` | - | Initial active tab |
|
|
314
|
-
| onTabChange | `(tabId: string) => void` | - | Tab change callback |
|
|
315
|
-
|
|
316
|
-
### Examples
|
|
317
|
-
|
|
318
|
-
```tsx
|
|
319
|
-
// Basic tabs
|
|
320
|
-
<Tabs
|
|
321
|
-
tabs={[
|
|
322
|
-
{ id: 'files', label: 'Files' },
|
|
323
|
-
{ id: 'settings', label: 'Settings' },
|
|
324
|
-
]}
|
|
325
|
-
onTabChange={setActiveTab}
|
|
326
|
-
/>
|
|
327
|
-
|
|
328
|
-
// Pills variant
|
|
329
|
-
<Tabs
|
|
330
|
-
variant="pills"
|
|
331
|
-
tabs={[
|
|
332
|
-
{ id: 'all', label: 'All' },
|
|
333
|
-
{ id: 'active', label: 'Active' },
|
|
334
|
-
{ id: 'archived', label: 'Archived', disabled: true },
|
|
335
|
-
]}
|
|
336
|
-
/>
|
|
337
|
-
```
|
|
338
|
-
|
|
339
|
-
---
|
|
340
|
-
|
|
341
|
-
## Badge
|
|
342
|
-
|
|
343
|
-
Status indicators, labels, and tags.
|
|
344
|
-
|
|
345
|
-
### When to Use
|
|
346
|
-
|
|
347
|
-
- Status indicators (online, offline, pending)
|
|
348
|
-
- Labels for categorization
|
|
349
|
-
- Notification counts
|
|
350
|
-
|
|
351
|
-
### Props
|
|
352
|
-
|
|
353
|
-
| Prop | Type | Default | Description |
|
|
354
|
-
|------|------|---------|-------------|
|
|
355
|
-
| variant | `'default' \| 'success' \| 'warning' \| 'error' \| 'info' \| 'accent'` | `'default'` | Color scheme |
|
|
356
|
-
| size | `'small' \| 'medium'` | `'medium'` | Badge size |
|
|
357
|
-
| dot | `boolean` | `false` | Show dot indicator |
|
|
358
|
-
| children | `ReactNode` | - | Badge content |
|
|
359
|
-
|
|
360
|
-
### Examples
|
|
361
|
-
|
|
362
|
-
```tsx
|
|
363
|
-
// Status badge
|
|
364
|
-
<Badge variant="success" dot>Online</Badge>
|
|
365
|
-
|
|
366
|
-
// Label
|
|
367
|
-
<Badge variant="info">New</Badge>
|
|
368
|
-
|
|
369
|
-
// Small notification count
|
|
370
|
-
<Badge size="small" variant="error">3</Badge>
|
|
371
|
-
```
|
|
372
|
-
|
|
373
|
-
---
|
|
374
|
-
|
|
375
|
-
## Progress
|
|
376
|
-
|
|
377
|
-
Visual indicator for completion or loading.
|
|
378
|
-
|
|
379
|
-
### When to Use
|
|
380
|
-
|
|
381
|
-
- File upload progress
|
|
382
|
-
- Task completion
|
|
383
|
-
- Loading states
|
|
384
|
-
|
|
385
|
-
### Props
|
|
386
|
-
|
|
387
|
-
| Prop | Type | Default | Description |
|
|
388
|
-
|------|------|---------|-------------|
|
|
389
|
-
| value | `number` | - | **Required.** Current value (0-100) |
|
|
390
|
-
| max | `number` | `100` | Maximum value |
|
|
391
|
-
| variant | `'default' \| 'success' \| 'warning' \| 'error'` | `'default'` | Color scheme |
|
|
392
|
-
| size | `'small' \| 'medium' \| 'large'` | `'medium'` | Bar height |
|
|
393
|
-
| showLabel | `boolean` | `false` | Show percentage text |
|
|
394
|
-
|
|
395
|
-
### Examples
|
|
396
|
-
|
|
397
|
-
```tsx
|
|
398
|
-
// Basic progress
|
|
399
|
-
<Progress value={65} />
|
|
400
|
-
|
|
401
|
-
// With label
|
|
402
|
-
<Progress value={80} showLabel />
|
|
403
|
-
|
|
404
|
-
// Success variant when complete
|
|
405
|
-
<Progress value={100} variant="success" showLabel />
|
|
406
|
-
```
|
|
407
|
-
|
|
408
|
-
---
|
|
409
|
-
|
|
410
|
-
##
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
### When to Use
|
|
415
|
-
|
|
416
|
-
-
|
|
417
|
-
-
|
|
418
|
-
-
|
|
419
|
-
|
|
420
|
-
### Props
|
|
421
|
-
|
|
422
|
-
| Prop | Type | Default | Description |
|
|
423
|
-
|------|------|---------|-------------|
|
|
424
|
-
|
|
|
425
|
-
|
|
|
426
|
-
|
|
|
427
|
-
|
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
|
515
|
-
|
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
|
557
|
-
|
|
558
|
-
|
|
|
559
|
-
|
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
|
594
|
-
|
|
595
|
-
|
|
|
596
|
-
|
|
|
597
|
-
|
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
###
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
```
|
|
656
|
-
|
|
657
|
-
---
|
|
658
|
-
|
|
659
|
-
##
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
### When to Use
|
|
664
|
-
|
|
665
|
-
-
|
|
666
|
-
-
|
|
667
|
-
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
|
675
|
-
|
|
|
676
|
-
|
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
|
716
|
-
|
|
717
|
-
|
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
//
|
|
737
|
-
|
|
738
|
-
<
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
|
755
|
-
|
|
756
|
-
|
|
|
757
|
-
|
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
1
|
+
# Component Guide
|
|
2
|
+
|
|
3
|
+
Detailed usage guide for each eidotter component.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Button
|
|
8
|
+
|
|
9
|
+
User action trigger with multiple visual styles.
|
|
10
|
+
|
|
11
|
+
### When to Use
|
|
12
|
+
|
|
13
|
+
- **primary**: Main call-to-action (submit, save, confirm)
|
|
14
|
+
- **secondary**: Alternative actions alongside primary
|
|
15
|
+
- **ghost**: Low-emphasis actions (cancel, dismiss)
|
|
16
|
+
- **link**: Inline text actions that navigate
|
|
17
|
+
|
|
18
|
+
### Props
|
|
19
|
+
|
|
20
|
+
| Prop | Type | Default | Description |
|
|
21
|
+
|------|------|---------|-------------|
|
|
22
|
+
| variant | `'primary' \| 'secondary' \| 'ghost' \| 'link'` | `'primary'` | Visual style |
|
|
23
|
+
| size | `'small' \| 'medium' \| 'large'` | `'medium'` | Button size |
|
|
24
|
+
| disabled | `boolean` | `false` | Disable interaction |
|
|
25
|
+
| loading | `boolean` | `false` | Show loading indicator |
|
|
26
|
+
| fullWidth | `boolean` | `false` | Stretch to container width |
|
|
27
|
+
| type | `'button' \| 'submit' \| 'reset'` | `'button'` | HTML button type |
|
|
28
|
+
|
|
29
|
+
### Examples
|
|
30
|
+
|
|
31
|
+
```tsx
|
|
32
|
+
// Primary action
|
|
33
|
+
<Button variant="primary">Save Changes</Button>
|
|
34
|
+
|
|
35
|
+
// Form submission
|
|
36
|
+
<Button type="submit" loading={isSubmitting}>Submit</Button>
|
|
37
|
+
|
|
38
|
+
// Cancel action
|
|
39
|
+
<Button variant="ghost" onClick={onCancel}>Cancel</Button>
|
|
40
|
+
|
|
41
|
+
// Full-width button
|
|
42
|
+
<Button fullWidth variant="primary">Continue</Button>
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## Alert
|
|
48
|
+
|
|
49
|
+
Dismissible notification messages with contextual styling.
|
|
50
|
+
|
|
51
|
+
### When to Use
|
|
52
|
+
|
|
53
|
+
- **info**: General information or tips
|
|
54
|
+
- **success**: Successful operations
|
|
55
|
+
- **warning**: Cautionary messages
|
|
56
|
+
- **error**: Error states requiring attention
|
|
57
|
+
|
|
58
|
+
### Props
|
|
59
|
+
|
|
60
|
+
| Prop | Type | Default | Description |
|
|
61
|
+
|------|------|---------|-------------|
|
|
62
|
+
| type | `'info' \| 'success' \| 'warning' \| 'error'` | `'info'` | Alert style |
|
|
63
|
+
| size | `'small' \| 'large'` | `'large'` | Alert size |
|
|
64
|
+
| title | `string` | `'Notification Title'` | Header text |
|
|
65
|
+
| children | `ReactNode` | - | Message content |
|
|
66
|
+
| onClose | `() => void` | - | Show close button when provided |
|
|
67
|
+
| onClickHere | `() => void` | - | Show "Click here" link when provided |
|
|
68
|
+
|
|
69
|
+
### Examples
|
|
70
|
+
|
|
71
|
+
```tsx
|
|
72
|
+
// Success message
|
|
73
|
+
<Alert type="success" title="Saved">
|
|
74
|
+
Your changes have been saved successfully.
|
|
75
|
+
</Alert>
|
|
76
|
+
|
|
77
|
+
// Dismissible warning
|
|
78
|
+
<Alert type="warning" title="Low Storage" onClose={() => setShow(false)}>
|
|
79
|
+
You have less than 10% storage remaining.
|
|
80
|
+
</Alert>
|
|
81
|
+
|
|
82
|
+
// Error with action
|
|
83
|
+
<Alert type="error" title="Connection Lost" onClickHere={handleRetry}>
|
|
84
|
+
Unable to connect to the server.
|
|
85
|
+
</Alert>
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
## Card
|
|
91
|
+
|
|
92
|
+
Content container with optional header and footer.
|
|
93
|
+
|
|
94
|
+
### When to Use
|
|
95
|
+
|
|
96
|
+
- Group related content visually
|
|
97
|
+
- Create distinct content sections
|
|
98
|
+
- Display item summaries in grids
|
|
99
|
+
|
|
100
|
+
### Props
|
|
101
|
+
|
|
102
|
+
| Prop | Type | Default | Description |
|
|
103
|
+
|------|------|---------|-------------|
|
|
104
|
+
| title | `string` | - | Optional header title |
|
|
105
|
+
| children | `ReactNode` | - | Card body content |
|
|
106
|
+
| footer | `ReactNode` | - | Optional footer content |
|
|
107
|
+
| variant | `'default' \| 'elevated' \| 'bordered' \| 'glow'` | `'default'` | Visual style |
|
|
108
|
+
|
|
109
|
+
### Examples
|
|
110
|
+
|
|
111
|
+
```tsx
|
|
112
|
+
// Simple card
|
|
113
|
+
<Card title="User Profile">
|
|
114
|
+
<p>Welcome back, Commander.</p>
|
|
115
|
+
</Card>
|
|
116
|
+
|
|
117
|
+
// Card with footer actions
|
|
118
|
+
<Card
|
|
119
|
+
title="Settings"
|
|
120
|
+
footer={
|
|
121
|
+
<Button variant="primary">Save</Button>
|
|
122
|
+
}
|
|
123
|
+
>
|
|
124
|
+
<label className="block text-dos-text-primary mb-1">Username</label>
|
|
125
|
+
<Input placeholder="Enter username..." />
|
|
126
|
+
</Card>
|
|
127
|
+
|
|
128
|
+
// Glow variant for emphasis
|
|
129
|
+
<Card variant="glow" title="Featured">
|
|
130
|
+
Highlighted content here.
|
|
131
|
+
</Card>
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
## Input
|
|
137
|
+
|
|
138
|
+
Text entry field with validation state.
|
|
139
|
+
|
|
140
|
+
### When to Use
|
|
141
|
+
|
|
142
|
+
- Text input in forms
|
|
143
|
+
- Search fields
|
|
144
|
+
- Any single-line text entry
|
|
145
|
+
|
|
146
|
+
### Props
|
|
147
|
+
|
|
148
|
+
| Prop | Type | Default | Description |
|
|
149
|
+
|------|------|---------|-------------|
|
|
150
|
+
| variant | `'default' \| 'error'` | `'default'` | Visual state |
|
|
151
|
+
| disabled | `boolean` | `false` | Disable input |
|
|
152
|
+
| ...rest | `InputHTMLAttributes` | - | All standard input props |
|
|
153
|
+
|
|
154
|
+
### Examples
|
|
155
|
+
|
|
156
|
+
```tsx
|
|
157
|
+
// Basic input
|
|
158
|
+
<Input placeholder="Enter filename..." />
|
|
159
|
+
|
|
160
|
+
// With error state
|
|
161
|
+
<Input variant="error" value={email} placeholder="Email" />
|
|
162
|
+
|
|
163
|
+
// Disabled input
|
|
164
|
+
<Input disabled value="Read-only value" />
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
## Checkbox
|
|
170
|
+
|
|
171
|
+
Boolean toggle with optional label.
|
|
172
|
+
|
|
173
|
+
### When to Use
|
|
174
|
+
|
|
175
|
+
- Toggle settings on/off
|
|
176
|
+
- Multi-select options
|
|
177
|
+
- Agreement/consent checkboxes
|
|
178
|
+
|
|
179
|
+
### Props
|
|
180
|
+
|
|
181
|
+
| Prop | Type | Default | Description |
|
|
182
|
+
|------|------|---------|-------------|
|
|
183
|
+
| checked | `boolean` | - | Controlled checked state |
|
|
184
|
+
| defaultChecked | `boolean` | - | Initial state (uncontrolled) |
|
|
185
|
+
| onChange | `(checked: boolean) => void` | - | Change callback |
|
|
186
|
+
| label | `string` | - | Label text |
|
|
187
|
+
| disabled | `boolean` | `false` | Disable interaction |
|
|
188
|
+
| name | `string` | - | Form field name |
|
|
189
|
+
|
|
190
|
+
### Examples
|
|
191
|
+
|
|
192
|
+
```tsx
|
|
193
|
+
// With label
|
|
194
|
+
<Checkbox label="Remember me" onChange={setRemember} />
|
|
195
|
+
|
|
196
|
+
// Controlled
|
|
197
|
+
<Checkbox checked={agreed} onChange={setAgreed} label="I agree to terms" />
|
|
198
|
+
|
|
199
|
+
// In a list
|
|
200
|
+
{options.map(opt => (
|
|
201
|
+
<Checkbox key={opt.id} label={opt.name} />
|
|
202
|
+
))}
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
---
|
|
206
|
+
|
|
207
|
+
## Switch
|
|
208
|
+
|
|
209
|
+
Toggle control for binary settings.
|
|
210
|
+
|
|
211
|
+
### When to Use
|
|
212
|
+
|
|
213
|
+
- Settings that apply immediately
|
|
214
|
+
- Feature toggles
|
|
215
|
+
- On/off states (prefer over Checkbox when toggle metaphor fits)
|
|
216
|
+
|
|
217
|
+
### Props
|
|
218
|
+
|
|
219
|
+
| Prop | Type | Default | Description |
|
|
220
|
+
|------|------|---------|-------------|
|
|
221
|
+
| checked | `boolean` | - | Controlled state |
|
|
222
|
+
| defaultChecked | `boolean` | `false` | Initial state |
|
|
223
|
+
| onCheckedChange | `(checked: boolean) => void` | - | Change callback |
|
|
224
|
+
| disabled | `boolean` | `false` | Disable interaction |
|
|
225
|
+
| name | `string` | - | Form field name |
|
|
226
|
+
|
|
227
|
+
### Examples
|
|
228
|
+
|
|
229
|
+
```tsx
|
|
230
|
+
// Basic toggle
|
|
231
|
+
<Switch onCheckedChange={setEnabled} />
|
|
232
|
+
|
|
233
|
+
// Controlled
|
|
234
|
+
<Switch checked={darkMode} onCheckedChange={setDarkMode} />
|
|
235
|
+
|
|
236
|
+
// With external label
|
|
237
|
+
<label>
|
|
238
|
+
Enable notifications
|
|
239
|
+
<Switch checked={notify} onCheckedChange={setNotify} />
|
|
240
|
+
</label>
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
---
|
|
244
|
+
|
|
245
|
+
## Modal
|
|
246
|
+
|
|
247
|
+
Dialog overlay for focused interactions.
|
|
248
|
+
|
|
249
|
+
### When to Use
|
|
250
|
+
|
|
251
|
+
- Confirmations requiring user attention
|
|
252
|
+
- Forms that need focused context
|
|
253
|
+
- Detail views without navigation
|
|
254
|
+
|
|
255
|
+
### Props
|
|
256
|
+
|
|
257
|
+
| Prop | Type | Default | Description |
|
|
258
|
+
|------|------|---------|-------------|
|
|
259
|
+
| isOpen | `boolean` | - | **Required.** Show/hide modal |
|
|
260
|
+
| onClose | `() => void` | - | **Required.** Close callback |
|
|
261
|
+
| title | `string` | - | **Required.** Modal title |
|
|
262
|
+
| children | `ReactNode` | - | Modal body |
|
|
263
|
+
| footer | `ReactNode` | - | Footer actions |
|
|
264
|
+
|
|
265
|
+
### Examples
|
|
266
|
+
|
|
267
|
+
```tsx
|
|
268
|
+
// Confirmation dialog
|
|
269
|
+
<Modal
|
|
270
|
+
isOpen={showConfirm}
|
|
271
|
+
onClose={() => setShowConfirm(false)}
|
|
272
|
+
title="Delete File?"
|
|
273
|
+
footer={
|
|
274
|
+
<>
|
|
275
|
+
<Button variant="ghost" onClick={() => setShowConfirm(false)}>
|
|
276
|
+
Cancel
|
|
277
|
+
</Button>
|
|
278
|
+
<Button variant="primary" onClick={handleDelete}>
|
|
279
|
+
Delete
|
|
280
|
+
</Button>
|
|
281
|
+
</>
|
|
282
|
+
}
|
|
283
|
+
>
|
|
284
|
+
<p>This action cannot be undone.</p>
|
|
285
|
+
</Modal>
|
|
286
|
+
|
|
287
|
+
// Form modal
|
|
288
|
+
<Modal isOpen={showForm} onClose={closeForm} title="New File">
|
|
289
|
+
<Input placeholder="Filename" />
|
|
290
|
+
</Modal>
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
---
|
|
294
|
+
|
|
295
|
+
## Tabs
|
|
296
|
+
|
|
297
|
+
Tab-based navigation for switching views.
|
|
298
|
+
|
|
299
|
+
### When to Use
|
|
300
|
+
|
|
301
|
+
- Content organized into distinct sections
|
|
302
|
+
- Settings with multiple categories
|
|
303
|
+
- Dashboard views
|
|
304
|
+
|
|
305
|
+
### Props
|
|
306
|
+
|
|
307
|
+
| Prop | Type | Default | Description |
|
|
308
|
+
|------|------|---------|-------------|
|
|
309
|
+
| tabs | `TabItem[]` | - | **Required.** Array of `{ id, label, disabled? }` |
|
|
310
|
+
| variant | `'underline' \| 'pills'` | `'underline'` | Tab style |
|
|
311
|
+
| size | `'small' \| 'medium' \| 'large'` | `'medium'` | Tab size |
|
|
312
|
+
| activeTab | `string` | - | Controlled active tab ID |
|
|
313
|
+
| defaultActiveTab | `string` | - | Initial active tab |
|
|
314
|
+
| onTabChange | `(tabId: string) => void` | - | Tab change callback |
|
|
315
|
+
|
|
316
|
+
### Examples
|
|
317
|
+
|
|
318
|
+
```tsx
|
|
319
|
+
// Basic tabs
|
|
320
|
+
<Tabs
|
|
321
|
+
tabs={[
|
|
322
|
+
{ id: 'files', label: 'Files' },
|
|
323
|
+
{ id: 'settings', label: 'Settings' },
|
|
324
|
+
]}
|
|
325
|
+
onTabChange={setActiveTab}
|
|
326
|
+
/>
|
|
327
|
+
|
|
328
|
+
// Pills variant
|
|
329
|
+
<Tabs
|
|
330
|
+
variant="pills"
|
|
331
|
+
tabs={[
|
|
332
|
+
{ id: 'all', label: 'All' },
|
|
333
|
+
{ id: 'active', label: 'Active' },
|
|
334
|
+
{ id: 'archived', label: 'Archived', disabled: true },
|
|
335
|
+
]}
|
|
336
|
+
/>
|
|
337
|
+
```
|
|
338
|
+
|
|
339
|
+
---
|
|
340
|
+
|
|
341
|
+
## Badge
|
|
342
|
+
|
|
343
|
+
Status indicators, labels, and tags.
|
|
344
|
+
|
|
345
|
+
### When to Use
|
|
346
|
+
|
|
347
|
+
- Status indicators (online, offline, pending)
|
|
348
|
+
- Labels for categorization
|
|
349
|
+
- Notification counts
|
|
350
|
+
|
|
351
|
+
### Props
|
|
352
|
+
|
|
353
|
+
| Prop | Type | Default | Description |
|
|
354
|
+
|------|------|---------|-------------|
|
|
355
|
+
| variant | `'default' \| 'success' \| 'warning' \| 'error' \| 'info' \| 'accent'` | `'default'` | Color scheme |
|
|
356
|
+
| size | `'small' \| 'medium'` | `'medium'` | Badge size |
|
|
357
|
+
| dot | `boolean` | `false` | Show dot indicator |
|
|
358
|
+
| children | `ReactNode` | - | Badge content |
|
|
359
|
+
|
|
360
|
+
### Examples
|
|
361
|
+
|
|
362
|
+
```tsx
|
|
363
|
+
// Status badge
|
|
364
|
+
<Badge variant="success" dot>Online</Badge>
|
|
365
|
+
|
|
366
|
+
// Label
|
|
367
|
+
<Badge variant="info">New</Badge>
|
|
368
|
+
|
|
369
|
+
// Small notification count
|
|
370
|
+
<Badge size="small" variant="error">3</Badge>
|
|
371
|
+
```
|
|
372
|
+
|
|
373
|
+
---
|
|
374
|
+
|
|
375
|
+
## Progress
|
|
376
|
+
|
|
377
|
+
Visual indicator for completion or loading.
|
|
378
|
+
|
|
379
|
+
### When to Use
|
|
380
|
+
|
|
381
|
+
- File upload progress
|
|
382
|
+
- Task completion
|
|
383
|
+
- Loading states
|
|
384
|
+
|
|
385
|
+
### Props
|
|
386
|
+
|
|
387
|
+
| Prop | Type | Default | Description |
|
|
388
|
+
|------|------|---------|-------------|
|
|
389
|
+
| value | `number` | - | **Required.** Current value (0-100) |
|
|
390
|
+
| max | `number` | `100` | Maximum value |
|
|
391
|
+
| variant | `'default' \| 'success' \| 'warning' \| 'error'` | `'default'` | Color scheme |
|
|
392
|
+
| size | `'small' \| 'medium' \| 'large'` | `'medium'` | Bar height |
|
|
393
|
+
| showLabel | `boolean` | `false` | Show percentage text |
|
|
394
|
+
|
|
395
|
+
### Examples
|
|
396
|
+
|
|
397
|
+
```tsx
|
|
398
|
+
// Basic progress
|
|
399
|
+
<Progress value={65} />
|
|
400
|
+
|
|
401
|
+
// With label
|
|
402
|
+
<Progress value={80} showLabel />
|
|
403
|
+
|
|
404
|
+
// Success variant when complete
|
|
405
|
+
<Progress value={100} variant="success" showLabel />
|
|
406
|
+
```
|
|
407
|
+
|
|
408
|
+
---
|
|
409
|
+
|
|
410
|
+
## Skeleton
|
|
411
|
+
|
|
412
|
+
DOS/CGA loading placeholder — shade-character rows (░ ▒ ▓) with a CRT hum-bar glow band rolling top→bottom.
|
|
413
|
+
|
|
414
|
+
### When to Use
|
|
415
|
+
|
|
416
|
+
- Content placeholder while data loads (use `Progress` when completion is measurable)
|
|
417
|
+
- Pending timeline entries, cards, or media blocks
|
|
418
|
+
- Anywhere a modern app would show a gray shimmer skeleton
|
|
419
|
+
|
|
420
|
+
### Props
|
|
421
|
+
|
|
422
|
+
| Prop | Type | Default | Description |
|
|
423
|
+
|------|------|---------|-------------|
|
|
424
|
+
| variant | `'text' \| 'card' \| 'figure' \| 'timeline'` | `'text'` | Placeholder shape |
|
|
425
|
+
| lines | `number` | per variant | Line/row count (text 3, card 3, figure 4, timeline 2) |
|
|
426
|
+
| animated | `boolean` | `true` | Raster band; gentle opacity breathing under `prefers-reduced-motion` |
|
|
427
|
+
| label | `string` | `'Loading'` | Screen-reader announcement (`role="status"`) |
|
|
428
|
+
|
|
429
|
+
### Examples
|
|
430
|
+
|
|
431
|
+
```tsx
|
|
432
|
+
// Pending paragraph
|
|
433
|
+
<Skeleton lines={4} />
|
|
434
|
+
|
|
435
|
+
// Pending card with heading line
|
|
436
|
+
<Skeleton variant="card" />
|
|
437
|
+
|
|
438
|
+
// Pending media block (pairs with DosFigure)
|
|
439
|
+
<Skeleton variant="figure" lines={6} />
|
|
440
|
+
|
|
441
|
+
// Pending timeline entry
|
|
442
|
+
<Skeleton variant="timeline" label="Loading entries" />
|
|
443
|
+
```
|
|
444
|
+
|
|
445
|
+
---
|
|
446
|
+
|
|
447
|
+
## Breadcrumb
|
|
448
|
+
|
|
449
|
+
Navigation path showing location hierarchy.
|
|
450
|
+
|
|
451
|
+
### When to Use
|
|
452
|
+
|
|
453
|
+
- Multi-level navigation
|
|
454
|
+
- File system paths
|
|
455
|
+
- Showing current location in hierarchy
|
|
456
|
+
|
|
457
|
+
### Props
|
|
458
|
+
|
|
459
|
+
| Prop | Type | Default | Description |
|
|
460
|
+
|------|------|---------|-------------|
|
|
461
|
+
| trail | `BreadcrumbItem[]` | `[]` | Array of `{ href, label }` |
|
|
462
|
+
| currentLabel | `string` | - | **Required.** Current page label |
|
|
463
|
+
| showBackArrow | `boolean` | `true` | Show < on last trail item |
|
|
464
|
+
| separator | `string` | `'/'` | Custom separator |
|
|
465
|
+
| linkComponent | `Component` | - | Custom link (e.g., Next.js Link) |
|
|
466
|
+
|
|
467
|
+
### Examples
|
|
468
|
+
|
|
469
|
+
```tsx
|
|
470
|
+
// Basic breadcrumb
|
|
471
|
+
<Breadcrumb
|
|
472
|
+
trail={[
|
|
473
|
+
{ href: '/', label: 'Home' },
|
|
474
|
+
{ href: '/files', label: 'Files' },
|
|
475
|
+
]}
|
|
476
|
+
currentLabel="document.txt"
|
|
477
|
+
/>
|
|
478
|
+
|
|
479
|
+
// With Next.js Link
|
|
480
|
+
import Link from 'next/link';
|
|
481
|
+
|
|
482
|
+
<Breadcrumb
|
|
483
|
+
linkComponent={Link}
|
|
484
|
+
trail={[{ href: '/', label: 'Dashboard' }]}
|
|
485
|
+
currentLabel="Settings"
|
|
486
|
+
/>
|
|
487
|
+
```
|
|
488
|
+
|
|
489
|
+
---
|
|
490
|
+
|
|
491
|
+
## Section / AccordionFill
|
|
492
|
+
|
|
493
|
+
Collapsible content sections.
|
|
494
|
+
|
|
495
|
+
### When to Use
|
|
496
|
+
|
|
497
|
+
- FAQ sections
|
|
498
|
+
- Settings groups
|
|
499
|
+
- Long content that can be collapsed
|
|
500
|
+
|
|
501
|
+
### Section Props
|
|
502
|
+
|
|
503
|
+
| Prop | Type | Default | Description |
|
|
504
|
+
|------|------|---------|-------------|
|
|
505
|
+
| title | `string` | - | **Required.** Section header |
|
|
506
|
+
| children | `ReactNode` | - | **Required.** Collapsible content |
|
|
507
|
+
| defaultExpanded | `boolean` | `false` | Start expanded |
|
|
508
|
+
| onToggle | `(isExpanded: boolean) => void` | - | Toggle callback |
|
|
509
|
+
|
|
510
|
+
### AccordionFill Props
|
|
511
|
+
|
|
512
|
+
| Prop | Type | Default | Description |
|
|
513
|
+
|------|------|---------|-------------|
|
|
514
|
+
| sections | `{ title, content }[]` | - | **Required.** Section data |
|
|
515
|
+
| defaultExpandedIndex | `number` | `-1` | Initially expanded section |
|
|
516
|
+
|
|
517
|
+
### Examples
|
|
518
|
+
|
|
519
|
+
```tsx
|
|
520
|
+
// Single collapsible section
|
|
521
|
+
<Section title="Advanced Options">
|
|
522
|
+
<Input placeholder="Custom setting" />
|
|
523
|
+
</Section>
|
|
524
|
+
|
|
525
|
+
// Accordion group (one open at a time)
|
|
526
|
+
<AccordionFill
|
|
527
|
+
sections={[
|
|
528
|
+
{ title: 'General', content: 'General settings...' },
|
|
529
|
+
{ title: 'Security', content: 'Security options...' },
|
|
530
|
+
]}
|
|
531
|
+
/>
|
|
532
|
+
```
|
|
533
|
+
|
|
534
|
+
---
|
|
535
|
+
|
|
536
|
+
## Terminal
|
|
537
|
+
|
|
538
|
+
DOS-style window container with title bar.
|
|
539
|
+
|
|
540
|
+
### When to Use
|
|
541
|
+
|
|
542
|
+
- Wrap application content in DOS window aesthetic
|
|
543
|
+
- Command output display
|
|
544
|
+
- Standalone terminal window effects
|
|
545
|
+
|
|
546
|
+
### Props
|
|
547
|
+
|
|
548
|
+
| Prop | Type | Default | Description |
|
|
549
|
+
|------|------|---------|-------------|
|
|
550
|
+
| title | `string` | `'MS-DOS Terminal'` | Window title |
|
|
551
|
+
| size | `'small' \| 'medium' \| 'large'` | `'medium'` | Window size |
|
|
552
|
+
| state | `'active' \| 'inactive' \| 'minimized'` | `'active'` | Window state |
|
|
553
|
+
| minimizable | `boolean` | `true` | Show minimize button |
|
|
554
|
+
| maximizable | `boolean` | `true` | Show maximize button |
|
|
555
|
+
| closeable | `boolean` | `true` | Show close button |
|
|
556
|
+
| children | `ReactNode` | - | Window content |
|
|
557
|
+
| onMinimize | `() => void` | - | Minimize callback |
|
|
558
|
+
| onMaximize | `() => void` | - | Maximize callback |
|
|
559
|
+
| onClose | `() => void` | - | Close callback |
|
|
560
|
+
|
|
561
|
+
### Examples
|
|
562
|
+
|
|
563
|
+
```tsx
|
|
564
|
+
// Basic terminal
|
|
565
|
+
<Terminal title="C:\WINDOWS\system32">
|
|
566
|
+
<p>Directory listing...</p>
|
|
567
|
+
</Terminal>
|
|
568
|
+
|
|
569
|
+
// Non-closeable terminal
|
|
570
|
+
<Terminal
|
|
571
|
+
title="Output"
|
|
572
|
+
closeable={false}
|
|
573
|
+
minimizable={false}
|
|
574
|
+
>
|
|
575
|
+
<pre>{output}</pre>
|
|
576
|
+
</Terminal>
|
|
577
|
+
```
|
|
578
|
+
|
|
579
|
+
---
|
|
580
|
+
|
|
581
|
+
## Stat
|
|
582
|
+
|
|
583
|
+
Metric display with optional trend indicator.
|
|
584
|
+
|
|
585
|
+
### When to Use
|
|
586
|
+
|
|
587
|
+
- Dashboard metrics
|
|
588
|
+
- KPI displays
|
|
589
|
+
- Numeric summaries
|
|
590
|
+
|
|
591
|
+
### Props
|
|
592
|
+
|
|
593
|
+
| Prop | Type | Default | Description |
|
|
594
|
+
|------|------|---------|-------------|
|
|
595
|
+
| label | `string` | - | **Required.** Metric label |
|
|
596
|
+
| value | `string \| number` | - | **Required.** Metric value |
|
|
597
|
+
| trend | `'up' \| 'down' \| 'neutral'` | - | Trend direction |
|
|
598
|
+
| trendValue | `string` | - | Trend change (e.g., "+5%") |
|
|
599
|
+
| size | `'small' \| 'medium' \| 'large'` | `'medium'` | Stat size |
|
|
600
|
+
|
|
601
|
+
### Examples
|
|
602
|
+
|
|
603
|
+
```tsx
|
|
604
|
+
// Basic stat
|
|
605
|
+
<Stat label="Files" value={42} />
|
|
606
|
+
|
|
607
|
+
// With trend
|
|
608
|
+
<Stat label="Downloads" value="1,234" trend="up" trendValue="+12%" />
|
|
609
|
+
|
|
610
|
+
// Down trend
|
|
611
|
+
<Stat label="Errors" value={3} trend="down" trendValue="-2" />
|
|
612
|
+
```
|
|
613
|
+
|
|
614
|
+
---
|
|
615
|
+
|
|
616
|
+
## CommandPrompt
|
|
617
|
+
|
|
618
|
+
DOS-style command line input with blinking cursor.
|
|
619
|
+
|
|
620
|
+
### When to Use
|
|
621
|
+
|
|
622
|
+
- Interactive command entry interfaces
|
|
623
|
+
- Terminal emulation
|
|
624
|
+
- Chat or REPL-style inputs
|
|
625
|
+
|
|
626
|
+
### Props
|
|
627
|
+
|
|
628
|
+
| Prop | Type | Default | Description |
|
|
629
|
+
|------|------|---------|-------------|
|
|
630
|
+
| prompt | `string` | `'C:\\>'` | Prompt text before cursor |
|
|
631
|
+
| onCommand | `(command: string) => void` | - | **Required.** Called when Enter pressed |
|
|
632
|
+
| autoFocus | `boolean` | `false` | Focus input on mount |
|
|
633
|
+
| placeholder | `string` | - | Placeholder text |
|
|
634
|
+
| disabled | `boolean` | `false` | Disable input |
|
|
635
|
+
|
|
636
|
+
### Examples
|
|
637
|
+
|
|
638
|
+
```tsx
|
|
639
|
+
// Basic command prompt
|
|
640
|
+
<CommandPrompt onCommand={(cmd) => console.log(cmd)} />
|
|
641
|
+
|
|
642
|
+
// Custom prompt
|
|
643
|
+
<CommandPrompt
|
|
644
|
+
prompt="$ "
|
|
645
|
+
onCommand={handleCommand}
|
|
646
|
+
autoFocus
|
|
647
|
+
/>
|
|
648
|
+
|
|
649
|
+
// With placeholder
|
|
650
|
+
<CommandPrompt
|
|
651
|
+
prompt=">"
|
|
652
|
+
placeholder="Type a command..."
|
|
653
|
+
onCommand={executeCommand}
|
|
654
|
+
/>
|
|
655
|
+
```
|
|
656
|
+
|
|
657
|
+
---
|
|
658
|
+
|
|
659
|
+
## RetroEffects
|
|
660
|
+
|
|
661
|
+
CRT monitor visual effects overlay.
|
|
662
|
+
|
|
663
|
+
### When to Use
|
|
664
|
+
|
|
665
|
+
- Add authentic CRT aesthetics to pages
|
|
666
|
+
- Overlay on Terminal or full-page containers
|
|
667
|
+
- Visual enhancement for DOS theme
|
|
668
|
+
|
|
669
|
+
### Props
|
|
670
|
+
|
|
671
|
+
| Prop | Type | Default | Description |
|
|
672
|
+
|------|------|---------|-------------|
|
|
673
|
+
| scanlines | `boolean` | `true` | Show horizontal scanlines |
|
|
674
|
+
| glow | `boolean` | `true` | Show edge vignette glow |
|
|
675
|
+
| flicker | `boolean` | `true` | Subtle CRT flicker animation |
|
|
676
|
+
| intensity | `number` | `1` | Effect intensity (0-1) |
|
|
677
|
+
|
|
678
|
+
### Examples
|
|
679
|
+
|
|
680
|
+
```tsx
|
|
681
|
+
// Full effects
|
|
682
|
+
<div className="relative">
|
|
683
|
+
<Terminal>Content</Terminal>
|
|
684
|
+
<RetroEffects />
|
|
685
|
+
</div>
|
|
686
|
+
|
|
687
|
+
// Scanlines only
|
|
688
|
+
<RetroEffects glow={false} flicker={false} />
|
|
689
|
+
|
|
690
|
+
// Subtle effects
|
|
691
|
+
<RetroEffects intensity={0.5} />
|
|
692
|
+
```
|
|
693
|
+
|
|
694
|
+
---
|
|
695
|
+
|
|
696
|
+
## TimelineNode
|
|
697
|
+
|
|
698
|
+
Marker for timeline and stepper interfaces.
|
|
699
|
+
|
|
700
|
+
### When to Use
|
|
701
|
+
|
|
702
|
+
- Timeline visualizations
|
|
703
|
+
- Step indicators
|
|
704
|
+
- Progress markers
|
|
705
|
+
- Historical event markers
|
|
706
|
+
|
|
707
|
+
### Props
|
|
708
|
+
|
|
709
|
+
| Prop | Type | Default | Description |
|
|
710
|
+
|------|------|---------|-------------|
|
|
711
|
+
| shape | `'circle' \| 'square' \| 'diamond'` | `'circle'` | Node shape |
|
|
712
|
+
| variant | `'default' \| 'primary' \| 'secondary' \| 'accent'` | `'default'` | Color variant |
|
|
713
|
+
| size | `'small' \| 'medium' \| 'large'` | `'medium'` | Node size |
|
|
714
|
+
| isActive | `boolean` | `false` | Active/selected state |
|
|
715
|
+
| label | `string` | - | Optional label text |
|
|
716
|
+
| labelPosition | `'left' \| 'right' \| 'top' \| 'bottom'` | `'left'` | Label position |
|
|
717
|
+
| onClick | `() => void` | - | Click handler (makes interactive) |
|
|
718
|
+
|
|
719
|
+
### Examples
|
|
720
|
+
|
|
721
|
+
```tsx
|
|
722
|
+
// Basic timeline node
|
|
723
|
+
<TimelineNode label="2024" />
|
|
724
|
+
|
|
725
|
+
// Active state with different shape
|
|
726
|
+
<TimelineNode shape="diamond" isActive label="Current" />
|
|
727
|
+
|
|
728
|
+
// Interactive nodes
|
|
729
|
+
<TimelineNode
|
|
730
|
+
shape="square"
|
|
731
|
+
variant="accent"
|
|
732
|
+
label="Step 1"
|
|
733
|
+
onClick={() => goToStep(1)}
|
|
734
|
+
/>
|
|
735
|
+
|
|
736
|
+
// Vertical timeline
|
|
737
|
+
<div className="flex flex-col gap-4">
|
|
738
|
+
<TimelineNode label="Start" labelPosition="right" />
|
|
739
|
+
<TimelineNode label="Middle" labelPosition="right" isActive />
|
|
740
|
+
<TimelineNode label="End" labelPosition="right" />
|
|
741
|
+
</div>
|
|
742
|
+
```
|
|
743
|
+
|
|
744
|
+
---
|
|
745
|
+
|
|
746
|
+
## Header
|
|
747
|
+
|
|
748
|
+
Sticky site header composing branding link + Nav. Supports retro/modern variants and custom link components for framework routing.
|
|
749
|
+
|
|
750
|
+
### Props
|
|
751
|
+
|
|
752
|
+
| Prop | Type | Default | Description |
|
|
753
|
+
|------|------|---------|-------------|
|
|
754
|
+
| brandName | `string` | — | Site brand name displayed in the header |
|
|
755
|
+
| brandHref | `string` | `'/'` | Href for the brand link |
|
|
756
|
+
| items | `NavItem[]` | — | Navigation items passed through to Nav |
|
|
757
|
+
| activeHref | `string` | — | Currently active href (highlights matching nav link) |
|
|
758
|
+
| variant | `'retro' \| 'modern'` | `'retro'` | Visual variant applied to both header and nav |
|
|
759
|
+
| sticky | `boolean` | `true` | Whether the header sticks to viewport top |
|
|
760
|
+
| linkComponent | `React.ElementType` | `'a'` | Custom link component for framework routing |
|
|
761
|
+
| children | `ReactNode` | — | Custom branding content (replaces brandName) |
|
|
762
|
+
| className | `string` | — | Additional CSS class name |
|
|
763
|
+
|
|
764
|
+
### Examples
|
|
765
|
+
|
|
766
|
+
```tsx
|
|
767
|
+
// Basic retro header
|
|
768
|
+
<Header brandName="DMNC.TECH" items={navItems} />
|
|
769
|
+
|
|
770
|
+
// Modern variant with active page
|
|
771
|
+
<Header brandName="MY-APP" items={navItems} variant="modern" activeHref="/about" />
|
|
772
|
+
|
|
773
|
+
// With custom link component (Next.js)
|
|
774
|
+
import Link from 'next/link';
|
|
775
|
+
<Header brandName="MY-APP" items={navItems} linkComponent={Link} />
|
|
776
|
+
|
|
777
|
+
// Custom branding via children
|
|
778
|
+
<Header items={navItems}>
|
|
779
|
+
<img src="/logo.png" alt="Logo" />
|
|
780
|
+
</Header>
|
|
781
|
+
```
|
|
782
|
+
|
|
783
|
+
---
|
|
784
|
+
|
|
785
|
+
## Icon
|
|
786
|
+
|
|
787
|
+
DOS-styled icons backed by pixelarticons (MIT).
|
|
788
|
+
|
|
789
|
+
### Props
|
|
790
|
+
|
|
791
|
+
| Prop | Type | Default | Description |
|
|
792
|
+
|------|------|---------|-------------|
|
|
793
|
+
| name | `string` | - | **Required.** Icon name |
|
|
794
|
+
| size | `'S' \| 'M' \| 'L' \| 'XL'` | `'M'` | Icon size |
|
|
795
|
+
|
|
796
|
+
### Common Icons
|
|
797
|
+
|
|
798
|
+
`Add`, `Cancel`, `Check`, `Chevron Down`, `Chevron Up`, `Close`, `Done`, `Error`, `Info`, `Warning`, `Calendar`, `Star`, `Search`, `Settings`, `User`, `File`, `Folder`, `App`, `Fullscreen`
|
|
799
|
+
|
|
800
|
+
### Examples
|
|
801
|
+
|
|
802
|
+
```tsx
|
|
803
|
+
<Icon name="Check" size="M" />
|
|
804
|
+
<Icon name="Warning" size="L" />
|
|
805
|
+
```
|
|
769
806
|
|
|
770
807
|
---
|
|
771
808
|
|