@gearbox-protocol/ui-kit 4.0.0-next.67 → 4.0.0-next.69

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.
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});class t{static root="pool-assets-table-root";static exposureCell="pool-assets-table-exposure-cell";static capCell="pool-assets-table-cap-cell";static capUtilizationCell="pool-assets-table-cap-utilization-cell"}exports.PoolAssetsTableTest=t;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});class e{static root="pool-assets-table-root";static exposureCell="pool-assets-table-exposure-cell";static capCell="pool-assets-table-cap-cell";static capBelowExposureTip="pool-assets-table-cap-below-exposure-tip";static capUtilizationCell="pool-assets-table-cap-utilization-cell"}exports.PoolAssetsTableTest=e;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),h=require("../../no-value/no-value.cjs");require("clsx");require("tailwind-merge");const S=require("../../../utils/format-money.cjs");require("@gearbox-protocol/sdk/onchain");require("../../../utils/z-index.cjs");const f=require("../../base/values/scalars.cjs");require("../../badge/badge.cjs");require("../../badge/chip.cjs");const r=require("../../typed-intl/index.cjs"),y=require("../../collateral-allocation-tooltip/allocation-wheel.cjs"),C=require("../../name-cell/name-cell.cjs"),A=require("../../short-string/short-string.cjs"),t=require("../../table/grid-table.cjs"),n=require("../../table/table-sm.cjs"),k=require("../../token-symbol/token-symbol.cjs"),j=require("../../token-template/token-template.cjs"),z=require("../../vertical-indicator/vertical-indicator.cjs"),c=require("./constants.cjs");function N(l,s){if(s!==0n)return Number(l*10000n/s)}function P(l,s){return s<=0n||l<=0n?0:Number(l*10000n/s)/1e4}function I({asset:l,underlyingToken:s,last:_,isCompact:m,totalUsed:g,colorIndex:v,explorerUrl:u}){const{token:a,limit:i,used:o}=l,q=m?40:21,d=P(o.value,g),p=()=>e.jsx(C.NameCell,{leading:e.jsx(k.TokenSymbol,{size:32,token:a}),title:e.jsx(A.ShortString,{maxLength:q,children:a.symbol})}),x=()=>e.jsxs("div",{className:"flex items-center justify-end gap-2","data-testid":c.PoolAssetsTableTest.exposureCell,children:[e.jsx(y.AllocationWheel,{share:d,colorIndex:v,idle:d===0}),e.jsx(z.VerticalIndicator,{value:e.jsx(j.TokenTemplate,{decimalPartLength:2,precision:2,showSymbol:!1,token:s,value:o.value}),valueDescription:o.valueUsd===null?e.jsx(h.NoValue,{}):S.formatMoney(o.valueUsd)})]}),b=()=>e.jsx("div",{"data-testid":c.PoolAssetsTableTest.capCell,children:i.value===0n?e.jsx(h.NoValue,{}):e.jsx(j.TokenTemplate,{decimalPartLength:2,precision:2,showSymbol:!1,token:s,value:i.value})}),T=()=>e.jsx("div",{"data-testid":c.PoolAssetsTableTest.capUtilizationCell,children:e.jsx(f.UtilizationValue,{data:N(o.value,i.value)})});return e.jsx(t.GridTableRow,{last:_,height:"auto",href:u?`${u}/address/${a.address}`:void 0,target:"_blank",style:{minHeight:"75px"},children:m?e.jsx(t.GridTableCell,{className:"px-3 py-0!",size:"sm",span:"full",children:e.jsxs(n.TableLineSm,{className:"w-full",columns:3,columnsXs:3,title:p(),children:[e.jsx(n.TableCellSm,{title:e.jsx(r.FormattedMessageTyped,{messageId:"components.poolAssetsTable.exposure"}),children:x()}),e.jsx(n.TableCellSm,{title:e.jsx(r.FormattedMessageTyped,{messageId:"components.poolAssetsTable.cap"}),children:b()}),e.jsx(n.TableCellSm,{title:e.jsx(r.FormattedMessageTyped,{messageId:"components.poolAssetsTable.capUtilization"}),children:T()})]})}):e.jsxs(e.Fragment,{children:[e.jsx(t.GridTableCell,{className:"pl-4",size:"sm",textAlign:"left",children:p()}),e.jsx(t.GridTableCell,{size:"sm",textAlign:"right",children:x()}),e.jsx(t.GridTableCell,{size:"sm",textAlign:"right",children:b()}),e.jsx(t.GridTableCell,{className:"pr-4",size:"sm",textAlign:"right",children:T()})]})})}exports.PoolAssetsTableRow=I;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),C=require("../../no-value/no-value.cjs");require("clsx");require("tailwind-merge");const S=require("../../../utils/format-money.cjs");require("@gearbox-protocol/sdk/onchain");require("../../../utils/z-index.cjs");const k=require("../../base/values/scalars.cjs");require("../../badge/badge.cjs");require("../../badge/chip.cjs");const n=require("../../typed-intl/index.cjs"),z=require("../../collateral-allocation-tooltip/allocation-wheel.cjs"),N=require("../../help-tip/help-tip.cjs"),I=require("../../name-cell/name-cell.cjs"),P=require("../../short-string/short-string.cjs"),o=require("../../table/grid-table.cjs"),a=require("../../table/table-sm.cjs"),w=require("../../token-symbol/token-symbol.cjs"),j=require("../../token-template/token-template.cjs"),M=require("../../vertical-indicator/vertical-indicator.cjs"),i=require("./constants.cjs");function G(l,s){return l>=s?1e4:Number(l*10000n/s)}function B(l,s){return s<=0n||l<=0n?0:Number(l*10000n/s)/1e4}function F({asset:l,underlyingToken:s,last:_,isCompact:p,totalUsed:q,colorIndex:v,explorerUrl:m}){const f=n.useIntlTyped(),{token:r,limit:c,used:t}=l,y=p?40:21,u=B(t.value,q),A=c.value<t.value,d=f.formatMessage({messageId:"components.poolAssetsTable.capBelowExposure.tip"}),x=()=>e.jsx(I.NameCell,{leading:e.jsx(w.TokenSymbol,{size:32,token:r}),title:e.jsx(P.ShortString,{maxLength:y,children:r.symbol})}),T=()=>e.jsxs("div",{className:"flex items-center justify-end gap-2","data-testid":i.PoolAssetsTableTest.exposureCell,children:[e.jsx(z.AllocationWheel,{share:u,colorIndex:v,idle:u===0}),e.jsx(M.VerticalIndicator,{value:e.jsx(j.TokenTemplate,{decimalPartLength:2,precision:2,showSymbol:!1,token:s,value:t.value}),valueDescription:t.valueUsd===null?e.jsx(C.NoValue,{}):S.formatMoney(t.valueUsd)})]}),h=()=>e.jsxs("span",{className:"inline-flex items-center gap-1","data-testid":i.PoolAssetsTableTest.capCell,children:[A&&e.jsxs(e.Fragment,{children:[e.jsx(N.HelpTip,{"data-testid":i.PoolAssetsTableTest.capBelowExposureTip,tabIndex:0,onClick:g=>{g.preventDefault(),g.stopPropagation()},children:d}),e.jsx("span",{className:"sr-only",children:d})]}),e.jsx(j.TokenTemplate,{decimalPartLength:2,precision:2,showSymbol:!1,token:s,value:c.value})]}),b=()=>e.jsx("div",{"data-testid":i.PoolAssetsTableTest.capUtilizationCell,children:e.jsx(k.UtilizationValue,{data:G(t.value,c.value)})});return e.jsx(o.GridTableRow,{last:_,height:"auto",href:m?`${m}/address/${r.address}`:void 0,target:"_blank",style:{minHeight:"75px"},children:p?e.jsx(o.GridTableCell,{className:"px-3 py-0!",size:"sm",span:"full",children:e.jsxs(a.TableLineSm,{className:"w-full",columns:3,columnsXs:3,title:x(),children:[e.jsx(a.TableCellSm,{title:e.jsx(n.FormattedMessageTyped,{messageId:"components.poolAssetsTable.exposure"}),children:T()}),e.jsx(a.TableCellSm,{title:e.jsx(n.FormattedMessageTyped,{messageId:"components.poolAssetsTable.cap"}),children:h()}),e.jsx(a.TableCellSm,{title:e.jsx(n.FormattedMessageTyped,{messageId:"components.poolAssetsTable.capUtilization"}),children:b()})]})}):e.jsxs(e.Fragment,{children:[e.jsx(o.GridTableCell,{className:"pl-4",size:"sm",textAlign:"left",children:x()}),e.jsx(o.GridTableCell,{size:"sm",textAlign:"right",children:T()}),e.jsx(o.GridTableCell,{size:"sm",textAlign:"right",children:h()}),e.jsx(o.GridTableCell,{className:"pr-4",size:"sm",textAlign:"right",children:b()})]})})}exports.PoolAssetsTableRow=F;
@@ -1 +1 @@
1
- "use strict";const e={"errors.incorrectAddressError":"Incorrect address. Please, check url","errors.noOpenedAccountsError":"You have no open Positions. Perhaps, you have recently been liquidated? Check notification centre to see more.","errors.incorrectAddress":"Incorrect address","components.errorMessage.oops":"Oops...","components.infiniteScrollWrapper.showMore":"Show more","components.alertModal.ok":"Ok","components.footer.privacy":"Privacy Notice","components.sdkStatus.connecting":"Connecting…","components.sdkStatus.connected":"Connected","components.sdkStatus.disconnected":"Not connected","components.notificationCenter.empty":"No notifications yet","components.notificationCenter.requests":"Requests","components.notificationCenter.recent":"Recent","components.notificationCenter.clear":"Clear all","components.loading.loading":"Loading","components.loading.loadingPercent":"Loading {percent}%","components.loading.wait":"Please wait...","components.tipWindow.title":"Tip","components.value.accruing":"Averaged data is still being computed and will be available shortly.","components.apyParts.extraAPY":"{symbol} Incentive","components.apyParts.totalAPY":"Overall APY","components.yieldBreakdown.titleNetAtLeverage":"Net APY at {leverage}× Leverage","components.yieldBreakdown.titleNetAtLeverage7d":"Net APY (7d) at {leverage}× Leverage","components.yieldBreakdown.titleNet":"Net APY","components.yieldBreakdown.titleNet7d":"Net APY (7d)","components.yieldBreakdown.collateralApy":"Collateral APY","components.yieldBreakdown.collateralApy7d":"Collateral APY (7d)","components.yieldBreakdown.baseApy":"Base APY","components.yieldBreakdown.baseApy7d":"Base APY (7d)","components.yieldBreakdown.incentive":"Incentive","components.yieldBreakdown.incentiveApy":"Incentive APY","components.yieldBreakdown.incentiveApy7d":"Incentive APY (7d)","components.yieldBreakdown.borrowRate":"Borrow Rate","components.yieldBreakdown.borrowRate7d":"Borrow Rate (7d)","components.yieldBreakdown.programPoints":"{name} Points","components.yieldBreakdown.points":"Points","components.openCopyButtons.copy":"Copy to clipboard","components.openCopyButtons.explorer":"View in explorer","components.poolAssetsTable.asset":"Name","components.poolAssetsTable.exposure":"Exposure","components.poolAssetsTable.cap":"Cap","components.poolAssetsTable.capUtilization":"Cap Utilization","components.poolTable.line.rwa.tip":"This is RWA market.","components.strategiesTable.line.name.disabled":"This strategy is currently not available","components.strategiesTable.line.rwa":"RWA","components.strategiesTable.line.rwa.tip":"This strategy is available on RWA market.","dialogs.common.review":"Review","components.amountInput.max":"Max","components.amountInput.label":"Amount","components.amountInput.balance":"Balance","components.amountInput.selectToken":"Select token","components.amountInput.inputTitle":"Token Amount","components.leverageInput.label":"Leverage","components.leverageInput.reset":"Reset","components.leverageInput.available":"Available Leverage","components.healthFactorBlock.label":"Health Factor","components.healthFactorBlock.tip":"Health Factor is a numeric representation of your Position 'health'. If your health factor drops below 1 or close to it, you might be liquidated.","components.liquidationPriceBlock.label":"Liquidation Price","components.liquidationPriceBlock.tip":"The asset price at which the Position's health factor would reach 1 and become eligible for liquidation.","components.timeToLiquidationBlock.label":"Time to Liquidation","components.timeToLiquidationBlock.tip":"Time to liquidation estimates how long the Position can stay open if prices remain constant and no yield is earned—only accounting for borrow interest accrual.","components.historyChart.error":"Couldn't load chart data","components.historyChart.empty":"No data","components.positionTypeBadge.pool":"LP","components.positionTypeBadge.strategy":"Strategy","components.positionTypeBadge.liquidation":"Liquidation","components.positionStatusBadge.active":"Active","components.positionStatusBadge.repaid":"Repaid","components.titleMeta.unknownCurator":"Curator","components.moreAccordion.more":"More details","components.moreAccordion.less":"Less details","components.poolApyBreakdownCard.title":"Net APY","components.poolApyBreakdownCard.title7d":"Net APY (7d)","components.poolApyBreakdownCard.organicApy":"Base APY","components.poolApyBreakdownCard.organicApy7d":"Base APY (7d)","components.poolApyBreakdownCard.incentiveApy":"Incentive APY","components.poolApyBreakdownCard.incentiveApy7d":"Incentive APY (7d)","components.poolApyBreakdownCard.tokenIncentiveApy":"{symbol} Incentive APY","components.poolApyBreakdownCard.tokenIncentiveApy7d":"{symbol} Incentive APY (7d)","components.strategyApyBreakdownCard.formula":"{leverage} × {base}","components.strategyApyBreakdownCard.borrowFormula":"{leverage} × {totalRate} − {borrowRate}","components.leveragePresetChips.label":"Leverage:","components.liquidationParamsTable.lt":"Liquidation Threshold","components.liquidationParamsTable.penalty":"Liquidation Discount","components.liquidationParamsTable.premium":"Liquidation Premium","components.liquidationParamsTable.fee":"Liquidation Fee","components.borrowRateBlock.label":"Borrow Rate","components.borrowRateBlock.tip":"Borrow rate is displayed for your entire Position size in total. You can reduce it in quota management.","components.borrowRateBlock.description":"Your borrow rate consists of the Base Rate plus the Quota Rates for every asset separately.","components.borrowRateBlock.baseRate":"Base Rate for Debt","components.borrowRateBlock.normalization":"Rates Normalization","components.borrowRateBlock.normalization.tip":"Borrowers pay {quota} and {utilization}, which have a different base. Therefore, the total borrow rate value is normalized by Position value or Debt amount.","components.transactionConfirm.previewLoading":"Parsing transaction…","components.transactionConfirm.previewErrorTitle":"Preview error"};module.exports=e;
1
+ "use strict";const e={"errors.incorrectAddressError":"Incorrect address. Please, check url","errors.noOpenedAccountsError":"You have no open Positions. Perhaps, you have recently been liquidated? Check notification centre to see more.","errors.incorrectAddress":"Incorrect address","components.errorMessage.oops":"Oops...","components.infiniteScrollWrapper.showMore":"Show more","components.alertModal.ok":"Ok","components.footer.privacy":"Privacy Notice","components.sdkStatus.connecting":"Connecting…","components.sdkStatus.connected":"Connected","components.sdkStatus.disconnected":"Not connected","components.notificationCenter.empty":"No notifications yet","components.notificationCenter.requests":"Requests","components.notificationCenter.recent":"Recent","components.notificationCenter.clear":"Clear all","components.loading.loading":"Loading","components.loading.loadingPercent":"Loading {percent}%","components.loading.wait":"Please wait...","components.tipWindow.title":"Tip","components.value.accruing":"Averaged data is still being computed and will be available shortly.","components.apyParts.extraAPY":"{symbol} Incentive","components.apyParts.totalAPY":"Overall APY","components.yieldBreakdown.titleNetAtLeverage":"Net APY at {leverage}× Leverage","components.yieldBreakdown.titleNetAtLeverage7d":"Net APY (7d) at {leverage}× Leverage","components.yieldBreakdown.titleNet":"Net APY","components.yieldBreakdown.titleNet7d":"Net APY (7d)","components.yieldBreakdown.collateralApy":"Collateral APY","components.yieldBreakdown.collateralApy7d":"Collateral APY (7d)","components.yieldBreakdown.baseApy":"Base APY","components.yieldBreakdown.baseApy7d":"Base APY (7d)","components.yieldBreakdown.incentive":"Incentive","components.yieldBreakdown.incentiveApy":"Incentive APY","components.yieldBreakdown.incentiveApy7d":"Incentive APY (7d)","components.yieldBreakdown.borrowRate":"Borrow Rate","components.yieldBreakdown.borrowRate7d":"Borrow Rate (7d)","components.yieldBreakdown.programPoints":"{name} Points","components.yieldBreakdown.points":"Points","components.openCopyButtons.copy":"Copy to clipboard","components.openCopyButtons.explorer":"View in explorer","components.poolAssetsTable.asset":"Name","components.poolAssetsTable.exposure":"Exposure","components.poolAssetsTable.cap":"Cap","components.poolAssetsTable.capUtilization":"Cap Utilization","components.poolAssetsTable.capBelowExposure.tip":"The curator has lowered the cap below current exposure. Exposure cannot be increased.","components.poolTable.line.rwa.tip":"This is RWA market.","components.strategiesTable.line.name.disabled":"This strategy is currently not available","components.strategiesTable.line.rwa":"RWA","components.strategiesTable.line.rwa.tip":"This strategy is available on RWA market.","dialogs.common.review":"Review","components.amountInput.max":"Max","components.amountInput.label":"Amount","components.amountInput.balance":"Balance","components.amountInput.selectToken":"Select token","components.amountInput.inputTitle":"Token Amount","components.leverageInput.label":"Leverage","components.leverageInput.reset":"Reset","components.leverageInput.available":"Available Leverage","components.healthFactorBlock.label":"Health Factor","components.healthFactorBlock.tip":"Health Factor is a numeric representation of your Position 'health'. If your health factor drops below 1 or close to it, you might be liquidated.","components.liquidationPriceBlock.label":"Liquidation Price","components.liquidationPriceBlock.tip":"The asset price at which the Position's health factor would reach 1 and become eligible for liquidation.","components.timeToLiquidationBlock.label":"Time to Liquidation","components.timeToLiquidationBlock.tip":"Time to liquidation estimates how long the Position can stay open if prices remain constant and no yield is earned—only accounting for borrow interest accrual.","components.historyChart.error":"Couldn't load chart data","components.historyChart.empty":"No data","components.positionTypeBadge.pool":"LP","components.positionTypeBadge.strategy":"Strategy","components.positionTypeBadge.liquidation":"Liquidation","components.positionStatusBadge.active":"Active","components.positionStatusBadge.repaid":"Repaid","components.titleMeta.unknownCurator":"Curator","components.moreAccordion.more":"More details","components.moreAccordion.less":"Less details","components.poolApyBreakdownCard.title":"Net APY","components.poolApyBreakdownCard.title7d":"Net APY (7d)","components.poolApyBreakdownCard.organicApy":"Base APY","components.poolApyBreakdownCard.organicApy7d":"Base APY (7d)","components.poolApyBreakdownCard.incentiveApy":"Incentive APY","components.poolApyBreakdownCard.incentiveApy7d":"Incentive APY (7d)","components.poolApyBreakdownCard.tokenIncentiveApy":"{symbol} Incentive APY","components.poolApyBreakdownCard.tokenIncentiveApy7d":"{symbol} Incentive APY (7d)","components.strategyApyBreakdownCard.formula":"{leverage} × {base}","components.strategyApyBreakdownCard.borrowFormula":"{leverage} × {totalRate} − {borrowRate}","components.leveragePresetChips.label":"Leverage:","components.liquidationParamsTable.lt":"Liquidation Threshold","components.liquidationParamsTable.penalty":"Liquidation Discount","components.liquidationParamsTable.premium":"Liquidation Premium","components.liquidationParamsTable.fee":"Liquidation Fee","components.borrowRateBlock.label":"Borrow Rate","components.borrowRateBlock.tip":"Borrow rate is displayed for your entire Position size in total. You can reduce it in quota management.","components.borrowRateBlock.description":"Your borrow rate consists of the Base Rate plus the Quota Rates for every asset separately.","components.borrowRateBlock.baseRate":"Base Rate for Debt","components.borrowRateBlock.normalization":"Rates Normalization","components.borrowRateBlock.normalization.tip":"Borrowers pay {quota} and {utilization}, which have a different base. Therefore, the total borrow rate value is normalized by Position value or Debt amount.","components.transactionConfirm.previewLoading":"Parsing transaction…","components.transactionConfirm.previewErrorTitle":"Preview error"};module.exports=e;
@@ -2,6 +2,7 @@ class t {
2
2
  static root = "pool-assets-table-root";
3
3
  static exposureCell = "pool-assets-table-exposure-cell";
4
4
  static capCell = "pool-assets-table-cap-cell";
5
+ static capBelowExposureTip = "pool-assets-table-cap-below-exposure-tip";
5
6
  static capUtilizationCell = "pool-assets-table-cap-utilization-cell";
6
7
  }
