@deframe-sdk/components 0.1.15 → 0.1.17

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.js CHANGED
@@ -252,14 +252,14 @@ function SecondaryButton(_a) {
252
252
  ].join(" ");
253
253
  const stateClasses = {
254
254
  enabled: [
255
- "text-[color:var(--deframe-widget-color-text-secondary)]",
256
- "border-[color:var(--deframe-widget-color-border-secondary)]",
255
+ "text-[color:var(--deframe-widget-color-brand-primary)]",
256
+ "border-[color:var(--deframe-widget-color-brand-primary)]",
257
257
  "hover:opacity-90",
258
258
  "cursor-pointer"
259
259
  ].join(" "),
260
260
  disabled: [
261
- "text-[color:var(--deframe-widget-color-text-secondary-disabled)]",
262
- "border-[color:var(--deframe-widget-color-border-secondary-disabled)]",
261
+ "text-[color:var(--deframe-widget-color-brand-primary-disabled)]",
262
+ "border-[color:var(--deframe-widget-color-brand-primary-disabled)]",
263
263
  "cursor-not-allowed"
264
264
  ].join(" ")
265
265
  };
@@ -389,14 +389,21 @@ function InputField(_a) {
389
389
  "transition-colors"
390
390
  ].join(" ");
391
391
  const stateClasses = {
392
- error: "border border-[var(--deframe-widget-color-state-error)]",
392
+ default: [
393
+ "border border-[var(--deframe-widget-color-border-primary)]",
394
+ "bg-[var(--deframe-widget-color-bg-raised)]"
395
+ ].join(" "),
396
+ error: [
397
+ "border border-[var(--deframe-widget-color-state-error)]",
398
+ "bg-[var(--deframe-widget-color-bg-raised)]"
399
+ ].join(" "),
393
400
  disabled: [
394
401
  "border",
395
402
  "border-[var(--deframe-widget-color-border-primary-disabled)]",
403
+ "bg-[var(--deframe-widget-color-bg-raised-disabled)]",
396
404
  "opacity-60",
397
405
  "cursor-not-allowed"
398
- ].join(" "),
399
- default: "border border-[var(--deframe-widget-color-border-primary)]"
406
+ ].join(" ")
400
407
  };
401
408
  const stateKey = hasError ? "error" : disabled ? "disabled" : "default";
402
409
  const fieldClasses = tailwindMerge.twMerge(baseClasses, stateClasses[stateKey], className);
@@ -439,12 +446,12 @@ function Link(_a) {
439
446
  ].join(" ");
440
447
  const stateClasses = {
441
448
  enabled: [
442
- "text-[color:var(--deframe-widget-color-text-highlight)]",
443
- "underline",
449
+ "text-[color:var(--deframe-widget-color-text-primary)]",
450
+ "hover:underline",
444
451
  "cursor-pointer"
445
452
  ].join(" "),
446
453
  disabled: [
447
- "text-[color:var(--deframe-widget-color-text-highlight-disabled)]",
454
+ "text-[color:var(--deframe-widget-color-text-primary-disabled)]",
448
455
  "cursor-not-allowed",
449
456
  "pointer-events-none"
450
457
  ].join(" ")
@@ -2632,45 +2639,6 @@ var HistoryWithdrawDetailsView = ({
2632
2639
  ] }) })
2633
2640
  ] });
2634
2641
  };
2635
- var SwapNetworkSelectorView = ({
2636
- chainLabel,
2637
- chainImage,
2638
- onClick,
2639
- directionLabel = "De",
2640
- testId = "swap-network-selector",
2641
- className
2642
- }) => {
2643
- const baseClasses = "flex flex-row items-center gap-[var(--deframe-widget-size-gap-xs)]";
2644
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-test-id": testId, className: tailwindMerge.twMerge(baseClasses, className), children: [
2645
- /* @__PURE__ */ jsxRuntime.jsx(TextBody, { as: "span", variant: "text-small", className: "tracking-wide text-[color:var(--deframe-widget-color-text-tertiary)]", children: directionLabel }),
2646
- /* @__PURE__ */ jsxRuntime.jsxs(
2647
- "button",
2648
- {
2649
- "data-testid": testId,
2650
- type: "button",
2651
- onClick,
2652
- className: "ml-[var(--deframe-widget-size-gap-lg)] bg-[var(--deframe-widget-color-bg-tertiary)] border border-[color:var(--deframe-widget-color-border-tertiary)] rounded-[var(--deframe-widget-size-radius-md)] flex items-center gap-[var(--deframe-widget-size-gap-xs)] px-[var(--deframe-widget-size-padding-x-sm)] py-[var(--deframe-widget-size-padding-y-xs)] hover:border-[color:var(--deframe-widget-color-border-secondary)] transition-colors [font-size:var(--deframe-widget-font-size-sm)] [line-height:var(--deframe-widget-font-leading-sm)] text-[color:var(--deframe-widget-color-text-secondary)] cursor-pointer",
2653
- "aria-label": `${directionLabel} ${chainLabel}`,
2654
- children: [
2655
- chainImage ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: chainImage, alt: chainLabel, className: "w-3 h-3 rounded-[var(--deframe-widget-size-radius-full)]" }) : null,
2656
- /* @__PURE__ */ jsxRuntime.jsx("span", { children: chainLabel }),
2657
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center w-[18px] h-[18px]", children: /* @__PURE__ */ jsxRuntime.jsx(hi2.HiChevronDown, { className: "w-3 h-3 text-[color:var(--deframe-widget-color-text-tertiary)]" }) })
2658
- ]
2659
- }
2660
- )
2661
- ] });
2662
- };
2663
- var SwapQuoteHeaderView = ({
2664
- label,
2665
- timerElement,
2666
- className
2667
- }) => {
2668
- const baseClasses = "border-b border-[color:var(--deframe-widget-color-border-secondary)] pb-[var(--deframe-widget-size-padding-y-sm)]";
2669
- return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "swap-quote-header", className: tailwindMerge.twMerge(baseClasses, className), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
2670
- /* @__PURE__ */ jsxRuntime.jsx(TextBody, { as: "span", variant: "text-small", className: "[font-weight:var(--deframe-widget-font-weight-semibold)] text-[color:var(--deframe-widget-color-text-secondary)] inline-flex items-center", children: label }),
2671
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-[var(--deframe-widget-size-gap-md)]", children: timerElement })
2672
- ] }) });
2673
- };
2674
2642
  var SwapAmountInputView = ({
2675
2643
  value,
2676
2644
  hasError,
@@ -2728,127 +2696,6 @@ var SwapAmountInputView = ({
2728
2696
  })
2729
2697
  );
2730
2698
  };
