@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.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 }) {
@@ -488,6 +496,17 @@ var InsforgeManager = class _InsforgeManager {
488
496
  this.listeners.clear();
489
497
  }
490
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
+ }
491
510
  function InsforgeProviderCore({
492
511
  children,
493
512
  baseUrl,
@@ -555,13 +574,13 @@ function InsforgeProviderCore({
555
574
  }),
556
575
  [state, manager]
557
576
  );
558
- return /* @__PURE__ */ jsxRuntime.jsx(react$1.InsforgeContext.Provider, { value: contextValue, children });
577
+ return /* @__PURE__ */ jsxRuntime.jsx(react$2.InsforgeContext.Provider, { value: contextValue, children });
559
578
  }
560
579
  function InsforgeProvider(props) {
561
- 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 }) }) });
562
581
  }
563
582
  function useInsforge() {
564
- const context = react.useContext(react$1.InsforgeContext);
583
+ const context = react.useContext(react$2.InsforgeContext);
565
584
  if (!context) {
566
585
  return {
567
586
  user: void 0,
@@ -607,9 +626,538 @@ function usePublicAuthConfig() {
607
626
  }, [getPublicAuthConfig]);
608
627
  return { authConfig, isLoaded };
609
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
+ `;
610
1158
  function AuthBranding() {
611
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "if-authBranding if-internal-ab4k9w", children: [
612
- /* @__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" }),
613
1161
  /* @__PURE__ */ jsxRuntime.jsx("a", { href: "https://insforge.dev", target: "_blank", rel: "noopener noreferrer", children: /* @__PURE__ */ jsxRuntime.jsxs(
614
1162
  "svg",
615
1163
  {
@@ -678,30 +1226,30 @@ function AuthBranding() {
678
1226
  ] });
679
1227
  }
680
1228
  function AuthContainer({ children }) {
681
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "if-authContainer if-internal-a8f3d2", children: [
682
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "if-authCard if-internal-b2k9x1", children }),
1229
+ return /* @__PURE__ */ jsxRuntime.jsxs(AuthContainerWrapper, { children: [
1230
+ /* @__PURE__ */ jsxRuntime.jsx(AuthCard, { children }),
683
1231
  /* @__PURE__ */ jsxRuntime.jsx(AuthBranding, {})
684
1232
  ] });
685
1233
  }
686
1234
  function AuthHeader({ title, subtitle }) {
687
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "if-authHeader if-internal-h3m7w5", children: [
688
- /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "if-authHeader-title if-internal-t4p1k9", children: title }),
689
- 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 })
690
1238
  ] });
691
1239
  }
692
1240
  function AuthErrorBanner({ error }) {
693
1241
  if (!error) {
694
1242
  return null;
695
1243
  }
696
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "if-errorBanner if-internal-eb2m7k", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "if-errorBanner-content", children: [
697
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.AlertTriangle, { className: "if-errorBanner-icon" }),
698
- /* @__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 })
699
1247
  ] }) });
700
1248
  }
701
1249
  function AuthFormField({ label, id, ...props }) {
702
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "if-formField if-internal-f9n6p2", children: [
703
- /* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: id, className: "if-formField-label if-internal-l3k8m1", children: label }),
704
- /* @__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 })
705
1253
  ] });
706
1254
  }
707
1255
  function AuthPasswordStrengthIndicator({
@@ -709,7 +1257,7 @@ function AuthPasswordStrengthIndicator({
709
1257
  config
710
1258
  }) {
711
1259
  const requirements = createRequirements(config);
712
- 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: [
713
1261
  /* @__PURE__ */ jsxRuntime.jsx(
714
1262
  "div",
715
1263
  {
@@ -811,29 +1359,27 @@ function AuthPasswordField({
811
1359
  }
812
1360
  onFocus?.(e);
813
1361
  };
814
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "if-passwordField if-internal-p5w9m7", children: [
815
- (label || forgotPasswordLink) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "if-passwordField-labelRow", children: [
816
- /* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: id, className: "if-passwordField-label", children: label }),
817
- 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?" }) })
818
1366
  ] }),
819
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "if-passwordField-inputWrapper", children: [
1367
+ /* @__PURE__ */ jsxRuntime.jsxs(PasswordFieldInputWrapper, { children: [
820
1368
  /* @__PURE__ */ jsxRuntime.jsx(
821
- "input",
1369
+ PasswordFieldInput,
822
1370
  {
823
1371
  id,
824
1372
  type: showPassword ? "text" : "password",
825
- className: "if-passwordField-input",
826
1373
  value,
827
1374
  onFocus: handleFocus,
828
1375
  ...props
829
1376
  }
830
1377
  ),
831
1378
  /* @__PURE__ */ jsxRuntime.jsx(
832
- "button",
1379
+ PasswordFieldToggleButton,
833
1380
  {
834
1381
  type: "button",
835
1382
  onClick: () => setShowPassword(!showPassword),
836
- className: "if-passwordField-toggleButton",
837
1383
  "aria-label": showPassword ? "Hide password" : "Show password",
838
1384
  children: showPassword ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.EyeOff, { size: 20 }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Eye, { size: 20 })
839
1385
  }
@@ -850,36 +1396,27 @@ function AuthSubmitButton({
850
1396
  type = "submit",
851
1397
  onClick
852
1398
  }) {
853
- return /* @__PURE__ */ jsxRuntime.jsxs(
854
- "button",
855
- {
856
- type,
857
- className: "if-submitButton if-internal-b8p3m4",
858
- disabled: disabled || isLoading || confirmed,
859
- onClick,
860
- children: [
861
- isLoading && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "if-submitButton-icon if-submitButton-spinner", size: 20 }),
862
- confirmed && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CircleCheck, { className: "if-submitButton-icon", size: 20 }),
863
- children
864
- ]
865
- }
866
- );
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
+ ] });
867
1404
  }
868
1405
  function AuthLink({ text, linkText, href }) {
869
1406
  const searchParams = useSearchParams();
870
1407
  const { Link } = useNavigationAdapter();
871
1408
  const finalHref = resolveAuthUrl(href, searchParams);
872
- return /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "if-authLink if-internal-al5w9p", children: [
873
- 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 }),
874
1411
  text && " ",
875
- /* @__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 }) })
876
1413
  ] });
877
1414
  }
878
1415
  function AuthDivider({ text = "or" }) {
879
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "if-authDivider if-internal-ad7k3m", children: [
880
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "if-authDivider-line" }),
881
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "if-authDivider-text", children: text }),
882
- /* @__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, {})
883
1420
  ] });
884
1421
  }
885
1422
  var OAUTH_PROVIDER_CONFIG = {
@@ -1043,23 +1580,17 @@ function AuthOAuthButton({
1043
1580
  }
1044
1581
  return "";
1045
1582
  };
1046
- const className = [
1047
- "if-oauthButton",
1048
- "if-internal-o4k7w2",
1049
- displayMode === "full" && "if-oauthButton-full",
1050
- displayMode === "short" && "if-oauthButton-short",
1051
- displayMode === "icon" && "if-oauthButton-icon-only"
1052
- ].filter(Boolean).join(" ");
1583
+ const variant = displayMode === "icon" ? "iconOnly" : displayMode;
1053
1584
  return /* @__PURE__ */ jsxRuntime.jsxs(
1054
- "button",
1585
+ OAuthButton,
1055
1586
  {
1056
1587
  type: "button",
1057
1588
  onClick: () => onClick(provider),
1058
- className,
1589
+ $variant: variant,
1059
1590
  disabled: disabled || loading,
1060
1591
  style,
1061
1592
  children: [
1062
- 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 }),
1063
1594
  !loading && getButtonText() && /* @__PURE__ */ jsxRuntime.jsx("span", { children: getButtonText() })
1064
1595
  ]
1065
1596
  }
@@ -1118,14 +1649,12 @@ function AuthOAuthProviders({
1118
1649
  }
1119
1650
  };
1120
1651
  return /* @__PURE__ */ jsxRuntime.jsx(
1121
- "div",
1652
+ OAuthProvidersContainer,
1122
1653
  {
1123
- className: "if-oauthProviders if-internal-op3m8k",
1124
1654
  style: {
1125
1655
  display: "grid",
1126
1656
  gridTemplateColumns: "repeat(6, 1fr)",
1127
- gap: "0.75rem",
1128
- width: "100%"
1657
+ gap: "0.75rem"
1129
1658
  },
1130
1659
  children: providers.map((provider, index) => /* @__PURE__ */ jsxRuntime.jsx(
1131
1660
  AuthOAuthButton,
@@ -1192,8 +1721,8 @@ function AuthVerificationCodeInput({
1192
1721
  }
1193
1722
  }
1194
1723
  };
1195
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "if-verificationCode-inputContainer", children: Array.from({ length }).map((_, index) => /* @__PURE__ */ jsxRuntime.jsx(
1196
- "input",
1724
+ return /* @__PURE__ */ jsxRuntime.jsx(VerificationCodeInputContainer, { children: Array.from({ length }).map((_, index) => /* @__PURE__ */ jsxRuntime.jsx(
1725
+ VerificationCodeInput,
1197
1726
  {
1198
1727
  ref: (el) => {
1199
1728
  inputRefs.current[index] = el;
@@ -1206,12 +1735,160 @@ function AuthVerificationCodeInput({
1206
1735
  onKeyDown: (e) => handleKeyDown(index, e),
1207
1736
  onPaste: handlePaste,
1208
1737
  disabled,
1209
- className: "if-verificationCode-input",
1210
1738
  autoComplete: "one-time-code"
1211
1739
  },
1212
1740
  index
1213
1741
  )) });
1214
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
+ `;
1215
1892
  function AuthEmailVerificationStep({
1216
1893
  email,
1217
1894
  method,
@@ -1265,19 +1942,19 @@ function AuthEmailVerificationStep({
1265
1942
  setVerificationCode("");
1266
1943
  }
1267
1944
  };
1268
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "if-verificationStep", children: [
1269
- isLinkMethod && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "if-verificationStep-descriptionContainer", children: [
1270
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "if-verificationStep-descriptionTitle", children: "Verify Your Email" }),
1271
- /* @__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: [
1272
1949
  part,
1273
- 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 })
1274
1951
  ] }, index)) })
1275
1952
  ] }),
1276
- !isLinkMethod && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "if-verificationStep-codeContainer", children: [
1277
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "if-verificationStep-codeInputWrapper", children: [
1278
- /* @__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: [
1279
1956
  part,
1280
- 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 })
1281
1958
  ] }, index)) }),
1282
1959
  /* @__PURE__ */ jsxRuntime.jsx(
1283
1960
  AuthVerificationCodeInput,
@@ -1301,17 +1978,16 @@ function AuthEmailVerificationStep({
1301
1978
  }
1302
1979
  )
1303
1980
  ] }),
1304
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "if-verificationStep-resendContainer", children: [
1981
+ /* @__PURE__ */ jsxRuntime.jsxs(VerificationStepResendContainer, { children: [
1305
1982
  "Didn't receive the email?",
1306
1983
  " ",
1307
1984
  /* @__PURE__ */ jsxRuntime.jsx(
1308
- "button",
1985
+ VerificationStepResendButton,
1309
1986
  {
1310
1987
  onClick: () => {
1311
1988
  void handleResend();
1312
1989
  },
1313
1990
  disabled: resendDisabled || isSending,
1314
- className: "if-verificationStep-resendButton",
1315
1991
  children: isSending ? "Sending..." : resendDisabled ? `Retry in (${resendCountdown}s)` : "Click to resend"
1316
1992
  }
1317
1993
  )
@@ -1370,16 +2046,16 @@ function AuthResetPasswordVerificationStep({
1370
2046
  setVerificationCode("");
1371
2047
  }
1372
2048
  };
1373
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "if-verificationStep", children: [
1374
- isLinkMethod && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "if-verificationStep-descriptionContainer", children: [
1375
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "if-verificationStep-descriptionTitle", children: "Check Your Email" }),
1376
- /* @__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: [
1377
2053
  part,
1378
- 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 })
1379
2055
  ] }, index)) })
1380
2056
  ] }),
1381
- !isLinkMethod && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "if-verificationStep-codeContainer", children: [
1382
- /* @__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(
1383
2059
  AuthVerificationCodeInput,
1384
2060
  {
1385
2061
  value: verificationCode,
@@ -1400,17 +2076,16 @@ function AuthResetPasswordVerificationStep({
1400
2076
  }
1401
2077
  )
1402
2078
  ] }),
1403
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "if-verificationStep-resendContainer", children: [
2079
+ /* @__PURE__ */ jsxRuntime.jsxs(VerificationStepResendContainer, { children: [
1404
2080
  "Didn't receive the email?",
1405
2081
  " ",
1406
2082
  /* @__PURE__ */ jsxRuntime.jsx(
1407
- "button",
2083
+ VerificationStepResendButton,
1408
2084
  {
1409
2085
  onClick: () => {
1410
2086
  void handleResend();
1411
2087
  },
1412
2088
  disabled: resendDisabled || isSending,
1413
- className: "if-verificationStep-resendButton",
1414
2089
  children: isSending ? "Sending..." : resendDisabled ? `Retry in (${resendCountdown}s)` : "Click to resend"
1415
2090
  }
1416
2091
  )
@@ -1456,39 +2131,47 @@ function SignInForm({
1456
2131
  onVerifyCode,
1457
2132
  emailSent: false
1458
2133
  }
1459
- ) : /* @__PURE__ */ jsxRuntime.jsxs("form", { onSubmit, noValidate: true, className: "if-form if-internal-fm9k2p", children: [
1460
- /* @__PURE__ */ jsxRuntime.jsx(
1461
- AuthFormField,
1462
- {
1463
- id: "email",
1464
- type: "email",
1465
- label: emailLabel,
1466
- placeholder: emailPlaceholder,
1467
- value: email,
1468
- onChange: (e) => onEmailChange(e.target.value),
1469
- required: true,
1470
- autoComplete: "email"
1471
- }
1472
- ),
1473
- /* @__PURE__ */ jsxRuntime.jsx(
1474
- AuthPasswordField,
1475
- {
1476
- id: "password",
1477
- label: passwordLabel,
1478
- placeholder: passwordPlaceholder,
1479
- value: password,
1480
- onChange: (e) => onPasswordChange(e.target.value),
1481
- required: true,
1482
- autoComplete: "current-password",
1483
- authConfig,
1484
- forgotPasswordLink: forgotPasswordUrl ? {
1485
- href: forgotPasswordUrl,
1486
- text: forgotPasswordText
1487
- } : void 0
1488
- }
1489
- ),
1490
- /* @__PURE__ */ jsxRuntime.jsx(AuthSubmitButton, { isLoading: loading, disabled: loading || oauthLoading !== null, children: loading ? loadingButtonText : submitButtonText })
1491
- ] }),
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
+ ),
1492
2175
  !showVerificationStep && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1493
2176
  /* @__PURE__ */ jsxRuntime.jsx(AuthLink, { text: signUpText, linkText: signUpLinkText, href: signUpUrl }),
1494
2177
  authConfig.oAuthProviders.length > 0 && onOAuthClick && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
@@ -1640,36 +2323,44 @@ function SignUpForm({
1640
2323
  onVerifyCode,
1641
2324
  emailSent: true
1642
2325
  }
1643
- ) : /* @__PURE__ */ jsxRuntime.jsxs("form", { onSubmit, noValidate: true, className: "if-form if-internal-fm9k2p", children: [
1644
- /* @__PURE__ */ jsxRuntime.jsx(
1645
- AuthFormField,
1646
- {
1647
- id: "email",
1648
- type: "email",
1649
- label: emailLabel,
1650
- placeholder: emailPlaceholder,
1651
- value: email,
1652
- onChange: (e) => onEmailChange(e.target.value),
1653
- required: true,
1654
- autoComplete: "email"
1655
- }
1656
- ),
1657
- /* @__PURE__ */ jsxRuntime.jsx(
1658
- AuthPasswordField,
1659
- {
1660
- id: "password",
1661
- label: passwordLabel,
1662
- placeholder: passwordPlaceholder,
1663
- value: password,
1664
- onChange: (e) => onPasswordChange(e.target.value),
1665
- required: true,
1666
- autoComplete: "new-password",
1667
- showStrengthIndicator: true,
1668
- authConfig
1669
- }
1670
- ),
1671
- /* @__PURE__ */ jsxRuntime.jsx(AuthSubmitButton, { isLoading: loading, disabled: loading || oauthLoading !== null, children: loading ? loadingButtonText : submitButtonText })
1672
- ] }),
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
+ ),
1673
2364
  !showVerificationStep && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1674
2365
  /* @__PURE__ */ jsxRuntime.jsx(AuthLink, { text: signInText, linkText: signInLinkText, href: signInUrl }),
1675
2366
  authConfig.oAuthProviders.length > 0 && onOAuthClick && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
@@ -1912,22 +2603,30 @@ function ForgotPasswordForm({
1912
2603
  onResendEmail: onResendEmail || (async () => {
1913
2604
  })
1914
2605
  }
1915
- ) : /* @__PURE__ */ jsxRuntime.jsxs("form", { onSubmit, noValidate: true, className: "if-form if-internal-fm9k2p", children: [
1916
- /* @__PURE__ */ jsxRuntime.jsx(
1917
- AuthFormField,
1918
- {
1919
- id: "email",
1920
- type: "email",
1921
- label: emailLabel,
1922
- placeholder: emailPlaceholder,
1923
- value: email,
1924
- onChange: (e) => onEmailChange(e.target.value),
1925
- required: true,
1926
- autoComplete: "email"
1927
- }
1928
- ),
1929
- /* @__PURE__ */ jsxRuntime.jsx(AuthSubmitButton, { isLoading: loading, disabled: loading, children: loading ? loadingButtonText : submitButtonText })
1930
- ] }),
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
+ ),
1931
2630
  !showVerificationStep && /* @__PURE__ */ jsxRuntime.jsx(AuthLink, { text: backToSignInText, linkText: "Back to Sign In", href: backToSignInUrl })
1932
2631
  ] });
1933
2632
  }
@@ -1956,77 +2655,64 @@ function ResetPasswordForm({
1956
2655
  successMessage = "Your password has been successfully reset. You can wait for redirect to sign in with your new password.";
1957
2656
  }
1958
2657
  if (success) {
1959
- return /* @__PURE__ */ jsxRuntime.jsx(AuthContainer, { children: /* @__PURE__ */ jsxRuntime.jsxs(
1960
- "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",
1961
2680
  {
1962
- style: { display: "flex", flexDirection: "column", alignItems: "center", gap: "1rem" },
2681
+ onSubmit,
2682
+ noValidate: true,
2683
+ style: { display: "flex", flexDirection: "column", gap: theme.spacing[6] },
1963
2684
  children: [
1964
2685
  /* @__PURE__ */ jsxRuntime.jsx(
1965
- "div",
2686
+ AuthPasswordField,
1966
2687
  {
1967
- style: {
1968
- width: "4rem",
1969
- height: "4rem",
1970
- borderRadius: "50%",
1971
- backgroundColor: "#D1FAE5",
1972
- display: "flex",
1973
- alignItems: "center",
1974
- justifyContent: "center"
1975
- },
1976
- children: /* @__PURE__ */ jsxRuntime.jsx(
1977
- "svg",
1978
- {
1979
- style: { width: "2rem", height: "2rem", color: "#059669" },
1980
- fill: "none",
1981
- strokeLinecap: "round",
1982
- strokeLinejoin: "round",
1983
- strokeWidth: "2",
1984
- viewBox: "0 0 24 24",
1985
- stroke: "currentColor",
1986
- children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M5 13l4 4L19 7" })
1987
- }
1988
- )
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
1989
2697
  }
1990
2698
  ),
1991
- /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "if-authHeader-title", style: { textAlign: "center" }, children: successTitle }),
1992
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "if-authHeader-subtitle", style: { textAlign: "center" }, children: successMessage })
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
2710
+ }
2711
+ ),
2712
+ /* @__PURE__ */ jsxRuntime.jsx(AuthSubmitButton, { isLoading: loading, disabled: loading, children: loading ? loadingButtonText : submitButtonText })
1993
2713
  ]
1994
2714
  }
1995
- ) });
1996
- }
1997
- return /* @__PURE__ */ jsxRuntime.jsxs(AuthContainer, { children: [
1998
- /* @__PURE__ */ jsxRuntime.jsx(AuthHeader, { title, subtitle }),
1999
- /* @__PURE__ */ jsxRuntime.jsx(AuthErrorBanner, { error: error || "" }),
2000
- /* @__PURE__ */ jsxRuntime.jsxs("form", { onSubmit, noValidate: true, className: "if-form if-internal-fm9k2p", children: [
2001
- /* @__PURE__ */ jsxRuntime.jsx(
2002
- AuthPasswordField,
2003
- {
2004
- id: "newPassword",
2005
- label: newPasswordLabel,
2006
- placeholder: newPasswordPlaceholder,
2007
- value: newPassword,
2008
- onChange: (e) => onNewPasswordChange(e.target.value),
2009
- required: true,
2010
- autoComplete: "new-password",
2011
- showStrengthIndicator: true,
2012
- authConfig
2013
- }
2014
- ),
2015
- /* @__PURE__ */ jsxRuntime.jsx(
2016
- AuthPasswordField,
2017
- {
2018
- id: "confirmPassword",
2019
- label: confirmPasswordLabel,
2020
- placeholder: confirmPasswordPlaceholder,
2021
- value: confirmPassword,
2022
- onChange: (e) => onConfirmPasswordChange(e.target.value),
2023
- required: true,
2024
- autoComplete: "new-password",
2025
- authConfig
2026
- }
2027
- ),
2028
- /* @__PURE__ */ jsxRuntime.jsx(AuthSubmitButton, { isLoading: loading, disabled: loading, children: loading ? loadingButtonText : submitButtonText })
2029
- ] })
2715
+ )
2030
2716
  ] });
