@syscore/ui-library 1.0.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 +299 -0
- package/dist/ui/favicon.ico +0 -0
- package/dist/ui/index.cjs.js +54 -0
- package/dist/ui/index.es.js +36247 -0
- package/dist/ui/placeholder.svg +1 -0
- package/dist/ui/robots.txt +14 -0
- package/package.json +126 -0
package/README.md
ADDED
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
# Fusion UI Design System
|
|
2
|
+
|
|
3
|
+
A comprehensive, production-ready React component library built with [Radix UI](https://www.radix-ui.com/), [Tailwind CSS](https://tailwindcss.com/), and [TypeScript](https://www.typescriptlang.org/).
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- 🎨 **46+ React Components** - Accordion, Button, Dialog, Form, Navigation, and more
|
|
8
|
+
- 🎯 **Accessible** - Built on Radix UI primitives with full WCAG compliance
|
|
9
|
+
- 🎭 **Customizable** - Tailwind CSS based styling, easily themable
|
|
10
|
+
- 📦 **Tree-shakeable** - ES modules with proper exports
|
|
11
|
+
- 🔧 **TypeScript** - Full TypeScript support with proper type definitions
|
|
12
|
+
- 📖 **Storybook** - Interactive component documentation and playground
|
|
13
|
+
- ♿ **ARIA Ready** - Screen reader and keyboard navigation support
|
|
14
|
+
|
|
15
|
+
## Installation
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm install @your-org/ui-library
|
|
19
|
+
# or
|
|
20
|
+
pnpm add @your-org/ui-library
|
|
21
|
+
# or
|
|
22
|
+
yarn add @your-org/ui-library
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Prerequisites
|
|
26
|
+
|
|
27
|
+
Make sure your project has the required peer dependencies:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
npm install react react-dom tailwindcss
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Quick Start
|
|
34
|
+
|
|
35
|
+
### 1. Configure Tailwind CSS
|
|
36
|
+
|
|
37
|
+
Add the component library paths to your `tailwind.config.ts`:
|
|
38
|
+
|
|
39
|
+
```typescript
|
|
40
|
+
import type { Config } from "tailwindcss";
|
|
41
|
+
|
|
42
|
+
export default {
|
|
43
|
+
content: [
|
|
44
|
+
"./src/**/*.{js,ts,jsx,tsx}",
|
|
45
|
+
"node_modules/@your-org/ui-library/**/*.{js,mjs}",
|
|
46
|
+
],
|
|
47
|
+
theme: {
|
|
48
|
+
extend: {},
|
|
49
|
+
},
|
|
50
|
+
plugins: [],
|
|
51
|
+
} satisfies Config;
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### 2. Import Components
|
|
55
|
+
|
|
56
|
+
```tsx
|
|
57
|
+
import { Button, Card, Input } from "@your-org/ui-library";
|
|
58
|
+
|
|
59
|
+
export default function App() {
|
|
60
|
+
return (
|
|
61
|
+
<Card>
|
|
62
|
+
<Input placeholder="Enter your name" />
|
|
63
|
+
<Button>Submit</Button>
|
|
64
|
+
</Card>
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Available Components
|
|
70
|
+
|
|
71
|
+
### Layout & Structure
|
|
72
|
+
|
|
73
|
+
- **Accordion** - Collapsible content sections
|
|
74
|
+
- **AspectRatio** - Maintain aspect ratios for media
|
|
75
|
+
- **Card** - Container component with header, footer, content
|
|
76
|
+
- **Separator** - Visual divider between sections
|
|
77
|
+
- **ScrollArea** - Scrollable area with custom styling
|
|
78
|
+
- **Table** - Data table component
|
|
79
|
+
- **Resizable** - Resizable panel groups
|
|
80
|
+
- **Sidebar** - Navigation sidebar with menu items
|
|
81
|
+
|
|
82
|
+
### Form & Input
|
|
83
|
+
|
|
84
|
+
- **Button** - Primary button component with variants
|
|
85
|
+
- **Input** - Text input field
|
|
86
|
+
- **Textarea** - Multi-line text input
|
|
87
|
+
- **Label** - Form label
|
|
88
|
+
- **Checkbox** - Checkbox input
|
|
89
|
+
- **RadioGroup** - Radio button group
|
|
90
|
+
- **Switch** - Toggle switch
|
|
91
|
+
- **Slider** - Range slider
|
|
92
|
+
- **Select** - Dropdown select
|
|
93
|
+
- **InputOTP** - One-time password input
|
|
94
|
+
- **ToggleGroup** - Toggle button group
|
|
95
|
+
- **Toggle** - Single toggle button
|
|
96
|
+
- **Form** - Form container with field validation
|
|
97
|
+
|
|
98
|
+
### Display
|
|
99
|
+
|
|
100
|
+
- **Badge** - Small label/tag component
|
|
101
|
+
- **Alert** - Alert message with icon
|
|
102
|
+
- **Avatar** - User avatar with fallback
|
|
103
|
+
- **Breadcrumb** - Navigation breadcrumb
|
|
104
|
+
- **Progress** - Progress bar
|
|
105
|
+
- **Skeleton** - Content loading skeleton
|
|
106
|
+
- **Calendar** - Date picker calendar
|
|
107
|
+
|
|
108
|
+
### Navigation
|
|
109
|
+
|
|
110
|
+
- **Tabs** - Tabbed content
|
|
111
|
+
- **Pagination** - Page navigation
|
|
112
|
+
- **NavigationMenu** - Horizontal navigation menu
|
|
113
|
+
- **Menubar** - Application menu bar
|
|
114
|
+
- **DropdownMenu** - Dropdown menu
|
|
115
|
+
|
|
116
|
+
### Dialog & Overlay
|
|
117
|
+
|
|
118
|
+
- **Dialog** - Modal dialog
|
|
119
|
+
- **Sheet** - Slide-out sheet/drawer from side
|
|
120
|
+
- **Drawer** - Accessible drawer component
|
|
121
|
+
- **AlertDialog** - Alert dialog with confirmation
|
|
122
|
+
- **Popover** - Floating popover panel
|
|
123
|
+
- **HoverCard** - Card that appears on hover
|
|
124
|
+
- **Tooltip** - Tooltip on hover
|
|
125
|
+
- **ContextMenu** - Right-click context menu
|
|
126
|
+
|
|
127
|
+
### Interactive
|
|
128
|
+
|
|
129
|
+
- **Carousel** - Image/content carousel
|
|
130
|
+
- **Collapsible** - Collapsible content
|
|
131
|
+
- **Command** - Command palette/search
|
|
132
|
+
|
|
133
|
+
### Notifications
|
|
134
|
+
|
|
135
|
+
- **Toast** - Toast notification system
|
|
136
|
+
- **Toaster** - Toast container
|
|
137
|
+
- **Sonner** - Toast notifications alternative
|
|
138
|
+
|
|
139
|
+
### Charts
|
|
140
|
+
|
|
141
|
+
- **Chart** - Data visualization components
|
|
142
|
+
|
|
143
|
+
## Component Examples
|
|
144
|
+
|
|
145
|
+
### Button
|
|
146
|
+
|
|
147
|
+
```tsx
|
|
148
|
+
import { Button } from "@your-org/ui-library";
|
|
149
|
+
|
|
150
|
+
export default function ButtonExample() {
|
|
151
|
+
return (
|
|
152
|
+
<>
|
|
153
|
+
<Button>Default</Button>
|
|
154
|
+
<Button variant="outline">Outline</Button>
|
|
155
|
+
<Button variant="destructive">Destructive</Button>
|
|
156
|
+
<Button disabled>Disabled</Button>
|
|
157
|
+
</>
|
|
158
|
+
);
|
|
159
|
+
}
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
### Dialog
|
|
163
|
+
|
|
164
|
+
```tsx
|
|
165
|
+
import {
|
|
166
|
+
Dialog,
|
|
167
|
+
DialogTrigger,
|
|
168
|
+
DialogContent,
|
|
169
|
+
DialogHeader,
|
|
170
|
+
DialogTitle,
|
|
171
|
+
Button,
|
|
172
|
+
} from "@your-org/ui-library";
|
|
173
|
+
|
|
174
|
+
export default function DialogExample() {
|
|
175
|
+
return (
|
|
176
|
+
<Dialog>
|
|
177
|
+
<DialogTrigger asChild>
|
|
178
|
+
<Button>Open Dialog</Button>
|
|
179
|
+
</DialogTrigger>
|
|
180
|
+
<DialogContent>
|
|
181
|
+
<DialogHeader>
|
|
182
|
+
<DialogTitle>Dialog Title</DialogTitle>
|
|
183
|
+
</DialogHeader>
|
|
184
|
+
<p>Dialog content goes here.</p>
|
|
185
|
+
</DialogContent>
|
|
186
|
+
</Dialog>
|
|
187
|
+
);
|
|
188
|
+
}
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
### Form with Validation
|
|
192
|
+
|
|
193
|
+
```tsx
|
|
194
|
+
import { useForm } from "react-hook-form";
|
|
195
|
+
import { Button, Input, Label, Form } from "@your-org/ui-library";
|
|
196
|
+
|
|
197
|
+
export default function FormExample() {
|
|
198
|
+
const { register, handleSubmit } = useForm();
|
|
199
|
+
|
|
200
|
+
return (
|
|
201
|
+
<form onSubmit={handleSubmit((data) => console.log(data))}>
|
|
202
|
+
<div className="space-y-4">
|
|
203
|
+
<div>
|
|
204
|
+
<Label htmlFor="name">Name</Label>
|
|
205
|
+
<Input id="name" {...register("name")} />
|
|
206
|
+
</div>
|
|
207
|
+
<Button type="submit">Submit</Button>
|
|
208
|
+
</div>
|
|
209
|
+
</form>
|
|
210
|
+
);
|
|
211
|
+
}
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
## Customization
|
|
215
|
+
|
|
216
|
+
### Tailwind Configuration
|
|
217
|
+
|
|
218
|
+
All components use Tailwind CSS classes and can be customized through your `tailwind.config.ts`:
|
|
219
|
+
|
|
220
|
+
```typescript
|
|
221
|
+
export default {
|
|
222
|
+
theme: {
|
|
223
|
+
extend: {
|
|
224
|
+
colors: {
|
|
225
|
+
primary: "#YOUR_COLOR",
|
|
226
|
+
secondary: "#YOUR_COLOR",
|
|
227
|
+
},
|
|
228
|
+
},
|
|
229
|
+
},
|
|
230
|
+
};
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
### Component Props
|
|
234
|
+
|
|
235
|
+
Each component accepts standard HTML attributes and additional props for customization:
|
|
236
|
+
|
|
237
|
+
```tsx
|
|
238
|
+
<Button variant="solid" size="lg" className="custom-class" disabled={false}>
|
|
239
|
+
Click me
|
|
240
|
+
</Button>
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
## Storybook
|
|
244
|
+
|
|
245
|
+
View interactive documentation and examples:
|
|
246
|
+
|
|
247
|
+
```bash
|
|
248
|
+
npm run storybook
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
This opens Storybook at `http://localhost:6006` where you can browse all components and their variants.
|
|
252
|
+
|
|
253
|
+
## TypeScript Support
|
|
254
|
+
|
|
255
|
+
Full TypeScript support with proper type definitions:
|
|
256
|
+
|
|
257
|
+
```tsx
|
|
258
|
+
import type { ButtonHTMLAttributes } from "react";
|
|
259
|
+
import { Button, type ButtonProps } from "@your-org/ui-library";
|
|
260
|
+
|
|
261
|
+
interface MyButtonProps extends ButtonProps {
|
|
262
|
+
label: string;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
export default function MyButton({ label, ...props }: MyButtonProps) {
|
|
266
|
+
return <Button {...props}>{label}</Button>;
|
|
267
|
+
}
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
## Browser Support
|
|
271
|
+
|
|
272
|
+
- Chrome (latest)
|
|
273
|
+
- Firefox (latest)
|
|
274
|
+
- Safari (latest)
|
|
275
|
+
- Edge (latest)
|
|
276
|
+
|
|
277
|
+
## Contributing
|
|
278
|
+
|
|
279
|
+
See [CONTRIBUTING.md](./CONTRIBUTING.md) for guidelines.
|
|
280
|
+
|
|
281
|
+
## License
|
|
282
|
+
|
|
283
|
+
MIT License - see LICENSE file for details
|
|
284
|
+
|
|
285
|
+
## Support
|
|
286
|
+
|
|
287
|
+
- 📖 [Documentation](https://github.com/your-org/ui-library)
|
|
288
|
+
- 🐛 [Issue Tracker](https://github.com/your-org/ui-library/issues)
|
|
289
|
+
- 💬 [Discussions](https://github.com/your-org/ui-library/discussions)
|
|
290
|
+
|
|
291
|
+
## Related
|
|
292
|
+
|
|
293
|
+
- [Radix UI](https://www.radix-ui.com/)
|
|
294
|
+
- [Tailwind CSS](https://tailwindcss.com/)
|
|
295
|
+
- [shadcn/ui](https://ui.shadcn.com/)
|
|
296
|
+
|
|
297
|
+
---
|
|
298
|
+
|
|
299
|
+
Made with ❤️ by Your Team
|
|
Binary file
|