@sudobility/building_blocks 0.0.25 → 0.0.27

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.
@@ -2,3 +2,5 @@ export { AppSitemapPage } from './app-sitemap-page';
2
2
  export type { AppSitemapPageProps, SitemapPageText, SitemapSection, SitemapLink, LanguageOption, QuickLink, } from './app-sitemap-page';
3
3
  export { AppTextPage } from './app-text-page';
4
4
  export type { AppTextPageProps, TextPageContent, TextSection, TextSectionWithContent, TextSectionWithList, TextSectionWithSubsections, TextPageContact, TextPageContactInfo, GdprNotice, } from './app-text-page';
5
+ export { LoginPage } from './login-page';
6
+ export type { LoginPageProps, LoginPageText } from './login-page';
@@ -0,0 +1,63 @@
1
+ import { type ReactNode } from 'react';
2
+ import { type Auth } from 'firebase/auth';
3
+ /**
4
+ * Props for the LoginPage component
5
+ */
6
+ export interface LoginPageProps {
7
+ /** Application name displayed as the main title */
8
+ appName: string;
9
+ /** Optional logo element to display above the title */
10
+ logo?: ReactNode;
11
+ /** Firebase Auth instance */
12
+ auth: Auth;
13
+ /** Callback fired on successful authentication */
14
+ onSuccess: () => void;
15
+ /** Whether to show Google sign-in option (default: true) */
16
+ showGoogleSignIn?: boolean;
17
+ /** Whether to show sign-up option (default: true) */
18
+ showSignUp?: boolean;
19
+ /** Custom className for the container */
20
+ className?: string;
21
+ /** Custom primary color class (default: 'primary') */
22
+ primaryColorClass?: string;
23
+ }
24
+ /**
25
+ * Text content for the LoginPage
26
+ */
27
+ export interface LoginPageText {
28
+ signIn: string;
29
+ signUp: string;
30
+ createAccount: string;
31
+ signInToAccount: string;
32
+ emailLabel: string;
33
+ emailPlaceholder: string;
34
+ passwordLabel: string;
35
+ passwordPlaceholder: string;
36
+ orContinueWith: string;
37
+ signInWithGoogle: string;
38
+ alreadyHaveAccount: string;
39
+ dontHaveAccount: string;
40
+ }
41
+ /**
42
+ * A reusable login page component with email/password and Google sign-in support.
43
+ *
44
+ * @example
45
+ * ```tsx
46
+ * import { LoginPage } from '@sudobility/building_blocks';
47
+ * import { getFirebaseAuth } from '@sudobility/auth_lib';
48
+ *
49
+ * function MyLoginPage() {
50
+ * const navigate = useNavigate();
51
+ * const auth = getFirebaseAuth();
52
+ *
53
+ * return (
54
+ * <LoginPage
55
+ * appName="My App"
56
+ * auth={auth}
57
+ * onSuccess={() => navigate('/')}
58
+ * />
59
+ * );
60
+ * }
61
+ * ```
62
+ */
63
+ export declare function LoginPage({ appName, logo, auth, onSuccess, showGoogleSignIn, showSignUp, className, primaryColorClass, }: LoginPageProps): import("react/jsx-runtime").JSX.Element;