@tioelvis/next-template 2.0.4 → 2.0.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tioelvis/next-template",
3
- "version": "2.0.4",
3
+ "version": "2.0.6",
4
4
  "description": "CLI to scaffold a Next.js + Tailwind project using shadcn/ui components",
5
5
  "type": "module",
6
6
  "bin": {
@@ -34,6 +34,7 @@
34
34
  "@radix-ui/react-alert-dialog": "^1.1.14",
35
35
  "@radix-ui/react-aspect-ratio": "^1.1.7",
36
36
  "@radix-ui/react-avatar": "^1.1.10",
37
+ "@radix-ui/react-dropdown-menu": "^2.1.15",
37
38
  "@tailwindcss/postcss": "^4.1.11",
38
39
  "@tanstack/react-query": "^5.83.0",
39
40
  "@types/node": "^24.1.0",
@@ -0,0 +1,6 @@
1
+ {
2
+ "dependencies": ["@radix-ui/react-slot"],
3
+ "dev_dependence": [],
4
+ "hooks": [],
5
+ "supports": ["dropdown-menu"]
6
+ }
@@ -0,0 +1,107 @@
1
+ import * as React from "react";
2
+ import { Slot } from "@radix-ui/react-slot";
3
+ import { ChevronRight, MoreHorizontal } from "lucide-react";
4
+
5
+ import { cn } from "@/lib/utils";
6
+
7
+ function Breadcrumb({ ...props }: React.ComponentProps<"nav">) {
8
+ return <nav aria-label="breadcrumb" data-slot="breadcrumb" {...props} />;
9
+ }
10
+
11
+ function BreadcrumbList({ className, ...props }: React.ComponentProps<"ol">) {
12
+ return (
13
+ <ol
14
+ data-slot="breadcrumb-list"
15
+ className={cn(
16
+ "text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5",
17
+ className
18
+ )}
19
+ {...props}
20
+ />
21
+ );
22
+ }
23
+
24
+ function BreadcrumbItem({ className, ...props }: React.ComponentProps<"li">) {
25
+ return (
26
+ <li
27
+ data-slot="breadcrumb-item"
28
+ className={cn("inline-flex items-center gap-1.5", className)}
29
+ {...props}
30
+ />
31
+ );
32
+ }
33
+
34
+ function BreadcrumbLink({
35
+ asChild,
36
+ className,
37
+ ...props
38
+ }: React.ComponentProps<"a"> & {
39
+ asChild?: boolean;
40
+ }) {
41
+ const Comp = asChild ? Slot : "a";
42
+
43
+ return (
44
+ <Comp
45
+ data-slot="breadcrumb-link"
46
+ className={cn("hover:text-foreground transition-colors", className)}
47
+ {...props}
48
+ />
49
+ );
50
+ }
51
+
52
+ function BreadcrumbPage({ className, ...props }: React.ComponentProps<"span">) {
53
+ return (
54
+ <span
55
+ data-slot="breadcrumb-page"
56
+ role="link"
57
+ aria-disabled="true"
58
+ aria-current="page"
59
+ className={cn("text-foreground font-normal", className)}
60
+ {...props}
61
+ />
62
+ );
63
+ }
64
+
65
+ function BreadcrumbSeparator({
66
+ children,
67
+ className,
68
+ ...props
69
+ }: React.ComponentProps<"li">) {
70
+ return (
71
+ <li
72
+ data-slot="breadcrumb-separator"
73
+ role="presentation"
74
+ aria-hidden="true"
75
+ className={cn("[&>svg]:size-3.5", className)}
76
+ {...props}>
77
+ {children ?? <ChevronRight />}
78
+ </li>
79
+ );
80
+ }
81
+
82
+ function BreadcrumbEllipsis({
83
+ className,
84
+ ...props
85
+ }: React.ComponentProps<"span">) {
86
+ return (
87
+ <span
88
+ data-slot="breadcrumb-ellipsis"
89
+ role="presentation"
90
+ aria-hidden="true"
91
+ className={cn("flex size-9 items-center justify-center", className)}
92
+ {...props}>
93
+ <MoreHorizontal className="size-4" />
94
+ <span className="sr-only">More</span>
95
+ </span>
96
+ );
97
+ }
98
+
99
+ export {
100
+ Breadcrumb,
101
+ BreadcrumbList,
102
+ BreadcrumbItem,
103
+ BreadcrumbLink,
104
+ BreadcrumbPage,
105
+ BreadcrumbSeparator,
106
+ BreadcrumbEllipsis,
107
+ };
@@ -0,0 +1,6 @@
1
+ {
2
+ "dependencies": ["@radix-ui/react-dropdown-menu"],
3
+ "dev_dependence": [],
4
+ "hooks": [],
5
+ "supports": []
6
+ }
@@ -0,0 +1,256 @@
1
+ "use client";
2
+
3
+ import * as React from "react";
4
+ import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
5
+ import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react";
6
+
7
+ import { cn } from "@/lib/utils";
8
+
9
+ function DropdownMenu({
10
+ ...props
11
+ }: React.ComponentProps<typeof DropdownMenuPrimitive.Root>) {
12
+ return <DropdownMenuPrimitive.Root data-slot="dropdown-menu" {...props} />;
13
+ }
14
+
15
+ function DropdownMenuPortal({
16
+ ...props
17
+ }: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>) {
18
+ return (
19
+ <DropdownMenuPrimitive.Portal data-slot="dropdown-menu-portal" {...props} />
20
+ );
21
+ }
22
+
23
+ function DropdownMenuTrigger({
24
+ className,
25
+ ...props
26
+ }: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>) {
27
+ return (
28
+ <DropdownMenuPrimitive.Trigger
29
+ data-slot="dropdown-menu-trigger"
30
+ className={cn("cursor-pointer", className)}
31
+ {...props}
32
+ />
33
+ );
34
+ }
35
+
36
+ function DropdownMenuContent({
37
+ className,
38
+ sideOffset = 4,
39
+ ...props
40
+ }: React.ComponentProps<typeof DropdownMenuPrimitive.Content>) {
41
+ return (
42
+ <DropdownMenuPrimitive.Portal>
43
+ <DropdownMenuPrimitive.Content
44
+ data-slot="dropdown-menu-content"
45
+ sideOffset={sideOffset}
46
+ className={cn(
47
+ "bg-popover text-popover-foreground 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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",
48
+ className
49
+ )}
50
+ {...props}
51
+ />
52
+ </DropdownMenuPrimitive.Portal>
53
+ );
54
+ }
55
+
56
+ function DropdownMenuGroup({
57
+ ...props
58
+ }: React.ComponentProps<typeof DropdownMenuPrimitive.Group>) {
59
+ return (
60
+ <DropdownMenuPrimitive.Group data-slot="dropdown-menu-group" {...props} />
61
+ );
62
+ }
63
+
64
+ function DropdownMenuItem({
65
+ className,
66
+ inset,
67
+ variant = "default",
68
+ ...props
69
+ }: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {
70
+ inset?: boolean;
71
+ variant?: "default" | "destructive";
72
+ }) {
73
+ return (
74
+ <DropdownMenuPrimitive.Item
75
+ data-slot="dropdown-menu-item"
76
+ data-inset={inset}
77
+ data-variant={variant}
78
+ className={cn(
79
+ "focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
80
+ className
81
+ )}
82
+ {...props}
83
+ />
84
+ );
85
+ }
86
+
87
+ function DropdownMenuCheckboxItem({
88
+ className,
89
+ children,
90
+ checked,
91
+ ...props
92
+ }: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>) {
93
+ return (
94
+ <DropdownMenuPrimitive.CheckboxItem
95
+ data-slot="dropdown-menu-checkbox-item"
96
+ className={cn(
97
+ "focus:bg-accent focus:text-accent-foreground relative flex cursor-pointer items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
98
+ className
99
+ )}
100
+ checked={checked}
101
+ {...props}>
102
+ <span className="pointer-events-none absolute left-2 flex size-3.5 items-center justify-center">
103
+ <DropdownMenuPrimitive.ItemIndicator>
104
+ <CheckIcon className="size-4" />
105
+ </DropdownMenuPrimitive.ItemIndicator>
106
+ </span>
107
+ {children}
108
+ </DropdownMenuPrimitive.CheckboxItem>
109
+ );
110
+ }
111
+
112
+ function DropdownMenuRadioGroup({
113
+ ...props
114
+ }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>) {
115
+ return (
116
+ <DropdownMenuPrimitive.RadioGroup
117
+ data-slot="dropdown-menu-radio-group"
118
+ {...props}
119
+ />
120
+ );
121
+ }
122
+
123
+ function DropdownMenuRadioItem({
124
+ className,
125
+ children,
126
+ ...props
127
+ }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>) {
128
+ return (
129
+ <DropdownMenuPrimitive.RadioItem
130
+ data-slot="dropdown-menu-radio-item"
131
+ className={cn(
132
+ "focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
133
+ className
134
+ )}
135
+ {...props}>
136
+ <span className="pointer-events-none absolute left-2 flex size-3.5 items-center justify-center">
137
+ <DropdownMenuPrimitive.ItemIndicator>
138
+ <CircleIcon className="size-2 fill-current" />
139
+ </DropdownMenuPrimitive.ItemIndicator>
140
+ </span>
141
+ {children}
142
+ </DropdownMenuPrimitive.RadioItem>
143
+ );
144
+ }
145
+
146
+ function DropdownMenuLabel({
147
+ className,
148
+ inset,
149
+ ...props
150
+ }: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {
151
+ inset?: boolean;
152
+ }) {
153
+ return (
154
+ <DropdownMenuPrimitive.Label
155
+ data-slot="dropdown-menu-label"
156
+ data-inset={inset}
157
+ className={cn(
158
+ "px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",
159
+ className
160
+ )}
161
+ {...props}
162
+ />
163
+ );
164
+ }
165
+
166
+ function DropdownMenuSeparator({
167
+ className,
168
+ ...props
169
+ }: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>) {
170
+ return (
171
+ <DropdownMenuPrimitive.Separator
172
+ data-slot="dropdown-menu-separator"
173
+ className={cn("bg-border -mx-1 my-1 h-px", className)}
174
+ {...props}
175
+ />
176
+ );
177
+ }
178
+
179
+ function DropdownMenuShortcut({
180
+ className,
181
+ ...props
182
+ }: React.ComponentProps<"span">) {
183
+ return (
184
+ <span
185
+ data-slot="dropdown-menu-shortcut"
186
+ className={cn(
187
+ "text-muted-foreground ml-auto text-xs tracking-widest",
188
+ className
189
+ )}
190
+ {...props}
191
+ />
192
+ );
193
+ }
194
+
195
+ function DropdownMenuSub({
196
+ ...props
197
+ }: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>) {
198
+ return <DropdownMenuPrimitive.Sub data-slot="dropdown-menu-sub" {...props} />;
199
+ }
200
+
201
+ function DropdownMenuSubTrigger({
202
+ className,
203
+ inset,
204
+ children,
205
+ ...props
206
+ }: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {
207
+ inset?: boolean;
208
+ }) {
209
+ return (
210
+ <DropdownMenuPrimitive.SubTrigger
211
+ data-slot="dropdown-menu-sub-trigger"
212
+ data-inset={inset}
213
+ className={cn(
214
+ "focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-pointer items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8",
215
+ className
216
+ )}
217
+ {...props}>
218
+ {children}
219
+ <ChevronRightIcon className="ml-auto size-4" />
220
+ </DropdownMenuPrimitive.SubTrigger>
221
+ );
222
+ }
223
+
224
+ function DropdownMenuSubContent({
225
+ className,
226
+ ...props
227
+ }: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>) {
228
+ return (
229
+ <DropdownMenuPrimitive.SubContent
230
+ data-slot="dropdown-menu-sub-content"
231
+ className={cn(
232
+ "bg-popover text-popover-foreground 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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",
233
+ className
234
+ )}
235
+ {...props}
236
+ />
237
+ );
238
+ }
239
+
240
+ export {
241
+ DropdownMenu,
242
+ DropdownMenuPortal,
243
+ DropdownMenuTrigger,
244
+ DropdownMenuContent,
245
+ DropdownMenuGroup,
246
+ DropdownMenuLabel,
247
+ DropdownMenuItem,
248
+ DropdownMenuCheckboxItem,
249
+ DropdownMenuRadioGroup,
250
+ DropdownMenuRadioItem,
251
+ DropdownMenuSeparator,
252
+ DropdownMenuShortcut,
253
+ DropdownMenuSub,
254
+ DropdownMenuSubTrigger,
255
+ DropdownMenuSubContent,
256
+ };
package/src/constants.js CHANGED
@@ -44,6 +44,8 @@ const COMPONENTS = [
44
44
  "aspect-ratio",
45
45
  "avatar",
46
46
  "badge",
47
+ "breadcrumb",
48
+ "button",
47
49
  ];
48
50
 
49
51
  export {