@insforge/react 0.6.9 → 0.6.10

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/forms.js CHANGED
@@ -1,13 +1,530 @@
1
+ import styled from '@emotion/styled';
2
+ import { keyframes as keyframes$1 } from '@emotion/react';
1
3
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
2
4
  import { AlertTriangle, EyeOff, Eye, Loader2, CircleCheck, Check } from 'lucide-react';
3
5
  import { createContext, useState, useEffect, useMemo, useCallback, useContext, useRef } from 'react';
4
6
  import '@insforge/sdk';
5
7
  import { InsforgeContext } from '@insforge/shared/react';
8
+ import '@emotion/cache';
6
9
 
7
- // src/components/atoms/AuthBranding.tsx
10
+ // src/components/atoms/styled.ts
11
+
12
+ // src/styles/theme.ts
13
+ var theme = {
14
+ colors: {
15
+ primary: "#000000",
16
+ primaryHover: "#1f1f1f",
17
+ text: "#000000",
18
+ textSecondary: "#828282",
19
+ textMuted: "#a3a3a3",
20
+ textGray: "#525252",
21
+ border: "#d4d4d4",
22
+ borderGray: "#e4e4e7",
23
+ borderHover: "#9ca3af",
24
+ borderFocus: "#000000",
25
+ bgWhite: "#ffffff",
26
+ bgLight: "#fafafa",
27
+ bgGray: "#f5f5f5",
28
+ bgHover: "#f9fafb",
29
+ error: "#dc2626",
30
+ errorBg: "#fee2e2",
31
+ successBg: "#d1fae5",
32
+ successDark: "#059669",
33
+ black: "#000000",
34
+ zinc900: "#09090b"
35
+ },
36
+ spacing: {
37
+ 1: "0.25rem",
38
+ // 4px
39
+ 2: "0.5rem",
40
+ // 8px
41
+ 3: "0.75rem",
42
+ // 12px
43
+ 4: "1rem",
44
+ // 16px
45
+ 6: "1.5rem",
46
+ // 32px
47
+ 10: "2.5rem"
48
+ // 40px
49
+ },
50
+ radius: {
51
+ // 2px
52
+ sm: "0.25rem",
53
+ // 4px
54
+ md: "0.375rem",
55
+ // 6px
56
+ lg: "0.5rem",
57
+ // 8px
58
+ xl: "0.75rem",
59
+ // 12px
60
+ full: "9999px"
61
+ },
62
+ fontSize: {
63
+ xs: "0.75rem",
64
+ // 12px
65
+ sm: "0.875rem",
66
+ // 14px
67
+ base: "1rem",
68
+ // 20px
69
+ "2xl": "1.5rem"
70
+ // 24px
71
+ },
72
+ lineHeight: {
73
+ // 16px
74
+ normal: "1.25rem",
75
+ // 20px
76
+ relaxed: "1.5rem",
77
+ // 24px
78
+ loose: "2rem"
79
+ // 32px
80
+ },
81
+ fontFamily: {
82
+ base: "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif",
83
+ manrope: "'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif"
84
+ },
85
+ fontWeight: {
86
+ normal: 400,
87
+ medium: 500,
88
+ semibold: 600
89
+ },
90
+ shadow: {
91
+ md: "0 1px 2px 0 rgba(0, 0, 0, 0.1)",
92
+ lg: "0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)"
93
+ },
94
+ transition: {
95
+ fast: "150ms cubic-bezier(0.4, 0, 0.2, 1)",
96
+ base: "200ms cubic-bezier(0.4, 0, 0.2, 1)"
97
+ },
98
+ sizes: {
99
+ button: {
100
+ height: "2.5rem",
101
+ // 40px for submit
102
+ heightOAuth: "2.25rem"
103
+ // 36px for OAuth
104
+ },
105
+ // 32px
106
+ icon: "1.25rem",
107
+ // 20px
108
+ iconSm: "1.125rem",
109
+ // 18px
110
+ iconLg: "1.5rem",
111
+ // 24px
112
+ verifyCode: "3rem",
113
+ // 48px
114
+ verifyIcon: "4rem",
115
+ // 64px
116
+ verifyIconInner: "2rem"
117
+ // 32px
118
+ }
119
+ };
120
+ var keyframes = {
121
+ spin: `
122
+ from {
123
+ transform: rotate(0deg);
124
+ }
125
+ to {
126
+ transform: rotate(360deg);
127
+ }
128
+ `
129
+ };
130
+
131
+ // src/components/atoms/styled.ts
132
+ var spinAnimation = keyframes$1`${keyframes.spin}`;
133
+ var AuthContainerWrapper = styled.div`
134
+ width: 100%;
135
+ max-width: 400px;
136
+ border-radius: ${theme.radius.xl};
137
+ overflow: hidden;
138
+ box-shadow: ${theme.shadow.lg};
139
+ `;
140
+ var AuthCard = styled.div`
141
+ background-color: ${theme.colors.bgWhite};
142
+ padding: ${theme.spacing[6]};
143
+ display: flex;
144
+ flex-direction: column;
145
+ justify-content: center;
146
+ align-items: stretch;
147
+ gap: ${theme.spacing[6]};
148
+ `;
149
+ var AuthHeaderWrapper = styled.div`
150
+ display: flex;
151
+ flex-direction: column;
152
+ justify-content: flex-start;
153
+ align-items: flex-start;
154
+ gap: ${theme.spacing[2]};
155
+ `;
156
+ var AuthHeaderTitle = styled.h1`
157
+ font-size: ${theme.fontSize["2xl"]};
158
+ font-weight: ${theme.fontWeight.semibold};
159
+ color: ${theme.colors.text};
160
+ line-height: ${theme.lineHeight.loose};
161
+ margin: 0;
162
+ font-family: ${theme.fontFamily.base};
163
+ `;
164
+ var AuthHeaderSubtitle = styled.p`
165
+ font-size: ${theme.fontSize.sm};
166
+ font-weight: ${theme.fontWeight.normal};
167
+ color: ${theme.colors.textSecondary};
168
+ line-height: ${theme.lineHeight.relaxed};
169
+ margin: 0;
170
+ font-family: ${theme.fontFamily.base};
171
+ `;
172
+ var FormFieldWrapper = styled.div`
173
+ display: flex;
174
+ flex-direction: column;
175
+ justify-content: center;
176
+ align-items: stretch;
177
+ gap: ${theme.spacing[1]};
178
+ `;
179
+ var FormFieldLabel = styled.label`
180
+ font-size: ${theme.fontSize.sm};
181
+ font-weight: ${theme.fontWeight.normal};
182
+ color: ${theme.colors.text};
183
+ line-height: ${theme.lineHeight.relaxed};
184
+ font-family: ${theme.fontFamily.base};
185
+ `;
186
+ var FormFieldInput = styled.input`
187
+ width: 100%;
188
+ display: flex;
189
+ align-items: center;
190
+ gap: ${theme.spacing[2]};
191
+ align-self: stretch;
192
+ padding: ${theme.spacing[2]} ${theme.spacing[3]};
193
+ border-radius: ${theme.radius.sm};
194
+ border: 1px solid ${theme.colors.border};
195
+ background-color: ${theme.colors.bgWhite};
196
+ font-size: ${theme.fontSize.sm};
197
+ font-weight: ${theme.fontWeight.normal};
198
+ line-height: ${theme.lineHeight.normal};
199
+ color: ${theme.colors.text};
200
+ font-family: ${theme.fontFamily.base};
201
+ transition: border-color ${theme.transition.base};
202
+
203
+ &::placeholder {
204
+ color: ${theme.colors.textMuted};
205
+ font-size: ${theme.fontSize.sm};
206
+ font-weight: ${theme.fontWeight.normal};
207
+ }
208
+
209
+ &:focus {
210
+ outline: none;
211
+ border-color: ${theme.colors.borderFocus};
212
+ }
213
+ `;
214
+ var PasswordFieldWrapper = styled.div`
215
+ display: flex;
216
+ flex-direction: column;
217
+ justify-content: center;
218
+ align-items: stretch;
219
+ gap: ${theme.spacing[1]};
220
+ `;
221
+ var PasswordFieldLabelRow = styled.div`
222
+ display: flex;
223
+ justify-content: space-between;
224
+ align-items: center;
225
+ `;
226
+ var PasswordFieldLabel = styled.label`
227
+ font-size: ${theme.fontSize.sm};
228
+ font-weight: ${theme.fontWeight.normal};
229
+ color: ${theme.colors.text};
230
+ line-height: ${theme.lineHeight.relaxed};
231
+ font-family: ${theme.fontFamily.base};
232
+ `;
233
+ var PasswordFieldForgotLink = styled.a`
234
+ font-size: ${theme.fontSize.sm};
235
+ font-weight: ${theme.fontWeight.normal};
236
+ color: ${theme.colors.textSecondary};
237
+ text-decoration: none;
238
+ transition: color ${theme.transition.fast};
239
+ font-family: ${theme.fontFamily.base};
240
+ cursor: pointer;
241
+ `;
242
+ var PasswordFieldInputWrapper = styled.div`
243
+ position: relative;
244
+ width: 100%;
245
+ `;
246
+ var PasswordFieldInput = styled.input`
247
+ width: 100%;
248
+ display: flex;
249
+ align-items: center;
250
+ align-self: stretch;
251
+ padding: ${theme.spacing[2]} ${theme.spacing[3]};
252
+ padding-right: 2.5rem;
253
+ border-radius: ${theme.radius.sm};
254
+ border: 1px solid ${theme.colors.border};
255
+ background-color: ${theme.colors.bgWhite};
256
+ font-size: ${theme.fontSize.sm};
257
+ font-weight: ${theme.fontWeight.normal};
258
+ line-height: ${theme.lineHeight.normal};
259
+ color: ${theme.colors.text};
260
+ font-family: ${theme.fontFamily.base};
261
+ transition: border-color ${theme.transition.base};
262
+
263
+ &::placeholder {
264
+ color: ${theme.colors.textMuted};
265
+ }
266
+
267
+ &:focus {
268
+ outline: none;
269
+ border-color: ${theme.colors.borderFocus};
270
+ }
271
+ `;
272
+ var PasswordFieldToggleButton = styled.button`
273
+ position: absolute;
274
+ right: ${theme.spacing[1]};
275
+ top: 50%;
276
+ transform: translateY(-50%);
277
+ background: none;
278
+ border: none;
279
+ cursor: pointer;
280
+ padding: ${theme.spacing[1]};
281
+ display: flex;
282
+ align-items: center;
283
+ justify-content: center;
284
+ color: ${theme.colors.textSecondary};
285
+ transition: color ${theme.transition.fast};
286
+ `;
287
+ var SubmitButton = styled.button`
288
+ border-radius: ${theme.radius.sm};
289
+ background-color: ${theme.colors.primary};
290
+ height: ${theme.sizes.button.height};
291
+ width: 100%;
292
+ display: flex;
293
+ margin-top: ${theme.spacing[4]};
294
+ padding: ${theme.spacing[2]} ${theme.spacing[4]};
295
+ justify-content: center;
296
+ align-items: center;
297
+ gap: 0.625rem;
298
+ align-self: stretch;
299
+ color: ${theme.colors.bgWhite};
300
+ font-weight: ${theme.fontWeight.semibold};
301
+ font-family: ${theme.fontFamily.manrope};
302
+ font-size: ${theme.fontSize.base};
303
+ line-height: normal;
304
+ border: none;
305
+ cursor: pointer;
306
+ transition: background-color ${theme.transition.base};
307
+
308
+ &:hover:not(:disabled) {
309
+ background-color: ${theme.colors.primaryHover};
310
+ }
311
+
312
+ &:disabled {
313
+ opacity: 0.5;
314
+ cursor: not-allowed;
315
+ }
316
+ `;
317
+ var SubmitButtonIcon = styled.div`
318
+ width: ${theme.sizes.icon};
319
+ height: ${theme.sizes.icon};
320
+ display: flex;
321
+ align-items: center;
322
+ justify-content: center;
323
+
324
+ svg {
325
+ width: 100%;
326
+ height: 100%;
327
+ }
328
+ `;
329
+ var SubmitButtonSpinner = styled.div`
330
+ width: ${theme.sizes.icon};
331
+ height: ${theme.sizes.icon};
332
+ display: flex;
333
+ align-items: center;
334
+ justify-content: center;
335
+ animation: ${spinAnimation} 1s linear infinite;
336
+
337
+ svg {
338
+ width: 100%;
339
+ height: 100%;
340
+ }
341
+ `;
342
+ var OAuthButton = styled.button`
343
+ display: flex;
344
+ width: 100%;
345
+ height: ${theme.sizes.button.heightOAuth};
346
+ padding: ${(props) => props.$variant === "short" || props.$variant === "iconOnly" ? theme.spacing[2] : `${theme.spacing[2]} ${theme.spacing[3]}`};
347
+ flex-direction: row;
348
+ justify-content: center;
349
+ align-items: center;
350
+ gap: ${(props) => props.$variant === "iconOnly" ? "0" : props.$variant === "short" ? theme.spacing[2] : theme.spacing[3]};
351
+ border-radius: ${theme.radius.md};
352
+ border: 1px solid ${theme.colors.borderGray};
353
+ background-color: ${theme.colors.bgWhite};
354
+ box-shadow: ${theme.shadow.md};
355
+ color: ${theme.colors.zinc900};
356
+ text-align: center;
357
+ font-size: ${theme.fontSize.sm};
358
+ font-weight: ${theme.fontWeight.medium};
359
+ line-height: ${theme.lineHeight.normal};
360
+ cursor: pointer;
361
+ transition: all ${theme.transition.base};
362
+ font-family: ${theme.fontFamily.base};
363
+
364
+ &:hover:not(:disabled) {
365
+ background-color: ${theme.colors.bgHover};
366
+ border-color: ${theme.colors.borderHover};
367
+ }
368
+
369
+ &:disabled {
370
+ opacity: 0.6;
371
+ cursor: not-allowed;
372
+ }
373
+ `;
374
+ var OAuthButtonIcon = styled.div`
375
+ display: flex;
376
+ align-items: center;
377
+ justify-content: center;
378
+ flex-shrink: 0;
379
+ width: ${theme.sizes.iconSm};
380
+ height: ${theme.sizes.iconSm};
381
+
382
+ svg {
383
+ width: 100%;
384
+ height: 100%;
385
+ }
386
+ `;
387
+ var OAuthProvidersContainer = styled.div`
388
+ display: flex;
389
+ flex-direction: column;
390
+ gap: ${theme.spacing[3]};
391
+ width: 100%;
392
+ `;
393
+ var AuthLinkWrapper = styled.div`
394
+ display: flex;
395
+ justify-content: center;
396
+ align-items: center;
397
+ gap: ${theme.spacing[1]};
398
+ font-size: ${theme.fontSize.sm};
399
+ color: ${theme.colors.textSecondary};
400
+ font-family: ${theme.fontFamily.base};
401
+ `;
402
+ var AuthLinkText = styled.span`
403
+ font-weight: ${theme.fontWeight.normal};
404
+ `;
405
+ var AuthLinkLink = styled.a`
406
+ font-weight: ${theme.fontWeight.semibold};
407
+ color: ${theme.colors.text};
408
+ text-decoration: none;
409
+ transition: opacity ${theme.transition.fast};
410
+ cursor: pointer;
411
+ `;
412
+ var AuthDividerWrapper = styled.div`
413
+ display: flex;
414
+ align-items: center;
415
+ text-align: center;
416
+ width: 100%;
417
+ gap: ${theme.spacing[3]};
418
+ `;
419
+ var AuthDividerLine = styled.div`
420
+ flex: 1;
421
+ border-top: 1px solid ${theme.colors.border};
422
+ `;
423
+ var AuthDividerText = styled.span`
424
+ font-size: ${theme.fontSize.sm};
425
+ color: ${theme.colors.textSecondary};
426
+ font-weight: ${theme.fontWeight.normal};
427
+ font-family: ${theme.fontFamily.manrope};
428
+ `;
429
+ var ErrorBannerWrapper = styled.div`
430
+ padding: ${theme.spacing[3]};
431
+ background-color: ${theme.colors.errorBg};
432
+ border-radius: ${theme.radius.md};
433
+ border: 1px solid ${theme.colors.error};
434
+ `;
435
+ var ErrorBannerContent = styled.div`
436
+ display: flex;
437
+ align-items: center;
438
+ gap: ${theme.spacing[2]};
439
+ `;
440
+ var ErrorBannerIcon = styled.div`
441
+ width: ${theme.sizes.iconLg};
442
+ height: ${theme.sizes.iconLg};
443
+ flex-shrink: 0;
444
+ color: ${theme.colors.error};
445
+ display: flex;
446
+ align-items: center;
447
+ justify-content: center;
448
+
449
+ svg {
450
+ width: 100%;
451
+ height: 100%;
452
+ }
453
+ `;
454
+ var ErrorBannerText = styled.p`
455
+ font-size: ${theme.fontSize.sm};
456
+ color: ${theme.colors.error};
457
+ font-weight: ${theme.fontWeight.normal};
458
+ font-family: ${theme.fontFamily.base};
459
+ margin: 0;
460
+ `;
461
+ var AuthBrandingWrapper = styled.div`
462
+ background-color: ${theme.colors.bgLight};
463
+ padding: ${theme.spacing[4]} ${theme.spacing[2]};
464
+ display: flex;
465
+ flex-direction: row;
466
+ justify-content: center;
467
+ align-items: center;
468
+ gap: ${theme.spacing[1]};
469
+ `;
470
+ var AuthBrandingText = styled.p`
471
+ font-size: ${theme.fontSize.xs};
472
+ font-weight: ${theme.fontWeight.medium};
473
+ color: ${theme.colors.text};
474
+ font-family: ${theme.fontFamily.manrope};
475
+ margin: 0;
476
+ `;
477
+ var VerificationCodeInputContainer = styled.div`
478
+ display: flex;
479
+ gap: ${theme.spacing[3]};
480
+ justify-content: center;
481
+ `;
482
+ var VerificationCodeInput = styled.input`
483
+ width: ${theme.sizes.verifyCode};
484
+ height: ${theme.sizes.verifyCode};
485
+ text-align: center;
486
+ font-size: ${theme.fontSize.base};
487
+ font-weight: ${theme.fontWeight.semibold};
488
+ border: 1px solid ${theme.colors.border};
489
+ border-radius: ${theme.radius.sm};
490
+ transition: border-color ${theme.transition.base};
491
+ font-family: ${theme.fontFamily.manrope};
492
+
493
+ &:focus {
494
+ outline: none;
495
+ border-color: ${theme.colors.borderFocus};
496
+ }
497
+ `;
498
+ var PasswordStrengthWrapper = styled.div`
499
+ margin-top: ${theme.spacing[2]};
500
+ `;
501
+ styled.div`
502
+ height: 100%;
503
+ transition:
504
+ width ${theme.transition.base},
505
+ background-color ${theme.transition.base};
506
+ `;
507
+ styled.span`
508
+ font-size: ${theme.fontSize.xs};
509
+ color: ${theme.colors.textSecondary};
510
+ font-family: ${theme.fontFamily.base};
511
+ `;
512
+ var PasswordStrengthRequirements = styled.div`
513
+ display: flex;
514
+ flex-direction: column;
515
+ gap: ${theme.spacing[2]};
516
+ font-size: ${theme.fontSize.sm};
517
+ color: ${theme.colors.textGray};
518
+ font-family: ${theme.fontFamily.base};
519
+ `;
520
+ var PasswordStrengthRequirement = styled.div`
521
+ display: flex;
522
+ align-items: center;
523
+ gap: ${theme.spacing[2]};
524
+ `;
8
525
  function AuthBranding() {
9
- return /* @__PURE__ */ jsxs("div", { className: "if-authBranding if-internal-ab4k9w", children: [
10
- /* @__PURE__ */ jsx("p", { className: "if-authBranding-text", children: "Secured by" }),
526
+ return /* @__PURE__ */ jsxs(AuthBrandingWrapper, { children: [
527
+ /* @__PURE__ */ jsx(AuthBrandingText, { children: "Secured by" }),
11
528
  /* @__PURE__ */ jsx("a", { href: "https://insforge.dev", target: "_blank", rel: "noopener noreferrer", children: /* @__PURE__ */ jsxs(
12
529
  "svg",
13
530
  {
@@ -76,30 +593,30 @@ function AuthBranding() {
76
593
  ] });
77
594
  }
78
595
  function AuthContainer({ children }) {
79
- return /* @__PURE__ */ jsxs("div", { className: "if-authContainer if-internal-a8f3d2", children: [
80
- /* @__PURE__ */ jsx("div", { className: "if-authCard if-internal-b2k9x1", children }),
596
+ return /* @__PURE__ */ jsxs(AuthContainerWrapper, { children: [
597
+ /* @__PURE__ */ jsx(AuthCard, { children }),
81
598
  /* @__PURE__ */ jsx(AuthBranding, {})
82
599
  ] });
83
600
  }
84
601
  function AuthHeader({ title, subtitle }) {
85
- return /* @__PURE__ */ jsxs("div", { className: "if-authHeader if-internal-h3m7w5", children: [
86
- /* @__PURE__ */ jsx("h1", { className: "if-authHeader-title if-internal-t4p1k9", children: title }),
87
- subtitle && /* @__PURE__ */ jsx("p", { className: "if-authHeader-subtitle if-internal-s7q2m3", children: subtitle })
602
+ return /* @__PURE__ */ jsxs(AuthHeaderWrapper, { children: [
603
+ /* @__PURE__ */ jsx(AuthHeaderTitle, { children: title }),
604
+ subtitle && /* @__PURE__ */ jsx(AuthHeaderSubtitle, { children: subtitle })
88
605
  ] });
89
606
  }
90
607
  function AuthErrorBanner({ error }) {
91
608
  if (!error) {
92
609
  return null;
93
610
  }
94
- return /* @__PURE__ */ jsx("div", { className: "if-errorBanner if-internal-eb2m7k", children: /* @__PURE__ */ jsxs("div", { className: "if-errorBanner-content", children: [
95
- /* @__PURE__ */ jsx(AlertTriangle, { className: "if-errorBanner-icon" }),
96
- /* @__PURE__ */ jsx("span", { className: "if-errorBanner-text", children: error })
611
+ return /* @__PURE__ */ jsx(ErrorBannerWrapper, { children: /* @__PURE__ */ jsxs(ErrorBannerContent, { children: [
612
+ /* @__PURE__ */ jsx(ErrorBannerIcon, { children: /* @__PURE__ */ jsx(AlertTriangle, {}) }),
613
+ /* @__PURE__ */ jsx(ErrorBannerText, { children: error })
97
614
  ] }) });
98
615
  }
99
616
  function AuthFormField({ label, id, ...props }) {
100
- return /* @__PURE__ */ jsxs("div", { className: "if-formField if-internal-f9n6p2", children: [
101
- /* @__PURE__ */ jsx("label", { htmlFor: id, className: "if-formField-label if-internal-l3k8m1", children: label }),
102
- /* @__PURE__ */ jsx("input", { id, className: "if-formField-input if-internal-i2v8k4", ...props })
617
+ return /* @__PURE__ */ jsxs(FormFieldWrapper, { children: [
618
+ /* @__PURE__ */ jsx(FormFieldLabel, { htmlFor: id, children: label }),
619
+ /* @__PURE__ */ jsx(FormFieldInput, { id, ...props })
103
620
  ] });
104
621
  }
105
622
  var NavigationContext = createContext(null);
@@ -124,7 +641,7 @@ function AuthPasswordStrengthIndicator({
124
641
  config
125
642
  }) {
126
643
  const requirements = createRequirements(config);
127
- return /* @__PURE__ */ jsx("div", { className: "if-passwordStrength if-internal-ps6w3k", children: /* @__PURE__ */ jsx("div", { className: "if-passwordStrength-requirements", children: requirements.map((req) => /* @__PURE__ */ jsxs("div", { className: "if-passwordStrength-requirement", children: [
644
+ return /* @__PURE__ */ jsx(PasswordStrengthWrapper, { children: /* @__PURE__ */ jsx(PasswordStrengthRequirements, { children: requirements.map((req) => /* @__PURE__ */ jsxs(PasswordStrengthRequirement, { children: [
128
645
  /* @__PURE__ */ jsx(
129
646
  "div",
130
647
  {
@@ -226,29 +743,27 @@ function AuthPasswordField({
226
743
  }
227
744
  onFocus?.(e);
228
745
  };
229
- return /* @__PURE__ */ jsxs("div", { className: "if-passwordField if-internal-p5w9m7", children: [
230
- (label || forgotPasswordLink) && /* @__PURE__ */ jsxs("div", { className: "if-passwordField-labelRow", children: [
231
- /* @__PURE__ */ jsx("label", { htmlFor: id, className: "if-passwordField-label", children: label }),
232
- forgotPasswordLink && resolvedForgotPasswordHref && /* @__PURE__ */ jsx(Link, { href: resolvedForgotPasswordHref, className: "if-passwordField-forgotLink", children: forgotPasswordLink.text || "Forget Password?" })
746
+ return /* @__PURE__ */ jsxs(PasswordFieldWrapper, { children: [
747
+ (label || forgotPasswordLink) && /* @__PURE__ */ jsxs(PasswordFieldLabelRow, { children: [
748
+ /* @__PURE__ */ jsx(PasswordFieldLabel, { htmlFor: id, children: label }),
749
+ forgotPasswordLink && resolvedForgotPasswordHref && /* @__PURE__ */ jsx(Link, { href: resolvedForgotPasswordHref, className: "", children: /* @__PURE__ */ jsx(PasswordFieldForgotLink, { as: "span", children: forgotPasswordLink.text || "Forget Password?" }) })
233
750
  ] }),
234
- /* @__PURE__ */ jsxs("div", { className: "if-passwordField-inputWrapper", children: [
751
+ /* @__PURE__ */ jsxs(PasswordFieldInputWrapper, { children: [
235
752
  /* @__PURE__ */ jsx(
236
- "input",
753
+ PasswordFieldInput,
237
754
  {
238
755
  id,
239
756
  type: showPassword ? "text" : "password",
240
- className: "if-passwordField-input",
241
757
  value,
242
758
  onFocus: handleFocus,
243
759
  ...props
244
760
  }
245
761
  ),
246
762
  /* @__PURE__ */ jsx(
247
- "button",
763
+ PasswordFieldToggleButton,
248
764
  {
249
765
  type: "button",
250
766
  onClick: () => setShowPassword(!showPassword),
251
- className: "if-passwordField-toggleButton",
252
767
  "aria-label": showPassword ? "Hide password" : "Show password",
253
768
  children: showPassword ? /* @__PURE__ */ jsx(EyeOff, { size: 20 }) : /* @__PURE__ */ jsx(Eye, { size: 20 })
254
769
  }
@@ -265,36 +780,27 @@ function AuthSubmitButton({
265
780
  type = "submit",
266
781
  onClick
267
782
  }) {
268
- return /* @__PURE__ */ jsxs(
269
- "button",
270
- {
271
- type,
272
- className: "if-submitButton if-internal-b8p3m4",
273
- disabled: disabled || isLoading || confirmed,
274
- onClick,
275
- children: [
276
- isLoading && /* @__PURE__ */ jsx(Loader2, { className: "if-submitButton-icon if-submitButton-spinner", size: 20 }),
277
- confirmed && /* @__PURE__ */ jsx(CircleCheck, { className: "if-submitButton-icon", size: 20 }),
278
- children
279
- ]
280
- }
281
- );
783
+ return /* @__PURE__ */ jsxs(SubmitButton, { type, disabled: disabled || isLoading || confirmed, onClick, children: [
784
+ isLoading && /* @__PURE__ */ jsx(SubmitButtonSpinner, { children: /* @__PURE__ */ jsx(Loader2, { size: 20 }) }),
785
+ confirmed && /* @__PURE__ */ jsx(SubmitButtonIcon, { children: /* @__PURE__ */ jsx(CircleCheck, { size: 20 }) }),
786
+ children
787
+ ] });
282
788
  }
283
789
  function AuthLink({ text, linkText, href }) {
284
790
  const searchParams = useSearchParams();
285
791
  const { Link } = useNavigationAdapter();
286
792
  const finalHref = resolveAuthUrl(href, searchParams);
287
- return /* @__PURE__ */ jsxs("p", { className: "if-authLink if-internal-al5w9p", children: [
288
- text && /* @__PURE__ */ jsx("span", { className: "if-authLink-text", children: text }),
793
+ return /* @__PURE__ */ jsxs(AuthLinkWrapper, { children: [
794
+ text && /* @__PURE__ */ jsx(AuthLinkText, { children: text }),
289
795
  text && " ",
290
- /* @__PURE__ */ jsx(Link, { href: finalHref, className: "if-authLink-link", children: linkText })
796
+ /* @__PURE__ */ jsx(Link, { href: finalHref, className: "", children: /* @__PURE__ */ jsx(AuthLinkLink, { as: "span", children: linkText }) })
291
797
  ] });
292
798
  }
293
799
  function AuthDivider({ text = "or" }) {
294
- return /* @__PURE__ */ jsxs("div", { className: "if-authDivider if-internal-ad7k3m", children: [
295
- /* @__PURE__ */ jsx("div", { className: "if-authDivider-line" }),
296
- /* @__PURE__ */ jsx("span", { className: "if-authDivider-text", children: text }),
297
- /* @__PURE__ */ jsx("div", { className: "if-authDivider-line" })
800
+ return /* @__PURE__ */ jsxs(AuthDividerWrapper, { children: [
801
+ /* @__PURE__ */ jsx(AuthDividerLine, {}),
802
+ /* @__PURE__ */ jsx(AuthDividerText, { children: text }),
803
+ /* @__PURE__ */ jsx(AuthDividerLine, {})
298
804
  ] });
299
805
  }
300
806
  var OAUTH_PROVIDER_CONFIG = {
@@ -455,23 +961,17 @@ function AuthOAuthButton({
455
961
  }
456
962
  return "";
457
963
  };
458
- const className = [
459
- "if-oauthButton",
460
- "if-internal-o4k7w2",
461
- displayMode === "full" && "if-oauthButton-full",
462
- displayMode === "short" && "if-oauthButton-short",
463
- displayMode === "icon" && "if-oauthButton-icon-only"
464
- ].filter(Boolean).join(" ");
964
+ const variant = displayMode === "icon" ? "iconOnly" : displayMode;
465
965
  return /* @__PURE__ */ jsxs(
466
- "button",
966
+ OAuthButton,
467
967
  {
468
968
  type: "button",
469
969
  onClick: () => onClick(provider),
470
- className,
970
+ $variant: variant,
471
971
  disabled: disabled || loading,
472
972
  style,
473
973
  children: [
474
- loading ? /* @__PURE__ */ jsx(Loader2, { className: "if-oauthButton-icon if-submitButton-spinner", size: 18 }) : /* @__PURE__ */ jsx("span", { className: "if-oauthButton-icon", children: config.svg }),
974
+ loading ? /* @__PURE__ */ jsx(SubmitButtonSpinner, { children: /* @__PURE__ */ jsx(Loader2, { size: 18 }) }) : /* @__PURE__ */ jsx(OAuthButtonIcon, { children: config.svg }),
475
975
  !loading && getButtonText() && /* @__PURE__ */ jsx("span", { children: getButtonText() })
476
976
  ]
477
977
  }
@@ -530,14 +1030,12 @@ function AuthOAuthProviders({
530
1030
  }
531
1031
  };
532
1032
  return /* @__PURE__ */ jsx(
533
- "div",
1033
+ OAuthProvidersContainer,
534
1034
  {
535
- className: "if-oauthProviders if-internal-op3m8k",
536
1035
  style: {
537
1036
  display: "grid",
538
1037
  gridTemplateColumns: "repeat(6, 1fr)",
539
- gap: "0.75rem",
540
- width: "100%"
1038
+ gap: "0.75rem"
541
1039
  },
542
1040
  children: providers.map((provider, index) => /* @__PURE__ */ jsx(
543
1041
  AuthOAuthButton,
@@ -604,8 +1102,8 @@ function AuthVerificationCodeInput({
604
1102
  }
605
1103
  }
606
1104
  };
607
- return /* @__PURE__ */ jsx("div", { className: "if-verificationCode-inputContainer", children: Array.from({ length }).map((_, index) => /* @__PURE__ */ jsx(
608
- "input",
1105
+ return /* @__PURE__ */ jsx(VerificationCodeInputContainer, { children: Array.from({ length }).map((_, index) => /* @__PURE__ */ jsx(
1106
+ VerificationCodeInput,
609
1107
  {
610
1108
  ref: (el) => {
611
1109
  inputRefs.current[index] = el;
@@ -618,7 +1116,6 @@ function AuthVerificationCodeInput({
618
1116
  onKeyDown: (e) => handleKeyDown(index, e),
619
1117
  onPaste: handlePaste,
620
1118
  disabled,
621
- className: "if-verificationCode-input",
622
1119
  autoComplete: "one-time-code"
623
1120
  },
624
1121
  index
@@ -652,6 +1149,155 @@ function useInsforge() {
652
1149
  }
653
1150
  return context;
654
1151
  }
1152
+ styled.form`
1153
+ display: flex;
1154
+ flex-direction: column;
1155
+ align-items: stretch;
1156
+ justify-content: center;
1157
+ gap: ${theme.spacing[6]};
1158
+ `;
1159
+ var VerificationStepWrapper = styled.div`
1160
+ display: flex;
1161
+ flex-direction: column;
1162
+ gap: ${theme.spacing[6]};
1163
+ align-items: stretch;
1164
+ `;
1165
+ var VerificationStepDescriptionContainer = styled.div`
1166
+ width: 100%;
1167
+ background-color: ${theme.colors.bgGray};
1168
+ border-radius: ${theme.radius.lg};
1169
+ padding: ${theme.spacing[3]} ${theme.spacing[3]} ${theme.spacing[6]} ${theme.spacing[3]};
1170
+ display: flex;
1171
+ flex-direction: column;
1172
+ gap: ${theme.spacing[3]};
1173
+ `;
1174
+ var VerificationStepDescriptionTitle = styled.h3`
1175
+ color: ${theme.colors.black};
1176
+ font-family: ${theme.fontFamily.base};
1177
+ font-size: ${theme.fontSize.base};
1178
+ font-style: normal;
1179
+ font-weight: ${theme.fontWeight.semibold};
1180
+ line-height: 24px;
1181
+ margin: 0;
1182
+ `;
1183
+ var VerificationStepDescription = styled.p`
1184
+ font-size: ${theme.fontSize.sm};
1185
+ color: ${theme.colors.textGray};
1186
+ text-align: left;
1187
+ font-family: ${theme.fontFamily.base};
1188
+ margin: 0;
1189
+ `;
1190
+ var VerificationEmail = styled.span`
1191
+ font-weight: ${theme.fontWeight.medium};
1192
+ color: ${theme.colors.text};
1193
+ `;
1194
+ var VerificationStepCodeContainer = styled.div`
1195
+ width: 100%;
1196
+ display: flex;
1197
+ flex-direction: column;
1198
+ gap: ${theme.spacing[10]};
1199
+ `;
1200
+ var VerificationStepCodeInputWrapper = styled.div`
1201
+ display: flex;
1202
+ flex-direction: column;
1203
+ gap: ${theme.spacing[6]};
1204
+ `;
1205
+ styled.p`
1206
+ font-size: ${theme.fontSize.sm};
1207
+ color: ${theme.colors.textSecondary};
1208
+ text-align: center;
1209
+ font-family: ${theme.fontFamily.base};
1210
+ margin: 0;
1211
+ `;
1212
+ var VerificationStepResendContainer = styled.div`
1213
+ width: 100%;
1214
+ font-size: ${theme.fontSize.sm};
1215
+ text-align: center;
1216
+ color: ${theme.colors.textSecondary};
1217
+ font-family: ${theme.fontFamily.base};
1218
+ `;
1219
+ var VerificationStepResendButton = styled.button`
1220
+ color: ${theme.colors.text};
1221
+ font-weight: ${theme.fontWeight.medium};
1222
+ transition: all ${theme.transition.base};
1223
+ background: none;
1224
+ border: none;
1225
+ padding: 0;
1226
+ font-family: ${theme.fontFamily.base};
1227
+ font-size: ${theme.fontSize.sm};
1228
+
1229
+ &:not(:disabled) {
1230
+ cursor: pointer;
1231
+ }
1232
+
1233
+ &:disabled {
1234
+ cursor: not-allowed;
1235
+ opacity: 0.5;
1236
+ }
1237
+ `;
1238
+ var VerifyStatusContainer = styled.div`
1239
+ width: 100%;
1240
+ display: flex;
1241
+ flex-direction: column;
1242
+ align-items: ${(props) => props.$stretch ? "stretch" : "center"};
1243
+ justify-content: center;
1244
+ gap: ${theme.spacing[6]};
1245
+ `;
1246
+ var VerifyStatusSpinner = styled.div`
1247
+ border-radius: ${theme.radius.full};
1248
+ height: ${theme.sizes.verifyCode};
1249
+ width: ${theme.sizes.verifyCode};
1250
+ border-bottom: 2px solid ${theme.colors.primary};
1251
+ `;
1252
+ var VerifyStatusSuccessContent = styled.div`
1253
+ display: flex;
1254
+ flex-direction: column;
1255
+ align-items: center;
1256
+ gap: ${theme.spacing[4]};
1257
+ `;
1258
+ var VerifyStatusSuccessIcon = styled.div`
1259
+ width: ${theme.sizes.verifyIcon};
1260
+ height: ${theme.sizes.verifyIcon};
1261
+ border-radius: ${theme.radius.full};
1262
+ background-color: ${theme.colors.successBg};
1263
+ display: flex;
1264
+ align-items: center;
1265
+ justify-content: center;
1266
+ `;
1267
+ var VerifyStatusSuccessIconSvg = styled.div`
1268
+ width: ${theme.sizes.verifyIconInner};
1269
+ height: ${theme.sizes.verifyIconInner};
1270
+ color: ${theme.colors.successDark};
1271
+ display: flex;
1272
+ align-items: center;
1273
+ justify-content: center;
1274
+
1275
+ svg {
1276
+ width: 100%;
1277
+ height: 100%;
1278
+ }
1279
+ `;
1280
+ var VerifyStatusTextCenter = styled.p`
1281
+ text-align: center;
1282
+ font-family: ${theme.fontFamily.base};
1283
+ font-size: ${theme.fontSize.sm};
1284
+ color: ${theme.colors.text};
1285
+ margin: 0;
1286
+ `;
1287
+ styled.div`
1288
+ display: none;
1289
+ `;
1290
+ styled.span`
1291
+ position: absolute;
1292
+ width: 1px;
1293
+ height: 1px;
1294
+ padding: 0;
1295
+ margin: -1px;
1296
+ overflow: hidden;
1297
+ clip: rect(0, 0, 0, 0);
1298
+ white-space: nowrap;
1299
+ border-width: 0;
1300
+ `;
655
1301
  function AuthEmailVerificationStep({
656
1302
  email,
657
1303
  method,
@@ -705,19 +1351,19 @@ function AuthEmailVerificationStep({
705
1351
  setVerificationCode("");
706
1352
  }
707
1353
  };
708
- return /* @__PURE__ */ jsxs("div", { className: "if-verificationStep", children: [
709
- isLinkMethod && /* @__PURE__ */ jsxs("div", { className: "if-verificationStep-descriptionContainer", children: [
710
- /* @__PURE__ */ jsx("p", { className: "if-verificationStep-descriptionTitle", children: "Verify Your Email" }),
711
- /* @__PURE__ */ jsx("p", { className: "if-verificationStep-description", children: displayDescription.split("{email}").map((part, index, array) => /* @__PURE__ */ jsxs("span", { children: [
1354
+ return /* @__PURE__ */ jsxs(VerificationStepWrapper, { children: [
1355
+ isLinkMethod && /* @__PURE__ */ jsxs(VerificationStepDescriptionContainer, { children: [
1356
+ /* @__PURE__ */ jsx(VerificationStepDescriptionTitle, { children: "Verify Your Email" }),
1357
+ /* @__PURE__ */ jsx(VerificationStepDescription, { children: displayDescription.split("{email}").map((part, index, array) => /* @__PURE__ */ jsxs("span", { children: [
712
1358
  part,
713
- index < array.length - 1 && /* @__PURE__ */ jsx("span", { className: "if-verificationLink-email", children: email })
1359
+ index < array.length - 1 && /* @__PURE__ */ jsx(VerificationEmail, { children: email })
714
1360
  ] }, index)) })
715
1361
  ] }),
716
- !isLinkMethod && /* @__PURE__ */ jsxs("div", { className: "if-verificationStep-codeContainer", children: [
717
- /* @__PURE__ */ jsxs("div", { className: "if-verificationStep-codeInputWrapper", children: [
718
- /* @__PURE__ */ jsx("p", { className: "if-verificationStep-codeDescription", children: displayDescription.split("{email}").map((part, index, array) => /* @__PURE__ */ jsxs("span", { children: [
1362
+ !isLinkMethod && /* @__PURE__ */ jsxs(VerificationStepCodeContainer, { children: [
1363
+ /* @__PURE__ */ jsxs(VerificationStepCodeInputWrapper, { children: [
1364
+ /* @__PURE__ */ jsx(VerificationStepDescription, { children: displayDescription.split("{email}").map((part, index, array) => /* @__PURE__ */ jsxs("span", { children: [
719
1365
  part,
720
- index < array.length - 1 && /* @__PURE__ */ jsx("span", { className: "if-verificationCode-email", children: email })
1366
+ index < array.length - 1 && /* @__PURE__ */ jsx(VerificationEmail, { children: email })
721
1367
  ] }, index)) }),
722
1368
  /* @__PURE__ */ jsx(
723
1369
  AuthVerificationCodeInput,
@@ -741,17 +1387,16 @@ function AuthEmailVerificationStep({
741
1387
  }
742
1388
  )
743
1389
  ] }),
744
- /* @__PURE__ */ jsxs("div", { className: "if-verificationStep-resendContainer", children: [
1390
+ /* @__PURE__ */ jsxs(VerificationStepResendContainer, { children: [
745
1391
  "Didn't receive the email?",
746
1392
  " ",
747
1393
  /* @__PURE__ */ jsx(
748
- "button",
1394
+ VerificationStepResendButton,
749
1395
  {
750
1396
  onClick: () => {
751
1397
  void handleResend();
752
1398
  },
753
1399
  disabled: resendDisabled || isSending,
754
- className: "if-verificationStep-resendButton",
755
1400
  children: isSending ? "Sending..." : resendDisabled ? `Retry in (${resendCountdown}s)` : "Click to resend"
756
1401
  }
757
1402
  )
@@ -810,16 +1455,16 @@ function AuthResetPasswordVerificationStep({
810
1455
  setVerificationCode("");
811
1456
  }
812
1457
  };
813
- return /* @__PURE__ */ jsxs("div", { className: "if-verificationStep", children: [
814
- isLinkMethod && /* @__PURE__ */ jsxs("div", { className: "if-verificationStep-descriptionContainer", children: [
815
- /* @__PURE__ */ jsx("p", { className: "if-verificationStep-descriptionTitle", children: "Check Your Email" }),
816
- /* @__PURE__ */ jsx("p", { className: "if-verificationStep-description", children: displayDescription.split("{email}").map((part, index, array) => /* @__PURE__ */ jsxs("span", { children: [
1458
+ return /* @__PURE__ */ jsxs(VerificationStepWrapper, { children: [
1459
+ isLinkMethod && /* @__PURE__ */ jsxs(VerificationStepDescriptionContainer, { children: [
1460
+ /* @__PURE__ */ jsx(VerificationStepDescriptionTitle, { children: "Check Your Email" }),
1461
+ /* @__PURE__ */ jsx(VerificationStepDescription, { children: displayDescription.split("{email}").map((part, index, array) => /* @__PURE__ */ jsxs("span", { children: [
817
1462
  part,
818
- index < array.length - 1 && /* @__PURE__ */ jsx("span", { className: "if-verificationLink-email", children: email })
1463
+ index < array.length - 1 && /* @__PURE__ */ jsx(VerificationEmail, { children: email })
819
1464
  ] }, index)) })
820
1465
  ] }),
821
- !isLinkMethod && /* @__PURE__ */ jsxs("div", { className: "if-verificationStep-codeContainer", children: [
822
- /* @__PURE__ */ jsx("div", { className: "if-verificationStep-codeInputWrapper", children: /* @__PURE__ */ jsx(
1466
+ !isLinkMethod && /* @__PURE__ */ jsxs(VerificationStepCodeContainer, { children: [
1467
+ /* @__PURE__ */ jsx(VerificationStepCodeInputWrapper, { children: /* @__PURE__ */ jsx(
823
1468
  AuthVerificationCodeInput,
824
1469
  {
825
1470
  value: verificationCode,
@@ -840,17 +1485,16 @@ function AuthResetPasswordVerificationStep({
840
1485
  }
841
1486
  )
842
1487
  ] }),
843
- /* @__PURE__ */ jsxs("div", { className: "if-verificationStep-resendContainer", children: [
1488
+ /* @__PURE__ */ jsxs(VerificationStepResendContainer, { children: [
844
1489
  "Didn't receive the email?",
845
1490
  " ",
846
1491
  /* @__PURE__ */ jsx(
847
- "button",
1492
+ VerificationStepResendButton,
848
1493
  {
849
1494
  onClick: () => {
850
1495
  void handleResend();
851
1496
  },
852
1497
  disabled: resendDisabled || isSending,
853
- className: "if-verificationStep-resendButton",
854
1498
  children: isSending ? "Sending..." : resendDisabled ? `Retry in (${resendCountdown}s)` : "Click to resend"
855
1499
  }
856
1500
  )
@@ -896,39 +1540,47 @@ function SignInForm({
896
1540
  onVerifyCode,
897
1541
  emailSent: false
898
1542
  }
899
- ) : /* @__PURE__ */ jsxs("form", { onSubmit, noValidate: true, className: "if-form if-internal-fm9k2p", children: [
900
- /* @__PURE__ */ jsx(
901
- AuthFormField,
902
- {
903
- id: "email",
904
- type: "email",
905
- label: emailLabel,
906
- placeholder: emailPlaceholder,
907
- value: email,
908
- onChange: (e) => onEmailChange(e.target.value),
909
- required: true,
910
- autoComplete: "email"
911
- }
912
- ),
913
- /* @__PURE__ */ jsx(
914
- AuthPasswordField,
915
- {
916
- id: "password",
917
- label: passwordLabel,
918
- placeholder: passwordPlaceholder,
919
- value: password,
920
- onChange: (e) => onPasswordChange(e.target.value),
921
- required: true,
922
- autoComplete: "current-password",
923
- authConfig,
924
- forgotPasswordLink: forgotPasswordUrl ? {
925
- href: forgotPasswordUrl,
926
- text: forgotPasswordText
927
- } : void 0
928
- }
929
- ),
930
- /* @__PURE__ */ jsx(AuthSubmitButton, { isLoading: loading, disabled: loading || oauthLoading !== null, children: loading ? loadingButtonText : submitButtonText })
931
- ] }),
1543
+ ) : /* @__PURE__ */ jsxs(
1544
+ "form",
1545
+ {
1546
+ onSubmit,
1547
+ noValidate: true,
1548
+ style: { display: "flex", flexDirection: "column", gap: theme.spacing[6] },
1549
+ children: [
1550
+ /* @__PURE__ */ jsx(
1551
+ AuthFormField,
1552
+ {
1553
+ id: "email",
1554
+ type: "email",
1555
+ label: emailLabel,
1556
+ placeholder: emailPlaceholder,
1557
+ value: email,
1558
+ onChange: (e) => onEmailChange(e.target.value),
1559
+ required: true,
1560
+ autoComplete: "email"
1561
+ }
1562
+ ),
1563
+ /* @__PURE__ */ jsx(
1564
+ AuthPasswordField,
1565
+ {
1566
+ id: "password",
1567
+ label: passwordLabel,
1568
+ placeholder: passwordPlaceholder,
1569
+ value: password,
1570
+ onChange: (e) => onPasswordChange(e.target.value),
1571
+ required: true,
1572
+ autoComplete: "current-password",
1573
+ authConfig,
1574
+ forgotPasswordLink: forgotPasswordUrl ? {
1575
+ href: forgotPasswordUrl,
1576
+ text: forgotPasswordText
1577
+ } : void 0
1578
+ }
1579
+ ),
1580
+ /* @__PURE__ */ jsx(AuthSubmitButton, { isLoading: loading, disabled: loading || oauthLoading !== null, children: loading ? loadingButtonText : submitButtonText })
1581
+ ]
1582
+ }
1583
+ ),
932
1584
  !showVerificationStep && /* @__PURE__ */ jsxs(Fragment, { children: [
933
1585
  /* @__PURE__ */ jsx(AuthLink, { text: signUpText, linkText: signUpLinkText, href: signUpUrl }),
934
1586
  authConfig.oAuthProviders.length > 0 && onOAuthClick && /* @__PURE__ */ jsxs(Fragment, { children: [
@@ -983,36 +1635,44 @@ function SignUpForm({
983
1635
  onVerifyCode,
984
1636
  emailSent: true
985
1637
  }
986
- ) : /* @__PURE__ */ jsxs("form", { onSubmit, noValidate: true, className: "if-form if-internal-fm9k2p", children: [
987
- /* @__PURE__ */ jsx(
988
- AuthFormField,
989
- {
990
- id: "email",
991
- type: "email",
992
- label: emailLabel,
993
- placeholder: emailPlaceholder,
994
- value: email,
995
- onChange: (e) => onEmailChange(e.target.value),
996
- required: true,
997
- autoComplete: "email"
998
- }
999
- ),
1000
- /* @__PURE__ */ jsx(
1001
- AuthPasswordField,
1002
- {
1003
- id: "password",
1004
- label: passwordLabel,
1005
- placeholder: passwordPlaceholder,
1006
- value: password,
1007
- onChange: (e) => onPasswordChange(e.target.value),
1008
- required: true,
1009
- autoComplete: "new-password",
1010
- showStrengthIndicator: true,
1011
- authConfig
1012
- }
1013
- ),
1014
- /* @__PURE__ */ jsx(AuthSubmitButton, { isLoading: loading, disabled: loading || oauthLoading !== null, children: loading ? loadingButtonText : submitButtonText })
1015
- ] }),
1638
+ ) : /* @__PURE__ */ jsxs(
1639
+ "form",
1640
+ {
1641
+ onSubmit,
1642
+ noValidate: true,
1643
+ style: { display: "flex", flexDirection: "column", gap: theme.spacing[6] },
1644
+ children: [
1645
+ /* @__PURE__ */ jsx(
1646
+ AuthFormField,
1647
+ {
1648
+ id: "email",
1649
+ type: "email",
1650
+ label: emailLabel,
1651
+ placeholder: emailPlaceholder,
1652
+ value: email,
1653
+ onChange: (e) => onEmailChange(e.target.value),
1654
+ required: true,
1655
+ autoComplete: "email"
1656
+ }
1657
+ ),
1658
+ /* @__PURE__ */ jsx(
1659
+ AuthPasswordField,
1660
+ {
1661
+ id: "password",
1662
+ label: passwordLabel,
1663
+ placeholder: passwordPlaceholder,
1664
+ value: password,
1665
+ onChange: (e) => onPasswordChange(e.target.value),
1666
+ required: true,
1667
+ autoComplete: "new-password",
1668
+ showStrengthIndicator: true,
1669
+ authConfig
1670
+ }
1671
+ ),
1672
+ /* @__PURE__ */ jsx(AuthSubmitButton, { isLoading: loading, disabled: loading || oauthLoading !== null, children: loading ? loadingButtonText : submitButtonText })
1673
+ ]
1674
+ }
1675
+ ),
1016
1676
  !showVerificationStep && /* @__PURE__ */ jsxs(Fragment, { children: [
1017
1677
  /* @__PURE__ */ jsx(AuthLink, { text: signInText, linkText: signInLinkText, href: signInUrl }),
1018
1678
  authConfig.oAuthProviders.length > 0 && onOAuthClick && /* @__PURE__ */ jsxs(Fragment, { children: [
@@ -1062,22 +1722,30 @@ function ForgotPasswordForm({
1062
1722
  onResendEmail: onResendEmail || (async () => {
1063
1723
  })
1064
1724
  }
1065
- ) : /* @__PURE__ */ jsxs("form", { onSubmit, noValidate: true, className: "if-form if-internal-fm9k2p", children: [
1066
- /* @__PURE__ */ jsx(
1067
- AuthFormField,
1068
- {
1069
- id: "email",
1070
- type: "email",
1071
- label: emailLabel,
1072
- placeholder: emailPlaceholder,
1073
- value: email,
1074
- onChange: (e) => onEmailChange(e.target.value),
1075
- required: true,
1076
- autoComplete: "email"
1077
- }
1078
- ),
1079
- /* @__PURE__ */ jsx(AuthSubmitButton, { isLoading: loading, disabled: loading, children: loading ? loadingButtonText : submitButtonText })
1080
- ] }),
1725
+ ) : /* @__PURE__ */ jsxs(
1726
+ "form",
1727
+ {
1728
+ onSubmit,
1729
+ noValidate: true,
1730
+ style: { display: "flex", flexDirection: "column", gap: theme.spacing[6] },
1731
+ children: [
1732
+ /* @__PURE__ */ jsx(
1733
+ AuthFormField,
1734
+ {
1735
+ id: "email",
1736
+ type: "email",
1737
+ label: emailLabel,
1738
+ placeholder: emailPlaceholder,
1739
+ value: email,
1740
+ onChange: (e) => onEmailChange(e.target.value),
1741
+ required: true,
1742
+ autoComplete: "email"
1743
+ }
1744
+ ),
1745
+ /* @__PURE__ */ jsx(AuthSubmitButton, { isLoading: loading, disabled: loading, children: loading ? loadingButtonText : submitButtonText })
1746
+ ]
1747
+ }
1748
+ ),
1081
1749
  !showVerificationStep && /* @__PURE__ */ jsx(AuthLink, { text: backToSignInText, linkText: "Back to Sign In", href: backToSignInUrl })
1082
1750
  ] });
1083
1751
  }
@@ -1106,77 +1774,64 @@ function ResetPasswordForm({
1106
1774
  successMessage = "Your password has been successfully reset. You can wait for redirect to sign in with your new password.";
1107
1775
  }
1108
1776
  if (success) {
1109
- return /* @__PURE__ */ jsx(AuthContainer, { children: /* @__PURE__ */ jsxs(
1110
- "div",
1777
+ return /* @__PURE__ */ jsx(AuthContainer, { children: /* @__PURE__ */ jsx(VerifyStatusContainer, { $stretch: true, children: /* @__PURE__ */ jsxs(VerifyStatusSuccessContent, { children: [
1778
+ /* @__PURE__ */ jsx(VerifyStatusSuccessIcon, { children: /* @__PURE__ */ jsx(VerifyStatusSuccessIconSvg, { children: /* @__PURE__ */ jsx(
1779
+ "svg",
1780
+ {
1781
+ fill: "none",
1782
+ strokeLinecap: "round",
1783
+ strokeLinejoin: "round",
1784
+ strokeWidth: "2",
1785
+ viewBox: "0 0 24 24",
1786
+ stroke: "currentColor",
1787
+ children: /* @__PURE__ */ jsx("path", { d: "M5 13l4 4L19 7" })
1788
+ }
1789
+ ) }) }),
1790
+ /* @__PURE__ */ jsx(VerifyStatusTextCenter, { style: { fontSize: "1.5rem", fontWeight: 600 }, children: successTitle }),
1791
+ /* @__PURE__ */ jsx(VerifyStatusTextCenter, { style: { color: theme.colors.textSecondary }, children: successMessage })
1792
+ ] }) }) });
1793
+ }
1794
+ return /* @__PURE__ */ jsxs(AuthContainer, { children: [
1795
+ /* @__PURE__ */ jsx(AuthHeader, { title, subtitle }),
1796
+ /* @__PURE__ */ jsx(AuthErrorBanner, { error: error || "" }),
1797
+ /* @__PURE__ */ jsxs(
1798
+ "form",
1111
1799
  {
1112
- style: { display: "flex", flexDirection: "column", alignItems: "center", gap: "1rem" },
1800
+ onSubmit,
1801
+ noValidate: true,
1802
+ style: { display: "flex", flexDirection: "column", gap: theme.spacing[6] },
1113
1803
  children: [
1114
1804
  /* @__PURE__ */ jsx(
1115
- "div",
1805
+ AuthPasswordField,
1806
+ {
1807
+ id: "newPassword",
1808
+ label: newPasswordLabel,
1809
+ placeholder: newPasswordPlaceholder,
1810
+ value: newPassword,
1811
+ onChange: (e) => onNewPasswordChange(e.target.value),
1812
+ required: true,
1813
+ autoComplete: "new-password",
1814
+ showStrengthIndicator: true,
1815
+ authConfig
1816
+ }
1817
+ ),
1818
+ /* @__PURE__ */ jsx(
1819
+ AuthPasswordField,
1116
1820
  {
1117
- style: {
1118
- width: "4rem",
1119
- height: "4rem",
1120
- borderRadius: "50%",
1121
- backgroundColor: "#D1FAE5",
1122
- display: "flex",
1123
- alignItems: "center",
1124
- justifyContent: "center"
1125
- },
1126
- children: /* @__PURE__ */ jsx(
1127
- "svg",
1128
- {
1129
- style: { width: "2rem", height: "2rem", color: "#059669" },
1130
- fill: "none",
1131
- strokeLinecap: "round",
1132
- strokeLinejoin: "round",
1133
- strokeWidth: "2",
1134
- viewBox: "0 0 24 24",
1135
- stroke: "currentColor",
1136
- children: /* @__PURE__ */ jsx("path", { d: "M5 13l4 4L19 7" })
1137
- }
1138
- )
1821
+ id: "confirmPassword",
1822
+ label: confirmPasswordLabel,
1823
+ placeholder: confirmPasswordPlaceholder,
1824
+ value: confirmPassword,
1825
+ onChange: (e) => onConfirmPasswordChange(e.target.value),
1826
+ required: true,
1827
+ autoComplete: "new-password",
1828
+ authConfig
1139
1829
  }
1140
1830
  ),
1141
- /* @__PURE__ */ jsx("h2", { className: "if-authHeader-title", style: { textAlign: "center" }, children: successTitle }),
1142
- /* @__PURE__ */ jsx("p", { className: "if-authHeader-subtitle", style: { textAlign: "center" }, children: successMessage })
1831
+ /* @__PURE__ */ jsx(AuthSubmitButton, { isLoading: loading, disabled: loading, children: loading ? loadingButtonText : submitButtonText })
1143
1832
  ]
1144
1833
  }
1145
- ) });
1146
- }
1147
- return /* @__PURE__ */ jsxs(AuthContainer, { children: [
1148
- /* @__PURE__ */ jsx(AuthHeader, { title, subtitle }),
1149
- /* @__PURE__ */ jsx(AuthErrorBanner, { error: error || "" }),
1150
- /* @__PURE__ */ jsxs("form", { onSubmit, noValidate: true, className: "if-form if-internal-fm9k2p", children: [
1151
- /* @__PURE__ */ jsx(
1152
- AuthPasswordField,
1153
- {
1154
- id: "newPassword",
1155
- label: newPasswordLabel,
1156
- placeholder: newPasswordPlaceholder,
1157
- value: newPassword,
1158
- onChange: (e) => onNewPasswordChange(e.target.value),
1159
- required: true,
1160
- autoComplete: "new-password",
1161
- showStrengthIndicator: true,
1162
- authConfig
1163
- }
1164
- ),
1165
- /* @__PURE__ */ jsx(
1166
- AuthPasswordField,
1167
- {
1168
- id: "confirmPassword",
1169
- label: confirmPasswordLabel,
1170
- placeholder: confirmPasswordPlaceholder,
1171
- value: confirmPassword,
1172
- onChange: (e) => onConfirmPasswordChange(e.target.value),
1173
- required: true,
1174
- autoComplete: "new-password",
1175
- authConfig
1176
- }
1177
- ),
1178
- /* @__PURE__ */ jsx(AuthSubmitButton, { isLoading: loading, disabled: loading, children: loading ? loadingButtonText : submitButtonText })
1179
- ] })
1834
+ )
1180
1835
  ] });
1181
1836
  }
1182
1837
  function VerifyEmailStatus({
@@ -1188,25 +1843,24 @@ function VerifyEmailStatus({
1188
1843
  errorTitle = "Verification Failed"
1189
1844
  }) {
1190
1845
  if (status === "verifying") {
1191
- return /* @__PURE__ */ jsx(AuthContainer, { children: /* @__PURE__ */ jsxs("div", { className: "if-verifyStatus-container", children: [
1192
- /* @__PURE__ */ jsx("h2", { className: "if-authHeader-title", children: verifyingTitle }),
1193
- /* @__PURE__ */ jsx("div", { className: "if-submitButton-spinner if-verifyStatus-spinner" })
1846
+ return /* @__PURE__ */ jsx(AuthContainer, { children: /* @__PURE__ */ jsxs(VerifyStatusContainer, { children: [
1847
+ /* @__PURE__ */ jsx(AuthHeader, { title: verifyingTitle }),
1848
+ /* @__PURE__ */ jsx(VerifyStatusSpinner, {})
1194
1849
  ] }) });
1195
1850
  }
1196
1851
  if (status === "error") {
1197
- return /* @__PURE__ */ jsx(AuthContainer, { children: /* @__PURE__ */ jsx("div", { className: "if-verifyStatus-container-stretch", children: /* @__PURE__ */ jsxs("div", { className: "if-authHeader if-internal-h3m7w5", children: [
1198
- /* @__PURE__ */ jsx("h1", { className: "if-authHeader-title if-internal-t4p1k9", children: errorTitle }),
1199
- /* @__PURE__ */ jsxs("p", { className: "if-authHeader-subtitle if-internal-s7q2m3", children: [
1200
- error || "The verification link is invalid or has expired.",
1201
- " Please try again or contact support if the problem persists. You can close this page and return to your app."
1202
- ] })
1203
- ] }) }) });
1852
+ return /* @__PURE__ */ jsx(AuthContainer, { children: /* @__PURE__ */ jsx(VerifyStatusContainer, { $stretch: true, children: /* @__PURE__ */ jsx(
1853
+ AuthHeader,
1854
+ {
1855
+ title: errorTitle,
1856
+ subtitle: `${error || "The verification link is invalid or has expired."} Please try again or contact support if the problem persists. You can close this page and return to your app.`
1857
+ }
1858
+ ) }) });
1204
1859
  }
1205
- return /* @__PURE__ */ jsx(AuthContainer, { children: /* @__PURE__ */ jsx("div", { className: "if-verifyStatus-container-stretch", children: /* @__PURE__ */ jsxs("div", { className: "if-verifyStatus-successContent", children: [
1206
- /* @__PURE__ */ jsx("div", { className: "if-verifyStatus-successIcon", children: /* @__PURE__ */ jsx(
1860
+ return /* @__PURE__ */ jsx(AuthContainer, { children: /* @__PURE__ */ jsx(VerifyStatusContainer, { $stretch: true, children: /* @__PURE__ */ jsxs(VerifyStatusSuccessContent, { children: [
1861
+ /* @__PURE__ */ jsx(VerifyStatusSuccessIcon, { children: /* @__PURE__ */ jsx(VerifyStatusSuccessIconSvg, { children: /* @__PURE__ */ jsx(
1207
1862
  "svg",
1208
1863
  {
1209
- className: "if-verifyStatus-successIconSvg",
1210
1864
  fill: "none",
1211
1865
  strokeLinecap: "round",
1212
1866
  strokeLinejoin: "round",
@@ -1215,9 +1869,9 @@ function VerifyEmailStatus({
1215
1869
  stroke: "currentColor",
1216
1870
  children: /* @__PURE__ */ jsx("path", { d: "M5 13l4 4L19 7" })
1217
1871
  }
1218
- ) }),
1219
- /* @__PURE__ */ jsx("h2", { className: "if-authHeader-title if-verifyStatus-textCenter", children: successTitle }),
1220
- /* @__PURE__ */ jsx("p", { className: "if-authHeader-subtitle if-verifyStatus-textCenter", children: successMessage })
1872
+ ) }) }),
1873
+ /* @__PURE__ */ jsx(VerifyStatusTextCenter, { style: { fontSize: "1.5rem", fontWeight: 600 }, children: successTitle }),
1874
+ /* @__PURE__ */ jsx(VerifyStatusTextCenter, { style: { color: theme.colors.textSecondary }, children: successMessage })
1221
1875
  ] }) }) });
1222
1876
  }
1223
1877