@loafmarkets/ui 0.1.136 → 0.1.137
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 +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +14 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +14 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -8535,7 +8535,15 @@ var STATUS_COLOR = {
|
|
|
8535
8535
|
historical: "#3861fb",
|
|
8536
8536
|
expired: "rgba(255,255,255,0.7)"
|
|
8537
8537
|
};
|
|
8538
|
-
function
|
|
8538
|
+
function parsePrice(price) {
|
|
8539
|
+
return Number(price.replace(/[^0-9.]/g, ""));
|
|
8540
|
+
}
|
|
8541
|
+
function formatPerShare(price, totalShares) {
|
|
8542
|
+
const total = parsePrice(price);
|
|
8543
|
+
const perShare = total / totalShares;
|
|
8544
|
+
return `$${perShare.toLocaleString(void 0, { minimumFractionDigits: 2, maximumFractionDigits: 2 })}/Share`;
|
|
8545
|
+
}
|
|
8546
|
+
function PropertyOffers({ offers, totalShares }) {
|
|
8539
8547
|
return /* @__PURE__ */ jsxs("section", { className: "bg-[rgba(30,32,38,0.95)] rounded-md p-7 border border-white/[0.08]", children: [
|
|
8540
8548
|
/* @__PURE__ */ jsxs("header", { className: "flex justify-between items-center gap-4 flex-wrap", children: [
|
|
8541
8549
|
/* @__PURE__ */ jsx("h2", { className: "m-0 text-xl font-semibold", children: "Active & Historical Buyout Offers" }),
|
|
@@ -8566,6 +8574,11 @@ function PropertyOffers({ offers }) {
|
|
|
8566
8574
|
/* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-[240px]", children: [
|
|
8567
8575
|
/* @__PURE__ */ jsxs("div", { className: "font-semibold text-[1.15rem] inline-flex items-center gap-2", children: [
|
|
8568
8576
|
offer.price,
|
|
8577
|
+
totalShares && totalShares > 0 && /* @__PURE__ */ jsxs("span", { className: "text-[0.85rem] font-normal text-white/55", children: [
|
|
8578
|
+
"(",
|
|
8579
|
+
formatPerShare(offer.price, totalShares),
|
|
8580
|
+
")"
|
|
8581
|
+
] }),
|
|
8569
8582
|
(offer.price === "$17,000,000" || offer.price === "$15,500,000") && /* @__PURE__ */ jsx(OfferPricePulse, { $variant: offer.price === "$17,000,000" ? "positive" : "alert" })
|
|
8570
8583
|
] }),
|
|
8571
8584
|
/* @__PURE__ */ jsxs("div", { className: "text-[0.85rem] text-white/65 mt-[0.3rem]", children: [
|