@urbackend/react 0.1.1 → 0.2.0

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/index.d.mts CHANGED
@@ -83,9 +83,76 @@ interface GuestRouteProps {
83
83
  */
84
84
  declare const GuestRoute: React.FC<GuestRouteProps>;
85
85
 
86
+ type AuthProvider = 'google' | 'github';
87
+ type ThemeMode = 'light' | 'dark';
88
+ interface AuthColors {
89
+ background: string;
90
+ surface: string;
91
+ text: string;
92
+ textMuted: string;
93
+ border: string;
94
+ inputBackground: string;
95
+ primary: string;
96
+ primaryText: string;
97
+ footerBackground: string;
98
+ dividerText: string;
99
+ socialButtonBackground: string;
100
+ }
101
+ interface AuthBranding {
102
+ brandName?: string;
103
+ appName?: string;
104
+ title?: string;
105
+ subtitle?: string;
106
+ logo?: React.ReactNode | string;
107
+ primaryColor?: string;
108
+ }
109
+ interface AuthLabels {
110
+ loginTab: string;
111
+ signupTab: string;
112
+ loginTitle: string;
113
+ signupTitle: string;
114
+ forgotTitle: string;
115
+ resetTitle: string;
116
+ loginButton: string;
117
+ signupButton: string;
118
+ forgotButton: string;
119
+ resetButton: string;
120
+ emailLabel: string;
121
+ emailPlaceholder: string;
122
+ passwordLabel: string;
123
+ passwordPlaceholder: string;
124
+ nameLabel: string;
125
+ namePlaceholder: string;
126
+ otpLabel: string;
127
+ otpPlaceholder: string;
128
+ forgotPasswordLink: string;
129
+ socialDivider: string;
130
+ googleButton: string;
131
+ githubButton: string;
132
+ footerSigninPrompt: string;
133
+ footerSignupPrompt: string;
134
+ footerForgotPrompt: string;
135
+ noAuthMethods: string;
136
+ forgotSubtitle: string;
137
+ resetSubtitle: string;
138
+ signInTitle?: string;
139
+ signUpTitle?: string;
140
+ signInTab?: string;
141
+ signUpTab?: string;
142
+ signInButton?: string;
143
+ signUpButton?: string;
144
+ }
86
145
  interface UrAuthProps {
87
- providers?: ('google' | 'github')[];
88
- theme?: 'light' | 'dark';
146
+ providers?: AuthProvider[] | {
147
+ google?: boolean;
148
+ github?: boolean;
149
+ emailPassword?: boolean;
150
+ };
151
+ enableEmailPassword?: boolean;
152
+ theme?: ThemeMode;
153
+ colors?: Partial<AuthColors>;
154
+ branding?: AuthBranding;
155
+ labels?: Partial<AuthLabels>;
89
156
  onSuccess?: () => void;
90
157
  }
91
158
  declare const UrAuth: React.FC<UrAuthProps>;
package/dist/index.d.ts CHANGED
@@ -83,9 +83,76 @@ interface GuestRouteProps {
83
83
  */
84
84
  declare const GuestRoute: React.FC<GuestRouteProps>;
85
85
 
86
+ type AuthProvider = 'google' | 'github';
87
+ type ThemeMode = 'light' | 'dark';
88
+ interface AuthColors {
89
+ background: string;
90
+ surface: string;
91
+ text: string;
92
+ textMuted: string;
93
+ border: string;
94
+ inputBackground: string;
95
+ primary: string;
96
+ primaryText: string;
97
+ footerBackground: string;
98
+ dividerText: string;
99
+ socialButtonBackground: string;
100
+ }
101
+ interface AuthBranding {
102
+ brandName?: string;
103
+ appName?: string;
104
+ title?: string;
105
+ subtitle?: string;
106
+ logo?: React.ReactNode | string;
107
+ primaryColor?: string;
108
+ }
109
+ interface AuthLabels {
110
+ loginTab: string;
111
+ signupTab: string;
112
+ loginTitle: string;
113
+ signupTitle: string;
114
+ forgotTitle: string;
115
+ resetTitle: string;
116
+ loginButton: string;
117
+ signupButton: string;
118
+ forgotButton: string;
119
+ resetButton: string;
120
+ emailLabel: string;
121
+ emailPlaceholder: string;
122
+ passwordLabel: string;
123
+ passwordPlaceholder: string;
124
+ nameLabel: string;
125
+ namePlaceholder: string;
126
+ otpLabel: string;
127
+ otpPlaceholder: string;
128
+ forgotPasswordLink: string;
129
+ socialDivider: string;
130
+ googleButton: string;
131
+ githubButton: string;
132
+ footerSigninPrompt: string;
133
+ footerSignupPrompt: string;
134
+ footerForgotPrompt: string;
135
+ noAuthMethods: string;
136
+ forgotSubtitle: string;
137
+ resetSubtitle: string;
138
+ signInTitle?: string;
139
+ signUpTitle?: string;
140
+ signInTab?: string;
141
+ signUpTab?: string;
142
+ signInButton?: string;
143
+ signUpButton?: string;
144
+ }
86
145
  interface UrAuthProps {
87
- providers?: ('google' | 'github')[];
88
- theme?: 'light' | 'dark';
146
+ providers?: AuthProvider[] | {
147
+ google?: boolean;
148
+ github?: boolean;
149
+ emailPassword?: boolean;
150
+ };
151
+ enableEmailPassword?: boolean;
152
+ theme?: ThemeMode;
153
+ colors?: Partial<AuthColors>;
154
+ branding?: AuthBranding;
155
+ labels?: Partial<AuthLabels>;
89
156
  onSuccess?: () => void;
90
157
  }
91
158
  declare const UrAuth: React.FC<UrAuthProps>;