@insforge/react 0.1.7 → 0.2.0

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.
@@ -789,72 +789,129 @@ function SignInForm({
789
789
  signUpUrl = "/sign-up",
790
790
  dividerText = "or"
791
791
  }) {
792
- return /* @__PURE__ */ jsxRuntime.jsxs(AuthContainer, { appearance, children: [
793
- /* @__PURE__ */ jsxRuntime.jsx(AuthHeader, { title, subtitle }),
794
- /* @__PURE__ */ jsxRuntime.jsx(AuthErrorBanner, { error: error || "" }),
795
- /* @__PURE__ */ jsxRuntime.jsxs(
796
- "form",
797
- {
798
- onSubmit,
799
- noValidate: true,
800
- className: "flex flex-col items-stretch justify-center gap-6",
801
- children: [
802
- /* @__PURE__ */ jsxRuntime.jsx(
803
- AuthFormField,
804
- {
805
- id: "email",
806
- type: "email",
807
- label: emailLabel,
808
- placeholder: emailPlaceholder,
809
- value: email,
810
- onChange: (e) => onEmailChange(e.target.value),
811
- required: true,
812
- autoComplete: "email"
792
+ return /* @__PURE__ */ jsxRuntime.jsxs(
793
+ AuthContainer,
794
+ {
795
+ appearance: {
796
+ containerClassName: appearance.container,
797
+ cardClassName: appearance.card
798
+ },
799
+ children: [
800
+ /* @__PURE__ */ jsxRuntime.jsx(
801
+ AuthHeader,
802
+ {
803
+ title,
804
+ subtitle,
805
+ appearance: {
806
+ containerClassName: appearance.header?.container,
807
+ titleClassName: appearance.header?.title,
808
+ subtitleClassName: appearance.header?.subtitle
813
809
  }
814
- ),
810
+ }
811
+ ),
812
+ /* @__PURE__ */ jsxRuntime.jsx(
813
+ AuthErrorBanner,
814
+ {
815
+ error: error || "",
816
+ className: appearance.errorBanner
817
+ }
818
+ ),
819
+ /* @__PURE__ */ jsxRuntime.jsxs(
820
+ "form",
821
+ {
822
+ onSubmit,
823
+ noValidate: true,
824
+ className: appearance.form?.container || "flex flex-col items-stretch justify-center gap-6",
825
+ children: [
826
+ /* @__PURE__ */ jsxRuntime.jsx(
827
+ AuthFormField,
828
+ {
829
+ id: "email",
830
+ type: "email",
831
+ label: emailLabel,
832
+ placeholder: emailPlaceholder,
833
+ value: email,
834
+ onChange: (e) => onEmailChange(e.target.value),
835
+ required: true,
836
+ autoComplete: "email",
837
+ appearance: {
838
+ containerClassName: appearance.form?.emailField?.container,
839
+ labelClassName: appearance.form?.emailField?.label,
840
+ inputClassName: appearance.form?.emailField?.input
841
+ }
842
+ }
843
+ ),
844
+ /* @__PURE__ */ jsxRuntime.jsx(
845
+ AuthPasswordField,
846
+ {
847
+ id: "password",
848
+ label: passwordLabel,
849
+ placeholder: passwordPlaceholder,
850
+ value: password,
851
+ onChange: (e) => onPasswordChange(e.target.value),
852
+ required: true,
853
+ autoComplete: "current-password",
854
+ emailAuthConfig,
855
+ forgotPasswordLink: forgotPasswordUrl ? {
856
+ href: forgotPasswordUrl,
857
+ text: forgotPasswordText
858
+ } : void 0,
859
+ appearance: {
860
+ containerClassName: appearance.form?.passwordField?.container,
861
+ labelClassName: appearance.form?.passwordField?.label,
862
+ inputClassName: appearance.form?.passwordField?.input
863
+ }
864
+ }
865
+ ),
866
+ /* @__PURE__ */ jsxRuntime.jsx(
867
+ AuthSubmitButton,
868
+ {
869
+ isLoading: loading,
870
+ disabled: loading || oauthLoading !== null,
871
+ className: appearance.button,
872
+ children: loading ? loadingButtonText : submitButtonText
873
+ }
874
+ )
875
+ ]
876
+ }
877
+ ),
878
+ /* @__PURE__ */ jsxRuntime.jsx(
879
+ AuthLink,
880
+ {
881
+ text: signUpText,
882
+ linkText: signUpLinkText,
883
+ href: signUpUrl,
884
+ appearance: {
885
+ containerClassName: appearance.link?.container,
886
+ linkClassName: appearance.link?.link
887
+ }
888
+ }
889
+ ),
890
+ availableProviders.length > 0 && onOAuthClick && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
815
891
  /* @__PURE__ */ jsxRuntime.jsx(
816
- AuthPasswordField,
892
+ AuthDivider,
817
893
  {
818
- id: "password",
819
- label: passwordLabel,
820
- placeholder: passwordPlaceholder,
821
- value: password,
822
- onChange: (e) => onPasswordChange(e.target.value),
823
- required: true,
824
- autoComplete: "current-password",
825
- emailAuthConfig,
826
- forgotPasswordLink: forgotPasswordUrl ? {
827
- href: forgotPasswordUrl,
828
- text: forgotPasswordText
829
- } : void 0
894
+ text: dividerText,
895
+ className: appearance.divider
830
896
  }
831
897
  ),
832
898
  /* @__PURE__ */ jsxRuntime.jsx(
833
- AuthSubmitButton,
899
+ AuthOAuthProviders,
834
900
  {
835
- isLoading: loading,
901
+ providers: availableProviders,
902
+ onClick: onOAuthClick,
836
903
  disabled: loading || oauthLoading !== null,
837
- className: appearance.buttonClassName,
838
- children: loading ? loadingButtonText : submitButtonText
904
+ loading: oauthLoading,
905
+ appearance: {
906
+ containerClassName: appearance.oauth?.container,
907
+ buttonClassName: appearance.oauth?.button
908
+ }
839
909
  }
840
910
  )
841
- ]
842
- }
843
- ),
844
- /* @__PURE__ */ jsxRuntime.jsx(AuthLink, { text: signUpText, linkText: signUpLinkText, href: signUpUrl }),
845
- availableProviders.length > 0 && onOAuthClick && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
846
- /* @__PURE__ */ jsxRuntime.jsx(AuthDivider, { text: dividerText }),
847
- /* @__PURE__ */ jsxRuntime.jsx(
848
- AuthOAuthProviders,
849
- {
850
- providers: availableProviders,
851
- onClick: onOAuthClick,
852
- disabled: loading || oauthLoading !== null,
853
- loading: oauthLoading
854
- }
855
- )
856
- ] })
857
- ] });
911
+ ] })
912
+ ]
913
+ }
914
+ );
858
915
  }
