@deframe-sdk/components 0.1.23 → 0.1.25

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
@@ -8,9 +8,6 @@ var framerMotion = require('framer-motion');
8
8
  var md = require('react-icons/md');
9
9
  var io5 = require('react-icons/io5');
10
10
  var pi = require('react-icons/pi');
11
- var Link2 = require('next/link');
12
-
13
- function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
14
11
 
15
12
  function _interopNamespace(e) {
16
13
  if (e && e.__esModule) return e;
@@ -31,7 +28,6 @@ function _interopNamespace(e) {
31
28
  }
32
29
 
33
30
  var React6__namespace = /*#__PURE__*/_interopNamespace(React6);
34
- var Link2__default = /*#__PURE__*/_interopDefault(Link2);
35
31
 
36
32
  var __defProp = Object.defineProperty;
37
33
  var __defProps = Object.defineProperties;
@@ -7443,6 +7439,45 @@ var SwapWidgetFallbackView = ({
7443
7439
  }
7444
7440
  );
7445
7441
  };
7442
+ var Chip = ({
7443
+ label,
7444
+ selected = false,
7445
+ onClick,
7446
+ className
7447
+ }) => {
7448
+ const baseStyles = [
7449
+ "h-8 px-4 rounded-sm",
7450
+ "flex items-center justify-center gap-2",
7451
+ "text-xs font-normal font-poppins leading-5",
7452
+ "transition-colors duration-200 cursor-pointer"
7453
+ ].join(" ");
7454
+ const selectedStyles = selected ? "bg-[var(--deframe-widget-color-brand-secondary)] text-[var(--deframe-widget-color-text-inverse)]" : "bg-transparent border border-[var(--deframe-widget-color-border-default)] text-[var(--deframe-widget-color-text-secondary)] hover:bg-[var(--deframe-widget-color-bg-subtle)]";
7455
+ return /* @__PURE__ */ jsxRuntime.jsx(
7456
+ "button",
7457
+ {
7458
+ type: "button",
7459
+ onClick,
7460
+ className: tailwindMerge.twMerge(baseStyles, selectedStyles, className),
7461
+ children: label
7462
+ }
7463
+ );
7464
+ };
7465
+ var ChipGroup = ({
7466
+ options,
7467
+ selected,
7468
+ onSelect,
7469
+ className
7470
+ }) => {
7471
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: tailwindMerge.twMerge("flex flex-row flex-wrap gap-2", className), children: options.map((option) => /* @__PURE__ */ jsxRuntime.jsx(
7472
+ Chip,
7473
+ {
7474
+ label: option.label,
7475
+ selected: selected === option.value,
7476
+ onClick: () => onSelect(option.value)
7477
+ },
7478
+ option.value
7479
+ )) });
7480
+ };
7446
7481
  var ApyRange = ({ children }) => {
7447
7482
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-right justify-center text-text-highlight text-xs font-normal leading-4", children });
7448
7483
  };
@@ -7568,79 +7603,402 @@ var EarnBalanceCard = ({
7568
7603
  ] })
7569
7604
  ] });
7570
7605
  };
7571
- var EarnInvestmentSummaryView = ({
7572
- overviewDescription,
7573
- totalInvestedLabel,
7574
- totalInvestedValue,
7575
- totalReturnLabel,
7576
- totalReturnValue,
7577
- processingBadgeLabel,
7578
- processingBadgeTitle,
7579
- className
7606
+ var GroupLabel = ({ children }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-text-secondary dark:text-text-secondary-dark text-sm font-medium font-poppins py-3", children });
7607
+ var GroupedStrategyListView = ({
7608
+ isLoading,
7609
+ loadingLabel,
7610
+ error,
7611
+ errorLabel,
7612
+ investedLabel,
7613
+ investedItems,
7614
+ bestPerformanceLabel,
7615
+ bestPerformanceItems,
7616
+ allStrategiesLabel,
7617
+ allStrategiesItems
7580
7618
  }) => {
7581
- return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: tailwindMerge.twMerge("flex flex-col gap-md p-lg bg-[var(--deframe-widget-color-bg-subtle)] rounded", className), children: [
7582
- /* @__PURE__ */ jsxRuntime.jsx(TextBody, { variant: "text-small", className: "text-text-secondary dark:text-text-secondary-dark", children: overviewDescription }),
7583
- /* @__PURE__ */ jsxRuntime.jsx(
7584
- WalletBalances,
7585
- {
7586
- cards: [
7587
- {
7588
- label: totalInvestedLabel,
7589
- value: totalInvestedValue,
7590
- badge: processingBadgeLabel ? /* @__PURE__ */ jsxRuntime.jsx(
7591
- ProcessingBadge,
7619
+ const hasInvested = investedItems.length > 0;
7620
+ const hasBestPerformance = bestPerformanceItems.length > 0;
7621
+ const hasAllStrategies = allStrategiesItems.length > 0;
7622
+ if (isLoading) {
7623
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center py-md", children: [
7624
+ loadingLabel,
7625
+ " ",
7626
+ /* @__PURE__ */ jsxRuntime.jsx(LoadingDots, {})
7627
+ ] });
7628
+ }
7629
+ if (error) {
7630
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-4 text-center text-red-500", children: [
7631
+ errorLabel,
7632
+ ": ",
7633
+ error.message
7634
+ ] });
7635
+ }
7636
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full flex flex-col gap-sm flex-1 min-h-0 overflow-y-auto", children: [
7637
+ hasInvested && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
7638
+ /* @__PURE__ */ jsxRuntime.jsx(GroupLabel, { children: investedLabel }),
7639
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-sm", children: investedItems.map((item) => /* @__PURE__ */ jsxRuntime.jsxs(
7640
+ ListItem,
7641
+ {
7642
+ onClick: () => item.onClick(),
7643
+ children: [
7644
+ /* @__PURE__ */ jsxRuntime.jsx(ListItemLeftSide, { children: /* @__PURE__ */ jsxRuntime.jsx(
7645
+ "img",
7592
7646
  {
7593
- label: processingBadgeLabel,
7594
- title: processingBadgeTitle
7647
+ src: item.logoUrl,
7648
+ alt: item.subtitle,
7649
+ className: "w-10 h-10 rounded-full"
7595
7650
  }
7596
- ) : void 0
7597
- },
7598
- { label: totalReturnLabel, value: totalReturnValue }
7599
- ],
7600
- variant: "raised",
7601
- className: "grid grid-cols-2 gap-md !mt-0"
7651
+ ) }),
7652
+ /* @__PURE__ */ jsxRuntime.jsxs(ListItemContent, { children: [
7653
+ /* @__PURE__ */ jsxRuntime.jsx(TextBody, { children: item.title }),
7654
+ /* @__PURE__ */ jsxRuntime.jsx(TextBody, { variant: "text-small", children: item.subtitle })
7655
+ ] }),
7656
+ /* @__PURE__ */ jsxRuntime.jsx(ListItemRightSide, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row justify-between items-center", children: [
7657
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-end", children: [
7658
+ /* @__PURE__ */ jsxRuntime.jsx(TextBody, { children: item.balanceFormatted }),
7659
+ /* @__PURE__ */ jsxRuntime.jsx(TextBody, { variant: "text-small", children: item.profitFormatted })
7660
+ ] }),
7661
+ /* @__PURE__ */ jsxRuntime.jsx(md.MdArrowRight, { className: "w-6 h-6" })
7662
+ ] }) })
7663
+ ]
7664
+ },
7665
+ `invested-${item.id}`
7666
+ )) })
7667
+ ] }),
7668
+ hasBestPerformance && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
7669
+ /* @__PURE__ */ jsxRuntime.jsx(GroupLabel, { children: bestPerformanceLabel }),
7670
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-sm", children: bestPerformanceItems.map((item) => /* @__PURE__ */ jsxRuntime.jsxs(
7671
+ ListItem,
7672
+ {
7673
+ onClick: () => item.onClick(),
7674
+ children: [
7675
+ /* @__PURE__ */ jsxRuntime.jsx(ListItemLeftSide, { children: /* @__PURE__ */ jsxRuntime.jsx(
7676
+ "img",
7677
+ {
7678
+ src: item.logoUrl,
7679
+ alt: item.subtitle,
7680
+ className: "w-10 h-10 rounded-full"
7681
+ }
7682
+ ) }),
7683
+ /* @__PURE__ */ jsxRuntime.jsxs(ListItemContent, { children: [
7684
+ /* @__PURE__ */ jsxRuntime.jsx(TextBody, { children: item.title }),
7685
+ /* @__PURE__ */ jsxRuntime.jsx(TextBody, { variant: "text-small", children: item.subtitle })
7686
+ ] }),
7687
+ /* @__PURE__ */ jsxRuntime.jsx(ListItemRightSide, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row justify-between items-center", children: [
7688
+ /* @__PURE__ */ jsxRuntime.jsx(ApyRange, { children: item.apyFormatted }),
7689
+ /* @__PURE__ */ jsxRuntime.jsx(md.MdArrowRight, { className: "w-6 h-6" })
7690
+ ] }) })
7691
+ ]
7692
+ },
7693
+ `best-${item.id}`
7694
+ )) })
7695
+ ] }),
7696
+ hasAllStrategies && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
7697
+ /* @__PURE__ */ jsxRuntime.jsx(GroupLabel, { children: allStrategiesLabel }),
7698
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-sm", children: allStrategiesItems.map((item) => /* @__PURE__ */ jsxRuntime.jsxs(
7699
+ ListItem,
7700
+ {
7701
+ onClick: () => item.onClick(),
7702
+ children: [
7703
+ /* @__PURE__ */ jsxRuntime.jsx(ListItemLeftSide, { children: /* @__PURE__ */ jsxRuntime.jsx(
7704
+ "img",
7705
+ {
7706
+ src: item.logoUrl,
7707
+ alt: item.subtitle,
7708
+ className: "w-10 h-10 rounded-full"
7709
+ }
7710
+ ) }),
7711
+ /* @__PURE__ */ jsxRuntime.jsxs(ListItemContent, { children: [
7712
+ /* @__PURE__ */ jsxRuntime.jsx(TextBody, { children: item.title }),
7713
+ /* @__PURE__ */ jsxRuntime.jsx(TextBody, { variant: "text-small", children: item.subtitle })
7714
+ ] }),
7715
+ /* @__PURE__ */ jsxRuntime.jsx(ListItemRightSide, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row justify-between items-center", children: [
7716
+ /* @__PURE__ */ jsxRuntime.jsx(ApyRange, { children: item.apyFormatted }),
7717
+ /* @__PURE__ */ jsxRuntime.jsx(md.MdArrowRight, { className: "w-6 h-6" })
7718
+ ] }) })
7719
+ ]
7720
+ },
7721
+ `all-${item.id}`
7722
+ )) })
7723
+ ] })
7724
+ ] });
7725
+ };
7726
+ var DateLabel = ({ children }) => {
7727
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-text-sm-mobile font-poppins text-text-secondary dark:text-text-secondary-dark", children });
7728
+ };
7729
+ var ArrowBadge = ({ isDeposit }) => {
7730
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute bottom-[-2px] right-[-2px] w-[15px] h-[15px] rounded-full bg-bg-subtle dark:bg-bg-subtle-dark flex items-center justify-center border border-bg-subtle dark:border-bg-subtle-dark", children: isDeposit ? /* @__PURE__ */ jsxRuntime.jsx(md.MdArrowDownward, { className: "w-3 h-3 text-text-primary dark:text-text-primary-dark" }) : /* @__PURE__ */ jsxRuntime.jsx(md.MdArrowUpward, { className: "w-3 h-3 text-text-primary dark:text-text-primary-dark" }) });
7731
+ };
7732
+ var TokenIconWithBadge2 = ({ src, alt, isDeposit }) => {
7733
+ const fallbackText = encodeURIComponent((alt || "TOK").slice(0, 3).toUpperCase());
7734
+ const fallbackSrc = `https://placehold.co/40x40?text=${fallbackText}`;
7735
+ const resolvedSrc = src || fallbackSrc;
7736
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex-shrink-0", children: [
7737
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-10 h-10 rounded-xl bg-bg-muted dark:bg-bg-muted-dark flex items-center justify-center overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx(
7738
+ "img",
7739
+ {
7740
+ src: resolvedSrc,
7741
+ alt,
7742
+ className: "w-full h-full object-cover",
7743
+ onError: (e) => {
7744
+ e.target.src = fallbackSrc;
7745
+ }
7602
7746
  }
7603
- )
7747
+ ) }),
7748
+ /* @__PURE__ */ jsxRuntime.jsx(ArrowBadge, { isDeposit })
7604
7749
  ] });
7605
7750
  };
