@vaultix.ai/react 0.3.6 → 0.3.8

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.d.mts CHANGED
@@ -87,6 +87,13 @@ interface VaultixContextValue {
87
87
  * Controls which login methods and OAuth providers are rendered by <SignIn /> and <SignUp />.
88
88
  */
89
89
  appConfig: AppConfig | null;
90
+ /**
91
+ * True once the /api/v1/app/config fetch has settled (success OR failure).
92
+ * <SignIn /> and <SignUp /> render a skeleton until this is true so the
93
+ * default full set of methods/providers never flashes before narrowing
94
+ * to the app's configured set.
95
+ */
96
+ appConfigLoaded: boolean;
90
97
  signOut: (redirectUrl?: string) => Promise<void>;
91
98
  /** Update the current user's profile. Resolves with the updated user. */
92
99
  updateUser: (params: UpdateUserParams) => Promise<VaultixUser>;
package/dist/index.d.ts CHANGED
@@ -87,6 +87,13 @@ interface VaultixContextValue {
87
87
  * Controls which login methods and OAuth providers are rendered by <SignIn /> and <SignUp />.
88
88
  */
89
89
  appConfig: AppConfig | null;
90
+ /**
91
+ * True once the /api/v1/app/config fetch has settled (success OR failure).
92
+ * <SignIn /> and <SignUp /> render a skeleton until this is true so the
93
+ * default full set of methods/providers never flashes before narrowing
94
+ * to the app's configured set.
95
+ */
96
+ appConfigLoaded: boolean;
90
97
  signOut: (redirectUrl?: string) => Promise<void>;
91
98
  /** Update the current user's profile. Resolves with the updated user. */
92
99
  updateUser: (params: UpdateUserParams) => Promise<VaultixUser>;
package/dist/index.js CHANGED
@@ -113,6 +113,7 @@ function VaultixProvider({
113
113
  const [session, setSession] = (0, import_react.useState)(null);
114
114
  const [organization, setOrganization] = (0, import_react.useState)(null);
115
115
  const [appConfig, setAppConfig] = (0, import_react.useState)(null);
116
+ const [appConfigLoaded, setAppConfigLoaded] = (0, import_react.useState)(false);
116
117
  const jwtRef = (0, import_react.useRef)(null);
117
118
  const refreshTimerRef = (0, import_react.useRef)(null);
118
119
  const clearAuth = (0, import_react.useCallback)(() => {
@@ -224,6 +225,8 @@ function VaultixProvider({
224
225
  setAppConfig(cfg);
225
226
  }
226
227
  } catch {
228
+ } finally {
229
+ if (!cancelled) setAppConfigLoaded(true);
227
230
  }
228
231
  }
229
232
  hydrate();
@@ -287,6 +290,7 @@ function VaultixProvider({
287
290
  isSignedIn: !!session,
288
291
  apiOrigin,
289
292
  appConfig,
293
+ appConfigLoaded,
290
294
  signOut,
291
295
  updateUser,
292
296
  connectPlatform
@@ -438,8 +442,11 @@ function SignIn({
438
442
  const textColor = vars.colorText ?? "rgba(255,255,255,0.9)";
439
443
  const mutedColor = vars.colorTextMuted ?? "#475569";
440
444
  let appConfig = null;
445
+ let appConfigLoaded = true;
441
446
  try {
442
- appConfig = useVaultixContext().appConfig;
447
+ const ctx = useVaultixContext();
448
+ appConfig = ctx.appConfig;
449
+ appConfigLoaded = ctx.appConfigLoaded;
443
450
  } catch {
444
451
  }
445
452
  const enabledProviders = appConfig?.providers ?? ["google", "github", "meta", "linkedin", "x", "threads"];
@@ -711,6 +718,39 @@ function SignIn({
711
718
  "forgot-verify": `Code sent to ${email}`,
712
719
  "forgot-reset": "Choose a new password"
713
720
  };
721
+ if (!appConfigLoaded) {
722
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
723
+ "div",
724
+ {
725
+ className: (0, import_clsx.clsx)(
726
+ "w-full max-w-sm mx-auto rounded-2xl border border-white/8 shadow-2xl",
727
+ "backdrop-blur-[16px]",
728
+ className
729
+ ),
730
+ style: { background: cardBg },
731
+ "aria-busy": "true",
732
+ children: [
733
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "px-8 pt-8 pb-6 text-center", children: [
734
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
735
+ "div",
736
+ {
737
+ className: "inline-flex items-center justify-center w-10 h-10 rounded-xl shadow-lg mb-4 animate-pulse",
738
+ style: { background: primaryColor ?? "linear-gradient(to bottom right, #7c3aed, #2563eb)" },
739
+ children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(LockIcon, {})
740
+ }
741
+ ),
742
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "h-5 w-32 mx-auto rounded bg-white/10 animate-pulse" }),
743
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "h-3 w-44 mx-auto mt-2 rounded bg-white/5 animate-pulse" })
744
+ ] }),
745
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "px-8 pb-8 space-y-3", children: [
746
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "h-11 w-full rounded-lg bg-white/10 animate-pulse" }),
747
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "h-11 w-full rounded-lg bg-white/5 animate-pulse" }),
748
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "h-11 w-full rounded-lg bg-white/5 animate-pulse" })
749
+ ] })
750
+ ]
751
+ }
752
+ );
753
+ }
714
754
  return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