859
916
  function SignIn({
860
917
  afterSignInUrl = "/",
@@ -961,70 +1018,127 @@ function SignUpForm({
961
1018
  signInUrl = "/sign-in",
962
1019
  dividerText = "or"
963
1020
  }) {
964
- return /* @__PURE__ */ jsxRuntime.jsxs(AuthContainer, { appearance, children: [
965
- /* @__PURE__ */ jsxRuntime.jsx(AuthHeader, { title, subtitle }),
966
- /* @__PURE__ */ jsxRuntime.jsx(AuthErrorBanner, { error: error || "" }),
967
- /* @__PURE__ */ jsxRuntime.jsxs(
968
- "form",
969
- {
970
- onSubmit,
971
- noValidate: true,
972
- className: "flex flex-col items-stretch justify-center gap-6",
973
- children: [
974
- /* @__PURE__ */ jsxRuntime.jsx(
975
- AuthFormField,
976
- {
977
- id: "email",
978
- type: "email",
979
- label: emailLabel,
980
- placeholder: emailPlaceholder,
981
- value: email,
982
- onChange: (e) => onEmailChange(e.target.value),
983
- required: true,
984
- autoComplete: "email"
1021
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1022
+ AuthContainer,
1023
+ {
1024
+ appearance: {
1025
+ containerClassName: appearance.container,
1026
+ cardClassName: appearance.card
1027
+ },
1028
+ children: [
1029
+ /* @__PURE__ */ jsxRuntime.jsx(
1030
+ AuthHeader,
1031
+ {
1032
+ title,
1033
+ subtitle,
1034
+ appearance: {
1035
+ containerClassName: appearance.header?.container,
1036
+ titleClassName: appearance.header?.title,
1037
+ subtitleClassName: appearance.header?.subtitle
985
1038
  }
986
- ),
1039
+ }
1040
+ ),
1041
+ /* @__PURE__ */ jsxRuntime.jsx(
1042
+ AuthErrorBanner,
1043
+ {
1044
+ error: error || "",
1045
+ className: appearance.errorBanner
1046
+ }
1047
+ ),
1048
+ /* @__PURE__ */ jsxRuntime.jsxs(
1049
+ "form",
1050
+ {
1051
+ onSubmit,
1052
+ noValidate: true,
1053
+ className: appearance.form?.container || "flex flex-col items-stretch justify-center gap-6",
1054
+ children: [
1055
+ /* @__PURE__ */ jsxRuntime.jsx(
1056
+ AuthFormField,
1057
+ {
1058
+ id: "email",
1059
+ type: "email",
1060
+ label: emailLabel,
1061
+ placeholder: emailPlaceholder,
1062
+ value: email,
1063
+ onChange: (e) => onEmailChange(e.target.value),
1064
+ required: true,
1065
+ autoComplete: "email",
1066
+ appearance: {
1067
+ containerClassName: appearance.form?.emailField?.container,
1068
+ labelClassName: appearance.form?.emailField?.label,
1069
+ inputClassName: appearance.form?.emailField?.input
1070
+ }
1071
+ }
1072
+ ),
1073
+ /* @__PURE__ */ jsxRuntime.jsx(
1074
+ AuthPasswordField,
1075
+ {
1076
+ id: "password",
1077
+ label: passwordLabel,
1078
+ placeholder: passwordPlaceholder,
1079
+ value: password,
1080
+ onChange: (e) => onPasswordChange(e.target.value),
1081
+ required: true,
1082
+ minLength: emailAuthConfig.email.passwordMinLength,
1083
+ autoComplete: "new-password",
1084
+ showStrengthIndicator: true,
1085
+ emailAuthConfig,
1086
+ appearance: {
1087
+ containerClassName: appearance.form?.passwordField?.container,
1088
+ labelClassName: appearance.form?.passwordField?.label,
1089
+ inputClassName: appearance.form?.passwordField?.input
1090
+ }
1091
+ }
1092
+ ),
1093
+ /* @__PURE__ */ jsxRuntime.jsx(
1094
+ AuthSubmitButton,
1095
+ {
1096
+ isLoading: loading,
1097
+ disabled: loading || oauthLoading !== null,
1098
+ className: appearance.button,
1099
+ children: loading ? loadingButtonText : submitButtonText
1100
+ }
1101
+ )
1102
+ ]
1103
+ }
1104
+ ),
1105
+ /* @__PURE__ */ jsxRuntime.jsx(
1106
+ AuthLink,
1107
+ {
1108
+ text: signInText,
1109
+ linkText: signInLinkText,
1110
+ href: signInUrl,
1111
+ appearance: {
1112
+ containerClassName: appearance.link?.container,
1113
+ linkClassName: appearance.link?.link
1114
+ }
1115
+ }
1116
+ ),
1117
+ availableProviders.length > 0 && onOAuthClick && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
987
1118
  /* @__PURE__ */ jsxRuntime.jsx(
988
- AuthPasswordField,
1119
+ AuthDivider,
989
1120
  {
990
- id: "password",
991
- label: passwordLabel,
992
- placeholder: passwordPlaceholder,
993
- value: password,
994
- onChange: (e) => onPasswordChange(e.target.value),
995
- required: true,
996
- minLength: emailAuthConfig.email.passwordMinLength,
997
- autoComplete: "new-password",
998
- showStrengthIndicator: true,
999
- emailAuthConfig
1121
+ text: dividerText,
1122
+ className: appearance.divider
1000
1123
  }
1001
1124
  ),
1002
1125
  /* @__PURE__ */ jsxRuntime.jsx(
1003
- AuthSubmitButton,
1126
+ AuthOAuthProviders,
1004
1127
  {
1005
- isLoading: loading,
1128
+ providers: availableProviders,
1129
+ onClick: onOAuthClick,
1006
1130
  disabled: loading || oauthLoading !== null,
1007
- className: appearance.buttonClassName,
1008
- children: loading ? loadingButtonText : submitButtonText
1131
+ loading: oauthLoading,
1132
+ appearance: {
1133
+ containerClassName: appearance.oauth?.container,
1134
+ buttonClassName: appearance.oauth?.button
1135
+ }
1009
1136
  }
1010
1137
  )
1011
- ]
1012
- }
1013
- ),
1014
- /* @__PURE__ */ jsxRuntime.jsx(AuthLink, { text: signInText, linkText: signInLinkText, href: signInUrl }),
1015
- availableProviders.length > 0 && onOAuthClick && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1016
- /* @__PURE__ */ jsxRuntime.jsx(AuthDivider, { text: dividerText }),
1017
- /* @__PURE__ */ jsxRuntime.jsx(
1018
- AuthOAuthProviders,
1019
- {
1020
- providers: availableProviders,
1021
- onClick: onOAuthClick,
1022
- disabled: loading || oauthLoading !== null,
1023
- loading: oauthLoading
1024
- }
1025
- )
1026
- ] })
1027
- ] });
1138
+ ] })
1139
+ ]
1140
+ }
1141
+ );
1028
1142
  }
