@gearbox-protocol/ui-kit 4.5.2 → 4.6.0
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/base/apy-breakdown-body/apy-breakdown-body.cjs +1 -1
- package/dist/cjs/components/base/apy-breakdown-body/index.cjs +1 -1
- package/dist/cjs/components/base/info-list/info-list.cjs +1 -1
- package/dist/cjs/components/base/pool-apy-breakdown-card/pool-apy-breakdown-card.cjs +1 -1
- package/dist/cjs/components/base/strategy-apy-breakdown-card/strategy-apy-breakdown-card.cjs +1 -1
- package/dist/cjs/components/compound-apy/compound-apy.cjs +1 -1
- package/dist/cjs/components/yield-breakdown-tooltip/yield-breakdown.cjs +1 -1
- package/dist/esm/components/base/apy-breakdown-body/apy-breakdown-body.js +70 -45
- package/dist/esm/components/base/apy-breakdown-body/index.js +8 -7
- package/dist/esm/components/base/info-list/info-list.js +14 -13
- package/dist/esm/components/base/pool-apy-breakdown-card/pool-apy-breakdown-card.js +68 -64
- package/dist/esm/components/base/strategy-apy-breakdown-card/strategy-apy-breakdown-card.js +109 -105
- package/dist/esm/components/compound-apy/compound-apy.js +22 -20
- package/dist/esm/components/yield-breakdown-tooltip/yield-breakdown.js +92 -79
- package/dist/types/components/base/apy-breakdown-body/apy-breakdown-body.d.ts +5 -0
- package/dist/types/components/base/pool-apy-breakdown-card/pool-apy-breakdown-card.d.ts +3 -1
- package/dist/types/components/base/strategy-apy-breakdown-card/strategy-apy-breakdown-card.d.ts +3 -1
- package/dist/types/components/compound-apy/compound-apy.d.ts +3 -1
- package/dist/types/components/yield-breakdown-tooltip/yield-breakdown.d.ts +3 -1
- package/package.json +2 -2
|
@@ -7,6 +7,8 @@ export interface PoolApyBreakdownCardProps {
|
|
|
7
7
|
readonly data?: ApyBreakdown;
|
|
8
8
|
/** When `"7d"`, labels carry the averaging-window suffix. */
|
|
9
9
|
readonly period?: "7d";
|
|
10
|
+
/** Leaves the campaign links out, where the breakdown sits in a list. */
|
|
11
|
+
readonly hideRewardLinks?: boolean;
|
|
10
12
|
}
|
|
11
13
|
/**
|
|
12
14
|
* How a pool's net APY is arrived at: base yield plus incentives.
|
|
@@ -15,4 +17,4 @@ export interface PoolApyBreakdownCardProps {
|
|
|
15
17
|
* that row is still shown as Incentive APY at 0%. Points sit under a divider
|
|
16
18
|
* when present; they are not addends.
|
|
17
19
|
*/
|
|
18
|
-
export declare function PoolApyBreakdownCard({ data, period, }: PoolApyBreakdownCardProps): React.ReactElement;
|
|
20
|
+
export declare function PoolApyBreakdownCard({ data, period, hideRewardLinks, }: PoolApyBreakdownCardProps): React.ReactElement;
|
package/dist/types/components/base/strategy-apy-breakdown-card/strategy-apy-breakdown-card.d.ts
CHANGED
|
@@ -24,6 +24,8 @@ export interface StrategyApyBreakdownCardProps {
|
|
|
24
24
|
readonly showFormula?: boolean;
|
|
25
25
|
/** When `"7d"`, labels carry the averaging-window suffix. */
|
|
26
26
|
readonly period?: "7d";
|
|
27
|
+
/** Leaves the campaign links out, where the breakdown sits in a list. */
|
|
28
|
+
readonly hideRewardLinks?: boolean;
|
|
27
29
|
}
|
|
28
30
|
/**
|
|
29
31
|
* How a strategy's net APY is arrived at: collateral yield on the leveraged
|
|
@@ -42,4 +44,4 @@ export interface StrategyApyBreakdownCardProps {
|
|
|
42
44
|
* remainder, so the column adds up to the chip even when each reward rounds
|
|
43
45
|
* its own way.
|
|
44
46
|
*/
|
|
45
|
-
export declare function StrategyApyBreakdownCard({ data, leverage, showFormula, period, }: StrategyApyBreakdownCardProps): React.ReactElement;
|
|
47
|
+
export declare function StrategyApyBreakdownCard({ data, leverage, showFormula, period, hideRewardLinks, }: StrategyApyBreakdownCardProps): React.ReactElement;
|
|
@@ -35,6 +35,8 @@ export interface CompoundAPYProps {
|
|
|
35
35
|
tooltip?: boolean;
|
|
36
36
|
/** When `"7d"`, tooltip labels carry the averaging-window suffix. */
|
|
37
37
|
period?: "7d";
|
|
38
|
+
/** Forwarded to {@link YieldBreakdownTooltip}. */
|
|
39
|
+
hideRewardLinks?: boolean;
|
|
38
40
|
className?: string;
|
|
39
41
|
}
|
|
40
42
|
/**
|
|
@@ -43,4 +45,4 @@ export interface CompoundAPYProps {
|
|
|
43
45
|
* No `tokensList`, no external APY, no 7D history, no "soon" points state.
|
|
44
46
|
* For the legacy percent-based API see {@link CompoundAPYLegacy}.
|
|
45
47
|
*/
|
|
46
|
-
export declare function CompoundAPY({ apy, maxLeverage, collateralApy, borrowApy, quotaRate, decimals, tooltip, period, className, }: CompoundAPYProps): import("react").JSX.Element;
|
|
48
|
+
export declare function CompoundAPY({ apy, maxLeverage, collateralApy, borrowApy, quotaRate, decimals, tooltip, period, hideRewardLinks, className, }: CompoundAPYProps): import("react").JSX.Element;
|
|
@@ -26,6 +26,8 @@ export interface YieldBreakdownTooltipProps {
|
|
|
26
26
|
quotaRate?: Bps;
|
|
27
27
|
/** When `"7d"`, labels carry the averaging-window suffix. */
|
|
28
28
|
period?: "7d";
|
|
29
|
+
/** Leaves the campaign links out, where the breakdown sits in a list. */
|
|
30
|
+
hideRewardLinks?: boolean;
|
|
29
31
|
children?: React.ReactNode;
|
|
30
32
|
className?: string;
|
|
31
33
|
/** Controlled open state. Specs pass it because jsdom has no hover. */
|
|
@@ -35,4 +37,4 @@ export interface YieldBreakdownTooltipProps {
|
|
|
35
37
|
* Earn APY tooltip — a pool hands {@link PoolApyBreakdownCard}; a strategy
|
|
36
38
|
* (positions list) still itemises unlevered collateral, borrow and rewards.
|
|
37
39
|
*/
|
|
38
|
-
export declare function YieldBreakdownTooltip({ supplyApy, maxLeverage, collateralApy, borrowApy, quotaRate, period, children, className, open, }: YieldBreakdownTooltipProps): React.JSX.Element;
|
|
40
|
+
export declare function YieldBreakdownTooltip({ supplyApy, maxLeverage, collateralApy, borrowApy, quotaRate, period, hideRewardLinks, children, className, open, }: YieldBreakdownTooltipProps): React.JSX.Element;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gearbox-protocol/ui-kit",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.6.0",
|
|
4
4
|
"description": "Internal UI components",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
"@commitlint/cli": "^20.1.0",
|
|
111
111
|
"@commitlint/config-conventional": "^20.0.0",
|
|
112
112
|
"@gearbox-protocol/biome-config": "^1.0.2",
|
|
113
|
-
"@gearbox-protocol/sdk": "
|
|
113
|
+
"@gearbox-protocol/sdk": "17.5.0",
|
|
114
114
|
"@rollup/plugin-typescript": "^12.3.0",
|
|
115
115
|
"@storybook/addon-a11y": "^10.0.8",
|
|
116
116
|
"@storybook/addon-docs": "^10.0.8",
|