@loafmarkets/ui 0.1.71 → 0.1.73

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
@@ -2912,10 +2912,10 @@ var PropertyNewsUpdates = React5.forwardRef(
2912
2912
  children: [
2913
2913
  /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
2914
2914
  /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "0.5rem" }, children: [
2915
- isHomeVariant && /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 24 24", fill: "currentColor", style: { color: "var(--color-text, #fff)" }, 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-2zm-5 14H4v-4h11v4zm0-5H4V9h11v4zm5 5h-4V9h4v9z" }) }),
2915
+ isHomeVariant && /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 24 24", fill: "currentColor", style: { color: "var(--color-text, #fff)", flexShrink: 0, display: "block" }, 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-2zm-5 14H4v-4h11v4zm0-5H4V9h11v4zm5 5h-4V9h4v9z" }) }),
2916
2916
  isPurchaseVariant && /* @__PURE__ */ jsx("span", { style: { display: "inline-block", width: "8px", height: "8px", borderRadius: "50%", backgroundColor: "#0ecb81", boxShadow: "0 0 8px rgba(14,203,129,0.8)", animation: "propertyNewsPulse 1.5s infinite" } }),
2917
2917
  /* @__PURE__ */ jsxs("div", { children: [
2918
- /* @__PURE__ */ jsx("p", { className: isHomeVariant ? "text-base font-semibold text-white" : "text-lg font-semibold text-white", children: resolvedHeading }),
2918
+ /* @__PURE__ */ jsx("p", { className: isHomeVariant ? "text-base font-semibold text-white" : "text-lg font-semibold text-white", style: { margin: 0 }, children: resolvedHeading }),
2919
2919
  subheading ? /* @__PURE__ */ jsx("p", { className: "text-sm text-white/60", children: subheading }) : null
2920
2920
  ] })
2921
2921
  ] }),
@@ -2953,7 +2953,7 @@ var PropertyNewsUpdates = React5.forwardRef(
2953
2953
  /* @__PURE__ */ jsx(
2954
2954
  "div",
2955
2955
  {
2956
- className: "mt-4 flex flex-1 flex-col gap-3 overflow-hidden",
2956
+ className: cn("flex flex-1 flex-col overflow-hidden", isHomeVariant ? "mt-2 gap-0" : "mt-4 gap-3"),
2957
2957
  style: !isPurchaseVariant && !isHomeVariant ? { minHeight: `${ITEMS_PER_PAGE * 86}px` } : void 0,
2958
2958
  children: isPurchaseVariant ? purchaseItems.length > 0 ? purchaseItems.slice(0, 7).map((purchase, index) => {
2959
2959
  const maxAmount = 6e4;
@@ -3095,8 +3095,8 @@ var PropertyNewsUpdates = React5.forwardRef(
3095
3095
  type: "button",
3096
3096
  onClick: () => setHomePage((p) => Math.max(0, p - 1)),
3097
3097
  disabled: homePage === 0,
3098
- style: { background: "transparent", border: "1px solid rgba(255,255,255,0.15)", borderRadius: "999px", padding: "0.2rem 0.75rem", fontSize: "0.7rem", textTransform: "uppercase", letterSpacing: "0.15em", cursor: homePage === 0 ? "not-allowed" : "pointer", opacity: homePage === 0 ? 0.4 : 1, color: "rgba(255,255,255,0.6)" },
3099
- children: "Prev"
3098
+ style: { background: "transparent", border: "1px solid rgba(255,255,255,0.15)", borderRadius: "50%", width: "28px", height: "28px", display: "flex", alignItems: "center", justifyContent: "center", padding: 0, cursor: homePage === 0 ? "not-allowed" : "pointer", opacity: homePage === 0 ? 0.4 : 1, color: "rgba(255,255,255,0.6)" },
3099
+ children: /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z" }) })
3100
3100
  }
3101
3101
  ),
3102
3102
  /* @__PURE__ */ jsxs("span", { style: { fontSize: "0.7rem", color: "rgba(255,255,255,0.5)" }, children: [
@@ -3110,8 +3110,8 @@ var PropertyNewsUpdates = React5.forwardRef(
3110
3110
  type: "button",
3111
3111
  onClick: () => setHomePage((p) => Math.min(homeTotalPages - 1, p + 1)),
3112
3112
  disabled: homePage >= homeTotalPages - 1,
3113
- style: { background: "transparent", border: "1px solid rgba(255,255,255,0.15)", borderRadius: "999px", padding: "0.2rem 0.75rem", fontSize: "0.7rem", textTransform: "uppercase", letterSpacing: "0.15em", cursor: homePage >= homeTotalPages - 1 ? "not-allowed" : "pointer", opacity: homePage >= homeTotalPages - 1 ? 0.4 : 1, color: "rgba(255,255,255,0.6)" },
3114
- children: "Next"
3113
+ style: { background: "transparent", border: "1px solid rgba(255,255,255,0.15)", borderRadius: "50%", width: "28px", height: "28px", display: "flex", alignItems: "center", justifyContent: "center", padding: 0, cursor: homePage >= homeTotalPages - 1 ? "not-allowed" : "pointer", opacity: homePage >= homeTotalPages - 1 ? 0.4 : 1, color: "rgba(255,255,255,0.6)" },
3114
+ children: /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z" }) })
3115
3115
  }
3116
3116
  )
3117
3117
  ] }),
@@ -3122,8 +3122,9 @@ var PropertyNewsUpdates = React5.forwardRef(
3122
3122
  type: "button",
3123
3123
  onClick: () => setPage((p) => Math.max(0, p - 1)),
3124
3124
  disabled: page === 0,
3125
- className: cn("rounded-full border border-white/15 px-3 py-1 uppercase tracking-[0.2em]", page === 0 ? "opacity-40 cursor-not-allowed" : "hover:border-white/40"),
3126
- children: "Prev"
3125
+ className: cn("rounded-full border border-white/15 flex items-center justify-center", page === 0 ? "opacity-40 cursor-not-allowed" : "hover:border-white/40"),
3126
+ style: { width: "28px", height: "28px", padding: 0, background: "transparent", color: "rgba(255,255,255,0.6)" },
3127
+ children: /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z" }) })
3127
3128
  }
3128
3129
  ),
3129
3130
  /* @__PURE__ */ jsxs("span", { className: "font-medium text-white/70", children: [
@@ -3138,8 +3139,9 @@ var PropertyNewsUpdates = React5.forwardRef(
3138
3139
  type: "button",
3139
3140
  onClick: () => setPage((p) => Math.min(totalPages - 1, p + 1)),
3140
3141
  disabled: page >= totalPages - 1,
3141
- className: cn("rounded-full border border-white/15 px-3 py-1 uppercase tracking-[0.2em]", page >= totalPages - 1 ? "opacity-40 cursor-not-allowed" : "hover:border-white/40"),
3142
- children: "Next"
3142
+ className: cn("rounded-full border border-white/15 flex items-center justify-center", page >= totalPages - 1 ? "opacity-40 cursor-not-allowed" : "hover:border-white/40"),
3143
+ style: { width: "28px", height: "28px", padding: 0, background: "transparent", color: "rgba(255,255,255,0.6)" },
3144
+ children: /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z" }) })
3143
3145
  }
3144
3146
  )
3145
3147
  ] }),
@@ -9644,6 +9646,7 @@ function OfferingProgressCard({
9644
9646
  raisedAmount,
9645
9647
  targetAmount,
9646
9648
  isPrivateClient = false,
9649
+ variant = "default",
9647
9650
  style,
9648
9651
  className
9649
9652
  }) {
@@ -9675,6 +9678,24 @@ function OfferingProgressCard({
9675
9678
  const interval = setInterval(() => setCountdown(calculateCountdown()), 1e3);
9676
9679
  return () => clearInterval(interval);
9677
9680
  }, [opensAt]);
9681
+ if (variant === "compact") {
9682
+ return /* @__PURE__ */ jsxs(CompactContainer, { style, className, children: [
9683
+ /* @__PURE__ */ jsx(ProgressBarOuter, { children: /* @__PURE__ */ jsx(ProgressBarInner, { style: { width: `${Math.min(percentSold, 100)}%` } }) }),
9684
+ /* @__PURE__ */ jsxs(ProgressInfo, { children: [
9685
+ /* @__PURE__ */ jsxs(ProgressSubscribers, { children: [
9686
+ "Subscribers: ",
9687
+ subscriberCount.toLocaleString()
9688
+ ] }),
9689
+ /* @__PURE__ */ jsxs(ProgressAmounts, { children: [
9690
+ /* @__PURE__ */ jsx("span", { className: "raised", children: formatCurrency3(computedRaised) }),
9691
+ /* @__PURE__ */ jsxs("span", { className: "target", children: [
9692
+ " / ",
9693
+ formatCurrency3(computedTarget)
9694
+ ] })
9695
+ ] })
9696
+ ] })
9697
+ ] });
9698
+ }
9678
9699
  return /* @__PURE__ */ jsxs(Container, { style, className, children: [
9679
9700
  /* @__PURE__ */ jsxs(Header2, { children: [
9680
9701
  /* @__PURE__ */ jsxs("h3", { children: [
@@ -9743,7 +9764,7 @@ function OfferingProgressCard({
9743
9764
  /* @__PURE__ */ jsx("span", { children: "\u24D8" })
9744
9765
  ] }),
9745
9766
  /* @__PURE__ */ jsxs(LivePercent, { children: [
9746
- percentSold < 0.1 && percentSold > 0 ? percentSold.toFixed(3) : percentSold.toFixed(1),
9767
+ percentSold.toFixed(1),
9747
9768
  "%",
9748
9769
  /* @__PURE__ */ jsx("span", { className: "arrow", children: "\u2191" })
9749
9770
  ] })
@@ -9976,6 +9997,13 @@ var ProgressAmounts = styled25.div`
9976
9997
  .raised { color: #D4AF37; }
9977
9998
  .target { color: rgba(255,255,255,0.3); }
9978
9999
  `;
10000
+ var CompactContainer = styled25.div`
10001
+ width: 100%;
10002
+ margin: 1.5rem 0;
10003
+ display: flex;
10004
+ flex-direction: column;
10005
+ gap: 0.5rem;
10006
+ `;
9979
10007
  var MAX_DISPLAY_AMOUNT = 6e4;
9980
10008
  var formatCurrency4 = (amount) => {
9981
10009
  if (amount >= 1e6) return `$${(amount / 1e6).toFixed(2)}M`;
@@ -11653,7 +11681,7 @@ function PortfolioActivityPanel({
11653
11681
  formatTimestamp(trade.executedAt)
11654
11682
  ] })
11655
11683
  ] }),
11656
- trade.status === "SETTLEMENT_FAILED" ? /* @__PURE__ */ jsx(ActivityTag, { $color: "#f6465d", $bg: "rgba(246,70,93,0.12)", children: "Failed" }) : /* @__PURE__ */ jsx(
11684
+ /* @__PURE__ */ jsx(
11657
11685
  ActivityTag,
11658
11686
  {
11659
11687
  $color: trade.side === "SELL" ? "#f6465d" : "#0ecb81",