2731
- var SwapOutputAmountView = ({
2732
- displayOutput,
2733
- isLoading,
2734
- loadingElement,
2735
- searchingQuoteLabel = "Searching quote...",
2736
- className
2737
- }) => {
2738
- const baseClasses = "[font-size:var(--deframe-widget-font-size-xxl)] [line-height:var(--deframe-widget-font-leading-xxl)] [font-weight:var(--deframe-widget-font-weight-extrabold)] text-right w-full min-w-[120px] text-[color:var(--deframe-widget-color-text-primary)]";
2739
- return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "swap-flow-output-amount", className: tailwindMerge.twMerge(baseClasses, className), children: isLoading ? /* @__PURE__ */ jsxRuntime.jsx(TextBody, { as: "span", variant: "text-small", className: "text-[color:var(--deframe-widget-color-text-primary-disabled)] inline-flex items-center", children: loadingElement != null ? loadingElement : searchingQuoteLabel }) : displayOutput });
2740
- };
2741
- var SwapQuoteErrorsView = ({
2742
- hasQuoteError,
2743
- hasBytecodeError,
2744
- quoteErrorMessage = "Unable to get quote for this transaction",
2745
- bytecodeErrorMessage = "Error building transaction"
2746
- }) => {
2747
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-test-id": "swap-quote-errors", children: [
2748
- hasQuoteError && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-sm", children: /* @__PURE__ */ jsxRuntime.jsx(
2749
- BannerNotification,
2750
- {
2751
- type: "inline",
2752
- variant: "error",
2753
- message: quoteErrorMessage
2754
- }
2755
- ) }),
2756
- hasBytecodeError && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-sm", children: /* @__PURE__ */ jsxRuntime.jsx(
2757
- BannerNotification,
2758
- {
2759
- type: "inline",
2760
- variant: "error",
2761
- message: bytecodeErrorMessage
2762
- }
2763
- ) })
2764
- ] });
2765
- };
2766
- var SLIPPAGE_OPTIONS = [10, 50, 100];
2767
- var SwapSlippageToleranceButtonsView = ({
2768
- slippageBps,
2769
- onSelect,
2770
- formatPercentage,
2771
- className
2772
- }) => {
2773
- const baseClasses = "flex gap-[var(--deframe-widget-size-gap-xs)]";
2774
- return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "swap-slippage-tolerance-buttons", className: tailwindMerge.twMerge(baseClasses, className), children: SLIPPAGE_OPTIONS.map((option) => {
2775
- const isActive = slippageBps === option;
2776
- const activeClasses = "border-[color:var(--deframe-widget-color-brand-primary)] text-[color:var(--deframe-widget-color-brand-primary)] bg-[color:color-mix(in_srgb,var(--deframe-widget-color-brand-primary)_18%,transparent)]";
2777
- const inactiveClasses = "border-[color:var(--deframe-widget-color-border-tertiary)] text-[color:var(--deframe-widget-color-text-secondary)] bg-[var(--deframe-widget-color-bg-primary)]";
2778
- const buttonBase = "px-[var(--deframe-widget-size-padding-x-sm)] py-[var(--deframe-widget-size-padding-y-xs)] rounded-[var(--deframe-widget-size-radius-xs)] border [font-size:var(--deframe-widget-font-size-sm)] [line-height:var(--deframe-widget-font-leading-sm)] cursor-pointer";
2779
- return /* @__PURE__ */ jsxRuntime.jsx(
2780
- "button",
2781
- {
2782
- "data-test-id": `slippage-option-${option}`,
2783
- type: "button",
2784
- onClick: () => onSelect(option),
2785
- className: tailwindMerge.twMerge(buttonBase, isActive ? activeClasses : inactiveClasses),
2786
- "aria-label": `${formatPercentage(option)}% slippage`,
2787
- "aria-pressed": isActive,
2788
- children: formatPercentage(option)
2789
- },
2790
- option
2791
- );
2792
- }) });
2793
- };
2794
- var SwapTokenSelectorView = ({
2795
- token,
2796
- onClick,
2797
- testId = "swap-token-selector",
2798
- selectTokenLabel = "Select token",
2799
- className
2800
- }) => {
2801
- const baseClasses = "h-[56px] border border-[color:var(--deframe-widget-color-border-secondary)] rounded-[var(--deframe-widget-size-radius-xs)] overflow-hidden hover:border-[color:var(--deframe-widget-color-border-primary)] transition-colors flex items-center px-[var(--deframe-widget-size-padding-x-sm)] py-[6px] w-full cursor-pointer";
2802
- return /* @__PURE__ */ jsxRuntime.jsxs(
2803
- "button",
2804
- {
2805
- "data-test-id": testId,
2806
- type: "button",
2807
- onClick,
2808
- className: tailwindMerge.twMerge(baseClasses, className),
2809
- "aria-label": token ? token.symbol : selectTokenLabel,
2810
- children: [
2811
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-[var(--deframe-widget-size-gap-sm)] flex-1", children: token ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2812
- token.logoURI ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: token.logoURI, alt: token.symbol, className: "w-6 h-6 rounded-[var(--deframe-widget-size-radius-full)]" }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-6 h-6 rounded-[var(--deframe-widget-size-radius-full)] bg-[var(--deframe-widget-color-bg-secondary)] text-[color:var(--deframe-widget-color-text-secondary)] flex items-center justify-center text-[10px] [font-weight:var(--deframe-widget-font-weight-semibold)]", children: (token.symbol || "").slice(0, 3).toUpperCase() }),
2813
- /* @__PURE__ */ jsxRuntime.jsx(TextBody, { as: "span", className: "text-[color:var(--deframe-widget-color-text-primary)]", children: token.symbol })
2814
- ] }) : /* @__PURE__ */ jsxRuntime.jsx(TextBody, { as: "span", className: "text-[color:var(--deframe-widget-color-text-secondary)]", children: selectTokenLabel }) }),
2815
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center w-[18px] h-[18px]", children: /* @__PURE__ */ jsxRuntime.jsx(hi2.HiChevronDown, { className: "w-3 h-3 text-[color:var(--deframe-widget-color-text-tertiary)]" }) })
2816
- ]
2817
- }
2818
- );
2819
- };
2820
- var SwapQuoteBlockchainCostsView = ({
2821
- totalCostFormatted,
2822
- feePercentage,
2823
- gasCostFormatted,
2824
- protocolFee,
2825
- blockchainCostsLabel = "Blockchain Costs",
2826
- networkGasLabel = "Network Gas",
2827
- protocolFeeLabel = "Protocol Fee",
2828
- collapseLabel = "Collapse",
2829
- expandLabel = "Expand"
2830
- }) => {
2831
- return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "swap-quote-blockchain-costs", children: /* @__PURE__ */ jsxRuntime.jsx(
2832
- CollapsibleInfoRow,
2833
- {
2834
- label: blockchainCostsLabel,
2835
- value: `${totalCostFormatted} ~ ${feePercentage}%`,
2836
- defaultOpen: true,
2837
- collapseLabel,
2838
- expandLabel,
2839
- children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-[var(--deframe-widget-size-gap-sm)]", children: [
2840
- /* @__PURE__ */ jsxRuntime.jsxs(InfoRowWithIcon, { children: [
2841
- /* @__PURE__ */ jsxRuntime.jsx(InfoRowIconLabel, { children: networkGasLabel }),
2842
- /* @__PURE__ */ jsxRuntime.jsx(InfoRowIconValue, { children: gasCostFormatted })
2843
- ] }),
2844
- /* @__PURE__ */ jsxRuntime.jsxs(InfoRowWithIcon, { borderBottom: true, children: [
2845
- /* @__PURE__ */ jsxRuntime.jsx(InfoRowIconLabel, { children: protocolFeeLabel }),
2846
- /* @__PURE__ */ jsxRuntime.jsx(InfoRowIconValue, { children: protocolFee })
2847
- ] })
2848
- ] })
2849
- }
2850
- ) });
2851
- };
2852
2699
  var ChooseAStrategyActionsheetView = ({
2853
2700
  isOpen,
2854
2701
  currentActionSheetId,
@@ -2917,8 +2764,16 @@ var StrategyDetailsView = ({
2917
2764
  headerTitle = "Details",
2918
2765
  strategyInfoTitle = "Strategy Info",
2919
2766
  depositButtonLabel = "Deposit",
2920
- backAriaLabel = "Back"
2767
+ backAriaLabel = "Back",
2768
+ error,
2769
+ notFoundMessage
2921
2770
  }) => {
2771
+ if (error) {
2772
+ return /* @__PURE__ */ jsxRuntime.jsx(BackgroundContainer, { children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-text-secondary dark:text-text-secondary-dark p-md", children: error }) });
2773
+ }
2774
+ if (notFoundMessage) {
2775
+ return /* @__PURE__ */ jsxRuntime.jsx(BackgroundContainer, { children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-text-secondary dark:text-text-secondary-dark p-md", children: notFoundMessage }) });
2776
+ }
2922
2777
  return /* @__PURE__ */ jsxRuntime.jsxs(BackgroundContainer, { children: [
2923
2778
  /* @__PURE__ */ jsxRuntime.jsx(DetailsHeader, { title: headerTitle, onBack, backAriaLabel }),
2924
2779
  /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "strategy-details-content", className: "flex-1 min-h-0 overflow-y-auto px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-md)] py-[var(--deframe-widget-size-padding-y-lg)] pb-[var(--deframe-widget-size-padding-y-xxl)]", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-[var(--deframe-widget-size-gap-lg)] min-h-full", children: [
@@ -4127,56 +3982,56 @@ var ChooseAnAssetSwapView = ({
4127
3982
  }
4128
3983
  ) });
4129
3984
  };
4130
- var SwapFormView = ({
4131
- labels,
4132
- onHistoryClick,
4133
- fromCard,
4134
- switchButton,
4135
- toCard,
4136
- advancedSettings,
4137
- transactionDetails,
4138
- confirmButton
3985
+ var SwapTokenSelectorView = ({
3986
+ token,
3987
+ onClick,
3988
+ testId = "swap-token-selector",
3989
+ selectTokenLabel = "Select token",
3990
+ className
4139
3991
  }) => {
4140
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
4141
- /* @__PURE__ */ jsxRuntime.jsx(
4142
- "div",
4143
- {
4144
- "data-testid": "swap-form-view",
4145
- className: "flex-1 min-h-0 overflow-y-auto swap-flow-content pr-sm",
4146
- children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-md text-text-secondary dark:text-text-secondary-dark", children: [
4147
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between gap-md", children: [
4148
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-sm", children: [
4149
- /* @__PURE__ */ jsxRuntime.jsx(TextHeading, { variant: "h5", className: "!text-[21px]", children: /* @__PURE__ */ jsxRuntime.jsx("span", { "data-testid": "swap-flow-title", children: labels.title }) }),
4150
- labels.subtitle && /* @__PURE__ */ jsxRuntime.jsx(TextBody, { variant: "text-small", className: "!text-[14px]", children: labels.subtitle })
4151
- ] }),
4152
- /* @__PURE__ */ jsxRuntime.jsx(
4153
- "button",
4154
- {
4155
- "data-testid": "swap-history-button",
4156
- type: "button",
4157
- onClick: onHistoryClick,
4158
- className: "flex items-center justify-center w-12 h-12 transition-colors rounded-full cursor-pointer text-text-secondary dark:text-text-secondary-dark hover:text-brand-primary",
4159
- "aria-label": labels.historyAriaLabel,
4160
- children: /* @__PURE__ */ jsxRuntime.jsx(md.MdHistory, { className: "w-6 h-6" })
4161
- }
4162
- )
4163
- ] }),
4164
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex flex-col items-stretch gap-sm", children: [
4165
- fromCard,
4166
- switchButton,
4167
- toCard
4168
- ] }),
4169
- advancedSettings,
4170
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "pb-xl", children: transactionDetails })
4171
- ] })
4172
- }
4173
- ),
4174
- /* @__PURE__ */ jsxRuntime.jsx(
4175
- "div",
3992
+ const baseClasses = "h-[56px] border border-[color:var(--deframe-widget-color-border-secondary)] rounded-[var(--deframe-widget-size-radius-xs)] overflow-hidden hover:border-[color:var(--deframe-widget-color-border-primary)] transition-colors flex items-center px-[var(--deframe-widget-size-padding-x-sm)] py-[6px] w-full cursor-pointer";
3993
+ return /* @__PURE__ */ jsxRuntime.jsxs(
3994
+ "button",
3995
+ {
3996
+ "data-test-id": testId,
3997
+ type: "button",
3998
+ onClick,
3999
+ className: tailwindMerge.twMerge(baseClasses, className),
4000
+ "aria-label": token ? token.symbol : selectTokenLabel,
4001
+ children: [
4002
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-[var(--deframe-widget-size-gap-sm)] flex-1", children: token ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
4003
+ token.logoURI ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: token.logoURI, alt: token.symbol, className: "w-6 h-6 rounded-[var(--deframe-widget-size-radius-full)]" }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-6 h-6 rounded-[var(--deframe-widget-size-radius-full)] bg-[var(--deframe-widget-color-bg-secondary)] text-[color:var(--deframe-widget-color-text-secondary)] flex items-center justify-center text-[10px] [font-weight:var(--deframe-widget-font-weight-semibold)]", children: (token.symbol || "").slice(0, 3).toUpperCase() }),
4004
+ /* @__PURE__ */ jsxRuntime.jsx(TextBody, { as: "span", className: "text-[color:var(--deframe-widget-color-text-primary)]", children: token.symbol })
4005
+ ] }) : /* @__PURE__ */ jsxRuntime.jsx(TextBody, { as: "span", className: "text-[color:var(--deframe-widget-color-text-secondary)]", children: selectTokenLabel }) }),
4006
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center w-[18px] h-[18px]", children: /* @__PURE__ */ jsxRuntime.jsx(hi2.HiChevronDown, { className: "w-3 h-3 text-[color:var(--deframe-widget-color-text-tertiary)]" }) })
4007
+ ]
4008
+ }
4009
+ );
4010
+ };
4011
+ var SwapNetworkSelectorView = ({
4012
+ chainLabel,
4013
+ chainImage,
4014
+ onClick,
4015
+ directionLabel = "De",
4016
+ testId = "swap-network-selector",
4017
+ className
4018
+ }) => {
4019
+ const baseClasses = "flex flex-row items-center gap-[var(--deframe-widget-size-gap-xs)]";
4020
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-test-id": testId, className: tailwindMerge.twMerge(baseClasses, className), children: [
4021
+ /* @__PURE__ */ jsxRuntime.jsx(TextBody, { as: "span", variant: "text-small", className: "tracking-wide text-[color:var(--deframe-widget-color-text-tertiary)]", children: directionLabel }),
4022
+ /* @__PURE__ */ jsxRuntime.jsxs(
4023
+ "button",
4176
4024
  {
4177
- "data-testid": "swap-flow-footer",
4178
- className: "border-t p-md border-border-default dark:border-border-default-dark bg-bg-primary dark:bg-bg-primary-dark",
4179
- children: confirmButton
4025
+ "data-testid": testId,
4026
+ type: "button",
4027
+ onClick,
4028
+ className: "ml-[var(--deframe-widget-size-gap-lg)] bg-[var(--deframe-widget-color-bg-tertiary)] border border-[color:var(--deframe-widget-color-border-tertiary)] rounded-[var(--deframe-widget-size-radius-md)] flex items-center gap-[var(--deframe-widget-size-gap-xs)] px-[var(--deframe-widget-size-padding-x-sm)] py-[var(--deframe-widget-size-padding-y-xs)] hover:border-[color:var(--deframe-widget-color-border-secondary)] transition-colors [font-size:var(--deframe-widget-font-size-sm)] [line-height:var(--deframe-widget-font-leading-sm)] text-[color:var(--deframe-widget-color-text-secondary)] cursor-pointer",
4029
+ "aria-label": `${directionLabel} ${chainLabel}`,
4030
+ children: [
4031
+ chainImage ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: chainImage, alt: chainLabel, className: "w-3 h-3 rounded-[var(--deframe-widget-size-radius-full)]" }) : null,
4032
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: chainLabel }),
4033
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center w-[18px] h-[18px]", children: /* @__PURE__ */ jsxRuntime.jsx(hi2.HiChevronDown, { className: "w-3 h-3 text-[color:var(--deframe-widget-color-text-tertiary)]" }) })
4034
+ ]
4180
4035
  }
