@loafmarkets/ui 0.0.7 → 0.0.9

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
@@ -207,10 +207,12 @@ type YourOrder = {
207
207
  type YourOrdersProps = React.HTMLAttributes<HTMLDivElement> & {
208
208
  title?: string;
209
209
  orders: YourOrder[];
210
+ renderOrderActions?: (order: YourOrder) => React.ReactNode;
210
211
  };
211
212
  declare const YourOrders: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
212
213
  title?: string;
213
214
  orders: YourOrder[];
215
+ renderOrderActions?: (order: YourOrder) => React.ReactNode;
214
216
  } & React.RefAttributes<HTMLDivElement>>;
215
217
 
216
218
  type PriceChartRange = "1D" | "1W" | "1M" | "3M" | "1Y";
package/dist/index.d.ts CHANGED
@@ -207,10 +207,12 @@ type YourOrder = {
207
207
  type YourOrdersProps = React.HTMLAttributes<HTMLDivElement> & {
208
208
  title?: string;
209
209
  orders: YourOrder[];
210
+ renderOrderActions?: (order: YourOrder) => React.ReactNode;
210
211
  };
211
212
  declare const YourOrders: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
212
213
  title?: string;
213
214
  orders: YourOrder[];
215
+ renderOrderActions?: (order: YourOrder) => React.ReactNode;
214
216
  } & React.RefAttributes<HTMLDivElement>>;
215
217
 
216
218
  type PriceChartRange = "1D" | "1W" | "1M" | "3M" | "1Y";
package/dist/index.js CHANGED
@@ -1576,7 +1576,7 @@ var formatPercent = (value, fractionDigits = 2) => {
1576
1576
  return `${value.toFixed(fractionDigits)}%`;
1577
1577
  };
1578
1578
  var YourOrders = React5__namespace.forwardRef(
1579
- ({ className, title = "Portfolio Holdings (Demo)", orders, ...props }, ref) => {
1579
+ ({ className, title = "Portfolio Holdings (Demo)", orders, renderOrderActions, ...props }, ref) => {
1580
1580
  const [activeTab, setActiveTab] = React5__namespace.useState("portfolio");
1581
1581
  const hasOrders = Array.isArray(orders) && orders.length > 0;
1582
1582
  const renderPortfolio = () => {
@@ -1608,7 +1608,7 @@ var YourOrders = React5__namespace.forwardRef(
1608
1608
  const currentPrice = order.currentPrice ?? order.price;
1609
1609
  const priceChangePercent = order.priceChangePercent ?? order.pnlPercent;
1610
1610
  const priceChangePositive = order.priceChangePositive ?? (priceChangePercent != null ? priceChangePercent >= 0 : void 0);
1611
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: rowStyle, children: [
1611
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { ...rowStyle, gridTemplateColumns: renderOrderActions ? "1.8fr 0.8fr 0.7fr 0.8fr 0.8fr 0.9fr 0.8fr" : "1.8fr 0.9fr 0.7fr 0.8fr 0.8fr 1fr" }, children: [
1612
1612
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", gap: "1rem", alignItems: "center" }, children: [
1613
1613
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "0.15rem" }, children: [
1614
1614
  /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: "0.9rem", fontWeight: 500 }, children: propertyName }),
@@ -1679,7 +1679,8 @@ var YourOrders = React5__namespace.forwardRef(
1679
1679
  ] }) : null
1680
1680
  ]
1681
1681
  }
