@gearbox-protocol/ui-kit 3.14.0-next.66 → 3.14.0-next.68
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/cjs/components/assets-list-cell/assets-list-cell.cjs +1 -1
- package/dist/cjs/components/block-sync/block-sync.cjs +1 -1
- package/dist/cjs/components/block-sync-pill/block-sync-pill.cjs +1 -1
- package/dist/cjs/components/breakpoint-provider.cjs +1 -0
- package/dist/cjs/components/checkbox/checkbox-labeled.cjs +1 -1
- package/dist/cjs/components/client-adapters/styled-rounded-image/styled-rounded-image.cjs +1 -1
- package/dist/cjs/components/complex-input/complex-input.cjs +1 -1
- package/dist/cjs/components/composites/index.cjs +1 -1
- package/dist/cjs/components/composites/pool-assets-table/pool-assets-table-head.cjs +1 -1
- package/dist/cjs/components/composites/pool-credit-managers-table/pool-credit-managers-table-head.cjs +1 -1
- package/dist/cjs/components/composites/pool-table/columns.cjs +1 -1
- package/dist/cjs/components/composites/strategies-table/columns.cjs +1 -1
- package/dist/cjs/components/composites/strategies-table/components/cells/cells.cjs +1 -1
- package/dist/cjs/components/composites/strategies-table/components/cells/index.cjs +1 -1
- package/dist/cjs/components/composites/strategies-table/components/index.cjs +1 -1
- package/dist/cjs/components/composites/strategies-table/components/points-feature/points-feature.cjs +1 -1
- package/dist/cjs/components/composites/strategies-table/components/rewards-tooltip/tooltip-content.cjs +1 -1
- package/dist/cjs/components/composites/strategies-table/components/strategies-table.cjs +1 -1
- package/dist/cjs/components/composites/strategies-table/index.cjs +1 -1
- package/dist/cjs/components/composites/strategies-table/types/index.cjs +1 -1
- package/dist/cjs/components/composites/strategies-table/types/rewards-cell.cjs +1 -0
- package/dist/cjs/components/composites/tx-preview/confirm/amounts/TransactionConfirmAmountField.cjs +1 -1
- package/dist/cjs/components/composites/tx-preview/confirm/dialog/TransactionConfirmModalView.cjs +1 -1
- package/dist/cjs/components/compound-apy/compound-apy-legacy.cjs +1 -0
- package/dist/cjs/components/compound-apy/compound-apy.cjs +1 -1
- package/dist/cjs/components/compound-apy/index.cjs +1 -1
- package/dist/cjs/components/detailed-page-title/detailed-page-title.cjs +1 -1
- package/dist/cjs/components/index.cjs +1 -1
- package/dist/cjs/components/markdown-viewer/markdown-viewer.cjs +1 -1
- package/dist/cjs/components/pool-apy-tooltip/apy-tooltip.cjs +1 -0
- package/dist/cjs/components/pool-apy-tooltip/index.cjs +1 -1
- package/dist/cjs/components/pool-apy-tooltip/pool-apy-tooltip.cjs +1 -1
- package/dist/cjs/components/split-list/split-list.cjs +1 -1
- package/dist/cjs/components/time-to-liquidation/time-to-liquidation.cjs +1 -1
- package/dist/cjs/components/token-icon/token-icon.cjs +1 -1
- package/dist/cjs/components/token-symbol/index.cjs +1 -1
- package/dist/cjs/components/token-symbol/token-symbol.cjs +1 -1
- package/dist/cjs/components/tokens-list-cell/tokens-list-cell.cjs +1 -1
- package/dist/cjs/components/with-copy/with-copy.cjs +1 -1
- package/dist/cjs/components/yield-breakdown-tooltip/index.cjs +1 -0
- package/dist/cjs/components/yield-breakdown-tooltip/yield-breakdown-tooltip.cjs +1 -0
- package/dist/cjs/hooks/use-debounce-call.cjs +1 -1
- package/dist/cjs/hooks/use-media-query.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/locale/en.json.cjs +1 -1
- package/dist/cjs/types/common.cjs +1 -1
- package/dist/cjs/utils/apy-breakdown.cjs +1 -0
- package/dist/cjs/utils/bps.cjs +1 -0
- package/dist/cjs/utils/index.cjs +1 -1
- package/dist/cjs/utils/token-icon-source.cjs +1 -0
- package/dist/esm/components/assets-list-cell/assets-list-cell.js +132 -206
- package/dist/esm/components/block-sync/block-sync.js +5 -4
- package/dist/esm/components/block-sync-pill/block-sync-pill.js +5 -4
- package/dist/esm/components/breakpoint-provider.js +67 -0
- package/dist/esm/components/checkbox/checkbox-labeled.js +3 -2
- package/dist/esm/components/client-adapters/styled-rounded-image/styled-rounded-image.js +3 -2
- package/dist/esm/components/complex-input/complex-input.js +5 -4
- package/dist/esm/components/composites/index.js +86 -81
- package/dist/esm/components/composites/pool-assets-table/pool-assets-table-head.js +3 -2
- package/dist/esm/components/composites/pool-credit-managers-table/pool-credit-managers-table-head.js +3 -2
- package/dist/esm/components/composites/pool-table/columns.js +61 -60
- package/dist/esm/components/composites/strategies-table/columns.js +55 -86
- package/dist/esm/components/composites/strategies-table/components/cells/cells.js +150 -110
- package/dist/esm/components/composites/strategies-table/components/cells/index.js +7 -5
- package/dist/esm/components/composites/strategies-table/components/index.js +32 -30
- package/dist/esm/components/composites/strategies-table/components/points-feature/points-feature.js +35 -32
- package/dist/esm/components/composites/strategies-table/components/rewards-tooltip/tooltip-content.js +91 -224
- package/dist/esm/components/composites/strategies-table/components/strategies-table.js +26 -24
- package/dist/esm/components/composites/strategies-table/index.js +36 -31
- package/dist/esm/components/composites/strategies-table/types/index.js +5 -1
- package/dist/esm/components/composites/strategies-table/types/rewards-cell.js +40 -0
- package/dist/esm/components/composites/tx-preview/confirm/amounts/TransactionConfirmAmountField.js +32 -189
- package/dist/esm/components/composites/tx-preview/confirm/dialog/TransactionConfirmModalView.js +5 -4
- package/dist/esm/components/compound-apy/compound-apy-legacy.js +127 -0
- package/dist/esm/components/compound-apy/compound-apy.js +56 -245
- package/dist/esm/components/compound-apy/index.js +4 -2
- package/dist/esm/components/detailed-page-title/detailed-page-title.js +25 -180
- package/dist/esm/components/index.js +805 -787
- package/dist/esm/components/markdown-viewer/markdown-viewer.js +5 -4
- package/dist/esm/components/pool-apy-tooltip/apy-tooltip.js +155 -0
- package/dist/esm/components/pool-apy-tooltip/index.js +4 -2
- package/dist/esm/components/pool-apy-tooltip/pool-apy-tooltip.js +3 -3
- package/dist/esm/components/split-list/split-list.js +12 -12
- package/dist/esm/components/time-to-liquidation/time-to-liquidation.js +3 -2
- package/dist/esm/components/token-icon/token-icon.js +72 -58
- package/dist/esm/components/token-symbol/index.js +2 -3
- package/dist/esm/components/token-symbol/token-symbol.js +41 -62
- package/dist/esm/components/tokens-list-cell/tokens-list-cell.js +35 -192
- package/dist/esm/components/with-copy/with-copy.js +5 -4
- package/dist/esm/components/yield-breakdown-tooltip/index.js +4 -0
- package/dist/esm/components/yield-breakdown-tooltip/yield-breakdown-tooltip.js +222 -0
- package/dist/esm/hooks/use-debounce-call.js +3 -2
- package/dist/esm/hooks/use-media-query.js +49 -16
- package/dist/esm/index.js +974 -946
- package/dist/esm/locale/en.json.js +9 -2
- package/dist/esm/types/common.js +1 -6
- package/dist/esm/utils/apy-breakdown.js +18 -0
- package/dist/esm/utils/bps.js +4 -0
- package/dist/esm/utils/index.js +105 -95
- package/dist/esm/utils/token-icon-source.js +48 -0
- package/dist/globals.css +1 -1
- package/dist/types/components/assets-list-cell/assets-list-cell.d.ts +44 -4
- package/dist/types/components/breakpoint-provider.d.ts +56 -0
- package/dist/types/components/composites/pool-table/pool-table-backend-contract.types.d.ts +1 -1
- package/dist/types/components/composites/strategies-table/components/cells/cells.d.ts +34 -3
- package/dist/types/components/composites/strategies-table/components/points-feature/points-feature.d.ts +14 -10
- package/dist/types/components/composites/strategies-table/components/rewards-tooltip/tooltip-content.d.ts +10 -13
- package/dist/types/components/composites/strategies-table/index.d.ts +1 -1
- package/dist/types/components/composites/strategies-table/types/index.d.ts +1 -0
- package/dist/types/components/composites/strategies-table/types/rewards-cell.d.ts +48 -0
- package/dist/types/components/composites/strategies-table/types/rewards-tooltip.d.ts +37 -32
- package/dist/types/components/composites/strategies-table/types/table.d.ts +27 -12
- package/dist/types/components/composites/tx-preview/confirm/amounts/TransactionConfirmAmountField.d.ts +3 -3
- package/dist/types/components/compound-apy/compound-apy-legacy.d.ts +109 -0
- package/dist/types/components/compound-apy/compound-apy.d.ts +18 -94
- package/dist/types/components/compound-apy/index.d.ts +1 -0
- package/dist/types/components/index.d.ts +3 -1
- package/dist/types/components/points-icon/index.d.ts +1 -1
- package/dist/types/components/points-icon/points-icon.d.ts +13 -2
- package/dist/types/components/pool-apy-tooltip/apy-tooltip.d.ts +20 -0
- package/dist/types/components/pool-apy-tooltip/index.d.ts +1 -0
- package/dist/types/components/pool-apy-tooltip/pool-apy-tooltip.d.ts +18 -1
- package/dist/types/components/split-list/split-list.d.ts +1 -1
- package/dist/types/components/token-icon/token-icon.d.ts +11 -2
- package/dist/types/components/token-symbol/token-symbol.d.ts +4 -4
- package/dist/types/components/yield-breakdown-tooltip/index.d.ts +1 -0
- package/dist/types/components/yield-breakdown-tooltip/yield-breakdown-tooltip.d.ts +32 -0
- package/dist/types/hooks/use-media-query.d.ts +5 -1
- package/dist/types/index.d.ts +2 -0
- package/dist/types/locale/en.json.d.ts +10 -2
- package/dist/types/types/common.d.ts +5 -11
- package/dist/types/utils/apy-breakdown.d.ts +18 -0
- package/dist/types/utils/bps.d.ts +3 -0
- package/dist/types/utils/index.d.ts +3 -0
- package/dist/types/utils/token-icon-source.d.ts +28 -0
- package/package.json +2 -2
|
@@ -1,55 +1,49 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as r, jsxs as s } from "react/jsx-runtime";
|
|
2
2
|
import { formatLeverage as f } from "@gearbox-protocol/sdk";
|
|
3
|
-
import { NetworkIcon as
|
|
4
|
-
import { ShortString as
|
|
3
|
+
import { NetworkIcon as w } from "../../network-icon/network-icon.js";
|
|
4
|
+
import { ShortString as T } from "../../short-string/short-string.js";
|
|
5
5
|
import { TokenSymbol as b } from "../../token-symbol/token-symbol.js";
|
|
6
|
-
import { FormattedMessageTyped as
|
|
6
|
+
import { FormattedMessageTyped as m } from "../../typed-intl/index.js";
|
|
7
7
|
import { Typography as y } from "../../typography/typography.js";
|
|
8
|
-
import { RWAFeature as
|
|
9
|
-
import { TitleGrid as
|
|
10
|
-
import { RewardsTooltip as
|
|
8
|
+
import { RWAFeature as v, ZeroSlippageFeature as S, StrategiesRewardsCell as x } from "./components/cells/cells.js";
|
|
9
|
+
import { TitleGrid as C, DisabledWrap as h } from "./components/cells/cells.styles.js";
|
|
10
|
+
import { RewardsTooltip as k } from "./components/rewards-tooltip/rewards-tooltip.js";
|
|
11
11
|
import "./components/rewards-tooltip/rewards-tooltip-root.js";
|
|
12
12
|
import "../../tooltip/simple-tooltip.js";
|
|
13
13
|
import "../../tooltip/tooltip.js";
|
|
14
14
|
import "@fortawesome/free-solid-svg-icons";
|
|
15
|
-
import "viem";
|
|
16
15
|
import "../../icon-button/icon-button.js";
|
|
17
16
|
import "../../icons/fa-icon.js";
|
|
18
17
|
import "../../separate-line/separate-line.js";
|
|
19
|
-
import "../../skeleton/skeleton.js";
|
|
20
|
-
import "react";
|
|
21
|
-
import "clsx";
|
|
22
|
-
import "tailwind-merge";
|
|
23
|
-
import "sonner";
|
|
24
|
-
import "@gearbox-protocol/sdk/common-utils";
|
|
25
|
-
import "luxon";
|
|
26
|
-
import "../../../utils/z-index.js";
|
|
27
18
|
import "../../tip-card/tip-card.js";
|
|
28
19
|
import "../../vertical-indicator/vertical-indicator.js";
|
|
29
20
|
import "../../vertical-list/vertical-list.js";
|
|
21
|
+
import "clsx";
|
|
22
|
+
import "tailwind-merge";
|
|
30
23
|
import "../../help-tip/help-tip.js";
|
|
31
24
|
import "./components/feature/feature.styles.js";
|
|
32
25
|
import "../../points-icon/points-icon.js";
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
26
|
+
import { rewardsCellDataFromLegacy as N } from "./types/rewards-cell.js";
|
|
27
|
+
function n(e, i, a) {
|
|
28
|
+
const t = e?.header ?? /* @__PURE__ */ r(
|
|
29
|
+
m,
|
|
36
30
|
{
|
|
37
31
|
messageId: e?.headerMessageId ?? i
|
|
38
32
|
}
|
|
39
33
|
);
|
|
40
|
-
let
|
|
34
|
+
let l;
|
|
41
35
|
if (e?.headerTip !== null) {
|
|
42
|
-
const
|
|
43
|
-
|
|
36
|
+
const d = e?.headerTipMessageId ?? a;
|
|
37
|
+
l = e?.headerTip ?? (d && /* @__PURE__ */ r(m, { messageId: d }));
|
|
44
38
|
}
|
|
45
|
-
return { header:
|
|
39
|
+
return { header: t, headerTip: l, mobileTitle: e?.mobileTitle ?? t };
|
|
46
40
|
}
|
|
47
|
-
function
|
|
48
|
-
const { strategy: i, targetToken:
|
|
49
|
-
return /* @__PURE__ */
|
|
50
|
-
/* @__PURE__ */
|
|
51
|
-
/* @__PURE__ */
|
|
52
|
-
|
|
41
|
+
function F({ ctx: e }) {
|
|
42
|
+
const { strategy: i, targetToken: a, row: t } = e, l = !!t.disabledStyle, d = !!i.strategyMarketType?.includes("rwa"), o = e.isMobile || e.isDesktop ? 38 : 26;
|
|
43
|
+
return /* @__PURE__ */ r("div", { className: "flex flex-col-auto", children: /* @__PURE__ */ s(C, { children: [
|
|
44
|
+
/* @__PURE__ */ s("div", { className: "flex items-center gap-1.5 pr-2 leading-none", children: [
|
|
45
|
+
/* @__PURE__ */ r(h, { disabled: l, children: /* @__PURE__ */ r(
|
|
46
|
+
w,
|
|
53
47
|
{
|
|
54
48
|
network: i.network,
|
|
55
49
|
isTest: !1,
|
|
@@ -57,65 +51,40 @@ function S({ ctx: e }) {
|
|
|
57
51
|
showTooltip: !0
|
|
58
52
|
}
|
|
59
53
|
) }),
|
|
60
|
-
/* @__PURE__ */
|
|
54
|
+
/* @__PURE__ */ r(h, { disabled: l, children: /* @__PURE__ */ r(b, { token: a, size: 24 }) })
|
|
61
55
|
] }),
|
|
62
|
-
/* @__PURE__ */
|
|
63
|
-
/* @__PURE__ */
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
56
|
+
/* @__PURE__ */ s("div", { className: "flex items-center gap-x-2", children: [
|
|
57
|
+
/* @__PURE__ */ r(T, { maxLength: o, children: i.name }),
|
|
58
|
+
d && /* @__PURE__ */ r(v, { disabledStyle: l }),
|
|
59
|
+
t.isZeroSlippagePair && /* @__PURE__ */ r(
|
|
60
|
+
S,
|
|
67
61
|
{
|
|
68
|
-
token:
|
|
69
|
-
disabledStyle:
|
|
62
|
+
token: t.zeroSlippageToken,
|
|
63
|
+
disabledStyle: l
|
|
70
64
|
}
|
|
71
65
|
)
|
|
72
66
|
] }),
|
|
73
|
-
|
|
74
|
-
|
|
67
|
+
l && /* @__PURE__ */ r("div", {}),
|
|
68
|
+
l && /* @__PURE__ */ r(
|
|
75
69
|
y,
|
|
76
70
|
{
|
|
77
71
|
as: "span",
|
|
78
72
|
variant: "caption",
|
|
79
73
|
style: { lineHeight: "100%" },
|
|
80
|
-
children: /* @__PURE__ */
|
|
74
|
+
children: /* @__PURE__ */ r(m, { messageId: "components.strategiesTable.line.name.disabled" })
|
|
81
75
|
}
|
|
82
76
|
)
|
|
83
77
|
] }) });
|
|
84
78
|
}
|
|
85
|
-
function
|
|
79
|
+
function g({
|
|
86
80
|
ctx: e,
|
|
87
81
|
mobile: i = !1
|
|
88
82
|
}) {
|
|
89
|
-
const {
|
|
90
|
-
|
|
91
|
-
{
|
|
92
|
-
maxAPY: r.maxAPY,
|
|
93
|
-
bonusAPY: r.bonusAPY,
|
|
94
|
-
rewards: r.rewards,
|
|
95
|
-
rewardRates: r.rewardRates,
|
|
96
|
-
debtRewards: r.debtRewards,
|
|
97
|
-
debtRewardRates: r.debtRewardRates,
|
|
98
|
-
hasAPY: r.hasAPY ?? !1,
|
|
99
|
-
hasRewards: r.hasRewards ?? !1,
|
|
100
|
-
hasDebtRewards: r.hasDebtRewards ?? !1,
|
|
101
|
-
apyLoading: r.apyLoading,
|
|
102
|
-
disabledStyle: l
|
|
103
|
-
}
|
|
104
|
-
), p = i ? /* @__PURE__ */ t("div", { className: "pt-1", children: c }) : c;
|
|
105
|
-
return l ? p : /* @__PURE__ */ t(
|
|
106
|
-
x,
|
|
107
|
-
{
|
|
108
|
-
cellInfo: r,
|
|
109
|
-
targetToken: d,
|
|
110
|
-
apyListByNetwork: a.apyListByNetwork,
|
|
111
|
-
tokensList: s,
|
|
112
|
-
strategyCreditManagers: a.strategyCreditManagers,
|
|
113
|
-
children: /* @__PURE__ */ t("div", { children: p })
|
|
114
|
-
}
|
|
115
|
-
);
|
|
83
|
+
const { rewardsCell: a, rewardsCellInfo: t, rewardsTooltip: l, row: d } = e, o = !!d.disabledStyle, u = a ?? (t ? N(t) : { pointGroups: [] }), c = /* @__PURE__ */ r(x, { data: u, disabledStyle: o }), p = i ? /* @__PURE__ */ r("div", { className: "pt-1", children: c }) : c;
|
|
84
|
+
return o ? p : /* @__PURE__ */ r(k, { ...l, children: /* @__PURE__ */ r("div", { children: p }) });
|
|
116
85
|
}
|
|
117
|
-
function
|
|
118
|
-
const { header: i, mobileTitle:
|
|
86
|
+
function ee(e) {
|
|
87
|
+
const { header: i, mobileTitle: a } = n(
|
|
119
88
|
e,
|
|
120
89
|
"components.strategiesTable.head.name"
|
|
121
90
|
);
|
|
@@ -127,12 +96,12 @@ function ie(e) {
|
|
|
127
96
|
align: "left",
|
|
128
97
|
className: "pl-4",
|
|
129
98
|
sort: e?.sortField !== void 0 ? { field: e.sortField, defaultDirection: "desc" } : { field: "strategyName", defaultDirection: "desc" },
|
|
130
|
-
cell: (
|
|
131
|
-
mobileTitle:
|
|
99
|
+
cell: (t) => /* @__PURE__ */ r(F, { ctx: t }),
|
|
100
|
+
mobileTitle: a
|
|
132
101
|
};
|
|
133
102
|
}
|
|
134
|
-
function
|
|
135
|
-
const { header: i, mobileTitle:
|
|
103
|
+
function re(e) {
|
|
104
|
+
const { header: i, mobileTitle: a } = n(
|
|
136
105
|
e,
|
|
137
106
|
"components.strategiesTable.head.rewards"
|
|
138
107
|
);
|
|
@@ -143,13 +112,13 @@ function de(e) {
|
|
|
143
112
|
mediumWidth: e?.mediumWidth ?? "270px",
|
|
144
113
|
align: "left",
|
|
145
114
|
sort: e?.sortField !== void 0 ? { field: e.sortField, defaultDirection: "desc" } : { field: "apy", defaultDirection: "desc" },
|
|
146
|
-
cell: (
|
|
147
|
-
mobileCell: (
|
|
148
|
-
mobileTitle:
|
|
115
|
+
cell: (t) => /* @__PURE__ */ r(g, { ctx: t }),
|
|
116
|
+
mobileCell: (t) => /* @__PURE__ */ r(g, { ctx: t, mobile: !0 }),
|
|
117
|
+
mobileTitle: a
|
|
149
118
|
};
|
|
150
119
|
}
|
|
151
|
-
function
|
|
152
|
-
const { header: i, mobileTitle:
|
|
120
|
+
function te(e) {
|
|
121
|
+
const { header: i, mobileTitle: a } = n(
|
|
153
122
|
e,
|
|
154
123
|
"components.strategiesTable.head.leverage"
|
|
155
124
|
);
|
|
@@ -161,16 +130,16 @@ function se(e) {
|
|
|
161
130
|
align: "right",
|
|
162
131
|
className: "pr-4",
|
|
163
132
|
headerClassName: "pr-4",
|
|
164
|
-
cell: (
|
|
165
|
-
mobileTitle:
|
|
133
|
+
cell: (t) => `×${f(Number(t.row.maxLeverage), 0)}`,
|
|
134
|
+
mobileTitle: a
|
|
166
135
|
};
|
|
167
136
|
}
|
|
168
|
-
function
|
|
137
|
+
function ie(e) {
|
|
169
138
|
return e;
|
|
170
139
|
}
|
|
171
140
|
export {
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
141
|
+
ie as customStrategyColumn,
|
|
142
|
+
ee as strategyColumn,
|
|
143
|
+
te as strategyLeverageColumn,
|
|
144
|
+
re as strategyRewardsColumn
|
|
176
145
|
};
|
|
@@ -1,36 +1,37 @@
|
|
|
1
|
-
import { jsx as e, Fragment as
|
|
2
|
-
import { formatPercentage as
|
|
3
|
-
import { RWA_GRADIENT_BORDER_CLASS as
|
|
4
|
-
import { Skeleton as
|
|
1
|
+
import { jsx as e, Fragment as P, jsxs as f } from "react/jsx-runtime";
|
|
2
|
+
import { formatPercentage as m } from "@gearbox-protocol/sdk";
|
|
3
|
+
import { RWA_GRADIENT_BORDER_CLASS as T } from "../../../../rwa-styles/index.js";
|
|
4
|
+
import { Skeleton as A } from "../../../../skeleton/skeleton.js";
|
|
5
5
|
import "react";
|
|
6
|
-
import { cn as
|
|
6
|
+
import { cn as x } from "../../../../../utils/cn.js";
|
|
7
7
|
import "sonner";
|
|
8
8
|
import "@gearbox-protocol/sdk/common-utils";
|
|
9
9
|
import "luxon";
|
|
10
10
|
import "../../../../../utils/z-index.js";
|
|
11
|
-
import { SimpleTooltip as
|
|
11
|
+
import { SimpleTooltip as v } from "../../../../tooltip/simple-tooltip.js";
|
|
12
12
|
import "../../../../tooltip/tooltip.js";
|
|
13
|
-
import { FormattedMessageTyped as
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
13
|
+
import { FormattedMessageTyped as u } from "../../../../typed-intl/index.js";
|
|
14
|
+
import { rewardsCellDataFromLegacy as L } from "../../types/rewards-cell.js";
|
|
15
|
+
import { APYFeature as g } from "../apy-feature/apy-feature.js";
|
|
16
|
+
import { PointsFeature as F } from "../points-feature/points-feature.js";
|
|
17
|
+
import { Plus as h, DisabledWrap as N } from "./cells.styles.js";
|
|
17
18
|
function K({
|
|
18
|
-
token:
|
|
19
|
-
disabledStyle:
|
|
19
|
+
token: r,
|
|
20
|
+
disabledStyle: n
|
|
20
21
|
}) {
|
|
21
|
-
const
|
|
22
|
-
return /* @__PURE__ */ e(
|
|
23
|
-
|
|
22
|
+
const t = r && "symbol" in r && r.symbol || r && "title" in r && r.title || "", o = () => /* @__PURE__ */ e("span", { className: x(n && "opacity-60 pointer-events-none"), children: /* @__PURE__ */ e(g, { children: /* @__PURE__ */ e(u, { messageId: "components.strategiesTable.line.0slippage" }) }) });
|
|
23
|
+
return /* @__PURE__ */ e(P, { children: n ? o() : /* @__PURE__ */ e(
|
|
24
|
+
v,
|
|
24
25
|
{
|
|
25
26
|
placement: "top",
|
|
26
27
|
triangle: !1,
|
|
27
|
-
title:
|
|
28
|
+
title: o(),
|
|
28
29
|
children: /* @__PURE__ */ e(
|
|
29
|
-
|
|
30
|
+
u,
|
|
30
31
|
{
|
|
31
32
|
messageId: "components.strategiesTable.line.0slippage.tip",
|
|
32
33
|
values: {
|
|
33
|
-
symbol:
|
|
34
|
+
symbol: t
|
|
34
35
|
}
|
|
35
36
|
}
|
|
36
37
|
)
|
|
@@ -38,134 +39,173 @@ function K({
|
|
|
38
39
|
) });
|
|
39
40
|
}
|
|
40
41
|
function Q({
|
|
41
|
-
disabledStyle:
|
|
42
|
-
tooltip:
|
|
42
|
+
disabledStyle: r,
|
|
43
|
+
tooltip: n = /* @__PURE__ */ e(u, { messageId: "components.strategiesTable.line.rwa.tip" })
|
|
43
44
|
}) {
|
|
44
|
-
const
|
|
45
|
+
const t = /* @__PURE__ */ e(
|
|
45
46
|
"span",
|
|
46
47
|
{
|
|
47
|
-
className:
|
|
48
|
+
className: x(
|
|
48
49
|
"rounded-xl px-[6px] py-1 text-xs leading-none",
|
|
49
|
-
|
|
50
|
-
|
|
50
|
+
T,
|
|
51
|
+
r && "opacity-60 pointer-events-none"
|
|
51
52
|
),
|
|
52
|
-
children: /* @__PURE__ */ e(
|
|
53
|
+
children: /* @__PURE__ */ e(u, { messageId: "components.strategiesTable.line.rwa" })
|
|
53
54
|
}
|
|
54
55
|
);
|
|
55
|
-
return /* @__PURE__ */ e(
|
|
56
|
+
return /* @__PURE__ */ e(P, { children: r ? t : /* @__PURE__ */ e(v, { placement: "top", triangle: !1, title: t, children: n }) });
|
|
56
57
|
}
|
|
57
|
-
function
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
rewards: n,
|
|
61
|
-
rewardRates: d,
|
|
62
|
-
debtRewards: u,
|
|
63
|
-
debtRewardRates: f,
|
|
64
|
-
hasAPY: a,
|
|
65
|
-
hasRewards: s,
|
|
66
|
-
hasDebtRewards: g,
|
|
67
|
-
disabledStyle: p,
|
|
68
|
-
apyLoading: h,
|
|
58
|
+
function Y({
|
|
59
|
+
data: r,
|
|
60
|
+
disabledStyle: n,
|
|
69
61
|
apyFormat: t = "feature"
|
|
70
62
|
}) {
|
|
71
|
-
const o = (
|
|
72
|
-
|
|
63
|
+
const { maxApy: o, bonusApy: p, pointGroups: s, apyLoading: l = !1 } = r, c = (a) => t === "feature" ? /* @__PURE__ */ f(g, { children: [
|
|
64
|
+
m(a),
|
|
73
65
|
"% APR"
|
|
74
|
-
] }) : `${
|
|
66
|
+
] }) : `${m(a)}%`, i = (a) => t === "feature" ? /* @__PURE__ */ f(g, { children: [
|
|
75
67
|
"exp. ",
|
|
76
|
-
|
|
68
|
+
m(a),
|
|
77
69
|
"% APR"
|
|
78
|
-
] }) : `exp. ${
|
|
79
|
-
return /* @__PURE__ */
|
|
70
|
+
] }) : `exp. ${m(a)}%`, d = s.some((a) => a.length > 0);
|
|
71
|
+
return /* @__PURE__ */ f("div", { className: "flex-row-row items-center gap-2", children: [
|
|
80
72
|
(() => {
|
|
81
|
-
const
|
|
82
|
-
|
|
83
|
-
|
|
73
|
+
const a = [
|
|
74
|
+
o !== void 0 ? /* @__PURE__ */ e(
|
|
75
|
+
A,
|
|
84
76
|
{
|
|
85
77
|
className: "inline-block align-text-bottom",
|
|
86
78
|
width: 50,
|
|
87
|
-
loading:
|
|
88
|
-
children: o
|
|
79
|
+
loading: l,
|
|
80
|
+
children: c(o)
|
|
89
81
|
},
|
|
90
82
|
"apy"
|
|
91
83
|
) : void 0,
|
|
92
|
-
|
|
93
|
-
|
|
84
|
+
d ? /* @__PURE__ */ e(
|
|
85
|
+
R,
|
|
94
86
|
{
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
debtRewards: u,
|
|
98
|
-
debtRewardRates: f,
|
|
99
|
-
hasRewards: s,
|
|
100
|
-
hasDebtRewards: g,
|
|
101
|
-
disabledStyle: p
|
|
87
|
+
pointGroups: s,
|
|
88
|
+
disabledStyle: n
|
|
102
89
|
},
|
|
103
90
|
"points"
|
|
104
91
|
) : void 0
|
|
105
92
|
].filter(Boolean);
|
|
106
|
-
return
|
|
93
|
+
return a.flatMap((b, w) => w === a.length - 1 ? [b] : [b, /* @__PURE__ */ e(h, { children: "+" }, `plus-${w}`)]);
|
|
107
94
|
})(),
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
95
|
+
p !== void 0 && /* @__PURE__ */ e(h, { children: ":" }),
|
|
96
|
+
p !== void 0 && /* @__PURE__ */ e(
|
|
97
|
+
A,
|
|
111
98
|
{
|
|
112
99
|
className: "inline-block align-text-bottom",
|
|
113
|
-
loading:
|
|
100
|
+
loading: l,
|
|
114
101
|
width: 50,
|
|
115
|
-
children:
|
|
102
|
+
children: i(p)
|
|
116
103
|
}
|
|
117
104
|
)
|
|
118
105
|
] });
|
|
119
106
|
}
|
|
120
|
-
function
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
107
|
+
function U({
|
|
108
|
+
maxAPY: r,
|
|
109
|
+
bonusAPY: n,
|
|
110
|
+
rewards: t,
|
|
111
|
+
rewardRates: o,
|
|
112
|
+
debtRewards: p,
|
|
113
|
+
debtRewardRates: s,
|
|
114
|
+
hasAPY: l,
|
|
115
|
+
hasRewards: c,
|
|
116
|
+
hasDebtRewards: i,
|
|
117
|
+
disabledStyle: d,
|
|
118
|
+
apyLoading: y,
|
|
119
|
+
apyFormat: a = "feature"
|
|
129
120
|
}) {
|
|
130
|
-
return
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
121
|
+
return /* @__PURE__ */ e(
|
|
122
|
+
Y,
|
|
123
|
+
{
|
|
124
|
+
data: L({
|
|
125
|
+
maxAPY: r,
|
|
126
|
+
bonusAPY: n,
|
|
127
|
+
rewards: t,
|
|
128
|
+
rewardRates: o,
|
|
129
|
+
debtRewards: p,
|
|
130
|
+
debtRewardRates: s,
|
|
131
|
+
hasAPY: l,
|
|
132
|
+
hasRewards: c,
|
|
133
|
+
hasDebtRewards: i,
|
|
134
|
+
apyLoading: y
|
|
135
|
+
}),
|
|
136
|
+
disabledStyle: d,
|
|
137
|
+
apyFormat: a
|
|
138
|
+
}
|
|
139
|
+
);
|
|
140
|
+
}
|
|
141
|
+
function R({
|
|
142
|
+
pointGroups: r,
|
|
143
|
+
disabledStyle: n,
|
|
144
|
+
theme: t
|
|
145
|
+
}) {
|
|
146
|
+
const o = r.filter((s) => s.length > 0);
|
|
147
|
+
return o.flatMap((s, l) => {
|
|
148
|
+
const c = s.map((i, d) => /* @__PURE__ */ e(
|
|
149
|
+
"span",
|
|
150
|
+
{
|
|
151
|
+
children: /* @__PURE__ */ e(N, { disabled: n, children: /* @__PURE__ */ e(
|
|
152
|
+
F,
|
|
153
|
+
{
|
|
154
|
+
reward: i.reward,
|
|
155
|
+
points: i.rate,
|
|
156
|
+
theme: t
|
|
157
|
+
}
|
|
158
|
+
) })
|
|
159
|
+
},
|
|
160
|
+
[
|
|
161
|
+
"points",
|
|
162
|
+
l,
|
|
163
|
+
d,
|
|
164
|
+
i.reward.type,
|
|
165
|
+
i.reward.name,
|
|
166
|
+
i.reward.units ?? "",
|
|
167
|
+
String(i.rate)
|
|
168
|
+
].join("-")
|
|
169
|
+
));
|
|
170
|
+
return l === o.length - 1 ? c : [...c, /* @__PURE__ */ e(h, { children: "+" }, `plus-points-${l}`)];
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
function V({
|
|
174
|
+
rewards: r,
|
|
175
|
+
rewardRates: n,
|
|
176
|
+
debtRewards: t,
|
|
177
|
+
debtRewardRates: o,
|
|
178
|
+
hasRewards: p,
|
|
179
|
+
hasDebtRewards: s,
|
|
180
|
+
disabledStyle: l,
|
|
181
|
+
theme: c
|
|
182
|
+
}) {
|
|
183
|
+
const { pointGroups: i } = L({
|
|
184
|
+
maxAPY: 0,
|
|
185
|
+
bonusAPY: void 0,
|
|
186
|
+
rewards: r,
|
|
187
|
+
rewardRates: n,
|
|
188
|
+
debtRewards: t,
|
|
189
|
+
debtRewardRates: o,
|
|
190
|
+
hasAPY: !1,
|
|
191
|
+
hasRewards: p,
|
|
192
|
+
hasDebtRewards: s,
|
|
193
|
+
apyLoading: !1
|
|
194
|
+
});
|
|
195
|
+
return /* @__PURE__ */ e(
|
|
196
|
+
R,
|
|
197
|
+
{
|
|
198
|
+
pointGroups: i,
|
|
199
|
+
disabledStyle: l,
|
|
200
|
+
theme: c
|
|
201
|
+
}
|
|
202
|
+
);
|
|
165
203
|
}
|
|
166
204
|
export {
|
|
167
205
|
Q as RWAFeature,
|
|
168
|
-
|
|
169
|
-
|
|
206
|
+
Y as StrategiesRewardsCell,
|
|
207
|
+
U as StrategiesRewardsCellLegacy,
|
|
208
|
+
R as StrategyPoints,
|
|
209
|
+
V as StrategyPointsLegacy,
|
|
170
210
|
K as ZeroSlippageFeature
|
|
171
211
|
};
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import { RWAFeature as t, StrategiesRewardsCell as a,
|
|
2
|
-
import { DisabledWrap as p, Plus as
|
|
1
|
+
import { RWAFeature as t, StrategiesRewardsCell as a, StrategiesRewardsCellLegacy as i, StrategyPoints as l, StrategyPointsLegacy as s, ZeroSlippageFeature as g } from "./cells.js";
|
|
2
|
+
import { DisabledWrap as p, Plus as S, TitleGrid as d } from "./cells.styles.js";
|
|
3
3
|
export {
|
|
4
4
|
p as DisabledWrap,
|
|
5
|
-
|
|
5
|
+
S as Plus,
|
|
6
6
|
t as RWAFeature,
|
|
7
7
|
a as StrategiesRewardsCell,
|
|
8
|
-
i as
|
|
8
|
+
i as StrategiesRewardsCellLegacy,
|
|
9
|
+
l as StrategyPoints,
|
|
10
|
+
s as StrategyPointsLegacy,
|
|
9
11
|
d as TitleGrid,
|
|
10
|
-
|
|
12
|
+
g as ZeroSlippageFeature
|
|
11
13
|
};
|
|
@@ -1,35 +1,37 @@
|
|
|
1
|
-
import { APYFeature as
|
|
2
|
-
import { RWAFeature as
|
|
3
|
-
import { DisabledWrap as
|
|
4
|
-
import { Feature as
|
|
5
|
-
import { FeatureRoot as
|
|
6
|
-
import { StrategiesTableNotFoundLine as
|
|
7
|
-
import { PointsFeature as
|
|
8
|
-
import { RewardsTooltip as C, RewardsTooltipHover as
|
|
1
|
+
import { APYFeature as t, APYFeatureTooltip as r } from "./apy-feature/apy-feature.js";
|
|
2
|
+
import { RWAFeature as i, StrategiesRewardsCell as p, StrategiesRewardsCellLegacy as l, StrategyPoints as s, StrategyPointsLegacy as f, ZeroSlippageFeature as m } from "./cells/cells.js";
|
|
3
|
+
import { DisabledWrap as d, Plus as u, TitleGrid as R } from "./cells/cells.styles.js";
|
|
4
|
+
import { Feature as g } from "./feature/feature.js";
|
|
5
|
+
import { FeatureRoot as F } from "./feature/feature.styles.js";
|
|
6
|
+
import { StrategiesTableNotFoundLine as P } from "./not-found-line.js";
|
|
7
|
+
import { PointsFeature as b, PointsFeatureTooltip as y, PointsLabel as L } from "./points-feature/points-feature.js";
|
|
8
|
+
import { RewardsTooltip as C, RewardsTooltipHover as c } from "./rewards-tooltip/rewards-tooltip.js";
|
|
9
9
|
import { RewardsTooltipRoot as Y } from "./rewards-tooltip/rewards-tooltip-root.js";
|
|
10
|
-
import { RewardsTooltipView as
|
|
11
|
-
import { RewardsTooltipContent as
|
|
12
|
-
import { StrategiesTable as
|
|
10
|
+
import { RewardsTooltipView as D } from "./rewards-tooltip/rewards-tooltip-view.js";
|
|
11
|
+
import { RewardsTooltipContent as H } from "./rewards-tooltip/tooltip-content.js";
|
|
12
|
+
import { StrategiesTable as V } from "./strategies-table.js";
|
|
13
13
|
export {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
14
|
+
t as APYFeature,
|
|
15
|
+
r as APYFeatureTooltip,
|
|
16
|
+
d as DisabledWrap,
|
|
17
|
+
g as Feature,
|
|
18
|
+
F as FeatureRoot,
|
|
19
|
+
u as Plus,
|
|
20
|
+
b as PointsFeature,
|
|
21
|
+
y as PointsFeatureTooltip,
|
|
22
|
+
L as PointsLabel,
|
|
23
|
+
i as RWAFeature,
|
|
24
24
|
C as RewardsTooltip,
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
H as RewardsTooltipContent,
|
|
26
|
+
c as RewardsTooltipHover,
|
|
27
27
|
Y as RewardsTooltipRoot,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
28
|
+
D as RewardsTooltipView,
|
|
29
|
+
p as StrategiesRewardsCell,
|
|
30
|
+
l as StrategiesRewardsCellLegacy,
|
|
31
|
+
V as StrategiesTable,
|
|
32
|
+
P as StrategiesTableNotFoundLine,
|
|
33
|
+
s as StrategyPoints,
|
|
34
|
+
f as StrategyPointsLegacy,
|
|
35
|
+
R as TitleGrid,
|
|
36
|
+
m as ZeroSlippageFeature
|
|
35
37
|
};
|