@datawire-ai/busyfile-design-library 1.0.4

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,352 @@
1
+ # BusyFile Design System
2
+
3
+ A modern, accessible React component library built with TypeScript, Tailwind CSS, and Vite. Designed for building beautiful, consistent user interfaces with minimal setup.
4
+
5
+ ## โœจ Features
6
+
7
+ - **Modern Stack**: Built with React 19, TypeScript, and Tailwind CSS
8
+ - **Beautiful Design**: Clean, modern components with consistent styling
9
+ - **Accessible**: Built with accessibility in mind using Radix UI primitives
10
+ - **Responsive**: Mobile-first design that works on all screen sizes
11
+ - **TypeScript**: Full TypeScript support with excellent IntelliSense
12
+ - **Customizable**: Easy to customize with Tailwind CSS classes
13
+ - **Storybook**: Interactive component documentation and playground
14
+ - **Tested**: Built with testing in mind using Vitest
15
+
16
+ ## ๐Ÿ“ฆ Installation
17
+
18
+ ```bash
19
+ # Using npm
20
+ npm install busyfile-design-system
21
+
22
+ # Using yarn
23
+ yarn add busyfile-design-system
24
+
25
+ # Using pnpm
26
+ pnpm add busyfile-design-system
27
+ ```
28
+
29
+ ## ๐ŸŽฏ Quick Start
30
+
31
+ ```tsx
32
+ import { Button } from 'busyfile-design-system';
33
+
34
+ function App() {
35
+ return (
36
+ <Button variant="default" onClick={() => alert('Hello!')}>
37
+ Click me
38
+ </Button>
39
+ );
40
+ }
41
+ ```
42
+
43
+ ## ๐ŸŽจ Components
44
+
45
+ ### Button
46
+
47
+ A versatile button component with multiple variants, sizes, and states.
48
+
49
+ #### Basic Usage
50
+
51
+ ```tsx
52
+ import { Button } from 'busyfile-design-system';
53
+
54
+ // Default button
55
+ <Button>Click me</Button>
56
+
57
+ // With variant
58
+ <Button variant="destructive">Delete</Button>
59
+
60
+ // With size
61
+ <Button size="lg">Large Button</Button>
62
+
63
+ // With custom styling
64
+ <Button className="bg-gradient-to-r from-purple-500 to-pink-500">
65
+ Gradient Button
66
+ </Button>
67
+ ```
68
+
69
+ #### Props
70
+
71
+ | Prop | Type | Default | Description |
72
+ |------|------|---------|-------------|
73
+ | `variant` | `'default' \| 'destructive' \| 'outline' \| 'secondary' \| 'ghost' \| 'link'` | `'default'` | The visual style variant of the button |
74
+ | `size` | `'default' \| 'sm' \| 'lg' \| 'icon'` | `'default'` | The size of the button |
75
+ | `asChild` | `boolean` | `false` | Whether to render as a different element using Radix UI Slot |
76
+ | `className` | `string` | `undefined` | Additional CSS classes to apply |
77
+ | `onClick` | `(event: React.MouseEvent<HTMLButtonElement>) => void` | `undefined` | Click event handler |
78
+ | `disabled` | `boolean` | `false` | Whether the button is disabled |
79
+ | `type` | `'button' \| 'submit' \| 'reset'` | `'button'` | The type of button |
80
+
81
+ #### Variants
82
+
83
+ ```tsx
84
+ // Default - Blue button with white text
85
+ <Button variant="default">Default</Button>
86
+
87
+ // Destructive - Red button for dangerous actions
88
+ <Button variant="destructive">Delete</Button>
89
+
90
+ // Outline - Bordered button with transparent background
91
+ <Button variant="outline">Outline</Button>
92
+
93
+ // Secondary - Gray button for secondary actions
94
+ <Button variant="secondary">Cancel</Button>
95
+
96
+ // Ghost - Transparent button with hover effects
97
+ <Button variant="ghost">Ghost</Button>
98
+
99
+ // Link - Styled like a link
100
+ <Button variant="link">Learn More</Button>
101
+ ```
102
+
103
+ #### Sizes
104
+
105
+ ```tsx
106
+ // Small - Compact button
107
+ <Button size="sm">Small</Button>
108
+
109
+ // Default - Standard size
110
+ <Button size="default">Default</Button>
111
+
112
+ // Large - Prominent button
113
+ <Button size="lg">Large</Button>
114
+
115
+ // Icon - Square button for icons
116
+ <Button size="icon">
117
+ <PlusIcon />
118
+ </Button>
119
+ ```
120
+
121
+ #### Custom Styling
122
+
123
+ ```tsx
124
+ // Override default styles with Tailwind classes
125
+ <Button
126
+ variant="outline"
127
+ className="bg-gradient-to-r from-blue-500 to-purple-600 text-white border-0 rounded-full px-8 py-3 shadow-lg hover:shadow-xl transform hover:scale-105 transition-all duration-200"
128
+ >
129
+ Custom Styled
130
+ </Button>
131
+
132
+ // Common customizations
133
+ <Button className="bg-red-500 hover:bg-red-600 text-white rounded-full">
134
+ Rounded Red
135
+ </Button>
136
+
137
+ <Button className="border-2 border-dashed border-gray-400 bg-transparent text-gray-700">
138
+ Dashed Border
139
+ </Button>
140
+
141
+ <Button className="bg-green-500 hover:bg-green-600 text-white shadow-[0_0_20px_rgba(34,197,94,0.5)]">
142
+ Glow Effect
143
+ </Button>
144
+ ```
145
+
146
+ #### Advanced Usage
147
+
148
+ ```tsx
149
+ import { Button } from 'busyfile-design-system';
150
+ import { Heart, Download, Settings } from 'lucide-react';
151
+
152
+ // Button with icon
153
+ <Button>
154
+ <Heart className="mr-2" />
155
+ Like
156
+ </Button>
157
+
158
+ // Button as link
159
+ <Button asChild>
160
+ <a href="/download" download>
161
+ <Download className="mr-2" />
162
+ Download
163
+ </a>
164
+ </Button>
165
+
166
+ // Disabled state
167
+ <Button disabled variant="outline">
168
+ Processing...
169
+ </Button>
170
+
171
+ // Loading state with custom styling
172
+ <Button
173
+ disabled
174
+ className="bg-blue-600 text-white opacity-75 cursor-not-allowed"
175
+ >
176
+ <div className="animate-spin mr-2">โณ</div>
177
+ Loading...
178
+ </Button>
179
+ ```
180
+
181
+ ## ๐ŸŽจ Styling & Theming
182
+
183
+ ### Tailwind CSS Integration
184
+
185
+ The design system is built on top of Tailwind CSS, making it easy to customize:
186
+
187
+ ```tsx
188
+ // Use any Tailwind utility classes
189
+ <Button className="bg-gradient-to-r from-pink-500 via-red-500 to-yellow-500 text-white font-bold text-lg px-10 py-4 rounded-full shadow-2xl hover:shadow-3xl transform hover:scale-110 transition-all duration-300">
190
+ Fancy Button
191
+ </Button>
192
+ ```
193
+
194
+ ### CSS Custom Properties
195
+
196
+ You can also use CSS custom properties for consistent theming:
197
+
198
+ ```css
199
+ :root {
200
+ --button-primary: #3b82f6;
201
+ --button-primary-hover: #2563eb;
202
+ --button-text: #ffffff;
203
+ }
204
+
205
+ .custom-button {
206
+ background-color: var(--button-primary);
207
+ color: var(--button-text);
208
+ }
209
+
210
+ .custom-button:hover {
211
+ background-color: var(--button-primary-hover);
212
+ }
213
+ ```
214
+
215
+ ## ๐Ÿš€ Development
216
+
217
+ ### Prerequisites
218
+
219
+ - Node.js 18+
220
+ - pnpm (recommended) or npm
221
+
222
+ ### Setup
223
+
224
+ ```bash
225
+ # Clone the repository
226
+ git clone https://github.com/your-username/busyfile-design-system.git
227
+ cd busyfile-design-system
228
+
229
+ # Install dependencies
230
+ pnpm install
231
+
232
+ # Start development server
233
+ pnpm dev
234
+
235
+ # Start Storybook
236
+ pnpm storybook
237
+
238
+ # Build the library
239
+ pnpm build
240
+
241
+ # Run tests
242
+ pnpm test
243
+ ```
244
+
245
+ ### Project Structure
246
+
247
+ ```
248
+ src/
249
+ โ”œโ”€โ”€ components/ # React components
250
+ โ”‚ โ””โ”€โ”€ ui/ # UI components
251
+ โ”‚ โ”œโ”€โ”€ button.tsx # Button component
252
+ โ”‚ โ””โ”€โ”€ index.ts # Component exports
253
+ โ”œโ”€โ”€ lib/ # Utility functions
254
+ โ”‚ โ””โ”€โ”€ utils.ts # Helper utilities
255
+ โ”œโ”€โ”€ styles.css # Global styles
256
+ โ”œโ”€โ”€ App.tsx # Demo application
257
+ โ”œโ”€โ”€ main.tsx # Application entry point
258
+ โ””โ”€โ”€ index.ts # Main package exports
259
+ ```
260
+
261
+ ## ๐Ÿงช Testing
262
+
263
+ ```bash
264
+ # Run all tests
265
+ pnpm test
266
+
267
+ # Run tests in watch mode
268
+ pnpm test:watch
269
+
270
+ # Run tests with coverage
271
+ pnpm test:coverage
272
+
273
+ # Run tests in browser
274
+ pnpm test:browser
275
+ ```
276
+
277
+ ## ๐Ÿ“š Storybook
278
+
279
+ Storybook provides an interactive playground for all components:
280
+
281
+ ```bash
282
+ # Start Storybook
283
+ pnpm storybook
284
+
285
+ # Build Storybook
286
+ pnpm build-storybook
287
+ ```
288
+
289
+ Visit http://localhost:6006 to explore components, test props, and see examples.
290
+
291
+ ## ๐Ÿ”ง Configuration
292
+
293
+ ### Tailwind CSS
294
+
295
+ The design system includes a pre-configured Tailwind CSS setup. You can extend it in your project:
296
+
297
+ ```js
298
+ // tailwind.config.js
299
+ module.exports = {
300
+ content: [
301
+ "./src/**/*.{js,ts,jsx,tsx}",
302
+ "./node_modules/busyfile-design-system/**/*.{js,ts,jsx,tsx}"
303
+ ],
304
+ theme: {
305
+ extend: {
306
+ // Your custom theme extensions
307
+ }
308
+ },
309
+ plugins: []
310
+ }
311
+ ```
312
+
313
+ ### TypeScript
314
+
315
+ Full TypeScript support is included. No additional types package needed.
316
+
317
+ ## ๐Ÿ“ฆ Building
318
+
319
+ ```bash
320
+ # Build for production
321
+ pnpm build
322
+
323
+ # Build types
324
+ pnpm build:types
325
+
326
+ # Build Storybook
327
+ pnpm build-storybook
328
+ ```
329
+
330
+ ## ๐Ÿค Contributing
331
+
332
+ We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.
333
+
334
+ ### Development Workflow
335
+
336
+ 1. Fork the repository
337
+ 2. Create a feature branch
338
+ 3. Make your changes
339
+ 4. Add tests
340
+ 5. Update documentation
341
+ 6. Submit a pull request
342
+
343
+
344
+ ## ๐Ÿ™ Acknowledgments
345
+
346
+ - [Radix UI](https://www.radix-ui.com/) for accessible primitives
347
+ - [Tailwind CSS](https://tailwindcss.com/) for utility-first CSS
348
+ - [Lucide React](https://lucide.dev/) for beautiful icons
349
+ - [Storybook](https://storybook.js.org/) for component documentation
350
+
351
+
352
+ Made with โค๏ธ by the BusyFile team