@gearbox-protocol/ui-kit 3.12.0 → 3.12.2

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"});const r=require("react/jsx-runtime"),w=require("@gearbox-protocol/sdk"),b=require("../../network-icon/network-icon.cjs"),x=require("../../short-string/short-string.cjs"),T=require("../../token-symbol/token-symbol.cjs"),u=require("../../typed-intl/index.cjs"),f=require("../../typography/typography.cjs"),m=require("./components/cells/cells.cjs"),c=require("./components/cells/cells.styles.cjs"),q=require("./components/rewards-tooltip/rewards-tooltip.cjs");require("./components/rewards-tooltip/rewards-tooltip-root.cjs");require("../../tooltip/simple-tooltip.cjs");require("../../tooltip/tooltip.cjs");require("@fortawesome/free-solid-svg-icons");require("viem");require("../../icon-button/icon-button.cjs");require("../../icons/fa-icon.cjs");require("../../separate-line/separate-line.cjs");require("../../skeleton/skeleton.cjs");require("react");require("clsx");require("tailwind-merge");require("sonner");require("@gearbox-protocol/sdk/common-utils");require("luxon");require("../../../utils/z-index.cjs");require("../../tip-card/tip-card.cjs");require("../../vertical-indicator/vertical-indicator.cjs");require("../../vertical-list/vertical-list.cjs");require("../../help-tip/help-tip.cjs");require("./components/feature/feature.styles.cjs");require("../../points-icon/points-icon.cjs");function g(e,a,t){const s=e?.header??r.jsx(u.FormattedMessageTyped,{messageId:e?.headerMessageId??a});let d;if(e?.headerTip!==null){const n=e?.headerTipMessageId??t;d=e?.headerTip??(n&&r.jsx(u.FormattedMessageTyped,{messageId:n}))}return{header:s,headerTip:d,mobileTitle:e?.mobileTitle??s}}function _({ctx:e}){const{strategy:a,targetToken:t,targetTokenAddress:s,tokensList:d,row:n}=e,i=!!n.disabledStyle,o=!!n.zeroSlippageTokens?.[s],l=!!a.strategyMarketType?.includes("rwa"),h=n.delayedConfigs?.[0]?.withdrawalPhantomToken,y=e.isMobile||e.isDesktop?38:26;return r.jsx("div",{className:"flex flex-col-auto",children:r.jsxs(c.TitleGrid,{children:[r.jsxs("div",{className:"flex items-center gap-1.5 pr-2 leading-none",children:[r.jsx(c.DisabledWrap,{disabled:i,children:r.jsx(b.NetworkIcon,{network:a.network,isTest:!1,size:14,showTooltip:!0})}),r.jsx(c.DisabledWrap,{disabled:i,children:r.jsx(T.TokenSymbol,{token:t,size:24})})]}),r.jsxs("div",{className:"flex items-center gap-x-3",children:[r.jsx(x.ShortString,{maxLength:y,children:a.name}),l&&r.jsx(m.RWAFeature,{disabledStyle:i}),o&&r.jsx(m.ZeroSlippageFeature,{token:h?d?.[h]:void 0,disabledStyle:i})]}),i&&r.jsx("div",{}),i&&r.jsx(f.Typography,{as:"span",variant:"caption",style:{lineHeight:"100%"},children:r.jsx(u.FormattedMessageTyped,{messageId:"components.strategiesTable.line.name.disabled"})})]})})}function p({ctx:e,mobile:a=!1}){const{rewardsCellInfo:t,row:s,targetTokenAddress:d,tokensList:n}=e,i=!!s.disabledStyle,o=r.jsx(m.StrategiesRewardsCell,{maxAPY:t.maxAPY,bonusAPY:t.bonusAPY,rewards:t.rewards,rewardRates:t.rewardRates,debtRewards:t.debtRewards,debtRewardRates:t.debtRewardRates,hasAPY:t.hasAPY??!1,hasRewards:t.hasRewards??!1,hasDebtRewards:t.hasDebtRewards??!1,apyLoading:t.apyLoading,disabledStyle:i}),l=a?r.jsx("div",{className:"pt-1",children:o}):o;return i?l:r.jsx(q.RewardsTooltip,{cellInfo:t,targetToken:d,apyList:s.apyList,tokensList:n,strategyCreditManagers:s.strategyCreditManagers,children:r.jsx("div",{children:l})})}function j(e){const{header:a,mobileTitle:t}=g(e,"components.strategiesTable.head.name");return{id:"strategy",header:a,width:e?.width??"1fr",mediumWidth:e?.mediumWidth,align:"left",className:"pl-4",sort:e?.sortField!==void 0?{field:e.sortField,defaultDirection:"desc"}:{field:"strategyName",defaultDirection:"desc"},cell:s=>r.jsx(_,{ctx:s}),mobileTitle:t}}function k(e){const{header:a,mobileTitle:t}=g(e,"components.strategiesTable.head.rewards");return{id:"rewards",header:a,width:e?.width??"310px",mediumWidth:e?.mediumWidth??"270px",align:"left",sort:e?.sortField!==void 0?{field:e.sortField,defaultDirection:"desc"}:{field:"apy",defaultDirection:"desc"},cell:s=>r.jsx(p,{ctx:s}),mobileCell:s=>r.jsx(p,{ctx:s,mobile:!0}),mobileTitle:t}}function S(e){const{header:a,mobileTitle:t}=g(e,"components.strategiesTable.head.leverage");return{id:"leverage",header:a,width:e?.width??"150px",mediumWidth:e?.mediumWidth??"76px",align:"right",className:"pr-4",headerClassName:"pr-4",cell:s=>`×${w.formatLeverage(Number(s.row.maxLeverage),0)}`,mobileTitle:t}}function R(e){return e}exports.customStrategyColumn=R;exports.strategyColumn=j;exports.strategyLeverageColumn=S;exports.strategyRewardsColumn=k;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),p=require("@gearbox-protocol/sdk"),y=require("../../network-icon/network-icon.cjs"),w=require("../../short-string/short-string.cjs"),b=require("../../token-symbol/token-symbol.cjs"),o=require("../../typed-intl/index.cjs"),x=require("../../typography/typography.cjs"),c=require("./components/cells/cells.cjs"),d=require("./components/cells/cells.styles.cjs"),T=require("./components/rewards-tooltip/rewards-tooltip.cjs");require("./components/rewards-tooltip/rewards-tooltip-root.cjs");require("../../tooltip/simple-tooltip.cjs");require("../../tooltip/tooltip.cjs");require("@fortawesome/free-solid-svg-icons");require("viem");require("../../icon-button/icon-button.cjs");require("../../icons/fa-icon.cjs");require("../../separate-line/separate-line.cjs");require("../../skeleton/skeleton.cjs");require("react");require("clsx");require("tailwind-merge");require("sonner");require("@gearbox-protocol/sdk/common-utils");require("luxon");require("../../../utils/z-index.cjs");require("../../tip-card/tip-card.cjs");require("../../vertical-indicator/vertical-indicator.cjs");require("../../vertical-list/vertical-list.cjs");require("../../help-tip/help-tip.cjs");require("./components/feature/feature.styles.cjs");require("../../points-icon/points-icon.cjs");function u(e,a,t){const s=e?.header??r.jsx(o.FormattedMessageTyped,{messageId:e?.headerMessageId??a});let i;if(e?.headerTip!==null){const n=e?.headerTipMessageId??t;i=e?.headerTip??(n&&r.jsx(o.FormattedMessageTyped,{messageId:n}))}return{header:s,headerTip:i,mobileTitle:e?.mobileTitle??s}}function f({ctx:e}){const{strategy:a,targetToken:t,row:s}=e,i=!!s.disabledStyle,n=!!a.strategyMarketType?.includes("rwa"),l=e.isMobile||e.isDesktop?38:26;return r.jsx("div",{className:"flex flex-col-auto",children:r.jsxs(d.TitleGrid,{children:[r.jsxs("div",{className:"flex items-center gap-1.5 pr-2 leading-none",children:[r.jsx(d.DisabledWrap,{disabled:i,children:r.jsx(y.NetworkIcon,{network:a.network,isTest:!1,size:14,showTooltip:!0})}),r.jsx(d.DisabledWrap,{disabled:i,children:r.jsx(b.TokenSymbol,{token:t,size:24})})]}),r.jsxs("div",{className:"flex items-center gap-x-3",children:[r.jsx(w.ShortString,{maxLength:l,children:a.name}),n&&r.jsx(c.RWAFeature,{disabledStyle:i}),s.isZeroSlippagePair&&r.jsx(c.ZeroSlippageFeature,{token:s.zeroSlippageToken,disabledStyle:i})]}),i&&r.jsx("div",{}),i&&r.jsx(x.Typography,{as:"span",variant:"caption",style:{lineHeight:"100%"},children:r.jsx(o.FormattedMessageTyped,{messageId:"components.strategiesTable.line.name.disabled"})})]})})}function h({ctx:e,mobile:a=!1}){const{rewardsCellInfo:t,row:s,targetTokenAddress:i,tokensList:n}=e,l=!!s.disabledStyle,m=r.jsx(c.StrategiesRewardsCell,{maxAPY:t.maxAPY,bonusAPY:t.bonusAPY,rewards:t.rewards,rewardRates:t.rewardRates,debtRewards:t.debtRewards,debtRewardRates:t.debtRewardRates,hasAPY:t.hasAPY??!1,hasRewards:t.hasRewards??!1,hasDebtRewards:t.hasDebtRewards??!1,apyLoading:t.apyLoading,disabledStyle:l}),g=a?r.jsx("div",{className:"pt-1",children:m}):m;return l?g:r.jsx(T.RewardsTooltip,{cellInfo:t,targetToken:i,apyListByNetwork:s.apyListByNetwork,tokensList:n,strategyCreditManagers:s.strategyCreditManagers,children:r.jsx("div",{children:g})})}function q(e){const{header:a,mobileTitle:t}=u(e,"components.strategiesTable.head.name");return{id:"strategy",header:a,width:e?.width??"1fr",mediumWidth:e?.mediumWidth,align:"left",className:"pl-4",sort:e?.sortField!==void 0?{field:e.sortField,defaultDirection:"desc"}:{field:"strategyName",defaultDirection:"desc"},cell:s=>r.jsx(f,{ctx:s}),mobileTitle:t}}function _(e){const{header:a,mobileTitle:t}=u(e,"components.strategiesTable.head.rewards");return{id:"rewards",header:a,width:e?.width??"310px",mediumWidth:e?.mediumWidth??"270px",align:"left",sort:e?.sortField!==void 0?{field:e.sortField,defaultDirection:"desc"}:{field:"apy",defaultDirection:"desc"},cell:s=>r.jsx(h,{ctx:s}),mobileCell:s=>r.jsx(h,{ctx:s,mobile:!0}),mobileTitle:t}}function j(e){const{header:a,mobileTitle:t}=u(e,"components.strategiesTable.head.leverage");return{id:"leverage",header:a,width:e?.width??"150px",mediumWidth:e?.mediumWidth??"76px",align:"right",className:"pr-4",headerClassName:"pr-4",cell:s=>`×${p.formatLeverage(Number(s.row.maxLeverage),0)}`,mobileTitle:t}}function k(e){return e}exports.customStrategyColumn=k;exports.strategyColumn=q;exports.strategyLeverageColumn=j;exports.strategyRewardsColumn=_;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),u=require("@gearbox-protocol/sdk"),A=require("../../../../rwa-styles/index.cjs"),P=require("../../../../skeleton/skeleton.cjs");require("react");const q=require("../../../../../utils/cn.cjs");require("sonner");require("@gearbox-protocol/sdk/common-utils");require("luxon");require("../../../../../utils/z-index.cjs");const T=require("../../../../tooltip/simple-tooltip.cjs");require("../../../../tooltip/tooltip.cjs");const d=require("../../../../typed-intl/index.cjs"),f=require("../apy-feature/apy-feature.cjs"),b=require("../points-feature/points-feature.cjs"),l=require("./cells.styles.cjs");function w({token:r,disabledStyle:n}){const o=()=>e.jsx("span",{className:q.cn(n&&"opacity-60 pointer-events-none"),children:e.jsx(f.APYFeature,{children:e.jsx(d.FormattedMessageTyped,{messageId:"components.strategiesTable.line.0slippage"})})});return e.jsx(e.Fragment,{children:n?o():e.jsx(T.SimpleTooltip,{placement:"top",triangle:!1,title:o(),children:e.jsx(d.FormattedMessageTyped,{messageId:"components.strategiesTable.line.0slippage.tip",values:{symbol:r?.title||"this token"}})})})}function R({disabledStyle:r}){const n=e.jsx("span",{className:q.cn("rounded-xl px-[10px] py-1 text-xs leading-none",A.RWA_GRADIENT_BORDER_CLASS,r&&"opacity-60 pointer-events-none"),children:e.jsx(d.FormattedMessageTyped,{messageId:"components.strategiesTable.line.rwa"})});return e.jsx(e.Fragment,{children:r?n:e.jsx(T.SimpleTooltip,{placement:"top",triangle:!1,title:n,children:e.jsx(d.FormattedMessageTyped,{messageId:"components.strategiesTable.line.rwa.tip"})})})}function k({maxAPY:r,bonusAPY:n,rewards:o,rewardRates:m,debtRewards:g,debtRewardRates:x,hasAPY:c,hasRewards:a,hasDebtRewards:j,disabledStyle:p,apyLoading:_,apyFormat:t="feature"}){const s=i=>t==="feature"?e.jsxs(f.APYFeature,{children:[u.formatPercentage(i),"% APR"]}):`${u.formatPercentage(i)}%`,S=i=>t==="feature"?e.jsxs(f.APYFeature,{children:["exp. ",u.formatPercentage(i),"% APR"]}):`exp. ${u.formatPercentage(i)}%`,v=()=>{const i=[c?e.jsx(P.Skeleton,{className:"inline-block align-text-bottom",width:50,loading:_,children:s(r)},"apy"):void 0,a||j?e.jsx(y,{rewards:o,rewardRates:m,debtRewards:g,debtRewardRates:x,hasRewards:a,hasDebtRewards:j,disabledStyle:p},"points"):void 0].filter(Boolean);return i.flatMap((h,F)=>F===i.length-1?[h]:[h,e.jsx(l.Plus,{children:"+"},`plus-${F}`)])};return e.jsxs("div",{className:"flex-row-row items-center gap-2",children:[v(),n&&e.jsx(l.Plus,{children:":"}),n&&e.jsx(P.Skeleton,{className:"inline-block align-text-bottom",loading:_,width:50,children:S(n.value)})]})}function y({rewards:r,rewardRates:n,debtRewards:o,debtRewardRates:m,hasRewards:g,hasDebtRewards:x,disabledStyle:c,theme:a}){return(()=>{const p=[g?r.map((t,s)=>e.jsx("span",{children:e.jsx(l.DisabledWrap,{disabled:c,children:e.jsx(b.PointsFeature,{reward:t,points:n?.[s]||0n,theme:a})})},["base",t.multiplier,t.name,t.type,t.units].join("-"))):void 0,x?o.map((t,s)=>e.jsx("span",{children:e.jsx(l.DisabledWrap,{disabled:c,children:e.jsx(b.PointsFeature,{reward:t,points:m?.[s]||0n,theme:a})})},["debt",t.multiplier,t.name,t.type,t.units,t.cm].join("-"))):void 0].filter(Boolean);return p.flatMap((t,s)=>s===p.length-1?[t]:[t,e.jsx(l.Plus,{children:"+"},`plus-points-${s}`)])})()}exports.RWAFeature=R;exports.StrategiesRewardsCell=k;exports.StrategyPoints=y;exports.ZeroSlippageFeature=w;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),u=require("@gearbox-protocol/sdk"),A=require("../../../../rwa-styles/index.cjs"),P=require("../../../../skeleton/skeleton.cjs");require("react");const q=require("../../../../../utils/cn.cjs");require("sonner");require("@gearbox-protocol/sdk/common-utils");require("luxon");require("../../../../../utils/z-index.cjs");const T=require("../../../../tooltip/simple-tooltip.cjs");require("../../../../tooltip/tooltip.cjs");const d=require("../../../../typed-intl/index.cjs"),f=require("../apy-feature/apy-feature.cjs"),b=require("../points-feature/points-feature.cjs"),l=require("./cells.styles.cjs");function w({token:r,disabledStyle:n}){const o=()=>e.jsx("span",{className:q.cn(n&&"opacity-60 pointer-events-none"),children:e.jsx(f.APYFeature,{children:e.jsx(d.FormattedMessageTyped,{messageId:"components.strategiesTable.line.0slippage"})})});return e.jsx(e.Fragment,{children:n?o():e.jsx(T.SimpleTooltip,{placement:"top",triangle:!1,title:o(),children:e.jsx(d.FormattedMessageTyped,{messageId:"components.strategiesTable.line.0slippage.tip",values:{symbol:r?.title||""}})})})}function R({disabledStyle:r}){const n=e.jsx("span",{className:q.cn("rounded-xl px-[10px] py-1 text-xs leading-none",A.RWA_GRADIENT_BORDER_CLASS,r&&"opacity-60 pointer-events-none"),children:e.jsx(d.FormattedMessageTyped,{messageId:"components.strategiesTable.line.rwa"})});return e.jsx(e.Fragment,{children:r?n:e.jsx(T.SimpleTooltip,{placement:"top",triangle:!1,title:n,children:e.jsx(d.FormattedMessageTyped,{messageId:"components.strategiesTable.line.rwa.tip"})})})}function k({maxAPY:r,bonusAPY:n,rewards:o,rewardRates:m,debtRewards:g,debtRewardRates:x,hasAPY:c,hasRewards:a,hasDebtRewards:j,disabledStyle:p,apyLoading:_,apyFormat:t="feature"}){const s=i=>t==="feature"?e.jsxs(f.APYFeature,{children:[u.formatPercentage(i),"% APR"]}):`${u.formatPercentage(i)}%`,S=i=>t==="feature"?e.jsxs(f.APYFeature,{children:["exp. ",u.formatPercentage(i),"% APR"]}):`exp. ${u.formatPercentage(i)}%`,v=()=>{const i=[c?e.jsx(P.Skeleton,{className:"inline-block align-text-bottom",width:50,loading:_,children:s(r)},"apy"):void 0,a||j?e.jsx(y,{rewards:o,rewardRates:m,debtRewards:g,debtRewardRates:x,hasRewards:a,hasDebtRewards:j,disabledStyle:p},"points"):void 0].filter(Boolean);return i.flatMap((h,F)=>F===i.length-1?[h]:[h,e.jsx(l.Plus,{children:"+"},`plus-${F}`)])};return e.jsxs("div",{className:"flex-row-row items-center gap-2",children:[v(),n&&e.jsx(l.Plus,{children:":"}),n&&e.jsx(P.Skeleton,{className:"inline-block align-text-bottom",loading:_,width:50,children:S(n.value)})]})}function y({rewards:r,rewardRates:n,debtRewards:o,debtRewardRates:m,hasRewards:g,hasDebtRewards:x,disabledStyle:c,theme:a}){return(()=>{const p=[g?r.map((t,s)=>e.jsx("span",{children:e.jsx(l.DisabledWrap,{disabled:c,children:e.jsx(b.PointsFeature,{reward:t,points:n?.[s]||0n,theme:a})})},["base",t.multiplier,t.name,t.type,t.units].join("-"))):void 0,x?o.map((t,s)=>e.jsx("span",{children:e.jsx(l.DisabledWrap,{disabled:c,children:e.jsx(b.PointsFeature,{reward:t,points:m?.[s]||0n,theme:a})})},["debt",t.multiplier,t.name,t.type,t.units,t.cm].join("-"))):void 0].filter(Boolean);return p.flatMap((t,s)=>s===p.length-1?[t]:[t,e.jsx(l.Plus,{children:"+"},`plus-points-${s}`)])})()}exports.RWAFeature=R;exports.StrategiesRewardsCell=k;exports.StrategyPoints=y;exports.ZeroSlippageFeature=w;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),V=require("@fortawesome/free-solid-svg-icons"),a=require("@gearbox-protocol/sdk"),k=require("viem"),z=require("../../../../icon-button/icon-button.cjs"),D=require("../../../../icons/fa-icon.cjs"),E=require("../../../../separate-line/separate-line.cjs"),j=require("../../../../skeleton/skeleton.cjs");require("react");const H=require("../../../../../utils/cn.cjs");require("sonner");require("@gearbox-protocol/sdk/common-utils");require("luxon");require("../../../../../utils/z-index.cjs");const h=require("../../../../tip-card/tip-card.cjs"),o=require("../../../../typed-intl/index.cjs"),l=require("../../../../typography/typography.cjs"),F=require("../../../../vertical-indicator/vertical-indicator.cjs"),I=require("../../../../vertical-list/vertical-list.cjs"),f=require("../../../../vspace/vspace.cjs"),c=require("../apy-feature/apy-feature.cjs"),p=require("../points-feature/points-feature.cjs"),O=require("./rewards-tooltip-root.cjs"),U=0;function W({cellInfo:r,targetToken:n,apyList:s,tokensList:d,strategyCreditManagers:T,onClose:w,theme:C="modal"}){const{maxAPY:Y,minCreditManager:i,bonusAPY:b,maxLeverage:_,apyLoading:m,hasPoints:R,isPointsWithAPY:L,rewards:v,debtRewards:P,rewardRates:M,debtRewardRates:S,apyListByNetwork:N,quotaRate:$}=r,q=s?.[n]||0,u=N?.[i?.chainId||U]?.extraCollateralAPYList?.[i?.pool||k.zeroAddress]?.[n],B=L||!R;return e.jsxs(O.RewardsTooltipRoot,{theme:C,children:[w&&e.jsx("div",{style:{position:"absolute",top:"-10px",right:"-10px"},children:e.jsx(z.IconButton,{size:26,buttonType:"filledDark",onClick:w,children:e.jsx(D.FaIcon,{icon:V.faXmark,style:{width:"12px",height:"12px"}})})}),e.jsx(h.TipCard,{textColor:"dark",children:e.jsxs(y,{title:e.jsx(o.FormattedMessageTyped,{messageId:"components.rewardsTooltip.without.title"}),children:[q>0&&e.jsx(j.Skeleton,{className:"inline-block align-text-bottom",width:50,loading:m,children:e.jsx(c.APYFeatureTooltip,{value:`${a.formatPercentage(q)}%`})}),u&&u.value>0&&e.jsx(j.Skeleton,{className:"inline-block align-text-bottom",width:50,loading:m,children:e.jsx(c.APYFeatureTooltip,{title:e.jsx(o.FormattedMessageTyped,{messageId:"components.rewardsTooltip.without.extra"}),tip:e.jsx(o.FormattedMessageTyped,{messageId:"components.rewardsTooltip.without.extra.tip"}),value:`${a.formatPercentage(u.value)}%`})}),v.map(t=>e.jsx(p.PointsFeatureTooltip,{reward:t,points:t.multiplier},["base",t.multiplier,t.name,t.type,t.units].join("-"))),P.map(t=>e.jsx(p.PointsFeatureTooltip,{reward:t,points:t.multiplier,tip:e.jsx(A,{tokensList:d,strategyCreditManagers:T,reward:t})},["debt",t.multiplier,t.name,t.type,t.units,t.cm].join("-")))]})}),e.jsx(f.VSpace,{height:16}),e.jsxs(h.TipCard,{textColor:"dark",borderColor:"gradient",children:[e.jsx(I.VerticalList,{children:e.jsxs(y,{title:e.jsx(o.FormattedMessageTyped,{messageId:"components.rewardsTooltip.with.title",values:{leverage:_>0?`${a.formatLeverage(Number(_))}×`:""}}),children:[B&&e.jsx(j.Skeleton,{className:"inline-block align-text-bottom",width:50,loading:m,children:e.jsx(c.APYFeatureTooltip,{value:`${a.formatPercentage(Y)}%`})}),v.map((t,x)=>{const g=M?.[x]||0n;return e.jsx(p.PointsFeatureTooltip,{reward:t,points:g},["base",t.multiplier,t.name,t.type,t.units].join("-"))}),P.map((t,x)=>{const g=S?.[x]||0n;return e.jsx(p.PointsFeatureTooltip,{reward:t,points:g,tip:e.jsx(A,{tokensList:d,strategyCreditManagers:T,reward:t})},["debt",t.multiplier,t.name,t.type,t.units,t.cm].join("-"))})]})}),e.jsx(E.SeparateLine,{margin:16}),e.jsxs(I.VerticalList,{children:[i&&e.jsx(F.VerticalIndicator,{label:e.jsx(l.Typography,{as:"span",color:"secondary",children:e.jsx(o.FormattedMessageTyped,{values:{symbol:d?.[i.underlyingToken]?.title||"Utilization"},messageId:"components.rewardsTooltip.with.borrowRate"})}),value:e.jsx(l.Typography,{as:"span",color:"secondary",children:`${a.formatPercentage(i.baseBorrowRate)}%`})}),i&&e.jsx(F.VerticalIndicator,{label:e.jsx(l.Typography,{as:"span",color:"secondary",children:e.jsx(o.FormattedMessageTyped,{messageId:"components.rewardsTooltip.with.quotaRate"})}),value:e.jsx(l.Typography,{as:"span",color:"secondary",children:`${a.formatPercentage(Number($))}%`})})]})]}),b&&e.jsxs(e.Fragment,{children:[e.jsx(f.VSpace,{height:16}),e.jsx(h.TipCard,{backgroundColor:"gray-10",textColor:"light",borderColor:"dark",children:e.jsx(y,{title:e.jsx(o.FormattedMessageTyped,{messageId:"components.rewardsTooltip.with.bonusAPY.title"}),children:e.jsx("div",{className:"flex-col-12",children:e.jsx(c.APYFeatureTooltip,{theme:"light",tip:e.jsx(o.FormattedMessageTyped,{messageId:"components.rewardsTooltip.with.bonusAPY.tip"}),value:`${a.formatPercentage(b.value)}%`})})})})]})]})}function y({title:r,children:n,theme:s="main"}){return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:H.cn("flex-col-12",s==="main"?"mb-3":"mb-2"),children:e.jsx(l.Typography,{as:"span",variant:"bodySmall",weight:s==="main"?"bold":"normal",color:s==="main"?"default":"secondary",children:r})}),e.jsx("div",{className:"flex-row-row gap-2 w-full",children:n})]})}function A({reward:r,strategyCreditManagers:n,tokensList:s}){return r.cm==="any"?e.jsx(o.FormattedMessageTyped,{messageId:"components.strategiesTable.line.points.tipAny"}):e.jsx(o.FormattedMessageTyped,{messageId:"components.strategiesTable.line.points.tip",values:{symbol:s?.[n[r.cm]?.underlyingToken||k.zeroAddress]?.title||"unknown"}})}exports.RewardsTooltipContent=W;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),z=require("@fortawesome/free-solid-svg-icons"),a=require("@gearbox-protocol/sdk"),k=require("viem"),B=require("../../../../icon-button/icon-button.cjs"),D=require("../../../../icons/fa-icon.cjs"),E=require("../../../../separate-line/separate-line.cjs"),j=require("../../../../skeleton/skeleton.cjs");require("react");const H=require("../../../../../utils/cn.cjs");require("sonner");require("@gearbox-protocol/sdk/common-utils");require("luxon");require("../../../../../utils/z-index.cjs");const h=require("../../../../tip-card/tip-card.cjs"),o=require("../../../../typed-intl/index.cjs"),l=require("../../../../typography/typography.cjs"),F=require("../../../../vertical-indicator/vertical-indicator.cjs"),I=require("../../../../vertical-list/vertical-list.cjs"),f=require("../../../../vspace/vspace.cjs"),c=require("../apy-feature/apy-feature.cjs"),p=require("../points-feature/points-feature.cjs"),O=require("./rewards-tooltip-root.cjs"),A=0;function U({cellInfo:r,targetToken:n,apyListByNetwork:s,tokensList:d,strategyCreditManagers:T,onClose:b,theme:Y="modal"}){const{maxAPY:R,minCreditManager:i,bonusAPY:w,maxLeverage:_,apyLoading:m,hasPoints:M,isPointsWithAPY:L,rewards:v,debtRewards:P,rewardRates:S,debtRewardRates:N,quotaRate:$}=r,q=s?.[A]?.apyList?.[n]||0,u=s?.[i?.chainId||A]?.extraCollateralAPYList?.[i?.pool||k.zeroAddress]?.[n],V=L||!M;return e.jsxs(O.RewardsTooltipRoot,{theme:Y,children:[b&&e.jsx("div",{style:{position:"absolute",top:"-10px",right:"-10px"},children:e.jsx(B.IconButton,{size:26,buttonType:"filledDark",onClick:b,children:e.jsx(D.FaIcon,{icon:z.faXmark,style:{width:"12px",height:"12px"}})})}),e.jsx(h.TipCard,{textColor:"dark",children:e.jsxs(y,{title:e.jsx(o.FormattedMessageTyped,{messageId:"components.rewardsTooltip.without.title"}),children:[q>0&&e.jsx(j.Skeleton,{className:"inline-block align-text-bottom",width:50,loading:m,children:e.jsx(c.APYFeatureTooltip,{value:`${a.formatPercentage(q)}%`})}),u&&u.value>0&&e.jsx(j.Skeleton,{className:"inline-block align-text-bottom",width:50,loading:m,children:e.jsx(c.APYFeatureTooltip,{title:e.jsx(o.FormattedMessageTyped,{messageId:"components.rewardsTooltip.without.extra"}),tip:e.jsx(o.FormattedMessageTyped,{messageId:"components.rewardsTooltip.without.extra.tip"}),value:`${a.formatPercentage(u.value)}%`})}),v.map(t=>e.jsx(p.PointsFeatureTooltip,{reward:t,points:t.multiplier},["base",t.multiplier,t.name,t.type,t.units].join("-"))),P.map(t=>e.jsx(p.PointsFeatureTooltip,{reward:t,points:t.multiplier,tip:e.jsx(C,{tokensList:d,strategyCreditManagers:T,reward:t})},["debt",t.multiplier,t.name,t.type,t.units,t.cm].join("-")))]})}),e.jsx(f.VSpace,{height:16}),e.jsxs(h.TipCard,{textColor:"dark",borderColor:"gradient",children:[e.jsx(I.VerticalList,{children:e.jsxs(y,{title:e.jsx(o.FormattedMessageTyped,{messageId:"components.rewardsTooltip.with.title",values:{leverage:_>0?`${a.formatLeverage(Number(_))}×`:""}}),children:[V&&e.jsx(j.Skeleton,{className:"inline-block align-text-bottom",width:50,loading:m,children:e.jsx(c.APYFeatureTooltip,{value:`${a.formatPercentage(R)}%`})}),v.map((t,x)=>{const g=S?.[x]||0n;return e.jsx(p.PointsFeatureTooltip,{reward:t,points:g},["base",t.multiplier,t.name,t.type,t.units].join("-"))}),P.map((t,x)=>{const g=N?.[x]||0n;return e.jsx(p.PointsFeatureTooltip,{reward:t,points:g,tip:e.jsx(C,{tokensList:d,strategyCreditManagers:T,reward:t})},["debt",t.multiplier,t.name,t.type,t.units,t.cm].join("-"))})]})}),e.jsx(E.SeparateLine,{margin:16}),e.jsxs(I.VerticalList,{children:[i&&e.jsx(F.VerticalIndicator,{label:e.jsx(l.Typography,{as:"span",color:"secondary",children:e.jsx(o.FormattedMessageTyped,{values:{symbol:d?.[i.underlyingToken]?.title||"Utilization"},messageId:"components.rewardsTooltip.with.borrowRate"})}),value:e.jsx(l.Typography,{as:"span",color:"secondary",children:`${a.formatPercentage(i.baseBorrowRate)}%`})}),i&&e.jsx(F.VerticalIndicator,{label:e.jsx(l.Typography,{as:"span",color:"secondary",children:e.jsx(o.FormattedMessageTyped,{messageId:"components.rewardsTooltip.with.quotaRate"})}),value:e.jsx(l.Typography,{as:"span",color:"secondary",children:`${a.formatPercentage(Number($))}%`})})]})]}),w&&e.jsxs(e.Fragment,{children:[e.jsx(f.VSpace,{height:16}),e.jsx(h.TipCard,{backgroundColor:"gray-10",textColor:"light",borderColor:"dark",children:e.jsx(y,{title:e.jsx(o.FormattedMessageTyped,{messageId:"components.rewardsTooltip.with.bonusAPY.title"}),children:e.jsx("div",{className:"flex-col-12",children:e.jsx(c.APYFeatureTooltip,{theme:"light",tip:e.jsx(o.FormattedMessageTyped,{messageId:"components.rewardsTooltip.with.bonusAPY.tip"}),value:`${a.formatPercentage(w.value)}%`})})})})]})]})}function y({title:r,children:n,theme:s="main"}){return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:H.cn("flex-col-12",s==="main"?"mb-3":"mb-2"),children:e.jsx(l.Typography,{as:"span",variant:"bodySmall",weight:s==="main"?"bold":"normal",color:s==="main"?"default":"secondary",children:r})}),e.jsx("div",{className:"flex-row-row gap-2 w-full",children:n})]})}function C({reward:r,strategyCreditManagers:n,tokensList:s}){return r.cm==="any"?e.jsx(o.FormattedMessageTyped,{messageId:"components.strategiesTable.line.points.tipAny"}):e.jsx(o.FormattedMessageTyped,{messageId:"components.strategiesTable.line.points.tip",values:{symbol:s?.[n[r.cm]?.underlyingToken||k.zeroAddress]?.title||"unknown"}})}exports.RewardsTooltipContent=U;
@@ -1,13 +1,13 @@
1
- import { jsx as t, jsxs as m } from "react/jsx-runtime";
2
- import { formatLeverage as w } from "@gearbox-protocol/sdk";
3
- import { NetworkIcon as b } from "../../network-icon/network-icon.js";
4
- import { ShortString as T } from "../../short-string/short-string.js";
5
- import { TokenSymbol as y } from "../../token-symbol/token-symbol.js";
6
- import { FormattedMessageTyped as c } from "../../typed-intl/index.js";
7
- import { Typography as k } from "../../typography/typography.js";
8
- import { RWAFeature as R, ZeroSlippageFeature as v, StrategiesRewardsCell as x } from "./components/cells/cells.js";
9
- import { TitleGrid as S, DisabledWrap as h } from "./components/cells/cells.styles.js";
10
- import { RewardsTooltip as C } from "./components/rewards-tooltip/rewards-tooltip.js";
1
+ import { jsx as t, jsxs as o } from "react/jsx-runtime";
2
+ import { formatLeverage as f } from "@gearbox-protocol/sdk";
3
+ import { NetworkIcon as u } from "../../network-icon/network-icon.js";
4
+ import { ShortString as w } from "../../short-string/short-string.js";
5
+ import { TokenSymbol as b } from "../../token-symbol/token-symbol.js";
6
+ import { FormattedMessageTyped as n } from "../../typed-intl/index.js";
7
+ import { Typography as y } from "../../typography/typography.js";
8
+ import { RWAFeature as T, ZeroSlippageFeature as R, StrategiesRewardsCell as k } from "./components/cells/cells.js";
9
+ import { TitleGrid as v, DisabledWrap as g } from "./components/cells/cells.styles.js";
10
+ import { RewardsTooltip as x } 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";
@@ -30,26 +30,26 @@ import "../../vertical-list/vertical-list.js";
30
30
  import "../../help-tip/help-tip.js";
