@main12/auth-login 0.2.1 → 0.2.2

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 (44) 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/PoweredBy.js +40 -23
  8. package/dist/components/email/baseTemplate.d.ts +2 -2
  9. package/dist/components/email/index.d.ts +7 -7
  10. package/dist/components/email/templates/otp.d.ts +3 -3
  11. package/dist/components/email/templates/passwordChanged.d.ts +3 -3
  12. package/dist/components/email/templates/passwordReset.d.ts +3 -3
  13. package/dist/components/email/templates/welcome.d.ts +3 -3
  14. package/dist/components/pages/ForgotPasswordPage.d.ts +1 -1
  15. package/dist/components/pages/ForgotPasswordPageHero.d.ts +1 -1
  16. package/dist/components/pages/ForgotPasswordPageHero.js +24 -15
  17. package/dist/components/pages/ForgotPasswordPageTailwind.d.ts +1 -1
  18. package/dist/components/pages/LoginPage.d.ts +1 -1
  19. package/dist/components/pages/LoginPageHero.d.ts +1 -1
  20. package/dist/components/pages/LoginPageHero.js +81 -51
  21. package/dist/components/pages/LoginPageTailwind.d.ts +1 -1
  22. package/dist/components/pages/LoginPageTailwind.js +11 -20
  23. package/dist/components/pages/SetPasswordPage.d.ts +1 -1
  24. package/dist/components/pages/SetPasswordPageHero.d.ts +1 -1
  25. package/dist/components/pages/SetPasswordPageHero.js +50 -33
  26. package/dist/components/pages/SetPasswordPageTailwind.d.ts +1 -1
  27. package/dist/components/pages/SignupPage.d.ts +1 -1
  28. package/dist/components/pages/SignupPageHero.d.ts +1 -1
  29. package/dist/components/pages/SignupPageHero.js +46 -34
  30. package/dist/components/pages/SignupPageTailwind.d.ts +1 -1
  31. package/dist/components/pages/VerifyOtpPage.d.ts +1 -1
  32. package/dist/components/pages/VerifyOtpPageHero.d.ts +1 -1
  33. package/dist/components/pages/VerifyOtpPageHero.js +46 -10
  34. package/dist/components/pages/VerifyOtpPageTailwind.d.ts +1 -1
  35. package/dist/components/ui/index.d.ts +2 -1
  36. package/dist/components/ui/index.js +3 -2
  37. package/dist/config.d.ts +7 -0
  38. package/dist/config.js +5 -4
  39. package/dist/exports/client.d.ts +25 -24
  40. package/dist/exports/client.js +2 -0
  41. package/dist/exports/rsc.d.ts +6 -6
  42. package/dist/index.d.ts +2 -2
  43. package/dist/index.js +5 -1
  44. package/package.json +18 -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
  };
@@ -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;
@@ -2,7 +2,7 @@
2
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
3
  import React, { Suspense } from 'react';
4
4
  import { useSearchParams } from 'next/navigation';
5
- import { Button, Input, Divider, Spinner as HSpinner } from '@heroui/react';
5
+ import { Button, Input, Label, TextField, Separator, Spinner } from '@heroui/react';
6
6
  import { motion, AnimatePresence } from 'framer-motion';
7
7
  import { Icon } from '@iconify/react';
8
8
  import { useLoginFlow } from '../../auth/application/hooks/useLoginFlow.js';
