@gearbox-protocol/ui-kit 3.12.1 → 3.13.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.
@@ -1 +1 @@
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,apyList:s.apyList,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 S(e){return e}exports.customStrategyColumn=S;exports.strategyColumn=q;exports.strategyLeverageColumn=j;exports.strategyRewardsColumn=_;
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"),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 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),f=require("react"),a=require("../../../utils/cn.cjs");function d(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const m=d(f),c=m.forwardRef(({children:e,aside:r,asidePosition:t="right",asideClassName:n,className:i,...o},u)=>{const s=r==null?null:l.jsx("aside",{className:a.cn("min-w-0 shrink-0",n),children:r});return l.jsxs("div",{ref:u,className:a.cn("flex w-full flex-col-reverse gap-6 lg:flex-row lg:items-start",i),...o,children:[t==="left"&&s,l.jsx("div",{className:"min-w-0 flex-1",children:e}),t==="right"&&s]})});c.displayName="MainAsideLayout";exports.MainAsideLayout=c;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),w=require("react"),r=require("../../../utils/cn.cjs");function g(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const l in e)if(l!=="default"){const n=Object.getOwnPropertyDescriptor(e,l);Object.defineProperty(t,l,n.get?n:{enumerable:!0,get:()=>e[l]})}}return t.default=e,Object.freeze(t)}const d=g(w),m=d.forwardRef(({children:e,aside:t,asidePosition:l="right",asideClassName:n,mainClassName:c,mainRef:o,variant:s="default",className:p,...u},f)=>{const a=s==="detail",x=t==null?null:i.jsx("aside",{className:r.cn("min-w-0 shrink-0",a&&["w-full","z-30 lg:w-[420px] lg:min-w-[420px] lg:max-w-[420px]","xl:w-[460px] xl:min-w-[460px] xl:max-w-[460px]","max-h-full lg:max-h-[100vh] overflow-y-visible lg:overflow-y-auto","lg:max-[2449px]:sticky lg:max-[2449px]:top-4","min-[2450px]:fixed min-[2450px]:top-28 min-[2450px]:right-32"],n),children:t});return i.jsxs("div",{ref:f,className:r.cn("flex w-full flex-col-reverse gap-6 lg:flex-row lg:items-start",a&&["relative mx-auto min-w-0","max-w-[calc(80rem+420px+1.5rem)]","xl:max-w-[calc(80rem+460px+1.5rem)]","min-[2450px]:block min-[2450px]:max-w-none min-[2450px]:gap-0"],p),...u,children:[l==="left"&&x,i.jsx("div",{ref:o,className:r.cn("min-w-0 flex-1",a&&["relative z-0 w-full","min-[2450px]:mx-auto min-[2450px]:flex-none","min-[2450px]:max-w-[min(80rem,calc(100vw-460px-8rem))]"],c),children:e}),l==="right"&&x]})});m.displayName="MainAsideLayout";exports.MainAsideLayout=m;
@@ -5,9 +5,9 @@ import { ShortString as w } from "../../short-string/short-string.js";
5
5
  import { TokenSymbol as b } from "../../token-symbol/token-symbol.js";
6
6
  import { FormattedMessageTyped as n } from "../../typed-intl/index.js";
7
7
  import { Typography as y } from "../../typography/typography.js";
8
- import { RWAFeature as T, ZeroSlippageFeature as R, StrategiesRewardsCell as v } from "./components/cells/cells.js";
9
- import { TitleGrid as x, DisabledWrap as g } from "./components/cells/cells.styles.js";
10
- import { RewardsTooltip as k } from "./components/rewards-tooltip/rewards-tooltip.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";
@@ -46,7 +46,7 @@ function m(e, i, r) {
46
46
  }
