@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.mjs
CHANGED
|
@@ -9014,16 +9014,12 @@ var StrategyGridCard = ({
|
|
|
9014
9014
|
]
|
|
9015
9015
|
}
|
|
9016
9016
|
);
|
|
9017
|
-
var
|
|
9018
|
-
"w-full",
|
|
9017
|
+
var cardClasses = [
|
|
9018
|
+
"w-full flex flex-col gap-[var(--deframe-widget-size-gap-sm)]",
|
|
9019
|
+
"px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-md)]",
|
|
9019
9020
|
"bg-[var(--deframe-widget-color-bg-secondary)]",
|
|
9020
9021
|
"border border-[color:var(--deframe-widget-color-border-secondary)]",
|
|
9021
|
-
"rounded-[var(--deframe-widget-size-radius-md)]"
|
|
9022
|
-
"p-[var(--deframe-widget-size-padding-x-md)]",
|
|
9023
|
-
"flex flex-row items-center justify-between",
|
|
9024
|
-
"gap-[var(--deframe-widget-size-gap-md)]",
|
|
9025
|
-
"hover:border-[color:var(--deframe-widget-color-border-primary)]",
|
|
9026
|
-
"transition-colors"
|
|
9022
|
+
"rounded-[var(--deframe-widget-size-radius-md)]"
|
|
9027
9023
|
].join(" ");
|
|
9028
9024
|
var StrategyGridCardSimple = ({
|
|
9029
9025
|
logoUrl,
|
|
@@ -9037,41 +9033,49 @@ var StrategyGridCardSimple = ({
|
|
|
9037
9033
|
var _a, _b, _c, _d, _e;
|
|
9038
9034
|
const investLabel = (_a = labels == null ? void 0 : labels.investLabel) != null ? _a : "Depositar";
|
|
9039
9035
|
const riskBadgeMap = {
|
|
9040
|
-
low: /* @__PURE__ */ jsx(LowRiskBadge, { label: (_b = labels == null ? void 0 : labels.riskLow) != null ? _b : "
|
|
9041
|
-
medium: /* @__PURE__ */ jsx(MediumRiskBadge, { label: (_c = labels == null ? void 0 : labels.riskMedium) != null ? _c : "
|
|
9042
|
-
high: /* @__PURE__ */ jsx(HighRiskBadge, { label: (_d = labels == null ? void 0 : labels.riskHigh) != null ? _d : "
|
|
9036
|
+
low: /* @__PURE__ */ jsx(LowRiskBadge, { label: (_b = labels == null ? void 0 : labels.riskLow) != null ? _b : "Baixo" }),
|
|
9037
|
+
medium: /* @__PURE__ */ jsx(MediumRiskBadge, { label: (_c = labels == null ? void 0 : labels.riskMedium) != null ? _c : "M\xE9dio" }),
|
|
9038
|
+
high: /* @__PURE__ */ jsx(HighRiskBadge, { label: (_d = labels == null ? void 0 : labels.riskHigh) != null ? _d : "Alto" })
|
|
9043
9039
|
};
|
|
9044
9040
|
return /* @__PURE__ */ jsxs(
|
|
9045
9041
|
"article",
|
|
9046
9042
|
{
|
|
9047
9043
|
"data-slot": "strategy-grid-card-simple",
|
|
9048
9044
|
"data-test-id": "strategy-grid-card-simple",
|
|
9049
|
-
className:
|
|
9045
|
+
className: cardClasses,
|
|
9050
9046
|
children: [
|
|
9051
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-[var(--deframe-widget-size-gap-sm)]
|
|
9047
|
+
/* @__PURE__ */ jsxs("div", { className: "w-full flex items-center gap-[var(--deframe-widget-size-gap-sm)]", children: [
|
|
9052
9048
|
/* @__PURE__ */ 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__ */ jsx("img", { alt: title, src: logoUrl, referrerPolicy: "no-referrer", className: "w-full h-full object-contain" }) }),
|
|
9053
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-col min-w-0", children: [
|
|
9054
|
-
/* @__PURE__ */ jsx("span", { className: "text-[
|
|
9055
|
-
/* @__PURE__ */ jsx("span", { className: "text-[
|
|
9056
|
-
] })
|
|
9057
|
-
|
|
9058
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center", children: [
|
|
9059
|
-
/* @__PURE__ */ 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" }),
|
|
9060
|
-
/* @__PURE__ */ 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 })
|
|
9049
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col flex-1 min-w-0", children: [
|
|
9050
|
+
/* @__PURE__ */ 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 }),
|
|
9051
|
+
/* @__PURE__ */ jsx("span", { className: "text-[12px] text-[color:var(--deframe-widget-color-text-secondary)] leading-[1.4]", children: chainName })
|
|
9052
|
+
] }),
|
|
9053
|
+
/* @__PURE__ */ jsx("div", { className: "flex-shrink-0", children: riskBadgeMap[riskLevel] })
|
|
9061
9054
|
] }),
|
|
9062
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-
|
|
9063
|
-
/* @__PURE__ */ jsx("
|
|
9055
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-baseline gap-[var(--deframe-widget-size-gap-sm)]", children: [
|
|
9056
|
+
/* @__PURE__ */ 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" }),
|
|
9064
9057
|
/* @__PURE__ */ jsx(
|
|
9065
|
-
|
|
9058
|
+
"span",
|
|
9066
9059
|
{
|
|
9067
|
-
|
|
9068
|
-
|
|
9069
|
-
|
|
9070
|
-
|
|
9071
|
-
|
|
9060
|
+
className: twMerge(
|
|
9061
|
+
"text-[22px] [font-weight:var(--deframe-widget-font-weight-bold)]",
|
|
9062
|
+
"text-[color:var(--deframe-widget-color-brand-primary)]",
|
|
9063
|
+
"font-[var(--deframe-widget-font-family)] leading-[1.1]"
|
|
9064
|
+
),
|
|
9065
|
+
children: apyFormatted
|
|
9072
9066
|
}
|
|
9073
9067
|
)
|
|
9074
|
-
] })
|
|
9068
|
+
] }),
|
|
9069
|
+
/* @__PURE__ */ jsx(
|
|
9070
|
+
PrimaryButton,
|
|
9071
|
+
{
|
|
9072
|
+
"data-test-id": "strategy-grid-card-simple-invest",
|
|
9073
|
+
"aria-label": `${investLabel} ${title}`,
|
|
9074
|
+
onClick: onInvestClick,
|
|
9075
|
+
className: "h-9 text-[13px] w-full",
|
|
9076
|
+
children: investLabel
|
|
9077
|
+
}
|
|
9078
|
+
)
|
|
9075
9079
|
]
|
|
9076
9080
|
}
|
|
9077
9081
|
);
|
|
@@ -11121,7 +11125,7 @@ var EarnAmountInputSimpleView = ({
|
|
|
11121
11125
|
{
|
|
11122
11126
|
"data-slot": "amount-input-simple-conversion",
|
|
11123
11127
|
"data-test-id": "earn-amount-input-simple-view-conversion",
|
|
11124
|
-
className: "text-[13px] text-[color:var(--deframe-widget-color-text-tertiary)] font-[var(--deframe-widget-font-family)]",
|
|
11128
|
+
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",
|
|
11125
11129
|
children: dollarAmountFormatted
|
|
11126
11130
|
}
|
|
11127
11131
|
)
|
|
@@ -11275,7 +11279,7 @@ var EarnInlineNotificationSimpleView = ({
|
|
|
11275
11279
|
};
|
|
11276
11280
|
var EarnDepositFormViewSimple = ({
|
|
11277
11281
|
// Header / Layout
|
|
11278
|
-
|
|
11282
|
+
pageTitle,
|
|
11279
11283
|
onBack,
|
|
11280
11284
|
onSubmit,
|
|
11281
11285
|
// Token selector
|
|
@@ -11383,7 +11387,7 @@ var EarnDepositFormViewSimple = ({
|
|
|
11383
11387
|
"data-slot": "deposit-panel-simple-title",
|
|
11384
11388
|
"data-test-id": "earn-deposit-form-view-simple-title",
|
|
11385
11389
|
className: titleBaseClasses,
|
|
11386
|
-
children:
|
|
11390
|
+
children: pageTitle
|
|
11387
11391
|
}
|
|
11388
11392
|
)
|
|
11389
11393
|
}
|
|
@@ -11738,7 +11742,7 @@ var EarnWithdrawFormView = ({
|
|
|
11738
11742
|
] });
|
|
11739
11743
|
var EarnWithdrawFormViewSimple = ({
|
|
11740
11744
|
// Header / Layout
|
|
11741
|
-
|
|
11745
|
+
pageTitle,
|
|
11742
11746
|
onBack,
|
|
11743
11747
|
onSubmit,
|
|
11744
11748
|
// Position card (used for inline balance row)
|
|
@@ -11841,7 +11845,7 @@ var EarnWithdrawFormViewSimple = ({
|
|
|
11841
11845
|
"data-slot": "withdraw-panel-simple-title",
|
|
11842
11846
|
"data-test-id": "earn-withdraw-form-view-simple-title",
|
|
11843
11847
|
className: titleBaseClasses,
|
|
11844
|
-
children:
|
|
11848
|
+
children: pageTitle
|
|
11845
11849
|
}
|
|
11846
11850
|
)
|
|
11847
11851
|
}
|
|
@@ -15596,7 +15600,7 @@ var OnrampFormSimpleView = ({
|
|
|
15596
15600
|
"px-[var(--deframe-widget-size-padding-x-md)]",
|
|
15597
15601
|
"pb-[var(--deframe-widget-size-padding-y-md)]"
|
|
15598
15602
|
].join(" ");
|
|
15599
|
-
const
|
|
15603
|
+
const cardClasses3 = twMerge(
|
|
15600
15604
|
"rounded-[var(--deframe-widget-size-radius-sm)]",
|
|
15601
15605
|
"border border-[color:var(--deframe-widget-color-border-secondary)]",
|
|
15602
15606
|
"bg-[var(--deframe-widget-color-bg-secondary)]",
|
|
@@ -15694,7 +15698,7 @@ var OnrampFormSimpleView = ({
|
|
|
15694
15698
|
{
|
|
15695
15699
|
"data-slot": "onramp-form-simple-amount-card",
|
|
15696
15700
|
"data-test-id": "onramp-form-simple-view-amount-card",
|
|
15697
|
-
className:
|
|
15701
|
+
className: cardClasses3,
|
|
15698
15702
|
children: /* @__PURE__ */ jsxs(
|
|
15699
15703
|
"div",
|
|
15700
15704
|
{
|
|
@@ -15753,7 +15757,7 @@ var OnrampFormSimpleView = ({
|
|
|
15753
15757
|
"div",
|
|
15754
15758
|
{
|
|
15755
15759
|
"data-test-id": "onramp-form-simple-view-skeleton",
|
|
15756
|
-
className: twMerge(
|
|
15760
|
+
className: twMerge(cardClasses3, "space-y-3"),
|
|
15757
15761
|
children: [
|
|
15758
15762
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
15759
15763
|
/* @__PURE__ */ jsx(Skeleton, { width: 96, height: 16, shimmer: true }),
|
|
@@ -17536,7 +17540,7 @@ var DashboardPortfolioView = ({
|
|
|
17536
17540
|
) })
|
|
17537
17541
|
] }) });
|
|
17538
17542
|
};
|
|
17539
|
-
var
|
|
17543
|
+
var cardClasses2 = twMerge(
|
|
17540
17544
|
"w-full self-start flex flex-col gap-[var(--deframe-widget-size-gap-sm)]",
|
|
17541
17545
|
"bg-[var(--deframe-widget-color-bg-secondary)] border border-[color:var(--deframe-widget-color-border-secondary)]",
|
|
17542
17546
|
"rounded-[var(--deframe-widget-size-radius-md)]",
|
|
@@ -17558,7 +17562,7 @@ function StatCardSkeletonBlock({ showDescription, className }) {
|
|
|
17558
17562
|
{
|
|
17559
17563
|
"data-test-id": "stat-card-skeleton",
|
|
17560
17564
|
"aria-busy": "true",
|
|
17561
|
-
className: twMerge(
|
|
17565
|
+
className: twMerge(cardClasses2, "self-stretch", className),
|
|
17562
17566
|
children: [
|
|
17563
17567
|
/* @__PURE__ */ jsx(Skeleton, { variant: "rect", width: 140, height: 11 }),
|
|
17564
17568
|
/* @__PURE__ */ jsx(Skeleton, { variant: "rect", width: "60%", height: 44 }),
|
|
@@ -17594,7 +17598,7 @@ var DashboardPortfolioViewSimple = ({
|
|
|
17594
17598
|
assetCount != null ? "grid-cols-[1fr_auto]" : "grid-cols-1"
|
|
17595
17599
|
),
|
|
17596
17600
|
children: [
|
|
17597
|
-
/* @__PURE__ */ jsxs("article", { className: twMerge(
|
|
17601
|
+
/* @__PURE__ */ jsxs("article", { className: twMerge(cardClasses2, "self-stretch"), children: [
|
|
17598
17602
|
/* @__PURE__ */ jsx("p", { "data-test-id": "stat-card-label", className: labelClasses, children: "Total da Carteira (USD)" }),
|
|
17599
17603
|
/* @__PURE__ */ jsx(AnimatePresence, { mode: "wait", children: /* @__PURE__ */ jsx(
|
|
17600
17604
|
motion.p,
|
|
@@ -17611,7 +17615,7 @@ var DashboardPortfolioViewSimple = ({
|
|
|
17611
17615
|
) }),
|
|
17612
17616
|
/* @__PURE__ */ jsx("p", { "data-test-id": "stat-card-description", className: descriptionClasses, children: "Soma do saldo por token (em USD)." })
|
|
17613
17617
|
] }),
|
|
17614
|
-
assetCount != null && /* @__PURE__ */ jsxs("article", { className: twMerge(
|
|
17618
|
+
assetCount != null && /* @__PURE__ */ jsxs("article", { className: twMerge(cardClasses2, "self-stretch min-w-[160px]"), children: [
|
|
17615
17619
|
/* @__PURE__ */ jsx("p", { "data-test-id": "stat-card-label", className: labelClasses, children: "Ativos" }),
|
|
17616
17620
|
/* @__PURE__ */ jsx(AnimatePresence, { mode: "wait", children: /* @__PURE__ */ jsx(
|
|
17617
17621
|
motion.p,
|