create-better-t-stack 3.7.1 → 3.7.3-canary.53fc0031
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/cli.js +1 -1
- package/dist/index.d.ts +108 -250
- package/dist/index.js +1 -1
- package/dist/{src-BmyCNYPk.js → src-B1ogWZqk.js} +205 -368
- package/package.json +3 -3
- package/templates/api/orpc/server/package.json.hbs +0 -3
- package/templates/api/trpc/server/package.json.hbs +1 -4
- package/templates/auth/better-auth/convex/native/base/lib/auth-client.ts.hbs +0 -2
- package/templates/auth/better-auth/server/base/package.json.hbs +1 -4
- package/templates/auth/better-auth/web/react/base/src/lib/auth-client.ts.hbs +6 -2
- package/templates/auth/better-auth/web/react/tanstack-router/src/components/sign-in-form.tsx +117 -121
- package/templates/auth/better-auth/web/react/tanstack-router/src/components/sign-up-form.tsx +141 -145
- package/templates/auth/better-auth/web/react/tanstack-start/src/components/sign-in-form.tsx +117 -121
- package/templates/auth/better-auth/web/react/tanstack-start/src/components/sign-up-form.tsx +141 -145
- package/templates/auth/better-auth/web/solid/src/components/sign-in-form.tsx +3 -11
- package/templates/auth/better-auth/web/solid/src/components/sign-up-form.tsx +4 -14
- package/templates/backend/convex/packages/backend/convex/healthCheck.ts +2 -2
- package/templates/backend/convex/packages/backend/package.json.hbs +1 -2
- package/templates/backend/server/base/package.json.hbs +1 -3
- package/templates/db/base/package.json.hbs +1 -4
- package/templates/examples/ai/native/bare/polyfills.js +3 -7
- package/templates/examples/ai/native/unistyles/polyfills.js +3 -6
- package/templates/examples/ai/native/uniwind/polyfills.js +3 -7
- package/templates/examples/todo/server/drizzle/postgres/src/schema/todo.ts +1 -1
- package/templates/frontend/native/bare/package.json.hbs +1 -2
- package/templates/frontend/native/unistyles/package.json.hbs +1 -2
- package/templates/frontend/native/uniwind/package.json.hbs +1 -2
- package/templates/frontend/nuxt/package.json.hbs +1 -3
- package/templates/frontend/react/next/package.json.hbs +1 -3
- package/templates/frontend/react/react-router/package.json.hbs +1 -3
- package/templates/frontend/react/react-router/src/components/mode-toggle.tsx +3 -9
- package/templates/frontend/react/tanstack-router/package.json.hbs +1 -3
- package/templates/frontend/react/tanstack-router/src/components/mode-toggle.tsx +3 -9
- package/templates/frontend/react/tanstack-start/package.json.hbs +1 -3
- package/templates/frontend/react/web-base/src/components/ui/button.tsx +13 -16
- package/templates/frontend/react/web-base/src/components/ui/card.tsx +13 -30
- package/templates/frontend/react/web-base/src/components/ui/checkbox.tsx +8 -11
- package/templates/frontend/react/web-base/src/components/ui/dropdown-menu.tsx +37 -66
- package/templates/frontend/react/web-base/src/components/ui/input.tsx +5 -5
- package/templates/frontend/react/web-base/src/components/ui/label.tsx +7 -10
- package/templates/frontend/react/web-base/src/components/ui/skeleton.tsx +3 -3
- package/templates/frontend/react/web-base/src/lib/utils.ts +3 -3
- package/templates/frontend/solid/package.json.hbs +1 -3
- package/templates/frontend/svelte/package.json.hbs +1 -3
- package/templates/frontend/svelte/src/app.d.ts +7 -7
- package/templates/frontend/svelte/src/lib/index.ts +1 -0
- package/templates/frontend/svelte/vite.config.ts +4 -4
|
@@ -3,13 +3,10 @@ import { Platform } from "react-native";
|
|
|
3
3
|
|
|
4
4
|
if (Platform.OS !== "web") {
|
|
5
5
|
const setupPolyfills = async () => {
|
|
6
|
-
const { polyfillGlobal } = await import(
|
|
7
|
-
"react-native/Libraries/Utilities/PolyfillFunctions"
|
|
8
|
-
);
|
|
6
|
+
const { polyfillGlobal } = await import("react-native/Libraries/Utilities/PolyfillFunctions");
|
|
9
7
|
|
|
10
|
-
const { TextEncoderStream, TextDecoderStream } =
|
|
11
|
-
"@stardazed/streams-text-encoding"
|
|
12
|
-
);
|
|
8
|
+
const { TextEncoderStream, TextDecoderStream } =
|
|
9
|
+
await import("@stardazed/streams-text-encoding");
|
|
13
10
|
|
|
14
11
|
if (!("structuredClone" in global)) {
|
|
15
12
|
polyfillGlobal("structuredClone", () => structuredClone);
|
|
@@ -23,4 +20,3 @@ if (Platform.OS !== "web") {
|
|
|
23
20
|
}
|
|
24
21
|
|
|
25
22
|
export {};
|
|
26
|
-
|
|
@@ -3,13 +3,10 @@ import { Platform } from "react-native";
|
|
|
3
3
|
|
|
4
4
|
if (Platform.OS !== "web") {
|
|
5
5
|
const setupPolyfills = async () => {
|
|
6
|
-
const { polyfillGlobal } = await import(
|
|
7
|
-
"react-native/Libraries/Utilities/PolyfillFunctions"
|
|
8
|
-
);
|
|
6
|
+
const { polyfillGlobal } = await import("react-native/Libraries/Utilities/PolyfillFunctions");
|
|
9
7
|
|
|
10
|
-
const { TextEncoderStream, TextDecoderStream } =
|
|
11
|
-
"@stardazed/streams-text-encoding"
|
|
12
|
-
);
|
|
8
|
+
const { TextEncoderStream, TextDecoderStream } =
|
|
9
|
+
await import("@stardazed/streams-text-encoding");
|
|
13
10
|
|
|
14
11
|
if (!("structuredClone" in global)) {
|
|
15
12
|
polyfillGlobal("structuredClone", () => structuredClone);
|
|
@@ -3,13 +3,10 @@ import { Platform } from "react-native";
|
|
|
3
3
|
|
|
4
4
|
if (Platform.OS !== "web") {
|
|
5
5
|
const setupPolyfills = async () => {
|
|
6
|
-
const { polyfillGlobal } = await import(
|
|
7
|
-
"react-native/Libraries/Utilities/PolyfillFunctions"
|
|
8
|
-
);
|
|
6
|
+
const { polyfillGlobal } = await import("react-native/Libraries/Utilities/PolyfillFunctions");
|
|
9
7
|
|
|
10
|
-
const { TextEncoderStream, TextDecoderStream } =
|
|
11
|
-
"@stardazed/streams-text-encoding"
|
|
12
|
-
);
|
|
8
|
+
const { TextEncoderStream, TextDecoderStream } =
|
|
9
|
+
await import("@stardazed/streams-text-encoding");
|
|
13
10
|
|
|
14
11
|
if (!("structuredClone" in global)) {
|
|
15
12
|
polyfillGlobal("structuredClone", () => structuredClone);
|
|
@@ -23,4 +20,3 @@ if (Platform.OS !== "web") {
|
|
|
23
20
|
}
|
|
24
21
|
|
|
25
22
|
export {};
|
|
26
|
-
|
|
@@ -3,5 +3,5 @@ import { pgTable, text, boolean, serial } from "drizzle-orm/pg-core";
|
|
|
3
3
|
export const todo = pgTable("todo", {
|
|
4
4
|
id: serial("id").primaryKey(),
|
|
5
5
|
text: text("text").notNull(),
|
|
6
|
-
completed: boolean("completed").default(false).notNull()
|
|
6
|
+
completed: boolean("completed").default(false).notNull(),
|
|
7
7
|
});
|
|
@@ -14,10 +14,8 @@
|
|
|
14
14
|
"@nuxt/content": "^3.7.1",
|
|
15
15
|
"@nuxtjs/mdc": "^0.17.4",
|
|
16
16
|
"nuxt": "^4.1.2",
|
|
17
|
-
"typescript": "^5.9.2",
|
|
18
17
|
"vue": "^3.5.21",
|
|
19
|
-
"vue-router": "^4.5.1"
|
|
20
|
-
"zod": "^4.1.5"
|
|
18
|
+
"vue-router": "^4.5.1"
|
|
21
19
|
},
|
|
22
20
|
"devDependencies": {
|
|
23
21
|
"tailwindcss": "^4.1.13",
|
|
@@ -20,7 +20,6 @@
|
|
|
20
20
|
"sonner": "^2.0.5",
|
|
21
21
|
"tailwind-merge": "^3.3.1",
|
|
22
22
|
"tw-animate-css": "^1.3.4",
|
|
23
|
-
"zod": "^4.1.12",
|
|
24
23
|
"babel-plugin-react-compiler": "^1.0.0"
|
|
25
24
|
},
|
|
26
25
|
"devDependencies": {
|
|
@@ -28,7 +27,6 @@
|
|
|
28
27
|
"@types/node": "^20",
|
|
29
28
|
"@types/react": "19.2.2",
|
|
30
29
|
"@types/react-dom": "19.2.2",
|
|
31
|
-
"tailwindcss": "^4.1.10"
|
|
32
|
-
"typescript": "^5"
|
|
30
|
+
"tailwindcss": "^4.1.10"
|
|
33
31
|
}
|
|
34
32
|
}
|
|
@@ -24,8 +24,7 @@
|
|
|
24
24
|
"react-router": "^7.6.1",
|
|
25
25
|
"sonner": "^2.0.3",
|
|
26
26
|
"tailwind-merge": "^3.3.0",
|
|
27
|
-
"tw-animate-css": "^1.3.2"
|
|
28
|
-
"zod": "^4.0.2"
|
|
27
|
+
"tw-animate-css": "^1.3.2"
|
|
29
28
|
},
|
|
30
29
|
"devDependencies": {
|
|
31
30
|
"@react-router/dev": "^7.6.1",
|
|
@@ -35,7 +34,6 @@
|
|
|
35
34
|
"@types/react-dom": "^19.0.4",
|
|
36
35
|
"react-router-devtools": "^1.1.0",
|
|
37
36
|
"tailwindcss": "^4.1.8",
|
|
38
|
-
"typescript": "^5.8.3",
|
|
39
37
|
"vite": "^6.3.5",
|
|
40
38
|
"vite-tsconfig-paths": "^5.1.4"
|
|
41
39
|
}
|
|
@@ -22,15 +22,9 @@ export function ModeToggle() {
|
|
|
22
22
|
</Button>
|
|
23
23
|
</DropdownMenuTrigger>
|
|
24
24
|
<DropdownMenuContent align="end">
|
|
25
|
-
<DropdownMenuItem onClick={() => setTheme("light")}>
|
|
26
|
-
|
|
27
|
-
</DropdownMenuItem>
|
|
28
|
-
<DropdownMenuItem onClick={() => setTheme("dark")}>
|
|
29
|
-
Dark
|
|
30
|
-
</DropdownMenuItem>
|
|
31
|
-
<DropdownMenuItem onClick={() => setTheme("system")}>
|
|
32
|
-
System
|
|
33
|
-
</DropdownMenuItem>
|
|
25
|
+
<DropdownMenuItem onClick={() => setTheme("light")}>Light</DropdownMenuItem>
|
|
26
|
+
<DropdownMenuItem onClick={() => setTheme("dark")}>Dark</DropdownMenuItem>
|
|
27
|
+
<DropdownMenuItem onClick={() => setTheme("system")}>System</DropdownMenuItem>
|
|
34
28
|
</DropdownMenuContent>
|
|
35
29
|
</DropdownMenu>
|
|
36
30
|
);
|
|
@@ -24,8 +24,7 @@
|
|
|
24
24
|
"react-dom": "19.1.2",
|
|
25
25
|
"sonner": "^2.0.5",
|
|
26
26
|
"tailwind-merge": "^3.3.1",
|
|
27
|
-
"tw-animate-css": "^1.2.5"
|
|
28
|
-
"zod": "^4.0.2"
|
|
27
|
+
"tw-animate-css": "^1.2.5"
|
|
29
28
|
},
|
|
30
29
|
"devDependencies": {
|
|
31
30
|
"@tanstack/react-router-devtools": "^1.114.27",
|
|
@@ -35,7 +34,6 @@
|
|
|
35
34
|
"@types/react-dom": "^19.0.4",
|
|
36
35
|
"@vitejs/plugin-react": "^4.3.4",
|
|
37
36
|
"postcss": "^8.5.3",
|
|
38
|
-
"typescript": "^5.8.3",
|
|
39
37
|
"tailwindcss": "^4.0.15",
|
|
40
38
|
"vite": "^6.2.2"
|
|
41
39
|
}
|
|
@@ -22,15 +22,9 @@ export function ModeToggle() {
|
|
|
22
22
|
</Button>
|
|
23
23
|
</DropdownMenuTrigger>
|
|
24
24
|
<DropdownMenuContent align="end">
|
|
25
|
-
<DropdownMenuItem onClick={() => setTheme("light")}>
|
|
26
|
-
|
|
27
|
-
</DropdownMenuItem>
|
|
28
|
-
<DropdownMenuItem onClick={() => setTheme("dark")}>
|
|
29
|
-
Dark
|
|
30
|
-
</DropdownMenuItem>
|
|
31
|
-
<DropdownMenuItem onClick={() => setTheme("system")}>
|
|
32
|
-
System
|
|
33
|
-
</DropdownMenuItem>
|
|
25
|
+
<DropdownMenuItem onClick={() => setTheme("light")}>Light</DropdownMenuItem>
|
|
26
|
+
<DropdownMenuItem onClick={() => setTheme("dark")}>Dark</DropdownMenuItem>
|
|
27
|
+
<DropdownMenuItem onClick={() => setTheme("system")}>System</DropdownMenuItem>
|
|
34
28
|
</DropdownMenuContent>
|
|
35
29
|
</DropdownMenu>
|
|
36
30
|
);
|
|
@@ -26,8 +26,7 @@
|
|
|
26
26
|
"tailwindcss": "^4.1.3",
|
|
27
27
|
"tailwind-merge": "^3.3.1",
|
|
28
28
|
"tw-animate-css": "^1.2.5",
|
|
29
|
-
"vite-tsconfig-paths": "^5.1.4"
|
|
30
|
-
"zod": "^4.0.2"
|
|
29
|
+
"vite-tsconfig-paths": "^5.1.4"
|
|
31
30
|
},
|
|
32
31
|
"devDependencies": {
|
|
33
32
|
"@tanstack/react-router-devtools": {{#if (eq auth "clerk")}}"1.134.4"{{else}}"^1.132.31"{{/if}},
|
|
@@ -37,7 +36,6 @@
|
|
|
37
36
|
"@types/react-dom": "^19.0.4",
|
|
38
37
|
"@vitejs/plugin-react": "^5.0.4",
|
|
39
38
|
"jsdom": "^26.0.0",
|
|
40
|
-
"typescript": "^5.7.2",
|
|
41
39
|
"vite": "^7.0.2",
|
|
42
40
|
"web-vitals": "^5.0.3"
|
|
43
41
|
}
|
|
@@ -1,24 +1,21 @@
|
|
|
1
|
-
import * as React from "react"
|
|
2
|
-
import { Slot as SlotPrimitive } from "radix-ui"
|
|
3
|
-
import { cva, type VariantProps } from "class-variance-authority"
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Slot as SlotPrimitive } from "radix-ui";
|
|
3
|
+
import { cva, type VariantProps } from "class-variance-authority";
|
|
4
4
|
|
|
5
|
-
import { cn } from "@/lib/utils"
|
|
5
|
+
import { cn } from "@/lib/utils";
|
|
6
6
|
|
|
7
7
|
const buttonVariants = cva(
|
|
8
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
9
|
{
|
|
10
10
|
variants: {
|
|
11
11
|
variant: {
|
|
12
|
-
default:
|
|
13
|
-
"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",
|
|
12
|
+
default: "bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",
|
|
14
13
|
destructive:
|
|
15
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",
|
|
16
15
|
outline:
|
|
17
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",
|
|
18
|
-
secondary:
|
|
19
|
-
|
|
20
|
-
ghost:
|
|
21
|
-
"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/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",
|
|
22
19
|
link: "text-primary underline-offset-4 hover:underline",
|
|
23
20
|
},
|
|
24
21
|
size: {
|
|
@@ -32,8 +29,8 @@ const buttonVariants = cva(
|
|
|
32
29
|
variant: "default",
|
|
33
30
|
size: "default",
|
|
34
31
|
},
|
|
35
|
-
}
|
|
36
|
-
)
|
|
32
|
+
},
|
|
33
|
+
);
|
|
37
34
|
|
|
38
35
|
function Button({
|
|
39
36
|
className,
|
|
@@ -43,9 +40,9 @@ function Button({
|
|
|
43
40
|
...props
|
|
44
41
|
}: React.ComponentProps<"button"> &
|
|
45
42
|
VariantProps<typeof buttonVariants> & {
|
|
46
|
-
asChild?: boolean
|
|
43
|
+
asChild?: boolean;
|
|
47
44
|
}) {
|
|
48
|
-
const Comp = asChild ? SlotPrimitive.Slot : "button"
|
|
45
|
+
const Comp = asChild ? SlotPrimitive.Slot : "button";
|
|
49
46
|
|
|
50
47
|
return (
|
|
51
48
|
<Comp
|
|
@@ -53,7 +50,7 @@ function Button({
|
|
|
53
50
|
className={cn(buttonVariants({ variant, size, className }))}
|
|
54
51
|
{...props}
|
|
55
52
|
/>
|
|
56
|
-
)
|
|
53
|
+
);
|
|
57
54
|
}
|
|
58
55
|
|
|
59
|
-
export { Button, buttonVariants }
|
|
56
|
+
export { Button, buttonVariants };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as React from "react"
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
|
|
3
|
-
import { cn } from "@/lib/utils"
|
|
3
|
+
import { cn } from "@/lib/utils";
|
|
4
4
|
|
|
5
5
|
function Card({ className, ...props }: React.ComponentProps<"div">) {
|
|
6
6
|
return (
|
|
@@ -8,11 +8,11 @@ function Card({ className, ...props }: React.ComponentProps<"div">) {
|
|
|
8
8
|
data-slot="card"
|
|
9
9
|
className={cn(
|
|
10
10
|
"bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",
|
|
11
|
-
className
|
|
11
|
+
className,
|
|
12
12
|
)}
|
|
13
13
|
{...props}
|
|
14
14
|
/>
|
|
15
|
-
)
|
|
15
|
+
);
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
function CardHeader({ className, ...props }: React.ComponentProps<"div">) {
|
|
@@ -21,11 +21,11 @@ function CardHeader({ className, ...props }: React.ComponentProps<"div">) {
|
|
|
21
21
|
data-slot="card-header"
|
|
22
22
|
className={cn(
|
|
23
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
|
|
24
|
+
className,
|
|
25
25
|
)}
|
|
26
26
|
{...props}
|
|
27
27
|
/>
|
|
28
|
-
)
|
|
28
|
+
);
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
function CardTitle({ className, ...props }: React.ComponentProps<"div">) {
|
|
@@ -35,7 +35,7 @@ function CardTitle({ className, ...props }: React.ComponentProps<"div">) {
|
|
|
35
35
|
className={cn("leading-none font-semibold", className)}
|
|
36
36
|
{...props}
|
|
37
37
|
/>
|
|
38
|
-
)
|
|
38
|
+
);
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
function CardDescription({ className, ...props }: React.ComponentProps<"div">) {
|
|
@@ -45,30 +45,21 @@ function CardDescription({ className, ...props }: React.ComponentProps<"div">) {
|
|
|
45
45
|
className={cn("text-muted-foreground text-sm", className)}
|
|
46
46
|
{...props}
|
|
47
47
|
/>
|
|
48
|
-
)
|
|
48
|
+
);
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
function CardAction({ className, ...props }: React.ComponentProps<"div">) {
|
|
52
52
|
return (
|
|
53
53
|
<div
|
|
54
54
|
data-slot="card-action"
|
|
55
|
-
className={cn(
|
|
56
|
-
"col-start-2 row-span-2 row-start-1 self-start justify-self-end",
|
|
57
|
-
className
|
|
58
|
-
)}
|
|
55
|
+
className={cn("col-start-2 row-span-2 row-start-1 self-start justify-self-end", className)}
|
|
59
56
|
{...props}
|
|
60
57
|
/>
|
|
61
|
-
)
|
|
58
|
+
);
|
|
62
59
|
}
|
|
63
60
|
|
|
64
61
|
function CardContent({ className, ...props }: React.ComponentProps<"div">) {
|
|
65
|
-
return (
|
|
66
|
-
<div
|
|
67
|
-
data-slot="card-content"
|
|
68
|
-
className={cn("px-6", className)}
|
|
69
|
-
{...props}
|
|
70
|
-
/>
|
|
71
|
-
)
|
|
62
|
+
return <div data-slot="card-content" className={cn("px-6", className)} {...props} />;
|
|
72
63
|
}
|
|
73
64
|
|
|
74
65
|
function CardFooter({ className, ...props }: React.ComponentProps<"div">) {
|
|
@@ -78,15 +69,7 @@ function CardFooter({ className, ...props }: React.ComponentProps<"div">) {
|
|
|
78
69
|
className={cn("flex items-center px-6 [.border-t]:pt-6", className)}
|
|
79
70
|
{...props}
|
|
80
71
|
/>
|
|
81
|
-
)
|
|
72
|
+
);
|
|
82
73
|
}
|
|
83
74
|
|
|
84
|
-
export {
|
|
85
|
-
Card,
|
|
86
|
-
CardHeader,
|
|
87
|
-
CardFooter,
|
|
88
|
-
CardTitle,
|
|
89
|
-
CardAction,
|
|
90
|
-
CardDescription,
|
|
91
|
-
CardContent,
|
|
92
|
-
}
|
|
75
|
+
export { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent };
|
|
@@ -1,19 +1,16 @@
|
|
|
1
|
-
import * as React from "react"
|
|
2
|
-
import { Checkbox as CheckboxPrimitive } from "radix-ui"
|
|
3
|
-
import { CheckIcon } from "lucide-react"
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Checkbox as CheckboxPrimitive } from "radix-ui";
|
|
3
|
+
import { CheckIcon } from "lucide-react";
|
|
4
4
|
|
|
5
|
-
import { cn } from "@/lib/utils"
|
|
5
|
+
import { cn } from "@/lib/utils";
|
|
6
6
|
|
|
7
|
-
function Checkbox({
|
|
8
|
-
className,
|
|
9
|
-
...props
|
|
10
|
-
}: React.ComponentProps<typeof CheckboxPrimitive.Root>) {
|
|
7
|
+
function Checkbox({ className, ...props }: React.ComponentProps<typeof CheckboxPrimitive.Root>) {
|
|
11
8
|
return (
|
|
12
9
|
<CheckboxPrimitive.Root
|
|
13
10
|
data-slot="checkbox"
|
|
14
11
|
className={cn(
|
|
15
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",
|
|
16
|
-
className
|
|
13
|
+
className,
|
|
17
14
|
)}
|
|
18
15
|
{...props}
|
|
19
16
|
>
|
|
@@ -24,7 +21,7 @@ function Checkbox({
|
|
|
24
21
|
<CheckIcon className="size-3.5" />
|
|
25
22
|
</CheckboxPrimitive.Indicator>
|
|
26
23
|
</CheckboxPrimitive.Root>
|
|
27
|
-
)
|
|
24
|
+
);
|
|
28
25
|
}
|
|
29
26
|
|
|
30
|
-
export { Checkbox }
|
|
27
|
+
export { Checkbox };
|