@@ -57,29 +57,29 @@ function LoginHeroContent({ onPasswordLogin, redirectTo = '/', showGoogleOAuth =
57
57
  children: [
58
58
  showGoogleOAuth && /*#__PURE__*/ _jsxs(_Fragment, {
59
59
  children: [
60
- /*#__PURE__*/ _jsx(Button, {
60
+ /*#__PURE__*/ _jsxs(Button, {
61
61
  fullWidth: true,
62
- variant: "bordered",
63
- size: "lg",
64
- className: "mb-4 h-12 border-gray-300 rounded-full text-gray-700 hover:bg-gray-50",
65
- startContent: /*#__PURE__*/ _jsx(Icon, {
66
- icon: "flat-color-icons:google",
67
- width: 20
68
- }),
62
+ variant: "secondary",
69
63
  onPress: handleGoogleLogin,
70
- children: "Continue with Google"
64
+ children: [
65
+ /*#__PURE__*/ _jsx(Icon, {
66
+ icon: "flat-color-icons:google",
67
+ width: 20
68
+ }),
69
+ "Continue with Google"
70
+ ]
71
71
  }),
72
72
  /*#__PURE__*/ _jsxs("div", {
73
73
  className: "flex items-center gap-4 my-4",
74
74
  children: [
75
- /*#__PURE__*/ _jsx(Divider, {
75
+ /*#__PURE__*/ _jsx(Separator, {
76
76
  className: "flex-1"
77
77
  }),
78
78
  /*#__PURE__*/ _jsx("span", {
79
79
  className: "text-gray-500 text-sm",
80
80
  children: "or"
81
81
  }),
82
- /*#__PURE__*/ _jsx(Divider, {
82
+ /*#__PURE__*/ _jsx(Separator, {
83
83
  className: "flex-1"
84
84
  })
85
85
  ]
@@ -100,28 +100,36 @@ function LoginHeroContent({ onPasswordLogin, redirectTo = '/', showGoogleOAuth =
100
100
  },
101
101
  children: error
102
102
  }),
103
- /*#__PURE__*/ _jsx(Input, {
103
+ /*#__PURE__*/ _jsxs(TextField, {
104
104
  type: "email",
105
- label: "Email",
106
105
  value: email,
107
- onValueChange: setEmail,
108
- variant: "bordered",
109
- size: "lg",
106
+ onChange: setEmail,
110
107
  isRequired: true,
111
- classNames: {
112
- input: 'text-gray-900',
113
- label: 'text-gray-600',
114
- inputWrapper: 'border-gray-300 hover:border-gray-400 bg-white'
115
- }
108
+ fullWidth: true,
109
+ children: [
110
+ /*#__PURE__*/ _jsx(Label, {
111
+ className: "text-gray-600",
112
+ children: "Email"
113
+ }),
114
+ /*#__PURE__*/ _jsx(Input, {
115
+ variant: "secondary"
116
+ })
117
+ ]
116
118
  }),
117
119
  /*#__PURE__*/ _jsx(Button, {
118
120
  type: "submit",
119
121
  fullWidth: true,
120
122
  size: "lg",
121
- color: "primary",
122
- isLoading: isLoading,
123
- className: "h-12 font-semibold",
124
- children: "Continue"
123
+ isPending: isLoading,
124
+ children: ({ isPending })=>/*#__PURE__*/ _jsxs(_Fragment, {
125
+ children: [
126
+ isPending && /*#__PURE__*/ _jsx(Spinner, {
127
+ color: "current",
128
+ size: "sm"
129
+ }),
130
+ "Continue"
131
+ ]
132
+ })
125
133
  })
126
134
  ]
127
135
  })
@@ -173,29 +181,37 @@ function LoginHeroContent({ onPasswordLogin, redirectTo = '/', showGoogleOAuth =
173
181
  },
174
182
  children: error
175
183
  }),
176
- /*#__PURE__*/ _jsx(Input, {
184
+ /*#__PURE__*/ _jsxs(TextField, {
177
185
  type: showPassword ? 'text' : 'password',
178
- label: "Password",
179
186
  value: password,
180
- onValueChange: setPassword,
181
- variant: "bordered",
182
- size: "lg",
187
+ onChange: setPassword,
183
188
  isRequired: true,
184
189
  autoFocus: true,
185
- classNames: {
186
- input: 'text-gray-900',
187
- label: 'text-gray-600',
188
- inputWrapper: 'border-gray-300 hover:border-gray-400 bg-white'
189
- },
190
- endContent: /*#__PURE__*/ _jsx("button", {
191
- type: "button",
192
- onClick: ()=>setShowPassword(!showPassword),
193
- children: /*#__PURE__*/ _jsx(Icon, {
194
- icon: showPassword ? 'lucide:eye-off' : 'lucide:eye',
195
- className: "text-gray-400",
196
- width: 20
190
+ fullWidth: true,
191
+ children: [
192
+ /*#__PURE__*/ _jsx(Label, {
193
+ className: "text-gray-600",
194
+ children: "Password"
195
+ }),
196
+ /*#__PURE__*/ _jsxs("div", {
197
+ className: "relative",
198
+ children: [
199
+ /*#__PURE__*/ _jsx(Input, {
200
+ variant: "secondary"
201
+ }),
202
+ /*#__PURE__*/ _jsx("button", {
203
+ type: "button",
204
+ className: "absolute right-3 top-1/2 -translate-y-1/2",
205
+ onClick: ()=>setShowPassword(!showPassword),
206
+ children: /*#__PURE__*/ _jsx(Icon, {
207
+ icon: showPassword ? 'lucide:eye-off' : 'lucide:eye',
208
+ className: "text-gray-400",
209
+ width: 20
210
+ })
211
+ })
212
+ ]
197
213
  })
198
- })
214
+ ]
199
215
  }),
200
216
  /*#__PURE__*/ _jsx("div", {
201
217
  className: "text-left",
@@ -209,10 +225,17 @@ function LoginHeroContent({ onPasswordLogin, redirectTo = '/', showGoogleOAuth =
209
225
  type: "submit",
210
226
  fullWidth: true,
211
227
  size: "lg",
212
- color: "primary",
213
- isLoading: isLoading,
228
+ isPending: isLoading,
214
229
  className: "h-12 font-semibold",
215
- children: "Continue"
230
+ children: ({ isPending })=>/*#__PURE__*/ _jsxs(_Fragment, {
231
+ children: [
232
+ isPending && /*#__PURE__*/ _jsx(Spinner, {
233
+ color: "current",
234
+ size: "sm"
235
+ }),
236
+ "Continue"
237
+ ]
238
+ })
216
239
  })
217
240
  ]
218
241
  })
@@ -271,11 +294,18 @@ function LoginHeroContent({ onPasswordLogin, redirectTo = '/', showGoogleOAuth =
271
294
  /*#__PURE__*/ _jsx(Button, {
272
295
  fullWidth: true,
273
296
  size: "lg",
274
- color: "primary",
275
- isLoading: isSendingOtp,
297
+ isPending: isSendingOtp,
276
298
  onPress: handleSendOtp,
277
299
  className: "h-12 font-semibold",
278
- children: isSendingOtp ? 'Sending...' : 'Send Code'
300
+ children: ({ isPending })=>/*#__PURE__*/ _jsxs(_Fragment, {
301
+ children: [
302
+ isPending && /*#__PURE__*/ _jsx(Spinner, {
303
+ color: "current",
304
+ size: "sm"
305
+ }),
306
+ isPending ? 'Sending...' : 'Send Code'
307
+ ]
308
+ })
279
309
  })
280
310
  ]
281
311
  }, "otp-prompt")
@@ -287,7 +317,7 @@ export default function LoginPageHero(props) {
287
317
  return /*#__PURE__*/ _jsx(Suspense, {
288
318
  fallback: /*#__PURE__*/ _jsx("div", {
289
319
  className: "min-h-screen flex items-center justify-center",
290
- children: /*#__PURE__*/ _jsx(HSpinner, {
320
+ children: /*#__PURE__*/ _jsx(Spinner, {
291
321
  size: "lg"
292
322
  })
293
323
  }),
@@ -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;