@gearbox-protocol/permissionless-ui 1.22.0-next.28 → 1.22.0-next.29

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.
Files changed (26) hide show
  1. package/dist/cjs/components/assets-list-cell/assets-list-cell.cjs +1 -1
  2. package/dist/cjs/components/grid-td-cell/grid-td-cell.cjs +1 -1
  3. package/dist/cjs/components/layout/footer/footer.cjs +1 -1
  4. package/dist/cjs/components/layout/header/header.cjs +1 -1
  5. package/dist/cjs/components/network-icon/network-icon.cjs +1 -1
  6. package/dist/cjs/components/pool-apy-tooltip/pool-apy-tooltip.cjs +1 -1
  7. package/dist/cjs/components/table/grid-table.cjs +1 -1
  8. package/dist/cjs/components/table/table-sm.cjs +1 -1
  9. package/dist/cjs/components/table/table.cjs +1 -1
  10. package/dist/esm/components/assets-list-cell/assets-list-cell.js +99 -24
  11. package/dist/esm/components/grid-td-cell/grid-td-cell.js +5 -5
  12. package/dist/esm/components/layout/footer/footer.js +1 -1
  13. package/dist/esm/components/layout/header/header.js +16 -16
  14. package/dist/esm/components/network-icon/network-icon.js +58 -38
  15. package/dist/esm/components/pool-apy-tooltip/pool-apy-tooltip.js +72 -46
  16. package/dist/esm/components/table/grid-table.js +101 -84
  17. package/dist/esm/components/table/table-sm.js +9 -9
  18. package/dist/esm/components/table/table.js +4 -4
  19. package/dist/globals.css +1 -1
  20. package/dist/types/components/assets-list-cell/assets-list-cell.d.ts +70 -6
  21. package/dist/types/components/network-icon/network-icon.d.ts +8 -1
  22. package/dist/types/components/pool-apy-tooltip/pool-apy-tooltip.d.ts +27 -1
  23. package/dist/types/components/table/grid-table.d.ts +4 -0
  24. package/dist/types/components/typed-intl/index.d.ts +0 -2
  25. package/dist/types/utils/network-icons.d.ts +3 -1
  26. package/package.json +6 -6
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),c=require("lucide-react");require("../buttons/back-button/back-button.cjs");const a=require("../buttons/button/button.cjs");require("../buttons/copy-button/copy-button.cjs");require("../buttons/external-button/external-button.cjs");require("../buttons/filter-button/filter-button.cjs");require("../buttons/navigation-button/navigation-button.cjs");require("react");const l=require("../../utils/cn.cjs");require("sonner");require("@gearbox-protocol/sdk");require("../buttons/tab-button/tab-button.cjs");const d=require("../token-icon/token-icon.cjs");function m({assetAddress:n,symbol:s,iconSymbol:i,comment:t,explorerUrl:r,iconSize:o=24,className:u}){return e.jsxs("div",{className:l.cn("flex items-center gap-3",u),children:[e.jsx(d.TokenIcon,{symbol:i??s,size:o}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("div",{className:"font-medium",children:s}),t&&e.jsxs("div",{className:"text-md text-muted-foreground",children:["(",t,")"]}),r&&e.jsx(a.Button,{variant:"ghost",size:"sm",className:"text-muted-foreground hover:text-foreground p-0 h-auto",onClick:()=>window.open(`${r}/address/${n}`,"_blank"),children:e.jsx(c.ExternalLink,{className:"h-3 w-3"})})]})]})}exports.AssetsListCell=m;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),N=require("lucide-react"),_=require("react");require("../buttons/back-button/back-button.cjs");const I=require("../buttons/button/button.cjs");require("../buttons/copy-button/copy-button.cjs");require("../buttons/external-button/external-button.cjs");require("../buttons/filter-button/filter-button.cjs");require("../buttons/navigation-button/navigation-button.cjs");const j=require("../../utils/cn.cjs");require("sonner");require("@gearbox-protocol/sdk");require("../buttons/tab-button/tab-button.cjs");const b=require("../token-icon/token-icon.cjs"),r=require("../tooltip/tooltip.cjs");function M(t){return"balances"in t&&t.balances!==void 0}function A({assetAddress:t,symbol:s,iconSymbol:i,comment:n,explorerUrl:a,iconSize:m=24,className:g}){return e.jsxs("div",{className:j.cn("flex items-center gap-3",g),children:[e.jsx(b.TokenIcon,{symbol:i??s,size:m}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("div",{className:"font-medium",children:s}),n&&e.jsxs("div",{className:"text-md text-muted-foreground",children:["(",n,")"]}),a&&e.jsx(I.Button,{variant:"ghost",size:"sm",className:"text-muted-foreground hover:text-foreground p-0 h-auto",onClick:()=>window.open(`${a}/address/${t}`,"_blank"),children:e.jsx(N.ExternalLink,{className:"h-3 w-3"})})]})]})}function R({balances:t,tokensList:s,maxAssets:i=3,iconSize:n=24,options:a,className:m}){const{mode:g="default",showIconTooltip:q=!0,otherTooltip:T,onOtherClick:v}=a||{},f=g==="cascade",[y,k,C,w]=_.useMemo(()=>{const o=t,l=o.slice(0,i),c=o.slice(i),h=c.map(d=>{const x=typeof d=="string"?d:d.token;return s[x]?.title||s[x]?.symbol||"unknown"}).join(", "),u=o.length>i;return[l,c,h,u]},[t,i,s]);return e.jsx(r.TooltipProvider,{children:e.jsxs("div",{className:j.cn("relative inline-flex items-center",m),children:[y.map((o,l,c)=>{const h=typeof o=="string"?o:o.token,u=s[h],d=l===c.length-1,x=f?c.length-l:void 0,p=e.jsx(b.TokenIcon,{symbol:u?.symbol,size:n});return e.jsx("div",{className:"flex-shrink-0",style:{zIndex:x,marginRight:d?0:f?-Math.round(n*.5):4},children:q?e.jsxs(r.Tooltip,{children:[e.jsx(r.TooltipTrigger,{asChild:!0,children:e.jsx("span",{children:p})}),e.jsx(r.TooltipContent,{children:u?.title||u?.symbol||"unknown"})]}):p},h??l)}),w&&e.jsxs(r.Tooltip,{children:[e.jsx(r.TooltipTrigger,{asChild:!0,children:e.jsx("button",{type:"button",onClick:v,className:j.cn("inline-flex items-center justify-center rounded-full shrink-0","cursor-pointer","bg-gray-50 hover:bg-gray-70 text-foreground transition-colors","ml-1!"),style:{width:n,height:n,minWidth:n,minHeight:n,zIndex:0},children:e.jsxs("span",{className:"text-[10px]! leading-[10px] font-medium",children:["+",k.length]})})}),e.jsx(r.TooltipContent,{children:T||C})]})]})})}function O(t){return M(t)?e.jsx(R,{...t}):e.jsx(A,{...t})}exports.AssetsListCell=O;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime");require("react");const u=require("../../utils/cn.cjs");require("sonner");require("@gearbox-protocol/sdk");function n({children:e,className:r,...i}){return t.jsx("td",{className:u.cn("px-3 py-2",r),...i,children:e})}exports.GridTDCell=n;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime");require("react");const u=require("../../utils/cn.cjs");require("sonner");require("@gearbox-protocol/sdk");function l({children:e,className:r,...i}){return t.jsx("td",{className:u.cn("px-3 py-2 align-middle",r),...i,children:e})}exports.GridTDCell=l;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),g=require("react"),n=require("../../../utils/cn.cjs"),b=require("../app-logo/app-logo.cjs"),v=require("../legal-disclaimer/legal-disclaimer.cjs");function N(r){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const t in r)if(t!=="default"){const l=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(s,t,l.get?l:{enumerable:!0,get:()=>r[t]})}}return s.default=r,Object.freeze(s)}const c=N(g),d=c.forwardRef(({logo:r,copyright:s,social:t,version:l,secondaryInfo:i,legalLinks:a,containerClassName:u,className:m,children:f,mobileExtraContent:j,...p},h)=>e.jsx("footer",{ref:h,className:n.cn("relative w-full border-t bg-card border-border flex items-center justify-center",m),...p,children:e.jsxs("div",{className:n.cn("flex flex-col sm:flex-row sm:flex-nowrap justify-between items-center sm:items-start gap-4 sm:gap-0 py-6 w-full px-4 max-w-[1440px]",u),children:[e.jsxs("div",{className:"text-center sm:text-left text-sm text-muted-foreground w-full sm:w-auto",children:[r&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"flex justify-center sm:justify-start",children:r}),e.jsx("div",{className:"h-2"})]}),s&&e.jsx("div",{children:s}),e.jsx("div",{className:"mt-4 flex flex-col items-center justify-center gap-2 sm:hidden",children:j})]}),e.jsxs("div",{className:"w-full sm:w-auto",children:[t&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"flex items-center justify-center sm:justify-end gap-2.5",children:t}),e.jsx("div",{className:"h-3"})]}),e.jsxs("div",{className:"flex flex-wrap items-center justify-center sm:justify-end gap-2 text-sm text-muted-foreground",children:[l&&e.jsx("span",{children:l}),i&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"h-1 w-1 rounded-full bg-muted-foreground/30"}),i]}),a&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"h-1 w-1 rounded-full bg-muted-foreground/30"}),a]})]})]}),f]})}));d.displayName="Footer";function x({href:r,text:s,external:t=!1}){return e.jsx("a",{href:r,className:"text-muted-foreground hover:text-foreground transition-colors duration-200 text-sm",target:t?"_blank":void 0,rel:t?"noopener noreferrer":void 0,children:s})}function o({title:r,links:s}){return e.jsxs("div",{className:"flex flex-col gap-1 md:items-end",children:[e.jsx("h3",{className:"text-foreground",children:r}),e.jsx("div",{className:"flex flex-wrap gap-4",children:s.map((t,l)=>e.jsxs(c.Fragment,{children:[e.jsx(x,{...t}),l<s.length-1&&e.jsx("span",{className:"text-muted-foreground text-sm",children:"•"})]},t.href))})]})}function y({appName:r,legalAppName:s,legalReferences:t,className:l,mobileStatusContent:i}){return e.jsx("footer",{className:n.cn("relative w-full border-t bg-card border-border flex items-center justify-center",l),children:e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 items-top py-6 w-full px-4 max-w-[1440px]",children:[e.jsxs("div",{className:"flex flex-col gap-4 h-full justify-between",children:[e.jsx(b.AppLogo,{appName:r}),e.jsx(v.LegalDisclaimer,{appName:s,hrefs:t})]}),e.jsxs("div",{className:"flex flex-col gap-4 h-full justify-between",children:[e.jsx(o,{title:"Legal",links:[{href:t.termsOfService,text:"Terms of Service"},{href:t.privacyNotice,text:"Privacy Notice"},{href:t.riskDisclosure,text:"Risk Disclosure"}]}),e.jsx(o,{title:"Developers",links:[{href:"https://docs.gearbox.fi/gearbox-permissionless-doc",text:"Documentation",external:!0},{href:"https://docs.gearbox.finance/risk-and-security/audits-bug-bounty",text:"Audits",external:!0},{href:"https://github.com/Gearbox-protocol",text:"GitHub",external:!0}]})]}),i&&e.jsx("div",{className:"flex md:hidden w-full",children:i})]})})}exports.Footer=d;exports.FooterLink=x;exports.FooterLinkSection=o;exports.GearboxFooter=y;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),g=require("react"),n=require("../../../utils/cn.cjs"),b=require("../app-logo/app-logo.cjs"),v=require("../legal-disclaimer/legal-disclaimer.cjs");function N(r){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const t in r)if(t!=="default"){const l=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(s,t,l.get?l:{enumerable:!0,get:()=>r[t]})}}return s.default=r,Object.freeze(s)}const c=N(g),d=c.forwardRef(({logo:r,copyright:s,social:t,version:l,secondaryInfo:i,legalLinks:a,containerClassName:u,className:f,children:m,mobileExtraContent:j,...p},h)=>e.jsx("footer",{ref:h,className:n.cn("relative w-full border-t bg-card border-border flex items-center justify-center",f),...p,children:e.jsxs("div",{className:n.cn("flex flex-col sm:flex-row sm:flex-nowrap justify-between items-center sm:items-start gap-4 sm:gap-0 py-6 w-full px-4",u),children:[e.jsxs("div",{className:"text-center sm:text-left text-sm text-muted-foreground w-full sm:w-auto",children:[r&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"flex justify-center sm:justify-start",children:r}),e.jsx("div",{className:"h-2"})]}),s&&e.jsx("div",{children:s}),e.jsx("div",{className:"mt-4 flex flex-col items-center justify-center gap-2 sm:hidden",children:j})]}),e.jsxs("div",{className:"w-full sm:w-auto",children:[t&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"flex items-center justify-center sm:justify-end gap-2.5",children:t}),e.jsx("div",{className:"h-3"})]}),e.jsxs("div",{className:"flex flex-wrap items-center justify-center sm:justify-end gap-2 text-sm text-muted-foreground",children:[l&&e.jsx("span",{children:l}),i&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"h-1 w-1 rounded-full bg-muted-foreground/30"}),i]}),a&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"h-1 w-1 rounded-full bg-muted-foreground/30"}),a]})]})]}),m]})}));d.displayName="Footer";function x({href:r,text:s,external:t=!1}){return e.jsx("a",{href:r,className:"text-muted-foreground hover:text-foreground transition-colors duration-200 text-sm",target:t?"_blank":void 0,rel:t?"noopener noreferrer":void 0,children:s})}function o({title:r,links:s}){return e.jsxs("div",{className:"flex flex-col gap-1 md:items-end",children:[e.jsx("h3",{className:"text-foreground",children:r}),e.jsx("div",{className:"flex flex-wrap gap-4",children:s.map((t,l)=>e.jsxs(c.Fragment,{children:[e.jsx(x,{...t}),l<s.length-1&&e.jsx("span",{className:"text-muted-foreground text-sm",children:"•"})]},t.href))})]})}function y({appName:r,legalAppName:s,legalReferences:t,className:l,mobileStatusContent:i}){return e.jsx("footer",{className:n.cn("relative w-full border-t bg-card border-border flex items-center justify-center",l),children:e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 items-top py-6 w-full px-4 max-w-[1440px]",children:[e.jsxs("div",{className:"flex flex-col gap-4 h-full justify-between",children:[e.jsx(b.AppLogo,{appName:r}),e.jsx(v.LegalDisclaimer,{appName:s,hrefs:t})]}),e.jsxs("div",{className:"flex flex-col gap-4 h-full justify-between",children:[e.jsx(o,{title:"Legal",links:[{href:t.termsOfService,text:"Terms of Service"},{href:t.privacyNotice,text:"Privacy Notice"},{href:t.riskDisclosure,text:"Risk Disclosure"}]}),e.jsx(o,{title:"Developers",links:[{href:"https://docs.gearbox.fi/gearbox-permissionless-doc",text:"Documentation",external:!0},{href:"https://docs.gearbox.finance/risk-and-security/audits-bug-bounty",text:"Audits",external:!0},{href:"https://github.com/Gearbox-protocol",text:"GitHub",external:!0}]})]}),i&&e.jsx("div",{className:"flex md:hidden w-full",children:i})]})})}exports.Footer=d;exports.FooterLink=x;exports.FooterLinkSection=o;exports.GearboxFooter=y;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),u=require("lucide-react"),j=require("react"),o=require("../../../utils/cn.cjs");function g(e){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const l=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(s,t,l.get?l:{enumerable:!0,get:()=>e[t]})}}return s.default=e,Object.freeze(s)}const d=g(j),i=d.createContext(null);function N(){const e=d.useContext(i);if(!e)throw new Error("useMobileMenu must be used within Header component");return e}const f=d.forwardRef(({navigation:e,logo:s,actions:t,fixed:l=!1,sticky:x=!1,containerClassName:m,className:b,children:w,mobileMenuContent:c,...p},h)=>{const[n,a]=d.useState(!1);return r.jsxs("header",{ref:h,className:o.cn("relative w-full bg-background h-18 border-b flex flex-nowrap items-center border-border",l&&"fixed top-0 left-0 right-0 z-50",x&&"sticky top-0 z-50",b),"data-fixed":l?"true":void 0,...p,children:[r.jsxs("div",{className:o.cn("w-full h-full flex items-stretch justify-between mx-auto px-4 sm:px-6 lg:px-8 max-w-[1440px]",m),children:[s&&r.jsx("div",{className:"flex items-center",children:s}),e&&r.jsx("div",{className:"hidden md:flex items-center",children:e}),r.jsxs("div",{className:"flex items-center gap-1 sm:gap-2",children:[t&&r.jsx("div",{className:"hidden md:flex items-center gap-2",children:t}),(e||c||t)&&r.jsx("button",{type:"button",className:"md:hidden flex items-center justify-center p-2 rounded-md hover:bg-secondary hover:text-accent-foreground focus:outline-none cursor-pointer",onClick:()=>a(!n),"aria-label":n?"Close menu":"Open menu",children:n?r.jsx(u.X,{className:"h-6 w-6"}):r.jsx(u.Menu,{className:"h-6 w-6"})})]})]}),n&&(e||c||t)&&r.jsx(i.Provider,{value:{closeMobileMenu:()=>a(!1)},children:r.jsx("div",{className:"absolute top-full left-0 right-0 bg-background border-b border-border md:hidden z-40 shadow-lg",children:r.jsxs("div",{className:"flex flex-col px-4 sm:px-6 py-4 space-y-2",children:[c||e,t&&r.jsx("div",{className:o.cn("flex flex-col gap-2",(c||e)&&"pt-4 border-t border-border mt-4"),children:t})]})})})]})});f.displayName="Header";exports.Header=f;exports.useMobileMenu=N;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),u=require("lucide-react"),j=require("react"),a=require("../../../utils/cn.cjs");function g(e){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const l=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(s,t,l.get?l:{enumerable:!0,get:()=>e[t]})}}return s.default=e,Object.freeze(s)}const d=g(j),i=d.createContext(null);function N(){const e=d.useContext(i);if(!e)throw new Error("useMobileMenu must be used within Header component");return e}const f=d.forwardRef(({navigation:e,logo:s,actions:t,fixed:l=!1,sticky:m=!1,containerClassName:x,className:p,children:y,mobileMenuContent:c,...b},h)=>{const[n,o]=d.useState(!1);return r.jsxs("header",{ref:h,className:a.cn("relative w-full bg-background h-18 flex flex-nowrap items-center",l&&"fixed top-0 left-0 right-0 z-50",m&&"sticky top-0 z-50",p),"data-fixed":l?"true":void 0,...b,children:[r.jsxs("div",{className:a.cn("w-full h-full flex items-stretch justify-between mx-auto px-4 sm:px-6 lg:px-8",x),children:[s&&r.jsx("div",{className:"flex items-center",children:s}),e&&r.jsx("div",{className:"hidden md:flex items-center",children:e}),r.jsxs("div",{className:"flex items-center gap-1 sm:gap-2",children:[t&&r.jsx("div",{className:"hidden md:flex items-center gap-2",children:t}),(e||c||t)&&r.jsx("button",{type:"button",className:"md:hidden flex items-center justify-center p-2 rounded-md hover:bg-secondary hover:text-accent-foreground focus:outline-none cursor-pointer",onClick:()=>o(!n),"aria-label":n?"Close menu":"Open menu",children:n?r.jsx(u.X,{className:"h-6 w-6"}):r.jsx(u.Menu,{className:"h-6 w-6"})})]})]}),n&&(e||c||t)&&r.jsx(i.Provider,{value:{closeMobileMenu:()=>o(!1)},children:r.jsx("div",{className:"absolute top-full left-0 right-0 bg-background border-b border-border md:hidden z-40 shadow-lg",children:r.jsxs("div",{className:"flex flex-col px-4 sm:px-6 py-4 space-y-2",children:[c||e,t&&r.jsx("div",{className:a.cn("flex flex-col gap-2",(c||e)&&"pt-4 border-t border-border mt-4"),children:t})]})})})]})});f.displayName="Header";exports.Header=f;exports.useMobileMenu=N;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("react/jsx-runtime"),n=require("react"),b=require("../../utils/cn.cjs"),l=require("../../utils/static.cjs"),c=l.getStatic("/chains/allnetworks.svg"),d=new Set;function u(t){if(!t)return c;const e=t.toLowerCase(),r=l.getStatic(`/chains/${e}.svg`);return d.has(r)?c:r}function m({network:t,size:e=20,className:r}){const f=u(t),[o,a]=n.useState(f),[g,i]=n.useState(!1),s=n.useRef(!1);n.useEffect(()=>{const w=u(t);a(w),i(!1),s.current=!1},[t]);const h=()=>{s.current||(s.current=!0,d.add(o),a(c))},S=()=>{i(!0)};return L.jsx("img",{src:o,alt:"",width:e,height:e,className:b.cn("object-contain shrink-0",!g&&"bg-gray-200 dark:bg-gray-700 rounded-full",r),style:{width:e,height:e},onError:h,onLoad:S})}exports.NetworkIcon=m;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),o=require("react"),c=require("../tooltip/tooltip.cjs"),f=require("../../utils/cn.cjs"),l=require("../../utils/static.cjs"),a=l.getStatic("/chains/allnetworks.svg"),p=new Set;function j(e){if(!e)return a;const r=e.toLowerCase(),n=l.getStatic(`/chains/${r}.svg`);return p.has(n)?a:n}function y({network:e,size:r=20,isTest:n,suffixSize:s=12,showTooltip:m,rounded:w,className:N}){const S=j(e),[d,u]=o.useState(S),[x,h]=o.useState(!1),i=o.useRef(!1);o.useEffect(()=>{const v=j(e);u(v),h(!1),i.current=!1},[e]);const T=()=>{i.current||(i.current=!0,p.add(d),u(a))},b=()=>{h(!0)},g=()=>t.jsxs("span",{className:f.cn("relative inline-flex shrink-0",N),children:[t.jsx("img",{src:d,alt:"",width:r,height:r,className:f.cn("object-contain shrink-0",w&&"rounded-full",!x&&"bg-gray-200 dark:bg-gray-700 rounded-full"),style:{width:r,height:r},onError:T,onLoad:b}),n&&t.jsx("span",{className:"absolute -top-1.5 -right-0.5",children:t.jsx("img",{src:l.getStatic("/chains/test.svg"),alt:"test",width:s,height:s,style:{width:s,height:s}})})]});return m?t.jsx(c.TooltipProvider,{children:t.jsxs(c.Tooltip,{children:[t.jsx(c.TooltipTrigger,{asChild:!0,children:g()}),t.jsxs(c.TooltipContent,{children:["Network: ",e]})]})}):g()}exports.NetworkIcon=y;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),d=require("../tooltip/tooltip.cjs");function m({children:i,totalAPY:l,extraAPYTotal:r,loading7DAgo:c,loading:j,baseAPY:n,extraAPY:t,apy7DAgo:a,tokensList:x,className:p}){if(!(l!==void 0||n?.length||t?.length)||j)return e.jsx("span",{className:p,children:i});const u=typeof a=="object"?a?.value:a;return e.jsx(d.TooltipProvider,{children:e.jsxs(d.Tooltip,{children:[e.jsx(d.TooltipTrigger,{asChild:!0,children:e.jsx("span",{className:p,children:i})}),e.jsx(d.TooltipContent,{className:"max-w-xs",children:e.jsxs("div",{className:"space-y-2 text-sm",children:[n&&n.length>0&&e.jsxs("div",{children:[e.jsx("div",{className:"font-medium text-muted-foreground mb-1",children:"Base APY"}),n.map((s,o)=>e.jsxs("div",{className:"flex justify-between gap-4",children:[e.jsx("span",{children:s.type==="supplyAPY"?"Supply":s.type||"Base"}),e.jsxs("span",{className:"tabular-nums",children:[s.apy.toFixed(2),"%"]})]},`base-${s.type||o}-${s.apy}`))]}),t&&t.length>0&&e.jsxs("div",{children:[e.jsx("div",{className:"font-medium text-muted-foreground mb-1",children:"Rewards"}),t.map((s,o)=>{const h=s.token&&x?x[s.token]?.symbol:s.token;return e.jsxs("div",{className:"flex justify-between gap-4",children:[e.jsx("span",{children:h||s.type||"Reward"}),e.jsxs("span",{className:"tabular-nums",children:[s.apy.toFixed(2),"%"]})]},`extra-${s.token||o}-${s.apy}`)}),r!==void 0&&e.jsxs("div",{className:"flex justify-between gap-4 text-muted-foreground",children:[e.jsx("span",{children:"Total Extra"}),e.jsxs("span",{className:"tabular-nums",children:[r.toFixed(2),"%"]})]})]}),l!==void 0&&e.jsxs("div",{className:"border-t pt-2 flex justify-between gap-4 font-medium",children:[e.jsx("span",{children:"Total APY"}),e.jsxs("span",{className:"tabular-nums",children:[l.toFixed(2),"%"]})]}),u!==void 0&&!c&&e.jsxs("div",{className:"text-xs text-muted-foreground",children:["7d ago: ",u.toFixed(2),"%"]}),c&&e.jsx("div",{className:"text-xs text-muted-foreground",children:"Loading 7d data..."})]})})]})})}exports.PoolAPYTooltip=m;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),l=require("../tooltip/tooltip.cjs");function v({children:c,totalAPY:i,extraAPYTotal:x,loading7DAgo:u,loading:h,baseAPY:a,extraAPY:t,points:d,apy7DAgo:r,externalAPY:o,tokensList:m,className:j}){if(!(i!==void 0||a?.length||t?.length||d?.length)||h)return e.jsx("span",{className:j,children:c});const p=typeof r=="object"?r?.value:r;return e.jsx(l.TooltipProvider,{children:e.jsxs(l.Tooltip,{children:[e.jsx(l.TooltipTrigger,{asChild:!0,children:e.jsx("span",{className:j,children:c})}),e.jsx(l.TooltipContent,{className:"max-w-xs",children:e.jsxs("div",{className:"space-y-2 text-sm",children:[a&&a.length>0&&e.jsxs("div",{children:[e.jsx("div",{className:"font-medium text-muted-foreground mb-1",children:"Base APY"}),a.map((s,n)=>e.jsxs("div",{className:"flex justify-between gap-4",children:[e.jsx("span",{children:s.type==="supplyAPY"?"Supply":s.type||"Base"}),e.jsxs("span",{className:"tabular-nums",children:[s.apy.toFixed(2),"%"]})]},`base-${s.type||n}-${s.apy}`))]}),t&&t.length>0&&e.jsxs("div",{children:[e.jsx("div",{className:"font-medium text-muted-foreground mb-1",children:"Rewards"}),t.map((s,n)=>{const f=s.token&&m?m[s.token]?.symbol:s.token;return e.jsxs("div",{className:"flex justify-between gap-4",children:[e.jsx("span",{children:f||s.type||"Reward"}),e.jsxs("span",{className:"tabular-nums",children:[s.apy.toFixed(2),"%"]})]},`extra-${s.token||n}-${s.apy}`)}),x!==void 0&&e.jsxs("div",{className:"flex justify-between gap-4 text-muted-foreground",children:[e.jsx("span",{children:"Total Extra"}),e.jsxs("span",{className:"tabular-nums",children:[x.toFixed(2),"%"]})]})]}),o&&e.jsxs("div",{children:[e.jsx("div",{className:"font-medium text-muted-foreground mb-1",children:"External"}),e.jsxs("div",{className:"flex justify-between gap-4",children:[e.jsx("span",{children:o.name}),e.jsxs("span",{className:"tabular-nums",children:[o.apy.toFixed(2),"%"]})]})]}),d&&d.length>0&&e.jsxs("div",{children:[e.jsx("div",{className:"font-medium text-muted-foreground mb-1",children:"Points"}),d.map((s,n)=>e.jsxs("div",{className:"flex justify-between gap-4",children:[e.jsx("span",{children:s.name}),e.jsx("span",{className:"tabular-nums",children:s.amount})]},`point-${s.name}-${n}`))]}),i!==void 0&&e.jsxs("div",{className:"border-t pt-2 flex justify-between gap-4 font-medium",children:[e.jsx("span",{children:"Total APY"}),e.jsxs("span",{className:"tabular-nums",children:[i.toFixed(2),"%"]})]}),p!==void 0&&!u&&e.jsxs("div",{className:"text-xs text-muted-foreground",children:["7d ago: ",p.toFixed(2),"%"]}),u&&e.jsx("div",{className:"text-xs text-muted-foreground",children:"Loading 7d data..."})]})})]})})}exports.PoolAPYTooltip=v;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),u=require("class-variance-authority"),B=require("react"),h=require("../layout/col/col.cjs"),j=require("../layout/grid/grid.cjs"),s=require("../../utils/cn.cjs");function F(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(a,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return a.default=e,Object.freeze(a)}const l=F(B),v=u.cva("w-full",{variants:{size:{sm:"text-xs",default:"text-sm",lg:"text-base"}},defaultVariants:{size:"default"}}),N=l.forwardRef(({className:e,size:a,cols:t=12,gap:r=0,...d},o)=>i.jsx("div",{className:"relative w-full overflow-auto",children:i.jsx(j.Grid,{ref:o,cols:t,gap:r,className:s.cn(v({size:a,className:e})),...d})}));N.displayName="GridTable";const w=l.forwardRef(({className:e,...a},t)=>i.jsx("div",{ref:t,className:s.cn("contents","[&>*>*]:after:absolute [&>*>*]:after:bottom-0 [&>*>*]:after:inset-x-0 [&>*>*]:after:h-px [&>*>*]:after:bg-border","hover:[&>*>*]:before:!opacity-0",e),...a}));w.displayName="GridTableHeader";const V=l.forwardRef(({className:e,...a},t)=>i.jsx("div",{ref:t,className:s.cn("contents [&>*:last-child>*]:after:hidden",e),...a}));V.displayName="GridTableBody";const _=l.forwardRef(({className:e,...a},t)=>i.jsx("div",{ref:t,className:s.cn("contents [&>*]:border-t [&>*]:bg-muted/50 [&>*]:font-medium",e),...a}));_.displayName="GridTableFooter";const z=l.forwardRef(({className:e,cols:a,gap:t=0,last:r,height:d,hideValue:o,noHover:q,noRound:g,onRowClick:c,style:p,children:y,...x},T)=>{const f=typeof d=="number"?`${d}px`:d,O=l.useCallback(n=>{!c||n.target.closest("a, button, input, select, textarea, [role='button']")||c(n)},[c]),D=l.useCallback(n=>{if(c&&(n.key==="Enter"||n.key===" ")){if(n.preventDefault(),n.target.closest("a, button, input, select, textarea, [role='button']"))return;c(n)}},[c]),G=s.cn("[&>*]:relative [&>*]:transition-colors data-[state=selected]:[&>*]:bg-muted","md:[&>*]:after:absolute md:[&>*]:after:bottom-0 md:[&>*]:after:inset-x-0 md:[&>*]:after:h-px md:[&>*]:after:bg-border",!g&&["md:[&>*:first-child]:after:left-3","md:[&>*:last-child]:after:right-3"],!q&&["[&>*]:z-0","[&>*]:before:absolute [&>*]:before:inset-0 [&>*]:before:-z-10 [&>*]:before:bg-muted/50 [&>*]:before:opacity-0 [&>*]:before:transition-opacity","hover:[&>*]:before:opacity-100",!g&&"[&>*:first-child]:before:rounded-l-lg [&>*:last-child]:before:rounded-r-lg"],r&&"md:[&>*]:after:hidden",o&&"[&>*]:opacity-0");return c?i.jsx("div",{ref:T,role:"row",tabIndex:0,className:s.cn("grid grid-cols-subgrid col-span-full",G,"cursor-pointer",e),style:{...p,...f?{height:f}:{}},onClick:O,onKeyDown:D,...x,children:y}):i.jsx(j.Grid,{ref:T,cols:a,gap:t,className:s.cn("contents",G,e),style:{...p,...f?{height:f}:{}},...x,children:y})});z.displayName="GridTableRow";const C=u.cva("flex items-center justify-startborder-b text-left align-middle font-medium text-muted-foreground !bg-transparent",{variants:{size:{sm:"min-h-8 px-1 py-2 text-xs",default:"min-h-10 px-2 py-2.5",lg:"min-h-12 px-4 py-3"},justify:{start:"justify-start",center:"justify-center",end:"justify-end"}},defaultVariants:{size:"default",justify:"start"}}),b=l.forwardRef(({className:e,size:a,span:t=1,justify:r="start",...d},o)=>i.jsx(h.Col,{ref:o,span:t,className:s.cn(C({size:a,justify:r,className:e})),...d}));b.displayName="GridTableHead";const H=u.cva("align-middle",{variants:{size:{sm:"p-2",default:"p-4",lg:"p-6"},textAlign:{left:"text-left",center:"text-center",right:"text-right"}},defaultVariants:{size:"default"}}),m=l.forwardRef(({className:e,size:a,span:t=1,textAlign:r,...d},o)=>i.jsx(h.Col,{ref:o,span:t,className:s.cn(H({size:a,textAlign:r,className:e})),...d}));m.displayName="GridTableCell";const R=l.forwardRef(({className:e,...a},t)=>i.jsx("div",{ref:t,className:s.cn("col-span-full mt-4 text-sm text-muted-foreground",e),...a}));R.displayName="GridTableCaption";const P=m,A=b;exports.GridTable=N;exports.GridTableBody=V;exports.GridTableCaption=R;exports.GridTableCell=m;exports.GridTableFooter=_;exports.GridTableHead=b;exports.GridTableHeader=w;exports.GridTableRow=z;exports.Td=P;exports.Th=A;exports.gridTableCellVariants=H;exports.gridTableHeadVariants=C;exports.gridTableVariants=v;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),b=require("class-variance-authority"),S=require("react"),h=require("../layout/col/col.cjs"),v=require("../layout/grid/grid.cjs"),s=require("../../utils/cn.cjs");function A(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(a,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return a.default=e,Object.freeze(a)}const l=A(S),N=b.cva("w-full",{variants:{size:{sm:"text-xs",default:"text-sm",lg:"text-base"}},defaultVariants:{size:"default"}}),w=l.forwardRef(({className:e,size:a,cols:t=12,gap:r=0,...n},d)=>i.jsx("div",{className:"relative w-full overflow-auto",children:i.jsx(v.Grid,{ref:d,cols:t,gap:r,className:s.cn(N({size:a,className:e})),...n})}));w.displayName="GridTable";const V=l.forwardRef(({className:e,...a},t)=>i.jsx("div",{ref:t,className:s.cn("contents","[&>*>*]:after:absolute [&>*>*]:after:bottom-0 [&>*>*]:after:inset-x-0 [&>*>*]:after:h-px [&>*>*]:after:bg-border","hover:[&>*>*]:before:!opacity-0",e),...a}));V.displayName="GridTableHeader";const _=l.forwardRef(({className:e,...a},t)=>i.jsx("div",{ref:t,className:s.cn("contents [&>*:last-child>*]:after:hidden",e),...a}));_.displayName="GridTableBody";const z=l.forwardRef(({className:e,...a},t)=>i.jsx("div",{ref:t,className:s.cn("contents [&>*]:border-t [&>*]:bg-muted/50 [&>*]:font-medium",e),...a}));z.displayName="GridTableFooter";const C=l.forwardRef(({className:e,cols:a,gap:t=0,last:r,height:n,hideValue:d,noHover:f,noRound:g,onRowClick:c,style:y,children:x,...T},G)=>{const u=typeof n=="number"?`${n}px`:n,q=l.useCallback(o=>{!c||o.target.closest("a, button, input, select, textarea, [role='button']")||c(o)},[c]),O=l.useCallback(o=>{if(c&&(o.key==="Enter"||o.key===" ")){if(o.preventDefault(),o.target.closest("a, button, input, select, textarea, [role='button']"))return;c(o)}},[c]),j=s.cn("[&>*]:relative [&>*]:transition-colors data-[state=selected]:[&>*]:bg-muted","md:[&>*]:after:absolute md:[&>*]:after:bottom-0 md:[&>*]:after:inset-x-0 md:[&>*]:after:h-px md:[&>*]:after:bg-border",!g&&["md:[&>*:first-child]:after:left-3","md:[&>*:last-child]:after:right-3"],!f&&["[&>*]:z-0","[&>*]:before:absolute [&>*]:before:inset-0 [&>*]:before:-z-10 [&>*]:before:bg-muted/50 [&>*]:before:opacity-0 [&>*]:before:transition-opacity","hover:[&>*]:before:opacity-100",!g&&"[&>*:first-child]:before:rounded-l-lg [&>*:last-child]:before:rounded-r-lg"],r&&"md:[&>*]:after:hidden",d&&"[&>*]:opacity-0");return c?i.jsx("div",{ref:G,role:"row",tabIndex:0,className:s.cn("grid grid-cols-subgrid col-span-full",j,"cursor-pointer",e),style:{...y,...u?{height:u}:{}},onClick:q,onKeyDown:O,...T,children:x}):i.jsx(v.Grid,{ref:G,cols:a,gap:t,className:s.cn("contents",j,e),style:{...y,...u?{height:u}:{}},...T,children:x})});C.displayName="GridTableRow";const H=b.cva("flex items-center justify-start text-left align-middle font-medium text-muted-foreground !bg-transparent",{variants:{size:{sm:"min-h-8 px-1 py-2 text-xs",default:"min-h-10 px-2 py-2.5",lg:"min-h-12 px-4 py-3"},justify:{start:"justify-start",center:"justify-center",end:"justify-end"},gapBefore:{sm:"pl-5",md:"pl-10",none:""}},defaultVariants:{size:"default",justify:"start",gapBefore:"none"}}),m=l.forwardRef(({className:e,size:a,span:t=1,justify:r="start",gapBefore:n,...d},f)=>i.jsx(h.Col,{ref:f,span:t,className:s.cn(H({size:a,justify:r,gapBefore:n,className:e})),...d}));m.displayName="GridTableHead";const B=b.cva("flex items-center align-middle",{variants:{size:{sm:"p-2",default:"p-4",lg:"p-6"},textAlign:{left:"text-left justify-start",center:"text-center justify-center",right:"text-right justify-end"},gapBefore:{sm:"pl-5",md:"pl-10",none:""}},defaultVariants:{size:"default",textAlign:"left",gapBefore:"none"}}),p=l.forwardRef(({className:e,size:a,span:t=1,textAlign:r,gapBefore:n,...d},f)=>i.jsx(h.Col,{ref:f,span:t,className:s.cn(B({size:a,textAlign:r,gapBefore:n,className:e})),...d}));p.displayName="GridTableCell";const R=l.forwardRef(({className:e,...a},t)=>i.jsx("div",{ref:t,className:s.cn("col-span-full mt-4 text-sm text-muted-foreground",e),...a}));R.displayName="GridTableCaption";const F=p,P=m;exports.GridTable=w;exports.GridTableBody=_;exports.GridTableCaption=R;exports.GridTableCell=p;exports.GridTableFooter=z;exports.GridTableHead=m;exports.GridTableHeader=V;exports.GridTableRow=C;exports.Td=F;exports.Th=P;exports.gridTableCellVariants=B;exports.gridTableHeadVariants=H;exports.gridTableVariants=N;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime");require("react");const n=require("../../utils/cn.cjs");require("sonner");require("@gearbox-protocol/sdk");function g({title:s,className:l,children:r,...c}){return e.jsxs("div",{className:n.cn("flex flex-col gap-1",l),...c,children:[s&&e.jsx("div",{className:"text-xs text-muted-foreground font-medium",children:s}),e.jsx("div",{className:"text-sm",children:r})]})}function b({title:s,columnsXs:l=1,columnsSm:r,columnsMd:c,columns:m,className:t,children:a,...u}){const i=l,d=r??i,o=c??d,x=m??o;return e.jsxs("div",{className:n.cn("flex flex-col gap-3 py-3 px-0 md:px-4 border-b border-border",t),...u,children:[s&&e.jsx("div",{className:"font-medium mb-2",children:s}),e.jsx("div",{className:"grid gap-2 md:gap-4 table-sm-grid",style:{"--grid-cols-xs":i,"--grid-cols-sm":d,"--grid-cols-md":o,"--grid-cols-lg":x},children:a})]})}exports.TableCellSm=g;exports.TableLineSm=b;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime");require("react");const n=require("../../utils/cn.cjs");require("sonner");require("@gearbox-protocol/sdk");function g({title:s,className:l,children:r,...c}){return e.jsxs("div",{className:n.cn("flex flex-col gap-1",l),...c,children:[s&&e.jsx("div",{className:"text-xs text-muted-foreground font-medium uppercase",children:s}),e.jsx("div",{className:"text-sm",children:r})]})}function b({title:s,columnsXs:l=1,columnsSm:r,columnsMd:c,columns:m,className:t,children:a,...u}){const i=l,d=r??i,o=c??d,x=m??o;return e.jsxs("div",{className:n.cn("flex flex-col gap-3 py-3 px-0 md:px-4 border-b border-border",t),...u,children:[s&&e.jsx("div",{className:"font-medium mb-2",children:s}),e.jsx("div",{className:"grid gap-2 md:gap-4 table-sm-grid",style:{"--grid-cols-xs":i,"--grid-cols-sm":d,"--grid-cols-md":o,"--grid-cols-lg":x},children:a})]})}exports.TableCellSm=g;exports.TableLineSm=b;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),i=require("class-variance-authority"),_=require("lucide-react"),C=require("react"),H=require("../buttons/button/button.cjs"),n=require("../tooltip/tooltip.cjs"),s=require("../../utils/cn.cjs");require("sonner");require("@gearbox-protocol/sdk");function V(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(a,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return a.default=e,Object.freeze(a)}const l=V(C),c=i.cva("w-full caption-bottom",{variants:{size:{sm:"text-xs",default:"text-sm",lg:"text-base"}},defaultVariants:{size:"default"}}),b=l.forwardRef(({className:e,size:a,...t},o)=>r.jsx("div",{className:"relative w-full overflow-auto rounded-lg border border-input bg-card",children:r.jsx("table",{ref:o,className:s.cn(c({size:a,className:e})),...t})}));b.displayName="Table";const f=l.forwardRef(({className:e,...a},t)=>r.jsx("thead",{ref:t,className:s.cn("[&_tr]:after:inset-x-0 [&_tr]:after:bg-input [&_tr]:hover:bg-transparent [&_tr]:hover:before:opacity-0",e),...a}));f.displayName="TableHeader";const u=l.forwardRef(({className:e,...a},t)=>r.jsx("tbody",{ref:t,className:s.cn("[&_tr:last-child]:after:hidden",e),...a}));u.displayName="TableBody";const m=l.forwardRef(({className:e,...a},t)=>r.jsx("tfoot",{ref:t,className:s.cn("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...a}));m.displayName="TableFooter";const p=l.forwardRef(({className:e,...a},t)=>r.jsx("tr",{ref:t,className:s.cn("relative transition-colors data-[state=selected]:bg-muted","before:absolute before:inset-0 before:-z-10 before:rounded-lg before:bg-muted/50 before:opacity-0 before:transition-opacity","hover:before:opacity-100","after:absolute after:bottom-0 after:inset-x-3 after:h-px after:bg-border",e),...a}));p.displayName="TableRow";const x=i.cva("border-b bg-muted/50 text-left align-middle font-medium text-muted-foreground border-input",{variants:{size:{sm:"h-8 px-1 text-xs",default:"h-10 px-2",lg:"h-12 px-4"}},defaultVariants:{size:"default"}}),d=l.forwardRef(({className:e,size:a,...t},o)=>r.jsx("th",{ref:o,className:s.cn(x({size:a,className:e})),...t}));d.displayName="TableHead";const g=i.cva("align-middle",{variants:{size:{sm:"p-1",default:"p-2",lg:"p-4"}},defaultVariants:{size:"default"}}),T=l.forwardRef(({className:e,size:a,...t},o)=>r.jsx("td",{ref:o,className:s.cn(g({size:a,className:e})),...t}));T.displayName="TableCell";const y=l.forwardRef(({className:e,...a},t)=>r.jsx("caption",{ref:t,className:s.cn("mt-4 text-sm text-muted-foreground",e),...a}));y.displayName="TableCaption";const h=l.forwardRef(({title:e,isSorted:a,direction:t,setSort:o,placement:j="right",children:v,className:w,...N},R)=>r.jsx(d,{ref:R,className:w,...N,children:r.jsx(n.TooltipProvider,{children:r.jsxs(n.Tooltip,{delayDuration:200,children:[r.jsx(n.TooltipTrigger,{asChild:!0,children:r.jsxs("div",{className:s.cn("group flex items-center gap-1 w-fit cursor-pointer hover:text-foreground",j==="left"?"flex-row-reverse":"flex-row"),onClick:()=>o(t==="asc"?"desc":"asc"),children:[v,r.jsx(H.Button,{variant:"text",size:"auto",className:a?void 0:"opacity-0 group-hover:opacity-100",children:r.jsx(_.ArrowDown,{className:s.cn("h-4 w-4",t==="desc"?"rotate-180":"","transition-transform duration-200 ease-in-out")})})]})}),r.jsxs(n.TooltipContent,{side:"top",children:["Sort by ",e]})]})})}));h.displayName="SortingTableHead";exports.SortingTableHead=h;exports.Table=b;exports.TableBody=u;exports.TableCaption=y;exports.TableCell=T;exports.TableFooter=m;exports.TableHead=d;exports.TableHeader=f;exports.TableRow=p;exports.tableCellVariants=g;exports.tableHeadVariants=x;exports.tableVariants=c;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),i=require("class-variance-authority"),_=require("lucide-react"),C=require("react"),H=require("../buttons/button/button.cjs"),n=require("../tooltip/tooltip.cjs"),s=require("../../utils/cn.cjs");require("sonner");require("@gearbox-protocol/sdk");function V(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(a,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return a.default=e,Object.freeze(a)}const l=V(C),c=i.cva("w-full caption-bottom",{variants:{size:{sm:"text-xs",default:"text-sm",lg:"text-base"}},defaultVariants:{size:"default"}}),b=l.forwardRef(({className:e,size:a,...t},o)=>r.jsx("div",{className:"relative w-full overflow-auto rounded-lg border border-input bg-card",children:r.jsx("table",{ref:o,className:s.cn(c({size:a,className:e})),...t})}));b.displayName="Table";const f=l.forwardRef(({className:e,...a},t)=>r.jsx("thead",{ref:t,className:s.cn("[&_tr]:after:inset-x-0 [&_tr]:after:bg-input [&_tr]:hover:bg-transparent [&_tr]:hover:before:opacity-0",e),...a}));f.displayName="TableHeader";const u=l.forwardRef(({className:e,...a},t)=>r.jsx("tbody",{ref:t,className:s.cn("[&_tr:last-child]:after:hidden",e),...a}));u.displayName="TableBody";const m=l.forwardRef(({className:e,...a},t)=>r.jsx("tfoot",{ref:t,className:s.cn("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...a}));m.displayName="TableFooter";const p=l.forwardRef(({className:e,...a},t)=>r.jsx("tr",{ref:t,className:s.cn("relative transition-colors data-[state=selected]:bg-muted","before:absolute before:inset-0 before:-z-10 before:rounded-lg before:bg-muted/50 before:opacity-0 before:transition-opacity","hover:before:opacity-100","after:absolute after:bottom-0 after:inset-x-3 after:h-px after:bg-border",e),...a}));p.displayName="TableRow";const x=i.cva("border-b bg-muted/50 text-left align-middle font-medium text-muted-foreground border-input flex items-center",{variants:{size:{sm:"h-8 px-1 text-xs",default:"h-10 px-2",lg:"h-12 px-4"}},defaultVariants:{size:"default"}}),d=l.forwardRef(({className:e,size:a,...t},o)=>r.jsx("th",{ref:o,className:s.cn(x({size:a,className:e})),...t}));d.displayName="TableHead";const g=i.cva("align-middle flex items-center",{variants:{size:{sm:"p-1",default:"p-2",lg:"p-4"}},defaultVariants:{size:"default"}}),T=l.forwardRef(({className:e,size:a,...t},o)=>r.jsx("td",{ref:o,className:s.cn(g({size:a,className:e})),...t}));T.displayName="TableCell";const y=l.forwardRef(({className:e,...a},t)=>r.jsx("caption",{ref:t,className:s.cn("mt-4 text-sm text-muted-foreground",e),...a}));y.displayName="TableCaption";const h=l.forwardRef(({title:e,isSorted:a,direction:t,setSort:o,placement:j="right",children:v,className:w,...N},R)=>r.jsx(d,{ref:R,className:w,...N,children:r.jsx(n.TooltipProvider,{children:r.jsxs(n.Tooltip,{delayDuration:200,children:[r.jsx(n.TooltipTrigger,{asChild:!0,children:r.jsxs("div",{className:s.cn("group flex items-center gap-1 w-fit cursor-pointer hover:text-foreground",j==="left"?"flex-row-reverse":"flex-row"),onClick:()=>o(t==="asc"?"desc":"asc"),children:[v,r.jsx(H.Button,{variant:"text",size:"auto",className:a?void 0:"opacity-0 group-hover:opacity-100",children:r.jsx(_.ArrowDown,{className:s.cn("h-4 w-4",t==="desc"?"rotate-180":"","transition-transform duration-200 ease-in-out")})})]})}),r.jsxs(n.TooltipContent,{side:"top",children:["Sort by ",e]})]})})}));h.displayName="SortingTableHead";exports.SortingTableHead=h;exports.Table=b;exports.TableBody=u;exports.TableCaption=y;exports.TableCell=T;exports.TableFooter=m;exports.TableHead=d;exports.TableHeader=f;exports.TableRow=p;exports.tableCellVariants=g;exports.tableHeadVariants=x;exports.tableVariants=c;
@@ -1,48 +1,123 @@
1
- import { jsxs as e, jsx as t } from "react/jsx-runtime";
2
- import { ExternalLink as d } from "lucide-react";
1
+ import { jsx as t, jsxs as i } from "react/jsx-runtime";
2
+ import { ExternalLink as O } from "lucide-react";
3
+ import { useMemo as $ } from "react";
3
4
  import "../buttons/back-button/back-button.js";
4
- import { Button as p } from "../buttons/button/button.js";
5
+ import { Button as B } from "../buttons/button/button.js";
5
6
  import "../buttons/copy-button/copy-button.js";
6
7
  import "../buttons/external-button/external-button.js";
7
8
  import "../buttons/filter-button/filter-button.js";
8
9
  import "../buttons/navigation-button/navigation-button.js";
9
- import "react";
10
- import { cn as c } from "../../utils/cn.js";
10
+ import { cn as g } from "../../utils/cn.js";
11
11
  import "sonner";
12
12
  import "@gearbox-protocol/sdk";
13
13
  import "../buttons/tab-button/tab-button.js";
14
- import { TokenIcon as l } from "../token-icon/token-icon.js";
15
- function b({
16
- assetAddress: m,
17
- symbol: r,
14
+ import { TokenIcon as k } from "../token-icon/token-icon.js";
15
+ import { TooltipProvider as E, Tooltip as y, TooltipTrigger as b, TooltipContent as w } from "../tooltip/tooltip.js";
16
+ function H(e) {
17
+ return "balances" in e && e.balances !== void 0;
18
+ }
19
+ function P({
20
+ assetAddress: e,
21
+ symbol: o,
18
22
  iconSymbol: s,
19
- comment: o,
20
- explorerUrl: i,
21
- iconSize: n = 24,
22
- className: a
23
+ comment: n,
24
+ explorerUrl: h,
25
+ iconSize: p = 24,
26
+ className: f
23
27
  }) {
24
- return /* @__PURE__ */ e("div", { className: c("flex items-center gap-3", a), children: [
25
- /* @__PURE__ */ t(l, { symbol: s ?? r, size: n }),
26
- /* @__PURE__ */ e("div", { className: "flex items-center gap-1", children: [
27
- /* @__PURE__ */ t("div", { className: "font-medium", children: r }),
28
- o && /* @__PURE__ */ e("div", { className: "text-md text-muted-foreground", children: [
28
+ return /* @__PURE__ */ i("div", { className: g("flex items-center gap-3", f), children: [
29
+ /* @__PURE__ */ t(k, { symbol: s ?? o, size: p }),
30
+ /* @__PURE__ */ i("div", { className: "flex items-center gap-1", children: [
31
+ /* @__PURE__ */ t("div", { className: "font-medium", children: o }),
32
+ n && /* @__PURE__ */ i("div", { className: "text-md text-muted-foreground", children: [
29
33
  "(",
30
- o,
34
+ n,
31
35
  ")"
32
36
  ] }),
33
- i && /* @__PURE__ */ t(
34
- p,
37
+ h && /* @__PURE__ */ t(
38
+ B,
35
39
  {
36
40
  variant: "ghost",
37
41
  size: "sm",
38
42
  className: "text-muted-foreground hover:text-foreground p-0 h-auto",
39
- onClick: () => window.open(`${i}/address/${m}`, "_blank"),
40
- children: /* @__PURE__ */ t(d, { className: "h-3 w-3" })
43
+ onClick: () => window.open(`${h}/address/${e}`, "_blank"),
44
+ children: /* @__PURE__ */ t(O, { className: "h-3 w-3" })
41
45
  }
42
46
  )
43
47
  ] })
44
48
  ] });
45
49
  }
50
+ function R({
51
+ balances: e,
52
+ tokensList: o,
53
+ maxAssets: s = 3,
54
+ iconSize: n = 24,
55
+ options: h,
56
+ className: p
57
+ }) {
58
+ const {
59
+ mode: f = "default",
60
+ showIconTooltip: C = !0,
61
+ otherTooltip: N,
62
+ onOtherClick: T
63
+ } = h || {}, x = f === "cascade", [j, I, M, A] = $(() => {
64
+ const r = e, l = r.slice(0, s), c = r.slice(s), a = c.map((m) => {
65
+ const u = typeof m == "string" ? m : m.token;
66
+ return o[u]?.title || o[u]?.symbol || "unknown";
67
+ }).join(", "), d = r.length > s;
68
+ return [l, c, a, d];
69
+ }, [e, s, o]);
70
+ return /* @__PURE__ */ t(E, { children: /* @__PURE__ */ i("div", { className: g("relative inline-flex items-center", p), children: [
71
+ j.map((r, l, c) => {
72
+ const a = typeof r == "string" ? r : r.token, d = o[a], m = l === c.length - 1, u = x ? c.length - l : void 0, v = /* @__PURE__ */ t(k, { symbol: d?.symbol, size: n });
73
+ return /* @__PURE__ */ t(
74
+ "div",
75
+ {
76
+ className: "flex-shrink-0",
77
+ style: {
78
+ zIndex: u,
79
+ marginRight: m ? 0 : x ? -Math.round(n * 0.5) : 4
80
+ },
81
+ children: C ? /* @__PURE__ */ i(y, { children: [
82
+ /* @__PURE__ */ t(b, { asChild: !0, children: /* @__PURE__ */ t("span", { children: v }) }),
83
+ /* @__PURE__ */ t(w, { children: d?.title || d?.symbol || "unknown" })
84
+ ] }) : v
85
+ },
86
+ a ?? l
87
+ );
88
+ }),
89
+ A && /* @__PURE__ */ i(y, { children: [
90
+ /* @__PURE__ */ t(b, { asChild: !0, children: /* @__PURE__ */ t(
91
+ "button",
92
+ {
93
+ type: "button",
94
+ onClick: T,
95
+ className: g(
96
+ "inline-flex items-center justify-center rounded-full shrink-0",
97
+ "cursor-pointer",
98
+ "bg-gray-50 hover:bg-gray-70 text-foreground transition-colors",
99
+ "ml-1!"
100
+ ),
101
+ style: {
102
+ width: n,
103
+ height: n,
104
+ minWidth: n,
105
+ minHeight: n,
106
+ zIndex: 0
107
+ },
108
+ children: /* @__PURE__ */ i("span", { className: "text-[10px]! leading-[10px] font-medium", children: [
109
+ "+",
110
+ I.length
111
+ ] })
112
+ }
113
+ ) }),
114
+ /* @__PURE__ */ t(w, { children: N || M })
115
+ ] })
116
+ ] }) });
117
+ }
118
+ function Z(e) {
119
+ return H(e) ? /* @__PURE__ */ t(R, { ...e }) : /* @__PURE__ */ t(P, { ...e });
120
+ }
46
121
  export {
47
- b as AssetsListCell
122
+ Z as AssetsListCell
48
123
  };
@@ -1,11 +1,11 @@
1
- import { jsx as m } from "react/jsx-runtime";
1
+ import { jsx as o } from "react/jsx-runtime";
2
2
  import "react";
3
- import { cn as p } from "../../utils/cn.js";
3
+ import { cn as t } from "../../utils/cn.js";
4
4
  import "sonner";
5
5
  import "@gearbox-protocol/sdk";
6
- function l({ children: r, className: o, ...t }) {
7
- return /* @__PURE__ */ m("td", { className: p("px-3 py-2", o), ...t, children: r });
6
+ function a({ children: r, className: i, ...m }) {
7
+ return /* @__PURE__ */ o("td", { className: t("px-3 py-2 align-middle", i), ...m, children: r });
8
8
  }
9
9
  export {
10
- l as GridTDCell
10
+ a as GridTDCell
11
11
  };
@@ -29,7 +29,7 @@ const b = m.forwardRef(
29
29
  "div",
30
30
  {
31
31
  className: d(
32
- "flex flex-col sm:flex-row sm:flex-nowrap justify-between items-center sm:items-start gap-4 sm:gap-0 py-6 w-full px-4 max-w-[1440px]",
32
+ "flex flex-col sm:flex-row sm:flex-nowrap justify-between items-center sm:items-start gap-4 sm:gap-0 py-6 w-full px-4",
33
33
  f
34
34
  ),
35
35
  children: [
@@ -1,4 +1,4 @@
1
- import { jsxs as t, jsx as r } from "react/jsx-runtime";
1
+ import { jsxs as d, jsx as r } from "react/jsx-runtime";
2
2
  import { X as b, Menu as N } from "lucide-react";
3
3
  import * as c from "react";
4
4
  import { cn as o } from "../../../utils/cn.js";
@@ -19,56 +19,56 @@ const w = c.forwardRef(
19
19
  fixed: n = !1,
20
20
  sticky: f = !1,
21
21
  containerClassName: u,
22
- className: p,
22
+ className: h,
23
23
  children: v,
24
24
  mobileMenuContent: s,
25
- ...h
25
+ ...p
26
26
  }, x) => {
27
- const [d, i] = c.useState(!1);
28
- return /* @__PURE__ */ t(
27
+ const [t, i] = c.useState(!1);
28
+ return /* @__PURE__ */ d(
29
29
  "header",
30
30
  {
31
31
  ref: x,
32
32
  className: o(
33
- "relative w-full bg-background h-18 border-b flex flex-nowrap items-center border-border",
33
+ "relative w-full bg-background h-18 flex flex-nowrap items-center",
34
34
  n && "fixed top-0 left-0 right-0 z-50",
35
35
  f && "sticky top-0 z-50",
36
- p
36
+ h
37
37
  ),
38
38
  "data-fixed": n ? "true" : void 0,
39
- ...h,
39
+ ...p,
40
40
  children: [
41
- /* @__PURE__ */ t(
41
+ /* @__PURE__ */ d(
42
42
  "div",
43
43
  {
44
44
  className: o(
45
- "w-full h-full flex items-stretch justify-between mx-auto px-4 sm:px-6 lg:px-8 max-w-[1440px]",
45
+ "w-full h-full flex items-stretch justify-between mx-auto px-4 sm:px-6 lg:px-8",
46
46
  u
47
47
  ),
48
48
  children: [
49
49
  a && /* @__PURE__ */ r("div", { className: "flex items-center", children: a }),
50
50
  e && /* @__PURE__ */ r("div", { className: "hidden md:flex items-center", children: e }),
51
- /* @__PURE__ */ t("div", { className: "flex items-center gap-1 sm:gap-2", children: [
51
+ /* @__PURE__ */ d("div", { className: "flex items-center gap-1 sm:gap-2", children: [
52
52
  l && /* @__PURE__ */ r("div", { className: "hidden md:flex items-center gap-2", children: l }),
53
53
  (e || s || l) && /* @__PURE__ */ r(
54
54
  "button",
55
55
  {
56
56
  type: "button",
57
57
  className: "md:hidden flex items-center justify-center p-2 rounded-md hover:bg-secondary hover:text-accent-foreground focus:outline-none cursor-pointer",
58
- onClick: () => i(!d),
59
- "aria-label": d ? "Close menu" : "Open menu",
60
- children: d ? /* @__PURE__ */ r(b, { className: "h-6 w-6" }) : /* @__PURE__ */ r(N, { className: "h-6 w-6" })
58
+ onClick: () => i(!t),
59
+ "aria-label": t ? "Close menu" : "Open menu",
60
+ children: t ? /* @__PURE__ */ r(b, { className: "h-6 w-6" }) : /* @__PURE__ */ r(N, { className: "h-6 w-6" })
61
61
  }
62
62
  )
63
63
  ] })
64
64
  ]
65
65
  }
66
66
  ),
67
- d && (e || s || l) && /* @__PURE__ */ r(
67
+ t && (e || s || l) && /* @__PURE__ */ r(
68
68
  m.Provider,
69
69
  {
70
70
  value: { closeMobileMenu: () => i(!1) },
71
- children: /* @__PURE__ */ r("div", { className: "absolute top-full left-0 right-0 bg-background border-b border-border md:hidden z-40 shadow-lg", children: /* @__PURE__ */ t("div", { className: "flex flex-col px-4 sm:px-6 py-4 space-y-2", children: [
71
+ children: /* @__PURE__ */ r("div", { className: "absolute top-full left-0 right-0 bg-background border-b border-border md:hidden z-40 shadow-lg", children: /* @__PURE__ */ d("div", { className: "flex flex-col px-4 sm:px-6 py-4 space-y-2", children: [
72
72
  s || e,
73
73
  l && /* @__PURE__ */ r(
74
74
  "div",
@@ -1,49 +1,69 @@
1
- import { jsx as S } from "react/jsx-runtime";
2
- import { useState as i, useRef as p, useEffect as w } from "react";
3
- import { cn as E } from "../../utils/cn.js";
4
- import { getStatic as l } from "../../utils/static.js";
5
- const o = l("/chains/allnetworks.svg"), d = /* @__PURE__ */ new Set();
6
- function f(r) {
7
- if (!r) return o;
8
- const t = r.toLowerCase(), e = l(`/chains/${t}.svg`);
9
- return d.has(e) ? o : e;
1
+ import { jsx as e, jsxs as c } from "react/jsx-runtime";
2
+ import { useState as g, useRef as y, useEffect as E } from "react";
3
+ import { TooltipProvider as j, Tooltip as k, TooltipTrigger as S, TooltipContent as U } from "../tooltip/tooltip.js";
4
+ import { cn as f } from "../../utils/cn.js";
5
+ import { getStatic as i } from "../../utils/static.js";
6
+ const a = i("/chains/allnetworks.svg"), p = /* @__PURE__ */ new Set();
7
+ function m(t) {
8
+ if (!t) return a;
9
+ const r = t.toLowerCase(), n = i(`/chains/${r}.svg`);
10
+ return p.has(n) ? a : n;
10
11
  }
11
- function C({
12
- network: r,
13
- size: t = 20,
14
- className: e
12
+ function H({
13
+ network: t,
14
+ size: r = 20,
15
+ isTest: n,
16
+ suffixSize: o = 12,
17
+ showTooltip: w,
18
+ rounded: N,
19
+ className: L
15
20
  }) {
16
- const u = f(r), [s, c] = i(u), [h, a] = i(!1), n = p(!1);
17
- w(() => {
18
- const L = f(r);
19
- c(L), a(!1), n.current = !1;
20
- }, [r]);
21
- const g = () => {
22
- n.current || (n.current = !0, d.add(s), c(o));
23
- }, m = () => {
24
- a(!0);
25
- };
26
- return (
27
- // biome-ignore lint/performance/noImgElement: Simple img for CDN icons with browser caching
28
- /* @__PURE__ */ S(
21
+ const T = m(t), [l, d] = g(T), [v, h] = g(!1), s = y(!1);
22
+ E(() => {
23
+ const b = m(t);
24
+ d(b), h(!1), s.current = !1;
25
+ }, [t]);
26
+ const C = () => {
27
+ s.current || (s.current = !0, p.add(l), d(a));
28
+ }, I = () => {
29
+ h(!0);
30
+ }, u = () => /* @__PURE__ */ c("span", { className: f("relative inline-flex shrink-0", L), children: [
31
+ /* @__PURE__ */ e(
29
32
  "img",
30
33
  {
31
- src: s,
34
+ src: l,
32
35
  alt: "",
33
- width: t,
34
- height: t,
35
- className: E(
36
+ width: r,
37
+ height: r,
38
+ className: f(
36
39
  "object-contain shrink-0",
37
- !h && "bg-gray-200 dark:bg-gray-700 rounded-full",
38
- e
40
+ N && "rounded-full",
41
+ !v && "bg-gray-200 dark:bg-gray-700 rounded-full"
39
42
  ),
40
- style: { width: t, height: t },
41
- onError: g,
42
- onLoad: m
43
+ style: { width: r, height: r },
44
+ onError: C,
45
+ onLoad: I
43
46
  }
44
- )
45
- );
47
+ ),
48
+ n && /* @__PURE__ */ e("span", { className: "absolute -top-1.5 -right-0.5", children: /* @__PURE__ */ e(
49
+ "img",
50
+ {
51
+ src: i("/chains/test.svg"),
52
+ alt: "test",
53
+ width: o,
54
+ height: o,
55
+ style: { width: o, height: o }
56
+ }
57
+ ) })
58
+ ] });
59
+ return w ? /* @__PURE__ */ e(j, { children: /* @__PURE__ */ c(k, { children: [
60
+ /* @__PURE__ */ e(S, { asChild: !0, children: u() }),
61
+ /* @__PURE__ */ c(U, { children: [
62
+ "Network: ",
63
+ t
64
+ ] })
65
+ ] }) }) : u();
46
66
  }
47
67
  export {
48
- C as NetworkIcon
68
+ H as NetworkIcon
49
69
  };