1029
1143
  function SignUp({
1030
1144
  afterSignUpUrl = "/",
@@ -1370,57 +1484,101 @@ function ForgotPasswordForm({
1370
1484
  successMessage
1371
1485
  }) {
1372
1486
  if (success) {
1373
- return /* @__PURE__ */ jsxRuntime.jsx(AuthContainer, { appearance, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center gap-4", children: [
1374
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-16 h-16 rounded-full bg-green-100 dark:bg-green-900 flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx("svg", { className: "w-8 h-8 text-green-600 dark:text-green-400", fill: "none", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M5 13l4 4L19 7" }) }) }),
1375
- /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-2xl font-semibold text-black dark:text-white text-center", children: successTitle }),
1376
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-neutral-600 dark:text-neutral-400 text-center", children: successMessage || `We've sent a password reset link to ${email}. Please check your email and follow the instructions.` }),
1377
- /* @__PURE__ */ jsxRuntime.jsx("a", { href: backToSignInUrl, className: "mt-4 text-black dark:text-white font-medium", children: "Back to Sign In" })
1378
- ] }) });
1379
- }
1380
- return /* @__PURE__ */ jsxRuntime.jsxs(AuthContainer, { appearance, children: [
1381
- /* @__PURE__ */ jsxRuntime.jsx(AuthHeader, { title, subtitle }),
1382
- /* @__PURE__ */ jsxRuntime.jsx(AuthErrorBanner, { error: error || "" }),
1383
- /* @__PURE__ */ jsxRuntime.jsxs(
1384
- "form",
1487
+ return /* @__PURE__ */ jsxRuntime.jsx(
1488
+ AuthContainer,
1385
1489
  {
1386
- onSubmit,
1387
- noValidate: true,
1388
- className: "flex flex-col items-stretch justify-center gap-6",
1389
- children: [
1390
- /* @__PURE__ */ jsxRuntime.jsx(
1391
- AuthFormField,
1392
- {
1393
- id: "email",
1394
- type: "email",
1395
- label: emailLabel,
1396
- placeholder: emailPlaceholder,
1397
- value: email,
1398
- onChange: (e) => onEmailChange(e.target.value),
1399
- required: true,
1400
- autoComplete: "email"
1490
+ appearance: {
1491
+ containerClassName: appearance.container,
1492
+ cardClassName: appearance.card
1493
+ },
1494
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center gap-4", children: [
1495
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-16 h-16 rounded-full bg-green-100 dark:bg-green-900 flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx("svg", { className: "w-8 h-8 text-green-600 dark:text-green-400", fill: "none", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M5 13l4 4L19 7" }) }) }),
1496
+ /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-2xl font-semibold text-black dark:text-white text-center", children: successTitle }),
1497
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-neutral-600 dark:text-neutral-400 text-center", children: successMessage || `We've sent a password reset link to ${email}. Please check your email and follow the instructions.` }),
1498
+ /* @__PURE__ */ jsxRuntime.jsx("a", { href: backToSignInUrl, className: "mt-4 text-black dark:text-white font-medium", children: "Back to Sign In" })
1499
+ ] })
1500
+ }
1501
+ );
1502
+ }
1503
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1504
+ AuthContainer,
1505
+ {
1506
+ appearance: {
1507
+ containerClassName: appearance.container,
1508
+ cardClassName: appearance.card
1509
+ },
1510
+ children: [
1511
+ /* @__PURE__ */ jsxRuntime.jsx(
1512
+ AuthHeader,
1513
+ {
1514
+ title,
1515
+ subtitle,
1516
+ appearance: {
1517
+ containerClassName: appearance.header?.container,
1518
+ titleClassName: appearance.header?.title,
1519
+ subtitleClassName: appearance.header?.subtitle
1401
1520
  }
1402
- ),
1403
- /* @__PURE__ */ jsxRuntime.jsx(
1404
- AuthSubmitButton,
1405
- {
1406
- isLoading: loading,
1407
- disabled: loading,
1408
- className: appearance.buttonClassName,
1409
- children: loading ? loadingButtonText : submitButtonText
1521
+ }
1522
+ ),
1523
+ /* @__PURE__ */ jsxRuntime.jsx(
1524
+ AuthErrorBanner,
1525
+ {
1526
+ error: error || "",
1527
+ className: appearance.errorBanner
1528
+ }
1529
+ ),
1530
+ /* @__PURE__ */ jsxRuntime.jsxs(
1531
+ "form",
1532
+ {
1533
+ onSubmit,
1534
+ noValidate: true,
1535
+ className: appearance.form?.container || "flex flex-col items-stretch justify-center gap-6",
1536
+ children: [
1537
+ /* @__PURE__ */ jsxRuntime.jsx(
1538
+ AuthFormField,
1539
+ {
1540
+ id: "email",
1541
+ type: "email",
1542
+ label: emailLabel,
1543
+ placeholder: emailPlaceholder,
1544
+ value: email,
1545
+ onChange: (e) => onEmailChange(e.target.value),
1546
+ required: true,
1547
+ autoComplete: "email",
1548
+ appearance: {
1549
+ containerClassName: appearance.form?.emailField?.container,
1550
+ labelClassName: appearance.form?.emailField?.label,
1551
+ inputClassName: appearance.form?.emailField?.input
1552
+ }
1553
+ }
1554
+ ),
1555
+ /* @__PURE__ */ jsxRuntime.jsx(
1556
+ AuthSubmitButton,
1557
+ {
1558
+ isLoading: loading,
1559
+ disabled: loading,
1560
+ className: appearance.button,
1561
+ children: loading ? loadingButtonText : submitButtonText
1562
+ }
1563
+ )
1564
+ ]
1565
+ }
1566
+ ),
1567
+ /* @__PURE__ */ jsxRuntime.jsx(
1568
+ AuthLink,
1569
+ {
1570
+ text: backToSignInText,
1571
+ linkText: "Back to Sign In",
1572
+ href: backToSignInUrl,
1573
+ appearance: {
1574
+ containerClassName: appearance.link?.container,
1575
+ linkClassName: appearance.link?.link
1410
1576
  }
1411
- )
1412
- ]
1413
- }
1414
- ),
1415
- /* @__PURE__ */ jsxRuntime.jsx(
1416
- AuthLink,
1417
- {
1418
- text: backToSignInText,
1419
- linkText: "Back to Sign In",
1420
- href: backToSignInUrl
1421
- }
1422
- )
1423
- ] });
1577
+ }
1578
+ )
1579
+ ]
1580
+ }
1581
+ );
1424
1582
  }
