@insforge/react 0.4.0 → 0.4.6

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/forms.d.cts CHANGED
@@ -31,12 +31,11 @@ interface SignInFormProps {
31
31
  dividerText?: string;
32
32
  showVerificationStep?: boolean;
33
33
  onVerifyCode?: (code: string) => Promise<void>;
34
- verificationDescription?: string;
35
34
  }
36
35
  /**
37
36
  * Pre-built sign-in form component (UI only, no business logic).
38
37
  */
39
- declare function SignInForm({ email, password, onEmailChange, onPasswordChange, onSubmit, error, loading, oauthLoading, availableProviders, onOAuthClick, authConfig, title, subtitle, emailLabel, emailPlaceholder, passwordLabel, passwordPlaceholder, forgotPasswordText, forgotPasswordUrl, submitButtonText, loadingButtonText, signUpText, signUpLinkText, signUpUrl, dividerText, showVerificationStep, onVerifyCode, verificationDescription, }: SignInFormProps): react_jsx_runtime.JSX.Element;
38
+ declare function SignInForm({ email, password, onEmailChange, onPasswordChange, onSubmit, error, loading, oauthLoading, availableProviders, onOAuthClick, authConfig, title, subtitle, emailLabel, emailPlaceholder, passwordLabel, passwordPlaceholder, forgotPasswordText, forgotPasswordUrl, submitButtonText, loadingButtonText, signUpText, signUpLinkText, signUpUrl, dividerText, showVerificationStep, onVerifyCode, }: SignInFormProps): react_jsx_runtime.JSX.Element;
40
39
 