47
47
  function S({ ctx: e }) {
48
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(x, { children: [
49
+ return /* @__PURE__ */ t("div", { className: "flex flex-col-auto", children: /* @__PURE__ */ o(v, { children: [
50
50
  /* @__PURE__ */ o("div", { className: "flex items-center gap-1.5 pr-2 leading-none", children: [
51
51
  /* @__PURE__ */ t(g, { disabled: d, children: /* @__PURE__ */ t(
52
52
  u,
@@ -87,7 +87,7 @@ function h({
87
87
  mobile: i = !1
88
88
  }) {
89
89
  const { rewardsCellInfo: r, row: a, targetTokenAddress: d, tokensList: s } = e, l = !!a.disabledStyle, c = /* @__PURE__ */ t(
90
- v,
90
+ k,
91
91
  {
92
92
  maxAPY: r.maxAPY,
93
93
  bonusAPY: r.bonusAPY,
@@ -103,11 +103,11 @@ function h({
103
103
  }
104
104
  ), p = i ? /* @__PURE__ */ t("div", { className: "pt-1", children: c }) : c;
105
105
  return l ? p : /* @__PURE__ */ t(
106
- k,
106
+ x,
107
107
  {
108
108
  cellInfo: r,
109
109
  targetToken: d,
110
- apyList: a.apyList,
110
+ apyListByNetwork: a.apyListByNetwork,
111
111
  tokensList: s,
112
112
  strategyCreditManagers: a.strategyCreditManagers,
113
113
  children: /* @__PURE__ */ t("div", { children: p })
@@ -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,35 +1,83 @@
1
- import { jsx as s, jsxs as f } from "react/jsx-runtime";
2
- import * as c from "react";
3
- import { cn as a } from "../../../utils/cn.js";
4
- const d = c.forwardRef(
1
+ import { jsx as i, jsxs as c } from "react/jsx-runtime";
2
+ import * as g from "react";
3
+ import { cn as x } from "../../../utils/cn.js";
4
+ const u = g.forwardRef(
5
5
  ({
6
- children: i,
7
- aside: e,
8
- asidePosition: l = "right",
9
- asideClassName: t,
10
- className: m,
11
- ...o
12
- }, n) => {
13
- const r = e == null ? null : /* @__PURE__ */ s("aside", { className: a("min-w-0 shrink-0", t), children: e });
14
- return /* @__PURE__ */ f(
6
+ children: r,
7
+ aside: m,
8
+ asidePosition: e = "right",
9
+ asideClassName: n,
10
+ mainClassName: p,
11
+ mainRef: t,
12
+ variant: o = "default",
13
+ className: s,
14
+ ...w
15
+ }, f) => {
16
+ const l = o === "detail", a = m == null ? null : /* @__PURE__ */ i(
17
+ "aside",
18
+ {
19
+ className: x(
20
+ "min-w-0 shrink-0",
21
+ l && [
22
+ "w-full",
23
+ "z-30 lg:w-[420px] lg:min-w-[420px] lg:max-w-[420px]",
24
+ "xl:w-[460px] xl:min-w-[460px] xl:max-w-[460px]",
25
+ "max-h-full lg:max-h-[100vh] overflow-y-visible lg:overflow-y-auto",
26
+ // sticky below 2450px, fixed at ≥2450px
27
+ "lg:max-[2449px]:sticky lg:max-[2449px]:top-4",
28
+ "min-[2450px]:fixed min-[2450px]:top-28 min-[2450px]:right-32"
29
+ ],
30
+ n
31
+ ),
32
+ children: m
33
+ }
34
+ );
35
+ return /* @__PURE__ */ c(
15
36
  "div",
16
37
  {
17
- ref: n,
18
- className: a(
38
+ ref: f,
39
+ className: x(
40
+ // base: mobile stack (column-reverse), desktop row
19
41
  "flex w-full flex-col-reverse gap-6 lg:flex-row lg:items-start",
20
- m
42
+ l && [
43
+ "relative mx-auto min-w-0",
44
+ // cap width so aside doesn't overflow on medium-wide screens
45
+ "max-w-[calc(80rem+420px+1.5rem)]",
46
+ "xl:max-w-[calc(80rem+460px+1.5rem)]",
47
+ // at ≥2450px aside is fixed → switch wrapper to block so main can
48
+ // centre independently
49
+ "min-[2450px]:block min-[2450px]:max-w-none min-[2450px]:gap-0"
50
+ ],
51
+ s
21
52
  ),
22
- ...o,
53
+ ...w,
23
54
  children: [
24
- l === "left" && r,
25
- /* @__PURE__ */ s("div", { className: "min-w-0 flex-1", children: i }),
26
- l === "right" && r
55
+ e === "left" && a,
56
+ /* @__PURE__ */ i(
57
+ "div",
58
+ {
59
+ ref: t,
60
+ className: x(
61
+ "min-w-0 flex-1",
62
+ l && [
63
+ "relative z-0 w-full",
64
+ // at ≥2450px: stop growing and centre with explicit max-width
65
+ // (leaves room for the fixed 460px aside + 8rem right offset)
66
+ "min-[2450px]:mx-auto min-[2450px]:flex-none",
67
+ "min-[2450px]:max-w-[min(80rem,calc(100vw-460px-8rem))]"
68
+ ],
69
+ p
70
+ ),
71
+ children: r
72
+ }
73
+ ),
74
+ e === "right" && a
27
75
  ]
28
76
  }
29
77
  );
30
78
  }
31
79
  );
32
- d.displayName = "MainAsideLayout";
80
+ u.displayName = "MainAsideLayout";
33
81
  export {
34
- d as MainAsideLayout
82
+ u as MainAsideLayout
35
83
  };