7
8
  export {
@@ -1,64 +1,66 @@
1
- import { jsx as e, jsxs as a, Fragment as y } from "react/jsx-runtime";
2
- import { NoValue as b } from "../../no-value/no-value.js";
1
+ import { jsx as e, jsxs as o, Fragment as v } from "react/jsx-runtime";
2
+ import { NoValue as k } from "../../no-value/no-value.js";
3
3
  import "clsx";
4
4
  import "tailwind-merge";
5
- import { formatMoney as C } from "../../../utils/format-money.js";
5
+ import { formatMoney as I } from "../../../utils/format-money.js";
6
6
  import "@gearbox-protocol/sdk/onchain";
7
7
  import "../../../utils/z-index.js";
8
- import { UtilizationValue as S } from "../../base/values/scalars.js";
8
+ import { UtilizationValue as B } from "../../base/values/scalars.js";
9
9
  import "../../badge/badge.js";
10
10
  import "../../badge/chip.js";
11
- import { FormattedMessageTyped as n } from "../../typed-intl/index.js";
12
- import { AllocationWheel as k } from "../../collateral-allocation-tooltip/allocation-wheel.js";
13
- import { NameCell as w } from "../../name-cell/name-cell.js";
14
- import { ShortString as L } from "../../short-string/short-string.js";
15
- import { GridTableRow as U, GridTableCell as o } from "../../table/grid-table.js";
16
- import { TableLineSm as I, TableCellSm as m } from "../../table/table-sm.js";
17
- import { TokenSymbol as P } from "../../token-symbol/token-symbol.js";
18
- import { TokenTemplate as x } from "../../token-template/token-template.js";
19
- import { VerticalIndicator as j } from "../../vertical-indicator/vertical-indicator.js";
20
- import { PoolAssetsTableTest as c } from "./constants.js";
21
- function V(l, t) {
22
- if (t !== 0n)
23
- return Number(l * 10000n / t);
11
+ import { useIntlTyped as L, FormattedMessageTyped as m } from "../../typed-intl/index.js";
12
+ import { AllocationWheel as P } from "../../collateral-allocation-tooltip/allocation-wheel.js";
13
+ import { HelpTip as U } from "../../help-tip/help-tip.js";
14
+ import { NameCell as j } from "../../name-cell/name-cell.js";
15
+ import { ShortString as E } from "../../short-string/short-string.js";
16
+ import { GridTableRow as M, GridTableCell as s } from "../../table/grid-table.js";
17
+ import { TableLineSm as V, TableCellSm as p } from "../../table/table-sm.js";
18
+ import { TokenSymbol as D } from "../../token-symbol/token-symbol.js";
19
+ import { TokenTemplate as z } from "../../token-template/token-template.js";
20
+ import { VerticalIndicator as F } from "../../vertical-indicator/vertical-indicator.js";
21
+ import { PoolAssetsTableTest as a } from "./constants.js";
22
+ function G(l, t) {
23
+ return l >= t ? 1e4 : Number(l * 10000n / t);
24
24
  }
25
- function B(l, t) {
25
+ function H(l, t) {
26
26
  return t <= 0n || l <= 0n ? 0 : Number(l * 10000n / t) / 1e4;
27
27
  }
28
- function le({
28
+ function me({
29
29
  asset: l,
30
30
  underlyingToken: t,
31
- last: T,
32
- isCompact: p,
33
- totalUsed: z,
34
- colorIndex: A,
31
+ last: A,
32
+ isCompact: c,
33
+ totalUsed: N,
34
+ colorIndex: y,
35
35
  explorerUrl: d
36
36
  }) {
37
- const { token: s, limit: r, used: i } = l, N = p ? 40 : 21, u = B(i.value, z), h = () => /* @__PURE__ */ e(
38
- w,
37
+ const C = L(), { token: r, limit: n, used: i } = l, w = c ? 40 : 21, u = H(i.value, N), S = n.value < i.value, h = C.formatMessage({
38
+ messageId: "components.poolAssetsTable.capBelowExposure.tip"
39
+ }), f = () => /* @__PURE__ */ e(
40
+ j,
39
41
  {
40
- leading: /* @__PURE__ */ e(P, { size: 32, token: s }),
41
- title: /* @__PURE__ */ e(L, { maxLength: N, children: s.symbol })
42
+ leading: /* @__PURE__ */ e(D, { size: 32, token: r }),
43
+ title: /* @__PURE__ */ e(E, { maxLength: w, children: r.symbol })
42
44
  }
43
- ), f = () => /* @__PURE__ */ a(
45
+ ), g = () => /* @__PURE__ */ o(
44
46
  "div",
45
47
  {
46
48
  className: "flex items-center justify-end gap-2",
47
- "data-testid": c.exposureCell,
49
+ "data-testid": a.exposureCell,
48
50
  children: [
49
51
  /* @__PURE__ */ e(
50
- k,
52
+ P,
51
53
  {
52
54
  share: u,
53
- colorIndex: A,
55
+ colorIndex: y,
54
56
  idle: u === 0
55
57
  }
56
58
  ),
57
59
  /* @__PURE__ */ e(
58
- j,
60
+ F,
59
61
  {
60
62
  value: /* @__PURE__ */ e(
61
- x,
63
+ z,
62
64
  {
63
65
  decimalPartLength: 2,
64
66
  precision: 2,
@@ -67,69 +69,92 @@ function le({
67
69
  value: i.value
68
70
  }
69
71
  ),
70
- valueDescription: i.valueUsd === null ? /* @__PURE__ */ e(b, {}) : C(i.valueUsd)
72
+ valueDescription: i.valueUsd === null ? /* @__PURE__ */ e(k, {}) : I(i.valueUsd)
71
73
  }
72
74
  )
73
75
  ]
74
76
  }
75
- ), g = () => /* @__PURE__ */ e("div", { "data-testid": c.capCell, children: r.value === 0n ? /* @__PURE__ */ e(b, {}) : /* @__PURE__ */ e(
76
- x,
77
+ ), x = () => /* @__PURE__ */ o(
78
+ "span",
77
79
  {
78
- decimalPartLength: 2,
79
- precision: 2,
80
- showSymbol: !1,
81
- token: t,
82
- value: r.value
80
+ className: "inline-flex items-center gap-1",
81
+ "data-testid": a.capCell,
82
+ children: [
83
+ S && /* @__PURE__ */ o(v, { children: [
84
+ /* @__PURE__ */ e(
85
+ U,
86
+ {
87
+ "data-testid": a.capBelowExposureTip,
88
+ tabIndex: 0,
89
+ onClick: (b) => {
90
+ b.preventDefault(), b.stopPropagation();
91
+ },
92
+ children: h
93
+ }
94
+ ),
95
+ /* @__PURE__ */ e("span", { className: "sr-only", children: h })
96
+ ] }),
97
+ /* @__PURE__ */ e(
98
+ z,
99
+ {
100
+ decimalPartLength: 2,
101
+ precision: 2,
102
+ showSymbol: !1,
103
+ token: t,
104
+ value: n.value
105
+ }
106
+ )
107
+ ]
83
108
  }
84
- ) }), v = () => /* @__PURE__ */ e("div", { "data-testid": c.capUtilizationCell, children: /* @__PURE__ */ e(S, { data: V(i.value, r.value) }) });
109
+ ), T = () => /* @__PURE__ */ e("div", { "data-testid": a.capUtilizationCell, children: /* @__PURE__ */ e(B, { data: G(i.value, n.value) }) });
85
110
  return /* @__PURE__ */ e(
86
- U,
111
+ M,
87
112
  {
88
- last: T,
113
+ last: A,
89
114
  height: "auto",
90
- href: d ? `${d}/address/${s.address}` : void 0,
115
+ href: d ? `${d}/address/${r.address}` : void 0,
91
116
  target: "_blank",
92
117
  style: { minHeight: "75px" },
93
- children: p ? /* @__PURE__ */ e(o, { className: "px-3 py-0!", size: "sm", span: "full", children: /* @__PURE__ */ a(
94
- I,
118
+ children: c ? /* @__PURE__ */ e(s, { className: "px-3 py-0!", size: "sm", span: "full", children: /* @__PURE__ */ o(
119
+ V,
95
120
  {
96
121
  className: "w-full",
97
122
  columns: 3,
98
123
  columnsXs: 3,
99
- title: h(),
124
+ title: f(),
100
125
  children: [
101
126
  /* @__PURE__ */ e(
102
- m,
127
+ p,
103
128
  {
104
- title: /* @__PURE__ */ e(n, { messageId: "components.poolAssetsTable.exposure" }),
105
- children: f()
129
+ title: /* @__PURE__ */ e(m, { messageId: "components.poolAssetsTable.exposure" }),
130
+ children: g()
106
131
  }
107
132
  ),
108
133
  /* @__PURE__ */ e(
109
- m,
134
+ p,
110
135
  {
111
- title: /* @__PURE__ */ e(n, { messageId: "components.poolAssetsTable.cap" }),
112
- children: g()
136
+ title: /* @__PURE__ */ e(m, { messageId: "components.poolAssetsTable.cap" }),
137
+ children: x()
113
138
  }
114
139
  ),
115
140
  /* @__PURE__ */ e(
116
- m,
141
+ p,
117
142
  {
118
- title: /* @__PURE__ */ e(n, { messageId: "components.poolAssetsTable.capUtilization" }),
119
- children: v()
143
+ title: /* @__PURE__ */ e(m, { messageId: "components.poolAssetsTable.capUtilization" }),
144
+ children: T()
120
145
  }
121
146
  )
122
147
  ]
123
148
  }
124
- ) }) : /* @__PURE__ */ a(y, { children: [
125
- /* @__PURE__ */ e(o, { className: "pl-4", size: "sm", textAlign: "left", children: h() }),
126
- /* @__PURE__ */ e(o, { size: "sm", textAlign: "right", children: f() }),
127
- /* @__PURE__ */ e(o, { size: "sm", textAlign: "right", children: g() }),
128
- /* @__PURE__ */ e(o, { className: "pr-4", size: "sm", textAlign: "right", children: v() })
149
+ ) }) : /* @__PURE__ */ o(v, { children: [
150
+ /* @__PURE__ */ e(s, { className: "pl-4", size: "sm", textAlign: "left", children: f() }),
151
+ /* @__PURE__ */ e(s, { size: "sm", textAlign: "right", children: g() }),
152
+ /* @__PURE__ */ e(s, { size: "sm", textAlign: "right", children: x() }),
153
+ /* @__PURE__ */ e(s, { className: "pr-4", size: "sm", textAlign: "right", children: T() })
129
154
  ] })
130
155
  }
131
156
  );
132
157
  }
133
158
  export {
134
- le as PoolAssetsTableRow
159
+ me as PoolAssetsTableRow
135
160
  };
@@ -719,7 +719,12 @@ function to({
719
719
  ...p.options || {}
720
720
  };
721
721
  m.color && (m.color = re(m.color, m.color));
722
- const y = new _t(t, a, p.xCoordinate, m);
722
+ const y = new _t(
723
+ t,
724
+ a,
725
+ p.xCoordinate,
726
+ m
727
+ );
723
728
  a.attachPrimitive(y), r.push(y);
724
729
  }
725
730
  }
@@ -41,6 +41,7 @@ const e = {
41
41
  "components.poolAssetsTable.exposure": "Exposure",
42
42
  "components.poolAssetsTable.cap": "Cap",
43
43
  "components.poolAssetsTable.capUtilization": "Cap Utilization",
44
+ "components.poolAssetsTable.capBelowExposure.tip": "The curator has lowered the cap below current exposure. Exposure cannot be increased.",
44
45
  "components.poolTable.line.rwa.tip": "This is RWA market.",
45
46
  "components.strategiesTable.line.name.disabled": "This strategy is currently not available",
46
47
  "components.strategiesTable.line.rwa": "RWA",
@@ -2,15 +2,15 @@ import { default as React } from 'react';
2
2
  import { TitleText } from '../text';
3
3
  import { ManagePaneTest } from './constants';
4
4
  export { ManagePaneTest };
5
- export interface ManagePaneTabProps {
6
- readonly id: string;
5
+ export interface ManagePaneTabProps<T extends string = string> {
6
+ readonly id: T;
7
7
  readonly title: TitleText;
8
8
  readonly disabled?: boolean;
9
9
  /** Content is selectable (e.g. from the dropdown) but not shown in the segment. */
10
10
  readonly hidden?: boolean;
11
11
  readonly children?: React.ReactNode;
12
12
  }
13
- export declare function ManagePaneTab(_props: ManagePaneTabProps): null;
13
+ export declare function ManagePaneTab<T extends string>(_props: ManagePaneTabProps<T>): null;
14
14
  export interface ManagePaneTabDropdownItem {
15
15
  readonly id: string;
16
16
  readonly title: React.ReactNode;
@@ -20,20 +20,20 @@ export interface ManagePaneTabDropdownProps {
20
20
  readonly items: ReadonlyArray<ManagePaneTabDropdownItem>;
21
21
  }
22
22
  export declare function ManagePaneTabDropdown(_props: ManagePaneTabDropdownProps): null;
23
- export interface ManagePaneActionTabProps {
24
- readonly id: string;
23
+ export interface ManagePaneActionTabProps<T extends string = string> {
24
+ readonly id: T;
25
25
  readonly title: TitleText;
26
26
  /** Fires without changing the active tab (e.g. "My positions"). */
27
27
  readonly onClick?: () => void;
28
28
  /** When set, a click opens this content in a dialog instead of switching tabs. */
29
29
  readonly children?: React.ReactNode;
30
30
  }
31
- export declare function ManagePaneActionTab(_props: ManagePaneActionTabProps): null;
32
- export interface ManagePaneProps {
31
+ export declare function ManagePaneActionTab<T extends string>(_props: ManagePaneActionTabProps<T>): null;
32
+ export interface ManagePaneProps<T extends string> {
33
33
  readonly children: React.ReactNode;
34
34
  /** Controlled active tab — the screen owns it (usually `?operation=`). */
35
- readonly activeTab: string;
36
- readonly onTabChange: (id: string) => void;
35
+ readonly activeTab: T;
36
+ readonly onTabChange: (id: T) => void;
37
37
  readonly header?: React.ReactNode;
38
38
  readonly footer?: React.ReactNode;
39
39
  /** Rendered to the right of the tabs (e.g. the settings button). */
@@ -45,7 +45,7 @@ export interface ManagePaneProps {
45
45
  * dropdown and actions) above one card that shows the active tab's content.
46
46
  * Controlled only — no hash state of its own.
47
47
  */
48
- export declare function ManagePane({ children, activeTab, onTabChange, header, footer, actions, testId, }: ManagePaneProps): React.ReactElement;
48
+ export declare function ManagePane<T extends string>({ children, activeTab, onTabChange, header, footer, actions, testId, }: ManagePaneProps<T>): React.ReactElement;
49
49
  /** Body shown in place of a dialog when the tab has nothing to act on (no position, no wallet). */
50
50
  export declare function ManagePaneMessage({ children, }: {
51
51
  readonly children: React.ReactNode;
@@ -2,5 +2,6 @@ export declare class PoolAssetsTableTest {
2
2
  static root: string;
3
3
  static exposureCell: string;
4
4
  static capCell: string;
5
+ static capBelowExposureTip: string;
5
6
  static capUtilizationCell: string;
6
7
  }
@@ -1,4 +1,4 @@
1
- import { ChartOptions, DeepPartial, Time } from 'lightweight-charts';
1
+ import { ChartOptions, DeepPartial } from 'lightweight-charts';
2
2
  import { Point, YMeasureUnits } from './formatters';
3
3
  import { GraphTooltipProps } from './graph-tooltip';
4
4
  import { PriceLineConfig, PriceZoneConfig } from './graph-vocabulary';
@@ -90,7 +90,8 @@ export interface GraphProps {
90
90
  xMeasureUnit?: GraphTooltipProps["xMeasureUnit"];
91
91
  optionsOverrides?: DeepPartial<ChartOptions>;
92
92
  verticalLineOptions?: Array<{
93
- xCoordinate: Time;
93
+ /** Same scale as `GraphPoint.timestamp`; branded for the chart internally. */
94
+ xCoordinate: number;
94
95
  options?: VerticalLineOptions;
95
96
  }>;
96
97
  /**
@@ -52,6 +52,7 @@ declare const _default: {
52
52
  "components.poolAssetsTable.exposure": "Exposure",
53
53
  "components.poolAssetsTable.cap": "Cap",
54
54
  "components.poolAssetsTable.capUtilization": "Cap Utilization",
55
+ "components.poolAssetsTable.capBelowExposure.tip": "The curator has lowered the cap below current exposure. Exposure cannot be increased.",
55
56
 
56
57
  "components.poolTable.line.rwa.tip": "This is RWA market.",
57
58
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/ui-kit",
3
- "version": "4.0.0-next.67",
3
+ "version": "4.0.0-next.69",
4
4
  "description": "Internal UI components",
5
5
  "repository": {
6
6
  "type": "git",