41
40
  interface SignUpFormProps {
42
41
  email: string;
@@ -64,20 +63,19 @@ interface SignUpFormProps {
64
63
  dividerText?: string;
65
64
  showVerificationStep?: boolean;
66
65
  onVerifyCode?: (code: string) => Promise<void>;
67
- verificationDescription?: string;
68
66
  }
69
67
  /**
70
68
  * Pre-built sign-up form component (UI only, no business logic).
71
69
  */
72
- declare function SignUpForm({ email, password, onEmailChange, onPasswordChange, onSubmit, error, loading, oauthLoading, availableProviders, onOAuthClick, authConfig, title, subtitle, emailLabel, emailPlaceholder, passwordLabel, passwordPlaceholder, submitButtonText, loadingButtonText, signInText, signInLinkText, signInUrl, dividerText, showVerificationStep, onVerifyCode, verificationDescription, }: SignUpFormProps): react_jsx_runtime.JSX.Element;
70
+ declare function SignUpForm({ email, password, onEmailChange, onPasswordChange, onSubmit, error, loading, oauthLoading, availableProviders, onOAuthClick, authConfig, title, subtitle, emailLabel, emailPlaceholder, passwordLabel, passwordPlaceholder, submitButtonText, loadingButtonText, signInText, signInLinkText, signInUrl, dividerText, showVerificationStep, onVerifyCode, }: SignUpFormProps): react_jsx_runtime.JSX.Element;
73
71
 
72
+ type ResetPasswordMethod = 'code' | 'link';
74
73
  interface ForgotPasswordFormProps {
75
74
  email: string;
76
75
  onEmailChange: (email: string) => void;
77
76
  onSubmit: (e: FormEvent<HTMLFormElement>) => void;
78
77
  error?: string;
79
78
  loading?: boolean;
80
- success?: boolean;
81
79
  title?: string;
82
80
  subtitle?: string;
83
81
  emailLabel?: string;
@@ -86,13 +84,15 @@ interface ForgotPasswordFormProps {
86
84
  loadingButtonText?: string;
87
85
  backToSignInText?: string;
88
86
  backToSignInUrl?: string;
89
- successTitle?: string;
90
- successMessage?: string;
87
+ showVerificationStep?: boolean;
88
+ resetPasswordMethod?: ResetPasswordMethod;
89
+ onVerifyCode?: (code: string) => Promise<void>;
90
+ onResendEmail?: () => Promise<void>;
91
91
  }
92
92
  /**
93
93
  * Pre-built forgot password form component (UI only, no business logic).
94
94
  */
95
- declare function ForgotPasswordForm({ email, onEmailChange, onSubmit, error, loading, success, title, subtitle, emailLabel, emailPlaceholder, submitButtonText, loadingButtonText, backToSignInText, backToSignInUrl, successTitle, successMessage, }: ForgotPasswordFormProps): react_jsx_runtime.JSX.Element;
95
+ declare function ForgotPasswordForm({ email, onEmailChange, onSubmit, error, loading, title, subtitle, emailLabel, emailPlaceholder, submitButtonText, loadingButtonText, backToSignInText, backToSignInUrl, showVerificationStep, resetPasswordMethod, onVerifyCode, onResendEmail, }: ForgotPasswordFormProps): react_jsx_runtime.JSX.Element;
96
96
 
97
97
  interface ResetPasswordFormProps {
98
98
  newPassword: string;
@@ -112,15 +112,12 @@ interface ResetPasswordFormProps {
112
112
  confirmPasswordPlaceholder?: string;
113
113
  submitButtonText?: string;
114
114
  loadingButtonText?: string;
115
- backToSignInText?: string;
116
- backToSignInUrl?: string;
117
115
  successTitle?: string;
118
- successMessage?: string;
119
116
  }
120
117
  /**
121
118
  * Pre-built reset password form component (UI only, no business logic).
122
119
  */
123
- declare function ResetPasswordForm({ newPassword, confirmPassword, onNewPasswordChange, onConfirmPasswordChange, onSubmit, error, loading, success, authConfig, title, subtitle, newPasswordLabel, newPasswordPlaceholder, confirmPasswordLabel, confirmPasswordPlaceholder, submitButtonText, loadingButtonText, backToSignInText, backToSignInUrl, successTitle, successMessage, }: ResetPasswordFormProps): react_jsx_runtime.JSX.Element;
120
+ declare function ResetPasswordForm({ newPassword, confirmPassword, onNewPasswordChange, onConfirmPasswordChange, onSubmit, error, loading, success, authConfig, title, subtitle, newPasswordLabel, newPasswordPlaceholder, confirmPasswordLabel, confirmPasswordPlaceholder, submitButtonText, loadingButtonText, successTitle, }: ResetPasswordFormProps): react_jsx_runtime.JSX.Element;
124
121
 
125
122
  interface VerifyEmailStatusProps {
126
123
  status: 'verifying' | 'success' | 'error';
@@ -135,4 +132,4 @@ interface VerifyEmailStatusProps {
135
132
  */
136
133
  declare function VerifyEmailStatus({ status, error, verifyingTitle, successTitle, successMessage, errorTitle, }: VerifyEmailStatusProps): react_jsx_runtime.JSX.Element;
137
134
 
138
- export { ForgotPasswordForm, ResetPasswordForm, SignInForm, SignUpForm, VerifyEmailStatus };
135
+ export { ForgotPasswordForm, type ForgotPasswordFormProps, ResetPasswordForm, type ResetPasswordFormProps, SignInForm, type SignInFormProps, SignUpForm, type SignUpFormProps, VerifyEmailStatus, type VerifyEmailStatusProps };
package/dist/forms.d.ts CHANGED
@@ -31,12 +31,11 @@ interface SignInFormProps {
31
31
  dividerText?: string;
32
32
  showVerificationStep?: boolean;
33
33
  onVerifyCode?: (code: string) => Promise<void>;
34
- verificationDescription?: string;
35
34
  }
36
35
  /**
37
36
  * Pre-built sign-in form component (UI only, no business logic).
38
37
  */
39
- declare function SignInForm({ email, password, onEmailChange, onPasswordChange, onSubmit, error, loading, oauthLoading, availableProviders, onOAuthClick, authConfig, title, subtitle, emailLabel, emailPlaceholder, passwordLabel, passwordPlaceholder, forgotPasswordText, forgotPasswordUrl, submitButtonText, loadingButtonText, signUpText, signUpLinkText, signUpUrl, dividerText, showVerificationStep, onVerifyCode, verificationDescription, }: SignInFormProps): react_jsx_runtime.JSX.Element;
38
+ declare function SignInForm({ email, password, onEmailChange, onPasswordChange, onSubmit, error, loading, oauthLoading, availableProviders, onOAuthClick, authConfig, title, subtitle, emailLabel, emailPlaceholder, passwordLabel, passwordPlaceholder, forgotPasswordText, forgotPasswordUrl, submitButtonText, loadingButtonText, signUpText, signUpLinkText, signUpUrl, dividerText, showVerificationStep, onVerifyCode, }: SignInFormProps): react_jsx_runtime.JSX.Element;
40
39
 
41
40
  interface SignUpFormProps {
42
41
  email: string;
@@ -64,20 +63,19 @@ interface SignUpFormProps {
64
63
  dividerText?: string;
65
64
  showVerificationStep?: boolean;
66
65
  onVerifyCode?: (code: string) => Promise<void>;
67
- verificationDescription?: string;
68
66
  }
69
67
  /**
70
68
  * Pre-built sign-up form component (UI only, no business logic).
71
69
  */
72
- declare function SignUpForm({ email, password, onEmailChange, onPasswordChange, onSubmit, error, loading, oauthLoading, availableProviders, onOAuthClick, authConfig, title, subtitle, emailLabel, emailPlaceholder, passwordLabel, passwordPlaceholder, submitButtonText, loadingButtonText, signInText, signInLinkText, signInUrl, dividerText, showVerificationStep, onVerifyCode, verificationDescription, }: SignUpFormProps): react_jsx_runtime.JSX.Element;
70
+ declare function SignUpForm({ email, password, onEmailChange, onPasswordChange, onSubmit, error, loading, oauthLoading, availableProviders, onOAuthClick, authConfig, title, subtitle, emailLabel, emailPlaceholder, passwordLabel, passwordPlaceholder, submitButtonText, loadingButtonText, signInText, signInLinkText, signInUrl, dividerText, showVerificationStep, onVerifyCode, }: SignUpFormProps): react_jsx_runtime.JSX.Element;
73
71
 
72
+ type ResetPasswordMethod = 'code' | 'link';
74
73
  interface ForgotPasswordFormProps {
75
74
  email: string;
76
75
  onEmailChange: (email: string) => void;
77
76
  onSubmit: (e: FormEvent<HTMLFormElement>) => void;
78
77
  error?: string;
79
78
  loading?: boolean;
80
- success?: boolean;
81
79
  title?: string;
82
80
  subtitle?: string;
83
81
  emailLabel?: string;
@@ -86,13 +84,15 @@ interface ForgotPasswordFormProps {
86
84
  loadingButtonText?: string;
87
85
  backToSignInText?: string;
88
86
  backToSignInUrl?: string;
89
- successTitle?: string;
90
- successMessage?: string;
87
+ showVerificationStep?: boolean;
88
+ resetPasswordMethod?: ResetPasswordMethod;
89
+ onVerifyCode?: (code: string) => Promise<void>;
90
+ onResendEmail?: () => Promise<void>;
91
91
  }
92
92
  /**
93
93
  * Pre-built forgot password form component (UI only, no business logic).
94
94
  */
95
- declare function ForgotPasswordForm({ email, onEmailChange, onSubmit, error, loading, success, title, subtitle, emailLabel, emailPlaceholder, submitButtonText, loadingButtonText, backToSignInText, backToSignInUrl, successTitle, successMessage, }: ForgotPasswordFormProps): react_jsx_runtime.JSX.Element;
95
+ declare function ForgotPasswordForm({ email, onEmailChange, onSubmit, error, loading, title, subtitle, emailLabel, emailPlaceholder, submitButtonText, loadingButtonText, backToSignInText, backToSignInUrl, showVerificationStep, resetPasswordMethod, onVerifyCode, onResendEmail, }: ForgotPasswordFormProps): react_jsx_runtime.JSX.Element;
96
96
 
97
97
  interface ResetPasswordFormProps {
98
98
  newPassword: string;
@@ -112,15 +112,12 @@ interface ResetPasswordFormProps {
112
112
  confirmPasswordPlaceholder?: string;
113
113
  submitButtonText?: string;
114
114
  loadingButtonText?: string;
115
- backToSignInText?: string;
116
- backToSignInUrl?: string;
117
115
  successTitle?: string;
118
- successMessage?: string;
119
116
  }
120
117
  /**
121
118
  * Pre-built reset password form component (UI only, no business logic).
122
119
  */
123
- declare function ResetPasswordForm({ newPassword, confirmPassword, onNewPasswordChange, onConfirmPasswordChange, onSubmit, error, loading, success, authConfig, title, subtitle, newPasswordLabel, newPasswordPlaceholder, confirmPasswordLabel, confirmPasswordPlaceholder, submitButtonText, loadingButtonText, backToSignInText, backToSignInUrl, successTitle, successMessage, }: ResetPasswordFormProps): react_jsx_runtime.JSX.Element;
120
+ declare function ResetPasswordForm({ newPassword, confirmPassword, onNewPasswordChange, onConfirmPasswordChange, onSubmit, error, loading, success, authConfig, title, subtitle, newPasswordLabel, newPasswordPlaceholder, confirmPasswordLabel, confirmPasswordPlaceholder, submitButtonText, loadingButtonText, successTitle, }: ResetPasswordFormProps): react_jsx_runtime.JSX.Element;
124
121
 
125
122
  interface VerifyEmailStatusProps {
126
123
  status: 'verifying' | 'success' | 'error';
@@ -135,4 +132,4 @@ interface VerifyEmailStatusProps {
135
132
  */
136
133
  declare function VerifyEmailStatus({ status, error, verifyingTitle, successTitle, successMessage, errorTitle, }: VerifyEmailStatusProps): react_jsx_runtime.JSX.Element;
137
134
 
138
- export { ForgotPasswordForm, ResetPasswordForm, SignInForm, SignUpForm, VerifyEmailStatus };
135
+ export { ForgotPasswordForm, type ForgotPasswordFormProps, ResetPasswordForm, type ResetPasswordFormProps, SignInForm, type SignInFormProps, SignUpForm, type SignUpFormProps, VerifyEmailStatus, type VerifyEmailStatusProps };