Skip to content

Commit 4194cae

Browse files
committed
fix broken form types
1 parent da6b0be commit 4194cae

File tree

9 files changed

+160
-137
lines changed

9 files changed

+160
-137
lines changed

composer.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 134 additions & 116 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"format": "prettier --write resources/",
99
"format:check": "prettier --check resources/",
1010
"lint": "eslint . --fix",
11+
"svelte:check": "svelte-check --tsconfig ./tsconfig.json",
1112
"shadcn:update": "npx shadcn-svelte update --all"
1213
},
1314
"devDependencies": {
@@ -54,11 +55,11 @@
5455
"typescript": "^5.9.3",
5556
"typescript-eslint": "^8.49.0",
5657
"vaul-svelte": "^1.0.0-next.7",
57-
"vite": "^7.2.7",
58-
"zod": "^4.1.13"
58+
"vite": "^7.3.0",
59+
"zod": "^4.2.0"
5960
},
6061
"optionalDependencies": {
61-
"@rollup/rollup-linux-x64-gnu": "4.53.3",
62+
"@rollup/rollup-linux-x64-gnu": "4.53.4",
6263
"@tailwindcss/oxide-linux-x64-gnu": "^4.1.18",
6364
"lightningcss-linux-x64-gnu": "^1.30.2"
6465
}

resources/js/pages/Welcome.svelte

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
</svelte:head>
1717