4181
4036
  )
4182
4037
  ] });
@@ -4197,7 +4052,7 @@ var SwapFromCardView = ({
4197
4052
  maxFractionDigits,
4198
4053
  amountUsdFormatted,
4199
4054
  isAmountUsdLoading,
4200
- amountSlot
4055
+ field
4201
4056
  }) => {
4202
4057
  return /* @__PURE__ */ jsxRuntime.jsx(SectionCard, { className: "flex flex-col gap-sm", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row gap-md items-center", children: [
4203
4058
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-sm flex-1", children: [
@@ -4252,7 +4107,7 @@ var SwapFromCardView = ({
4252
4107
  }
4253
4108
  )
4254
4109
  ] }),
4255
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col flex-1 items-end justify-center gap-xs", children: amountSlot != null ? amountSlot : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
4110
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col flex-1 items-end justify-center gap-xs", children: [
4256
4111
  /* @__PURE__ */ jsxRuntime.jsx(
4257
4112
  SwapAmountInputView,
4258
4113
  {
@@ -4260,7 +4115,8 @@ var SwapFromCardView = ({
4260
4115
  hasError: amountHasError,
4261
4116
  onChange: onAmountChange,
4262
4117
  maxFractionDigits,
4263
- ariaLabel: labels.amountPlaceholder
4118
+ ariaLabel: labels.amountPlaceholder,
4119
+ field
4264
4120
  }
4265
4121
  ),
4266
4122
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -4272,9 +4128,19 @@ var SwapFromCardView = ({
4272
4128
  children: isAmountUsdLoading ? /* @__PURE__ */ jsxRuntime.jsx(LoadingDots, {}) : amountUsdFormatted
4273
4129
  }
4274
4130
  )
4275
- ] }) })
4131
+ ] })
4276
4132
  ] }) });
