@loafmarkets/ui 0.1.72 → 0.1.74

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -978,10 +978,12 @@ type OfferingProgressCardProps = {
978
978
  raisedAmount?: number;
979
979
  targetAmount?: number;
980
980
  isPrivateClient?: boolean;
981
+ /** "default" = full card with header/countdown, "compact" = bar-only (demo style) */
982
+ variant?: 'default' | 'compact';
981
983
  style?: React__default.CSSProperties;
982
984
  className?: string;
983
985
  };
984
- declare function OfferingProgressCard({ ipoStarted, statusLabel, statusColor, ipoStatus, tokenPrice, offeringValuation, percentSold, totalSold, supplyToSell, opensAt, subscriberCount, raisedAmount, targetAmount, isPrivateClient, style, className, }: OfferingProgressCardProps): react_jsx_runtime.JSX.Element;
986
+ declare function OfferingProgressCard({ ipoStarted, statusLabel, statusColor, ipoStatus, tokenPrice, offeringValuation, percentSold, totalSold, supplyToSell, opensAt, subscriberCount, raisedAmount, targetAmount, isPrivateClient, variant, style, className, }: OfferingProgressCardProps): react_jsx_runtime.JSX.Element;
985
987
 
986
988
  type OwnerBookingProps = {
987
989
  propertyName?: string | null;
package/dist/index.d.ts CHANGED
@@ -978,10 +978,12 @@ type OfferingProgressCardProps = {
978
978
  raisedAmount?: number;
979
979
  targetAmount?: number;
980
980
  isPrivateClient?: boolean;
981
+ /** "default" = full card with header/countdown, "compact" = bar-only (demo style) */
982
+ variant?: 'default' | 'compact';
981
983
  style?: React__default.CSSProperties;
982
984
  className?: string;
983
985
  };
984
- declare function OfferingProgressCard({ ipoStarted, statusLabel, statusColor, ipoStatus, tokenPrice, offeringValuation, percentSold, totalSold, supplyToSell, opensAt, subscriberCount, raisedAmount, targetAmount, isPrivateClient, style, className, }: OfferingProgressCardProps): react_jsx_runtime.JSX.Element;
986
+ declare function OfferingProgressCard({ ipoStarted, statusLabel, statusColor, ipoStatus, tokenPrice, offeringValuation, percentSold, totalSold, supplyToSell, opensAt, subscriberCount, raisedAmount, targetAmount, isPrivateClient, variant, style, className, }: OfferingProgressCardProps): react_jsx_runtime.JSX.Element;
985
987
 
986
988
  type OwnerBookingProps = {
987
989
  propertyName?: string | null;
package/dist/index.js CHANGED
@@ -2979,7 +2979,7 @@ var PropertyNewsUpdates = React5__namespace.forwardRef(
2979
2979
  /* @__PURE__ */ jsxRuntime.jsx(
2980
2980
  "div",
2981
2981
  {
2982
- className: "mt-4 flex flex-1 flex-col gap-3 overflow-hidden",
2982
+ className: cn("flex flex-1 flex-col overflow-hidden", isHomeVariant ? "mt-2 gap-0" : "mt-4 gap-3"),
2983
2983
  style: !isPurchaseVariant && !isHomeVariant ? { minHeight: `${ITEMS_PER_PAGE * 86}px` } : void 0,
2984
2984
  children: isPurchaseVariant ? purchaseItems.length > 0 ? purchaseItems.slice(0, 7).map((purchase, index) => {
2985
2985
  const maxAmount = 6e4;
@@ -3027,11 +3027,22 @@ var PropertyNewsUpdates = React5__namespace.forwardRef(
3027
3027
  justifyContent: "space-between",
3028
3028
  alignItems: "flex-start",
3029
3029
  gap: "0.5rem",
3030
- color: "inherit"
3030
+ color: "inherit",
3031
+ transition: "background-color 0.15s"
3032
+ },
3033
+ onMouseEnter: (e) => {
3034
+ e.currentTarget.style.backgroundColor = "rgba(255,255,255,0.02)";
3035
+ const title = e.currentTarget.querySelector("h3");
3036
+ if (title) title.style.color = "var(--color-accent, #E6C87E)";
3037
+ },
3038
+ onMouseLeave: (e) => {
3039
+ e.currentTarget.style.backgroundColor = "transparent";
3040
+ const title = e.currentTarget.querySelector("h3");
3041
+ if (title) title.style.color = "#f8f9fa";
3031
3042
  },
3032
3043
  children: [
3033
3044
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { flex: 1 }, children: [
3034
- /* @__PURE__ */ jsxRuntime.jsx("h3", { style: { fontSize: "0.85rem", fontWeight: 400, marginBottom: "0.25rem", color: "#f8f9fa", lineHeight: 1.4 }, children: item.title }),
3045
+ /* @__PURE__ */ jsxRuntime.jsx("h3", { style: { fontSize: "0.85rem", fontWeight: 400, marginBottom: "0.25rem", color: "#f8f9fa", lineHeight: 1.4, transition: "color 0.15s" }, children: item.title }),
3035
3046
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", gap: "0.5rem", alignItems: "center", flexWrap: "wrap" }, children: [
3036
3047
  /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: "#848e9c", fontSize: "0.7rem" }, children: typeof item.date === "string" ? item.date : formatDate(item.date) }),
3037
3048
  item.source && /* @__PURE__ */ jsxRuntime.jsx("span", { style: { padding: "0.1rem 0.4rem", borderRadius: "3px", fontSize: "0.62rem", fontWeight: 500, backgroundColor: "rgba(255,255,255,0.07)", color: "#848e9c", whiteSpace: "nowrap" }, children: item.source }),
@@ -9672,6 +9683,7 @@ function OfferingProgressCard({
9672
9683
  raisedAmount,
9673
9684
  targetAmount,
9674
9685
  isPrivateClient = false,
9686
+ variant = "default",
9675
9687
  style,
9676
9688
  className
9677
9689
  }) {
@@ -9703,6 +9715,24 @@ function OfferingProgressCard({
9703
9715
  const interval = setInterval(() => setCountdown(calculateCountdown()), 1e3);
9704
9716
  return () => clearInterval(interval);
9705
9717
  }, [opensAt]);
9718
+ if (variant === "compact") {
9719
+ return /* @__PURE__ */ jsxRuntime.jsxs(CompactContainer, { style, className, children: [
9720
+ /* @__PURE__ */ jsxRuntime.jsx(ProgressBarOuter, { children: /* @__PURE__ */ jsxRuntime.jsx(ProgressBarInner, { style: { width: `${Math.min(percentSold, 100)}%` } }) }),
9721
+ /* @__PURE__ */ jsxRuntime.jsxs(ProgressInfo, { children: [
9722
+ /* @__PURE__ */ jsxRuntime.jsxs(ProgressSubscribers, { children: [
9723
+ "Subscribers: ",
9724
+ subscriberCount.toLocaleString()
9725
+ ] }),
9726
+ /* @__PURE__ */ jsxRuntime.jsxs(ProgressAmounts, { children: [
9727
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "raised", children: formatCurrency3(computedRaised) }),
9728
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "target", children: [
9729
+ " / ",
9730
+ formatCurrency3(computedTarget)
9731
+ ] })
9732
+ ] })
9733
+ ] })
9734
+ ] });
9735
+ }
9706
9736
  return /* @__PURE__ */ jsxRuntime.jsxs(Container, { style, className, children: [
9707
9737
  /* @__PURE__ */ jsxRuntime.jsxs(Header2, { children: [
9708
9738
  /* @__PURE__ */ jsxRuntime.jsxs("h3", { children: [
@@ -10004,6 +10034,13 @@ var ProgressAmounts = styled25__default.default.div`
10004
10034
  .raised { color: #D4AF37; }
10005
10035
  .target { color: rgba(255,255,255,0.3); }
10006
10036
  `;
10037
+ var CompactContainer = styled25__default.default.div`
10038
+ width: 100%;
10039
+ margin: 1.5rem 0;
10040
+ display: flex;
10041
+ flex-direction: column;
10042
+ gap: 0.5rem;
10043
+ `;
10007
10044
  var MAX_DISPLAY_AMOUNT = 6e4;
10008
10045
  var formatCurrency4 = (amount) => {
10009
10046
  if (amount >= 1e6) return `$${(amount / 1e6).toFixed(2)}M`;