Skip to content

Commit

Permalink
fix: type fixes and design updates + extended storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
porcellus committed Dec 7, 2023
1 parent cfc414e commit 24dbe36
Show file tree
Hide file tree
Showing 31 changed files with 1,136 additions and 877 deletions.
1 change: 1 addition & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const config: StorybookConfig = {
"@storybook/addon-actions",
"@storybook/addon-links",
"@storybook/addon-interactions",
"@storybook/addon-designs",
// "@storybook/addon-actions/register",
],
framework: {
Expand Down
7 changes: 7 additions & 0 deletions lib/build/emailverification-shared.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/build/emailverification-shared2.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/build/index2.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/build/multifactorauthprebuiltui.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/build/passwordless-shared4.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions lib/build/recipe/emailverification/recipe.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/build/sessionprebuiltui.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/build/thirdparty-shared2.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/build/thirdpartyemailpasswordprebuiltui.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/build/thirdpartypasswordlessprebuiltui.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/build/totpprebuiltui.js

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions lib/build/ui/types.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/ts/recipe/emailpassword/components/themes/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
display: flex;
flex-direction: column;
padding-top: 0px;
padding-bottom: 34px;
padding-bottom: 20px;
}

[data-supertokens~="formRow"][data-supertokens~="hasError"] {
Expand Down
10 changes: 10 additions & 0 deletions lib/ts/recipe/emailverification/recipe.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import { PostSuperTokensInitCallbacks } from "supertokens-web-js/utils/postSuper
import { SessionClaimValidatorStore } from "supertokens-web-js/utils/sessionClaimValidatorStore";

import { SSR_ERROR } from "../../constants";
import { isTest } from "../../utils";
import RecipeModule from "../recipeModule";

import { DEFAULT_VERIFY_EMAIL_PATH } from "./constants";
Expand Down Expand Up @@ -137,4 +138,13 @@ export default class EmailVerification extends RecipeModule<
return "/";
}
};

static reset(): void {
if (!isTest()) {
return;
}

EmailVerification.instance = undefined;
return;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
color: rgb(var(--palette-textPrimary));
}

[data-supertokens~="thirdPartyEmailPasswordDividerOr"] {
flex: 1 1;
margin-top: 0.75em;
}

[data-supertokens~="divider"] {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
color: rgb(var(--palette-textPrimary));
}

[data-supertokens~="thirdPartyPasswordlessDividerText"] {
flex: 1 1;
margin-top: 0.75em;
}

[data-supertokens~="divider"] {
Expand Down
4 changes: 3 additions & 1 deletion lib/ts/recipe/totp/components/themes/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
display: block;
color: rgb(var(--palette-textGray));
font-size: var(--font-size-0);
margin: 4px;
margin: 16px 0 12px;
}

[data-supertokens~="totpSecret"] {
Expand All @@ -41,6 +41,8 @@
font-weight: 600;
letter-spacing: 3.36px;
background: rgba(var(--palette-textLink), 0.08);
word-wrap: break-word;
overflow-y: hidden;
}

[data-supertokens~="showTOTPSecretBtn"]:hover {
Expand Down
13 changes: 9 additions & 4 deletions lib/ts/styles/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@

[data-supertokens~="superTokensBranding"] {
display: block;
margin: 0 auto;
margin: 10px auto 0;
background: rgb(var(--palette-superTokensBrandingBackground));
color: rgb(var(--palette-superTokensBrandingText));
text-decoration: none;
Expand All @@ -95,7 +95,8 @@
background: rgb(var(--palette-errorBackground));
padding-top: 10px;
padding-bottom: 10px;
margin-bottom: 15px;
margin-bottom: 10px;
margin-top: 24px;
padding-left: 18px;
padding-right: 18px;
letter-spacing: 0.2px;
Expand Down Expand Up @@ -160,9 +161,13 @@
color: rgb(var(--palette-textPrimary));
}

[data-supertokens~="secondaryText"] strong {
font-weight: 500;
}

[data-supertokens~="divider"] {
margin-top: 1em;
margin-bottom: 1em;
margin-top: 1.5em;
margin-bottom: 1.5em;
border-bottom: 0.3px solid #dddddd;
align-items: center;
padding-bottom: 5px;
Expand Down
2 changes: 2 additions & 0 deletions lib/ts/ui/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { EmailPasswordPreBuiltUI } from "../recipe/emailpassword/prebuiltui";
import type { EmailVerificationPreBuiltUI } from "../recipe/emailverification/prebuiltui";
import type { MultiFactorAuthPreBuiltUI } from "../recipe/multifactorauth/prebuiltui";
import type { PasswordlessPreBuiltUI } from "../recipe/passwordless/prebuiltui";
import type { ThirdPartyPreBuiltUI } from "../recipe/thirdparty/prebuiltui";
import type { ThirdPartyEmailPasswordPreBuiltUI } from "../recipe/thirdpartyemailpassword/prebuiltui";
Expand All @@ -18,4 +19,5 @@ export type PreBuiltRecipes = (
| typeof EmailPasswordPreBuiltUI
| typeof PasswordlessPreBuiltUI
| typeof EmailVerificationPreBuiltUI
| typeof MultiFactorAuthPreBuiltUI
)[];
Loading

0 comments on commit 24dbe36

Please sign in to comment.