4277
4133
  };
4134
+ var SwapOutputAmountView = ({
4135
+ displayOutput,
4136
+ isLoading,
4137
+ loadingElement,
4138
+ searchingQuoteLabel = "Searching quote...",
4139
+ className
4140
+ }) => {
4141
+ const baseClasses = "[font-size:var(--deframe-widget-font-size-xxl)] [line-height:var(--deframe-widget-font-leading-xxl)] [font-weight:var(--deframe-widget-font-weight-extrabold)] text-right w-full min-w-[120px] text-[color:var(--deframe-widget-color-text-primary)]";
4142
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "swap-flow-output-amount", className: tailwindMerge.twMerge(baseClasses, className), children: isLoading ? /* @__PURE__ */ jsxRuntime.jsx(TextBody, { as: "span", variant: "text-small", className: "text-[color:var(--deframe-widget-color-text-primary-disabled)] inline-flex items-center", children: loadingElement != null ? loadingElement : searchingQuoteLabel }) : displayOutput });
4143
+ };
4278
4144
  var SwapToCardView = ({
4279
4145
  labels,
4280
4146
  selectedToken,
@@ -4352,6 +4218,152 @@ var SwapToCardView = ({
4352
4218
  ] })
4353
4219
  ] }) });
4354
4220
  };