2031
2717
  }
2032
2718
  function ForgotPassword({ onError, ...uiProps }) {
@@ -2371,25 +3057,24 @@ function VerifyEmailStatus({
2371
3057
  errorTitle = "Verification Failed"
2372
3058
  }) {
2373
3059
  if (status === "verifying") {
2374
- return /* @__PURE__ */ jsxRuntime.jsx(AuthContainer, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "if-verifyStatus-container", children: [
2375
- /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "if-authHeader-title", children: verifyingTitle }),
2376
- /* @__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, {})
2377
3063
  ] }) });
2378
3064
  }
2379
3065
  if (status === "error") {
2380
- 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: [
2381
- /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "if-authHeader-title if-internal-t4p1k9", children: errorTitle }),
2382
- /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "if-authHeader-subtitle if-internal-s7q2m3", children: [
2383
- error || "The verification link is invalid or has expired.",
2384
- " Please try again or contact support if the problem persists. You can close this page and return to your app."
2385
- ] })
2386
- ] }) }) });
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
+ ) }) });
2387
3073
  }
2388
- 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: [
2389
- /* @__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(
2390
3076
  "svg",
2391
3077
  {
2392
- className: "if-verifyStatus-successIconSvg",
2393
3078
  fill: "none",
2394
3079
  strokeLinecap: "round",
2395
3080
  strokeLinejoin: "round",
@@ -2398,9 +3083,9 @@ function VerifyEmailStatus({
2398
3083
  stroke: "currentColor",
2399
3084
  children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M5 13l4 4L19 7" })
2400
3085
  }
2401
- ) }),
2402
- /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "if-authHeader-title if-verifyStatus-textCenter", children: successTitle }),
2403
- /* @__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 })
2404
3089
  ] }) }) });
2405
3090
  }
2406
3091
  function VerifyEmail({ token, onSuccess, onError, ...uiProps }) {
@@ -2450,6 +3135,120 @@ function VerifyEmail({ token, onSuccess, onError, ...uiProps }) {
2450
3135
  }, [token, verifyEmail, onSuccess, onError]);
2451
3136
  return /* @__PURE__ */ jsxRuntime.jsx(VerifyEmailStatus, { status, error, ...uiProps });
2452
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
+ `;
2453
3252
  function UserButton({ afterSignOutUrl = "/", mode = "detailed" }) {
2454
3253
  const { user, signOut } = useInsforge();
2455
3254
  const [isOpen, setIsOpen] = react.useState(false);
@@ -2501,43 +3300,34 @@ function UserButton({ afterSignOutUrl = "/", mode = "detailed" }) {
2501
3300
  return null;
2502
3301
  }
2503
3302
  const initials = user.name ? user.name.charAt(0).toUpperCase() : user.email.split("@")[0].slice(0, 2).toUpperCase();
2504
- const buttonClassName = mode === "detailed" ? "if-userButton if-userButton-detailed" : "if-userButton";
2505
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "if-userButton-container if-internal-ub3k8p", ref: dropdownRef, children: [
3303
+ return /* @__PURE__ */ jsxRuntime.jsxs(UserButtonContainer, { ref: dropdownRef, children: [
2506
3304
  /* @__PURE__ */ jsxRuntime.jsxs(
2507
- "button",
3305
+ UserButtonButton,
2508
3306
  {
2509
- className: buttonClassName,
3307
+ $detailed: mode === "detailed",
2510
3308
  onClick: () => setIsOpen(!isOpen),
2511
3309
  "aria-expanded": isOpen,
2512
3310
  "aria-haspopup": "true",
2513
3311
  children: [
2514
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "if-userButton-avatar", children: user.avatarUrl && !imageError ? /* @__PURE__ */ jsxRuntime.jsx(
2515
- "img",
3312
+ /* @__PURE__ */ jsxRuntime.jsx(UserButtonAvatar, { children: user.avatarUrl && !imageError ? /* @__PURE__ */ jsxRuntime.jsx(
3313
+ UserButtonAvatarImage,
2516
3314
  {
2517
3315
  src: user.avatarUrl,
2518
3316
  alt: user.email,
2519
- onError: () => setImageError(true),
2520
- className: "if-userButton-avatarImage"
3317
+ onError: () => setImageError(true)
2521
3318
  }
2522
- ) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "if-userButton-avatarInitials", children: initials }) }),
2523
- mode === "detailed" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "if-userButton-info", children: [
2524
- user.name && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "if-userButton-name", children: user.name }),
2525
- /* @__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 })
2526
3323
  ] })
2527
3324
  ]
2528
3325
  }
2529
3326
  ),
2530
- isOpen && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "if-userButton-menu", children: /* @__PURE__ */ jsxRuntime.jsxs(
2531
- "button",
2532
- {
2533
- onClick: () => void handleSignOut(),
2534
- className: "if-userButton-menuItem if-userButton-menuItem-signout",
2535
- children: [
2536
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.LogOut, { className: "if-userButton-menuItem-icon" }),
2537
- "Sign out"
2538
- ]
2539
- }
2540
- ) })
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
+ ] }) })
2541
3331
  ] });
2542
3332
  }
2543
3333
  function Protect({
@@ -2679,6 +3469,7 @@ exports.SignUpButton = SignUpButton;
2679
3469
  exports.SignUpForm = SignUpForm;
2680
3470
  exports.SignedIn = SignedIn;
2681
3471
  exports.SignedOut = SignedOut;
3472
+ exports.StyleProvider = StyleProvider;
2682
3473
  exports.UserButton = UserButton;
2683
3474
  exports.VerifyEmail = VerifyEmail;
2684
3475
  exports.VerifyEmailStatus = VerifyEmailStatus;
@@ -2690,6 +3481,7 @@ exports.getProviderConfig = getProviderConfig;
2690
3481
  exports.passwordSchema = passwordSchema;
2691
3482
  exports.resolveAuthPath = resolveAuthPath;
2692
3483
  exports.resolveAuthUrl = resolveAuthUrl;
3484
+ exports.theme = theme;
2693
3485
  exports.useAuth = useAuth;
2694
3486
  exports.useInsforge = useInsforge;
2695
3487
  exports.useNavigationAdapter = useNavigationAdapter;