715
755
  "div",
716
756
  {
@@ -719,7 +759,7 @@ function SignIn({
719
759
  "backdrop-blur-[16px]",
720
760
  className
721
761
  ),
722
- style: { background: cardBg },
762
+ style: { background: cardBg, color: textColor },
723
763
  children: [
724
764
  /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "px-8 pt-8 pb-6 text-center", children: [
725
765
  /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
@@ -896,25 +936,32 @@ function SignIn({
896
936
  );
897
937
  }
898
938
  function Input({ onChange, className, primaryColor, ...props }) {
939
+ const restBorder = "color-mix(in srgb, currentColor 18%, transparent)";
899
940
  return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
900
941
  "input",
901
942
  {
902
943
  ...props,
903
944
  onChange: (e) => onChange(e.target.value),
904
945
  className: (0, import_clsx.clsx)(
905
- "w-full bg-white/5 border border-white/8 rounded-xl px-4 py-2.5",
906
- "text-sm text-white/90 placeholder:text-[#475569]",
946
+ "w-full rounded-xl px-4 py-2.5",
947
+ "text-sm placeholder:text-[#94a3b8]",
907
948
  "focus:outline-none transition-colors",
908
- !primaryColor && "focus:border-purple-500/60",
909
949
  className
910
950
  ),
911
- style: primaryColor ? { "--vx-focus": primaryColor } : void 0,
951
+ style: {
952
+ color: "inherit",
953
+ borderWidth: 1,
954
+ borderStyle: "solid",
955
+ borderColor: restBorder,
956
+ background: "color-mix(in srgb, currentColor 4%, transparent)",
957
+ ...primaryColor ? { "--vx-focus": primaryColor } : {}
958
+ },
912
959
  onFocus: (e) => {
913
- if (primaryColor) e.currentTarget.style.borderColor = `${primaryColor}99`;
960
+ e.currentTarget.style.borderColor = primaryColor ? `${primaryColor}99` : "color-mix(in srgb, currentColor 40%, transparent)";
914
961
  props.onFocus?.(e);
915
962
  },
916
963
  onBlur: (e) => {
917
- if (primaryColor) e.currentTarget.style.borderColor = "";
964
+ e.currentTarget.style.borderColor = restBorder;
918
965
  props.onBlur?.(e);
919
966
  }
920
967
  }
@@ -962,11 +1009,19 @@ function OAuthButton({
962
1009
  onClick,
963
1010
  className: (0, import_clsx.clsx)(
964
1011
  "w-full flex items-center justify-center gap-3 px-4 py-2.5 rounded-xl",
965
- "text-sm font-medium text-white/80",
966
- "bg-white/5 border border-white/10",
967
- "hover:bg-white/10 hover:border-white/20",
968
- "transition-all duration-150"
1012
+ "text-sm font-medium transition-all duration-150"
969
1013
  ),
1014
+ style: {
1015
+ color: "inherit",
1016
+ border: "1px solid color-mix(in srgb, currentColor 22%, transparent)",
1017
+ background: "color-mix(in srgb, currentColor 5%, transparent)"
1018
+ },
1019
+ onMouseEnter: (e) => {
1020
+ e.currentTarget.style.background = "color-mix(in srgb, currentColor 12%, transparent)";
1021
+ },
1022
+ onMouseLeave: (e) => {
1023
+ e.currentTarget.style.background = "color-mix(in srgb, currentColor 5%, transparent)";
1024
+ },
970
1025
  children: [
971
1026
  icon,
972
1027
  label
@@ -1115,8 +1170,11 @@ function SignUp({
1115
1170
  const textColor = vars.colorText ?? "rgba(255,255,255,0.9)";
1116
1171
  const mutedColor = vars.colorTextMuted ?? "#475569";
1117
1172
  let appConfig = null;
1173
+ let appConfigLoaded = true;
1118
1174
  try {
1119
- appConfig = useVaultixContext().appConfig;
1175
+ const ctx = useVaultixContext();
1176
+ appConfig = ctx.appConfig;
1177
+ appConfigLoaded = ctx.appConfigLoaded;
1120
1178
  } catch {
1121
1179
  }
1122
1180
  const enabledProviders = appConfig?.providers ?? ["google", "github", "meta", "linkedin", "x", "threads"];
@@ -1209,6 +1267,37 @@ function SignUp({
1209
1267
  } catch {
1210
1268
  }
1211
1269
  }
1270
+ if (!appConfigLoaded) {
1271
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
1272
+ "div",
1273
+ {
1274
+ className: (0, import_clsx2.clsx)(
1275
+ "w-full max-w-sm mx-auto rounded-2xl border border-white/8 shadow-2xl backdrop-blur-[16px]",
1276
+ className
1277
+ ),
1278
+ style: { background: cardBg },
1279
+ "aria-busy": "true",
1280
+ children: [
1281
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "px-8 pt-8 pb-6 text-center", children: [
1282
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1283
+ "div",
1284
+ {
1285
+ className: "inline-flex items-center justify-center w-10 h-10 rounded-xl shadow-lg mb-4 animate-pulse",
1286
+ style: { background: primaryColor ?? "linear-gradient(to bottom right, #7c3aed, #2563eb)" }
1287
+ }
1288
+ ),
1289
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "h-5 w-32 mx-auto rounded bg-white/10 animate-pulse" }),
1290
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "h-3 w-44 mx-auto mt-2 rounded bg-white/5 animate-pulse" })
1291
+ ] }),
1292
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "px-8 pb-8 space-y-3", children: [
1293
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "h-11 w-full rounded-lg bg-white/10 animate-pulse" }),
1294
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "h-11 w-full rounded-lg bg-white/5 animate-pulse" }),
1295
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "h-11 w-full rounded-lg bg-white/5 animate-pulse" })
1296
+ ] })
1297
+ ]
1298
+ }
1299
+ );
1300
+ }
1212
1301
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
1213
1302
  "div",
