@reinvented/design 0.2.0 → 0.3.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 +105 -0
- package/docs/components/alert-dialog.md +32 -0
- package/docs/components/avatar.md +14 -0
- package/docs/components/badge.md +24 -0
- package/docs/components/button.md +69 -0
- package/docs/components/card.md +49 -0
- package/docs/components/dialog.md +46 -0
- package/docs/components/dropdown-menu.md +32 -0
- package/docs/components/index.md +69 -50
- package/docs/components/input.md +34 -0
- package/docs/components/remaining-components.md +253 -0
- package/docs/components/scroll-area.md +17 -0
- package/docs/components/select.md +31 -0
- package/docs/components/separator.md +14 -0
- package/docs/components/sheet.md +32 -0
- package/docs/components/skeleton.md +20 -0
- package/docs/components/table.md +33 -0
- package/docs/components/tabs.md +23 -0
- package/docs/layouts/dashboard.md +70 -0
- package/docs/layouts/detail-page.md +83 -0
- package/docs/layouts/index.md +37 -24
- package/docs/layouts/list-page.md +107 -0
- package/docs/layouts/settings-page.md +79 -0
- package/docs/layouts/step-wizard.md +73 -0
- package/package.json +7 -3
- package/src/components/ui/accordion/Accordion.vue +13 -0
- package/src/components/ui/accordion/AccordionContent.vue +20 -0
- package/src/components/ui/accordion/AccordionItem.vue +15 -0
- package/src/components/ui/accordion/AccordionTrigger.vue +25 -0
- package/src/components/ui/accordion/index.ts +4 -0
- package/src/components/ui/alert/Alert.vue +38 -0
- package/src/components/ui/alert/AlertDescription.vue +12 -0
- package/src/components/ui/alert/AlertTitle.vue +12 -0
- package/src/components/ui/alert/index.ts +3 -0
- package/src/components/ui/alert-dialog/AlertDialog.vue +13 -0
- package/src/components/ui/alert-dialog/AlertDialogAction.vue +21 -0
- package/src/components/ui/alert-dialog/AlertDialogCancel.vue +21 -0
- package/src/components/ui/alert-dialog/AlertDialogContent.vue +39 -0
- package/src/components/ui/alert-dialog/AlertDialogDescription.vue +15 -0
- package/src/components/ui/alert-dialog/AlertDialogFooter.vue +12 -0
- package/src/components/ui/alert-dialog/AlertDialogHeader.vue +12 -0
- package/src/components/ui/alert-dialog/AlertDialogTitle.vue +15 -0
- package/src/components/ui/alert-dialog/AlertDialogTrigger.vue +11 -0
- package/src/components/ui/alert-dialog/index.ts +9 -0
- package/src/components/ui/breadcrumb/Breadcrumb.vue +6 -0
- package/src/components/ui/breadcrumb/BreadcrumbEllipsis.vue +12 -0
- package/src/components/ui/breadcrumb/BreadcrumbItem.vue +6 -0
- package/src/components/ui/breadcrumb/BreadcrumbLink.vue +20 -0
- package/src/components/ui/breadcrumb/BreadcrumbList.vue +6 -0
- package/src/components/ui/breadcrumb/BreadcrumbPage.vue +6 -0
- package/src/components/ui/breadcrumb/BreadcrumbSeparator.vue +11 -0
- package/src/components/ui/breadcrumb/index.ts +7 -0
- package/src/components/ui/button/Button.vue +0 -1
- package/src/components/ui/checkbox/Checkbox.vue +25 -0
- package/src/components/ui/checkbox/index.ts +1 -0
- package/src/components/ui/collapsible/Collapsible.vue +13 -0
- package/src/components/ui/collapsible/index.ts +2 -0
- package/src/components/ui/command/Command.vue +16 -0
- package/src/components/ui/command/CommandEmpty.vue +5 -0
- package/src/components/ui/command/CommandGroup.vue +22 -0
- package/src/components/ui/command/CommandInput.vue +21 -0
- package/src/components/ui/command/CommandItem.vue +22 -0
- package/src/components/ui/command/CommandList.vue +17 -0
- package/src/components/ui/command/CommandSeparator.vue +5 -0
- package/src/components/ui/command/index.ts +7 -0
- package/src/components/ui/context-menu/ContextMenuContent.vue +24 -0
- package/src/components/ui/context-menu/ContextMenuItem.vue +16 -0
- package/src/components/ui/context-menu/ContextMenuLabel.vue +9 -0
- package/src/components/ui/context-menu/ContextMenuSeparator.vue +9 -0
- package/src/components/ui/context-menu/ContextMenuSubContent.vue +14 -0
- package/src/components/ui/context-menu/index.ts +9 -0
- package/src/components/ui/dialog/Dialog.vue +14 -0
- package/src/components/ui/dialog/DialogClose.vue +12 -0
- package/src/components/ui/dialog/DialogContent.vue +48 -0
- package/src/components/ui/dialog/DialogDescription.vue +23 -0
- package/src/components/ui/dialog/DialogFooter.vue +12 -0
- package/src/components/ui/dialog/DialogHeader.vue +12 -0
- package/src/components/ui/dialog/DialogScrollContent.vue +47 -0
- package/src/components/ui/dialog/DialogTitle.vue +23 -0
- package/src/components/ui/dialog/DialogTrigger.vue +12 -0
- package/src/components/ui/dialog/index.ts +9 -0
- package/src/components/ui/dropdown-menu/DropdownMenu.vue +13 -0
- package/src/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue +28 -0
- package/src/components/ui/dropdown-menu/DropdownMenuContent.vue +33 -0
- package/src/components/ui/dropdown-menu/DropdownMenuGroup.vue +11 -0
- package/src/components/ui/dropdown-menu/DropdownMenuItem.vue +27 -0
- package/src/components/ui/dropdown-menu/DropdownMenuLabel.vue +23 -0
- package/src/components/ui/dropdown-menu/DropdownMenuRadioGroup.vue +13 -0
- package/src/components/ui/dropdown-menu/DropdownMenuRadioItem.vue +27 -0
- package/src/components/ui/dropdown-menu/DropdownMenuSeparator.vue +13 -0
- package/src/components/ui/dropdown-menu/DropdownMenuShortcut.vue +12 -0
- package/src/components/ui/dropdown-menu/DropdownMenuSub.vue +13 -0
- package/src/components/ui/dropdown-menu/DropdownMenuSubContent.vue +27 -0
- package/src/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue +23 -0
- package/src/components/ui/dropdown-menu/DropdownMenuTrigger.vue +11 -0
- package/src/components/ui/dropdown-menu/index.ts +14 -0
- package/src/components/ui/form/FormControl.vue +3 -0
- package/src/components/ui/form/FormDescription.vue +6 -0
- package/src/components/ui/form/FormItem.vue +6 -0
- package/src/components/ui/form/FormLabel.vue +10 -0
- package/src/components/ui/form/FormMessage.vue +10 -0
- package/src/components/ui/form/index.ts +9 -0
- package/src/components/ui/hover-card/HoverCard.vue +13 -0
- package/src/components/ui/hover-card/HoverCardContent.vue +26 -0
- package/src/components/ui/hover-card/HoverCardTrigger.vue +11 -0
- package/src/components/ui/hover-card/index.ts +3 -0
- package/src/components/ui/label/Label.vue +18 -0
- package/src/components/ui/label/index.ts +1 -0
- package/src/components/ui/menubar/MenubarContent.vue +15 -0
- package/src/components/ui/menubar/MenubarItem.vue +13 -0
- package/src/components/ui/menubar/MenubarTrigger.vue +13 -0
- package/src/components/ui/menubar/index.ts +5 -0
- package/src/components/ui/navigation-menu/NavigationMenuContent.vue +14 -0
- package/src/components/ui/navigation-menu/NavigationMenuTrigger.vue +15 -0
- package/src/components/ui/navigation-menu/index.ts +4 -0
- package/src/components/ui/pagination/PaginationContent.vue +13 -0
- package/src/components/ui/pagination/PaginationEllipsis.vue +12 -0
- package/src/components/ui/pagination/PaginationNext.vue +14 -0
- package/src/components/ui/pagination/PaginationPrev.vue +14 -0
- package/src/components/ui/pagination/index.ts +6 -0
- package/src/components/ui/popover/Popover.vue +13 -0
- package/src/components/ui/popover/PopoverContent.vue +27 -0
- package/src/components/ui/popover/PopoverTrigger.vue +11 -0
- package/src/components/ui/popover/index.ts +3 -0
- package/src/components/ui/progress/Progress.vue +21 -0
- package/src/components/ui/progress/index.ts +1 -0
- package/src/components/ui/radio-group/RadioGroup.vue +16 -0
- package/src/components/ui/radio-group/RadioGroupItem.vue +24 -0
- package/src/components/ui/radio-group/index.ts +2 -0
- package/src/components/ui/select/Select.vue +13 -0
- package/src/components/ui/select/SelectContent.vue +40 -0
- package/src/components/ui/select/SelectGroup.vue +15 -0
- package/src/components/ui/select/SelectItem.vue +30 -0
- package/src/components/ui/select/SelectLabel.vue +15 -0
- package/src/components/ui/select/SelectSeparator.vue +13 -0
- package/src/components/ui/select/SelectTrigger.vue +23 -0
- package/src/components/ui/select/SelectValue.vue +11 -0
- package/src/components/ui/select/index.ts +8 -0
- package/src/components/ui/sheet/Sheet.vue +13 -0
- package/src/components/ui/sheet/SheetClose.vue +11 -0
- package/src/components/ui/sheet/SheetContent.vue +65 -0
- package/src/components/ui/sheet/SheetDescription.vue +15 -0
- package/src/components/ui/sheet/SheetFooter.vue +12 -0
- package/src/components/ui/sheet/SheetHeader.vue +12 -0
- package/src/components/ui/sheet/SheetTitle.vue +15 -0
- package/src/components/ui/sheet/SheetTrigger.vue +11 -0
- package/src/components/ui/sheet/index.ts +8 -0
- package/src/components/ui/slider/Slider.vue +26 -0
- package/src/components/ui/slider/index.ts +1 -0
- package/src/components/ui/switch/Switch.vue +24 -0
- package/src/components/ui/switch/index.ts +1 -0
- package/src/components/ui/table/Table.vue +13 -0
- package/src/components/ui/table/TableBody.vue +6 -0
- package/src/components/ui/table/TableCaption.vue +6 -0
- package/src/components/ui/table/TableCell.vue +6 -0
- package/src/components/ui/table/TableFooter.vue +6 -0
- package/src/components/ui/table/TableHead.vue +6 -0
- package/src/components/ui/table/TableHeader.vue +6 -0
- package/src/components/ui/table/TableRow.vue +6 -0
- package/src/components/ui/table/index.ts +8 -0
- package/src/components/ui/tabs/Tabs.vue +13 -0
- package/src/components/ui/tabs/TabsContent.vue +21 -0
- package/src/components/ui/tabs/TabsList.vue +21 -0
- package/src/components/ui/tabs/TabsTrigger.vue +21 -0
- package/src/components/ui/tabs/index.ts +4 -0
- package/src/components/ui/textarea/Textarea.vue +29 -0
- package/src/components/ui/textarea/index.ts +1 -0
- package/src/components/ui/toggle/Toggle.vue +40 -0
- package/src/components/ui/toggle/index.ts +1 -0
- package/src/components/ui/toggle-group/ToggleGroup.vue +16 -0
- package/src/components/ui/toggle-group/ToggleGroupItem.vue +21 -0
- package/src/components/ui/toggle-group/index.ts +2 -0
- package/src/components/ui/tooltip/Tooltip.vue +13 -0
- package/src/components/ui/tooltip/TooltipContent.vue +27 -0
- package/src/components/ui/tooltip/TooltipProvider.vue +12 -0
- package/src/components/ui/tooltip/TooltipTrigger.vue +11 -0
- package/src/components/ui/tooltip/index.ts +4 -0
- package/src/eslint/index.js +192 -0
- package/src/eslint/recommended.js +64 -0
- package/src/index.ts +46 -192
- package/src/patterns/DetailView.vue +2 -2
- package/src/patterns/EmptyState.vue +2 -2
- package/src/patterns/FormView.vue +2 -2
- package/src/patterns/ListView.vue +2 -2
- package/tsconfig.json +17 -3
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# List Page Layout
|
|
2
|
+
|
|
3
|
+
## When to Use
|
|
4
|
+
- Browse a collection of items (tasks, users, apps)
|
|
5
|
+
- Filterable, searchable, sortable data
|
|
6
|
+
- Paginated or infinite-scroll lists
|
|
7
|
+
|
|
8
|
+
## Skeleton Code
|
|
9
|
+
|
|
10
|
+
```vue
|
|
11
|
+
<script setup>
|
|
12
|
+
import { ref } from 'vue'
|
|
13
|
+
import {
|
|
14
|
+
Button, Input, Select, SelectContent, SelectItem, SelectTrigger, SelectValue,
|
|
15
|
+
Card, CardContent, Badge, Skeleton,
|
|
16
|
+
DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger,
|
|
17
|
+
} from '@reinvented/design'
|
|
18
|
+
import { Plus, Search, MoreHorizontal } from 'lucide-vue-next'
|
|
19
|
+
|
|
20
|
+
const search = ref('')
|
|
21
|
+
const filter = ref('all')
|
|
22
|
+
const items = ref([]) // from GraphQL query
|
|
23
|
+
const loading = ref(true)
|
|
24
|
+
</script>
|
|
25
|
+
|
|
26
|
+
<template>
|
|
27
|
+
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8 space-y-6">
|
|
28
|
+
|
|
29
|
+
<!-- Page Header -->
|
|
30
|
+
<div class="flex items-center justify-between">
|
|
31
|
+
<div>
|
|
32
|
+
<h1 class="text-2xl font-bold tracking-tight">Items</h1>
|
|
33
|
+
<p class="text-muted-foreground">Manage your items.</p>
|
|
34
|
+
</div>
|
|
35
|
+
<Button><Plus class="mr-2 h-4 w-4" /> New Item</Button>
|
|
36
|
+
</div>
|
|
37
|
+
|
|
38
|
+
<!-- Filters Bar -->
|
|
39
|
+
<div class="flex items-center gap-4">
|
|
40
|
+
<div class="relative flex-1 max-w-sm">
|
|
41
|
+
<Search class="absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground" />
|
|
42
|
+
<Input v-model="search" class="pl-9" placeholder="Search items..." />
|
|
43
|
+
</div>
|
|
44
|
+
<Select v-model="filter">
|
|
45
|
+
<SelectTrigger class="w-[150px]">
|
|
46
|
+
<SelectValue placeholder="Filter" />
|
|
47
|
+
</SelectTrigger>
|
|
48
|
+
<SelectContent>
|
|
49
|
+
<SelectItem value="all">All</SelectItem>
|
|
50
|
+
<SelectItem value="active">Active</SelectItem>
|
|
51
|
+
<SelectItem value="archived">Archived</SelectItem>
|
|
52
|
+
</SelectContent>
|
|
53
|
+
</Select>
|
|
54
|
+
</div>
|
|
55
|
+
|
|
56
|
+
<!-- Loading State -->
|
|
57
|
+
<div v-if="loading" class="space-y-3">
|
|
58
|
+
<Skeleton v-for="i in 5" :key="i" class="h-16 w-full rounded-lg" />
|
|
59
|
+
</div>
|
|
60
|
+
|
|
61
|
+
<!-- Empty State -->
|
|
62
|
+
<div v-else-if="items.length === 0" class="flex flex-col items-center justify-center py-12 text-center">
|
|
63
|
+
<div class="rounded-full bg-muted p-4 mb-4">
|
|
64
|
+
<Search class="h-8 w-8 text-muted-foreground" />
|
|
65
|
+
</div>
|
|
66
|
+
<h3 class="text-lg font-semibold">No items found</h3>
|
|
67
|
+
<p class="text-muted-foreground mt-1">Get started by creating your first item.</p>
|
|
68
|
+
<Button class="mt-4"><Plus class="mr-2 h-4 w-4" /> Create Item</Button>
|
|
69
|
+
</div>
|
|
70
|
+
|
|
71
|
+
<!-- Data State -->
|
|
72
|
+
<div v-else class="space-y-3">
|
|
73
|
+
<Card v-for="item in items" :key="item.id" class="hover:shadow-sm transition-shadow">
|
|
74
|
+
<CardContent class="flex items-center justify-between p-4">
|
|
75
|
+
<div class="flex items-center gap-3">
|
|
76
|
+
<div>
|
|
77
|
+
<p class="font-medium">{{ item.name }}</p>
|
|
78
|
+
<p class="text-sm text-muted-foreground">{{ item.description }}</p>
|
|
79
|
+
</div>
|
|
80
|
+
</div>
|
|
81
|
+
<div class="flex items-center gap-2">
|
|
82
|
+
<Badge>{{ item.status }}</Badge>
|
|
83
|
+
<DropdownMenu>
|
|
84
|
+
<DropdownMenuTrigger as-child>
|
|
85
|
+
<Button variant="ghost" size="icon">
|
|
86
|
+
<MoreHorizontal class="h-4 w-4" />
|
|
87
|
+
</Button>
|
|
88
|
+
</DropdownMenuTrigger>
|
|
89
|
+
<DropdownMenuContent align="end">
|
|
90
|
+
<DropdownMenuItem>Edit</DropdownMenuItem>
|
|
91
|
+
<DropdownMenuItem class="text-destructive">Delete</DropdownMenuItem>
|
|
92
|
+
</DropdownMenuContent>
|
|
93
|
+
</DropdownMenu>
|
|
94
|
+
</div>
|
|
95
|
+
</CardContent>
|
|
96
|
+
</Card>
|
|
97
|
+
</div>
|
|
98
|
+
</div>
|
|
99
|
+
</template>
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## Key Patterns
|
|
103
|
+
- **Header**: Title + description + primary CTA
|
|
104
|
+
- **Filters**: Search + dropdown filters in a row
|
|
105
|
+
- **Three states**: Loading (skeletons), empty, data
|
|
106
|
+
- **Item cards**: Name + description + badge + action menu
|
|
107
|
+
- **Empty state**: Icon + message + CTA
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# Settings Page Layout
|
|
2
|
+
|
|
3
|
+
## When to Use
|
|
4
|
+
- User preferences
|
|
5
|
+
- App configuration
|
|
6
|
+
- Account management
|
|
7
|
+
|
|
8
|
+
## Skeleton Code
|
|
9
|
+
|
|
10
|
+
```vue
|
|
11
|
+
<script setup>
|
|
12
|
+
import {
|
|
13
|
+
Button, Input, Label, Separator, Switch, Textarea,
|
|
14
|
+
Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle,
|
|
15
|
+
} from '@reinvented/design'
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<template>
|
|
19
|
+
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8">
|
|
20
|
+
<div class="flex flex-col md:flex-row gap-8">
|
|
21
|
+
|
|
22
|
+
<!-- Sidebar Nav -->
|
|
23
|
+
<nav class="w-full md:w-48 space-y-1">
|
|
24
|
+
<a v-for="section in sections" :key="section.id"
|
|
25
|
+
:href="`#${section.id}`"
|
|
26
|
+
class="block rounded-md px-3 py-2 text-sm font-medium text-muted-foreground hover:bg-muted hover:text-foreground"
|
|
27
|
+
:class="{ 'bg-muted text-foreground': activeSection === section.id }">
|
|
28
|
+
{{ section.label }}
|
|
29
|
+
</a>
|
|
30
|
+
</nav>
|
|
31
|
+
|
|
32
|
+
<!-- Settings Content -->
|
|
33
|
+
<div class="flex-1 space-y-6 max-w-2xl">
|
|
34
|
+
<Card id="profile">
|
|
35
|
+
<CardHeader>
|
|
36
|
+
<CardTitle>Profile</CardTitle>
|
|
37
|
+
<CardDescription>Update your personal information.</CardDescription>
|
|
38
|
+
</CardHeader>
|
|
39
|
+
<CardContent class="space-y-4">
|
|
40
|
+
<div class="space-y-2">
|
|
41
|
+
<Label for="name">Name</Label>
|
|
42
|
+
<Input id="name" placeholder="Your name" />
|
|
43
|
+
</div>
|
|
44
|
+
<div class="space-y-2">
|
|
45
|
+
<Label for="bio">Bio</Label>
|
|
46
|
+
<Textarea id="bio" placeholder="About you" />
|
|
47
|
+
</div>
|
|
48
|
+
</CardContent>
|
|
49
|
+
<CardFooter>
|
|
50
|
+
<Button>Save Changes</Button>
|
|
51
|
+
</CardFooter>
|
|
52
|
+
</Card>
|
|
53
|
+
|
|
54
|
+
<Card id="notifications">
|
|
55
|
+
<CardHeader>
|
|
56
|
+
<CardTitle>Notifications</CardTitle>
|
|
57
|
+
<CardDescription>Choose what notifications you receive.</CardDescription>
|
|
58
|
+
</CardHeader>
|
|
59
|
+
<CardContent class="space-y-4">
|
|
60
|
+
<div class="flex items-center justify-between">
|
|
61
|
+
<div>
|
|
62
|
+
<p class="text-sm font-medium">Email notifications</p>
|
|
63
|
+
<p class="text-sm text-muted-foreground">Receive updates via email.</p>
|
|
64
|
+
</div>
|
|
65
|
+
<Switch />
|
|
66
|
+
</div>
|
|
67
|
+
</CardContent>
|
|
68
|
+
</Card>
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
72
|
+
</template>
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Key Patterns
|
|
76
|
+
- **Sidebar nav** on left, content on right
|
|
77
|
+
- **Each section** is a Card with header + form fields + save button
|
|
78
|
+
- **Switch rows**: Label + description on left, Switch on right
|
|
79
|
+
- **Mobile**: sidebar stacks above content
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# Step Wizard Layout
|
|
2
|
+
|
|
3
|
+
## When to Use
|
|
4
|
+
- Multi-step processes (onboarding, app creation, checkout)
|
|
5
|
+
- 3–7 steps where each depends on the previous
|
|
6
|
+
|
|
7
|
+
## Skeleton Code
|
|
8
|
+
|
|
9
|
+
```vue
|
|
10
|
+
<script setup>
|
|
11
|
+
import { ref, computed } from 'vue'
|
|
12
|
+
import { Button, Card, CardContent, CardFooter, CardHeader, CardTitle, Progress } from '@reinvented/design'
|
|
13
|
+
import { Check } from 'lucide-vue-next'
|
|
14
|
+
|
|
15
|
+
const currentStep = ref(0)
|
|
16
|
+
const steps = [
|
|
17
|
+
{ title: 'Details', component: 'StepDetails' },
|
|
18
|
+
{ title: 'Configuration', component: 'StepConfig' },
|
|
19
|
+
{ title: 'Review', component: 'StepReview' },
|
|
20
|
+
]
|
|
21
|
+
const progress = computed(() => ((currentStep.value + 1) / steps.length) * 100)
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<template>
|
|
25
|
+
<div class="max-w-2xl mx-auto px-4 py-8 space-y-8">
|
|
26
|
+
|
|
27
|
+
<!-- Step Indicator -->
|
|
28
|
+
<div class="space-y-4">
|
|
29
|
+
<Progress :model-value="progress" />
|
|
30
|
+
<div class="flex justify-between">
|
|
31
|
+
<div v-for="(step, i) in steps" :key="i" class="flex items-center gap-2 text-sm">
|
|
32
|
+
<div
|
|
33
|
+
class="flex h-6 w-6 items-center justify-center rounded-full text-xs font-medium"
|
|
34
|
+
:class="i <= currentStep ? 'bg-primary text-primary-foreground' : 'bg-muted text-muted-foreground'"
|
|
35
|
+
>
|
|
36
|
+
<Check v-if="i < currentStep" class="h-3 w-3" />
|
|
37
|
+
<span v-else>{{ i + 1 }}</span>
|
|
38
|
+
</div>
|
|
39
|
+
<span :class="i <= currentStep ? 'text-foreground' : 'text-muted-foreground'">{{ step.title }}</span>
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
|
|
44
|
+
<!-- Step Content -->
|
|
45
|
+
<Card>
|
|
46
|
+
<CardHeader>
|
|
47
|
+
<CardTitle>{{ steps[currentStep].title }}</CardTitle>
|
|
48
|
+
</CardHeader>
|
|
49
|
+
<CardContent>
|
|
50
|
+
<component :is="steps[currentStep].component" />
|
|
51
|
+
</CardContent>
|
|
52
|
+
<CardFooter class="flex justify-between">
|
|
53
|
+
<Button variant="outline" :disabled="currentStep === 0" @click="currentStep--">
|
|
54
|
+
Previous
|
|
55
|
+
</Button>
|
|
56
|
+
<Button v-if="currentStep < steps.length - 1" @click="currentStep++">
|
|
57
|
+
Next
|
|
58
|
+
</Button>
|
|
59
|
+
<Button v-else @click="submit">
|
|
60
|
+
Complete
|
|
61
|
+
</Button>
|
|
62
|
+
</CardFooter>
|
|
63
|
+
</Card>
|
|
64
|
+
</div>
|
|
65
|
+
</template>
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Key Patterns
|
|
69
|
+
- **Progress bar** + step circles at top
|
|
70
|
+
- **Single card** with dynamic content
|
|
71
|
+
- **Previous/Next** buttons in card footer
|
|
72
|
+
- **Narrower max-width** than other layouts (`max-w-2xl`)
|
|
73
|
+
- Completed steps show ✓, current step highlighted
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reinvented/design",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"exports": {
|
|
@@ -10,7 +10,9 @@
|
|
|
10
10
|
"./src/styles/*": "./src/styles/*",
|
|
11
11
|
"./src/*": "./src/*",
|
|
12
12
|
"./tailwind.config.js": "./tailwind.config.js",
|
|
13
|
-
"./patterns/*": "./src/patterns/*"
|
|
13
|
+
"./patterns/*": "./src/patterns/*",
|
|
14
|
+
"./eslint": "./src/eslint/index.js",
|
|
15
|
+
"./eslint/recommended": "./src/eslint/recommended.js"
|
|
14
16
|
},
|
|
15
17
|
"files": [
|
|
16
18
|
"src/",
|
|
@@ -40,7 +42,9 @@
|
|
|
40
42
|
"zod": "^3.23.0",
|
|
41
43
|
"vue-sonner": "^1.2.0",
|
|
42
44
|
"v-calendar": "^3.1.0",
|
|
43
|
-
"@tanstack/vue-table": "^8.21.0"
|
|
45
|
+
"@tanstack/vue-table": "^8.21.0",
|
|
46
|
+
"eslint-plugin-vue": "^9.28.0",
|
|
47
|
+
"vue-eslint-parser": "^9.4.0"
|
|
44
48
|
},
|
|
45
49
|
"devDependencies": {
|
|
46
50
|
"vue": "^3.5.0",
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { AccordionRoot, type AccordionRootEmits, type AccordionRootProps, useForwardPropsEmits } from 'radix-vue'
|
|
3
|
+
|
|
4
|
+
const props = defineProps<AccordionRootProps>()
|
|
5
|
+
const emits = defineEmits<AccordionRootEmits>()
|
|
6
|
+
const forwarded = useForwardPropsEmits(props, emits)
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<template>
|
|
10
|
+
<AccordionRoot v-bind="forwarded">
|
|
11
|
+
<slot />
|
|
12
|
+
</AccordionRoot>
|
|
13
|
+
</template>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { type HTMLAttributes, computed } from 'vue'
|
|
3
|
+
import { AccordionContent, type AccordionContentProps, useForwardProps } from 'radix-vue'
|
|
4
|
+
import { cn } from '../lib/utils'
|
|
5
|
+
|
|
6
|
+
const props = defineProps<AccordionContentProps & { class?: HTMLAttributes['class'] }>()
|
|
7
|
+
const delegatedProps = computed(() => { const { class: _, ...d } = props; return d })
|
|
8
|
+
const forwardedProps = useForwardProps(delegatedProps)
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<template>
|
|
12
|
+
<AccordionContent
|
|
13
|
+
v-bind="forwardedProps"
|
|
14
|
+
class="overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down"
|
|
15
|
+
>
|
|
16
|
+
<div :class="cn('pb-4 pt-0', props.class)">
|
|
17
|
+
<slot />
|
|
18
|
+
</div>
|
|
19
|
+
</AccordionContent>
|
|
20
|
+
</template>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { type HTMLAttributes, computed } from 'vue'
|
|
3
|
+
import { AccordionItem, type AccordionItemProps, useForwardProps } from 'radix-vue'
|
|
4
|
+
import { cn } from '../lib/utils'
|
|
5
|
+
|
|
6
|
+
const props = defineProps<AccordionItemProps & { class?: HTMLAttributes['class'] }>()
|
|
7
|
+
const delegatedProps = computed(() => { const { class: _, ...d } = props; return d })
|
|
8
|
+
const forwardedProps = useForwardProps(delegatedProps)
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<template>
|
|
12
|
+
<AccordionItem v-bind="forwardedProps" :class="cn('border-b', props.class)">
|
|
13
|
+
<slot />
|
|
14
|
+
</AccordionItem>
|
|
15
|
+
</template>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { type HTMLAttributes, computed } from 'vue'
|
|
3
|
+
import { AccordionHeader, AccordionTrigger, type AccordionTriggerProps, useForwardProps } from 'radix-vue'
|
|
4
|
+
import { ChevronDown } from 'lucide-vue-next'
|
|
5
|
+
import { cn } from '../lib/utils'
|
|
6
|
+
|
|
7
|
+
const props = defineProps<AccordionTriggerProps & { class?: HTMLAttributes['class'] }>()
|
|
8
|
+
const delegatedProps = computed(() => { const { class: _, ...d } = props; return d })
|
|
9
|
+
const forwardedProps = useForwardProps(delegatedProps)
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<template>
|
|
13
|
+
<AccordionHeader class="flex">
|
|
14
|
+
<AccordionTrigger
|
|
15
|
+
v-bind="forwardedProps"
|
|
16
|
+
:class="cn(
|
|
17
|
+
'flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180',
|
|
18
|
+
props.class,
|
|
19
|
+
)"
|
|
20
|
+
>
|
|
21
|
+
<slot />
|
|
22
|
+
<ChevronDown class="h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200" />
|
|
23
|
+
</AccordionTrigger>
|
|
24
|
+
</AccordionHeader>
|
|
25
|
+
</template>
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { type HTMLAttributes, computed } from 'vue'
|
|
3
|
+
import { cva, type VariantProps } from 'class-variance-authority'
|
|
4
|
+
import { cn } from '../lib/utils'
|
|
5
|
+
|
|
6
|
+
const alertVariants = cva(
|
|
7
|
+
'relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7',
|
|
8
|
+
{
|
|
9
|
+
variants: {
|
|
10
|
+
variant: {
|
|
11
|
+
default: 'bg-background text-foreground',
|
|
12
|
+
destructive: 'border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive',
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
defaultVariants: {
|
|
16
|
+
variant: 'default',
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
export type AlertVariants = VariantProps<typeof alertVariants>
|
|
22
|
+
|
|
23
|
+
const props = defineProps<{
|
|
24
|
+
variant?: AlertVariants['variant']
|
|
25
|
+
class?: HTMLAttributes['class']
|
|
26
|
+
}>()
|
|
27
|
+
|
|
28
|
+
const delegatedProps = computed(() => {
|
|
29
|
+
const { class: _, ...d } = props
|
|
30
|
+
return d
|
|
31
|
+
})
|
|
32
|
+
</script>
|
|
33
|
+
|
|
34
|
+
<template>
|
|
35
|
+
<div :class="cn(alertVariants({ variant: delegatedProps.variant }), props.class)" role="alert">
|
|
36
|
+
<slot />
|
|
37
|
+
</div>
|
|
38
|
+
</template>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from 'vue'
|
|
3
|
+
import { cn } from '../lib/utils'
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{ class?: HTMLAttributes['class'] }>()
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<template>
|
|
9
|
+
<div :class="cn('text-sm [&_p]:leading-relaxed', props.class)">
|
|
10
|
+
<slot />
|
|
11
|
+
</div>
|
|
12
|
+
</template>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from 'vue'
|
|
3
|
+
import { cn } from '../lib/utils'
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{ class?: HTMLAttributes['class'] }>()
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<template>
|
|
9
|
+
<h5 :class="cn('mb-1 font-medium leading-none tracking-tight', props.class)">
|
|
10
|
+
<slot />
|
|
11
|
+
</h5>
|
|
12
|
+
</template>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { AlertDialogRoot, type AlertDialogEmits, type AlertDialogProps, useForwardPropsEmits } from 'radix-vue'
|
|
3
|
+
|
|
4
|
+
const props = defineProps<AlertDialogProps>()
|
|
5
|
+
const emits = defineEmits<AlertDialogEmits>()
|
|
6
|
+
const forwarded = useForwardPropsEmits(props, emits)
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<template>
|
|
10
|
+
<AlertDialogRoot v-bind="forwarded">
|
|
11
|
+
<slot />
|
|
12
|
+
</AlertDialogRoot>
|
|
13
|
+
</template>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { type HTMLAttributes, computed } from 'vue'
|
|
3
|
+
import { AlertDialogAction, type AlertDialogActionProps, useForwardProps } from 'radix-vue'
|
|
4
|
+
import { cn } from '../lib/utils'
|
|
5
|
+
|
|
6
|
+
const props = defineProps<AlertDialogActionProps & { class?: HTMLAttributes['class'] }>()
|
|
7
|
+
const delegatedProps = computed(() => { const { class: _, ...d } = props; return d })
|
|
8
|
+
const forwardedProps = useForwardProps(delegatedProps)
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<template>
|
|
12
|
+
<AlertDialogAction
|
|
13
|
+
v-bind="forwardedProps"
|
|
14
|
+
:class="cn(
|
|
15
|
+
'inline-flex h-10 items-center justify-center rounded-md bg-primary px-4 py-2 text-sm font-semibold text-primary-foreground ring-offset-background transition-colors hover:bg-primary/90 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50',
|
|
16
|
+
props.class,
|
|
17
|
+
)"
|
|
18
|
+
>
|
|
19
|
+
<slot />
|
|
20
|
+
</AlertDialogAction>
|
|
21
|
+
</template>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { type HTMLAttributes, computed } from 'vue'
|
|
3
|
+
import { AlertDialogCancel, type AlertDialogCancelProps, useForwardProps } from 'radix-vue'
|
|
4
|
+
import { cn } from '../lib/utils'
|
|
5
|
+
|
|
6
|
+
const props = defineProps<AlertDialogCancelProps & { class?: HTMLAttributes['class'] }>()
|
|
7
|
+
const delegatedProps = computed(() => { const { class: _, ...d } = props; return d })
|
|
8
|
+
const forwardedProps = useForwardProps(delegatedProps)
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<template>
|
|
12
|
+
<AlertDialogCancel
|
|
13
|
+
v-bind="forwardedProps"
|
|
14
|
+
:class="cn(
|
|
15
|
+
'inline-flex h-10 items-center justify-center rounded-md border border-input bg-background px-4 py-2 text-sm font-semibold ring-offset-background transition-colors hover:bg-accent hover:text-accent-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 mt-2 sm:mt-0',
|
|
16
|
+
props.class,
|
|
17
|
+
)"
|
|
18
|
+
>
|
|
19
|
+
<slot />
|
|
20
|
+
</AlertDialogCancel>
|
|
21
|
+
</template>
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { type HTMLAttributes, computed } from 'vue'
|
|
3
|
+
import {
|
|
4
|
+
AlertDialogContent,
|
|
5
|
+
type AlertDialogContentEmits,
|
|
6
|
+
type AlertDialogContentProps,
|
|
7
|
+
AlertDialogOverlay,
|
|
8
|
+
AlertDialogPortal,
|
|
9
|
+
useForwardPropsEmits,
|
|
10
|
+
} from 'radix-vue'
|
|
11
|
+
import { cn } from '../lib/utils'
|
|
12
|
+
|
|
13
|
+
const props = defineProps<AlertDialogContentProps & { class?: HTMLAttributes['class'] }>()
|
|
14
|
+
const emits = defineEmits<AlertDialogContentEmits>()
|
|
15
|
+
|
|
16
|
+
const delegatedProps = computed(() => {
|
|
17
|
+
const { class: _, ...delegated } = props
|
|
18
|
+
return delegated
|
|
19
|
+
})
|
|
20
|
+
|
|
21
|
+
const forwarded = useForwardPropsEmits(delegatedProps, emits)
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<template>
|
|
25
|
+
<AlertDialogPortal>
|
|
26
|
+
<AlertDialogOverlay
|
|
27
|
+
class="fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"
|
|
28
|
+
/>
|
|
29
|
+
<AlertDialogContent
|
|
30
|
+
v-bind="forwarded"
|
|
31
|
+
:class="cn(
|
|
32
|
+
'fixed left-1/2 top-1/2 z-50 grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg',
|
|
33
|
+
props.class,
|
|
34
|
+
)"
|
|
35
|
+
>
|
|
36
|
+
<slot />
|
|
37
|
+
</AlertDialogContent>
|
|
38
|
+
</AlertDialogPortal>
|
|
39
|
+
</template>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { type HTMLAttributes, computed } from 'vue'
|
|
3
|
+
import { AlertDialogDescription, type AlertDialogDescriptionProps, useForwardProps } from 'radix-vue'
|
|
4
|
+
import { cn } from '../lib/utils'
|
|
5
|
+
|
|
6
|
+
const props = defineProps<AlertDialogDescriptionProps & { class?: HTMLAttributes['class'] }>()
|
|
7
|
+
const delegatedProps = computed(() => { const { class: _, ...d } = props; return d })
|
|
8
|
+
const forwardedProps = useForwardProps(delegatedProps)
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<template>
|
|
12
|
+
<AlertDialogDescription v-bind="forwardedProps" :class="cn('text-sm text-muted-foreground', props.class)">
|
|
13
|
+
<slot />
|
|
14
|
+
</AlertDialogDescription>
|
|
15
|
+
</template>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from 'vue'
|
|
3
|
+
import { cn } from '../lib/utils'
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{ class?: HTMLAttributes['class'] }>()
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<template>
|
|
9
|
+
<div :class="cn('flex flex-col-reverse sm:flex-row sm:justify-end sm:gap-x-2', props.class)">
|
|
10
|
+
<slot />
|
|
11
|
+
</div>
|
|
12
|
+
</template>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from 'vue'
|
|
3
|
+
import { cn } from '../lib/utils'
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{ class?: HTMLAttributes['class'] }>()
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<template>
|
|
9
|
+
<div :class="cn('flex flex-col gap-y-2 text-center sm:text-left', props.class)">
|
|
10
|
+
<slot />
|
|
11
|
+
</div>
|
|
12
|
+
</template>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { type HTMLAttributes, computed } from 'vue'
|
|
3
|
+
import { AlertDialogTitle, type AlertDialogTitleProps, useForwardProps } from 'radix-vue'
|
|
4
|
+
import { cn } from '../lib/utils'
|
|
5
|
+
|
|
6
|
+
const props = defineProps<AlertDialogTitleProps & { class?: HTMLAttributes['class'] }>()
|
|
7
|
+
const delegatedProps = computed(() => { const { class: _, ...d } = props; return d })
|
|
8
|
+
const forwardedProps = useForwardProps(delegatedProps)
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<template>
|
|
12
|
+
<AlertDialogTitle v-bind="forwardedProps" :class="cn('text-lg font-semibold', props.class)">
|
|
13
|
+
<slot />
|
|
14
|
+
</AlertDialogTitle>
|
|
15
|
+
</template>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { AlertDialogTrigger, type AlertDialogTriggerProps } from 'radix-vue'
|
|
3
|
+
|
|
4
|
+
const props = defineProps<AlertDialogTriggerProps>()
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<template>
|
|
8
|
+
<AlertDialogTrigger v-bind="props">
|
|
9
|
+
<slot />
|
|
10
|
+
</AlertDialogTrigger>
|
|
11
|
+
</template>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { default as AlertDialog } from './AlertDialog.vue'
|
|
2
|
+
export { default as AlertDialogAction } from './AlertDialogAction.vue'
|
|
3
|
+
export { default as AlertDialogCancel } from './AlertDialogCancel.vue'
|
|
4
|
+
export { default as AlertDialogContent } from './AlertDialogContent.vue'
|
|
5
|
+
export { default as AlertDialogDescription } from './AlertDialogDescription.vue'
|
|
6
|
+
export { default as AlertDialogFooter } from './AlertDialogFooter.vue'
|
|
7
|
+
export { default as AlertDialogHeader } from './AlertDialogHeader.vue'
|
|
8
|
+
export { default as AlertDialogTitle } from './AlertDialogTitle.vue'
|
|
9
|
+
export { default as AlertDialogTrigger } from './AlertDialogTrigger.vue'
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from 'vue'
|
|
3
|
+
import { cn } from '../lib/utils'
|
|
4
|
+
const props = defineProps<{ class?: HTMLAttributes['class'] }>()
|
|
5
|
+
</script>
|
|
6
|
+
<template><nav aria-label="breadcrumb" :class="cn('', props.class)"><slot /></nav></template>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { MoreHorizontal } from 'lucide-vue-next'
|
|
3
|
+
import type { HTMLAttributes } from 'vue'
|
|
4
|
+
import { cn } from '../lib/utils'
|
|
5
|
+
const props = defineProps<{ class?: HTMLAttributes['class'] }>()
|
|
6
|
+
</script>
|
|
7
|
+
<template>
|
|
8
|
+
<span role="presentation" aria-hidden="true" :class="cn('flex h-9 w-9 items-center justify-center', props.class)">
|
|
9
|
+
<slot><MoreHorizontal class="h-4 w-4" /></slot>
|
|
10
|
+
<span class="sr-only">More</span>
|
|
11
|
+
</span>
|
|
12
|
+
</template>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from 'vue'
|
|
3
|
+
import { cn } from '../lib/utils'
|
|
4
|
+
const props = defineProps<{ class?: HTMLAttributes['class'] }>()
|
|
5
|
+
</script>
|
|
6
|
+
<template><li :class="cn('inline-flex items-center gap-1.5', props.class)"><slot /></li></template>
|