4221
+ var SLIPPAGE_OPTIONS = [10, 50, 100];
4222
+ var SwapSlippageToleranceButtonsView = ({
4223
+ slippageBps,
4224
+ onSelect,
4225
+ formatPercentage,
4226
+ className
4227
+ }) => {
4228
+ const baseClasses = "flex gap-[var(--deframe-widget-size-gap-xs)]";
4229
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "swap-slippage-tolerance-buttons", className: tailwindMerge.twMerge(baseClasses, className), children: SLIPPAGE_OPTIONS.map((option) => {
4230
+ const isActive = slippageBps === option;
4231
+ const activeClasses = "border-[color:var(--deframe-widget-color-brand-primary)] text-[color:var(--deframe-widget-color-brand-primary)] bg-[color:color-mix(in_srgb,var(--deframe-widget-color-brand-primary)_18%,transparent)]";
4232
+ const inactiveClasses = "border-[color:var(--deframe-widget-color-border-tertiary)] text-[color:var(--deframe-widget-color-text-secondary)] bg-[var(--deframe-widget-color-bg-primary)]";
4233
+ const buttonBase = "px-[var(--deframe-widget-size-padding-x-sm)] py-[var(--deframe-widget-size-padding-y-xs)] rounded-[var(--deframe-widget-size-radius-xs)] border [font-size:var(--deframe-widget-font-size-sm)] [line-height:var(--deframe-widget-font-leading-sm)] cursor-pointer";
4234
+ return /* @__PURE__ */ jsxRuntime.jsx(
4235
+ "button",
4236
+ {
4237
+ "data-test-id": `slippage-option-${option}`,
4238
+ type: "button",
4239
+ onClick: () => onSelect(option),
4240
+ className: tailwindMerge.twMerge(buttonBase, isActive ? activeClasses : inactiveClasses),
4241
+ "aria-label": `${formatPercentage(option)}% slippage`,
4242
+ "aria-pressed": isActive,
4243
+ children: formatPercentage(option)
4244
+ },
4245
+ option
4246
+ );
4247
+ }) });
4248
+ };
4249
+ var SwapAdvancedSettingsView = ({
4250
+ title,
4251
+ isOpen,
4252
+ onOpenChange,
4253
+ slippageBps,
4254
+ onSlippageSelect,
4255
+ formatPercentage,
4256
+ percentageOptions,
4257
+ onPercentageClick,
4258
+ slippageFormatted,
4259
+ collapseText,
4260
+ expandText,
4261
+ maxLabel
4262
+ }) => {
4263
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "pb-2 mt-md", children: /* @__PURE__ */ jsxRuntime.jsx(SectionCard, { children: /* @__PURE__ */ jsxRuntime.jsxs(
4264
+ CollapsibleSection,
4265
+ {
4266
+ title,
4267
+ subtitle: slippageFormatted,
4268
+ open: isOpen,
4269
+ onOpenChange,
4270
+ collapseText,
4271
+ expandText,
4272
+ children: [
4273
+ /* @__PURE__ */ jsxRuntime.jsx(
4274
+ SwapSlippageToleranceButtonsView,
4275
+ {
4276
+ slippageBps,
4277
+ onSelect: onSlippageSelect,
4278
+ formatPercentage,
4279
+ className: "mt-md"
4280
+ }
4281
+ ),
4282
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full mt-md", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex w-full gap-sm", children: percentageOptions.map((pct, index) => {
4283
+ const isMax = index === percentageOptions.length - 1;
4284
+ const label = isMax ? maxLabel : `${pct / 100}%`;
4285
+ return /* @__PURE__ */ jsxRuntime.jsx(
4286
+ PercentageButton,
4287
+ {
4288
+ type: "button",
4289
+ onClick: () => onPercentageClick(pct),
4290
+ children: label
4291
+ },
4292
+ pct
4293
+ );
4294
+ }) }) })
4295
+ ]
4296
+ }
4297
+ ) }) });
4298
+ };
4299
+ var SwapQuoteHeaderView = ({
4300
+ label,
4301
+ timerElement,
4302
+ className
4303
+ }) => {
4304
+ const baseClasses = "border-b border-[color:var(--deframe-widget-color-border-secondary)] pb-[var(--deframe-widget-size-padding-y-sm)]";
4305
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "swap-quote-header", className: tailwindMerge.twMerge(baseClasses, className), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
4306
+ /* @__PURE__ */ jsxRuntime.jsx(TextBody, { as: "span", variant: "text-small", className: "[font-weight:var(--deframe-widget-font-weight-semibold)] text-[color:var(--deframe-widget-color-text-secondary)] inline-flex items-center", children: label }),
4307
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-[var(--deframe-widget-size-gap-md)]", children: timerElement })
4308
+ ] }) });
4309
+ };
4310
+ var SwapQuoteBlockchainCostsView = ({
4311
+ totalCostFormatted,
4312
+ feePercentage,
4313
+ gasCostFormatted,
4314
+ protocolFee,
4315
+ blockchainCostsLabel = "Blockchain Costs",
4316
+ networkGasLabel = "Network Gas",
4317
+ protocolFeeLabel = "Protocol Fee",
4318
+ collapseLabel = "Collapse",
4319
+ expandLabel = "Expand"
4320
+ }) => {
4321
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "swap-quote-blockchain-costs", children: /* @__PURE__ */ jsxRuntime.jsx(
4322
+ CollapsibleInfoRow,
4323
+ {
4324
+ label: blockchainCostsLabel,
4325
+ value: `${totalCostFormatted} ~ ${feePercentage}%`,
4326
+ defaultOpen: true,
4327
+ collapseLabel,
4328
+ expandLabel,
4329
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-[var(--deframe-widget-size-gap-sm)]", children: [
4330
+ /* @__PURE__ */ jsxRuntime.jsxs(InfoRowWithIcon, { children: [
4331
+ /* @__PURE__ */ jsxRuntime.jsx(InfoRowIconLabel, { children: networkGasLabel }),
4332
+ /* @__PURE__ */ jsxRuntime.jsx(InfoRowIconValue, { children: gasCostFormatted })
4333
+ ] }),
4334
+ /* @__PURE__ */ jsxRuntime.jsxs(InfoRowWithIcon, { borderBottom: true, children: [
4335
+ /* @__PURE__ */ jsxRuntime.jsx(InfoRowIconLabel, { children: protocolFeeLabel }),
4336
+ /* @__PURE__ */ jsxRuntime.jsx(InfoRowIconValue, { children: protocolFee })
4337
+ ] })
4338
+ ] })
4339
+ }
4340
+ ) });
4341
+ };
4342
+ var SwapQuoteErrorsView = ({
4343
+ hasQuoteError,
4344
+ hasBytecodeError,
4345
+ quoteErrorMessage = "Unable to get quote for this transaction",
4346
+ bytecodeErrorMessage = "Error building transaction"
4347
+ }) => {
4348
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-test-id": "swap-quote-errors", children: [
4349
+ hasQuoteError && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-sm", children: /* @__PURE__ */ jsxRuntime.jsx(
4350
+ BannerNotification,
4351
+ {
4352
+ type: "inline",
4353
+ variant: "error",
4354
+ message: quoteErrorMessage
4355
+ }
4356
+ ) }),
4357
+ hasBytecodeError && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-sm", children: /* @__PURE__ */ jsxRuntime.jsx(
4358
+ BannerNotification,
4359
+ {
4360
+ type: "inline",
4361
+ variant: "error",
4362
+ message: bytecodeErrorMessage
4363
+ }
4364
+ ) })
4365
+ ] });
4366
+ };
4355
4367
  var SwapQuoteDetailsView = ({
4356
4368
  labels,
4357
4369
  isVisible,
@@ -4422,7 +4434,7 @@ var SwapQuoteDetailsView = ({
4422
4434
  title: labels.headerLabel,
4423
4435
  items,
4424
4436
  defaultOpen: isVisible,
4425
- className: "bg-bg-subtle dark:bg-bg-subtle-dark rounded shadow-sm p-md flex flex-col lg:!bg-bg-raised"
4437
+ className: "rounded shadow-sm p-md flex flex-col bg-[var(--deframe-widget-color-bg-subtle)] lg:bg-[var(--deframe-widget-color-bg-raised)]"
4426
4438
  },
4427
4439
  `details-${isVisible}`
4428
4440
  ),
@@ -4437,56 +4449,6 @@ var SwapQuoteDetailsView = ({
4437
4449
  )
4438
4450
  ] });
