@main12/auth-login 0.4.2 → 1.0.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.
Files changed (66) hide show
  1. package/README.md +54 -7
  2. package/dist/components/AuthCard.d.ts +41 -0
  3. package/dist/components/AuthCard.js +28 -0
  4. package/dist/components/AuthCardServer.d.ts +29 -0
  5. package/dist/components/AuthCardServer.js +57 -0
  6. package/dist/components/AuthLayout.d.ts +23 -13
  7. package/dist/components/AuthLayout.js +26 -87
  8. package/dist/components/AuthPages.d.ts +4 -29
  9. package/dist/components/AuthPages.js +23 -105
  10. package/dist/components/AuthPagesServer.d.ts +3 -4
  11. package/dist/components/AuthPagesServer.js +15 -8
  12. package/dist/components/auth-card/AuthCardShell.d.ts +21 -0
  13. package/dist/components/auth-card/AuthCardShell.js +104 -0
  14. package/dist/components/auth-card/FormRenderer.d.ts +32 -0
  15. package/dist/components/auth-card/FormRenderer.js +88 -0
  16. package/dist/components/auth-card/formConfigs.d.ts +25 -0
  17. package/dist/components/auth-card/formConfigs.js +56 -0
  18. package/dist/components/auth-card/index.d.ts +3 -0
  19. package/dist/components/auth-card/index.js +3 -0
  20. package/dist/components/forms/ForgotPasswordForm.d.ts +7 -0
  21. package/dist/components/forms/ForgotPasswordForm.js +56 -0
  22. package/dist/components/forms/LoginForm.d.ts +15 -0
  23. package/dist/components/forms/LoginForm.js +247 -0
  24. package/dist/components/forms/SetPasswordForm.d.ts +7 -0
  25. package/dist/components/forms/SetPasswordForm.js +75 -0
  26. package/dist/components/forms/SignupForm.d.ts +13 -0
  27. package/dist/components/forms/SignupForm.js +152 -0
  28. package/dist/components/forms/VerifyOtpForm.d.ts +9 -0
  29. package/dist/components/forms/VerifyOtpForm.js +107 -0
  30. package/dist/components/forms/index.d.ts +19 -0
  31. package/dist/components/forms/index.js +21 -0
  32. package/dist/components/pages/ForgotPasswordPage.d.ts +2 -1
  33. package/dist/components/pages/ForgotPasswordPageHero.d.ts +3 -2
  34. package/dist/components/pages/ForgotPasswordPageHero.js +70 -64
  35. package/dist/components/pages/ForgotPasswordPageTailwind.d.ts +3 -2
  36. package/dist/components/pages/ForgotPasswordPageTailwind.js +42 -36
  37. package/dist/components/pages/LoginPage.d.ts +2 -1
  38. package/dist/components/pages/LoginPageHero.d.ts +2 -1
  39. package/dist/components/pages/LoginPageHero.js +297 -291
  40. package/dist/components/pages/LoginPageTailwind.d.ts +2 -1
  41. package/dist/components/pages/LoginPageTailwind.js +197 -191
  42. package/dist/components/pages/SetPasswordPage.d.ts +2 -1
  43. package/dist/components/pages/SetPasswordPageHero.d.ts +3 -2
  44. package/dist/components/pages/SetPasswordPageHero.js +98 -92
  45. package/dist/components/pages/SetPasswordPageTailwind.d.ts +3 -2
  46. package/dist/components/pages/SetPasswordPageTailwind.js +63 -57
  47. package/dist/components/pages/SignupPage.d.ts +2 -1
  48. package/dist/components/pages/SignupPageHero.d.ts +3 -2
  49. package/dist/components/pages/SignupPageHero.js +139 -133
  50. package/dist/components/pages/SignupPageTailwind.d.ts +3 -2
  51. package/dist/components/pages/SignupPageTailwind.js +123 -117
  52. package/dist/components/pages/VerifyOtpPage.d.ts +2 -1
  53. package/dist/components/pages/VerifyOtpPageHero.d.ts +2 -1
  54. package/dist/components/pages/VerifyOtpPageHero.js +110 -104
  55. package/dist/components/pages/VerifyOtpPageTailwind.d.ts +2 -1
  56. package/dist/components/pages/VerifyOtpPageTailwind.js +60 -54
  57. package/dist/components/ui/translations.d.ts +9 -0
  58. package/dist/components/ui/translations.js +18 -0
  59. package/dist/config.d.ts +12 -0
  60. package/dist/config.js +11 -0
  61. package/dist/exports/client.d.ts +5 -0
  62. package/dist/exports/client.js +5 -0
  63. package/dist/exports/rsc.d.ts +7 -0
  64. package/dist/exports/rsc.js +8 -0
  65. package/dist/index.js +12 -2
  66. package/package.json +3 -2
