@papernote/ui 1.1.0 → 1.2.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.
Files changed (75) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +455 -455
  3. package/dist/components/CurrencyInput.d.ts +52 -0
  4. package/dist/components/CurrencyInput.d.ts.map +1 -0
  5. package/dist/components/DataTable.d.ts +3 -1
  6. package/dist/components/DataTable.d.ts.map +1 -1
  7. package/dist/components/Modal.d.ts.map +1 -1
  8. package/dist/components/Page.d.ts +2 -0
  9. package/dist/components/Page.d.ts.map +1 -1
  10. package/dist/components/PageLayout.d.ts +5 -1
  11. package/dist/components/PageLayout.d.ts.map +1 -1
  12. package/dist/components/index.d.ts +4 -0
  13. package/dist/components/index.d.ts.map +1 -1
  14. package/dist/index.d.ts +204 -4
  15. package/dist/index.esm.js +415 -88
  16. package/dist/index.esm.js.map +1 -1
  17. package/dist/index.js +413 -82
  18. package/dist/index.js.map +1 -1
  19. package/dist/styles.css +2877 -2675
  20. package/dist/utils/excelExport.d.ts +143 -0
  21. package/dist/utils/excelExport.d.ts.map +1 -0
  22. package/dist/utils/index.d.ts +2 -0
  23. package/dist/utils/index.d.ts.map +1 -1
  24. package/package.json +1 -1
  25. package/src/components/AdminModal.css +49 -49
  26. package/src/components/CurrencyInput.stories.tsx +290 -0
  27. package/src/components/CurrencyInput.tsx +193 -0
  28. package/src/components/DataTable.tsx +78 -14
  29. package/src/components/Modal.stories.tsx +64 -0
  30. package/src/components/Modal.tsx +15 -2
  31. package/src/components/Page.stories.tsx +76 -0
  32. package/src/components/Page.tsx +35 -3
  33. package/src/components/PageLayout.stories.tsx +75 -0
  34. package/src/components/PageLayout.tsx +28 -9
  35. package/src/components/RoleManager.css +10 -10
  36. package/src/components/Spreadsheet.css +216 -216
  37. package/src/components/Spreadsheet.stories.tsx +362 -362
  38. package/src/components/Spreadsheet.tsx +351 -351
  39. package/src/components/SpreadsheetSimple.stories.tsx +27 -27
  40. package/src/components/Tabs.tsx +152 -152
  41. package/src/components/index.ts +5 -0
  42. package/src/styles/index.css +41 -4
  43. package/src/utils/excelExport.stories.tsx +535 -0
  44. package/src/utils/excelExport.ts +225 -0
  45. package/src/utils/index.ts +3 -0
  46. package/tailwind.config.js +253 -253
  47. package/dist/components/Button.stories.d.ts +0 -51
  48. package/dist/components/Button.stories.d.ts.map +0 -1
  49. package/dist/components/ChartVisualizationUI.d.ts +0 -21
  50. package/dist/components/ChartVisualizationUI.d.ts.map +0 -1
  51. package/dist/components/ChatUI.d.ts +0 -23
  52. package/dist/components/ChatUI.d.ts.map +0 -1
  53. package/dist/components/CommissionDashboardUI.d.ts +0 -25
  54. package/dist/components/CommissionDashboardUI.d.ts.map +0 -1
  55. package/dist/components/DataTable.stories.d.ts +0 -23
  56. package/dist/components/DataTable.stories.d.ts.map +0 -1
  57. package/dist/components/FormField.d.ts +0 -35
  58. package/dist/components/FormField.d.ts.map +0 -1
  59. package/dist/components/Input.stories.d.ts +0 -366
  60. package/dist/components/Input.stories.d.ts.map +0 -1
  61. package/dist/components/InsightsPanelUI.d.ts +0 -21
  62. package/dist/components/InsightsPanelUI.d.ts.map +0 -1
  63. package/dist/components/PaymentHistoryTimeline.d.ts +0 -34
  64. package/dist/components/PaymentHistoryTimeline.d.ts.map +0 -1
  65. package/dist/components/RelationshipManagerUI.d.ts +0 -60
  66. package/dist/components/RelationshipManagerUI.d.ts.map +0 -1
  67. package/dist/components/RoleManager.d.ts +0 -19
  68. package/dist/components/RoleManager.d.ts.map +0 -1
  69. package/dist/components/SplitCommissionBadge.d.ts +0 -18
  70. package/dist/components/SplitCommissionBadge.d.ts.map +0 -1
  71. package/dist/components/Spreadsheet.css +0 -216
  72. package/dist/components/__tests__/Button.test.d.ts +0 -2
  73. package/dist/components/__tests__/Button.test.d.ts.map +0 -1
  74. package/dist/components/__tests__/Input.test.d.ts +0 -2
  75. package/dist/components/__tests__/Input.test.d.ts.map +0 -1
