@insforge/react 0.6.9 → 0.6.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -16,6 +16,9 @@ import { createContext, useContext, useState, useMemo, useEffect, useRef, useCal
16
16
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
17
17
  import { createClient } from '@insforge/sdk';
18
18
  import { InsforgeContext } from '@insforge/shared/react';
19
+ import createCache from '@emotion/cache';
20
+ import { keyframes as keyframes$1, CacheProvider } from '@emotion/react';
21
+ import styled from '@emotion/styled';
19
22
  import { AlertTriangle, Check, EyeOff, Eye, Loader2, CircleCheck, LogOut } from 'lucide-react';
20
23
  import { z } from 'zod';
21
24
 
@@ -486,6 +489,17 @@ var InsforgeManager = class _InsforgeManager {
486
489
  this.listeners.clear();
487
490
  }
488
491
  };
492
+ function StyleProvider({ children, nonce }) {
493
+ const cache = useMemo(() => {
494
+ const emotionCache = createCache({
495
+ key: "if-styles",
496
+ prepend: true,
497
+ nonce
498
+ });
499
+ return emotionCache;
500
+ }, [nonce]);
501
+ return /* @__PURE__ */ jsx(CacheProvider, { value: cache, children });
502
+ }
489
503
  function InsforgeProviderCore({
490
504
  children,
491
505
  baseUrl,
@@ -556,7 +570,7 @@ function InsforgeProviderCore({
556
570
  return /* @__PURE__ */ jsx(InsforgeContext.Provider, { value: contextValue, children });
557
571
  }
558
572
  function InsforgeProvider(props) {
559
- return /* @__PURE__ */ jsx(NavigationProvider, { adapter: BrowserNavigationAdapter, children: /* @__PURE__ */ jsx(InsforgeProviderCore, { ...props }) });
573
+ return /* @__PURE__ */ jsx(StyleProvider, { children: /* @__PURE__ */ jsx(NavigationProvider, { adapter: BrowserNavigationAdapter, children: /* @__PURE__ */ jsx(InsforgeProviderCore, { ...props }) }) });
560
574
  }
561
575
  function useInsforge() {
562
576
  const context = useContext(InsforgeContext);
@@ -605,9 +619,538 @@ function usePublicAuthConfig() {
605
619
  }, [getPublicAuthConfig]);
606
620
  return { authConfig, isLoaded };
607
621
  }
622
+
623
+ // src/styles/theme.ts
624
+ var theme = {
625
+ colors: {
626
+ primary: "#000000",
627
+ primaryHover: "#1f1f1f",
628
+ text: "#000000",
629
+ textSecondary: "#828282",
630
+ textMuted: "#a3a3a3",
631
+ textGray: "#525252",
632
+ border: "#d4d4d4",
633
+ borderGray: "#e4e4e7",
634
+ borderHover: "#9ca3af",
635
+ borderFocus: "#000000",
636
+ bgWhite: "#ffffff",
637
+ bgLight: "#fafafa",
638
+ bgGray: "#f5f5f5",
639
+ bgHover: "#f9fafb",
640
+ error: "#dc2626",
641
+ errorBg: "#fee2e2",
642
+ success: "#16a34a",
643
+ successBg: "#d1fae5",
644
+ successDark: "#059669",
645
+ black: "#000000",
646
+ zinc900: "#09090b"
647
+ },
648
+ spacing: {
649
+ 1: "0.25rem",
650
+ // 4px
651
+ 2: "0.5rem",
652
+ // 8px
653
+ 3: "0.75rem",
654
+ // 12px
655
+ 4: "1rem",
656
+ // 16px
657
+ 6: "1.5rem",
658
+ // 24px
659
+ 8: "2rem",
660
+ // 32px
661
+ 10: "2.5rem"
662
+ // 40px
663
+ },
664
+ radius: {
665
+ xs: "0.125rem",
666
+ // 2px
667
+ sm: "0.25rem",
668
+ // 4px
669
+ md: "0.375rem",
670
+ // 6px
671
+ lg: "0.5rem",
672
+ // 8px
673
+ xl: "0.75rem",
674
+ // 12px
675
+ full: "9999px"
676
+ },
677
+ fontSize: {
678
+ xs: "0.75rem",
679
+ // 12px
680
+ sm: "0.875rem",
681
+ // 14px
682
+ base: "1rem",
683
+ // 16px
684
+ lg: "1.125rem",
685
+ // 18px
686
+ xl: "1.25rem",
687
+ // 20px
688
+ "2xl": "1.5rem"
689
+ // 24px
690
+ },
691
+ lineHeight: {
692
+ tight: "1rem",
693
+ // 16px
694
+ normal: "1.25rem",
695
+ // 20px
696
+ relaxed: "1.5rem",
697
+ // 24px
698
+ loose: "2rem"
699
+ // 32px
700
+ },
701
+ fontFamily: {
702
+ base: "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif",
703
+ manrope: "'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif"
704
+ },
705
+ fontWeight: {
706
+ normal: 400,
707
+ medium: 500,
708
+ semibold: 600
709
+ },
710
+ shadow: {
711
+ sm: "0 1px 2px 0 rgba(0, 0, 0, 0.05)",
712
+ md: "0 1px 2px 0 rgba(0, 0, 0, 0.1)",
713
+ lg: "0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)"
714
+ },
715
+ transition: {
716
+ fast: "150ms cubic-bezier(0.4, 0, 0.2, 1)",
717
+ base: "200ms cubic-bezier(0.4, 0, 0.2, 1)"
718
+ },
719
+ sizes: {
720
+ input: {
721
+ height: "2.5rem"
722
+ // 40px
723
+ },
724
+ button: {
725
+ height: "2.5rem",
726
+ // 40px for submit
727
+ heightOAuth: "2.25rem"
728
+ // 36px for OAuth
729
+ },
730
+ avatar: "2rem",
731
+ // 32px
732
+ icon: "1.25rem",
733
+ // 20px
734
+ iconSm: "1.125rem",
735
+ // 18px
736
+ iconLg: "1.5rem",
737
+ // 24px
738
+ verifyCode: "3rem",
739
+ // 48px
740
+ verifyIcon: "4rem",
741
+ // 64px
742
+ verifyIconInner: "2rem"
743
+ // 32px
744
+ }
745
+ };
746
+ var keyframes = {
747
+ spin: `
748
+ from {
749
+ transform: rotate(0deg);
750
+ }
751
+ to {
752
+ transform: rotate(360deg);
753
+ }
754
+ `
755
+ };
756
+
757
+ // src/components/atoms/styled.ts
758
+ var spinAnimation = keyframes$1`${keyframes.spin}`;
759
+ var AuthContainerWrapper = styled.div`
760
+ width: 100%;
761
+ max-width: 400px;
762
+ border-radius: ${theme.radius.xl};
763
+ overflow: hidden;
764
+ box-shadow: ${theme.shadow.lg};
765
+ `;
766
+ var AuthCard = styled.div`
767
+ background-color: ${theme.colors.bgWhite};
768
+ padding: ${theme.spacing[6]};
769
+ display: flex;
770
+ flex-direction: column;
771
+ justify-content: center;
772
+ align-items: stretch;
773
+ gap: ${theme.spacing[6]};
774
+ `;
775
+ var AuthHeaderWrapper = styled.div`
776
+ display: flex;
777
+ flex-direction: column;
778
+ justify-content: flex-start;
779
+ align-items: flex-start;
780
+ gap: ${theme.spacing[2]};
781
+ `;
782
+ var AuthHeaderTitle = styled.h1`
783
+ font-size: ${theme.fontSize["2xl"]};
784
+ font-weight: ${theme.fontWeight.semibold};
785
+ color: ${theme.colors.text};
786
+ line-height: ${theme.lineHeight.loose};
787
+ margin: 0;
788
+ font-family: ${theme.fontFamily.base};
789
+ `;
790
+ var AuthHeaderSubtitle = styled.p`
791
+ font-size: ${theme.fontSize.sm};
792
+ font-weight: ${theme.fontWeight.normal};
793
+ color: ${theme.colors.textSecondary};
794
+ line-height: ${theme.lineHeight.relaxed};
795
+ margin: 0;
796
+ font-family: ${theme.fontFamily.base};
797
+ `;
798
+ var FormFieldWrapper = styled.div`
799
+ display: flex;
800
+ flex-direction: column;
801
+ justify-content: center;
802
+ align-items: stretch;
803
+ gap: ${theme.spacing[1]};
804
+ `;
805
+ var FormFieldLabel = styled.label`
806
+ font-size: ${theme.fontSize.sm};
807
+ font-weight: ${theme.fontWeight.normal};
808
+ color: ${theme.colors.text};
809
+ line-height: ${theme.lineHeight.relaxed};
810
+ font-family: ${theme.fontFamily.base};
811
+ `;
812
+ var FormFieldInput = styled.input`
813
+ width: 100%;
814
+ display: flex;
815
+ align-items: center;
816
+ gap: ${theme.spacing[2]};
817
+ align-self: stretch;
818
+ padding: ${theme.spacing[2]} ${theme.spacing[3]};
819
+ border-radius: ${theme.radius.sm};
820
+ border: 1px solid ${theme.colors.border};
821
+ background-color: ${theme.colors.bgWhite};
822
+ font-size: ${theme.fontSize.sm};
823
+ font-weight: ${theme.fontWeight.normal};
824
+ line-height: ${theme.lineHeight.normal};
825
+ color: ${theme.colors.text};
826
+ font-family: ${theme.fontFamily.base};
827
+ transition: border-color ${theme.transition.base};
828
+
829
+ &::placeholder {
830
+ color: ${theme.colors.textMuted};
831
+ font-size: ${theme.fontSize.sm};
832
+ font-weight: ${theme.fontWeight.normal};
833
+ }
834
+
835
+ &:focus {
836
+ outline: none;
837
+ border-color: ${theme.colors.borderFocus};
838
+ }
839
+ `;
840
+ var PasswordFieldWrapper = styled.div`
841
+ display: flex;
842
+ flex-direction: column;
843
+ justify-content: center;
844
+ align-items: stretch;
845
+ gap: ${theme.spacing[1]};
846
+ `;
847
+ var PasswordFieldLabelRow = styled.div`
848
+ display: flex;
849
+ justify-content: space-between;
850
+ align-items: center;
851
+ `;
852
+ var PasswordFieldLabel = styled.label`
853
+ font-size: ${theme.fontSize.sm};
854
+ font-weight: ${theme.fontWeight.normal};
855
+ color: ${theme.colors.text};
856
+ line-height: ${theme.lineHeight.relaxed};
857
+ font-family: ${theme.fontFamily.base};
858
+ `;
859
+ var PasswordFieldForgotLink = styled.a`
860
+ font-size: ${theme.fontSize.sm};
861
+ font-weight: ${theme.fontWeight.normal};
862
+ color: ${theme.colors.textSecondary};
863
+ text-decoration: none;
864
+ transition: color ${theme.transition.fast};
865
+ font-family: ${theme.fontFamily.base};
866
+ cursor: pointer;
867
+ `;
868
+ var PasswordFieldInputWrapper = styled.div`
869
+ position: relative;
870
+ width: 100%;
871
+ `;
872
+ var PasswordFieldInput = styled.input`
873
+ width: 100%;
874
+ display: flex;
875
+ align-items: center;
876
+ align-self: stretch;
877
+ padding: ${theme.spacing[2]} ${theme.spacing[3]};
878
+ padding-right: 2.5rem;
879
+ border-radius: ${theme.radius.sm};
880
+ border: 1px solid ${theme.colors.border};
881
+ background-color: ${theme.colors.bgWhite};
882
+ font-size: ${theme.fontSize.sm};
883
+ font-weight: ${theme.fontWeight.normal};
884
+ line-height: ${theme.lineHeight.normal};
885
+ color: ${theme.colors.text};
886
+ font-family: ${theme.fontFamily.base};
887
+ transition: border-color ${theme.transition.base};
888
+
889
+ &::placeholder {
890
+ color: ${theme.colors.textMuted};
891
+ }
892
+
893
+ &:focus {
894
+ outline: none;
895
+ border-color: ${theme.colors.borderFocus};
896
+ }
897
+ `;
898
+ var PasswordFieldToggleButton = styled.button`
899
+ position: absolute;
900
+ right: ${theme.spacing[1]};
901
+ top: 50%;
902
+ transform: translateY(-50%);
903
+ background: none;
904
+ border: none;
905
+ cursor: pointer;
906
+ padding: ${theme.spacing[1]};
907
+ display: flex;
908
+ align-items: center;
909
+ justify-content: center;
910
+ color: ${theme.colors.textSecondary};
911
+ transition: color ${theme.transition.fast};
912
+ `;
913
+ var SubmitButton = styled.button`
914
+ border-radius: ${theme.radius.sm};
915
+ background-color: ${theme.colors.primary};
916
+ height: ${theme.sizes.button.height};
917
+ width: 100%;
918
+ display: flex;
919
+ margin-top: ${theme.spacing[4]};
920
+ padding: ${theme.spacing[2]} ${theme.spacing[4]};
921
+ justify-content: center;
922
+ align-items: center;
923
+ gap: 0.625rem;
924
+ align-self: stretch;
925
+ color: ${theme.colors.bgWhite};
926
+ font-weight: ${theme.fontWeight.semibold};
927
+ font-family: ${theme.fontFamily.manrope};
928
+ font-size: ${theme.fontSize.base};
929
+ line-height: normal;
930
+ border: none;
931
+ cursor: pointer;
932
+ transition: background-color ${theme.transition.base};
933
+
934
+ &:hover:not(:disabled) {
935
+ background-color: ${theme.colors.primaryHover};
936
+ }
937
+
938
+ &:disabled {
939
+ opacity: 0.5;
940
+ cursor: not-allowed;
941
+ }
942
+ `;
943
+ var SubmitButtonIcon = styled.div`
944
+ width: ${theme.sizes.icon};
945
+ height: ${theme.sizes.icon};
946
+ display: flex;
947
+ align-items: center;
948
+ justify-content: center;
949
+
950
+ svg {
951
+ width: 100%;
952
+ height: 100%;
953
+ }
954
+ `;
955
+ var SubmitButtonSpinner = styled.div`
956
+ width: ${theme.sizes.icon};
957
+ height: ${theme.sizes.icon};
958
+ display: flex;
959
+ align-items: center;
960
+ justify-content: center;
961
+ animation: ${spinAnimation} 1s linear infinite;
962
+
963
+ svg {
964
+ width: 100%;
965
+ height: 100%;
966
+ }
967
+ `;
968
+ var OAuthButton = styled.button`
969
+ display: flex;
970
+ width: 100%;
971
+ height: ${theme.sizes.button.heightOAuth};
972
+ padding: ${(props) => props.$variant === "short" || props.$variant === "iconOnly" ? theme.spacing[2] : `${theme.spacing[2]} ${theme.spacing[3]}`};
973
+ flex-direction: row;
974
+ justify-content: center;
975
+ align-items: center;
976
+ gap: ${(props) => props.$variant === "iconOnly" ? "0" : props.$variant === "short" ? theme.spacing[2] : theme.spacing[3]};
977
+ border-radius: ${theme.radius.md};
978
+ border: 1px solid ${theme.colors.borderGray};
979
+ background-color: ${theme.colors.bgWhite};
980
+ box-shadow: ${theme.shadow.md};
981
+ color: ${theme.colors.zinc900};
982
+ text-align: center;
983
+ font-size: ${theme.fontSize.sm};
984
+ font-weight: ${theme.fontWeight.medium};
985
+ line-height: ${theme.lineHeight.normal};
986
+ cursor: pointer;
987
+ transition: all ${theme.transition.base};
988
+ font-family: ${theme.fontFamily.base};
989
+
990
+ &:hover:not(:disabled) {
991
+ background-color: ${theme.colors.bgHover};
992
+ border-color: ${theme.colors.borderHover};
993
+ }
994
+
995
+ &:disabled {
996
+ opacity: 0.6;
997
+ cursor: not-allowed;
998
+ }
999
+ `;
1000
+ var OAuthButtonIcon = styled.div`
1001
+ display: flex;
1002
+ align-items: center;
1003
+ justify-content: center;
1004
+ flex-shrink: 0;
1005
+ width: ${theme.sizes.iconSm};
1006
+ height: ${theme.sizes.iconSm};
1007
+
1008
+ svg {
1009
+ width: 100%;
1010
+ height: 100%;
1011
+ }
1012
+ `;
1013
+ var OAuthProvidersContainer = styled.div`
1014
+ display: flex;
1015
+ flex-direction: column;
1016
+ gap: ${theme.spacing[3]};
1017
+ width: 100%;
1018
+ `;
1019
+ var AuthLinkWrapper = styled.div`
1020
+ display: flex;
1021
+ justify-content: center;
1022
+ align-items: center;
1023
+ gap: ${theme.spacing[1]};
1024
+ font-size: ${theme.fontSize.sm};
1025
+ color: ${theme.colors.textSecondary};
1026
+ font-family: ${theme.fontFamily.base};
1027
+ `;
1028
+ var AuthLinkText = styled.span`
1029
+ font-weight: ${theme.fontWeight.normal};
1030
+ `;
1031
+ var AuthLinkLink = styled.a`
1032
+ font-weight: ${theme.fontWeight.semibold};
1033
+ color: ${theme.colors.text};
1034
+ text-decoration: none;
1035
+ transition: opacity ${theme.transition.fast};
1036
+ cursor: pointer;
1037
+ `;
1038
+ var AuthDividerWrapper = styled.div`
1039
+ display: flex;
1040
+ align-items: center;
1041
+ text-align: center;
1042
+ width: 100%;
1043
+ gap: ${theme.spacing[3]};
1044
+ `;
1045
+ var AuthDividerLine = styled.div`
1046
+ flex: 1;
1047
+ border-top: 1px solid ${theme.colors.border};
1048
+ `;
1049
+ var AuthDividerText = styled.span`
1050
+ font-size: ${theme.fontSize.sm};
1051
+ color: ${theme.colors.textSecondary};
1052
+ font-weight: ${theme.fontWeight.normal};
1053
+ font-family: ${theme.fontFamily.manrope};
1054
+ `;
1055
+ var ErrorBannerWrapper = styled.div`
1056
+ padding: ${theme.spacing[3]};
1057
+ background-color: ${theme.colors.errorBg};
1058
+ border-radius: ${theme.radius.md};
1059
+ border: 1px solid ${theme.colors.error};
1060
+ `;
1061
+ var ErrorBannerContent = styled.div`
1062
+ display: flex;
1063
+ align-items: center;
1064
+ gap: ${theme.spacing[2]};
1065
+ `;
1066
+ var ErrorBannerIcon = styled.div`
1067
+ width: ${theme.sizes.iconLg};
1068
+ height: ${theme.sizes.iconLg};
1069
+ flex-shrink: 0;
1070
+ color: ${theme.colors.error};
1071
+ display: flex;
1072
+ align-items: center;
1073
+ justify-content: center;
1074
+
1075
+ svg {
1076
+ width: 100%;
1077
+ height: 100%;
1078
+ }
1079
+ `;
1080
+ var ErrorBannerText = styled.p`
1081
+ font-size: ${theme.fontSize.sm};
1082
+ color: ${theme.colors.error};
1083
+ font-weight: ${theme.fontWeight.normal};
1084
+ font-family: ${theme.fontFamily.base};
1085
+ margin: 0;
1086
+ `;
1087
+ var AuthBrandingWrapper = styled.div`
1088
+ background-color: ${theme.colors.bgLight};
1089
+ padding: ${theme.spacing[4]} ${theme.spacing[2]};
1090
+ display: flex;
1091
+ flex-direction: row;
1092
+ justify-content: center;
1093
+ align-items: center;
1094
+ gap: ${theme.spacing[1]};
1095
+ `;
1096
+ var AuthBrandingText = styled.p`
1097
+ font-size: ${theme.fontSize.xs};
1098
+ font-weight: ${theme.fontWeight.medium};
1099
+ color: ${theme.colors.text};
1100
+ font-family: ${theme.fontFamily.manrope};
1101
+ margin: 0;
1102
+ `;
1103
+ var VerificationCodeInputContainer = styled.div`
1104
+ display: flex;
1105
+ gap: ${theme.spacing[3]};
1106
+ justify-content: center;
1107
+ `;
1108
+ var VerificationCodeInput = styled.input`
1109
+ width: ${theme.sizes.verifyCode};
1110
+ height: ${theme.sizes.verifyCode};
1111
+ text-align: center;
1112
+ font-size: ${theme.fontSize.base};
1113
+ font-weight: ${theme.fontWeight.semibold};
1114
+ border: 1px solid ${theme.colors.border};
1115
+ border-radius: ${theme.radius.sm};
1116
+ transition: border-color ${theme.transition.base};
1117
+ font-family: ${theme.fontFamily.manrope};
1118
+
1119
+ &:focus {
1120
+ outline: none;
1121
+ border-color: ${theme.colors.borderFocus};
1122
+ }
1123
+ `;
1124
+ var PasswordStrengthWrapper = styled.div`
1125
+ margin-top: ${theme.spacing[2]};
1126
+ `;
1127
+ styled.div`
1128
+ height: 100%;
1129
+ transition:
1130
+ width ${theme.transition.base},
1131
+ background-color ${theme.transition.base};
1132
+ `;
1133
+ styled.span`
1134
+ font-size: ${theme.fontSize.xs};
1135
+ color: ${theme.colors.textSecondary};
1136
+ font-family: ${theme.fontFamily.base};
1137
+ `;
1138
+ var PasswordStrengthRequirements = styled.div`
1139
+ display: flex;
1140
+ flex-direction: column;
1141
+ gap: ${theme.spacing[2]};
1142
+ font-size: ${theme.fontSize.sm};
1143
+ color: ${theme.colors.textGray};
1144
+ font-family: ${theme.fontFamily.base};
1145
+ `;
1146
+ var PasswordStrengthRequirement = styled.div`
1147
+ display: flex;
1148
+ align-items: center;
1149
+ gap: ${theme.spacing[2]};
1150
+ `;
608
1151
  function AuthBranding() {
609
- return /* @__PURE__ */ jsxs("div", { className: "if-authBranding if-internal-ab4k9w", children: [
610
- /* @__PURE__ */ jsx("p", { className: "if-authBranding-text", children: "Secured by" }),
1152
+ return /* @__PURE__ */ jsxs(AuthBrandingWrapper, { children: [
1153
+ /* @__PURE__ */ jsx(AuthBrandingText, { children: "Secured by" }),
611
1154
  /* @__PURE__ */ jsx("a", { href: "https://insforge.dev", target: "_blank", rel: "noopener noreferrer", children: /* @__PURE__ */ jsxs(
612
1155
  "svg",
613
1156
  {
@@ -676,30 +1219,30 @@ function AuthBranding() {
676
1219
  ] });
677
1220
  }
678
1221
  function AuthContainer({ children }) {
679
- return /* @__PURE__ */ jsxs("div", { className: "if-authContainer if-internal-a8f3d2", children: [
680
- /* @__PURE__ */ jsx("div", { className: "if-authCard if-internal-b2k9x1", children }),
1222
+ return /* @__PURE__ */ jsxs(AuthContainerWrapper, { children: [
1223
+ /* @__PURE__ */ jsx(AuthCard, { children }),
681
1224
  /* @__PURE__ */ jsx(AuthBranding, {})
682
1225
  ] });
683
1226
  }
684
1227
  function AuthHeader({ title, subtitle }) {
685
- return /* @__PURE__ */ jsxs("div", { className: "if-authHeader if-internal-h3m7w5", children: [
686
- /* @__PURE__ */ jsx("h1", { className: "if-authHeader-title if-internal-t4p1k9", children: title }),
687
- subtitle && /* @__PURE__ */ jsx("p", { className: "if-authHeader-subtitle if-internal-s7q2m3", children: subtitle })
1228
+ return /* @__PURE__ */ jsxs(AuthHeaderWrapper, { children: [
1229
+ /* @__PURE__ */ jsx(AuthHeaderTitle, { children: title }),
1230
+ subtitle && /* @__PURE__ */ jsx(AuthHeaderSubtitle, { children: subtitle })
688
1231
  ] });
689
1232
  }
690
1233
  function AuthErrorBanner({ error }) {
691
1234
  if (!error) {
692
1235
  return null;
693
1236
  }
694
- return /* @__PURE__ */ jsx("div", { className: "if-errorBanner if-internal-eb2m7k", children: /* @__PURE__ */ jsxs("div", { className: "if-errorBanner-content", children: [
695
- /* @__PURE__ */ jsx(AlertTriangle, { className: "if-errorBanner-icon" }),
696
- /* @__PURE__ */ jsx("span", { className: "if-errorBanner-text", children: error })
1237
+ return /* @__PURE__ */ jsx(ErrorBannerWrapper, { children: /* @__PURE__ */ jsxs(ErrorBannerContent, { children: [
1238
+ /* @__PURE__ */ jsx(ErrorBannerIcon, { children: /* @__PURE__ */ jsx(AlertTriangle, {}) }),
1239
+ /* @__PURE__ */ jsx(ErrorBannerText, { children: error })
697
1240
  ] }) });
698
1241
  }
699
1242
  function AuthFormField({ label, id, ...props }) {
700
- return /* @__PURE__ */ jsxs("div", { className: "if-formField if-internal-f9n6p2", children: [
701
- /* @__PURE__ */ jsx("label", { htmlFor: id, className: "if-formField-label if-internal-l3k8m1", children: label }),
702
- /* @__PURE__ */ jsx("input", { id, className: "if-formField-input if-internal-i2v8k4", ...props })
1243
+ return /* @__PURE__ */ jsxs(FormFieldWrapper, { children: [
1244
+ /* @__PURE__ */ jsx(FormFieldLabel, { htmlFor: id, children: label }),
1245
+ /* @__PURE__ */ jsx(FormFieldInput, { id, ...props })
703
1246
  ] });
704
1247
  }
705
1248
  function AuthPasswordStrengthIndicator({
@@ -707,7 +1250,7 @@ function AuthPasswordStrengthIndicator({
707
1250
  config
708
1251
  }) {
709
1252
  const requirements = createRequirements(config);
710
- 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: [
1253
+ return /* @__PURE__ */ jsx(PasswordStrengthWrapper, { children: /* @__PURE__ */ jsx(PasswordStrengthRequirements, { children: requirements.map((req) => /* @__PURE__ */ jsxs(PasswordStrengthRequirement, { children: [
711
1254
  /* @__PURE__ */ jsx(
712
1255
  "div",
713
1256
  {
@@ -809,29 +1352,27 @@ function AuthPasswordField({
809
1352
  }
810
1353
  onFocus?.(e);
811
1354
  };
812
- return /* @__PURE__ */ jsxs("div", { className: "if-passwordField if-internal-p5w9m7", children: [
813
- (label || forgotPasswordLink) && /* @__PURE__ */ jsxs("div", { className: "if-passwordField-labelRow", children: [
814
- /* @__PURE__ */ jsx("label", { htmlFor: id, className: "if-passwordField-label", children: label }),
815
- forgotPasswordLink && resolvedForgotPasswordHref && /* @__PURE__ */ jsx(Link, { href: resolvedForgotPasswordHref, className: "if-passwordField-forgotLink", children: forgotPasswordLink.text || "Forget Password?" })
1355
+ return /* @__PURE__ */ jsxs(PasswordFieldWrapper, { children: [
1356
+ (label || forgotPasswordLink) && /* @__PURE__ */ jsxs(PasswordFieldLabelRow, { children: [
1357
+ /* @__PURE__ */ jsx(PasswordFieldLabel, { htmlFor: id, children: label }),
1358
+ forgotPasswordLink && resolvedForgotPasswordHref && /* @__PURE__ */ jsx(Link, { href: resolvedForgotPasswordHref, className: "", children: /* @__PURE__ */ jsx(PasswordFieldForgotLink, { as: "span", children: forgotPasswordLink.text || "Forget Password?" }) })
816
1359
  ] }),
817
- /* @__PURE__ */ jsxs("div", { className: "if-passwordField-inputWrapper", children: [
1360
+ /* @__PURE__ */ jsxs(PasswordFieldInputWrapper, { children: [
818
1361
  /* @__PURE__ */ jsx(
819
- "input",
1362
+ PasswordFieldInput,
820
1363
  {
821
1364
  id,
822
1365
  type: showPassword ? "text" : "password",
823
- className: "if-passwordField-input",
824
1366
  value,
825
1367
  onFocus: handleFocus,
826
1368
  ...props
827
1369
  }
828
1370
  ),
829
1371
  /* @__PURE__ */ jsx(
830
- "button",
1372
+ PasswordFieldToggleButton,
831
1373
  {
832
1374
  type: "button",
833
1375
  onClick: () => setShowPassword(!showPassword),
834
- className: "if-passwordField-toggleButton",
835
1376
  "aria-label": showPassword ? "Hide password" : "Show password",
836
1377
  children: showPassword ? /* @__PURE__ */ jsx(EyeOff, { size: 20 }) : /* @__PURE__ */ jsx(Eye, { size: 20 })
837
1378
  }
@@ -848,36 +1389,27 @@ function AuthSubmitButton({
848
1389
  type = "submit",
849
1390
  onClick
850
1391
  }) {
851
- return /* @__PURE__ */ jsxs(
852
- "button",
853
- {
854
- type,
855
- className: "if-submitButton if-internal-b8p3m4",
856
- disabled: disabled || isLoading || confirmed,
857
- onClick,
858
- children: [
859
- isLoading && /* @__PURE__ */ jsx(Loader2, { className: "if-submitButton-icon if-submitButton-spinner", size: 20 }),
860
- confirmed && /* @__PURE__ */ jsx(CircleCheck, { className: "if-submitButton-icon", size: 20 }),
861
- children
862
- ]
863
- }
864
- );
1392
+ return /* @__PURE__ */ jsxs(SubmitButton, { type, disabled: disabled || isLoading || confirmed, onClick, children: [
1393
+ isLoading && /* @__PURE__ */ jsx(SubmitButtonSpinner, { children: /* @__PURE__ */ jsx(Loader2, { size: 20 }) }),
1394
+ confirmed && /* @__PURE__ */ jsx(SubmitButtonIcon, { children: /* @__PURE__ */ jsx(CircleCheck, { size: 20 }) }),
1395
+ children
1396
+ ] });
865
1397
  }
866
1398
  function AuthLink({ text, linkText, href }) {
867
1399
  const searchParams = useSearchParams();
868
1400
  const { Link } = useNavigationAdapter();
869
1401
  const finalHref = resolveAuthUrl(href, searchParams);
870
- return /* @__PURE__ */ jsxs("p", { className: "if-authLink if-internal-al5w9p", children: [
871
- text && /* @__PURE__ */ jsx("span", { className: "if-authLink-text", children: text }),
1402
+ return /* @__PURE__ */ jsxs(AuthLinkWrapper, { children: [
1403
+ text && /* @__PURE__ */ jsx(AuthLinkText, { children: text }),
872
1404
  text && " ",
873
- /* @__PURE__ */ jsx(Link, { href: finalHref, className: "if-authLink-link", children: linkText })
1405
+ /* @__PURE__ */ jsx(Link, { href: finalHref, className: "", children: /* @__PURE__ */ jsx(AuthLinkLink, { as: "span", children: linkText }) })
874
1406
  ] });
875
1407
  }
876
1408
  function AuthDivider({ text = "or" }) {
877
- return /* @__PURE__ */ jsxs("div", { className: "if-authDivider if-internal-ad7k3m", children: [
878
- /* @__PURE__ */ jsx("div", { className: "if-authDivider-line" }),
879
- /* @__PURE__ */ jsx("span", { className: "if-authDivider-text", children: text }),
880
- /* @__PURE__ */ jsx("div", { className: "if-authDivider-line" })
1409
+ return /* @__PURE__ */ jsxs(AuthDividerWrapper, { children: [
1410
+ /* @__PURE__ */ jsx(AuthDividerLine, {}),
1411
+ /* @__PURE__ */ jsx(AuthDividerText, { children: text }),
1412
+ /* @__PURE__ */ jsx(AuthDividerLine, {})
881
1413
  ] });
882
1414
  }
883
1415
  var OAUTH_PROVIDER_CONFIG = {
@@ -1041,23 +1573,17 @@ function AuthOAuthButton({
1041
1573
  }
1042
1574
  return "";
1043
1575
  };
1044
- const className = [
1045
- "if-oauthButton",
1046
- "if-internal-o4k7w2",
1047
- displayMode === "full" && "if-oauthButton-full",
1048
- displayMode === "short" && "if-oauthButton-short",
1049
- displayMode === "icon" && "if-oauthButton-icon-only"
1050
- ].filter(Boolean).join(" ");
1576
+ const variant = displayMode === "icon" ? "iconOnly" : displayMode;
1051
1577
  return /* @__PURE__ */ jsxs(
1052
- "button",
1578
+ OAuthButton,
1053
1579
  {
1054
1580
  type: "button",
1055
1581
  onClick: () => onClick(provider),
1056
- className,
1582
+ $variant: variant,
1057
1583
  disabled: disabled || loading,
1058
1584
  style,
1059
1585
  children: [
1060
- loading ? /* @__PURE__ */ jsx(Loader2, { className: "if-oauthButton-icon if-submitButton-spinner", size: 18 }) : /* @__PURE__ */ jsx("span", { className: "if-oauthButton-icon", children: config.svg }),
1586
+ loading ? /* @__PURE__ */ jsx(SubmitButtonSpinner, { children: /* @__PURE__ */ jsx(Loader2, { size: 18 }) }) : /* @__PURE__ */ jsx(OAuthButtonIcon, { children: config.svg }),
1061
1587
  !loading && getButtonText() && /* @__PURE__ */ jsx("span", { children: getButtonText() })
1062
1588
  ]
1063
1589
  }
@@ -1116,14 +1642,12 @@ function AuthOAuthProviders({
1116
1642
  }
1117
1643
  };
1118
1644
  return /* @__PURE__ */ jsx(
1119
- "div",
1645
+ OAuthProvidersContainer,
1120
1646
  {
1121
- className: "if-oauthProviders if-internal-op3m8k",
1122
1647
  style: {
1123
1648
  display: "grid",
1124
1649
  gridTemplateColumns: "repeat(6, 1fr)",
1125
- gap: "0.75rem",
1126
- width: "100%"
1650
+ gap: "0.75rem"
1127
1651
  },
1128
1652
  children: providers.map((provider, index) => /* @__PURE__ */ jsx(
1129
1653
  AuthOAuthButton,
@@ -1190,8 +1714,8 @@ function AuthVerificationCodeInput({
1190
1714
  }
1191
1715
  }
1192
1716
  };
1193
- return /* @__PURE__ */ jsx("div", { className: "if-verificationCode-inputContainer", children: Array.from({ length }).map((_, index) => /* @__PURE__ */ jsx(
1194
- "input",
1717
+ return /* @__PURE__ */ jsx(VerificationCodeInputContainer, { children: Array.from({ length }).map((_, index) => /* @__PURE__ */ jsx(
1718
+ VerificationCodeInput,
1195
1719
  {
1196
1720
  ref: (el) => {
1197
1721
  inputRefs.current[index] = el;
@@ -1204,12 +1728,160 @@ function AuthVerificationCodeInput({
1204
1728
  onKeyDown: (e) => handleKeyDown(index, e),
1205
1729
  onPaste: handlePaste,
1206
1730
  disabled,
1207
- className: "if-verificationCode-input",
1208
1731
  autoComplete: "one-time-code"
1209
1732
  },
1210
1733
  index
1211
1734
  )) });
1212
1735
  }
1736
+ styled.form`
1737
+ display: flex;
1738
+ flex-direction: column;
1739
+ align-items: stretch;
1740
+ justify-content: center;
1741
+ gap: ${theme.spacing[6]};
1742
+ `;
1743
+ var VerificationStepWrapper = styled.div`
1744
+ display: flex;
1745
+ flex-direction: column;
1746
+ gap: ${theme.spacing[6]};
1747
+ align-items: stretch;
1748
+ `;
1749
+ var VerificationStepDescriptionContainer = styled.div`
1750
+ width: 100%;
1751
+ background-color: ${theme.colors.bgGray};
1752
+ border-radius: ${theme.radius.lg};
1753
+ padding: ${theme.spacing[3]} ${theme.spacing[3]} ${theme.spacing[6]} ${theme.spacing[3]};
1754
+ display: flex;
1755
+ flex-direction: column;
1756
+ gap: ${theme.spacing[3]};
1757
+ `;
1758
+ var VerificationStepDescriptionTitle = styled.h3`
1759
+ color: ${theme.colors.black};
1760
+ font-family: ${theme.fontFamily.base};
1761
+ font-size: ${theme.fontSize.base};
1762
+ font-style: normal;
1763
+ font-weight: ${theme.fontWeight.semibold};
1764
+ line-height: 24px;
1765
+ margin: 0;
1766
+ `;
1767
+ var VerificationStepDescription = styled.p`
1768
+ font-size: ${theme.fontSize.sm};
1769
+ color: ${theme.colors.textGray};
1770
+ text-align: left;
1771
+ font-family: ${theme.fontFamily.base};
1772
+ margin: 0;
1773
+ `;
1774
+ var VerificationEmail = styled.span`
1775
+ font-weight: ${theme.fontWeight.medium};
1776
+ color: ${theme.colors.text};
1777
+ `;
1778
+ var VerificationStepCodeContainer = styled.div`
1779
+ width: 100%;
1780
+ display: flex;
1781
+ flex-direction: column;
1782
+ gap: ${theme.spacing[10]};
1783
+ `;
1784
+ var VerificationStepCodeInputWrapper = styled.div`
1785
+ display: flex;
1786
+ flex-direction: column;
1787
+ gap: ${theme.spacing[6]};
1788
+ `;
1789
+ styled.p`
1790
+ font-size: ${theme.fontSize.sm};
1791
+ color: ${theme.colors.textSecondary};
1792
+ text-align: center;
1793
+ font-family: ${theme.fontFamily.base};
1794
+ margin: 0;
1795
+ `;
1796
+ var VerificationStepResendContainer = styled.div`
1797
+ width: 100%;
1798
+ font-size: ${theme.fontSize.sm};
1799
+ text-align: center;
1800
+ color: ${theme.colors.textSecondary};
1801
+ font-family: ${theme.fontFamily.base};
1802
+ `;
1803
+ var VerificationStepResendButton = styled.button`
1804
+ color: ${theme.colors.text};
1805
+ font-weight: ${theme.fontWeight.medium};
1806
+ transition: all ${theme.transition.base};
1807
+ background: none;
1808
+ border: none;
1809
+ padding: 0;
1810
+ font-family: ${theme.fontFamily.base};
1811
+ font-size: ${theme.fontSize.sm};
1812
+
1813
+ &:not(:disabled) {
1814
+ cursor: pointer;
1815
+ }
1816
+
1817
+ &:disabled {
1818
+ cursor: not-allowed;
1819
+ opacity: 0.5;
1820
+ }
1821
+ `;
1822
+ var VerifyStatusContainer = styled.div`
1823
+ width: 100%;
1824
+ display: flex;
1825
+ flex-direction: column;
1826
+ align-items: ${(props) => props.$stretch ? "stretch" : "center"};
1827
+ justify-content: center;
1828
+ gap: ${theme.spacing[6]};
1829
+ `;
1830
+ var VerifyStatusSpinner = styled.div`
1831
+ border-radius: ${theme.radius.full};
1832
+ height: ${theme.sizes.verifyCode};
1833
+ width: ${theme.sizes.verifyCode};
1834
+ border-bottom: 2px solid ${theme.colors.primary};
1835
+ `;
1836
+ var VerifyStatusSuccessContent = styled.div`
1837
+ display: flex;
1838
+ flex-direction: column;
1839
+ align-items: center;
1840
+ gap: ${theme.spacing[4]};
1841
+ `;
1842
+ var VerifyStatusSuccessIcon = styled.div`
1843
+ width: ${theme.sizes.verifyIcon};
1844
+ height: ${theme.sizes.verifyIcon};
1845
+ border-radius: ${theme.radius.full};
1846
+ background-color: ${theme.colors.successBg};
1847
+ display: flex;
1848
+ align-items: center;
1849
+ justify-content: center;
1850
+ `;
1851
+ var VerifyStatusSuccessIconSvg = styled.div`
1852
+ width: ${theme.sizes.verifyIconInner};
1853
+ height: ${theme.sizes.verifyIconInner};
1854
+ color: ${theme.colors.successDark};
1855
+ display: flex;
1856
+ align-items: center;
1857
+ justify-content: center;
1858
+
1859
+ svg {
1860
+ width: 100%;
1861
+ height: 100%;
1862
+ }
1863
+ `;
1864
+ var VerifyStatusTextCenter = styled.p`
1865
+ text-align: center;
1866
+ font-family: ${theme.fontFamily.base};
1867
+ font-size: ${theme.fontSize.sm};
1868
+ color: ${theme.colors.text};
1869
+ margin: 0;
1870
+ `;
1871
+ styled.div`
1872
+ display: none;
1873
+ `;
1874
+ styled.span`
1875
+ position: absolute;
1876
+ width: 1px;
1877
+ height: 1px;
1878
+ padding: 0;
1879
+ margin: -1px;
1880
+ overflow: hidden;
1881
+ clip: rect(0, 0, 0, 0);
1882
+ white-space: nowrap;
1883
+ border-width: 0;
1884
+ `;
1213
1885
  function AuthEmailVerificationStep({
1214
1886
  email,
1215
1887
  method,
@@ -1263,19 +1935,19 @@ function AuthEmailVerificationStep({
1263
1935
  setVerificationCode("");
1264
1936
  }
1265
1937
  };
1266
- return /* @__PURE__ */ jsxs("div", { className: "if-verificationStep", children: [
1267
- isLinkMethod && /* @__PURE__ */ jsxs("div", { className: "if-verificationStep-descriptionContainer", children: [
1268
- /* @__PURE__ */ jsx("p", { className: "if-verificationStep-descriptionTitle", children: "Verify Your Email" }),
1269
- /* @__PURE__ */ jsx("p", { className: "if-verificationStep-description", children: displayDescription.split("{email}").map((part, index, array) => /* @__PURE__ */ jsxs("span", { children: [
1938
+ return /* @__PURE__ */ jsxs(VerificationStepWrapper, { children: [
1939
+ isLinkMethod && /* @__PURE__ */ jsxs(VerificationStepDescriptionContainer, { children: [
1940
+ /* @__PURE__ */ jsx(VerificationStepDescriptionTitle, { children: "Verify Your Email" }),
1941
+ /* @__PURE__ */ jsx(VerificationStepDescription, { children: displayDescription.split("{email}").map((part, index, array) => /* @__PURE__ */ jsxs("span", { children: [
1270
1942
  part,
1271
- index < array.length - 1 && /* @__PURE__ */ jsx("span", { className: "if-verificationLink-email", children: email })
1943
+ index < array.length - 1 && /* @__PURE__ */ jsx(VerificationEmail, { children: email })
1272
1944
  ] }, index)) })
1273
1945
  ] }),
1274
- !isLinkMethod && /* @__PURE__ */ jsxs("div", { className: "if-verificationStep-codeContainer", children: [
1275
- /* @__PURE__ */ jsxs("div", { className: "if-verificationStep-codeInputWrapper", children: [
1276
- /* @__PURE__ */ jsx("p", { className: "if-verificationStep-codeDescription", children: displayDescription.split("{email}").map((part, index, array) => /* @__PURE__ */ jsxs("span", { children: [
1946
+ !isLinkMethod && /* @__PURE__ */ jsxs(VerificationStepCodeContainer, { children: [
1947
+ /* @__PURE__ */ jsxs(VerificationStepCodeInputWrapper, { children: [
1948
+ /* @__PURE__ */ jsx(VerificationStepDescription, { children: displayDescription.split("{email}").map((part, index, array) => /* @__PURE__ */ jsxs("span", { children: [
1277
1949
  part,
1278
- index < array.length - 1 && /* @__PURE__ */ jsx("span", { className: "if-verificationCode-email", children: email })
1950
+ index < array.length - 1 && /* @__PURE__ */ jsx(VerificationEmail, { children: email })
1279
1951
  ] }, index)) }),
1280
1952
  /* @__PURE__ */ jsx(
1281
1953
  AuthVerificationCodeInput,
@@ -1299,17 +1971,16 @@ function AuthEmailVerificationStep({
1299
1971
  }
1300
1972
  )
1301
1973
  ] }),
1302
- /* @__PURE__ */ jsxs("div", { className: "if-verificationStep-resendContainer", children: [
1974
+ /* @__PURE__ */ jsxs(VerificationStepResendContainer, { children: [
1303
1975
  "Didn't receive the email?",
1304
1976
  " ",
1305
1977
  /* @__PURE__ */ jsx(
1306
- "button",
1978
+ VerificationStepResendButton,
1307
1979
  {
1308
1980
  onClick: () => {
1309
1981
  void handleResend();
1310
1982
  },
1311
1983
  disabled: resendDisabled || isSending,
1312
- className: "if-verificationStep-resendButton",
1313
1984
  children: isSending ? "Sending..." : resendDisabled ? `Retry in (${resendCountdown}s)` : "Click to resend"
1314
1985
  }
1315
1986
  )
@@ -1368,16 +2039,16 @@ function AuthResetPasswordVerificationStep({
1368
2039
  setVerificationCode("");
1369
2040
  }
1370
2041
  };
1371
- return /* @__PURE__ */ jsxs("div", { className: "if-verificationStep", children: [
1372
- isLinkMethod && /* @__PURE__ */ jsxs("div", { className: "if-verificationStep-descriptionContainer", children: [
1373
- /* @__PURE__ */ jsx("p", { className: "if-verificationStep-descriptionTitle", children: "Check Your Email" }),
1374
- /* @__PURE__ */ jsx("p", { className: "if-verificationStep-description", children: displayDescription.split("{email}").map((part, index, array) => /* @__PURE__ */ jsxs("span", { children: [
2042
+ return /* @__PURE__ */ jsxs(VerificationStepWrapper, { children: [
2043
+ isLinkMethod && /* @__PURE__ */ jsxs(VerificationStepDescriptionContainer, { children: [
2044
+ /* @__PURE__ */ jsx(VerificationStepDescriptionTitle, { children: "Check Your Email" }),
2045
+ /* @__PURE__ */ jsx(VerificationStepDescription, { children: displayDescription.split("{email}").map((part, index, array) => /* @__PURE__ */ jsxs("span", { children: [
1375
2046
  part,
1376
- index < array.length - 1 && /* @__PURE__ */ jsx("span", { className: "if-verificationLink-email", children: email })
2047
+ index < array.length - 1 && /* @__PURE__ */ jsx(VerificationEmail, { children: email })
1377
2048
  ] }, index)) })
1378
2049
  ] }),
1379
- !isLinkMethod && /* @__PURE__ */ jsxs("div", { className: "if-verificationStep-codeContainer", children: [
1380
- /* @__PURE__ */ jsx("div", { className: "if-verificationStep-codeInputWrapper", children: /* @__PURE__ */ jsx(
2050
+ !isLinkMethod && /* @__PURE__ */ jsxs(VerificationStepCodeContainer, { children: [
2051
+ /* @__PURE__ */ jsx(VerificationStepCodeInputWrapper, { children: /* @__PURE__ */ jsx(
1381
2052
  AuthVerificationCodeInput,
1382
2053
  {
1383
2054
  value: verificationCode,
@@ -1398,17 +2069,16 @@ function AuthResetPasswordVerificationStep({
1398
2069
  }
1399
2070
  )
1400
2071
  ] }),
1401
- /* @__PURE__ */ jsxs("div", { className: "if-verificationStep-resendContainer", children: [
2072
+ /* @__PURE__ */ jsxs(VerificationStepResendContainer, { children: [
1402
2073
  "Didn't receive the email?",
1403
2074
  " ",
1404
2075
  /* @__PURE__ */ jsx(
1405
- "button",
2076
+ VerificationStepResendButton,
1406
2077
  {
1407
2078
  onClick: () => {
1408
2079
  void handleResend();
1409
2080
  },
1410
2081
  disabled: resendDisabled || isSending,
1411
- className: "if-verificationStep-resendButton",
1412
2082
  children: isSending ? "Sending..." : resendDisabled ? `Retry in (${resendCountdown}s)` : "Click to resend"
1413
2083
  }
1414
2084
  )
@@ -1454,39 +2124,47 @@ function SignInForm({
1454
2124
  onVerifyCode,
1455
2125
  emailSent: false
1456
2126
  }
1457
- ) : /* @__PURE__ */ jsxs("form", { onSubmit, noValidate: true, className: "if-form if-internal-fm9k2p", children: [
1458
- /* @__PURE__ */ jsx(
1459
- AuthFormField,
1460
- {
1461
- id: "email",
1462
- type: "email",
1463
- label: emailLabel,
1464
- placeholder: emailPlaceholder,
1465
- value: email,
1466
- onChange: (e) => onEmailChange(e.target.value),
1467
- required: true,
1468
- autoComplete: "email"
1469
- }
1470
- ),
1471
- /* @__PURE__ */ jsx(
1472
- AuthPasswordField,
1473
- {
1474
- id: "password",
1475
- label: passwordLabel,
1476
- placeholder: passwordPlaceholder,
1477
- value: password,
1478
- onChange: (e) => onPasswordChange(e.target.value),
1479
- required: true,
1480
- autoComplete: "current-password",
1481
- authConfig,
1482
- forgotPasswordLink: forgotPasswordUrl ? {
1483
- href: forgotPasswordUrl,
1484
- text: forgotPasswordText
1485
- } : void 0
1486
- }
1487
- ),
1488
- /* @__PURE__ */ jsx(AuthSubmitButton, { isLoading: loading, disabled: loading || oauthLoading !== null, children: loading ? loadingButtonText : submitButtonText })
1489
- ] }),
2127
+ ) : /* @__PURE__ */ jsxs(
2128
+ "form",
2129
+ {
2130
+ onSubmit,
2131
+ noValidate: true,
2132
+ style: { display: "flex", flexDirection: "column", gap: theme.spacing[6] },
2133
+ children: [
2134
+ /* @__PURE__ */ jsx(
2135
+ AuthFormField,
2136
+ {
2137
+ id: "email",
2138
+ type: "email",
2139
+ label: emailLabel,
2140
+ placeholder: emailPlaceholder,
2141
+ value: email,
2142
+ onChange: (e) => onEmailChange(e.target.value),
2143
+ required: true,
2144
+ autoComplete: "email"
2145
+ }
2146
+ ),
2147
+ /* @__PURE__ */ jsx(
2148
+ AuthPasswordField,
2149
+ {
2150
+ id: "password",
2151
+ label: passwordLabel,
2152
+ placeholder: passwordPlaceholder,
2153
+ value: password,
2154
+ onChange: (e) => onPasswordChange(e.target.value),
2155
+ required: true,
2156
+ autoComplete: "current-password",
2157
+ authConfig,
2158
+ forgotPasswordLink: forgotPasswordUrl ? {
2159
+ href: forgotPasswordUrl,
2160
+ text: forgotPasswordText
2161
+ } : void 0
2162
+ }
2163
+ ),
2164
+ /* @__PURE__ */ jsx(AuthSubmitButton, { isLoading: loading, disabled: loading || oauthLoading !== null, children: loading ? loadingButtonText : submitButtonText })
2165
+ ]
2166
+ }
2167
+ ),
1490
2168
  !showVerificationStep && /* @__PURE__ */ jsxs(Fragment, { children: [
1491
2169
  /* @__PURE__ */ jsx(AuthLink, { text: signUpText, linkText: signUpLinkText, href: signUpUrl }),
1492
2170
  authConfig.oAuthProviders.length > 0 && onOAuthClick && /* @__PURE__ */ jsxs(Fragment, { children: [
@@ -1638,36 +2316,44 @@ function SignUpForm({
1638
2316
  onVerifyCode,
1639
2317
  emailSent: true
1640
2318
  }
1641
- ) : /* @__PURE__ */ jsxs("form", { onSubmit, noValidate: true, className: "if-form if-internal-fm9k2p", children: [
1642
- /* @__PURE__ */ jsx(
1643
- AuthFormField,
1644
- {
1645
- id: "email",
1646
- type: "email",
1647
- label: emailLabel,
1648
- placeholder: emailPlaceholder,
1649
- value: email,
1650
- onChange: (e) => onEmailChange(e.target.value),
1651
- required: true,
1652
- autoComplete: "email"
1653
- }
1654
- ),
1655
- /* @__PURE__ */ jsx(
1656
- AuthPasswordField,
1657
- {
1658
- id: "password",
1659
- label: passwordLabel,
1660
- placeholder: passwordPlaceholder,
1661
- value: password,
1662
- onChange: (e) => onPasswordChange(e.target.value),
1663
- required: true,
1664
- autoComplete: "new-password",
1665
- showStrengthIndicator: true,
1666
- authConfig
1667
- }
1668
- ),
1669
- /* @__PURE__ */ jsx(AuthSubmitButton, { isLoading: loading, disabled: loading || oauthLoading !== null, children: loading ? loadingButtonText : submitButtonText })
1670
- ] }),
2319
+ ) : /* @__PURE__ */ jsxs(
2320
+ "form",
2321
+ {
2322
+ onSubmit,
2323
+ noValidate: true,
2324
+ style: { display: "flex", flexDirection: "column", gap: theme.spacing[6] },
2325
+ children: [
2326
+ /* @__PURE__ */ jsx(
2327
+ AuthFormField,
2328
+ {
2329
+ id: "email",
2330
+ type: "email",
2331
+ label: emailLabel,
2332
+ placeholder: emailPlaceholder,
2333
+ value: email,
2334
+ onChange: (e) => onEmailChange(e.target.value),
2335
+ required: true,
2336
+ autoComplete: "email"
2337
+ }
2338
+ ),
2339
+ /* @__PURE__ */ jsx(
2340
+ AuthPasswordField,
2341
+ {
2342
+ id: "password",
2343
+ label: passwordLabel,
2344
+ placeholder: passwordPlaceholder,
2345
+ value: password,
2346
+ onChange: (e) => onPasswordChange(e.target.value),
2347
+ required: true,
2348
+ autoComplete: "new-password",
2349
+ showStrengthIndicator: true,
2350
+ authConfig
2351
+ }
2352
+ ),
2353
+ /* @__PURE__ */ jsx(AuthSubmitButton, { isLoading: loading, disabled: loading || oauthLoading !== null, children: loading ? loadingButtonText : submitButtonText })
2354
+ ]
2355
+ }
2356
+ ),
1671
2357
  !showVerificationStep && /* @__PURE__ */ jsxs(Fragment, { children: [
1672
2358
  /* @__PURE__ */ jsx(AuthLink, { text: signInText, linkText: signInLinkText, href: signInUrl }),
1673
2359
  authConfig.oAuthProviders.length > 0 && onOAuthClick && /* @__PURE__ */ jsxs(Fragment, { children: [
@@ -1910,22 +2596,30 @@ function ForgotPasswordForm({
1910
2596
  onResendEmail: onResendEmail || (async () => {
1911
2597
  })
1912
2598
  }
1913
- ) : /* @__PURE__ */ jsxs("form", { onSubmit, noValidate: true, className: "if-form if-internal-fm9k2p", children: [
1914
- /* @__PURE__ */ jsx(
1915
- AuthFormField,
1916
- {
1917
- id: "email",
1918
- type: "email",
1919
- label: emailLabel,
1920
- placeholder: emailPlaceholder,
1921
- value: email,
1922
- onChange: (e) => onEmailChange(e.target.value),
1923
- required: true,
1924
- autoComplete: "email"
1925
- }
1926
- ),
1927
- /* @__PURE__ */ jsx(AuthSubmitButton, { isLoading: loading, disabled: loading, children: loading ? loadingButtonText : submitButtonText })
1928
- ] }),
2599
+ ) : /* @__PURE__ */ jsxs(
2600
+ "form",
2601
+ {
2602
+ onSubmit,
2603
+ noValidate: true,
2604
+ style: { display: "flex", flexDirection: "column", gap: theme.spacing[6] },
2605
+ children: [
2606
+ /* @__PURE__ */ jsx(
2607
+ AuthFormField,
2608
+ {
2609
+ id: "email",
2610
+ type: "email",
2611
+ label: emailLabel,
2612
+ placeholder: emailPlaceholder,
2613
+ value: email,
2614
+ onChange: (e) => onEmailChange(e.target.value),
2615
+ required: true,
2616
+ autoComplete: "email"
2617
+ }
2618
+ ),
2619
+ /* @__PURE__ */ jsx(AuthSubmitButton, { isLoading: loading, disabled: loading, children: loading ? loadingButtonText : submitButtonText })
2620
+ ]
2621
+ }
2622
+ ),
1929
2623
  !showVerificationStep && /* @__PURE__ */ jsx(AuthLink, { text: backToSignInText, linkText: "Back to Sign In", href: backToSignInUrl })
1930
2624
  ] });
1931
2625
  }
@@ -1954,77 +2648,64 @@ function ResetPasswordForm({
1954
2648
  successMessage = "Your password has been successfully reset. You can wait for redirect to sign in with your new password.";
1955
2649
  }
1956
2650
  if (success) {
1957
- return /* @__PURE__ */ jsx(AuthContainer, { children: /* @__PURE__ */ jsxs(
1958
- "div",
2651
+ return /* @__PURE__ */ jsx(AuthContainer, { children: /* @__PURE__ */ jsx(VerifyStatusContainer, { $stretch: true, children: /* @__PURE__ */ jsxs(VerifyStatusSuccessContent, { children: [
2652
+ /* @__PURE__ */ jsx(VerifyStatusSuccessIcon, { children: /* @__PURE__ */ jsx(VerifyStatusSuccessIconSvg, { children: /* @__PURE__ */ jsx(
2653
+ "svg",
2654
+ {
2655
+ fill: "none",
2656
+ strokeLinecap: "round",
2657
+ strokeLinejoin: "round",
2658
+ strokeWidth: "2",
2659
+ viewBox: "0 0 24 24",
2660
+ stroke: "currentColor",
2661
+ children: /* @__PURE__ */ jsx("path", { d: "M5 13l4 4L19 7" })
2662
+ }
2663
+ ) }) }),
2664
+ /* @__PURE__ */ jsx(VerifyStatusTextCenter, { style: { fontSize: "1.5rem", fontWeight: 600 }, children: successTitle }),
2665
+ /* @__PURE__ */ jsx(VerifyStatusTextCenter, { style: { color: theme.colors.textSecondary }, children: successMessage })
2666
+ ] }) }) });
2667
+ }
2668
+ return /* @__PURE__ */ jsxs(AuthContainer, { children: [
2669
+ /* @__PURE__ */ jsx(AuthHeader, { title, subtitle }),
2670
+ /* @__PURE__ */ jsx(AuthErrorBanner, { error: error || "" }),
2671
+ /* @__PURE__ */ jsxs(
2672
+ "form",
1959
2673
  {
1960
- style: { display: "flex", flexDirection: "column", alignItems: "center", gap: "1rem" },
2674
+ onSubmit,
2675
+ noValidate: true,
2676
+ style: { display: "flex", flexDirection: "column", gap: theme.spacing[6] },
1961
2677
  children: [
1962
2678
  /* @__PURE__ */ jsx(
1963
- "div",
2679
+ AuthPasswordField,
1964
2680
  {
1965
- style: {
1966
- width: "4rem",
1967
- height: "4rem",
1968
- borderRadius: "50%",
1969
- backgroundColor: "#D1FAE5",
1970
- display: "flex",
1971
- alignItems: "center",
1972
- justifyContent: "center"
1973
- },
1974
- children: /* @__PURE__ */ jsx(
1975
- "svg",
1976
- {
1977
- style: { width: "2rem", height: "2rem", color: "#059669" },
1978
- fill: "none",
1979
- strokeLinecap: "round",
1980
- strokeLinejoin: "round",
1981
- strokeWidth: "2",
1982
- viewBox: "0 0 24 24",
1983
- stroke: "currentColor",
1984
- children: /* @__PURE__ */ jsx("path", { d: "M5 13l4 4L19 7" })
1985
- }
1986
- )
2681
+ id: "newPassword",
2682
+ label: newPasswordLabel,
2683
+ placeholder: newPasswordPlaceholder,
2684
+ value: newPassword,
2685
+ onChange: (e) => onNewPasswordChange(e.target.value),
2686
+ required: true,
2687
+ autoComplete: "new-password",
2688
+ showStrengthIndicator: true,
2689
+ authConfig
1987
2690
  }
1988
2691
  ),
1989
- /* @__PURE__ */ jsx("h2", { className: "if-authHeader-title", style: { textAlign: "center" }, children: successTitle }),
1990
- /* @__PURE__ */ jsx("p", { className: "if-authHeader-subtitle", style: { textAlign: "center" }, children: successMessage })
2692
+ /* @__PURE__ */ jsx(
2693
+ AuthPasswordField,
2694
+ {
2695
+ id: "confirmPassword",
2696
+ label: confirmPasswordLabel,
2697
+ placeholder: confirmPasswordPlaceholder,
2698
+ value: confirmPassword,
2699
+ onChange: (e) => onConfirmPasswordChange(e.target.value),
2700
+ required: true,
2701
+ autoComplete: "new-password",
2702
+ authConfig
2703
+ }
2704
+ ),
2705
+ /* @__PURE__ */ jsx(AuthSubmitButton, { isLoading: loading, disabled: loading, children: loading ? loadingButtonText : submitButtonText })
1991
2706
  ]
1992
2707
  }
1993
- ) });
1994
- }
1995
- return /* @__PURE__ */ jsxs(AuthContainer, { children: [
1996
- /* @__PURE__ */ jsx(AuthHeader, { title, subtitle }),
1997
- /* @__PURE__ */ jsx(AuthErrorBanner, { error: error || "" }),
1998
- /* @__PURE__ */ jsxs("form", { onSubmit, noValidate: true, className: "if-form if-internal-fm9k2p", children: [
1999
- /* @__PURE__ */ jsx(
2000
- AuthPasswordField,
2001
- {
2002
- id: "newPassword",
2003
- label: newPasswordLabel,
2004
- placeholder: newPasswordPlaceholder,
2005
- value: newPassword,
2006
- onChange: (e) => onNewPasswordChange(e.target.value),
2007
- required: true,
2008
- autoComplete: "new-password",
2009
- showStrengthIndicator: true,
2010
- authConfig
2011
- }
2012
- ),
2013
- /* @__PURE__ */ jsx(
2014
- AuthPasswordField,
2015
- {
2016
- id: "confirmPassword",
2017
- label: confirmPasswordLabel,
2018
- placeholder: confirmPasswordPlaceholder,
2019
- value: confirmPassword,
2020
- onChange: (e) => onConfirmPasswordChange(e.target.value),
2021
- required: true,
2022
- autoComplete: "new-password",
2023
- authConfig
2024
- }
2025
- ),
2026
- /* @__PURE__ */ jsx(AuthSubmitButton, { isLoading: loading, disabled: loading, children: loading ? loadingButtonText : submitButtonText })
2027
- ] })
2708
+ )
2028
2709
  ] });
2029
2710
  }
2030
2711
  function ForgotPassword({ onError, ...uiProps }) {
@@ -2369,25 +3050,24 @@ function VerifyEmailStatus({
2369
3050
  errorTitle = "Verification Failed"
2370
3051
  }) {
2371
3052
  if (status === "verifying") {
2372
- return /* @__PURE__ */ jsx(AuthContainer, { children: /* @__PURE__ */ jsxs("div", { className: "if-verifyStatus-container", children: [
2373
- /* @__PURE__ */ jsx("h2", { className: "if-authHeader-title", children: verifyingTitle }),
2374
- /* @__PURE__ */ jsx("div", { className: "if-submitButton-spinner if-verifyStatus-spinner" })
3053
+ return /* @__PURE__ */ jsx(AuthContainer, { children: /* @__PURE__ */ jsxs(VerifyStatusContainer, { children: [
3054
+ /* @__PURE__ */ jsx(AuthHeader, { title: verifyingTitle }),
3055
+ /* @__PURE__ */ jsx(VerifyStatusSpinner, {})
2375
3056
  ] }) });
2376
3057
  }
2377
3058
  if (status === "error") {
2378
- return /* @__PURE__ */ jsx(AuthContainer, { children: /* @__PURE__ */ jsx("div", { className: "if-verifyStatus-container-stretch", children: /* @__PURE__ */ jsxs("div", { className: "if-authHeader if-internal-h3m7w5", children: [
2379
- /* @__PURE__ */ jsx("h1", { className: "if-authHeader-title if-internal-t4p1k9", children: errorTitle }),
2380
- /* @__PURE__ */ jsxs("p", { className: "if-authHeader-subtitle if-internal-s7q2m3", children: [
2381
- error || "The verification link is invalid or has expired.",
2382
- " Please try again or contact support if the problem persists. You can close this page and return to your app."
2383
- ] })
2384
- ] }) }) });
3059
+ return /* @__PURE__ */ jsx(AuthContainer, { children: /* @__PURE__ */ jsx(VerifyStatusContainer, { $stretch: true, children: /* @__PURE__ */ jsx(
3060
+ AuthHeader,
3061
+ {
3062
+ title: errorTitle,
3063
+ 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.`
3064
+ }
3065
+ ) }) });
2385
3066
  }
2386
- return /* @__PURE__ */ jsx(AuthContainer, { children: /* @__PURE__ */ jsx("div", { className: "if-verifyStatus-container-stretch", children: /* @__PURE__ */ jsxs("div", { className: "if-verifyStatus-successContent", children: [
2387
- /* @__PURE__ */ jsx("div", { className: "if-verifyStatus-successIcon", children: /* @__PURE__ */ jsx(
3067
+ return /* @__PURE__ */ jsx(AuthContainer, { children: /* @__PURE__ */ jsx(VerifyStatusContainer, { $stretch: true, children: /* @__PURE__ */ jsxs(VerifyStatusSuccessContent, { children: [
3068
+ /* @__PURE__ */ jsx(VerifyStatusSuccessIcon, { children: /* @__PURE__ */ jsx(VerifyStatusSuccessIconSvg, { children: /* @__PURE__ */ jsx(
2388
3069
  "svg",
2389
3070
  {
2390
- className: "if-verifyStatus-successIconSvg",
2391
3071
  fill: "none",
2392
3072
  strokeLinecap: "round",
2393
3073
  strokeLinejoin: "round",
@@ -2396,9 +3076,9 @@ function VerifyEmailStatus({
2396
3076
  stroke: "currentColor",
2397
3077
  children: /* @__PURE__ */ jsx("path", { d: "M5 13l4 4L19 7" })
2398
3078
  }
2399
- ) }),
2400
- /* @__PURE__ */ jsx("h2", { className: "if-authHeader-title if-verifyStatus-textCenter", children: successTitle }),
2401
- /* @__PURE__ */ jsx("p", { className: "if-authHeader-subtitle if-verifyStatus-textCenter", children: successMessage })
3079
+ ) }) }),
3080
+ /* @__PURE__ */ jsx(VerifyStatusTextCenter, { style: { fontSize: "1.5rem", fontWeight: 600 }, children: successTitle }),
3081
+ /* @__PURE__ */ jsx(VerifyStatusTextCenter, { style: { color: theme.colors.textSecondary }, children: successMessage })
2402
3082
  ] }) }) });
2403
3083
  }
2404
3084
  function VerifyEmail({ token, onSuccess, onError, ...uiProps }) {
@@ -2448,6 +3128,120 @@ function VerifyEmail({ token, onSuccess, onError, ...uiProps }) {
2448
3128
  }, [token, verifyEmail, onSuccess, onError]);
2449
3129
  return /* @__PURE__ */ jsx(VerifyEmailStatus, { status, error, ...uiProps });
2450
3130
  }
3131
+ var UserButtonContainer = styled.div`
3132
+ position: relative;
3133
+ display: inline-block;
3134
+ `;
3135
+ var UserButtonButton = styled.button`
3136
+ display: flex;
3137
+ align-items: center;
3138
+ justify-content: center;
3139
+ gap: ${theme.spacing[2]};
3140
+ padding: ${theme.spacing[2]};
3141
+ border-radius: ${(props) => props.$detailed ? theme.radius.sm : theme.radius.full};
3142
+ background-color: ${(props) => props.$detailed ? theme.colors.bgWhite : "transparent"};
3143
+ border: ${(props) => props.$detailed ? `1px solid ${theme.colors.border}` : "none"};
3144
+ cursor: pointer;
3145
+ transition: all ${theme.transition.base};
3146
+
3147
+ &:hover {
3148
+ ${(props) => props.$detailed ? `
3149
+ background-color: ${theme.colors.bgLight};
3150
+ opacity: 1;
3151
+ ` : `
3152
+ opacity: 0.8;
3153
+ `}
3154
+ }
3155
+ `;
3156
+ var UserButtonAvatar = styled.div`
3157
+ width: 2rem;
3158
+ height: 2rem;
3159
+ border-radius: ${theme.radius.full};
3160
+ background-color: ${theme.colors.primary};
3161
+ color: ${theme.colors.bgWhite};
3162
+ display: flex;
3163
+ align-items: center;
3164
+ justify-content: center;
3165
+ font-weight: 600;
3166
+ font-size: ${theme.fontSize.sm};
3167
+ font-family: ${theme.fontFamily.base};
3168
+ overflow: hidden;
3169
+ `;
3170
+ var UserButtonAvatarImage = styled.img`
3171
+ border-radius: ${theme.radius.full};
3172
+ object-fit: cover;
3173
+ width: 100%;
3174
+ height: 100%;
3175
+ `;
3176
+ var UserButtonAvatarInitials = styled.span`
3177
+ color: ${theme.colors.bgWhite};
3178
+ font-weight: 600;
3179
+ font-size: ${theme.fontSize.sm};
3180
+ `;
3181
+ var UserButtonInfo = styled.div`
3182
+ display: flex;
3183
+ flex-direction: column;
3184
+ align-items: flex-start;
3185
+ gap: 0.125rem;
3186
+ `;
3187
+ var UserButtonName = styled.div`
3188
+ font-size: ${theme.fontSize.sm};
3189
+ font-weight: 600;
3190
+ color: ${theme.colors.text};
3191
+ line-height: 1.25rem;
3192
+ text-align: left;
3193
+ font-family: ${theme.fontFamily.base};
3194
+ `;
3195
+ var UserButtonEmail = styled.div`
3196
+ font-size: ${theme.fontSize.xs};
3197
+ color: ${theme.colors.textSecondary};
3198
+ line-height: 1rem;
3199
+ text-align: left;
3200
+ font-family: ${theme.fontFamily.base};
3201
+ `;
3202
+ var UserButtonMenu = styled.div`
3203
+ position: absolute;
3204
+ margin-top: ${theme.spacing[2]};
3205
+ background-color: ${theme.colors.bgWhite};
3206
+ border: 1px solid ${theme.colors.border};
3207
+ border-radius: ${theme.radius.md};
3208
+ box-shadow: ${theme.shadow.lg};
3209
+ padding: ${theme.spacing[2]};
3210
+ min-width: 200px;
3211
+ z-index: 50;
3212
+ `;
3213
+ var UserButtonMenuItem = styled.button`
3214
+ display: flex;
3215
+ align-items: center;
3216
+ gap: ${theme.spacing[2]};
3217
+ padding: ${theme.spacing[2]};
3218
+ border-radius: ${theme.radius.sm};
3219
+ cursor: pointer;
3220
+ transition: background-color ${theme.transition.fast};
3221
+ font-size: ${theme.fontSize.sm};
3222
+ color: ${(props) => props.$signout ? theme.colors.error : theme.colors.text};
3223
+ font-family: ${theme.fontFamily.base};
3224
+ background: none;
3225
+ border: none;
3226
+ width: 100%;
3227
+ text-align: left;
3228
+
3229
+ &:hover {
3230
+ background-color: ${theme.colors.bgLight};
3231
+ }
3232
+ `;
3233
+ var UserButtonMenuItemIcon = styled.div`
3234
+ width: 1.25rem;
3235
+ height: 1.25rem;
3236
+ display: flex;
3237
+ align-items: center;
3238
+ justify-content: center;
3239
+
3240
+ svg {
3241
+ width: 100%;
3242
+ height: 100%;
3243
+ }
3244
+ `;
2451
3245
  function UserButton({ afterSignOutUrl = "/", mode = "detailed" }) {
2452
3246
  const { user, signOut } = useInsforge();
2453
3247
  const [isOpen, setIsOpen] = useState(false);
@@ -2499,43 +3293,34 @@ function UserButton({ afterSignOutUrl = "/", mode = "detailed" }) {
2499
3293
  return null;
2500
3294
  }
2501
3295
  const initials = user.name ? user.name.charAt(0).toUpperCase() : user.email.split("@")[0].slice(0, 2).toUpperCase();
2502
- const buttonClassName = mode === "detailed" ? "if-userButton if-userButton-detailed" : "if-userButton";
2503
- return /* @__PURE__ */ jsxs("div", { className: "if-userButton-container if-internal-ub3k8p", ref: dropdownRef, children: [
3296
+ return /* @__PURE__ */ jsxs(UserButtonContainer, { ref: dropdownRef, children: [
2504
3297
  /* @__PURE__ */ jsxs(
2505
- "button",
3298
+ UserButtonButton,
2506
3299
  {
2507
- className: buttonClassName,
3300
+ $detailed: mode === "detailed",
2508
3301
  onClick: () => setIsOpen(!isOpen),
2509
3302
  "aria-expanded": isOpen,
2510
3303
  "aria-haspopup": "true",
2511
3304
  children: [
2512
- /* @__PURE__ */ jsx("div", { className: "if-userButton-avatar", children: user.avatarUrl && !imageError ? /* @__PURE__ */ jsx(
2513
- "img",
3305
+ /* @__PURE__ */ jsx(UserButtonAvatar, { children: user.avatarUrl && !imageError ? /* @__PURE__ */ jsx(
3306
+ UserButtonAvatarImage,
2514
3307
  {
2515
3308
  src: user.avatarUrl,
2516
3309
  alt: user.email,
2517
- onError: () => setImageError(true),
2518
- className: "if-userButton-avatarImage"
3310
+ onError: () => setImageError(true)
2519
3311
  }
2520
- ) : /* @__PURE__ */ jsx("span", { className: "if-userButton-avatarInitials", children: initials }) }),
2521
- mode === "detailed" && /* @__PURE__ */ jsxs("div", { className: "if-userButton-info", children: [
2522
- user.name && /* @__PURE__ */ jsx("div", { className: "if-userButton-name", children: user.name }),
2523
- /* @__PURE__ */ jsx("div", { className: "if-userButton-email", children: user.email })
3312
+ ) : /* @__PURE__ */ jsx(UserButtonAvatarInitials, { children: initials }) }),
3313
+ mode === "detailed" && /* @__PURE__ */ jsxs(UserButtonInfo, { children: [
3314
+ user.name && /* @__PURE__ */ jsx(UserButtonName, { children: user.name }),
3315
+ /* @__PURE__ */ jsx(UserButtonEmail, { children: user.email })
2524
3316
  ] })
2525
3317
  ]
2526
3318
  }
2527
3319
  ),
2528
- isOpen && /* @__PURE__ */ jsx("div", { className: "if-userButton-menu", children: /* @__PURE__ */ jsxs(
2529
- "button",
2530
- {
2531
- onClick: () => void handleSignOut(),
2532
- className: "if-userButton-menuItem if-userButton-menuItem-signout",
2533
- children: [
2534
- /* @__PURE__ */ jsx(LogOut, { className: "if-userButton-menuItem-icon" }),
2535
- "Sign out"
2536
- ]
2537
- }
2538
- ) })
3320
+ isOpen && /* @__PURE__ */ jsx(UserButtonMenu, { children: /* @__PURE__ */ jsxs(UserButtonMenuItem, { $signout: true, onClick: () => void handleSignOut(), children: [
3321
+ /* @__PURE__ */ jsx(UserButtonMenuItemIcon, { children: /* @__PURE__ */ jsx(LogOut, {}) }),
3322
+ "Sign out"
3323
+ ] }) })
2539
3324
  ] });
2540
3325
  }
2541
3326
  function Protect({
@@ -2644,6 +3429,6 @@ function useUser() {
2644
3429
  return { user, isLoaded, updateUser, setUser };
2645
3430
  }
2646
3431
 
2647
- export { AuthBranding, AuthContainer, AuthDivider, AuthEmailVerificationStep, AuthErrorBanner, AuthFormField, AuthHeader, AuthLink, AuthOAuthButton, AuthOAuthProviders, AuthPasswordField, AuthPasswordStrengthIndicator, AuthResetPasswordVerificationStep, AuthSubmitButton, AuthVerificationCodeInput, BrowserNavigationAdapter, ForgotPassword, ForgotPasswordForm, InsforgeProvider, InsforgeProviderCore, NavigationProvider, OAUTH_PROVIDER_CONFIG, Protect, ResetPassword, ResetPasswordForm, SignIn, SignInButton, SignInForm, SignUp, SignUpButton, SignUpForm, SignedIn, SignedOut, UserButton, VerifyEmail, VerifyEmailStatus, checkPasswordStrength, createPasswordSchema, emailSchema, getAllProviderConfigs, getProviderConfig, passwordSchema, resolveAuthPath, resolveAuthUrl, useAuth, useInsforge, useNavigationAdapter, usePublicAuthConfig, useSearchParams, useUser, validateEmail, validatePassword };
3432
+ export { AuthBranding, AuthContainer, AuthDivider, AuthEmailVerificationStep, AuthErrorBanner, AuthFormField, AuthHeader, AuthLink, AuthOAuthButton, AuthOAuthProviders, AuthPasswordField, AuthPasswordStrengthIndicator, AuthResetPasswordVerificationStep, AuthSubmitButton, AuthVerificationCodeInput, BrowserNavigationAdapter, ForgotPassword, ForgotPasswordForm, InsforgeProvider, InsforgeProviderCore, NavigationProvider, OAUTH_PROVIDER_CONFIG, Protect, ResetPassword, ResetPasswordForm, SignIn, SignInButton, SignInForm, SignUp, SignUpButton, SignUpForm, SignedIn, SignedOut, StyleProvider, UserButton, VerifyEmail, VerifyEmailStatus, checkPasswordStrength, createPasswordSchema, emailSchema, getAllProviderConfigs, getProviderConfig, passwordSchema, resolveAuthPath, resolveAuthUrl, theme, useAuth, useInsforge, useNavigationAdapter, usePublicAuthConfig, useSearchParams, useUser, validateEmail, validatePassword };
2648
3433
  //# sourceMappingURL=index.js.map
2649
3434
  //# sourceMappingURL=index.js.map