@insforge/react 0.6.8 → 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.
@@ -2,6 +2,9 @@ import { createContext, useState, useMemo, useRef, useEffect, useCallback, isVal
2
2
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
3
3
  import '@insforge/sdk';
4
4
  import { InsforgeContext } from '@insforge/shared/react';
5
+ import '@emotion/cache';
6
+ import { keyframes as keyframes$1 } from '@emotion/react';
7
+ import styled from '@emotion/styled';
5
8
  import { AlertTriangle, Check, EyeOff, Eye, Loader2, CircleCheck, LogOut } from 'lucide-react';
6
9
  import { z } from 'zod';
7
10
 
@@ -70,9 +73,523 @@ function usePublicAuthConfig() {
70
73
  }, [getPublicAuthConfig]);
71
74
  return { authConfig, isLoaded };
72
75
  }
76
+
77
+ // src/styles/theme.ts
78
+ var theme = {
79
+ colors: {
80
+ primary: "#000000",
81
+ primaryHover: "#1f1f1f",
82
+ text: "#000000",
83
+ textSecondary: "#828282",
84
+ textMuted: "#a3a3a3",
85
+ textGray: "#525252",
86
+ border: "#d4d4d4",
87
+ borderGray: "#e4e4e7",
88
+ borderHover: "#9ca3af",
89
+ borderFocus: "#000000",
90
+ bgWhite: "#ffffff",
91
+ bgLight: "#fafafa",
92
+ bgGray: "#f5f5f5",
93
+ bgHover: "#f9fafb",
94
+ error: "#dc2626",
95
+ errorBg: "#fee2e2",
96
+ successBg: "#d1fae5",
97
+ successDark: "#059669",
98
+ black: "#000000",
99
+ zinc900: "#09090b"
100
+ },
101
+ spacing: {
102
+ 1: "0.25rem",
103
+ // 4px
104
+ 2: "0.5rem",
105
+ // 8px
106
+ 3: "0.75rem",
107
+ // 12px
108
+ 4: "1rem",
109
+ // 16px
110
+ 6: "1.5rem",
111
+ // 32px
112
+ 10: "2.5rem"
113
+ // 40px
114
+ },
115
+ radius: {
116
+ // 2px
117
+ sm: "0.25rem",
118
+ // 4px
119
+ md: "0.375rem",
120
+ // 6px
121
+ lg: "0.5rem",
122
+ // 8px
123
+ xl: "0.75rem",
124
+ // 12px
125
+ full: "9999px"
126
+ },
127
+ fontSize: {
128
+ xs: "0.75rem",
129
+ // 12px
130
+ sm: "0.875rem",
131
+ // 14px
132
+ base: "1rem",
133
+ // 20px
134
+ "2xl": "1.5rem"
135
+ // 24px
136
+ },
137
+ lineHeight: {
138
+ // 16px
139
+ normal: "1.25rem",
140
+ // 20px
141
+ relaxed: "1.5rem",
142
+ // 24px
143
+ loose: "2rem"
144
+ // 32px
145
+ },
146
+ fontFamily: {
147
+ base: "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif",
148
+ manrope: "'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif"
149
+ },
150
+ fontWeight: {
151
+ normal: 400,
152
+ medium: 500,
153
+ semibold: 600
154
+ },
155
+ shadow: {
156
+ md: "0 1px 2px 0 rgba(0, 0, 0, 0.1)",
157
+ lg: "0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)"
158
+ },
159
+ transition: {
160
+ fast: "150ms cubic-bezier(0.4, 0, 0.2, 1)",
161
+ base: "200ms cubic-bezier(0.4, 0, 0.2, 1)"
162
+ },
163
+ sizes: {
164
+ button: {
165
+ height: "2.5rem",
166
+ // 40px for submit
167
+ heightOAuth: "2.25rem"
168
+ // 36px for OAuth
169
+ },
170
+ // 32px
171
+ icon: "1.25rem",
172
+ // 20px
173
+ iconSm: "1.125rem",
174
+ // 18px
175
+ iconLg: "1.5rem",
176
+ // 24px
177
+ verifyCode: "3rem",
178
+ // 48px
179
+ verifyIcon: "4rem",
180
+ // 64px
181
+ verifyIconInner: "2rem"
182
+ // 32px
183
+ }
184
+ };
185
+ var keyframes = {
186
+ spin: `
187
+ from {
188
+ transform: rotate(0deg);
189
+ }
190
+ to {
191
+ transform: rotate(360deg);
192
+ }
193
+ `
194
+ };
195
+
196
+ // src/components/atoms/styled.ts
197
+ var spinAnimation = keyframes$1`${keyframes.spin}`;
198
+ var AuthContainerWrapper = styled.div`
199
+ width: 100%;
200
+ max-width: 400px;
201
+ border-radius: ${theme.radius.xl};
202
+ overflow: hidden;
203
+ box-shadow: ${theme.shadow.lg};
204
+ `;
205
+ var AuthCard = styled.div`
206
+ background-color: ${theme.colors.bgWhite};
207
+ padding: ${theme.spacing[6]};
208
+ display: flex;
209
+ flex-direction: column;
210
+ justify-content: center;
211
+ align-items: stretch;
212
+ gap: ${theme.spacing[6]};
213
+ `;
214
+ var AuthHeaderWrapper = styled.div`
215
+ display: flex;
216
+ flex-direction: column;
217
+ justify-content: flex-start;
218
+ align-items: flex-start;
219
+ gap: ${theme.spacing[2]};
220
+ `;
221
+ var AuthHeaderTitle = styled.h1`
222
+ font-size: ${theme.fontSize["2xl"]};
223
+ font-weight: ${theme.fontWeight.semibold};
224
+ color: ${theme.colors.text};
225
+ line-height: ${theme.lineHeight.loose};
226
+ margin: 0;
227
+ font-family: ${theme.fontFamily.base};
228
+ `;
229
+ var AuthHeaderSubtitle = styled.p`
230
+ font-size: ${theme.fontSize.sm};
231
+ font-weight: ${theme.fontWeight.normal};
232
+ color: ${theme.colors.textSecondary};
233
+ line-height: ${theme.lineHeight.relaxed};
234
+ margin: 0;
235
+ font-family: ${theme.fontFamily.base};
236
+ `;
237
+ var FormFieldWrapper = styled.div`
238
+ display: flex;
239
+ flex-direction: column;
240
+ justify-content: center;
241
+ align-items: stretch;
242
+ gap: ${theme.spacing[1]};
243
+ `;
244
+ var FormFieldLabel = styled.label`
245
+ font-size: ${theme.fontSize.sm};
246
+ font-weight: ${theme.fontWeight.normal};
247
+ color: ${theme.colors.text};
248
+ line-height: ${theme.lineHeight.relaxed};
249
+ font-family: ${theme.fontFamily.base};
250
+ `;
251
+ var FormFieldInput = styled.input`
252
+ width: 100%;
253
+ display: flex;
254
+ align-items: center;
255
+ gap: ${theme.spacing[2]};
256
+ align-self: stretch;
257
+ padding: ${theme.spacing[2]} ${theme.spacing[3]};
258
+ border-radius: ${theme.radius.sm};
259
+ border: 1px solid ${theme.colors.border};
260
+ background-color: ${theme.colors.bgWhite};
261
+ font-size: ${theme.fontSize.sm};
262
+ font-weight: ${theme.fontWeight.normal};
263
+ line-height: ${theme.lineHeight.normal};
264
+ color: ${theme.colors.text};
265
+ font-family: ${theme.fontFamily.base};
266
+ transition: border-color ${theme.transition.base};
267
+
268
+ &::placeholder {
269
+ color: ${theme.colors.textMuted};
270
+ font-size: ${theme.fontSize.sm};
271
+ font-weight: ${theme.fontWeight.normal};
272
+ }
273
+
274
+ &:focus {
275
+ outline: none;
276
+ border-color: ${theme.colors.borderFocus};
277
+ }
278
+ `;
279
+ var PasswordFieldWrapper = styled.div`
280
+ display: flex;
281
+ flex-direction: column;
282
+ justify-content: center;
283
+ align-items: stretch;
284
+ gap: ${theme.spacing[1]};
285
+ `;
286
+ var PasswordFieldLabelRow = styled.div`
287
+ display: flex;
288
+ justify-content: space-between;
289
+ align-items: center;
290
+ `;
291
+ var PasswordFieldLabel = styled.label`
292
+ font-size: ${theme.fontSize.sm};
293
+ font-weight: ${theme.fontWeight.normal};
294
+ color: ${theme.colors.text};
295
+ line-height: ${theme.lineHeight.relaxed};
296
+ font-family: ${theme.fontFamily.base};
297
+ `;
298
+ var PasswordFieldForgotLink = styled.a`
299
+ font-size: ${theme.fontSize.sm};
300
+ font-weight: ${theme.fontWeight.normal};
301
+ color: ${theme.colors.textSecondary};
302
+ text-decoration: none;
303
+ transition: color ${theme.transition.fast};
304
+ font-family: ${theme.fontFamily.base};
305
+ cursor: pointer;
306
+ `;
307
+ var PasswordFieldInputWrapper = styled.div`
308
+ position: relative;
309
+ width: 100%;
310
+ `;
311
+ var PasswordFieldInput = styled.input`
312
+ width: 100%;
313
+ display: flex;
314
+ align-items: center;
315
+ align-self: stretch;
316
+ padding: ${theme.spacing[2]} ${theme.spacing[3]};
317
+ padding-right: 2.5rem;
318
+ border-radius: ${theme.radius.sm};
319
+ border: 1px solid ${theme.colors.border};
320
+ background-color: ${theme.colors.bgWhite};
321
+ font-size: ${theme.fontSize.sm};
322
+ font-weight: ${theme.fontWeight.normal};
323
+ line-height: ${theme.lineHeight.normal};
324
+ color: ${theme.colors.text};
325
+ font-family: ${theme.fontFamily.base};
326
+ transition: border-color ${theme.transition.base};
327
+
328
+ &::placeholder {
329
+ color: ${theme.colors.textMuted};
330
+ }
331
+
332
+ &:focus {
333
+ outline: none;
334
+ border-color: ${theme.colors.borderFocus};
335
+ }
336
+ `;
337
+ var PasswordFieldToggleButton = styled.button`
338
+ position: absolute;
339
+ right: ${theme.spacing[1]};
340
+ top: 50%;
341
+ transform: translateY(-50%);
342
+ background: none;
343
+ border: none;
344
+ cursor: pointer;
345
+ padding: ${theme.spacing[1]};
346
+ display: flex;
347
+ align-items: center;
348
+ justify-content: center;
349
+ color: ${theme.colors.textSecondary};
350
+ transition: color ${theme.transition.fast};
351
+ `;
352
+ var SubmitButton = styled.button`
353
+ border-radius: ${theme.radius.sm};
354
+ background-color: ${theme.colors.primary};
355
+ height: ${theme.sizes.button.height};
356
+ width: 100%;
357
+ display: flex;
358
+ margin-top: ${theme.spacing[4]};
359
+ padding: ${theme.spacing[2]} ${theme.spacing[4]};
360
+ justify-content: center;
361
+ align-items: center;
362
+ gap: 0.625rem;
363
+ align-self: stretch;
364
+ color: ${theme.colors.bgWhite};
365
+ font-weight: ${theme.fontWeight.semibold};
366
+ font-family: ${theme.fontFamily.manrope};
367
+ font-size: ${theme.fontSize.base};
368
+ line-height: normal;
369
+ border: none;
370
+ cursor: pointer;
371
+ transition: background-color ${theme.transition.base};
372
+
373
+ &:hover:not(:disabled) {
374
+ background-color: ${theme.colors.primaryHover};
375
+ }
376
+
377
+ &:disabled {
378
+ opacity: 0.5;
379
+ cursor: not-allowed;
380
+ }
381
+ `;
382
+ var SubmitButtonIcon = styled.div`
383
+ width: ${theme.sizes.icon};
384
+ height: ${theme.sizes.icon};
385
+ display: flex;
386
+ align-items: center;
387
+ justify-content: center;
388
+
389
+ svg {
390
+ width: 100%;
391
+ height: 100%;
392
+ }
393
+ `;
394
+ var SubmitButtonSpinner = styled.div`
395
+ width: ${theme.sizes.icon};
396
+ height: ${theme.sizes.icon};
397
+ display: flex;
398
+ align-items: center;
399
+ justify-content: center;
400
+ animation: ${spinAnimation} 1s linear infinite;
401
+
402
+ svg {
403
+ width: 100%;
404
+ height: 100%;
405
+ }
406
+ `;
407
+ var OAuthButton = styled.button`
408
+ display: flex;
409
+ width: 100%;
410
+ height: ${theme.sizes.button.heightOAuth};
411
+ padding: ${(props) => props.$variant === "short" || props.$variant === "iconOnly" ? theme.spacing[2] : `${theme.spacing[2]} ${theme.spacing[3]}`};
412
+ flex-direction: row;
413
+ justify-content: center;
414
+ align-items: center;
415
+ gap: ${(props) => props.$variant === "iconOnly" ? "0" : props.$variant === "short" ? theme.spacing[2] : theme.spacing[3]};
416
+ border-radius: ${theme.radius.md};
417
+ border: 1px solid ${theme.colors.borderGray};
418
+ background-color: ${theme.colors.bgWhite};
419
+ box-shadow: ${theme.shadow.md};
420
+ color: ${theme.colors.zinc900};
421
+ text-align: center;
422
+ font-size: ${theme.fontSize.sm};
423
+ font-weight: ${theme.fontWeight.medium};
424
+ line-height: ${theme.lineHeight.normal};
425
+ cursor: pointer;
426
+ transition: all ${theme.transition.base};
427
+ font-family: ${theme.fontFamily.base};
428
+
429
+ &:hover:not(:disabled) {
430
+ background-color: ${theme.colors.bgHover};
431
+ border-color: ${theme.colors.borderHover};
432
+ }
433
+
434
+ &:disabled {
435
+ opacity: 0.6;
436
+ cursor: not-allowed;
437
+ }
438
+ `;
439
+ var OAuthButtonIcon = styled.div`
440
+ display: flex;
441
+ align-items: center;
442
+ justify-content: center;
443
+ flex-shrink: 0;
444
+ width: ${theme.sizes.iconSm};
445
+ height: ${theme.sizes.iconSm};
446
+
447
+ svg {
448
+ width: 100%;
449
+ height: 100%;
450
+ }
451
+ `;
452
+ var OAuthProvidersContainer = styled.div`
453
+ display: flex;
454
+ flex-direction: column;
455
+ gap: ${theme.spacing[3]};
456
+ width: 100%;
457
+ `;
458
+ var AuthLinkWrapper = styled.div`
459
+ display: flex;
460
+ justify-content: center;
461
+ align-items: center;
462
+ gap: ${theme.spacing[1]};
463
+ font-size: ${theme.fontSize.sm};
464
+ color: ${theme.colors.textSecondary};
465
+ font-family: ${theme.fontFamily.base};
466
+ `;
467
+ var AuthLinkText = styled.span`
468
+ font-weight: ${theme.fontWeight.normal};
469
+ `;
470
+ var AuthLinkLink = styled.a`
471
+ font-weight: ${theme.fontWeight.semibold};
472
+ color: ${theme.colors.text};
473
+ text-decoration: none;
474
+ transition: opacity ${theme.transition.fast};
475
+ cursor: pointer;
476
+ `;
477
+ var AuthDividerWrapper = styled.div`
478
+ display: flex;
479
+ align-items: center;
480
+ text-align: center;
481
+ width: 100%;
482
+ gap: ${theme.spacing[3]};
483
+ `;
484
+ var AuthDividerLine = styled.div`
485
+ flex: 1;
486
+ border-top: 1px solid ${theme.colors.border};
487
+ `;
488
+ var AuthDividerText = styled.span`
489
+ font-size: ${theme.fontSize.sm};
490
+ color: ${theme.colors.textSecondary};
491
+ font-weight: ${theme.fontWeight.normal};
492
+ font-family: ${theme.fontFamily.manrope};
493
+ `;
494
+ var ErrorBannerWrapper = styled.div`
495
+ padding: ${theme.spacing[3]};
496
+ background-color: ${theme.colors.errorBg};
497
+ border-radius: ${theme.radius.md};
498
+ border: 1px solid ${theme.colors.error};
499
+ `;
500
+ var ErrorBannerContent = styled.div`
501
+ display: flex;
502
+ align-items: center;
503
+ gap: ${theme.spacing[2]};
504
+ `;
505
+ var ErrorBannerIcon = styled.div`
506
+ width: ${theme.sizes.iconLg};
507
+ height: ${theme.sizes.iconLg};
508
+ flex-shrink: 0;
509
+ color: ${theme.colors.error};
510
+ display: flex;
511
+ align-items: center;
512
+ justify-content: center;
513
+
514
+ svg {
515
+ width: 100%;
516
+ height: 100%;
517
+ }
518
+ `;
519
+ var ErrorBannerText = styled.p`
520
+ font-size: ${theme.fontSize.sm};
521
+ color: ${theme.colors.error};
522
+ font-weight: ${theme.fontWeight.normal};
523
+ font-family: ${theme.fontFamily.base};
524
+ margin: 0;
525
+ `;
526
+ var AuthBrandingWrapper = styled.div`
527
+ background-color: ${theme.colors.bgLight};
528
+ padding: ${theme.spacing[4]} ${theme.spacing[2]};
529
+ display: flex;
530
+ flex-direction: row;
531
+ justify-content: center;
532
+ align-items: center;
533
+ gap: ${theme.spacing[1]};
534
+ `;
535
+ var AuthBrandingText = styled.p`
536
+ font-size: ${theme.fontSize.xs};
537
+ font-weight: ${theme.fontWeight.medium};
538
+ color: ${theme.colors.text};
539
+ font-family: ${theme.fontFamily.manrope};
540
+ margin: 0;
541
+ `;
542
+ var VerificationCodeInputContainer = styled.div`
543
+ display: flex;
544
+ gap: ${theme.spacing[3]};
545
+ justify-content: center;
546
+ `;
547
+ var VerificationCodeInput = styled.input`
548
+ width: ${theme.sizes.verifyCode};
549
+ height: ${theme.sizes.verifyCode};
550
+ text-align: center;
551
+ font-size: ${theme.fontSize.base};
552
+ font-weight: ${theme.fontWeight.semibold};
553
+ border: 1px solid ${theme.colors.border};
554
+ border-radius: ${theme.radius.sm};
555
+ transition: border-color ${theme.transition.base};
556
+ font-family: ${theme.fontFamily.manrope};
557
+
558
+ &:focus {
559
+ outline: none;
560
+ border-color: ${theme.colors.borderFocus};
561
+ }
562
+ `;
563
+ var PasswordStrengthWrapper = styled.div`
564
+ margin-top: ${theme.spacing[2]};
565
+ `;
566
+ styled.div`
567
+ height: 100%;
568
+ transition:
569
+ width ${theme.transition.base},
570
+ background-color ${theme.transition.base};
571
+ `;
572
+ styled.span`
573
+ font-size: ${theme.fontSize.xs};
574
+ color: ${theme.colors.textSecondary};
575
+ font-family: ${theme.fontFamily.base};
576
+ `;
577
+ var PasswordStrengthRequirements = styled.div`
578
+ display: flex;
579
+ flex-direction: column;
580
+ gap: ${theme.spacing[2]};
581
+ font-size: ${theme.fontSize.sm};
582
+ color: ${theme.colors.textGray};
583
+ font-family: ${theme.fontFamily.base};
584
+ `;
585
+ var PasswordStrengthRequirement = styled.div`
586
+ display: flex;
587
+ align-items: center;
588
+ gap: ${theme.spacing[2]};
589
+ `;
73
590
  function AuthBranding() {
74
- return /* @__PURE__ */ jsxs("div", { className: "if-authBranding if-internal-ab4k9w", children: [
75
- /* @__PURE__ */ jsx("p", { className: "if-authBranding-text", children: "Secured by" }),
591
+ return /* @__PURE__ */ jsxs(AuthBrandingWrapper, { children: [
592
+ /* @__PURE__ */ jsx(AuthBrandingText, { children: "Secured by" }),
76
593
  /* @__PURE__ */ jsx("a", { href: "https://insforge.dev", target: "_blank", rel: "noopener noreferrer", children: /* @__PURE__ */ jsxs(
77
594
  "svg",
78
595
  {
@@ -141,30 +658,30 @@ function AuthBranding() {
141
658
  ] });
142
659
  }
143
660
  function AuthContainer({ children }) {
144
- return /* @__PURE__ */ jsxs("div", { className: "if-authContainer if-internal-a8f3d2", children: [
145
- /* @__PURE__ */ jsx("div", { className: "if-authCard if-internal-b2k9x1", children }),
661
+ return /* @__PURE__ */ jsxs(AuthContainerWrapper, { children: [
662
+ /* @__PURE__ */ jsx(AuthCard, { children }),
146
663
  /* @__PURE__ */ jsx(AuthBranding, {})
147
664
  ] });
148
665
  }
149
666
  function AuthHeader({ title, subtitle }) {
150
- return /* @__PURE__ */ jsxs("div", { className: "if-authHeader if-internal-h3m7w5", children: [
151
- /* @__PURE__ */ jsx("h1", { className: "if-authHeader-title if-internal-t4p1k9", children: title }),
152
- subtitle && /* @__PURE__ */ jsx("p", { className: "if-authHeader-subtitle if-internal-s7q2m3", children: subtitle })
667
+ return /* @__PURE__ */ jsxs(AuthHeaderWrapper, { children: [
668
+ /* @__PURE__ */ jsx(AuthHeaderTitle, { children: title }),
669
+ subtitle && /* @__PURE__ */ jsx(AuthHeaderSubtitle, { children: subtitle })
153
670
  ] });
154
671
  }
155
672
  function AuthErrorBanner({ error }) {
156
673
  if (!error) {
157
674
  return null;
158
675
  }
159
- return /* @__PURE__ */ jsx("div", { className: "if-errorBanner if-internal-eb2m7k", children: /* @__PURE__ */ jsxs("div", { className: "if-errorBanner-content", children: [
160
- /* @__PURE__ */ jsx(AlertTriangle, { className: "if-errorBanner-icon" }),
161
- /* @__PURE__ */ jsx("span", { className: "if-errorBanner-text", children: error })
676
+ return /* @__PURE__ */ jsx(ErrorBannerWrapper, { children: /* @__PURE__ */ jsxs(ErrorBannerContent, { children: [
677
+ /* @__PURE__ */ jsx(ErrorBannerIcon, { children: /* @__PURE__ */ jsx(AlertTriangle, {}) }),
678
+ /* @__PURE__ */ jsx(ErrorBannerText, { children: error })
162
679
  ] }) });
163
680
  }
164
681
  function AuthFormField({ label, id, ...props }) {
165
- return /* @__PURE__ */ jsxs("div", { className: "if-formField if-internal-f9n6p2", children: [
166
- /* @__PURE__ */ jsx("label", { htmlFor: id, className: "if-formField-label if-internal-l3k8m1", children: label }),
167
- /* @__PURE__ */ jsx("input", { id, className: "if-formField-input if-internal-i2v8k4", ...props })
682
+ return /* @__PURE__ */ jsxs(FormFieldWrapper, { children: [
683
+ /* @__PURE__ */ jsx(FormFieldLabel, { htmlFor: id, children: label }),
684
+ /* @__PURE__ */ jsx(FormFieldInput, { id, ...props })
168
685
  ] });
169
686
  }
170
687
  function AuthPasswordStrengthIndicator({
@@ -172,7 +689,7 @@ function AuthPasswordStrengthIndicator({
172
689
  config
173
690
  }) {
174
691
  const requirements = createRequirements(config);
175
- 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: [
692
+ return /* @__PURE__ */ jsx(PasswordStrengthWrapper, { children: /* @__PURE__ */ jsx(PasswordStrengthRequirements, { children: requirements.map((req) => /* @__PURE__ */ jsxs(PasswordStrengthRequirement, { children: [
176
693
  /* @__PURE__ */ jsx(
177
694
  "div",
178
695
  {
@@ -274,29 +791,27 @@ function AuthPasswordField({
274
791
  }
275
792
  onFocus?.(e);
276
793
  };
277
- return /* @__PURE__ */ jsxs("div", { className: "if-passwordField if-internal-p5w9m7", children: [
278
- (label || forgotPasswordLink) && /* @__PURE__ */ jsxs("div", { className: "if-passwordField-labelRow", children: [
279
- /* @__PURE__ */ jsx("label", { htmlFor: id, className: "if-passwordField-label", children: label }),
280
- forgotPasswordLink && resolvedForgotPasswordHref && /* @__PURE__ */ jsx(Link, { href: resolvedForgotPasswordHref, className: "if-passwordField-forgotLink", children: forgotPasswordLink.text || "Forget Password?" })
794
+ return /* @__PURE__ */ jsxs(PasswordFieldWrapper, { children: [
795
+ (label || forgotPasswordLink) && /* @__PURE__ */ jsxs(PasswordFieldLabelRow, { children: [
796
+ /* @__PURE__ */ jsx(PasswordFieldLabel, { htmlFor: id, children: label }),
797
+ forgotPasswordLink && resolvedForgotPasswordHref && /* @__PURE__ */ jsx(Link, { href: resolvedForgotPasswordHref, className: "", children: /* @__PURE__ */ jsx(PasswordFieldForgotLink, { as: "span", children: forgotPasswordLink.text || "Forget Password?" }) })
281
798
  ] }),
282
- /* @__PURE__ */ jsxs("div", { className: "if-passwordField-inputWrapper", children: [
799
+ /* @__PURE__ */ jsxs(PasswordFieldInputWrapper, { children: [
283
800
  /* @__PURE__ */ jsx(
284
- "input",
801
+ PasswordFieldInput,
285
802
  {
286
803
  id,
287
804
  type: showPassword ? "text" : "password",
288
- className: "if-passwordField-input",
289
805
  value,
290
806
  onFocus: handleFocus,
291
807
  ...props
292
808
  }
293
809
  ),
294
810
  /* @__PURE__ */ jsx(
295
- "button",
811
+ PasswordFieldToggleButton,
296
812
  {
297
813
  type: "button",
298
814
  onClick: () => setShowPassword(!showPassword),
299
- className: "if-passwordField-toggleButton",
300
815
  "aria-label": showPassword ? "Hide password" : "Show password",
301
816
  children: showPassword ? /* @__PURE__ */ jsx(EyeOff, { size: 20 }) : /* @__PURE__ */ jsx(Eye, { size: 20 })
302
817
  }
@@ -313,36 +828,27 @@ function AuthSubmitButton({
313
828
  type = "submit",
314
829
  onClick
315
830
  }) {
316
- return /* @__PURE__ */ jsxs(
317
- "button",
318
- {
319
- type,
320
- className: "if-submitButton if-internal-b8p3m4",
321
- disabled: disabled || isLoading || confirmed,
322
- onClick,
323
- children: [
324
- isLoading && /* @__PURE__ */ jsx(Loader2, { className: "if-submitButton-icon if-submitButton-spinner", size: 20 }),
325
- confirmed && /* @__PURE__ */ jsx(CircleCheck, { className: "if-submitButton-icon", size: 20 }),
326
- children
327
- ]
328
- }
329
- );
831
+ return /* @__PURE__ */ jsxs(SubmitButton, { type, disabled: disabled || isLoading || confirmed, onClick, children: [
832
+ isLoading && /* @__PURE__ */ jsx(SubmitButtonSpinner, { children: /* @__PURE__ */ jsx(Loader2, { size: 20 }) }),
833
+ confirmed && /* @__PURE__ */ jsx(SubmitButtonIcon, { children: /* @__PURE__ */ jsx(CircleCheck, { size: 20 }) }),
834
+ children
835
+ ] });
330
836
  }
331
837
  function AuthLink({ text, linkText, href }) {
332
838
  const searchParams = useSearchParams();
333
839
  const { Link } = useNavigationAdapter();
334
840
  const finalHref = resolveAuthUrl(href, searchParams);
335
- return /* @__PURE__ */ jsxs("p", { className: "if-authLink if-internal-al5w9p", children: [
336
- text && /* @__PURE__ */ jsx("span", { className: "if-authLink-text", children: text }),
841
+ return /* @__PURE__ */ jsxs(AuthLinkWrapper, { children: [
842
+ text && /* @__PURE__ */ jsx(AuthLinkText, { children: text }),
337
843
  text && " ",
338
- /* @__PURE__ */ jsx(Link, { href: finalHref, className: "if-authLink-link", children: linkText })
844
+ /* @__PURE__ */ jsx(Link, { href: finalHref, className: "", children: /* @__PURE__ */ jsx(AuthLinkLink, { as: "span", children: linkText }) })
339
845
  ] });
340
846
  }
341
847
  function AuthDivider({ text = "or" }) {
342
- return /* @__PURE__ */ jsxs("div", { className: "if-authDivider if-internal-ad7k3m", children: [
343
- /* @__PURE__ */ jsx("div", { className: "if-authDivider-line" }),
344
- /* @__PURE__ */ jsx("span", { className: "if-authDivider-text", children: text }),
345
- /* @__PURE__ */ jsx("div", { className: "if-authDivider-line" })
848
+ return /* @__PURE__ */ jsxs(AuthDividerWrapper, { children: [
849
+ /* @__PURE__ */ jsx(AuthDividerLine, {}),
850
+ /* @__PURE__ */ jsx(AuthDividerText, { children: text }),
851
+ /* @__PURE__ */ jsx(AuthDividerLine, {})
346
852
  ] });
347
853
  }
348
854
  var OAUTH_PROVIDER_CONFIG = {
@@ -503,23 +1009,17 @@ function AuthOAuthButton({
503
1009
  }
504
1010
  return "";
505
1011
  };
506
- const className = [
507
- "if-oauthButton",
508
- "if-internal-o4k7w2",
509
- displayMode === "full" && "if-oauthButton-full",
510
- displayMode === "short" && "if-oauthButton-short",
511
- displayMode === "icon" && "if-oauthButton-icon-only"
512
- ].filter(Boolean).join(" ");
1012
+ const variant = displayMode === "icon" ? "iconOnly" : displayMode;
513
1013
  return /* @__PURE__ */ jsxs(
514
- "button",
1014
+ OAuthButton,
515
1015
  {
516
1016
  type: "button",
517
1017
  onClick: () => onClick(provider),
518
- className,
1018
+ $variant: variant,
519
1019
  disabled: disabled || loading,
520
1020
  style,
521
1021
  children: [
522
- loading ? /* @__PURE__ */ jsx(Loader2, { className: "if-oauthButton-icon if-submitButton-spinner", size: 18 }) : /* @__PURE__ */ jsx("span", { className: "if-oauthButton-icon", children: config.svg }),
1022
+ loading ? /* @__PURE__ */ jsx(SubmitButtonSpinner, { children: /* @__PURE__ */ jsx(Loader2, { size: 18 }) }) : /* @__PURE__ */ jsx(OAuthButtonIcon, { children: config.svg }),
523
1023
  !loading && getButtonText() && /* @__PURE__ */ jsx("span", { children: getButtonText() })
524
1024
  ]
525
1025
  }
@@ -578,14 +1078,12 @@ function AuthOAuthProviders({
578
1078
  }
579
1079
  };
580
1080
  return /* @__PURE__ */ jsx(
581
- "div",
1081
+ OAuthProvidersContainer,
582
1082
  {
583
- className: "if-oauthProviders if-internal-op3m8k",
584
1083
  style: {
585
1084
  display: "grid",
586
1085
  gridTemplateColumns: "repeat(6, 1fr)",
587
- gap: "0.75rem",
588
- width: "100%"
1086
+ gap: "0.75rem"
589
1087
  },
590
1088
  children: providers.map((provider, index) => /* @__PURE__ */ jsx(
591
1089
  AuthOAuthButton,
@@ -652,8 +1150,8 @@ function AuthVerificationCodeInput({
652
1150
  }
653
1151
  }
654
1152
  };
655
- return /* @__PURE__ */ jsx("div", { className: "if-verificationCode-inputContainer", children: Array.from({ length }).map((_, index) => /* @__PURE__ */ jsx(
656
- "input",
1153
+ return /* @__PURE__ */ jsx(VerificationCodeInputContainer, { children: Array.from({ length }).map((_, index) => /* @__PURE__ */ jsx(
1154
+ VerificationCodeInput,
657
1155
  {
658
1156
  ref: (el) => {
659
1157
  inputRefs.current[index] = el;
@@ -666,12 +1164,160 @@ function AuthVerificationCodeInput({
666
1164
  onKeyDown: (e) => handleKeyDown(index, e),
667
1165
  onPaste: handlePaste,
668
1166
  disabled,
669
- className: "if-verificationCode-input",
670
1167
  autoComplete: "one-time-code"
671
1168
  },
672
1169
  index
673
1170
  )) });
674
1171
  }
1172
+ styled.form`
1173
+ display: flex;
1174
+ flex-direction: column;
1175
+ align-items: stretch;
1176
+ justify-content: center;
1177
+ gap: ${theme.spacing[6]};
1178
+ `;
1179
+ var VerificationStepWrapper = styled.div`
1180
+ display: flex;
1181
+ flex-direction: column;
1182
+ gap: ${theme.spacing[6]};
1183
+ align-items: stretch;
1184
+ `;
1185
+ var VerificationStepDescriptionContainer = styled.div`
1186
+ width: 100%;
1187
+ background-color: ${theme.colors.bgGray};
1188
+ border-radius: ${theme.radius.lg};
1189
+ padding: ${theme.spacing[3]} ${theme.spacing[3]} ${theme.spacing[6]} ${theme.spacing[3]};
1190
+ display: flex;
1191
+ flex-direction: column;
1192
+ gap: ${theme.spacing[3]};
1193
+ `;
1194
+ var VerificationStepDescriptionTitle = styled.h3`
1195
+ color: ${theme.colors.black};
1196
+ font-family: ${theme.fontFamily.base};
1197
+ font-size: ${theme.fontSize.base};
1198
+ font-style: normal;
1199
+ font-weight: ${theme.fontWeight.semibold};
1200
+ line-height: 24px;
1201
+ margin: 0;
1202
+ `;
1203
+ var VerificationStepDescription = styled.p`
1204
+ font-size: ${theme.fontSize.sm};
1205
+ color: ${theme.colors.textGray};
1206
+ text-align: left;
1207
+ font-family: ${theme.fontFamily.base};
1208
+ margin: 0;
1209
+ `;
1210
+ var VerificationEmail = styled.span`
1211
+ font-weight: ${theme.fontWeight.medium};
1212
+ color: ${theme.colors.text};
1213
+ `;
1214
+ var VerificationStepCodeContainer = styled.div`
1215
+ width: 100%;
1216
+ display: flex;
1217
+ flex-direction: column;
1218
+ gap: ${theme.spacing[10]};
1219
+ `;
1220
+ var VerificationStepCodeInputWrapper = styled.div`
1221
+ display: flex;
1222
+ flex-direction: column;
1223
+ gap: ${theme.spacing[6]};
1224
+ `;
1225
+ styled.p`
1226
+ font-size: ${theme.fontSize.sm};
1227
+ color: ${theme.colors.textSecondary};
1228
+ text-align: center;
1229
+ font-family: ${theme.fontFamily.base};
1230
+ margin: 0;
1231
+ `;
1232
+ var VerificationStepResendContainer = styled.div`
1233
+ width: 100%;
1234
+ font-size: ${theme.fontSize.sm};
1235
+ text-align: center;
1236
+ color: ${theme.colors.textSecondary};
1237
+ font-family: ${theme.fontFamily.base};
1238
+ `;
1239
+ var VerificationStepResendButton = styled.button`
1240
+ color: ${theme.colors.text};
1241
+ font-weight: ${theme.fontWeight.medium};
1242
+ transition: all ${theme.transition.base};
1243
+ background: none;
1244
+ border: none;
1245
+ padding: 0;
1246
+ font-family: ${theme.fontFamily.base};
1247
+ font-size: ${theme.fontSize.sm};
1248
+
1249
+ &:not(:disabled) {
1250
+ cursor: pointer;
1251
+ }
1252
+
1253
+ &:disabled {
1254
+ cursor: not-allowed;
1255
+ opacity: 0.5;
1256
+ }
1257
+ `;
1258
+ var VerifyStatusContainer = styled.div`
1259
+ width: 100%;
1260
+ display: flex;
1261
+ flex-direction: column;
1262
+ align-items: ${(props) => props.$stretch ? "stretch" : "center"};
1263
+ justify-content: center;
1264
+ gap: ${theme.spacing[6]};
1265
+ `;
1266
+ var VerifyStatusSpinner = styled.div`
1267
+ border-radius: ${theme.radius.full};
1268
+ height: ${theme.sizes.verifyCode};
1269
+ width: ${theme.sizes.verifyCode};
1270
+ border-bottom: 2px solid ${theme.colors.primary};
1271
+ `;
1272
+ var VerifyStatusSuccessContent = styled.div`
1273
+ display: flex;
1274
+ flex-direction: column;
1275
+ align-items: center;
1276
+ gap: ${theme.spacing[4]};
1277
+ `;
1278
+ var VerifyStatusSuccessIcon = styled.div`
1279
+ width: ${theme.sizes.verifyIcon};
1280
+ height: ${theme.sizes.verifyIcon};
1281
+ border-radius: ${theme.radius.full};
1282
+ background-color: ${theme.colors.successBg};
1283
+ display: flex;
1284
+ align-items: center;
1285
+ justify-content: center;
1286
+ `;
1287
+ var VerifyStatusSuccessIconSvg = styled.div`
1288
+ width: ${theme.sizes.verifyIconInner};
1289
+ height: ${theme.sizes.verifyIconInner};
1290
+ color: ${theme.colors.successDark};
1291
+ display: flex;
1292
+ align-items: center;
1293
+ justify-content: center;
1294
+
1295
+ svg {
1296
+ width: 100%;
1297
+ height: 100%;
1298
+ }
1299
+ `;
1300
+ var VerifyStatusTextCenter = styled.p`
1301
+ text-align: center;
1302
+ font-family: ${theme.fontFamily.base};
1303
+ font-size: ${theme.fontSize.sm};
1304
+ color: ${theme.colors.text};
1305
+ margin: 0;
1306
+ `;
1307
+ styled.div`
1308
+ display: none;
1309
+ `;
1310
+ styled.span`
1311
+ position: absolute;
1312
+ width: 1px;
1313
+ height: 1px;
1314
+ padding: 0;
1315
+ margin: -1px;
1316
+ overflow: hidden;
1317
+ clip: rect(0, 0, 0, 0);
1318
+ white-space: nowrap;
1319
+ border-width: 0;
1320
+ `;
675
1321
  function AuthEmailVerificationStep({
676
1322
  email,
677
1323
  method,
@@ -725,19 +1371,19 @@ function AuthEmailVerificationStep({
725
1371
  setVerificationCode("");
726
1372
  }
727
1373
  };
728
- return /* @__PURE__ */ jsxs("div", { className: "if-verificationStep", children: [
729
- isLinkMethod && /* @__PURE__ */ jsxs("div", { className: "if-verificationStep-descriptionContainer", children: [
730
- /* @__PURE__ */ jsx("p", { className: "if-verificationStep-descriptionTitle", children: "Verify Your Email" }),
731
- /* @__PURE__ */ jsx("p", { className: "if-verificationStep-description", children: displayDescription.split("{email}").map((part, index, array) => /* @__PURE__ */ jsxs("span", { children: [
1374
+ return /* @__PURE__ */ jsxs(VerificationStepWrapper, { children: [
1375
+ isLinkMethod && /* @__PURE__ */ jsxs(VerificationStepDescriptionContainer, { children: [
1376
+ /* @__PURE__ */ jsx(VerificationStepDescriptionTitle, { children: "Verify Your Email" }),
1377
+ /* @__PURE__ */ jsx(VerificationStepDescription, { children: displayDescription.split("{email}").map((part, index, array) => /* @__PURE__ */ jsxs("span", { children: [
732
1378
  part,
733
- index < array.length - 1 && /* @__PURE__ */ jsx("span", { className: "if-verificationLink-email", children: email })
1379
+ index < array.length - 1 && /* @__PURE__ */ jsx(VerificationEmail, { children: email })
734
1380
  ] }, index)) })
735
1381
  ] }),
736
- !isLinkMethod && /* @__PURE__ */ jsxs("div", { className: "if-verificationStep-codeContainer", children: [
737
- /* @__PURE__ */ jsxs("div", { className: "if-verificationStep-codeInputWrapper", children: [
738
- /* @__PURE__ */ jsx("p", { className: "if-verificationStep-codeDescription", children: displayDescription.split("{email}").map((part, index, array) => /* @__PURE__ */ jsxs("span", { children: [
1382
+ !isLinkMethod && /* @__PURE__ */ jsxs(VerificationStepCodeContainer, { children: [
1383
+ /* @__PURE__ */ jsxs(VerificationStepCodeInputWrapper, { children: [
1384
+ /* @__PURE__ */ jsx(VerificationStepDescription, { children: displayDescription.split("{email}").map((part, index, array) => /* @__PURE__ */ jsxs("span", { children: [
739
1385
  part,
740
- index < array.length - 1 && /* @__PURE__ */ jsx("span", { className: "if-verificationCode-email", children: email })
1386
+ index < array.length - 1 && /* @__PURE__ */ jsx(VerificationEmail, { children: email })
741
1387
  ] }, index)) }),
742
1388
  /* @__PURE__ */ jsx(
743
1389
  AuthVerificationCodeInput,
@@ -761,17 +1407,16 @@ function AuthEmailVerificationStep({
761
1407
  }
762
1408
  )
763
1409
  ] }),
764
- /* @__PURE__ */ jsxs("div", { className: "if-verificationStep-resendContainer", children: [
1410
+ /* @__PURE__ */ jsxs(VerificationStepResendContainer, { children: [
765
1411
  "Didn't receive the email?",
766
1412
  " ",
767
1413
  /* @__PURE__ */ jsx(
768
- "button",
1414
+ VerificationStepResendButton,
769
1415
  {
770
1416
  onClick: () => {
771
1417
  void handleResend();
772
1418
  },
773
1419
  disabled: resendDisabled || isSending,
774
- className: "if-verificationStep-resendButton",
775
1420
  children: isSending ? "Sending..." : resendDisabled ? `Retry in (${resendCountdown}s)` : "Click to resend"
776
1421
  }
777
1422
  )
@@ -830,16 +1475,16 @@ function AuthResetPasswordVerificationStep({
830
1475
  setVerificationCode("");
831
1476
  }
832
1477
  };
833
- return /* @__PURE__ */ jsxs("div", { className: "if-verificationStep", children: [
834
- isLinkMethod && /* @__PURE__ */ jsxs("div", { className: "if-verificationStep-descriptionContainer", children: [
835
- /* @__PURE__ */ jsx("p", { className: "if-verificationStep-descriptionTitle", children: "Check Your Email" }),
836
- /* @__PURE__ */ jsx("p", { className: "if-verificationStep-description", children: displayDescription.split("{email}").map((part, index, array) => /* @__PURE__ */ jsxs("span", { children: [
1478
+ return /* @__PURE__ */ jsxs(VerificationStepWrapper, { children: [
1479
+ isLinkMethod && /* @__PURE__ */ jsxs(VerificationStepDescriptionContainer, { children: [
1480
+ /* @__PURE__ */ jsx(VerificationStepDescriptionTitle, { children: "Check Your Email" }),
1481
+ /* @__PURE__ */ jsx(VerificationStepDescription, { children: displayDescription.split("{email}").map((part, index, array) => /* @__PURE__ */ jsxs("span", { children: [
837
1482
  part,
838
- index < array.length - 1 && /* @__PURE__ */ jsx("span", { className: "if-verificationLink-email", children: email })
1483
+ index < array.length - 1 && /* @__PURE__ */ jsx(VerificationEmail, { children: email })
839
1484
  ] }, index)) })
840
1485
  ] }),
841
- !isLinkMethod && /* @__PURE__ */ jsxs("div", { className: "if-verificationStep-codeContainer", children: [
842
- /* @__PURE__ */ jsx("div", { className: "if-verificationStep-codeInputWrapper", children: /* @__PURE__ */ jsx(
1486
+ !isLinkMethod && /* @__PURE__ */ jsxs(VerificationStepCodeContainer, { children: [
1487
+ /* @__PURE__ */ jsx(VerificationStepCodeInputWrapper, { children: /* @__PURE__ */ jsx(
843
1488
  AuthVerificationCodeInput,
844
1489
  {
845
1490
  value: verificationCode,
@@ -860,17 +1505,16 @@ function AuthResetPasswordVerificationStep({
860
1505
  }
861
1506
  )
862
1507
  ] }),
863
- /* @__PURE__ */ jsxs("div", { className: "if-verificationStep-resendContainer", children: [
1508
+ /* @__PURE__ */ jsxs(VerificationStepResendContainer, { children: [
864
1509
  "Didn't receive the email?",
865
1510
  " ",
866
1511
  /* @__PURE__ */ jsx(
867
- "button",
1512
+ VerificationStepResendButton,
868
1513
  {
869
1514
  onClick: () => {
870
1515
  void handleResend();
871
1516
  },
872
1517
  disabled: resendDisabled || isSending,
873
- className: "if-verificationStep-resendButton",
874
1518
  children: isSending ? "Sending..." : resendDisabled ? `Retry in (${resendCountdown}s)` : "Click to resend"
875
1519
  }
876
1520
  )
@@ -916,39 +1560,47 @@ function SignInForm({
916
1560
  onVerifyCode,
917
1561
  emailSent: false
918
1562
  }
919
- ) : /* @__PURE__ */ jsxs("form", { onSubmit, noValidate: true, className: "if-form if-internal-fm9k2p", children: [
920
- /* @__PURE__ */ jsx(
921
- AuthFormField,
922
- {
923
- id: "email",
924
- type: "email",
925
- label: emailLabel,
926
- placeholder: emailPlaceholder,
927
- value: email,
928
- onChange: (e) => onEmailChange(e.target.value),
929
- required: true,
930
- autoComplete: "email"
931
- }
932
- ),
933
- /* @__PURE__ */ jsx(
934
- AuthPasswordField,
935
- {
936
- id: "password",
937
- label: passwordLabel,
938
- placeholder: passwordPlaceholder,
939
- value: password,
940
- onChange: (e) => onPasswordChange(e.target.value),
941
- required: true,
942
- autoComplete: "current-password",
943
- authConfig,
944
- forgotPasswordLink: forgotPasswordUrl ? {
945
- href: forgotPasswordUrl,
946
- text: forgotPasswordText
947
- } : void 0
948
- }
949
- ),
950
- /* @__PURE__ */ jsx(AuthSubmitButton, { isLoading: loading, disabled: loading || oauthLoading !== null, children: loading ? loadingButtonText : submitButtonText })
951
- ] }),
1563
+ ) : /* @__PURE__ */ jsxs(
1564
+ "form",
1565
+ {
1566
+ onSubmit,
1567
+ noValidate: true,
1568
+ style: { display: "flex", flexDirection: "column", gap: theme.spacing[6] },
1569
+ children: [
1570
+ /* @__PURE__ */ jsx(
1571
+ AuthFormField,
1572
+ {
1573
+ id: "email",
1574
+ type: "email",
1575
+ label: emailLabel,
1576
+ placeholder: emailPlaceholder,
1577
+ value: email,
1578
+ onChange: (e) => onEmailChange(e.target.value),
1579
+ required: true,
1580
+ autoComplete: "email"
1581
+ }
1582
+ ),
1583
+ /* @__PURE__ */ jsx(
1584
+ AuthPasswordField,
1585
+ {
1586
+ id: "password",
1587
+ label: passwordLabel,
1588
+ placeholder: passwordPlaceholder,
1589
+ value: password,
1590
+ onChange: (e) => onPasswordChange(e.target.value),
1591
+ required: true,
1592
+ autoComplete: "current-password",
1593
+ authConfig,
1594
+ forgotPasswordLink: forgotPasswordUrl ? {
1595
+ href: forgotPasswordUrl,
1596
+ text: forgotPasswordText
1597
+ } : void 0
1598
+ }
1599
+ ),
1600
+ /* @__PURE__ */ jsx(AuthSubmitButton, { isLoading: loading, disabled: loading || oauthLoading !== null, children: loading ? loadingButtonText : submitButtonText })
1601
+ ]
1602
+ }
1603
+ ),
952
1604
  !showVerificationStep && /* @__PURE__ */ jsxs(Fragment, { children: [
953
1605
  /* @__PURE__ */ jsx(AuthLink, { text: signUpText, linkText: signUpLinkText, href: signUpUrl }),
954
1606
  authConfig.oAuthProviders.length > 0 && onOAuthClick && /* @__PURE__ */ jsxs(Fragment, { children: [
@@ -1100,36 +1752,44 @@ function SignUpForm({
1100
1752
  onVerifyCode,
1101
1753
  emailSent: true
1102
1754
  }
1103
- ) : /* @__PURE__ */ jsxs("form", { onSubmit, noValidate: true, className: "if-form if-internal-fm9k2p", children: [
1104
- /* @__PURE__ */ jsx(
1105
- AuthFormField,
1106
- {
1107
- id: "email",
1108
- type: "email",
1109
- label: emailLabel,
1110
- placeholder: emailPlaceholder,
1111
- value: email,
1112
- onChange: (e) => onEmailChange(e.target.value),
1113
- required: true,
1114
- autoComplete: "email"
1115
- }
1116
- ),
1117
- /* @__PURE__ */ jsx(
1118
- AuthPasswordField,
1119
- {
1120
- id: "password",
1121
- label: passwordLabel,
1122
- placeholder: passwordPlaceholder,
1123
- value: password,
1124
- onChange: (e) => onPasswordChange(e.target.value),
1125
- required: true,
1126
- autoComplete: "new-password",
1127
- showStrengthIndicator: true,
1128
- authConfig
1129
- }
1130
- ),
1131
- /* @__PURE__ */ jsx(AuthSubmitButton, { isLoading: loading, disabled: loading || oauthLoading !== null, children: loading ? loadingButtonText : submitButtonText })
1132
- ] }),
1755
+ ) : /* @__PURE__ */ jsxs(
1756
+ "form",
1757
+ {
1758
+ onSubmit,
1759
+ noValidate: true,
1760
+ style: { display: "flex", flexDirection: "column", gap: theme.spacing[6] },
1761
+ children: [
1762
+ /* @__PURE__ */ jsx(
1763
+ AuthFormField,
1764
+ {
1765
+ id: "email",
1766
+ type: "email",
1767
+ label: emailLabel,
1768
+ placeholder: emailPlaceholder,
1769
+ value: email,
1770
+ onChange: (e) => onEmailChange(e.target.value),
1771
+ required: true,
1772
+ autoComplete: "email"
1773
+ }
1774
+ ),
1775
+ /* @__PURE__ */ jsx(
1776
+ AuthPasswordField,
1777
+ {
1778
+ id: "password",
1779
+ label: passwordLabel,
1780
+ placeholder: passwordPlaceholder,
1781
+ value: password,
1782
+ onChange: (e) => onPasswordChange(e.target.value),
1783
+ required: true,
1784
+ autoComplete: "new-password",
1785
+ showStrengthIndicator: true,
1786
+ authConfig
1787
+ }
1788
+ ),
1789
+ /* @__PURE__ */ jsx(AuthSubmitButton, { isLoading: loading, disabled: loading || oauthLoading !== null, children: loading ? loadingButtonText : submitButtonText })
1790
+ ]
1791
+ }
1792
+ ),
1133
1793
  !showVerificationStep && /* @__PURE__ */ jsxs(Fragment, { children: [
1134
1794
  /* @__PURE__ */ jsx(AuthLink, { text: signInText, linkText: signInLinkText, href: signInUrl }),
1135
1795
  authConfig.oAuthProviders.length > 0 && onOAuthClick && /* @__PURE__ */ jsxs(Fragment, { children: [
@@ -1329,22 +1989,30 @@ function ForgotPasswordForm({
1329
1989
  onResendEmail: onResendEmail || (async () => {
1330
1990
  })
1331
1991
  }
1332
- ) : /* @__PURE__ */ jsxs("form", { onSubmit, noValidate: true, className: "if-form if-internal-fm9k2p", children: [
1333
- /* @__PURE__ */ jsx(
1334
- AuthFormField,
1335
- {
1336
- id: "email",
1337
- type: "email",
1338
- label: emailLabel,
1339
- placeholder: emailPlaceholder,
1340
- value: email,
1341
- onChange: (e) => onEmailChange(e.target.value),
1342
- required: true,
1343
- autoComplete: "email"
1344
- }
1345
- ),
1346
- /* @__PURE__ */ jsx(AuthSubmitButton, { isLoading: loading, disabled: loading, children: loading ? loadingButtonText : submitButtonText })
1347
- ] }),
1992
+ ) : /* @__PURE__ */ jsxs(
1993
+ "form",
1994
+ {
1995
+ onSubmit,
1996
+ noValidate: true,
1997
+ style: { display: "flex", flexDirection: "column", gap: theme.spacing[6] },
1998
+ children: [
1999
+ /* @__PURE__ */ jsx(
2000
+ AuthFormField,
2001
+ {
2002
+ id: "email",
2003
+ type: "email",
2004
+ label: emailLabel,
2005
+ placeholder: emailPlaceholder,
2006
+ value: email,
2007
+ onChange: (e) => onEmailChange(e.target.value),
2008
+ required: true,
2009
+ autoComplete: "email"
2010
+ }
2011
+ ),
2012
+ /* @__PURE__ */ jsx(AuthSubmitButton, { isLoading: loading, disabled: loading, children: loading ? loadingButtonText : submitButtonText })
2013
+ ]
2014
+ }
2015
+ ),
1348
2016
  !showVerificationStep && /* @__PURE__ */ jsx(AuthLink, { text: backToSignInText, linkText: "Back to Sign In", href: backToSignInUrl })
1349
2017
  ] });
1350
2018
  }
@@ -1373,77 +2041,64 @@ function ResetPasswordForm({
1373
2041
  successMessage = "Your password has been successfully reset. You can wait for redirect to sign in with your new password.";
1374
2042
  }
1375
2043
  if (success) {
1376
- return /* @__PURE__ */ jsx(AuthContainer, { children: /* @__PURE__ */ jsxs(
1377
- "div",
2044
+ return /* @__PURE__ */ jsx(AuthContainer, { children: /* @__PURE__ */ jsx(VerifyStatusContainer, { $stretch: true, children: /* @__PURE__ */ jsxs(VerifyStatusSuccessContent, { children: [
2045
+ /* @__PURE__ */ jsx(VerifyStatusSuccessIcon, { children: /* @__PURE__ */ jsx(VerifyStatusSuccessIconSvg, { children: /* @__PURE__ */ jsx(
2046
+ "svg",
2047
+ {
2048
+ fill: "none",
2049
+ strokeLinecap: "round",
2050
+ strokeLinejoin: "round",
2051
+ strokeWidth: "2",
2052
+ viewBox: "0 0 24 24",
2053
+ stroke: "currentColor",
2054
+ children: /* @__PURE__ */ jsx("path", { d: "M5 13l4 4L19 7" })
2055
+ }
2056
+ ) }) }),
2057
+ /* @__PURE__ */ jsx(VerifyStatusTextCenter, { style: { fontSize: "1.5rem", fontWeight: 600 }, children: successTitle }),
2058
+ /* @__PURE__ */ jsx(VerifyStatusTextCenter, { style: { color: theme.colors.textSecondary }, children: successMessage })
2059
+ ] }) }) });
2060
+ }
2061
+ return /* @__PURE__ */ jsxs(AuthContainer, { children: [
2062
+ /* @__PURE__ */ jsx(AuthHeader, { title, subtitle }),
2063
+ /* @__PURE__ */ jsx(AuthErrorBanner, { error: error || "" }),
2064
+ /* @__PURE__ */ jsxs(
2065
+ "form",
1378
2066
  {
1379
- style: { display: "flex", flexDirection: "column", alignItems: "center", gap: "1rem" },
2067
+ onSubmit,
2068
+ noValidate: true,
2069
+ style: { display: "flex", flexDirection: "column", gap: theme.spacing[6] },
1380
2070
  children: [
1381
2071
  /* @__PURE__ */ jsx(
1382
- "div",
2072
+ AuthPasswordField,
1383
2073
  {
1384
- style: {
1385
- width: "4rem",
1386
- height: "4rem",
1387
- borderRadius: "50%",
1388
- backgroundColor: "#D1FAE5",
1389
- display: "flex",
1390
- alignItems: "center",
1391
- justifyContent: "center"
1392
- },
1393
- children: /* @__PURE__ */ jsx(
1394
- "svg",
1395
- {
1396
- style: { width: "2rem", height: "2rem", color: "#059669" },
1397
- fill: "none",
1398
- strokeLinecap: "round",
1399
- strokeLinejoin: "round",
1400
- strokeWidth: "2",
1401
- viewBox: "0 0 24 24",
1402
- stroke: "currentColor",
1403
- children: /* @__PURE__ */ jsx("path", { d: "M5 13l4 4L19 7" })
1404
- }
1405
- )
2074
+ id: "newPassword",
2075
+ label: newPasswordLabel,
2076
+ placeholder: newPasswordPlaceholder,
2077
+ value: newPassword,
2078
+ onChange: (e) => onNewPasswordChange(e.target.value),
2079
+ required: true,
2080
+ autoComplete: "new-password",
2081
+ showStrengthIndicator: true,
2082
+ authConfig
1406
2083
  }
1407
2084
  ),
1408
- /* @__PURE__ */ jsx("h2", { className: "if-authHeader-title", style: { textAlign: "center" }, children: successTitle }),
1409
- /* @__PURE__ */ jsx("p", { className: "if-authHeader-subtitle", style: { textAlign: "center" }, children: successMessage })
2085
+ /* @__PURE__ */ jsx(
2086
+ AuthPasswordField,
2087
+ {
2088
+ id: "confirmPassword",
2089
+ label: confirmPasswordLabel,
2090
+ placeholder: confirmPasswordPlaceholder,
2091
+ value: confirmPassword,
2092
+ onChange: (e) => onConfirmPasswordChange(e.target.value),
2093
+ required: true,
2094
+ autoComplete: "new-password",
2095
+ authConfig
2096
+ }
2097
+ ),
2098
+ /* @__PURE__ */ jsx(AuthSubmitButton, { isLoading: loading, disabled: loading, children: loading ? loadingButtonText : submitButtonText })
1410
2099
  ]
1411
2100
  }
1412
- ) });
1413
- }
1414
- return /* @__PURE__ */ jsxs(AuthContainer, { children: [
1415
- /* @__PURE__ */ jsx(AuthHeader, { title, subtitle }),
1416
- /* @__PURE__ */ jsx(AuthErrorBanner, { error: error || "" }),
1417
- /* @__PURE__ */ jsxs("form", { onSubmit, noValidate: true, className: "if-form if-internal-fm9k2p", children: [
1418
- /* @__PURE__ */ jsx(
1419
- AuthPasswordField,
1420
- {
1421
- id: "newPassword",
1422
- label: newPasswordLabel,
1423
- placeholder: newPasswordPlaceholder,
1424
- value: newPassword,
1425
- onChange: (e) => onNewPasswordChange(e.target.value),
1426
- required: true,
1427
- autoComplete: "new-password",
1428
- showStrengthIndicator: true,
1429
- authConfig
1430
- }
1431
- ),
1432
- /* @__PURE__ */ jsx(
1433
- AuthPasswordField,
1434
- {
1435
- id: "confirmPassword",
1436
- label: confirmPasswordLabel,
1437
- placeholder: confirmPasswordPlaceholder,
1438
- value: confirmPassword,
1439
- onChange: (e) => onConfirmPasswordChange(e.target.value),
1440
- required: true,
1441
- autoComplete: "new-password",
1442
- authConfig
1443
- }
1444
- ),
1445
- /* @__PURE__ */ jsx(AuthSubmitButton, { isLoading: loading, disabled: loading, children: loading ? loadingButtonText : submitButtonText })
1446
- ] })
2101
+ )
1447
2102
  ] });
1448
2103
  }
1449
2104
  function ForgotPassword({ onError, ...uiProps }) {
@@ -1788,25 +2443,24 @@ function VerifyEmailStatus({
1788
2443
  errorTitle = "Verification Failed"
1789
2444
  }) {
1790
2445
  if (status === "verifying") {
1791
- return /* @__PURE__ */ jsx(AuthContainer, { children: /* @__PURE__ */ jsxs("div", { className: "if-verifyStatus-container", children: [
1792
- /* @__PURE__ */ jsx("h2", { className: "if-authHeader-title", children: verifyingTitle }),
1793
- /* @__PURE__ */ jsx("div", { className: "if-submitButton-spinner if-verifyStatus-spinner" })
2446
+ return /* @__PURE__ */ jsx(AuthContainer, { children: /* @__PURE__ */ jsxs(VerifyStatusContainer, { children: [
2447
+ /* @__PURE__ */ jsx(AuthHeader, { title: verifyingTitle }),
2448
+ /* @__PURE__ */ jsx(VerifyStatusSpinner, {})
1794
2449
  ] }) });
1795
2450
  }
1796
2451
  if (status === "error") {
1797
- return /* @__PURE__ */ jsx(AuthContainer, { children: /* @__PURE__ */ jsx("div", { className: "if-verifyStatus-container-stretch", children: /* @__PURE__ */ jsxs("div", { className: "if-authHeader if-internal-h3m7w5", children: [
1798
- /* @__PURE__ */ jsx("h1", { className: "if-authHeader-title if-internal-t4p1k9", children: errorTitle }),
1799
- /* @__PURE__ */ jsxs("p", { className: "if-authHeader-subtitle if-internal-s7q2m3", children: [
1800
- error || "The verification link is invalid or has expired.",
1801
- " Please try again or contact support if the problem persists. You can close this page and return to your app."
1802
- ] })
1803
- ] }) }) });
2452
+ return /* @__PURE__ */ jsx(AuthContainer, { children: /* @__PURE__ */ jsx(VerifyStatusContainer, { $stretch: true, children: /* @__PURE__ */ jsx(
2453
+ AuthHeader,
2454
+ {
2455
+ title: errorTitle,
2456
+ 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.`
2457
+ }
2458
+ ) }) });
1804
2459
  }
1805
- return /* @__PURE__ */ jsx(AuthContainer, { children: /* @__PURE__ */ jsx("div", { className: "if-verifyStatus-container-stretch", children: /* @__PURE__ */ jsxs("div", { className: "if-verifyStatus-successContent", children: [
1806
- /* @__PURE__ */ jsx("div", { className: "if-verifyStatus-successIcon", children: /* @__PURE__ */ jsx(
2460
+ return /* @__PURE__ */ jsx(AuthContainer, { children: /* @__PURE__ */ jsx(VerifyStatusContainer, { $stretch: true, children: /* @__PURE__ */ jsxs(VerifyStatusSuccessContent, { children: [
2461
+ /* @__PURE__ */ jsx(VerifyStatusSuccessIcon, { children: /* @__PURE__ */ jsx(VerifyStatusSuccessIconSvg, { children: /* @__PURE__ */ jsx(
1807
2462
  "svg",
1808
2463
  {
1809
- className: "if-verifyStatus-successIconSvg",
1810
2464
  fill: "none",
1811
2465
  strokeLinecap: "round",
1812
2466
  strokeLinejoin: "round",
@@ -1815,9 +2469,9 @@ function VerifyEmailStatus({
1815
2469
  stroke: "currentColor",
1816
2470
  children: /* @__PURE__ */ jsx("path", { d: "M5 13l4 4L19 7" })
1817
2471
  }
1818
- ) }),
1819
- /* @__PURE__ */ jsx("h2", { className: "if-authHeader-title if-verifyStatus-textCenter", children: successTitle }),
1820
- /* @__PURE__ */ jsx("p", { className: "if-authHeader-subtitle if-verifyStatus-textCenter", children: successMessage })
2472
+ ) }) }),
2473
+ /* @__PURE__ */ jsx(VerifyStatusTextCenter, { style: { fontSize: "1.5rem", fontWeight: 600 }, children: successTitle }),
2474
+ /* @__PURE__ */ jsx(VerifyStatusTextCenter, { style: { color: theme.colors.textSecondary }, children: successMessage })
1821
2475
  ] }) }) });
1822
2476
  }
1823
2477
  function VerifyEmail({ token, onSuccess, onError, ...uiProps }) {
@@ -1867,6 +2521,120 @@ function VerifyEmail({ token, onSuccess, onError, ...uiProps }) {
1867
2521
  }, [token, verifyEmail, onSuccess, onError]);
1868
2522
  return /* @__PURE__ */ jsx(VerifyEmailStatus, { status, error, ...uiProps });
1869
2523
  }
2524
+ var UserButtonContainer = styled.div`
2525
+ position: relative;
2526
+ display: inline-block;
2527
+ `;
2528
+ var UserButtonButton = styled.button`
2529
+ display: flex;
2530
+ align-items: center;
2531
+ justify-content: center;
2532
+ gap: ${theme.spacing[2]};
2533
+ padding: ${theme.spacing[2]};
2534
+ border-radius: ${(props) => props.$detailed ? theme.radius.sm : theme.radius.full};
2535
+ background-color: ${(props) => props.$detailed ? theme.colors.bgWhite : "transparent"};
2536
+ border: ${(props) => props.$detailed ? `1px solid ${theme.colors.border}` : "none"};
2537
+ cursor: pointer;
2538
+ transition: all ${theme.transition.base};
2539
+
2540
+ &:hover {
2541
+ ${(props) => props.$detailed ? `
2542
+ background-color: ${theme.colors.bgLight};
2543
+ opacity: 1;
2544
+ ` : `
2545
+ opacity: 0.8;
2546
+ `}
2547
+ }
2548
+ `;
2549
+ var UserButtonAvatar = styled.div`
2550
+ width: 2rem;
2551
+ height: 2rem;
2552
+ border-radius: ${theme.radius.full};
2553
+ background-color: ${theme.colors.primary};
2554
+ color: ${theme.colors.bgWhite};
2555
+ display: flex;
2556
+ align-items: center;
2557
+ justify-content: center;
2558
+ font-weight: 600;
2559
+ font-size: ${theme.fontSize.sm};
2560
+ font-family: ${theme.fontFamily.base};
2561
+ overflow: hidden;
2562
+ `;
2563
+ var UserButtonAvatarImage = styled.img`
2564
+ border-radius: ${theme.radius.full};
2565
+ object-fit: cover;
2566
+ width: 100%;
2567
+ height: 100%;
2568
+ `;
2569
+ var UserButtonAvatarInitials = styled.span`
2570
+ color: ${theme.colors.bgWhite};
2571
+ font-weight: 600;
2572
+ font-size: ${theme.fontSize.sm};
2573
+ `;
2574
+ var UserButtonInfo = styled.div`
2575
+ display: flex;
2576
+ flex-direction: column;
2577
+ align-items: flex-start;
2578
+ gap: 0.125rem;
2579
+ `;
2580
+ var UserButtonName = styled.div`
2581
+ font-size: ${theme.fontSize.sm};
2582
+ font-weight: 600;
2583
+ color: ${theme.colors.text};
2584
+ line-height: 1.25rem;
2585
+ text-align: left;
2586
+ font-family: ${theme.fontFamily.base};
2587
+ `;
2588
+ var UserButtonEmail = styled.div`
2589
+ font-size: ${theme.fontSize.xs};
2590
+ color: ${theme.colors.textSecondary};
2591
+ line-height: 1rem;
2592
+ text-align: left;
2593
+ font-family: ${theme.fontFamily.base};
2594
+ `;
2595
+ var UserButtonMenu = styled.div`
2596
+ position: absolute;
2597
+ margin-top: ${theme.spacing[2]};
2598
+ background-color: ${theme.colors.bgWhite};
2599
+ border: 1px solid ${theme.colors.border};
2600
+ border-radius: ${theme.radius.md};
2601
+ box-shadow: ${theme.shadow.lg};
2602
+ padding: ${theme.spacing[2]};
2603
+ min-width: 200px;
2604
+ z-index: 50;
2605
+ `;
2606
+ var UserButtonMenuItem = styled.button`
2607
+ display: flex;
2608
+ align-items: center;
2609
+ gap: ${theme.spacing[2]};
2610
+ padding: ${theme.spacing[2]};
2611
+ border-radius: ${theme.radius.sm};
2612
+ cursor: pointer;
2613
+ transition: background-color ${theme.transition.fast};
2614
+ font-size: ${theme.fontSize.sm};
2615
+ color: ${(props) => props.$signout ? theme.colors.error : theme.colors.text};
2616
+ font-family: ${theme.fontFamily.base};
2617
+ background: none;
2618
+ border: none;
2619
+ width: 100%;
2620
+ text-align: left;
2621
+
2622
+ &:hover {
2623
+ background-color: ${theme.colors.bgLight};
2624
+ }
2625
+ `;
2626
+ var UserButtonMenuItemIcon = styled.div`
2627
+ width: 1.25rem;
2628
+ height: 1.25rem;
2629
+ display: flex;
2630
+ align-items: center;
2631
+ justify-content: center;
2632
+
2633
+ svg {
2634
+ width: 100%;
2635
+ height: 100%;
2636
+ }
2637
+ `;
1870
2638
  function UserButton({ afterSignOutUrl = "/", mode = "detailed" }) {
1871
2639
  const { user, signOut } = useInsforge();
1872
2640
  const [isOpen, setIsOpen] = useState(false);
@@ -1918,43 +2686,34 @@ function UserButton({ afterSignOutUrl = "/", mode = "detailed" }) {
1918
2686
  return null;
1919
2687
  }
1920
2688
  const initials = user.name ? user.name.charAt(0).toUpperCase() : user.email.split("@")[0].slice(0, 2).toUpperCase();
1921
- const buttonClassName = mode === "detailed" ? "if-userButton if-userButton-detailed" : "if-userButton";
1922
- return /* @__PURE__ */ jsxs("div", { className: "if-userButton-container if-internal-ub3k8p", ref: dropdownRef, children: [
2689
+ return /* @__PURE__ */ jsxs(UserButtonContainer, { ref: dropdownRef, children: [
1923
2690
  /* @__PURE__ */ jsxs(
1924
- "button",
2691
+ UserButtonButton,
1925
2692
  {
1926
- className: buttonClassName,
2693
+ $detailed: mode === "detailed",
1927
2694
  onClick: () => setIsOpen(!isOpen),
1928
2695
  "aria-expanded": isOpen,
1929
2696
  "aria-haspopup": "true",
1930
2697
  children: [
1931
- /* @__PURE__ */ jsx("div", { className: "if-userButton-avatar", children: user.avatarUrl && !imageError ? /* @__PURE__ */ jsx(
1932
- "img",
2698
+ /* @__PURE__ */ jsx(UserButtonAvatar, { children: user.avatarUrl && !imageError ? /* @__PURE__ */ jsx(
2699
+ UserButtonAvatarImage,
1933
2700
  {
1934
2701
  src: user.avatarUrl,
1935
2702
  alt: user.email,
1936
- onError: () => setImageError(true),
1937
- className: "if-userButton-avatarImage"
2703
+ onError: () => setImageError(true)
1938
2704
  }
1939
- ) : /* @__PURE__ */ jsx("span", { className: "if-userButton-avatarInitials", children: initials }) }),
1940
- mode === "detailed" && /* @__PURE__ */ jsxs("div", { className: "if-userButton-info", children: [
1941
- user.name && /* @__PURE__ */ jsx("div", { className: "if-userButton-name", children: user.name }),
1942
- /* @__PURE__ */ jsx("div", { className: "if-userButton-email", children: user.email })
2705
+ ) : /* @__PURE__ */ jsx(UserButtonAvatarInitials, { children: initials }) }),
2706
+ mode === "detailed" && /* @__PURE__ */ jsxs(UserButtonInfo, { children: [
2707
+ user.name && /* @__PURE__ */ jsx(UserButtonName, { children: user.name }),
2708
+ /* @__PURE__ */ jsx(UserButtonEmail, { children: user.email })
1943
2709
  ] })
1944
2710
  ]
1945
2711
  }
1946
2712
  ),
1947
- isOpen && /* @__PURE__ */ jsx("div", { className: "if-userButton-menu", children: /* @__PURE__ */ jsxs(
1948
- "button",
1949
- {
1950
- onClick: () => void handleSignOut(),
1951
- className: "if-userButton-menuItem if-userButton-menuItem-signout",
1952
- children: [
1953
- /* @__PURE__ */ jsx(LogOut, { className: "if-userButton-menuItem-icon" }),
1954
- "Sign out"
1955
- ]
1956
- }
1957
- ) })
2713
+ isOpen && /* @__PURE__ */ jsx(UserButtonMenu, { children: /* @__PURE__ */ jsxs(UserButtonMenuItem, { $signout: true, onClick: () => void handleSignOut(), children: [
2714
+ /* @__PURE__ */ jsx(UserButtonMenuItemIcon, { children: /* @__PURE__ */ jsx(LogOut, {}) }),
2715
+ "Sign out"
2716
+ ] }) })
1958
2717
  ] });
1959
2718
  }
1960
2719
  function Protect({