@digilogiclabs/saas-factory-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,172 @@
1
+ # @digilogiclabs/saas-factory-ui
2
+
3
+ A comprehensive UI component library built with React, Tailwind CSS, and Radix UI. This package provides a complete set of accessible, customizable components for building modern web applications.
4
+
5
+ ## Features
6
+
7
+ - 🎨 Beautifully designed components
8
+ - Fully customizable with Tailwind CSS
9
+ - Dark mode support
10
+ - Responsive by default
11
+ - ♿️ Accessible components built on Radix UI primitives
12
+ - 🌈 Theme customization
13
+ - 📱 Mobile-first design
14
+ - 🔧 TypeScript support
15
+ - 🚀 Zero-runtime CSS with Tailwind
16
+ - 🎯 Small bundle size
17
+ - 📦 Tree-shakeable exports
18
+
19
+ ## Installation
20
+
21
+ ```bash
22
+ npm install @digilogiclabs/saas-factory-ui
23
+ ```
24
+
25
+ ## Requirements
26
+
27
+ - Next.js 13 or higher
28
+ - React 18 or higher
29
+ - Tailwind CSS 3.0 or higher
30
+
31
+ ## Quick Start
32
+
33
+ 1. Setup Tailwind CSS in your project if you haven't already:
34
+
35
+ ```bash
36
+ npm install -D tailwindcss postcss autoprefixer
37
+ npx tailwindcss init -p
38
+ ```
39
+
40
+ 2. Add the component paths to your Tailwind config:
41
+
42
+ ```js
43
+ // tailwind.config.js
44
+ module.exports = {
45
+ content: [
46
+ // ...
47
+ "./node_modules/@digilogiclabs/saas-factory-ui/dist/**/*.{js,ts,jsx,tsx}",
48
+ ],
49
+ // ...
50
+ }
51
+ ```
52
+
53
+ 3. Import and use components in your application:
54
+
55
+ ```tsx
56
+ import { Button, Card, Input } from '@digilogiclabs/saas-factory-ui';
57
+
58
+ export default function MyComponent() {
59
+ return (
60
+ <Card>
61
+ <Card.Header>
62
+ <Card.Title>Welcome</Card.Title>
63
+ <Card.Description>Start building your app</Card.Description>
64
+ </Card.Header>
65
+ <Card.Content>
66
+ <Input placeholder="Enter something..." />
67
+ <Button>Click me</Button>
68
+ </Card.Content>
69
+ </Card>
70
+ );
71
+ }
72
+ ```
73
+
74
+ ## Theming
75
+
76
+ Enable dark mode and customize your theme:
77
+
78
+ ```tsx
79
+ // app/providers.tsx
80
+ import { ThemeProvider } from '@digilogiclabs/saas-factory-ui';
81
+
82
+ export function Providers({ children }: { children: React.ReactNode }) {
83
+ return (
84
+ <ThemeProvider defaultTheme="system" storageKey="ui-theme">
85
+ {children}
86
+ </ThemeProvider>
87
+ );
88
+ }
89
+ ```
90
+
91
+ ## Available Components
92
+
93
+ ### Layout Components
94
+ - `Container` - Responsive container
95
+ - `Grid` - Flexible grid system
96
+ - `Section` - Semantic section with spacing
97
+
98
+ ### UI Components
99
+ - `Alert` - Status and notification alerts
100
+ - `Avatar` - User avatars with fallback
101
+ - `Badge` - Status indicators and counts
102
+ - `Button` - Action buttons with variants
103
+ - `Card` - Content containers
104
+ - `Checkbox` - Form checkboxes
105
+ - `Dialog` - Modal dialogs
106
+ - `DropdownMenu` - Menu dropdowns
107
+ - `Form` - Form components and validation
108
+ - `Input` - Text input fields
109
+ - `Label` - Form labels
110
+ - `Modal` - Modal windows
111
+ - `Progress` - Progress indicators
112
+ - `Select` - Dropdown selects
113
+ - `Skeleton` - Loading states
114
+ - `Tabs` - Tabbed interfaces
115
+ - `Toast` - Toast notifications
116
+
117
+ ### Hooks
118
+ - `useMediaQuery` - Responsive hooks
119
+ - `useMounted` - Mount status
120
+ - `useLockBody` - Body scroll lock
121
+ - `useTheme` - Theme management
122
+
123
+ ### Utilities
124
+ - Date formatting
125
+ - Number formatting
126
+ - Form validation
127
+ - Animation helpers
128
+ - DOM utilities
129
+
130
+ ## Customization
131
+
132
+ Customize component styles using Tailwind classes:
133
+
134
+ ```tsx
135
+ <Button className="bg-custom-500 hover:bg-custom-600">
136
+ Custom Button
137
+ </Button>
138
+ ```
139
+
140
+ Override default theme variables:
141
+
142
+ ```css
143
+ :root {
144
+ --background: 0 0% 100%;
145
+ --foreground: 222.2 84% 4.9%;
146
+ /* Add your custom theme variables */
147
+ }
148
+ ```
149
+
150
+ ## TypeScript
151
+
152
+ The package includes full TypeScript support. Import types directly:
153
+
154
+ ```tsx
155
+ import type { ButtonProps } from '@digilogiclabs/saas-factory-ui';
156
+ ```
157
+
158
+ ## Best Practices
159
+
160
+ - Use semantic HTML elements for accessibility
161
+ - Follow mobile-first design principles
162
+ - Maintain consistent spacing using provided layout components
163
+ - Use theme variables for colors and spacing
164
+ - Implement responsive designs using breakpoint utilities
165
+
166
+ ## Contributing
167
+
168
+ We welcome contributions! Please see our [contributing guide](CONTRIBUTING.md) for details.
169
+
170
+ ## License
171
+
172
+ MIT © [DigiLogic Labs](https://github.com/DigiLogicLabs)