@main12/auth-login 0.2.1 → 0.2.3

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.
Files changed (48) hide show
  1. package/dist/auth/application/hooks/useLoginFlow.d.ts +1 -1
  2. package/dist/auth/application/hooks/useSetPasswordFlow.d.ts +1 -1
  3. package/dist/auth/application/services/authService.d.ts +1 -1
  4. package/dist/auth/domain/passwordRules.d.ts +1 -1
  5. package/dist/components/AuthLayout.d.ts +1 -1
  6. package/dist/components/AuthLayout.js +59 -35
  7. package/dist/components/AuthPages.d.ts +22 -0
  8. package/dist/components/AuthPages.js +83 -0
  9. package/dist/components/PoweredBy.js +40 -23
  10. package/dist/components/email/baseTemplate.d.ts +2 -2
  11. package/dist/components/email/index.d.ts +7 -7
  12. package/dist/components/email/templates/otp.d.ts +3 -3
  13. package/dist/components/email/templates/passwordChanged.d.ts +3 -3
  14. package/dist/components/email/templates/passwordReset.d.ts +3 -3
  15. package/dist/components/email/templates/welcome.d.ts +3 -3
  16. package/dist/components/pages/ForgotPasswordPage.d.ts +1 -1
  17. package/dist/components/pages/ForgotPasswordPageHero.d.ts +1 -1
  18. package/dist/components/pages/ForgotPasswordPageHero.js +24 -15
  19. package/dist/components/pages/ForgotPasswordPageTailwind.d.ts +1 -1
  20. package/dist/components/pages/LoginPage.d.ts +1 -1
  21. package/dist/components/pages/LoginPageHero.d.ts +1 -1
  22. package/dist/components/pages/LoginPageHero.js +81 -51
  23. package/dist/components/pages/LoginPageTailwind.d.ts +1 -1
  24. package/dist/components/pages/LoginPageTailwind.js +11 -20
  25. package/dist/components/pages/SetPasswordPage.d.ts +1 -1
  26. package/dist/components/pages/SetPasswordPageHero.d.ts +1 -1
  27. package/dist/components/pages/SetPasswordPageHero.js +50 -33
  28. package/dist/components/pages/SetPasswordPageTailwind.d.ts +1 -1
  29. package/dist/components/pages/SignupPage.d.ts +1 -1
  30. package/dist/components/pages/SignupPageHero.d.ts +1 -1
  31. package/dist/components/pages/SignupPageHero.js +46 -34
  32. package/dist/components/pages/SignupPageTailwind.d.ts +1 -1
  33. package/dist/components/pages/VerifyOtpPage.d.ts +1 -1
  34. package/dist/components/pages/VerifyOtpPageHero.d.ts +1 -1
  35. package/dist/components/pages/VerifyOtpPageHero.js +46 -10
  36. package/dist/components/pages/VerifyOtpPageTailwind.d.ts +1 -1
  37. package/dist/components/ui/index.d.ts +2 -1
  38. package/dist/components/ui/index.js +3 -2
  39. package/dist/config.d.ts +9 -0
  40. package/dist/config.js +8 -5
  41. package/dist/exports/client.d.ts +27 -24
  42. package/dist/exports/client.js +4 -0
  43. package/dist/exports/rsc.d.ts +6 -6
  44. package/dist/index.d.ts +15 -2
  45. package/dist/index.js +12 -1
  46. package/dist/proxy.d.ts +31 -0
  47. package/dist/proxy.js +55 -0
  48. package/package.json +23 -14
