@memelabui/ui 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.
package/README.md ADDED
@@ -0,0 +1,104 @@
1
+ # @memelab/ui
2
+
3
+ Shared UI component library for MemeLab projects. Dark-first glassmorphism design system built with React, TypeScript, and Tailwind CSS.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ pnpm add @memelab/ui
9
+ ```
10
+
11
+ ## Setup
12
+
13
+ ### 1. Tailwind preset
14
+
15
+ ```ts
16
+ // tailwind.config.ts
17
+ import memelabPreset from '@memelab/ui/preset';
18
+
19
+ export default {
20
+ presets: [memelabPreset],
21
+ content: [
22
+ './src/**/*.{ts,tsx}',
23
+ './node_modules/@memelab/ui/dist/**/*.{js,mjs}',
24
+ ],
25
+ };
26
+ ```
27
+
28
+ ### 2. Import styles
29
+
30
+ ```ts
31
+ // main.tsx
32
+ import '@memelab/ui/styles';
33
+ ```
34
+
35
+ ### 3. Use components
36
+
37
+ ```tsx
38
+ import { Button, Card, Modal, Input } from '@memelab/ui';
39
+
40
+ function App() {
41
+ return (
42
+ <Card hoverable>
43
+ <Input label="Email" placeholder="you@example.com" />
44
+ <Button variant="primary">Submit</Button>
45
+ </Card>
46
+ );
47
+ }
48
+ ```
49
+
50
+ ## Components
51
+
52
+ ### Core
53
+
54
+ | Component | Description |
55
+ |-----------|-------------|
56
+ | `Button` | Primary, secondary, danger, success, warning, ghost variants + loading state |
57
+ | `IconButton` | Icon-only button with required aria-label |
58
+ | `Input` | Text input with optional label, error, helperText |
59
+ | `Select` | Select dropdown with label/error wrapper |
60
+ | `Textarea` | Textarea with label/error wrapper |
61
+ | `Badge` / `Pill` | Status badges (neutral, primary, success, danger, warning, accent) |
62
+ | `Toggle` | Switch toggle (sm/md sizes) |
63
+ | `Spinner` | Loading spinner (sm/md/lg) |
64
+ | `Skeleton` | Pulse placeholder for loading states |
65
+ | `Card` | Surface or glass card container |
66
+ | `Modal` | Dialog with focus trap, backdrop blur, a11y |
67
+ | `ConfirmDialog` | Confirmation modal with cancel/confirm actions |
68
+ | `Tooltip` | Hover/focus tooltip with portal positioning |
69
+ | `EmptyState` | Empty state placeholder with icon, title, action |
70
+ | `CollapsibleSection` | Animated expand/collapse section |
71
+
72
+ ### Layout
73
+
74
+ | Component | Description |
75
+ |-----------|-------------|
76
+ | `PageShell` | Page wrapper with background orbs and max-width |
77
+ | `Navbar` | Fixed glass navigation bar |
78
+ | `Sidebar` | Collapsible glass sidebar |
79
+ | `DashboardLayout` | Navbar + sidebar + content composition |
80
+
81
+ ## Customization
82
+
83
+ Override CSS variables to customize the theme:
84
+
85
+ ```css
86
+ :root {
87
+ --ml-primary: #667eea;
88
+ --ml-accent: #4c5fd4;
89
+ --ml-bg: #0f0f18;
90
+ }
91
+ ```
92
+
93
+ ## Development
94
+
95
+ ```bash
96
+ pnpm dev # Storybook on :6006
97
+ pnpm build # Build package
98
+ pnpm test # Run tests
99
+ pnpm typecheck # Type check
100
+ ```
101
+
102
+ ## License
103
+
104
+ MIT