@deframe-sdk/components 0.1.76 → 0.1.78

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
@@ -1586,6 +1586,8 @@ interface SwapFromCardViewProps {
1586
1586
  maxFractionDigits?: number;
1587
1587
  amountUsdFormatted: string;
1588
1588
  isAmountUsdLoading: boolean;
1589
+ /** Shows LoadingDots in the balance area. Consumed by simple variants; ignored by the standard view. */
1590
+ isBalanceLoading?: boolean;
1589
1591
  /** Optional inline error message consumed by simple variants. */
1590
1592
  errorMessage?: string;
1591
1593
  /** react-hook-form field registration (name, onBlur, ref) */
@@ -1611,6 +1613,8 @@ interface SwapToCardViewProps {
1611
1613
  isOutputLoading: boolean;
1612
1614
  outputUsdFormatted: string;
1613
1615
  isOutputUsdLoading: boolean;
1616
+ /** Shows LoadingDots in the balance area. Consumed by simple variants; ignored by the standard view. */
1617
+ isBalanceLoading?: boolean;
1614
1618
  }
1615
1619
  declare const SwapToCardView: React__default.FC<SwapToCardViewProps>;
1616
1620
 
@@ -1923,7 +1927,7 @@ interface SwapHistoryItem {
1923
1927
  }
1924
1928
 
1925
1929
  type SwapHistoryViewSimpleProps = Omit<SwapHistoryViewProps, 'onItemClick' | 'pageSize'> & {
1926
- onClose: () => void;
1930
+ onClose?: () => void;
1927
1931
  };
1928
1932
  declare const SwapHistoryViewSimple: React__default.FC<SwapHistoryViewSimpleProps>;
1929
1933
 
package/dist/index.d.ts CHANGED
@@ -1586,6 +1586,8 @@ interface SwapFromCardViewProps {
1586
1586
  maxFractionDigits?: number;
1587
1587
  amountUsdFormatted: string;
1588
1588
  isAmountUsdLoading: boolean;
1589
+ /** Shows LoadingDots in the balance area. Consumed by simple variants; ignored by the standard view. */
1590
+ isBalanceLoading?: boolean;
1589
1591
  /** Optional inline error message consumed by simple variants. */
1590
1592
  errorMessage?: string;
1591
1593
  /** react-hook-form field registration (name, onBlur, ref) */
@@ -1611,6 +1613,8 @@ interface SwapToCardViewProps {
1611
1613
  isOutputLoading: boolean;
1612
1614
  outputUsdFormatted: string;
1613
1615
  isOutputUsdLoading: boolean;
1616
+ /** Shows LoadingDots in the balance area. Consumed by simple variants; ignored by the standard view. */
1617
+ isBalanceLoading?: boolean;
1614
1618
  }
1615
1619
  declare const SwapToCardView: React__default.FC<SwapToCardViewProps>;
1616
1620
 
@@ -1923,7 +1927,7 @@ interface SwapHistoryItem {
1923
1927
  }
1924
1928
 
1925
1929
  type SwapHistoryViewSimpleProps = Omit<SwapHistoryViewProps, 'onItemClick' | 'pageSize'> & {
1926
- onClose: () => void;
1930
+ onClose?: () => void;
1927
1931
  };
1928
1932
  declare const SwapHistoryViewSimple: React__default.FC<SwapHistoryViewSimpleProps>;
1929
1933
 
package/dist/index.js CHANGED
@@ -7127,6 +7127,7 @@ var SwapFromCardViewSimple = ({
7127
7127
  onAmountChange,
7128
7128
  amountUsdFormatted,
7129
7129
  isAmountUsdLoading,
7130
+ isBalanceLoading,
7130
7131
  field,
7131
7132
  percentageOptions,
7132
7133
  onPercentageClick,
@@ -7265,7 +7266,7 @@ var SwapFromCardViewSimple = ({
7265
7266
  {
7266
7267
  "data-test-id": "swap-from-card-simple-balance-value",
7267
7268
  className: amountHasError ? "text-[color:var(--deframe-widget-color-state-error)]" : "text-[color:var(--deframe-widget-color-text-secondary)]",
7268
- children: balanceFormatted
7269
+ children: isBalanceLoading ? /* @__PURE__ */ jsxRuntime.jsx(LoadingDots, {}) : balanceFormatted
7269
7270
  }
7270
7271
  )
7271
7272
  ]
@@ -7284,7 +7285,7 @@ var SwapFromCardViewSimple = ({
7284
7285
  {
7285
7286
  "data-test-id": "swap-from-card-simple-balance-value",
7286
7287
  className: amountHasError ? "text-[color:var(--deframe-widget-color-state-error)]" : "text-[color:var(--deframe-widget-color-text-secondary)]",
7287
- children: balanceFormatted
7288
+ children: isBalanceLoading ? /* @__PURE__ */ jsxRuntime.jsx(LoadingDots, {}) : balanceFormatted
7288
7289
  }
7289
7290
  )
7290
7291
  ]
@@ -7697,7 +7698,8 @@ var SwapToCardViewSimple = ({
7697
7698
  outputAmount,
7698
7699
  isOutputLoading,
7699
7700
  outputUsdFormatted,
7700
- isOutputUsdLoading
7701
+ isOutputUsdLoading,
7702
+ isBalanceLoading
7701
7703
  }) => {
7702
7704
  const handleTokenClick = onNetworkAndAssetClick != null ? onNetworkAndAssetClick : onTokenClick;
7703
7705
  const isEmpty = !outputAmount || Number(outputAmount) === 0;
@@ -7909,7 +7911,7 @@ var SwapToCardViewSimple = ({
7909
7911
  {
7910
7912
  "data-test-id": "swap-to-simple-balance-value",
7911
7913
  className: "text-[color:var(--deframe-widget-color-text-secondary)]",
7912
- children: balanceFormatted
7914
+ children: isBalanceLoading ? /* @__PURE__ */ jsxRuntime.jsx(LoadingDots, {}) : balanceFormatted
7913
7915
  }
7914
7916
  )
7915
7917
  ]
@@ -10339,7 +10341,8 @@ var SwapHistoryViewSimple = ({
10339
10341
  labels,
10340
10342
  isLoading,
10341
10343
  items,
10342
- onClose,
10344
+ onClose = () => {
10345
+ },
10343
10346
  className
10344
10347
  }) => {
10345
10348
  const [query, setQuery] = React6.useState("");