@insforge/react 0.1.7 → 0.2.1

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