├── ForgotPassword.svelte
├── Login.svelte
├── LoginWindow.svelte
├── Logout.svelte
├── README.md
├── Signup.svelte
├── package.js
├── state.js
├── svelte-accounts-ui-tests.js
└── svelte-accounts-ui.js
/ForgotPassword.svelte:
--------------------------------------------------------------------------------
1 |
27 |
28 |
{heading}
29 |
30 |
39 |
--------------------------------------------------------------------------------
/Login.svelte:
--------------------------------------------------------------------------------
1 |
22 |
23 | {heading}
24 |
25 |
40 |
--------------------------------------------------------------------------------
/LoginWindow.svelte:
--------------------------------------------------------------------------------
1 |
11 |
12 |
17 |
18 | {#if windowType === 'LOGIN'}
19 |
20 | Need an account?
21 |
22 |
28 | {:else if windowType === 'SIGNUP'}
29 |
30 | I already have an account.
31 |
37 | {:else}
38 |
39 | I know my password
40 |
46 | {/if}
47 |
48 | {#if $error}
49 | {$error}
50 | {/if}
51 |
52 |
58 |
--------------------------------------------------------------------------------
/Logout.svelte:
--------------------------------------------------------------------------------
1 |
6 |
7 |
13 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # levelup:svelte-accounts-ui
2 |
3 | > A word or warning. This is super rough rn. I'm publishing to allow for community involvement and to get feedback. That said... it's totally usable.
4 |
5 | > Currently email & password is the only supported means of logging in.
6 |
7 | ## Basic
8 |
9 | ```js
10 |
13 |
14 |
15 | ```
16 |
17 | ## You can also
18 |
19 | ```js
20 |
23 |
24 |
25 |
26 |
27 | ```
28 |
29 | ## Components
30 |
31 | ### LoginWindow
32 |
33 | Easy UI for Logins
34 |
35 | | Prop | Type | Default | Description |
36 | | ------------- | ------ | --------- | ----------- |
37 | | signupHeading | string | "Sign Up" | |
38 | | loginHeading | string | "Login" | |
39 |
40 | ### Login
41 |
42 | Login Form
43 |
44 | | Prop | Type | Default | Description |
45 | | ------- | ------ | ------- | ----------- |
46 | | heading | string | "Login" | |
47 |
48 | ### Signup
49 |
50 | Sign Up Form
51 |
52 | | Prop | Type | Default | Description |
53 | | ------------- | ------ | --------- | ----------- |
54 | | signupHeading | string | "Sign Up" | |
55 |
56 | ### Logout
57 |
58 | A button that logs the user out
59 |
60 | | Prop | Type | Default | Description |
61 | | ---- | ------ | -------- | ----------- |
62 | | text | string | "Logout" | |
63 |
64 | ### Todo
65 |
66 | - Reset Password
67 | - Forgot Password Link
68 | - Config options
69 | - Default window view
70 | - Style Wrapper Component
71 | - Text as props
72 | - Oauth Services
73 | - 😅 Long way to go huh?
74 |
--------------------------------------------------------------------------------
/Signup.svelte:
--------------------------------------------------------------------------------
1 |
30 |
31 | {heading}
32 |
33 |
48 |
--------------------------------------------------------------------------------
/package.js:
--------------------------------------------------------------------------------
1 | Package.describe({
2 | name: "levelup:svelte-accounts-ui",
3 | version: "0.0.6",
4 | summary: "The simplicity of Blaze drop in ui, but in Svelte",
5 | // URL to the Git repository containing the source code for this package.
6 | git: "https://github.com/leveluptuts/svelte-accounts-ui",
7 | // By default, Meteor will default to using README.md for documentation.
8 | // To avoid submitting documentation, set this field to null.
9 | documentation: "README.md",
10 | });
11 |
12 | Package.onUse(function (api) {
13 | api.use("ecmascript@0.14.3");
14 | api.use("svelte:compiler@3.16.4_1");
15 | api.use("accounts-base@1.6.0");
16 | api.use("accounts-password@1.6.0");
17 | api.mainModule("svelte-accounts-ui.js");
18 | });
19 |
20 | // Package.onTest(function (api) {
21 | // api.use("ecmascript");
22 | // api.use("tinytest");
23 | // api.use("svelte-accounts-ui");
24 | // api.mainModule("svelte-accounts-ui-tests.js");
25 | // });
26 |
--------------------------------------------------------------------------------
/state.js:
--------------------------------------------------------------------------------
1 | import { writable } from "svelte/store";
2 |
3 | export const error = writable("");
4 |
--------------------------------------------------------------------------------
/svelte-accounts-ui-tests.js:
--------------------------------------------------------------------------------
1 | // Import Tinytest from the tinytest Meteor package.
2 | import { Tinytest } from "meteor/tinytest";
3 |
4 | // Import and rename a variable exported by svelte-accounts-ui.js.
5 | import { name as packageName } from "meteor/svelte-accounts-ui";
6 |
7 | // Write your tests here!
8 | // Here is an example.
9 | Tinytest.add('svelte-accounts-ui - example', function (test) {
10 | test.equal(packageName, "svelte-accounts-ui");
11 | });
12 |
--------------------------------------------------------------------------------
/svelte-accounts-ui.js:
--------------------------------------------------------------------------------
1 | // Write your package code here!
2 |
3 | import Login from "./Login.svelte";
4 | import LoginWindow from "./LoginWindow.svelte";
5 | import Signup from "./Signup.svelte";
6 | import Logout from "./Logout.svelte";
7 |
8 | // Variables exported by this module can be imported by other packages and
9 | // applications. See svelte-accounts-ui-tests.js for an example of importing.
10 | export const name = "svelte-accounts-ui";
11 |
12 | export { Login, Signup, LoginWindow, Logout };
13 |
--------------------------------------------------------------------------------