diff --git a/lib/build/recipe/emailpassword/components/themes/signInAndUp/signIn.d.ts b/lib/build/recipe/emailpassword/components/themes/signInAndUp/signIn.d.ts index 2b40c960b..64639bb96 100644 --- a/lib/build/recipe/emailpassword/components/themes/signInAndUp/signIn.d.ts +++ b/lib/build/recipe/emailpassword/components/themes/signInAndUp/signIn.d.ts @@ -1,7 +1,7 @@ /// export declare const SignIn: import("react").ComponentType< import("../../../../../types").ThemeBaseProps & { - formFields: import("../../../types").FormFieldThemeProps[]; + formFields: Omit[]; error: string | undefined; } & { recipeImplementation: import("supertokens-web-js/recipe/emailpassword").RecipeInterface; diff --git a/lib/build/recipe/emailpassword/components/themes/signInAndUp/signInForm.d.ts b/lib/build/recipe/emailpassword/components/themes/signInAndUp/signInForm.d.ts index 7dbc1321c..f57175ca5 100644 --- a/lib/build/recipe/emailpassword/components/themes/signInAndUp/signInForm.d.ts +++ b/lib/build/recipe/emailpassword/components/themes/signInAndUp/signInForm.d.ts @@ -1,7 +1,7 @@ /// export declare const SignInForm: import("react").ComponentType< import("../../../../../types").ThemeBaseProps & { - formFields: import("../../../types").FormFieldThemeProps[]; + formFields: Omit[]; error: string | undefined; } & { recipeImplementation: import("supertokens-web-js/recipe/emailpassword").RecipeInterface; diff --git a/lib/build/recipe/emailpassword/types.d.ts b/lib/build/recipe/emailpassword/types.d.ts index 1c9da91cf..458fe4cfc 100644 --- a/lib/build/recipe/emailpassword/types.d.ts +++ b/lib/build/recipe/emailpassword/types.d.ts @@ -117,7 +117,11 @@ declare type FormThemeBaseProps = ThemeBaseProps & { formFields: FormFieldThemeProps[]; error: string | undefined; }; -export declare type SignInThemeProps = FormThemeBaseProps & { +declare type SignInFormThemeBaseProps = ThemeBaseProps & { + formFields: Omit[]; + error: string | undefined; +}; +export declare type SignInThemeProps = SignInFormThemeBaseProps & { recipeImplementation: RecipeInterface; clearError: () => void; onError: (error: string) => void; @@ -133,9 +137,6 @@ export declare type SignUpThemeProps = FormThemeBaseProps & { config: NormalisedConfig; signInClicked?: () => void; onSuccess: (result: { user: User }) => void; - formFields: (FormFieldThemeProps & { - inputComponent?: React.FC; - })[]; }; export declare type SignInAndUpThemeProps = { signInForm: SignInThemeProps; @@ -151,6 +152,7 @@ export declare type FormFieldThemeProps = NormalisedFormField & { labelComponent?: JSX.Element; showIsRequired?: boolean; clearOnSubmit?: boolean; + inputComponent?: React.FC; }; export declare type FormFieldError = { id: string; diff --git a/lib/build/types.d.ts b/lib/build/types.d.ts index 3c70442b9..1aa7f2568 100644 --- a/lib/build/types.d.ts +++ b/lib/build/types.d.ts @@ -1,4 +1,3 @@ -import type { InputProps } from "./recipe/emailpassword/components/library/input"; import type { BaseRecipeModule } from "./recipe/recipeModule/baseRecipeModule"; import type { NormalisedConfig as NormalisedRecipeModuleConfig } from "./recipe/recipeModule/types"; import type { TranslationFunc, TranslationStore } from "./translation/translationHelpers"; @@ -107,7 +106,6 @@ export declare type NormalisedFormField = { optional: boolean; autoComplete?: string; autofocus?: boolean; - inputComponent?: React.FC; }; export declare type ReactComponentClass

= ComponentClass | ((props: P) => JSX.Element); export declare type FeatureBaseConfig = { diff --git a/lib/ts/recipe/emailpassword/types.ts b/lib/ts/recipe/emailpassword/types.ts index 274fa30b2..432008bb7 100644 --- a/lib/ts/recipe/emailpassword/types.ts +++ b/lib/ts/recipe/emailpassword/types.ts @@ -236,14 +236,23 @@ export type NormalisedEnterEmailForm = FeatureBaseConfig & { type FormThemeBaseProps = ThemeBaseProps & { /* - * Form fields to use in the signin form. + * Form fields to use in the signup form. */ formFields: FormFieldThemeProps[]; error: string | undefined; }; -export type SignInThemeProps = FormThemeBaseProps & { +type SignInFormThemeBaseProps = ThemeBaseProps & { + /* + * Form fields to use in the signin form. exclude custom component + */ + formFields: Omit[]; + + error: string | undefined; +}; + +export type SignInThemeProps = SignInFormThemeBaseProps & { recipeImplementation: RecipeInterface; clearError: () => void; onError: (error: string) => void; @@ -260,7 +269,6 @@ export type SignUpThemeProps = FormThemeBaseProps & { config: NormalisedConfig; signInClicked?: () => void; onSuccess: (result: { user: User }) => void; - formFields: (FormFieldThemeProps & { inputComponent?: React.FC })[]; }; export type SignInAndUpThemeProps = { @@ -289,6 +297,11 @@ export type FormFieldThemeProps = NormalisedFormField & { * Clears the field after calling the API. */ clearOnSubmit?: boolean; + + /* + * Ability to add custom components + */ + inputComponent?: React.FC; }; export type FormFieldError = { diff --git a/lib/ts/types.ts b/lib/ts/types.ts index 595b24315..8399585b5 100644 --- a/lib/ts/types.ts +++ b/lib/ts/types.ts @@ -13,7 +13,6 @@ * under the License. */ -import type { InputProps } from "./recipe/emailpassword/components/library/input"; import type { BaseRecipeModule } from "./recipe/recipeModule/baseRecipeModule"; import type { NormalisedConfig as NormalisedRecipeModuleConfig } from "./recipe/recipeModule/types"; import type { TranslationFunc, TranslationStore } from "./translation/translationHelpers"; @@ -284,11 +283,6 @@ export type NormalisedFormField = { * Moves focus to the input element when it mounts */ autofocus?: boolean; - - /* - * Ability to add custom components - */ - inputComponent?: React.FC; }; export type ReactComponentClass

= ComponentClass | ((props: P) => JSX.Element);