@reeverdev/ui-cli 0.1.0 → 0.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.
- package/README.md +100 -0
- package/dist/index.js +668 -131
- package/package.json +3 -2
package/README.md
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# @reeverdev/ui-cli
|
|
2
|
+
|
|
3
|
+
> CLI tool for Reever UI component library - Add components to your project shadcn-style
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/@reeverdev/ui-cli)
|
|
6
|
+
[](https://opensource.org/licenses/MIT)
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Installation
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
npm install -g @reeverdev/ui-cli
|
|
14
|
+
# or use with npx
|
|
15
|
+
npx @reeverdev/ui-cli <command>
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Commands
|
|
21
|
+
|
|
22
|
+
### Initialize Project
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
npx @reeverdev/ui-cli init
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Sets up Reever UI in your project:
|
|
29
|
+
- Creates `reever.config.json` configuration file
|
|
30
|
+
- Configures component output directory
|
|
31
|
+
- Sets up Tailwind CSS integration
|
|
32
|
+
|
|
33
|
+
### Add Components
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
# Add specific components
|
|
37
|
+
npx @reeverdev/ui-cli add button dialog card
|
|
38
|
+
|
|
39
|
+
# Add all components
|
|
40
|
+
npx @reeverdev/ui-cli add --all
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### List Components
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
npx @reeverdev/ui-cli list
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Shows all available components in the registry.
|
|
50
|
+
|
|
51
|
+
### Show Differences
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
npx @reeverdev/ui-cli diff
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Compares local components with the registry and shows differences.
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## Configuration
|
|
62
|
+
|
|
63
|
+
After running `init`, a `reever.config.json` file is created:
|
|
64
|
+
|
|
65
|
+
```json
|
|
66
|
+
{
|
|
67
|
+
"componentDir": "./src/components/ui",
|
|
68
|
+
"tailwind": {
|
|
69
|
+
"config": "./tailwind.config.ts",
|
|
70
|
+
"css": "./src/app/globals.css"
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## Available Components
|
|
78
|
+
|
|
79
|
+
| Category | Components |
|
|
80
|
+
|----------|------------|
|
|
81
|
+
| **Core** | Button, Input, Textarea, Label, Badge, Alert, Separator, Skeleton, Spinner |
|
|
82
|
+
| **Layout** | Card, Avatar, Accordion, Collapsible, Drawer, Table, Sidebar |
|
|
83
|
+
| **Form** | Checkbox, Switch, Select, Radio Group, Toggle, Slider, Rating |
|
|
84
|
+
| **Navigation** | Tabs, Breadcrumb, Navigation Menu, Pagination, Command |
|
|
85
|
+
| **Overlay** | Dialog, Alert Dialog, Dropdown Menu, Context Menu, Tooltip, Popover, Sheet |
|
|
86
|
+
| **Feedback** | Progress, Toast |
|
|
87
|
+
| **Date & Time** | Calendar, Date Picker |
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## Related
|
|
92
|
+
|
|
93
|
+
- [@reeverdev/ui](https://www.npmjs.com/package/@reeverdev/ui) - Main component library
|
|
94
|
+
- [GitHub Repository](https://github.com/reeverdev/ui)
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
## License
|
|
99
|
+
|
|
100
|
+
MIT
|
package/dist/index.js
CHANGED
|
@@ -21,8 +21,10 @@ var require_package = __commonJS({
|
|
|
21
21
|
homepage: "https://reever.dev",
|
|
22
22
|
workspaces: [
|
|
23
23
|
"packages/*",
|
|
24
|
-
"
|
|
25
|
-
"tooling/*"
|
|
24
|
+
"docs/*",
|
|
25
|
+
"tooling/*",
|
|
26
|
+
"integrations/*",
|
|
27
|
+
"examples/*"
|
|
26
28
|
],
|
|
27
29
|
scripts: {
|
|
28
30
|
build: "turbo build",
|
|
@@ -43,10 +45,10 @@ var require_package = __commonJS({
|
|
|
43
45
|
turbo: "^2.5.4",
|
|
44
46
|
typescript: "^5.9.3"
|
|
45
47
|
},
|
|
46
|
-
packageManager: "pnpm@9.15.0",
|
|
47
48
|
engines: {
|
|
48
49
|
node: ">=18.0.0"
|
|
49
|
-
}
|
|
50
|
+
},
|
|
51
|
+
packageManager: "npm@10.8.2"
|
|
50
52
|
};
|
|
51
53
|
}
|
|
52
54
|
});
|
|
@@ -172,200 +174,735 @@ import prompts2 from "prompts";
|
|
|
172
174
|
|
|
173
175
|
// registry.ts
|
|
174
176
|
var CATEGORIES = [
|
|
175
|
-
"Core",
|
|
176
177
|
"Form",
|
|
177
|
-
"Navigation",
|
|
178
178
|
"Data Display",
|
|
179
|
+
"Navigation",
|
|
179
180
|
"Overlay",
|
|
180
181
|
"Feedback",
|
|
181
182
|
"Layout",
|
|
182
|
-
"
|
|
183
|
-
"
|
|
183
|
+
"Motion",
|
|
184
|
+
"Utility",
|
|
185
|
+
"Rich"
|
|
184
186
|
];
|
|
185
187
|
var COMPONENTS = {
|
|
188
|
+
// ============ FORM COMPONENTS ============
|
|
186
189
|
button: {
|
|
187
190
|
name: "Button",
|
|
188
|
-
description: "
|
|
189
|
-
category: "
|
|
190
|
-
code:
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
191
|
+
description: "Interactive button with variants, sizes, colors, and loading state",
|
|
192
|
+
category: "Form",
|
|
193
|
+
code: `import { Button } from "@reeverdev/ui";
|
|
194
|
+
|
|
195
|
+
// Usage
|
|
196
|
+
<Button variant="solid" color="primary">Click me</Button>
|
|
197
|
+
<Button variant="bordered" isLoading>Loading...</Button>
|
|
198
|
+
<Button startContent={<Icon />}>With Icon</Button>
|
|
199
|
+
`
|
|
194
200
|
},
|
|
195
201
|
input: {
|
|
196
202
|
name: "Input",
|
|
197
|
-
description: "Text input field",
|
|
198
|
-
category: "
|
|
199
|
-
code:
|
|
200
|
-
|
|
203
|
+
description: "Text input field with validation and adornments",
|
|
204
|
+
category: "Form",
|
|
205
|
+
code: `import { Input } from "@reeverdev/ui";
|
|
206
|
+
|
|
207
|
+
// Usage
|
|
208
|
+
<Input placeholder="Enter text..." />
|
|
209
|
+
<Input type="email" isRequired isInvalid={hasError} />
|
|
210
|
+
<Input startContent={<SearchIcon />} />
|
|
201
211
|
`
|
|
202
212
|
},
|
|
203
|
-
|
|
204
|
-
name: "
|
|
205
|
-
description: "
|
|
206
|
-
category: "
|
|
207
|
-
code:
|
|
208
|
-
|
|
213
|
+
textarea: {
|
|
214
|
+
name: "Textarea",
|
|
215
|
+
description: "Multi-line text input with auto-resize",
|
|
216
|
+
category: "Form",
|
|
217
|
+
code: `import { Textarea } from "@reeverdev/ui";
|
|
218
|
+
|
|
219
|
+
// Usage
|
|
220
|
+
<Textarea placeholder="Enter description..." rows={4} />
|
|
221
|
+
<Textarea autoResize minRows={2} maxRows={10} />
|
|
209
222
|
`
|
|
210
223
|
},
|
|
211
|
-
|
|
212
|
-
name: "
|
|
213
|
-
description: "
|
|
214
|
-
category: "
|
|
215
|
-
code:
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
224
|
+
checkbox: {
|
|
225
|
+
name: "Checkbox",
|
|
226
|
+
description: "Checkbox input with indeterminate state",
|
|
227
|
+
category: "Form",
|
|
228
|
+
code: `import { Checkbox } from "@reeverdev/ui";
|
|
229
|
+
|
|
230
|
+
// Usage
|
|
231
|
+
<Checkbox checked={checked} onCheckedChange={setChecked}>
|
|
232
|
+
Accept terms
|
|
233
|
+
</Checkbox>
|
|
234
|
+
<Checkbox indeterminate>Select all</Checkbox>
|
|
235
|
+
`
|
|
236
|
+
},
|
|
237
|
+
"radio-group": {
|
|
238
|
+
name: "RadioGroup",
|
|
239
|
+
description: "Radio button group for single selection",
|
|
240
|
+
category: "Form",
|
|
241
|
+
code: `import { RadioGroup, RadioGroupItem } from "@reeverdev/ui";
|
|
242
|
+
|
|
243
|
+
// Usage
|
|
244
|
+
<RadioGroup value={value} onValueChange={setValue}>
|
|
245
|
+
<RadioGroupItem value="option1">Option 1</RadioGroupItem>
|
|
246
|
+
<RadioGroupItem value="option2">Option 2</RadioGroupItem>
|
|
247
|
+
</RadioGroup>
|
|
248
|
+
`
|
|
219
249
|
},
|
|
220
250
|
select: {
|
|
221
251
|
name: "Select",
|
|
222
|
-
description: "Dropdown select",
|
|
252
|
+
description: "Dropdown select with search support",
|
|
223
253
|
category: "Form",
|
|
224
|
-
code:
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
254
|
+
code: `import { Select, SelectItem } from "@reeverdev/ui";
|
|
255
|
+
|
|
256
|
+
// Usage
|
|
257
|
+
<Select value={value} onValueChange={setValue} placeholder="Select...">
|
|
258
|
+
<SelectItem value="1">Option 1</SelectItem>
|
|
259
|
+
<SelectItem value="2">Option 2</SelectItem>
|
|
260
|
+
</Select>
|
|
261
|
+
`
|
|
228
262
|
},
|
|
229
|
-
|
|
230
|
-
name: "
|
|
231
|
-
description: "
|
|
232
|
-
category: "
|
|
233
|
-
code:
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
263
|
+
switch: {
|
|
264
|
+
name: "Switch",
|
|
265
|
+
description: "Toggle switch for boolean values",
|
|
266
|
+
category: "Form",
|
|
267
|
+
code: `import { Switch } from "@reeverdev/ui";
|
|
268
|
+
|
|
269
|
+
// Usage
|
|
270
|
+
<Switch checked={enabled} onCheckedChange={setEnabled} />
|
|
271
|
+
<Switch color="success">Enable notifications</Switch>
|
|
272
|
+
`
|
|
237
273
|
},
|
|
238
|
-
|
|
239
|
-
name: "
|
|
240
|
-
description: "
|
|
241
|
-
category: "
|
|
242
|
-
code:
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
274
|
+
slider: {
|
|
275
|
+
name: "Slider",
|
|
276
|
+
description: "Range slider for numeric values",
|
|
277
|
+
category: "Form",
|
|
278
|
+
code: `import { Slider } from "@reeverdev/ui";
|
|
279
|
+
|
|
280
|
+
// Usage
|
|
281
|
+
<Slider value={[50]} onValueChange={setValue} max={100} />
|
|
282
|
+
<Slider value={[20, 80]} onValueChange={setRange} /> // Range
|
|
283
|
+
`
|
|
246
284
|
},
|
|
247
|
-
|
|
248
|
-
name: "
|
|
249
|
-
description: "
|
|
250
|
-
category: "
|
|
251
|
-
code:
|
|
252
|
-
|
|
285
|
+
"date-picker": {
|
|
286
|
+
name: "DatePicker",
|
|
287
|
+
description: "Calendar-based date selection",
|
|
288
|
+
category: "Form",
|
|
289
|
+
code: `import { DatePicker } from "@reeverdev/ui";
|
|
290
|
+
|
|
291
|
+
// Usage
|
|
292
|
+
<DatePicker value={date} onChange={setDate} />
|
|
293
|
+
<DatePicker minDate={new Date()} placeholder="Select date" />
|
|
294
|
+
`
|
|
295
|
+
},
|
|
296
|
+
"color-picker": {
|
|
297
|
+
name: "ColorPicker",
|
|
298
|
+
description: "Color selection with HEX, RGB, HSL formats",
|
|
299
|
+
category: "Form",
|
|
300
|
+
code: `import { ColorPicker } from "@reeverdev/ui";
|
|
301
|
+
|
|
302
|
+
// Usage
|
|
303
|
+
<ColorPicker value={color} onChange={setColor} />
|
|
304
|
+
<ColorPicker format="rgb" showAlpha />
|
|
305
|
+
`
|
|
306
|
+
},
|
|
307
|
+
"file-upload": {
|
|
308
|
+
name: "FileUpload",
|
|
309
|
+
description: "File upload with drag-and-drop",
|
|
310
|
+
category: "Form",
|
|
311
|
+
code: `import { FileUpload } from "@reeverdev/ui";
|
|
312
|
+
|
|
313
|
+
// Usage
|
|
314
|
+
<FileUpload accept="image/*" onUpload={handleUpload} />
|
|
315
|
+
<FileUpload multiple maxSize={5 * 1024 * 1024} />
|
|
316
|
+
`
|
|
317
|
+
},
|
|
318
|
+
"input-otp": {
|
|
319
|
+
name: "InputOTP",
|
|
320
|
+
description: "One-time password input",
|
|
321
|
+
category: "Form",
|
|
322
|
+
code: `import { InputOTP } from "@reeverdev/ui";
|
|
323
|
+
|
|
324
|
+
// Usage
|
|
325
|
+
<InputOTP length={6} value={otp} onChange={setOtp} />
|
|
253
326
|
`
|
|
254
327
|
},
|
|
255
|
-
|
|
256
|
-
name: "
|
|
257
|
-
description: "
|
|
328
|
+
"password-input": {
|
|
329
|
+
name: "PasswordInput",
|
|
330
|
+
description: "Password input with show/hide toggle",
|
|
258
331
|
category: "Form",
|
|
259
|
-
code:
|
|
260
|
-
|
|
332
|
+
code: `import { PasswordInput } from "@reeverdev/ui";
|
|
333
|
+
|
|
334
|
+
// Usage
|
|
335
|
+
<PasswordInput value={password} onChange={setPassword} />
|
|
336
|
+
<PasswordInput showStrength />
|
|
261
337
|
`
|
|
262
338
|
},
|
|
339
|
+
"signature-pad": {
|
|
340
|
+
name: "SignaturePad",
|
|
341
|
+
description: "Canvas-based signature input with export",
|
|
342
|
+
category: "Form",
|
|
343
|
+
code: `import { SignaturePad } from "@reeverdev/ui";
|
|
344
|
+
|
|
345
|
+
// Usage
|
|
346
|
+
<SignaturePad showControls onExport={(dataUrl) => console.log(dataUrl)} />
|
|
347
|
+
<SignaturePad strokeColor="#000" strokeWidth={2} />
|
|
348
|
+
`
|
|
349
|
+
},
|
|
350
|
+
// ============ DATA DISPLAY ============
|
|
263
351
|
avatar: {
|
|
264
352
|
name: "Avatar",
|
|
265
|
-
description: "User avatar",
|
|
353
|
+
description: "User avatar with fallback",
|
|
266
354
|
category: "Data Display",
|
|
267
|
-
code:
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
355
|
+
code: `import { Avatar, AvatarGroup } from "@reeverdev/ui";
|
|
356
|
+
|
|
357
|
+
// Usage
|
|
358
|
+
<Avatar src="/avatar.jpg" fallback="JD" size="md" />
|
|
359
|
+
<AvatarGroup max={3}>
|
|
360
|
+
<Avatar src="/1.jpg" />
|
|
361
|
+
<Avatar src="/2.jpg" />
|
|
362
|
+
</AvatarGroup>
|
|
363
|
+
`
|
|
271
364
|
},
|
|
272
365
|
badge: {
|
|
273
366
|
name: "Badge",
|
|
274
|
-
description: "Status badge",
|
|
275
|
-
category: "
|
|
276
|
-
code:
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
367
|
+
description: "Status badge indicator",
|
|
368
|
+
category: "Data Display",
|
|
369
|
+
code: `import { Badge } from "@reeverdev/ui";
|
|
370
|
+
|
|
371
|
+
// Usage
|
|
372
|
+
<Badge color="success">Active</Badge>
|
|
373
|
+
<Badge variant="bordered" color="warning">Pending</Badge>
|
|
374
|
+
`
|
|
280
375
|
},
|
|
281
|
-
|
|
282
|
-
name: "
|
|
283
|
-
description: "
|
|
284
|
-
category: "
|
|
285
|
-
code:
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
376
|
+
chip: {
|
|
377
|
+
name: "Chip",
|
|
378
|
+
description: "Compact element for tags and filters",
|
|
379
|
+
category: "Data Display",
|
|
380
|
+
code: `import { Chip } from "@reeverdev/ui";
|
|
381
|
+
|
|
382
|
+
// Usage
|
|
383
|
+
<Chip color="primary">React</Chip>
|
|
384
|
+
<Chip onClose={handleClose} isCloseable>Removable</Chip>
|
|
385
|
+
`
|
|
289
386
|
},
|
|
290
|
-
|
|
291
|
-
name: "
|
|
292
|
-
description: "
|
|
387
|
+
card: {
|
|
388
|
+
name: "Card",
|
|
389
|
+
description: "Container card with header, body, footer",
|
|
390
|
+
category: "Data Display",
|
|
391
|
+
code: `import { Card, CardHeader, CardBody, CardFooter } from "@reeverdev/ui";
|
|
392
|
+
|
|
393
|
+
// Usage
|
|
394
|
+
<Card>
|
|
395
|
+
<CardHeader>Title</CardHeader>
|
|
396
|
+
<CardBody>Content goes here</CardBody>
|
|
397
|
+
<CardFooter>
|
|
398
|
+
<Button>Action</Button>
|
|
399
|
+
</CardFooter>
|
|
400
|
+
</Card>
|
|
401
|
+
`
|
|
402
|
+
},
|
|
403
|
+
table: {
|
|
404
|
+
name: "Table",
|
|
405
|
+
description: "Data table with sorting and selection",
|
|
406
|
+
category: "Data Display",
|
|
407
|
+
code: `import { Table, TableHeader, TableBody, TableRow, TableHead, TableCell } from "@reeverdev/ui";
|
|
408
|
+
|
|
409
|
+
// Usage
|
|
410
|
+
<Table>
|
|
411
|
+
<TableHeader>
|
|
412
|
+
<TableRow>
|
|
413
|
+
<TableHead>Name</TableHead>
|
|
414
|
+
<TableHead>Email</TableHead>
|
|
415
|
+
</TableRow>
|
|
416
|
+
</TableHeader>
|
|
417
|
+
<TableBody>
|
|
418
|
+
<TableRow>
|
|
419
|
+
<TableCell>John</TableCell>
|
|
420
|
+
<TableCell>john@example.com</TableCell>
|
|
421
|
+
</TableRow>
|
|
422
|
+
</TableBody>
|
|
423
|
+
</Table>
|
|
424
|
+
`
|
|
425
|
+
},
|
|
426
|
+
calendar: {
|
|
427
|
+
name: "Calendar",
|
|
428
|
+
description: "Calendar display for date selection",
|
|
429
|
+
category: "Data Display",
|
|
430
|
+
code: `import { Calendar } from "@reeverdev/ui";
|
|
431
|
+
|
|
432
|
+
// Usage
|
|
433
|
+
<Calendar value={date} onChange={setDate} />
|
|
434
|
+
<Calendar minDate={new Date()} maxDate={maxDate} />
|
|
435
|
+
`
|
|
436
|
+
},
|
|
437
|
+
"heatmap-calendar": {
|
|
438
|
+
name: "HeatmapCalendar",
|
|
439
|
+
description: "GitHub-style contribution heatmap",
|
|
440
|
+
category: "Data Display",
|
|
441
|
+
code: `import { HeatmapCalendar } from "@reeverdev/ui";
|
|
442
|
+
|
|
443
|
+
// Usage
|
|
444
|
+
<HeatmapCalendar data={contributions} />
|
|
445
|
+
`
|
|
446
|
+
},
|
|
447
|
+
timeline: {
|
|
448
|
+
name: "Timeline",
|
|
449
|
+
description: "Vertical timeline for events",
|
|
450
|
+
category: "Data Display",
|
|
451
|
+
code: `import { Timeline, TimelineItem } from "@reeverdev/ui";
|
|
452
|
+
|
|
453
|
+
// Usage
|
|
454
|
+
<Timeline>
|
|
455
|
+
<TimelineItem>Event 1</TimelineItem>
|
|
456
|
+
<TimelineItem>Event 2</TimelineItem>
|
|
457
|
+
</Timeline>
|
|
458
|
+
`
|
|
459
|
+
},
|
|
460
|
+
rating: {
|
|
461
|
+
name: "Rating",
|
|
462
|
+
description: "Star rating input",
|
|
463
|
+
category: "Data Display",
|
|
464
|
+
code: `import { Rating } from "@reeverdev/ui";
|
|
465
|
+
|
|
466
|
+
// Usage
|
|
467
|
+
<Rating value={4} onChange={setRating} max={5} />
|
|
468
|
+
<Rating isReadOnly value={4.5} />
|
|
469
|
+
`
|
|
470
|
+
},
|
|
471
|
+
code: {
|
|
472
|
+
name: "Code",
|
|
473
|
+
description: "Syntax highlighted code display",
|
|
474
|
+
category: "Data Display",
|
|
475
|
+
code: `import { Code, Snippet } from "@reeverdev/ui";
|
|
476
|
+
|
|
477
|
+
// Usage
|
|
478
|
+
<Code language="typescript">const x = 1;</Code>
|
|
479
|
+
<Snippet>npm install @reeverdev/ui</Snippet>
|
|
480
|
+
`
|
|
481
|
+
},
|
|
482
|
+
user: {
|
|
483
|
+
name: "User",
|
|
484
|
+
description: "User display with avatar and info",
|
|
485
|
+
category: "Data Display",
|
|
486
|
+
code: `import { User } from "@reeverdev/ui";
|
|
487
|
+
|
|
488
|
+
// Usage
|
|
489
|
+
<User name="John Doe" description="Developer" avatarSrc="/avatar.jpg" />
|
|
490
|
+
`
|
|
491
|
+
},
|
|
492
|
+
// ============ NAVIGATION ============
|
|
493
|
+
navbar: {
|
|
494
|
+
name: "Navbar",
|
|
495
|
+
description: "Responsive navigation bar",
|
|
496
|
+
category: "Navigation",
|
|
497
|
+
code: `import { Navbar, NavbarBrand, NavbarContent, NavbarItem } from "@reeverdev/ui";
|
|
498
|
+
|
|
499
|
+
// Usage
|
|
500
|
+
<Navbar>
|
|
501
|
+
<NavbarBrand>Logo</NavbarBrand>
|
|
502
|
+
<NavbarContent>
|
|
503
|
+
<NavbarItem>Home</NavbarItem>
|
|
504
|
+
<NavbarItem>About</NavbarItem>
|
|
505
|
+
</NavbarContent>
|
|
506
|
+
</Navbar>
|
|
507
|
+
`
|
|
508
|
+
},
|
|
509
|
+
sidebar: {
|
|
510
|
+
name: "Sidebar",
|
|
511
|
+
description: "Collapsible sidebar navigation",
|
|
512
|
+
category: "Navigation",
|
|
513
|
+
code: `import { Sidebar, SidebarItem } from "@reeverdev/ui";
|
|
514
|
+
|
|
515
|
+
// Usage
|
|
516
|
+
<Sidebar>
|
|
517
|
+
<SidebarItem icon={<Home />}>Dashboard</SidebarItem>
|
|
518
|
+
<SidebarItem icon={<Settings />}>Settings</SidebarItem>
|
|
519
|
+
</Sidebar>
|
|
520
|
+
`
|
|
521
|
+
},
|
|
522
|
+
breadcrumb: {
|
|
523
|
+
name: "Breadcrumb",
|
|
524
|
+
description: "Breadcrumb navigation trail",
|
|
525
|
+
category: "Navigation",
|
|
526
|
+
code: `import { Breadcrumb, BreadcrumbItem } from "@reeverdev/ui";
|
|
527
|
+
|
|
528
|
+
// Usage
|
|
529
|
+
<Breadcrumb>
|
|
530
|
+
<BreadcrumbItem href="/">Home</BreadcrumbItem>
|
|
531
|
+
<BreadcrumbItem href="/docs">Docs</BreadcrumbItem>
|
|
532
|
+
<BreadcrumbItem>Current</BreadcrumbItem>
|
|
533
|
+
</Breadcrumb>
|
|
534
|
+
`
|
|
535
|
+
},
|
|
536
|
+
pagination: {
|
|
537
|
+
name: "Pagination",
|
|
538
|
+
description: "Page navigation with numbers",
|
|
539
|
+
category: "Navigation",
|
|
540
|
+
code: `import { Pagination } from "@reeverdev/ui";
|
|
541
|
+
|
|
542
|
+
// Usage
|
|
543
|
+
<Pagination total={100} page={page} onChange={setPage} />
|
|
544
|
+
<Pagination total={50} siblings={2} />
|
|
545
|
+
`
|
|
546
|
+
},
|
|
547
|
+
tabs: {
|
|
548
|
+
name: "Tabs",
|
|
549
|
+
description: "Tabbed interface for views",
|
|
550
|
+
category: "Navigation",
|
|
551
|
+
code: `import { Tabs, TabsList, TabsTrigger, TabsContent } from "@reeverdev/ui";
|
|
552
|
+
|
|
553
|
+
// Usage
|
|
554
|
+
<Tabs value={tab} onValueChange={setTab}>
|
|
555
|
+
<TabsList>
|
|
556
|
+
<TabsTrigger value="tab1">Tab 1</TabsTrigger>
|
|
557
|
+
<TabsTrigger value="tab2">Tab 2</TabsTrigger>
|
|
558
|
+
</TabsList>
|
|
559
|
+
<TabsContent value="tab1">Content 1</TabsContent>
|
|
560
|
+
<TabsContent value="tab2">Content 2</TabsContent>
|
|
561
|
+
</Tabs>
|
|
562
|
+
`
|
|
563
|
+
},
|
|
564
|
+
steps: {
|
|
565
|
+
name: "Steps",
|
|
566
|
+
description: "Step indicator for processes",
|
|
567
|
+
category: "Navigation",
|
|
568
|
+
code: `import { Steps, Step } from "@reeverdev/ui";
|
|
569
|
+
|
|
570
|
+
// Usage
|
|
571
|
+
<Steps current={1}>
|
|
572
|
+
<Step title="Step 1" description="First step" />
|
|
573
|
+
<Step title="Step 2" description="Second step" />
|
|
574
|
+
<Step title="Step 3" description="Final step" />
|
|
575
|
+
</Steps>
|
|
576
|
+
`
|
|
577
|
+
},
|
|
578
|
+
// ============ OVERLAY ============
|
|
579
|
+
modal: {
|
|
580
|
+
name: "Modal",
|
|
581
|
+
description: "Modal dialog with customizable size",
|
|
293
582
|
category: "Overlay",
|
|
294
|
-
code:
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
583
|
+
code: `import { Modal, ModalHeader, ModalBody, ModalFooter, ModalTitle } from "@reeverdev/ui";
|
|
584
|
+
|
|
585
|
+
// Usage
|
|
586
|
+
<Modal open={open} onOpenChange={setOpen}>
|
|
587
|
+
<ModalHeader>
|
|
588
|
+
<ModalTitle>Title</ModalTitle>
|
|
589
|
+
</ModalHeader>
|
|
590
|
+
<ModalBody>Content</ModalBody>
|
|
591
|
+
<ModalFooter>
|
|
592
|
+
<Button>Close</Button>
|
|
593
|
+
</ModalFooter>
|
|
594
|
+
</Modal>
|
|
595
|
+
`
|
|
596
|
+
},
|
|
597
|
+
"confirm-dialog": {
|
|
598
|
+
name: "ConfirmDialog",
|
|
599
|
+
description: "Confirmation dialog for destructive actions",
|
|
600
|
+
category: "Overlay",
|
|
601
|
+
code: `import { ConfirmDialog, Button } from "@reeverdev/ui";
|
|
602
|
+
|
|
603
|
+
// Usage
|
|
604
|
+
<ConfirmDialog
|
|
605
|
+
trigger={<Button color="danger">Delete</Button>}
|
|
606
|
+
title="Delete Item"
|
|
607
|
+
description="This action cannot be undone."
|
|
608
|
+
onConfirm={() => handleDelete()}
|
|
609
|
+
/>
|
|
610
|
+
|
|
611
|
+
// Variants: danger, warning, info
|
|
612
|
+
<ConfirmDialog variant="warning" title="Archive?" confirmText="Archive" />
|
|
613
|
+
`
|
|
614
|
+
},
|
|
615
|
+
drawer: {
|
|
616
|
+
name: "Drawer",
|
|
617
|
+
description: "Slide-out panel from any edge",
|
|
618
|
+
category: "Overlay",
|
|
619
|
+
code: `import { Drawer, DrawerContent } from "@reeverdev/ui";
|
|
620
|
+
|
|
621
|
+
// Usage
|
|
622
|
+
<Drawer open={open} onOpenChange={setOpen} side="right">
|
|
623
|
+
<DrawerContent>
|
|
624
|
+
<h2>Drawer Content</h2>
|
|
625
|
+
</DrawerContent>
|
|
626
|
+
</Drawer>
|
|
627
|
+
`
|
|
298
628
|
},
|
|
299
629
|
popover: {
|
|
300
630
|
name: "Popover",
|
|
301
|
-
description: "
|
|
631
|
+
description: "Floating content panel",
|
|
302
632
|
category: "Overlay",
|
|
303
|
-
code:
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
633
|
+
code: `import { Popover, PopoverTrigger, PopoverContent } from "@reeverdev/ui";
|
|
634
|
+
|
|
635
|
+
// Usage
|
|
636
|
+
<Popover>
|
|
637
|
+
<PopoverTrigger>
|
|
638
|
+
<Button>Open</Button>
|
|
639
|
+
</PopoverTrigger>
|
|
640
|
+
<PopoverContent>
|
|
641
|
+
Popover content here
|
|
642
|
+
</PopoverContent>
|
|
643
|
+
</Popover>
|
|
644
|
+
`
|
|
307
645
|
},
|
|
308
646
|
tooltip: {
|
|
309
647
|
name: "Tooltip",
|
|
310
|
-
description: "
|
|
648
|
+
description: "Informational popup on hover",
|
|
311
649
|
category: "Overlay",
|
|
312
|
-
code:
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
650
|
+
code: `import { Tooltip, TooltipTrigger, TooltipContent } from "@reeverdev/ui";
|
|
651
|
+
|
|
652
|
+
// Usage
|
|
653
|
+
<Tooltip>
|
|
654
|
+
<TooltipTrigger>
|
|
655
|
+
<Button>Hover me</Button>
|
|
656
|
+
</TooltipTrigger>
|
|
657
|
+
<TooltipContent>Tooltip text</TooltipContent>
|
|
658
|
+
</Tooltip>
|
|
659
|
+
`
|
|
316
660
|
},
|
|
317
|
-
|
|
318
|
-
name: "
|
|
319
|
-
description: "
|
|
320
|
-
category: "
|
|
321
|
-
code:
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
661
|
+
dropdown: {
|
|
662
|
+
name: "Dropdown",
|
|
663
|
+
description: "Dropdown menu with items",
|
|
664
|
+
category: "Overlay",
|
|
665
|
+
code: `import { Dropdown, DropdownTrigger, DropdownContent, DropdownItem } from "@reeverdev/ui";
|
|
666
|
+
|
|
667
|
+
// Usage
|
|
668
|
+
<Dropdown>
|
|
669
|
+
<DropdownTrigger>
|
|
670
|
+
<Button>Menu</Button>
|
|
671
|
+
</DropdownTrigger>
|
|
672
|
+
<DropdownContent>
|
|
673
|
+
<DropdownItem>Edit</DropdownItem>
|
|
674
|
+
<DropdownItem>Delete</DropdownItem>
|
|
675
|
+
</DropdownContent>
|
|
676
|
+
</Dropdown>
|
|
677
|
+
`
|
|
325
678
|
},
|
|
326
|
-
|
|
327
|
-
name: "
|
|
328
|
-
description: "
|
|
329
|
-
category: "
|
|
330
|
-
code:
|
|
331
|
-
|
|
679
|
+
"context-menu": {
|
|
680
|
+
name: "ContextMenu",
|
|
681
|
+
description: "Right-click context menu",
|
|
682
|
+
category: "Overlay",
|
|
683
|
+
code: `import { ContextMenu, ContextMenuTrigger, ContextMenuContent, ContextMenuItem } from "@reeverdev/ui";
|
|
684
|
+
|
|
685
|
+
// Usage
|
|
686
|
+
<ContextMenu>
|
|
687
|
+
<ContextMenuTrigger>
|
|
688
|
+
<div>Right click here</div>
|
|
689
|
+
</ContextMenuTrigger>
|
|
690
|
+
<ContextMenuContent>
|
|
691
|
+
<ContextMenuItem>Copy</ContextMenuItem>
|
|
692
|
+
<ContextMenuItem>Paste</ContextMenuItem>
|
|
693
|
+
</ContextMenuContent>
|
|
694
|
+
</ContextMenu>
|
|
695
|
+
`
|
|
696
|
+
},
|
|
697
|
+
command: {
|
|
698
|
+
name: "Command",
|
|
699
|
+
description: "Command palette with search",
|
|
700
|
+
category: "Overlay",
|
|
701
|
+
code: `import { Command, CommandInput, CommandList, CommandItem } from "@reeverdev/ui";
|
|
702
|
+
|
|
703
|
+
// Usage
|
|
704
|
+
<Command>
|
|
705
|
+
<CommandInput placeholder="Search..." />
|
|
706
|
+
<CommandList>
|
|
707
|
+
<CommandItem>Dashboard</CommandItem>
|
|
708
|
+
<CommandItem>Settings</CommandItem>
|
|
709
|
+
</CommandList>
|
|
710
|
+
</Command>
|
|
711
|
+
`
|
|
712
|
+
},
|
|
713
|
+
// ============ FEEDBACK ============
|
|
714
|
+
alert: {
|
|
715
|
+
name: "Alert",
|
|
716
|
+
description: "Static alert message",
|
|
717
|
+
category: "Feedback",
|
|
718
|
+
code: `import { Alert, AlertTitle, AlertDescription } from "@reeverdev/ui";
|
|
719
|
+
|
|
720
|
+
// Usage
|
|
721
|
+
<Alert variant="success">
|
|
722
|
+
<AlertTitle>Success!</AlertTitle>
|
|
723
|
+
<AlertDescription>Operation completed.</AlertDescription>
|
|
724
|
+
</Alert>
|
|
725
|
+
`
|
|
726
|
+
},
|
|
727
|
+
toast: {
|
|
728
|
+
name: "Toast",
|
|
729
|
+
description: "Temporary notification",
|
|
730
|
+
category: "Feedback",
|
|
731
|
+
code: `import { toast, Toaster } from "@reeverdev/ui";
|
|
732
|
+
|
|
733
|
+
// Add Toaster to your app root
|
|
734
|
+
<Toaster />
|
|
735
|
+
|
|
736
|
+
// Usage
|
|
737
|
+
toast.success("Saved successfully!");
|
|
738
|
+
toast.error("Something went wrong");
|
|
739
|
+
toast.info("New update available");
|
|
332
740
|
`,
|
|
333
|
-
dependencies: ["
|
|
741
|
+
dependencies: ["sonner"]
|
|
334
742
|
},
|
|
335
743
|
progress: {
|
|
336
744
|
name: "Progress",
|
|
337
|
-
description: "
|
|
745
|
+
description: "Linear progress bar",
|
|
338
746
|
category: "Feedback",
|
|
339
|
-
code:
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
747
|
+
code: `import { Progress, CircularProgress } from "@reeverdev/ui";
|
|
748
|
+
|
|
749
|
+
// Usage
|
|
750
|
+
<Progress value={75} max={100} />
|
|
751
|
+
<CircularProgress value={60} showValue />
|
|
752
|
+
`
|
|
753
|
+
},
|
|
754
|
+
spinner: {
|
|
755
|
+
name: "Spinner",
|
|
756
|
+
description: "Loading spinner",
|
|
757
|
+
category: "Feedback",
|
|
758
|
+
code: `import { Spinner } from "@reeverdev/ui";
|
|
759
|
+
|
|
760
|
+
// Usage
|
|
761
|
+
<Spinner size="md" />
|
|
762
|
+
<Spinner color="primary" />
|
|
763
|
+
`
|
|
343
764
|
},
|
|
344
765
|
skeleton: {
|
|
345
766
|
name: "Skeleton",
|
|
346
|
-
description: "Loading
|
|
767
|
+
description: "Loading placeholder",
|
|
347
768
|
category: "Feedback",
|
|
348
|
-
code:
|
|
349
|
-
|
|
769
|
+
code: `import { Skeleton } from "@reeverdev/ui";
|
|
770
|
+
|
|
771
|
+
// Usage
|
|
772
|
+
<Skeleton className="w-full h-4" />
|
|
773
|
+
<Skeleton isLoaded={!loading}>
|
|
774
|
+
<div>Content</div>
|
|
775
|
+
</Skeleton>
|
|
776
|
+
`
|
|
777
|
+
},
|
|
778
|
+
// ============ LAYOUT ============
|
|
779
|
+
accordion: {
|
|
780
|
+
name: "Accordion",
|
|
781
|
+
description: "Collapsible content sections",
|
|
782
|
+
category: "Layout",
|
|
783
|
+
code: `import { Accordion, AccordionItem, AccordionTrigger, AccordionContent } from "@reeverdev/ui";
|
|
784
|
+
|
|
785
|
+
// Usage
|
|
786
|
+
<Accordion type="single" collapsible>
|
|
787
|
+
<AccordionItem value="item-1">
|
|
788
|
+
<AccordionTrigger>Section 1</AccordionTrigger>
|
|
789
|
+
<AccordionContent>Content 1</AccordionContent>
|
|
790
|
+
</AccordionItem>
|
|
791
|
+
</Accordion>
|
|
792
|
+
`
|
|
793
|
+
},
|
|
794
|
+
resizable: {
|
|
795
|
+
name: "Resizable",
|
|
796
|
+
description: "Resizable panel layout",
|
|
797
|
+
category: "Layout",
|
|
798
|
+
code: `import { ResizablePanelGroup, ResizablePanel, ResizableHandle } from "@reeverdev/ui";
|
|
799
|
+
|
|
800
|
+
// Usage
|
|
801
|
+
<ResizablePanelGroup direction="horizontal">
|
|
802
|
+
<ResizablePanel>Left</ResizablePanel>
|
|
803
|
+
<ResizableHandle />
|
|
804
|
+
<ResizablePanel>Right</ResizablePanel>
|
|
805
|
+
</ResizablePanelGroup>
|
|
350
806
|
`
|
|
351
807
|
},
|
|
352
808
|
separator: {
|
|
353
809
|
name: "Separator",
|
|
354
|
-
description: "Visual
|
|
355
|
-
category: "
|
|
356
|
-
code:
|
|
357
|
-
|
|
810
|
+
description: "Visual divider",
|
|
811
|
+
category: "Layout",
|
|
812
|
+
code: `import { Separator } from "@reeverdev/ui";
|
|
813
|
+
|
|
814
|
+
// Usage
|
|
815
|
+
<Separator />
|
|
816
|
+
<Separator orientation="vertical" />
|
|
817
|
+
`
|
|
818
|
+
},
|
|
819
|
+
"scroll-area": {
|
|
820
|
+
name: "ScrollArea",
|
|
821
|
+
description: "Custom scrollbar container",
|
|
822
|
+
category: "Layout",
|
|
823
|
+
code: `import { ScrollArea } from "@reeverdev/ui";
|
|
824
|
+
|
|
825
|
+
// Usage
|
|
826
|
+
<ScrollArea className="h-[200px]">
|
|
827
|
+
<div>Long content...</div>
|
|
828
|
+
</ScrollArea>
|
|
829
|
+
`
|
|
830
|
+
},
|
|
831
|
+
// ============ UTILITY ============
|
|
832
|
+
kbd: {
|
|
833
|
+
name: "Kbd",
|
|
834
|
+
description: "Keyboard key indicator",
|
|
835
|
+
category: "Utility",
|
|
836
|
+
code: `import { Kbd } from "@reeverdev/ui";
|
|
837
|
+
|
|
838
|
+
// Usage
|
|
839
|
+
<Kbd>\u2318</Kbd> + <Kbd>K</Kbd>
|
|
840
|
+
`
|
|
841
|
+
},
|
|
842
|
+
"skip-link": {
|
|
843
|
+
name: "SkipLink",
|
|
844
|
+
description: "Accessibility skip link (WCAG 2.4.1)",
|
|
845
|
+
category: "Utility",
|
|
846
|
+
code: `import { SkipLink } from "@reeverdev/ui";
|
|
847
|
+
|
|
848
|
+
// Usage - place at the beginning of your layout
|
|
849
|
+
<SkipLink href="#main-content">Skip to main content</SkipLink>
|
|
850
|
+
|
|
851
|
+
// Target element
|
|
852
|
+
<main id="main-content">...</main>
|
|
853
|
+
`
|
|
854
|
+
},
|
|
855
|
+
"qr-code": {
|
|
856
|
+
name: "QRCode",
|
|
857
|
+
description: "QR code generator",
|
|
858
|
+
category: "Utility",
|
|
859
|
+
code: `import { QRCode } from "@reeverdev/ui";
|
|
860
|
+
|
|
861
|
+
// Usage
|
|
862
|
+
<QRCode value="https://reever.app" size={200} />
|
|
863
|
+
`
|
|
864
|
+
},
|
|
865
|
+
// ============ RICH COMPONENTS ============
|
|
866
|
+
carousel: {
|
|
867
|
+
name: "Carousel",
|
|
868
|
+
description: "Image/content carousel",
|
|
869
|
+
category: "Rich",
|
|
870
|
+
code: `import { Carousel, CarouselContent, CarouselItem, CarouselPrevious, CarouselNext } from "@reeverdev/ui";
|
|
871
|
+
|
|
872
|
+
// Usage
|
|
873
|
+
<Carousel>
|
|
874
|
+
<CarouselContent>
|
|
875
|
+
<CarouselItem>Slide 1</CarouselItem>
|
|
876
|
+
<CarouselItem>Slide 2</CarouselItem>
|
|
877
|
+
</CarouselContent>
|
|
878
|
+
<CarouselPrevious />
|
|
879
|
+
<CarouselNext />
|
|
880
|
+
</Carousel>
|
|
881
|
+
`,
|
|
882
|
+
dependencies: ["embla-carousel-react"]
|
|
883
|
+
},
|
|
884
|
+
charts: {
|
|
885
|
+
name: "Charts",
|
|
886
|
+
description: "Data visualization charts",
|
|
887
|
+
category: "Rich",
|
|
888
|
+
code: `import { LineChart, BarChart, PieChart } from "@reeverdev/ui";
|
|
889
|
+
|
|
890
|
+
// Usage
|
|
891
|
+
<LineChart data={data}>
|
|
892
|
+
<Line dataKey="value" />
|
|
893
|
+
<XAxis dataKey="name" />
|
|
894
|
+
</LineChart>
|
|
358
895
|
`,
|
|
359
|
-
dependencies: ["
|
|
896
|
+
dependencies: ["recharts"]
|
|
360
897
|
}
|
|
361
898
|
};
|
|
362
899
|
function getComponent(name) {
|
|
363
|
-
return COMPONENTS[name];
|
|
900
|
+
return COMPONENTS[name.toLowerCase()];
|
|
364
901
|
}
|
|
365
902
|
function getComponentDependencies(name) {
|
|
366
|
-
const component = COMPONENTS[name];
|
|
903
|
+
const component = COMPONENTS[name.toLowerCase()];
|
|
367
904
|
if (!component) return [];
|
|
368
|
-
return component.
|
|
905
|
+
return component.dependencies || [];
|
|
369
906
|
}
|
|
370
907
|
|
|
371
908
|
// commands/add.ts
|
package/package.json
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reeverdev/ui-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "CLI tool for Reever UI component library",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"reever-ui": "./dist/index.js"
|
|
8
8
|
},
|
|
9
9
|
"files": [
|
|
10
|
-
"dist"
|
|
10
|
+
"dist",
|
|
11
|
+
"README.md"
|
|
11
12
|
],
|
|
12
13
|
"scripts": {
|
|
13
14
|
"build": "tsup index.ts --format esm",
|