svelte-firekit 0.0.6 → 0.0.8
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/auth/auth.svelte +65 -0
- package/dist/auth/auth.svelte.d.ts +2 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import SignInWithGoogle from "../components/auth/google-sign-in.svelte";
|
|
3
|
+
import ResetPasswordForm from "../components/auth/reset-password-form.svelte";
|
|
4
|
+
import SignInForm from "../components/auth/sign-in-form.svelte";
|
|
5
|
+
import SignUpForm from "../components/auth/sign-up-form.svelte";
|
|
6
|
+
import Button from "../components/ui/button/button.svelte";
|
|
7
|
+
import * as Card from "../components/ui/card/index.js";
|
|
8
|
+
let currentForm = $state("sign-in");
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<Card.Root class="sm:w-[448px]">
|
|
12
|
+
<Card.Header>
|
|
13
|
+
<Card.Title class="text-center text-2xl">
|
|
14
|
+
{#if currentForm === "sign-in"}
|
|
15
|
+
Sign in
|
|
16
|
+
{:else if currentForm === "sign-up"}
|
|
17
|
+
Sign up
|
|
18
|
+
{:else if currentForm === "forgot-password"}
|
|
19
|
+
Forgot password
|
|
20
|
+
{/if}
|
|
21
|
+
</Card.Title>
|
|
22
|
+
<Card.Description class="text-center">
|
|
23
|
+
{#if currentForm === "sign-in"}
|
|
24
|
+
Don't have an account yet?
|
|
25
|
+
<Button
|
|
26
|
+
variant="link"
|
|
27
|
+
onclick={() => (currentForm = "sign-up")}
|
|
28
|
+
class="p-0">Sign up here</Button
|
|
29
|
+
>
|
|
30
|
+
{:else if currentForm === "sign-up"}
|
|
31
|
+
Already have an account?
|
|
32
|
+
<Button
|
|
33
|
+
variant="link"
|
|
34
|
+
onclick={() => (currentForm = "sign-in")}
|
|
35
|
+
class="p-0">Sign in here</Button
|
|
36
|
+
>
|
|
37
|
+
{:else if currentForm === "forgot-password"}
|
|
38
|
+
Remember your password?
|
|
39
|
+
<Button
|
|
40
|
+
variant="link"
|
|
41
|
+
onclick={() => (currentForm = "sign-in")}
|
|
42
|
+
class="p-0">Sign in here</Button
|
|
43
|
+
>
|
|
44
|
+
{/if}
|
|
45
|
+
</Card.Description>
|
|
46
|
+
</Card.Header>
|
|
47
|
+
<Card.Content class="space-y-5">
|
|
48
|
+
{#if currentForm !== "forgot-password"}
|
|
49
|
+
<SignInWithGoogle label="Sign in" />
|
|
50
|
+
|
|
51
|
+
<div
|
|
52
|
+
class="before:muted-foreground after:muted-foreground flex items-center text-xs uppercase text-muted-foreground before:me-6 before:flex-1 before:border-t after:ms-6 after:flex-1 after:border-t dark:before:border-muted-foreground dark:after:border-muted-foreground"
|
|
53
|
+
>
|
|
54
|
+
Or
|
|
55
|
+
</div>
|
|
56
|
+
{/if}
|
|
57
|
+
{#if currentForm === "sign-in"}
|
|
58
|
+
<SignInForm />
|
|
59
|
+
{:else if currentForm === "sign-up"}
|
|
60
|
+
<SignUpForm />
|
|
61
|
+
{:else if currentForm === "forgot-password"}
|
|
62
|
+
<ResetPasswordForm />
|
|
63
|
+
{/if}
|
|
64
|
+
</Card.Content>
|
|
65
|
+
</Card.Root>
|
package/dist/index.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export { firekitUploadTask } from './firebase/storage/upload-task.svelte.js';
|
|
|
13
13
|
export { default as SignInPage } from './auth/sign-in.svelte';
|
|
14
14
|
export { default as SignUpPage } from './auth/sign-up.svelte';
|
|
15
15
|
export { default as ResetPassWordPage } from './auth/reset-password.svelte';
|
|
16
|
+
export { default as AuthPage } from './auth/auth.svelte';
|
|
16
17
|
export { default as ResetPassWordForm } from './components/auth/reset-password-form.svelte';
|
|
17
18
|
export { default as SignInForm } from './components/auth/sign-in-form.svelte';
|
|
18
19
|
export { default as SignUpForm } from './components/auth/sign-up-form.svelte';
|
package/dist/index.js
CHANGED
|
@@ -18,6 +18,7 @@ export { firekitUploadTask } from './firebase/storage/upload-task.svelte.js';
|
|
|
18
18
|
export { default as SignInPage } from './auth/sign-in.svelte';
|
|
19
19
|
export { default as SignUpPage } from './auth/sign-up.svelte';
|
|
20
20
|
export { default as ResetPassWordPage } from './auth/reset-password.svelte';
|
|
21
|
+
export { default as AuthPage } from './auth/auth.svelte';
|
|
21
22
|
export { default as ResetPassWordForm } from './components/auth/reset-password-form.svelte';
|
|
22
23
|
export { default as SignInForm } from './components/auth/sign-in-form.svelte';
|
|
23
24
|
export { default as SignUpForm } from './components/auth/sign-up-form.svelte';
|