@merit-systems/echo-react-sdk 1.0.7 → 1.0.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.js CHANGED
@@ -10544,61 +10544,37 @@ function EchoSignIn({
10544
10544
  }
10545
10545
  ) });
10546
10546
  }
10547
- return /* @__PURE__ */ jsxs("div", { className: `echo-signin ${className}`, children: [
10548
- children ? /* @__PURE__ */ jsx("div", { onClick: handleSignIn, style: { cursor: "pointer" }, children }) : /* @__PURE__ */ jsxs(
10549
- "button",
10550
- {
10551
- onClick: handleSignIn,
10552
- disabled: isLoading,
10553
- className: "echo-signin-button",
10554
- style: {
10555
- display: "flex",
10556
- alignItems: "center",
10557
- gap: "8px",
10558
- padding: "12px 20px",
10559
- backgroundColor: isLoading ? "#f3f4f6" : isHovered ? "#f1f5f9" : "#ffffff",
10560
- color: isLoading ? "#9ca3af" : "#09090b",
10561
- border: "1px solid #e2e8f0",
10562
- borderRadius: "8px",
10563
- cursor: isLoading ? "not-allowed" : "pointer",
10564
- fontSize: "14px",
10565
- fontWeight: "800",
10566
- fontFamily: "HelveticaNowDisplay, sans-serif",
10567
- transition: "all 0.2s ease",
10568
- boxShadow: "0 1px 2px 0 rgba(0, 0, 0, 0.05)",
10569
- backdropFilter: "blur(8px)"
10570
- },
10571
- onMouseEnter: () => setIsHovered(true),
10572
- onMouseLeave: () => setIsHovered(false),
10573
- children: [
10574
- /* @__PURE__ */ jsx(Logo, { width: 16, height: 16, variant: "light" }),
10575
- /* @__PURE__ */ jsx("span", { children: isLoading ? "Signing in..." : "Sign in" })
10576
- ]
10577
- }
10578
- ),
10579
- error && /* @__PURE__ */ jsx(
10580
- "div",
10581
- {
10582
- className: "echo-signin-error",
10583
- style: {
10584
- marginTop: "12px",
10585
- display: "flex",
10586
- alignItems: "center",
10587
- gap: "8px",
10588
- padding: "12px 16px",
10589
- backgroundColor: "#fef2f2",
10590
- border: "1px solid #fecaca",
10591
- borderRadius: "8px",
10592
- color: "#dc2626",
10593
- fontSize: "14px",
10594
- fontFamily: "HelveticaNowDisplay, sans-serif",
10595
- fontWeight: "800",
10596
- width: "fit-content"
10597
- },
10598
- children: /* @__PURE__ */ jsx("span", { children: error })
10599
- }
10600
- )
10601
- ] });
10547
+ return /* @__PURE__ */ jsx("div", { className: `echo-signin ${className}`, children: children ? /* @__PURE__ */ jsx("div", { onClick: handleSignIn, style: { cursor: "pointer" }, children }) : /* @__PURE__ */ jsxs(
10548
+ "button",
10549
+ {
10550
+ onClick: handleSignIn,
10551
+ disabled: isLoading,
10552
+ className: "echo-signin-button",
10553
+ style: {
10554
+ display: "flex",
10555
+ alignItems: "center",
10556
+ gap: "8px",
10557
+ padding: "12px 20px",
10558
+ backgroundColor: isLoading ? "#f3f4f6" : isHovered ? "#f1f5f9" : "#ffffff",
10559
+ color: isLoading ? "#9ca3af" : "#09090b",
10560
+ border: "1px solid #e2e8f0",
10561
+ borderRadius: "8px",
10562
+ cursor: isLoading ? "not-allowed" : "pointer",
10563
+ fontSize: "14px",
10564
+ fontWeight: "800",
10565
+ fontFamily: "HelveticaNowDisplay, sans-serif",
10566
+ transition: "all 0.2s ease",
10567
+ boxShadow: "0 1px 2px 0 rgba(0, 0, 0, 0.05)",
10568
+ backdropFilter: "blur(8px)"
10569
+ },
10570
+ onMouseEnter: () => setIsHovered(true),
10571
+ onMouseLeave: () => setIsHovered(false),
10572
+ children: [
10573
+ /* @__PURE__ */ jsx(Logo, { width: 16, height: 16, variant: "light" }),
10574
+ /* @__PURE__ */ jsx("span", { children: isLoading ? "Signing in..." : "Sign in" })
10575
+ ]
10576
+ }
10577
+ ) });
10602
10578
  }
10603
10579
  const CustomAmountInput = ({
10604
10580
  onAddCredits,
@@ -10948,9 +10924,7 @@ function EchoTokenPurchase({
10948
10924
  margin: "0 0 12px 0",
10949
10925
  fontFamily: "HelveticaNowDisplay, sans-serif"
10950
10926
  },
10951
- children: formatCurrency(
10952
- ((balance == null ? void 0 : balance.balance) || 0) + calculateAvailableSpend()
10953
- )
10927
+ children: formatCurrency(calculateAvailableSpend())
10954
10928
  }
10955
10929
  ),
10956
10930
  /* @__PURE__ */ jsxs("div", { style: { marginBottom: "8px" }, children: [
@@ -10980,8 +10954,9 @@ function EchoTokenPurchase({
10980
10954
  }
10981
10955
  ),
10982
10956
  /* @__PURE__ */ jsxs("span", { children: [
10983
- formatCurrency(calculateAvailableSpend()),
10984
- " Free Tier",
10957
+ formatCurrency(freeTierBalance.userSpendInfo.amountLeft),
10958
+ " ",
10959
+ "Free Tier",
10985
10960
  freeTierBalance.userSpendInfo && freeTierBalance.userSpendInfo.spendLimit && /* @__PURE__ */ jsxs("span", { style: { color: "#9ca3af", marginLeft: "8px" }, children: [
10986
10961
  formatCurrency(
10987
10962
  freeTierBalance.userSpendInfo.amountSpent
@@ -10990,7 +10965,7 @@ function EchoTokenPurchase({
10990
10965
  "of",
10991
10966
  " ",
10992
10967
  formatCurrency(
10993
- freeTierBalance.userSpendInfo.amountLeft + freeTierBalance.userSpendInfo.amountSpent
10968
+ freeTierBalance.userSpendInfo.spendLimit
10994
10969
  ),
10995
10970
  " ",
10996
10971
  "used"