@tanglemedia/svelte-starter-auth-shadcn 0.0.2 → 0.1.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/app.css +174 -0
- package/dist/app.html +0 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/lib/components/types.d.ts +13 -0
- package/dist/lib/components/types.js +1 -0
- package/dist/lib/components/ui/auth-layout/auth-layout-content-top.svelte +15 -0
- package/dist/lib/components/ui/auth-layout/auth-layout-content-top.svelte.d.ts +8 -0
- package/dist/lib/components/ui/auth-layout/auth-layout-content.svelte +15 -0
- package/dist/lib/components/ui/auth-layout/auth-layout-content.svelte.d.ts +8 -0
- package/dist/lib/components/ui/auth-layout/auth-layout-feature-info.svelte +45 -0
- package/dist/lib/components/ui/auth-layout/auth-layout-feature-info.svelte.d.ts +12 -0
- package/dist/lib/components/ui/auth-layout/auth-layout-feature.svelte +24 -0
- package/dist/lib/components/ui/auth-layout/auth-layout-feature.svelte.d.ts +8 -0
- package/dist/lib/components/ui/auth-layout/auth-layout-logo.svelte +99 -0
- package/dist/lib/components/ui/auth-layout/auth-layout-logo.svelte.d.ts +63 -0
- package/dist/lib/components/ui/auth-layout/auth-layout-main.svelte +17 -0
- package/dist/lib/components/ui/auth-layout/auth-layout-main.svelte.d.ts +8 -0
- package/dist/lib/components/ui/auth-layout/auth-layout.svelte +22 -82
- package/dist/lib/components/ui/auth-layout/auth-layout.svelte.d.ts +4 -11
- package/dist/lib/components/ui/auth-layout/index.d.ts +8 -2
- package/dist/lib/components/ui/auth-layout/index.js +10 -2
- package/dist/lib/components/ui/forgot-password/forgot-password-container.svelte +27 -0
- package/dist/lib/components/ui/forgot-password/forgot-password-container.svelte.d.ts +8 -0
- package/dist/lib/components/ui/forgot-password/forgot-password-form.svelte +70 -81
- package/dist/lib/components/ui/forgot-password/forgot-password-form.svelte.d.ts +12 -7
- package/dist/lib/components/ui/forgot-password/forgot-password-header.svelte +34 -0
- package/dist/lib/components/ui/forgot-password/forgot-password-header.svelte.d.ts +13 -0
- package/dist/lib/components/ui/forgot-password/forgot-password-login.svelte +19 -0
- package/dist/lib/components/ui/forgot-password/forgot-password-login.svelte.d.ts +9 -0
- package/dist/lib/components/ui/forgot-password/forgot-password-provider.svelte +13 -0
- package/dist/lib/components/ui/forgot-password/forgot-password-provider.svelte.d.ts +25 -0
- package/dist/lib/components/ui/forgot-password/forgot-password-submit.svelte +17 -0
- package/dist/lib/components/ui/forgot-password/forgot-password-submit.svelte.d.ts +7 -0
- package/dist/lib/components/ui/forgot-password/forgot-password-user-input.svelte +21 -0
- package/dist/lib/components/ui/forgot-password/forgot-password-user-input.svelte.d.ts +26 -0
- package/dist/lib/components/ui/forgot-password/forgot-password.schema.d.ts +5 -0
- package/dist/lib/components/ui/forgot-password/forgot-password.schema.js +4 -0
- package/dist/lib/components/ui/forgot-password/index.d.ts +9 -2
- package/dist/lib/components/ui/forgot-password/index.js +9 -2
- package/dist/lib/components/ui/index.d.ts +5 -0
- package/dist/lib/components/ui/index.js +6 -0
- package/dist/lib/components/ui/login-form/index.d.ts +11 -2
- package/dist/lib/components/ui/login-form/index.js +13 -2
- package/dist/lib/components/ui/login-form/login-container.svelte +27 -0
- package/dist/lib/components/ui/login-form/login-container.svelte.d.ts +8 -0
- package/dist/lib/components/ui/login-form/login-context.d.ts +2 -0
- package/dist/lib/components/ui/login-form/login-context.js +13 -0
- package/dist/lib/components/ui/login-form/login-forgot-password.svelte +19 -0
- package/dist/lib/components/ui/login-form/login-forgot-password.svelte.d.ts +9 -0
- package/dist/lib/components/ui/login-form/login-form.svelte +68 -111
- package/dist/lib/components/ui/login-form/login-form.svelte.d.ts +10 -7
- package/dist/lib/components/ui/login-form/login-header.svelte +34 -0
- package/dist/lib/components/ui/login-form/login-header.svelte.d.ts +13 -0
- package/dist/lib/components/ui/login-form/login-password-input.svelte +21 -0
- package/dist/lib/components/ui/login-form/login-password-input.svelte.d.ts +26 -0
- package/dist/lib/components/ui/login-form/login-provider.svelte +13 -0
- package/dist/lib/components/ui/login-form/login-provider.svelte.d.ts +25 -0
- package/dist/lib/components/ui/login-form/login-submit.svelte +17 -0
- package/dist/lib/components/ui/login-form/login-submit.svelte.d.ts +7 -0
- package/dist/lib/components/ui/login-form/login-user-input.svelte +21 -0
- package/dist/lib/components/ui/login-form/login-user-input.svelte.d.ts +26 -0
- package/dist/lib/components/ui/login-form/login.schema.d.ts +6 -0
- package/dist/lib/components/ui/login-form/login.schema.js +5 -0
- package/dist/lib/components/ui/register-form/index.d.ts +10 -2
- package/dist/lib/components/ui/register-form/index.js +10 -2
- package/dist/lib/components/ui/register-form/register-container.svelte +27 -0
- package/dist/lib/components/ui/register-form/register-container.svelte.d.ts +8 -0
- package/dist/lib/components/ui/register-form/register-form.svelte +67 -170
- package/dist/lib/components/ui/register-form/register-form.svelte.d.ts +10 -5
- package/dist/lib/components/ui/register-form/register-header.svelte +34 -0
- package/dist/lib/components/ui/register-form/register-header.svelte.d.ts +13 -0
- package/dist/lib/components/ui/register-form/register-name-input.svelte +21 -0
- package/dist/lib/components/ui/register-form/register-name-input.svelte.d.ts +26 -0
- package/dist/lib/components/ui/register-form/register-password-input.svelte +21 -0
- package/dist/lib/components/ui/register-form/register-password-input.svelte.d.ts +26 -0
- package/dist/lib/components/ui/register-form/register-provider.svelte +13 -0
- package/dist/lib/components/ui/register-form/register-provider.svelte.d.ts +25 -0
- package/dist/lib/components/ui/register-form/register-submit.svelte +17 -0
- package/dist/lib/components/ui/register-form/register-submit.svelte.d.ts +7 -0
- package/dist/lib/components/ui/register-form/register-user-input.svelte +21 -0
- package/dist/lib/components/ui/register-form/register-user-input.svelte.d.ts +26 -0
- package/dist/lib/components/ui/register-form/register.schema.d.ts +8 -0
- package/dist/lib/components/ui/register-form/register.schema.js +7 -0
- package/dist/lib/components/ui/reset-password/index.d.ts +8 -2
- package/dist/lib/components/ui/reset-password/index.js +8 -2
- package/dist/lib/components/ui/reset-password/reset-password-container.svelte +27 -0
- package/dist/lib/components/ui/reset-password/reset-password-container.svelte.d.ts +8 -0
- package/dist/lib/components/ui/reset-password/reset-password-form.svelte +91 -0
- package/dist/lib/components/ui/reset-password/reset-password-form.svelte.d.ts +20 -0
- package/dist/lib/components/ui/reset-password/reset-password-header.svelte +34 -0
- package/dist/lib/components/ui/reset-password/reset-password-header.svelte.d.ts +13 -0
- package/dist/lib/components/ui/reset-password/reset-password-password-input.svelte +21 -0
- package/dist/lib/components/ui/reset-password/reset-password-password-input.svelte.d.ts +26 -0
- package/dist/lib/components/ui/reset-password/reset-password-provider.svelte +13 -0
- package/dist/lib/components/ui/reset-password/reset-password-provider.svelte.d.ts +25 -0
- package/dist/lib/components/ui/reset-password/reset-password-submit.svelte +17 -0
- package/dist/lib/components/ui/reset-password/reset-password-submit.svelte.d.ts +7 -0
- package/dist/lib/components/ui/reset-password/reset-password.schema.d.ts +6 -0
- package/dist/lib/components/ui/reset-password/reset-password.schema.js +9 -0
- package/dist/lib/hooks/index.d.ts +1 -0
- package/dist/lib/hooks/index.js +1 -0
- package/dist/lib/index.d.ts +2 -0
- package/dist/lib/index.js +3 -0
- package/dist/lib/utils.d.ts +10 -0
- package/package.json +40 -69
- package/src/app.css +174 -0
- package/src/app.html +0 -1
- package/src/index.ts +1 -0
- package/src/lib/components/types.ts +24 -0
- package/src/lib/components/ui/auth-layout/auth-layout-content-top.svelte +15 -0
- package/src/lib/components/ui/auth-layout/auth-layout-content.svelte +15 -0
- package/src/lib/components/ui/auth-layout/auth-layout-feature-info.svelte +45 -0
- package/src/lib/components/ui/auth-layout/auth-layout-feature.svelte +24 -0
- package/src/lib/components/ui/auth-layout/auth-layout-logo.svelte +99 -0
- package/src/lib/components/ui/auth-layout/auth-layout-main.svelte +17 -0
- package/src/lib/components/ui/auth-layout/auth-layout.svelte +22 -88
- package/src/lib/components/ui/auth-layout/index.ts +20 -2
- package/src/lib/components/ui/forgot-password/forgot-password-container.svelte +27 -0
- package/src/lib/components/ui/forgot-password/forgot-password-form.svelte +70 -81
- package/src/lib/components/ui/forgot-password/forgot-password-header.svelte +34 -0
- package/src/lib/components/ui/forgot-password/forgot-password-login.svelte +19 -0
- package/src/lib/components/ui/forgot-password/forgot-password-provider.svelte +13 -0
- package/src/lib/components/ui/forgot-password/forgot-password-submit.svelte +17 -0
- package/src/lib/components/ui/forgot-password/forgot-password-user-input.svelte +21 -0
- package/src/lib/components/ui/forgot-password/forgot-password.schema.ts +7 -0
- package/src/lib/components/ui/forgot-password/index.ts +19 -2
- package/src/lib/components/ui/index.ts +6 -0
- package/src/lib/components/ui/login-form/index.ts +26 -2
- package/src/lib/components/ui/login-form/login-container.svelte +27 -0
- package/src/lib/components/ui/login-form/login-context.ts +16 -0
- package/src/lib/components/ui/login-form/login-forgot-password.svelte +19 -0
- package/src/lib/components/ui/login-form/login-form.svelte +68 -111
- package/src/lib/components/ui/login-form/login-header.svelte +34 -0
- package/src/lib/components/ui/login-form/login-password-input.svelte +21 -0
- package/src/lib/components/ui/login-form/login-provider.svelte +13 -0
- package/src/lib/components/ui/login-form/login-submit.svelte +17 -0
- package/src/lib/components/ui/login-form/login-user-input.svelte +21 -0
- package/src/lib/components/ui/login-form/login.schema.ts +8 -0
- package/src/lib/components/ui/register-form/index.ts +21 -2
- package/src/lib/components/ui/register-form/register-container.svelte +27 -0
- package/src/lib/components/ui/register-form/register-form.svelte +67 -170
- package/src/lib/components/ui/register-form/register-header.svelte +34 -0
- package/src/lib/components/ui/register-form/register-name-input.svelte +21 -0
- package/src/lib/components/ui/register-form/register-password-input.svelte +21 -0
- package/src/lib/components/ui/register-form/register-provider.svelte +13 -0
- package/src/lib/components/ui/register-form/register-submit.svelte +17 -0
- package/src/lib/components/ui/register-form/register-user-input.svelte +21 -0
- package/src/lib/components/ui/register-form/register.schema.ts +10 -0
- package/src/lib/components/ui/reset-password/index.ts +17 -2
- package/src/lib/components/ui/reset-password/reset-password-container.svelte +27 -0
- package/src/lib/components/ui/reset-password/reset-password-form.svelte +91 -0
- package/src/lib/components/ui/reset-password/reset-password-header.svelte +34 -0
- package/src/lib/components/ui/reset-password/reset-password-password-input.svelte +21 -0
- package/src/lib/components/ui/reset-password/reset-password-provider.svelte +13 -0
- package/src/lib/components/ui/reset-password/reset-password-submit.svelte +17 -0
- package/src/lib/components/ui/reset-password/reset-password.schema.ts +12 -0
- package/src/lib/hooks/index.ts +1 -0
- package/src/lib/index.ts +3 -0
- package/src/lib/utils.ts +8 -1
- package/dist/lib/components/ui/reset-password/reset-form.svelte +0 -120
- package/dist/lib/components/ui/reset-password/reset-form.svelte.d.ts +0 -16
- package/src/lib/components/ui/reset-password/reset-form.svelte +0 -120
package/src/lib/utils.ts
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
|
-
import { type ClassValue
|
|
1
|
+
import { clsx, type ClassValue } from "clsx";
|
|
2
2
|
import { twMerge } from "tailwind-merge";
|
|
3
3
|
|
|
4
4
|
export function cn(...inputs: ClassValue[]) {
|
|
5
5
|
return twMerge(clsx(inputs));
|
|
6
6
|
}
|
|
7
|
+
|
|
8
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
9
|
+
export type WithoutChild<T> = T extends { child?: any } ? Omit<T, "child"> : T;
|
|
10
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11
|
+
export type WithoutChildren<T> = T extends { children?: any } ? Omit<T, "children"> : T;
|
|
12
|
+
export type WithoutChildrenOrChild<T> = WithoutChildren<WithoutChild<T>>;
|
|
13
|
+
export type WithElementRef<T, U extends HTMLElement = HTMLElement> = T & { ref?: U | null };
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import * as Card from '@tanglemedia/svelte-starter-ui-shadcn/Card';
|
|
3
|
-
import { Button } from '@tanglemedia/svelte-starter-ui-shadcn/Button';
|
|
4
|
-
import { Input } from '@tanglemedia/svelte-starter-ui-shadcn/Input';
|
|
5
|
-
import { Label } from '@tanglemedia/svelte-starter-ui-shadcn/Label';
|
|
6
|
-
import * as Form from '@tanglemedia/svelte-starter-ui-shadcn/Form';
|
|
7
|
-
import type { Snippet } from 'svelte';
|
|
8
|
-
|
|
9
|
-
interface Props {
|
|
10
|
-
superform: any;
|
|
11
|
-
card?: boolean;
|
|
12
|
-
cardClass?: string;
|
|
13
|
-
title?: string;
|
|
14
|
-
description?: string;
|
|
15
|
-
login?: boolean;
|
|
16
|
-
loginLink?: string;
|
|
17
|
-
formTail?: Snippet;
|
|
18
|
-
formHead?: Snippet;
|
|
19
|
-
children?: Snippet;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
let {
|
|
23
|
-
superform,
|
|
24
|
-
card = false,
|
|
25
|
-
cardClass = "mx-auto max-w-sm",
|
|
26
|
-
title = "Reset Password",
|
|
27
|
-
description = "Enter your new password below to reset your password",
|
|
28
|
-
login = true,
|
|
29
|
-
loginLink = "/login",
|
|
30
|
-
formTail,
|
|
31
|
-
formHead,
|
|
32
|
-
children
|
|
33
|
-
}: Props = $props();
|
|
34
|
-
|
|
35
|
-
const { form: formData, enhance } = superform;
|
|
36
|
-
</script>
|
|
37
|
-
|
|
38
|
-
{#if card}
|
|
39
|
-
<Card.Root class={cardClass}>
|
|
40
|
-
<Card.Header>
|
|
41
|
-
<Card.Title class="text-2xl">{title}</Card.Title>
|
|
42
|
-
<Card.Description>{description}</Card.Description>
|
|
43
|
-
</Card.Header>
|
|
44
|
-
<Card.Content>
|
|
45
|
-
<form method="POST" use:enhance class="grid gap-4">
|
|
46
|
-
{@render formHead?.()}
|
|
47
|
-
{#if children}
|
|
48
|
-
{@render children?.()}
|
|
49
|
-
{:else}
|
|
50
|
-
<Form.Field form={superform} name="new_password">
|
|
51
|
-
<Form.Control>
|
|
52
|
-
{#snippet children({ props })}
|
|
53
|
-
<Form.Label>New Password</Form.Label>
|
|
54
|
-
<Input {...props} bind:value={$formData.new_password} type="password" required />
|
|
55
|
-
{/snippet}
|
|
56
|
-
</Form.Control>
|
|
57
|
-
<Form.FieldErrors />
|
|
58
|
-
</Form.Field>
|
|
59
|
-
<Form.Field form={superform} name="confirm_new_password">
|
|
60
|
-
<Form.Control>
|
|
61
|
-
{#snippet children({ props })}
|
|
62
|
-
<Form.Label>Confirm Password</Form.Label>
|
|
63
|
-
<Input {...props} bind:value={$formData.confirm_new_password} type="password" required />
|
|
64
|
-
{/snippet}
|
|
65
|
-
</Form.Control>
|
|
66
|
-
<Form.FieldErrors />
|
|
67
|
-
</Form.Field>
|
|
68
|
-
{/if}
|
|
69
|
-
<Form.Button type="submit" class="w-full">Reset</Form.Button>
|
|
70
|
-
{@render formTail?.()}
|
|
71
|
-
</form>
|
|
72
|
-
{#if login}
|
|
73
|
-
<div class="mt-4 text-center text-sm">
|
|
74
|
-
Already have an account?
|
|
75
|
-
<a href={loginLink} class="underline"> Sign in </a>
|
|
76
|
-
</div>
|
|
77
|
-
{/if}
|
|
78
|
-
</Card.Content>
|
|
79
|
-
</Card.Root>
|
|
80
|
-
{:else}
|
|
81
|
-
<div class={cardClass}>
|
|
82
|
-
<div class="flex flex-col space-y-1.5 p-6 pb-0">
|
|
83
|
-
<h3 class="font-semibold tracking-tight text-2xl">{title}</h3>
|
|
84
|
-
<p class="text-muted-foreground text-sm">{description}</p>
|
|
85
|
-
</div>
|
|
86
|
-
<form method="POST" use:enhance class="grid gap-4 p-6">
|
|
87
|
-
{@render formHead?.()}
|
|
88
|
-
{#if children}
|
|
89
|
-
{@render children?.()}
|
|
90
|
-
{:else}
|
|
91
|
-
<Form.Field form={superform} name="new_password">
|
|
92
|
-
<Form.Control>
|
|
93
|
-
{#snippet children({ props })}
|
|
94
|
-
<Form.Label>New Password</Form.Label>
|
|
95
|
-
<Input {...props} bind:value={$formData.new_password} type="password" required />
|
|
96
|
-
{/snippet}
|
|
97
|
-
</Form.Control>
|
|
98
|
-
<Form.FieldErrors />
|
|
99
|
-
</Form.Field>
|
|
100
|
-
<Form.Field form={superform} name="confirm_new_password">
|
|
101
|
-
<Form.Control>
|
|
102
|
-
{#snippet children({ props })}
|
|
103
|
-
<Form.Label>Confirm Password</Form.Label>
|
|
104
|
-
<Input {...props} bind:value={$formData.confirm_new_password} type="password" required />
|
|
105
|
-
{/snippet}
|
|
106
|
-
</Form.Control>
|
|
107
|
-
<Form.FieldErrors />
|
|
108
|
-
</Form.Field>
|
|
109
|
-
{/if}
|
|
110
|
-
<Form.Button type="submit" class="w-full">Reset</Form.Button>
|
|
111
|
-
{@render formTail?.()}
|
|
112
|
-
</form>
|
|
113
|
-
{#if login}
|
|
114
|
-
<div class="mt-4 text-center text-sm">
|
|
115
|
-
Already have an account?
|
|
116
|
-
<a href={loginLink} class="underline"> Sign in </a>
|
|
117
|
-
</div>
|
|
118
|
-
{/if}
|
|
119
|
-
</div>
|
|
120
|
-
{/if}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { Snippet } from 'svelte';
|
|
2
|
-
interface Props {
|
|
3
|
-
superform: any;
|
|
4
|
-
card?: boolean;
|
|
5
|
-
cardClass?: string;
|
|
6
|
-
title?: string;
|
|
7
|
-
description?: string;
|
|
8
|
-
login?: boolean;
|
|
9
|
-
loginLink?: string;
|
|
10
|
-
formTail?: Snippet;
|
|
11
|
-
formHead?: Snippet;
|
|
12
|
-
children?: Snippet;
|
|
13
|
-
}
|
|
14
|
-
declare const ResetForm: import("svelte").Component<Props, {}, "">;
|
|
15
|
-
type ResetForm = ReturnType<typeof ResetForm>;
|
|
16
|
-
export default ResetForm;
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import * as Card from '@tanglemedia/svelte-starter-ui-shadcn/Card';
|
|
3
|
-
import { Button } from '@tanglemedia/svelte-starter-ui-shadcn/Button';
|
|
4
|
-
import { Input } from '@tanglemedia/svelte-starter-ui-shadcn/Input';
|
|
5
|
-
import { Label } from '@tanglemedia/svelte-starter-ui-shadcn/Label';
|
|
6
|
-
import * as Form from '@tanglemedia/svelte-starter-ui-shadcn/Form';
|
|
7
|
-
import type { Snippet } from 'svelte';
|
|
8
|
-
|
|
9
|
-
interface Props {
|
|
10
|
-
superform: any;
|
|
11
|
-
card?: boolean;
|
|
12
|
-
cardClass?: string;
|
|
13
|
-
title?: string;
|
|
14
|
-
description?: string;
|
|
15
|
-
login?: boolean;
|
|
16
|
-
loginLink?: string;
|
|
17
|
-
formTail?: Snippet;
|
|
18
|
-
formHead?: Snippet;
|
|
19
|
-
children?: Snippet;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
let {
|
|
23
|
-
superform,
|
|
24
|
-
card = false,
|
|
25
|
-
cardClass = "mx-auto max-w-sm",
|
|
26
|
-
title = "Reset Password",
|
|
27
|
-
description = "Enter your new password below to reset your password",
|
|
28
|
-
login = true,
|
|
29
|
-
loginLink = "/login",
|
|
30
|
-
formTail,
|
|
31
|
-
formHead,
|
|
32
|
-
children
|
|
33
|
-
}: Props = $props();
|
|
34
|
-
|
|
35
|
-
const { form: formData, enhance } = superform;
|
|
36
|
-
</script>
|
|
37
|
-
|
|
38
|
-
{#if card}
|
|
39
|
-
<Card.Root class={cardClass}>
|
|
40
|
-
<Card.Header>
|
|
41
|
-
<Card.Title class="text-2xl">{title}</Card.Title>
|
|
42
|
-
<Card.Description>{description}</Card.Description>
|
|
43
|
-
</Card.Header>
|
|
44
|
-
<Card.Content>
|
|
45
|
-
<form method="POST" use:enhance class="grid gap-4">
|
|
46
|
-
{@render formHead?.()}
|
|
47
|
-
{#if children}
|
|
48
|
-
{@render children?.()}
|
|
49
|
-
{:else}
|
|
50
|
-
<Form.Field form={superform} name="new_password">
|
|
51
|
-
<Form.Control>
|
|
52
|
-
{#snippet children({ props })}
|
|
53
|
-
<Form.Label>New Password</Form.Label>
|
|
54
|
-
<Input {...props} bind:value={$formData.new_password} type="password" required />
|
|
55
|
-
{/snippet}
|
|
56
|
-
</Form.Control>
|
|
57
|
-
<Form.FieldErrors />
|
|
58
|
-
</Form.Field>
|
|
59
|
-
<Form.Field form={superform} name="confirm_new_password">
|
|
60
|
-
<Form.Control>
|
|
61
|
-
{#snippet children({ props })}
|
|
62
|
-
<Form.Label>Confirm Password</Form.Label>
|
|
63
|
-
<Input {...props} bind:value={$formData.confirm_new_password} type="password" required />
|
|
64
|
-
{/snippet}
|
|
65
|
-
</Form.Control>
|
|
66
|
-
<Form.FieldErrors />
|
|
67
|
-
</Form.Field>
|
|
68
|
-
{/if}
|
|
69
|
-
<Form.Button type="submit" class="w-full">Reset</Form.Button>
|
|
70
|
-
{@render formTail?.()}
|
|
71
|
-
</form>
|
|
72
|
-
{#if login}
|
|
73
|
-
<div class="mt-4 text-center text-sm">
|
|
74
|
-
Already have an account?
|
|
75
|
-
<a href={loginLink} class="underline"> Sign in </a>
|
|
76
|
-
</div>
|
|
77
|
-
{/if}
|
|
78
|
-
</Card.Content>
|
|
79
|
-
</Card.Root>
|
|
80
|
-
{:else}
|
|
81
|
-
<div class={cardClass}>
|
|
82
|
-
<div class="flex flex-col space-y-1.5 p-6 pb-0">
|
|
83
|
-
<h3 class="font-semibold tracking-tight text-2xl">{title}</h3>
|
|
84
|
-
<p class="text-muted-foreground text-sm">{description}</p>
|
|
85
|
-
</div>
|
|
86
|
-
<form method="POST" use:enhance class="grid gap-4 p-6">
|
|
87
|
-
{@render formHead?.()}
|
|
88
|
-
{#if children}
|
|
89
|
-
{@render children?.()}
|
|
90
|
-
{:else}
|
|
91
|
-
<Form.Field form={superform} name="new_password">
|
|
92
|
-
<Form.Control>
|
|
93
|
-
{#snippet children({ props })}
|
|
94
|
-
<Form.Label>New Password</Form.Label>
|
|
95
|
-
<Input {...props} bind:value={$formData.new_password} type="password" required />
|
|
96
|
-
{/snippet}
|
|
97
|
-
</Form.Control>
|
|
98
|
-
<Form.FieldErrors />
|
|
99
|
-
</Form.Field>
|
|
100
|
-
<Form.Field form={superform} name="confirm_new_password">
|
|
101
|
-
<Form.Control>
|
|
102
|
-
{#snippet children({ props })}
|
|
103
|
-
<Form.Label>Confirm Password</Form.Label>
|
|
104
|
-
<Input {...props} bind:value={$formData.confirm_new_password} type="password" required />
|
|
105
|
-
{/snippet}
|
|
106
|
-
</Form.Control>
|
|
107
|
-
<Form.FieldErrors />
|
|
108
|
-
</Form.Field>
|
|
109
|
-
{/if}
|
|
110
|
-
<Form.Button type="submit" class="w-full">Reset</Form.Button>
|
|
111
|
-
{@render formTail?.()}
|
|
112
|
-
</form>
|
|
113
|
-
{#if login}
|
|
114
|
-
<div class="mt-4 text-center text-sm">
|
|
115
|
-
Already have an account?
|
|
116
|
-
<a href={loginLink} class="underline"> Sign in </a>
|
|
117
|
-
</div>
|
|
118
|
-
{/if}
|
|
119
|
-
</div>
|
|
120
|
-
{/if}
|