@catalystsoftware/ui 1.0.10 → 1.0.12
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 +309 -0
- package/dist/data/tailwind.config.ts +3830 -0
- package/dist/index.js +171061 -142
- package/package.json +1 -1
- /package/dist/data/{tailwind.config.ngin.js → tailwind.config.ngin.ts} +0 -0
package/README.md
CHANGED
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
# Catalyst UI
|
|
2
|
+
|
|
3
|
+
A comprehensive React component library with 100+ production-ready components for building modern web applications.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
### Quick Start
|
|
8
|
+
|
|
9
|
+
Install a single component:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
bunx @catalystsoftware/ui button
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
### Menu
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
bunx @catalystsoftware/ui
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Then select from the interactive menu:
|
|
22
|
+
- **Full Install** - Components + Libraries + Tailwind + PostCSS
|
|
23
|
+
- **Full Install with Ngin** - Includes 18,000 Tailwind config presets
|
|
24
|
+
- **Components + Libraries** - Install without config files
|
|
25
|
+
- **Configure Tailwind + PostCSS** - Setup only
|
|
26
|
+
- **Configure Tailwind + PostCSS w/ ngin** - Setup with preset that contains 18,000 configurations set with only 3 variables
|
|
27
|
+
- **Select Components** - Choose specific components
|
|
28
|
+
- **Create Config** - Creates config file that can be used in conjuction with the bunx command
|
|
29
|
+
|
|
30
|
+
## Premium Access
|
|
31
|
+
|
|
32
|
+
Unlock the full component library with a premium access key:
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
Premium features include:
|
|
36
|
+
- Access to all 2000+ components
|
|
37
|
+
- Advanced interactive components
|
|
38
|
+
- Specialized tools and utilities
|
|
39
|
+
- Priority updates
|
|
40
|
+
|
|
41
|
+
## Component Categories
|
|
42
|
+
|
|
43
|
+
### Primitives
|
|
44
|
+
Core UI components following modern design patterns:
|
|
45
|
+
- Button, Input, Select, Checkbox, Radio, Switch
|
|
46
|
+
- Dialog, Sheet, Popover, Tooltip
|
|
47
|
+
- Card, Badge, Avatar, Separator
|
|
48
|
+
- Accordion, Tabs, Collapsible
|
|
49
|
+
- And more...
|
|
50
|
+
|
|
51
|
+
### Forms
|
|
52
|
+
Advanced form components with validation:
|
|
53
|
+
- Input variants (masked, OTP, password)
|
|
54
|
+
- Date pickers and calendars
|
|
55
|
+
- File uploads and dropzone
|
|
56
|
+
- Toggle groups and button groups
|
|
57
|
+
|
|
58
|
+
### Data Display
|
|
59
|
+
Components for presenting data:
|
|
60
|
+
- Tables with sorting and filtering
|
|
61
|
+
- Charts and data visualizations
|
|
62
|
+
- Timeline and progress indicators
|
|
63
|
+
- Empty states and skeletons
|
|
64
|
+
|
|
65
|
+
### Navigation
|
|
66
|
+
Navigation and layout components:
|
|
67
|
+
- Menus and navigation bars
|
|
68
|
+
- Breadcrumbs and pagination
|
|
69
|
+
- Sidebars and dual sidebars
|
|
70
|
+
- Command palette
|
|
71
|
+
|
|
72
|
+
### Feedback
|
|
73
|
+
User feedback components:
|
|
74
|
+
- Alerts and notifications
|
|
75
|
+
- Toast messages
|
|
76
|
+
- Loading spinners
|
|
77
|
+
- Progress indicators
|
|
78
|
+
|
|
79
|
+
### Interactive
|
|
80
|
+
Advanced interactive elements:
|
|
81
|
+
- Drag and drop
|
|
82
|
+
- Resizable panels
|
|
83
|
+
- Image zoom and crop
|
|
84
|
+
- Code editors with syntax highlighting
|
|
85
|
+
|
|
86
|
+
### Utilities
|
|
87
|
+
Helper components and hooks:
|
|
88
|
+
- Custom hooks (useTimer, useCopyToClipboard, etc.)
|
|
89
|
+
- Auth utilities
|
|
90
|
+
- Server middleware
|
|
91
|
+
- Context management
|
|
92
|
+
|
|
93
|
+
## Package Managers
|
|
94
|
+
|
|
95
|
+
Catalyst UI automatically detects and uses your package manager:
|
|
96
|
+
- npm
|
|
97
|
+
- pnpm
|
|
98
|
+
- yarn
|
|
99
|
+
|
|
100
|
+
## Configuration
|
|
101
|
+
|
|
102
|
+
### Config File (Optional)
|
|
103
|
+
|
|
104
|
+
Create a `catalyst.config.jsonc` file in your project root to customize installation behavior:
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
bunx @catalystsoftware/ui
|
|
108
|
+
# Select: Create Config File
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Or create it manually:
|
|
112
|
+
|
|
113
|
+
```jsonc
|
|
114
|
+
// catalyst.config.jsonc
|
|
115
|
+
{
|
|
116
|
+
"theme": "blue", // presetting the theme
|
|
117
|
+
"preset": "MODERN", // presetting the preset
|
|
118
|
+
"font": "Geist", // presetting the font
|
|
119
|
+
"all-components": false, // auto-install all on `bunx @catalystsoftware/ui`
|
|
120
|
+
"install-tailwind": true, // install Tailwind dependencies
|
|
121
|
+
"configure-tailwind": true, // create and paste .css file
|
|
122
|
+
"configure-tailwind.config": true, // true, "ngin", or false
|
|
123
|
+
"install-postcss": true, // install PostCSS dependencies
|
|
124
|
+
"configure-postcss": true, // create postcss.config.js
|
|
125
|
+
"css": "app/routes/styles/tailwind.css", // CSS file location
|
|
126
|
+
"components": "app/" // components folder location
|
|
127
|
+
}
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### Config Options Explained
|
|
131
|
+
|
|
132
|
+
| Option | Type | Default | Description |
|
|
133
|
+
|--------|------|---------|-------------|
|
|
134
|
+
| `theme` | string | `"blue"` | Default theme color |
|
|
135
|
+
| `preset` | string | `"MODERN"` | Default preset style |
|
|
136
|
+
| `font` | string | `"Geist"` | Default font family |
|
|
137
|
+
| `all-components` | boolean | `false` | Auto-install all components when running `bunx @catalystsoftware/ui` |
|
|
138
|
+
| `install-tailwind` | boolean | `true` | Install Tailwind CSS and related dependencies |
|
|
139
|
+
| `configure-tailwind` | boolean | `true` | Create the tailwind.css file at specified location |
|
|
140
|
+
| `configure-tailwind.config` | boolean\|"ngin" | `true` | `true` for basic config, `"ngin"` for 18k presets, `false` for none |
|
|
141
|
+
| `install-postcss` | boolean | `true` | Install PostCSS dependencies |
|
|
142
|
+
| `configure-postcss` | boolean | `true` | Create postcss.config.js file |
|
|
143
|
+
| `css` | string | `"app/routes/styles/tailwind.css"` | Path and filename for tailwind.css |
|
|
144
|
+
| `components` | string | `"app/"` | Base directory for components folder |
|
|
145
|
+
|
|
146
|
+
### Auto-Install with Config
|
|
147
|
+
|
|
148
|
+
Once you have a config file with `"all-components": true`, simply run:
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
bunx @catalystsoftware/ui
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
This will automatically:
|
|
155
|
+
1. Install all components to your specified components directory
|
|
156
|
+
2. Install required dependencies (if enabled)
|
|
157
|
+
3. Configure Tailwind CSS (if enabled)
|
|
158
|
+
4. Configure PostCSS (if enabled)
|
|
159
|
+
5. Create utils file
|
|
160
|
+
|
|
161
|
+
No menu selection needed!
|
|
162
|
+
|
|
163
|
+
### Tailwind Setup
|
|
164
|
+
|
|
165
|
+
Catalyst UI includes pre-configured Tailwind setups:
|
|
166
|
+
|
|
167
|
+
**Standard Configuration:**
|
|
168
|
+
```bash
|
|
169
|
+
bunx @catalystsoftware/ui
|
|
170
|
+
# Select: Configure Tailwind + PostCSS
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
**Ngin Configuration** (18,000 presets):
|
|
174
|
+
```bash
|
|
175
|
+
bunx @catalystsoftware/ui
|
|
176
|
+
# Select: Configure with Ngin
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
Or set in config:
|
|
180
|
+
```jsonc
|
|
181
|
+
{
|
|
182
|
+
"configure-tailwind.config": "ngin"
|
|
183
|
+
}
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
### Utils File
|
|
187
|
+
|
|
188
|
+
All installations automatically create a `components/catalyst-ui/utils/utils.ts` file with helper functions:
|
|
189
|
+
- `cn()` - Class name merger
|
|
190
|
+
- `focusInput` - Focus styles
|
|
191
|
+
- `focusRing` - Focus ring utilities
|
|
192
|
+
- `formatDate()` - Date formatting
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
## Requirements
|
|
196
|
+
|
|
197
|
+
- React 18+
|
|
198
|
+
- Tailwind CSS 3+
|
|
199
|
+
- Node.js 16+
|
|
200
|
+
|
|
201
|
+
### Utils File
|
|
202
|
+
|
|
203
|
+
All installations automatically create a `utils/utils.ts` file with helper functions:
|
|
204
|
+
- `cn()` - Class name merger
|
|
205
|
+
- `focusInput` - Focus styles
|
|
206
|
+
- `focusRing` - Focus ring utilities
|
|
207
|
+
- `formatDate()` - Date formatting
|
|
208
|
+
|
|
209
|
+
## Examples
|
|
210
|
+
|
|
211
|
+
### Installing a Button Component
|
|
212
|
+
|
|
213
|
+
```bash
|
|
214
|
+
bunx @catalystsoftware/ui button
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
This will:
|
|
218
|
+
1. Create `/components/catalyst-ui/primitives/button.tsx`
|
|
219
|
+
2. Install required dependencies (extracted from component imports)
|
|
220
|
+
3. Create `utils/utils.ts` if it doesn't exist
|
|
221
|
+
|
|
222
|
+
### Using the Button Component
|
|
223
|
+
|
|
224
|
+
```tsx
|
|
225
|
+
import { Button } from '~/components/catalyst-ui';
|
|
226
|
+
|
|
227
|
+
export default function MyPage() {
|
|
228
|
+
return (
|
|
229
|
+
<Button
|
|
230
|
+
variant="default"
|
|
231
|
+
size="lg"
|
|
232
|
+
onClick={() => console.log('clicked')}
|
|
233
|
+
>
|
|
234
|
+
Click Me
|
|
235
|
+
</Button>
|
|
236
|
+
);
|
|
237
|
+
}
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
### Installing Multiple Components
|
|
241
|
+
|
|
242
|
+
```bash
|
|
243
|
+
bunx @catalystsoftware/ui
|
|
244
|
+
# Select: Select Components
|
|
245
|
+
# Choose from the list
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
## Component Import Paths
|
|
249
|
+
|
|
250
|
+
All components use the centralized import path:
|
|
251
|
+
|
|
252
|
+
```tsx
|
|
253
|
+
import { Button, Card, Dialog } from '~/components/catalyst-ui';
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
Or import directly from category folders:
|
|
257
|
+
|
|
258
|
+
```tsx
|
|
259
|
+
import { Button } from '~/components/catalyst-ui/primitives';
|
|
260
|
+
import { useTimer } from '~/components/catalyst-ui/hooks';
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
## Features
|
|
264
|
+
|
|
265
|
+
- **TypeScript First** - Full TypeScript support with type definitions
|
|
266
|
+
- **Accessible** - Built with accessibility in mind following WAI-ARIA standards
|
|
267
|
+
- **Customizable** - Highly customizable with Tailwind CSS
|
|
268
|
+
- **Tree-shakeable** - Import only what you need
|
|
269
|
+
- **Dark Mode** - Built-in dark mode support
|
|
270
|
+
- **Responsive** - Mobile-first responsive design
|
|
271
|
+
- **Zero Config** - Works out of the box with sensible defaults
|
|
272
|
+
|
|
273
|
+
## Dependencies
|
|
274
|
+
|
|
275
|
+
Components automatically install their required dependencies. Common dependencies include:
|
|
276
|
+
- `@radix-ui/react-*` - Primitive components
|
|
277
|
+
- `class-variance-authority` - Variant management
|
|
278
|
+
- `clsx` & `tailwind-merge` - Class name utilities
|
|
279
|
+
- `lucide-react` - Icons
|
|
280
|
+
- `framer-motion` - Animations (where applicable)
|
|
281
|
+
|
|
282
|
+
## File Structure
|
|
283
|
+
|
|
284
|
+
After installation, your project will have:
|
|
285
|
+
|
|
286
|
+
```
|
|
287
|
+
your-project/
|
|
288
|
+
├── components/
|
|
289
|
+
│ └── catalyst-ui/
|
|
290
|
+
│ ├── primitives/
|
|
291
|
+
│ ├── forms/
|
|
292
|
+
│ ├── overlays/
|
|
293
|
+
│ ├── hooks/
|
|
294
|
+
│ ├── utils/
|
|
295
|
+
│ │ └── utils.ts
|
|
296
|
+
│ └── index.ts
|
|
297
|
+
└── (optional config files)
|
|
298
|
+
├── tailwind.config.js
|
|
299
|
+
└── postcss.config.js
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
## Support
|
|
303
|
+
|
|
304
|
+
For issues, questions, or feature requests, please visit our documentation or contact support.
|
|
305
|
+
|
|
306
|
+
## License
|
|
307
|
+
|
|
308
|
+
MIT License - See LICENSE file for details
|
|
309
|
+
|