4439
4451
  };
4440
- var SwapAdvancedSettingsView = ({
4441
- title,
4442
- isOpen,
4443
- onOpenChange,
4444
- slippageBps,
4445
- onSlippageSelect,
4446
- formatPercentage,
4447
- percentageOptions,
4448
- onPercentageClick,
4449
- slippageFormatted,
4450
- collapseText,
4451
- expandText,
4452
- maxLabel
4453
- }) => {
4454
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "pb-2 mt-md", children: /* @__PURE__ */ jsxRuntime.jsx(SectionCard, { children: /* @__PURE__ */ jsxRuntime.jsxs(
4455
- CollapsibleSection,
4456
- {
4457
- title,
4458
- subtitle: slippageFormatted,
4459
- open: isOpen,
4460
- onOpenChange,
4461
- collapseText,
4462
- expandText,
4463
- children: [
4464
- /* @__PURE__ */ jsxRuntime.jsx(
4465
- SwapSlippageToleranceButtonsView,
4466
- {
4467
- slippageBps,
4468
- onSelect: onSlippageSelect,
4469
- formatPercentage,
4470
- className: "mt-md"
4471
- }
4472
- ),
4473
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full mt-md", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex w-full gap-sm", children: percentageOptions.map((pct, index) => {
4474
- const isMax = index === percentageOptions.length - 1;
4475
- const label = isMax ? maxLabel : `${pct / 100}%`;
4476
- return /* @__PURE__ */ jsxRuntime.jsx(
4477
- PercentageButton,
4478
- {
4479
- type: "button",
4480
- onClick: () => onPercentageClick(pct),
4481
- children: label
4482
- },
4483
- pct
4484
- );
4485
- }) }) })
4486
- ]
4487
- }
4488
- ) }) });
4489
- };
4490
4452
  var ConfirmSwapButtonView = ({
4491
4453
  buttonLabel,
4492
4454
  disabled,
@@ -4506,6 +4468,73 @@ var ConfirmSwapButtonView = ({
4506
4468
  }
4507
4469
  ) });
