@memelabui/ui 0.1.1 → 0.3.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 CHANGED
@@ -1,11 +1,13 @@
1
- # @memelab/ui
1
+ # @memelabui/ui
2
2
 
3
3
  Shared UI component library for MemeLab projects. Dark-first glassmorphism design system built with React, TypeScript, and Tailwind CSS.
4
4
 
5
+ [![npm](https://img.shields.io/npm/v/@memelabui/ui)](https://www.npmjs.com/package/@memelabui/ui)
6
+
5
7
  ## Install
6
8
 
7
9
  ```bash
8
- pnpm add @memelab/ui
10
+ pnpm add @memelabui/ui
9
11
  ```
10
12
 
11
13
  ## Setup
@@ -14,13 +16,13 @@ pnpm add @memelab/ui
14
16
 
15
17
  ```ts
16
18
  // tailwind.config.ts
17
- import memelabPreset from '@memelab/ui/preset';
19
+ import memelabPreset from '@memelabui/ui/preset';
18
20
 
19
21
  export default {
20
22
  presets: [memelabPreset],
21
23
  content: [
22
24
  './src/**/*.{ts,tsx}',
23
- './node_modules/@memelab/ui/dist/**/*.{js,mjs}',
25
+ './node_modules/@memelabui/ui/dist/**/*.{js,mjs}',
24
26
  ],
25
27
  };
26
28
  ```
@@ -29,74 +31,147 @@ export default {
29
31
 
30
32
  ```ts
31
33
  // main.tsx
32
- import '@memelab/ui/styles';
34
+ import '@memelabui/ui/styles';
33
35
  ```
34
36
 
35
37
  ### 3. Use components
36
38
 
37
39
  ```tsx
38
- import { Button, Card, Modal, Input } from '@memelab/ui';
40
+ import { Button, Card, Input, ToastProvider } from '@memelabui/ui';
39
41
 
40
42
  function App() {
41
43
  return (
42
- <Card hoverable>
43
- <Input label="Email" placeholder="you@example.com" />
44
- <Button variant="primary">Submit</Button>
45
- </Card>
44
+ <ToastProvider>
45
+ <Card hoverable>
46
+ <Input label="Email" placeholder="you@example.com" />
47
+ <Button variant="primary">Submit</Button>
48
+ </Card>
49
+ </ToastProvider>
46
50
  );
47
51
  }
48
52
  ```
49
53
 
50
- ## Components
54
+ ## Components (43 exports)
51
55
 
52
- ### Core
56
+ ### Form
53
57
 
54
58
  | Component | Description |
55
59
  |-----------|-------------|
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 |
60
+ | `Input` | Text input with label, error, helperText |
61
+ | `SearchInput` | Search input with icon and clear button |
59
62
  | `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) |
63
+ | `Textarea` | Multiline text input with label/error |
64
+ | `Checkbox` | Custom checkbox with indeterminate support |
65
+ | `RadioGroup` / `RadioItem` | Compound radio button group |
62
66
  | `Toggle` | Switch toggle (sm/md sizes) |
63
- | `Spinner` | Loading spinner (sm/md/lg) |
64
- | `Skeleton` | Pulse placeholder for loading states |
67
+ | `Slider` | Range input with custom track/thumb and value display |
68
+ | `TagInput` | Tag input with Enter/comma/paste, dedup, maxTags |
69
+ | `ColorInput` | Hex color picker with swatch + text input |
70
+ | `FormField` | Generic label + error + helper wrapper for any input |
71
+
72
+ ### Actions
73
+
74
+ | Component | Description |
75
+ |-----------|-------------|
76
+ | `Button` | Primary, secondary, danger, success, warning, ghost variants + loading |
77
+ | `IconButton` | Icon-only button with required `aria-label` |
78
+ | `ProgressButton` | Button with shimmer loading animation |
79
+
80
+ ### Data Display
81
+
82
+ | Component | Description |
83
+ |-----------|-------------|
65
84
  | `Card` | Surface or glass card container |
66
- | `Modal` | Dialog with focus trap, backdrop blur, a11y |
85
+ | `Badge` / `Pill` | Status badges (neutral, primary, success, danger, warning, accent) |
86
+ | `StatCard` | Dashboard stat card with value, label, icon, trend indicator |
87
+ | `Table` / `TableHeader` / `TableBody` / `TableRow` / `TableHead` / `TableCell` | Styled table primitives |
88
+ | `Tabs` / `TabList` / `Tab` / `TabPanel` | Compound tabs with underline and pill variants |
89
+ | `CollapsibleSection` | Animated expand/collapse with ARIA |
90
+ | `EmptyState` | Placeholder with icon, title, description, action |
91
+ | `Skeleton` | Pulse placeholder for loading states |
92
+ | `Spinner` | Loading spinner (sm/md/lg) |
93
+ | `DropZone` | Drag & drop file upload area with accept filter |
94
+ | `Avatar` | Circular avatar with image + initials fallback |
95
+ | `Divider` | Horizontal/vertical divider with optional label |
96
+
97
+ ### Navigation
98
+
99
+ | Component | Description |
100
+ |-----------|-------------|
101
+ | `Pagination` | Page navigation with prev/next, ellipsis, active state |
102
+ | `Stepper` | Horizontal step indicator for wizards/onboarding |
103
+
104
+ ### Overlay
105
+
106
+ | Component | Description |
107
+ |-----------|-------------|
108
+ | `Modal` | Dialog with focus trap, scroll lock, backdrop blur |
67
109
  | `ConfirmDialog` | Confirmation modal with cancel/confirm actions |
68
110
  | `Tooltip` | Hover/focus tooltip with portal positioning |
69
- | `EmptyState` | Empty state placeholder with icon, title, action |
70
- | `CollapsibleSection` | Animated expand/collapse section |
111
+ | `Dropdown` | Compound menu (Trigger, Menu, Item, Separator) |
71
112
 
72
113
  ### Layout
73
114
 
74
115
  | Component | Description |
75
116
  |-----------|-------------|
76
- | `PageShell` | Page wrapper with background orbs and max-width |
117
+ | `PageShell` | Page wrapper with animated background orbs |
77
118
  | `Navbar` | Fixed glass navigation bar |
78
119
  | `Sidebar` | Collapsible glass sidebar |
79
120
  | `DashboardLayout` | Navbar + sidebar + content composition |
80
121
 
122
+ ### Feedback
123
+
124
+ | Component | Description |
125
+ |-----------|-------------|
126
+ | `ToastProvider` / `useToast` | Toast notification system with variants |
127
+ | `Alert` | Inline notification banner (info, success, warning, error) |
128
+ | `CopyField` | Read-only field with copy button and optional masking |
129
+ | `ProgressBar` | Horizontal progress bar with variants and sizes |
130
+
131
+ ### Hooks
132
+
133
+ | Hook | Description |
134
+ |------|-------------|
135
+ | `useClipboard` | Copy text to clipboard with status |
136
+ | `useDisclosure` | Open/close state management |
137
+ | `useMediaQuery` | Responsive media query listener |
138
+ | `useDebounce` | Debounced value |
139
+
81
140
  ## Customization
82
141
 
83
142
  Override CSS variables to customize the theme:
84
143
 
85
144
  ```css
86
145
  :root {
87
- --ml-primary: #667eea;
88
- --ml-accent: #4c5fd4;
89
- --ml-bg: #0f0f18;
146
+ --ml-bg: #0a0a0f;
147
+ --ml-primary: #8b5cf6;
148
+ --ml-accent: #667eea;
149
+ --ml-glow-purple: #764ba2;
150
+ --ml-glow-pink: #f093fb;
151
+ --ml-surface-50: #141420;
152
+ --ml-surface-100: #1e1e30;
90
153
  }
91
154
  ```
92
155
 
156
+ ## Features
157
+
158
+ - **Dark-first glassmorphism** design system
159
+ - **Zero runtime dependencies** — only peer deps (react, react-dom, tailwindcss)
160
+ - **Tree-shakeable** — each component independently importable
161
+ - **Fully accessible** — ARIA attributes, keyboard navigation, focus management, `prefers-reduced-motion` support
162
+ - **SSR-safe** — no `document`/`window` access during server render
163
+ - **TypeScript-first** — all components and hooks fully typed with exported types
164
+ - **Tailwind preset** — tokens, colors, and animations included
165
+
93
166
  ## Development
94
167
 
95
168
  ```bash
96
169
  pnpm dev # Storybook on :6006
97
- pnpm build # Build package
98
- pnpm test # Run tests
99
- pnpm typecheck # Type check
170
+ pnpm build # Build package (tsup + postcss)
171
+ pnpm test # Run tests (vitest watch)
172
+ pnpm test:ci # Run tests once
173
+ pnpm typecheck # TypeScript check
174
+ pnpm lint # ESLint
100
175
  ```
101
176
 
102
177
  ## License