1818
<div class="flex min-h-screen flex-col items-center bg-[#FDFDFC] p-6 text-[#1b1b18] dark:bg-[#0a0a0a] lg:justify-center lg:p-8">
19-
<header class="not-has-[nav]:hidden mb-6 w-full max-w-[335px] text-sm lg:max-w-4xl">
19+
<header class="not-has-[nav]:hidden mb-6 w-full max-w-83.75ext-sm lg:max-w-4xl">
2020
<nav class="flex items-center justify-end gap-4">
2121
{#if user}
2222
<Link
@@ -47,9 +47,9 @@
4747
</nav>
4848
</header>
4949
<div class="duration-750 starting:opacity-0 flex w-full items-center justify-center opacity-100 transition-opacity lg:grow">
50-
<main class="flex w-full max-w-[335px] flex-col-reverse overflow-hidden rounded-lg lg:max-w-4xl lg:flex-row">
50+
<main class="flex w-full max-w-83.75 flex-col-reverse overflow-hidden rounded-lg lg:max-w-4xl lg:flex-row">
5151
<div
52-
class="flex-1 rounded-bl-lg rounded-br-lg bg-white p-6 pb-12 text-[13px] leading-[20px] shadow-[inset_0px_0px_0px_1px_rgba(26,26,0,0.16)] dark:bg-[#161615] dark:text-[#EDEDEC] dark:shadow-[inset_0px_0px_0px_1px_#fffaed2d] lg:rounded-br-none lg:rounded-tl-lg lg:p-20"
52+
class="flex-1 rounded-bl-lg rounded-br-lg bg-white p-6 pb-12 text-[13px] leading-5 shadow-[inset_0px_0px_0px_1px_rgba(26,26,0,0.16)] dark:bg-[#161615] dark:text-[#EDEDEC] dark:shadow-[inset_0px_0px_0px_1px_#fffaed2d] lg:rounded-br-none lg:rounded-tl-lg lg:p-20"
5353
>
5454
<h1 class="mb-1 font-medium">Let's get started</h1>
5555
<p class="mb-2 text-[#706f6c] dark:text-[#A1A09A]">
@@ -121,7 +121,7 @@
121121
</ul>
122122
</div>
123123
<div
124-
class="relative -mb-px aspect-335/376 w-full shrink-0 overflow-hidden rounded-t-lg bg-[#fff2f2] dark:bg-[#1D0002] lg:-ml-px lg:mb-0 lg:aspect-auto lg:w-[438px] lg:rounded-r-lg lg:rounded-t-none"
124+
class="relative -mb-px aspect-335/376 w-full shrink-0 overflow-hidden rounded-t-lg bg-[#fff2f2] dark:bg-[#1D0002] lg:-ml-px lg:mb-0 lg:aspect-auto lg:w-109.5 lg:rounded-r-lg lg:rounded-t-none"
125125
>
126126
<svg
127127
class="duration-750 starting:translate-y-6 starting:opacity-0 w-full max-w-none translate-y-0 text-[#F53003] opacity-100 transition-all dark:text-[#F61500]"
@@ -150,7 +150,7 @@
150150
/>
151151
</svg>
152152
<svg
153-
class="relative -ml-8 -mt-[4.9rem] w-[448px] max-w-none dark:hidden lg:-mt-[6.6rem] lg:ml-0"
153+
class="relative -ml-8 -mt-[4.9rem] w-md max-w-none dark:hidden lg:-mt-[6.6rem] lg:ml-0"
154154
viewBox="0 0 440 376"
155155
fill="none"
156156
xmlns="http://www.w3.org/2000/svg"
@@ -470,7 +470,7 @@
470470
</g>
471471
</svg>
472472
<svg
473-
class="relative -ml-8 -mt-[4.9rem] hidden w-[448px] max-w-none dark:block lg:-mt-[6.6rem] lg:ml-0"
473+
class="relative -ml-8 -mt-[4.9rem] hidden w-md max-w-none dark:block lg:-mt-[6.6rem] lg:ml-0"
474474
viewBox="0 0 440 376"
475475
fill="none"
476476
xmlns="http://www.w3.org/2000/svg"

resources/js/pages/auth/ConfirmPassword.svelte

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import { Input } from '@/components/ui/input';
55
import { Label } from '@/components/ui/label';
66
import AuthLayout from '@/layouts/AuthLayout.svelte';
7+
import type { BaseFormSnippetProps } from '@/types/forms';
78
import { Form } from '@inertiajs/svelte';
89
import { LoaderCircle } from 'lucide-svelte';
910
</script>
@@ -14,7 +15,7 @@
1415

1516
<AuthLayout title="Confirm your password" description="This is a secure area of the application. Please confirm your password before continuing.">
1617
<Form method="post" action={route('password.confirm')} resetOnSuccess>
17-
{#snippet children({ errors, processing }: { errors: Record<string, string>; processing: boolean })}
18+
{#snippet children({ errors, processing }: BaseFormSnippetProps)}
1819
<div class="space-y-6">
1920
<div class="grid gap-2">
2021
<Label for="password">Password</Label>

resources/js/pages/auth/ForgotPassword.svelte

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import { Input } from '@/components/ui/input';
66
import { Label } from '@/components/ui/label';
77
import AuthLayout from '@/layouts/AuthLayout.svelte';
8+
import type { BaseFormSnippetProps } from '@/types/forms';
89
import { Form } from '@inertiajs/svelte';
910
import { LoaderCircle } from 'lucide-svelte';
1011
@@ -28,7 +29,7 @@
2829

2930
<div class="space-y-6">
3031
<Form method="post" action={route('password.email')}>
31-
{#snippet children({ errors, processing }: { errors: Record<string, string>; processing: boolean })}
32+
{#snippet children({ errors, processing }: BaseFormSnippetProps)}
3233
<div class="grid gap-2">
3334
<Label for="email">Email address</Label>
3435
<Input id="email" type="email" name="email" autocomplete="off" autofocus placeholder="email@example.com" />

resources/js/pages/auth/ResetPassword.svelte

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import { Input } from '@/components/ui/input';
55
import { Label } from '@/components/ui/label';
66
import AuthLayout from '@/layouts/AuthLayout.svelte';
7+
import type { BaseFormSnippetProps } from '@/types/forms';
78
import { Form } from '@inertiajs/svelte';
89
import { LoaderCircle } from 'lucide-svelte';
910
@@ -26,7 +27,7 @@
2627
transform={(data) => ({ ...data, token, email })}
2728
resetOnSuccess={['password', 'password_confirmation']}
2829
>
29-
{#snippet children({ errors, processing }: { errors: Record<string, string>; processing: boolean })}
30+
{#snippet children({ errors, processing }: BaseFormSnippetProps)}
3031
<div class="grid gap-6">
3132
<div class="grid gap-2">
3233
<Label for="email">Email</Label>

resources/js/pages/auth/TwoFactorChallenge.svelte

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import { Input } from '@/components/ui/input';
55
import { InputOTP, InputOTPGroup, InputOTPSlot } from '@/components/ui/input-otp';
66
import AuthLayout from '@/layouts/AuthLayout.svelte';
7+
import type { BaseFormSnippetProps } from '@/types/forms';
78
import { Form } from '@inertiajs/svelte';
89
910
interface AuthConfigContent {
@@ -44,7 +45,7 @@
4445
<div class="space-y-6">
4546
{#if !showRecoveryInput}
4647
<Form method="post" action={route('two-factor.login')} class="space-y-4" resetOnError={true} onError={() => (code = '')}>
47-
{#snippet children({ errors, processing, clearErrors }: { errors: Record<string, string>; processing: boolean; clearErrors: () => void })}
48+
{#snippet children({ errors, processing, clearErrors }: BaseFormSnippetProps & { clearErrors: () => void })}
4849
<input type="hidden" name="code" value={code} />
4950
<div class="flex flex-col items-center justify-center space-y-3 text-center">
5051
<div class="flex w-full items-center justify-center">
@@ -75,7 +76,7 @@
7576
</Form>
7677
{:else}
7778
<Form method="post" action={route('two-factor.login')} class="space-y-4" resetOnError={true}>
78-
{#snippet children({ errors, processing, clearErrors }: { errors: Record<string, string>; processing: boolean; clearErrors: () => void })}
79+
{#snippet children({ errors, processing, clearErrors }: BaseFormSnippetProps & { clearErrors: () => void })}
7980
<Input name="recovery_code" type="text" placeholder="Enter recovery code" autofocus={showRecoveryInput} required />
8081
<InputError message={errors.recovery_code} />
8182
<Button type="submit" class="w-full" disabled={processing}>Continue</Button>

routes/web.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414
return Inertia::render('Dashboard');
1515
})->middleware(['auth', 'verified'])->name('dashboard');
1616

17-
require __DIR__.'/settings.php';
17+
require __DIR__ . '/settings.php';

0 commit comments

Comments
 (0)