4508
4470
  };
4471
+ var SwapFormView = ({
4472
+ onSubmit,
4473
+ formRef,
4474
+ labels,
4475
+ onHistoryClick,
4476
+ onSwitchTokens,
4477
+ switchTokensAriaLabel,
4478
+ fromCard,
4479
+ toCard,
4480
+ advancedSettings,
4481
+ transactionDetails,
4482
+ confirmButton
4483
+ }) => {
4484
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
4485
+ /* @__PURE__ */ jsxRuntime.jsx(
4486
+ "div",
4487
+ {
4488
+ "data-testid": "swap-form-view",
4489
+ className: "flex-1 min-h-0 overflow-y-auto swap-flow-content pr-sm",
4490
+ children: /* @__PURE__ */ jsxRuntime.jsx("form", { ref: formRef, onSubmit, "data-testid": "swap-flow-form", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-md text-text-secondary dark:text-text-secondary-dark", children: [
4491
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between gap-md", children: [
4492
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-sm", children: [
4493
+ /* @__PURE__ */ jsxRuntime.jsx(TextHeading, { variant: "h5", className: "!text-[21px]", children: /* @__PURE__ */ jsxRuntime.jsx("span", { "data-testid": "swap-flow-title", children: labels.title }) }),
4494
+ labels.subtitle && /* @__PURE__ */ jsxRuntime.jsx(TextBody, { variant: "text-small", className: "!text-[14px]", children: labels.subtitle })
4495
+ ] }),
4496
+ /* @__PURE__ */ jsxRuntime.jsx(
4497
+ "button",
4498
+ {
4499
+ "data-testid": "swap-history-button",
4500
+ type: "button",
4501
+ onClick: onHistoryClick,
4502
+ className: "flex items-center justify-center w-12 h-12 transition-colors rounded-full cursor-pointer text-text-secondary dark:text-text-secondary-dark hover:text-brand-primary",
4503
+ "aria-label": labels.historyAriaLabel,
4504
+ children: /* @__PURE__ */ jsxRuntime.jsx(md.MdHistory, { className: "w-6 h-6" })
4505
+ }
4506
+ )
4507
+ ] }),
4508
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex flex-col items-stretch gap-sm", children: [
4509
+ /* @__PURE__ */ jsxRuntime.jsx(SwapFromCardView, __spreadValues({}, fromCard)),
4510
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-center -my-5 relative z-10", children: /* @__PURE__ */ jsxRuntime.jsx(
4511
+ "button",
4512
+ {
4513
+ "data-testid": "swap-switch-tokens-button",
4514
+ type: "button",
4515
+ onClick: onSwitchTokens,
4516
+ className: "w-10 h-10 rounded-full bg-brand-secondary shadow-md flex items-center justify-center text-text-primary hover:shadow-lg transition-shadow focus:outline-none focus:ring-2 focus:ring-brand-secondary cursor-pointer",
4517
+ "aria-label": switchTokensAriaLabel,
4518
+ children: /* @__PURE__ */ jsxRuntime.jsx(md.MdOutlineSwapVert, { className: "w-5 h-5" })
4519
+ }
4520
+ ) }),
4521
+ /* @__PURE__ */ jsxRuntime.jsx(SwapToCardView, __spreadValues({}, toCard))
4522
+ ] }),
4523
+ /* @__PURE__ */ jsxRuntime.jsx(SwapAdvancedSettingsView, __spreadValues({}, advancedSettings)),
4524
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "pb-xl", children: /* @__PURE__ */ jsxRuntime.jsx(SwapQuoteDetailsView, __spreadValues({}, transactionDetails)) })
4525
+ ] }) })
4526
+ }
4527
+ ),
4528
+ /* @__PURE__ */ jsxRuntime.jsx(
4529
+ "div",
4530
+ {
4531
+ "data-testid": "swap-flow-footer",
4532
+ className: "border-t p-md border-border-default dark:border-border-default-dark bg-bg-primary dark:bg-bg-primary-dark",
4533
+ children: /* @__PURE__ */ jsxRuntime.jsx(ConfirmSwapButtonView, __spreadValues({}, confirmButton))
4534
+ }
4535
+ )
4536
+ ] });
4537
+ };
4509
4538
  var ChooseANetworkView = ({
4510
4539
  labels,
4511
4540
  autoFocus = true,
@@ -4812,7 +4841,7 @@ var HistoryListSkeleton = () => /* @__PURE__ */ jsxRuntime.jsxs("div", { classNa
4812
4841
  /* @__PURE__ */ jsxRuntime.jsx(HistoryGroupSkeleton, {})
4813
4842
  ] });
4814
4843
  var WalletBalances = ({ cards, variant = "subtle", className }) => {
4815
- const bgClass = variant === "raised" ? "bg-bg-raised dark:bg-bg-raised-dark" : "bg-bg-subtle dark:bg-bg-subtle-dark";
4844
+ const bgClass = variant === "raised" ? "bg-[var(--deframe-widget-color-bg-raised)]" : "bg-[var(--deframe-widget-color-bg-subtle)]";
4816
4845
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: tailwindMerge.twMerge("w-full flex flex-row gap-4 mt-md", className), children: cards.map((card) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: tailwindMerge.twMerge("flex-1 h-auto px-6 py-4 rounded shadow-sm flex flex-col items-start justify-start gap-xs", bgClass), children: [
4817
4846
  /* @__PURE__ */ jsxRuntime.jsx(TextBody, { variant: "text-small", children: card.label }),
4818
4847
  /* @__PURE__ */ jsxRuntime.jsx(TextHeading, { variant: "h3", children: card.value })
@@ -5118,7 +5147,14 @@ var EarnDesktopView = ({
5118
5147
  transactions
5119
5148
  }) => {
5120
5149
  if (isLoading) {
5121
- return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: loadingSkeleton });
5150
+ if (loadingSkeleton) {
5151
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: loadingSkeleton });
5152
+ }
5153
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-[var(--deframe-widget-size-gap-md)] w-full flex-1 min-h-0 animate-pulse px-[var(--deframe-widget-size-padding-x-lg)] py-[var(--deframe-widget-size-padding-y-lg)]", children: [
5154
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-24 rounded bg-[var(--deframe-widget-color-bg-secondary)]" }),
5155
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-40 rounded bg-[var(--deframe-widget-color-bg-secondary)]" }),
5156
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-60 rounded bg-[var(--deframe-widget-color-bg-secondary)]" })
5157
+ ] });
5122
5158
  }
