@loafmarkets/ui 0.1.390 → 0.1.392

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
@@ -705,6 +705,12 @@ type HeaderProps = {
705
705
  */
706
706
  fundsPending?: boolean;
707
707
  transparentOnTop?: boolean;
708
+ /**
709
+ * The bar's authed CTA button. Defaults to "deposit" (the funding flow) so
710
+ * existing consumers are unchanged. "refer" swaps it for a Refer button that
711
+ * opens the Settings popup (same `onSettingsClick` as the user-menu Refer item).
712
+ */
713
+ headerCta?: "deposit" | "refer";
708
714
  };
709
715
  declare const Header: React__default.FC<HeaderProps>;
710
716
 
package/dist/index.d.ts CHANGED
@@ -705,6 +705,12 @@ type HeaderProps = {
705
705
  */
706
706
  fundsPending?: boolean;
707
707
  transparentOnTop?: boolean;
708
+ /**
709
+ * The bar's authed CTA button. Defaults to "deposit" (the funding flow) so
710
+ * existing consumers are unchanged. "refer" swaps it for a Refer button that
711
+ * opens the Settings popup (same `onSettingsClick` as the user-menu Refer item).
712
+ */
713
+ headerCta?: "deposit" | "refer";
708
714
  };
709
715
  declare const Header: React__default.FC<HeaderProps>;
710
716
 
package/dist/index.js CHANGED
@@ -5101,7 +5101,8 @@ var Header = ({
5101
5101
  onSettingsClick,
5102
5102
  portfolioSummary,
5103
5103
  fundsPending = false,
5104
- transparentOnTop = false
5104
+ transparentOnTop = false,
5105
+ headerCta = "deposit"
5105
5106
  }) => {
5106
5107
  const [headerBgOpacity, setHeaderBgOpacity] = React5.useState(transparentOnTop ? 0 : 1);
5107
5108
  const [isUserMenuOpen, setIsUserMenuOpen] = React5.useState(false);
@@ -5528,14 +5529,25 @@ var Header = ({
5528
5529
  children: isPortfolioBarVisible ? /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z" }) }) : /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46A11.804 11.804 0 001 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z" }) })
5529
5530
  }
5530
5531
  ),
5531
- isAuthenticated && /* @__PURE__ */ jsxRuntime.jsx(
5532
+ isAuthenticated && (headerCta === "refer" ? /* @__PURE__ */ jsxRuntime.jsx(
5533
+ DepositButton,
5534
+ {
5535
+ type: "button",
5536
+ onClick: (event) => {
5537
+ event?.preventDefault();
5538
+ closeMenus();
5539
+ onSettingsClick?.();
5540
+ },
5541
+ children: "Refer"
5542
+ }
5543
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
5532
5544
  DepositButton,
5533
5545
  {
5534
5546
  type: "button",
5535
5547
  onClick: (e) => handleAddFundingClick(e),
5536
5548
  children: "Deposit"
5537
5549
  }
5538
- ),
5550
+ )),
5539
5551
  /* @__PURE__ */ jsxRuntime.jsxs(UserMenu, { children: [
5540
5552
  /* @__PURE__ */ jsxRuntime.jsxs(
5541
5553
  UserButton,
@@ -5565,9 +5577,11 @@ var Header = ({
5565
5577
  {
5566
5578
  type: "button",
5567
5579
  onClick: (event) => {
5568
- handleAddFundingClick(event);
5580
+ event?.preventDefault();
5581
+ closeMenus();
5582
+ onSettingsClick?.();
5569
5583
  },
5570
- children: /* @__PURE__ */ jsxRuntime.jsx(MenuItem, { children: "Add funding" })
5584
+ children: /* @__PURE__ */ jsxRuntime.jsx(MenuItem, { children: "Refer" })
5571
5585
  }
5572
5586
  ),
5573
5587
  onSettingsClick && /* @__PURE__ */ jsxRuntime.jsx(