@loafmarkets/ui 0.1.98 → 0.1.99

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
@@ -1979,6 +1979,7 @@ var Orderbook = React5.forwardRef(
1979
1979
  onLoafLiquidityClick,
1980
1980
  tradeExplorerUrl,
1981
1981
  maxLevels,
1982
+ fillHeight = false,
1982
1983
  className,
1983
1984
  ...props
1984
1985
  }, ref) => {
@@ -2079,7 +2080,8 @@ var Orderbook = React5.forwardRef(
2079
2080
  tradeExplorerUrl,
2080
2081
  onPriceClick,
2081
2082
  levelCount: effectiveLevels,
2082
- compactLevelCount: effectiveCompactLevels
2083
+ compactLevelCount: effectiveCompactLevels,
2084
+ fillHeight
2083
2085
  };
2084
2086
  return /* @__PURE__ */ jsx(
2085
2087
  Card,
@@ -2088,6 +2090,7 @@ var Orderbook = React5.forwardRef(
2088
2090
  className: cn(
2089
2091
  "w-full max-w-[520px] overflow-hidden rounded-[12px] border border-white/10 bg-[#111111] text-white shadow-md flex flex-col",
2090
2092
  isCompact && "max-w-none",
2093
+ fillHeight && "h-full",
2091
2094
  className
2092
2095
  ),
2093
2096
  ...props,
@@ -2149,7 +2152,8 @@ function DesktopOrderbookLayout({
2149
2152
  tradeExplorerUrl,
2150
2153
  onPriceClick,
2151
2154
  levelCount: effectiveLevels,
2152
- compactLevelCount: _compactLevelCount
2155
+ compactLevelCount: _compactLevelCount,
2156
+ fillHeight
2153
2157
  }) {
2154
2158
  const midRef = React5.useRef(null);
2155
2159
  useMidPriceFlash(midRef, midPrice, "#0b1a24");
@@ -2254,12 +2258,12 @@ function DesktopOrderbookLayout({
2254
2258
  );
2255
2259
  }) })
2256
2260
  }
2257
- ) : /* @__PURE__ */ jsxs("div", { className: "flex flex-col min-h-0 overflow-hidden", children: [
2261
+ ) : /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col min-h-0 overflow-hidden", fillHeight && "flex-1"), children: [
2258
2262
  /* @__PURE__ */ jsx(
2259
2263
  "div",
2260
2264
  {
2261
- className: "flex flex-col justify-end overflow-hidden flex-shrink-0",
2262
- style: { height: `${sectionHeight}px` },
2265
+ className: cn("flex flex-col justify-end overflow-hidden", !fillHeight && "flex-shrink-0"),
2266
+ style: fillHeight ? { flex: 1, minHeight: 0 } : { height: `${sectionHeight}px` },
2263
2267
  children: isLoading ? Array.from({ length: effectiveLevels }).map((_, i) => /* @__PURE__ */ jsx(SkeletonRow, {}, `ask-skel-${i}`)) : askVisibleLevels.length === 0 ? /* @__PURE__ */ jsx("div", { className: "flex h-full items-center justify-center px-3 text-xs text-white/40", children: "No asks" }) : askVisibleLevels.map((l, i) => /* @__PURE__ */ jsx(
2264
2268
  DepthRow,
2265
2269
  {
@@ -2299,8 +2303,8 @@ function DesktopOrderbookLayout({
2299
2303
  /* @__PURE__ */ jsx(
2300
2304
  "div",
2301
2305
  {
2302
- className: "flex flex-col overflow-hidden flex-shrink-0",
2303
- style: { height: `${sectionHeight}px` },
2306
+ className: cn("flex flex-col overflow-hidden", !fillHeight && "flex-shrink-0"),
2307
+ style: fillHeight ? { flex: 1, minHeight: 0 } : { height: `${sectionHeight}px` },
2304
2308
  children: isLoading ? Array.from({ length: effectiveLevels }).map((_, i) => /* @__PURE__ */ jsx(SkeletonRow, {}, `bid-skel-${i}`)) : bidVisibleLevels.length === 0 ? /* @__PURE__ */ jsx("div", { className: "flex h-full items-center justify-center px-3 text-xs text-white/40", children: "No bids" }) : bidVisibleLevels.map((l, i) => /* @__PURE__ */ jsx(
2305
2309
  DepthRow,
2306
2310
  {