5123
5159
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-[color:var(--deframe-widget-color-text-primary)] flex flex-col relative overflow-y-auto w-full flex-1 min-h-0 pb-[var(--deframe-widget-size-padding-y-lg)] gap-[var(--deframe-widget-size-gap-md)]", children: [
5124
5160
  /* @__PURE__ */ jsxRuntime.jsx(EarnInvestmentSummaryView, __spreadValues({}, summary)),
@@ -5127,28 +5163,32 @@ var EarnDesktopView = ({
5127
5163
  /* @__PURE__ */ jsxRuntime.jsx(EarnRecentTransactionsView, __spreadValues({}, transactions))
5128
5164
  ] });
5129
5165
  };
5130
- var EarnInvestmentDetailsView = ({
5131
- title,
5132
- onBack,
5133
- tokenIcon,
5134
- fiatBalance,
5135
- profitAmount,
5136
- tokenAmount,
5137
- investedLabel,
5138
- earningsLabel,
5139
- summaryTitle,
5140
- summaryItems,
5141
- pastActivitiesTitle,
5142
- transactions,
5143
- onTransactionClick,
5144
- showMoreButton,
5145
- onLoadMore,
5146
- loadMoreLabel,
5147
- depositLabel,
5148
- onDeposit,
5149
- withdrawLabel,
5150
- onWithdraw
5151
- }) => {
5166
+ var EarnInvestmentDetailsView = (props) => {
5167
+ if (props.isLoading) {
5168
+ return /* @__PURE__ */ jsxRuntime.jsx(BackgroundContainer, { children: props.loadingSkeleton });
5169
+ }
5170
+ const {
5171
+ title,
5172
+ onBack,
5173
+ tokenIcon,
5174
+ fiatBalance,
5175
+ profitAmount,
5176
+ tokenAmount,
5177
+ investedLabel,
5178
+ earningsLabel,
5179
+ summaryTitle,
5180
+ summaryItems,
5181
+ pastActivitiesTitle,
5182
+ transactions,
5183
+ onTransactionClick,
5184
+ showMoreButton,
5185
+ onLoadMore,
5186
+ loadMoreLabel,
5187
+ depositLabel,
5188
+ onDeposit,
5189
+ withdrawLabel,
5190
+ onWithdraw
5191
+ } = props;
5152
5192
  return /* @__PURE__ */ jsxRuntime.jsxs(BackgroundContainer, { children: [
5153
5193
  /* @__PURE__ */ jsxRuntime.jsxs(Navbar, { children: [
5154
5194
  /* @__PURE__ */ jsxRuntime.jsx(BackButton, { onClick: onBack }),
@@ -6497,20 +6537,13 @@ exports.SwapCrossChainProcessingView = SwapCrossChainProcessingView;
6497
6537
  exports.SwapFormView = SwapFormView;
6498
6538
  exports.SwapFromCardView = SwapFromCardView;
6499
6539
  exports.SwapHistoryView = SwapHistoryView;
6500
- exports.SwapNetworkSelectorView = SwapNetworkSelectorView;
6501
- exports.SwapOutputAmountView = SwapOutputAmountView;
6502
6540
  exports.SwapProcessingView = SwapProcessingView;
6503
6541
  exports.SwapProcessingViewSimple = SwapProcessingViewSimple;
6504
- exports.SwapQuoteBlockchainCostsView = SwapQuoteBlockchainCostsView;
6505
6542
  exports.SwapQuoteDetailsView = SwapQuoteDetailsView;
6506
- exports.SwapQuoteErrorsView = SwapQuoteErrorsView;
6507
- exports.SwapQuoteHeaderView = SwapQuoteHeaderView;
6508
6543
  exports.SwapSignatureWarningView = SwapSignatureWarningView;
6509
- exports.SwapSlippageToleranceButtonsView = SwapSlippageToleranceButtonsView;
6510
6544
  exports.SwapSuccessView = SwapSuccessView;
6511
6545
  exports.SwapSuccessViewSimple = SwapSuccessViewSimple;
6512
6546
  exports.SwapToCardView = SwapToCardView;
6513
- exports.SwapTokenSelectorView = SwapTokenSelectorView;
6514
6547
  exports.SwapTransactionFailedView = SwapTransactionFailedView;
6515
6548
  exports.SwapTransactionFailedViewSimple = SwapTransactionFailedViewSimple;
6516
6549
  exports.SwapWidgetFallbackView = SwapWidgetFallbackView;