@loafmarkets/ui 0.1.97 → 0.1.98

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
@@ -913,8 +913,9 @@ type AssetSelectorBarProps = {
913
913
  selectorItems?: readonly SelectorItem[];
914
914
  onSelect?: (tokenName: string) => void;
915
915
  trailing?: ReactNode;
916
+ imageUrl?: string;
916
917
  };
917
- declare function AssetSelectorBar({ propertyName, tokenPrice, offeringValuation, metrics: metricsProp, currentTokenName, selectorItems, onSelect, trailing, }: AssetSelectorBarProps): react_jsx_runtime.JSX.Element;
918
+ declare function AssetSelectorBar({ propertyName, tokenPrice, offeringValuation, metrics: metricsProp, currentTokenName, selectorItems, onSelect, trailing, imageUrl, }: AssetSelectorBarProps): react_jsx_runtime.JSX.Element;
918
919
 
919
920
  type IpoStatus = 'PENDING' | 'LIVE' | 'CLOSED' | 'CANCELLED';
920
921
  type SaleData = {
package/dist/index.d.ts CHANGED
@@ -913,8 +913,9 @@ type AssetSelectorBarProps = {
913
913
  selectorItems?: readonly SelectorItem[];
914
914
  onSelect?: (tokenName: string) => void;
915
915
  trailing?: ReactNode;
916
+ imageUrl?: string;
916
917
  };
917
- declare function AssetSelectorBar({ propertyName, tokenPrice, offeringValuation, metrics: metricsProp, currentTokenName, selectorItems, onSelect, trailing, }: AssetSelectorBarProps): react_jsx_runtime.JSX.Element;
918
+ declare function AssetSelectorBar({ propertyName, tokenPrice, offeringValuation, metrics: metricsProp, currentTokenName, selectorItems, onSelect, trailing, imageUrl, }: AssetSelectorBarProps): react_jsx_runtime.JSX.Element;
918
919
 
919
920
  type IpoStatus = 'PENDING' | 'LIVE' | 'CLOSED' | 'CANCELLED';
920
921
  type SaleData = {
package/dist/index.js CHANGED
@@ -9671,7 +9671,8 @@ function AssetSelectorBar({
9671
9671
  currentTokenName,
9672
9672
  selectorItems,
9673
9673
  onSelect,
9674
- trailing
9674
+ trailing,
9675
+ imageUrl
9675
9676
  }) {
9676
9677
  const [isDropdownOpen, setIsDropdownOpen] = React5.useState(false);
9677
9678
  const hasItems = selectorItems && selectorItems.length > 0;
@@ -9680,6 +9681,7 @@ function AssetSelectorBar({
9680
9681
  ...offeringValuation != null ? [{ label: "Offering Valuation", value: `$${offeringValuation.toLocaleString()}` }] : []
9681
9682
  ];
9682
9683
  return /* @__PURE__ */ jsxRuntime.jsx(AssetSelectorWrapper, { children: /* @__PURE__ */ jsxRuntime.jsxs(IPOAssetSelector, { children: [
9684
+ imageUrl && /* @__PURE__ */ jsxRuntime.jsx(AssetThumbnail, { src: imageUrl, alt: propertyName }),
9683
9685
  /* @__PURE__ */ jsxRuntime.jsx(AssetSelectorDropdown, { onClick: () => hasItems && setIsDropdownOpen((prev) => !prev), children: /* @__PURE__ */ jsxRuntime.jsxs(AssetName, { children: [
9684
9686
  propertyName,
9685
9687
  hasItems && /* @__PURE__ */ jsxRuntime.jsx(
@@ -9769,6 +9771,20 @@ var IPOAssetSelector = styled25__default.default.div`
9769
9771
  padding: 0.6rem 0.75rem;
9770
9772
  }
9771
9773
  `;
9774
+ var AssetThumbnail = styled25__default.default.img`
9775
+ width: 40px;
9776
+ height: 40px;
9777
+ border-radius: 8px;
9778
+ object-fit: cover;
9779
+ flex-shrink: 0;
9780
+ border: 1px solid rgba(255, 255, 255, 0.1);
9781
+
9782
+ @media (max-width: 768px) {
9783
+ width: 32px;
9784
+ height: 32px;
9785
+ border-radius: 6px;
9786
+ }
9787
+ `;
9772
9788
  var AssetSelectorDropdown = styled25__default.default.div`
9773
9789
  display: flex;
9774
9790
  align-items: center;
@@ -11968,7 +11984,7 @@ function PortfolioActivityPanel({
11968
11984
  ] }),
11969
11985
  /* @__PURE__ */ jsxRuntime.jsxs(HoldingsQuantity, { children: [
11970
11986
  /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
11971
- pos.quantity.toFixed(2),
11987
+ formatNumber2(pos.quantity),
11972
11988
  " ",
11973
11989
  pos.tokenName
11974
11990
  ] }),
@@ -11980,8 +11996,7 @@ function PortfolioActivityPanel({
11980
11996
  /* @__PURE__ */ jsxRuntime.jsxs(HoldingsPnL, { children: [
11981
11997
  /* @__PURE__ */ jsxRuntime.jsxs(PnLAmount, { $positive: isPositive, children: [
11982
11998
  isPositive ? "+" : "-",
11983
- "$",
11984
- Math.abs(pnl).toFixed(2)
11999
+ formatCurrency5(Math.abs(pnl))
11985
12000
  ] }),
11986
12001
  /* @__PURE__ */ jsxRuntime.jsxs(PnLPercentage, { $positive: isPositive, children: [
11987
12002
  isPositive ? "+" : "",