7606
- var EarnInvestedSectionView = ({
7607
- sectionTitle,
7608
- items,
7609
- onItemClick,
7610
- className
7751
+ var SwapIconWithBadge = ({ src, alt }) => {
7752
+ const fallbackText = encodeURIComponent((alt || "TOK").slice(0, 3).toUpperCase());
7753
+ const fallbackSrc = `https://placehold.co/40x40?text=${fallbackText}`;
7754
+ const resolvedSrc = src || fallbackSrc;
7755
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex-shrink-0", children: [
7756
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-10 h-10 rounded-xl bg-bg-muted dark:bg-bg-muted-dark flex items-center justify-center overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx(
7757
+ "img",
7758
+ {
7759
+ src: resolvedSrc,
7760
+ alt,
7761
+ className: "w-full h-full object-cover",
7762
+ onError: (e) => {
7763
+ e.target.src = fallbackSrc;
7764
+ }
7765
+ }
7766
+ ) }),
7767
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute bottom-[-2px] right-[-2px] w-[15px] h-[15px] rounded-full bg-bg-subtle dark:bg-bg-subtle-dark flex items-center justify-center border border-bg-subtle dark:border-bg-subtle-dark", children: /* @__PURE__ */ jsxRuntime.jsx(md.MdArrowUpward, { className: "w-3 h-3 text-text-primary dark:text-text-primary-dark" }) })
7768
+ ] });
7769
+ };
7770
+ var AmountDisplay = ({ amount, usdAmount }) => {
7771
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
7772
+ /* @__PURE__ */ jsxRuntime.jsx(Label, { className: "text-accent-sm-mobile whitespace-nowrap", children: amount }),
7773
+ usdAmount ? /* @__PURE__ */ jsxRuntime.jsx(Label, { variant: "secondary", className: "whitespace-nowrap", children: usdAmount }) : null
7774
+ ] });
7775
+ };
7776
+ var HistoryListView = ({
7777
+ groups,
7778
+ showLoadMore,
7779
+ onLoadMore,
7780
+ loadMoreLabel,
7781
+ itemClassName
7611
7782
  }) => {
7612
- if (items.length === 0) {
7783
+ if (groups.length === 0) {
7613
7784
  return null;
7614
7785
  }
7615
- return /* @__PURE__ */ jsxRuntime.jsxs(
7616
- "section",
7617
- {
7618
- className: tailwindMerge.twMerge(
7619
- "flex flex-col gap-[var(--deframe-widget-size-gap-md)] p-[var(--deframe-widget-size-padding-x-lg)]",
7620
- "bg-[var(--deframe-widget-color-bg-subtle)] rounded-[var(--deframe-widget-size-radius-sm)]",
7621
- className
7622
- ),
7623
- children: [
7624
- /* @__PURE__ */ jsxRuntime.jsx(TextBody, { variant: "text-small", className: "text-[color:var(--deframe-widget-color-text-secondary)]", children: sectionTitle }),
7625
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-[var(--deframe-widget-size-gap-md)]", children: items.map((item, index) => {
7626
- const isLast = index === items.length - 1;
7627
- return /* @__PURE__ */ jsxRuntime.jsxs(
7628
- "button",
7629
- {
7630
- type: "button",
7631
- onClick: () => onItemClick == null ? void 0 : onItemClick(item.strategyId),
7632
- className: tailwindMerge.twMerge(
7633
- "flex items-center gap-[var(--deframe-widget-size-gap-md)] p-[var(--deframe-widget-size-padding-x-md)] bg-[var(--deframe-widget-color-bg-raised)] rounded-[var(--deframe-widget-size-radius-sm)]",
7634
- "transition-colors cursor-pointer text-left w-full",
7635
- !isLast && "border-b border-[var(--deframe-widget-color-border-secondary)]"
7636
- ),
7637
- children: [
7638
- /* @__PURE__ */ jsxRuntime.jsx(
7639
- "img",
7640
- {
7641
- src: item.logoUrl,
7642
- alt: item.assetName,
7643
- className: "w-10 h-10 rounded-[var(--deframe-widget-size-radius-full)] flex-shrink-0"
7786
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "self-stretch flex flex-col gap-[16px]", children: [
7787
+ groups.map((group) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "self-stretch flex flex-col gap-sm", children: [
7788
+ /* @__PURE__ */ jsxRuntime.jsx(DateLabel, { children: group.dateLabel }),
7789
+ group.items.map((item) => /* @__PURE__ */ jsxRuntime.jsxs(
7790
+ ListItem,
7791
+ {
7792
+ onClick: () => item.onClick(),
7793
+ containerClassName: tailwindMerge.twMerge("!rounded-xs !border-0 !min-h-[72px]", itemClassName),
7794
+ children: [
7795
+ /* @__PURE__ */ jsxRuntime.jsx(ListItemLeftSide, { children: item.isSwap ? /* @__PURE__ */ jsxRuntime.jsx(SwapIconWithBadge, { src: item.iconUrl, alt: item.iconAlt }) : /* @__PURE__ */ jsxRuntime.jsx(
7796
+ TokenIconWithBadge2,
7797
+ {
7798
+ src: item.iconUrl,
7799
+ alt: item.iconAlt,
7800
+ isDeposit: item.isDeposit
7801
+ }
7802
+ ) }),
7803
+ /* @__PURE__ */ jsxRuntime.jsxs(ListItemContent, { children: [
7804
+ /* @__PURE__ */ jsxRuntime.jsx(Label, { className: "text-text-lg-mobile", children: item.title }),
7805
+ /* @__PURE__ */ jsxRuntime.jsx(Label, { variant: "secondary", className: "text-text-tertiary dark:text-text-tertiary-dark", children: item.subtitle }),
7806
+ item.status === "PENDING" && item.statusLabel ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-[6px]", children: /* @__PURE__ */ jsxRuntime.jsx(
7807
+ ProcessingBadge,
7808
+ {
7809
+ label: item.statusLabel,
7810
+ title: item.statusTitle,
7811
+ size: "compact"
7812
+ }
7813
+ ) }) : null
7814
+ ] }),
7815
+ /* @__PURE__ */ jsxRuntime.jsx(ListItemRightSide, { children: /* @__PURE__ */ jsxRuntime.jsx(AmountDisplay, { amount: item.amountFormatted, usdAmount: item.amountUsd }) })
7816
+ ]
7817
+ },
7818
+ item.id
7819
+ ))
7820
+ ] }, group.dateLabel)),
7821
+ showLoadMore && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-center pt-sm", children: /* @__PURE__ */ jsxRuntime.jsx(TertiaryButton, { onClick: onLoadMore, children: loadMoreLabel }) })
7822
+ ] });
7823
+ };
7824
+ var OverviewEarnWidgetTabSkeleton = () => {
7825
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full flex flex-col gap-md", children: [
7826
+ /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { width: "100%", height: "40px", variant: "rect" }),
7827
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-sm", children: [
7828
+ /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { width: "100%", height: "144px", variant: "rect" }),
7829
+ /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { width: "100%", height: "144px", variant: "rect" })
7830
+ ] }),
7831
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full", children: [
7832
+ /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { width: "128px", height: "20px", variant: "text", className: "mb-sm" }),
7833
+ /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { width: "100%", height: "80px", variant: "rect" })
7834
+ ] }),
7835
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full", children: [
7836
+ /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { width: "96px", height: "20px", variant: "text", className: "mb-sm" }),
7837
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-sm", children: [
7838
+ /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { width: "100%", height: "64px", variant: "rect" }),
7839
+ /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { width: "100%", height: "64px", variant: "rect" }),
7840
+ /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { width: "100%", height: "64px", variant: "rect" }),
7841
+ /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { width: "100%", height: "64px", variant: "rect" })
7842
+ ] })
7843
+ ] })
7844
+ ] });
7845
+ };
7846
+ var EarnOverviewView = ({
7847
+ selectedTab,
7848
+ onTabChange,
7849
+ labels,
7850
+ overview,
7851
+ explore,
7852
+ history
7853
+ }) => {
7854
+ return /* @__PURE__ */ jsxRuntime.jsx(BackgroundContainer, { className: "flex flex-col flex-1 min-h-0 px-0", children: /* @__PURE__ */ jsxRuntime.jsxs(Tabs, { value: selectedTab, onValueChange: onTabChange, variant: "default", className: "flex flex-col flex-1 min-h-0", children: [
7855
+ /* @__PURE__ */ jsxRuntime.jsxs(TabsList, { className: "justify-between w-full", children: [
7856
+ /* @__PURE__ */ jsxRuntime.jsx(TabsTrigger, { value: "overview", className: "flex-1", children: labels.tabs.overview }),
7857
+ /* @__PURE__ */ jsxRuntime.jsx(TabsTrigger, { value: "explore", className: "flex-1", children: labels.tabs.explore }),
7858
+ /* @__PURE__ */ jsxRuntime.jsx(TabsTrigger, { value: "history", className: "flex-1", children: labels.tabs.history })
7859
+ ] }),
7860
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col flex-1 w-full min-h-0 px-md pt-md", children: [
7861
+ /* @__PURE__ */ jsxRuntime.jsx(TabsContent, { value: "overview", className: "flex flex-col flex-1 min-h-0", children: overview.isLoading ? /* @__PURE__ */ jsxRuntime.jsx(OverviewEarnWidgetTabSkeleton, {}) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
7862
+ /* @__PURE__ */ jsxRuntime.jsx(WalletBalances, { cards: overview.walletBalances }),
7863
+ /* @__PURE__ */ jsxRuntime.jsx(GroupedStrategyListView, __spreadValues({}, overview.groupedStrategies))
7864
+ ] }) }),
7865
+ /* @__PURE__ */ jsxRuntime.jsxs(TabsContent, { value: "explore", children: [
7866
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-shrink-0 w-full mb-4 h-12", children: /* @__PURE__ */ jsxRuntime.jsx(
7867
+ SearchInput,
7868
+ {
7869
+ value: explore.searchValue,
7870
+ onChange: (value) => explore.onSearchChange(value),
7871
+ placeholder: explore.searchPlaceholder
7872
+ }
7873
+ ) }),
7874
+ explore.isLoading ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center", children: [
7875
+ explore.loadingLabel,
7876
+ /* @__PURE__ */ jsxRuntime.jsx(LoadingDots, {})
7877
+ ] }) : explore.error ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-4 text-center text-red-500", children: [
7878
+ explore.errorLabel,
7879
+ ": ",
7880
+ explore.error.message
7881
+ ] }) : explore.hasFilters && explore.strategies.length === 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full py-md bg-bg-default dark:bg-bg-default-dark rounded-lg flex flex-col gap-sm flex-shrink-0", children: [
7882
+ /* @__PURE__ */ jsxRuntime.jsx(
7883
+ ChipGroup,
7884
+ {
7885
+ options: explore.chipOptions,
7886
+ selected: explore.selectedCategory,
7887
+ onSelect: (value) => explore.onCategorySelect(value)
7888
+ }
7889
+ ),
7890
+ /* @__PURE__ */ jsxRuntime.jsx(SearchEmptyState, { title: explore.emptySearchTitle, description: explore.emptySearchDescription })
7891
+ ] }) : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full py-md bg-bg-default dark:bg-bg-default-dark rounded-lg flex flex-col gap-sm flex-shrink-0", children: [
7892
+ /* @__PURE__ */ jsxRuntime.jsx(
7893
+ ChipGroup,
7894
+ {
7895
+ options: explore.chipOptions,
7896
+ selected: explore.selectedCategory,
7897
+ onSelect: (value) => explore.onCategorySelect(value)
7898
+ }
7899
+ ),
7900
+ /* @__PURE__ */ jsxRuntime.jsx(TextHeading, { variant: "h5", children: explore.bestPerformanceLabel }),
7901
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-sm", children: explore.strategies.map((s) => /* @__PURE__ */ jsxRuntime.jsxs(ListItem, { onClick: () => s.onClick(), children: [
7902
+ /* @__PURE__ */ jsxRuntime.jsx(ListItemLeftSide, { children: /* @__PURE__ */ jsxRuntime.jsx("img", { src: s.logoUrl, alt: s.subtitle, className: "w-10 h-10 rounded-full" }) }),
7903
+ /* @__PURE__ */ jsxRuntime.jsxs(ListItemContent, { children: [
7904
+ /* @__PURE__ */ jsxRuntime.jsx(TextBody, { children: s.title }),
7905
+ /* @__PURE__ */ jsxRuntime.jsx(TextBody, { variant: "text-small", children: s.subtitle })
7906
+ ] }),
7907
+ /* @__PURE__ */ jsxRuntime.jsx(ListItemRightSide, { children: /* @__PURE__ */ jsxRuntime.jsx(TextBody, { children: s.apyFormatted }) })
7908
+ ] }, s.id)) })
7909
+ ] })
7910
+ ] }),
7911
+ /* @__PURE__ */ jsxRuntime.jsx(TabsContent, { value: "history", children: history.isLoading ? /* @__PURE__ */ jsxRuntime.jsx(HistoryListSkeleton, {}) : history.isEmpty ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-[90vh] py-md bg-bg-default dark:bg-bg-default-dark rounded-lg flex flex-col justify-center items-center gap-sm overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full flex flex-col justify-center items-center gap-md", children: [
7912
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col justify-center items-center gap-md text-center", children: [
7913
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-20 h-20 bg-bg-muted dark:bg-bg-muted-dark rounded-full flex justify-center items-center", children: /* @__PURE__ */ jsxRuntime.jsx(pi.PiClockCountdownBold, { className: "w-10 h-10 text-text-tertiary dark:text-text-tertiary-dark" }) }),
7914
+ /* @__PURE__ */ jsxRuntime.jsx(TextHeading, { variant: "h3", children: history.emptyTitle })
7915
+ ] }),
7916
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "self-stretch text-center", children: /* @__PURE__ */ jsxRuntime.jsx(TextBody, { variant: "text-small", children: history.emptyDescription }) })
7917
+ ] }) }) : /* @__PURE__ */ jsxRuntime.jsx(
7918
+ HistoryListView,
7919
+ {
7920
+ groups: history.groups,
7921
+ showLoadMore: history.showLoadMore,
7922
+ onLoadMore: () => history.onLoadMore(),
7923
+ loadMoreLabel: history.loadMoreLabel
7924
+ }
7925
+ ) })
7926
+ ] })
7927
+ ] }) });
7928
+ };
7929
+ var EarnInvestmentSummaryView = ({
7930
+ overviewDescription,
7931
+ totalInvestedLabel,
7932
+ totalInvestedValue,
7933
+ totalReturnLabel,
7934
+ totalReturnValue,
7935
+ processingBadgeLabel,
7936
+ processingBadgeTitle,
7937
+ className
7938
+ }) => {
7939
+ return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: tailwindMerge.twMerge("flex flex-col gap-md p-lg bg-[var(--deframe-widget-color-bg-subtle)] rounded", className), children: [
7940
+ /* @__PURE__ */ jsxRuntime.jsx(TextBody, { variant: "text-small", className: "text-text-secondary dark:text-text-secondary-dark", children: overviewDescription }),
7941
+ /* @__PURE__ */ jsxRuntime.jsx(
7942
+ WalletBalances,
7943
+ {
7944
+ cards: [
7945
+ {
7946
+ label: totalInvestedLabel,
7947
+ value: totalInvestedValue,
7948
+ badge: processingBadgeLabel ? /* @__PURE__ */ jsxRuntime.jsx(
7949
+ ProcessingBadge,
7950
+ {
7951
+ label: processingBadgeLabel,
7952
+ title: processingBadgeTitle
7953
+ }
7954
+ ) : void 0
7955
+ },
7956
+ { label: totalReturnLabel, value: totalReturnValue }
7957
+ ],
7958
+ variant: "raised",
7959
+ className: "grid grid-cols-2 gap-md !mt-0"
7960
+ }
7961
+ )
7962
+ ] });
7963
+ };
7964
+ var EarnInvestedSectionView = ({
7965
+ sectionTitle,
7966
+ items,
7967
+ onItemClick,
7968
+ className
7969
+ }) => {
7970
+ if (items.length === 0) {
7971
+ return null;
7972
+ }
7973
+ return /* @__PURE__ */ jsxRuntime.jsxs(
7974
+ "section",
7975
+ {
7976
+ className: tailwindMerge.twMerge(
7977
+ "flex flex-col gap-[var(--deframe-widget-size-gap-md)] p-[var(--deframe-widget-size-padding-x-lg)]",
7978
+ "bg-[var(--deframe-widget-color-bg-subtle)] rounded-[var(--deframe-widget-size-radius-sm)]",
7979
+ className
7980
+ ),
7981
+ children: [
7982
+ /* @__PURE__ */ jsxRuntime.jsx(TextBody, { variant: "text-small", className: "text-[color:var(--deframe-widget-color-text-secondary)]", children: sectionTitle }),
7983
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-[var(--deframe-widget-size-gap-md)]", children: items.map((item, index) => {
7984
+ const isLast = index === items.length - 1;
7985
+ return /* @__PURE__ */ jsxRuntime.jsxs(
7986
+ "button",
7987
+ {
7988
+ type: "button",
7989
+ onClick: () => onItemClick == null ? void 0 : onItemClick(item.strategyId),
7990
+ className: tailwindMerge.twMerge(
7991
+ "flex items-center gap-[var(--deframe-widget-size-gap-md)] p-[var(--deframe-widget-size-padding-x-md)] bg-[var(--deframe-widget-color-bg-raised)] rounded-[var(--deframe-widget-size-radius-sm)]",
7992
+ "transition-colors cursor-pointer text-left w-full",
7993
+ !isLast && "border-b border-[var(--deframe-widget-color-border-secondary)]"
7994
+ ),
7995
+ children: [
7996
+ /* @__PURE__ */ jsxRuntime.jsx(
7997
+ "img",
7998
+ {
7999
+ src: item.logoUrl,
8000
+ alt: item.assetName,
8001
+ className: "w-10 h-10 rounded-[var(--deframe-widget-size-radius-full)] flex-shrink-0"
7644
8002
  }
7645
8003
  ),
7646
8004
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col flex-1 min-w-0", children: [
@@ -7894,289 +8252,71 @@ var EarnInvestmentDetailsView = (props) => {
7894
8252
  ] }) })
7895
8253
  ] });
