create-better-t-stack 1.4.5 → 1.6.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/dist/index.js +150 -98
- package/package.json +1 -1
- package/template/base/apps/{web → web-base}/_gitignore +3 -0
- package/template/base/apps/{web → web-base}/components.json +2 -2
- package/template/base/apps/{web → web-base}/src/components/mode-toggle.tsx +1 -1
- package/template/base/apps/{web → web-base}/src/components/theme-provider.tsx +1 -1
- package/template/base/apps/web-base/src/components/ui/button.tsx +59 -0
- package/template/base/apps/{web → web-base}/src/components/ui/card.tsx +10 -10
- package/template/base/apps/{web → web-base}/src/components/ui/checkbox.tsx +6 -6
- package/template/base/apps/web-base/src/components/ui/dropdown-menu.tsx +255 -0
- package/template/base/apps/web-base/src/components/ui/input.tsx +21 -0
- package/template/base/apps/web-base/src/components/ui/label.tsx +24 -0
- package/template/base/apps/web-base/src/components/ui/skeleton.tsx +13 -0
- package/template/base/apps/web-base/src/components/ui/sonner.tsx +23 -0
- package/template/base/apps/web-base/src/index.css +134 -0
- package/template/base/apps/web-react-router/package.json +49 -0
- package/template/base/apps/web-react-router/public/favicon.ico +0 -0
- package/template/base/apps/web-react-router/react-router.config.ts +6 -0
- package/template/base/apps/web-react-router/src/components/header.tsx +31 -0
- package/template/base/apps/web-react-router/src/root.tsx +91 -0
- package/template/base/apps/web-react-router/src/routes/_index.tsx +89 -0
- package/template/base/apps/web-react-router/src/routes.ts +4 -0
- package/template/base/apps/web-react-router/tsconfig.json +27 -0
- package/template/base/apps/web-react-router/vite.config.ts +8 -0
- package/template/base/apps/{web → web-tanstack-router}/package.json +2 -2
- package/template/base/apps/{web → web-tanstack-router}/src/routes/index.tsx +1 -4
- package/template/examples/ai/apps/web-react-router/src/routes/ai.tsx +64 -0
- package/template/examples/todo/apps/web-react-router/src/routes/todos.tsx +130 -0
- package/template/examples/todo/apps/{web → web-tanstack-router}/src/routes/todos.tsx +6 -8
- package/template/with-auth/apps/web-react-router/src/components/header.tsx +34 -0
- package/template/with-auth/apps/web-react-router/src/components/sign-in-form.tsx +135 -0
- package/template/with-auth/apps/web-react-router/src/components/sign-up-form.tsx +160 -0
- package/template/with-auth/apps/web-react-router/src/components/user-menu.tsx +60 -0
- package/template/with-auth/apps/web-react-router/src/routes/dashboard.tsx +30 -0
- package/template/with-auth/apps/web-react-router/src/routes/login.tsx +13 -0
- package/template/base/apps/web/src/components/ui/button.tsx +0 -57
- package/template/base/apps/web/src/components/ui/dropdown-menu.tsx +0 -199
- package/template/base/apps/web/src/components/ui/input.tsx +0 -22
- package/template/base/apps/web/src/components/ui/label.tsx +0 -24
- package/template/base/apps/web/src/components/ui/skeleton.tsx +0 -15
- package/template/base/apps/web/src/components/ui/sonner.tsx +0 -29
- package/template/base/apps/web/src/index.css +0 -119
- package/template/with-pwa/apps/web/vite.config.ts +0 -35
- /package/template/base/apps/{web → web-base}/src/components/loader.tsx +0 -0
- /package/template/base/apps/{web → web-base}/src/lib/utils.ts +0 -0
- /package/template/base/apps/{web → web-base}/src/utils/trpc.ts +0 -0
- /package/template/base/apps/{web → web-tanstack-router}/index.html +0 -0
- /package/template/base/apps/{web → web-tanstack-router}/src/components/header.tsx +0 -0
- /package/template/base/apps/{web → web-tanstack-router}/src/main.tsx +0 -0
- /package/template/base/apps/{web → web-tanstack-router}/src/routes/__root.tsx +0 -0
- /package/template/base/apps/{web → web-tanstack-router}/tsconfig.json +0 -0
- /package/template/base/apps/{web → web-tanstack-router}/vite.config.ts +0 -0
- /package/template/examples/ai/apps/{web → web-tanstack-router}/src/routes/ai.tsx +0 -0
- /package/template/with-auth/apps/{web → web-base}/src/lib/auth-client.ts +0 -0
- /package/template/with-auth/apps/{web → web-base}/src/utils/trpc.ts +0 -0
- /package/template/with-auth/apps/{web → web-tanstack-router}/src/components/header.tsx +0 -0
- /package/template/with-auth/apps/{web → web-tanstack-router}/src/components/sign-in-form.tsx +0 -0
- /package/template/with-auth/apps/{web → web-tanstack-router}/src/components/sign-up-form.tsx +0 -0
- /package/template/with-auth/apps/{web → web-tanstack-router}/src/components/user-menu.tsx +0 -0
- /package/template/with-auth/apps/{web → web-tanstack-router}/src/routes/dashboard.tsx +0 -0
- /package/template/with-auth/apps/{web → web-tanstack-router}/src/routes/login.tsx +0 -0
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import * as React from "react"
|
|
2
|
-
import * as LabelPrimitive from "@radix-ui/react-label"
|
|
3
|
-
import { cva, type VariantProps } from "class-variance-authority"
|
|
4
|
-
|
|
5
|
-
import { cn } from "@/lib/utils"
|
|
6
|
-
|
|
7
|
-
const labelVariants = cva(
|
|
8
|
-
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
9
|
-
)
|
|
10
|
-
|
|
11
|
-
const Label = React.forwardRef<
|
|
12
|
-
React.ElementRef<typeof LabelPrimitive.Root>,
|
|
13
|
-
React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> &
|
|
14
|
-
VariantProps<typeof labelVariants>
|
|
15
|
-
>(({ className, ...props }, ref) => (
|
|
16
|
-
<LabelPrimitive.Root
|
|
17
|
-
ref={ref}
|
|
18
|
-
className={cn(labelVariants(), className)}
|
|
19
|
-
{...props}
|
|
20
|
-
/>
|
|
21
|
-
))
|
|
22
|
-
Label.displayName = LabelPrimitive.Root.displayName
|
|
23
|
-
|
|
24
|
-
export { Label }
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { cn } from "@/lib/utils"
|
|
2
|
-
|
|
3
|
-
function Skeleton({
|
|
4
|
-
className,
|
|
5
|
-
...props
|
|
6
|
-
}: React.HTMLAttributes<HTMLDivElement>) {
|
|
7
|
-
return (
|
|
8
|
-
<div
|
|
9
|
-
className={cn("animate-pulse rounded-md bg-primary/10", className)}
|
|
10
|
-
{...props}
|
|
11
|
-
/>
|
|
12
|
-
)
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export { Skeleton }
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { useTheme } from "next-themes"
|
|
2
|
-
import { Toaster as Sonner } from "sonner"
|
|
3
|
-
|
|
4
|
-
type ToasterProps = React.ComponentProps<typeof 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
|
-
toastOptions={{
|
|
14
|
-
classNames: {
|
|
15
|
-
toast:
|
|
16
|
-
"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",
|
|
17
|
-
description: "group-[.toast]:text-muted-foreground",
|
|
18
|
-
actionButton:
|
|
19
|
-
"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",
|
|
20
|
-
cancelButton:
|
|
21
|
-
"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground",
|
|
22
|
-
},
|
|
23
|
-
}}
|
|
24
|
-
{...props}
|
|
25
|
-
/>
|
|
26
|
-
)
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export { Toaster }
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
@import 'tailwindcss';
|
|
2
|
-
|
|
3
|
-
@plugin 'tailwindcss-animate';
|
|
4
|
-
|
|
5
|
-
@custom-variant dark (&:is(.dark *));
|
|
6
|
-
|
|
7
|
-
@theme {
|
|
8
|
-
--radius-lg: var(--radius);
|
|
9
|
-
--radius-md: calc(var(--radius) - 2px);
|
|
10
|
-
--radius-sm: calc(var(--radius) - 4px);
|
|
11
|
-
|
|
12
|
-
--color-background: hsl(var(--background));
|
|
13
|
-
--color-foreground: hsl(var(--foreground));
|
|
14
|
-
|
|
15
|
-
--color-card: hsl(var(--card));
|
|
16
|
-
--color-card-foreground: hsl(var(--card-foreground));
|
|
17
|
-
|
|
18
|
-
--color-popover: hsl(var(--popover));
|
|
19
|
-
--color-popover-foreground: hsl(var(--popover-foreground));
|
|
20
|
-
|
|
21
|
-
--color-primary: hsl(var(--primary));
|
|
22
|
-
--color-primary-foreground: hsl(var(--primary-foreground));
|
|
23
|
-
|
|
24
|
-
--color-secondary: hsl(var(--secondary));
|
|
25
|
-
--color-secondary-foreground: hsl(var(--secondary-foreground));
|
|
26
|
-
|
|
27
|
-
--color-muted: hsl(var(--muted));
|
|
28
|
-
--color-muted-foreground: hsl(var(--muted-foreground));
|
|
29
|
-
|
|
30
|
-
--color-accent: hsl(var(--accent));
|
|
31
|
-
--color-accent-foreground: hsl(var(--accent-foreground));
|
|
32
|
-
|
|
33
|
-
--color-destructive: hsl(var(--destructive));
|
|
34
|
-
--color-destructive-foreground: hsl(var(--destructive-foreground));
|
|
35
|
-
|
|
36
|
-
--color-border: hsl(var(--border));
|
|
37
|
-
--color-input: hsl(var(--input));
|
|
38
|
-
--color-ring: hsl(var(--ring));
|
|
39
|
-
|
|
40
|
-
--color-chart-1: hsl(var(--chart-1));
|
|
41
|
-
--color-chart-2: hsl(var(--chart-2));
|
|
42
|
-
--color-chart-3: hsl(var(--chart-3));
|
|
43
|
-
--color-chart-4: hsl(var(--chart-4));
|
|
44
|
-
--color-chart-5: hsl(var(--chart-5));
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
@layer base {
|
|
48
|
-
*,
|
|
49
|
-
::after,
|
|
50
|
-
::before,
|
|
51
|
-
::backdrop,
|
|
52
|
-
::file-selector-button {
|
|
53
|
-
border-color: var(--color-gray-200, currentColor);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
@layer base {
|
|
58
|
-
:root {
|
|
59
|
-
--background: 0 0% 100%;
|
|
60
|
-
--foreground: 0 0% 3.9%;
|
|
61
|
-
--card: 0 0% 100%;
|
|
62
|
-
--card-foreground: 0 0% 3.9%;
|
|
63
|
-
--popover: 0 0% 100%;
|
|
64
|
-
--popover-foreground: 0 0% 3.9%;
|
|
65
|
-
--primary: 0 0% 9%;
|
|
66
|
-
--primary-foreground: 0 0% 98%;
|
|
67
|
-
--secondary: 0 0% 96.1%;
|
|
68
|
-
--secondary-foreground: 0 0% 9%;
|
|
69
|
-
--muted: 0 0% 96.1%;
|
|
70
|
-
--muted-foreground: 0 0% 45.1%;
|
|
71
|
-
--accent: 0 0% 96.1%;
|
|
72
|
-
--accent-foreground: 0 0% 9%;
|
|
73
|
-
--destructive: 0 84.2% 60.2%;
|
|
74
|
-
--destructive-foreground: 0 0% 98%;
|
|
75
|
-
--border: 0 0% 89.8%;
|
|
76
|
-
--input: 0 0% 89.8%;
|
|
77
|
-
--ring: 0 0% 3.9%;
|
|
78
|
-
--chart-1: 12 76% 61%;
|
|
79
|
-
--chart-2: 173 58% 39%;
|
|
80
|
-
--chart-3: 197 37% 24%;
|
|
81
|
-
--chart-4: 43 74% 66%;
|
|
82
|
-
--chart-5: 27 87% 67%;
|
|
83
|
-
--radius: 0.5rem;
|
|
84
|
-
}
|
|
85
|
-
.dark {
|
|
86
|
-
--background: 0 0% 3.9%;
|
|
87
|
-
--foreground: 0 0% 98%;
|
|
88
|
-
--card: 0 0% 3.9%;
|
|
89
|
-
--card-foreground: 0 0% 98%;
|
|
90
|
-
--popover: 0 0% 3.9%;
|
|
91
|
-
--popover-foreground: 0 0% 98%;
|
|
92
|
-
--primary: 0 0% 98%;
|
|
93
|
-
--primary-foreground: 0 0% 9%;
|
|
94
|
-
--secondary: 0 0% 14.9%;
|
|
95
|
-
--secondary-foreground: 0 0% 98%;
|
|
96
|
-
--muted: 0 0% 14.9%;
|
|
97
|
-
--muted-foreground: 0 0% 63.9%;
|
|
98
|
-
--accent: 0 0% 14.9%;
|
|
99
|
-
--accent-foreground: 0 0% 98%;
|
|
100
|
-
--destructive: 0 62.8% 30.6%;
|
|
101
|
-
--destructive-foreground: 0 0% 98%;
|
|
102
|
-
--border: 0 0% 14.9%;
|
|
103
|
-
--input: 0 0% 14.9%;
|
|
104
|
-
--ring: 0 0% 83.1%;
|
|
105
|
-
--chart-1: 220 70% 50%;
|
|
106
|
-
--chart-2: 160 60% 45%;
|
|
107
|
-
--chart-3: 30 80% 55%;
|
|
108
|
-
--chart-4: 280 65% 60%;
|
|
109
|
-
--chart-5: 340 75% 55%;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
@layer base {
|
|
113
|
-
* {
|
|
114
|
-
@apply border-border;
|
|
115
|
-
}
|
|
116
|
-
body {
|
|
117
|
-
@apply bg-background text-foreground;
|
|
118
|
-
}
|
|
119
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import tailwindcss from "@tailwindcss/vite";
|
|
2
|
-
import { TanStackRouterVite } from "@tanstack/router-plugin/vite";
|
|
3
|
-
import react from "@vitejs/plugin-react";
|
|
4
|
-
import path from "node:path";
|
|
5
|
-
import { defineConfig } from "vite";
|
|
6
|
-
import { VitePWA } from "vite-plugin-pwa";
|
|
7
|
-
|
|
8
|
-
export default defineConfig({
|
|
9
|
-
plugins: [
|
|
10
|
-
tailwindcss(),
|
|
11
|
-
TanStackRouterVite({}),
|
|
12
|
-
react(),
|
|
13
|
-
VitePWA({
|
|
14
|
-
registerType: "autoUpdate",
|
|
15
|
-
manifest: {
|
|
16
|
-
name: "My App",
|
|
17
|
-
short_name: "My App ",
|
|
18
|
-
description: "My App",
|
|
19
|
-
theme_color: "#0c0c0c",
|
|
20
|
-
},
|
|
21
|
-
pwaAssets: {
|
|
22
|
-
disabled: false,
|
|
23
|
-
config: true,
|
|
24
|
-
},
|
|
25
|
-
devOptions: {
|
|
26
|
-
enabled: true,
|
|
27
|
-
},
|
|
28
|
-
}),
|
|
29
|
-
],
|
|
30
|
-
resolve: {
|
|
31
|
-
alias: {
|
|
32
|
-
"@": path.resolve(__dirname, "./src"),
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
});
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/template/with-auth/apps/{web → web-tanstack-router}/src/components/sign-in-form.tsx
RENAMED
|
File without changes
|
/package/template/with-auth/apps/{web → web-tanstack-router}/src/components/sign-up-form.tsx
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|