package/README.md CHANGED
@@ -1,455 +1,455 @@
1
- # @papernote/ui
2
-
3
- [![npm version](https://img.shields.io/npm/v/@papernote/ui.svg)](https://www.npmjs.com/package/@papernote/ui)
4
- [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
5
- [![TypeScript](https://img.shields.io/badge/TypeScript-5.0-blue)](https://www.typescriptlang.org/)
6
- [![Storybook](https://img.shields.io/badge/Storybook-8.0-ff4785)](https://storybook.js.org/)
7
-
8
- A modern React component library with a paper notebook aesthetic - minimal, professional, and expressive. Built with TypeScript, Tailwind CSS, and designed for production use.
9
-
10
- ## 📖 Documentation
11
-
12
- **[📚 View Full Documentation →](https://kwhittenberger.github.io/papernote-ui/)**
13
-
14
- - **[🚀 Getting Started](https://kwhittenberger.github.io/papernote-ui/getting-started)** - Installation and setup guide
15
- - **[📦 Components](https://kwhittenberger.github.io/papernote-ui/components/)** - Browse all 115+ components
16
- - **[🎨 Design System](https://kwhittenberger.github.io/papernote-ui/design-system)** - Colors, typography, and design tokens
17
- - **[🧪 Testing Guide](https://kwhittenberger.github.io/papernote-ui/development/testing-guide)** - Writing tests for components
18
- - **[🤝 Contributing](https://kwhittenberger.github.io/papernote-ui/development/contributing)** - How to contribute
19
-
20
- > **Quick Links:** **[🎨 Storybook](https://691fcf89b3393605ea470e93-rzwuumklem.chromatic.com/)** • **[📦 npm](https://www.npmjs.com/package/@papernote/ui)**
21
-
22
- ## ✨ Features
23
-
24
- - 🎨 **Paper Notebook Aesthetic** - Subtle grain textures, muted warm colors, inspired by quality paper notebooks
25
- - ⚡ **115+ Components** - Comprehensive set of production-ready React components
26
- - 📚 **45+ Storybook Stories** - Extensive documentation with 500+ interactive examples
27
- - 🎯 **TypeScript First** - Full TypeScript support with comprehensive type definitions
28
- - 🎨 **Tailwind CSS v3** - Built on Tailwind with custom design tokens
29
- - ♿ **Accessible** - WCAG AA compliant with ARIA attributes and keyboard navigation
30
- - 🚀 **Tree-shakeable** - Import only what you need
31
- - 📱 **Responsive** - Mobile-first design with responsive utilities
32
- - 🔧 **Virtual Scrolling** - High-performance rendering for large datasets (DataTable)
33
- - 🎯 **forwardRef Support** - All form components support ref forwarding
34
-
35
- ## 📦 Installation
36
-
37
- ```bash
38
- npm install @papernote/ui
39
- # or
40
- yarn add @papernote/ui
41
- # or
42
- pnpm add @papernote/ui
43
- ```
44
-
45
- ### Peer Dependencies
46
-
47
- ```bash
48
- npm install react react-dom react-router-dom lucide-react tailwindcss
49
- ```
50
-
51
- ## 🚀 Quick Start
52
-
53
- ### 1. Import Styles
54
-
55
- In your main entry file (e.g., `src/main.tsx`):
56
-
57
- ```tsx
58
- import '@papernote/ui/styles';
59
- ```
60
-
61
- ### 2. Configure Tailwind
62
-
63
- In your `tailwind.config.js`:
64
-
65
- ```javascript
66
- import notebookConfig from '@papernote/ui/tailwind-config';
67
-
68
- export default {
69
- ...notebookConfig,
70
- content: [
71
- './src/**/*.{js,ts,jsx,tsx}',
72
- './node_modules/@papernote/ui/src/**/*.{js,ts,jsx,tsx}',
73
- ],
74
- };
75
- ```
76
-
77
- ### 3. Use Components
78
-
79
- ```tsx
80
- import { Button, Card, CardHeader, CardTitle, CardContent } from '@papernote/ui';
81
-
82
- function App() {
83
- return (
84
- <Card>
85
- <CardHeader>
86
- <CardTitle>Welcome to @papernote/ui</CardTitle>
87
- </CardHeader>
88
- <CardContent>
89
- <p>A beautiful component library with paper notebook aesthetic</p>
90
- <Button variant="primary">Get Started</Button>
91
- </CardContent>
92
- </Card>
93
- );
94
- }
95
- ```
96
-
97
- ## 🧩 Component Categories
98
-
99
- ### Form Components (15+)
100
- - **Button** - Primary, secondary, ghost, danger, outline variants with loading states
101
- - **Input** - Text input with prefix/suffix icons, clearable, validation states
102
- - **Select** - Searchable dropdown with clearable option
103
- - **MultiSelect** - Multiple selection dropdown
104
- - **Textarea** - Auto-expanding text area with resize control
105
- - **Checkbox** - Checkbox with icon support
106
- - **Radio** - Radio buttons with icon support
107
- - **Switch** - Toggle switch with loading state
108
- - **Slider** - Range input with value display
109
- - **DatePicker** - Calendar date picker with events and range mode
110
- - **TimePicker** - Time selection input
111
- - **ColorPicker** - Color selector with presets
112
- - **FileUpload** - Drag-and-drop file upload
113
- - **PasswordInput** - Password field with show/hide toggle
114
- - **NumberInput** - Numeric input with step controls
115
-
116
- ### Layout Components (12+)
117
- - **Card** - Container with Header, Title, Content, Footer sections
118
- - **Stack** - Vertical/horizontal flex layout
119
- - **Grid** - Responsive grid system with GridItem
120
- - **Box** - Generic container with spacing utilities
121
- - **Text** - Typography component with size variants
122
- - **Page** - Notebook-style page background with ruled lines
123
- - **PageLayout** - Standard page layout with title and description
124
- - **Layout** - Complete app layout with sidebar and gutter navigation
125
- - **AppLayout** - Layout with expandable toolbar and status bar
126
- - **Dashboard** - Dashboard container with DashboardHeader and DashboardContent
127
- - **TwoColumnContent** - 1/3 sidebar + 2/3 main content layout
128
- - **Separator** - Horizontal/vertical divider
129
-
130
- ### Navigation Components (10+)
131
- - **Sidebar** - Collapsible navigation sidebar with nested items
132
- - **Breadcrumbs** - Path navigation with custom separators
133
- - **Pagination** - Page navigation with size options
134
- - **Tabs** - Tab navigation (underline and pill variants, vertical/horizontal)
135
- - **StepIndicator** - Progress stepper
136
- - **TreeView** - Hierarchical tree navigation with expand/collapse
137
- - **CommandPalette** - Keyboard-driven command launcher (Cmd+K style)
138
- - **PageNavigation** - Scrollspy navigation dots for page sections
139
- - **Dropdown** - Action menu with icons and dividers
140
- - **Menu** - Context menu component
141
-
142
- ### Data Display Components (10+)
143
- - **DataTable** - Feature-rich table with sorting, filtering, selection, row actions, expansion, virtual scrolling
144
- - **Table** - Basic table component
145
- - **Badge** - Status indicators with dot variant
146
- - **StatusBadge** - Status badges with color variants
147
- - **Avatar** - User avatars with fallback initials
148
- - **Timeline** - Vertical/horizontal event timeline
149
- - **KanbanBoard** - Drag-and-drop kanban board
150
- - **Calendar** - Full calendar with event markers
151
- - **CurrencyDisplay** - Formatted currency display
152
- - **DateDisplay** - Formatted date display
153
- - **StatCard** - Statistics card with trends
154
-
155
- ### Feedback Components (8+)
156
- - **Toast** - Notification system (success, error, warning, info) with position control
157
- - **Alert** - Notification banners with action buttons
158
- - **Modal** - Dialog with multiple sizes and animation variants
159
- - **Drawer** - Side-sliding panel (left, right, top, bottom)
160
- - **Tooltip** - Hover tooltips with positioning
161
- - **EmptyState** - No data/empty states
162
- - **Loading** - Spinners, dots, pulse loaders
163
- - **Skeleton** - Loading placeholders (SkeletonCard, SkeletonTable)
164
- - **LoadingOverlay** - Full-screen loading overlay
165
- - **ConfirmDialog** - Confirmation dialogs
166
-
167
- ### Advanced Components (15+)
168
- - **Accordion** - Collapsible panels with custom icons
169
- - **Transfer** - Dual-list item transfer with search
170
- - **Carousel** - Image/content carousel with auto-play
171
- - **Stepper** - Multi-step wizard (horizontal/vertical)
172
- - **Rating** - Star rating input with half-star support
173
- - **Progress** - Linear and circular progress indicators
174
- - **Popover** - Rich content popovers with positioning
175
- - **ButtonGroup** - Toggle button groups (single/multiple selection)
176
- - **Autocomplete** - Auto-suggest input
177
- - **Combobox** - Searchable select with custom options
178
- - **DateRangePicker** - Date range selection
179
- - **RichTextEditor** - WYSIWYG editor
180
- - **MarkdownEditor** - Markdown editing
181
- - **InfiniteScroll** - Infinite scroll loading
182
- - **ContextMenu** - Right-click context menus
183
-
184
- ### Utility Components (5+)
185
- - **Show/Hide** - Responsive visibility utilities
186
- - **ErrorBoundary** - Error boundary wrapper
187
- - **ThemeToggle** - Dark/light mode toggle
188
- - **QueryTransparency** - SQL query explanation
189
- - **NotificationIndicator** - Badge notification dots
190
-
191
- ## 🎨 Design System
192
-
193
- ### Color Palette
194
-
195
- The library uses a muted, warm color palette inspired by paper and ink:
196
-
197
- ```javascript
198
- {
199
- paper: {
200
- 50: '#fafaf9', // Off-white background
201
- 100: '#f5f5f4', // Light gray
202
- 200: '#e7e5e4', // Border gray
203
- 300: '#d6d3d1', // Subtle border
204
- },
205
- ink: {
206
- 600: '#57534e', // Body text
207
- 700: '#44403c', // Headings
208
- 900: '#1c1917', // High contrast
209
- },
210
- accent: '#8b8878', // Warm gray accents
211
- primary: '#64748b', // Slate blue
212
- success: '#10b981', // Muted emerald
213
- warning: '#f59e0b', // Soft amber
214
- error: '#ef4444', // Muted red
215
- }
216
- ```
217
-
218
- ### Typography
219
-
220
- - **Font Family**: System font stack (ui-sans-serif, system-ui, sans-serif)
221
- - **Font Sizes**: 12px (xs) to 48px (4xl)
222
- - **Line Heights**: 1.5 (body), 1.2 (headings)
223
- - **Font Weights**: 400 (normal), 500 (medium), 600 (semibold), 700 (bold)
224
-
225
- ### Shadows & Effects
226
-
227
- - Subtle paper-like box shadows
228
- - SVG noise texture for paper grain
229
- - Smooth transitions (150ms-300ms)
230
- - Border radius: 0.375rem (6px) standard
231
-
232
- ## 📚 Component Examples
233
-
234
- ### Button with Loading State
235
-
236
- ```tsx
237
- import { Button } from '@papernote/ui';
238
- import { Save } from 'lucide-react';
239
-
240
- <Button
241
- variant="primary"
242
- size="md"
243
- loading={isSaving}
244
- icon={<Save />}
245
- onClick={handleSave}
246
- >
247
- Save Changes
248
- </Button>
249
- ```
250
-
251
- ### Toast Notifications
252
-
253
- ```tsx
254
- import { addSuccessMessage, addErrorMessage, ToastContainer } from '@papernote/ui';
255
-
256
- function App() {
257
- const handleSuccess = () => {
258
- addSuccessMessage('Changes saved successfully!');
259
- };
260
-
261
- const handleError = () => {
262
- addErrorMessage('Failed to save changes', 'Please try again');
263
- };
264
-
265
- return (
266
- <>
267
- <Button onClick={handleSuccess}>Show Success</Button>
268
- <Button onClick={handleError}>Show Error</Button>
269
- <ToastContainer position="top-right" />
270
- </>
271
- );
272
- }
273
- ```
274
-
275
- ### DataTable with Advanced Features
276
-
277
- ```tsx
278
- import { DataTable } from '@papernote/ui';
279
- import { Edit, Trash } from 'lucide-react';
280
-
281
- const columns = [
282
- { key: 'name', header: 'Name', sortable: true, filterable: true },
283
- { key: 'email', header: 'Email', sortable: true },
284
- {
285
- key: 'status',
286
- header: 'Status',
287
- render: (row) => <Badge variant={row.status === 'active' ? 'success' : 'default'}>{row.status}</Badge>
288
- },
289
- ];
290
-
291
- const actions = [
292
- {
293
- label: 'Edit',
294
- icon: <Edit className="h-4 w-4" />,
295
- onClick: (row) => handleEdit(row)
296
- },
297
- {
298
- label: 'Delete',
299
- icon: <Trash className="h-4 w-4" />,
300
- onClick: (row) => handleDelete(row),
301
- variant: 'danger' as const
302
- },
303
- ];
304
-
305
- <DataTable
306
- data={users}
307
- columns={columns}
308
- actions={actions}
309
- loading={loading}
310
- selectable
311
- onRowSelect={(selectedRows) => console.log(selectedRows)}
312
- expandable
313
- renderExpandedRow={(row) => <UserDetails user={row} />}
314
- virtualized // Enable for 10,000+ rows
315
- virtualHeight="600px"
316
- />
317
- ```
318
-
319
- ### Form with Validation
320
-
321
- ```tsx
322
- import { Input, Textarea, Select, Button, Card } from '@papernote/ui';
323
- import { useState } from 'react';
324
-
325
- function ContactForm() {
326
- const [formData, setFormData] = useState({
327
- name: '',
328
- email: '',
329
- category: '',
330
- message: ''
331
- });
332
-
333
- return (
334
- <Card>
335
- <CardHeader>
336
- <CardTitle>Contact Us</CardTitle>
337
- </CardHeader>
338
- <CardContent>
339
- <div style={{ display: 'flex', flexDirection: 'column', gap: '1rem' }}>
340
- <Input
341
- label="Name"
342
- value={formData.name}
343
- onChange={(e) => setFormData({ ...formData, name: e.target.value })}
344
- required
345
- />
346
- <Input
347
- label="Email"
348
- type="email"
349
- value={formData.email}
350
- onChange={(e) => setFormData({ ...formData, email: e.target.value })}
351
- required
352
- />
353
- <Select
354
- label="Category"
355
- options={[
356
- { value: 'general', label: 'General Inquiry' },
357
- { value: 'support', label: 'Support' },
358
- { value: 'feedback', label: 'Feedback' }
359
- ]}
360
- value={formData.category}
361
- onChange={setFormData({ ...formData, category: value })}
362
- />
363
- <Textarea
364
- label="Message"
365
- value={formData.message}
366
- onChange={(e) => setFormData({ ...formData, message: e.target.value })}
367
- rows={4}
368
- />
369
- <Button variant="primary" type="submit">
370
- Send Message
371
- </Button>
372
- </div>
373
- </CardContent>
374
- </Card>
375
- );
376
- }
377
- ```
378
-
379
- ### Layout with Sidebar
380
-
381
- ```tsx
382
- import { Layout, Sidebar, Page, StatusBar } from '@papernote/ui';
383
- import { Home, Users, Settings } from 'lucide-react';
384
-
385
- const menuItems = [
386
- { id: 'home', label: 'Home', icon: <Home />, href: '/' },
387
- { id: 'users', label: 'Users', icon: <Users />, href: '/users' },
388
- { id: 'settings', label: 'Settings', icon: <Settings />, href: '/settings' },
389
- ];
390
-
391
- function App() {
392
- return (
393
- <Layout
394
- sidebar={<Sidebar items={menuItems} />}
395
- statusBar={<StatusBar />}
396
- >
397
- <Page>
398
- {/* Your page content */}
399
- </Page>
400
- </Layout>
401
- );
402
- }
403
- ```
404
-
405
- ## 🛠️ Development
406
-
407
- ```bash
408
- # Install dependencies
409
- npm install
410
-
411
- # Build library
412
- npm run build
413
-
414
- # Build Storybook
415
- npm run build-storybook
416
-
417
- # Type check
418
- npm run typecheck
419
-
420
- # Lint
421
- npm run lint
422
- ```
423
-
424
- ## 📖 Documentation
425
-
426
- - **[Storybook Live Demo](https://691fcf89b3393605ea470e93-rzwuumklem.chromatic.com/)** - Interactive component playground with 500+ examples
427
- - **[npm Package](https://www.npmjs.com/package/@papernote/ui)** - Package registry
428
- - **[GitHub Repository](https://github.com/kwhittenberger/papernote-ui)** - Source code
429
-
430
- ## 🤝 Contributing
431
-
432
- Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
433
-
434
- 1. Fork the repository
435
- 2. Create your feature branch (`git checkout -b feature/amazing-feature`)
436
- 3. Commit your changes (`git commit -m 'Add some amazing feature'`)
437
- 4. Push to the branch (`git push origin feature/amazing-feature`)
438
- 5. Open a Pull Request
439
-
440
- ## 📄 License
441
-
442
- MIT License - Copyright (c) 2025 kwhittenberger
443
-
444
- See [LICENSE](./LICENSE) for full details.
445
-
446
- ## 🙏 Credits
447
-
448
- Inspired by the minimal, professional aesthetic of quality paper notebooks and Claude's interface design.
449
-
450
- ## 🔗 Links
451
-
452
- - [npm Package](https://www.npmjs.com/package/@papernote/ui)
453
- - [Live Storybook](https://691fcf89b3393605ea470e93-rzwuumklem.chromatic.com/)
454
- - [GitHub Repository](https://github.com/kwhittenberger/papernote-ui)
455
- - [Report Issues](https://github.com/kwhittenberger/papernote-ui/issues)
1
+ # @papernote/ui
2
+
3
+ [![npm version](https://img.shields.io/npm/v/@papernote/ui.svg)](https://www.npmjs.com/package/@papernote/ui)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
5
+ [![TypeScript](https://img.shields.io/badge/TypeScript-5.0-blue)](https://www.typescriptlang.org/)
6
+ [![Storybook](https://img.shields.io/badge/Storybook-8.0-ff4785)](https://storybook.js.org/)
7
+
8
+ A modern React component library with a paper notebook aesthetic - minimal, professional, and expressive. Built with TypeScript, Tailwind CSS, and designed for production use.
9
+
10
+ ## 📖 Documentation
11
+
12
+ **[📚 View Full Documentation →](https://kwhittenberger.github.io/papernote-ui/)**
13
+
14
+ - **[🚀 Getting Started](https://kwhittenberger.github.io/papernote-ui/getting-started)** - Installation and setup guide
15
+ - **[📦 Components](https://kwhittenberger.github.io/papernote-ui/components/)** - Browse all 115+ components
16
+ - **[🎨 Design System](https://kwhittenberger.github.io/papernote-ui/design-system)** - Colors, typography, and design tokens
17
+ - **[🧪 Testing Guide](https://kwhittenberger.github.io/papernote-ui/development/testing-guide)** - Writing tests for components
18
+ - **[🤝 Contributing](https://kwhittenberger.github.io/papernote-ui/development/contributing)** - How to contribute
19
+
20
+ > **Quick Links:** **[🎨 Storybook](https://691fcf89b3393605ea470e93-rzwuumklem.chromatic.com/)** • **[📦 npm](https://www.npmjs.com/package/@papernote/ui)**
21
+
22
+ ## ✨ Features
23
+
24
+ - 🎨 **Paper Notebook Aesthetic** - Subtle grain textures, muted warm colors, inspired by quality paper notebooks
25
+ - ⚡ **115+ Components** - Comprehensive set of production-ready React components
26
+ - 📚 **45+ Storybook Stories** - Extensive documentation with 500+ interactive examples
27
+ - 🎯 **TypeScript First** - Full TypeScript support with comprehensive type definitions
28
+ - 🎨 **Tailwind CSS v3** - Built on Tailwind with custom design tokens
29
+ - ♿ **Accessible** - WCAG AA compliant with ARIA attributes and keyboard navigation
30
+ - 🚀 **Tree-shakeable** - Import only what you need
31
+ - 📱 **Responsive** - Mobile-first design with responsive utilities
32
+ - 🔧 **Virtual Scrolling** - High-performance rendering for large datasets (DataTable)
33
+ - 🎯 **forwardRef Support** - All form components support ref forwarding
34
+
35
+ ## 📦 Installation
36
+
37
+ ```bash
38
+ npm install @papernote/ui
39
+ # or
40
+ yarn add @papernote/ui
41
+ # or
42
+ pnpm add @papernote/ui
43
+ ```
44
+
45
+ ### Peer Dependencies
46
+
47
+ ```bash
48
+ npm install react react-dom react-router-dom lucide-react tailwindcss
49
+ ```
50
+
51
+ ## 🚀 Quick Start
52
+
53
+ ### 1. Import Styles
54
+
55
+ In your main entry file (e.g., `src/main.tsx`):
56
+
57
+ ```tsx
58
+ import '@papernote/ui/styles';
59
+ ```
60
+
61
+ ### 2. Configure Tailwind
62
+
63
+ In your `tailwind.config.js`:
64
+
65
+ ```javascript
66
+ import notebookConfig from '@papernote/ui/tailwind-config';
67
+
68
+ export default {
69
+ ...notebookConfig,
70
+ content: [
71
+ './src/**/*.{js,ts,jsx,tsx}',
72
+ './node_modules/@papernote/ui/src/**/*.{js,ts,jsx,tsx}',
73
+ ],
74
+ };
75
+ ```
76
+
77
+ ### 3. Use Components
78
+
79
+ ```tsx
80
+ import { Button, Card, CardHeader, CardTitle, CardContent } from '@papernote/ui';
81
+
82
+ function App() {
83
+ return (
84
+ <Card>
85
+ <CardHeader>
86
+ <CardTitle>Welcome to @papernote/ui</CardTitle>
87
+ </CardHeader>
88
+ <CardContent>
89
+ <p>A beautiful component library with paper notebook aesthetic</p>
90
+ <Button variant="primary">Get Started</Button>
91
+ </CardContent>
92
+ </Card>
93
+ );
94
+ }
95
+ ```
96
+
97
+ ## 🧩 Component Categories
98
+
99
+ ### Form Components (15+)
100
+ - **Button** - Primary, secondary, ghost, danger, outline variants with loading states
101
+ - **Input** - Text input with prefix/suffix icons, clearable, validation states
102
+ - **Select** - Searchable dropdown with clearable option
103
+ - **MultiSelect** - Multiple selection dropdown
104
+ - **Textarea** - Auto-expanding text area with resize control
105
+ - **Checkbox** - Checkbox with icon support
106
+ - **Radio** - Radio buttons with icon support
107
+ - **Switch** - Toggle switch with loading state
108
+ - **Slider** - Range input with value display
109
+ - **DatePicker** - Calendar date picker with events and range mode
110
+ - **TimePicker** - Time selection input
111
+ - **ColorPicker** - Color selector with presets
112
+ - **FileUpload** - Drag-and-drop file upload
113
+ - **PasswordInput** - Password field with show/hide toggle
114
+ - **NumberInput** - Numeric input with step controls
115
+
116
+ ### Layout Components (12+)
117
+ - **Card** - Container with Header, Title, Content, Footer sections
118
+ - **Stack** - Vertical/horizontal flex layout
119
+ - **Grid** - Responsive grid system with GridItem
120
+ - **Box** - Generic container with spacing utilities
121
+ - **Text** - Typography component with size variants
122
+ - **Page** - Notebook-style page background with ruled lines
123
+ - **PageLayout** - Standard page layout with title and description
124
+ - **Layout** - Complete app layout with sidebar and gutter navigation
125
+ - **AppLayout** - Layout with expandable toolbar and status bar
126
+ - **Dashboard** - Dashboard container with DashboardHeader and DashboardContent
127
+ - **TwoColumnContent** - 1/3 sidebar + 2/3 main content layout
128
+ - **Separator** - Horizontal/vertical divider
129
+
130
+ ### Navigation Components (10+)
131
+ - **Sidebar** - Collapsible navigation sidebar with nested items
132
+ - **Breadcrumbs** - Path navigation with custom separators
133
+ - **Pagination** - Page navigation with size options
134
+ - **Tabs** - Tab navigation (underline and pill variants, vertical/horizontal)
135
+ - **StepIndicator** - Progress stepper
136
+ - **TreeView** - Hierarchical tree navigation with expand/collapse
137
+ - **CommandPalette** - Keyboard-driven command launcher (Cmd+K style)
138
+ - **PageNavigation** - Scrollspy navigation dots for page sections
139
+ - **Dropdown** - Action menu with icons and dividers
140
+ - **Menu** - Context menu component
141
+
142
+ ### Data Display Components (10+)
143
+ - **DataTable** - Feature-rich table with sorting, filtering, selection, row actions, expansion, virtual scrolling
144
+ - **Table** - Basic table component
145
+ - **Badge** - Status indicators with dot variant
146
+ - **StatusBadge** - Status badges with color variants
147
+ - **Avatar** - User avatars with fallback initials
148
+ - **Timeline** - Vertical/horizontal event timeline
149
+ - **KanbanBoard** - Drag-and-drop kanban board
150
+ - **Calendar** - Full calendar with event markers
151
+ - **CurrencyDisplay** - Formatted currency display
152
+ - **DateDisplay** - Formatted date display
153
+ - **StatCard** - Statistics card with trends
154
+
155
+ ### Feedback Components (8+)
156
+ - **Toast** - Notification system (success, error, warning, info) with position control
157
+ - **Alert** - Notification banners with action buttons
158
+ - **Modal** - Dialog with multiple sizes and animation variants
159
+ - **Drawer** - Side-sliding panel (left, right, top, bottom)
160
+ - **Tooltip** - Hover tooltips with positioning
161
+ - **EmptyState** - No data/empty states
162
+ - **Loading** - Spinners, dots, pulse loaders
163
+ - **Skeleton** - Loading placeholders (SkeletonCard, SkeletonTable)
164
+ - **LoadingOverlay** - Full-screen loading overlay
165
+ - **ConfirmDialog** - Confirmation dialogs
166
+
167
+ ### Advanced Components (15+)
168
+ - **Accordion** - Collapsible panels with custom icons
169
+ - **Transfer** - Dual-list item transfer with search
170
+ - **Carousel** - Image/content carousel with auto-play
171
+ - **Stepper** - Multi-step wizard (horizontal/vertical)
172
+ - **Rating** - Star rating input with half-star support
173
+ - **Progress** - Linear and circular progress indicators
174
+ - **Popover** - Rich content popovers with positioning
175
+ - **ButtonGroup** - Toggle button groups (single/multiple selection)
176
+ - **Autocomplete** - Auto-suggest input
177
+ - **Combobox** - Searchable select with custom options
178
+ - **DateRangePicker** - Date range selection
179
+ - **RichTextEditor** - WYSIWYG editor
180
+ - **MarkdownEditor** - Markdown editing
181
+ - **InfiniteScroll** - Infinite scroll loading
182
+ - **ContextMenu** - Right-click context menus
183
+
184
+ ### Utility Components (5+)
185
+ - **Show/Hide** - Responsive visibility utilities
186
+ - **ErrorBoundary** - Error boundary wrapper
187
+ - **ThemeToggle** - Dark/light mode toggle
188
+ - **QueryTransparency** - SQL query explanation
189
+ - **NotificationIndicator** - Badge notification dots
190
+
191
+ ## 🎨 Design System
192
+
193
+ ### Color Palette
194
+
195
+ The library uses a muted, warm color palette inspired by paper and ink:
196
+
197
+ ```javascript
198
+ {
199
+ paper: {
200
+ 50: '#fafaf9', // Off-white background
201
+ 100: '#f5f5f4', // Light gray
202
+ 200: '#e7e5e4', // Border gray
203
+ 300: '#d6d3d1', // Subtle border
204
+ },
205
+ ink: {
206
+ 600: '#57534e', // Body text
207
+ 700: '#44403c', // Headings
208
+ 900: '#1c1917', // High contrast
209
+ },
210
+ accent: '#8b8878', // Warm gray accents
211
+ primary: '#64748b', // Slate blue
212
+ success: '#10b981', // Muted emerald
213
+ warning: '#f59e0b', // Soft amber
214
+ error: '#ef4444', // Muted red
215
+ }
216
+ ```
217
+
218
+ ### Typography
219
+
220
+ - **Font Family**: System font stack (ui-sans-serif, system-ui, sans-serif)
221
+ - **Font Sizes**: 12px (xs) to 48px (4xl)
222
+ - **Line Heights**: 1.5 (body), 1.2 (headings)
223
+ - **Font Weights**: 400 (normal), 500 (medium), 600 (semibold), 700 (bold)
224
+
225
+ ### Shadows & Effects
226
+
227
+ - Subtle paper-like box shadows
228
+ - SVG noise texture for paper grain
229
+ - Smooth transitions (150ms-300ms)
230
+ - Border radius: 0.375rem (6px) standard
231
+
232
+ ## 📚 Component Examples
233
+
234
+ ### Button with Loading State
235
+
236
+ ```tsx
237
+ import { Button } from '@papernote/ui';
238
+ import { Save } from 'lucide-react';
239
+
240
+ <Button
241
+ variant="primary"
242
+ size="md"
243
+ loading={isSaving}
244
+ icon={<Save />}
245
+ onClick={handleSave}
246
+ >
247
+ Save Changes
248
+ </Button>
249
+ ```
250
+
251
+ ### Toast Notifications
252
+
253
+ ```tsx
254
+ import { addSuccessMessage, addErrorMessage, ToastContainer } from '@papernote/ui';
255
+
256
+ function App() {
257
+ const handleSuccess = () => {
258
+ addSuccessMessage('Changes saved successfully!');
259
+ };
260
+
261
+ const handleError = () => {
262
+ addErrorMessage('Failed to save changes', 'Please try again');
263
+ };
264
+
265
+ return (
266
+ <>
267
+ <Button onClick={handleSuccess}>Show Success</Button>
268
+ <Button onClick={handleError}>Show Error</Button>
269
+ <ToastContainer position="top-right" />
270
+ </>
271
+ );
272
+ }
273
+ ```
274
+
275
+ ### DataTable with Advanced Features
276
+
277
+ ```tsx
278
+ import { DataTable } from '@papernote/ui';
279
+ import { Edit, Trash } from 'lucide-react';
280
+
281
+ const columns = [
282
+ { key: 'name', header: 'Name', sortable: true, filterable: true },
283
+ { key: 'email', header: 'Email', sortable: true },
284
+ {
285
+ key: 'status',
286
+ header: 'Status',
287
+ render: (row) => <Badge variant={row.status === 'active' ? 'success' : 'default'}>{row.status}</Badge>
288
+ },
289
+ ];
290
+
291
+ const actions = [
292
+ {
293
+ label: 'Edit',
294
+ icon: <Edit className="h-4 w-4" />,
295
+ onClick: (row) => handleEdit(row)
296
+ },
297
+ {
298
+ label: 'Delete',
299
+ icon: <Trash className="h-4 w-4" />,
300
+ onClick: (row) => handleDelete(row),
301
+ variant: 'danger' as const
302
+ },
303
+ ];
304
+
305
+ <DataTable
306
+ data={users}
307
+ columns={columns}
308
+ actions={actions}
309
+ loading={loading}
310
+ selectable
311
+ onRowSelect={(selectedRows) => console.log(selectedRows)}
312
+ expandable
313
+ renderExpandedRow={(row) => <UserDetails user={row} />}
314
+ virtualized // Enable for 10,000+ rows
315
+ virtualHeight="600px"
316
+ />
317
+ ```
318
+
319
+ ### Form with Validation
320
+
321
+ ```tsx
322
+ import { Input, Textarea, Select, Button, Card } from '@papernote/ui';
323
+ import { useState } from 'react';
324
+
325
+ function ContactForm() {
326
+ const [formData, setFormData] = useState({
327
+ name: '',
328
+ email: '',
329
+ category: '',
330
+ message: ''
331
+ });
332
+
333
+ return (
334
+ <Card>
335
+ <CardHeader>
336
+ <CardTitle>Contact Us</CardTitle>
337
+ </CardHeader>
338
+ <CardContent>
339
+ <div style={{ display: 'flex', flexDirection: 'column', gap: '1rem' }}>
340
+ <Input
341
+ label="Name"
342
+ value={formData.name}
343
+ onChange={(e) => setFormData({ ...formData, name: e.target.value })}
344
+ required
345
+ />
346
+ <Input
347
+ label="Email"
348
+ type="email"
349
+ value={formData.email}
350
+ onChange={(e) => setFormData({ ...formData, email: e.target.value })}
351
+ required
352
+ />
353
+ <Select
354
+ label="Category"
355
+ options={[
356
+ { value: 'general', label: 'General Inquiry' },
357
+ { value: 'support', label: 'Support' },
358
+ { value: 'feedback', label: 'Feedback' }
359
+ ]}
360
+ value={formData.category}
361
+ onChange={setFormData({ ...formData, category: value })}
362
+ />
363
+ <Textarea
364
+ label="Message"
365
+ value={formData.message}
366
+ onChange={(e) => setFormData({ ...formData, message: e.target.value })}
367
+ rows={4}
368
+ />
369
+ <Button variant="primary" type="submit">
370
+ Send Message
371
+ </Button>
372
+ </div>
373
+ </CardContent>
374
+ </Card>
375
+ );
376
+ }
377
+ ```
378
+
379
+ ### Layout with Sidebar
380
+
381
+ ```tsx
382
+ import { Layout, Sidebar, Page, StatusBar } from '@papernote/ui';
383
+ import { Home, Users, Settings } from 'lucide-react';
384
+
385
+ const menuItems = [
386
+ { id: 'home', label: 'Home', icon: <Home />, href: '/' },
387
+ { id: 'users', label: 'Users', icon: <Users />, href: '/users' },
388
+ { id: 'settings', label: 'Settings', icon: <Settings />, href: '/settings' },
389
+ ];
390
+
391
+ function App() {
392
+ return (
393
+ <Layout
394
+ sidebar={<Sidebar items={menuItems} />}
395
+ statusBar={<StatusBar />}
396
+ >
397
+ <Page>
398
+ {/* Your page content */}
399
+ </Page>
400
+ </Layout>
401
+ );
402
+ }
403
+ ```
404
+
405
+ ## 🛠️ Development
406
+
407
+ ```bash
408
+ # Install dependencies
409
+ npm install
410
+
411
+ # Build library
412
+ npm run build
413
+
414
+ # Build Storybook
415
+ npm run build-storybook
416
+
417
+ # Type check
418
+ npm run typecheck
419
+
420
+ # Lint
421
+ npm run lint
422
+ ```
423
+
424
+ ## 📖 Documentation
425
+
426
+ - **[Storybook Live Demo](https://691fcf89b3393605ea470e93-rzwuumklem.chromatic.com/)** - Interactive component playground with 500+ examples
427
+ - **[npm Package](https://www.npmjs.com/package/@papernote/ui)** - Package registry
428
+ - **[GitHub Repository](https://github.com/kwhittenberger/papernote-ui)** - Source code
429
+
430
+ ## 🤝 Contributing
431
+
432
+ Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
433
+
434
+ 1. Fork the repository
435
+ 2. Create your feature branch (`git checkout -b feature/amazing-feature`)
436
+ 3. Commit your changes (`git commit -m 'Add some amazing feature'`)
437
+ 4. Push to the branch (`git push origin feature/amazing-feature`)
438
+ 5. Open a Pull Request
439
+
440
+ ## 📄 License
441
+
442
+ MIT License - Copyright (c) 2025 kwhittenberger
443
+
444
+ See [LICENSE](./LICENSE) for full details.
445
+
446
+ ## 🙏 Credits
447
+
448
+ Inspired by the minimal, professional aesthetic of quality paper notebooks and Claude's interface design.
449
+
450
+ ## 🔗 Links
451
+
452
+ - [npm Package](https://www.npmjs.com/package/@papernote/ui)
453
+ - [Live Storybook](https://691fcf89b3393605ea470e93-rzwuumklem.chromatic.com/)
454
+ - [GitHub Repository](https://github.com/kwhittenberger/papernote-ui)
455
+ - [Report Issues](https://github.com/kwhittenberger/papernote-ui/issues)