7896
8254
  };
7897
- var GroupLabel = ({ children }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-text-secondary dark:text-text-secondary-dark text-sm font-medium font-poppins py-3", children });
7898
- var GroupedStrategyListView = ({
8255
+ var EarnTokenSelectorView = ({
8256
+ selectedToken,
8257
+ onTokenClick,
8258
+ onNetworkClick,
7899
8259
  isLoading,
7900
- loadingLabel,
7901
- error,
7902
- errorLabel,
7903
- investedLabel,
7904
- investedItems,
7905
- bestPerformanceLabel,
7906
- bestPerformanceItems,
7907
- allStrategiesLabel,
7908
- allStrategiesItems
8260
+ selectTokenLabel,
8261
+ chainLabel,
8262
+ chainImage,
8263
+ chainDirectionLabel,
8264
+ chainDisabledTitle,
8265
+ isNetworkDisabled = false,
8266
+ currentNetworkSelected
8267
+ }) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-[10px]", children: [
8268
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex gap-[10px] w-full", children: /* @__PURE__ */ jsxRuntime.jsx(
8269
+ "button",
8270
+ {
8271
+ type: "button",
8272
+ onClick: onTokenClick,
8273
+ className: "flex-1 h-[56px] border border-[var(--deframe-widget-color-border-primary)] rounded overflow-hidden hover:border-[var(--deframe-widget-color-border-primary)] transition-colors",
8274
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex h-full items-center justify-between px-[var(--deframe-widget-size-padding-x-sm)] py-[6px]", children: [
8275
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex gap-[var(--deframe-widget-size-gap-sm)] items-center", children: (selectedToken == null ? void 0 : selectedToken.logoURI) ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
8276
+ /* @__PURE__ */ jsxRuntime.jsx(
8277
+ "img",
8278
+ {
8279
+ src: selectedToken.logoURI,
8280
+ alt: selectedToken.symbol,
8281
+ className: "w-6 h-6 rounded-full"
8282
+ }
8283
+ ),
8284
+ /* @__PURE__ */ jsxRuntime.jsx(TextBody, { as: "span", className: "text-[color:var(--deframe-widget-color-text-primary)]", children: selectedToken.symbol })
8285
+ ] }) : isLoading ? /* @__PURE__ */ jsxRuntime.jsx(LoadingDots, {}) : /* @__PURE__ */ jsxRuntime.jsx(TextBody, { as: "span", className: "text-[color:var(--deframe-widget-color-text-secondary)]", children: selectTokenLabel }) }),
8286
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-[18px] h-[18px] flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(hi2.HiChevronDown, { className: "w-3 h-3 text-[color:var(--deframe-widget-color-text-tertiary)]" }) })
8287
+ ] })
8288
+ }
8289
+ ) }),
8290
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-[var(--deframe-widget-size-gap-sm)] items-center", children: [
8291
+ /* @__PURE__ */ jsxRuntime.jsx(TextBody, { as: "span", variant: "text-small", className: "text-[color:var(--deframe-widget-color-text-tertiary)]", children: chainDirectionLabel }),
8292
+ /* @__PURE__ */ jsxRuntime.jsxs(
8293
+ "button",
8294
+ {
8295
+ type: "button",
8296
+ onClick: () => onNetworkClick == null ? void 0 : onNetworkClick(currentNetworkSelected),
8297
+ disabled: isNetworkDisabled,
8298
+ title: chainDisabledTitle,
8299
+ className: `bg-[var(--deframe-widget-color-bg-tertiary)] border border-[var(--deframe-widget-color-border-secondary)] rounded-lg flex gap-[var(--deframe-widget-size-gap-xs)] items-center px-[var(--deframe-widget-size-padding-x-sm)] py-[var(--deframe-widget-size-padding-y-xs)] transition-colors ${isNetworkDisabled ? "opacity-60 cursor-not-allowed" : "cursor-pointer hover:border-[var(--deframe-widget-color-border-primary)]"}`,
8300
+ children: [
8301
+ chainImage && /* @__PURE__ */ jsxRuntime.jsx("img", { src: chainImage, alt: "", className: "w-3 h-3 rounded-full" }),
8302
+ /* @__PURE__ */ jsxRuntime.jsx(TextBody, { as: "span", variant: "text-small", className: "text-[color:var(--deframe-widget-color-text-secondary)]", children: chainLabel }),
8303
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: `w-[18px] h-[18px] flex items-center justify-center ${isNetworkDisabled ? "opacity-50" : ""}`, children: /* @__PURE__ */ jsxRuntime.jsx(hi2.HiChevronDown, { className: "w-3 h-3 text-[color:var(--deframe-widget-color-text-tertiary)]" }) })
8304
+ ]
8305
+ }
8306
+ )
8307
+ ] })
8308
+ ] });
8309
+ var EarnAmountInputView = ({
8310
+ value,
8311
+ onChange,
8312
+ ariaLabel,
8313
+ dollarAmountFormatted,
8314
+ availableBalanceFormatted
7909
8315
  }) => {
7910
- const hasInvested = investedItems.length > 0;
7911
- const hasBestPerformance = bestPerformanceItems.length > 0;
7912
- const hasAllStrategies = allStrategiesItems.length > 0;
7913
- if (isLoading) {
7914
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center py-md", children: [
7915
- loadingLabel,
7916
- " ",
7917
- /* @__PURE__ */ jsxRuntime.jsx(LoadingDots, {})
7918
- ] });
7919
- }
7920
- if (error) {
7921
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-4 text-center text-red-500", children: [
7922
- errorLabel,
7923
- ": ",
7924
- error.message
7925
- ] });
7926
- }
7927
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full flex flex-col gap-sm flex-1 min-h-0 overflow-y-auto", children: [
7928
- hasInvested && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
7929
- /* @__PURE__ */ jsxRuntime.jsx(GroupLabel, { children: investedLabel }),
7930
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-sm", children: investedItems.map((item) => /* @__PURE__ */ jsxRuntime.jsxs(
7931
- ListItem,
7932
- {
7933
- onClick: () => item.onClick(),
7934
- children: [
7935
- /* @__PURE__ */ jsxRuntime.jsx(ListItemLeftSide, { children: /* @__PURE__ */ jsxRuntime.jsx(
7936
- "img",
7937
- {
7938
- src: item.logoUrl,
7939
- alt: item.subtitle,
7940
- className: "w-10 h-10 rounded-full"
7941
- }
7942
- ) }),
7943
- /* @__PURE__ */ jsxRuntime.jsxs(ListItemContent, { children: [
7944
- /* @__PURE__ */ jsxRuntime.jsx(TextBody, { children: item.title }),
7945
- /* @__PURE__ */ jsxRuntime.jsx(TextBody, { variant: "text-small", children: item.subtitle })
7946
- ] }),
7947
- /* @__PURE__ */ jsxRuntime.jsx(ListItemRightSide, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row justify-between items-center", children: [
7948
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-end", children: [
7949
- /* @__PURE__ */ jsxRuntime.jsx(TextBody, { children: item.balanceFormatted }),
7950
- /* @__PURE__ */ jsxRuntime.jsx(TextBody, { variant: "text-small", children: item.profitFormatted })
7951
- ] }),
7952
- /* @__PURE__ */ jsxRuntime.jsx(md.MdArrowRight, { className: "w-6 h-6" })
7953
- ] }) })
7954
- ]
7955
- },
7956
- `invested-${item.id}`
7957
- )) })
7958
- ] }),
7959
- hasBestPerformance && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
7960
- /* @__PURE__ */ jsxRuntime.jsx(GroupLabel, { children: bestPerformanceLabel }),
7961
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-sm", children: bestPerformanceItems.map((item) => /* @__PURE__ */ jsxRuntime.jsxs(
7962
- ListItem,
7963
- {
7964
- onClick: () => item.onClick(),
7965
- children: [
7966
- /* @__PURE__ */ jsxRuntime.jsx(ListItemLeftSide, { children: /* @__PURE__ */ jsxRuntime.jsx(
7967
- "img",
7968
- {
7969
- src: item.logoUrl,
7970
- alt: item.subtitle,
7971
- className: "w-10 h-10 rounded-full"
7972
- }
7973
- ) }),
7974
- /* @__PURE__ */ jsxRuntime.jsxs(ListItemContent, { children: [
7975
- /* @__PURE__ */ jsxRuntime.jsx(TextBody, { children: item.title }),
7976
- /* @__PURE__ */ jsxRuntime.jsx(TextBody, { variant: "text-small", children: item.subtitle })
7977
- ] }),
7978
- /* @__PURE__ */ jsxRuntime.jsx(ListItemRightSide, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row justify-between items-center", children: [
7979
- /* @__PURE__ */ jsxRuntime.jsx(ApyRange, { children: item.apyFormatted }),
7980
- /* @__PURE__ */ jsxRuntime.jsx(md.MdArrowRight, { className: "w-6 h-6" })
7981
- ] }) })
7982
- ]
7983
- },
7984
- `best-${item.id}`
7985
- )) })
7986
- ] }),
7987
- hasAllStrategies && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
7988
- /* @__PURE__ */ jsxRuntime.jsx(GroupLabel, { children: allStrategiesLabel }),
7989
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-sm", children: allStrategiesItems.map((item) => /* @__PURE__ */ jsxRuntime.jsxs(
7990
- ListItem,
7991
- {
7992
- onClick: () => item.onClick(),
7993
- children: [
7994
- /* @__PURE__ */ jsxRuntime.jsx(ListItemLeftSide, { children: /* @__PURE__ */ jsxRuntime.jsx(
7995
- "img",
7996
- {
7997
- src: item.logoUrl,
7998
- alt: item.subtitle,
7999
- className: "w-10 h-10 rounded-full"
8000
- }
8001
- ) }),
8002
- /* @__PURE__ */ jsxRuntime.jsxs(ListItemContent, { children: [
8003
- /* @__PURE__ */ jsxRuntime.jsx(TextBody, { children: item.title }),
8004
- /* @__PURE__ */ jsxRuntime.jsx(TextBody, { variant: "text-small", children: item.subtitle })
8005
- ] }),
8006
- /* @__PURE__ */ jsxRuntime.jsx(ListItemRightSide, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row justify-between items-center", children: [
8007
- /* @__PURE__ */ jsxRuntime.jsx(ApyRange, { children: item.apyFormatted }),
8008
- /* @__PURE__ */ jsxRuntime.jsx(md.MdArrowRight, { className: "w-6 h-6" })
8009
- ] }) })
8010
- ]
8011
- },
8012
- `all-${item.id}`
8013
- )) })
8014
- ] })
8015
- ] });
8016
- };
8017
- var DateLabel = ({ children }) => {
8018
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-text-sm-mobile font-poppins text-text-secondary dark:text-text-secondary-dark", children });
8019
- };
8020
- var ArrowBadge = ({ isDeposit }) => {
8021
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute bottom-[-2px] right-[-2px] w-[15px] h-[15px] rounded-full bg-bg-subtle dark:bg-bg-subtle-dark flex items-center justify-center border border-bg-subtle dark:border-bg-subtle-dark", children: isDeposit ? /* @__PURE__ */ jsxRuntime.jsx(md.MdArrowDownward, { className: "w-3 h-3 text-text-primary dark:text-text-primary-dark" }) : /* @__PURE__ */ jsxRuntime.jsx(md.MdArrowUpward, { className: "w-3 h-3 text-text-primary dark:text-text-primary-dark" }) });
8022
- };
8023
- var TokenIconWithBadge2 = ({ src, alt, isDeposit }) => {
8024
- const fallbackText = encodeURIComponent((alt || "TOK").slice(0, 3).toUpperCase());
8025
- const fallbackSrc = `https://placehold.co/40x40?text=${fallbackText}`;
8026
- const resolvedSrc = src || fallbackSrc;
8027
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex-shrink-0", children: [
8028
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-10 h-10 rounded-xl bg-bg-muted dark:bg-bg-muted-dark flex items-center justify-center overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx(
8029
- "img",
8030
- {
8031
- src: resolvedSrc,
8032
- alt,
8033
- className: "w-full h-full object-cover",
8034
- onError: (e) => {
8035
- e.target.src = fallbackSrc;
8036
- }
8037
- }
8038
- ) }),
8039
- /* @__PURE__ */ jsxRuntime.jsx(ArrowBadge, { isDeposit })
8040
- ] });
8041
- };
8042
- var SwapIconWithBadge = ({ src, alt }) => {
8043
- const fallbackText = encodeURIComponent((alt || "TOK").slice(0, 3).toUpperCase());
8044
- const fallbackSrc = `https://placehold.co/40x40?text=${fallbackText}`;
8045
- const resolvedSrc = src || fallbackSrc;
8046
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex-shrink-0", children: [
8047
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-10 h-10 rounded-xl bg-bg-muted dark:bg-bg-muted-dark flex items-center justify-center overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx(
8048
- "img",
8049
- {
8050
- src: resolvedSrc,
8051
- alt,
8052
- className: "w-full h-full object-cover",
8053
- onError: (e) => {
8054
- e.target.src = fallbackSrc;
8055
- }
8056
- }
8057
- ) }),
8058
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute bottom-[-2px] right-[-2px] w-[15px] h-[15px] rounded-full bg-bg-subtle dark:bg-bg-subtle-dark flex items-center justify-center border border-bg-subtle dark:border-bg-subtle-dark", children: /* @__PURE__ */ jsxRuntime.jsx(md.MdArrowUpward, { className: "w-3 h-3 text-text-primary dark:text-text-primary-dark" }) })
8059
- ] });
8060
- };
8061
- var AmountDisplay = ({ amount, usdAmount }) => {
8062
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
8063
- /* @__PURE__ */ jsxRuntime.jsx(Label, { className: "text-accent-sm-mobile whitespace-nowrap", children: amount }),
8064
- usdAmount ? /* @__PURE__ */ jsxRuntime.jsx(Label, { variant: "secondary", className: "whitespace-nowrap", children: usdAmount }) : null
8065
- ] });
8066
- };
8067
- var HistoryListView = ({
8068
- groups,
8069
- showLoadMore,
8070
- onLoadMore,
8071
- loadMoreLabel,
8072
- itemClassName
8073
- }) => {
8074
- if (groups.length === 0) {
8075
- return null;
8076
- }
8077
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "self-stretch flex flex-col gap-[16px]", children: [
8078
- groups.map((group) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "self-stretch flex flex-col gap-sm", children: [
8079
- /* @__PURE__ */ jsxRuntime.jsx(DateLabel, { children: group.dateLabel }),
8080
- group.items.map((item) => /* @__PURE__ */ jsxRuntime.jsxs(
8081
- ListItem,
8082
- {
8083
- onClick: () => item.onClick(),
8084
- containerClassName: tailwindMerge.twMerge("!rounded-xs !border-0 !min-h-[72px]", itemClassName),
8085
- children: [
8086
- /* @__PURE__ */ jsxRuntime.jsx(ListItemLeftSide, { children: item.isSwap ? /* @__PURE__ */ jsxRuntime.jsx(SwapIconWithBadge, { src: item.iconUrl, alt: item.iconAlt }) : /* @__PURE__ */ jsxRuntime.jsx(
8087
- TokenIconWithBadge2,
8088
- {
8089
- src: item.iconUrl,
8090
- alt: item.iconAlt,
8091
- isDeposit: item.isDeposit
8092
- }
8093
- ) }),
8094
- /* @__PURE__ */ jsxRuntime.jsxs(ListItemContent, { children: [
8095
- /* @__PURE__ */ jsxRuntime.jsx(Label, { className: "text-text-lg-mobile", children: item.title }),
8096
- /* @__PURE__ */ jsxRuntime.jsx(Label, { variant: "secondary", className: "text-text-tertiary dark:text-text-tertiary-dark", children: item.subtitle }),
8097
- item.status === "PENDING" && item.statusLabel ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-[6px]", children: /* @__PURE__ */ jsxRuntime.jsx(
8098
- ProcessingBadge,
8099
- {
8100
- label: item.statusLabel,
8101
- title: item.statusTitle,
8102
- size: "compact"
8103
- }
8104
- ) }) : null
8105
- ] }),
8106
- /* @__PURE__ */ jsxRuntime.jsx(ListItemRightSide, { children: /* @__PURE__ */ jsxRuntime.jsx(AmountDisplay, { amount: item.amountFormatted, usdAmount: item.amountUsd }) })
8107
- ]
8108
- },
8109
- item.id
8110
- ))
8111
- ] }, group.dateLabel)),
8112
- showLoadMore && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-center pt-sm", children: /* @__PURE__ */ jsxRuntime.jsx(TertiaryButton, { onClick: onLoadMore, children: loadMoreLabel }) })
8113
- ] });
8114
- };
8115
- var EarnTokenSelectorView = ({
8116
- selectedToken,
8117
- onTokenClick,
8118
- onNetworkClick,
8119
- isLoading,
8120
- selectTokenLabel,
8121
- chainLabel,
8122
- chainImage,
8123
- chainDirectionLabel,
8124
- chainDisabledTitle,
8125
- isNetworkDisabled = false,
8126
- currentNetworkSelected
8127
- }) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-[10px]", children: [
8128
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex gap-[10px] w-full", children: /* @__PURE__ */ jsxRuntime.jsx(
8129
- "button",
8130
- {
8131
- type: "button",
8132
- onClick: onTokenClick,
8133
- className: "flex-1 h-[56px] border border-[var(--deframe-widget-color-border-primary)] rounded overflow-hidden hover:border-[var(--deframe-widget-color-border-primary)] transition-colors",
8134
- children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex h-full items-center justify-between px-[var(--deframe-widget-size-padding-x-sm)] py-[6px]", children: [
8135
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex gap-[var(--deframe-widget-size-gap-sm)] items-center", children: (selectedToken == null ? void 0 : selectedToken.logoURI) ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
8136
- /* @__PURE__ */ jsxRuntime.jsx(
8137
- "img",
8138
- {
8139
- src: selectedToken.logoURI,
8140
- alt: selectedToken.symbol,
8141
- className: "w-6 h-6 rounded-full"
8142
- }
8143
- ),
8144
- /* @__PURE__ */ jsxRuntime.jsx(TextBody, { as: "span", className: "text-[color:var(--deframe-widget-color-text-primary)]", children: selectedToken.symbol })
8145
- ] }) : isLoading ? /* @__PURE__ */ jsxRuntime.jsx(LoadingDots, {}) : /* @__PURE__ */ jsxRuntime.jsx(TextBody, { as: "span", className: "text-[color:var(--deframe-widget-color-text-secondary)]", children: selectTokenLabel }) }),
8146
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-[18px] h-[18px] flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(hi2.HiChevronDown, { className: "w-3 h-3 text-[color:var(--deframe-widget-color-text-tertiary)]" }) })
8147
- ] })
8148
- }
8149
- ) }),
8150
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-[var(--deframe-widget-size-gap-sm)] items-center", children: [
8151
- /* @__PURE__ */ jsxRuntime.jsx(TextBody, { as: "span", variant: "text-small", className: "text-[color:var(--deframe-widget-color-text-tertiary)]", children: chainDirectionLabel }),
8152
- /* @__PURE__ */ jsxRuntime.jsxs(
8153
- "button",
8154
- {
8155
- type: "button",
8156
- onClick: () => onNetworkClick == null ? void 0 : onNetworkClick(currentNetworkSelected),
8157
- disabled: isNetworkDisabled,
8158
- title: chainDisabledTitle,
8159
- className: `bg-[var(--deframe-widget-color-bg-tertiary)] border border-[var(--deframe-widget-color-border-secondary)] rounded-lg flex gap-[var(--deframe-widget-size-gap-xs)] items-center px-[var(--deframe-widget-size-padding-x-sm)] py-[var(--deframe-widget-size-padding-y-xs)] transition-colors ${isNetworkDisabled ? "opacity-60 cursor-not-allowed" : "cursor-pointer hover:border-[var(--deframe-widget-color-border-primary)]"}`,
8160
- children: [
8161
- chainImage && /* @__PURE__ */ jsxRuntime.jsx("img", { src: chainImage, alt: "", className: "w-3 h-3 rounded-full" }),
8162
- /* @__PURE__ */ jsxRuntime.jsx(TextBody, { as: "span", variant: "text-small", className: "text-[color:var(--deframe-widget-color-text-secondary)]", children: chainLabel }),
8163
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: `w-[18px] h-[18px] flex items-center justify-center ${isNetworkDisabled ? "opacity-50" : ""}`, children: /* @__PURE__ */ jsxRuntime.jsx(hi2.HiChevronDown, { className: "w-3 h-3 text-[color:var(--deframe-widget-color-text-tertiary)]" }) })
8164
- ]
8165
- }
8166
- )
8167
- ] })
8168
- ] });
8169
- var EarnAmountInputView = ({
8170
- value,
8171
- onChange,
8172
- ariaLabel,
8173
- dollarAmountFormatted,
8174
- availableBalanceFormatted
8175
- }) => {
8176
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 flex flex-col items-end justify-between min-h-[86px] text-right", children: [
8177
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-end text-[color:var(--deframe-widget-color-text-secondary)]", children: [
8178
- /* @__PURE__ */ jsxRuntime.jsx(
8179
- "input",
8316
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 flex flex-col items-end justify-between min-h-[86px] text-right", children: [
8317
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-end text-[color:var(--deframe-widget-color-text-secondary)]", children: [
8318
+ /* @__PURE__ */ jsxRuntime.jsx(
8319
+ "input",
8180
8320
  {
8181
8321
  placeholder: "0.00",
8182
8322
  type: "text",
@@ -9133,7 +9273,7 @@ var DashboardBalancesBreakdown = ({
9133
9273
  }) => {
9134
9274
  if (layout === "horizontal") {
9135
9275
  return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-test-id": "dashboard-balances-breakdown-horizontal", className: "hidden lg:block w-full mt-8", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex w-full gap-4 items-stretch", children: [
9136
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 basis-0 min-w-0 bg-[var(--deframe-widget-color-bg-secondary)] rounded p-4 flex flex-col", children: [
9276
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 basis-0 min-w-0 bg-[var(--deframe-widget-color-bg-raised)] rounded p-4 flex flex-col", children: [
9137
9277
  /* @__PURE__ */ jsxRuntime.jsx(Text_default, { children: "Cripto" }),
9138
9278
  /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { mode: "wait", children: isLoadingBalances ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-5 bg-[var(--deframe-widget-color-bg-muted)] rounded w-32 animate-pulse mt-2" }, "skeleton-crypto") : /* @__PURE__ */ jsxRuntime.jsx(
9139
9279
  framerMotion.motion.div,
@@ -9148,7 +9288,7 @@ var DashboardBalancesBreakdown = ({
9148
9288
  "crypto-value"
9149
9289
  ) })
9150
9290
  ] }),
9151
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 basis-0 min-w-0 bg-[var(--deframe-widget-color-bg-secondary)] rounded p-4 flex flex-col", children: [
9291
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 basis-0 min-w-0 bg-[var(--deframe-widget-color-bg-raised)] rounded p-4 flex flex-col", children: [
9152
9292
  /* @__PURE__ */ jsxRuntime.jsx(Text_default, { children: "Investimentos" }),
9153
9293
  /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { mode: "wait", children: isLoadingBalances ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-5 bg-[var(--deframe-widget-color-bg-muted)] rounded w-32 animate-pulse mt-2" }, "skeleton-earn") : /* @__PURE__ */ jsxRuntime.jsx(
9154
9294
  framerMotion.motion.div,
@@ -9357,7 +9497,7 @@ var DashboardStrategiesListView = ({
9357
9497
  children: /* @__PURE__ */ jsxRuntime.jsxs(
9358
9498
  ListItem,
9359
9499
  {
9360
- containerClassName: `${index > 0 ? "mt-4" : ""}`,
9500
+ containerClassName: `bg-[var(--deframe-widget-color-bg-raised)] ${index > 0 ? "mt-4" : ""}`,
9361
9501
  onClick: () => onStrategyClick(strategy.id),
9362
9502
  children: [
9363
9503
  /* @__PURE__ */ jsxRuntime.jsx(ListItemLeftSide, { children: /* @__PURE__ */ jsxRuntime.jsx(
@@ -9413,15 +9553,15 @@ var DashboardPortfolioView = ({
9413
9553
  "value"
9414
9554
  ) }) }),
9415
9555
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex lg:hidden flex-row gap-2 sm:gap-4 mt-6 w-full", children: [
9416
- /* @__PURE__ */ jsxRuntime.jsx(Link2__default.default, { "data-testid": "dashboard-quick-action-deposit-mobile", href: "/dashboard/deposit", className: "flex-1 min-w-0 cursor-pointer", onClick: onDepositClick, children: /* @__PURE__ */ jsxRuntime.jsxs(PrimaryButton, { children: [
9556
+ /* @__PURE__ */ jsxRuntime.jsx("div", { "data-testid": "dashboard-quick-action-deposit-mobile", className: "flex-1 min-w-0 cursor-pointer", onClick: onDepositClick, children: /* @__PURE__ */ jsxRuntime.jsxs(PrimaryButton, { children: [
9417
9557
  /* @__PURE__ */ jsxRuntime.jsx(md.MdOutlineArrowUpward, { className: "w-4 h-4 shrink-0" }),
9418
9558
  "Depositar"
9419
9559
  ] }) }),
9420
- /* @__PURE__ */ jsxRuntime.jsx(Link2__default.default, { "data-testid": "dashboard-quick-action-withdraw-mobile", href: "/dashboard/withdraw", className: "flex-1 min-w-0 cursor-pointer", onClick: onWithdrawClick, children: /* @__PURE__ */ jsxRuntime.jsxs(PrimaryButton, { children: [
9560
+ /* @__PURE__ */ jsxRuntime.jsx("div", { "data-testid": "dashboard-quick-action-withdraw-mobile", className: "flex-1 min-w-0 cursor-pointer", onClick: onWithdrawClick, children: /* @__PURE__ */ jsxRuntime.jsxs(PrimaryButton, { children: [
9421
9561
  /* @__PURE__ */ jsxRuntime.jsx(md.MdOutlineArrowDownward, { className: "w-4 h-4 shrink-0" }),
9422
9562
  "Sacar"
9423
9563
  ] }) }),
9424
- /* @__PURE__ */ jsxRuntime.jsx(Link2__default.default, { "data-testid": "dashboard-quick-action-swap-mobile", href: "/dashboard/swap", className: "flex-1 min-w-0 cursor-pointer", onClick: onSwapClick, children: /* @__PURE__ */ jsxRuntime.jsxs(PrimaryButton, { children: [
9564
+ /* @__PURE__ */ jsxRuntime.jsx("div", { "data-testid": "dashboard-quick-action-swap-mobile", className: "flex-1 min-w-0 cursor-pointer", onClick: onSwapClick, children: /* @__PURE__ */ jsxRuntime.jsxs(PrimaryButton, { children: [
9425
9565
  /* @__PURE__ */ jsxRuntime.jsx(md.MdOutlineSwapHoriz, { className: "w-4 h-4 shrink-0" }),
9426
9566
  "Trocar"
9427
9567
  ] }) })
@@ -9446,18 +9586,113 @@ var DashboardPortfolioView = ({
9446
9586
  ) })
9447
9587
  ] }) });
9448
9588
  };
9449
- var DashboardTokensView = ({
9450
- sortedRegularTokens,
9451
- regularTokens,
9452
- isLoadingBalances,
9453
- activeTab,
9454
- onTabChange,
9455
- strategiesContent
9589
+ var cardClasses = tailwindMerge.twMerge(
9590
+ "w-full self-start flex flex-col gap-[var(--deframe-widget-size-gap-sm)]",
9591
+ "bg-[var(--deframe-widget-color-bg-secondary)] border border-[color:var(--deframe-widget-color-border-secondary)]",
9592
+ "rounded-[var(--deframe-widget-size-radius-md)]",
9593
+ "px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-md)]"
9594
+ );
9595
+ var labelClasses = tailwindMerge.twMerge(
9596
+ "text-[color:var(--deframe-widget-color-text-tertiary)]",
9597
+ "text-[11px] [font-weight:var(--deframe-widget-font-weight-medium)] uppercase tracking-[0.08em]",
9598
+ "[line-height:1.4]"
9599
+ );
9600
+ var valueLgClasses = tailwindMerge.twMerge(
9601
+ "text-[38px] [font-weight:var(--deframe-widget-font-weight-bold)] [line-height:1.15]",
9602
+ "text-[color:var(--deframe-widget-color-text-primary)]"
9603
+ );
9604
+ var descriptionClasses = "text-[color:var(--deframe-widget-color-text-secondary)] text-[13px] [line-height:1.45]";
9605
+ function StatCardSkeletonBlock({ showDescription, className }) {
9606
+ return /* @__PURE__ */ jsxRuntime.jsxs(
9607
+ "article",
9608
+ {
9609
+ "data-test-id": "stat-card-skeleton",
9610
+ "aria-busy": "true",
9611
+ className: tailwindMerge.twMerge(cardClasses, "self-stretch", className),
9612
+ children: [
9613
+ /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { variant: "rect", width: 140, height: 11 }),
9614
+ /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { variant: "rect", width: "60%", height: 44 }),
9615
+ showDescription && /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { variant: "rect", width: "80%", height: 13 })
9616
+ ]
9617
+ }
9618
+ );
9619
+ }
9620
+ var DashboardPortfolioViewSimple = ({
9621
+ formattedTotalValue,
9622
+ isLoading,
9623
+ assetCount
9456
9624
  }) => {
9457
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
9458
- /* @__PURE__ */ jsxRuntime.jsx(DashboardTokenListView, { tokens: sortedRegularTokens, isLoading: isLoadingBalances, className: "hidden lg:block" }),
9459
- /* @__PURE__ */ jsxRuntime.jsx(DashboardCard, { className: "lg:hidden p-6 bg-[var(--deframe-widget-color-bg-subtle)]", children: /* @__PURE__ */ jsxRuntime.jsxs(
9460
- Tabs,
9625
+ if (isLoading) {
9626
+ return /* @__PURE__ */ jsxRuntime.jsxs(
9627
+ "div",
9628
+ {
9629
+ "data-test-id": "dashboard-portfolio-simple",
9630
+ className: "grid grid-cols-[1fr_auto] gap-[var(--deframe-widget-size-gap-sm)]",
9631
+ children: [
9632
+ /* @__PURE__ */ jsxRuntime.jsx(StatCardSkeletonBlock, { showDescription: true }),
9633
+ /* @__PURE__ */ jsxRuntime.jsx(StatCardSkeletonBlock, { className: "min-w-[160px]" })
9634
+ ]
9635
+ }
9636
+ );
9637
+ }
9638
+ return /* @__PURE__ */ jsxRuntime.jsxs(
9639
+ "div",
9640
+ {
9641
+ "data-test-id": "dashboard-portfolio-simple",
9642
+ className: tailwindMerge.twMerge(
9643
+ "grid gap-[var(--deframe-widget-size-gap-sm)]",
9644
+ assetCount != null ? "grid-cols-[1fr_auto]" : "grid-cols-1"
9645
+ ),
9646
+ children: [
9647
+ /* @__PURE__ */ jsxRuntime.jsxs("article", { className: tailwindMerge.twMerge(cardClasses, "self-stretch"), children: [
9648
+ /* @__PURE__ */ jsxRuntime.jsx("p", { "data-test-id": "stat-card-label", className: labelClasses, children: "Total da Carteira (USD)" }),
9649
+ /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { mode: "wait", children: /* @__PURE__ */ jsxRuntime.jsx(
9650
+ framerMotion.motion.p,
9651
+ {
9652
+ "data-test-id": "stat-card-value",
9653
+ initial: { opacity: 0, y: 10 },
9654
+ animate: { opacity: 1, y: 0 },
9655
+ exit: { opacity: 0, y: -10 },
9656
+ transition: { duration: 0.5, ease: "easeOut" },
9657
+ className: valueLgClasses,
9658
+ children: formattedTotalValue
9659
+ },
9660
+ "value"
9661
+ ) }),
9662
+ /* @__PURE__ */ jsxRuntime.jsx("p", { "data-test-id": "stat-card-description", className: descriptionClasses, children: "Soma do saldo por token (em USD)." })
9663
+ ] }),
9664
+ assetCount != null && /* @__PURE__ */ jsxRuntime.jsxs("article", { className: tailwindMerge.twMerge(cardClasses, "self-stretch min-w-[160px]"), children: [
9665
+ /* @__PURE__ */ jsxRuntime.jsx("p", { "data-test-id": "stat-card-label", className: labelClasses, children: "Ativos" }),
9666
+ /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { mode: "wait", children: /* @__PURE__ */ jsxRuntime.jsx(
9667
+ framerMotion.motion.p,
9668
+ {
9669
+ "data-test-id": "stat-card-value",
9670
+ initial: { opacity: 0, y: 10 },
9671
+ animate: { opacity: 1, y: 0 },
9672
+ exit: { opacity: 0, y: -10 },
9673
+ transition: { duration: 0.5, ease: "easeOut" },
9674
+ className: valueLgClasses,
9675
+ children: assetCount
9676
+ },
9677
+ "count-value"
9678
+ ) })
9679
+ ] })
9680
+ ]
9681
+ }
9682
+ );
9683
+ };
9684
+ var DashboardTokensView = ({
9685
+ sortedRegularTokens,
9686
+ regularTokens,
9687
+ isLoadingBalances,
9688
+ activeTab,
9689
+ onTabChange,
9690
+ strategiesContent
9691
+ }) => {
9692
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
9693
+ /* @__PURE__ */ jsxRuntime.jsx(DashboardTokenListView, { tokens: sortedRegularTokens, isLoading: isLoadingBalances, className: "hidden lg:block" }),
9694
+ /* @__PURE__ */ jsxRuntime.jsx(DashboardCard, { className: "lg:hidden p-6 bg-[var(--deframe-widget-color-bg-subtle)]", children: /* @__PURE__ */ jsxRuntime.jsxs(
9695
+ Tabs,
9461
9696
  {
9462
9697
  value: activeTab,
9463
9698
  onValueChange: (value) => onTabChange(value),
@@ -9476,6 +9711,366 @@ var DashboardTokensView = ({
9476
9711
  ) })
9477
9712
  ] });
9478
9713
  };
9714
+
9715
+ // src/utils/isDustValue.ts
9716
+ var DUST_THRESHOLD_USD = 0.01;
9717
+ function isDustValue(amountInUSD) {
9718
+ return isNaN(amountInUSD) || amountInUSD < DUST_THRESHOLD_USD;
9719
+ }
9720
+ function HistoryButton2({ onClick }) {
9721
+ return /* @__PURE__ */ jsxRuntime.jsx(
9722
+ "button",
9723
+ {
9724
+ type: "button",
9725
+ "aria-label": "Hist\xF3rico de transa\xE7\xF5es",
9726
+ "data-test-id": "dashboard-home-history-button",
9727
+ onClick,
9728
+ className: tailwindMerge.twMerge(
9729
+ "inline-flex items-center justify-center",
9730
+ "w-9 h-9",
9731
+ "rounded-[var(--deframe-widget-size-radius-sm)]",
9732
+ "border-none bg-transparent",
9733
+ "cursor-pointer outline-none flex-shrink-0",
9734
+ "text-[color:var(--deframe-widget-color-text-secondary)]",
9735
+ "hover:bg-[color:color-mix(in_srgb,var(--deframe-widget-color-bg-tertiary)_92%,transparent)]",
9736
+ "transition-[background] duration-150"
9737
+ ),
9738
+ children: /* @__PURE__ */ jsxRuntime.jsxs(
9739
+ "svg",
9740
+ {
9741
+ viewBox: "0 0 24 24",
9742
+ width: "20",
9743
+ height: "20",
9744
+ fill: "none",
9745
+ stroke: "currentColor",
9746
+ strokeWidth: "2",
9747
+ strokeLinecap: "round",
9748
+ strokeLinejoin: "round",
9749
+ "aria-hidden": "true",
9750
+ children: [
9751
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "12", cy: "12", r: "10" }),
9752
+ /* @__PURE__ */ jsxRuntime.jsx("polyline", { points: "12 6 12 12 16 14" })
9753
+ ]
9754
+ }
9755
+ )
9756
+ }
9757
+ );
9758
+ }
9759
+ var GRID_COLS = "grid grid-cols-[40px_1fr_auto] sm:grid-cols-[1fr_160px_130px] gap-x-[var(--deframe-widget-size-gap-sm)] sm:gap-x-[var(--deframe-widget-size-gap-md)]";
9760
+ function IconCircle3({ item, size = 36, className }) {
9761
+ const [imgError, setImgError] = React6__namespace.default.useState(false);
9762
+ if (item.iconUrl && !imgError) {
9763
+ return /* @__PURE__ */ jsxRuntime.jsx(
9764
+ "img",
9765
+ {
9766
+ "data-test-id": "icon-circle-img",
9767
+ src: item.iconUrl,
9768
+ alt: item.name,
9769
+ width: size,
9770
+ height: size,
9771
+ className: tailwindMerge.twMerge("rounded-[var(--deframe-widget-size-radius-full)] flex-shrink-0 object-cover", className),
9772
+ onError: () => setImgError(true)
9773
+ }
9774
+ );
9775
+ }
9776
+ return /* @__PURE__ */ jsxRuntime.jsx(
9777
+ "div",
9778
+ {
9779
+ "data-test-id": "icon-circle-fallback",
9780
+ className: tailwindMerge.twMerge(
9781
+ "rounded-[var(--deframe-widget-size-radius-full)] flex-shrink-0 flex items-center justify-center",
9782
+ "[font-weight:var(--deframe-widget-font-weight-bold)] text-[color:var(--deframe-widget-color-text-primary-dark)]",
9783
+ className
9784
+ ),
9785
+ style: {
9786
+ width: size,
9787
+ height: size,
9788
+ background: item.color,
9789
+ fontSize: size * 0.33,
9790
+ letterSpacing: "-0.01em"
9791
+ },
9792
+ children: item.name.slice(0, 2).toUpperCase()
9793
+ }
9794
+ );
9795
+ }
9796
+ function TokenIcon3({ token, size = 36, badge, badgeSize = 14, className }) {
9797
+ return /* @__PURE__ */ jsxRuntime.jsxs(
9798
+ "div",
9799
+ {
9800
+ "data-test-id": "token-icon",
9801
+ className: tailwindMerge.twMerge("relative flex-shrink-0", className),
9802
+ style: { width: size, height: size },
9803
+ children: [
9804
+ /* @__PURE__ */ jsxRuntime.jsx(IconCircle3, { item: token, size }),
9805
+ badge && /* @__PURE__ */ jsxRuntime.jsx(
9806
+ "div",
9807
+ {
9808
+ "data-test-id": "token-icon-badge",
9809
+ className: "absolute -bottom-0.5 -right-0.5 rounded-[var(--deframe-widget-size-radius-full)] shadow-[0_0_0_2px_var(--deframe-widget-color-bg-secondary)]",
9810
+ children: /* @__PURE__ */ jsxRuntime.jsx(IconCircle3, { item: badge, size: badgeSize })
9811
+ }
9812
+ )
9813
+ ]
9814
+ }
9815
+ );
9816
+ }
9817
+ var directionClasses = {
9818
+ up: "bg-[color:color-mix(in_srgb,var(--deframe-widget-color-state-success)_12%,transparent)] border-[color:color-mix(in_srgb,var(--deframe-widget-color-state-success)_32%,transparent)] text-[color:var(--deframe-widget-color-state-success)]",
9819
+ down: "bg-[color:color-mix(in_srgb,var(--deframe-widget-color-state-error)_16%,transparent)] border-[color:color-mix(in_srgb,var(--deframe-widget-color-state-error)_32%,transparent)] text-[color:var(--deframe-widget-color-state-error)]",
9820
+ neutral: "bg-[color:color-mix(in_srgb,var(--deframe-widget-color-bg-tertiary)_84%,transparent)] border-[color:var(--deframe-widget-color-border-secondary)] text-[color:var(--deframe-widget-color-text-tertiary)]"
9821
+ };
9822
+ var arrowIcons = {
9823
+ up: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "8", height: "8", viewBox: "0 0 10 10", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M5 1.5L9 7H1L5 1.5Z", fill: "currentColor" }) }),
9824
+ down: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "8", height: "8", viewBox: "0 0 10 10", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M5 8.5L1 3H9L5 8.5Z", fill: "currentColor" }) }),
9825
+ neutral: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "9", height: "9", viewBox: "0 0 12 12", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M2 6H10", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }) })
9826
+ };
9827
+ function AssetTrendBadge({ direction, value, className }) {
9828
+ return /* @__PURE__ */ jsxRuntime.jsxs(
9829
+ "span",
9830
+ {
9831
+ "data-test-id": "asset-trend-badge",
9832
+ className: tailwindMerge.twMerge(
9833
+ "inline-flex items-center gap-[var(--deframe-widget-size-gap-xs)]",
9834
+ "px-[var(--deframe-widget-size-padding-x-sm)] py-[var(--deframe-widget-size-padding-y-xs)]",
9835
+ "rounded-[var(--deframe-widget-size-radius-full)] border",
9836
+ "text-[length:var(--deframe-widget-font-size-xs)] [font-weight:var(--deframe-widget-font-weight-medium)] leading-[var(--deframe-widget-font-leading-xs)]",
9837
+ "font-[var(--deframe-widget-font-family)]",
9838
+ "whitespace-nowrap",
9839
+ directionClasses[direction],
9840
+ className
9841
+ ),
9842
+ children: [
9843
+ arrowIcons[direction],
9844
+ value
9845
+ ]
9846
+ }
9847
+ );
9848
+ }
9849
+ var SKELETON_NAME_WIDTHS = [100, 88, 112, 96, 104, 80];
9850
+ var SKELETON_SYMBOL_WIDTHS = [56, 64, 52, 68, 60, 72];
9851
+ var SKELETON_BALANCE_WIDTHS = [72, 64, 80, 68, 76, 60];
9852
+ function AssetListSkeletonRow({ index }) {
9853
+ const w = index % SKELETON_NAME_WIDTHS.length;
9854
+ return /* @__PURE__ */ jsxRuntime.jsxs(
9855
+ "div",
9856
+ {
9857
+ "data-test-id": "asset-list-skeleton-row",
9858
+ className: tailwindMerge.twMerge(
9859
+ GRID_COLS,
9860
+ "items-center",
9861
+ "px-[var(--deframe-widget-size-padding-x-md)] py-[11px]",
9862
+ "border-t border-[color:var(--deframe-widget-color-border-secondary)]"
9863
+ ),
9864
+ children: [
9865
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-[var(--deframe-widget-size-gap-sm)]", children: [
9866
+ /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { variant: "circle", width: 36, height: 36 }),
9867
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "hidden sm:flex flex-col gap-[var(--deframe-widget-size-gap-xs)]", children: [
9868
+ /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { variant: "rect", width: SKELETON_NAME_WIDTHS[w], height: 14 }),
9869
+ /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { variant: "rect", width: SKELETON_SYMBOL_WIDTHS[w], height: 11 })
9870
+ ] })
9871
+ ] }),
9872
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { variant: "rect", width: 88, height: 24, className: "rounded-[var(--deframe-widget-size-radius-full)]" }) }),
9873
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-end gap-[var(--deframe-widget-size-gap-xs)]", children: [
9874
+ /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { variant: "rect", width: SKELETON_BALANCE_WIDTHS[w], height: 14 }),
9875
+ /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { variant: "rect", width: SKELETON_BALANCE_WIDTHS[w] - 12, height: 11 })
9876
+ ] })
9877
+ ]
9878
+ }
9879
+ );
9880
+ }
9881
+ function AssetListSkeletonContent() {
9882
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
9883
+ /* @__PURE__ */ jsxRuntime.jsxs(
9884
+ "div",
9885
+ {
9886
+ className: tailwindMerge.twMerge(
9887
+ "flex items-center justify-between",
9888
+ "px-[var(--deframe-widget-size-padding-x-md)] pt-[var(--deframe-widget-size-padding-y-md)] pb-[var(--deframe-widget-size-padding-y-sm)]"
9889
+ ),
9890
+ children: [
9891
+ /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { variant: "rect", width: 108, height: 18 }),
9892
+ /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { variant: "rect", width: 36, height: 36, className: "rounded-[var(--deframe-widget-size-radius-sm)]" })
9893
+ ]
9894
+ }
9895
+ ),
9896
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-[var(--deframe-widget-size-gap-sm)] px-[var(--deframe-widget-size-padding-x-md)] pb-[var(--deframe-widget-size-padding-y-sm)]", children: [
9897
+ /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { variant: "rect", width: 60, height: 26, className: "rounded-[var(--deframe-widget-size-radius-full)]" }),
9898
+ /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { variant: "rect", width: 104, height: 26, className: "rounded-[var(--deframe-widget-size-radius-full)]" }),
9899
+ /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { variant: "rect", width: 64, height: 26, className: "rounded-[var(--deframe-widget-size-radius-full)]" })
9900
+ ] }),
9901
+ /* @__PURE__ */ jsxRuntime.jsxs(
9902
+ "div",
9903
+ {
9904
+ className: tailwindMerge.twMerge(
9905
+ GRID_COLS,
9906
+ "px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-sm)]",
9907
+ "border-t border-[color:var(--deframe-widget-color-border-secondary)]"
9908
+ ),
9909
+ children: [
9910
+ /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { variant: "rect", width: 40, height: 10, className: "hidden sm:block" }),
9911
+ /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { variant: "rect", width: 72, height: 10, className: "hidden sm:block mx-auto" }),
9912
+ /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { variant: "rect", width: 40, height: 10, className: "hidden sm:block ml-auto" })
9913
+ ]
9914
+ }
9915
+ ),
9916
+ Array.from({ length: 6 }, (_, i) => /* @__PURE__ */ jsxRuntime.jsx(AssetListSkeletonRow, { index: i }, i))
9917
+ ] });
9918
+ }
9919
+ var DashboardTokensViewSimple = ({
9920
+ sortedRegularTokens,
9921
+ isLoadingBalances,
9922
+ filters,
9923
+ selectedFilter,
9924
+ onFilterSelect,
9925
+ onHistoryClick
9926
+ }) => {
9927
+ if (isLoadingBalances) {
9928
+ return /* @__PURE__ */ jsxRuntime.jsx(
9929
+ "div",
9930
+ {
9931
+ "data-test-id": "asset-list-skeleton",
9932
+ "aria-busy": "true",
9933
+ "aria-label": "Carregando ativos\u2026",
9934
+ className: tailwindMerge.twMerge(
9935
+ "w-full self-start flex flex-col",
9936
+ "bg-[var(--deframe-widget-color-bg-secondary)] border border-[color:var(--deframe-widget-color-border-secondary)]",
9937
+ "rounded-[var(--deframe-widget-size-radius-md)]",
9938
+ "overflow-hidden"
9939
+ ),
9940
+ children: /* @__PURE__ */ jsxRuntime.jsx(AssetListSkeletonContent, {})
9941
+ }
9942
+ );
9943
+ }
9944
+ return /* @__PURE__ */ jsxRuntime.jsxs(
9945
+ "div",
9946
+ {
9947
+ "data-test-id": "asset-list",
9948
+ className: tailwindMerge.twMerge(
9949
+ "w-full self-start flex flex-col",
9950
+ "bg-[var(--deframe-widget-color-bg-secondary)] border border-[color:var(--deframe-widget-color-border-secondary)]",
9951
+ "rounded-[var(--deframe-widget-size-radius-md)]",
9952
+ "overflow-hidden"
9953
+ ),
9954
+ children: [
9955
+ /* @__PURE__ */ jsxRuntime.jsxs(
9956
+ "div",
9957
+ {
9958
+ "data-test-id": "asset-list-header",
9959
+ className: tailwindMerge.twMerge(
9960
+ "flex items-center justify-between",
9961
+ "px-[var(--deframe-widget-size-padding-x-md)] pt-[var(--deframe-widget-size-padding-y-md)] pb-[var(--deframe-widget-size-padding-y-sm)]"
9962
+ ),
9963
+ children: [
9964
+ /* @__PURE__ */ jsxRuntime.jsx(
9965
+ "h3",
9966
+ {
9967
+ className: "text-[color:var(--deframe-widget-color-text-primary)] text-[length:var(--deframe-widget-font-size-md)] [font-weight:var(--deframe-widget-font-weight-semibold)] font-[var(--deframe-widget-font-family)] leading-[var(--deframe-widget-font-leading-md)]",
9968
+ children: "Seus ativos"
9969
+ }
9970
+ ),
9971
+ onHistoryClick != null && /* @__PURE__ */ jsxRuntime.jsx(HistoryButton2, { onClick: onHistoryClick })
9972
+ ]
9973
+ }
9974
+ ),
9975
+ filters && filters.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
9976
+ "div",
9977
+ {
9978
+ "data-test-id": "asset-list-filter",
9979
+ className: tailwindMerge.twMerge(
9980
+ "flex items-center gap-[var(--deframe-widget-size-gap-sm)]",
9981
+ "px-[var(--deframe-widget-size-padding-x-md)] pb-[var(--deframe-widget-size-padding-y-sm)]",
9982
+ "overflow-x-auto [scrollbar-width:none]"
9983
+ ),
9984
+ children: filters.map((filter) => {
9985
+ const isSelected = filter.id === selectedFilter;
9986
+ return /* @__PURE__ */ jsxRuntime.jsx(
9987
+ "button",
9988
+ {
9989
+ type: "button",
9990
+ "data-test-id": "asset-list-filter-pill",
9991
+ onClick: () => onFilterSelect == null ? void 0 : onFilterSelect(filter.id),
9992
+ className: tailwindMerge.twMerge(
9993
+ "inline-flex items-center",
9994
+ "px-[var(--deframe-widget-size-padding-x-sm)] py-[5px]",
9995
+ "rounded-[var(--deframe-widget-size-radius-full)] border",
9996
+ "text-[length:var(--deframe-widget-font-size-xs)] [font-weight:var(--deframe-widget-font-weight-medium)] leading-[var(--deframe-widget-font-leading-xs)]",
9997
+ "font-[var(--deframe-widget-font-family)]",
9998
+ "cursor-pointer whitespace-nowrap flex-shrink-0",
9999
+ "outline-none transition-all duration-150",
10000
+ isSelected ? "bg-[color:color-mix(in_srgb,var(--deframe-widget-color-brand-primary)_12%,transparent)] border-[color:color-mix(in_srgb,var(--deframe-widget-color-brand-primary)_32%,transparent)] text-[color:var(--deframe-widget-color-brand-primary)]" : "bg-transparent border-[color:var(--deframe-widget-color-border-secondary)] text-[color:var(--deframe-widget-color-text-secondary)] hover:bg-[color:color-mix(in_srgb,var(--deframe-widget-color-bg-tertiary)_60%,transparent)]"
10001
+ ),
10002
+ children: filter.label
10003
+ },
10004
+ filter.id
10005
+ );
10006
+ })
10007
+ }
10008
+ ),
10009
+ /* @__PURE__ */ jsxRuntime.jsxs(
10010
+ "div",
10011
+ {
10012
+ "data-test-id": "asset-list-columns",
10013
+ className: tailwindMerge.twMerge(
10014
+ GRID_COLS,
10015
+ "px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-sm)]",
10016
+ "border-t border-[color:var(--deframe-widget-color-border-secondary)]"
10017
+ ),
10018
+ children: [
10019
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[length:var(--deframe-widget-font-size-xs)] [font-weight:var(--deframe-widget-font-weight-medium)] uppercase tracking-[0.08em] text-[color:var(--deframe-widget-color-text-tertiary)] leading-[var(--deframe-widget-font-leading-xs)]", children: "ATIVO" }),
10020
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[length:var(--deframe-widget-font-size-xs)] [font-weight:var(--deframe-widget-font-weight-medium)] uppercase tracking-[0.08em] text-[color:var(--deframe-widget-color-text-tertiary)] leading-[var(--deframe-widget-font-leading-xs)] text-center", children: "TEND\xCANCIA" }),
10021
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[length:var(--deframe-widget-font-size-xs)] [font-weight:var(--deframe-widget-font-weight-medium)] uppercase tracking-[0.08em] text-[color:var(--deframe-widget-color-text-tertiary)] leading-[var(--deframe-widget-font-leading-xs)] text-right", children: "SALDO" })
10022
+ ]
10023
+ }
10024
+ ),
10025
+ sortedRegularTokens.filter((t) => !isDustValue(t.amountInUSD)).map((item) => {
10026
+ var _a, _b;
10027
+ const m = item.metadata;
10028
+ const color = (_a = m == null ? void 0 : m.color) != null ? _a : "#888";
10029
+ const trendDirection = m == null ? void 0 : m.trendDirection;
10030
+ const trendValue = m == null ? void 0 : m.trendValue;
10031
+ const networkColor = (_b = m == null ? void 0 : m.networkColor) != null ? _b : "var(--deframe-widget-color-bg-tertiary)";
10032
+ const networkBadge = item.networkName ? { name: item.networkName, color: networkColor, iconUrl: item.networkLogoUrl } : void 0;
10033
+ const handleItemClick = item.onClick;
10034
+ return /* @__PURE__ */ jsxRuntime.jsxs(
10035
+ "div",
10036
+ {
10037
+ "data-test-id": "asset-list-item",
10038
+ onClick: handleItemClick,
10039
+ className: tailwindMerge.twMerge(
10040
+ GRID_COLS,
10041
+ "items-center",
10042
+ "px-[var(--deframe-widget-size-padding-x-md)] py-[11px]",
10043
+ "border-t border-[color:var(--deframe-widget-color-border-secondary)]",
10044
+ "transition-colors duration-150",
10045
+ "hover:bg-[color:color-mix(in_srgb,var(--deframe-widget-color-bg-tertiary)_60%,transparent)]",
10046
+ handleItemClick && "cursor-pointer"
10047
+ ),
10048
+ children: [
10049
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-[var(--deframe-widget-size-gap-sm)] min-w-0", children: [
10050
+ /* @__PURE__ */ jsxRuntime.jsx(TokenIcon3, { token: { name: item.name, color, iconUrl: item.logoUrl }, size: 36, badge: networkBadge, badgeSize: 14 }),
10051
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col min-w-0", children: [
10052
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[length:var(--deframe-widget-font-size-sm)] [font-weight:var(--deframe-widget-font-weight-semibold)] text-[color:var(--deframe-widget-color-text-primary)] leading-[var(--deframe-widget-font-leading-sm)] font-[var(--deframe-widget-font-family)] truncate", children: item.name }),
10053
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[length:var(--deframe-widget-font-size-xs)] text-[color:var(--deframe-widget-color-text-secondary)] leading-[var(--deframe-widget-font-leading-xs)]", children: item.symbol })
10054
+ ] })
10055
+ ] }),
10056
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-center", children: trendDirection && trendValue ? /* @__PURE__ */ jsxRuntime.jsx(AssetTrendBadge, { direction: trendDirection, value: trendValue }) : null }),
10057
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-end text-right", children: [
10058
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[length:var(--deframe-widget-font-size-sm)] [font-weight:var(--deframe-widget-font-weight-semibold)] text-[color:var(--deframe-widget-color-text-primary)] leading-[var(--deframe-widget-font-leading-sm)] font-[var(--deframe-widget-font-family)]", children: item.formattedFiatValue }),
10059
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-[length:var(--deframe-widget-font-size-xs)] text-[color:var(--deframe-widget-color-text-secondary)] leading-[var(--deframe-widget-font-leading-xs)]", children: [
10060
+ item.formattedAmount,
10061
+ " ",
10062
+ item.symbol
10063
+ ] })
10064
+ ] })
10065
+ ]
10066
+ },
10067
+ item.id
10068
+ );
10069
+ })
10070
+ ]
10071
+ }
10072
+ );
10073
+ };
9479
10074
  var DashboardRecentTransactionsView = ({
9480
10075
  isLoading,
9481
10076
  isEmpty,
@@ -9485,7 +10080,7 @@ var DashboardRecentTransactionsView = ({
9485
10080
  return /* @__PURE__ */ jsxRuntime.jsx(DashboardCard, { className: "p-6 bg-[var(--deframe-widget-color-bg-subtle)]", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col", children: [
9486
10081
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between items-start", children: [
9487
10082
  /* @__PURE__ */ jsxRuntime.jsx(TextBody, { className: "mb-6", children: "Transa\xE7\xF5es recentes" }),
9488
- /* @__PURE__ */ jsxRuntime.jsx(Link2__default.default, { href: "/dashboard/history", onClick: onViewAllClick, children: /* @__PURE__ */ jsxRuntime.jsx(TextBody, { className: "text-[var(--deframe-widget-color-brand-primary)] cursor-pointer hover:underline", children: "Ver todas" }) })
10083
+ /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", onClick: onViewAllClick, children: /* @__PURE__ */ jsxRuntime.jsx(TextBody, { className: "text-[var(--deframe-widget-color-brand-primary)] cursor-pointer hover:underline", children: "Ver todas" }) })
9489
10084
  ] }),
9490
10085
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-2 mt-[-16px]", children: isLoading ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-4", children: [1, 2, 3].map((i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3 p-2", children: [
9491
10086
  /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { variant: "circle", width: "40px", height: "40px", shimmer: true }),
@@ -9500,12 +10095,12 @@ var DashboardRecentTransactionsView = ({
9500
10095
  return /* @__PURE__ */ jsxRuntime.jsxs(
9501
10096
  ListItem,
9502
10097
  {
9503
- containerClassName: "p-2 mt-4 bg-[var(--deframe-widget-color-bg-secondary)] cursor-pointer",
10098
+ containerClassName: "p-2 mt-4 bg-[var(--deframe-widget-color-bg-raised)] cursor-pointer",
9504
10099
  onClick: () => item.onClick(),
9505
10100
  children: [
9506
10101
  /* @__PURE__ */ jsxRuntime.jsx(ListItemLeftSide, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
9507
10102
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: `w-10 h-10 rounded-full ${item.iconBgColor} flex items-center justify-center`, children: /* @__PURE__ */ jsxRuntime.jsx(MainIcon, { className: `${item.iconColor}`, size: 20 }) }),
9508
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute -bottom-1 -right-1 w-5 h-5 rounded-full bg-[var(--deframe-widget-color-bg-secondary)] flex items-center justify-center border border-[var(--deframe-widget-color-border-secondary)]", children: /* @__PURE__ */ jsxRuntime.jsx(TypeIcon, { className: `${item.iconColor}`, size: 12 }) })
10103
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute -bottom-1 -right-1 w-5 h-5 rounded-full flex items-center justify-center border border-[var(--deframe-widget-color-border-secondary)]", children: /* @__PURE__ */ jsxRuntime.jsx(TypeIcon, { className: `${item.iconColor}`, size: 12 }) })
9509
10104
  ] }) }),
9510
10105
  /* @__PURE__ */ jsxRuntime.jsxs(ListItemContent, { className: "ml-4", children: [
9511
10106
  /* @__PURE__ */ jsxRuntime.jsx(TextBody, { variant: "text-small", children: item.formattedDate }),
@@ -9522,6 +10117,300 @@ var DashboardRecentTransactionsView = ({
9522
10117
  }) })
9523
10118
  ] }) });
