@gearbox-protocol/ui-kit 3.5.1 → 3.6.0-next.1

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.
@@ -0,0 +1,12 @@
1
+ import { TokenData } from '@gearbox-protocol/sdk/common-utils';
2
+ import { default as React } from 'react';
3
+ import { PoolAssetsTableQuotaRow } from './types';
4
+ interface PoolAssetsLineProps {
5
+ poolName: string;
6
+ token: TokenData;
7
+ currentQuota: PoolAssetsTableQuotaRow;
8
+ underlyingToken: TokenData;
9
+ last: boolean;
10
+ }
11
+ export declare function PoolAssetsLine({ poolName, token, currentQuota, underlyingToken, last, }: PoolAssetsLineProps): React.ReactElement;
12
+ export {};
@@ -0,0 +1,7 @@
1
+ import { default as React } from 'react';
2
+ import { PoolAssetsTableSort } from './types';
3
+ interface TableHeadProps {
4
+ sort: PoolAssetsTableSort;
5
+ }
6
+ export declare function TableHead({ sort }: TableHeadProps): React.ReactElement;
7
+ export {};
@@ -0,0 +1,13 @@
1
+ import { TokenData } from '@gearbox-protocol/sdk/common-utils';
2
+ import { default as React } from 'react';
3
+ import { Address } from 'viem';
4
+ import { PoolAssetsTableQuotaRow, PoolAssetsTableSort } from './types';
5
+ export type { PoolAssetsFilterState, PoolAssetsSortFields, PoolAssetsTableQuotaRow, PoolAssetsTableSort, } from './types';
6
+ export interface PoolAssetsTableViewProps {
7
+ readonly list: ReadonlyArray<PoolAssetsTableQuotaRow>;
8
+ readonly poolName: string;
9
+ readonly sort: PoolAssetsTableSort;
10
+ readonly tokensList: Record<Address, TokenData>;
11
+ readonly underlyingToken: TokenData;
12
+ }
13
+ export declare function PoolAssetsTableView({ list, poolName, sort, tokensList, underlyingToken, }: PoolAssetsTableViewProps): React.ReactElement | null;
@@ -0,0 +1,17 @@
1
+ import { Address } from 'viem';
2
+ import { SortField, SortSetterFunction } from '../../hooks';
3
+ export type PoolAssetsSortFields = "name" | "rate" | "usage";
4
+ export interface PoolAssetsTableSort {
5
+ readonly state: SortField<PoolAssetsSortFields> | null;
6
+ readonly set: SortSetterFunction<PoolAssetsSortFields>;
7
+ }
8
+ export interface PoolAssetsFilterState {
9
+ readonly sort: PoolAssetsTableSort;
10
+ }
11
+ /** Quota fields used by PoolAssetsLine (compatible with sdk QuotaInfo) */
12
+ export interface PoolAssetsTableQuotaRow {
13
+ readonly token: Address;
14
+ readonly limit: bigint;
15
+ readonly totalQuoted: bigint;
16
+ readonly rate: bigint;
17
+ }
@@ -78,6 +78,7 @@ export * from './not-found';
78
78
  export * from './options-list';
79
79
  export * from './overflow';
80
80
  export * from './overflow-container';
81
+ export * from './PoolsAssetsTable';
81
82
  export * from './page-title';
82
83
  export * from './percent-indicator';
83
84
  export * from './points-icon';
@@ -77,6 +77,7 @@ export * from './components/not-found';
77
77
  export * from './components/options-list';
78
78
  export * from './components/overflow';
79
79
  export * from './components/overflow-container';
80
+ export * from './components/PoolsAssetsTable';
80
81
  export * from './components/page-title';
81
82
  export * from './components/percent-indicator';
82
83
  export * from './components/points-icon';
@@ -69,7 +69,12 @@ declare const _default: {
69
69
  "components.apyParts.points": "{symbol} Incentive",
70
70
  "components.apyParts.points.condition.crossDeposit": "For cross-chain deposits made via Omni",
71
71
 
72
- "components.openCopyButtons.copy": "Copy to clipboard"
72
+ "components.openCopyButtons.copy": "Copy to clipboard",
73
+
74
+ "components.poolAssetsTable.asset": "Asset",
75
+ "components.poolAssetsTable.rate": "Effective rate",
76
+ "components.poolAssetsTable.limits": "Limits Usage",
77
+ "components.poolAssetsTable.usage": "{amount} of {total}"
73
78
  }
74
79
  ;
75
80
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/ui-kit",
3
- "version": "3.5.1",
3
+ "version": "3.6.0-next.1",
4
4
  "description": "Internal UI components",
5
5
  "repository": "https://github.com/gearbox-protocol/ui-kit",
6
6
  "license": "MIT",
@@ -148,7 +148,7 @@
148
148
  "@commitlint/cli": "^20.1.0",
149
149
  "@commitlint/config-conventional": "^20.0.0",
150
150
  "@gearbox-protocol/biome-config": "^1.0.2",
151
- "@gearbox-protocol/sdk": "13.0.0",
151
+ "@gearbox-protocol/sdk": "13.6.0",
152
152
  "@rollup/plugin-typescript": "^12.3.0",
153
153
  "@storybook/addon-a11y": "^10.0.8",
154
154
  "@storybook/addon-docs": "^10.0.8",