@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 +69 -2
- package/dist/index.d.ts +69 -2
- package/dist/index.js +245 -81
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +246 -82
- package/dist/index.mjs.map +1 -1
- package/package.json +6 -1
- package/src/components/Toast.tsx +0 -91
- package/src/components/UrAuth.tsx +0 -405
- package/src/components/UrUserButton.tsx +0 -207
- package/src/components.tsx +0 -83
- package/src/context.tsx +0 -140
- package/src/hooks.ts +0 -163
- package/src/index.ts +0 -13
- package/tests/UrAuth.test.tsx +0 -90
- package/tests/context.test.tsx +0 -113
- package/tests/setupTests.ts +0 -1
- package/tsconfig.json +0 -24
- package/tsup.config.ts +0 -11
- package/vitest.config.ts +0 -9
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?:
|
|
88
|
-
|
|
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?:
|
|
88
|
-
|
|
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>;
|