9524
10119
  };
10120
+ var variantConfig = {
10121
+ pending: {
10122
+ wrapper: "bg-[color:color-mix(in_srgb,var(--deframe-widget-color-state-warning)_16%,transparent)] border-[color:color-mix(in_srgb,var(--deframe-widget-color-state-warning)_32%,transparent)]",
10123
+ dotClass: "bg-[var(--deframe-widget-color-state-warning)]",
10124
+ labelClass: "text-[color:var(--deframe-widget-color-state-warning)]",
10125
+ label: "Pendente"
10126
+ },
10127
+ confirmed: {
10128
+ wrapper: "bg-[color:color-mix(in_srgb,var(--deframe-widget-color-brand-primary)_12%,transparent)] border-[color:color-mix(in_srgb,var(--deframe-widget-color-brand-primary)_32%,transparent)]",
10129
+ dotClass: "bg-[var(--deframe-widget-color-brand-primary)]",
10130
+ labelClass: "text-[color:var(--deframe-widget-color-brand-primary)]",
10131
+ label: "Confirmado"
10132
+ },
10133
+ approved: {
10134
+ wrapper: "bg-[color:color-mix(in_srgb,var(--deframe-widget-color-brand-primary)_12%,transparent)] border-[color:color-mix(in_srgb,var(--deframe-widget-color-brand-primary)_32%,transparent)]",
10135
+ dotClass: "bg-[var(--deframe-widget-color-brand-primary)]",
10136
+ labelClass: "text-[color:var(--deframe-widget-color-brand-primary)]",
10137
+ label: "Aprovada"
10138
+ },
10139
+ failed: {
10140
+ wrapper: "bg-[color:color-mix(in_srgb,var(--deframe-widget-color-state-error)_16%,transparent)] border-[color:color-mix(in_srgb,var(--deframe-widget-color-state-error)_32%,transparent)]",
10141
+ dotClass: "bg-[var(--deframe-widget-color-state-error)]",
10142
+ labelClass: "text-[color:var(--deframe-widget-color-state-error)]",
10143
+ label: "Falhou"
10144
+ },
10145
+ processing: {
10146
+ wrapper: "bg-[color:color-mix(in_srgb,var(--deframe-widget-color-brand-secondary)_12%,transparent)] border-[color:color-mix(in_srgb,var(--deframe-widget-color-brand-secondary)_32%,transparent)]",
10147
+ dotClass: "bg-[var(--deframe-widget-color-brand-secondary)]",
10148
+ labelClass: "text-[color:var(--deframe-widget-color-brand-secondary)]",
10149
+ label: "Processando"
10150
+ }
10151
+ };
10152
+ function StatusBadge2({ status, label, className }) {
10153
+ const config = variantConfig[status];
10154
+ return /* @__PURE__ */ jsxRuntime.jsxs(
10155
+ "span",
10156
+ {
10157
+ "data-test-id": "status-badge",
10158
+ className: tailwindMerge.twMerge(
10159
+ "inline-flex items-center gap-[5px]",
10160
+ "py-[3px] pr-[10px] pl-[7px]",
10161
+ "rounded-[var(--deframe-widget-size-radius-full)]",
10162
+ "border",
10163
+ config.wrapper,
10164
+ className
10165
+ ),
10166
+ children: [
10167
+ /* @__PURE__ */ jsxRuntime.jsx(
10168
+ "span",
10169
+ {
10170
+ "data-test-id": "status-badge-dot",
10171
+ className: tailwindMerge.twMerge(
10172
+ "w-[7px] h-[7px] rounded-[var(--deframe-widget-size-radius-full)] flex-shrink-0 inline-block",
10173
+ config.dotClass
10174
+ )
10175
+ }
10176
+ ),
10177
+ /* @__PURE__ */ jsxRuntime.jsx(
10178
+ "span",
10179
+ {
10180
+ "data-test-id": "status-badge-label",
10181
+ className: tailwindMerge.twMerge(
10182
+ "text-[11px] [font-weight:var(--deframe-widget-font-weight-medium)] font-[var(--deframe-widget-font-family)]",
10183
+ config.labelClass
10184
+ ),
10185
+ children: label != null ? label : config.label
10186
+ }
10187
+ )
10188
+ ]
10189
+ }
10190
+ );
10191
+ }
10192
+ var DashboardRecentTransactionsViewSimple = ({
10193
+ isLoading,
10194
+ isEmpty,
10195
+ transactions,
10196
+ onClose
10197
+ }) => {
10198
+ const [query, setQuery] = React6.useState("");
10199
+ const filtered = React6.useMemo(() => {
10200
+ const q = query.trim().toLowerCase();
10201
+ if (!q) return transactions;
10202
+ return transactions.filter(
10203
+ (tx) => tx.label.toLowerCase().includes(q) || tx.formattedDate.toLowerCase().includes(q) || tx.rightPrimary.toLowerCase().includes(q) || tx.rightSecondary.toLowerCase().includes(q)
10204
+ );
10205
+ }, [transactions, query]);
10206
+ return /* @__PURE__ */ jsxRuntime.jsxs(
10207
+ "div",
10208
+ {
10209
+ "data-test-id": "dashboard-recent-transactions-simple",
10210
+ className: tailwindMerge.twMerge(
10211
+ "bg-[var(--deframe-widget-color-bg-secondary)]",
10212
+ "rounded-[var(--deframe-widget-size-radius-md)]",
10213
+ "border border-[color:var(--deframe-widget-color-border-secondary)]",
10214
+ "px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-md)]",
10215
+ "flex flex-col gap-[var(--deframe-widget-size-gap-md)] w-full",
10216
+ "font-[var(--deframe-widget-font-family)]"
10217
+ ),
10218
+ children: [
10219
+ /* @__PURE__ */ jsxRuntime.jsxs(
10220
+ "div",
10221
+ {
10222
+ "data-test-id": "dashboard-recent-transactions-simple-header",
10223
+ className: "flex items-start justify-between gap-[var(--deframe-widget-size-gap-sm)]",
10224
+ children: [
10225
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-[4px]", children: [
10226
+ /* @__PURE__ */ jsxRuntime.jsx(
10227
+ "h2",
10228
+ {
10229
+ "data-test-id": "dashboard-recent-transactions-simple-title",
10230
+ className: tailwindMerge.twMerge(
10231
+ "m-0 text-[20px] leading-[1.25]",
10232
+ "[font-weight:var(--deframe-widget-font-weight-bold)]",
10233
+ "text-[color:var(--deframe-widget-color-text-primary)]"
10234
+ ),
10235
+ children: "Hist\xF3rico"
10236
+ }
10237
+ ),
10238
+ /* @__PURE__ */ jsxRuntime.jsx(
10239
+ "p",
10240
+ {
10241
+ "data-test-id": "dashboard-recent-transactions-simple-subtitle",
10242
+ className: "m-0 text-[13px] text-[color:var(--deframe-widget-color-text-secondary)] leading-[1.4]",
10243
+ children: "\xDAltimas transa\xE7\xF5es executadas"
10244
+ }
10245
+ )
10246
+ ] }),
10247
+ onClose && /* @__PURE__ */ jsxRuntime.jsx(
10248
+ CloseButton_default,
10249
+ {
10250
+ onClick: onClose,
10251
+ ariaLabel: "Fechar",
10252
+ className: "flex-shrink-0 mt-[-4px]"
10253
+ }
10254
+ )
10255
+ ]
10256
+ }
10257
+ ),
10258
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-px bg-[var(--deframe-widget-color-border-secondary)]" }),
10259
+ /* @__PURE__ */ jsxRuntime.jsxs(
10260
+ "div",
10261
+ {
10262
+ "data-test-id": "dashboard-recent-transactions-simple-search",
10263
+ className: "relative",
10264
+ children: [
10265
+ /* @__PURE__ */ jsxRuntime.jsx(
10266
+ "input",
10267
+ {
10268
+ "data-test-id": "dashboard-recent-transactions-simple-search-input",
10269
+ type: "text",
10270
+ value: query,
10271
+ onChange: (e) => setQuery(e.target.value),
10272
+ placeholder: "Buscar por status, moeda, rede ou tx...",
10273
+ "aria-label": "Buscar transa\xE7\xE3o",
10274
+ className: [
10275
+ "w-full box-border h-10",
10276
+ "bg-[var(--deframe-widget-color-bg-tertiary)]",
10277
+ "border border-[color:var(--deframe-widget-color-border-secondary)]",
10278
+ "rounded-[var(--deframe-widget-size-radius-sm)]",
10279
+ "py-0 pr-[var(--deframe-widget-size-padding-x-xl)] pl-[14px]",
10280
+ "text-[14px] text-[color:var(--deframe-widget-color-text-primary)]",
10281
+ "outline-none focus:outline-none",
10282
+ "focus:border-[color:var(--deframe-widget-color-brand-primary)]",
10283
+ "transition-colors duration-150",
10284
+ "font-[var(--deframe-widget-font-family)]",
10285
+ "placeholder:text-[color:var(--deframe-widget-color-text-tertiary)]"
10286
+ ].join(" ")
10287
+ }
10288
+ ),
10289
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute right-3 top-1/2 -translate-y-1/2 pointer-events-none text-[color:var(--deframe-widget-color-text-tertiary)]", children: /* @__PURE__ */ jsxRuntime.jsxs(
10290
+ "svg",
10291
+ {
10292
+ width: "15",
10293
+ height: "15",
10294
+ viewBox: "0 0 24 24",
10295
+ fill: "none",
10296
+ stroke: "currentColor",
10297
+ strokeWidth: "2",
10298
+ strokeLinecap: "round",
10299
+ "aria-hidden": "true",
10300
+ children: [
10301
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "11", cy: "11", r: "8" }),
10302
+ /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "21", y1: "21", x2: "16.65", y2: "16.65" })
10303
+ ]
10304
+ }
10305
+ ) })
10306
+ ]
10307
+ }
10308
+ ),
10309
+ /* @__PURE__ */ jsxRuntime.jsx(
10310
+ "div",
10311
+ {
10312
+ "data-test-id": "dashboard-recent-transactions-simple-list",
10313
+ className: "flex flex-col gap-[var(--deframe-widget-size-gap-sm)]",
10314
+ children: isLoading ? [1, 2, 3].map((i) => /* @__PURE__ */ jsxRuntime.jsxs(
10315
+ "div",
10316
+ {
10317
+ className: tailwindMerge.twMerge(
10318
+ "flex flex-col gap-[6px]",
10319
+ "px-[var(--deframe-widget-size-padding-x-md)] py-[14px]",
10320
+ "rounded-[var(--deframe-widget-size-radius-sm)]",
10321
+ "border border-[color:var(--deframe-widget-color-border-secondary)]"
10322
+ ),
10323
+ children: [
10324
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
10325
+ /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { width: "100px", height: "12px", shimmer: true }),
10326
+ /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { width: "80px", height: "20px", shimmer: true, className: "rounded-full" })
10327
+ ] }),
10328
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between", children: [
10329
+ /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { width: "160px", height: "18px", shimmer: true }),
10330
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-end gap-[4px]", children: [
10331
+ /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { width: "96px", height: "14px", shimmer: true }),
10332
+ /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { width: "72px", height: "12px", shimmer: true })
10333
+ ] })
10334
+ ] })
10335
+ ]
10336
+ },
10337
+ i
10338
+ )) : isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(DashboardTransactionsPlaceholder, {}) : filtered.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(
10339
+ "div",
10340
+ {
10341
+ "data-test-id": "dashboard-recent-transactions-simple-no-results",
10342
+ className: "py-[var(--deframe-widget-size-padding-y-xl)] text-center text-[13px] text-[color:var(--deframe-widget-color-text-tertiary)]",
10343
+ children: "Nenhuma transa\xE7\xE3o encontrada"
10344
+ }
10345
+ ) : filtered.map((item) => /* @__PURE__ */ jsxRuntime.jsxs(
10346
+ "div",
10347
+ {
10348
+ "data-test-id": "dashboard-recent-transactions-simple-item",
10349
+ className: tailwindMerge.twMerge(
10350
+ "w-full flex flex-col gap-[6px]",
10351
+ "bg-[var(--deframe-widget-color-bg-secondary)]",
10352
+ "border border-[color:var(--deframe-widget-color-border-secondary)]",
10353
+ "rounded-[var(--deframe-widget-size-radius-sm)]",
10354
+ "px-[var(--deframe-widget-size-padding-x-md)] py-[14px]"
10355
+ ),
10356
+ children: [
10357
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-[var(--deframe-widget-size-gap-sm)]", children: [
10358
+ /* @__PURE__ */ jsxRuntime.jsx(
10359
+ "span",
10360
+ {
10361
+ "data-test-id": "dashboard-recent-transactions-simple-item-date",
10362
+ className: "text-[12px] text-[color:var(--deframe-widget-color-text-tertiary)] leading-none",
10363
+ children: item.formattedDate
10364
+ }
10365
+ ),
10366
+ /* @__PURE__ */ jsxRuntime.jsx(StatusBadge2, { status: "approved" })
10367
+ ] }),
10368
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between gap-[var(--deframe-widget-size-gap-sm)]", children: [
10369
+ /* @__PURE__ */ jsxRuntime.jsx(
10370
+ "span",
10371
+ {
10372
+ "data-test-id": "dashboard-recent-transactions-simple-item-label",
10373
+ className: tailwindMerge.twMerge(
10374
+ "text-[18px] leading-[1.2]",
10375
+ "[font-weight:var(--deframe-widget-font-weight-bold)]",
10376
+ "text-[color:var(--deframe-widget-color-text-primary)]"
10377
+ ),
10378
+ children: item.label
10379
+ }
10380
+ ),
10381
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-end gap-[2px] flex-shrink-0", children: [
10382
+ /* @__PURE__ */ jsxRuntime.jsx(
10383
+ "span",
10384
+ {
10385
+ "data-test-id": "dashboard-recent-transactions-simple-item-primary",
10386
+ className: tailwindMerge.twMerge(
10387
+ "text-[13px] leading-[1.3]",
10388
+ "[font-weight:var(--deframe-widget-font-weight-semibold)]",
10389
+ "text-[color:var(--deframe-widget-color-text-primary)]"
10390
+ ),
10391
+ children: item.rightPrimary
10392
+ }
10393
+ ),
10394
+ item.rightSecondary && /* @__PURE__ */ jsxRuntime.jsx(
10395
+ "span",
10396
+ {
10397
+ "data-test-id": "dashboard-recent-transactions-simple-item-secondary",
10398
+ className: "text-[12px] text-[color:var(--deframe-widget-color-text-secondary)] leading-none",
10399
+ children: item.rightSecondary
10400
+ }
10401
+ )
10402
+ ] })
10403
+ ] })
10404
+ ]
10405
+ },
10406
+ item.id
10407
+ ))
10408
+ }
10409
+ )
10410
+ ]
10411
+ }
10412
+ );
10413
+ };
9525
10414
  var DashboardInvestmentOpportunitiesView = ({
9526
10415
  isLoadingBalances,
9527
10416
  formattedTotalProfit,
@@ -9530,12 +10419,12 @@ var DashboardInvestmentOpportunitiesView = ({
9530
10419
  }) => {
9531
10420
  return /* @__PURE__ */ jsxRuntime.jsx(DashboardCard, { className: "hidden lg:block p-6", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col space-y-4", children: [
9532
10421
  /* @__PURE__ */ jsxRuntime.jsx(TextBody, { variant: "text-large", children: "Oportunidades de investimento" }),
9533
- /* @__PURE__ */ jsxRuntime.jsxs(DashboardCard, { className: "bg-[var(--deframe-widget-color-bg-secondary)] flex flex-col space-y-2 p-4", children: [
10422
+ /* @__PURE__ */ jsxRuntime.jsxs(DashboardCard, { className: "bg-[var(--deframe-widget-color-bg-raised)] flex flex-col space-y-2 p-4", children: [
9534
10423
  /* @__PURE__ */ jsxRuntime.jsx(TextBody, { children: "Rendimentos" }),
9535
10424
  isLoadingBalances ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-baseline gap-2", children: /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { width: "80px", height: "24px", shimmer: true }) }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-baseline gap-2", children: /* @__PURE__ */ jsxRuntime.jsx(TextBody, { variant: "text-large", children: formattedTotalProfit }) })
9536
10425
  ] }),
9537
10426
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col", children: strategiesContent }),
9538
- /* @__PURE__ */ jsxRuntime.jsx(Link2__default.default, { href: "/dashboard/earn", className: "w-full", onClick: onViewAllStrategiesClick, children: /* @__PURE__ */ jsxRuntime.jsx(SecondaryButton, { children: "Ver todas as estrat\xE9gias" }) })
10427
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full", onClick: onViewAllStrategiesClick, children: /* @__PURE__ */ jsxRuntime.jsx(SecondaryButton, { children: "Ver todas as estrat\xE9gias" }) })
9539
10428
  ] }) });
9540
10429
  };
