@whykusanagi/corrupted-theme 0.1.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.
@@ -0,0 +1,659 @@
1
+ # Corrupted Theme - Complete Component Reference
2
+
3
+ This document provides a comprehensive reference for all components available in the Corrupted Theme. Every example mirrors the styles in `src/css` (no pseudocode), uses real class names, and is ready for copy/paste into production builds or AI-driven scaffolding.
4
+
5
+ **Usage guidelines**
6
+ - Keep `.glass-*`, `.btn`, `.badge`, `.api-*`, `.nikke-*` classes intact—do not rename components when integrating.
7
+ - Modifier classes follow dot-notation in CSS (e.g., `.btn.secondary`), so the HTML must include both class names (`class="btn secondary"`).
8
+ - JavaScript helpers are optional; the base CSS degrades gracefully when you omit scripts or run with `prefers-reduced-motion: reduce`.
9
+
10
+ ## Table of Contents
11
+
12
+ 1. [Glass Components](#glass-components)
13
+ 2. [Standard Components](#standard-components)
14
+ 3. [Interactive Components](#interactive-components)
15
+ 4. [Data Display](#data-display)
16
+ 5. [Navigation](#navigation)
17
+ 6. [API Documentation](#api-documentation)
18
+ 7. [Nikke Components](#nikke-components)
19
+ 8. [Background & Images](#background--images)
20
+
21
+ ---
22
+
23
+ ## Glass Components
24
+
25
+ Reusable glass components perfect for API documentation, dashboards, and modern web applications.
26
+
27
+ ### Glass Card
28
+
29
+ Primary container component with enhanced glass effect.
30
+
31
+ ```html
32
+ <div class="glass-card" style="padding: 1.5rem;">
33
+ <h3>Card Title</h3>
34
+ <p>Card content goes here</p>
35
+ </div>
36
+ ```
37
+
38
+ **Features:**
39
+ - Backdrop blur effect
40
+ - Dual shadow system (outer + inset)
41
+ - Hover state with lifted effect
42
+ - Smooth transitions
43
+
44
+ ### Glass Input
45
+
46
+ Form input fields with glass styling.
47
+
48
+ ```html
49
+ <input type="text" class="glass-input" placeholder="Enter text...">
50
+ <textarea class="glass-input"></textarea>
51
+ <select class="glass-input">
52
+ <option>Option 1</option>
53
+ </select>
54
+ ```
55
+
56
+ **Features:**
57
+ - Lighter glass effect for better visibility
58
+ - Accent color focus state
59
+ - Works with input, textarea, and select elements
60
+
61
+ ### Glass Button
62
+
63
+ Action buttons with gradient and glass blur.
64
+
65
+ ```html
66
+ <button class="glass-button">Click Me</button>
67
+ <a href="#" class="glass-button">Link Button</a>
68
+ <button class="glass-button" disabled>Disabled</button>
69
+ ```
70
+
71
+ **Features:**
72
+ - Gradient background
73
+ - Lift animation on hover
74
+ - Accent color border
75
+ - Glass blur effect
76
+
77
+ ### Glass Code
78
+
79
+ Code block display component.
80
+
81
+ ```html
82
+ <pre class="glass-code">const example = "Hello, World!";</pre>
83
+ <code class="glass-code">inline code</code>
84
+ ```
85
+
86
+ **Features:**
87
+ - Monospace font
88
+ - Darker glass background
89
+ - Horizontal scroll for long code
90
+
91
+ ---
92
+
93
+ ## Standard Components
94
+
95
+ ### Cards
96
+
97
+ ```html
98
+ <div class="card">
99
+ <h3>Card Title</h3>
100
+ <p>Card content</p>
101
+ </div>
102
+
103
+ <div class="card sm">Small Card</div>
104
+ <div class="card lg">Large Card</div>
105
+ ```
106
+
107
+ ### Buttons
108
+
109
+ ```html
110
+ <button class="btn">Primary</button>
111
+ <button class="btn secondary">Secondary</button>
112
+ <button class="btn ghost">Ghost</button>
113
+ <button class="btn sm">Small</button>
114
+ <button class="btn lg">Large</button>
115
+ <button class="btn" disabled>Disabled</button>
116
+ ```
117
+
118
+ ### Badges
119
+
120
+ ```html
121
+ <span class="badge">Default</span>
122
+ <span class="badge primary">Primary</span>
123
+ <span class="badge success">Success</span>
124
+ <span class="badge warning">Warning</span>
125
+ <span class="badge error">Error</span>
126
+
127
+ <!-- API Method Badges -->
128
+ <span class="badge badge-method">API</span>
129
+ <span class="badge badge-get">GET</span>
130
+ <span class="badge badge-post">POST</span>
131
+ ```
132
+
133
+ ### Alerts
134
+
135
+ ```html
136
+ <div class="alert alert-success">Success message</div>
137
+ <div class="alert alert-info">Info message</div>
138
+ <div class="alert alert-warning">Warning message</div>
139
+ <div class="alert alert-error">Error message</div>
140
+ ```
141
+
142
+ ### Links
143
+
144
+ ```html
145
+ <a href="#" class="link">Link with underline animation</a>
146
+ ```
147
+
148
+ ---
149
+
150
+ ## Interactive Components
151
+
152
+ ### Modals
153
+
154
+ ```html
155
+ <!-- Trigger Button -->
156
+ <button class="btn" onclick="openModal('my-modal')">Open Modal</button>
157
+
158
+ <!-- Modal -->
159
+ <div class="modal-overlay" id="my-modal">
160
+ <div class="modal">
161
+ <div class="modal-header">
162
+ <h3 class="modal-title">Modal Title</h3>
163
+ <button class="modal-close" onclick="closeModal('my-modal')">&times;</button>
164
+ </div>
165
+ <div class="modal-body">
166
+ <p>Modal content goes here</p>
167
+ </div>
168
+ <div class="modal-footer">
169
+ <button class="btn secondary" onclick="closeModal('my-modal')">Cancel</button>
170
+ <button class="btn" onclick="closeModal('my-modal')">Confirm</button>
171
+ </div>
172
+ </div>
173
+ </div>
174
+ ```
175
+
176
+ **JavaScript:**
177
+ ```javascript
178
+ function openModal(id) {
179
+ document.getElementById(id).classList.add('active');
180
+ document.body.style.overflow = 'hidden';
181
+ }
182
+
183
+ function closeModal(id) {
184
+ document.getElementById(id).classList.remove('active');
185
+ document.body.style.overflow = '';
186
+ }
187
+ ```
188
+
189
+ ### Tooltips
190
+
191
+ ```html
192
+ <span class="tooltip">
193
+ Hover me
194
+ <span class="tooltip-content top">Tooltip text</span>
195
+ </span>
196
+
197
+ <!-- Positions: top, bottom, left, right -->
198
+ <span class="tooltip-content bottom">Bottom tooltip</span>
199
+ <span class="tooltip-content left">Left tooltip</span>
200
+ <span class="tooltip-content right">Right tooltip</span>
201
+ ```
202
+
203
+ ### Dropdowns
204
+
205
+ ```html
206
+ <div class="dropdown">
207
+ <button class="dropdown-toggle" onclick="toggleDropdown(this)">
208
+ Dropdown <i class="fas fa-chevron-down"></i>
209
+ </button>
210
+ <div class="dropdown-menu">
211
+ <a href="#" class="dropdown-item">Action 1</a>
212
+ <a href="#" class="dropdown-item">Action 2</a>
213
+ <div class="dropdown-divider"></div>
214
+ <a href="#" class="dropdown-item">Separated Action</a>
215
+ </div>
216
+ </div>
217
+ ```
218
+
219
+ ### Tabs
220
+
221
+ ```html
222
+ <div class="tabs">
223
+ <button class="tab active" onclick="switchTab(this, 'tab-1')">Tab 1</button>
224
+ <button class="tab" onclick="switchTab(this, 'tab-2')">Tab 2</button>
225
+ </div>
226
+
227
+ <div id="tab-1" class="tab-content active">Tab 1 content</div>
228
+ <div id="tab-2" class="tab-content">Tab 2 content</div>
229
+ ```
230
+
231
+ ---
232
+
233
+ ## Data Display
234
+
235
+ ### Loading & Progress
236
+
237
+ **Spinners:**
238
+ ```html
239
+ <div class="spinner sm"></div>
240
+ <div class="spinner"></div>
241
+ <div class="spinner lg"></div>
242
+ ```
243
+
244
+ **Loading Bar:**
245
+ ```html
246
+ <div class="loading-bar">
247
+ <div class="loading-bar-fill"></div>
248
+ </div>
249
+ ```
250
+
251
+ **Progress Bars:**
252
+ ```html
253
+ <div class="progress">
254
+ <div class="progress-bar" style="width: 50%;">50%</div>
255
+ </div>
256
+
257
+ <div class="progress-bar success" style="width: 75%;">75%</div>
258
+ <div class="progress-bar warning" style="width: 60%;">60%</div>
259
+ <div class="progress-bar error" style="width: 30%;">30%</div>
260
+ ```
261
+
262
+ ### Tables
263
+
264
+ ```html
265
+ <table class="table">
266
+ <thead>
267
+ <tr>
268
+ <th>Name</th>
269
+ <th>Email</th>
270
+ <th>Role</th>
271
+ </tr>
272
+ </thead>
273
+ <tbody>
274
+ <tr>
275
+ <td>John Doe</td>
276
+ <td>john@example.com</td>
277
+ <td>Admin</td>
278
+ </tr>
279
+ </tbody>
280
+ </table>
281
+
282
+ <!-- Striped Table -->
283
+ <table class="table table-striped">
284
+ <!-- ... -->
285
+ </table>
286
+ ```
287
+
288
+ ### List Groups
289
+
290
+ ```html
291
+ <div class="list-group">
292
+ <div class="list-group-item">Item 1</div>
293
+ <div class="list-group-item active">Active Item</div>
294
+ <div class="list-group-item disabled">Disabled Item</div>
295
+ </div>
296
+ ```
297
+
298
+ ---
299
+
300
+ ## Navigation
301
+
302
+ ### Navbar (Desktop)
303
+
304
+ ```html
305
+ <nav class="navbar">
306
+ <div class="navbar-content">
307
+ <a href="/" class="navbar-logo">
308
+ <i class="fas fa-palette"></i> Corrupted Theme
309
+ </a>
310
+ <ul class="navbar-links">
311
+ <li><a href="#glass" class="active"><i class="fas fa-cube"></i> Glass</a></li>
312
+ <li><a href="#components"><i class="fas fa-shapes"></i> Components</a></li>
313
+ <li><a href="#navigation"><i class="fas fa-bars"></i> Navigation</a></li>
314
+ </ul>
315
+ </div>
316
+ </nav>
317
+ ```
318
+
319
+ ### Navbar with Submenu
320
+
321
+ ```html
322
+ <ul class="navbar-links">
323
+ <li><a href="#home">Home</a></li>
324
+ <li class="has-submenu">
325
+ <a href="#products">
326
+ <i class="fas fa-folder"></i> Products
327
+ <i class="fas fa-chevron-down"></i>
328
+ </a>
329
+ <div class="submenu">
330
+ <a href="#item-1"><i class="fas fa-box"></i> Product 1</a>
331
+ <a href="#item-2"><i class="fas fa-box"></i> Product 2</a>
332
+ <a href="#item-3"><i class="fas fa-box"></i> Product 3</a>
333
+ </div>
334
+ </li>
335
+ <li><a href="#about">About</a></li>
336
+ </ul>
337
+ ```
338
+
339
+ ### Mobile Navbar Toggle
340
+
341
+ ```html
342
+ <button class="navbar-toggle" onclick="toggleNavbar(this)">
343
+ <span class="icon">
344
+ <span></span>
345
+ <span></span>
346
+ <span></span>
347
+ </span>
348
+ </button>
349
+
350
+ <ul class="navbar-links">
351
+ <!-- links -->
352
+ </ul>
353
+ ```
354
+
355
+ ```html
356
+ <script>
357
+ function toggleNavbar(button) {
358
+ const menu = document.querySelector('.navbar-links');
359
+ menu.classList.toggle('active');
360
+ button.classList.toggle('active');
361
+ }
362
+ </script>
363
+ ```
364
+
365
+ ### Pagination
366
+
367
+ ```html
368
+ <nav class="pagination">
369
+ <ul class="page-item">
370
+ <a href="#" class="page-link"><i class="fas fa-chevron-left"></i></a>
371
+ </ul>
372
+ <ul class="page-item">
373
+ <a href="#" class="page-link">1</a>
374
+ </ul>
375
+ <ul class="page-item active">
376
+ <a href="#" class="page-link">2</a>
377
+ </ul>
378
+ <ul class="page-item">
379
+ <a href="#" class="page-link"><i class="fas fa-chevron-right"></i></a>
380
+ </ul>
381
+ </nav>
382
+ ```
383
+
384
+ ### Breadcrumbs
385
+
386
+ ```html
387
+ <nav class="breadcrumb">
388
+ <div class="breadcrumb-item">
389
+ <a href="#">Home</a>
390
+ </div>
391
+ <div class="breadcrumb-item">
392
+ <a href="#">Category</a>
393
+ </div>
394
+ <div class="breadcrumb-item active">
395
+ Current Page
396
+ </div>
397
+ </nav>
398
+ ```
399
+
400
+ ---
401
+
402
+ ## API Documentation
403
+
404
+ Complete API documentation components for building readable API docs.
405
+
406
+ ### API Endpoint
407
+
408
+ ```html
409
+ <div class="api-endpoint">
410
+ <div style="display: flex; align-items: center; margin-bottom: 1rem;">
411
+ <span class="api-method get">GET</span>
412
+ <code class="api-path">/api/v1/units</code>
413
+ </div>
414
+ <p class="api-description">
415
+ Retrieve a list of all available units.
416
+ </p>
417
+
418
+ <div class="api-params">
419
+ <h4 style="color: var(--accent);">Query Parameters</h4>
420
+ <div class="api-param">
421
+ <span class="api-param-name">element</span>
422
+ <span class="api-param-type">string</span>
423
+ <span class="api-param-required">optional</span>
424
+ <p class="api-param-description">Filter by element type</p>
425
+ </div>
426
+ </div>
427
+
428
+ <div class="api-response">
429
+ <div class="api-response-title">Response (200 OK)</div>
430
+ <pre class="api-response-code">{
431
+ "data": [...]
432
+ }</pre>
433
+ </div>
434
+ </div>
435
+ ```
436
+
437
+ **API Method Badges:**
438
+ - `.api-method.get` - GET requests (blue)
439
+ - `.api-method.post` - POST requests (green)
440
+ - `.api-method.put` - PUT requests (yellow)
441
+ - `.api-method.delete` - DELETE requests (red)
442
+ - `.api-method.patch` - PATCH requests (purple)
443
+
444
+ ---
445
+
446
+ ## Nikke Components
447
+
448
+ Game-specific components for Nikke applications. See [NIKKE_COMPONENTS.md](./NIKKE_COMPONENTS.md) for complete documentation.
449
+
450
+ ### Element Badges
451
+
452
+ ```html
453
+ <span class="element-badge element-water">Water</span>
454
+ <span class="element-badge element-wind">Wind</span>
455
+ <span class="element-badge element-iron">Iron</span>
456
+ <span class="element-badge element-electric">Electric</span>
457
+ <span class="element-badge element-fire">Fire</span>
458
+
459
+ <!-- Solid variant -->
460
+ <span class="element-badge solid element-fire">Fire</span>
461
+
462
+ <!-- Outline variant -->
463
+ <span class="element-badge outline element-water">Water</span>
464
+ ```
465
+
466
+ ### Element Pills
467
+
468
+ ```html
469
+ <div class="element-pills">
470
+ <button class="element-pill water">Water</button>
471
+ <button class="element-pill wind active">Wind</button>
472
+ <button class="element-pill iron">Iron</button>
473
+ <button class="element-pill electric">Electric</button>
474
+ <button class="element-pill fire">Fire</button>
475
+ </div>
476
+ ```
477
+
478
+ ### Team Position Cards
479
+
480
+ ```html
481
+ <div class="team-position-cards">
482
+ <div class="position-card filled">
483
+ <div class="position-header">
484
+ <span class="position-number">1</span>
485
+ <span class="position-label">Front Left</span>
486
+ </div>
487
+ <div class="position-content">
488
+ <div class="unit-display">
489
+ <div class="unit-name">Scarlet Priest Abe</div>
490
+ </div>
491
+ <button class="remove-unit" aria-label="Remove unit">×</button>
492
+ </div>
493
+ </div>
494
+ <!-- Repeat for positions 2-5 -->
495
+ </div>
496
+ ```
497
+
498
+ **States:**
499
+ - `.position-card` - Empty slot
500
+ - `.position-card.filled` - Unit assigned
501
+ - `.position-card.selected` - Currently selected
502
+
503
+ ### Unit Selection
504
+
505
+ ```html
506
+ <div class="available-units">
507
+ <button class="unit-btn">Scarlet Priest Abe</button>
508
+ <button class="unit-btn selected">Soldier A Rapi</button>
509
+ <button class="unit-btn" disabled>Disabled Unit</button>
510
+ </div>
511
+ ```
512
+
513
+ ---
514
+
515
+ ## Background & Images
516
+
517
+ ### Background Image with Overlay
518
+
519
+ ```html
520
+ <div class="bg-image" style="background-image: url('image.jpg'); min-height: 400px;">
521
+ <div class="glass-card" style="padding: 2rem;">
522
+ <h3>Content Over Image</h3>
523
+ <p>This content is displayed over a background image with automatic overlay.</p>
524
+ </div>
525
+ </div>
526
+ ```
527
+
528
+ ### Background Overlay Utilities
529
+
530
+ ```html
531
+ <!-- Light overlay -->
532
+ <div class="bg-overlay bg-overlay-light" style="background-image: url('image.jpg');">
533
+ <h3>Content with light overlay</h3>
534
+ </div>
535
+
536
+ <!-- Dark overlay -->
537
+ <div class="bg-overlay bg-overlay-dark" style="background-image: url('image.jpg');">
538
+ <h3>Content with dark overlay</h3>
539
+ </div>
540
+ ```
541
+
542
+ ---
543
+
544
+ ## Component Combinations
545
+
546
+ ### Complete Form Example
547
+
548
+ ```html
549
+ <div class="glass-card" style="padding: 2rem;">
550
+ <h2>Contact Form</h2>
551
+ <form>
552
+ <label for="name">Name</label>
553
+ <input type="text" id="name" class="glass-input" required>
554
+
555
+ <label for="email">Email</label>
556
+ <input type="email" id="email" class="glass-input" required>
557
+
558
+ <label for="message">Message</label>
559
+ <textarea id="message" class="glass-input" rows="4"></textarea>
560
+
561
+ <button type="submit" class="glass-button">Submit</button>
562
+ </form>
563
+ </div>
564
+ ```
565
+
566
+ ### Dashboard Card Example
567
+
568
+ ```html
569
+ <div class="card">
570
+ <div class="flex-between mb-md">
571
+ <h3>Statistics</h3>
572
+ <span class="badge success">Active</span>
573
+ </div>
574
+ <div class="progress">
575
+ <div class="progress-bar" style="width: 75%;">75%</div>
576
+ </div>
577
+ <div class="flex-between mt-md">
578
+ <span class="text-secondary">Progress</span>
579
+ <button class="btn sm">View Details</button>
580
+ </div>
581
+ </div>
582
+ ```
583
+
584
+ ### API Documentation Page
585
+
586
+ ```html
587
+ <div class="api-endpoint">
588
+ <div style="display: flex; align-items: center;">
589
+ <span class="api-method get">GET</span>
590
+ <code class="api-path">/api/v1/endpoint</code>
591
+ </div>
592
+ <p class="api-description">Endpoint description</p>
593
+ <!-- Parameters and response -->
594
+ </div>
595
+ ```
596
+
597
+ ---
598
+
599
+ ## Responsive Design
600
+
601
+ All components are fully responsive and adapt to different screen sizes:
602
+
603
+ - **Desktop (1024px+)**: Full layout with all features
604
+ - **Tablet (768px-1023px)**: Adjusted spacing and grid columns
605
+ - **Mobile (<768px)**: Stacked layouts, simplified navigation
606
+
607
+ ---
608
+
609
+ ## Browser Support
610
+
611
+ - Chrome/Edge 76+
612
+ - Firefox 55+
613
+ - Safari 9+
614
+ - Mobile browsers (iOS 13+, Android 10+)
615
+
616
+ **Note:** CSS Variables and `backdrop-filter` require modern browser support. Older browsers will see graceful fallbacks.
617
+
618
+ ---
619
+
620
+ ## Accessibility
621
+
622
+ All components follow accessibility best practices:
623
+
624
+ - Semantic HTML elements
625
+ - ARIA labels where needed
626
+ - Keyboard navigation support
627
+ - Focus indicators
628
+ - WCAG AA color contrast ratios
629
+ - Reduced motion support
630
+
631
+ ---
632
+
633
+ ## Customization
634
+
635
+ All components use CSS variables for easy customization. See [VARIABLES_REFERENCE.md](./VARIABLES_REFERENCE.md) for complete variable list.
636
+
637
+ ```css
638
+ :root {
639
+ --accent: #your-color;
640
+ --glass: rgba(20, 12, 40, 0.7);
641
+ --text: #your-text-color;
642
+ }
643
+ ```
644
+
645
+ ---
646
+
647
+ ## Related Documentation
648
+
649
+ - [VARIABLES_REFERENCE.md](./VARIABLES_REFERENCE.md) - Complete CSS variables reference
650
+ - [NIKKE_COMPONENTS.md](./NIKKE_COMPONENTS.md) - Nikke-specific components
651
+ - [CUSTOMIZATION.md](./CUSTOMIZATION.md) - Customization guide
652
+ - [ACCESSIBILITY.md](./ACCESSIBILITY.md) - Accessibility standards
653
+
654
+ ---
655
+
656
+ **Last Updated:** 2025-11-24
657
+ **Version:** 1.0
658
+ **Status:** Complete and Production Ready
659
+