@loafmarkets/ui 0.1.8 → 0.1.9

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.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as o from 'react';
2
- import o__default, { createElement } from 'react';
2
+ import o__default, { useState, useEffect, createElement } from 'react';
3
3
  import { Slot } from '@radix-ui/react-slot';
4
4
  import { cva } from 'class-variance-authority';
5
5
  import { clsx } from 'clsx';
@@ -2871,6 +2871,9 @@ function lt(t) {
2871
2871
  "production" !== process.env.NODE_ENV && "undefined" != typeof navigator && "ReactNative" === navigator.product && console.warn("It looks like you've imported 'styled-components' on React Native.\nPerhaps you're looking to import 'styled-components/native'?\nRead more about this at https://www.styled-components.com/docs/basics#react-native");
2872
2872
  var mt = "__sc-".concat(a, "__");
2873
2873
  "production" !== process.env.NODE_ENV && "test" !== process.env.NODE_ENV && "undefined" != typeof window && (window[mt] || (window[mt] = 0), 1 === window[mt] && console.warn("It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason.\n\nSee https://styled-components.com/docs/faqs#why-am-i-getting-a-warning-about-several-instances-of-module-on-the-page for more info."), window[mt] += 1);
2874
+
2875
+ // src/assets/Loaf-logo-Banner.png
2876
+ var Loaf_logo_Banner_default = "./Loaf-logo-Banner-DYV62HAW.png";
2874
2877
  var pulse = lt`
2875
2878
  0%, 100% {
2876
2879
  opacity: 0.45;
@@ -3053,7 +3056,7 @@ var LoafLiquidityBadge = o.forwardRef(
3053
3056
  ...props,
3054
3057
  children: [
3055
3058
  /* @__PURE__ */ jsxs(LogoText, { children: [
3056
- /* @__PURE__ */ jsx(LoafLogoImage, { src: "/Loaf-logo-Banner.png", alt: "Loaf" }),
3059
+ /* @__PURE__ */ jsx(LoafLogoImage, { src: Loaf_logo_Banner_default, alt: "Loaf" }),
3057
3060
  /* @__PURE__ */ jsx(LiquidityText, { children: children ?? "Liquidity" })
3058
3061
  ] }),
3059
3062
  /* @__PURE__ */ jsxs(IconWrapper, { children: [
@@ -4339,6 +4342,225 @@ function TradeConfirmationModal({
4339
4342
  ] })
4340
4343
  ] }) });
4341
4344
  }
4345
+ var pulse2 = lt`
4346
+ 0%, 100% {
4347
+ opacity: 0.45;
4348
+ transform: scale(1);
4349
+ }
4350
+ 50% {
4351
+ opacity: 0.7;
4352
+ transform: scale(1.08);
4353
+ }
4354
+ `;
4355
+ var shimmer2 = lt`
4356
+ 0% {
4357
+ background-position: -100% 0;
4358
+ }
4359
+ 100% {
4360
+ background-position: 200% 0;
4361
+ }
4362
+ `;
4363
+ var LogoContainer2 = at.span`
4364
+ display: inline-flex;
4365
+ align-items: center;
4366
+ gap: 0.35rem;
4367
+ padding: 0.35rem 0.6rem;
4368
+ background: linear-gradient(
4369
+ 135deg,
4370
+ rgba(240, 185, 11, 0.05) 0%,
4371
+ rgba(240, 185, 11, 0.1) 50%,
4372
+ rgba(240, 185, 11, 0.05) 100%
4373
+ );
4374
+ border: 1px solid rgba(240, 185, 11, 0.3);
4375
+ border-radius: 5px;
4376
+ position: relative;
4377
+ overflow: visible;
4378
+ cursor: pointer;
4379
+ transition: all 0.3s ease;
4380
+ line-height: 1.4;
4381
+
4382
+ ${(props) => props.$isGlowing && `
4383
+ border-color: rgba(240, 185, 11, 1);
4384
+ box-shadow: 0 0 25px rgba(240, 185, 11, 0.8),
4385
+ 0 0 40px rgba(240, 185, 11, 0.5),
4386
+ inset 0 0 20px rgba(240, 185, 11, 0.3);
4387
+ background: linear-gradient(
4388
+ 135deg,
4389
+ rgba(240, 185, 11, 0.2) 0%,
4390
+ rgba(240, 185, 11, 0.3) 50%,
4391
+ rgba(240, 185, 11, 0.2) 100%
4392
+ );
4393
+ animation: quickPulse 0.35s ease-out;
4394
+
4395
+ @keyframes quickPulse {
4396
+ 0% {
4397
+ transform: scale(1);
4398
+ }
4399
+ 50% {
4400
+ transform: scale(1.05);
4401
+ }
4402
+ 100% {
4403
+ transform: scale(1);
4404
+ }
4405
+ }
4406
+ `}
4407
+
4408
+ @media (max-width: 768px) {
4409
+ padding: 0.3rem 0.4rem 0.3rem 0.25rem;
4410
+ gap: 0.25rem;
4411
+ border-radius: 4px;
4412
+ transform: none !important;
4413
+ transition: none;
4414
+
4415
+ &:active {
4416
+ transform: none !important;
4417
+ }
4418
+ }
4419
+
4420
+ @media (max-width: 480px) {
4421
+ padding: 0.2rem 0.3rem 0.2rem 0.2rem;
4422
+ gap: 0.2rem;
4423
+ transform: none !important;
4424
+ }
4425
+
4426
+ @media (hover: hover) and (pointer: fine) {
4427
+ &:hover {
4428
+ border-color: rgba(240, 185, 11, 0.6);
4429
+ background: linear-gradient(
4430
+ 135deg,
4431
+ rgba(240, 185, 11, 0.1) 0%,
4432
+ rgba(240, 185, 11, 0.15) 50%,
4433
+ rgba(240, 185, 11, 0.1) 100%
4434
+ );
4435
+ transform: translateY(-1px);
4436
+ box-shadow: 0 4px 12px rgba(240, 185, 11, 0.2);
4437
+ }
4438
+ }
4439
+
4440
+ &::before {
4441
+ content: "";
4442
+ position: absolute;
4443
+ top: 0;
4444
+ left: 0;
4445
+ right: 0;
4446
+ bottom: 0;
4447
+ background: linear-gradient(
4448
+ 90deg,
4449
+ transparent,
4450
+ rgba(240, 185, 11, 0.1),
4451
+ transparent
4452
+ );
4453
+ background-size: 200% 100%;
4454
+ animation: ${shimmer2} 3s infinite;
4455
+ pointer-events: none;
4456
+ }
4457
+ `;
4458
+ var IconWrapper2 = at.div`
4459
+ display: flex;
4460
+ align-items: center;
4461
+ justify-content: center;
4462
+ position: relative;
4463
+ width: 16px;
4464
+ height: 16px;
4465
+
4466
+ @media (max-width: 768px) {
4467
+ width: 16px;
4468
+ height: 16px;
4469
+ }
4470
+
4471
+ @media (max-width: 480px) {
4472
+ width: 14px;
4473
+ height: 14px;
4474
+ }
4475
+ `;
4476
+ var IconCircle2 = at.div`
4477
+ position: absolute;
4478
+ width: ${(props) => props.$size}px;
4479
+ height: ${(props) => props.$size}px;
4480
+ border: 2px solid ${(props) => props.$color};
4481
+ border-radius: 50%;
4482
+ animation: ${pulse2} ${(props) => props.$duration}s infinite cubic-bezier(0.4, 0, 0.6, 1);
4483
+ animation-delay: ${(props) => props.$delay}s;
4484
+ transform-origin: center;
4485
+ will-change: transform, opacity;
4486
+ `;
4487
+ var IconCore2 = at.div`
4488
+ width: 5px;
4489
+ height: 5px;
4490
+ background: linear-gradient(135deg, #0ecb81 0%, #2ecc71 100%);
4491
+ border-radius: 50%;
4492
+ box-shadow: 0 0 6px rgba(14, 203, 129, 0.6);
4493
+ position: relative;
4494
+ z-index: 1;
4495
+ `;
4496
+ var LogoText2 = at.span`
4497
+ display: inline-flex;
4498
+ align-items: center;
4499
+ gap: 0.2rem;
4500
+ position: relative;
4501
+ z-index: 1;
4502
+ vertical-align: middle;
4503
+ `;
4504
+ var LoafLogoImage2 = at.img`
4505
+ height: 20px;
4506
+ position: relative;
4507
+ z-index: 1;
4508
+
4509
+ @media (max-width: 768px) {
4510
+ height: 20px;
4511
+ }
4512
+
4513
+ @media (max-width: 480px) {
4514
+ height: 18px;
4515
+ }
4516
+ `;
4517
+ var LiquidityText2 = at.span`
4518
+ font-size: 0.65rem;
4519
+ font-weight: 400;
4520
+ background: linear-gradient(135deg, #f0b90b 0%, #ffd700 50%, #f0b90b 100%);
4521
+ background-size: 200% auto;
4522
+ -webkit-background-clip: text;
4523
+ -webkit-text-fill-color: transparent;
4524
+ background-clip: text;
4525
+ letter-spacing: 0.3px;
4526
+ font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
4527
+ opacity: 0.75;
4528
+ align-self: center;
4529
+ line-height: 1;
4530
+ display: flex;
4531
+ align-items: center;
4532
+ position: relative;
4533
+ top: 1px;
4534
+
4535
+ @media (max-width: 768px) {
4536
+ font-size: 0.6rem;
4537
+ letter-spacing: 0.2px;
4538
+ }
4539
+
4540
+ @media (max-width: 480px) {
4541
+ font-size: 0.55rem;
4542
+ letter-spacing: 0.1px;
4543
+ }
4544
+ `;
4545
+ var LoafLiquidityLogo = ({
4546
+ onClick,
4547
+ isGlowing,
4548
+ className
4549
+ }) => {
4550
+ return /* @__PURE__ */ jsxs(LogoContainer2, { onClick, $isGlowing: isGlowing, className, children: [
4551
+ /* @__PURE__ */ jsxs(LogoText2, { children: [
4552
+ /* @__PURE__ */ jsx(LoafLogoImage2, { src: Loaf_logo_Banner_default, alt: "Loaf" }),
4553
+ /* @__PURE__ */ jsx(LiquidityText2, { children: "Liquidity" })
4554
+ ] }),
4555
+ /* @__PURE__ */ jsxs(IconWrapper2, { children: [
4556
+ /* @__PURE__ */ jsx(IconCore2, {}),
4557
+ /* @__PURE__ */ jsx(IconCircle2, { $size: 10, $color: "rgba(14, 203, 129, 0.5)", $duration: 4, $delay: 0 }),
4558
+ /* @__PURE__ */ jsx(IconCircle2, { $size: 13, $color: "rgba(14, 203, 129, 0.35)", $duration: 5.2, $delay: 0.7 }),
4559
+ /* @__PURE__ */ jsx(IconCircle2, { $size: 16, $color: "rgba(14, 203, 129, 0.25)", $duration: 6.3, $delay: 1.3 })
4560
+ ] })
4561
+ ] });
4562
+ };
4563
+ LoafLiquidityLogo.displayName = "LoafLiquidityLogo";
4342
4564
  var DEFAULT_TABS = [
4343
4565
  { id: "portfolio", label: "Portfolio" },
4344
4566
  { id: "openOrders", label: "Open Orders" },
@@ -5507,76 +5729,842 @@ var PriceBlock = at.span`
5507
5729
  border-left: 1px solid rgba(255, 255, 255, 0.25);
5508
5730
  min-height: 1.5rem;
5509
5731
  `;
5510
- var PropertySubheader = o.forwardRef(
5511
- ({ className, tabs, activeTabId, onTabChange, actions, ...props }, ref) => {
5512
- const tabsContainerRef = o.useRef(null);
5513
- o.useEffect(() => {
5514
- const container = tabsContainerRef.current;
5515
- if (!container) return;
5516
- const isMobile = window.innerWidth <= 768;
5517
- if (!isMobile) return;
5518
- const forceScrollbar = () => {
5519
- if (container.scrollWidth > container.clientWidth) {
5520
- container.scrollTop = 1;
5521
- container.scrollTop = 0;
5522
- container.scrollLeft = 1;
5523
- container.scrollLeft = 0;
5524
- }
5525
- };
5526
- setTimeout(forceScrollbar, 100);
5527
- window.addEventListener("resize", forceScrollbar);
5528
- return () => window.removeEventListener("resize", forceScrollbar);
5529
- }, [tabs]);
5530
- return /* @__PURE__ */ jsxs(
5531
- "div",
5532
- {
5533
- ref,
5534
- className: cn(
5535
- "w-full font-normal",
5536
- "flex flex-col-reverse gap-3",
5537
- "md:flex-row md:items-center md:justify-between",
5538
- className
5539
- ),
5540
- ...props,
5541
- children: [
5542
- /* @__PURE__ */ jsx(
5732
+ var DEFAULT_TRADE_URL = "https://loafx-frontend-web.vercel.app/";
5733
+ var DEFAULT_TRADE_PATH = "/trade";
5734
+ var DEFAULT_HOME_PATH = "/";
5735
+ var DEFAULT_ABOUT_PATH = "/about";
5736
+ var DEFAULT_OFFERINGS_PATH = "/ipo/musgrave";
5737
+ var DEFAULT_PROPERTY_MAP_PATH = "/map";
5738
+ var DEFAULT_LOAF_LIQUIDITY_PATH = "/loaf-liquidity";
5739
+ var DEFAULT_AUTH_LOGIN_URL = "http://localhost:5174/";
5740
+ var DEFAULT_AUTH_RETURN_PARAM = "returnTo";
5741
+ var Header = ({
5742
+ currentUser,
5743
+ isAuthenticated = false,
5744
+ locationPath = DEFAULT_HOME_PATH,
5745
+ activeTab,
5746
+ onNavigate,
5747
+ onLogout,
5748
+ onSignInClick,
5749
+ loginPopupComponent: LoginPopupComponent,
5750
+ tradeUrl = DEFAULT_TRADE_URL,
5751
+ tradePath = DEFAULT_TRADE_PATH,
5752
+ homePath = DEFAULT_HOME_PATH,
5753
+ aboutPath = DEFAULT_ABOUT_PATH,
5754
+ offeringsPath = DEFAULT_OFFERINGS_PATH,
5755
+ propertyMapPath = DEFAULT_PROPERTY_MAP_PATH,
5756
+ loafLiquidityPath = DEFAULT_LOAF_LIQUIDITY_PATH,
5757
+ authLoginUrl = DEFAULT_AUTH_LOGIN_URL,
5758
+ authReturnParam = DEFAULT_AUTH_RETURN_PARAM,
5759
+ getAuthReturnUrl,
5760
+ logoHref,
5761
+ onLogoClick,
5762
+ onLoafLiquidityClick,
5763
+ onTradeClick,
5764
+ onProfileNavigate,
5765
+ onOrdersNavigate,
5766
+ onWalletNavigate
5767
+ }) => {
5768
+ const [isUserMenuOpen, setIsUserMenuOpen] = useState(false);
5769
+ const [isMobileMenuOpen, setIsMobileMenuOpen] = useState(false);
5770
+ const [isMoreMenuOpen, setIsMoreMenuOpen] = useState(false);
5771
+ const [showLoginPopup, setShowLoginPopup] = useState(false);
5772
+ useEffect(() => {
5773
+ const handleClickOutside = (event) => {
5774
+ const target = event.target;
5775
+ if (!target) return;
5776
+ const clickedInsideUserMenu = target.closest(".user-menu") || target.closest(".user-menu-dropdown");
5777
+ if (isUserMenuOpen && !clickedInsideUserMenu) {
5778
+ console.log("[Header] Closing user menu due to outside click");
5779
+ setIsUserMenuOpen(false);
5780
+ }
5781
+ if (isMobileMenuOpen && !target.closest(".mobile-menu") && !target.closest(".mobile-menu-button")) {
5782
+ setIsMobileMenuOpen(false);
5783
+ }
5784
+ if (isMoreMenuOpen && !target.closest(".more-menu")) {
5785
+ setIsMoreMenuOpen(false);
5786
+ }
5787
+ };
5788
+ document.addEventListener("mousedown", handleClickOutside);
5789
+ return () => {
5790
+ document.removeEventListener("mousedown", handleClickOutside);
5791
+ };
5792
+ }, [isUserMenuOpen, isMobileMenuOpen, isMoreMenuOpen]);
5793
+ const closeMenus = () => {
5794
+ setIsMobileMenuOpen(false);
5795
+ setIsUserMenuOpen(false);
5796
+ setIsMoreMenuOpen(false);
5797
+ };
5798
+ const handleUserMenuToggle = () => {
5799
+ const nextState = !isUserMenuOpen;
5800
+ console.log("[Header] User dropdown toggle clicked", { nextState });
5801
+ setIsUserMenuOpen(nextState);
5802
+ };
5803
+ const performNavigation = (path) => {
5804
+ if (onNavigate) {
5805
+ onNavigate(path);
5806
+ } else if (typeof window !== "undefined") {
5807
+ window.location.href = path;
5808
+ }
5809
+ };
5810
+ const handleNavigation = (path) => {
5811
+ closeMenus();
5812
+ performNavigation(path);
5813
+ };
5814
+ const handleLogoNavigation = (event) => {
5815
+ event.preventDefault();
5816
+ closeMenus();
5817
+ if (onLogoClick) {
5818
+ onLogoClick();
5819
+ return;
5820
+ }
5821
+ performNavigation(logoHref ?? homePath);
5822
+ };
5823
+ const handleLoafLiquidityNavigation = () => {
5824
+ closeMenus();
5825
+ if (onLoafLiquidityClick) {
5826
+ onLoafLiquidityClick();
5827
+ return;
5828
+ }
5829
+ performNavigation(loafLiquidityPath);
5830
+ };
5831
+ const handleTradeNavigation = () => {
5832
+ closeMenus();
5833
+ if (onTradeClick) {
5834
+ onTradeClick();
5835
+ return;
5836
+ }
5837
+ if (typeof window !== "undefined") {
5838
+ window.location.href = tradeUrl;
5839
+ }
5840
+ };
5841
+ const handleLogoutClick = async (event) => {
5842
+ event?.preventDefault();
5843
+ closeMenus();
5844
+ console.log("[Header] Logout option selected, invoking onLogout handler");
5845
+ await onLogout?.();
5846
+ };
5847
+ const userPrimaryLabel = currentUser?.displayName?.trim() || "User";
5848
+ const resolveAuthReturnUrl = () => {
5849
+ if (getAuthReturnUrl) {
5850
+ return getAuthReturnUrl();
5851
+ }
5852
+ if (typeof window !== "undefined") {
5853
+ return window.location.href;
5854
+ }
5855
+ return null;
5856
+ };
5857
+ const redirectToAuthLogin = () => {
5858
+ if (!authLoginUrl) {
5859
+ return false;
5860
+ }
5861
+ const nextUrl = resolveAuthReturnUrl();
5862
+ let finalUrl = authLoginUrl;
5863
+ if (authReturnParam && nextUrl) {
5864
+ try {
5865
+ const parsed = new URL(authLoginUrl, typeof window !== "undefined" ? window.location.origin : void 0);
5866
+ parsed.searchParams.set(authReturnParam, nextUrl);
5867
+ finalUrl = parsed.toString();
5868
+ } catch {
5869
+ const delimiter2 = authLoginUrl.includes("?") ? "&" : "?";
5870
+ finalUrl = `${authLoginUrl}${delimiter2}${encodeURIComponent(authReturnParam)}=${encodeURIComponent(nextUrl)}`;
5871
+ }
5872
+ }
5873
+ if (typeof window !== "undefined") {
5874
+ window.location.href = finalUrl;
5875
+ return true;
5876
+ }
5877
+ return false;
5878
+ };
5879
+ const handleSignIn = () => {
5880
+ if (onSignInClick) {
5881
+ onSignInClick();
5882
+ return;
5883
+ }
5884
+ if (redirectToAuthLogin()) {
5885
+ return;
5886
+ }
5887
+ if (LoginPopupComponent) {
5888
+ setShowLoginPopup(true);
5889
+ }
5890
+ };
5891
+ const inferredActiveTab = (() => {
5892
+ if (locationPath === tradePath) return "trade";
5893
+ if (locationPath === homePath) return "home";
5894
+ if (locationPath === aboutPath) return "about";
5895
+ if (locationPath.startsWith(offeringsPath)) return "offerings";
5896
+ if (locationPath === propertyMapPath) return "propertyMap";
5897
+ return null;
5898
+ })();
5899
+ const resolvedActiveTab = activeTab ?? inferredActiveTab;
5900
+ const tradeActive = resolvedActiveTab === "trade";
5901
+ const homeActive = resolvedActiveTab === "home";
5902
+ const offeringsActive = resolvedActiveTab === "offerings";
5903
+ const propertyMapActive = resolvedActiveTab === "propertyMap";
5904
+ const aboutActive = resolvedActiveTab === "about";
5905
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
5906
+ /* @__PURE__ */ jsx(Overlay, { $isOpen: isMobileMenuOpen, onClick: () => setIsMobileMenuOpen(false) }),
5907
+ /* @__PURE__ */ jsxs(HeaderContainer, { children: [
5908
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center" }, children: [
5909
+ /* @__PURE__ */ jsxs(Logo, { children: [
5910
+ /* @__PURE__ */ jsx(LogoLink, { href: logoHref ?? homePath, onClick: handleLogoNavigation, children: /* @__PURE__ */ jsx("img", { src: Loaf_logo_Banner_default, alt: "LOAF Logo" }) }),
5911
+ /* @__PURE__ */ jsx("h1", { children: "LOAF" })
5912
+ ] }),
5913
+ /* @__PURE__ */ jsxs(Nav, { $isOpen: isMobileMenuOpen, className: "mobile-menu", children: [
5914
+ !isMobileMenuOpen && /* @__PURE__ */ jsxs(
5543
5915
  "div",
5544
5916
  {
5545
- ref: tabsContainerRef,
5546
- className: cn(
5547
- "flex items-center border-b border-white/10",
5548
- "overflow-x-auto md:overflow-visible",
5549
- "[-webkit-overflow-scrolling:touch]",
5550
- "[scroll-behavior:smooth]",
5551
- "[touch-action:pan-x]",
5552
- "md:border-b-0"
5553
- ),
5554
- style: { WebkitTapHighlightColor: "transparent" },
5555
- children: /* @__PURE__ */ jsx("div", { className: "flex min-w-max", children: tabs.map((tab) => {
5556
- const active = tab.id === activeTabId;
5557
- return /* @__PURE__ */ jsxs(
5558
- "button",
5917
+ style: { display: "flex", flexDirection: "row", alignItems: "center", height: "56px" },
5918
+ className: "desktop-nav",
5919
+ children: [
5920
+ /* @__PURE__ */ jsx(
5921
+ NavLink,
5559
5922
  {
5560
- type: "button",
5561
- onClick: () => onTabChange?.(tab.id),
5562
- className: cn(
5563
- "relative whitespace-nowrap",
5564
- "px-6 py-4",
5565
- "font-normal",
5566
- "transition-colors",
5567
- "max-[768px]:px-[1.2rem] max-[768px]:py-[0.8rem]",
5568
- "max-[480px]:px-4 max-[480px]:py-[0.7rem] max-[480px]:text-[0.9rem]",
5569
- active ? "font-semibold text-[var(--color-accent,#e6c87e)]" : "text-white/60 hover:text-white"
5570
- ),
5571
- style: {
5572
- borderBottom: active ? "2px solid var(--color-accent, #e6c87e)" : "2px solid transparent",
5573
- minWidth: "80px",
5574
- touchAction: "manipulation"
5923
+ href: homePath,
5924
+ className: homeActive ? "active" : "",
5925
+ onClick: (event) => {
5926
+ event.preventDefault();
5927
+ handleNavigation(homePath);
5575
5928
  },
5576
- children: [
5577
- tab.label,
5578
- tab.hasNotification ? /* @__PURE__ */ jsx(
5579
- "span",
5929
+ children: "Home"
5930
+ }
5931
+ ),
5932
+ /* @__PURE__ */ jsx(
5933
+ NavLink,
5934
+ {
5935
+ href: aboutPath,
5936
+ className: aboutActive ? "active" : "",
5937
+ onClick: (event) => {
5938
+ event.preventDefault();
5939
+ handleNavigation(aboutPath);
5940
+ },
5941
+ children: "About"
5942
+ }
5943
+ ),
5944
+ /* @__PURE__ */ jsx(
5945
+ NavLink,
5946
+ {
5947
+ href: tradeUrl,
5948
+ className: tradeActive ? "active" : "",
5949
+ onClick: (event) => {
5950
+ event.preventDefault();
5951
+ handleTradeNavigation();
5952
+ },
5953
+ children: "Trade"
5954
+ }
5955
+ ),
5956
+ /* @__PURE__ */ jsx(
5957
+ NavLink,
5958
+ {
5959
+ href: offeringsPath,
5960
+ className: offeringsActive ? "active" : "",
5961
+ onClick: (event) => {
5962
+ event.preventDefault();
5963
+ handleNavigation(offeringsPath);
5964
+ },
5965
+ children: "Offerings"
5966
+ }
5967
+ ),
5968
+ /* @__PURE__ */ jsx(
5969
+ NavLink,
5970
+ {
5971
+ href: propertyMapPath,
5972
+ className: propertyMapActive ? "active" : "",
5973
+ onClick: (event) => {
5974
+ event.preventDefault();
5975
+ handleNavigation(propertyMapPath);
5976
+ },
5977
+ children: "Property Map"
5978
+ }
5979
+ ),
5980
+ /* @__PURE__ */ jsx("div", { style: { marginLeft: "auto", display: "flex", alignItems: "center" }, children: /* @__PURE__ */ jsx(
5981
+ "div",
5982
+ {
5983
+ style: { cursor: "pointer", marginLeft: "12px" },
5984
+ onClick: handleLoafLiquidityNavigation,
5985
+ role: "button",
5986
+ tabIndex: 0,
5987
+ onKeyDown: (event) => {
5988
+ if (event.key === "Enter" || event.key === " ") {
5989
+ event.preventDefault();
5990
+ handleLoafLiquidityNavigation();
5991
+ }
5992
+ },
5993
+ children: /* @__PURE__ */ jsx(LoafLiquidityLogo, {})
5994
+ }
5995
+ ) })
5996
+ ]
5997
+ }
5998
+ ),
5999
+ /* @__PURE__ */ jsxs("div", { className: "mobile-menu-content", children: [
6000
+ /* @__PURE__ */ jsx(MobileMenuHeader, { children: /* @__PURE__ */ jsx(MobileMenuClose, { onClick: () => setIsMobileMenuOpen(false), "aria-label": "Close menu", children: /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }) }) }) }),
6001
+ /* @__PURE__ */ jsxs(SearchBar, { children: [
6002
+ /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zM5 9.5C5 7.01 7.01 5 9.5 5S14 7.01 14 9.5 11.99 14 9.5 14 5 11.99 5 9.5z" }) }),
6003
+ /* @__PURE__ */ jsx("input", { type: "text", placeholder: "Search..." })
6004
+ ] }),
6005
+ /* @__PURE__ */ jsx(MobileNavItem, { onClick: () => handleNavigation(homePath), children: "Home" }),
6006
+ /* @__PURE__ */ jsx(
6007
+ MobileNavItem,
6008
+ {
6009
+ onClick: () => {
6010
+ handleTradeNavigation();
6011
+ },
6012
+ children: "Trade"
6013
+ }
6014
+ ),
6015
+ /* @__PURE__ */ jsx(MobileNavItem, { onClick: () => handleNavigation(offeringsPath), children: "Offerings" }),
6016
+ /* @__PURE__ */ jsx(MobileNavItem, { onClick: () => handleNavigation(propertyMapPath), children: "Property Map" }),
6017
+ /* @__PURE__ */ jsx("div", { style: { borderTop: "1px solid #2b3139", margin: "8px 0" } }),
6018
+ /* @__PURE__ */ jsx(
6019
+ MobileNavItem,
6020
+ {
6021
+ onClick: handleLoafLiquidityNavigation,
6022
+ style: { display: "flex", justifyContent: "center", padding: "16px 24px" },
6023
+ children: /* @__PURE__ */ jsx(LoafLiquidityLogo, {})
6024
+ }
6025
+ ),
6026
+ /* @__PURE__ */ jsx("div", { style: { borderTop: "1px solid #2b3139", margin: "8px 0" } }),
6027
+ isAuthenticated && /* @__PURE__ */ jsx(MobileNavItem, { onClick: handleLogoutClick, style: { color: "#f6465d" }, children: "Logout" })
6028
+ ] })
6029
+ ] })
6030
+ ] }),
6031
+ isMobileMenuOpen && /* @__PURE__ */ jsx(
6032
+ MobileOnlyButton,
6033
+ {
6034
+ onClick: () => setIsMobileMenuOpen(false),
6035
+ $isOpen: true,
6036
+ style: { position: "fixed", right: "1rem", top: "4rem" },
6037
+ "aria-label": "Close menu",
6038
+ children: "\u2715"
6039
+ }
6040
+ ),
6041
+ isAuthenticated ? /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center" }, children: [
6042
+ /* @__PURE__ */ jsxs(UserMenu, { children: [
6043
+ /* @__PURE__ */ jsxs(
6044
+ UserButton,
6045
+ {
6046
+ onClick: handleUserMenuToggle,
6047
+ isOpen: isUserMenuOpen,
6048
+ className: "user-menu",
6049
+ children: [
6050
+ /* @__PURE__ */ jsx("div", { style: { display: "flex", flexDirection: "column", alignItems: "flex-start" }, children: /* @__PURE__ */ jsx("span", { style: { fontWeight: 600, fontSize: "0.95rem" }, children: userPrimaryLabel }) }),
6051
+ /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { d: "M7 10l5 5 5-5H7z" }) })
6052
+ ]
6053
+ }
6054
+ ),
6055
+ isUserMenuOpen && /* @__PURE__ */ jsxs(DropdownMenu, { className: "user-menu-dropdown", children: [
6056
+ /* @__PURE__ */ jsx(
6057
+ "div",
6058
+ {
6059
+ style: {
6060
+ padding: "12px 16px",
6061
+ borderBottom: "1px solid rgba(255,255,255,0.08)",
6062
+ textAlign: "left"
6063
+ },
6064
+ children: /* @__PURE__ */ jsx("p", { style: { margin: 0, fontWeight: 600 }, children: userPrimaryLabel })
6065
+ }
6066
+ ),
6067
+ /* @__PURE__ */ jsx(
6068
+ "button",
6069
+ {
6070
+ type: "button",
6071
+ onClick: (event) => {
6072
+ console.log("[Header] Logout menu item clicked");
6073
+ void handleLogoutClick(event);
6074
+ },
6075
+ children: /* @__PURE__ */ jsx(MenuItem, { className: "logout", children: "Logout" })
6076
+ }
6077
+ )
6078
+ ] })
6079
+ ] }),
6080
+ !isMobileMenuOpen && /* @__PURE__ */ jsx(
6081
+ MobileOnlyButton,
6082
+ {
6083
+ onClick: () => setIsMobileMenuOpen(true),
6084
+ $isOpen: false,
6085
+ className: "mobile-menu-button",
6086
+ "aria-label": "Open menu",
6087
+ children: "\u2630"
6088
+ }
6089
+ )
6090
+ ] }) : /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center" }, children: [
6091
+ /* @__PURE__ */ jsx(Button2, { className: "signup", onClick: handleSignIn, children: "Sign in / Connect" }),
6092
+ !isMobileMenuOpen && /* @__PURE__ */ jsx(
6093
+ MobileOnlyButton,
6094
+ {
6095
+ onClick: () => setIsMobileMenuOpen(true),
6096
+ isOpen: false,
6097
+ className: "mobile-menu-button",
6098
+ "aria-label": "Open menu",
6099
+ children: "\u2630"
6100
+ }
6101
+ )
6102
+ ] })
6103
+ ] }),
6104
+ LoginPopupComponent && showLoginPopup && /* @__PURE__ */ jsx(LoginPopupComponent, { onClose: () => setShowLoginPopup(false) })
6105
+ ] });
6106
+ };
6107
+ Header.displayName = "Header";
6108
+ var Overlay = at.div`
6109
+ display: ${(props) => props.$isOpen ? "block" : "none"};
6110
+ position: fixed;
6111
+ top: 0;
6112
+ left: 0;
6113
+ width: 100%;
6114
+ height: 100%;
6115
+ background-color: rgba(0, 0, 0, 0.7);
6116
+ backdrop-filter: blur(3px);
6117
+ z-index: 999;
6118
+ `;
6119
+ var MobileOnlyButton = at.button.attrs({ type: "button" })`
6120
+ display: none;
6121
+ background-color: ${(props) => props.$isOpen ? "rgba(240, 185, 11, 0.2)" : "#f0b90b"};
6122
+ color: ${(props) => props.$isOpen ? "#ffffff" : "#0b0e11"};
6123
+ font-size: 24px;
6124
+ font-weight: bold;
6125
+ width: 44px;
6126
+ height: 44px;
6127
+ justify-content: center;
6128
+ align-items: center;
6129
+ margin-left: 0.75rem;
6130
+ z-index: 1100;
6131
+ border-radius: 8px;
6132
+ border: ${(props) => props.$isOpen ? "1px solid #f0b90b" : "none"};
6133
+ line-height: 1;
6134
+ padding: 0;
6135
+ cursor: pointer;
6136
+ box-shadow: ${(props) => props.$isOpen ? "0 2px 8px rgba(0, 0, 0, 0.3)" : "none"};
6137
+
6138
+ &:hover {
6139
+ background-color: ${(props) => props.$isOpen ? "rgba(240, 185, 11, 0.3)" : "#e0aa0b"};
6140
+ }
6141
+
6142
+ &:active {
6143
+ background-color: ${(props) => props.$isOpen ? "rgba(240, 185, 11, 0.4)" : "#d19f0a"};
6144
+ }
6145
+
6146
+ @media (max-width: 1300px) {
6147
+ display: flex;
6148
+ }
6149
+ `;
6150
+ var HeaderContainer = at.header`
6151
+ display: flex;
6152
+ justify-content: space-between;
6153
+ align-items: center;
6154
+ padding: 0 2rem;
6155
+ background-color: #0d1117;
6156
+ border-bottom: 1px solid #232a32;
6157
+ position: sticky;
6158
+ top: 0;
6159
+ left: 0;
6160
+ right: 0;
6161
+ z-index: 1000;
6162
+ width: 100%;
6163
+ height: 56px;
6164
+ box-sizing: border-box;
6165
+
6166
+ @media (max-width: 768px) {
6167
+ padding: 0 1rem;
6168
+ }
6169
+ `;
6170
+ var Logo = at.div`
6171
+ display: flex;
6172
+ align-items: center;
6173
+ margin-right: 24px;
6174
+ height: 56px;
6175
+
6176
+ img {
6177
+ height: 28px;
6178
+ display: block;
6179
+ }
6180
+
6181
+ h1 {
6182
+ display: none;
6183
+ }
6184
+
6185
+ @media (max-width: 768px) {
6186
+ img {
6187
+ height: 30px;
6188
+ }
6189
+ }
6190
+ `;
6191
+ var LogoLink = at.a`
6192
+ display: inline-flex;
6193
+ align-items: center;
6194
+ `;
6195
+ var Nav = at.nav`
6196
+ display: flex;
6197
+ flex-direction: column;
6198
+
6199
+ .desktop-nav {
6200
+ display: flex;
6201
+ }
6202
+
6203
+ .mobile-menu-content {
6204
+ display: none;
6205
+ }
6206
+
6207
+ .mobile-loaf-logo {
6208
+ display: none;
6209
+ }
6210
+
6211
+ @media (max-width: 1300px) {
6212
+ .mobile-loaf-logo {
6213
+ display: flex !important;
6214
+ align-items: center;
6215
+ height: 56px;
6216
+ }
6217
+ }
6218
+
6219
+ @media (max-width: 1300px) {
6220
+ position: fixed;
6221
+ top: 56px;
6222
+ right: ${(props) => props.$isOpen ? "0" : "-100%"} ;
6223
+ width: 280px;
6224
+ max-width: 280px;
6225
+ height: calc(100vh - 56px);
6226
+ background: linear-gradient(180deg, #0f1419 0%, #0a0e13 100%);
6227
+ z-index: 1000;
6228
+ transition: right 0.3s ease;
6229
+ box-shadow: ${(props) => props.$isOpen ? "-10px 0 30px rgba(0, 0, 0, 0.5)" : "none"};
6230
+ overflow-y: auto;
6231
+ border-left: 1px solid rgba(255, 255, 255, 0.05);
6232
+
6233
+ .desktop-nav {
6234
+ display: none;
6235
+ }
6236
+
6237
+ .mobile-menu-content {
6238
+ display: flex;
6239
+ flex-direction: column;
6240
+ padding-top: 0;
6241
+ border-top: 1px solid rgba(255, 255, 255, 0.1);
6242
+ }
6243
+ }
6244
+ `;
6245
+ var NavLink = at.a`
6246
+ margin: 0 12px;
6247
+ color: #eaecef;
6248
+ font-weight: 500;
6249
+ font-size: 14px;
6250
+ padding: 0 4px;
6251
+ height: 56px;
6252
+ display: flex;
6253
+ align-items: center;
6254
+ position: relative;
6255
+ transition: color 0.2s ease;
6256
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif;
6257
+ letter-spacing: 0.2px;
6258
+
6259
+ &:first-child {
6260
+ margin-left: 0;
6261
+ }
6262
+
6263
+ &:hover,
6264
+ &.active {
6265
+ color: #f0b90b;
6266
+ }
6267
+
6268
+ &.active::after {
6269
+ content: "";
6270
+ position: absolute;
6271
+ bottom: 0;
6272
+ left: 0;
6273
+ width: 100%;
6274
+ height: 3px;
6275
+ background-color: #f0b90b;
6276
+ }
6277
+
6278
+ @media (max-width: 768px) {
6279
+ margin: 0;
6280
+ padding: 16px 24px;
6281
+ width: 100%;
6282
+ height: auto;
6283
+ text-align: left;
6284
+ font-size: 16px;
6285
+ color: #eaecef;
6286
+ display: flex;
6287
+ align-items: center;
6288
+
6289
+ &:hover {
6290
+ background-color: #2b3139;
6291
+ }
6292
+
6293
+ &.active::after {
6294
+ display: none;
6295
+ }
6296
+
6297
+ svg {
6298
+ margin-right: 12px;
6299
+ width: 20px;
6300
+ height: 20px;
6301
+ }
6302
+ }
6303
+ `;
6304
+ var Button2 = at.button.attrs({ type: "button" })`
6305
+ padding: 0.5rem 1rem;
6306
+ border-radius: 6px;
6307
+ font-weight: 500;
6308
+ font-size: 13px;
6309
+ margin-left: 0.75rem;
6310
+ transition: all 0.2s ease;
6311
+
6312
+ &.login {
6313
+ background-color: transparent;
6314
+ border: 1px solid #f0b90b;
6315
+ color: #f0b90b;
6316
+
6317
+ &:hover {
6318
+ background-color: rgba(240, 185, 11, 0.1);
6319
+ }
6320
+
6321
+ @media (max-width: 768px) {
6322
+ display: none;
6323
+ }
6324
+ }
6325
+
6326
+ &.signup {
6327
+ background-color: #f0b90b;
6328
+ color: #0b0e11;
6329
+ border: none;
6330
+
6331
+ &:hover {
6332
+ background-color: #f8d12f;
6333
+ }
6334
+ }
6335
+
6336
+ @media (max-width: 768px) {
6337
+ padding: 0.65rem 1.25rem;
6338
+ font-size: 0.9rem;
6339
+ margin-left: 0.5rem;
6340
+ }
6341
+ `;
6342
+ var UserMenu = at.div`
6343
+ position: relative;
6344
+ margin-left: 0.75rem;
6345
+ height: 56px;
6346
+ display: flex;
6347
+ align-items: center;
6348
+
6349
+ @media (max-width: 768px) {
6350
+ margin-left: auto;
6351
+ }
6352
+ `;
6353
+ var UserButton = at.button.attrs({ type: "button" })`
6354
+ display: flex;
6355
+ align-items: center;
6356
+ background: transparent;
6357
+ color: #eaecef;
6358
+ font-size: 13px;
6359
+ padding: 0 6px;
6360
+ height: 32px;
6361
+ border-radius: 4px;
6362
+
6363
+ &:hover {
6364
+ background-color: #2b3139;
6365
+ }
6366
+
6367
+ span {
6368
+ margin-right: 0.5rem;
6369
+ }
6370
+
6371
+ svg {
6372
+ width: 12px;
6373
+ height: 12px;
6374
+ transition: transform 0.2s ease;
6375
+ transform: ${(props) => props.isOpen ? "rotate(180deg)" : "rotate(0)"};
6376
+ }
6377
+ `;
6378
+ var DropdownMenu = at.div`
6379
+ position: absolute;
6380
+ top: 100%;
6381
+ left: 0;
6382
+ margin-top: 0.25rem;
6383
+ background-color: #0d1117;
6384
+ border-radius: 8px;
6385
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
6386
+ border: 1px solid rgba(255, 255, 255, 0.1);
6387
+ min-width: 180px;
6388
+ overflow: hidden;
6389
+ z-index: 10;
6390
+ padding: 0.5rem 0;
6391
+
6392
+ button {
6393
+ background: none;
6394
+ border: none;
6395
+ padding: 0;
6396
+ margin: 0;
6397
+ width: 100%;
6398
+ text-align: left;
6399
+ cursor: pointer;
6400
+ color: inherit;
6401
+ display: block;
6402
+ }
6403
+ `;
6404
+ var MenuItem = at.div`
6405
+ padding: 0.75rem 1.25rem;
6406
+ cursor: pointer;
6407
+ transition: all 0.2s ease;
6408
+ color: #eaecef;
6409
+ font-size: 14px;
6410
+ font-weight: 400;
6411
+ display: block;
6412
+ width: 100%;
6413
+ border-bottom: none;
6414
+
6415
+ &:hover {
6416
+ color: #f0b90b;
6417
+ background-color: rgba(240, 185, 11, 0.08);
6418
+ }
6419
+
6420
+ &.logout {
6421
+ color: #f6465d;
6422
+ }
6423
+ `;
6424
+ var MobileMenuHeader = at.div`
6425
+ display: flex;
6426
+ justify-content: flex-end;
6427
+ align-items: center;
6428
+ padding: 16px 20px;
6429
+ margin-top: 60px;
6430
+ border-bottom: 1px solid rgba(255, 255, 255, 0.05);
6431
+ background: rgba(0, 0, 0, 0.2);
6432
+ `;
6433
+ var MobileMenuClose = at.button.attrs({ type: "button" })`
6434
+ background: none;
6435
+ border: none;
6436
+ color: #eaecef;
6437
+ cursor: pointer;
6438
+ padding: 8px;
6439
+ font-size: 24px;
6440
+ display: flex;
6441
+ align-items: center;
6442
+ justify-content: center;
6443
+ `;
6444
+ var SearchBar = at.div`
6445
+ display: flex;
6446
+ align-items: center;
6447
+ background: rgba(255, 255, 255, 0.03);
6448
+ border-radius: 6px;
6449
+ padding: 10px 14px;
6450
+ margin: 16px 20px 12px;
6451
+ border: 1px solid rgba(255, 255, 255, 0.08);
6452
+ transition: all 0.2s ease;
6453
+
6454
+ &:focus-within {
6455
+ background: rgba(255, 255, 255, 0.05);
6456
+ border-color: rgba(240, 185, 11, 0.3);
6457
+ }
6458
+
6459
+ svg {
6460
+ color: rgba(240, 185, 11, 0.5);
6461
+ margin-right: 10px;
6462
+ width: 16px;
6463
+ height: 16px;
6464
+ }
6465
+
6466
+ input {
6467
+ background: none;
6468
+ border: none;
6469
+ color: #ffffff;
6470
+ font-size: 14px;
6471
+ width: 100%;
6472
+ outline: none;
6473
+ height: 20px;
6474
+
6475
+ &::placeholder {
6476
+ color: rgba(255, 255, 255, 0.4);
6477
+ }
6478
+ }
6479
+ `;
6480
+ var MobileNavItem = at.div`
6481
+ display: flex;
6482
+ align-items: center;
6483
+ padding: 14px 20px;
6484
+ color: rgba(255, 255, 255, 0.85);
6485
+ font-size: 15px;
6486
+ cursor: pointer;
6487
+ border-bottom: 1px solid rgba(255, 255, 255, 0.03);
6488
+ font-weight: 400;
6489
+ transition: all 0.2s ease;
6490
+ letter-spacing: 0.2px;
6491
+
6492
+ &:hover {
6493
+ background: rgba(255, 255, 255, 0.05);
6494
+ color: #ffffff;
6495
+ padding-left: 24px;
6496
+ }
6497
+ `;
6498
+ var PropertySubheader = o.forwardRef(
6499
+ ({ className, tabs, activeTabId, onTabChange, actions, ...props }, ref) => {
6500
+ const tabsContainerRef = o.useRef(null);
6501
+ o.useEffect(() => {
6502
+ const container = tabsContainerRef.current;
6503
+ if (!container) return;
6504
+ const isMobile = window.innerWidth <= 768;
6505
+ if (!isMobile) return;
6506
+ const forceScrollbar = () => {
6507
+ if (container.scrollWidth > container.clientWidth) {
6508
+ container.scrollTop = 1;
6509
+ container.scrollTop = 0;
6510
+ container.scrollLeft = 1;
6511
+ container.scrollLeft = 0;
6512
+ }
6513
+ };
6514
+ setTimeout(forceScrollbar, 100);
6515
+ window.addEventListener("resize", forceScrollbar);
6516
+ return () => window.removeEventListener("resize", forceScrollbar);
6517
+ }, [tabs]);
6518
+ return /* @__PURE__ */ jsxs(
6519
+ "div",
6520
+ {
6521
+ ref,
6522
+ className: cn(
6523
+ "w-full font-normal",
6524
+ "flex flex-col-reverse gap-3",
6525
+ "md:flex-row md:items-center md:justify-between",
6526
+ className
6527
+ ),
6528
+ ...props,
6529
+ children: [
6530
+ /* @__PURE__ */ jsx(
6531
+ "div",
6532
+ {
6533
+ ref: tabsContainerRef,
6534
+ className: cn(
6535
+ "flex items-center border-b border-white/10",
6536
+ "overflow-x-auto md:overflow-visible",
6537
+ "[-webkit-overflow-scrolling:touch]",
6538
+ "[scroll-behavior:smooth]",
6539
+ "[touch-action:pan-x]",
6540
+ "md:border-b-0"
6541
+ ),
6542
+ style: { WebkitTapHighlightColor: "transparent" },
6543
+ children: /* @__PURE__ */ jsx("div", { className: "flex min-w-max", children: tabs.map((tab) => {
6544
+ const active = tab.id === activeTabId;
6545
+ return /* @__PURE__ */ jsxs(
6546
+ "button",
6547
+ {
6548
+ type: "button",
6549
+ onClick: () => onTabChange?.(tab.id),
6550
+ className: cn(
6551
+ "relative whitespace-nowrap",
6552
+ "px-6 py-4",
6553
+ "font-normal",
6554
+ "transition-colors",
6555
+ "max-[768px]:px-[1.2rem] max-[768px]:py-[0.8rem]",
6556
+ "max-[480px]:px-4 max-[480px]:py-[0.7rem] max-[480px]:text-[0.9rem]",
6557
+ active ? "font-semibold text-[var(--color-accent,#e6c87e)]" : "text-white/60 hover:text-white"
6558
+ ),
6559
+ style: {
6560
+ borderBottom: active ? "2px solid var(--color-accent, #e6c87e)" : "2px solid transparent",
6561
+ minWidth: "80px",
6562
+ touchAction: "manipulation"
6563
+ },
6564
+ children: [
6565
+ tab.label,
6566
+ tab.hasNotification ? /* @__PURE__ */ jsx(
6567
+ "span",
5580
6568
  {
5581
6569
  className: "absolute right-[10px] top-[10px] h-2 w-2 rounded-full animate-pulse",
5582
6570
  style: {
@@ -5632,6 +6620,737 @@ var PropertySubheader = o.forwardRef(
5632
6620
  }
5633
6621
  );
5634
6622
  PropertySubheader.displayName = "PropertySubheader";
6623
+ var DEFAULT_LOGO_SRC = "/loaf-logo.png";
6624
+ var DEFAULT_LOGO_ALT = "Loaf";
6625
+ var OTP_INPUT_LENGTH = 6;
6626
+ var LoginPopup = ({
6627
+ onClose,
6628
+ onOpenEarlyAccess,
6629
+ isAuthenticated,
6630
+ currentUser,
6631
+ onSendEmailCode,
6632
+ onVerifyEmailCode,
6633
+ onDemoLogin,
6634
+ logoSrc = DEFAULT_LOGO_SRC,
6635
+ logoAlt = DEFAULT_LOGO_ALT,
6636
+ autoCloseOnAuth = true
6637
+ }) => {
6638
+ const [view, setView] = useState("main");
6639
+ const [email, setEmail] = useState("");
6640
+ const [handle, setHandle] = useState("");
6641
+ const [otp, setOtp] = useState(Array(OTP_INPUT_LENGTH).fill(""));
6642
+ const [error, setError] = useState("");
6643
+ const [loading, setLoading] = useState(false);
6644
+ const [isSignUp, setIsSignUp] = useState(false);
6645
+ useEffect(() => {
6646
+ if (!autoCloseOnAuth) {
6647
+ return;
6648
+ }
6649
+ if (isAuthenticated || currentUser) {
6650
+ onClose();
6651
+ }
6652
+ }, [autoCloseOnAuth, currentUser, isAuthenticated, onClose]);
6653
+ const handleWalletLogin = () => {
6654
+ onClose();
6655
+ if (onOpenEarlyAccess) {
6656
+ onOpenEarlyAccess();
6657
+ }
6658
+ };
6659
+ const handleEmailClick = (signUp = false) => {
6660
+ setIsSignUp(signUp);
6661
+ setView("email");
6662
+ setError("");
6663
+ };
6664
+ const handleSendCode = async (event) => {
6665
+ event?.preventDefault();
6666
+ if (!email || !email.includes("@")) {
6667
+ setError("Please enter a valid email address");
6668
+ return;
6669
+ }
6670
+ if (isSignUp && !handle.trim()) {
6671
+ setError("Please claim a handle to continue");
6672
+ return;
6673
+ }
6674
+ setLoading(true);
6675
+ setError("");
6676
+ const normalizedHandle = isSignUp ? handle.trim() : void 0;
6677
+ try {
6678
+ const demoResult = await onDemoLogin?.(email, normalizedHandle ?? null);
6679
+ if (demoResult && demoResult.success) {
6680
+ setLoading(false);
6681
+ return;
6682
+ }
6683
+ } catch (err) {
6684
+ console.warn("Demo login failed, attempting email OTP", err);
6685
+ }
6686
+ if (!onSendEmailCode) {
6687
+ setError("Email authentication is not configured for this popup.");
6688
+ setLoading(false);
6689
+ return;
6690
+ }
6691
+ setView("otp");
6692
+ setOtp(Array(OTP_INPUT_LENGTH).fill(""));
6693
+ try {
6694
+ await onSendEmailCode({ email, isSignUp, handle: normalizedHandle ?? null });
6695
+ } catch (err) {
6696
+ setView("email");
6697
+ setError(err instanceof Error ? err.message : "Failed to send verification code");
6698
+ } finally {
6699
+ setLoading(false);
6700
+ }
6701
+ };
6702
+ const handleOTPChange = (index, value) => {
6703
+ const sanitizedValue = value.replace(/\D/g, "");
6704
+ if (sanitizedValue.length > 1) {
6705
+ const digits = sanitizedValue.slice(0, OTP_INPUT_LENGTH).split("");
6706
+ const newOtp2 = [...otp];
6707
+ digits.forEach((digit, i) => {
6708
+ if (index + i < OTP_INPUT_LENGTH) {
6709
+ newOtp2[index + i] = digit;
6710
+ }
6711
+ });
6712
+ setOtp(newOtp2);
6713
+ const nextIndex = Math.min(index + digits.length, OTP_INPUT_LENGTH - 1);
6714
+ document.getElementById(`otp-${nextIndex}`)?.focus();
6715
+ return;
6716
+ }
6717
+ const newOtp = [...otp];
6718
+ newOtp[index] = sanitizedValue;
6719
+ setOtp(newOtp);
6720
+ if (sanitizedValue && index < OTP_INPUT_LENGTH - 1) {
6721
+ document.getElementById(`otp-${index + 1}`)?.focus();
6722
+ }
6723
+ };
6724
+ const handleOTPKeyDown = (index, event) => {
6725
+ if (event.key === "Backspace" && !otp[index] && index > 0) {
6726
+ document.getElementById(`otp-${index - 1}`)?.focus();
6727
+ }
6728
+ };
6729
+ const handleVerifyCode = async (event) => {
6730
+ event.preventDefault();
6731
+ const code = otp.join("");
6732
+ if (code.length !== OTP_INPUT_LENGTH) {
6733
+ setError("Please enter the 6-digit code");
6734
+ return;
6735
+ }
6736
+ if (!onVerifyEmailCode) {
6737
+ setError("Verification handler missing. Cannot verify code.");
6738
+ return;
6739
+ }
6740
+ setLoading(true);
6741
+ setError("");
6742
+ try {
6743
+ await onVerifyEmailCode({ code, email });
6744
+ } catch (err) {
6745
+ setError(err instanceof Error ? err.message : "Invalid verification code");
6746
+ } finally {
6747
+ setLoading(false);
6748
+ }
6749
+ };
6750
+ const handleBack = () => {
6751
+ setView("main");
6752
+ setEmail("");
6753
+ setHandle("");
6754
+ setOtp(Array(OTP_INPUT_LENGTH).fill(""));
6755
+ setError("");
6756
+ };
6757
+ if (view === "main") {
6758
+ return /* @__PURE__ */ jsx(Overlay2, { onClick: onClose, children: /* @__PURE__ */ jsxs(PopupContainer, { onClick: (event) => event.stopPropagation(), children: [
6759
+ /* @__PURE__ */ jsx(CloseButton, { onClick: onClose, "aria-label": "Close login popup", children: /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }) }) }),
6760
+ /* @__PURE__ */ jsxs(Title, { children: [
6761
+ /* @__PURE__ */ jsx(LogoContainer3, { children: /* @__PURE__ */ jsx(LogoImage, { src: logoSrc, alt: logoAlt }) }),
6762
+ "Welcome to Loaf"
6763
+ ] }),
6764
+ /* @__PURE__ */ jsxs(ButtonsContainer, { children: [
6765
+ /* @__PURE__ */ jsxs(LoginButton, { onClick: () => handleEmailClick(false), children: [
6766
+ /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z" }) }),
6767
+ "Sign in with Email"
6768
+ ] }),
6769
+ /* @__PURE__ */ jsx("div", { style: { textAlign: "center", color: "var(--color-text-secondary, #848e9c)", fontSize: "0.875rem" }, children: "or" }),
6770
+ /* @__PURE__ */ jsxs(LoginButton, { onClick: handleWalletLogin, children: [
6771
+ /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M21 18v1c0 1.1-.9 2-2 2H5c-1.11 0-2-.9-2-2V5c0-1.1.89-2 2-2h14c1.1 0 2 .9 2 2v1h-9c-1.11 0-2 .9-2 2v8c0 1.1.89 2 2 2h9zm-9-2h10V8H12v8zm4-2.5c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5z" }) }),
6772
+ "Sign in with Wallet"
6773
+ ] })
6774
+ ] }),
6775
+ /* @__PURE__ */ jsx("div", { style: { textAlign: "center", marginTop: "0.5rem", marginBottom: "1rem" }, children: /* @__PURE__ */ jsx(
6776
+ "span",
6777
+ {
6778
+ onClick: () => handleEmailClick(true),
6779
+ style: {
6780
+ color: "var(--color-text-secondary, #848e9c)",
6781
+ fontSize: "0.8rem",
6782
+ cursor: "pointer",
6783
+ textDecoration: "underline"
6784
+ },
6785
+ children: "Sign Up"
6786
+ }
6787
+ ) }),
6788
+ /* @__PURE__ */ jsx(Divider, {}),
6789
+ /* @__PURE__ */ jsxs(AnnotationContainer, { children: [
6790
+ /* @__PURE__ */ jsxs(Annotation, { children: [
6791
+ /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M21 18v1c0 1.1-.9 2-2 2H5c-1.11 0-2-.9-2-2V5c0-1.1.89-2 2-2h14c1.1 0 2 .9 2 2v1h-9c-1.11 0-2 .9-2 2v8c0 1.1.89 2 2 2h9zm-9-2h10V8H12v8zm4-2.5c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5z" }) }),
6792
+ /* @__PURE__ */ jsxs(AnnotationText, { children: [
6793
+ /* @__PURE__ */ jsx(AnnotationLabel, { children: "\u2190 Digital Asset users" }),
6794
+ "Connect your Web3 wallet to access your assets"
6795
+ ] })
6796
+ ] }),
6797
+ /* @__PURE__ */ jsxs(Annotation, { children: [
6798
+ /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z" }) }),
6799
+ /* @__PURE__ */ jsxs(AnnotationText, { children: [
6800
+ /* @__PURE__ */ jsx(AnnotationLabel, { children: "\u2190 Traditional Finance users" }),
6801
+ "Sign in with email, no web3 experience needed"
6802
+ ] })
6803
+ ] }),
6804
+ /* @__PURE__ */ jsxs(Annotation, { children: [
6805
+ /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z" }) }),
6806
+ /* @__PURE__ */ jsxs(AnnotationText, { children: [
6807
+ /* @__PURE__ */ jsx(AnnotationLabel, { children: "\u2190 Self-custodied" }),
6808
+ "We never have ownership of your assets. All units are self-custodied"
6809
+ ] })
6810
+ ] })
6811
+ ] })
6812
+ ] }) });
6813
+ }
6814
+ if (view === "email") {
6815
+ return /* @__PURE__ */ jsx(Overlay2, { onClick: onClose, children: /* @__PURE__ */ jsxs(PopupContainer, { onClick: (event) => event.stopPropagation(), children: [
6816
+ /* @__PURE__ */ jsx(CloseButton, { onClick: onClose, "aria-label": "Close login popup", children: /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }) }) }),
6817
+ /* @__PURE__ */ jsxs(BackButton, { onClick: handleBack, children: [
6818
+ /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" }) }),
6819
+ "Back"
6820
+ ] }),
6821
+ /* @__PURE__ */ jsxs(Title, { children: [
6822
+ /* @__PURE__ */ jsx(LogoContainer3, { children: /* @__PURE__ */ jsx(LogoImage, { src: logoSrc, alt: logoAlt }) }),
6823
+ isSignUp ? "Sign up with Email" : "Sign in with Email"
6824
+ ] }),
6825
+ /* @__PURE__ */ jsx("form", { onSubmit: handleSendCode, children: /* @__PURE__ */ jsxs(EmailFormContainer, { children: [
6826
+ /* @__PURE__ */ jsx(
6827
+ EmailInput,
6828
+ {
6829
+ type: "email",
6830
+ placeholder: "Enter your email address",
6831
+ value: email,
6832
+ onChange: (event) => setEmail(event.target.value),
6833
+ autoFocus: true
6834
+ }
6835
+ ),
6836
+ isSignUp && /* @__PURE__ */ jsx(
6837
+ EmailInput,
6838
+ {
6839
+ type: "text",
6840
+ placeholder: "Claim your handle (e.g. Landlord)",
6841
+ value: handle,
6842
+ onChange: (event) => setHandle(event.target.value),
6843
+ style: { marginTop: "0.5rem" }
6844
+ }
6845
+ ),
6846
+ /* @__PURE__ */ jsx(SubmitButton, { type: "submit", disabled: loading || !email || isSignUp && !handle, children: loading ? "Sending..." : "Continue" }),
6847
+ error && /* @__PURE__ */ jsx(StatusMessage, { $error: true, children: error })
6848
+ ] }) }),
6849
+ /* @__PURE__ */ jsx(InfoText, { children: "We'll send you a verification code to sign in securely." }),
6850
+ isSignUp && /* @__PURE__ */ jsx(MiniLiveFeed, {})
6851
+ ] }) });
6852
+ }
6853
+ if (view === "otp") {
6854
+ return /* @__PURE__ */ jsx(Overlay2, { onClick: onClose, children: /* @__PURE__ */ jsxs(PopupContainer, { onClick: (event) => event.stopPropagation(), children: [
6855
+ /* @__PURE__ */ jsx(CloseButton, { onClick: onClose, "aria-label": "Close login popup", children: /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }) }) }),
6856
+ /* @__PURE__ */ jsxs(BackButton, { onClick: () => setView("email"), children: [
6857
+ /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" }) }),
6858
+ "Back"
6859
+ ] }),
6860
+ /* @__PURE__ */ jsxs(Title, { children: [
6861
+ /* @__PURE__ */ jsx(LogoContainer3, { children: /* @__PURE__ */ jsx(LogoImage, { src: logoSrc, alt: logoAlt }) }),
6862
+ "Enter Verification Code"
6863
+ ] }),
6864
+ /* @__PURE__ */ jsxs(InfoText, { style: { marginBottom: "1.5rem" }, children: [
6865
+ "We sent a code to ",
6866
+ /* @__PURE__ */ jsx("strong", { style: { color: "#eaecef" }, children: email })
6867
+ ] }),
6868
+ /* @__PURE__ */ jsx("form", { onSubmit: handleVerifyCode, children: /* @__PURE__ */ jsxs(EmailFormContainer, { children: [
6869
+ /* @__PURE__ */ jsx(OTPContainer, { children: otp.map((digit, index) => /* @__PURE__ */ jsx(
6870
+ OTPInput,
6871
+ {
6872
+ id: `otp-${index}`,
6873
+ type: "text",
6874
+ inputMode: "numeric",
6875
+ maxLength: 1,
6876
+ value: digit,
6877
+ onChange: (event) => handleOTPChange(index, event.target.value),
6878
+ onKeyDown: (event) => handleOTPKeyDown(index, event),
6879
+ autoFocus: index === 0
6880
+ },
6881
+ index
6882
+ )) }),
6883
+ /* @__PURE__ */ jsx(SubmitButton, { type: "submit", disabled: loading || otp.join("").length !== OTP_INPUT_LENGTH, children: loading ? "Verifying..." : "Verify" }),
6884
+ error && /* @__PURE__ */ jsx(StatusMessage, { $error: true, children: error })
6885
+ ] }) }),
6886
+ /* @__PURE__ */ jsxs(InfoText, { children: [
6887
+ "Didn't receive a code?",
6888
+ " ",
6889
+ /* @__PURE__ */ jsx(
6890
+ "button",
6891
+ {
6892
+ type: "button",
6893
+ onClick: (event) => {
6894
+ event.preventDefault();
6895
+ void handleSendCode(event);
6896
+ },
6897
+ style: {
6898
+ background: "none",
6899
+ border: "none",
6900
+ color: "#f0b90b",
6901
+ cursor: "pointer",
6902
+ textDecoration: "underline"
6903
+ },
6904
+ children: "Resend"
6905
+ }
6906
+ )
6907
+ ] })
6908
+ ] }) });
6909
+ }
6910
+ return null;
6911
+ };
6912
+ var Overlay2 = at.div`
6913
+ position: fixed;
6914
+ top: 0;
6915
+ left: 0;
6916
+ right: 0;
6917
+ bottom: 0;
6918
+ background-color: rgba(0, 0, 0, 0.8);
6919
+ backdrop-filter: blur(4px);
6920
+ display: flex;
6921
+ justify-content: center;
6922
+ align-items: center;
6923
+ z-index: 10000;
6924
+ animation: fadeIn 0.2s ease-in-out;
6925
+
6926
+ @keyframes fadeIn {
6927
+ from {
6928
+ opacity: 0;
6929
+ }
6930
+ to {
6931
+ opacity: 1;
6932
+ }
6933
+ }
6934
+ `;
6935
+ var PopupContainer = at.div`
6936
+ background-color: var(--color-background, #0a0a0a);
6937
+ border: 1px solid rgba(230, 198, 86, 0.3);
6938
+ border-radius: var(--border-radius, 12px);
6939
+ padding: 2.5rem;
6940
+ max-width: 440px;
6941
+ width: 90%;
6942
+ position: relative;
6943
+ animation: slideUp 0.3s ease-out;
6944
+ box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
6945
+
6946
+ @keyframes slideUp {
6947
+ from {
6948
+ transform: translateY(20px);
6949
+ opacity: 0;
6950
+ }
6951
+ to {
6952
+ transform: translateY(0);
6953
+ opacity: 1;
6954
+ }
6955
+ }
6956
+
6957
+ @media (max-width: 768px) {
6958
+ padding: 2rem;
6959
+ max-width: 90%;
6960
+ }
6961
+ `;
6962
+ var CloseButton = at.button`
6963
+ position: absolute;
6964
+ top: 1rem;
6965
+ right: 1rem;
6966
+ background: none;
6967
+ border: none;
6968
+ color: var(--color-text-secondary, #848e9c);
6969
+ font-size: 1.5rem;
6970
+ cursor: pointer;
6971
+ padding: 0.5rem;
6972
+ display: flex;
6973
+ align-items: center;
6974
+ justify-content: center;
6975
+ transition: color 0.2s ease;
6976
+
6977
+ &:hover {
6978
+ color: var(--color-accent, #e6c656);
6979
+ }
6980
+ `;
6981
+ var Title = at.h2`
6982
+ font-size: 1.75rem;
6983
+ font-weight: 600;
6984
+ color: var(--color-text, #eaecef);
6985
+ margin-bottom: 2rem;
6986
+ text-align: center;
6987
+ display: flex;
6988
+ flex-direction: column;
6989
+ align-items: center;
6990
+ justify-content: center;
6991
+ gap: 1rem;
6992
+ `;
6993
+ var LogoContainer3 = at.div`
6994
+ display: flex;
6995
+ justify-content: center;
6996
+ margin-bottom: 0.5rem;
6997
+ `;
6998
+ var LogoImage = at.img`
6999
+ height: 60px;
7000
+ `;
7001
+ var ButtonsContainer = at.div`
7002
+ display: flex;
7003
+ flex-direction: column;
7004
+ gap: 1rem;
7005
+ margin-bottom: 1.5rem;
7006
+ `;
7007
+ var LoginButton = at.button`
7008
+ display: flex;
7009
+ align-items: center;
7010
+ justify-content: center;
7011
+ gap: 0.75rem;
7012
+ padding: 1rem 1.5rem;
7013
+ background-color: var(--color-background-light, #1a1a1a);
7014
+ border: 1px solid rgba(230, 198, 86, 0.2);
7015
+ border-radius: var(--border-radius, 8px);
7016
+ color: var(--color-text, #eaecef);
7017
+ font-size: 1rem;
7018
+ font-weight: 500;
7019
+ cursor: pointer;
7020
+ transition: all 0.2s ease;
7021
+
7022
+ &:hover {
7023
+ background-color: rgba(230, 198, 86, 0.1);
7024
+ border-color: var(--color-accent, #e6c656);
7025
+ }
7026
+
7027
+ svg {
7028
+ width: 20px;
7029
+ height: 20px;
7030
+ color: var(--color-accent, #e6c656);
7031
+ }
7032
+ `;
7033
+ var Divider = at.div`
7034
+ display: flex;
7035
+ align-items: center;
7036
+ margin: 1.5rem 0;
7037
+
7038
+ &::before,
7039
+ &::after {
7040
+ content: "";
7041
+ flex: 1;
7042
+ height: 1px;
7043
+ background-color: rgba(230, 198, 86, 0.2);
7044
+ }
7045
+ `;
7046
+ var InfoText = at.p`
7047
+ color: var(--color-text-secondary, #848e9c);
7048
+ font-size: 0.875rem;
7049
+ text-align: center;
7050
+ line-height: 1.5;
7051
+ `;
7052
+ var AnnotationContainer = at.div`
7053
+ display: flex;
7054
+ flex-direction: column;
7055
+ gap: 0.75rem;
7056
+ margin-top: 1.5rem;
7057
+ padding-top: 1.5rem;
7058
+ border-top: 1px solid rgba(230, 198, 86, 0.2);
7059
+ `;
7060
+ var Annotation = at.div`
7061
+ display: flex;
7062
+ align-items: flex-start;
7063
+ gap: 1rem;
7064
+ color: var(--color-text-secondary, #848e9c);
7065
+ font-size: 0.8rem;
7066
+
7067
+ svg {
7068
+ width: 16px;
7069
+ height: 16px;
7070
+ flex-shrink: 0;
7071
+ margin-top: 2px;
7072
+ color: var(--color-accent, #e6c656);
7073
+ }
7074
+ `;
7075
+ var AnnotationText = at.span`
7076
+ flex: 1;
7077
+ line-height: 1.4;
7078
+ `;
7079
+ var AnnotationLabel = at.span`
7080
+ color: var(--color-text, #eaecef);
7081
+ font-weight: 500;
7082
+ margin-right: 0.25rem;
7083
+ `;
7084
+ var EmailFormContainer = at.div`
7085
+ display: flex;
7086
+ flex-direction: column;
7087
+ gap: 1rem;
7088
+ margin-bottom: 1.5rem;
7089
+ `;
7090
+ var EmailInput = at.input`
7091
+ width: 100%;
7092
+ padding: 1rem 1.25rem;
7093
+ background-color: var(--color-background-light, #1a1a1a);
7094
+ border: 1px solid rgba(230, 198, 86, 0.2);
7095
+ border-radius: var(--border-radius, 8px);
7096
+ color: var(--color-text, #eaecef);
7097
+ font-size: 1rem;
7098
+ transition: all 0.2s ease;
7099
+
7100
+ &:focus {
7101
+ outline: none;
7102
+ border-color: var(--color-accent, #e6c656);
7103
+ }
7104
+
7105
+ &::placeholder {
7106
+ color: var(--color-text-secondary, #848e9c);
7107
+ }
7108
+ `;
7109
+ var OTPContainer = at.div`
7110
+ display: flex;
7111
+ gap: 0.5rem;
7112
+ justify-content: center;
7113
+ `;
7114
+ var OTPInput = at.input`
7115
+ width: 48px;
7116
+ height: 56px;
7117
+ text-align: center;
7118
+ font-size: 1.5rem;
7119
+ font-weight: 600;
7120
+ background-color: var(--color-background-light, #1a1a1a);
7121
+ border: 1px solid rgba(230, 198, 86, 0.2);
7122
+ border-radius: var(--border-radius, 8px);
7123
+ color: var(--color-accent, #e6c656);
7124
+ transition: all 0.2s ease;
7125
+
7126
+ &:focus {
7127
+ outline: none;
7128
+ border-color: var(--color-accent, #e6c656);
7129
+ box-shadow: 0 0 0 2px rgba(230, 198, 86, 0.2);
7130
+ }
7131
+ `;
7132
+ var SubmitButton = at.button`
7133
+ width: 100%;
7134
+ padding: 1rem;
7135
+ background-color: var(--color-accent, #e6c656);
7136
+ border: none;
7137
+ border-radius: var(--border-radius, 8px);
7138
+ color: var(--color-background, #0a0a0a);
7139
+ font-size: 1rem;
7140
+ font-weight: 600;
7141
+ cursor: pointer;
7142
+ transition: all 0.2s ease;
7143
+
7144
+ &:hover:not(:disabled) {
7145
+ background-color: var(--color-accent-hover, #d4a50a);
7146
+ transform: translateY(-1px);
7147
+ }
7148
+
7149
+ &:disabled {
7150
+ background-color: var(--color-background-light, #1a1a1a);
7151
+ color: var(--color-text-secondary, #848e9c);
7152
+ cursor: not-allowed;
7153
+ }
7154
+ `;
7155
+ var BackButton = at.button`
7156
+ background: none;
7157
+ border: none;
7158
+ color: var(--color-text-secondary, #848e9c);
7159
+ font-size: 0.875rem;
7160
+ cursor: pointer;
7161
+ display: flex;
7162
+ align-items: center;
7163
+ gap: 0.5rem;
7164
+ margin-bottom: 1rem;
7165
+
7166
+ &:hover {
7167
+ color: var(--color-accent, #e6c656);
7168
+ }
7169
+ `;
7170
+ var StatusMessage = at.p`
7171
+ color: ${(props) => props.$error ? "#f6465d" : "#0ecb81"};
7172
+ font-size: 0.875rem;
7173
+ text-align: center;
7174
+ margin-top: 0.5rem;
7175
+ `;
7176
+ var MiniLiveFeed = () => {
7177
+ const [purchases, setPurchases] = useState([]);
7178
+ useEffect(() => {
7179
+ const handles = [
7180
+ "Landlord",
7181
+ "PropertyKing",
7182
+ "RealEstateGuru",
7183
+ "InvestorPro",
7184
+ "WealthBuilder",
7185
+ "AssetHunter",
7186
+ "PortfolioMax",
7187
+ "CapitalGains",
7188
+ "DividendKing",
7189
+ "YieldSeeker",
7190
+ "BrickNMortar",
7191
+ "EquityBoss",
7192
+ "CashFlowKing",
7193
+ "PropMogul",
7194
+ "RentCollector",
7195
+ "LandBaron",
7196
+ "EstateBuilder",
7197
+ "ValueInvestor",
7198
+ "GrowthSeeker",
7199
+ "PassiveIncome",
7200
+ "WealthyOwl",
7201
+ "SmartMoney",
7202
+ "AlphaInvestor",
7203
+ "DiamondHands",
7204
+ "GoldenGoose",
7205
+ "EliteHolder",
7206
+ "TopTierInvestor",
7207
+ "PlatinumPro",
7208
+ "AussieInvestor",
7209
+ "HarbourHero",
7210
+ "James W.",
7211
+ "Sarah M.",
7212
+ "Michael T.",
7213
+ "Emma L.",
7214
+ "David K.",
7215
+ "Sophie R.",
7216
+ "Chris B.",
7217
+ "Jessica H.",
7218
+ "Andrew P.",
7219
+ "Rachel S.",
7220
+ "Daniel C.",
7221
+ "Olivia N."
7222
+ ];
7223
+ const generatePurchase = () => {
7224
+ const tokenPrice = 250;
7225
+ const tokenCount = Math.floor(Math.random() * 150) + 10;
7226
+ const amount = tokenPrice * tokenCount;
7227
+ const randomHandle = handles[Math.floor(Math.random() * handles.length)];
7228
+ return {
7229
+ id: `p-${Date.now()}-${Math.random()}`,
7230
+ name: randomHandle,
7231
+ amount,
7232
+ timestamp: (/* @__PURE__ */ new Date()).toISOString()
7233
+ };
7234
+ };
7235
+ const initial = Array.from({ length: 5 }, generatePurchase);
7236
+ setPurchases(initial);
7237
+ const interval = setInterval(() => {
7238
+ setPurchases((prev2) => [generatePurchase(), ...prev2.slice(0, 5)]);
7239
+ }, 2e3 + Math.random() * 2e3);
7240
+ return () => clearInterval(interval);
7241
+ }, []);
7242
+ const formatCurrency3 = (amount) => `$${amount.toLocaleString()}`;
7243
+ return /* @__PURE__ */ jsxs(
7244
+ "div",
7245
+ {
7246
+ style: {
7247
+ marginTop: "1rem",
7248
+ maxHeight: "180px",
7249
+ overflow: "hidden",
7250
+ borderRadius: "8px",
7251
+ background: "rgba(0, 0, 0, 0.3)"
7252
+ },
7253
+ children: [
7254
+ /* @__PURE__ */ jsxs(
7255
+ "div",
7256
+ {
7257
+ style: {
7258
+ fontSize: "0.7rem",
7259
+ color: "var(--color-text-secondary, #848e9c)",
7260
+ padding: "0.5rem 0.75rem",
7261
+ borderBottom: "1px solid rgba(255, 255, 255, 0.05)",
7262
+ display: "flex",
7263
+ alignItems: "center",
7264
+ gap: "0.4rem"
7265
+ },
7266
+ children: [
7267
+ /* @__PURE__ */ jsx(
7268
+ "span",
7269
+ {
7270
+ style: {
7271
+ width: "6px",
7272
+ height: "6px",
7273
+ borderRadius: "50%",
7274
+ background: "#0ecb81",
7275
+ animation: "pulse 1.5s infinite"
7276
+ }
7277
+ }
7278
+ ),
7279
+ "Handles will Appear:"
7280
+ ]
7281
+ }
7282
+ ),
7283
+ purchases.map((purchase, index) => {
7284
+ const maxAmount = 4e4;
7285
+ const barPercent = Math.min(80, Math.max(15, purchase.amount / maxAmount * 100));
7286
+ return /* @__PURE__ */ jsxs(
7287
+ "div",
7288
+ {
7289
+ style: {
7290
+ padding: "0.4rem 0.75rem",
7291
+ display: "flex",
7292
+ justifyContent: "space-between",
7293
+ alignItems: "center",
7294
+ borderBottom: "1px solid rgba(255, 255, 255, 0.03)",
7295
+ position: "relative",
7296
+ animation: index === 0 ? "slideIn 0.3s ease-out" : "none"
7297
+ },
7298
+ children: [
7299
+ /* @__PURE__ */ jsx(
7300
+ "div",
7301
+ {
7302
+ style: {
7303
+ position: "absolute",
7304
+ top: 0,
7305
+ right: 0,
7306
+ bottom: 0,
7307
+ width: `${barPercent}%`,
7308
+ background: "linear-gradient(90deg, transparent 0%, rgba(14, 203, 129, 0.12) 100%)",
7309
+ pointerEvents: "none"
7310
+ }
7311
+ }
7312
+ ),
7313
+ /* @__PURE__ */ jsx(
7314
+ "div",
7315
+ {
7316
+ style: {
7317
+ position: "absolute",
7318
+ left: 0,
7319
+ top: 0,
7320
+ bottom: 0,
7321
+ width: "2px",
7322
+ background: index === 0 ? "rgba(14, 203, 129, 0.5)" : "transparent"
7323
+ }
7324
+ }
7325
+ ),
7326
+ /* @__PURE__ */ jsxs("div", { style: { position: "relative", zIndex: 1 }, children: [
7327
+ /* @__PURE__ */ jsx("div", { style: { fontSize: "0.8rem", fontWeight: 500, color: "#fff" }, children: purchase.name }),
7328
+ /* @__PURE__ */ jsx("div", { style: { fontSize: "0.65rem", color: "var(--color-text-secondary, #848e9c)" }, children: "less than a minute ago" })
7329
+ ] }),
7330
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "0.5rem", position: "relative", zIndex: 1 }, children: [
7331
+ /* @__PURE__ */ jsx("span", { style: { fontSize: "0.75rem", color: "var(--color-text-secondary, #848e9c)" }, children: "bought" }),
7332
+ /* @__PURE__ */ jsx("span", { style: { fontSize: "0.8rem", fontWeight: 600, color: "#fff" }, children: formatCurrency3(purchase.amount) })
7333
+ ] })
7334
+ ]
7335
+ },
7336
+ purchase.id
7337
+ );
7338
+ }),
7339
+ /* @__PURE__ */ jsx("style", { children: `
7340
+ @keyframes slideIn {
7341
+ from { opacity: 0; transform: translateY(-10px); }
7342
+ to { opacity: 1; transform: translateY(0); }
7343
+ }
7344
+ @keyframes pulse {
7345
+ 0%, 100% { opacity: 1; }
7346
+ 50% { opacity: 0.5; }
7347
+ }
7348
+ ` })
7349
+ ]
7350
+ }
7351
+ );
7352
+ };
7353
+ LoginPopup.displayName = "LoginPopup";
5635
7354
  var PropertyCompareBar = o.forwardRef(
5636
7355
  ({
5637
7356
  className,
@@ -6020,6 +7739,6 @@ var PriceChange = at.span`
6020
7739
  color: ${(props) => props.$isPositive == null ? "var(--color-text-secondary, rgba(255, 255, 255, 0.6))" : props.$isPositive ? "var(--color-positive, #0ecb81)" : "var(--color-negative, #f6465d)"};
6021
7740
  `;
6022
7741
 
6023
- export { Badge, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, HousePositionSlider, HousePositionSliderMobile, LoafLiquidityBadge, MobileTradeNav, Orderbook, PortfolioSummary, PriceChart, PropertyCompareBar, PropertyHeroHeader, PropertyNewsUpdates, PropertySubheader, PropertyTour, TradeConfirmationModal, TradingSlider, YourOrders, badgeVariants, buttonVariants };
7742
+ export { Badge, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Header, HousePositionSlider, HousePositionSliderMobile, LoafLiquidityBadge, LoafLiquidityLogo, LoginPopup, MobileTradeNav, Orderbook, PortfolioSummary, PriceChart, PropertyCompareBar, PropertyHeroHeader, PropertyNewsUpdates, PropertySubheader, PropertyTour, TradeConfirmationModal, TradingSlider, YourOrders, badgeVariants, buttonVariants };
6024
7743
  //# sourceMappingURL=index.mjs.map
6025
7744
  //# sourceMappingURL=index.mjs.map