@loafmarkets/ui 0.1.212 → 0.1.214

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
@@ -8499,6 +8499,7 @@ function PropertyOverview({
8499
8499
  const [showDividendHistory, setShowDividendHistory] = useState(false);
8500
8500
  const [showHolders, setShowHolders] = useState(false);
8501
8501
  const [copiedAddress, setCopiedAddress] = useState(false);
8502
+ const [statsTab, setStatsTab] = useState("token");
8502
8503
  const description = descriptionProp ?? overviewData?.description ?? DEFAULT_DESCRIPTION;
8503
8504
  const landSize = landProp ?? overviewData?.landSizeSqm ?? null;
8504
8505
  const buildingSize = buildingProp ?? overviewData?.buildingSizeSqm ?? null;
@@ -8556,7 +8557,7 @@ function PropertyOverview({
8556
8557
  { label: "Location", value: location || "\u2014" }
8557
8558
  ];
8558
8559
  const vol24hDollar = volume24h != null && tokenPriceValue ? volume24h * tokenPriceValue : null;
8559
- const holdRatio = (() => {
8560
+ (() => {
8560
8561
  if (!tokenMarketCap || tokenMarketCap <= 0 || vol24hDollar == null) return null;
8561
8562
  const turnover = vol24hDollar / (tokenMarketCap / 2);
8562
8563
  const holdPct = Math.max(0, Math.min(100, (1 - turnover) * 100));
@@ -8630,46 +8631,40 @@ function PropertyOverview({
8630
8631
  ] }),
8631
8632
  /* @__PURE__ */ jsxs(Section, { children: [
8632
8633
  /* @__PURE__ */ jsx(SectionHeader, { children: "Statistics" }),
8633
- /* @__PURE__ */ jsxs(StatsGrid, { children: [
8634
- /* @__PURE__ */ jsxs(StatsColumn, { children: [
8635
- /* @__PURE__ */ jsx(StatsColumnHeader, { children: "Token Performance" }),
8636
- tokenStats.map((item) => /* @__PURE__ */ jsxs(StatRow, { $gold: !!item.gold, children: [
8637
- /* @__PURE__ */ jsx(StatLabel, { children: item.label }),
8638
- item.label === "Holders" && holderCount != null ? /* @__PURE__ */ jsx(StatValueClickable, { onClick: () => setShowHolders(true), children: item.value }) : /* @__PURE__ */ jsx(StatValue, { $gold: !!item.gold, children: item.value })
8639
- ] }, item.label)),
8640
- holdRatio && /* @__PURE__ */ jsxs(HoldRatioWrap, { children: [
8641
- /* @__PURE__ */ jsxs(HoldRatioTitle, { children: [
8642
- /* @__PURE__ */ jsx(HoldRatioTitleText, { children: "Holding Ratio" }),
8643
- /* @__PURE__ */ jsx(HoldRatioInfo, { "data-tip": "Proportion of token holders vs active traders over the last 24 hours, measured by trading volume against market capitalisation.", children: "?" })
8644
- ] }),
8645
- /* @__PURE__ */ jsxs(HoldRatioHeader, { children: [
8646
- /* @__PURE__ */ jsxs("div", { children: [
8647
- /* @__PURE__ */ jsx(HoldRatioLabel, { $side: "hold", children: "Holding " }),
8648
- /* @__PURE__ */ jsxs(HoldRatioValue, { $side: "hold", children: [
8649
- holdRatio.holdPct.toFixed(1),
8650
- "%"
8651
- ] })
8652
- ] }),
8653
- /* @__PURE__ */ jsxs("div", { children: [
8654
- /* @__PURE__ */ jsxs(HoldRatioValue, { $side: "trade", children: [
8655
- holdRatio.tradePct,
8656
- "%"
8657
- ] }),
8658
- /* @__PURE__ */ jsx(HoldRatioLabel, { $side: "trade", children: " Trading" })
8659
- ] })
8660
- ] }),
8661
- /* @__PURE__ */ jsx(HoldRatioTrack, { children: /* @__PURE__ */ jsx(HoldRatioFill, { $pct: holdRatio.holdPct }) })
8662
- ] })
8634
+ /* @__PURE__ */ jsxs(StatsDesktop, { children: [
8635
+ /* @__PURE__ */ jsxs(StatsRowSection, { children: [
8636
+ /* @__PURE__ */ jsx(StatsRowLabel, { children: "Token Performance" }),
8637
+ /* @__PURE__ */ jsx(StatsHRow, { children: tokenStats.map((item) => /* @__PURE__ */ jsxs(StatsHCell, { children: [
8638
+ /* @__PURE__ */ jsx(StatsHCellLabel, { children: item.label }),
8639
+ item.label === "Holders" && holderCount != null ? /* @__PURE__ */ jsx(StatValueClickable, { onClick: () => setShowHolders(true), children: item.value }) : /* @__PURE__ */ jsx(StatsHCellValue, { $gold: !!item.gold, children: item.value })
8640
+ ] }, item.label)) })
8663
8641
  ] }),
8664
- /* @__PURE__ */ jsxs(StatsColumn, { children: [
8665
- /* @__PURE__ */ jsx(StatsColumnHeader, { children: "Property Fundamentals" }),
8642
+ /* @__PURE__ */ jsxs(StatsRowSection, { children: [
8643
+ /* @__PURE__ */ jsx(StatsRowLabel, { children: "Property Fundamentals" }),
8644
+ /* @__PURE__ */ jsx(StatsHRow, { children: propertyStats.map((item) => /* @__PURE__ */ jsxs(StatsHCell, { children: [
8645
+ /* @__PURE__ */ jsx(StatsHCellLabel, { children: item.label }),
8646
+ /* @__PURE__ */ jsx(StatsHCellValue, { children: item.value })
8647
+ ] }, item.label)) }),
8648
+ /* @__PURE__ */ jsx(DividendHistoryBtn, { onClick: () => setShowDividendHistory(true), children: "See Dividend History \u2192" })
8649
+ ] })
8650
+ ] }),
8651
+ /* @__PURE__ */ jsx(StatsMobile, { children: /* @__PURE__ */ jsxs(StatsTabbedCard, { children: [
8652
+ /* @__PURE__ */ jsxs(StatsTabBar, { children: [
8653
+ /* @__PURE__ */ jsx(StatsTab, { $active: statsTab === "token", onClick: () => setStatsTab("token"), children: "Token" }),
8654
+ /* @__PURE__ */ jsx(StatsTab, { $active: statsTab === "property", onClick: () => setStatsTab("property"), children: "Property" })
8655
+ ] }),
8656
+ statsTab === "token" && /* @__PURE__ */ jsx(StatsTabContent, { children: tokenStats.map((item) => /* @__PURE__ */ jsxs(StatRow, { $gold: !!item.gold, children: [
8657
+ /* @__PURE__ */ jsx(StatLabel, { children: item.label }),
8658
+ item.label === "Holders" && holderCount != null ? /* @__PURE__ */ jsx(StatValueClickable, { onClick: () => setShowHolders(true), children: item.value }) : /* @__PURE__ */ jsx(StatValue, { $gold: !!item.gold, children: item.value })
8659
+ ] }, item.label)) }),
8660
+ statsTab === "property" && /* @__PURE__ */ jsxs(StatsTabContent, { children: [
8666
8661
  propertyStats.map((item) => /* @__PURE__ */ jsxs(StatRow, { children: [
8667
8662
  /* @__PURE__ */ jsx(StatLabel, { children: item.label }),
8668
8663
  /* @__PURE__ */ jsx(StatValue, { children: item.value })
8669
8664
  ] }, item.label)),
8670
8665
  /* @__PURE__ */ jsx(DividendHistoryBtn, { onClick: () => setShowDividendHistory(true), children: "See Dividend History \u2192" })
8671
8666
  ] })
8672
- ] })
8667
+ ] }) })
8673
8668
  ] }),
8674
8669
  showDividendHistory && /* @__PURE__ */ jsx(
8675
8670
  DividendHistoryPopup,
@@ -9330,6 +9325,89 @@ var ChainLogoImg = styled9.img`
9330
9325
  width: auto;
9331
9326
  vertical-align: middle;
9332
9327
  `;
9328
+ var StatsDesktop = styled9.div`
9329
+ display: flex;
9330
+ flex-direction: column;
9331
+ gap: 1.5rem;
9332
+ @media (max-width: 768px) { display: none; }
9333
+ `;
9334
+ var StatsMobile = styled9.div`
9335
+ display: none;
9336
+ @media (max-width: 768px) { display: block; }
9337
+ `;
9338
+ var StatsRowSection = styled9.div`
9339
+ display: flex;
9340
+ flex-direction: column;
9341
+ gap: 0.5rem;
9342
+ `;
9343
+ var StatsRowLabel = styled9.div`
9344
+ font-size: 0.65rem;
9345
+ color: #D4AF37;
9346
+ text-transform: uppercase;
9347
+ letter-spacing: 0.12em;
9348
+ font-weight: 600;
9349
+ `;
9350
+ var StatsHRow = styled9.div`
9351
+ display: flex;
9352
+ gap: 0;
9353
+ background: rgba(255,255,255,0.025);
9354
+ border: 1px solid rgba(255,255,255,0.06);
9355
+ border-radius: 10px;
9356
+ overflow: hidden;
9357
+ `;
9358
+ var StatsHCell = styled9.div`
9359
+ flex: 1;
9360
+ display: flex;
9361
+ flex-direction: column;
9362
+ align-items: center;
9363
+ gap: 6px;
9364
+ padding: 1rem 0.75rem;
9365
+ border-right: 1px solid rgba(255,255,255,0.04);
9366
+ &:last-child { border-right: none; }
9367
+ transition: background 0.15s;
9368
+ &:hover { background: rgba(255,255,255,0.03); }
9369
+ `;
9370
+ var StatsHCellLabel = styled9.span`
9371
+ font-size: 0.7rem;
9372
+ color: rgba(255,255,255,0.4);
9373
+ font-weight: 400;
9374
+ white-space: nowrap;
9375
+ `;
9376
+ var StatsHCellValue = styled9.span`
9377
+ font-size: 0.92rem;
9378
+ font-weight: 500;
9379
+ color: ${(p) => p.$gold ? "#D4AF37" : "#fff"};
9380
+ font-variant-numeric: tabular-nums;
9381
+ `;
9382
+ var StatsTabbedCard = styled9.div`
9383
+ background: rgba(255,255,255,0.025);
9384
+ border: 1px solid rgba(255,255,255,0.06);
9385
+ border-radius: 10px;
9386
+ max-width: 400px;
9387
+ `;
9388
+ var StatsTabBar = styled9.div`
9389
+ display: flex;
9390
+ border-bottom: 1px solid rgba(255,255,255,0.06);
9391
+ `;
9392
+ var StatsTab = styled9.button`
9393
+ flex: 1;
9394
+ padding: 0.85rem 1rem;
9395
+ background: none;
9396
+ border: none;
9397
+ font-size: 0.68rem;
9398
+ font-weight: 600;
9399
+ text-transform: uppercase;
9400
+ letter-spacing: 0.1em;
9401
+ cursor: pointer;
9402
+ transition: color 0.15s, border-color 0.15s;
9403
+ color: ${(p) => p.$active ? "#D4AF37" : "rgba(255,255,255,0.35)"};
9404
+ border-bottom: 2px solid ${(p) => p.$active ? "#D4AF37" : "transparent"};
9405
+ margin-bottom: -1px;
9406
+ &:hover { color: ${(p) => p.$active ? "#D4AF37" : "rgba(255,255,255,0.6)"}; }
9407
+ `;
9408
+ var StatsTabContent = styled9.div`
9409
+ padding: 0.5rem 1.25rem 1.25rem;
9410
+ `;
9333
9411
  var StatsGrid = styled9.div`
9334
9412
  display: grid;
9335
9413
  grid-template-columns: 340px 340px;
@@ -9712,7 +9790,7 @@ var SecurityDocLink = styled9.a`
9712
9790
  color: rgba(212,175,55,0.9);
9713
9791
  }
9714
9792
  `;
9715
- var HoldRatioWrap = styled9.div`
9793
+ styled9.div`
9716
9794
  display: flex;
9717
9795
  flex-direction: column;
9718
9796
  gap: 6px;
@@ -9720,19 +9798,19 @@ var HoldRatioWrap = styled9.div`
9720
9798
  margin-top: 0.5rem;
9721
9799
  border-top: 1px solid rgba(255,255,255,0.04);
9722
9800
  `;
9723
- var HoldRatioTitle = styled9.div`
9801
+ styled9.div`
9724
9802
  display: flex;
9725
9803
  align-items: center;
9726
9804
  gap: 5px;
9727
9805
  `;
9728
- var HoldRatioTitleText = styled9.span`
9806
+ styled9.span`
9729
9807
  font-size: 0.65rem;
9730
9808
  font-weight: 600;
9731
9809
  text-transform: uppercase;
9732
9810
  letter-spacing: 0.06em;
9733
9811
  color: rgba(255,255,255,0.4);
9734
9812
  `;
9735
- var HoldRatioInfo = styled9.span`
9813
+ styled9.span`
9736
9814
  position: relative;
9737
9815
  display: inline-flex;
9738
9816
  align-items: center;
@@ -9775,32 +9853,32 @@ var HoldRatioInfo = styled9.span`
9775
9853
  opacity: 1;
9776
9854
  }
9777
9855
  `;
9778
- var HoldRatioHeader = styled9.div`
9856
+ styled9.div`
9779
9857
  display: flex;
9780
9858
  align-items: center;
9781
9859
  justify-content: space-between;
9782
9860
  `;
9783
- var HoldRatioLabel = styled9.span`
9861
+ styled9.span`
9784
9862
  font-size: 0.7rem;
9785
9863
  font-weight: 600;
9786
9864
  text-transform: uppercase;
9787
9865
  letter-spacing: 0.05em;
9788
9866
  color: ${(p) => p.$side === "trade" ? "rgba(246, 70, 93, 0.6)" : "rgba(14, 203, 129, 0.6)"};
9789
9867
  `;
9790
- var HoldRatioValue = styled9.span`
9868
+ styled9.span`
9791
9869
  font-size: 0.75rem;
9792
9870
  font-weight: 600;
9793
9871
  font-variant-numeric: tabular-nums;
9794
9872
  color: ${(p) => p.$side === "trade" ? "rgba(246, 70, 93, 0.7)" : "rgba(14, 203, 129, 0.7)"};
9795
9873
  `;
9796
- var HoldRatioTrack = styled9.div`
9874
+ styled9.div`
9797
9875
  height: 6px;
9798
9876
  border-radius: 3px;
9799
9877
  background: rgba(246, 70, 93, 0.15);
9800
9878
  overflow: hidden;
9801
9879
  position: relative;
9802
9880
  `;
9803
- var HoldRatioFill = styled9.div`
9881
+ styled9.div`
9804
9882
  height: 100%;
9805
9883
  width: ${(p) => p.$pct}%;
9806
9884
  border-radius: 3px;