1214
1303
  {
@@ -1216,7 +1305,7 @@ function SignUp({
1216
1305
  "w-full max-w-sm mx-auto rounded-2xl border border-white/8 shadow-2xl backdrop-blur-[16px]",
1217
1306
  className
1218
1307
  ),
1219
- style: { background: cardBg },
1308
+ style: { background: cardBg, color: textColor },
1220
1309
  children: [
1221
1310
  /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "px-8 pt-8 pb-6 text-center", children: [
1222
1311
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
@@ -1303,24 +1392,31 @@ function SignUp({
1303
1392
  );
1304
1393
  }
1305
1394
  function Input2({ onChange, className, primaryColor, ...props }) {
1395
+ const restBorder = "color-mix(in srgb, currentColor 18%, transparent)";
1306
1396
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1307
1397
  "input",
1308
1398
  {
1309
1399
  ...props,
1310
1400
  onChange: (e) => onChange(e.target.value),
1311
1401
  className: (0, import_clsx2.clsx)(
1312
- "w-full bg-white/5 border border-white/8 rounded-xl px-4 py-2.5",
1313
- "text-sm text-white/90 placeholder:text-[#475569]",
1402
+ "w-full rounded-xl px-4 py-2.5",
1403
+ "text-sm placeholder:text-[#94a3b8]",
1314
1404
  "focus:outline-none transition-colors",
1315
- !primaryColor && "focus:border-emerald-500/60",
1316
1405
  className
1317
1406
  ),
1407
+ style: {
1408
+ color: "inherit",
1409
+ borderWidth: 1,
1410
+ borderStyle: "solid",
1411
+ borderColor: restBorder,
1412
+ background: "color-mix(in srgb, currentColor 4%, transparent)"
1413
+ },
1318
1414
  onFocus: (e) => {
1319
- if (primaryColor) e.currentTarget.style.borderColor = `${primaryColor}99`;
1415
+ e.currentTarget.style.borderColor = primaryColor ? `${primaryColor}99` : "color-mix(in srgb, currentColor 40%, transparent)";
1320
1416
  props.onFocus?.(e);
1321
1417
  },
1322
1418
  onBlur: (e) => {
1323
- if (primaryColor) e.currentTarget.style.borderColor = "";
1419
+ e.currentTarget.style.borderColor = restBorder;
1324
1420
  props.onBlur?.(e);
1325
1421
  }
1326
1422
  }
@@ -1359,11 +1455,19 @@ function OAuthButton2({
1359
1455
  onClick,
1360
1456
  className: (0, import_clsx2.clsx)(
1361
1457
  "w-full flex items-center justify-center gap-3 px-4 py-2.5 rounded-xl",
1362
- "text-sm font-medium text-white/80",
1363
- "bg-white/5 border border-white/10",
1364
- "hover:bg-white/10 hover:border-white/20",
1365
- "transition-all duration-150"
1458
+ "text-sm font-medium transition-all duration-150"
1366
1459
  ),
1460
+ style: {
1461
+ color: "inherit",
1462
+ border: "1px solid color-mix(in srgb, currentColor 22%, transparent)",
1463
+ background: "color-mix(in srgb, currentColor 5%, transparent)"
1464
+ },
1465
+ onMouseEnter: (e) => {
1466
+ e.currentTarget.style.background = "color-mix(in srgb, currentColor 12%, transparent)";
1467
+ },
1468
+ onMouseLeave: (e) => {
1469
+ e.currentTarget.style.background = "color-mix(in srgb, currentColor 5%, transparent)";
1470
+ },
1367
1471
  children: [
1368
1472
  icon,
1369
1473
  label
package/dist/index.mjs CHANGED
@@ -78,6 +78,7 @@ function VaultixProvider({
78
78
  const [session, setSession] = useState(null);
79
79
  const [organization, setOrganization] = useState(null);
80
80
  const [appConfig, setAppConfig] = useState(null);
81
+ const [appConfigLoaded, setAppConfigLoaded] = useState(false);
81
82
  const jwtRef = useRef(null);
82
83
  const refreshTimerRef = useRef(null);
83
84
  const clearAuth = useCallback(() => {
@@ -189,6 +190,8 @@ function VaultixProvider({
189
190
  setAppConfig(cfg);
190
191
  }
191
192
  } catch {
193
+ } finally {
194
+ if (!cancelled) setAppConfigLoaded(true);
192
195
  }
193
196
  }
194
197
  hydrate();
@@ -252,6 +255,7 @@ function VaultixProvider({
252
255
  isSignedIn: !!session,
253
256
  apiOrigin,
254
257
  appConfig,
258
+ appConfigLoaded,
255
259
  signOut,
256
260
  updateUser,
257
261
  connectPlatform
@@ -403,8 +407,11 @@ function SignIn({
403
407
  const textColor = vars.colorText ?? "rgba(255,255,255,0.9)";
404
408
  const mutedColor = vars.colorTextMuted ?? "#475569";
405
409
  let appConfig = null;
410
+ let appConfigLoaded = true;
406
411
  try {
407
- appConfig = useVaultixContext().appConfig;
412
+ const ctx = useVaultixContext();
413
+ appConfig = ctx.appConfig;
414
+ appConfigLoaded = ctx.appConfigLoaded;
408
415
  } catch {
409
416
  }
410
417
  const enabledProviders = appConfig?.providers ?? ["google", "github", "meta", "linkedin", "x", "threads"];
@@ -676,6 +683,39 @@ function SignIn({
676
683
  "forgot-verify": `Code sent to ${email}`,
677
684
  "forgot-reset": "Choose a new password"
678
685
  };
686
+ if (!appConfigLoaded) {
687
+ return /* @__PURE__ */ jsxs(
688
+ "div",
689
+ {
690
+ className: clsx(
691
+ "w-full max-w-sm mx-auto rounded-2xl border border-white/8 shadow-2xl",
692
+ "backdrop-blur-[16px]",
693
+ className
694
+ ),
695
+ style: { background: cardBg },
696
+ "aria-busy": "true",
697
+ children: [
698
+ /* @__PURE__ */ jsxs("div", { className: "px-8 pt-8 pb-6 text-center", children: [
699
+ /* @__PURE__ */ jsx2(
700
+ "div",
701
+ {
702
+ className: "inline-flex items-center justify-center w-10 h-10 rounded-xl shadow-lg mb-4 animate-pulse",
703
+ style: { background: primaryColor ?? "linear-gradient(to bottom right, #7c3aed, #2563eb)" },
704
+ children: /* @__PURE__ */ jsx2(LockIcon, {})
705
+ }
706
+ ),
707
+ /* @__PURE__ */ jsx2("div", { className: "h-5 w-32 mx-auto rounded bg-white/10 animate-pulse" }),
708
+ /* @__PURE__ */ jsx2("div", { className: "h-3 w-44 mx-auto mt-2 rounded bg-white/5 animate-pulse" })
709
+ ] }),
710
+ /* @__PURE__ */ jsxs("div", { className: "px-8 pb-8 space-y-3", children: [
711
+ /* @__PURE__ */ jsx2("div", { className: "h-11 w-full rounded-lg bg-white/10 animate-pulse" }),
712
+ /* @__PURE__ */ jsx2("div", { className: "h-11 w-full rounded-lg bg-white/5 animate-pulse" }),
713
+ /* @__PURE__ */ jsx2("div", { className: "h-11 w-full rounded-lg bg-white/5 animate-pulse" })
714
+ ] })
715
+ ]
716
+ }
717
+ );
718
+ }
679
719
  return /* @__PURE__ */ jsxs(
680
720
  "div",
681
721
  {
@@ -684,7 +724,7 @@ function SignIn({
684
724
  "backdrop-blur-[16px]",
685
725
  className
686
726
  ),
687
- style: { background: cardBg },
727
+ style: { background: cardBg, color: textColor },
688
728
  children: [
689
729
  /* @__PURE__ */ jsxs("div", { className: "px-8 pt-8 pb-6 text-center", children: [
690
730
  /* @__PURE__ */ jsx2(
@@ -861,25 +901,32 @@ function SignIn({
861
901
  );
862
902
  }
863
903
  function Input({ onChange, className, primaryColor, ...props }) {
904
+ const restBorder = "color-mix(in srgb, currentColor 18%, transparent)";
864
905
  return /* @__PURE__ */ jsx2(
865
906
  "input",
866
907
  {
867
908
  ...props,
868
909
  onChange: (e) => onChange(e.target.value),
869
910
  className: clsx(
870
- "w-full bg-white/5 border border-white/8 rounded-xl px-4 py-2.5",
871
- "text-sm text-white/90 placeholder:text-[#475569]",
911
+ "w-full rounded-xl px-4 py-2.5",
912
+ "text-sm placeholder:text-[#94a3b8]",
872
913
  "focus:outline-none transition-colors",
873
- !primaryColor && "focus:border-purple-500/60",
874
914
  className
875
915
  ),
876
- style: primaryColor ? { "--vx-focus": primaryColor } : void 0,
916
+ style: {
917
+ color: "inherit",
918
+ borderWidth: 1,
919
+ borderStyle: "solid",
920
+ borderColor: restBorder,
921
+ background: "color-mix(in srgb, currentColor 4%, transparent)",
922
+ ...primaryColor ? { "--vx-focus": primaryColor } : {}
923
+ },
877
924
  onFocus: (e) => {
878
- if (primaryColor) e.currentTarget.style.borderColor = `${primaryColor}99`;
925
+ e.currentTarget.style.borderColor = primaryColor ? `${primaryColor}99` : "color-mix(in srgb, currentColor 40%, transparent)";
879
926
  props.onFocus?.(e);
880
927
  },
881
928
  onBlur: (e) => {
882
- if (primaryColor) e.currentTarget.style.borderColor = "";
929
+ e.currentTarget.style.borderColor = restBorder;
883
930
  props.onBlur?.(e);
884
931
  }
885
932
  }
@@ -927,11 +974,19 @@ function OAuthButton({
927
974
  onClick,
928
975
  className: clsx(
929
976
  "w-full flex items-center justify-center gap-3 px-4 py-2.5 rounded-xl",
930
- "text-sm font-medium text-white/80",
931
- "bg-white/5 border border-white/10",
932
- "hover:bg-white/10 hover:border-white/20",
933
- "transition-all duration-150"
977
+ "text-sm font-medium transition-all duration-150"
934
978
  ),
979
+ style: {
980
+ color: "inherit",
981
+ border: "1px solid color-mix(in srgb, currentColor 22%, transparent)",
982
+ background: "color-mix(in srgb, currentColor 5%, transparent)"
983
+ },
984
+ onMouseEnter: (e) => {
985
+ e.currentTarget.style.background = "color-mix(in srgb, currentColor 12%, transparent)";
986
+ },
987
+ onMouseLeave: (e) => {
988
+ e.currentTarget.style.background = "color-mix(in srgb, currentColor 5%, transparent)";
989
+ },
935
990
  children: [
936
991
  icon,
937
992
  label
@@ -1080,8 +1135,11 @@ function SignUp({
1080
1135
  const textColor = vars.colorText ?? "rgba(255,255,255,0.9)";
1081
1136
  const mutedColor = vars.colorTextMuted ?? "#475569";
1082
1137
  let appConfig = null;
1138
+ let appConfigLoaded = true;
1083
1139
  try {
1084
- appConfig = useVaultixContext().appConfig;
1140
+ const ctx = useVaultixContext();
1141
+ appConfig = ctx.appConfig;
1142
+ appConfigLoaded = ctx.appConfigLoaded;
1085
1143
  } catch {
1086
1144
  }
1087
1145
  const enabledProviders = appConfig?.providers ?? ["google", "github", "meta", "linkedin", "x", "threads"];
@@ -1174,6 +1232,37 @@ function SignUp({
1174
1232
  } catch {
1175
1233
  }
1176
1234
  }
1235
+ if (!appConfigLoaded) {
1236
+ return /* @__PURE__ */ jsxs2(
1237
+ "div",
1238
+ {
1239
+ className: clsx2(
1240
+ "w-full max-w-sm mx-auto rounded-2xl border border-white/8 shadow-2xl backdrop-blur-[16px]",
1241
+ className
1242
+ ),
1243
+ style: { background: cardBg },
1244
+ "aria-busy": "true",
1245
+ children: [
1246
+ /* @__PURE__ */ jsxs2("div", { className: "px-8 pt-8 pb-6 text-center", children: [
1247
+ /* @__PURE__ */ jsx3(
1248
+ "div",
1249
+ {
1250
+ className: "inline-flex items-center justify-center w-10 h-10 rounded-xl shadow-lg mb-4 animate-pulse",
1251
+ style: { background: primaryColor ?? "linear-gradient(to bottom right, #7c3aed, #2563eb)" }
1252
+ }
1253
+ ),
1254
+ /* @__PURE__ */ jsx3("div", { className: "h-5 w-32 mx-auto rounded bg-white/10 animate-pulse" }),
1255
+ /* @__PURE__ */ jsx3("div", { className: "h-3 w-44 mx-auto mt-2 rounded bg-white/5 animate-pulse" })
1256
+ ] }),
1257
+ /* @__PURE__ */ jsxs2("div", { className: "px-8 pb-8 space-y-3", children: [
1258
+ /* @__PURE__ */ jsx3("div", { className: "h-11 w-full rounded-lg bg-white/10 animate-pulse" }),
1259
+ /* @__PURE__ */ jsx3("div", { className: "h-11 w-full rounded-lg bg-white/5 animate-pulse" }),
1260
+ /* @__PURE__ */ jsx3("div", { className: "h-11 w-full rounded-lg bg-white/5 animate-pulse" })
1261
+ ] })
1262
+ ]
1263
+ }
1264
+ );
1265
+ }
1177
1266
  return /* @__PURE__ */ jsxs2(
1178
1267
  "div",
1179
1268
  {
@@ -1181,7 +1270,7 @@ function SignUp({
1181
1270
  "w-full max-w-sm mx-auto rounded-2xl border border-white/8 shadow-2xl backdrop-blur-[16px]",
1182
1271
  className
1183
1272
  ),
1184
- style: { background: cardBg },
1273
+ style: { background: cardBg, color: textColor },
1185
1274
  children: [
1186
1275
  /* @__PURE__ */ jsxs2("div", { className: "px-8 pt-8 pb-6 text-center", children: [
1187
1276
  /* @__PURE__ */ jsx3(
@@ -1268,24 +1357,31 @@ function SignUp({
1268
1357
  );
1269
1358
  }
1270
1359
  function Input2({ onChange, className, primaryColor, ...props }) {
1360
+ const restBorder = "color-mix(in srgb, currentColor 18%, transparent)";
1271
1361
  return /* @__PURE__ */ jsx3(
1272
1362
  "input",
1273
1363
  {
1274
1364
  ...props,
1275
1365
  onChange: (e) => onChange(e.target.value),
1276
1366
  className: clsx2(
1277
- "w-full bg-white/5 border border-white/8 rounded-xl px-4 py-2.5",
1278
- "text-sm text-white/90 placeholder:text-[#475569]",
1367
+ "w-full rounded-xl px-4 py-2.5",
1368
+ "text-sm placeholder:text-[#94a3b8]",
1279
1369
  "focus:outline-none transition-colors",
1280
- !primaryColor && "focus:border-emerald-500/60",
1281
1370
  className
1282
1371
  ),
1372
+ style: {
1373
+ color: "inherit",
1374
+ borderWidth: 1,
1375
+ borderStyle: "solid",
1376
+ borderColor: restBorder,
1377
+ background: "color-mix(in srgb, currentColor 4%, transparent)"
1378
+ },
1283
1379
  onFocus: (e) => {
1284
- if (primaryColor) e.currentTarget.style.borderColor = `${primaryColor}99`;
1380
+ e.currentTarget.style.borderColor = primaryColor ? `${primaryColor}99` : "color-mix(in srgb, currentColor 40%, transparent)";
1285
1381
  props.onFocus?.(e);
1286
1382
  },
1287
1383
  onBlur: (e) => {
1288
- if (primaryColor) e.currentTarget.style.borderColor = "";
1384
+ e.currentTarget.style.borderColor = restBorder;
1289
1385
  props.onBlur?.(e);
1290
1386
  }
1291
1387
  }
@@ -1324,11 +1420,19 @@ function OAuthButton2({
1324
1420
  onClick,
1325
1421
  className: clsx2(
1326
1422
  "w-full flex items-center justify-center gap-3 px-4 py-2.5 rounded-xl",
1327
- "text-sm font-medium text-white/80",
1328
- "bg-white/5 border border-white/10",
1329
- "hover:bg-white/10 hover:border-white/20",
1330
- "transition-all duration-150"
1423
+ "text-sm font-medium transition-all duration-150"
1331
1424
  ),
1425
+ style: {
1426
+ color: "inherit",
1427
+ border: "1px solid color-mix(in srgb, currentColor 22%, transparent)",
1428
+ background: "color-mix(in srgb, currentColor 5%, transparent)"
1429
+ },
1430
+ onMouseEnter: (e) => {
1431
+ e.currentTarget.style.background = "color-mix(in srgb, currentColor 12%, transparent)";
1432
+ },
1433
+ onMouseLeave: (e) => {
1434
+ e.currentTarget.style.background = "color-mix(in srgb, currentColor 5%, transparent)";
1435
+ },
1332
1436
  children: [
1333
1437
  icon,
1334
1438
  label
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaultix.ai/react",
3
- "version": "0.3.6",
3
+ "version": "0.3.8",
4
4
  "description": "Vaultix-ID React SDK — drop-in auth components for any React app",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",