@loafmarkets/ui 0.1.57 → 0.1.59

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
@@ -961,6 +961,26 @@ type PropertyBuyProps = {
961
961
  };
962
962
  declare function PropertyBuy({ propertyName, propertyLocation: propertyLocationLabel, tokenDisplayName, tokenSymbol, tokenName, isAuthenticated, onSignIn, saleData, walletUsdcBalance, walletPropertyTokenBalance, onPurchase, purchaseStatus, purchaseError, onDeposit, opensAt, isPrivateClient, recentOrders, ordersAllocated, subscribers, isLoadingActivity, selectorItems, onSelectorSelect, portfolioActivity, }: PropertyBuyProps): react_jsx_runtime.JSX.Element;
963
963
 
964
+ type OfferingProgressCardProps = {
965
+ ipoStarted: boolean;
966
+ statusLabel: string;
967
+ statusColor: string;
968
+ ipoStatus: string;
969
+ tokenPrice: number;
970
+ offeringValuation: number;
971
+ percentSold: number;
972
+ totalSold: number;
973
+ supplyToSell: number;
974
+ opensAt?: number | null;
975
+ subscriberCount?: number;
976
+ raisedAmount?: number;
977
+ targetAmount?: number;
978
+ isPrivateClient?: boolean;
979
+ style?: React__default.CSSProperties;
980
+ className?: string;
981
+ };
982
+ 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;
983
+
964
984
  type OwnerBookingProps = {
965
985
  propertyName?: string | null;
966
986
  token: {
@@ -1109,4 +1129,4 @@ interface SkeletonProps extends React$1.HTMLAttributes<HTMLDivElement> {
1109
1129
  */
1110
1130
  declare const Skeleton: React$1.ForwardRefExoticComponent<SkeletonProps & React$1.RefAttributes<HTMLDivElement>>;
1111
1131
 
1112
- export { type ActivityTabId, AssetSelectorBar, type AssetSelectorBarProps, type AssetSelectorMetric, Badge, type BadgeProps, Button, type ButtonProps, Card, CardContent, type CardContentProps, CardDescription, type CardDescriptionProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardProps, CardTitle, type CardTitleProps, type FinancialItem, type FundWalletParams, type FundWalletResult, Header, type HeaderProps, type HousePositionOrderbook, type HousePositionPendingOrder, HousePositionSlider, HousePositionSliderMobile, type HousePositionSliderMobileOrderPayload, type HousePositionSliderMobileOrderbook, type HousePositionSliderMobileProps, type HousePositionSliderOrderPayload, type HousePositionSliderProps, type InspectionSlot, LoafLiquidityBadge, LoafLiquidityLogo, type LoafLiquidityLogoProps, LoginPopup, type LoginPopupProps, MobileTradeNav, type MobileTradeNavItem, type MobileTradeNavProps, type OfferStatus, Orderbook, type OrderbookLevel, type OrderbookProps, type OrderbookSide, type OrderbookTrade, type OverviewImage, type OverviewResponse, OwnerBooking, type OwnerBookingProps, PaymentPopup, type PaymentPopupProps, PortfolioActivityPanel, type PortfolioActivityPanelProps, type PortfolioPosition, PortfolioSummary, type PortfolioSummaryProps, PriceChart, type PriceChartCandle, type PriceChartProps, type PriceChartRange, type PropertyAddressOption, PropertyBuy, PropertyCompareBar, type PropertyCompareBarProps, PropertyDocuments, type PropertyGalleryHotspot, type PropertyGalleryImage, PropertyHeroHeader, type PropertyHeroHeaderProps, PropertyHistory, type PropertyInfoItem, PropertyInspectionTimes, type PropertyNewsItem, type PropertyNewsType, PropertyNewsUpdates, type PropertyNewsUpdatesProps, type PropertyOffer, PropertyOffers, type PropertyOffersProps, PropertyOverview, type PropertyOverviewProps, PropertyPhotoGallery, type PropertyPriceSummary, PropertySubheader, type PropertySubheaderAction, type PropertySubheaderProps, type PropertySubheaderTab, PropertyTour, type PropertyTourProps, PropertyValuation, type PropertyValuationProps, type PropertyValueSummary, type PurchaseFeedItem, type SelectorItem, Skeleton, type SkeletonProps, type ToastData, ToastProvider, type ToastVariant, TradeConfirmationModal, type TradeConfirmationModalDetails, type TradeConfirmationModalProps, TradingSlider, type TradingSliderProps, type ValuationHistoryPoint, type ValuationRecentSale, type ValuationSummary, type YourOrder, type YourOrderSide, YourOrders, type YourOrdersProps, badgeVariants, buttonVariants, hasPendingActivity, useAdaptivePolling, useToast };
1132
+ export { type ActivityTabId, AssetSelectorBar, type AssetSelectorBarProps, type AssetSelectorMetric, Badge, type BadgeProps, Button, type ButtonProps, Card, CardContent, type CardContentProps, CardDescription, type CardDescriptionProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardProps, CardTitle, type CardTitleProps, type FinancialItem, type FundWalletParams, type FundWalletResult, Header, type HeaderProps, type HousePositionOrderbook, type HousePositionPendingOrder, HousePositionSlider, HousePositionSliderMobile, type HousePositionSliderMobileOrderPayload, type HousePositionSliderMobileOrderbook, type HousePositionSliderMobileProps, type HousePositionSliderOrderPayload, type HousePositionSliderProps, type InspectionSlot, LoafLiquidityBadge, LoafLiquidityLogo, type LoafLiquidityLogoProps, LoginPopup, type LoginPopupProps, MobileTradeNav, type MobileTradeNavItem, type MobileTradeNavProps, type OfferStatus, OfferingProgressCard, type OfferingProgressCardProps, Orderbook, type OrderbookLevel, type OrderbookProps, type OrderbookSide, type OrderbookTrade, type OverviewImage, type OverviewResponse, OwnerBooking, type OwnerBookingProps, PaymentPopup, type PaymentPopupProps, PortfolioActivityPanel, type PortfolioActivityPanelProps, type PortfolioPosition, PortfolioSummary, type PortfolioSummaryProps, PriceChart, type PriceChartCandle, type PriceChartProps, type PriceChartRange, type PropertyAddressOption, PropertyBuy, PropertyCompareBar, type PropertyCompareBarProps, PropertyDocuments, type PropertyGalleryHotspot, type PropertyGalleryImage, PropertyHeroHeader, type PropertyHeroHeaderProps, PropertyHistory, type PropertyInfoItem, PropertyInspectionTimes, type PropertyNewsItem, type PropertyNewsType, PropertyNewsUpdates, type PropertyNewsUpdatesProps, type PropertyOffer, PropertyOffers, type PropertyOffersProps, PropertyOverview, type PropertyOverviewProps, PropertyPhotoGallery, type PropertyPriceSummary, PropertySubheader, type PropertySubheaderAction, type PropertySubheaderProps, type PropertySubheaderTab, PropertyTour, type PropertyTourProps, PropertyValuation, type PropertyValuationProps, type PropertyValueSummary, type PurchaseFeedItem, type SelectorItem, Skeleton, type SkeletonProps, type ToastData, ToastProvider, type ToastVariant, TradeConfirmationModal, type TradeConfirmationModalDetails, type TradeConfirmationModalProps, TradingSlider, type TradingSliderProps, type ValuationHistoryPoint, type ValuationRecentSale, type ValuationSummary, type YourOrder, type YourOrderSide, YourOrders, type YourOrdersProps, badgeVariants, buttonVariants, hasPendingActivity, useAdaptivePolling, useToast };
package/dist/index.d.ts CHANGED
@@ -961,6 +961,26 @@ type PropertyBuyProps = {
961
961
  };
962
962
  declare function PropertyBuy({ propertyName, propertyLocation: propertyLocationLabel, tokenDisplayName, tokenSymbol, tokenName, isAuthenticated, onSignIn, saleData, walletUsdcBalance, walletPropertyTokenBalance, onPurchase, purchaseStatus, purchaseError, onDeposit, opensAt, isPrivateClient, recentOrders, ordersAllocated, subscribers, isLoadingActivity, selectorItems, onSelectorSelect, portfolioActivity, }: PropertyBuyProps): react_jsx_runtime.JSX.Element;
963
963
 
964
+ type OfferingProgressCardProps = {
965
+ ipoStarted: boolean;
966
+ statusLabel: string;
967
+ statusColor: string;
968
+ ipoStatus: string;
969
+ tokenPrice: number;
970
+ offeringValuation: number;
971
+ percentSold: number;
972
+ totalSold: number;
973
+ supplyToSell: number;
974
+ opensAt?: number | null;
975
+ subscriberCount?: number;
976
+ raisedAmount?: number;
977
+ targetAmount?: number;
978
+ isPrivateClient?: boolean;
979
+ style?: React__default.CSSProperties;
980
+ className?: string;
981
+ };
982
+ 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;
983
+
964
984
  type OwnerBookingProps = {
965
985
  propertyName?: string | null;
966
986
  token: {
@@ -1109,4 +1129,4 @@ interface SkeletonProps extends React$1.HTMLAttributes<HTMLDivElement> {
1109
1129
  */
1110
1130
  declare const Skeleton: React$1.ForwardRefExoticComponent<SkeletonProps & React$1.RefAttributes<HTMLDivElement>>;
1111
1131
 
1112
- export { type ActivityTabId, AssetSelectorBar, type AssetSelectorBarProps, type AssetSelectorMetric, Badge, type BadgeProps, Button, type ButtonProps, Card, CardContent, type CardContentProps, CardDescription, type CardDescriptionProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardProps, CardTitle, type CardTitleProps, type FinancialItem, type FundWalletParams, type FundWalletResult, Header, type HeaderProps, type HousePositionOrderbook, type HousePositionPendingOrder, HousePositionSlider, HousePositionSliderMobile, type HousePositionSliderMobileOrderPayload, type HousePositionSliderMobileOrderbook, type HousePositionSliderMobileProps, type HousePositionSliderOrderPayload, type HousePositionSliderProps, type InspectionSlot, LoafLiquidityBadge, LoafLiquidityLogo, type LoafLiquidityLogoProps, LoginPopup, type LoginPopupProps, MobileTradeNav, type MobileTradeNavItem, type MobileTradeNavProps, type OfferStatus, Orderbook, type OrderbookLevel, type OrderbookProps, type OrderbookSide, type OrderbookTrade, type OverviewImage, type OverviewResponse, OwnerBooking, type OwnerBookingProps, PaymentPopup, type PaymentPopupProps, PortfolioActivityPanel, type PortfolioActivityPanelProps, type PortfolioPosition, PortfolioSummary, type PortfolioSummaryProps, PriceChart, type PriceChartCandle, type PriceChartProps, type PriceChartRange, type PropertyAddressOption, PropertyBuy, PropertyCompareBar, type PropertyCompareBarProps, PropertyDocuments, type PropertyGalleryHotspot, type PropertyGalleryImage, PropertyHeroHeader, type PropertyHeroHeaderProps, PropertyHistory, type PropertyInfoItem, PropertyInspectionTimes, type PropertyNewsItem, type PropertyNewsType, PropertyNewsUpdates, type PropertyNewsUpdatesProps, type PropertyOffer, PropertyOffers, type PropertyOffersProps, PropertyOverview, type PropertyOverviewProps, PropertyPhotoGallery, type PropertyPriceSummary, PropertySubheader, type PropertySubheaderAction, type PropertySubheaderProps, type PropertySubheaderTab, PropertyTour, type PropertyTourProps, PropertyValuation, type PropertyValuationProps, type PropertyValueSummary, type PurchaseFeedItem, type SelectorItem, Skeleton, type SkeletonProps, type ToastData, ToastProvider, type ToastVariant, TradeConfirmationModal, type TradeConfirmationModalDetails, type TradeConfirmationModalProps, TradingSlider, type TradingSliderProps, type ValuationHistoryPoint, type ValuationRecentSale, type ValuationSummary, type YourOrder, type YourOrderSide, YourOrders, type YourOrdersProps, badgeVariants, buttonVariants, hasPendingActivity, useAdaptivePolling, useToast };
1132
+ export { type ActivityTabId, AssetSelectorBar, type AssetSelectorBarProps, type AssetSelectorMetric, Badge, type BadgeProps, Button, type ButtonProps, Card, CardContent, type CardContentProps, CardDescription, type CardDescriptionProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardProps, CardTitle, type CardTitleProps, type FinancialItem, type FundWalletParams, type FundWalletResult, Header, type HeaderProps, type HousePositionOrderbook, type HousePositionPendingOrder, HousePositionSlider, HousePositionSliderMobile, type HousePositionSliderMobileOrderPayload, type HousePositionSliderMobileOrderbook, type HousePositionSliderMobileProps, type HousePositionSliderOrderPayload, type HousePositionSliderProps, type InspectionSlot, LoafLiquidityBadge, LoafLiquidityLogo, type LoafLiquidityLogoProps, LoginPopup, type LoginPopupProps, MobileTradeNav, type MobileTradeNavItem, type MobileTradeNavProps, type OfferStatus, OfferingProgressCard, type OfferingProgressCardProps, Orderbook, type OrderbookLevel, type OrderbookProps, type OrderbookSide, type OrderbookTrade, type OverviewImage, type OverviewResponse, OwnerBooking, type OwnerBookingProps, PaymentPopup, type PaymentPopupProps, PortfolioActivityPanel, type PortfolioActivityPanelProps, type PortfolioPosition, PortfolioSummary, type PortfolioSummaryProps, PriceChart, type PriceChartCandle, type PriceChartProps, type PriceChartRange, type PropertyAddressOption, PropertyBuy, PropertyCompareBar, type PropertyCompareBarProps, PropertyDocuments, type PropertyGalleryHotspot, type PropertyGalleryImage, PropertyHeroHeader, type PropertyHeroHeaderProps, PropertyHistory, type PropertyInfoItem, PropertyInspectionTimes, type PropertyNewsItem, type PropertyNewsType, PropertyNewsUpdates, type PropertyNewsUpdatesProps, type PropertyOffer, PropertyOffers, type PropertyOffersProps, PropertyOverview, type PropertyOverviewProps, PropertyPhotoGallery, type PropertyPriceSummary, PropertySubheader, type PropertySubheaderAction, type PropertySubheaderProps, type PropertySubheaderTab, PropertyTour, type PropertyTourProps, PropertyValuation, type PropertyValuationProps, type PropertyValueSummary, type PurchaseFeedItem, type SelectorItem, Skeleton, type SkeletonProps, type ToastData, ToastProvider, type ToastVariant, TradeConfirmationModal, type TradeConfirmationModalDetails, type TradeConfirmationModalProps, TradingSlider, type TradingSliderProps, type ValuationHistoryPoint, type ValuationRecentSale, type ValuationSummary, type YourOrder, type YourOrderSide, YourOrders, type YourOrdersProps, badgeVariants, buttonVariants, hasPendingActivity, useAdaptivePolling, useToast };
package/dist/index.js CHANGED
@@ -9692,7 +9692,9 @@ function OfferingProgressCard({
9692
9692
  subscriberCount = 0,
9693
9693
  raisedAmount,
9694
9694
  targetAmount,
9695
- isPrivateClient = false
9695
+ isPrivateClient = false,
9696
+ style,
9697
+ className
9696
9698
  }) {
9697
9699
  const [currentTime, setCurrentTime] = React5.useState(/* @__PURE__ */ new Date());
9698
9700
  const [countdown, setCountdown] = React5.useState(null);
@@ -9722,7 +9724,7 @@ function OfferingProgressCard({
9722
9724
  const interval = setInterval(() => setCountdown(calculateCountdown()), 1e3);
9723
9725
  return () => clearInterval(interval);
9724
9726
  }, [opensAt]);
9725
- return /* @__PURE__ */ jsxRuntime.jsxs(Container, { children: [
9727
+ return /* @__PURE__ */ jsxRuntime.jsxs(Container, { style, className, children: [
9726
9728
  /* @__PURE__ */ jsxRuntime.jsxs(Header2, { children: [
9727
9729
  /* @__PURE__ */ jsxRuntime.jsxs("h3", { children: [
9728
9730
  /* @__PURE__ */ jsxRuntime.jsx(fa.FaChartLine, {}),
@@ -10718,6 +10720,17 @@ function OrderPanel({
10718
10720
  const v = e.target.value;
10719
10721
  if (v === "" || /^\d*\.?\d{0,2}$/.test(v)) {
10720
10722
  setPayInputValue(v);
10723
+ const parsed = parseInt(v.replace(/[^0-9]/g, ""), 10) || 0;
10724
+ if (parsed <= 0) {
10725
+ setManualOrderAmount(null);
10726
+ setSliderValue(0);
10727
+ } else if (parsed >= availableBalance) {
10728
+ setManualOrderAmount(null);
10729
+ setSliderValue(100);
10730
+ } else {
10731
+ setManualOrderAmount(parsed);
10732
+ setSliderValue(availableBalance === 0 ? 0 : Math.round(Math.max(0, parsed / availableBalance * 100)));
10733
+ }
10721
10734
  }
10722
10735
  },
10723
10736
  onKeyDown: (e) => {
@@ -10789,6 +10802,18 @@ function OrderPanel({
10789
10802
  const v = e.target.value;
10790
10803
  if (v === "" || /^\d+$/.test(v)) {
10791
10804
  setReceiveInputValue(v);
10805
+ const units = Math.floor(parseInt(v.replace(/[^0-9]/g, ""), 10) || 0);
10806
+ const spend = units * tokenPrice;
10807
+ if (units <= 0) {
10808
+ setManualOrderAmount(null);
10809
+ setSliderValue(0);
10810
+ } else if (spend >= availableBalance) {
10811
+ setManualOrderAmount(null);
10812
+ setSliderValue(100);
10813
+ } else {
10814
+ setManualOrderAmount(spend);
10815
+ setSliderValue(availableBalance === 0 ? 0 : Math.round(Math.max(0, spend / availableBalance * 100)));
10816
+ }
10792
10817
  }
10793
10818
  },
10794
10819
  onKeyDown: (e) => {
@@ -15278,6 +15303,7 @@ exports.LoafLiquidityBadge = LoafLiquidityBadge;
15278
15303
  exports.LoafLiquidityLogo = LoafLiquidityLogo;
15279
15304
  exports.LoginPopup = LoginPopup;
15280
15305
  exports.MobileTradeNav = MobileTradeNav;
15306
+ exports.OfferingProgressCard = OfferingProgressCard;
15281
15307
  exports.Orderbook = Orderbook;
15282
15308
  exports.OwnerBooking = owner_booking_default;
15283
15309
  exports.PaymentPopup = PaymentPopup;