@@ -7,8 +7,9 @@ import { motion, AnimatePresence } from 'framer-motion';
7
7
  import { Icon } from '@iconify/react';
8
8
  import { useLoginFlow } from '../../auth/application/hooks/useLoginFlow.js';
9
9
  import { AuthLayout } from '../AuthLayout.js';
10
+ import { AuthCard } from '../AuthCard.js';
10
11
  import { getUiTranslations } from '../ui/translations.js';
11
- function LoginHeroContent({ onPasswordLogin, redirectTo = '/', showGoogleOAuth = true, signupUrl = '/signup', logo, poweredBy, cardClassName, backgroundClass, locale, messages }) {
12
+ function LoginHeroContent({ onPasswordLogin, redirectTo = '/', showGoogleOAuth = true, signupUrl = '/signup', logo, poweredBy, cardClassName, removeBorder, removeShadow, mobileVariant, backgroundClass, locale, messages }) {
12
13
  const searchParams = useSearchParams();
13
14
  const resolvedRedirect = searchParams.get('redirect') || redirectTo;
14
15
  const t = getUiTranslations(locale, messages).login;
@@ -19,300 +20,305 @@ function LoginHeroContent({ onPasswordLogin, redirectTo = '/', showGoogleOAuth =
19
20
  const stepTitle = step === 'otp-prompt' ? t.otpPromptTitle : step === 'email' ? t.title : t.passwordStepTitle;
20
21
  const stepSubtitle = step === 'otp-prompt' ? t.otpPromptSubtitle : step === 'email' ? t.subtitle : t.passwordStepSubtitle;
21
22
  return /*#__PURE__*/ _jsx(AuthLayout, {
22
- logo: logo,
23
- title: stepTitle,
24
- subtitle: stepSubtitle,
25
- poweredBy: poweredBy,
26
- cardClassName: cardClassName,
27
23
  backgroundClass: backgroundClass,
28
- footer: signupUrl ? /*#__PURE__*/ _jsxs("p", {
29
- className: "text-center text-gray-600 text-sm",
30
- children: [
31
- t.noAccount,
32
- ' ',
33
- /*#__PURE__*/ _jsx("a", {
34
- href: signupUrl,
35
- className: "text-gray-900 font-medium hover:underline",
36
- children: t.signUpLink
37
- })
38
- ]
39
- }) : undefined,
40
- children: /*#__PURE__*/ _jsxs(AnimatePresence, {
41
- mode: "wait",
42
- children: [
43
- step === 'email' && /*#__PURE__*/ _jsxs(motion.div, {
44
- initial: {
45
- opacity: 0,
46
- x: -20
47
- },
48
- animate: {
49
- opacity: 1,
50
- x: 0
51
- },
52
- exit: {
53
- opacity: 0,
54
- x: 20
55
- },
56
- transition: {
57
- duration: 0.3
58
- },
59
- children: [
60
- showGoogleOAuth && /*#__PURE__*/ _jsxs(_Fragment, {
61
- children: [
62
- /*#__PURE__*/ _jsxs(Button, {
63
- fullWidth: true,
64
- variant: "secondary",
65
- onPress: handleGoogleLogin,
66
- className: "[--button-fg:var(--foreground)]",
67
- children: [
68
- /*#__PURE__*/ _jsx(Icon, {
69
- icon: "flat-color-icons:google",
70
- width: 20
71
- }),
72
- t.continueWithGoogle
73
- ]
74
- }),
75
- /*#__PURE__*/ _jsxs("div", {
76
- className: "flex items-center gap-4 my-4",
77
- children: [
78
- /*#__PURE__*/ _jsx(Separator, {
79
- className: "flex-1"
80
- }),
81
- /*#__PURE__*/ _jsx("span", {
82
- className: "text-gray-500 text-sm",
83
- children: t.or
84
- }),
85
- /*#__PURE__*/ _jsx(Separator, {
86
- className: "flex-1"
87
- })
88
- ]
89
- })
90
- ]
91
- }),
92
- /*#__PURE__*/ _jsxs("form", {
93
- onSubmit: handleEmailSubmit,
94
- className: "space-y-4",
95
- children: [
96
- error && /*#__PURE__*/ _jsx(motion.div, {
97
- className: "bg-red-50 text-red-600 border border-red-200 rounded-lg p-3 text-sm",
98
- initial: {
99
- opacity: 0
100
- },
101
- animate: {
102
- opacity: 1
103
- },
104
- children: error
105
- }),
106
- /*#__PURE__*/ _jsxs(TextField, {
107
- type: "email",
108
- value: email,
109
- onChange: setEmail,
110
- isRequired: true,
111
- fullWidth: true,
112
- children: [
113
- /*#__PURE__*/ _jsx(Label, {
114
- className: "text-gray-600",
115
- children: t.emailLabel
116
- }),
117
- /*#__PURE__*/ _jsx(Input, {
118
- variant: "secondary"
119
- })
120
- ]
121
- }),
122
- /*#__PURE__*/ _jsx(Button, {
123
- type: "submit",
124
- fullWidth: true,
125
- size: "lg",
126
- isPending: isLoading,
127
- children: ({ isPending })=>/*#__PURE__*/ _jsxs(_Fragment, {
128
- children: [
129
- isPending && /*#__PURE__*/ _jsx(Spinner, {
130
- color: "current",
131
- size: "sm"
132
- }),
133
- t.continue
134
- ]
135
- })
136
- })
137
- ]
138
- })
139
- ]
140
- }, "email"),
141
- step === 'password' && /*#__PURE__*/ _jsxs(motion.div, {
142
- initial: {
143
- opacity: 0,
144
- x: 20
145
- },
146
- animate: {
147
- opacity: 1,
148
- x: 0
149
- },
150
- exit: {
151
- opacity: 0,
152
- x: -20
153
- },
154
- transition: {
155
- duration: 0.3
156
- },
157
- children: [
158
- /*#__PURE__*/ _jsxs("div", {
159
- className: "flex items-center justify-between border border-gray-300 rounded-xl px-4 py-3 mb-4",
160
- children: [
161
- /*#__PURE__*/ _jsx("span", {
162
- className: "text-gray-900 text-sm",
163
- children: email
164
- }),
165
- /*#__PURE__*/ _jsx("button", {
166
- type: "button",
167
- onClick: handleEditEmail,
168
- className: "text-gray-600 text-sm font-medium hover:text-gray-900",
169
- children: t.edit
170
- })
171
- ]
172
- }),
173
- /*#__PURE__*/ _jsxs("form", {
174
- onSubmit: handlePasswordSubmit,
175
- className: "space-y-4",
176
- children: [
177
- error && /*#__PURE__*/ _jsx(motion.div, {
178
- className: "bg-red-50 text-red-600 border border-red-200 rounded-lg p-3 text-sm",
179
- initial: {
180
- opacity: 0
181
- },
182
- animate: {
183
- opacity: 1
184
- },
185
- children: error
186
- }),
187
- /*#__PURE__*/ _jsxs(TextField, {
188
- type: showPassword ? 'text' : 'password',
189
- value: password,
190
- onChange: setPassword,
191
- isRequired: true,
192
- autoFocus: true,
193
- fullWidth: true,
194
- children: [
195
- /*#__PURE__*/ _jsx(Label, {
196
- className: "text-gray-600",
197
- children: t.passwordLabel
198
- }),
199
- /*#__PURE__*/ _jsxs("div", {
200
- className: "relative",
201
- children: [
202
- /*#__PURE__*/ _jsx(Input, {
203
- variant: "secondary"
204
- }),
205
- /*#__PURE__*/ _jsx("button", {
206
- type: "button",
207
- className: "absolute right-3 top-1/2 -translate-y-1/2",
208
- onClick: ()=>setShowPassword(!showPassword),
209
- children: /*#__PURE__*/ _jsx(Icon, {
210
- icon: showPassword ? 'lucide:eye-off' : 'lucide:eye',
211
- className: "text-gray-400",
212
- width: 20
24
+ children: /*#__PURE__*/ _jsx(AuthCard, {
25
+ logo: logo,
26
+ title: stepTitle,
27
+ subtitle: stepSubtitle,
28
+ poweredBy: poweredBy,
29
+ cardClassName: cardClassName,
30
+ removeBorder: removeBorder,
31
+ removeShadow: removeShadow,
32
+ mobileVariant: mobileVariant,
33
+ footer: signupUrl ? /*#__PURE__*/ _jsxs("p", {
34
+ className: "text-center text-gray-600 text-sm",
35
+ children: [
36
+ t.noAccount,
37
+ ' ',
38
+ /*#__PURE__*/ _jsx("a", {
39
+ href: signupUrl,
40
+ className: "text-gray-900 font-medium hover:underline",
41
+ children: t.signUpLink
42
+ })
43
+ ]
44
+ }) : undefined,
45
+ children: /*#__PURE__*/ _jsxs(AnimatePresence, {
46
+ mode: "wait",
47
+ children: [
48
+ step === 'email' && /*#__PURE__*/ _jsxs(motion.div, {
49
+ initial: {
50
+ opacity: 0,
51
+ x: -20
52
+ },
53
+ animate: {
54
+ opacity: 1,
55
+ x: 0
56
+ },
57
+ exit: {
58
+ opacity: 0,
59
+ x: 20
60
+ },
61
+ transition: {
62
+ duration: 0.3
63
+ },
64
+ children: [
65
+ showGoogleOAuth && /*#__PURE__*/ _jsxs(_Fragment, {
66
+ children: [
67
+ /*#__PURE__*/ _jsxs(Button, {
68
+ fullWidth: true,
69
+ variant: "secondary",
70
+ onPress: handleGoogleLogin,
71
+ className: "[--button-fg:var(--foreground)]",
72
+ children: [
73
+ /*#__PURE__*/ _jsx(Icon, {
74
+ icon: "flat-color-icons:google",
75
+ width: 20
76
+ }),
77
+ t.continueWithGoogle
78
+ ]
79
+ }),
80
+ /*#__PURE__*/ _jsxs("div", {
81
+ className: "flex items-center gap-4 my-4",
82
+ children: [
83
+ /*#__PURE__*/ _jsx(Separator, {
84
+ className: "flex-1"
85
+ }),
86
+ /*#__PURE__*/ _jsx("span", {
87
+ className: "text-gray-500 text-sm",
88
+ children: t.or
89
+ }),
90
+ /*#__PURE__*/ _jsx(Separator, {
91
+ className: "flex-1"
92
+ })
93
+ ]
94
+ })
95
+ ]
96
+ }),
97
+ /*#__PURE__*/ _jsxs("form", {
98
+ onSubmit: handleEmailSubmit,
99
+ className: "space-y-4",
100
+ children: [
101
+ error && /*#__PURE__*/ _jsx(motion.div, {
102
+ className: "bg-red-50 text-red-600 border border-red-200 rounded-lg p-3 text-sm",
103
+ initial: {
104
+ opacity: 0
105
+ },
106
+ animate: {
107
+ opacity: 1
108
+ },
109
+ children: error
110
+ }),
111
+ /*#__PURE__*/ _jsxs(TextField, {
112
+ type: "email",
113
+ value: email,
114
+ onChange: setEmail,
115
+ isRequired: true,
116
+ fullWidth: true,
117
+ children: [
118
+ /*#__PURE__*/ _jsx(Label, {
119
+ className: "text-gray-600",
120
+ children: t.emailLabel
121
+ }),
122
+ /*#__PURE__*/ _jsx(Input, {
123
+ variant: "secondary"
124
+ })
125
+ ]
126
+ }),
127
+ /*#__PURE__*/ _jsx(Button, {
128
+ type: "submit",
129
+ fullWidth: true,
130
+ size: "lg",
131
+ isPending: isLoading,
132
+ children: ({ isPending })=>/*#__PURE__*/ _jsxs(_Fragment, {
133
+ children: [
134
+ isPending && /*#__PURE__*/ _jsx(Spinner, {
135
+ color: "current",
136
+ size: "sm"
137
+ }),
138
+ t.continue
139
+ ]
140
+ })
141
+ })
142
+ ]
143
+ })
144
+ ]
145
+ }, "email"),
146
+ step === 'password' && /*#__PURE__*/ _jsxs(motion.div, {
147
+ initial: {
148
+ opacity: 0,
149
+ x: 20
150
+ },
151
+ animate: {
152
+ opacity: 1,
153
+ x: 0
154
+ },
155
+ exit: {
156
+ opacity: 0,
157
+ x: -20
158
+ },
159
+ transition: {
160
+ duration: 0.3
161
+ },
162
+ children: [
163
+ /*#__PURE__*/ _jsxs("div", {
164
+ className: "flex items-center justify-between border border-gray-300 rounded-xl px-4 py-3 mb-4",
165
+ children: [
166
+ /*#__PURE__*/ _jsx("span", {
167
+ className: "text-gray-900 text-sm",
168
+ children: email
169
+ }),
170
+ /*#__PURE__*/ _jsx("button", {
171
+ type: "button",
172
+ onClick: handleEditEmail,
173
+ className: "text-gray-600 text-sm font-medium hover:text-gray-900",
174
+ children: t.edit
175
+ })
176
+ ]
177
+ }),
178
+ /*#__PURE__*/ _jsxs("form", {
179
+ onSubmit: handlePasswordSubmit,
180
+ className: "space-y-4",
181
+ children: [
182
+ error && /*#__PURE__*/ _jsx(motion.div, {
183
+ className: "bg-red-50 text-red-600 border border-red-200 rounded-lg p-3 text-sm",
184
+ initial: {
185
+ opacity: 0
186
+ },
187
+ animate: {
188
+ opacity: 1
189
+ },
190
+ children: error
191
+ }),
192
+ /*#__PURE__*/ _jsxs(TextField, {
193
+ type: showPassword ? 'text' : 'password',
194
+ value: password,
195
+ onChange: setPassword,
196
+ isRequired: true,
197
+ autoFocus: true,
198
+ fullWidth: true,
199
+ children: [
200
+ /*#__PURE__*/ _jsx(Label, {
201
+ className: "text-gray-600",
202
+ children: t.passwordLabel
203
+ }),
204
+ /*#__PURE__*/ _jsxs("div", {
205
+ className: "relative",
206
+ children: [
207
+ /*#__PURE__*/ _jsx(Input, {
208
+ variant: "secondary"
209
+ }),
210
+ /*#__PURE__*/ _jsx("button", {
211
+ type: "button",
212
+ className: "absolute right-3 top-1/2 -translate-y-1/2",
213
+ onClick: ()=>setShowPassword(!showPassword),
214
+ children: /*#__PURE__*/ _jsx(Icon, {
215
+ icon: showPassword ? 'lucide:eye-off' : 'lucide:eye',
216
+ className: "text-gray-400",
217
+ width: 20
218
+ })
213
219
  })
214
- })
215
- ]
220
+ ]
221
+ })
222
+ ]
223
+ }),
224
+ /*#__PURE__*/ _jsx("div", {
225
+ className: "text-left",
226
+ children: /*#__PURE__*/ _jsx("a", {
227
+ href: "/forgot-password",
228
+ className: "text-sm text-gray-700 hover:underline",
229
+ children: t.forgotPassword
216
230
  })
217
- ]
218
- }),
219
- /*#__PURE__*/ _jsx("div", {
220
- className: "text-left",
221
- children: /*#__PURE__*/ _jsx("a", {
222
- href: "/forgot-password",
223
- className: "text-sm text-gray-700 hover:underline",
224
- children: t.forgotPassword
231
+ }),
232
+ /*#__PURE__*/ _jsx(Button, {
233
+ type: "submit",
234
+ fullWidth: true,
235
+ size: "lg",
236
+ isPending: isLoading,
237
+ className: "h-12 font-semibold",
238
+ children: ({ isPending })=>/*#__PURE__*/ _jsxs(_Fragment, {
239
+ children: [
240
+ isPending && /*#__PURE__*/ _jsx(Spinner, {
241
+ color: "current",
242
+ size: "sm"
243
+ }),
244
+ t.continue
245
+ ]
246
+ })
225
247
  })
226
- }),
227
- /*#__PURE__*/ _jsx(Button, {
228
- type: "submit",
229
- fullWidth: true,
230
- size: "lg",
231
- isPending: isLoading,
232
- className: "h-12 font-semibold",
233
- children: ({ isPending })=>/*#__PURE__*/ _jsxs(_Fragment, {
234
- children: [
235
- isPending && /*#__PURE__*/ _jsx(Spinner, {
236
- color: "current",
237
- size: "sm"
238
- }),
239
- t.continue
240
- ]
241
- })
242
- })
243
- ]
244
- })
245
- ]
246
- }, "password"),
247
- step === 'otp-prompt' && /*#__PURE__*/ _jsxs(motion.div, {
248
- initial: {
249
- opacity: 0,
250
- x: 20
251
- },
252
- animate: {
253
- opacity: 1,
254
- x: 0
255
- },
256
- exit: {
257
- opacity: 0,
258
- x: -20
259
- },
260
- transition: {
261
- duration: 0.3
262
- },
263
- children: [
264
- /*#__PURE__*/ _jsxs("div", {
265
- className: "flex items-center justify-between border border-gray-300 rounded-xl px-4 py-3 mb-4",
266
- children: [
267
- /*#__PURE__*/ _jsx("span", {
268
- className: "text-gray-900 text-sm",
269
- children: email
270
- }),
271
- /*#__PURE__*/ _jsx("button", {
272
- type: "button",
273
- onClick: handleEditEmail,
274
- className: "text-gray-600 text-sm font-medium hover:text-gray-900",
275
- children: t.edit
276
- })
277
- ]
278
- }),
279
- error && /*#__PURE__*/ _jsx("div", {
280
- className: "bg-red-50 text-red-600 border border-red-200 rounded-lg p-3 text-sm mb-4",
281
- children: error
282
- }),
283
- /*#__PURE__*/ _jsxs("div", {
284
- className: "bg-blue-50 border border-blue-200 rounded-lg p-4 mb-4 flex gap-3",
285
- children: [
286
- /*#__PURE__*/ _jsx(Icon, {
287
- icon: "lucide:mail",
288
- className: "text-blue-500 mt-0.5",
289
- width: 20
290
- }),
291
- /*#__PURE__*/ _jsx("p", {
292
- className: "text-sm text-blue-700",
293
- children: t.verificationNotice
294
- })
295
- ]
296
- }),
297
- /*#__PURE__*/ _jsx(Button, {
298
- fullWidth: true,
299
- size: "lg",
300
- isPending: isSendingOtp,
301
- onPress: handleSendOtp,
302
- className: "h-12 font-semibold",
303
- children: ({ isPending })=>/*#__PURE__*/ _jsxs(_Fragment, {
304
- children: [
305
- isPending && /*#__PURE__*/ _jsx(Spinner, {
306
- color: "current",
307
- size: "sm"
308
- }),
309
- isPending ? t.sendingCode : t.sendCode
310
- ]
311
- })
312
- })
313
- ]
314
- }, "otp-prompt")
315
- ]
248
+ ]
249
+ })
250
+ ]
251
+ }, "password"),
252
+ step === 'otp-prompt' && /*#__PURE__*/ _jsxs(motion.div, {
253
+ initial: {
254
+ opacity: 0,
255
+ x: 20
256
+ },
257
+ animate: {
258
+ opacity: 1,
259
+ x: 0
260
+ },
261
+ exit: {
262
+ opacity: 0,
263
+ x: -20
264
+ },
265
+ transition: {
266
+ duration: 0.3
267
+ },
268
+ children: [
269
+ /*#__PURE__*/ _jsxs("div", {
270
+ className: "flex items-center justify-between border border-gray-300 rounded-xl px-4 py-3 mb-4",
271
+ children: [
272
+ /*#__PURE__*/ _jsx("span", {
273
+ className: "text-gray-900 text-sm",
274
+ children: email
275
+ }),
276
+ /*#__PURE__*/ _jsx("button", {
277
+ type: "button",
278
+ onClick: handleEditEmail,
279
+ className: "text-gray-600 text-sm font-medium hover:text-gray-900",
280
+ children: t.edit
281
+ })
282
+ ]
283
+ }),
284
+ error && /*#__PURE__*/ _jsx("div", {
285
+ className: "bg-red-50 text-red-600 border border-red-200 rounded-lg p-3 text-sm mb-4",
286
+ children: error
287
+ }),
288
+ /*#__PURE__*/ _jsxs("div", {
289
+ className: "bg-blue-50 border border-blue-200 rounded-lg p-4 mb-4 flex gap-3",
290
+ children: [
291
+ /*#__PURE__*/ _jsx(Icon, {
292
+ icon: "lucide:mail",
293
+ className: "text-blue-500 mt-0.5",
294
+ width: 20
295
+ }),
296
+ /*#__PURE__*/ _jsx("p", {
297
+ className: "text-sm text-blue-700",
298
+ children: t.verificationNotice
299
+ })
300
+ ]
301
+ }),
302
+ /*#__PURE__*/ _jsx(Button, {
303
+ fullWidth: true,
304
+ size: "lg",
305
+ isPending: isSendingOtp,
306
+ onPress: handleSendOtp,
307
+ className: "h-12 font-semibold",
308
+ children: ({ isPending })=>/*#__PURE__*/ _jsxs(_Fragment, {
309
+ children: [
310
+ isPending && /*#__PURE__*/ _jsx(Spinner, {
311
+ color: "current",
312
+ size: "sm"
313
+ }),
314
+ isPending ? t.sendingCode : t.sendCode
315
+ ]
316
+ })
317
+ })
318
+ ]
319
+ }, "otp-prompt")
320
+ ]
321
+ })
316
322
  })
317
323
  });
318
324
  }
@@ -1,5 +1,6 @@
1
1
  import type { AuthLayoutConfig } from '../AuthLayout';
2
- export interface LoginPageProps extends AuthLayoutConfig {
2
+ import type { AuthCardConfig } from '../AuthCard';
3
+ export interface LoginPageProps extends AuthLayoutConfig, AuthCardConfig {
3
4
  onPasswordLogin: (credentials: {
4
5
  email: string;
5
6
  password: string;