@deframe-sdk/components 0.1.35 → 0.1.36
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 +46 -42
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +46 -42
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -9038,16 +9038,12 @@ var StrategyGridCard = ({
|
|
|
9038
9038
|
]
|
|
9039
9039
|
}
|
|
9040
9040
|
);
|
|
9041
|
-
var
|
|
9042
|
-
"w-full",
|
|
9041
|
+
var cardClasses = [
|
|
9042
|
+
"w-full flex flex-col gap-[var(--deframe-widget-size-gap-sm)]",
|
|
9043
|
+
"px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-md)]",
|
|
9043
9044
|
"bg-[var(--deframe-widget-color-bg-secondary)]",
|
|
9044
9045
|
"border border-[color:var(--deframe-widget-color-border-secondary)]",
|
|
9045
|
-
"rounded-[var(--deframe-widget-size-radius-md)]"
|
|
9046
|
-
"p-[var(--deframe-widget-size-padding-x-md)]",
|
|
9047
|
-
"flex flex-row items-center justify-between",
|
|
9048
|
-
"gap-[var(--deframe-widget-size-gap-md)]",
|
|
9049
|
-
"hover:border-[color:var(--deframe-widget-color-border-primary)]",
|
|
9050
|
-
"transition-colors"
|
|
9046
|
+
"rounded-[var(--deframe-widget-size-radius-md)]"
|
|
9051
9047
|
].join(" ");
|
|
9052
9048
|
var StrategyGridCardSimple = ({
|
|
9053
9049
|
logoUrl,
|
|
@@ -9061,41 +9057,49 @@ var StrategyGridCardSimple = ({
|
|
|
9061
9057
|
var _a, _b, _c, _d, _e;
|
|
9062
9058
|
const investLabel = (_a = labels == null ? void 0 : labels.investLabel) != null ? _a : "Depositar";
|
|
9063
9059
|
const riskBadgeMap = {
|
|
9064
|
-
low: /* @__PURE__ */ jsxRuntime.jsx(LowRiskBadge, { label: (_b = labels == null ? void 0 : labels.riskLow) != null ? _b : "
|
|
9065
|
-
medium: /* @__PURE__ */ jsxRuntime.jsx(MediumRiskBadge, { label: (_c = labels == null ? void 0 : labels.riskMedium) != null ? _c : "
|
|
9066
|
-
high: /* @__PURE__ */ jsxRuntime.jsx(HighRiskBadge, { label: (_d = labels == null ? void 0 : labels.riskHigh) != null ? _d : "
|
|
9060
|
+
low: /* @__PURE__ */ jsxRuntime.jsx(LowRiskBadge, { label: (_b = labels == null ? void 0 : labels.riskLow) != null ? _b : "Baixo" }),
|
|
9061
|
+
medium: /* @__PURE__ */ jsxRuntime.jsx(MediumRiskBadge, { label: (_c = labels == null ? void 0 : labels.riskMedium) != null ? _c : "M\xE9dio" }),
|
|
9062
|
+
high: /* @__PURE__ */ jsxRuntime.jsx(HighRiskBadge, { label: (_d = labels == null ? void 0 : labels.riskHigh) != null ? _d : "Alto" })
|
|
9067
9063
|
};
|
|
9068
9064
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9069
9065
|
"article",
|
|
9070
9066
|
{
|
|
9071
9067
|
"data-slot": "strategy-grid-card-simple",
|
|
9072
9068
|
"data-test-id": "strategy-grid-card-simple",
|
|
9073
|
-
className:
|
|
9069
|
+
className: cardClasses,
|
|
9074
9070
|
children: [
|
|
9075
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-[var(--deframe-widget-size-gap-sm)]
|
|
9071
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full flex items-center gap-[var(--deframe-widget-size-gap-sm)]", children: [
|
|
9076
9072
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-10 h-10 rounded-full bg-[var(--deframe-widget-color-bg-tertiary)] flex items-center justify-center overflow-hidden shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx("img", { alt: title, src: logoUrl, referrerPolicy: "no-referrer", className: "w-full h-full object-contain" }) }),
|
|
9077
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col min-w-0", children: [
|
|
9078
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[
|
|
9079
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[
|
|
9080
|
-
] })
|
|
9081
|
-
|
|
9082
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center", children: [
|
|
9083
|
-
/* @__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)]", children: (_e = labels == null ? void 0 : labels.apyLabel) != null ? _e : "Rendimento" }),
|
|
9084
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[length:var(--deframe-widget-font-size-lg)] [font-weight:var(--deframe-widget-font-weight-bold)] text-[color:var(--deframe-widget-color-brand-primary)] font-[var(--deframe-widget-font-family)] leading-none mt-[2px]", children: apyFormatted })
|
|
9073
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col flex-1 min-w-0", children: [
|
|
9074
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[14px] [font-weight:var(--deframe-widget-font-weight-semibold)] text-[color:var(--deframe-widget-color-text-primary)] leading-[1.3] font-[var(--deframe-widget-font-family)] truncate", children: title }),
|
|
9075
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[12px] text-[color:var(--deframe-widget-color-text-secondary)] leading-[1.4]", children: chainName })
|
|
9076
|
+
] }),
|
|
9077
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-shrink-0", children: riskBadgeMap[riskLevel] })
|
|
9085
9078
|
] }),
|
|
9086
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-
|
|
9087
|
-
/* @__PURE__ */ jsxRuntime.jsx("
|
|
9079
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-baseline gap-[var(--deframe-widget-size-gap-sm)]", children: [
|
|
9080
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[11px] [font-weight:var(--deframe-widget-font-weight-medium)] uppercase tracking-[0.08em] text-[color:var(--deframe-widget-color-text-tertiary)]", children: (_e = labels == null ? void 0 : labels.apyLabel) != null ? _e : "Rendimento" }),
|
|
9088
9081
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9089
|
-
|
|
9082
|
+
"span",
|
|
9090
9083
|
{
|
|
9091
|
-
|
|
9092
|
-
|
|
9093
|
-
|
|
9094
|
-
|
|
9095
|
-
|
|
9084
|
+
className: tailwindMerge.twMerge(
|
|
9085
|
+
"text-[22px] [font-weight:var(--deframe-widget-font-weight-bold)]",
|
|
9086
|
+
"text-[color:var(--deframe-widget-color-brand-primary)]",
|
|
9087
|
+
"font-[var(--deframe-widget-font-family)] leading-[1.1]"
|
|
9088
|
+
),
|
|
9089
|
+
children: apyFormatted
|
|
9096
9090
|
}
|
|
9097
9091
|
)
|
|
9098
|
-
] })
|
|
9092
|
+
] }),
|
|
9093
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9094
|
+
PrimaryButton,
|
|
9095
|
+
{
|
|
9096
|
+
"data-test-id": "strategy-grid-card-simple-invest",
|
|
9097
|
+
"aria-label": `${investLabel} ${title}`,
|
|
9098
|
+
onClick: onInvestClick,
|
|
9099
|
+
className: "h-9 text-[13px] w-full",
|
|
9100
|
+
children: investLabel
|
|
9101
|
+
}
|
|
9102
|
+
)
|
|
9099
9103
|
]
|
|
9100
9104
|
}
|
|
9101
9105
|
);
|
|
@@ -11145,7 +11149,7 @@ var EarnAmountInputSimpleView = ({
|
|
|
11145
11149
|
{
|
|
11146
11150
|
"data-slot": "amount-input-simple-conversion",
|
|
11147
11151
|
"data-test-id": "earn-amount-input-simple-view-conversion",
|
|
11148
|
-
className: "text-[13px] text-[color:var(--deframe-widget-color-text-tertiary)] font-[var(--deframe-widget-font-family)]",
|
|
11152
|
+
className: "text-[13px] text-[color:var(--deframe-widget-color-text-tertiary)] font-[var(--deframe-widget-font-family)] overflow-hidden text-ellipsis whitespace-nowrap max-w-full",
|
|
11149
11153
|
children: dollarAmountFormatted
|
|
11150
11154
|
}
|
|
11151
11155
|
)
|
|
@@ -11299,7 +11303,7 @@ var EarnInlineNotificationSimpleView = ({
|
|
|
11299
11303
|
};
|
|
11300
11304
|
var EarnDepositFormViewSimple = ({
|
|
11301
11305
|
// Header / Layout
|
|
11302
|
-
|
|
11306
|
+
pageTitle,
|
|
11303
11307
|
onBack,
|
|
11304
11308
|
onSubmit,
|
|
11305
11309
|
// Token selector
|
|
@@ -11407,7 +11411,7 @@ var EarnDepositFormViewSimple = ({
|
|
|
11407
11411
|
"data-slot": "deposit-panel-simple-title",
|
|
11408
11412
|
"data-test-id": "earn-deposit-form-view-simple-title",
|
|
11409
11413
|
className: titleBaseClasses,
|
|
11410
|
-
children:
|
|
11414
|
+
children: pageTitle
|
|
11411
11415
|
}
|
|
11412
11416
|
)
|
|
11413
11417
|
}
|
|
@@ -11762,7 +11766,7 @@ var EarnWithdrawFormView = ({
|
|
|
11762
11766
|
] });
|
|
11763
11767
|
var EarnWithdrawFormViewSimple = ({
|
|
11764
11768
|
// Header / Layout
|
|
11765
|
-
|
|
11769
|
+
pageTitle,
|
|
11766
11770
|
onBack,
|
|
11767
11771
|
onSubmit,
|
|
11768
11772
|
// Position card (used for inline balance row)
|
|
@@ -11865,7 +11869,7 @@ var EarnWithdrawFormViewSimple = ({
|
|
|
11865
11869
|
"data-slot": "withdraw-panel-simple-title",
|
|
11866
11870
|
"data-test-id": "earn-withdraw-form-view-simple-title",
|
|
11867
11871
|
className: titleBaseClasses,
|
|
11868
|
-
children:
|
|
11872
|
+
children: pageTitle
|
|
11869
11873
|
}
|
|
11870
11874
|
)
|
|
11871
11875
|
}
|
|
@@ -15620,7 +15624,7 @@ var OnrampFormSimpleView = ({
|
|
|
15620
15624
|
"px-[var(--deframe-widget-size-padding-x-md)]",
|
|
15621
15625
|
"pb-[var(--deframe-widget-size-padding-y-md)]"
|
|
15622
15626
|
].join(" ");
|
|
15623
|
-
const
|
|
15627
|
+
const cardClasses3 = tailwindMerge.twMerge(
|
|
15624
15628
|
"rounded-[var(--deframe-widget-size-radius-sm)]",
|
|
15625
15629
|
"border border-[color:var(--deframe-widget-color-border-secondary)]",
|
|
15626
15630
|
"bg-[var(--deframe-widget-color-bg-secondary)]",
|
|
@@ -15718,7 +15722,7 @@ var OnrampFormSimpleView = ({
|
|
|
15718
15722
|
{
|
|
15719
15723
|
"data-slot": "onramp-form-simple-amount-card",
|
|
15720
15724
|
"data-test-id": "onramp-form-simple-view-amount-card",
|
|
15721
|
-
className:
|
|
15725
|
+
className: cardClasses3,
|
|
15722
15726
|
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
15723
15727
|
"div",
|
|
15724
15728
|
{
|
|
@@ -15777,7 +15781,7 @@ var OnrampFormSimpleView = ({
|
|
|
15777
15781
|
"div",
|
|
15778
15782
|
{
|
|
15779
15783
|
"data-test-id": "onramp-form-simple-view-skeleton",
|
|
15780
|
-
className: tailwindMerge.twMerge(
|
|
15784
|
+
className: tailwindMerge.twMerge(cardClasses3, "space-y-3"),
|
|
15781
15785
|
children: [
|
|
15782
15786
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
15783
15787
|
/* @__PURE__ */ jsxRuntime.jsx(Skeleton, { width: 96, height: 16, shimmer: true }),
|
|
@@ -17560,7 +17564,7 @@ var DashboardPortfolioView = ({
|
|
|
17560
17564
|
) })
|
|
17561
17565
|
] }) });
|
|
17562
17566
|
};
|
|
17563
|
-
var
|
|
17567
|
+
var cardClasses2 = tailwindMerge.twMerge(
|
|
17564
17568
|
"w-full self-start flex flex-col gap-[var(--deframe-widget-size-gap-sm)]",
|
|
17565
17569
|
"bg-[var(--deframe-widget-color-bg-secondary)] border border-[color:var(--deframe-widget-color-border-secondary)]",
|
|
17566
17570
|
"rounded-[var(--deframe-widget-size-radius-md)]",
|
|
@@ -17582,7 +17586,7 @@ function StatCardSkeletonBlock({ showDescription, className }) {
|
|
|
17582
17586
|
{
|
|
17583
17587
|
"data-test-id": "stat-card-skeleton",
|
|
17584
17588
|
"aria-busy": "true",
|
|
17585
|
-
className: tailwindMerge.twMerge(
|
|
17589
|
+
className: tailwindMerge.twMerge(cardClasses2, "self-stretch", className),
|
|
17586
17590
|
children: [
|
|
17587
17591
|
/* @__PURE__ */ jsxRuntime.jsx(Skeleton, { variant: "rect", width: 140, height: 11 }),
|
|
17588
17592
|
/* @__PURE__ */ jsxRuntime.jsx(Skeleton, { variant: "rect", width: "60%", height: 44 }),
|
|
@@ -17618,7 +17622,7 @@ var DashboardPortfolioViewSimple = ({
|
|
|
17618
17622
|
assetCount != null ? "grid-cols-[1fr_auto]" : "grid-cols-1"
|
|
17619
17623
|
),
|
|
17620
17624
|
children: [
|
|
17621
|
-
/* @__PURE__ */ jsxRuntime.jsxs("article", { className: tailwindMerge.twMerge(
|
|
17625
|
+
/* @__PURE__ */ jsxRuntime.jsxs("article", { className: tailwindMerge.twMerge(cardClasses2, "self-stretch"), children: [
|
|
17622
17626
|
/* @__PURE__ */ jsxRuntime.jsx("p", { "data-test-id": "stat-card-label", className: labelClasses, children: "Total da Carteira (USD)" }),
|
|
17623
17627
|
/* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { mode: "wait", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
17624
17628
|
framerMotion.motion.p,
|
|
@@ -17635,7 +17639,7 @@ var DashboardPortfolioViewSimple = ({
|
|
|
17635
17639
|
) }),
|
|
17636
17640
|
/* @__PURE__ */ jsxRuntime.jsx("p", { "data-test-id": "stat-card-description", className: descriptionClasses, children: "Soma do saldo por token (em USD)." })
|
|
17637
17641
|
] }),
|
|
17638
|
-
assetCount != null && /* @__PURE__ */ jsxRuntime.jsxs("article", { className: tailwindMerge.twMerge(
|
|
17642
|
+
assetCount != null && /* @__PURE__ */ jsxRuntime.jsxs("article", { className: tailwindMerge.twMerge(cardClasses2, "self-stretch min-w-[160px]"), children: [
|
|
17639
17643
|
/* @__PURE__ */ jsxRuntime.jsx("p", { "data-test-id": "stat-card-label", className: labelClasses, children: "Ativos" }),
|
|
17640
17644
|
/* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { mode: "wait", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
17641
17645
|
framerMotion.motion.p,
|