@insforge/react 0.6.8 → 0.6.10

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