@urbackend/react 0.1.1 → 0.2.1

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