sui-explorer-local
Version:
Local Sui Explorer
6 lines (5 loc) • 4.93 kB
JavaScript
import{j as r}from"./jsx-runtime-ffb262ed.js";import{Q as a,S as u}from"./index-d4ae957a.js";import{c as p}from"./clsx-0839fdbe.js";import{I as f}from"./Image-6fadc8fe.js";import{u as _}from"./useFormatCoin-9f4b7ba7.js";import{Q as x}from"./queryClient-3963a3bf.js";import"./index-76fb7be0.js";import"./_commonjsHelpers-de833af9.js";import"./index-d5a566d3.js";import"./extends-98964cd2.js";import"./index-da07a199.js";import"./index-dca19ccf.js";import"./SVGVisualElement-4900b852.js";import"./use-unmount-effect-01fa1bae.js";import"./LoadingIndicator-8720c7eb.js";import"./index-71a27fc6.js";const g=e=>r.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 21 26",...e,children:r.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M16.276 10.844a7.75 7.75 0 0 1 1.695 4.848 7.804 7.804 0 0 1-1.743 4.905l-.094.116-.024-.147a7.138 7.138 0 0 0-.075-.377c-.545-2.395-2.322-4.45-5.245-6.112-1.974-1.12-3.104-2.469-3.4-4.001-.193-.99-.05-1.986.225-2.839.276-.852.685-1.566 1.033-1.995L9.785 3.85a.5.5 0 0 1 .772 0l5.72 6.993Zm1.8-1.39L10.452.134a.364.364 0 0 0-.564 0l-7.622 9.32-.025.031A10.102 10.102 0 0 0 0 15.845C0 21.455 4.554 26 10.17 26c5.618 0 10.172-4.546 10.172-10.154 0-2.408-.84-4.62-2.242-6.36l-.025-.032ZM4.09 10.814l.682-.835.02.155c.016.121.036.244.06.367.44 2.315 2.017 4.245 4.651 5.74 2.29 1.303 3.624 2.801 4.008 4.445.16.686.189 1.361.12 1.951l-.004.037-.034.016a7.778 7.778 0 0 1-3.423.789c-4.308 0-7.8-3.487-7.8-7.787 0-1.847.644-3.543 1.72-4.878Z",clipRule:"evenodd"})}),h=g;try{Sui.displayName="Sui",Sui.__docgenInfo={description:"",displayName:"Sui",props:{}}}catch{}const y=e=>r.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 16 16",...e,children:[r.jsx("g",{clipPath:"url(#unstaked_svg__a)",children:r.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M14.5 4c0 .23-.226.843-1.514 1.487C11.787 6.087 10.026 6.5 8 6.5c-2.027 0-3.787-.414-4.986-1.013C1.726 4.843 1.5 4.23 1.5 4c0-.23.226-.843 1.514-1.487C4.213 1.914 5.974 1.5 8 1.5c2.027 0 3.787.414 4.986 1.013C14.274 3.157 14.5 3.77 14.5 4Zm-.81 2.812C12.24 7.545 10.226 8 8 8c-2.226 0-4.24-.455-5.69-1.188-.673.478-.81.89-.81 1.07 0 .23.226.843 1.514 1.487 1.199.6 2.96 1.013 4.986 1.013 2.027 0 3.787-.414 4.986-1.013 1.288-.644 1.514-1.256 1.514-1.487 0-.18-.137-.592-.81-1.07Zm1.306-.87C15.636 5.365 16 4.703 16 4c0-2.21-3.582-4-8-4S0 1.79 0 4c0 .707.366 1.37 1.01 1.946L1 5.944c-.637.574-1 1.235-1 1.938 0 .717.377 1.389 1.036 1.97L1 9.844c-.637.575-1 1.235-1 1.938 0 2.21 3.582 4 8 4s8-1.79 8-4c0-.708-.368-1.373-1.013-1.95C15.632 9.255 16 8.59 16 7.882c0-.704-.364-1.366-1.004-1.94ZM8 11.881c2.219 0 4.226-.451 5.675-1.18.686.482.825.9.825 1.08 0 .23-.226.843-1.514 1.487-1.199.6-2.96 1.013-4.986 1.013-2.027 0-3.787-.414-4.986-1.013-1.288-.644-1.514-1.256-1.514-1.487 0-.18.14-.598.825-1.08 1.449.729 3.456 1.18 5.675 1.18Z",clipRule:"evenodd"})}),r.jsx("defs",{children:r.jsx("clipPath",{id:"unstaked_svg__a",children:r.jsx("path",{fill:"#fff",d:"M0 0h16v16H0z"})})})]}),S=y;try{Unstaked.displayName="Unstaked",Unstaked.__docgenInfo={description:"",displayName:"Unstaked",props:{}}}catch{}function j({coinMetadata:e}){return(e==null?void 0:e.symbol)==="SUI"?r.jsx(h,{className:"h-2.5 w-2.5"}):e!=null&&e.iconUrl?r.jsx(f,{rounded:"full",alt:e==null?void 0:e.description,src:e==null?void 0:e.iconUrl}):r.jsx(S,{className:"h-2.5 w-2.5"})}function n({type:e}){const{data:s}=_(e),{symbol:i,iconUrl:m}=s||{};return r.jsx("span",{className:p("relative flex h-5 w-5 items-center justify-center rounded-xl text-white",(!s||i!=="SUI")&&"bg-gradient-to-r from-gradient-blue-start to-gradient-blue-end",i==="SUI"&&"bg-sui",m&&"bg-gray-40"),children:r.jsx(j,{coinMetadata:s})})}function t({coinTypes:e}){return r.jsx("div",{className:"flex",children:e.map((s,i)=>r.jsx("div",{className:p(i!==0&&"-ml-1"),children:r.jsx(n,{type:s})},i))})}try{n.displayName="Coin",n.__docgenInfo={description:"",displayName:"Coin",props:{type:{defaultValue:null,description:"",name:"type",required:!0,type:{name:"string"}}}}}catch{}try{t.displayName="CoinsStack",t.__docgenInfo={description:"",displayName:"CoinsStack",props:{coinTypes:{defaultValue:null,description:"",name:"coinTypes",required:!0,type:{name:"string[]"}}}}}catch{}const D={component:t,decorators:[e=>r.jsx(a,{client:new x,children:r.jsx(u,{children:r.jsx(e,{})})})]},o={args:{coinTypes:["0x2::sui::SUI","0xc0d761079b1e7fa4dbd8a881b7464cf8c400c0de72460fdf8ca44e3f1842715e::sui_inu::SUI_INU","random"]}};var c,l,d;o.parameters={...o.parameters,docs:{...(c=o.parameters)==null?void 0:c.docs,source:{originalSource:`{
args: {
coinTypes: ['0x2::sui::SUI', '0xc0d761079b1e7fa4dbd8a881b7464cf8c400c0de72460fdf8ca44e3f1842715e::sui_inu::SUI_INU', 'random']
}
}`,...(d=(l=o.parameters)==null?void 0:l.docs)==null?void 0:d.source}}};const E=["Default"];export{o as Default,E as __namedExportsOrder,D as default};