@loafmarkets/ui 0.1.393 → 0.1.395

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
@@ -698,9 +698,6 @@ type HeaderProps = {
698
698
  onOrdersNavigate?: () => void;
699
699
  onWalletNavigate?: () => void;
700
700
  onSettingsClick?: () => void;
701
- /** Show the "Refer" user-menu item. Off by default — referral is feature-flagged
702
- * off (the shell passes VITE_REFERRAL_ENABLED). */
703
- showRefer?: boolean;
704
701
  portfolioSummary?: HeaderPortfolioData | null;
705
702
  /**
706
703
  * True while a brand-new user's test funds (100k mock USD) are being deposited
@@ -708,6 +705,15 @@ type HeaderProps = {
708
705
  */
709
706
  fundsPending?: boolean;
710
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";
714
+ /** Show the "Refer" user-menu item. Off by default — referral is feature-flagged
715
+ * off (the shell passes VITE_REFERRAL_ENABLED). */
716
+ showRefer?: boolean;
711
717
  };
712
718
  declare const Header: React__default.FC<HeaderProps>;
713
719
 
package/dist/index.d.ts CHANGED
@@ -698,9 +698,6 @@ type HeaderProps = {
698
698
  onOrdersNavigate?: () => void;
699
699
  onWalletNavigate?: () => void;
700
700
  onSettingsClick?: () => void;
701
- /** Show the "Refer" user-menu item. Off by default — referral is feature-flagged
702
- * off (the shell passes VITE_REFERRAL_ENABLED). */
703
- showRefer?: boolean;
704
701
  portfolioSummary?: HeaderPortfolioData | null;
705
702
  /**
706
703
  * True while a brand-new user's test funds (100k mock USD) are being deposited
@@ -708,6 +705,15 @@ type HeaderProps = {
708
705
  */
709
706
  fundsPending?: boolean;
710
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";
714
+ /** Show the "Refer" user-menu item. Off by default — referral is feature-flagged
715
+ * off (the shell passes VITE_REFERRAL_ENABLED). */
716
+ showRefer?: boolean;
711
717
  };
712
718
  declare const Header: React__default.FC<HeaderProps>;
713
719
 
package/dist/index.js CHANGED
@@ -5099,10 +5099,11 @@ var Header = ({
5099
5099
  onOrdersNavigate: _onOrdersNavigate,
5100
5100
  onWalletNavigate: _onWalletNavigate,
5101
5101
  onSettingsClick,
5102
- showRefer = false,
5103
5102
  portfolioSummary,
5104
5103
  fundsPending = false,
5105
- transparentOnTop = false
5104
+ transparentOnTop = false,
5105
+ headerCta = "deposit",
5106
+ showRefer = false
5106
5107
  }) => {
5107
5108
  const [headerBgOpacity, setHeaderBgOpacity] = React5.useState(transparentOnTop ? 0 : 1);
5108
5109
  const [isUserMenuOpen, setIsUserMenuOpen] = React5.useState(false);
@@ -5529,14 +5530,25 @@ var Header = ({
5529
5530
  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" }) })
5530
5531
  }
5531
5532
  ),
5532
- isAuthenticated && /* @__PURE__ */ jsxRuntime.jsx(
5533
+ isAuthenticated && (headerCta === "refer" ? /* @__PURE__ */ jsxRuntime.jsx(
5534
+ DepositButton,
5535
+ {
5536
+ type: "button",
5537
+ onClick: (event) => {
5538
+ event?.preventDefault();
5539
+ closeMenus();
5540
+ onSettingsClick?.();
5541
+ },
5542
+ children: "Refer"
5543
+ }
5544
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
5533
5545
  DepositButton,
5534
5546
  {
5535
5547
  type: "button",
5536
5548
  onClick: (e) => handleAddFundingClick(e),
5537
5549
  children: "Deposit"
5538
5550
  }
5539
- ),
5551
+ )),
5540
5552
  /* @__PURE__ */ jsxRuntime.jsxs(UserMenu, { children: [
5541
5553
  /* @__PURE__ */ jsxRuntime.jsxs(
5542
5554
  UserButton,
@@ -7417,6 +7429,7 @@ var LoginPopup = ({
7417
7429
  ] }) : /* @__PURE__ */ jsxRuntime.jsxs(OnboardingStepContainer, { style: { alignItems: "stretch", textAlign: "left" }, children: [
7418
7430
  /* @__PURE__ */ jsxRuntime.jsx(OnboardingHeading, { style: { textAlign: "center" }, children: "Deposit Funds" }),
7419
7431
  /* @__PURE__ */ jsxRuntime.jsx(OnboardingSubtext, { style: { textAlign: "center", marginBottom: "1rem" }, children: "Choose how you'd like to fund your account." }),
7432
+ /* @__PURE__ */ jsxRuntime.jsx(TestnetWarningBanner, { children: TESTNET_DEPOSIT_WARNING }),
7420
7433
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "0.75rem" }, children: [
7421
7434
  /* @__PURE__ */ jsxRuntime.jsxs(ModalOptionCard, { onClick: () => {
7422
7435
  if (walletAddress) {
@@ -7654,6 +7667,7 @@ var LoginPopup = ({
7654
7667
  "Back"
7655
7668
  ] }),
7656
7669
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", paddingTop: "0.5rem" }, children: [
7670
+ /* @__PURE__ */ jsxRuntime.jsx(TestnetWarningBanner, { children: TESTNET_DEPOSIT_WARNING }),
7657
7671
  /* @__PURE__ */ jsxRuntime.jsx("div", { style: {
7658
7672
  width: 52,
7659
7673
  height: 52,
@@ -8430,6 +8444,19 @@ var OnboardingSubtext = styled10__default.default.p`
8430
8444
  line-height: 1.6;
8431
8445
  margin-bottom: 2rem;
8432
8446
  `;
8447
+ var TestnetWarningBanner = styled10__default.default.div`
8448
+ width: 100%;
8449
+ background: #f5c84b;
8450
+ color: #1a1205;
8451
+ font-size: 0.76rem;
8452
+ font-weight: 600;
8453
+ line-height: 1.4;
8454
+ text-align: center;
8455
+ padding: 0.6rem 0.85rem;
8456
+ border-radius: 8px;
8457
+ margin-bottom: 1rem;
8458
+ `;
8459
+ var TESTNET_DEPOSIT_WARNING = "Attention: This is a testnet trading environment. Do NOT send any real funds to your address as you won't be able to recover them";
8433
8460
  var OnboardingButtonGroup = styled10__default.default.div`
8434
8461
  display: flex;
8435
8462
  flex-direction: column;