1425
1583
  function ResetPasswordForm({
1426
1584
  newPassword,
@@ -1443,63 +1601,99 @@ function ResetPasswordForm({
1443
1601
  backToSignInText = "",
1444
1602
  backToSignInUrl = "/sign-in"
1445
1603
  }) {
1446
- return /* @__PURE__ */ jsxRuntime.jsxs(AuthContainer, { appearance, children: [
1447
- /* @__PURE__ */ jsxRuntime.jsx(AuthHeader, { title, subtitle }),
1448
- /* @__PURE__ */ jsxRuntime.jsx(AuthErrorBanner, { error: error || "" }),
1449
- /* @__PURE__ */ jsxRuntime.jsxs(
1450
- "form",
1451
- {
1452
- onSubmit,
1453
- noValidate: true,
1454
- className: "flex flex-col items-stretch justify-center gap-6",
1455
- children: [
1456
- /* @__PURE__ */ jsxRuntime.jsx(
1457
- AuthPasswordField,
1458
- {
1459
- id: "newPassword",
1460
- label: newPasswordLabel,
1461
- placeholder: newPasswordPlaceholder,
1462
- value: newPassword,
1463
- onChange: (e) => onNewPasswordChange(e.target.value),
1464
- required: true,
1465
- autoComplete: "new-password",
1466
- showStrengthIndicator: true,
1467
- emailAuthConfig
1468
- }
1469
- ),
1470
- /* @__PURE__ */ jsxRuntime.jsx(
1471
- AuthPasswordField,
1472
- {
1473
- id: "confirmPassword",
1474
- label: confirmPasswordLabel,
1475
- placeholder: confirmPasswordPlaceholder,
1476
- value: confirmPassword,
1477
- onChange: (e) => onConfirmPasswordChange(e.target.value),
1478
- required: true,
1479
- autoComplete: "new-password",
1480
- emailAuthConfig
1481
- }
1482
- ),
1483
- /* @__PURE__ */ jsxRuntime.jsx(
1484
- AuthSubmitButton,
1485
- {
1486
- isLoading: loading,
1487
- disabled: loading,
1488
- className: appearance.buttonClassName,
1489
- children: loading ? loadingButtonText : submitButtonText
1604
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1605
+ AuthContainer,
1606
+ {
1607
+ appearance: {
1608
+ containerClassName: appearance.container,
1609
+ cardClassName: appearance.card
1610
+ },
1611
+ children: [
1612
+ /* @__PURE__ */ jsxRuntime.jsx(
1613
+ AuthHeader,
1614
+ {
1615
+ title,
1616
+ subtitle,
1617
+ appearance: {
1618
+ containerClassName: appearance.header?.container,
1619
+ titleClassName: appearance.header?.title,
1620
+ subtitleClassName: appearance.header?.subtitle
1490
1621
  }
1491
- )
1492
- ]
1493
- }
1494
- ),
1495
- /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-center text-sm text-gray-600 dark:text-gray-400", children: [
1496
- backToSignInText && /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
1497
- backToSignInText,
1498
- " "
1499
- ] }),
1500
- /* @__PURE__ */ jsxRuntime.jsx("a", { href: backToSignInUrl, className: "text-black dark:text-white font-medium", children: "Back to Sign In" })
1501
- ] })
1502
- ] });
1622
+ }
1623
+ ),
1624
+ /* @__PURE__ */ jsxRuntime.jsx(
1625
+ AuthErrorBanner,
1626
+ {
1627
+ error: error || "",
1628
+ className: appearance.errorBanner
1629
+ }
1630
+ ),
1631
+ /* @__PURE__ */ jsxRuntime.jsxs(
1632
+ "form",
1633
+ {
1634
+ onSubmit,
1635
+ noValidate: true,
1636
+ className: appearance.form?.container || "flex flex-col items-stretch justify-center gap-6",
1637
+ children: [
1638
+ /* @__PURE__ */ jsxRuntime.jsx(
1639
+ AuthPasswordField,
1640
+ {
1641
+ id: "newPassword",
1642
+ label: newPasswordLabel,
1643
+ placeholder: newPasswordPlaceholder,
1644
+ value: newPassword,
1645
+ onChange: (e) => onNewPasswordChange(e.target.value),
1646
+ required: true,
1647
+ autoComplete: "new-password",
1648
+ showStrengthIndicator: true,
1649
+ emailAuthConfig,
1650
+ appearance: {
1651
+ containerClassName: appearance.form?.newPasswordField?.container,
1652
+ labelClassName: appearance.form?.newPasswordField?.label,
1653
+ inputClassName: appearance.form?.newPasswordField?.input
1654
+ }
1655
+ }
1656
+ ),
1657
+ /* @__PURE__ */ jsxRuntime.jsx(
1658
+ AuthPasswordField,
1659
+ {
1660
+ id: "confirmPassword",
1661
+ label: confirmPasswordLabel,
1662
+ placeholder: confirmPasswordPlaceholder,
1663
+ value: confirmPassword,
1664
+ onChange: (e) => onConfirmPasswordChange(e.target.value),
1665
+ required: true,
1666
+ autoComplete: "new-password",
1667
+ emailAuthConfig,
1668
+ appearance: {
1669
+ containerClassName: appearance.form?.confirmPasswordField?.container,
1670
+ labelClassName: appearance.form?.confirmPasswordField?.label,
1671
+ inputClassName: appearance.form?.confirmPasswordField?.input
1672
+ }
1673
+ }
1674
+ ),
1675
+ /* @__PURE__ */ jsxRuntime.jsx(
1676
+ AuthSubmitButton,
1677
+ {
1678
+ isLoading: loading,
1679
+ disabled: loading,
1680
+ className: appearance.button,
1681
+ children: loading ? loadingButtonText : submitButtonText
1682
+ }
1683
+ )
1684
+ ]
1685
+ }
1686
+ ),
1687
+ /* @__PURE__ */ jsxRuntime.jsxs("p", { className: appearance.backToSignIn || "text-center text-sm text-gray-600 dark:text-gray-400", children: [
1688
+ backToSignInText && /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
1689
+ backToSignInText,
1690
+ " "
1691
+ ] }),
1692
+ /* @__PURE__ */ jsxRuntime.jsx("a", { href: backToSignInUrl, className: "text-black dark:text-white font-medium", children: "Back to Sign In" })
1693
+ ] })
1694
+ ]
1695
+ }
1696
+ );
1503
1697
  }
1504
1698
  function VerifyEmailStatus({
1505
1699
  status,