@tioelvis/next-template 2.2.0 → 2.2.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.2.0",
3
+ "version": "2.2.6",
4
4
  "description": "CLI to scaffold a Next.js + Tailwind project using shadcn/ui components",
5
5
  "type": "module",
6
6
  "bin": {
@@ -42,6 +42,8 @@
42
42
  "@radix-ui/react-dropdown-menu": "^2.1.15",
43
43
  "@radix-ui/react-hover-card": "^1.1.14",
44
44
  "@radix-ui/react-label": "^2.1.7",
45
+ "@radix-ui/react-menubar": "^1.1.15",
46
+ "@radix-ui/react-navigation-menu": "^1.2.13",
45
47
  "@radix-ui/react-slot": "^1.2.3",
46
48
  "@tailwindcss/postcss": "^4.1.11",
47
49
  "@tanstack/react-query": "^5.83.0",
@@ -57,6 +59,7 @@
57
59
  "embla-carousel-react": "^8.6.0",
58
60
  "eslint": "^9.32.0",
59
61
  "eslint-config-next": "^15.4.4",
62
+ "input-otp": "^1.4.2",
60
63
  "lucide-react": "^0.532.0",
61
64
  "next": "^15.4.4",
62
65
  "next-auth": "^4.24.11",
@@ -0,0 +1,6 @@
1
+ {
2
+ "dependencies": ["input-otp"],
3
+ "dev_dependence": [],
4
+ "hooks": [],
5
+ "supports": []
6
+ }
@@ -0,0 +1,76 @@
1
+ "use client";
2
+
3
+ import * as React from "react";
4
+ import { OTPInput, OTPInputContext } from "input-otp";
5
+ import { MinusIcon } from "lucide-react";
6
+
7
+ import { cn } from "@/lib/utils";
8
+
9
+ function InputOTP({
10
+ className,
11
+ containerClassName,
12
+ ...props
13
+ }: React.ComponentProps<typeof OTPInput> & {
14
+ containerClassName?: string;
15
+ }) {
16
+ return (
17
+ <OTPInput
18
+ data-slot="input-otp"
19
+ containerClassName={cn(
20
+ "flex items-center gap-2 has-disabled:opacity-50",
21
+ containerClassName
22
+ )}
23
+ className={cn("disabled:cursor-not-allowed", className)}
24
+ {...props}
25
+ />
26
+ );
27
+ }
28
+
29
+ function InputOTPGroup({ className, ...props }: React.ComponentProps<"div">) {
30
+ return (
31
+ <div
32
+ data-slot="input-otp-group"
33
+ className={cn("flex items-center", className)}
34
+ {...props}
35
+ />
36
+ );
37
+ }
38
+
39
+ function InputOTPSlot({
40
+ index,
41
+ className,
42
+ ...props
43
+ }: React.ComponentProps<"div"> & {
44
+ index: number;
45
+ }) {
46
+ const inputOTPContext = React.useContext(OTPInputContext);
47
+ const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {};
48
+
49
+ return (
50
+ <div
51
+ data-slot="input-otp-slot"
52
+ data-active={isActive}
53
+ className={cn(
54
+ "data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive dark:bg-input/30 border-input relative flex h-9 w-9 items-center justify-center border-y border-r text-sm shadow-xs transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md data-[active=true]:z-10 data-[active=true]:ring-[3px]",
55
+ className
56
+ )}
57
+ {...props}>
58
+ {char}
59
+ {hasFakeCaret && (
60
+ <div className="pointer-events-none absolute inset-0 flex items-center justify-center">
61
+ <div className="animate-caret-blink bg-foreground h-4 w-px duration-1000" />
62
+ </div>
63
+ )}
64
+ </div>
65
+ );
66
+ }
67
+
68
+ function InputOTPSeparator({ ...props }: React.ComponentProps<"div">) {
69
+ return (
70
+ <div data-slot="input-otp-separator" role="separator" {...props}>
71
+ <MinusIcon />
72
+ </div>
73
+ );
74
+ }
75
+
76
+ export { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator };
@@ -0,0 +1,6 @@
1
+ {
2
+ "dependencies": [],
3
+ "dev_dependence": [],
4
+ "hooks": [],
5
+ "supports": []
6
+ }
@@ -0,0 +1,21 @@
1
+ import * as React from "react";
2
+
3
+ import { cn } from "@/lib/utils";
4
+
5
+ function Input({ className, type, ...props }: React.ComponentProps<"input">) {
6
+ return (
7
+ <input
8
+ type={type}
9
+ data-slot="input"
10
+ className={cn(
11
+ "file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:cursor-not-allowed disabled:opacity-50 text-sm",
12
+ "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
13
+ "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
14
+ className
15
+ )}
16
+ {...props}
17
+ />
18
+ );
19
+ }
20
+
21
+ export { Input };
@@ -0,0 +1,6 @@
1
+ {
2
+ "dependencies": ["@radix-ui/react-menubar"],
3
+ "dev_dependence": [],
4
+ "hooks": [],
5
+ "supports": []
6
+ }
@@ -0,0 +1,273 @@
1
+ "use client";
2
+
3
+ import * as React from "react";
4
+ import * as MenubarPrimitive from "@radix-ui/react-menubar";
5
+ import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react";
6
+
7
+ import { cn } from "@/lib/utils";
8
+
9
+ function Menubar({
10
+ className,
11
+ ...props
12
+ }: React.ComponentProps<typeof MenubarPrimitive.Root>) {
13
+ return (
14
+ <MenubarPrimitive.Root
15
+ data-slot="menubar"
16
+ className={cn(
17
+ "bg-background flex h-9 items-center gap-1 rounded-md border p-1 shadow-xs",
18
+ className
19
+ )}
20
+ {...props}
21
+ />
22
+ );
23
+ }
24
+
25
+ function MenubarMenu({
26
+ ...props
27
+ }: React.ComponentProps<typeof MenubarPrimitive.Menu>) {
28
+ return <MenubarPrimitive.Menu data-slot="menubar-menu" {...props} />;
29
+ }
30
+
31
+ function MenubarGroup({
32
+ ...props
33
+ }: React.ComponentProps<typeof MenubarPrimitive.Group>) {
34
+ return <MenubarPrimitive.Group data-slot="menubar-group" {...props} />;
35
+ }
36
+
37
+ function MenubarPortal({
38
+ ...props
39
+ }: React.ComponentProps<typeof MenubarPrimitive.Portal>) {
40
+ return <MenubarPrimitive.Portal data-slot="menubar-portal" {...props} />;
41
+ }
42
+
43
+ function MenubarRadioGroup({
44
+ ...props
45
+ }: React.ComponentProps<typeof MenubarPrimitive.RadioGroup>) {
46
+ return (
47
+ <MenubarPrimitive.RadioGroup data-slot="menubar-radio-group" {...props} />
48
+ );
49
+ }
50
+
51
+ function MenubarTrigger({
52
+ className,
53
+ ...props
54
+ }: React.ComponentProps<typeof MenubarPrimitive.Trigger>) {
55
+ return (
56
+ <MenubarPrimitive.Trigger
57
+ data-slot="menubar-trigger"
58
+ className={cn(
59
+ "focus:bg-accent cursor-pointer focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex items-center rounded-sm px-2 py-1 text-sm font-medium outline-hidden select-none",
60
+ className
61
+ )}
62
+ {...props}
63
+ />
64
+ );
65
+ }
66
+
67
+ function MenubarContent({
68
+ className,
69
+ align = "start",
70
+ alignOffset = -4,
71
+ sideOffset = 8,
72
+ ...props
73
+ }: React.ComponentProps<typeof MenubarPrimitive.Content>) {
74
+ return (
75
+ <MenubarPortal>
76
+ <MenubarPrimitive.Content
77
+ data-slot="menubar-content"
78
+ align={align}
79
+ alignOffset={alignOffset}
80
+ sideOffset={sideOffset}
81
+ className={cn(
82
+ "bg-popover text-popover-foreground data-[state=open]:animate-in 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-[12rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-md",
83
+ className
84
+ )}
85
+ {...props}
86
+ />
87
+ </MenubarPortal>
88
+ );
89
+ }
90
+
91
+ function MenubarItem({
92
+ className,
93
+ inset,
94
+ variant = "default",
95
+ ...props
96
+ }: React.ComponentProps<typeof MenubarPrimitive.Item> & {
97
+ inset?: boolean;
98
+ variant?: "default" | "destructive";
99
+ }) {
100
+ return (
101
+ <MenubarPrimitive.Item
102
+ data-slot="menubar-item"
103
+ data-inset={inset}
104
+ data-variant={variant}
105
+ className={cn(
106
+ "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",
107
+ className
108
+ )}
109
+ {...props}
110
+ />
111
+ );
112
+ }
113
+
114
+ function MenubarCheckboxItem({
115
+ className,
116
+ children,
117
+ checked,
118
+ ...props
119
+ }: React.ComponentProps<typeof MenubarPrimitive.CheckboxItem>) {
120
+ return (
121
+ <MenubarPrimitive.CheckboxItem
122
+ data-slot="menubar-checkbox-item"
123
+ className={cn(
124
+ "focus:bg-accent focus:text-accent-foreground relative flex cursor-pointer items-center gap-2 rounded-xs 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",
125
+ className
126
+ )}
127
+ checked={checked}
128
+ {...props}>
129
+ <span className="pointer-events-none absolute left-2 flex size-3.5 items-center justify-center">
130
+ <MenubarPrimitive.ItemIndicator>
131
+ <CheckIcon className="size-4" />
132
+ </MenubarPrimitive.ItemIndicator>
133
+ </span>
134
+ {children}
135
+ </MenubarPrimitive.CheckboxItem>
136
+ );
137
+ }
138
+
139
+ function MenubarRadioItem({
140
+ className,
141
+ children,
142
+ ...props
143
+ }: React.ComponentProps<typeof MenubarPrimitive.RadioItem>) {
144
+ return (
145
+ <MenubarPrimitive.RadioItem
146
+ data-slot="menubar-radio-item"
147
+ className={cn(
148
+ "focus:bg-accent focus:text-accent-foreground relative flex cursor-pointer items-center gap-2 rounded-xs 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",
149
+ className
150
+ )}
151
+ {...props}>
152
+ <span className="pointer-events-none absolute left-2 flex size-3.5 items-center justify-center">
153
+ <MenubarPrimitive.ItemIndicator>
154
+ <CircleIcon className="size-2 fill-current" />
155
+ </MenubarPrimitive.ItemIndicator>
156
+ </span>
157
+ {children}
158
+ </MenubarPrimitive.RadioItem>
159
+ );
160
+ }
161
+
162
+ function MenubarLabel({
163
+ className,
164
+ inset,
165
+ ...props
166
+ }: React.ComponentProps<typeof MenubarPrimitive.Label> & {
167
+ inset?: boolean;
168
+ }) {
169
+ return (
170
+ <MenubarPrimitive.Label
171
+ data-slot="menubar-label"
172
+ data-inset={inset}
173
+ className={cn(
174
+ "px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",
175
+ className
176
+ )}
177
+ {...props}
178
+ />
179
+ );
180
+ }
181
+
182
+ function MenubarSeparator({
183
+ className,
184
+ ...props
185
+ }: React.ComponentProps<typeof MenubarPrimitive.Separator>) {
186
+ return (
187
+ <MenubarPrimitive.Separator
188
+ data-slot="menubar-separator"
189
+ className={cn("bg-border -mx-1 my-1 h-px", className)}
190
+ {...props}
191
+ />
192
+ );
193
+ }
194
+
195
+ function MenubarShortcut({
196
+ className,
197
+ ...props
198
+ }: React.ComponentProps<"span">) {
199
+ return (
200
+ <span
201
+ data-slot="menubar-shortcut"
202
+ className={cn(
203
+ "text-muted-foreground ml-auto text-xs tracking-widest",
204
+ className
205
+ )}
206
+ {...props}
207
+ />
208
+ );
209
+ }
210
+
211
+ function MenubarSub({
212
+ ...props
213
+ }: React.ComponentProps<typeof MenubarPrimitive.Sub>) {
214
+ return <MenubarPrimitive.Sub data-slot="menubar-sub" {...props} />;
215
+ }
216
+
217
+ function MenubarSubTrigger({
218
+ className,
219
+ inset,
220
+ children,
221
+ ...props
222
+ }: React.ComponentProps<typeof MenubarPrimitive.SubTrigger> & {
223
+ inset?: boolean;
224
+ }) {
225
+ return (
226
+ <MenubarPrimitive.SubTrigger
227
+ data-slot="menubar-sub-trigger"
228
+ data-inset={inset}
229
+ className={cn(
230
+ "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-none select-none data-[inset]:pl-8",
231
+ className
232
+ )}
233
+ {...props}>
234
+ {children}
235
+ <ChevronRightIcon className="ml-auto h-4 w-4" />
236
+ </MenubarPrimitive.SubTrigger>
237
+ );
238
+ }
239
+
240
+ function MenubarSubContent({
241
+ className,
242
+ ...props
243
+ }: React.ComponentProps<typeof MenubarPrimitive.SubContent>) {
244
+ return (
245
+ <MenubarPrimitive.SubContent
246
+ data-slot="menubar-sub-content"
247
+ className={cn(
248
+ "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-menubar-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",
249
+ className
250
+ )}
251
+ {...props}
252
+ />
253
+ );
254
+ }
255
+
256
+ export {
257
+ Menubar,
258
+ MenubarPortal,
259
+ MenubarMenu,
260
+ MenubarTrigger,
261
+ MenubarContent,
262
+ MenubarGroup,
263
+ MenubarSeparator,
264
+ MenubarLabel,
265
+ MenubarItem,
266
+ MenubarShortcut,
267
+ MenubarCheckboxItem,
268
+ MenubarRadioGroup,
269
+ MenubarRadioItem,
270
+ MenubarSub,
271
+ MenubarSubTrigger,
272
+ MenubarSubContent,
273
+ };
@@ -0,0 +1,6 @@
1
+ {
2
+ "dependencies": ["@radix-ui/react-navigation-menu"],
3
+ "dev_dependence": [],
4
+ "hooks": [],
5
+ "supports": []
6
+ }
@@ -0,0 +1,164 @@
1
+ import * as React from "react";
2
+ import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu";
3
+ import { cva } from "class-variance-authority";
4
+ import { ChevronDownIcon } from "lucide-react";
5
+
6
+ import { cn } from "@/lib/utils";
7
+
8
+ function NavigationMenu({
9
+ className,
10
+ children,
11
+ viewport = true,
12
+ ...props
13
+ }: React.ComponentProps<typeof NavigationMenuPrimitive.Root> & {
14
+ viewport?: boolean;
15
+ }) {
16
+ return (
17
+ <NavigationMenuPrimitive.Root
18
+ data-slot="navigation-menu"
19
+ data-viewport={viewport}
20
+ className={cn(
21
+ "group/navigation-menu relative flex max-w-max flex-1 items-center justify-center",
22
+ className
23
+ )}
24
+ {...props}>
25
+ {children}
26
+ {viewport && <NavigationMenuViewport />}
27
+ </NavigationMenuPrimitive.Root>
28
+ );
29
+ }
30
+
31
+ function NavigationMenuList({
32
+ className,
33
+ ...props
34
+ }: React.ComponentProps<typeof NavigationMenuPrimitive.List>) {
35
+ return (
36
+ <NavigationMenuPrimitive.List
37
+ data-slot="navigation-menu-list"
38
+ className={cn(
39
+ "group flex flex-1 list-none items-center justify-center gap-1",
40
+ className
41
+ )}
42
+ {...props}
43
+ />
44
+ );
45
+ }
46
+
47
+ function NavigationMenuItem({
48
+ className,
49
+ ...props
50
+ }: React.ComponentProps<typeof NavigationMenuPrimitive.Item>) {
51
+ return (
52
+ <NavigationMenuPrimitive.Item
53
+ data-slot="navigation-menu-item"
54
+ className={cn("relative", className)}
55
+ {...props}
56
+ />
57
+ );
58
+ }
59
+
60
+ const navigationMenuTriggerStyle = cva(
61
+ "group inline-flex h-9 w-max cursor-pointer items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground disabled:cursor-not-allowed disabled:opacity-50 data-[state=open]:hover:bg-accent data-[state=open]:text-accent-foreground data-[state=open]:focus:bg-accent data-[state=open]:bg-accent/50 focus-visible:ring-ring/50 outline-none transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1"
62
+ );
63
+
64
+ function NavigationMenuTrigger({
65
+ className,
66
+ children,
67
+ ...props
68
+ }: React.ComponentProps<typeof NavigationMenuPrimitive.Trigger>) {
69
+ return (
70
+ <NavigationMenuPrimitive.Trigger
71
+ data-slot="navigation-menu-trigger"
72
+ className={cn(navigationMenuTriggerStyle(), "group", className)}
73
+ {...props}>
74
+ {children}{" "}
75
+ <ChevronDownIcon
76
+ className="relative top-[1px] ml-1 size-3 transition duration-300 group-data-[state=open]:rotate-180"
77
+ aria-hidden="true"
78
+ />
79
+ </NavigationMenuPrimitive.Trigger>
80
+ );
81
+ }
82
+
83
+ function NavigationMenuContent({
84
+ className,
85
+ ...props
86
+ }: React.ComponentProps<typeof NavigationMenuPrimitive.Content>) {
87
+ return (
88
+ <NavigationMenuPrimitive.Content
89
+ data-slot="navigation-menu-content"
90
+ className={cn(
91
+ "data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 top-0 left-0 w-full p-2 pr-2.5 md:absolute md:w-auto",
92
+ "group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:data-[state=open]:animate-in group-data-[viewport=false]/navigation-menu:data-[state=closed]:animate-out group-data-[viewport=false]/navigation-menu:data-[state=closed]:zoom-out-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:fade-in-0 group-data-[viewport=false]/navigation-menu:data-[state=closed]:fade-out-0 group-data-[viewport=false]/navigation-menu:top-full group-data-[viewport=false]/navigation-menu:mt-1.5 group-data-[viewport=false]/navigation-menu:overflow-hidden group-data-[viewport=false]/navigation-menu:rounded-md group-data-[viewport=false]/navigation-menu:border group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:duration-200 **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none",
93
+ className
94
+ )}
95
+ {...props}
96
+ />
97
+ );
98
+ }
99
+
100
+ function NavigationMenuViewport({
101
+ className,
102
+ ...props
103
+ }: React.ComponentProps<typeof NavigationMenuPrimitive.Viewport>) {
104
+ return (
105
+ <div
106
+ className={cn(
107
+ "absolute top-full left-0 isolate z-50 flex justify-center"
108
+ )}>
109
+ <NavigationMenuPrimitive.Viewport
110
+ data-slot="navigation-menu-viewport"
111
+ className={cn(
112
+ "origin-top-center bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border shadow md:w-[var(--radix-navigation-menu-viewport-width)]",
113
+ className
114
+ )}
115
+ {...props}
116
+ />
117
+ </div>
118
+ );
119
+ }
120
+
121
+ function NavigationMenuLink({
122
+ className,
123
+ ...props
124
+ }: React.ComponentProps<typeof NavigationMenuPrimitive.Link>) {
125
+ return (
126
+ <NavigationMenuPrimitive.Link
127
+ data-slot="navigation-menu-link"
128
+ className={cn(
129
+ "data-[active=true]:focus:bg-accent data-[active=true]:hover:bg-accent data-[active=true]:bg-accent/50 data-[active=true]:text-accent-foreground hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus-visible:ring-ring/50 [&_svg:not([class*='text-'])]:text-muted-foreground flex flex-col gap-1 rounded-sm p-2 text-sm transition-all outline-none focus-visible:ring-[3px] focus-visible:outline-1 [&_svg:not([class*='size-'])]:size-4",
130
+ className
131
+ )}
132
+ {...props}
133
+ />
134
+ );
135
+ }
136
+
137
+ function NavigationMenuIndicator({
138
+ className,
139
+ ...props
140
+ }: React.ComponentProps<typeof NavigationMenuPrimitive.Indicator>) {
141
+ return (
142
+ <NavigationMenuPrimitive.Indicator
143
+ data-slot="navigation-menu-indicator"
144
+ className={cn(
145
+ "data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden",
146
+ className
147
+ )}
148
+ {...props}>
149
+ <div className="bg-border relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm shadow-md" />
150
+ </NavigationMenuPrimitive.Indicator>
151
+ );
152
+ }
153
+
154
+ export {
155
+ NavigationMenu,
156
+ NavigationMenuList,
157
+ NavigationMenuItem,
158
+ NavigationMenuContent,
159
+ NavigationMenuTrigger,
160
+ NavigationMenuLink,
161
+ NavigationMenuIndicator,
162
+ NavigationMenuViewport,
163
+ navigationMenuTriggerStyle,
164
+ };
@@ -0,0 +1,6 @@
1
+ {
2
+ "dependencies": [""],
3
+ "dev_dependence": [],
4
+ "hooks": [],
5
+ "supports": ["button"]
6
+ }
@@ -0,0 +1,124 @@
1
+ import * as React from "react";
2
+ import {
3
+ ChevronLeftIcon,
4
+ ChevronRightIcon,
5
+ MoreHorizontalIcon,
6
+ } from "lucide-react";
7
+
8
+ import { cn } from "@/lib/utils";
9
+ import { Button, buttonVariants } from "@/components/ui/button";
10
+
11
+ function Pagination({ className, ...props }: React.ComponentProps<"nav">) {
12
+ return (
13
+ <nav
14
+ role="navigation"
15
+ aria-label="pagination"
16
+ data-slot="pagination"
17
+ className={cn("mx-auto flex w-full justify-center", className)}
18
+ {...props}
19
+ />
20
+ );
21
+ }
22
+
23
+ function PaginationContent({
24
+ className,
25
+ ...props
26
+ }: React.ComponentProps<"ul">) {
27
+ return (
28
+ <ul
29
+ data-slot="pagination-content"
30
+ className={cn("flex flex-row items-center gap-1", className)}
31
+ {...props}
32
+ />
33
+ );
34
+ }
35
+
36
+ function PaginationItem({ ...props }: React.ComponentProps<"li">) {
37
+ return <li data-slot="pagination-item" {...props} />;
38
+ }
39
+
40
+ type PaginationLinkProps = {
41
+ isActive?: boolean;
42
+ } & Pick<React.ComponentProps<typeof Button>, "size"> &
43
+ React.ComponentProps<"a">;
44
+
45
+ function PaginationLink({
46
+ className,
47
+ isActive,
48
+ size = "icon",
49
+ ...props
50
+ }: PaginationLinkProps) {
51
+ return (
52
+ <a
53
+ aria-current={isActive ? "page" : undefined}
54
+ data-slot="pagination-link"
55
+ data-active={isActive}
56
+ className={cn(
57
+ buttonVariants({
58
+ variant: isActive ? "outline" : "ghost",
59
+ size,
60
+ }),
61
+ className
62
+ )}
63
+ {...props}
64
+ />
65
+ );
66
+ }
67
+
68
+ function PaginationPrevious({
69
+ className,
70
+ ...props
71
+ }: React.ComponentProps<typeof PaginationLink>) {
72
+ return (
73
+ <PaginationLink
74
+ aria-label="Go to previous page"
75
+ size="default"
76
+ className={cn("gap-1 px-2.5 sm:pl-2.5", className)}
77
+ {...props}>
78
+ <ChevronLeftIcon />
79
+ <span className="hidden sm:block">Previous</span>
80
+ </PaginationLink>
81
+ );
82
+ }
83
+
84
+ function PaginationNext({
85
+ className,
86
+ ...props
87
+ }: React.ComponentProps<typeof PaginationLink>) {
88
+ return (
89
+ <PaginationLink
90
+ aria-label="Go to next page"
91
+ size="default"
92
+ className={cn("gap-1 px-2.5 sm:pr-2.5", className)}
93
+ {...props}>
94
+ <span className="hidden sm:block">Next</span>
95
+ <ChevronRightIcon />
96
+ </PaginationLink>
97
+ );
98
+ }
99
+
100
+ function PaginationEllipsis({
101
+ className,
102
+ ...props
103
+ }: React.ComponentProps<"span">) {
104
+ return (
105
+ <span
106
+ aria-hidden
107
+ data-slot="pagination-ellipsis"
108
+ className={cn("flex size-9 items-center justify-center", className)}
109
+ {...props}>
110
+ <MoreHorizontalIcon className="size-4" />
111
+ <span className="sr-only">More pages</span>
112
+ </span>
113
+ );
114
+ }
115
+
116
+ export {
117
+ Pagination,
118
+ PaginationContent,
119
+ PaginationLink,
120
+ PaginationItem,
121
+ PaginationPrevious,
122
+ PaginationNext,
123
+ PaginationEllipsis,
124
+ };
package/src/constants.js CHANGED
@@ -59,6 +59,12 @@ const COMPONENTS = [
59
59
  "dropdown-menu",
60
60
  "form",
61
61
  "hover-card",
62
+ "input",
63
+ "input-otp",
64
+ "label",
65
+ "menubar",
66
+ "navigation-menu",
67
+ "pagination",
62
68
  ];
63
69
 
64
70
  export {