@tioelvis/next-template 2.3.2 → 2.3.3
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.3.
|
|
3
|
+
"version": "2.3.3",
|
|
4
4
|
"description": "CLI to scaffold a Next.js + Tailwind project using shadcn/ui components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -48,6 +48,7 @@
|
|
|
48
48
|
"@radix-ui/react-progress": "^1.1.7",
|
|
49
49
|
"@radix-ui/react-radio-group": "^1.3.7",
|
|
50
50
|
"@radix-ui/react-scroll-area": "^1.2.9",
|
|
51
|
+
"@radix-ui/react-select": "^2.2.5",
|
|
51
52
|
"@radix-ui/react-slot": "^1.2.3",
|
|
52
53
|
"@tailwindcss/postcss": "^4.1.11",
|
|
53
54
|
"@tanstack/react-query": "^5.83.0",
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
5
|
+
import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react";
|
|
6
|
+
|
|
7
|
+
import { cn } from "@/lib/utils";
|
|
8
|
+
|
|
9
|
+
function Select({
|
|
10
|
+
...props
|
|
11
|
+
}: React.ComponentProps<typeof SelectPrimitive.Root>) {
|
|
12
|
+
return <SelectPrimitive.Root data-slot="select" {...props} />;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function SelectGroup({
|
|
16
|
+
...props
|
|
17
|
+
}: React.ComponentProps<typeof SelectPrimitive.Group>) {
|
|
18
|
+
return <SelectPrimitive.Group data-slot="select-group" {...props} />;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function SelectValue({
|
|
22
|
+
...props
|
|
23
|
+
}: React.ComponentProps<typeof SelectPrimitive.Value>) {
|
|
24
|
+
return <SelectPrimitive.Value data-slot="select-value" {...props} />;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function SelectTrigger({
|
|
28
|
+
className,
|
|
29
|
+
size = "default",
|
|
30
|
+
children,
|
|
31
|
+
...props
|
|
32
|
+
}: React.ComponentProps<typeof SelectPrimitive.Trigger> & {
|
|
33
|
+
size?: "sm" | "default";
|
|
34
|
+
}) {
|
|
35
|
+
return (
|
|
36
|
+
<SelectPrimitive.Trigger
|
|
37
|
+
data-slot="select-trigger"
|
|
38
|
+
data-size={size}
|
|
39
|
+
className={cn(
|
|
40
|
+
"border-input cursor-pointer data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
41
|
+
className
|
|
42
|
+
)}
|
|
43
|
+
{...props}>
|
|
44
|
+
{children}
|
|
45
|
+
<SelectPrimitive.Icon asChild>
|
|
46
|
+
<ChevronDownIcon className="size-4 opacity-50" />
|
|
47
|
+
</SelectPrimitive.Icon>
|
|
48
|
+
</SelectPrimitive.Trigger>
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function SelectContent({
|
|
53
|
+
className,
|
|
54
|
+
children,
|
|
55
|
+
position = "popper",
|
|
56
|
+
...props
|
|
57
|
+
}: React.ComponentProps<typeof SelectPrimitive.Content>) {
|
|
58
|
+
return (
|
|
59
|
+
<SelectPrimitive.Portal>
|
|
60
|
+
<SelectPrimitive.Content
|
|
61
|
+
data-slot="select-content"
|
|
62
|
+
className={cn(
|
|
63
|
+
"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 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",
|
|
64
|
+
position === "popper" &&
|
|
65
|
+
"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
66
|
+
className
|
|
67
|
+
)}
|
|
68
|
+
position={position}
|
|
69
|
+
{...props}>
|
|
70
|
+
<SelectScrollUpButton />
|
|
71
|
+
<SelectPrimitive.Viewport
|
|
72
|
+
className={cn(
|
|
73
|
+
"p-1",
|
|
74
|
+
position === "popper" &&
|
|
75
|
+
"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"
|
|
76
|
+
)}>
|
|
77
|
+
{children}
|
|
78
|
+
</SelectPrimitive.Viewport>
|
|
79
|
+
<SelectScrollDownButton />
|
|
80
|
+
</SelectPrimitive.Content>
|
|
81
|
+
</SelectPrimitive.Portal>
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
function SelectLabel({
|
|
86
|
+
className,
|
|
87
|
+
...props
|
|
88
|
+
}: React.ComponentProps<typeof SelectPrimitive.Label>) {
|
|
89
|
+
return (
|
|
90
|
+
<SelectPrimitive.Label
|
|
91
|
+
data-slot="select-label"
|
|
92
|
+
className={cn("text-muted-foreground px-2 py-1.5 text-xs", className)}
|
|
93
|
+
{...props}
|
|
94
|
+
/>
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
function SelectItem({
|
|
99
|
+
className,
|
|
100
|
+
children,
|
|
101
|
+
...props
|
|
102
|
+
}: React.ComponentProps<typeof SelectPrimitive.Item>) {
|
|
103
|
+
return (
|
|
104
|
+
<SelectPrimitive.Item
|
|
105
|
+
data-slot="select-item"
|
|
106
|
+
className={cn(
|
|
107
|
+
"focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-pointer items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 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 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
|
|
108
|
+
className
|
|
109
|
+
)}
|
|
110
|
+
{...props}>
|
|
111
|
+
<span className="absolute right-2 flex size-3.5 items-center justify-center">
|
|
112
|
+
<SelectPrimitive.ItemIndicator>
|
|
113
|
+
<CheckIcon className="size-4" />
|
|
114
|
+
</SelectPrimitive.ItemIndicator>
|
|
115
|
+
</span>
|
|
116
|
+
<SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>
|
|
117
|
+
</SelectPrimitive.Item>
|
|
118
|
+
);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
function SelectSeparator({
|
|
122
|
+
className,
|
|
123
|
+
...props
|
|
124
|
+
}: React.ComponentProps<typeof SelectPrimitive.Separator>) {
|
|
125
|
+
return (
|
|
126
|
+
<SelectPrimitive.Separator
|
|
127
|
+
data-slot="select-separator"
|
|
128
|
+
className={cn("bg-border pointer-events-none -mx-1 my-1 h-px", className)}
|
|
129
|
+
{...props}
|
|
130
|
+
/>
|
|
131
|
+
);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
function SelectScrollUpButton({
|
|
135
|
+
className,
|
|
136
|
+
...props
|
|
137
|
+
}: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>) {
|
|
138
|
+
return (
|
|
139
|
+
<SelectPrimitive.ScrollUpButton
|
|
140
|
+
data-slot="select-scroll-up-button"
|
|
141
|
+
className={cn(
|
|
142
|
+
"flex cursor-default items-center justify-center py-1",
|
|
143
|
+
className
|
|
144
|
+
)}
|
|
145
|
+
{...props}>
|
|
146
|
+
<ChevronUpIcon className="size-4" />
|
|
147
|
+
</SelectPrimitive.ScrollUpButton>
|
|
148
|
+
);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
function SelectScrollDownButton({
|
|
152
|
+
className,
|
|
153
|
+
...props
|
|
154
|
+
}: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>) {
|
|
155
|
+
return (
|
|
156
|
+
<SelectPrimitive.ScrollDownButton
|
|
157
|
+
data-slot="select-scroll-down-button"
|
|
158
|
+
className={cn(
|
|
159
|
+
"flex cursor-default items-center justify-center py-1",
|
|
160
|
+
className
|
|
161
|
+
)}
|
|
162
|
+
{...props}>
|
|
163
|
+
<ChevronDownIcon className="size-4" />
|
|
164
|
+
</SelectPrimitive.ScrollDownButton>
|
|
165
|
+
);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
export {
|
|
169
|
+
Select,
|
|
170
|
+
SelectContent,
|
|
171
|
+
SelectGroup,
|
|
172
|
+
SelectItem,
|
|
173
|
+
SelectLabel,
|
|
174
|
+
SelectScrollDownButton,
|
|
175
|
+
SelectScrollUpButton,
|
|
176
|
+
SelectSeparator,
|
|
177
|
+
SelectTrigger,
|
|
178
|
+
SelectValue,
|
|
179
|
+
};
|