9541
10430
  var DashboardView = ({
@@ -9552,15 +10441,15 @@ var DashboardView = ({
9552
10441
  /* @__PURE__ */ jsxRuntime.jsx(DashboardCard, { "data-testid": "dashboard-quick-actions-card", className: "hidden lg:block p-6", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col space-y-3", children: [
9553
10442
  /* @__PURE__ */ jsxRuntime.jsx(TextBody, { className: "mb-6", children: "A\xE7\xF5es r\xE1pidas" }),
9554
10443
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row gap-4 w-full", children: [
9555
- /* @__PURE__ */ jsxRuntime.jsx(Link2__default.default, { "data-testid": "dashboard-quick-action-deposit", href: "/dashboard/deposit", className: "flex-1 min-w-0 cursor-pointer", onClick: () => quickActions.onDepositClick(), children: /* @__PURE__ */ jsxRuntime.jsxs(PrimaryButton, { children: [
10444
+ /* @__PURE__ */ jsxRuntime.jsx("div", { "data-testid": "dashboard-quick-action-deposit", className: "flex-1 min-w-0 cursor-pointer", onClick: () => quickActions == null ? void 0 : quickActions.onDepositClick(), children: /* @__PURE__ */ jsxRuntime.jsxs(PrimaryButton, { children: [
9556
10445
  /* @__PURE__ */ jsxRuntime.jsx(md.MdOutlineArrowUpward, { className: "w-4 h-4 shrink-0" }),
9557
10446
  "Depositar"
9558
10447
  ] }) }),
9559
- /* @__PURE__ */ jsxRuntime.jsx(Link2__default.default, { "data-testid": "dashboard-quick-action-withdraw", href: "/dashboard/withdraw", className: "flex-1 min-w-0 cursor-pointer", onClick: () => quickActions.onWithdrawClick(), children: /* @__PURE__ */ jsxRuntime.jsxs(PrimaryButton, { children: [
10448
+ /* @__PURE__ */ jsxRuntime.jsx("div", { "data-testid": "dashboard-quick-action-withdraw", className: "flex-1 min-w-0 cursor-pointer", onClick: () => quickActions == null ? void 0 : quickActions.onWithdrawClick(), children: /* @__PURE__ */ jsxRuntime.jsxs(PrimaryButton, { children: [
9560
10449
  /* @__PURE__ */ jsxRuntime.jsx(md.MdOutlineArrowDownward, { className: "w-4 h-4 shrink-0" }),
9561
10450
  "Sacar"
9562
10451
  ] }) }),
9563
- /* @__PURE__ */ jsxRuntime.jsx(Link2__default.default, { "data-testid": "dashboard-quick-action-swap", href: "/dashboard/swap", className: "flex-1 min-w-0 cursor-pointer", onClick: () => quickActions.onSwapClick(), children: /* @__PURE__ */ jsxRuntime.jsxs(PrimaryButton, { children: [
10452
+ /* @__PURE__ */ jsxRuntime.jsx("div", { "data-testid": "dashboard-quick-action-swap", className: "flex-1 min-w-0 cursor-pointer", onClick: () => quickActions == null ? void 0 : quickActions.onSwapClick(), children: /* @__PURE__ */ jsxRuntime.jsxs(PrimaryButton, { children: [
9564
10453
  /* @__PURE__ */ jsxRuntime.jsx(md.MdOutlineSwapHoriz, { className: "w-4 h-4 shrink-0" }),
9565
10454
  "Trocar"
9566
10455
  ] }) })
@@ -9569,17 +10458,87 @@ var DashboardView = ({
9569
10458
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full bg-[#002608] rounded shadow-[0px_1px_3px_0px_rgba(0,0,0,0.1)] flex items-center justify-between cursor-pointer", children: /* @__PURE__ */ jsxRuntime.jsx(
9570
10459
  "img",
9571
10460
  {
9572
- src: banner.imageUrl,
9573
- alt: banner.altText,
10461
+ src: banner == null ? void 0 : banner.imageUrl,
10462
+ alt: banner == null ? void 0 : banner.altText,
9574
10463
  className: "w-full h-[90%] object-cover rounded"
9575
10464
  }
9576
10465
  ) }),
9577
10466
  /* @__PURE__ */ jsxRuntime.jsx(DashboardTokensView, __spreadValues({}, tokens)),
9578
- /* @__PURE__ */ jsxRuntime.jsx(DashboardRecentTransactionsView, __spreadValues({}, recentTransactions))
10467
+ recentTransactions && /* @__PURE__ */ jsxRuntime.jsx(DashboardRecentTransactionsView, __spreadValues({}, recentTransactions))
9579
10468
  ] }),
9580
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "lg:col-span-1 space-y-6", children: /* @__PURE__ */ jsxRuntime.jsx(DashboardInvestmentOpportunitiesView, __spreadValues({}, investmentOpportunities)) })
10469
+ investmentOpportunities && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "lg:col-span-1 space-y-6", children: /* @__PURE__ */ jsxRuntime.jsx(DashboardInvestmentOpportunitiesView, __spreadValues({}, investmentOpportunities)) })
9581
10470
  ] }) });
9582
10471
  };
10472
+ var DashboardViewSimple = ({
10473
+ portfolio,
10474
+ tokens,
10475
+ quickActions
10476
+ }) => {
10477
+ const assetCount = tokens.sortedRegularTokens.filter((t) => !isDustValue(t.amountInUSD)).length;
10478
+ return /* @__PURE__ */ jsxRuntime.jsxs(
10479
+ "div",
10480
+ {
10481
+ "data-test-id": "dashboard-page-simple",
10482
+ className: "w-full flex flex-col gap-[var(--deframe-widget-size-gap-md)]",
10483
+ children: [
10484
+ /* @__PURE__ */ jsxRuntime.jsxs(
10485
+ "div",
10486
+ {
10487
+ "data-test-id": "dashboard-home-header",
10488
+ className: "flex items-center justify-between gap-[var(--deframe-widget-size-gap-md)]",
10489
+ children: [
10490
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-[var(--deframe-widget-size-gap-xs)]", children: [
10491
+ /* @__PURE__ */ jsxRuntime.jsx(
10492
+ "h1",
10493
+ {
10494
+ "data-test-id": "dashboard-home-title",
10495
+ className: "text-[color:var(--deframe-widget-color-text-primary)] text-[length:var(--deframe-widget-font-size-xxl)] [font-weight:var(--deframe-widget-font-weight-bold)] leading-[var(--deframe-widget-font-leading-xxl)] font-[var(--deframe-widget-font-family)]",
10496
+ children: "Wallet"
10497
+ }
10498
+ ),
10499
+ /* @__PURE__ */ jsxRuntime.jsx(
10500
+ "p",
10501
+ {
10502
+ "data-test-id": "dashboard-home-subtitle",
10503
+ className: "text-[color:var(--deframe-widget-color-text-secondary)] text-[length:var(--deframe-widget-font-size-sm)] leading-[var(--deframe-widget-font-leading-sm)] font-[var(--deframe-widget-font-family)]",
10504
+ children: "Resumo da sua carteira e movimenta\xE7\xF5es."
10505
+ }
10506
+ )
10507
+ ] }),
10508
+ /* @__PURE__ */ jsxRuntime.jsxs(
10509
+ "div",
10510
+ {
10511
+ "data-test-id": "dashboard-home-actions",
10512
+ className: "flex items-center gap-[var(--deframe-widget-size-gap-sm)] flex-shrink-0",
10513
+ children: [
10514
+ /* @__PURE__ */ jsxRuntime.jsx(
10515
+ PrimaryButton,
10516
+ {
10517
+ className: "w-auto py-[var(--deframe-widget-size-padding-y-sm)] [font-weight:var(--deframe-widget-font-weight-medium)]",
10518
+ onClick: () => quickActions == null ? void 0 : quickActions.onDepositClick(),
10519
+ children: "Depositar"
10520
+ }
10521
+ ),
10522
+ /* @__PURE__ */ jsxRuntime.jsx(
10523
+ SecondaryButton,
10524
+ {
10525
+ className: "w-auto py-[var(--deframe-widget-size-padding-y-sm)] [font-weight:var(--deframe-widget-font-weight-medium)]",
10526
+ onClick: () => quickActions == null ? void 0 : quickActions.onWithdrawClick(),
10527
+ children: "Sacar"
10528
+ }
10529
+ )
10530
+ ]
10531
+ }
10532
+ )
10533
+ ]
10534
+ }
10535
+ ),
10536
+ /* @__PURE__ */ jsxRuntime.jsx(DashboardPortfolioViewSimple, __spreadProps(__spreadValues({}, portfolio), { assetCount })),
10537
+ /* @__PURE__ */ jsxRuntime.jsx(DashboardTokensViewSimple, __spreadValues({}, tokens))
10538
+ ]
10539
+ }
10540
+ );
10541
+ };
9583
10542
 
9584
10543
  exports.ActionButton = ActionButton;
9585
10544
  exports.ActionSheet = ActionSheet;
@@ -9588,6 +10547,8 @@ exports.ApyRange = ApyRange;
9588
10547
  exports.BackButton = BackButton;
9589
10548
  exports.BackgroundContainer = BackgroundContainer;
9590
10549
  exports.BannerNotification = BannerNotification;
10550
+ exports.Chip = Chip;
10551
+ exports.ChipGroup = ChipGroup;
9591
10552
  exports.ChooseANetworkView = ChooseANetworkView;
9592
10553
  exports.ChooseAStrategyActionsheetView = ChooseAStrategyActionsheetView;
9593
10554
  exports.ChooseAnAssetSwapView = ChooseAnAssetSwapView;
@@ -9603,12 +10564,16 @@ exports.DashboardBalancesBreakdown = DashboardBalancesBreakdown;
9603
10564
  exports.DashboardCard = DashboardCard;
9604
10565
  exports.DashboardInvestmentOpportunitiesView = DashboardInvestmentOpportunitiesView;
9605
10566
  exports.DashboardPortfolioView = DashboardPortfolioView;
10567
+ exports.DashboardPortfolioViewSimple = DashboardPortfolioViewSimple;
9606
10568
  exports.DashboardRecentTransactionsView = DashboardRecentTransactionsView;
10569
+ exports.DashboardRecentTransactionsViewSimple = DashboardRecentTransactionsViewSimple;
9607
10570
  exports.DashboardStrategiesListView = DashboardStrategiesListView;
9608
10571
  exports.DashboardTokenListView = DashboardTokenListView;
9609
10572
  exports.DashboardTokensView = DashboardTokensView;
10573
+ exports.DashboardTokensViewSimple = DashboardTokensViewSimple;
9610
10574
  exports.DashboardTransactionsPlaceholder = DashboardTransactionsPlaceholder;
9611
10575
  exports.DashboardView = DashboardView;
10576
+ exports.DashboardViewSimple = DashboardViewSimple;
9612
10577
  exports.DeframeComponentsProvider = DeframeComponentsProvider;
9613
10578
  exports.DetailsHeader = DetailsHeader;
9614
10579
  exports.EarnAmountInputView = EarnAmountInputView;
@@ -9625,6 +10590,7 @@ exports.EarnInvestedSectionView = EarnInvestedSectionView;
9625
10590
  exports.EarnInvestmentDetailsView = EarnInvestmentDetailsView;
9626
10591
  exports.EarnInvestmentSummaryView = EarnInvestmentSummaryView;
9627
10592
  exports.EarnNoBalanceNotificationView = EarnNoBalanceNotificationView;
10593
+ exports.EarnOverviewView = EarnOverviewView;
9628
10594
  exports.EarnPercentageButtonsView = EarnPercentageButtonsView;
9629
10595
  exports.EarnPositionCardView = EarnPositionCardView;
9630
10596
  exports.EarnRecentTransactionsView = EarnRecentTransactionsView;
@@ -9726,5 +10692,6 @@ exports.WalletConnectPanel = WalletConnectPanel;
9726
10692
  exports.WalletItem = WalletItem;
9727
10693
  exports.WalletList = ConnectWalletList;
9728
10694
  exports.WalletListContainer = WalletListContainer;
10695
+ exports.isDustValue = isDustValue;
9729
10696
  //# sourceMappingURL=index.js.map
9730
10697
  //# sourceMappingURL=index.js.map