31
31
  import "./components/feature/feature.styles.js";
32
32
  import "../../points-icon/points-icon.js";
33
- function p(e, i, r) {
33
+ function m(e, i, r) {
34
34
  const a = e?.header ?? /* @__PURE__ */ t(
35
- c,
35
+ n,
36
36
  {
37
37
  messageId: e?.headerMessageId ?? i
38
38
  }
39
39
  );
40
- let o;
40
+ let d;
41
41
  if (e?.headerTip !== null) {
42
- const d = e?.headerTipMessageId ?? r;
43
- o = e?.headerTip ?? (d && /* @__PURE__ */ t(c, { messageId: d }));
42
+ const s = e?.headerTipMessageId ?? r;
43
+ d = e?.headerTip ?? (s && /* @__PURE__ */ t(n, { messageId: s }));
44
44
  }
45
- return { header: a, headerTip: o, mobileTitle: e?.mobileTitle ?? a };
45
+ return { header: a, headerTip: d, mobileTitle: e?.mobileTitle ?? a };
46
46
  }
47
- function L({ ctx: e }) {
48
- const { strategy: i, targetToken: r, targetTokenAddress: a, tokensList: o, row: d } = e, s = !!d.disabledStyle, l = !!d.zeroSlippageTokens?.[a], n = !!i.strategyMarketType?.includes("rwa"), g = d.delayedConfigs?.[0]?.withdrawalPhantomToken, u = e.isMobile || e.isDesktop ? 38 : 26;
49
- return /* @__PURE__ */ t("div", { className: "flex flex-col-auto", children: /* @__PURE__ */ m(S, { children: [
50
- /* @__PURE__ */ m("div", { className: "flex items-center gap-1.5 pr-2 leading-none", children: [
51
- /* @__PURE__ */ t(h, { disabled: s, children: /* @__PURE__ */ t(
52
- b,
47
+ function S({ ctx: e }) {
48
+ const { strategy: i, targetToken: r, row: a } = e, d = !!a.disabledStyle, s = !!i.strategyMarketType?.includes("rwa"), l = e.isMobile || e.isDesktop ? 38 : 26;
49
+ return /* @__PURE__ */ t("div", { className: "flex flex-col-auto", children: /* @__PURE__ */ o(v, { children: [
50
+ /* @__PURE__ */ o("div", { className: "flex items-center gap-1.5 pr-2 leading-none", children: [
51
+ /* @__PURE__ */ t(g, { disabled: d, children: /* @__PURE__ */ t(
52
+ u,
53
53
  {
54
54
  network: i.network,
55
55
  isTest: !1,
@@ -57,37 +57,37 @@ function L({ ctx: e }) {
57
57
  showTooltip: !0
58
58
  }
59
59
  ) }),
60
- /* @__PURE__ */ t(h, { disabled: s, children: /* @__PURE__ */ t(y, { token: r, size: 24 }) })
60
+ /* @__PURE__ */ t(g, { disabled: d, children: /* @__PURE__ */ t(b, { token: r, size: 24 }) })
61
61
  ] }),
62
- /* @__PURE__ */ m("div", { className: "flex items-center gap-x-3", children: [
63
- /* @__PURE__ */ t(T, { maxLength: u, children: i.name }),
64
- n && /* @__PURE__ */ t(R, { disabledStyle: s }),
65
- l && /* @__PURE__ */ t(
66
- v,
62
+ /* @__PURE__ */ o("div", { className: "flex items-center gap-x-3", children: [
63
+ /* @__PURE__ */ t(w, { maxLength: l, children: i.name }),
64
+ s && /* @__PURE__ */ t(T, { disabledStyle: d }),
65
+ a.isZeroSlippagePair && /* @__PURE__ */ t(
66
+ R,
67
67
  {
68
- token: g ? o?.[g] : void 0,
69
- disabledStyle: s
68
+ token: a.zeroSlippageToken,
69
+ disabledStyle: d
70
70
  }
71
71
  )
72
72
  ] }),
73
- s && /* @__PURE__ */ t("div", {}),
74
- s && /* @__PURE__ */ t(
75
- k,
73
+ d && /* @__PURE__ */ t("div", {}),
74
+ d && /* @__PURE__ */ t(
75
+ y,
76
76
  {
77
77
  as: "span",
78
78
  variant: "caption",
79
79
  style: { lineHeight: "100%" },
80
- children: /* @__PURE__ */ t(c, { messageId: "components.strategiesTable.line.name.disabled" })
80
+ children: /* @__PURE__ */ t(n, { messageId: "components.strategiesTable.line.name.disabled" })
81
81
  }
82
82
  )
83
83
  ] }) });
84
84
  }
85
- function f({
85
+ function h({
86
86
  ctx: e,
87
87
  mobile: i = !1
88
88
  }) {
89
- const { rewardsCellInfo: r, row: a, targetTokenAddress: o, tokensList: d } = e, s = !!a.disabledStyle, l = /* @__PURE__ */ t(
90
- x,
89
+ const { rewardsCellInfo: r, row: a, targetTokenAddress: d, tokensList: s } = e, l = !!a.disabledStyle, c = /* @__PURE__ */ t(
90
+ k,
91
91
  {
92
92
  maxAPY: r.maxAPY,
93
93
  bonusAPY: r.bonusAPY,
@@ -99,23 +99,23 @@ function f({
99
99
  hasRewards: r.hasRewards ?? !1,
100
100
  hasDebtRewards: r.hasDebtRewards ?? !1,
101
101
  apyLoading: r.apyLoading,
102
- disabledStyle: s
102
+ disabledStyle: l
103
103
  }
104
- ), n = i ? /* @__PURE__ */ t("div", { className: "pt-1", children: l }) : l;
105
- return s ? n : /* @__PURE__ */ t(
106
- C,
104
+ ), p = i ? /* @__PURE__ */ t("div", { className: "pt-1", children: c }) : c;
105
+ return l ? p : /* @__PURE__ */ t(
106
+ x,
107
107
  {
108
108
  cellInfo: r,
109
- targetToken: o,
110
- apyList: a.apyList,
111
- tokensList: d,
109
+ targetToken: d,
110
+ apyListByNetwork: a.apyListByNetwork,
111
+ tokensList: s,
112
112
  strategyCreditManagers: a.strategyCreditManagers,
113
- children: /* @__PURE__ */ t("div", { children: n })
113
+ children: /* @__PURE__ */ t("div", { children: p })
114
114
  }
115
115
  );
116
116
  }
117
- function de(e) {
118
- const { header: i, mobileTitle: r } = p(
117
+ function ie(e) {
118
+ const { header: i, mobileTitle: r } = m(
119
119
  e,
120
120
  "components.strategiesTable.head.name"
121
121
  );
@@ -127,12 +127,12 @@ function de(e) {
127
127
  align: "left",
128
128
  className: "pl-4",
129
129
  sort: e?.sortField !== void 0 ? { field: e.sortField, defaultDirection: "desc" } : { field: "strategyName", defaultDirection: "desc" },
130
- cell: (a) => /* @__PURE__ */ t(L, { ctx: a }),
130
+ cell: (a) => /* @__PURE__ */ t(S, { ctx: a }),
131
131
  mobileTitle: r
132
132
  };
133
133
  }
134
- function oe(e) {
135
- const { header: i, mobileTitle: r } = p(
134
+ function de(e) {
135
+ const { header: i, mobileTitle: r } = m(
136
136
  e,
137
137
  "components.strategiesTable.head.rewards"
138
138
  );
@@ -143,13 +143,13 @@ function oe(e) {
143
143
  mediumWidth: e?.mediumWidth ?? "270px",
144
144
  align: "left",
145
145
  sort: e?.sortField !== void 0 ? { field: e.sortField, defaultDirection: "desc" } : { field: "apy", defaultDirection: "desc" },
146
- cell: (a) => /* @__PURE__ */ t(f, { ctx: a }),
147
- mobileCell: (a) => /* @__PURE__ */ t(f, { ctx: a, mobile: !0 }),
146
+ cell: (a) => /* @__PURE__ */ t(h, { ctx: a }),
147
+ mobileCell: (a) => /* @__PURE__ */ t(h, { ctx: a, mobile: !0 }),
148
148
  mobileTitle: r
149
149
  };
150
150
  }
151
- function le(e) {
152
- const { header: i, mobileTitle: r } = p(
151
+ function se(e) {
152
+ const { header: i, mobileTitle: r } = m(
153
153
  e,
154
154
  "components.strategiesTable.head.leverage"
155
155
  );
@@ -161,16 +161,16 @@ function le(e) {
161
161
  align: "right",
162
162
  className: "pr-4",
163
163
  headerClassName: "pr-4",
164
- cell: (a) => `×${w(Number(a.row.maxLeverage), 0)}`,
164
+ cell: (a) => `×${f(Number(a.row.maxLeverage), 0)}`,
165
165
  mobileTitle: r
166
166
  };
167
167
  }
168
- function ne(e) {
168
+ function le(e) {
169
169
  return e;
170
170
  }
171
171
  export {
172
- ne as customStrategyColumn,
173
- de as strategyColumn,
174
- le as strategyLeverageColumn,
175
- oe as strategyRewardsColumn
172
+ le as customStrategyColumn,
173
+ ie as strategyColumn,
174
+ se as strategyLeverageColumn,
175
+ de as strategyRewardsColumn
176
176
  };
@@ -18,19 +18,19 @@ function K({
18
18
  token: n,
19
19
  disabledStyle: r
20
20
  }) {
21
- const s = () => /* @__PURE__ */ e("span", { className: R(r && "opacity-60 pointer-events-none"), children: /* @__PURE__ */ e(b, { children: /* @__PURE__ */ e(m, { messageId: "components.strategiesTable.line.0slippage" }) }) });
22
- return /* @__PURE__ */ e(N, { children: r ? s() : /* @__PURE__ */ e(
21
+ const l = () => /* @__PURE__ */ e("span", { className: R(r && "opacity-60 pointer-events-none"), children: /* @__PURE__ */ e(b, { children: /* @__PURE__ */ e(m, { messageId: "components.strategiesTable.line.0slippage" }) }) });
22
+ return /* @__PURE__ */ e(N, { children: r ? l() : /* @__PURE__ */ e(
23
23
  F,
24
24
  {
25
25
  placement: "top",
26
26
  triangle: !1,
27
- title: s(),
27
+ title: l(),
28
28
  children: /* @__PURE__ */ e(
29
29
  m,
30
30
  {
31
31
  messageId: "components.strategiesTable.line.0slippage.tip",
32
32
  values: {
33
- symbol: n?.title || "this token"
33
+ symbol: n?.title || ""
34
34
  }
35
35
  }
36
36
  )
@@ -54,12 +54,12 @@ function Q({ disabledStyle: n }) {
54
54
  function U({
55
55
  maxAPY: n,
56
56
  bonusAPY: r,
57
- rewards: s,
57
+ rewards: l,
58
58
  rewardRates: d,
59
59
  debtRewards: u,
60
60
  debtRewardRates: f,
61
61
  hasAPY: a,
62
- hasRewards: l,
62
+ hasRewards: s,
63
63
  hasDebtRewards: g,
64
64
  disabledStyle: p,
65
65
  apyLoading: h,
@@ -86,14 +86,14 @@ function U({
86
86
  },
87
87
  "apy"
88
88
  ) : void 0,
89
- l || g ? /* @__PURE__ */ e(
89
+ s || g ? /* @__PURE__ */ e(
90
90
  j,
91
91
  {
92
- rewards: s,
92
+ rewards: l,
93
93
  rewardRates: d,
94
94
  debtRewards: u,
95
95
  debtRewardRates: f,
96
- hasRewards: l,
96
+ hasRewards: s,
97
97
  hasDebtRewards: g,
98
98
  disabledStyle: p
99
99
  },
@@ -117,12 +117,12 @@ function U({
117
117
  function j({
118
118
  rewards: n,
119
119
  rewardRates: r,
120
- debtRewards: s,
120
+ debtRewards: l,
121
121
  debtRewardRates: d,
122
122
  hasRewards: u,
123
123
  hasDebtRewards: f,
124
124
  disabledStyle: a,
125
- theme: l
125
+ theme: s
126
126
  }) {
127
127
  return (() => {
128
128
  const p = [
@@ -134,13 +134,13 @@ function j({
134
134
  {
135
135
  reward: t,
136
136
  points: r?.[i] || 0n,
137
- theme: l
137
+ theme: s
138
138
  }
139
139
  ) })
140
140
  },
141
141
  ["base", t.multiplier, t.name, t.type, t.units].join("-")
142
142
  )) : void 0,
143
- f ? s.map((t, i) => /* @__PURE__ */ e(
143
+ f ? l.map((t, i) => /* @__PURE__ */ e(
144
144
  "span",
145
145
  {
146
146
  children: /* @__PURE__ */ e(L, { disabled: a, children: /* @__PURE__ */ e(
@@ -148,7 +148,7 @@ function j({
148
148
  {
149
149
  reward: t,
150
150
  points: d?.[i] || 0n,
151
- theme: l
151
+ theme: s
152
152
  }
153
153
  ) })
154
154
  },
@@ -1,7 +1,7 @@
1
- import { jsxs as r, jsx as e, Fragment as L } from "react/jsx-runtime";
1
+ import { jsxs as r, jsx as e, Fragment as j } from "react/jsx-runtime";
2
2
  import { faXmark as M } from "@fortawesome/free-solid-svg-icons";
3
3
  import { formatPercentage as s, formatLeverage as _ } from "@gearbox-protocol/sdk";
4
- import { zeroAddress as $ } from "viem";
4
+ import { zeroAddress as L } from "viem";
5
5
  import { IconButton as H } from "../../../../icon-button/icon-button.js";
6
6
  import { FaIcon as U } from "../../../../icons/fa-icon.js";
7
7
  import { SeparateLine as W } from "../../../../separate-line/separate-line.js";
@@ -15,51 +15,50 @@ import "../../../../../utils/z-index.js";
15
15
  import { TipCard as f } from "../../../../tip-card/tip-card.js";
16
16
  import { FormattedMessageTyped as o } from "../../../../typed-intl/index.js";
17
17
  import { Typography as m } from "../../../../typography/typography.js";
18
- import { VerticalIndicator as C } from "../../../../vertical-indicator/vertical-indicator.js";
19
- import { VerticalList as Y } from "../../../../vertical-list/vertical-list.js";
18
+ import { VerticalIndicator as Y } from "../../../../vertical-indicator/vertical-indicator.js";
19
+ import { VerticalList as k } from "../../../../vertical-list/vertical-list.js";
20
20
  import { VSpace as R } from "../../../../vspace/vspace.js";
21
21
  import { APYFeatureTooltip as p } from "../apy-feature/apy-feature.js";
22
22
  import { PointsFeatureTooltip as d } from "../points-feature/points-feature.js";
23
23
  import { RewardsTooltipRoot as G } from "./rewards-tooltip-root.js";
24
- const J = 0;
24
+ const N = 0;
25
25
  function xe({
26
26
  cellInfo: a,
27
27
  targetToken: n,
28
- apyList: i,
28
+ apyListByNetwork: i,
29
29
  tokensList: c,
30
- strategyCreditManagers: x,
30
+ strategyCreditManagers: y,
31
31
  onClose: T,
32
- theme: j = "modal"
32
+ theme: F = "modal"
33
33
  }) {
34
34
  const {
35
- maxAPY: F,
35
+ maxAPY: S,
36
36
  minCreditManager: l,
37
37
  bonusAPY: v,
38
38
  maxLeverage: P,
39
39
  apyLoading: u,
40
- hasPoints: B,
41
- isPointsWithAPY: S,
40
+ hasPoints: z,
41
+ isPointsWithAPY: D,
42
42
  rewards: I,
43
43
  debtRewards: A,
44
- rewardRates: z,
45
- debtRewardRates: D,
46
- apyListByNetwork: V,
47
- quotaRate: q
48
- } = a, k = i?.[n] || 0, h = V?.[l?.chainId || J]?.extraCollateralAPYList?.[l?.pool || $]?.[n], E = S || !B;
49
- return /* @__PURE__ */ r(G, { theme: j, children: [
44
+ rewardRates: V,
45
+ debtRewardRates: q,
46
+ quotaRate: B
47
+ } = a, C = i?.[N]?.apyList?.[n] || 0, h = i?.[l?.chainId || N]?.extraCollateralAPYList?.[l?.pool || L]?.[n], E = D || !z;
48
+ return /* @__PURE__ */ r(G, { theme: F, children: [
50
49
  T && /* @__PURE__ */ e("div", { style: { position: "absolute", top: "-10px", right: "-10px" }, children: /* @__PURE__ */ e(H, { size: 26, buttonType: "filledDark", onClick: T, children: /* @__PURE__ */ e(U, { icon: M, style: { width: "12px", height: "12px" } }) }) }),
51
50
  /* @__PURE__ */ e(f, { textColor: "dark", children: /* @__PURE__ */ r(
52
- y,
51
+ x,
53
52
  {
54
53
  title: /* @__PURE__ */ e(o, { messageId: "components.rewardsTooltip.without.title" }),
55
54
  children: [
56
- k > 0 && /* @__PURE__ */ e(
55
+ C > 0 && /* @__PURE__ */ e(
57
56
  b,
58
57
  {
59
58
  className: "inline-block align-text-bottom",
60
59
  width: 50,
61
60
  loading: u,
62
- children: /* @__PURE__ */ e(p, { value: `${s(k)}%` })
61
+ children: /* @__PURE__ */ e(p, { value: `${s(C)}%` })
63
62
  }
64
63
  ),
65
64
  h && h.value > 0 && /* @__PURE__ */ e(
@@ -92,10 +91,10 @@ function xe({
92
91
  reward: t,
93
92
  points: t.multiplier,
94
93
  tip: /* @__PURE__ */ e(
95
- N,
94
+ $,
96
95
  {
97
96
  tokensList: c,
98
- strategyCreditManagers: x,
97
+ strategyCreditManagers: y,
99
98
  reward: t
100
99
  }
101
100
  )
@@ -109,8 +108,8 @@ function xe({
109
108
  ) }),
110
109
  /* @__PURE__ */ e(R, { height: 16 }),
111
110
  /* @__PURE__ */ r(f, { textColor: "dark", borderColor: "gradient", children: [
112
- /* @__PURE__ */ e(Y, { children: /* @__PURE__ */ r(
113
- y,
111
+ /* @__PURE__ */ e(k, { children: /* @__PURE__ */ r(
112
+ x,
114
113
  {
115
114
  title: /* @__PURE__ */ e(
116
115
  o,
@@ -128,34 +127,34 @@ function xe({
128
127
  className: "inline-block align-text-bottom",
129
128
  width: 50,
130
129
  loading: u,
131
- children: /* @__PURE__ */ e(p, { value: `${s(F)}%` })
130
+ children: /* @__PURE__ */ e(p, { value: `${s(S)}%` })
132
131
  }
133
132
  ),
134
- I.map((t, w) => {
135
- const g = z?.[w] || 0n;
133
+ I.map((t, g) => {
134
+ const w = V?.[g] || 0n;
136
135
  return /* @__PURE__ */ e(
137
136
  d,
138
137
  {
139
138
  reward: t,
140
- points: g
139
+ points: w
141
140
  },
142
141
  ["base", t.multiplier, t.name, t.type, t.units].join(
143
142
  "-"
144
143
  )
145
144
  );
146
145
  }),
147
- A.map((t, w) => {
148
- const g = D?.[w] || 0n;
146
+ A.map((t, g) => {
147
+ const w = q?.[g] || 0n;
149
148
  return /* @__PURE__ */ e(
150
149
  d,
151
150
  {
152
151
  reward: t,
153
- points: g,
152
+ points: w,
154
153
  tip: /* @__PURE__ */ e(
155
- N,
154
+ $,
156
155
  {
157
156
  tokensList: c,
158
- strategyCreditManagers: x,
157
+ strategyCreditManagers: y,
159
158
  reward: t
160
159
  }
161
160
  )
@@ -174,9 +173,9 @@ function xe({
174
173
  }
175
174
  ) }),
176
175
  /* @__PURE__ */ e(W, { margin: 16 }),
177
- /* @__PURE__ */ r(Y, { children: [
176
+ /* @__PURE__ */ r(k, { children: [
178
177
  l && /* @__PURE__ */ e(
179
- C,
178
+ Y,
180
179
  {
181
180
  label: /* @__PURE__ */ e(m, { as: "span", color: "secondary", children: /* @__PURE__ */ e(
182
181
  o,
@@ -193,15 +192,15 @@ function xe({
193
192
  }
194
193
  ),
195
194
  l && /* @__PURE__ */ e(
196
- C,
195
+ Y,
197
196
  {
198
197
  label: /* @__PURE__ */ e(m, { as: "span", color: "secondary", children: /* @__PURE__ */ e(o, { messageId: "components.rewardsTooltip.with.quotaRate" }) }),
199
- value: /* @__PURE__ */ e(m, { as: "span", color: "secondary", children: `${s(Number(q))}%` })
198
+ value: /* @__PURE__ */ e(m, { as: "span", color: "secondary", children: `${s(Number(B))}%` })
200
199
  }
201
200
  )
202
201
  ] })
203
202
  ] }),
204
- v && /* @__PURE__ */ r(L, { children: [
203
+ v && /* @__PURE__ */ r(j, { children: [
205
204
  /* @__PURE__ */ e(R, { height: 16 }),
206
205
  /* @__PURE__ */ e(
207
206
  f,
@@ -210,7 +209,7 @@ function xe({
210
209
  textColor: "light",
211
210
  borderColor: "dark",
212
211
  children: /* @__PURE__ */ e(
213
- y,
212
+ x,
214
213
  {
215
214
  title: /* @__PURE__ */ e(o, { messageId: "components.rewardsTooltip.with.bonusAPY.title" }),
216
215
  children: /* @__PURE__ */ e("div", { className: "flex-col-12", children: /* @__PURE__ */ e(
@@ -228,8 +227,8 @@ function xe({
228
227
  ] })
229
228
  ] });
230
229
  }
231
- function y({ title: a, children: n, theme: i = "main" }) {
232
- return /* @__PURE__ */ r(L, { children: [
230
+ function x({ title: a, children: n, theme: i = "main" }) {
231
+ return /* @__PURE__ */ r(j, { children: [
233
232
  /* @__PURE__ */ e("div", { className: X("flex-col-12", i === "main" ? "mb-3" : "mb-2"), children: /* @__PURE__ */ e(
234
233
  m,
235
234
  {
@@ -243,7 +242,7 @@ function y({ title: a, children: n, theme: i = "main" }) {
243
242
  /* @__PURE__ */ e("div", { className: "flex-row-row gap-2 w-full", children: n })
244
243
  ] });
245
244
  }
246
- function N({
245
+ function $({
247
246
  reward: a,
248
247
  strategyCreditManagers: n,
249
248
  tokensList: i
@@ -253,7 +252,7 @@ function N({
253
252
  {
254
253
  messageId: "components.strategiesTable.line.points.tip",
255
254
  values: {
256
- symbol: i?.[n[a.cm]?.underlyingToken || $]?.title || "unknown"
255
+ symbol: i?.[n[a.cm]?.underlyingToken || L]?.title || "unknown"
257
256
  }
258
257
  }
259
258
  );
@@ -1,9 +1,9 @@
1
1
  import { Address } from 'viem';
2
- import { RewardsTooltipCellInfo, RewardsTooltipTheme, RewardsTooltipTokenMeta } from '../../types/rewards-tooltip';
2
+ import { RewardsTooltipApyListByNetwork, RewardsTooltipCellInfo, RewardsTooltipTheme, RewardsTooltipTokenMeta } from '../../types/rewards-tooltip';
3
3
  export interface RewardsTooltipContentProps {
4
4
  cellInfo: RewardsTooltipCellInfo;
5
5
  targetToken: Address;
6
- apyList: Partial<Record<Address, number>> | undefined;
6
+ apyListByNetwork: RewardsTooltipApyListByNetwork | undefined;
7
7
  tokensList: Partial<Record<Address, RewardsTooltipTokenMeta>> | undefined;
8
8
  strategyCreditManagers: Partial<Record<Address, {
9
9
  readonly underlyingToken: Address;
@@ -11,4 +11,4 @@ export interface RewardsTooltipContentProps {
11
11
  theme?: RewardsTooltipTheme;
12
12
  onClose?: () => void;
13
13
  }
14
- export declare function RewardsTooltipContent({ cellInfo, targetToken, apyList: baseAPYList, tokensList, strategyCreditManagers, onClose, theme, }: RewardsTooltipContentProps): import("react/jsx-runtime").JSX.Element;
14
+ export declare function RewardsTooltipContent({ cellInfo, targetToken, apyListByNetwork, tokensList, strategyCreditManagers, onClose, theme, }: RewardsTooltipContentProps): import("react/jsx-runtime").JSX.Element;
@@ -38,7 +38,6 @@ export interface RewardsTooltipCellInfo {
38
38
  readonly isPointsWithAPY: boolean;
39
39
  readonly hasAPY?: boolean;
40
40
  readonly maxLeverage: bigint;
41
- readonly apyListByNetwork: RewardsTooltipApyListByNetwork;
42
41
  readonly quotaRate: bigint;
43
42
  /**
44
43
  * Present on some call sites that reuse hook-shaped objects; the tooltip body
@@ -1,6 +1,6 @@
1
1
  import { Address } from 'viem';
2
2
  import { TokenMetaInfo } from '../../../../types/common';
3
- import { RewardsTooltipCellInfo } from './rewards-tooltip';
3
+ import { RewardsTooltipApyListByNetwork, RewardsTooltipCellInfo } from './rewards-tooltip';
4
4
  import type * as React from "react";
5
5
  export type StrategiesTableSortFields = "strategyName" | "apy";
6
6
  type StrategiesTableSortDirection = "desc" | "asc";
@@ -30,14 +30,14 @@ export interface StrategyTableRowDTO<S extends StrategyDTO = StrategyDTO, T exte
30
30
  readonly href?: string;
31
31
  readonly maxLeverage: bigint;
32
32
  readonly tokensList: Partial<Record<Address, T>> | undefined;
33
- readonly apyList: Partial<Record<Address, number>> | undefined;
33
+ readonly apyListByNetwork: RewardsTooltipApyListByNetwork | undefined;
34
34
  readonly strategyCreditManagers: Partial<Record<Address, StrategyTableCreditManager>>;
35
35
  readonly disabled?: boolean;
36
36
  readonly disabledStyle?: boolean;
37
37
  readonly disabledTooltip?: React.ReactNode;
38
38
  readonly rewardsCellInfo: RewardsTooltipCellInfo;
39
- readonly zeroSlippageTokens: Partial<Record<Address, boolean>> | undefined;
40
- readonly delayedConfigs: ReadonlyArray<StrategyTableDelayedConfig> | undefined;
39
+ readonly isZeroSlippagePair: boolean;
40
+ readonly zeroSlippageToken: T | undefined;
41
41
  readonly loading?: boolean;
42
42
  }
43
43
  export type StrategyTableRow = StrategyTableRowDTO;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/ui-kit",
3
- "version": "3.12.0",
3
+ "version": "3.12.2",
4
4
  "description": "Internal UI components",
5
5
  "repository": "https://github.com/gearbox-protocol/ui-kit",
6
6
  "license": "MIT",