@loafmarkets/ui 0.1.383 → 0.1.385

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
@@ -5042,6 +5042,8 @@ var DEFAULT_ABOUT_PATH = "/about";
5042
5042
  var DEFAULT_LEARN_PATH = "/learn";
5043
5043
  var DEFAULT_API_PATH = "/api";
5044
5044
  var DEFAULT_PROPERTY_MAP_PATH = "/map";
5045
+ var DEFAULT_LEADERBOARD_PATH = "/league";
5046
+ var DEFAULT_LEADERBOARD_PAGE_PATH = "/leaderboard";
5045
5047
  var DEFAULT_PORTFOLIO_PATH = "/portfolio";
5046
5048
  var DEFAULT_LOAF_LIQUIDITY_PATH = "/loaf-liquidity";
5047
5049
  var DEFAULT_AUTH_RETURN_PARAM = "returnTo";
@@ -5062,6 +5064,8 @@ var Header = ({
5062
5064
  apiPath = DEFAULT_API_PATH,
5063
5065
  offeringsPath,
5064
5066
  propertyMapPath = DEFAULT_PROPERTY_MAP_PATH,
5067
+ leaderboardPath = DEFAULT_LEADERBOARD_PATH,
5068
+ leaderboardPagePath = DEFAULT_LEADERBOARD_PAGE_PATH,
5065
5069
  portfolioPath = DEFAULT_PORTFOLIO_PATH,
5066
5070
  loafLiquidityPath = DEFAULT_LOAF_LIQUIDITY_PATH,
5067
5071
  authLoginUrl,
@@ -5335,6 +5339,8 @@ var Header = ({
5335
5339
  const resolvedOfferingsPath = offeringsPath ?? void 0;
5336
5340
  const offeringsHref = resolvedOfferingsPath ?? resolvedHomePath;
5337
5341
  const resolvedPropertyMapPath = propertyMapPath ?? DEFAULT_PROPERTY_MAP_PATH;
5342
+ const resolvedLeaderboardPath = leaderboardPath ?? DEFAULT_LEADERBOARD_PATH;
5343
+ const resolvedLeaderboardPagePath = leaderboardPagePath ?? DEFAULT_LEADERBOARD_PAGE_PATH;
5338
5344
  const resolvedPortfolioPath = portfolioPath ?? DEFAULT_PORTFOLIO_PATH;
5339
5345
  const resolvedLoafLiquidityPath = loafLiquidityPath ?? DEFAULT_LOAF_LIQUIDITY_PATH;
5340
5346
  const inferredActiveTab = (() => {
@@ -5345,6 +5351,8 @@ var Header = ({
5345
5351
  if (locationPath === resolvedApiPath) return "api";
5346
5352
  if (resolvedOfferingsPath && locationPath.startsWith(resolvedOfferingsPath)) return "offerings";
5347
5353
  if (locationPath === resolvedPropertyMapPath) return "propertyMap";
5354
+ if (locationPath === resolvedLeaderboardPagePath) return "leaderboardPage";
5355
+ if (locationPath === resolvedLeaderboardPath) return "leaderboard";
5348
5356
  if (locationPath === resolvedPortfolioPath) return "portfolio";
5349
5357
  return null;
5350
5358
  })();
@@ -5353,6 +5361,8 @@ var Header = ({
5353
5361
  const homeActive = resolvedActiveTab === "home";
5354
5362
  const offeringsActive = resolvedActiveTab === "offerings";
5355
5363
  const propertyMapActive = resolvedActiveTab === "propertyMap";
5364
+ const leaderboardActive = resolvedActiveTab === "leaderboard";
5365
+ const leaderboardPageActive = resolvedActiveTab === "leaderboardPage";
5356
5366
  const aboutActive = resolvedActiveTab === "about";
5357
5367
  const portfolioActive = resolvedActiveTab === "portfolio";
5358
5368
  const learnActive = resolvedActiveTab === "learn";
@@ -5436,48 +5446,91 @@ var Header = ({
5436
5446
  /* @__PURE__ */ jsx(
5437
5447
  NavLink,
5438
5448
  {
5439
- href: resolvedLearnPath,
5440
- className: learnActive ? "active" : "",
5449
+ href: resolvedLeaderboardPath,
5450
+ className: leaderboardActive ? "active" : "",
5441
5451
  onClick: (event) => {
5442
5452
  event.preventDefault();
5443
- handleNavigation(resolvedLearnPath);
5453
+ handleNavigation(resolvedLeaderboardPath);
5444
5454
  },
5445
- children: "Learn"
5455
+ children: "Competition"
5446
5456
  }
5447
5457
  ),
5448
5458
  /* @__PURE__ */ jsx(
5449
5459
  NavLink,
5450
5460
  {
5451
- href: resolvedAboutPath,
5452
- className: aboutActive ? "active" : "",
5461
+ href: resolvedLeaderboardPagePath,
5462
+ className: leaderboardPageActive ? "active" : "",
5453
5463
  onClick: (event) => {
5454
5464
  event.preventDefault();
5455
- handleNavigation(resolvedAboutPath);
5465
+ handleNavigation(resolvedLeaderboardPagePath);
5456
5466
  },
5457
- children: "About"
5467
+ children: "Leaderboard"
5458
5468
  }
5459
5469
  ),
5460
5470
  /* @__PURE__ */ jsx(
5461
5471
  NavLink,
5462
5472
  {
5463
- href: resolvedApiPath,
5464
- className: apiActive ? "active" : "",
5473
+ href: resolvedLearnPath,
5474
+ className: learnActive ? "active" : "",
5465
5475
  onClick: (event) => {
5466
5476
  event.preventDefault();
5467
- handleNavigation(resolvedApiPath);
5477
+ handleNavigation(resolvedLearnPath);
5468
5478
  },
5469
- children: "API"
5470
- }
5471
- ),
5472
- /* @__PURE__ */ jsx(
5473
- NavLink,
5474
- {
5475
- href: "https://docs.loafmarkets.com/en/",
5476
- target: "_blank",
5477
- rel: "noopener noreferrer",
5478
- children: "Docs"
5479
+ children: "Learn"
5479
5480
  }
5480
5481
  ),
5482
+ /* @__PURE__ */ jsxs(MoreMenu, { className: "more-menu", children: [
5483
+ /* @__PURE__ */ jsxs(
5484
+ MoreTrigger,
5485
+ {
5486
+ type: "button",
5487
+ className: `${isMoreMenuOpen ? "open" : ""} ${aboutActive || apiActive ? "active" : ""}`,
5488
+ "aria-haspopup": "true",
5489
+ "aria-expanded": isMoreMenuOpen,
5490
+ onClick: () => setIsMoreMenuOpen((open) => !open),
5491
+ children: [
5492
+ "More",
5493
+ /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { d: "M6 9l6 6 6-6", strokeLinecap: "round", strokeLinejoin: "round" }) })
5494
+ ]
5495
+ }
5496
+ ),
5497
+ isMoreMenuOpen && /* @__PURE__ */ jsxs(MoreDropdown, { children: [
5498
+ /* @__PURE__ */ jsx(
5499
+ MoreItem,
5500
+ {
5501
+ href: resolvedAboutPath,
5502
+ className: aboutActive ? "active" : "",
5503
+ onClick: (event) => {
5504
+ event.preventDefault();
5505
+ handleNavigation(resolvedAboutPath);
5506
+ },
5507
+ children: "About"
5508
+ }
5509
+ ),
5510
+ /* @__PURE__ */ jsx(
5511
+ MoreItem,
5512
+ {
5513
+ href: resolvedApiPath,
5514
+ className: apiActive ? "active" : "",
5515
+ onClick: (event) => {
5516
+ event.preventDefault();
5517
+ handleNavigation(resolvedApiPath);
5518
+ },
5519
+ children: "API"
5520
+ }
5521
+ ),
5522
+ /* @__PURE__ */ jsx(
5523
+ MoreItem,
5524
+ {
5525
+ href: "https://docs.loafmarkets.com/en/",
5526
+ target: "_blank",
5527
+ rel: "noopener noreferrer",
5528
+ onClick: () => setIsMoreMenuOpen(false),
5529
+ children: "Docs"
5530
+ }
5531
+ )
5532
+ ] })
5533
+ ] }),
5481
5534
  /* @__PURE__ */ jsx("div", { style: { marginLeft: "auto", display: "flex", alignItems: "center" }, children: /* @__PURE__ */ jsx(
5482
5535
  "div",
5483
5536
  {
@@ -5518,6 +5571,8 @@ var Header = ({
5518
5571
  ),
5519
5572
  /* @__PURE__ */ jsx(MobileNavItem, { onClick: () => handleNavigation(offeringsHref), children: "Initial Offerings" }),
5520
5573
  /* @__PURE__ */ jsx(MobileNavItem, { onClick: () => handleNavigation(resolvedPropertyMapPath), children: "Property Map" }),
5574
+ /* @__PURE__ */ jsx(MobileNavItem, { onClick: () => handleNavigation(resolvedLeaderboardPath), children: "Competition" }),
5575
+ /* @__PURE__ */ jsx(MobileNavItem, { onClick: () => handleNavigation(resolvedLeaderboardPagePath), children: "Leaderboard" }),
5521
5576
  /* @__PURE__ */ jsx(MobileNavItem, { onClick: () => handleNavigation(resolvedLearnPath), children: "Learn" }),
5522
5577
  /* @__PURE__ */ jsx(MobileNavItem, { onClick: () => handleNavigation(resolvedAboutPath), children: "About" }),
5523
5578
  /* @__PURE__ */ jsx(MobileNavItem, { onClick: () => handleNavigation(resolvedApiPath), children: "API" }),
@@ -6035,6 +6090,77 @@ var NavLink = styled10.a`
6035
6090
  }
6036
6091
  }
6037
6092
  `;
6093
+ var MoreMenu = styled10.div`
6094
+ position: relative;
6095
+ display: flex;
6096
+ align-items: center;
6097
+ height: 56px;
6098
+ `;
6099
+ var MoreTrigger = styled10.button`
6100
+ margin: 0 12px;
6101
+ padding: 0 4px;
6102
+ height: 56px;
6103
+ display: inline-flex;
6104
+ align-items: center;
6105
+ gap: 4px;
6106
+ background: none;
6107
+ border: none;
6108
+ cursor: pointer;
6109
+ color: #eaecef;
6110
+ font-weight: 500;
6111
+ font-size: 14px;
6112
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif;
6113
+ letter-spacing: 0.2px;
6114
+ transition: color 0.2s ease;
6115
+
6116
+ &:hover,
6117
+ &.active {
6118
+ color: #E6C87E;
6119
+ }
6120
+
6121
+ svg {
6122
+ width: 14px;
6123
+ height: 14px;
6124
+ transition: transform 0.2s ease;
6125
+ }
6126
+ &.open svg {
6127
+ transform: rotate(180deg);
6128
+ }
6129
+ `;
6130
+ var MoreDropdown = styled10.div`
6131
+ position: absolute;
6132
+ top: 100%;
6133
+ right: 0;
6134
+ min-width: 160px;
6135
+ padding: 6px;
6136
+ background: #1e2026;
6137
+ border: 1px solid #2b3139;
6138
+ border-radius: 10px;
6139
+ box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
6140
+ display: flex;
6141
+ flex-direction: column;
6142
+ z-index: 1100;
6143
+ `;
6144
+ var MoreItem = styled10.a`
6145
+ padding: 10px 12px;
6146
+ border-radius: 6px;
6147
+ color: #eaecef;
6148
+ font-weight: 500;
6149
+ font-size: 14px;
6150
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif;
6151
+ letter-spacing: 0.2px;
6152
+ text-decoration: none;
6153
+ cursor: pointer;
6154
+ transition: background 0.15s ease, color 0.15s ease;
6155
+
6156
+ &:hover {
6157
+ background: #2b3139;
6158
+ color: #E6C87E;
6159
+ }
6160
+ &.active {
6161
+ color: #E6C87E;
6162
+ }
6163
+ `;
6038
6164
  var Button2 = styled10.button.attrs({ type: "button" })`
6039
6165
  padding: 0.5rem 1rem;
6040
6166
  border-radius: 6px;