1682
- )
1682
+ ),
1683
+ renderOrderActions ? /* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "flex", justifyContent: "flex-end" }, children: renderOrderActions(order) }) : null
1683
1684
  ] }, order.id);
1684
1685
  }) })
1685
1686
  ] });
@@ -1951,12 +1952,37 @@ var PropertyHeroHeader = React5__namespace.forwardRef(
1951
1952
  const tradeHoverColor = "#f5dd9a";
1952
1953
  const [isTradeInteracting, setIsTradeInteracting] = React5__namespace.useState(false);
1953
1954
  const [isOfferInteracting, setIsOfferInteracting] = React5__namespace.useState(false);
1955
+ const headingStyle = {
1956
+ fontSize: "2.5rem",
1957
+ marginBottom: "0.5rem",
1958
+ color: "#ffffff",
1959
+ textShadow: "0 2px 4px rgba(0, 0, 0, 0.3)",
1960
+ fontWeight: 600,
1961
+ lineHeight: 1.2
1962
+ };
1963
+ const priceBlockStyle = {
1964
+ fontSize: "1.25rem",
1965
+ fontWeight: 600,
1966
+ color: "var(--color-accent, #f0b90b)",
1967
+ marginLeft: "1rem",
1968
+ paddingLeft: "1rem",
1969
+ borderLeft: "1px solid rgba(255, 255, 255, 0.3)",
1970
+ display: "flex",
1971
+ alignItems: "center"
1972
+ };
1973
+ const locationStyle = {
1974
+ fontSize: "1.25rem",
1975
+ color: "rgba(255, 255, 255, 0.9)",
1976
+ marginBottom: "0.75rem",
1977
+ display: "flex",
1978
+ alignItems: "center"
1979
+ };
1954
1980
  return /* @__PURE__ */ jsxRuntime.jsxs(
1955
1981
  "div",
1956
1982
  {
1957
1983
  ref,
1958
1984
  className: cn(
1959
- "relative w-full overflow-hidden bg-black h-[500px] rounded-[12px] max-[768px]:h-[400px] max-[768px]:rounded-lg max-[480px]:h-[350px] max-[480px]:rounded-md",
1985
+ "relative w-[1200px] h-[500px] overflow-hidden bg-black rounded-[12px]",
1960
1986
  className
1961
1987
  ),
1962
1988
  ...props,
@@ -1966,50 +1992,45 @@ var PropertyHeroHeader = React5__namespace.forwardRef(
1966
1992
  {
1967
1993
  src: imageUrl,
1968
1994
  alt: imageAlt ?? name,
1969
- className: "h-full w-full object-cover object-center block max-w-none min-w-[120%] min-h-[120%]",
1970
- style: { transform: "scale(1.0)", transformOrigin: "center" }
1995
+ className: "absolute inset-0 block h-full w-full object-cover object-center",
1996
+ style: { transform: "scale(1.20)", transformOrigin: "center" }
1971
1997
  }
1972
1998
  ),
1973
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute bottom-0 left-0 right-0 flex w-full items-end justify-between p-8 max-[768px]:flex-col max-[768px]:items-start max-[768px]:gap-4 max-[768px]:p-6 max-[480px]:p-4", children: [
1974
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "inline-block w-auto max-w-[70%] rounded-lg bg-black/15 px-4 py-3 text-white shadow-[0px_1px_1px_rgba(0,0,0,0.3)] backdrop-blur-[3px] max-[768px]:w-full max-[768px]:max-w-full max-[768px]:px-3 max-[768px]:py-3 max-[480px]:px-3 max-[480px]:py-2", children: [
1975
- /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "mb-2 text-[2.5rem] leading-tight text-white [text-shadow:0_2px_4px_rgba(0,0,0,0.3)] max-[768px]:mb-[0.4rem] max-[768px]:text-[2rem] max-[480px]:mb-[0.3rem] max-[480px]:text-[1.75rem]", children: name }),
1976
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-3 flex flex-wrap items-center text-[1.25rem] text-white/90 max-[768px]:mb-[0.6rem] max-[768px]:text-[1.1rem] max-[480px]:mb-[0.5rem] max-[480px]:text-[1rem]", children: [
1977
- /* @__PURE__ */ jsxRuntime.jsx("span", { children: location }),
1978
- price == null ? null : /* @__PURE__ */ jsxRuntime.jsxs(
1979
- "span",
1980
- {
1981
- className: "ml-4 flex items-center border-l border-white/30 pl-4 font-semibold",
1982
- style: { color: "var(--color-accent, #e6c87e)" },
1983
- children: [
1984
- formatPrice2(price, currencySymbol),
1985
- changePercent == null ? null : /* @__PURE__ */ jsxRuntime.jsxs(
1986
- "span",
1987
- {
1988
- className: cn(
1989
- "ml-2 flex items-center text-[0.875rem] font-medium",
1990
- isPositive ? "text-[#0ecb81]" : "text-[#f6465d]"
1999
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute bottom-0 left-0 right-0 z-10 flex w-full items-end justify-between gap-4 p-8 max-[768px]:flex-col max-[768px]:items-start max-[768px]:gap-4 max-[768px]:p-6 max-[480px]:p-4", children: [
2000
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "inline-block w-full rounded-lg bg-black/15 px-4 py-3 text-white shadow-[0px_1px_1px_rgba(0,0,0,0.3)] backdrop-blur-[3px] max-[768px]:w-full max-[768px]:px-3 max-[768px]:py-3 max-[480px]:px-3 max-[480px]:py-2 min-[769px]:flex-1 min-[769px]:min-w-0", children: [
2001
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 space-y-2", children: [
2002
+ /* @__PURE__ */ jsxRuntime.jsx("h1", { style: headingStyle, className: "break-words", children: name }),
2003
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-3 flex flex-wrap items-center max-[768px]:mb-[0.6rem] max-[768px]:text-[1.1rem] max-[480px]:mb-[0.5rem] max-[480px]:text-[1rem]", children: [
2004
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: locationStyle, children: location }),
2005
+ price == null ? null : /* @__PURE__ */ jsxRuntime.jsxs("span", { style: priceBlockStyle, children: [
2006
+ formatPrice2(price, currencySymbol),
2007
+ changePercent == null ? null : /* @__PURE__ */ jsxRuntime.jsxs(
2008
+ "span",
2009
+ {
2010
+ className: cn(
2011
+ "ml-2 flex items-center text-[0.875rem] font-medium",
2012
+ isPositive ? "text-[#0ecb81]" : "text-[#f6465d]"
2013
+ ),
2014
+ children: [
2015
+ /* @__PURE__ */ jsxRuntime.jsx(
2016
+ "svg",
2017
+ {
2018
+ xmlns: "http://www.w3.org/2000/svg",
2019
+ width: "12",
2020
+ height: "12",
2021
+ viewBox: "0 0 24 24",
2022
+ fill: "currentColor",
2023
+ className: "mr-[0.15rem]",
2024
+ children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: isPositive ? "M7 14l5-5 5 5H7z" : "M7 10l5 5 5-5H7z" })
2025
+ }
1991
2026
  ),
1992
- children: [
1993
- /* @__PURE__ */ jsxRuntime.jsx(
1994
- "svg",
1995
- {
1996
- xmlns: "http://www.w3.org/2000/svg",
1997
- width: "12",
1998
- height: "12",
1999
- viewBox: "0 0 24 24",
2000
- fill: "currentColor",
2001
- className: "mr-[0.15rem]",
2002
- children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: isPositive ? "M7 14l5-5 5 5H7z" : "M7 10l5 5 5-5H7z" })
2003
- }
2004
- ),
2005
- Math.abs(changePercent).toFixed(2),
2006
- "%"
2007
- ]
2008
- }
2009
- )
2010
- ]
2011
- }
2012
- )
2027
+ Math.abs(changePercent).toFixed(2),
2028
+ "%"
2029
+ ]
2030
+ }
2031
+ )
2032
+ ] })
2033
+ ] })
2013
2034
  ] }),
2014
2035
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-6 text-[0.95rem] text-white/90 max-[768px]:hidden", children: [
2015
2036
  beds == null ? null : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center", children: [
@@ -2036,7 +2057,7 @@ var PropertyHeroHeader = React5__namespace.forwardRef(
2036
2057
  propertyTypeLabel == null ? null : /* @__PURE__ */ jsxRuntime.jsx("div", { children: propertyTypeLabel })
2037
2058
  ] })
2038
2059
  ] }),
2039
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-3 max-[768px]:w-full max-[768px]:justify-between max-[768px]:gap-2 max-[480px]:gap-2", children: [
2060
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex shrink-0 flex-wrap items-center gap-3 max-[768px]:w-full max-[768px]:justify-between max-[768px]:gap-2 max-[480px]:gap-2", children: [
2040
2061
  /* @__PURE__ */ jsxRuntime.jsx(
2041
2062
  "button",
2042
2063
  {