create-better-t-stack 3.9.0 → 3.10.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 +2 -1
- package/dist/cli.mjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{src-DLvUK0Qf.mjs → src-QkFdHtZE.mjs} +17 -14
- package/package.json +38 -38
- package/templates/auth/better-auth/convex/backend/convex/auth.config.ts.hbs +5 -7
- package/templates/auth/better-auth/convex/backend/convex/auth.ts.hbs +16 -16
- package/templates/auth/better-auth/convex/backend/convex/http.ts.hbs +4 -4
- package/templates/auth/better-auth/convex/web/react/next/src/app/api/auth/[...all]/route.ts.hbs +2 -2
- package/templates/auth/better-auth/convex/web/react/next/src/components/user-menu.tsx.hbs +10 -10
- package/templates/auth/better-auth/convex/web/react/next/src/lib/auth-server.ts.hbs +13 -5
- package/templates/auth/better-auth/convex/web/react/tanstack-router/src/components/user-menu.tsx.hbs +14 -12
- package/templates/auth/better-auth/convex/web/react/tanstack-start/src/components/user-menu.tsx.hbs +13 -16
- package/templates/auth/better-auth/convex/web/react/tanstack-start/src/lib/auth-server.ts.hbs +11 -5
- package/templates/auth/better-auth/convex/web/react/tanstack-start/src/routes/api/auth/$.ts.hbs +4 -4
- package/templates/auth/better-auth/fullstack/tanstack-start/src/routes/api/auth/$.ts.hbs +1 -1
- package/templates/auth/better-auth/web/react/next/src/components/user-menu.tsx.hbs +17 -15
- package/templates/auth/better-auth/web/react/react-router/src/components/user-menu.tsx.hbs +16 -15
- package/templates/auth/better-auth/web/react/{tanstack-start/src/components/user-menu.tsx → tanstack-router/src/components/user-menu.tsx.hbs} +16 -15
- package/templates/auth/better-auth/web/react/{tanstack-router/src/components/user-menu.tsx → tanstack-start/src/components/user-menu.tsx.hbs} +16 -15
- package/templates/backend/convex/packages/backend/convex/README.md +4 -4
- package/templates/backend/convex/packages/backend/convex/tsconfig.json.hbs +1 -1
- package/templates/frontend/react/next/package.json.hbs +8 -7
- package/templates/frontend/react/next/src/app/layout.tsx.hbs +28 -1
- package/templates/frontend/react/next/src/components/mode-toggle.tsx.hbs +4 -6
- package/templates/frontend/react/next/src/components/providers.tsx.hbs +14 -4
- package/templates/frontend/react/react-router/package.json.hbs +2 -1
- package/templates/frontend/react/{tanstack-router/src/components/mode-toggle.tsx → react-router/src/components/mode-toggle.tsx.hbs} +4 -6
- package/templates/frontend/react/tanstack-router/package.json.hbs +2 -1
- package/templates/frontend/react/{react-router/src/components/mode-toggle.tsx → tanstack-router/src/components/mode-toggle.tsx.hbs} +4 -6
- package/templates/frontend/react/tanstack-start/package.json.hbs +2 -1
- package/templates/frontend/react/tanstack-start/src/router.tsx.hbs +6 -0
- package/templates/frontend/react/tanstack-start/src/routes/__root.tsx.hbs +13 -14
- package/templates/frontend/react/tanstack-start/vite.config.ts.hbs +5 -0
- package/templates/frontend/react/web-base/components.json +5 -2
- package/templates/frontend/react/web-base/src/components/ui/button.tsx.hbs +57 -0
- package/templates/frontend/react/web-base/src/components/ui/card.tsx.hbs +103 -0
- package/templates/frontend/react/web-base/src/components/ui/checkbox.tsx.hbs +26 -0
- package/templates/frontend/react/web-base/src/components/ui/dropdown-menu.tsx.hbs +262 -0
- package/templates/frontend/react/web-base/src/components/ui/input.tsx.hbs +20 -0
- package/templates/frontend/react/web-base/src/components/ui/label.tsx.hbs +20 -0
- package/templates/frontend/react/web-base/src/components/ui/skeleton.tsx.hbs +13 -0
- package/templates/frontend/react/web-base/src/components/ui/sonner.tsx.hbs +44 -0
- package/templates/frontend/react/web-base/src/index.css.hbs +57 -63
- package/templates/frontend/react/web-base/src/components/ui/button.tsx +0 -56
- package/templates/frontend/react/web-base/src/components/ui/card.tsx +0 -75
- package/templates/frontend/react/web-base/src/components/ui/checkbox.tsx +0 -27
- package/templates/frontend/react/web-base/src/components/ui/dropdown-menu.tsx +0 -228
- package/templates/frontend/react/web-base/src/components/ui/input.tsx +0 -21
- package/templates/frontend/react/web-base/src/components/ui/label.tsx +0 -19
- package/templates/frontend/react/web-base/src/components/ui/skeleton.tsx +0 -13
- package/templates/frontend/react/web-base/src/components/ui/sonner.tsx +0 -25
- /package/templates/auth/better-auth/web/react/tanstack-router/src/components/{sign-in-form.tsx → sign-in-form.tsx.hbs} +0 -0
- /package/templates/auth/better-auth/web/react/tanstack-router/src/components/{sign-up-form.tsx → sign-up-form.tsx.hbs} +0 -0
- /package/templates/auth/better-auth/web/react/tanstack-router/src/routes/{login.tsx → login.tsx.hbs} +0 -0
- /package/templates/auth/better-auth/web/react/tanstack-start/src/components/{sign-in-form.tsx → sign-in-form.tsx.hbs} +0 -0
- /package/templates/auth/better-auth/web/react/tanstack-start/src/components/{sign-up-form.tsx → sign-up-form.tsx.hbs} +0 -0
- /package/templates/auth/better-auth/web/react/tanstack-start/src/routes/{login.tsx → login.tsx.hbs} +0 -0
- /package/templates/auth/better-auth/web/solid/src/components/{sign-in-form.tsx → sign-in-form.tsx.hbs} +0 -0
- /package/templates/auth/better-auth/web/solid/src/components/{sign-up-form.tsx → sign-up-form.tsx.hbs} +0 -0
- /package/templates/auth/better-auth/web/solid/src/routes/{login.tsx → login.tsx.hbs} +0 -0
- /package/templates/frontend/react/react-router/src/components/{theme-provider.tsx → theme-provider.tsx.hbs} +0 -0
- /package/templates/frontend/react/tanstack-router/src/components/{theme-provider.tsx → theme-provider.tsx.hbs} +0 -0
- /package/templates/frontend/react/web-base/src/lib/{utils.ts → utils.ts.hbs} +0 -0
|
@@ -1,27 +1,13 @@
|
|
|
1
|
-
@import
|
|
2
|
-
@import
|
|
1
|
+
@import 'tailwindcss';
|
|
2
|
+
@import 'tw-animate-css';
|
|
3
|
+
@import 'shadcn/tailwind.css';
|
|
3
4
|
{{#if (includes examples "ai")}}
|
|
4
5
|
@source "../node_modules/streamdown/dist/index.js";
|
|
5
6
|
{{/if}}
|
|
6
7
|
|
|
7
|
-
@custom-variant dark (&:
|
|
8
|
-
|
|
9
|
-
@theme {
|
|
10
|
-
--font-sans: "Inter", "Geist", ui-sans-serif, system-ui, sans-serif,
|
|
11
|
-
"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
html,
|
|
15
|
-
body {
|
|
16
|
-
@apply bg-white dark:bg-gray-950;
|
|
17
|
-
|
|
18
|
-
@media (prefers-color-scheme: dark) {
|
|
19
|
-
color-scheme: dark;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
8
|
+
@custom-variant dark (&:is(.dark *));
|
|
22
9
|
|
|
23
10
|
:root {
|
|
24
|
-
--radius: 0.625rem;
|
|
25
11
|
--background: oklch(1 0 0);
|
|
26
12
|
--foreground: oklch(0.145 0 0);
|
|
27
13
|
--card: oklch(1 0 0);
|
|
@@ -36,15 +22,16 @@ body {
|
|
|
36
22
|
--muted-foreground: oklch(0.556 0 0);
|
|
37
23
|
--accent: oklch(0.97 0 0);
|
|
38
24
|
--accent-foreground: oklch(0.205 0 0);
|
|
39
|
-
--destructive: oklch(0.
|
|
25
|
+
--destructive: oklch(0.58 0.22 27);
|
|
40
26
|
--border: oklch(0.922 0 0);
|
|
41
27
|
--input: oklch(0.922 0 0);
|
|
42
28
|
--ring: oklch(0.708 0 0);
|
|
43
|
-
--chart-1: oklch(0.
|
|
44
|
-
--chart-2: oklch(0.
|
|
45
|
-
--chart-3: oklch(0.
|
|
46
|
-
--chart-4: oklch(0.
|
|
47
|
-
--chart-5: oklch(0.
|
|
29
|
+
--chart-1: oklch(0.809 0.105 251.813);
|
|
30
|
+
--chart-2: oklch(0.623 0.214 259.815);
|
|
31
|
+
--chart-3: oklch(0.546 0.245 262.881);
|
|
32
|
+
--chart-4: oklch(0.488 0.243 264.376);
|
|
33
|
+
--chart-5: oklch(0.424 0.199 265.638);
|
|
34
|
+
--radius: 0.625rem;
|
|
48
35
|
--sidebar: oklch(0.985 0 0);
|
|
49
36
|
--sidebar-foreground: oklch(0.145 0 0);
|
|
50
37
|
--sidebar-primary: oklch(0.205 0 0);
|
|
@@ -62,23 +49,23 @@ body {
|
|
|
62
49
|
--card-foreground: oklch(0.985 0 0);
|
|
63
50
|
--popover: oklch(0.205 0 0);
|
|
64
51
|
--popover-foreground: oklch(0.985 0 0);
|
|
65
|
-
--primary: oklch(0.
|
|
52
|
+
--primary: oklch(0.87 0 0);
|
|
66
53
|
--primary-foreground: oklch(0.205 0 0);
|
|
67
54
|
--secondary: oklch(0.269 0 0);
|
|
68
55
|
--secondary-foreground: oklch(0.985 0 0);
|
|
69
56
|
--muted: oklch(0.269 0 0);
|
|
70
57
|
--muted-foreground: oklch(0.708 0 0);
|
|
71
|
-
--accent: oklch(0.
|
|
58
|
+
--accent: oklch(0.371 0 0);
|
|
72
59
|
--accent-foreground: oklch(0.985 0 0);
|
|
73
60
|
--destructive: oklch(0.704 0.191 22.216);
|
|
74
61
|
--border: oklch(1 0 0 / 10%);
|
|
75
62
|
--input: oklch(1 0 0 / 15%);
|
|
76
63
|
--ring: oklch(0.556 0 0);
|
|
77
|
-
--chart-1: oklch(0.
|
|
78
|
-
--chart-2: oklch(0.
|
|
79
|
-
--chart-3: oklch(0.
|
|
80
|
-
--chart-4: oklch(0.
|
|
81
|
-
--chart-5: oklch(0.
|
|
64
|
+
--chart-1: oklch(0.809 0.105 251.813);
|
|
65
|
+
--chart-2: oklch(0.623 0.214 259.815);
|
|
66
|
+
--chart-3: oklch(0.546 0.245 262.881);
|
|
67
|
+
--chart-4: oklch(0.488 0.243 264.376);
|
|
68
|
+
--chart-5: oklch(0.424 0.199 265.638);
|
|
82
69
|
--sidebar: oklch(0.205 0 0);
|
|
83
70
|
--sidebar-foreground: oklch(0.985 0 0);
|
|
84
71
|
--sidebar-primary: oklch(0.488 0.243 264.376);
|
|
@@ -90,41 +77,45 @@ body {
|
|
|
90
77
|
}
|
|
91
78
|
|
|
92
79
|
@theme inline {
|
|
80
|
+
--font-sans: 'Inter Variable', sans-serif;
|
|
81
|
+
--color-sidebar-ring: var(--sidebar-ring);
|
|
82
|
+
--color-sidebar-border: var(--sidebar-border);
|
|
83
|
+
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
|
|
84
|
+
--color-sidebar-accent: var(--sidebar-accent);
|
|
85
|
+
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
|
|
86
|
+
--color-sidebar-primary: var(--sidebar-primary);
|
|
87
|
+
--color-sidebar-foreground: var(--sidebar-foreground);
|
|
88
|
+
--color-sidebar: var(--sidebar);
|
|
89
|
+
--color-chart-5: var(--chart-5);
|
|
90
|
+
--color-chart-4: var(--chart-4);
|
|
91
|
+
--color-chart-3: var(--chart-3);
|
|
92
|
+
--color-chart-2: var(--chart-2);
|
|
93
|
+
--color-chart-1: var(--chart-1);
|
|
94
|
+
--color-ring: var(--ring);
|
|
95
|
+
--color-input: var(--input);
|
|
96
|
+
--color-border: var(--border);
|
|
97
|
+
--color-destructive: var(--destructive);
|
|
98
|
+
--color-accent-foreground: var(--accent-foreground);
|
|
99
|
+
--color-accent: var(--accent);
|
|
100
|
+
--color-muted-foreground: var(--muted-foreground);
|
|
101
|
+
--color-muted: var(--muted);
|
|
102
|
+
--color-secondary-foreground: var(--secondary-foreground);
|
|
103
|
+
--color-secondary: var(--secondary);
|
|
104
|
+
--color-primary-foreground: var(--primary-foreground);
|
|
105
|
+
--color-primary: var(--primary);
|
|
106
|
+
--color-popover-foreground: var(--popover-foreground);
|
|
107
|
+
--color-popover: var(--popover);
|
|
108
|
+
--color-card-foreground: var(--card-foreground);
|
|
109
|
+
--color-card: var(--card);
|
|
110
|
+
--color-foreground: var(--foreground);
|
|
111
|
+
--color-background: var(--background);
|
|
93
112
|
--radius-sm: calc(var(--radius) - 4px);
|
|
94
113
|
--radius-md: calc(var(--radius) - 2px);
|
|
95
114
|
--radius-lg: var(--radius);
|
|
96
115
|
--radius-xl: calc(var(--radius) + 4px);
|
|
97
|
-
--
|
|
98
|
-
--
|
|
99
|
-
--
|
|
100
|
-
--color-card-foreground: var(--card-foreground);
|
|
101
|
-
--color-popover: var(--popover);
|
|
102
|
-
--color-popover-foreground: var(--popover-foreground);
|
|
103
|
-
--color-primary: var(--primary);
|
|
104
|
-
--color-primary-foreground: var(--primary-foreground);
|
|
105
|
-
--color-secondary: var(--secondary);
|
|
106
|
-
--color-secondary-foreground: var(--secondary-foreground);
|
|
107
|
-
--color-muted: var(--muted);
|
|
108
|
-
--color-muted-foreground: var(--muted-foreground);
|
|
109
|
-
--color-accent: var(--accent);
|
|
110
|
-
--color-accent-foreground: var(--accent-foreground);
|
|
111
|
-
--color-destructive: var(--destructive);
|
|
112
|
-
--color-border: var(--border);
|
|
113
|
-
--color-input: var(--input);
|
|
114
|
-
--color-ring: var(--ring);
|
|
115
|
-
--color-chart-1: var(--chart-1);
|
|
116
|
-
--color-chart-2: var(--chart-2);
|
|
117
|
-
--color-chart-3: var(--chart-3);
|
|
118
|
-
--color-chart-4: var(--chart-4);
|
|
119
|
-
--color-chart-5: var(--chart-5);
|
|
120
|
-
--color-sidebar: var(--sidebar);
|
|
121
|
-
--color-sidebar-foreground: var(--sidebar-foreground);
|
|
122
|
-
--color-sidebar-primary: var(--sidebar-primary);
|
|
123
|
-
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
|
|
124
|
-
--color-sidebar-accent: var(--sidebar-accent);
|
|
125
|
-
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
|
|
126
|
-
--color-sidebar-border: var(--sidebar-border);
|
|
127
|
-
--color-sidebar-ring: var(--sidebar-ring);
|
|
116
|
+
--radius-2xl: calc(var(--radius) + 8px);
|
|
117
|
+
--radius-3xl: calc(var(--radius) + 12px);
|
|
118
|
+
--radius-4xl: calc(var(--radius) + 16px);
|
|
128
119
|
}
|
|
129
120
|
|
|
130
121
|
@layer base {
|
|
@@ -132,6 +123,9 @@ body {
|
|
|
132
123
|
@apply border-border outline-ring/50;
|
|
133
124
|
}
|
|
134
125
|
body {
|
|
135
|
-
@apply bg-background text-foreground;
|
|
126
|
+
@apply font-sans bg-background text-foreground;
|
|
127
|
+
}
|
|
128
|
+
html {
|
|
129
|
+
@apply font-sans;
|
|
136
130
|
}
|
|
137
131
|
}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { Slot as SlotPrimitive } from "radix-ui";
|
|
3
|
-
import { cva, type VariantProps } from "class-variance-authority";
|
|
4
|
-
|
|
5
|
-
import { cn } from "@/lib/utils";
|
|
6
|
-
|
|
7
|
-
const buttonVariants = cva(
|
|
8
|
-
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
9
|
-
{
|
|
10
|
-
variants: {
|
|
11
|
-
variant: {
|
|
12
|
-
default: "bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",
|
|
13
|
-
destructive:
|
|
14
|
-
"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
|
|
15
|
-
outline:
|
|
16
|
-
"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
|
|
17
|
-
secondary: "bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",
|
|
18
|
-
ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
|
|
19
|
-
link: "text-primary underline-offset-4 hover:underline",
|
|
20
|
-
},
|
|
21
|
-
size: {
|
|
22
|
-
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
|
23
|
-
sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
|
|
24
|
-
lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
|
|
25
|
-
icon: "size-9",
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
defaultVariants: {
|
|
29
|
-
variant: "default",
|
|
30
|
-
size: "default",
|
|
31
|
-
},
|
|
32
|
-
},
|
|
33
|
-
);
|
|
34
|
-
|
|
35
|
-
function Button({
|
|
36
|
-
className,
|
|
37
|
-
variant,
|
|
38
|
-
size,
|
|
39
|
-
asChild = false,
|
|
40
|
-
...props
|
|
41
|
-
}: React.ComponentProps<"button"> &
|
|
42
|
-
VariantProps<typeof buttonVariants> & {
|
|
43
|
-
asChild?: boolean;
|
|
44
|
-
}) {
|
|
45
|
-
const Comp = asChild ? SlotPrimitive.Slot : "button";
|
|
46
|
-
|
|
47
|
-
return (
|
|
48
|
-
<Comp
|
|
49
|
-
data-slot="button"
|
|
50
|
-
className={cn(buttonVariants({ variant, size, className }))}
|
|
51
|
-
{...props}
|
|
52
|
-
/>
|
|
53
|
-
);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
export { Button, buttonVariants };
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
|
|
3
|
-
import { cn } from "@/lib/utils";
|
|
4
|
-
|
|
5
|
-
function Card({ className, ...props }: React.ComponentProps<"div">) {
|
|
6
|
-
return (
|
|
7
|
-
<div
|
|
8
|
-
data-slot="card"
|
|
9
|
-
className={cn(
|
|
10
|
-
"bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",
|
|
11
|
-
className,
|
|
12
|
-
)}
|
|
13
|
-
{...props}
|
|
14
|
-
/>
|
|
15
|
-
);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
function CardHeader({ className, ...props }: React.ComponentProps<"div">) {
|
|
19
|
-
return (
|
|
20
|
-
<div
|
|
21
|
-
data-slot="card-header"
|
|
22
|
-
className={cn(
|
|
23
|
-
"@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",
|
|
24
|
-
className,
|
|
25
|
-
)}
|
|
26
|
-
{...props}
|
|
27
|
-
/>
|
|
28
|
-
);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
function CardTitle({ className, ...props }: React.ComponentProps<"div">) {
|
|
32
|
-
return (
|
|
33
|
-
<div
|
|
34
|
-
data-slot="card-title"
|
|
35
|
-
className={cn("leading-none font-semibold", className)}
|
|
36
|
-
{...props}
|
|
37
|
-
/>
|
|
38
|
-
);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
function CardDescription({ className, ...props }: React.ComponentProps<"div">) {
|
|
42
|
-
return (
|
|
43
|
-
<div
|
|
44
|
-
data-slot="card-description"
|
|
45
|
-
className={cn("text-muted-foreground text-sm", className)}
|
|
46
|
-
{...props}
|
|
47
|
-
/>
|
|
48
|
-
);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
function CardAction({ className, ...props }: React.ComponentProps<"div">) {
|
|
52
|
-
return (
|
|
53
|
-
<div
|
|
54
|
-
data-slot="card-action"
|
|
55
|
-
className={cn("col-start-2 row-span-2 row-start-1 self-start justify-self-end", className)}
|
|
56
|
-
{...props}
|
|
57
|
-
/>
|
|
58
|
-
);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
function CardContent({ className, ...props }: React.ComponentProps<"div">) {
|
|
62
|
-
return <div data-slot="card-content" className={cn("px-6", className)} {...props} />;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
function CardFooter({ className, ...props }: React.ComponentProps<"div">) {
|
|
66
|
-
return (
|
|
67
|
-
<div
|
|
68
|
-
data-slot="card-footer"
|
|
69
|
-
className={cn("flex items-center px-6 [.border-t]:pt-6", className)}
|
|
70
|
-
{...props}
|
|
71
|
-
/>
|
|
72
|
-
);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
export { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent };
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { Checkbox as CheckboxPrimitive } from "radix-ui";
|
|
3
|
-
import { CheckIcon } from "lucide-react";
|
|
4
|
-
|
|
5
|
-
import { cn } from "@/lib/utils";
|
|
6
|
-
|
|
7
|
-
function Checkbox({ className, ...props }: React.ComponentProps<typeof CheckboxPrimitive.Root>) {
|
|
8
|
-
return (
|
|
9
|
-
<CheckboxPrimitive.Root
|
|
10
|
-
data-slot="checkbox"
|
|
11
|
-
className={cn(
|
|
12
|
-
"peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
|
|
13
|
-
className,
|
|
14
|
-
)}
|
|
15
|
-
{...props}
|
|
16
|
-
>
|
|
17
|
-
<CheckboxPrimitive.Indicator
|
|
18
|
-
data-slot="checkbox-indicator"
|
|
19
|
-
className="flex items-center justify-center text-current transition-none"
|
|
20
|
-
>
|
|
21
|
-
<CheckIcon className="size-3.5" />
|
|
22
|
-
</CheckboxPrimitive.Indicator>
|
|
23
|
-
</CheckboxPrimitive.Root>
|
|
24
|
-
);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export { Checkbox };
|
|
@@ -1,228 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui";
|
|
5
|
-
import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react";
|
|
6
|
-
|
|
7
|
-
import { cn } from "@/lib/utils";
|
|
8
|
-
|
|
9
|
-
function DropdownMenu({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Root>) {
|
|
10
|
-
return <DropdownMenuPrimitive.Root data-slot="dropdown-menu" {...props} />;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
function DropdownMenuPortal({
|
|
14
|
-
...props
|
|
15
|
-
}: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>) {
|
|
16
|
-
return <DropdownMenuPrimitive.Portal data-slot="dropdown-menu-portal" {...props} />;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
function DropdownMenuTrigger({
|
|
20
|
-
...props
|
|
21
|
-
}: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>) {
|
|
22
|
-
return <DropdownMenuPrimitive.Trigger data-slot="dropdown-menu-trigger" {...props} />;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
function DropdownMenuContent({
|
|
26
|
-
className,
|
|
27
|
-
sideOffset = 4,
|
|
28
|
-
...props
|
|
29
|
-
}: React.ComponentProps<typeof DropdownMenuPrimitive.Content>) {
|
|
30
|
-
return (
|
|
31
|
-
<DropdownMenuPrimitive.Portal>
|
|
32
|
-
<DropdownMenuPrimitive.Content
|
|
33
|
-
data-slot="dropdown-menu-content"
|
|
34
|
-
sideOffset={sideOffset}
|
|
35
|
-
className={cn(
|
|
36
|
-
"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",
|
|
37
|
-
className,
|
|
38
|
-
)}
|
|
39
|
-
{...props}
|
|
40
|
-
/>
|
|
41
|
-
</DropdownMenuPrimitive.Portal>
|
|
42
|
-
);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
function DropdownMenuGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Group>) {
|
|
46
|
-
return <DropdownMenuPrimitive.Group data-slot="dropdown-menu-group" {...props} />;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
function DropdownMenuItem({
|
|
50
|
-
className,
|
|
51
|
-
inset,
|
|
52
|
-
variant = "default",
|
|
53
|
-
...props
|
|
54
|
-
}: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {
|
|
55
|
-
inset?: boolean;
|
|
56
|
-
variant?: "default" | "destructive";
|
|
57
|
-
}) {
|
|
58
|
-
return (
|
|
59
|
-
<DropdownMenuPrimitive.Item
|
|
60
|
-
data-slot="dropdown-menu-item"
|
|
61
|
-
data-inset={inset}
|
|
62
|
-
data-variant={variant}
|
|
63
|
-
className={cn(
|
|
64
|
-
"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-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
65
|
-
className,
|
|
66
|
-
)}
|
|
67
|
-
{...props}
|
|
68
|
-
/>
|
|
69
|
-
);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
function DropdownMenuCheckboxItem({
|
|
73
|
-
className,
|
|
74
|
-
children,
|
|
75
|
-
checked,
|
|
76
|
-
...props
|
|
77
|
-
}: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>) {
|
|
78
|
-
return (
|
|
79
|
-
<DropdownMenuPrimitive.CheckboxItem
|
|
80
|
-
data-slot="dropdown-menu-checkbox-item"
|
|
81
|
-
className={cn(
|
|
82
|
-
"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",
|
|
83
|
-
className,
|
|
84
|
-
)}
|
|
85
|
-
checked={checked}
|
|
86
|
-
{...props}
|
|
87
|
-
>
|
|
88
|
-
<span className="pointer-events-none absolute left-2 flex size-3.5 items-center justify-center">
|
|
89
|
-
<DropdownMenuPrimitive.ItemIndicator>
|
|
90
|
-
<CheckIcon className="size-4" />
|
|
91
|
-
</DropdownMenuPrimitive.ItemIndicator>
|
|
92
|
-
</span>
|
|
93
|
-
{children}
|
|
94
|
-
</DropdownMenuPrimitive.CheckboxItem>
|
|
95
|
-
);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
function DropdownMenuRadioGroup({
|
|
99
|
-
...props
|
|
100
|
-
}: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>) {
|
|
101
|
-
return <DropdownMenuPrimitive.RadioGroup data-slot="dropdown-menu-radio-group" {...props} />;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
function DropdownMenuRadioItem({
|
|
105
|
-
className,
|
|
106
|
-
children,
|
|
107
|
-
...props
|
|
108
|
-
}: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>) {
|
|
109
|
-
return (
|
|
110
|
-
<DropdownMenuPrimitive.RadioItem
|
|
111
|
-
data-slot="dropdown-menu-radio-item"
|
|
112
|
-
className={cn(
|
|
113
|
-
"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",
|
|
114
|
-
className,
|
|
115
|
-
)}
|
|
116
|
-
{...props}
|
|
117
|
-
>
|
|
118
|
-
<span className="pointer-events-none absolute left-2 flex size-3.5 items-center justify-center">
|
|
119
|
-
<DropdownMenuPrimitive.ItemIndicator>
|
|
120
|
-
<CircleIcon className="size-2 fill-current" />
|
|
121
|
-
</DropdownMenuPrimitive.ItemIndicator>
|
|
122
|
-
</span>
|
|
123
|
-
{children}
|
|
124
|
-
</DropdownMenuPrimitive.RadioItem>
|
|
125
|
-
);
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
function DropdownMenuLabel({
|
|
129
|
-
className,
|
|
130
|
-
inset,
|
|
131
|
-
...props
|
|
132
|
-
}: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {
|
|
133
|
-
inset?: boolean;
|
|
134
|
-
}) {
|
|
135
|
-
return (
|
|
136
|
-
<DropdownMenuPrimitive.Label
|
|
137
|
-
data-slot="dropdown-menu-label"
|
|
138
|
-
data-inset={inset}
|
|
139
|
-
className={cn("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8", className)}
|
|
140
|
-
{...props}
|
|
141
|
-
/>
|
|
142
|
-
);
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
function DropdownMenuSeparator({
|
|
146
|
-
className,
|
|
147
|
-
...props
|
|
148
|
-
}: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>) {
|
|
149
|
-
return (
|
|
150
|
-
<DropdownMenuPrimitive.Separator
|
|
151
|
-
data-slot="dropdown-menu-separator"
|
|
152
|
-
className={cn("bg-border -mx-1 my-1 h-px", className)}
|
|
153
|
-
{...props}
|
|
154
|
-
/>
|
|
155
|
-
);
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
function DropdownMenuShortcut({ className, ...props }: React.ComponentProps<"span">) {
|
|
159
|
-
return (
|
|
160
|
-
<span
|
|
161
|
-
data-slot="dropdown-menu-shortcut"
|
|
162
|
-
className={cn("text-muted-foreground ml-auto text-xs tracking-widest", className)}
|
|
163
|
-
{...props}
|
|
164
|
-
/>
|
|
165
|
-
);
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
function DropdownMenuSub({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>) {
|
|
169
|
-
return <DropdownMenuPrimitive.Sub data-slot="dropdown-menu-sub" {...props} />;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
function DropdownMenuSubTrigger({
|
|
173
|
-
className,
|
|
174
|
-
inset,
|
|
175
|
-
children,
|
|
176
|
-
...props
|
|
177
|
-
}: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {
|
|
178
|
-
inset?: boolean;
|
|
179
|
-
}) {
|
|
180
|
-
return (
|
|
181
|
-
<DropdownMenuPrimitive.SubTrigger
|
|
182
|
-
data-slot="dropdown-menu-sub-trigger"
|
|
183
|
-
data-inset={inset}
|
|
184
|
-
className={cn(
|
|
185
|
-
"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8",
|
|
186
|
-
className,
|
|
187
|
-
)}
|
|
188
|
-
{...props}
|
|
189
|
-
>
|
|
190
|
-
{children}
|
|
191
|
-
<ChevronRightIcon className="ml-auto size-4" />
|
|
192
|
-
</DropdownMenuPrimitive.SubTrigger>
|
|
193
|
-
);
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
function DropdownMenuSubContent({
|
|
197
|
-
className,
|
|
198
|
-
...props
|
|
199
|
-
}: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>) {
|
|
200
|
-
return (
|
|
201
|
-
<DropdownMenuPrimitive.SubContent
|
|
202
|
-
data-slot="dropdown-menu-sub-content"
|
|
203
|
-
className={cn(
|
|
204
|
-
"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",
|
|
205
|
-
className,
|
|
206
|
-
)}
|
|
207
|
-
{...props}
|
|
208
|
-
/>
|
|
209
|
-
);
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
export {
|
|
213
|
-
DropdownMenu,
|
|
214
|
-
DropdownMenuPortal,
|
|
215
|
-
DropdownMenuTrigger,
|
|
216
|
-
DropdownMenuContent,
|
|
217
|
-
DropdownMenuGroup,
|
|
218
|
-
DropdownMenuLabel,
|
|
219
|
-
DropdownMenuItem,
|
|
220
|
-
DropdownMenuCheckboxItem,
|
|
221
|
-
DropdownMenuRadioGroup,
|
|
222
|
-
DropdownMenuRadioItem,
|
|
223
|
-
DropdownMenuSeparator,
|
|
224
|
-
DropdownMenuShortcut,
|
|
225
|
-
DropdownMenuSub,
|
|
226
|
-
DropdownMenuSubTrigger,
|
|
227
|
-
DropdownMenuSubContent,
|
|
228
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
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 text-base 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:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md: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 };
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { Label as LabelPrimitive } from "radix-ui";
|
|
3
|
-
|
|
4
|
-
import { cn } from "@/lib/utils";
|
|
5
|
-
|
|
6
|
-
function Label({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>) {
|
|
7
|
-
return (
|
|
8
|
-
<LabelPrimitive.Root
|
|
9
|
-
data-slot="label"
|
|
10
|
-
className={cn(
|
|
11
|
-
"flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
|
|
12
|
-
className,
|
|
13
|
-
)}
|
|
14
|
-
{...props}
|
|
15
|
-
/>
|
|
16
|
-
);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export { Label };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { cn } from "@/lib/utils";
|
|
2
|
-
|
|
3
|
-
function Skeleton({ className, ...props }: React.ComponentProps<"div">) {
|
|
4
|
-
return (
|
|
5
|
-
<div
|
|
6
|
-
data-slot="skeleton"
|
|
7
|
-
className={cn("bg-accent animate-pulse rounded-md", className)}
|
|
8
|
-
{...props}
|
|
9
|
-
/>
|
|
10
|
-
);
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export { Skeleton };
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import { useTheme } from "next-themes";
|
|
4
|
-
import { Toaster as Sonner, type ToasterProps } from "sonner";
|
|
5
|
-
|
|
6
|
-
const Toaster = ({ ...props }: ToasterProps) => {
|
|
7
|
-
const { theme = "system" } = useTheme();
|
|
8
|
-
|
|
9
|
-
return (
|
|
10
|
-
<Sonner
|
|
11
|
-
theme={theme as ToasterProps["theme"]}
|
|
12
|
-
className="toaster group"
|
|
13
|
-
style={
|
|
14
|
-
{
|
|
15
|
-
"--normal-bg": "var(--popover)",
|
|
16
|
-
"--normal-text": "var(--popover-foreground)",
|
|
17
|
-
"--normal-border": "var(--border)",
|
|
18
|
-
} as React.CSSProperties
|
|
19
|
-
}
|
|
20
|
-
{...props}
|
|
21
|
-
/>
|
|
22
|
-
);
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
export { Toaster };
|
|
File without changes
|
|
File without changes
|
/package/templates/auth/better-auth/web/react/tanstack-router/src/routes/{login.tsx → login.tsx.hbs}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/templates/auth/better-auth/web/react/tanstack-start/src/routes/{login.tsx → login.tsx.hbs}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|