@deframe-sdk/components 0.1.20 → 0.1.22
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 +23 -69
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +23 -69
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +3 -7
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -3809,11 +3809,14 @@ function WarningIcon() {
|
|
|
3809
3809
|
var SwapSignatureWarningViewSimple = ({
|
|
3810
3810
|
errorTitle,
|
|
3811
3811
|
errorDescription,
|
|
3812
|
-
onCancel
|
|
3813
|
-
onTryAgain,
|
|
3814
|
-
cancelButtonText,
|
|
3815
|
-
retryButtonText
|
|
3812
|
+
onCancel
|
|
3816
3813
|
}) => {
|
|
3814
|
+
useEffect(() => {
|
|
3815
|
+
const timer = setTimeout(() => {
|
|
3816
|
+
onCancel == null ? void 0 : onCancel();
|
|
3817
|
+
}, 3e3);
|
|
3818
|
+
return () => clearTimeout(timer);
|
|
3819
|
+
}, [onCancel]);
|
|
3817
3820
|
return /* @__PURE__ */ jsxs(
|
|
3818
3821
|
"div",
|
|
3819
3822
|
{
|
|
@@ -3879,35 +3882,6 @@ var SwapSignatureWarningViewSimple = ({
|
|
|
3879
3882
|
)
|
|
3880
3883
|
]
|
|
3881
3884
|
}
|
|
3882
|
-
),
|
|
3883
|
-
/* @__PURE__ */ jsxs(
|
|
3884
|
-
"div",
|
|
3885
|
-
{
|
|
3886
|
-
"data-test-id": "swap-signature-warning-simple-actions",
|
|
3887
|
-
className: "flex gap-[var(--deframe-widget-size-gap-sm)] w-full max-w-[320px]",
|
|
3888
|
-
children: [
|
|
3889
|
-
/* @__PURE__ */ jsx(
|
|
3890
|
-
SecondaryButton,
|
|
3891
|
-
{
|
|
3892
|
-
"data-test-id": "swap-signature-warning-simple-cancel",
|
|
3893
|
-
"aria-label": cancelButtonText != null ? cancelButtonText : "Cancel",
|
|
3894
|
-
className: "flex-1",
|
|
3895
|
-
onClick: onCancel,
|
|
3896
|
-
children: cancelButtonText
|
|
3897
|
-
}
|
|
3898
|
-
),
|
|
3899
|
-
/* @__PURE__ */ jsx(
|
|
3900
|
-
PrimaryButton,
|
|
3901
|
-
{
|
|
3902
|
-
"data-test-id": "swap-signature-warning-simple-retry",
|
|
3903
|
-
"aria-label": retryButtonText != null ? retryButtonText : "Retry",
|
|
3904
|
-
className: "flex-1",
|
|
3905
|
-
onClick: onTryAgain,
|
|
3906
|
-
children: retryButtonText
|
|
3907
|
-
}
|
|
3908
|
-
)
|
|
3909
|
-
]
|
|
3910
|
-
}
|
|
3911
3885
|
)
|
|
3912
3886
|
]
|
|
3913
3887
|
}
|
|
@@ -5195,7 +5169,7 @@ function TokenSelectorArea({
|
|
|
5195
5169
|
"aria-label": selectedToken ? `Select token \u2014 currently ${selectedToken.symbol} on ${chainLabel}` : selectTokenLabel,
|
|
5196
5170
|
className: twMerge(
|
|
5197
5171
|
"inline-flex items-center gap-[10px]",
|
|
5198
|
-
"
|
|
5172
|
+
"h-[54px] px-[10px]",
|
|
5199
5173
|
"rounded-[var(--deframe-widget-size-radius-sm)]",
|
|
5200
5174
|
"bg-[var(--deframe-widget-color-bg-tertiary)]",
|
|
5201
5175
|
"border-none outline-none",
|
|
@@ -5243,22 +5217,15 @@ function TokenSelectorArea({
|
|
|
5243
5217
|
),
|
|
5244
5218
|
/* @__PURE__ */ jsx(ChevronDown, {})
|
|
5245
5219
|
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
5246
|
-
/* @__PURE__ */ jsx(
|
|
5247
|
-
"div",
|
|
5248
|
-
{
|
|
5249
|
-
"data-test-id": "swap-from-card-simple-token-placeholder-icon",
|
|
5250
|
-
className: "w-[38px] h-[38px] rounded-[var(--deframe-widget-size-radius-full)] bg-[var(--deframe-widget-color-bg-tertiary)] flex-shrink-0"
|
|
5251
|
-
}
|
|
5252
|
-
),
|
|
5253
5220
|
/* @__PURE__ */ jsx(
|
|
5254
5221
|
"span",
|
|
5255
5222
|
{
|
|
5256
5223
|
"data-test-id": "swap-from-card-simple-token-placeholder-label",
|
|
5257
5224
|
className: twMerge(
|
|
5258
|
-
"text-[
|
|
5225
|
+
"text-[11px] [font-weight:var(--deframe-widget-font-weight-regular)]",
|
|
5259
5226
|
"font-[var(--deframe-widget-font-family)]",
|
|
5260
5227
|
"text-[color:var(--deframe-widget-color-text-secondary)]",
|
|
5261
|
-
"whitespace-nowrap"
|
|
5228
|
+
"whitespace-nowrap uppercase"
|
|
5262
5229
|
),
|
|
5263
5230
|
children: selectTokenLabel
|
|
5264
5231
|
}
|
|
@@ -5555,7 +5522,7 @@ var SwapToCardViewSimple = ({
|
|
|
5555
5522
|
);
|
|
5556
5523
|
const selectorBaseClasses = twMerge(
|
|
5557
5524
|
"inline-flex items-center gap-[10px]",
|
|
5558
|
-
"
|
|
5525
|
+
"h-[54px] px-[10px]",
|
|
5559
5526
|
"rounded-[var(--deframe-widget-size-radius-sm)]",
|
|
5560
5527
|
"bg-[var(--deframe-widget-color-bg-tertiary)]",
|
|
5561
5528
|
"border-none",
|
|
@@ -5650,19 +5617,11 @@ var SwapToCardViewSimple = ({
|
|
|
5650
5617
|
"aria-label": labels.selectTokenLabel,
|
|
5651
5618
|
className: selectorBaseClasses,
|
|
5652
5619
|
children: [
|
|
5653
|
-
/* @__PURE__ */ jsx(
|
|
5654
|
-
"div",
|
|
5655
|
-
{
|
|
5656
|
-
"data-test-id": "swap-to-simple-placeholder-circle",
|
|
5657
|
-
className: "rounded-[var(--deframe-widget-size-radius-full)] flex-shrink-0 bg-[var(--deframe-widget-color-bg-tertiary)]",
|
|
5658
|
-
style: { width: 38, height: 38 }
|
|
5659
|
-
}
|
|
5660
|
-
),
|
|
5661
5620
|
/* @__PURE__ */ jsx(
|
|
5662
5621
|
"span",
|
|
5663
5622
|
{
|
|
5664
5623
|
"data-test-id": "swap-to-simple-placeholder-label",
|
|
5665
|
-
className: "text-[
|
|
5624
|
+
className: "text-[11px] [font-weight:var(--deframe-widget-font-weight-regular)] leading-[1.2] font-[var(--deframe-widget-font-family)] text-[color:var(--deframe-widget-color-text-secondary)] whitespace-nowrap uppercase",
|
|
5666
5625
|
children: labels.selectTokenLabel
|
|
5667
5626
|
}
|
|
5668
5627
|
),
|
|
@@ -5699,7 +5658,7 @@ var SwapToCardViewSimple = ({
|
|
|
5699
5658
|
"data-test-id": "swap-to-simple-output-wrapper",
|
|
5700
5659
|
className: "flex flex-col items-end flex-1 min-w-0",
|
|
5701
5660
|
children: [
|
|
5702
|
-
isOutputLoading ? /* @__PURE__ */
|
|
5661
|
+
isOutputLoading ? /* @__PURE__ */ jsx(
|
|
5703
5662
|
"span",
|
|
5704
5663
|
{
|
|
5705
5664
|
"data-test-id": "swap-to-simple-output-loading",
|
|
@@ -5710,10 +5669,7 @@ var SwapToCardViewSimple = ({
|
|
|
5710
5669
|
"text-right",
|
|
5711
5670
|
"flex items-center"
|
|
5712
5671
|
),
|
|
5713
|
-
children:
|
|
5714
|
-
labels.searchingQuoteLabel,
|
|
5715
|
-
/* @__PURE__ */ jsx(LoadingDots, {})
|
|
5716
|
-
]
|
|
5672
|
+
children: /* @__PURE__ */ jsx(LoadingDots, {})
|
|
5717
5673
|
}
|
|
5718
5674
|
) : /* @__PURE__ */ jsx(
|
|
5719
5675
|
"span",
|
|
@@ -7472,7 +7428,7 @@ var variantStyles = {
|
|
|
7472
7428
|
var Label = ({ children, variant = "primary", className }) => {
|
|
7473
7429
|
return /* @__PURE__ */ jsx("div", { className: twMerge(variantStyles[variant], className), children });
|
|
7474
7430
|
};
|
|
7475
|
-
var HistoryItemSkeleton = () => /* @__PURE__ */ jsxs("div", { className: "w-full bg-
|
|
7431
|
+
var HistoryItemSkeleton = () => /* @__PURE__ */ jsxs("div", { className: "w-full bg-[var(--deframe-widget-color-bg-subtle)] rounded-xs min-h-[72px] flex items-center justify-between px-md py-sm", children: [
|
|
7476
7432
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-sm flex-1 min-w-0", children: [
|
|
7477
7433
|
/* @__PURE__ */ jsx("div", { className: "w-10 h-10 rounded-xl bg-bg-muted dark:bg-bg-muted-dark animate-pulse flex-shrink-0" }),
|
|
7478
7434
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-xs flex-1 min-w-0", children: [
|
|
@@ -7527,8 +7483,7 @@ var StrategyGridCard = ({
|
|
|
7527
7483
|
"data-test-id": "strategy-grid-card",
|
|
7528
7484
|
className: twMerge(
|
|
7529
7485
|
"flex flex-col gap-[var(--deframe-widget-size-gap-md)] p-[var(--deframe-widget-size-padding-x-md)] rounded-[var(--deframe-widget-size-radius-sm)] h-[136px] min-h-[136px] flex-shrink-0",
|
|
7530
|
-
"bg-[var(--deframe-widget-color-bg-
|
|
7531
|
-
"hover:bg-[var(--deframe-widget-color-bg-tertiary)]",
|
|
7486
|
+
"bg-[var(--deframe-widget-color-bg-raised)]",
|
|
7532
7487
|
"transition-colors cursor-pointer text-left w-full",
|
|
7533
7488
|
className
|
|
7534
7489
|
),
|
|
@@ -7598,7 +7553,7 @@ var EarnInvestmentSummaryView = ({
|
|
|
7598
7553
|
processingBadgeTitle,
|
|
7599
7554
|
className
|
|
7600
7555
|
}) => {
|
|
7601
|
-
return /* @__PURE__ */ jsxs("section", { className: twMerge("flex flex-col gap-md p-lg bg-
|
|
7556
|
+
return /* @__PURE__ */ jsxs("section", { className: twMerge("flex flex-col gap-md p-lg bg-[var(--deframe-widget-color-bg-subtle)] rounded", className), children: [
|
|
7602
7557
|
/* @__PURE__ */ jsx(TextBody, { variant: "text-small", className: "text-text-secondary dark:text-text-secondary-dark", children: overviewDescription }),
|
|
7603
7558
|
/* @__PURE__ */ jsx(
|
|
7604
7559
|
WalletBalances,
|
|
@@ -7637,7 +7592,7 @@ var EarnInvestedSectionView = ({
|
|
|
7637
7592
|
{
|
|
7638
7593
|
className: twMerge(
|
|
7639
7594
|
"flex flex-col gap-[var(--deframe-widget-size-gap-md)] p-[var(--deframe-widget-size-padding-x-lg)]",
|
|
7640
|
-
"bg-[var(--deframe-widget-color-bg-
|
|
7595
|
+
"bg-[var(--deframe-widget-color-bg-subtle)] rounded-[var(--deframe-widget-size-radius-sm)]",
|
|
7641
7596
|
className
|
|
7642
7597
|
),
|
|
7643
7598
|
children: [
|
|
@@ -7650,8 +7605,7 @@ var EarnInvestedSectionView = ({
|
|
|
7650
7605
|
type: "button",
|
|
7651
7606
|
onClick: () => onItemClick == null ? void 0 : onItemClick(item.strategyId),
|
|
7652
7607
|
className: twMerge(
|
|
7653
|
-
"flex items-center gap-[var(--deframe-widget-size-gap-md)] p-[var(--deframe-widget-size-padding-x-md)] bg-[var(--deframe-widget-color-bg-
|
|
7654
|
-
"hover:bg-[var(--deframe-widget-color-bg-tertiary)]",
|
|
7608
|
+
"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)]",
|
|
7655
7609
|
"transition-colors cursor-pointer text-left w-full",
|
|
7656
7610
|
!isLast && "border-b border-[var(--deframe-widget-color-border-secondary)]"
|
|
7657
7611
|
),
|
|
@@ -7703,7 +7657,7 @@ var EarnExploreGridView = ({
|
|
|
7703
7657
|
{
|
|
7704
7658
|
className: twMerge(
|
|
7705
7659
|
"flex flex-col gap-[var(--deframe-widget-size-gap-md)] p-[var(--deframe-widget-size-padding-x-lg)]",
|
|
7706
|
-
"bg-[var(--deframe-widget-color-bg-
|
|
7660
|
+
"bg-[var(--deframe-widget-color-bg-subtle)] rounded-[var(--deframe-widget-size-radius-sm)]",
|
|
7707
7661
|
className
|
|
7708
7662
|
),
|
|
7709
7663
|
children: [
|
|
@@ -7722,7 +7676,7 @@ var EarnExploreGridView = ({
|
|
|
7722
7676
|
{
|
|
7723
7677
|
className: twMerge(
|
|
7724
7678
|
"flex flex-col gap-[var(--deframe-widget-size-gap-md)] p-[var(--deframe-widget-size-padding-x-lg)]",
|
|
7725
|
-
"bg-[var(--deframe-widget-color-bg-
|
|
7679
|
+
"bg-[var(--deframe-widget-color-bg-subtle)] rounded-[var(--deframe-widget-size-radius-sm)]",
|
|
7726
7680
|
className
|
|
7727
7681
|
),
|
|
7728
7682
|
children: [
|
|
@@ -7737,7 +7691,7 @@ var EarnExploreGridView = ({
|
|
|
7737
7691
|
{
|
|
7738
7692
|
className: twMerge(
|
|
7739
7693
|
"flex flex-col gap-[var(--deframe-widget-size-gap-md)] p-[var(--deframe-widget-size-padding-x-lg)]",
|
|
7740
|
-
"bg-[var(--deframe-widget-color-bg-
|
|
7694
|
+
"bg-[var(--deframe-widget-color-bg-subtle)] rounded-[var(--deframe-widget-size-radius-sm)]",
|
|
7741
7695
|
className
|
|
7742
7696
|
),
|
|
7743
7697
|
children: [
|
|
@@ -7786,7 +7740,7 @@ var EarnRecentTransactionsView = ({
|
|
|
7786
7740
|
{
|
|
7787
7741
|
className: twMerge(
|
|
7788
7742
|
"flex flex-col gap-md p-lg",
|
|
7789
|
-
"bg-
|
|
7743
|
+
"bg-[var(--deframe-widget-color-bg-subtle)] rounded",
|
|
7790
7744
|
className
|
|
7791
7745
|
),
|
|
7792
7746
|
children: [
|