@@ -1,4 +1,4 @@
1
- import type { LoginStep } from '../../domain/types.js';
1
+ import type { LoginStep } from '../../domain/types';
2
2
  export interface UseLoginFlowOptions {
3
3
  redirectTo: string;
4
4
  /** Called after successful password login with { email, password } */
@@ -10,7 +10,7 @@ export declare function useSetPasswordFlow({ redirectTo }?: UseSetPasswordFlowOp
10
10
  error: string | null;
11
11
  isLoading: boolean;
12
12
  showPassword: boolean;
13
- strength: import("../../domain/types.js").PasswordStrengthResult;
13
+ strength: import("../../domain/types").PasswordStrengthResult;
14
14
  setPassword: import("react").Dispatch<import("react").SetStateAction<string>>;
15
15
  setConfirmPassword: import("react").Dispatch<import("react").SetStateAction<string>>;
16
16
  setShowPassword: import("react").Dispatch<import("react").SetStateAction<boolean>>;
@@ -1,4 +1,4 @@
1
- import type { CheckEmailResponse, SendOtpResponse, VerifyOtpResponse, SetPasswordResponse, SignupResponse } from '../../domain/types.js';
1
+ import type { CheckEmailResponse, SendOtpResponse, VerifyOtpResponse, SetPasswordResponse, SignupResponse } from '../../domain/types';
2
2
  /**
3
3
  * Check if a user exists and whether they have a password set.
4
4
  * Used in the two-step login flow.
@@ -1,4 +1,4 @@
1
- import type { PasswordStrengthResult } from './types.js';
1
+ import type { PasswordStrengthResult } from './types';
2
2
  export declare const MIN_PASSWORD_LENGTH = 8;
3
3
  export declare const MIN_CRITERIA_COUNT = 3;
4
4
  /**
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  export interface AuthLayoutConfig {
3
- /** Logo as a React node. Falls back to pluginConfig.logoUrl if not provided. */
3
+ /** Component or URL. Falls back to pluginConfig when omitted. */
4
4
  logo?: React.ReactNode;
5
5
  title?: string;
6
6
  subtitle?: string;
@@ -5,57 +5,81 @@ import { Card, CardContent, CardFooter } from './ui/index.js';
5
5
  import { PoweredBy } from './PoweredBy.js';
6
6
  import { pluginConfig } from '../config.js';
7
7
  function DefaultLogo() {
8
- if (!pluginConfig.logoUrl) return null;
9
- return /*#__PURE__*/ _jsx("img", {
8
+ if (pluginConfig.Logo) {
9
+ const L = pluginConfig.Logo;
10
+ return /*#__PURE__*/ _jsx(L, {});
11
+ }
12
+ if (pluginConfig.logoUrl) return /*#__PURE__*/ _jsx("img", {
10
13
  src: pluginConfig.logoUrl,
11
14
  alt: "",
12
15
  width: 180,
13
16
  height: 42,
14
17
  className: "object-contain"
15
18
  });
19
+ return null;
16
20
  }
17
21
  export const AuthLayout = ({ children, logo, title, subtitle, footer, poweredBy, cardClassName = '', backgroundClass = 'bg-white md:bg-[#191919]' })=>{
18
22
  const displayLogo = logo || /*#__PURE__*/ _jsx(DefaultLogo, {});
19
- return /*#__PURE__*/ _jsx("main", {
23
+ const header = (displayLogo || title) && /*#__PURE__*/ _jsxs("div", {
24
+ className: "flex flex-col items-center gap-2 pt-6 pb-2 px-6",
25
+ children: [
26
+ displayLogo && /*#__PURE__*/ _jsx("div", {
27
+ className: "flex justify-center mb-2",
28
+ children: displayLogo
29
+ }),
30
+ title && /*#__PURE__*/ _jsx("h1", {
31
+ className: "text-xl font-semibold text-gray-900 text-center",
32
+ children: title
33
+ }),
34
+ subtitle && /*#__PURE__*/ _jsx("p", {
35
+ className: "text-gray-600 text-sm text-center",
36
+ children: subtitle
37
+ })
38
+ ]
39
+ });
40
+ return /*#__PURE__*/ _jsxs("main", {
20
41
  className: `flex flex-col min-h-screen ${backgroundClass}`,
21
- children: /*#__PURE__*/ _jsx("div", {
22
- className: "min-h-screen flex items-center justify-center px-4 py-12",
23
- children: /*#__PURE__*/ _jsxs("div", {
24
- className: "w-full max-w-[400px] animate-[fadeIn_0.5s_ease-out]",
42
+ children: [
43
+ /*#__PURE__*/ _jsxs("div", {
44
+ className: "md:hidden flex flex-col",
25
45
  children: [
26
- /*#__PURE__*/ _jsxs(Card, {
27
- className: cardClassName,
28
- children: [
29
- (displayLogo || title) && /*#__PURE__*/ _jsxs("div", {
30
- className: "flex flex-col items-center gap-2 pt-6 pb-2 px-6",
31
- children: [
32
- displayLogo && /*#__PURE__*/ _jsx("div", {
33
- className: "flex justify-center mb-2",
34
- children: displayLogo
35
- }),
36
- title && /*#__PURE__*/ _jsx("h1", {
37
- className: "text-xl font-semibold text-gray-900 text-center",
38
- children: title
39
- }),
40
- subtitle && /*#__PURE__*/ _jsx("p", {
41
- className: "text-gray-600 text-sm text-center",
42
- children: subtitle
43
- })
44
- ]
45
- }),
46
- /*#__PURE__*/ _jsx(CardContent, {
47
- children: children
48
- }),
49
- footer && /*#__PURE__*/ _jsx(CardFooter, {
50
- children: footer
51
- })
52
- ]
46
+ header,
47
+ /*#__PURE__*/ _jsx("div", {
48
+ className: "px-6 pb-4",
49
+ children: children
50
+ }),
51
+ footer && /*#__PURE__*/ _jsx("div", {
52
+ className: "px-6 pb-6 flex justify-center",
53
+ children: footer
53
54
  }),
54
55
  /*#__PURE__*/ _jsx(PoweredBy, {
55
56
  ...poweredBy
56
57
  })
57
58
  ]
59
+ }),
60
+ /*#__PURE__*/ _jsx("div", {
61
+ className: "hidden md:flex min-h-screen items-center justify-center px-4 py-12",
62
+ children: /*#__PURE__*/ _jsxs("div", {
63
+ className: "w-full max-w-[400px] animate-[fadeIn_0.5s_ease-out]",
64
+ children: [
65
+ /*#__PURE__*/ _jsxs(Card, {
66
+ className: cardClassName,
67
+ children: [
68
+ header,
69
+ /*#__PURE__*/ _jsx(CardContent, {
70
+ children: children
71
+ }),
72
+ footer && /*#__PURE__*/ _jsx(CardFooter, {
73
+ children: footer
74
+ })
75
+ ]
76
+ }),
77
+ /*#__PURE__*/ _jsx(PoweredBy, {
78
+ ...poweredBy
79
+ })
80
+ ]
81
+ })
58
82
  })
59
- })
83
+ ]
60
84
  });
61
85
  };
@@ -0,0 +1,22 @@
1
+ import type React from 'react';
2
+ export interface AuthPagesProps {
3
+ /** The slug segments from the catch-all route, e.g. ['login'] or ['forgot-password'] */
4
+ slug?: string[];
5
+ /** Where to redirect after successful login / set-password */
6
+ redirectTo?: string;
7
+ /** Optional logo component */
8
+ logo?: React.ReactNode;
9
+ /** Custom handler for password login (email+password). If omitted, uses default fetch to /api/users/login */
10
+ onPasswordLogin?: (credentials: {
11
+ email: string;
12
+ password: string;
13
+ }) => Promise<void>;
14
+ /** Custom handler for signup. If omitted, uses default fetch to /api/auth/signup */
15
+ onSignup?: (data: {
16
+ name: string;
17
+ email: string;
18
+ }) => Promise<void>;
19
+ /** Base path prefix, defaults to '/auth'. Used to compute sibling URLs. */
20
+ basePath?: string;
21
+ }
22
+ export default function AuthPages({ slug, redirectTo, logo, onPasswordLogin, onSignup, basePath, }: AuthPagesProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,83 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import LoginPage from './pages/LoginPage.js';
4
+ import SignupPage from './pages/SignupPage.js';
5
+ import ForgotPasswordPage from './pages/ForgotPasswordPage.js';
6
+ import VerifyOtpPage from './pages/VerifyOtpPage.js';
7
+ import SetPasswordPage from './pages/SetPasswordPage.js';
8
+ const defaultPasswordLogin = async ({ email, password })=>{
9
+ const res = await fetch('/api/users/login', {
10
+ method: 'POST',
11
+ headers: {
12
+ 'Content-Type': 'application/json'
13
+ },
14
+ body: JSON.stringify({
15
+ email,
16
+ password
17
+ })
18
+ });
19
+ if (!res.ok) {
20
+ const err = await res.json();
21
+ throw new Error(err.errors?.[0]?.message || 'Login failed');
22
+ }
23
+ };
24
+ const defaultSignup = async ({ name, email })=>{
25
+ const res = await fetch('/api/auth/signup', {
26
+ method: 'POST',
27
+ headers: {
28
+ 'Content-Type': 'application/json'
29
+ },
30
+ body: JSON.stringify({
31
+ name,
32
+ email
33
+ })
34
+ });
35
+ if (!res.ok) {
36
+ const err = await res.json();
37
+ throw new Error(err.message || 'Signup failed');
38
+ }
39
+ };
40
+ export default function AuthPages({ slug, redirectTo = '/admin', logo, onPasswordLogin = defaultPasswordLogin, onSignup = defaultSignup, basePath = '/auth' }) {
41
+ const page = slug?.[0] ?? 'login';
42
+ const base = basePath.replace(/\/$/, '');
43
+ const shared = {
44
+ logo
45
+ };
46
+ switch(page){
47
+ case 'login':
48
+ return /*#__PURE__*/ _jsx(LoginPage, {
49
+ onPasswordLogin: onPasswordLogin,
50
+ redirectTo: redirectTo,
51
+ signupUrl: `${base}/signup`,
52
+ ...shared
53
+ });
54
+ case 'signup':
55
+ return /*#__PURE__*/ _jsx(SignupPage, {
56
+ onSignup: onSignup,
57
+ loginUrl: `${base}/login`,
58
+ ...shared
59
+ });
60
+ case 'forgot-password':
61
+ return /*#__PURE__*/ _jsx(ForgotPasswordPage, {
62
+ loginUrl: `${base}/login`,
63
+ ...shared
64
+ });
65
+ case 'verify-otp':
66
+ return /*#__PURE__*/ _jsx(VerifyOtpPage, {
67
+ loginUrl: `${base}/login`,
68
+ ...shared
69
+ });
70
+ case 'set-password':
71
+ return /*#__PURE__*/ _jsx(SetPasswordPage, {
72
+ redirectTo: redirectTo,
73
+ ...shared
74
+ });
75
+ default:
76
+ return /*#__PURE__*/ _jsx(LoginPage, {
77
+ onPasswordLogin: onPasswordLogin,
78
+ redirectTo: redirectTo,
79
+ signupUrl: `${base}/signup`,
80
+ ...shared
81
+ });
82
+ }
83
+ }
@@ -1,30 +1,47 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import React from 'react';
4
- const Main12LogoSVG = ({ width = 28, height = 28 })=>/*#__PURE__*/ _jsxs("svg", {
5
- width: width,
6
- height: height,
7
- viewBox: "0 0 100 100",
8
- fill: "none",
4
+ // const Main12LogoSVG = ({ width = 28, height = 28 }: { width?: number; height?: number }) => (
5
+ // <svg width={width} height={height} viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg">
6
+ // <rect width="100" height="100" rx="20" fill="#D5E855" />
7
+ // <text x="50" y="68" textAnchor="middle" fontSize="52" fontWeight="700" fill="#1d1d1f" fontFamily="system-ui, sans-serif">12</text>
8
+ // </svg>
9
+ // )
10
+ const Main12LogoSVG = ({ width = 28, height = 28 })=>/*#__PURE__*/ _jsx("svg", {
11
+ viewBox: "0 0 7.938 7.937",
12
+ height: width,
13
+ width: height,
14
+ xmlSpace: "preserve",
9
15
  xmlns: "http://www.w3.org/2000/svg",
10
- children: [
11
- /*#__PURE__*/ _jsx("rect", {
12
- width: "100",
13
- height: "100",
14
- rx: "20",
15
- fill: "#D5E855"
16
- }),
17
- /*#__PURE__*/ _jsx("text", {
18
- x: "50",
19
- y: "68",
20
- textAnchor: "middle",
21
- fontSize: "52",
22
- fontWeight: "700",
23
- fill: "#1d1d1f",
24
- fontFamily: "system-ui, sans-serif",
25
- children: "12"
26
- })
27
- ]
16
+ children: /*#__PURE__*/ _jsxs("g", {
17
+ style: {
18
+ display: "inline"
19
+ },
20
+ children: [
21
+ /*#__PURE__*/ _jsx("path", {
22
+ d: "M671.165-649.8h-7.867v7.867",
23
+ style: {
24
+ fill: "#4e5357",
25
+ fillOpacity: 1,
26
+ fillRule: "nonzero",
27
+ stroke: "none",
28
+ strokeWidth: 0.0516193
29
+ },
30
+ transform: "translate(-330.646 331.775)scale(.50447)"
31
+ }),
32
+ /*#__PURE__*/ _jsx("path", {
33
+ d: "M655.431-649.8h7.867v-7.868",
34
+ style: {
35
+ fill: "#3e86b0",
36
+ fillOpacity: 1,
37
+ fillRule: "nonzero",
38
+ stroke: "none",
39
+ strokeWidth: 0.0516193
40
+ },
41
+ transform: "translate(-330.646 331.775)scale(.50447)"
42
+ })
43
+ ]
44
+ })
28
45
  });
29
46
  export const PoweredBy = ({ enabled = true, logoUrl, linkUrl = 'https://main12.com', width = 28, height = 28, className = '' })=>{
30
47
  if (!enabled) return null;
@@ -1,5 +1,5 @@
1
- import { type EmailColors, type SocialLink } from './constants.js';
2
- import { type SupportedLanguage } from './translations.js';
1
+ import { type EmailColors, type SocialLink } from './constants';
2
+ import { type SupportedLanguage } from './translations';
3
3
  export interface BaseTemplateOptions {
4
4
  logoUrl?: string;
5
5
  projectName?: string;
@@ -1,7 +1,7 @@
1
- export { wrapInBaseTemplate, type BaseTemplateOptions } from './baseTemplate.js';
2
- export { DEFAULT_COLORS, SOCIAL_ICONS, getBaseUrl, getSenderEmail, type EmailColors, type SocialLink, type SocialPlatform } from './constants.js';
3
- export { getEmailTranslations, type SupportedLanguage, type EmailTranslations } from './translations.js';
4
- export { generateOtpEmail, type OtpEmailParams, type OtpEmailResult } from './templates/otp.js';
5
- export { generateWelcomeEmail, type WelcomeEmailParams, type WelcomeEmailResult } from './templates/welcome.js';
6
- export { generatePasswordResetEmail, type PasswordResetEmailParams, type PasswordResetEmailResult } from './templates/passwordReset.js';
7
- export { generatePasswordChangedEmail, type PasswordChangedEmailParams, type PasswordChangedEmailResult } from './templates/passwordChanged.js';
1
+ export { wrapInBaseTemplate, type BaseTemplateOptions } from './baseTemplate';
2
+ export { DEFAULT_COLORS, SOCIAL_ICONS, getBaseUrl, getSenderEmail, type EmailColors, type SocialLink, type SocialPlatform } from './constants';
3
+ export { getEmailTranslations, type SupportedLanguage, type EmailTranslations } from './translations';
4
+ export { generateOtpEmail, type OtpEmailParams, type OtpEmailResult } from './templates/otp';
5
+ export { generateWelcomeEmail, type WelcomeEmailParams, type WelcomeEmailResult } from './templates/welcome';
6
+ export { generatePasswordResetEmail, type PasswordResetEmailParams, type PasswordResetEmailResult } from './templates/passwordReset';
7
+ export { generatePasswordChangedEmail, type PasswordChangedEmailParams, type PasswordChangedEmailResult } from './templates/passwordChanged';
@@ -1,6 +1,6 @@
1
- import { type SocialLink } from '../constants.js';
2
- import { type BaseTemplateOptions } from '../baseTemplate.js';
3
- import { type SupportedLanguage } from '../translations.js';
1
+ import { type SocialLink } from '../constants';
2
+ import { type BaseTemplateOptions } from '../baseTemplate';
3
+ import { type SupportedLanguage } from '../translations';
4
4
  export interface OtpEmailParams {
5
5
  userName: string;
6
6
  otp: string;
@@ -1,6 +1,6 @@
1
- import { type SocialLink } from '../constants.js';
2
- import { type BaseTemplateOptions } from '../baseTemplate.js';
3
- import { type SupportedLanguage } from '../translations.js';
1
+ import { type SocialLink } from '../constants';
2
+ import { type BaseTemplateOptions } from '../baseTemplate';
3
+ import { type SupportedLanguage } from '../translations';
4
4
  export interface PasswordChangedEmailParams {
5
5
  userName: string;
6
6
  loginUrl?: string;
@@ -1,6 +1,6 @@
1
- import { type SocialLink } from '../constants.js';
2
- import { type BaseTemplateOptions } from '../baseTemplate.js';
3
- import { type SupportedLanguage } from '../translations.js';
1
+ import { type SocialLink } from '../constants';
2
+ import { type BaseTemplateOptions } from '../baseTemplate';
3
+ import { type SupportedLanguage } from '../translations';
4
4
  export interface PasswordResetEmailParams {
5
5
  userName: string;
6
6
  otp: string;
@@ -1,6 +1,6 @@
1
- import { type SocialLink } from '../constants.js';
2
- import { type BaseTemplateOptions } from '../baseTemplate.js';
3
- import { type SupportedLanguage } from '../translations.js';
1
+ import { type SocialLink } from '../constants';
2
+ import { type BaseTemplateOptions } from '../baseTemplate';
3
+ import { type SupportedLanguage } from '../translations';
4
4
  export interface WelcomeEmailParams {
5
5
  userName: string;
6
6
  userEmail?: string;
@@ -1,4 +1,4 @@
1
- import type { AuthLayoutConfig } from '../AuthLayout.js';
1
+ import type { AuthLayoutConfig } from '../AuthLayout';
2
2
  export interface ForgotPasswordPageProps extends AuthLayoutConfig {
3
3
  loginUrl?: string;
4
4
  }
@@ -1,4 +1,4 @@
1
- import type { AuthLayoutConfig } from '../AuthLayout.js';
1
+ import type { AuthLayoutConfig } from '../AuthLayout';
2
2
  export interface ForgotPasswordPageHeroProps extends AuthLayoutConfig {
3
3
  loginUrl?: string;
4
4
  }
@@ -1,7 +1,7 @@
1
1
  'use client';
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
3
  import React from 'react';
4
- import { Button, Input } from '@heroui/react';
4
+ import { Button, Input, Label, TextField, Spinner } from '@heroui/react';
5
5
  import { Icon } from '@iconify/react';
6
6
  import { motion } from 'framer-motion';
7
7
  import { useForgotPasswordFlow } from '../../auth/application/hooks/useForgotPasswordFlow.js';
@@ -40,28 +40,37 @@ export default function ForgotPasswordPageHero({ loginUrl = '/login', logo, powe
40
40
  },
41
41
  children: error
42
42
  }),
43
- /*#__PURE__*/ _jsx(Input, {
43
+ /*#__PURE__*/ _jsxs(TextField, {
44
44
  type: "email",
45
- label: "Email",
46
45
  value: email,
47
- onChange: (e)=>setEmail(e.target.value),
48
- variant: "bordered",
49
- size: "lg",
46
+ onChange: setEmail,
50
47
  isRequired: true,
51
- classNames: {
52
- input: 'text-gray-900',
53
- label: 'text-gray-600',
54
- inputWrapper: 'border-gray-300 bg-white'
55
- }
48
+ fullWidth: true,
49
+ children: [
50
+ /*#__PURE__*/ _jsx(Label, {
51
+ className: "text-gray-600",
52
+ children: "Email"
53
+ }),
54
+ /*#__PURE__*/ _jsx(Input, {
55
+ className: "bg-white"
56
+ })
57
+ ]
56
58
  }),
57
59
  /*#__PURE__*/ _jsx(Button, {
58
60
  type: "submit",
59
61
  fullWidth: true,
60
62
  size: "lg",
61
- color: "primary",
62
- isLoading: isLoading,
63
+ isPending: isLoading,
63
64
  className: "h-12 font-semibold",
64
- children: "Send Reset Code"
65
+ children: ({ isPending })=>/*#__PURE__*/ _jsxs(_Fragment, {
66
+ children: [
67
+ isPending && /*#__PURE__*/ _jsx(Spinner, {
68
+ color: "current",
69
+ size: "sm"
70
+ }),
71
+ "Send Reset Code"
72
+ ]
73
+ })
65
74
  })
66
75
  ]
67
76
  })
@@ -1,4 +1,4 @@
1
- import type { AuthLayoutConfig } from '../AuthLayout.js';
1
+ import type { AuthLayoutConfig } from '../AuthLayout';
2
2
  export interface ForgotPasswordPageProps extends AuthLayoutConfig {
3
3
  loginUrl?: string;
4
4
  }
@@ -1,4 +1,4 @@
1
- import type { AuthLayoutConfig } from '../AuthLayout.js';
1
+ import type { AuthLayoutConfig } from '../AuthLayout';
2
2
  export interface LoginPageProps extends AuthLayoutConfig {
3
3
  onPasswordLogin: (credentials: {
4
4
  email: string;
@@ -1,4 +1,4 @@
1
- import type { AuthLayoutConfig } from '../AuthLayout.js';
1
+ import type { AuthLayoutConfig } from '../AuthLayout';
2
2
  export interface LoginPageHeroProps extends AuthLayoutConfig {
3
3
  onPasswordLogin: (credentials: {
4
4
  email: string;