@magiclabs/ui-components 1.36.6 → 1.36.7

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,2 +1,2 @@
1
- "use strict";var e=require("react/jsx-runtime"),d=require("../../primitives/button.js");require("../../primitives/checkbox.js"),require("../../primitives/dropdown-selector.js");var o=require("../../primitives/popover.js");require("../../primitives/radio.js"),require("../../primitives/segmented-control.js"),require("../../primitives/switch.js");var n=require("../../primitives/text.js"),p=require("@styled/css/css"),a=require("@styled/jsx"),l=require("react");const f=({avatarUrl:s,email:r,name:t,logoutLabel:c="Log out",onLogout:u})=>{const[x,i]=l.useState(!1);return l.useEffect(()=>{i(!1)},[s]),e.jsxs(o.Popover,{iconSize:28,placement:"bottom right",variant:"text",children:[e.jsx(o.Popover.LeadingIcon,{children:s&&!x?e.jsx("img",{style:{borderRadius:"50%"},src:s,alt:"user avatar",onError:()=>i(!0)}):e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",children:[e.jsx("circle",{cx:"14",cy:"14",r:"13",fill:"url(#paint0_radial_3600_63997)",stroke:"white",strokeOpacity:"0.24",strokeWidth:"0.5"}),e.jsx("defs",{children:e.jsxs("radialGradient",{id:"paint0_radial_3600_63997",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(15 30.75) rotate(-90) scale(37.3333 65.833)",children:[e.jsx("stop",{offset:"0.01",stopColor:"#FFF507"}),e.jsx("stop",{offset:"0.259381",stopColor:"#F09BEB"}),e.jsx("stop",{offset:"0.598165",stopColor:"#412CB9"}),e.jsx("stop",{offset:"1",stopColor:"#18171A"})]})})]})}),e.jsx(o.Popover.Content,{className:p.css({w:t&&r?"200px":"fit-content",maxW:"200px"}),children:e.jsxs(a.Stack,{w:"full",alignItems:"start",gap:0,children:[(r||t)&&e.jsxs(a.Stack,{w:"full",gap:1,children:[t&&e.jsx(n.default,{fontWeight:"medium",children:t}),r&&e.jsx(n.default,{size:"sm",truncate:!0,fontColor:"text.secondary",children:r})]}),(r||t)&&e.jsx(a.Divider,{color:"surface.quaternary",my:3,minW:"88px"}),e.jsx(d.default,{label:c,textStyle:"negative",variant:"text",size:"sm",onPress:u})]})})]})};exports.AccountMenu=f;
1
+ "use strict";var e=require("react/jsx-runtime"),p=require("@styled/tokens"),f=require("../../icons/ico-qrcode.js"),v=require("../../primitives/button.js");require("../../primitives/checkbox.js"),require("../../primitives/dropdown-selector.js");var i=require("../../primitives/popover.js");require("../../primitives/radio.js"),require("../../primitives/segmented-control.js"),require("../../primitives/switch.js");var n=require("../../primitives/text.js"),j=require("@styled/css/css"),s=require("@styled/jsx"),l=require("react");const g=({avatarUrl:o,email:r,name:t,showReceive:c,logoutLabel:u="Log out",onReceive:x,onLogout:d})=>{const[h,a]=l.useState(!1);return l.useEffect(()=>{a(!1)},[o]),e.jsxs(s.HStack,{alignItems:"center",children:[c?e.jsx(s.Box,{onClick:x,cursor:"pointer",children:e.jsx(f.default,{height:16,width:16,color:p.token("colors.text.secondary")})}):null,e.jsxs(i.Popover,{iconSize:28,placement:"bottom right",variant:"text",children:[e.jsx(i.Popover.LeadingIcon,{children:o&&!h?e.jsx("img",{style:{borderRadius:"50%"},src:o,alt:"user avatar",onError:()=>a(!0)}):e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",children:[e.jsx("circle",{cx:"14",cy:"14",r:"13",fill:"url(#paint0_radial_3600_63997)",stroke:"white",strokeOpacity:"0.24",strokeWidth:"0.5"}),e.jsx("defs",{children:e.jsxs("radialGradient",{id:"paint0_radial_3600_63997",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(15 30.75) rotate(-90) scale(37.3333 65.833)",children:[e.jsx("stop",{offset:"0.01",stopColor:"#FFF507"}),e.jsx("stop",{offset:"0.259381",stopColor:"#F09BEB"}),e.jsx("stop",{offset:"0.598165",stopColor:"#412CB9"}),e.jsx("stop",{offset:"1",stopColor:"#18171A"})]})})]})}),e.jsx(i.Popover.Content,{className:j.css({w:t&&r?"200px":"fit-content",maxW:"200px"}),children:e.jsxs(s.Stack,{w:"full",alignItems:"start",gap:0,children:[(r||t)&&e.jsxs(s.Stack,{w:"full",gap:1,children:[t&&e.jsx(n.default,{fontWeight:"medium",children:t}),r&&e.jsx(n.default,{size:"sm",truncate:!0,fontColor:"text.secondary",children:r})]}),(r||t)&&e.jsx(s.Divider,{color:"surface.quaternary",my:3,minW:"88px"}),e.jsx(v.default,{label:u,textStyle:"negative",variant:"text",size:"sm",onPress:d})]})})]})]})};exports.AccountMenu=g;
2
2
  //# sourceMappingURL=account-menu.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"account-menu.js","sources":["../../../../../src/components/layouts/wallet-page/account-menu.tsx"],"sourcesContent":["import { Button, Popover, Text } from '@components/primitives';\nimport { css } from '@styled/css/css';\nimport { Divider, Stack } from '@styled/jsx';\nimport { useEffect, useState } from 'react';\n\nexport interface AccountMenuProps {\n avatarUrl?: string;\n email?: string;\n name?: string;\n logoutLabel?: string;\n onLogout?: () => void;\n}\n\nexport const AccountMenu = ({ avatarUrl, email, name, logoutLabel = 'Log out', onLogout }: AccountMenuProps) => {\n const [error, setError] = useState(false);\n\n useEffect(() => {\n setError(false);\n }, [avatarUrl]);\n\n return (\n <Popover iconSize={28} placement=\"bottom right\" variant=\"text\">\n <Popover.LeadingIcon>\n {avatarUrl && !error ? (\n <img style={{ borderRadius: '50%' }} src={avatarUrl} alt=\"user avatar\" onError={() => setError(true)} />\n ) : (\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"28\" height=\"28\" viewBox=\"0 0 28 28\" fill=\"none\">\n <circle\n cx=\"14\"\n cy=\"14\"\n r=\"13\"\n fill=\"url(#paint0_radial_3600_63997)\"\n stroke=\"white\"\n strokeOpacity=\"0.24\"\n strokeWidth=\"0.5\"\n />\n <defs>\n <radialGradient\n id=\"paint0_radial_3600_63997\"\n cx=\"0\"\n cy=\"0\"\n r=\"1\"\n gradientUnits=\"userSpaceOnUse\"\n gradientTransform=\"translate(15 30.75) rotate(-90) scale(37.3333 65.833)\"\n >\n <stop offset=\"0.01\" stopColor=\"#FFF507\" />\n <stop offset=\"0.259381\" stopColor=\"#F09BEB\" />\n <stop offset=\"0.598165\" stopColor=\"#412CB9\" />\n <stop offset=\"1\" stopColor=\"#18171A\" />\n </radialGradient>\n </defs>\n </svg>\n )}\n </Popover.LeadingIcon>\n <Popover.Content className={css({ w: name && email ? '200px' : 'fit-content', maxW: '200px' })}>\n <Stack w=\"full\" alignItems=\"start\" gap={0}>\n {(email || name) && (\n <Stack w=\"full\" gap={1}>\n {name && <Text fontWeight=\"medium\">{name}</Text>}\n {email && (\n <Text size=\"sm\" truncate fontColor=\"text.secondary\">\n {email}\n </Text>\n )}\n </Stack>\n )}\n {(email || name) && <Divider color=\"surface.quaternary\" my={3} minW=\"88px\" />}\n <Button label={logoutLabel} textStyle=\"negative\" variant=\"text\" size=\"sm\" onPress={onLogout} />\n </Stack>\n </Popover.Content>\n </Popover>\n );\n};\n"],"names":["AccountMenu","avatarUrl","email","name","logoutLabel","onLogout","error","setError","useState","useEffect","_jsxs","Popover","_jsx","css","Stack","Text","Divider","Button"],"mappings":"6cAaa,MAAAA,EAAc,CAAC,CAAE,UAAAC,EAAW,MAAAC,EAAO,KAAAC,EAAM,YAAAC,EAAc,UAAW,SAAAC,CAAQ,IAAwB,CAC7G,KAAM,CAACC,EAAOC,CAAQ,EAAIC,EAAAA,SAAS,EAAK,EAExC,OAAAC,YAAU,IAAK,CACbF,EAAS,EAAK,CAChB,EAAG,CAACN,CAAS,CAAC,EAGZS,EAAAA,KAACC,UAAQ,CAAA,SAAU,GAAI,UAAU,eAAe,QAAQ,iBACtDC,EAACD,IAAAA,EAAAA,QAAQ,sBACNV,GAAa,CAACK,EACbM,EAAAA,IAAA,MAAA,CAAK,MAAO,CAAE,aAAc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1EJ,EAAAA,IAACK,EAAAA,SAAO,MAAOb,EAAa,UAAU,WAAW,QAAQ,OAAO,KAAK,KAAK,QAASC,CAAQ,CAAA,CAAI,GAEjF,CAAA,CAAA,CAAA,CAAA,CAGxB"}
1
+ {"version":3,"file":"account-menu.js","sources":["../../../../../src/components/layouts/wallet-page/account-menu.tsx"],"sourcesContent":["import { IcoQrcode } from '@components/icons';\nimport { Button, Popover, Text } from '@components/primitives';\nimport { css } from '@styled/css/css';\nimport { Box, Divider, HStack, Stack } from '@styled/jsx';\nimport { token } from '@styled/tokens';\nimport { useEffect, useState } from 'react';\n\nexport interface AccountMenuProps {\n avatarUrl?: string;\n email?: string;\n name?: string;\n logoutLabel?: string;\n showReceive?: boolean;\n onReceive?: () => void;\n onLogout?: () => void;\n}\n\nexport const AccountMenu = ({\n avatarUrl,\n email,\n name,\n showReceive,\n logoutLabel = 'Log out',\n onReceive,\n onLogout,\n}: AccountMenuProps) => {\n const [error, setError] = useState(false);\n\n useEffect(() => {\n setError(false);\n }, [avatarUrl]);\n\n return (\n <HStack alignItems={'center'}>\n {showReceive ? (\n <Box onClick={onReceive} cursor=\"pointer\">\n <IcoQrcode height={16} width={16} color={token('colors.text.secondary')} />\n </Box>\n ) : null}\n <Popover iconSize={28} placement=\"bottom right\" variant=\"text\">\n <Popover.LeadingIcon>\n {avatarUrl && !error ? (\n <img style={{ borderRadius: '50%' }} src={avatarUrl} alt=\"user avatar\" onError={() => setError(true)} />\n ) : (\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"28\" height=\"28\" viewBox=\"0 0 28 28\" fill=\"none\">\n <circle\n cx=\"14\"\n cy=\"14\"\n r=\"13\"\n fill=\"url(#paint0_radial_3600_63997)\"\n stroke=\"white\"\n strokeOpacity=\"0.24\"\n strokeWidth=\"0.5\"\n />\n <defs>\n <radialGradient\n id=\"paint0_radial_3600_63997\"\n cx=\"0\"\n cy=\"0\"\n r=\"1\"\n gradientUnits=\"userSpaceOnUse\"\n gradientTransform=\"translate(15 30.75) rotate(-90) scale(37.3333 65.833)\"\n >\n <stop offset=\"0.01\" stopColor=\"#FFF507\" />\n <stop offset=\"0.259381\" stopColor=\"#F09BEB\" />\n <stop offset=\"0.598165\" stopColor=\"#412CB9\" />\n <stop offset=\"1\" stopColor=\"#18171A\" />\n </radialGradient>\n </defs>\n </svg>\n )}\n </Popover.LeadingIcon>\n <Popover.Content className={css({ w: name && email ? '200px' : 'fit-content', maxW: '200px' })}>\n <Stack w=\"full\" alignItems=\"start\" gap={0}>\n {(email || name) && (\n <Stack w=\"full\" gap={1}>\n {name && <Text fontWeight=\"medium\">{name}</Text>}\n {email && (\n <Text size=\"sm\" truncate fontColor=\"text.secondary\">\n {email}\n </Text>\n )}\n </Stack>\n )}\n {(email || name) && <Divider color=\"surface.quaternary\" my={3} minW=\"88px\" />}\n <Button label={logoutLabel} textStyle=\"negative\" variant=\"text\" size=\"sm\" onPress={onLogout} />\n </Stack>\n </Popover.Content>\n </Popover>\n </HStack>\n );\n};\n"],"names":["AccountMenu","avatarUrl","email","name","showReceive","logoutLabel","onReceive","onLogout","error","setError","useState","useEffect","_jsxs","HStack","_jsx","Box","IcoQrcode","token","Popover","css","Stack","Text","Divider","Button"],"mappings":"ghBAiBa,MAAAA,EAAc,CAAC,CAC1B,UAAAC,EACA,MAAAC,EACA,KAAAC,EACA,YAAAC,EACA,YAAAC,EAAc,UACd,UAAAC,EACA,SAAAC,CACiB,IAAI,CACrB,KAAM,CAACC,EAAOC,CAAQ,EAAIC,WAAS,EAAK,EAExC,OAAAC,EAAU,UAAA,IAAK,CACbF,EAAS,EAAK,CAChB,EAAG,CAACR,CAAS,CAAC,EAGZW,EAAAA,KAACC,EAAAA,QAAO,WAAY,SACjB,SAAA,CAAAT,EACCU,MAACC,OAAI,QAAST,EAAW,OAAO,UAAS,SACvCQ,EAAAA,IAACE,EAAS,QAAA,CAAC,OAAQ,GAAI,MAAO,GAAI,MAAOC,EAAAA,MAAM,uBAAuB,CAAC,CAAA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KAAK,KAAK,YAAS,UAAU,iBAChC,SAAAnB,GAEJ,CAAA,CAAA,GAGHA,GAASC,IAASW,EAAAA,IAACQ,EAAAA,QAAQ,CAAA,MAAM,qBAAqB,GAAI,EAAG,KAAK,MAAS,CAAA,EAC7ER,EAAAA,IAACS,UAAM,CAAC,MAAOlB,EAAa,UAAU,WAAW,QAAQ,OAAO,KAAK,KAAK,QAASE,CAAY,CAAA,CAAA,CAAA,CAAA,GAEjF,CACV,CAAA,CAAA,CAAA,CAAA,CAGhB"}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("react/jsx-runtime");require("@styled/tokens");var u=require("../../icons/ico-arrow-down.js"),A=require("../../icons/ico-paper-plane.js"),x=require("../../icons/ico-qrcode.js");require("../../sections/verify-pincode.js");var i=require("../../sections/wallet-actions.js");require("../../sections/wallet-navigation.js");const v=({actionBox:s,buyLabel:n="Buy",buyDisabledLabel:o,sendLabel:c="Send",sendDisabledLabel:t,receiveLabel:d="Receive",receiveDisabledLabel:b,onBuy:l,onSend:a,onReceive:r})=>e.jsxs(i.WalletActions,{actionBox:s,children:[l&&e.jsx(i.WalletActions.Action,{disabledLabel:o,label:n,onPress:l,children:e.jsx(u.default,{})}),a&&e.jsx(i.WalletActions.Action,{disabledLabel:t,label:c,onPress:a,children:e.jsx(A.default,{})}),r&&e.jsx(i.WalletActions.Action,{disabledLabel:b,label:d,onPress:r,children:e.jsx(x.default,{})})]});exports.Actions=v;
1
+ "use strict";var e=require("react/jsx-runtime");require("@styled/tokens");var u=require("../../icons/ico-arrow-down.js"),A=require("../../icons/ico-paper-plane.js"),x=require("../../icons/ico-refresh.js");require("../../sections/verify-pincode.js");var a=require("../../sections/wallet-actions.js");require("../../sections/wallet-navigation.js");const L=({actionBox:r,buyLabel:n="Buy",buyDisabledLabel:o,sendLabel:t="Send",sendDisabledLabel:c,swapLabel:b="Swap",swapDisabledLabel:d,onBuy:l,onSend:s,onSwap:i})=>e.jsxs(a.WalletActions,{actionBox:r,children:[l&&e.jsx(a.WalletActions.Action,{disabledLabel:o,label:n,onPress:l,children:e.jsx(u.default,{})}),s&&e.jsx(a.WalletActions.Action,{disabledLabel:c,label:t,onPress:s,children:e.jsx(A.default,{})}),i&&e.jsx(a.WalletActions.Action,{disabledLabel:d,label:b,onPress:i,children:e.jsx(x.default,{})})]});exports.Actions=L;
2
2
  //# sourceMappingURL=actions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"actions.js","sources":["../../../../../src/components/layouts/wallet-page/actions.tsx"],"sourcesContent":["import { IcoArrowDown, IcoPaperPlane, IcoQrcode } from '@components/icons';\nimport { WalletActions } from '@components/sections';\n\nexport interface ActionsProps {\n actionBox?: boolean;\n buyLabel?: string;\n buyDisabledLabel?: string;\n sendLabel?: string;\n sendDisabledLabel?: string;\n receiveLabel?: string;\n receiveDisabledLabel?: string;\n onBuy?: () => void;\n onSend?: () => void;\n onReceive?: () => void;\n}\n\nexport const Actions = ({\n actionBox,\n buyLabel = 'Buy',\n buyDisabledLabel,\n sendLabel = 'Send',\n sendDisabledLabel,\n receiveLabel = 'Receive',\n receiveDisabledLabel,\n onBuy,\n onSend,\n onReceive,\n}: ActionsProps) => (\n <WalletActions actionBox={actionBox}>\n {onBuy && (\n <WalletActions.Action disabledLabel={buyDisabledLabel} label={buyLabel} onPress={onBuy}>\n <IcoArrowDown />\n </WalletActions.Action>\n )}\n {onSend && (\n <WalletActions.Action disabledLabel={sendDisabledLabel} label={sendLabel} onPress={onSend}>\n <IcoPaperPlane />\n </WalletActions.Action>\n )}\n {onReceive && (\n <WalletActions.Action disabledLabel={receiveDisabledLabel} label={receiveLabel} onPress={onReceive}>\n <IcoQrcode />\n </WalletActions.Action>\n )}\n </WalletActions>\n);\n"],"names":["Actions","actionBox","buyLabel","buyDisabledLabel","sendLabel","sendDisabledLabel","receiveLabel","receiveDisabledLabel","onBuy","onSend","onReceive","_jsxs","WalletActions","_jsx","IcoArrowDown","IcoPaperPlane","IcoQrcode"],"mappings":"yVAgBa,MAAAA,EAAU,CAAC,CACtB,UAAAC,EACA,SAAAC,EAAW,MACX,iBAAAC,EACA,UAAAC,EAAY,OACZ,kBAAAC,EACA,aAAAC,EAAe,UACf,qBAAAC,EACA,MAAAC,EACA,OAAAC,EACA,UAAAC,CACa,IACbC,EAACC,KAAAA,EAAAA,cAAa,CAAC,UAAWX,EAAS,SAAA,CAChCO,GACCK,MAACD,EAAAA,cAAc,OAAM,CAAC,cAAeT,EAAkB,MAAOD,EAAU,QAASM,EAC/E,SAAAK,MAACC,EAAAA,QAAY,CAAA,CAAA,CACQ,CAAA,EAExBL,GACCI,EAACD,IAAAA,EAAAA,cAAc,OAAO,CAAA,cAAeP,EAAmB,MAAOD,EAAW,QAASK,EACjF,SAAAI,MAACE,EAAa,QAAA,EAAA,CACO,CAAA,EAExBL,GACCG,EAAAA,IAACD,EAAAA,cAAc,OAAO,CAAA,cAAeL,EAAsB,MAAOD,EAAc,QAASI,EACvF,SAAAG,EAACG,IAAAA,UAAS,CAAA,CAAA,CACW,CAAA,CACxB,CACa,CAAA"}
1
+ {"version":3,"file":"actions.js","sources":["../../../../../src/components/layouts/wallet-page/actions.tsx"],"sourcesContent":["import { IcoArrowDown, IcoPaperPlane, IcoRefresh } from '@components/icons';\nimport { WalletActions } from '@components/sections';\n\nexport interface ActionsProps {\n actionBox?: boolean;\n buyLabel?: string;\n buyDisabledLabel?: string;\n sendLabel?: string;\n sendDisabledLabel?: string;\n swapLabel?: string;\n swapDisabledLabel?: string;\n onBuy?: () => void;\n onSend?: () => void;\n onSwap?: () => void;\n}\n\nexport const Actions = ({\n actionBox,\n buyLabel = 'Buy',\n buyDisabledLabel,\n sendLabel = 'Send',\n sendDisabledLabel,\n swapLabel = 'Swap',\n swapDisabledLabel,\n onBuy,\n onSend,\n onSwap,\n}: ActionsProps) => (\n <WalletActions actionBox={actionBox}>\n {onBuy && (\n <WalletActions.Action disabledLabel={buyDisabledLabel} label={buyLabel} onPress={onBuy}>\n <IcoArrowDown />\n </WalletActions.Action>\n )}\n {onSend && (\n <WalletActions.Action disabledLabel={sendDisabledLabel} label={sendLabel} onPress={onSend}>\n <IcoPaperPlane />\n </WalletActions.Action>\n )}\n {onSwap && (\n <WalletActions.Action disabledLabel={swapDisabledLabel} label={swapLabel} onPress={onSwap}>\n <IcoRefresh />\n </WalletActions.Action>\n )}\n </WalletActions>\n);\n"],"names":["Actions","actionBox","buyLabel","buyDisabledLabel","sendLabel","sendDisabledLabel","swapLabel","swapDisabledLabel","onBuy","onSend","onSwap","_jsxs","WalletActions","_jsx","IcoArrowDown","IcoPaperPlane","IcoRefresh"],"mappings":"0VAgBa,MAAAA,EAAU,CAAC,CACtB,UAAAC,EACA,SAAAC,EAAW,MACX,iBAAAC,EACA,UAAAC,EAAY,OACZ,kBAAAC,EACA,UAAAC,EAAY,OACZ,kBAAAC,EACA,MAAAC,EACA,OAAAC,EACA,OAAAC,CACa,IACbC,EAACC,KAAAA,EAAAA,cAAa,CAAC,UAAWX,EAAS,SAAA,CAChCO,GACCK,MAACD,EAAAA,cAAc,OAAM,CAAC,cAAeT,EAAkB,MAAOD,EAAU,QAASM,EAC/E,SAAAK,MAACC,EAAAA,QAAY,CAAA,CAAA,CACQ,CAAA,EAExBL,GACCI,EAACD,IAAAA,EAAAA,cAAc,OAAO,CAAA,cAAeP,EAAmB,MAAOD,EAAW,QAASK,EACjF,SAAAI,MAACE,EAAa,QAAA,EAAA,CACO,CAAA,EAExBL,GACCG,EAAAA,IAACD,EAAAA,cAAc,OAAO,CAAA,cAAeL,EAAmB,MAAOD,EAAW,QAASI,EACjF,SAAAG,EAACG,IAAAA,UAAU,CAAA,CAAA,CACU,CAAA,CACxB,CACa,CAAA"}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("react/jsx-runtime"),r=require("@styled/tokens"),j=require("../../icons/ico-globe.js"),b=require("../../icons/ico-remove.js"),l=require("../../primitives/button.js");require("../../primitives/checkbox.js"),require("../../primitives/dropdown-selector.js");var s=require("../../primitives/popover.js");require("../../primitives/radio.js"),require("../../primitives/segmented-control.js"),require("../../primitives/switch.js");var n=require("../../primitives/text.js"),f=require("@styled/css/css"),t=require("@styled/jsx"),d=require("react");const p=({connected:i,connectedLabel:x="Connected",disconnectLabel:c,disconnectedLabel:u="Not connected",domain:h,logoUrl:o,onDisconnect:v})=>{const[g,a]=d.useState(!1);return d.useEffect(()=>{a(!1)},[o]),e.jsxs(s.Popover,{iconSize:28,variant:"text",children:[e.jsx(s.Popover.LeadingIcon,{color:r.token("colors.text.tertiary"),children:o&&i&&!g?e.jsxs(t.Circle,{position:"relative",w:7,h:7,children:[e.jsx("img",{style:{borderRadius:"50%"},width:28,height:28,src:o,alt:"app logo",onError:()=>a(!0)}),e.jsx(t.Circle,{size:"7px",position:"absolute",bg:"positive.base",borderWidth:"thin",borderColor:"surface.primary",bottom:"-1px",right:"-1px",boxSizing:"border-box"})]}):e.jsxs("svg",{width:"28",height:"28",children:[e.jsx("circle",{cx:"14",cy:"14",r:"14",fill:r.token("colors.surface.tertiary")}),e.jsx(j.default,{color:r.token("colors.text.tertiary"),x:6,y:6,height:16,width:16})]})}),e.jsxs(s.Popover.Content,{className:f.css({w:"200px"}),children:[e.jsxs(t.Stack,{w:"100%",gap:1,overflow:"hidden",children:[i?e.jsx(n.default,{size:"xs",variant:"success",fontWeight:"normal",children:x}):e.jsx(n.default,{fontColor:"text.tertiary",size:"xs",children:u}),e.jsx(n.default,{truncate:!0,children:h})]}),i&&c&&e.jsxs(e.Fragment,{children:[e.jsx(t.Divider,{color:"surface.quaternary",my:3}),e.jsx(l.default,{label:c,size:"sm",textStyle:"negative",variant:"text",onPress:v,children:e.jsx(l.default.LeadingIcon,{children:e.jsxs("svg",{width:"20",height:"20",children:[e.jsx("circle",{cx:"8",cy:"8",r:"8",fill:r.token("colors.negative.lightest")}),e.jsx(b.default,{color:r.token("colors.negative.base"),x:3,y:3,height:10,width:10})]})})})]})]})]})};exports.ConnectionMenu=p;
1
+ "use strict";var e=require("react/jsx-runtime"),t=require("@styled/tokens"),f=require("../../icons/ico-globe.js"),b=require("../../icons/ico-remove.js"),a=require("../../primitives/button.js");require("../../primitives/checkbox.js"),require("../../primitives/dropdown-selector.js");var s=require("../../primitives/popover.js");require("../../primitives/radio.js"),require("../../primitives/segmented-control.js"),require("../../primitives/switch.js");var n=require("../../primitives/text.js"),p=require("@styled/css/css"),r=require("@styled/jsx"),d=require("react");const q=({connected:i,connectedLabel:x="Connected",disconnectLabel:c,disconnectedLabel:u="Not connected",domain:h,showReceive:v,logoUrl:o,onDisconnect:j})=>{const[g,l]=d.useState(!1);return d.useEffect(()=>{l(!1)},[o]),e.jsxs(r.HStack,{children:[e.jsxs(s.Popover,{iconSize:28,variant:"text",children:[e.jsx(s.Popover.LeadingIcon,{color:t.token("colors.text.tertiary"),children:o&&i&&!g?e.jsxs(r.Circle,{position:"relative",w:7,h:7,children:[e.jsx("img",{style:{borderRadius:"50%"},width:28,height:28,src:o,alt:"app logo",onError:()=>l(!0)}),e.jsx(r.Circle,{size:"7px",position:"absolute",bg:"positive.base",borderWidth:"thin",borderColor:"surface.primary",bottom:"-1px",right:"-1px",boxSizing:"border-box"})]}):e.jsxs("svg",{width:"28",height:"28",children:[e.jsx("circle",{cx:"14",cy:"14",r:"14",fill:t.token("colors.surface.tertiary")}),e.jsx(f.default,{color:t.token("colors.text.tertiary"),x:6,y:6,height:16,width:16})]})}),e.jsxs(s.Popover.Content,{className:p.css({w:"200px"}),children:[e.jsxs(r.Stack,{w:"100%",gap:1,overflow:"hidden",children:[i?e.jsx(n.default,{size:"xs",variant:"success",fontWeight:"normal",children:x}):e.jsx(n.default,{fontColor:"text.tertiary",size:"xs",children:u}),e.jsx(n.default,{truncate:!0,children:h})]}),i&&c&&e.jsxs(e.Fragment,{children:[e.jsx(r.Divider,{color:"surface.quaternary",my:3}),e.jsx(a.default,{label:c,size:"sm",textStyle:"negative",variant:"text",onPress:j,children:e.jsx(a.default.LeadingIcon,{children:e.jsxs("svg",{width:"20",height:"20",children:[e.jsx("circle",{cx:"8",cy:"8",r:"8",fill:t.token("colors.negative.lightest")}),e.jsx(b.default,{color:t.token("colors.negative.base"),x:3,y:3,height:10,width:10})]})})})]})]})]}),v?e.jsx(r.Box,{w:"1rem"}):null]})};exports.ConnectionMenu=q;
2
2
  //# sourceMappingURL=connection-menu.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"connection-menu.js","sources":["../../../../../src/components/layouts/wallet-page/connection-menu.tsx"],"sourcesContent":["import { IcoGlobe, IcoRemove } from '@components/icons';\nimport { Button, Popover, Text } from '@components/primitives';\nimport { css } from '@styled/css/css';\nimport { Circle, Divider, Stack } from '@styled/jsx';\nimport { token } from '@styled/tokens';\nimport { useEffect, useState } from 'react';\n\nexport interface ConnectionMenuProps {\n connected?: boolean;\n connectedLabel?: string;\n disconnectLabel?: string;\n disconnectedLabel?: string;\n domain: string;\n logoUrl?: string;\n onDisconnect?: () => void;\n}\n\nexport const ConnectionMenu = ({\n connected,\n connectedLabel = 'Connected',\n disconnectLabel,\n disconnectedLabel = 'Not connected',\n domain,\n logoUrl,\n onDisconnect,\n}: ConnectionMenuProps) => {\n const [error, setError] = useState(false);\n\n useEffect(() => {\n setError(false);\n }, [logoUrl]);\n\n return (\n <Popover iconSize={28} variant=\"text\">\n <Popover.LeadingIcon color={token('colors.text.tertiary')}>\n {logoUrl && connected && !error ? (\n <Circle position=\"relative\" w={7} h={7}>\n <img\n style={{ borderRadius: '50%' }}\n width={28}\n height={28}\n src={logoUrl}\n alt=\"app logo\"\n onError={() => setError(true)}\n />\n <Circle\n size=\"7px\"\n position=\"absolute\"\n bg=\"positive.base\"\n borderWidth=\"thin\"\n borderColor=\"surface.primary\"\n bottom=\"-1px\"\n right=\"-1px\"\n boxSizing=\"border-box\"\n />\n </Circle>\n ) : (\n <svg width=\"28\" height=\"28\">\n <circle cx=\"14\" cy=\"14\" r=\"14\" fill={token('colors.surface.tertiary')} />\n <IcoGlobe color={token('colors.text.tertiary')} x={6} y={6} height={16} width={16} />\n </svg>\n )}\n </Popover.LeadingIcon>\n <Popover.Content className={css({ w: '200px' })}>\n <Stack w=\"100%\" gap={1} overflow=\"hidden\">\n {!connected ? (\n <Text fontColor=\"text.tertiary\" size=\"xs\">\n {disconnectedLabel}\n </Text>\n ) : (\n <Text size=\"xs\" variant=\"success\" fontWeight=\"normal\">\n {connectedLabel}\n </Text>\n )}\n <Text truncate>{domain}</Text>\n </Stack>\n {connected && disconnectLabel && (\n <>\n <Divider color=\"surface.quaternary\" my={3} />\n <Button label={disconnectLabel} size=\"sm\" textStyle=\"negative\" variant=\"text\" onPress={onDisconnect}>\n <Button.LeadingIcon>\n <svg width=\"20\" height=\"20\">\n <circle cx=\"8\" cy=\"8\" r=\"8\" fill={token('colors.negative.lightest')} />\n <IcoRemove color={token('colors.negative.base')} x={3} y={3} height={10} width={10} />\n </svg>\n </Button.LeadingIcon>\n </Button>\n </>\n )}\n </Popover.Content>\n </Popover>\n );\n};\n"],"names":["ConnectionMenu","connected","connectedLabel","disconnectLabel","disconnectedLabel","domain","logoUrl","onDisconnect","error","setError","useState","useEffect","_jsxs","Popover","_jsx","token","Circle","IcoGlobe","css","Stack","Text","_Fragment","Divider","Button","IcoRemove"],"mappings":"sjBAiBa,MAAAA,EAAiB,CAAC,CAC7B,UAAAC,EACA,eAAAC,EAAiB,YACjB,gBAAAC,EACA,kBAAAC,EAAoB,gBACpB,OAAAC,EACA,QAAAC,EACA,aAAAC,CACoB,IAAI,CACxB,KAAM,CAACC,EAAOC,CAAQ,EAAIC,WAAS,EAAK,EAExC,OAAAC,YAAU,IAAK,CACbF,EAAS,EAAK,CAChB,EAAG,CAACH,CAAO,CAAC,EAGVM,EAAAA,KAACC,EAAAA,SAAQ,SAAU,GAAI,QAAQ,OAAM,SAAA,CACnCC,MAACD,EAAQ,QAAA,YAAY,CAAA,MAAOE,EAAAA,MAAM,sBAAsB,EAAC,SACtDT,GAAWL,GAAa,CAACO,EACxBI,EAACI,KAAAA,EAAAA,QAAO,SAA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,SACjBX,cAAK,MAAM,KAAK,OAAO,KAAI,SAAA,CACzBE,EAAAA,cAAQ,GAAG,IAAI,GAAG,IAAI,EAAE,IAAI,KAAMC,EAAAA,MAAM,0BAA0B,CAAK,CAAA,EACvED,EAAAA,IAACU,EAAAA,QAAS,CAAC,MAAOT,EAAAA,MAAM,sBAAsB,EAAG,EAAG,EAAG,EAAG,EAAG,OAAQ,GAAI,MAAO,EAAM,CAAA,CAAA,CAAA,CAAA,GAGnF,CAAA,CAAA,CAAA,CAAA,CAEZ,CACe,CAAA,CAAA,CAAA,CAAA,CAGxB"}
1
+ {"version":3,"file":"connection-menu.js","sources":["../../../../../src/components/layouts/wallet-page/connection-menu.tsx"],"sourcesContent":["import { IcoGlobe, IcoRemove } from '@components/icons';\nimport { Button, Popover, Text } from '@components/primitives';\nimport { css } from '@styled/css/css';\nimport { Box, Circle, Divider, HStack, Stack } from '@styled/jsx';\nimport { token } from '@styled/tokens';\nimport { useEffect, useState } from 'react';\n\nexport interface ConnectionMenuProps {\n connected?: boolean;\n connectedLabel?: string;\n disconnectLabel?: string;\n disconnectedLabel?: string;\n domain: string;\n logoUrl?: string;\n showReceive?: boolean;\n onDisconnect?: () => void;\n}\n\nexport const ConnectionMenu = ({\n connected,\n connectedLabel = 'Connected',\n disconnectLabel,\n disconnectedLabel = 'Not connected',\n domain,\n showReceive,\n logoUrl,\n onDisconnect,\n}: ConnectionMenuProps) => {\n const [error, setError] = useState(false);\n\n useEffect(() => {\n setError(false);\n }, [logoUrl]);\n\n return (\n <HStack>\n <Popover iconSize={28} variant=\"text\">\n <Popover.LeadingIcon color={token('colors.text.tertiary')}>\n {logoUrl && connected && !error ? (\n <Circle position=\"relative\" w={7} h={7}>\n <img\n style={{ borderRadius: '50%' }}\n width={28}\n height={28}\n src={logoUrl}\n alt=\"app logo\"\n onError={() => setError(true)}\n />\n <Circle\n size=\"7px\"\n position=\"absolute\"\n bg=\"positive.base\"\n borderWidth=\"thin\"\n borderColor=\"surface.primary\"\n bottom=\"-1px\"\n right=\"-1px\"\n boxSizing=\"border-box\"\n />\n </Circle>\n ) : (\n <svg width=\"28\" height=\"28\">\n <circle cx=\"14\" cy=\"14\" r=\"14\" fill={token('colors.surface.tertiary')} />\n <IcoGlobe color={token('colors.text.tertiary')} x={6} y={6} height={16} width={16} />\n </svg>\n )}\n </Popover.LeadingIcon>\n <Popover.Content className={css({ w: '200px' })}>\n <Stack w=\"100%\" gap={1} overflow=\"hidden\">\n {!connected ? (\n <Text fontColor=\"text.tertiary\" size=\"xs\">\n {disconnectedLabel}\n </Text>\n ) : (\n <Text size=\"xs\" variant=\"success\" fontWeight=\"normal\">\n {connectedLabel}\n </Text>\n )}\n <Text truncate>{domain}</Text>\n </Stack>\n {connected && disconnectLabel && (\n <>\n <Divider color=\"surface.quaternary\" my={3} />\n <Button label={disconnectLabel} size=\"sm\" textStyle=\"negative\" variant=\"text\" onPress={onDisconnect}>\n <Button.LeadingIcon>\n <svg width=\"20\" height=\"20\">\n <circle cx=\"8\" cy=\"8\" r=\"8\" fill={token('colors.negative.lightest')} />\n <IcoRemove color={token('colors.negative.base')} x={3} y={3} height={10} width={10} />\n </svg>\n </Button.LeadingIcon>\n </Button>\n </>\n )}\n </Popover.Content>\n </Popover>\n {/* Empty div to balance out the QR code on other half */}\n {showReceive ? <Box w=\"1rem\"></Box> : null}\n </HStack>\n );\n};\n"],"names":["ConnectionMenu","connected","connectedLabel","disconnectLabel","disconnectedLabel","domain","showReceive","logoUrl","onDisconnect","error","setError","useState","useEffect","_jsxs","HStack","Popover","_jsx","token","Circle","IcoGlobe","css","Stack","Text","Divider","Button","IcoRemove","Box"],"mappings":"sjBAkBa,MAAAA,EAAiB,CAAC,CAC7B,UAAAC,EACA,eAAAC,EAAiB,YACjB,gBAAAC,EACA,kBAAAC,EAAoB,gBACpB,OAAAC,EACA,YAAAC,EACA,QAAAC,EACA,aAAAC,CACoB,IAAI,CACxB,KAAM,CAACC,EAAOC,CAAQ,EAAIC,WAAS,EA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U,gBAAgB,KAAK,cAClClB,CAAiB,CAAA,EAOtBY,EAAAA,IAACM,EAAAA,QAAK,CAAA,qBAAUjB,CAAM,CAAA,CAAQ,CACxB,CAAA,EACPJ,GAAaE,GACZU,6BACEG,EAAAA,IAACO,WAAQ,MAAM,qBAAqB,GAAI,CAAK,CAAA,EAC7CP,MAACQ,EAAM,QAAA,CAAC,MAAOrB,EAAiB,KAAK,KAAK,UAAU,WAAW,QAAQ,OAAO,QAASK,WACrFQ,EAAAA,IAACQ,UAAO,YAAW,CAAA,SACjBX,cAAK,MAAM,KAAK,OAAO,KACrB,SAAA,CAAAG,EAAA,IAAA,SAAA,CAAQ,GAAG,IAAI,GAAG,IAAI,EAAE,IAAI,KAAMC,EAAAA,MAAM,0BAA0B,CAAK,CAAA,EACvED,EAAAA,IAACS,EAAAA,SAAU,MAAOR,QAAM,sBAAsB,EAAG,EAAG,EAAG,EAAG,EAAG,OAAQ,GAAI,MAAO,EAAM,CAAA,CAAA,CAAA,CAAA,GAGnF,CAAA,CAAA,CAAA,CAAA,CAEZ,CACe,CAAA,CAAA,CAAA,CAAA,EAGnBX,EAAcU,EAACU,IAAAA,EAAAA,KAAI,EAAE,MAAa,CAAA,EAAG,IAAI,CACnC,CAAA,CAEb"}
@@ -1,2 +1,2 @@
1
- import{jsxs as e,jsx as t}from"react/jsx-runtime";import d from"../../primitives/button.js";import"../../primitives/checkbox.js";import"../../primitives/dropdown-selector.js";import{Popover as a}from"../../primitives/popover.js";import"../../primitives/radio.js";import"../../primitives/segmented-control.js";import"../../primitives/switch.js";import s from"../../primitives/text.js";import{css as f}from"@styled/css/css";import{Stack as l,Divider as h}from"@styled/jsx";import{useState as u,useEffect as g}from"react";const x=({avatarUrl:i,email:o,name:r,logoutLabel:c="Log out",onLogout:m})=>{const[p,n]=u(!1);return g(()=>{n(!1)},[i]),e(a,{iconSize:28,placement:"bottom right",variant:"text",children:[t(a.LeadingIcon,{children:i&&!p?t("img",{style:{borderRadius:"50%"},src:i,alt:"user avatar",onError:()=>n(!0)}):e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",children:[t("circle",{cx:"14",cy:"14",r:"13",fill:"url(#paint0_radial_3600_63997)",stroke:"white",strokeOpacity:"0.24",strokeWidth:"0.5"}),t("defs",{children:e("radialGradient",{id:"paint0_radial_3600_63997",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(15 30.75) rotate(-90) scale(37.3333 65.833)",children:[t("stop",{offset:"0.01",stopColor:"#FFF507"}),t("stop",{offset:"0.259381",stopColor:"#F09BEB"}),t("stop",{offset:"0.598165",stopColor:"#412CB9"}),t("stop",{offset:"1",stopColor:"#18171A"})]})})]})}),t(a.Content,{className:f({w:r&&o?"200px":"fit-content",maxW:"200px"}),children:e(l,{w:"full",alignItems:"start",gap:0,children:[(o||r)&&e(l,{w:"full",gap:1,children:[r&&t(s,{fontWeight:"medium",children:r}),o&&t(s,{size:"sm",truncate:!0,fontColor:"text.secondary",children:o})]}),(o||r)&&t(h,{color:"surface.quaternary",my:3,minW:"88px"}),t(d,{label:c,textStyle:"negative",variant:"text",size:"sm",onPress:m})]})})]})};export{x as AccountMenu};
1
+ import{jsxs as r,jsx as t}from"react/jsx-runtime";import{token as h}from"@styled/tokens";import u from"../../icons/ico-qrcode.js";import g from"../../primitives/button.js";import"../../primitives/checkbox.js";import"../../primitives/dropdown-selector.js";import{Popover as n}from"../../primitives/popover.js";import"../../primitives/radio.js";import"../../primitives/segmented-control.js";import"../../primitives/switch.js";import s from"../../primitives/text.js";import{css as x}from"@styled/css/css";import{HStack as v,Box as w,Stack as l,Divider as y}from"@styled/jsx";import{useState as C,useEffect as k}from"react";const B=({avatarUrl:i,email:o,name:e,showReceive:c,logoutLabel:m="Log out",onReceive:p,onLogout:d})=>{const[f,a]=C(!1);return k(()=>{a(!1)},[i]),r(v,{alignItems:"center",children:[c?t(w,{onClick:p,cursor:"pointer",children:t(u,{height:16,width:16,color:h("colors.text.secondary")})}):null,r(n,{iconSize:28,placement:"bottom right",variant:"text",children:[t(n.LeadingIcon,{children:i&&!f?t("img",{style:{borderRadius:"50%"},src:i,alt:"user avatar",onError:()=>a(!0)}):r("svg",{xmlns:"http://www.w3.org/2000/svg",width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",children:[t("circle",{cx:"14",cy:"14",r:"13",fill:"url(#paint0_radial_3600_63997)",stroke:"white",strokeOpacity:"0.24",strokeWidth:"0.5"}),t("defs",{children:r("radialGradient",{id:"paint0_radial_3600_63997",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(15 30.75) rotate(-90) scale(37.3333 65.833)",children:[t("stop",{offset:"0.01",stopColor:"#FFF507"}),t("stop",{offset:"0.259381",stopColor:"#F09BEB"}),t("stop",{offset:"0.598165",stopColor:"#412CB9"}),t("stop",{offset:"1",stopColor:"#18171A"})]})})]})}),t(n.Content,{className:x({w:e&&o?"200px":"fit-content",maxW:"200px"}),children:r(l,{w:"full",alignItems:"start",gap:0,children:[(o||e)&&r(l,{w:"full",gap:1,children:[e&&t(s,{fontWeight:"medium",children:e}),o&&t(s,{size:"sm",truncate:!0,fontColor:"text.secondary",children:o})]}),(o||e)&&t(y,{color:"surface.quaternary",my:3,minW:"88px"}),t(g,{label:m,textStyle:"negative",variant:"text",size:"sm",onPress:d})]})})]})]})};export{B as AccountMenu};
2
2
  //# sourceMappingURL=account-menu.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"account-menu.js","sources":["../../../../../src/components/layouts/wallet-page/account-menu.tsx"],"sourcesContent":["import { Button, Popover, Text } from '@components/primitives';\nimport { css } from '@styled/css/css';\nimport { Divider, Stack } from '@styled/jsx';\nimport { useEffect, useState } from 'react';\n\nexport interface AccountMenuProps {\n avatarUrl?: string;\n email?: string;\n name?: string;\n logoutLabel?: string;\n onLogout?: () => void;\n}\n\nexport const AccountMenu = ({ avatarUrl, email, name, logoutLabel = 'Log out', onLogout }: AccountMenuProps) => {\n const [error, setError] = useState(false);\n\n useEffect(() => {\n setError(false);\n }, [avatarUrl]);\n\n return (\n <Popover iconSize={28} placement=\"bottom right\" variant=\"text\">\n <Popover.LeadingIcon>\n {avatarUrl && !error ? (\n <img style={{ borderRadius: '50%' }} src={avatarUrl} alt=\"user avatar\" onError={() => setError(true)} />\n ) : (\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"28\" height=\"28\" viewBox=\"0 0 28 28\" fill=\"none\">\n <circle\n cx=\"14\"\n cy=\"14\"\n r=\"13\"\n fill=\"url(#paint0_radial_3600_63997)\"\n stroke=\"white\"\n strokeOpacity=\"0.24\"\n strokeWidth=\"0.5\"\n />\n <defs>\n <radialGradient\n id=\"paint0_radial_3600_63997\"\n cx=\"0\"\n cy=\"0\"\n r=\"1\"\n gradientUnits=\"userSpaceOnUse\"\n gradientTransform=\"translate(15 30.75) rotate(-90) scale(37.3333 65.833)\"\n >\n <stop offset=\"0.01\" stopColor=\"#FFF507\" />\n <stop offset=\"0.259381\" stopColor=\"#F09BEB\" />\n <stop offset=\"0.598165\" stopColor=\"#412CB9\" />\n <stop offset=\"1\" stopColor=\"#18171A\" />\n </radialGradient>\n </defs>\n </svg>\n )}\n </Popover.LeadingIcon>\n <Popover.Content className={css({ w: name && email ? '200px' : 'fit-content', maxW: '200px' })}>\n <Stack w=\"full\" alignItems=\"start\" gap={0}>\n {(email || name) && (\n <Stack w=\"full\" gap={1}>\n {name && <Text fontWeight=\"medium\">{name}</Text>}\n {email && (\n <Text size=\"sm\" truncate fontColor=\"text.secondary\">\n {email}\n </Text>\n )}\n </Stack>\n )}\n {(email || name) && <Divider color=\"surface.quaternary\" my={3} minW=\"88px\" />}\n <Button label={logoutLabel} textStyle=\"negative\" variant=\"text\" size=\"sm\" onPress={onLogout} />\n </Stack>\n </Popover.Content>\n </Popover>\n );\n};\n"],"names":["AccountMenu","avatarUrl","email","name","logoutLabel","onLogout","error","setError","useState","useEffect","_jsxs","Popover","_js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AAC,EAAE,OAAO,IAAK,EAClB,SAAA,CAAAX,GAAQS,EAACG,EAAK,CAAA,WAAW,kBAAUZ,CAAI,CAAA,EACvCD,GACCU,EAACG,EAAK,CAAA,KAAK,KAAK,SAAQ,GAAC,UAAU,iBAChC,SAAAb,GAEJ,CAAA,CAAA,GAGHA,GAASC,IAASS,EAACI,EAAO,CAAC,MAAM,qBAAqB,GAAI,EAAG,KAAK,MAAM,CAAA,EAC1EJ,EAACK,GAAO,MAAOb,EAAa,UAAU,WAAW,QAAQ,OAAO,KAAK,KAAK,QAASC,CAAQ,CAAA,CAAI,GAEjF,CAAA,CAAA,CAAA,CAAA,CAGxB"}
1
+ {"version":3,"file":"account-menu.js","sources":["../../../../../src/components/layouts/wallet-page/account-menu.tsx"],"sourcesContent":["import { IcoQrcode } from '@components/icons';\nimport { Button, Popover, Text } from '@components/primitives';\nimport { css } from '@styled/css/css';\nimport { Box, Divider, HStack, Stack } from '@styled/jsx';\nimport { token } from '@styled/tokens';\nimport { useEffect, useState } from 'react';\n\nexport interface AccountMenuProps {\n avatarUrl?: string;\n email?: string;\n name?: string;\n logoutLabel?: string;\n showReceive?: boolean;\n onReceive?: () => void;\n onLogout?: () => void;\n}\n\nexport const AccountMenu = ({\n avatarUrl,\n email,\n name,\n showReceive,\n logoutLabel = 'Log out',\n onReceive,\n onLogout,\n}: AccountMenuProps) => {\n const [error, setError] = useState(false);\n\n useEffect(() => {\n setError(false);\n }, [avatarUrl]);\n\n return (\n <HStack alignItems={'center'}>\n {showReceive ? (\n <Box onClick={onReceive} cursor=\"pointer\">\n <IcoQrcode height={16} width={16} color={token('colors.text.secondary')} />\n </Box>\n ) : null}\n <Popover iconSize={28} placement=\"bottom right\" variant=\"text\">\n <Popover.LeadingIcon>\n {avatarUrl && !error ? (\n <img style={{ borderRadius: '50%' }} src={avatarUrl} alt=\"user avatar\" onError={() => setError(true)} />\n ) : (\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"28\" height=\"28\" viewBox=\"0 0 28 28\" fill=\"none\">\n <circle\n cx=\"14\"\n cy=\"14\"\n r=\"13\"\n fill=\"url(#paint0_radial_3600_63997)\"\n stroke=\"white\"\n strokeOpacity=\"0.24\"\n strokeWidth=\"0.5\"\n />\n <defs>\n <radialGradient\n id=\"paint0_radial_3600_63997\"\n cx=\"0\"\n cy=\"0\"\n r=\"1\"\n gradientUnits=\"userSpaceOnUse\"\n gradientTransform=\"translate(15 30.75) rotate(-90) scale(37.3333 65.833)\"\n >\n <stop offset=\"0.01\" stopColor=\"#FFF507\" />\n <stop offset=\"0.259381\" stopColor=\"#F09BEB\" />\n <stop offset=\"0.598165\" stopColor=\"#412CB9\" />\n <stop offset=\"1\" stopColor=\"#18171A\" />\n </radialGradient>\n </defs>\n </svg>\n )}\n </Popover.LeadingIcon>\n <Popover.Content className={css({ w: name && email ? '200px' : 'fit-content', maxW: '200px' })}>\n <Stack w=\"full\" alignItems=\"start\" gap={0}>\n {(email || name) && (\n <Stack w=\"full\" gap={1}>\n {name && <Text fontWeight=\"medium\">{name}</Text>}\n {email && (\n <Text size=\"sm\" truncate fontColor=\"text.secondary\">\n {email}\n </Text>\n )}\n </Stack>\n )}\n {(email || name) && <Divider color=\"surface.quaternary\" my={3} minW=\"88px\" />}\n <Button label={logoutLabel} textStyle=\"negative\" variant=\"text\" size=\"sm\" onPress={onLogout} />\n </Stack>\n </Popover.Content>\n </Popover>\n </HStack>\n );\n};\n"],"names":["AccountMenu","avatarUrl","email","name","showReceive","logoutLabel","onReceive","onLogout","error","setError","useState","useEffect","_jsxs","HStack","_jsx","Box","IcoQrcode","token","Popover","css","Stack","Text","Divider","Button"],"mappings":"4mBAiBa,MAAAA,EAAc,CAAC,CAC1B,UAAAC,EACA,MAAAC,EACA,KAAAC,EACA,YAAAC,EACA,YAAAC,EAAc,UACd,UAAAC,EACA,SAAAC,CACiB,IAAI,CACrB,KAAM,CAACC,EAAOC,CAAQ,EAAIC,EAAS,EAAK,EAExC,OAAAC,EAAU,IAA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EAAI,CAAC,WAAW,kBAAUlB,CAAI,CAAA,EACvCD,GACCY,EAACO,GAAK,KAAK,KAAK,YAAS,UAAU,iBAChC,SAAAnB,GAEJ,CAAA,CAAA,GAGHA,GAASC,IAASW,EAACQ,EAAQ,CAAA,MAAM,qBAAqB,GAAI,EAAG,KAAK,MAAS,CAAA,EAC7ER,EAACS,EAAM,CAAC,MAAOlB,EAAa,UAAU,WAAW,QAAQ,OAAO,KAAK,KAAK,QAASE,CAAY,CAAA,CAAA,CAAA,CAAA,GAEjF,CACV,CAAA,CAAA,CAAA,CAAA,CAGhB"}
@@ -1,2 +1,2 @@
1
- import{jsxs as m,jsx as e}from"react/jsx-runtime";import"@styled/tokens";import p from"../../icons/ico-arrow-down.js";import L from"../../icons/ico-paper-plane.js";import f from"../../icons/ico-qrcode.js";import"../../sections/verify-pincode.js";import{WalletActions as o}from"../../sections/wallet-actions.js";import"../../sections/wallet-navigation.js";const x=({actionBox:r,buyLabel:a="Buy",buyDisabledLabel:b,sendLabel:s="Send",sendDisabledLabel:t,receiveLabel:c="Receive",receiveDisabledLabel:d,onBuy:i,onSend:l,onReceive:n})=>m(o,{actionBox:r,children:[i&&e(o.Action,{disabledLabel:b,label:a,onPress:i,children:e(p,{})}),l&&e(o.Action,{disabledLabel:t,label:s,onPress:l,children:e(L,{})}),n&&e(o.Action,{disabledLabel:d,label:c,onPress:n,children:e(f,{})})]});export{x as Actions};
1
+ import{jsxs as m,jsx as e}from"react/jsx-runtime";import"@styled/tokens";import p from"../../icons/ico-arrow-down.js";import L from"../../icons/ico-paper-plane.js";import f from"../../icons/ico-refresh.js";import"../../sections/verify-pincode.js";import{WalletActions as o}from"../../sections/wallet-actions.js";import"../../sections/wallet-navigation.js";const x=({actionBox:n,buyLabel:s="Buy",buyDisabledLabel:b,sendLabel:r="Send",sendDisabledLabel:t,swapLabel:d="Swap",swapDisabledLabel:c,onBuy:l,onSend:a,onSwap:i})=>m(o,{actionBox:n,children:[l&&e(o.Action,{disabledLabel:b,label:s,onPress:l,children:e(p,{})}),a&&e(o.Action,{disabledLabel:t,label:r,onPress:a,children:e(L,{})}),i&&e(o.Action,{disabledLabel:c,label:d,onPress:i,children:e(f,{})})]});export{x as Actions};
2
2
  //# sourceMappingURL=actions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"actions.js","sources":["../../../../../src/components/layouts/wallet-page/actions.tsx"],"sourcesContent":["import { IcoArrowDown, IcoPaperPlane, IcoQrcode } from '@components/icons';\nimport { WalletActions } from '@components/sections';\n\nexport interface ActionsProps {\n actionBox?: boolean;\n buyLabel?: string;\n buyDisabledLabel?: string;\n sendLabel?: string;\n sendDisabledLabel?: string;\n receiveLabel?: string;\n receiveDisabledLabel?: string;\n onBuy?: () => void;\n onSend?: () => void;\n onReceive?: () => void;\n}\n\nexport const Actions = ({\n actionBox,\n buyLabel = 'Buy',\n buyDisabledLabel,\n sendLabel = 'Send',\n sendDisabledLabel,\n receiveLabel = 'Receive',\n receiveDisabledLabel,\n onBuy,\n onSend,\n onReceive,\n}: ActionsProps) => (\n <WalletActions actionBox={actionBox}>\n {onBuy && (\n <WalletActions.Action disabledLabel={buyDisabledLabel} label={buyLabel} onPress={onBuy}>\n <IcoArrowDown />\n </WalletActions.Action>\n )}\n {onSend && (\n <WalletActions.Action disabledLabel={sendDisabledLabel} label={sendLabel} onPress={onSend}>\n <IcoPaperPlane />\n </WalletActions.Action>\n )}\n {onReceive && (\n <WalletActions.Action disabledLabel={receiveDisabledLabel} label={receiveLabel} onPress={onReceive}>\n <IcoQrcode />\n </WalletActions.Action>\n )}\n </WalletActions>\n);\n"],"names":["Actions","actionBox","buyLabel","buyDisabledLabel","sendLabel","sendDisabledLabel","receiveLabel","receiveDisabledLabel","onBuy","onSend","onReceive","_jsxs","WalletActions","_jsx","IcoArrowDown","IcoPaperPlane","IcoQrcode"],"mappings":"mWAgBa,MAAAA,EAAU,CAAC,CACtB,UAAAC,EACA,SAAAC,EAAW,MACX,iBAAAC,EACA,UAAAC,EAAY,OACZ,kBAAAC,EACA,aAAAC,EAAe,UACf,qBAAAC,EACA,MAAAC,EACA,OAAAC,EACA,UAAAC,CACa,IACbC,EAACC,EAAa,CAAC,UAAWX,EAAS,SAAA,CAChCO,GACCK,EAACD,EAAc,OAAM,CAAC,cAAeT,EAAkB,MAAOD,EAAU,QAASM,EAC/E,SAAAK,EAACC,EAAY,CAAA,CAAA,CACQ,CAAA,EAExBL,GACCI,EAACD,EAAc,OAAO,CAAA,cAAeP,EAAmB,MAAOD,EAAW,QAASK,EACjF,SAAAI,EAACE,EAAa,EAAA,CACO,CAAA,EAExBL,GACCG,EAACD,EAAc,OAAO,CAAA,cAAeL,EAAsB,MAAOD,EAAc,QAASI,EACvF,SAAAG,EAACG,EAAS,CAAA,CAAA,CACW,CAAA,CACxB,CACa,CAAA"}
1
+ {"version":3,"file":"actions.js","sources":["../../../../../src/components/layouts/wallet-page/actions.tsx"],"sourcesContent":["import { IcoArrowDown, IcoPaperPlane, IcoRefresh } from '@components/icons';\nimport { WalletActions } from '@components/sections';\n\nexport interface ActionsProps {\n actionBox?: boolean;\n buyLabel?: string;\n buyDisabledLabel?: string;\n sendLabel?: string;\n sendDisabledLabel?: string;\n swapLabel?: string;\n swapDisabledLabel?: string;\n onBuy?: () => void;\n onSend?: () => void;\n onSwap?: () => void;\n}\n\nexport const Actions = ({\n actionBox,\n buyLabel = 'Buy',\n buyDisabledLabel,\n sendLabel = 'Send',\n sendDisabledLabel,\n swapLabel = 'Swap',\n swapDisabledLabel,\n onBuy,\n onSend,\n onSwap,\n}: ActionsProps) => (\n <WalletActions actionBox={actionBox}>\n {onBuy && (\n <WalletActions.Action disabledLabel={buyDisabledLabel} label={buyLabel} onPress={onBuy}>\n <IcoArrowDown />\n </WalletActions.Action>\n )}\n {onSend && (\n <WalletActions.Action disabledLabel={sendDisabledLabel} label={sendLabel} onPress={onSend}>\n <IcoPaperPlane />\n </WalletActions.Action>\n )}\n {onSwap && (\n <WalletActions.Action disabledLabel={swapDisabledLabel} label={swapLabel} onPress={onSwap}>\n <IcoRefresh />\n </WalletActions.Action>\n )}\n </WalletActions>\n);\n"],"names":["Actions","actionBox","buyLabel","buyDisabledLabel","sendLabel","sendDisabledLabel","swapLabel","swapDisabledLabel","onBuy","onSend","onSwap","_jsxs","WalletActions","_jsx","IcoArrowDown","IcoPaperPlane","IcoRefresh"],"mappings":"oWAgBa,MAAAA,EAAU,CAAC,CACtB,UAAAC,EACA,SAAAC,EAAW,MACX,iBAAAC,EACA,UAAAC,EAAY,OACZ,kBAAAC,EACA,UAAAC,EAAY,OACZ,kBAAAC,EACA,MAAAC,EACA,OAAAC,EACA,OAAAC,CACa,IACbC,EAACC,EAAa,CAAC,UAAWX,EAAS,SAAA,CAChCO,GACCK,EAACD,EAAc,OAAM,CAAC,cAAeT,EAAkB,MAAOD,EAAU,QAASM,EAC/E,SAAAK,EAACC,EAAY,CAAA,CAAA,CACQ,CAAA,EAExBL,GACCI,EAACD,EAAc,OAAO,CAAA,cAAeP,EAAmB,MAAOD,EAAW,QAASK,EACjF,SAAAI,EAACE,EAAa,EAAA,CACO,CAAA,EAExBL,GACCG,EAACD,EAAc,OAAO,CAAA,cAAeL,EAAmB,MAAOD,EAAW,QAASI,EACjF,SAAAG,EAACG,EAAU,CAAA,CAAA,CACU,CAAA,CACxB,CACa,CAAA"}
@@ -1,2 +1,2 @@
1
- import{jsxs as r,jsx as e,Fragment as f}from"react/jsx-runtime";import{token as t}from"@styled/tokens";import b from"../../icons/ico-globe.js";import v from"../../icons/ico-remove.js";import a from"../../primitives/button.js";import"../../primitives/checkbox.js";import"../../primitives/dropdown-selector.js";import{Popover as c}from"../../primitives/popover.js";import"../../primitives/radio.js";import"../../primitives/segmented-control.js";import"../../primitives/switch.js";import n from"../../primitives/text.js";import{css as y}from"@styled/css/css";import{Circle as d,Stack as u,Divider as w}from"@styled/jsx";import{useState as z,useEffect as C}from"react";const L=({connected:o,connectedLabel:h="Connected",disconnectLabel:l,disconnectedLabel:m="Not connected",domain:p,logoUrl:i,onDisconnect:g})=>{const[x,s]=z(!1);return C(()=>{s(!1)},[i]),r(c,{iconSize:28,variant:"text",children:[e(c.LeadingIcon,{color:t("colors.text.tertiary"),children:i&&o&&!x?r(d,{position:"relative",w:7,h:7,children:[e("img",{style:{borderRadius:"50%"},width:28,height:28,src:i,alt:"app logo",onError:()=>s(!0)}),e(d,{size:"7px",position:"absolute",bg:"positive.base",borderWidth:"thin",borderColor:"surface.primary",bottom:"-1px",right:"-1px",boxSizing:"border-box"})]}):r("svg",{width:"28",height:"28",children:[e("circle",{cx:"14",cy:"14",r:"14",fill:t("colors.surface.tertiary")}),e(b,{color:t("colors.text.tertiary"),x:6,y:6,height:16,width:16})]})}),r(c.Content,{className:y({w:"200px"}),children:[r(u,{w:"100%",gap:1,overflow:"hidden",children:[o?e(n,{size:"xs",variant:"success",fontWeight:"normal",children:h}):e(n,{fontColor:"text.tertiary",size:"xs",children:m}),e(n,{truncate:!0,children:p})]}),o&&l&&r(f,{children:[e(w,{color:"surface.quaternary",my:3}),e(a,{label:l,size:"sm",textStyle:"negative",variant:"text",onPress:g,children:e(a.LeadingIcon,{children:r("svg",{width:"20",height:"20",children:[e("circle",{cx:"8",cy:"8",r:"8",fill:t("colors.negative.lightest")}),e(v,{color:t("colors.negative.base"),x:3,y:3,height:10,width:10})]})})})]})]})]})};export{L as ConnectionMenu};
1
+ import{jsxs as r,jsx as e,Fragment as b}from"react/jsx-runtime";import{token as o}from"@styled/tokens";import v from"../../icons/ico-globe.js";import u from"../../icons/ico-remove.js";import a from"../../primitives/button.js";import"../../primitives/checkbox.js";import"../../primitives/dropdown-selector.js";import{Popover as c}from"../../primitives/popover.js";import"../../primitives/radio.js";import"../../primitives/segmented-control.js";import"../../primitives/switch.js";import n from"../../primitives/text.js";import{css as y}from"@styled/css/css";import{HStack as w,Circle as d,Stack as z,Divider as C,Box as S}from"@styled/jsx";import{useState as L,useEffect as k}from"react";const j=({connected:t,connectedLabel:h="Connected",disconnectLabel:l,disconnectedLabel:m="Not connected",domain:p,showReceive:g,logoUrl:i,onDisconnect:x})=>{const[f,s]=L(!1);return k(()=>{s(!1)},[i]),r(w,{children:[r(c,{iconSize:28,variant:"text",children:[e(c.LeadingIcon,{color:o("colors.text.tertiary"),children:i&&t&&!f?r(d,{position:"relative",w:7,h:7,children:[e("img",{style:{borderRadius:"50%"},width:28,height:28,src:i,alt:"app logo",onError:()=>s(!0)}),e(d,{size:"7px",position:"absolute",bg:"positive.base",borderWidth:"thin",borderColor:"surface.primary",bottom:"-1px",right:"-1px",boxSizing:"border-box"})]}):r("svg",{width:"28",height:"28",children:[e("circle",{cx:"14",cy:"14",r:"14",fill:o("colors.surface.tertiary")}),e(v,{color:o("colors.text.tertiary"),x:6,y:6,height:16,width:16})]})}),r(c.Content,{className:y({w:"200px"}),children:[r(z,{w:"100%",gap:1,overflow:"hidden",children:[t?e(n,{size:"xs",variant:"success",fontWeight:"normal",children:h}):e(n,{fontColor:"text.tertiary",size:"xs",children:m}),e(n,{truncate:!0,children:p})]}),t&&l&&r(b,{children:[e(C,{color:"surface.quaternary",my:3}),e(a,{label:l,size:"sm",textStyle:"negative",variant:"text",onPress:x,children:e(a.LeadingIcon,{children:r("svg",{width:"20",height:"20",children:[e("circle",{cx:"8",cy:"8",r:"8",fill:o("colors.negative.lightest")}),e(u,{color:o("colors.negative.base"),x:3,y:3,height:10,width:10})]})})})]})]})]}),g?e(S,{w:"1rem"}):null]})};export{j as ConnectionMenu};
2
2
  //# sourceMappingURL=connection-menu.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"connection-menu.js","sources":["../../../../../src/components/layouts/wallet-page/connection-menu.tsx"],"sourcesContent":["import { IcoGlobe, IcoRemove } from '@components/icons';\nimport { Button, Popover, Text } from '@components/primitives';\nimport { css } from '@styled/css/css';\nimport { Circle, Divider, Stack } from '@styled/jsx';\nimport { token } from '@styled/tokens';\nimport { useEffect, useState } from 'react';\n\nexport interface ConnectionMenuProps {\n connected?: boolean;\n connectedLabel?: string;\n disconnectLabel?: string;\n disconnectedLabel?: string;\n domain: string;\n logoUrl?: string;\n onDisconnect?: () => void;\n}\n\nexport const ConnectionMenu = ({\n connected,\n connectedLabel = 'Connected',\n disconnectLabel,\n disconnectedLabel = 'Not connected',\n domain,\n logoUrl,\n onDisconnect,\n}: ConnectionMenuProps) => {\n const [error, setError] = useState(false);\n\n useEffect(() => {\n setError(false);\n }, [logoUrl]);\n\n return (\n <Popover iconSize={28} variant=\"text\">\n <Popover.LeadingIcon color={token('colors.text.tertiary')}>\n {logoUrl && connected && !error ? (\n <Circle position=\"relative\" w={7} h={7}>\n <img\n style={{ borderRadius: '50%' }}\n width={28}\n height={28}\n src={logoUrl}\n alt=\"app logo\"\n onError={() => setError(true)}\n />\n <Circle\n size=\"7px\"\n position=\"absolute\"\n bg=\"positive.base\"\n borderWidth=\"thin\"\n borderColor=\"surface.primary\"\n bottom=\"-1px\"\n right=\"-1px\"\n boxSizing=\"border-box\"\n />\n </Circle>\n ) : (\n <svg width=\"28\" height=\"28\">\n <circle cx=\"14\" cy=\"14\" r=\"14\" fill={token('colors.surface.tertiary')} />\n <IcoGlobe color={token('colors.text.tertiary')} x={6} y={6} height={16} width={16} />\n </svg>\n )}\n </Popover.LeadingIcon>\n <Popover.Content className={css({ w: '200px' })}>\n <Stack w=\"100%\" gap={1} overflow=\"hidden\">\n {!connected ? (\n <Text fontColor=\"text.tertiary\" size=\"xs\">\n {disconnectedLabel}\n </Text>\n ) : (\n <Text size=\"xs\" variant=\"success\" fontWeight=\"normal\">\n {connectedLabel}\n </Text>\n )}\n <Text truncate>{domain}</Text>\n </Stack>\n {connected && disconnectLabel && (\n <>\n <Divider color=\"surface.quaternary\" my={3} />\n <Button label={disconnectLabel} size=\"sm\" textStyle=\"negative\" variant=\"text\" onPress={onDisconnect}>\n <Button.LeadingIcon>\n <svg width=\"20\" height=\"20\">\n <circle cx=\"8\" cy=\"8\" r=\"8\" fill={token('colors.negative.lightest')} />\n <IcoRemove color={token('colors.negative.base')} x={3} y={3} height={10} width={10} />\n </svg>\n </Button.LeadingIcon>\n </Button>\n </>\n )}\n </Popover.Content>\n </Popover>\n );\n};\n"],"names":["ConnectionMenu","connected","connectedLabel","disconnectLabel","disconnectedLabel","domain","logoUrl","onDisconnect","error","setError","useState","useEffect","_jsxs","Popover","_jsx","token","Circle","IcoGlobe","css","Stack","Text","_Fragment","Divider","Button","IcoRemove"],"mappings":"ypBAiBa,MAAAA,EAAiB,CAAC,CAC7B,UAAAC,EACA,eAAAC,EAAiB,YACjB,gBAAAC,EACA,kBAAAC,EAAoB,gBACpB,OAAAC,EACA,QAAAC,EACA,aAAAC,CACoB,IAAI,CACxB,KAAM,CAACC,EAAOC,CAAQ,EAAIC,EAAS,EAAK,EAExC,OAAAC,EAAU,IAAK,CACbF,EAAS,EAAK,CAChB,EAAG,CAACH,CAAO,CAAC,EAGVM,EAACC,GAAQ,SAAU,GAAI,QAAQ,OAAM,SAAA,CACnCC,EAACD,EAAQ,YAAY,CAAA,MAAOE,EAAM,sBAAsB,EAAC,SACtDT,GAAWL,GAAa,CAACO,EACxBI,EAACI,GAAO,SAAS,WAAW,EAAG,EAAG,EAAG,YACnCF,EACE,MAAA,CAAA,MAAO,CAAE,aAAc,KAAK,EAC5B,MAAO,GACP,OAAQ,GACR,IAAKR,EACL,IAAI,WACJ,QAAS,IAAMG,EAAS,EAAI,CAAC,CAAA,EAE/BK,EAACE,GACC,KAAK,MACL,SAAS,WACT,GAAG,gBACH,YAAY,OACZ,YAAY,kBACZ,OAAO,OACP,MAAM,OACN,UAAU,YAAY,CAAA,CACtB,IAGJJ,SAAK,MAAM,KAAK,OAAO,KAAI,SAAA,CACzBE,YAAQ,GAAG,KAAK,GAAG,KAAK,EAAE,KAAK,KAAMC,EAAM,yBAAyB,CAAK,CAAA,EACzED,EAACG,EAAQ,CAAC,MAAOF,EAAM,sBAAsB,EAAG,EAAG,EAAG,EAAG,EAAG,OAAQ,GAAI,MAAO,EAAM,CAAA,CAAA,CAAA,CAAA,CAGrE,CAAA,EACtBH,EAACC,EAAQ,QAAQ,CAAA,UAAWK,EAAI,CAAE,EAAG,OAAS,CAAA,YAC5CN,EAACO,GAAM,EAAE,OAAO,IAAK,EAAG,SAAS,mBAC7BlB,EAKAa,EAACM,GAAK,KAAK,KAAK,QAAQ,UAAU,WAAW,kBAC1ClB,CAAc,CAAA,EALjBY,EAACM,GAAK,UAAU,gBAAgB,KAAK,KAAI,SACtChB,CACI,CAAA,EAMTU,EAACM,EAAK,CAAA,qBAAUf,CAAM,CAAA,CAAQ,IAE/BJ,GAAaE,GACZS,EACES,EAAA,CAAA,SAAA,CAAAP,EAACQ,EAAQ,CAAA,MAAM,qBAAqB,GAAI,IACxCR,EAACS,EAAO,CAAA,MAAOpB,EAAiB,KAAK,KAAK,UAAU,WAAW,QAAQ,OAAO,QAASI,WACrFO,EAACS,EAAO,YAAW,CAAA,SACjBX,SAAK,MAAM,KAAK,OAAO,KAAI,SAAA,CACzBE,YAAQ,GAAG,IAAI,GAAG,IAAI,EAAE,IAAI,KAAMC,EAAM,0BAA0B,CAAK,CAAA,EACvED,EAACU,EAAS,CAAC,MAAOT,EAAM,sBAAsB,EAAG,EAAG,EAAG,EAAG,EAAG,OAAQ,GAAI,MAAO,EAAM,CAAA,CAAA,CAAA,CAAA,GAGnF,CAAA,CAAA,CAAA,CAAA,CAEZ,CACe,CAAA,CAAA,CAAA,CAAA,CAGxB"}
1
+ {"version":3,"file":"connection-menu.js","sources":["../../../../../src/components/layouts/wallet-page/connection-menu.tsx"],"sourcesContent":["import { IcoGlobe, IcoRemove } from '@components/icons';\nimport { Button, Popover, Text } from '@components/primitives';\nimport { css } from '@styled/css/css';\nimport { Box, Circle, Divider, HStack, Stack } from '@styled/jsx';\nimport { token } from '@styled/tokens';\nimport { useEffect, useState } from 'react';\n\nexport interface ConnectionMenuProps {\n connected?: boolean;\n connectedLabel?: string;\n disconnectLabel?: string;\n disconnectedLabel?: string;\n domain: string;\n logoUrl?: string;\n showReceive?: boolean;\n onDisconnect?: () => void;\n}\n\nexport const ConnectionMenu = ({\n connected,\n connectedLabel = 'Connected',\n disconnectLabel,\n disconnectedLabel = 'Not connected',\n domain,\n showReceive,\n logoUrl,\n onDisconnect,\n}: ConnectionMenuProps) => {\n const [error, setError] = useState(false);\n\n useEffect(() => {\n setError(false);\n }, [logoUrl]);\n\n return (\n <HStack>\n <Popover iconSize={28} variant=\"text\">\n <Popover.LeadingIcon color={token('colors.text.tertiary')}>\n {logoUrl && connected && !error ? (\n <Circle position=\"relative\" w={7} h={7}>\n <img\n style={{ borderRadius: '50%' }}\n width={28}\n height={28}\n src={logoUrl}\n alt=\"app logo\"\n onError={() => setError(true)}\n />\n <Circle\n size=\"7px\"\n position=\"absolute\"\n bg=\"positive.base\"\n borderWidth=\"thin\"\n borderColor=\"surface.primary\"\n bottom=\"-1px\"\n right=\"-1px\"\n boxSizing=\"border-box\"\n />\n </Circle>\n ) : (\n <svg width=\"28\" height=\"28\">\n <circle cx=\"14\" cy=\"14\" r=\"14\" fill={token('colors.surface.tertiary')} />\n <IcoGlobe color={token('colors.text.tertiary')} x={6} y={6} height={16} width={16} />\n </svg>\n )}\n </Popover.LeadingIcon>\n <Popover.Content className={css({ w: '200px' })}>\n <Stack w=\"100%\" gap={1} overflow=\"hidden\">\n {!connected ? (\n <Text fontColor=\"text.tertiary\" size=\"xs\">\n {disconnectedLabel}\n </Text>\n ) : (\n <Text size=\"xs\" variant=\"success\" fontWeight=\"normal\">\n {connectedLabel}\n </Text>\n )}\n <Text truncate>{domain}</Text>\n </Stack>\n {connected && disconnectLabel && (\n <>\n <Divider color=\"surface.quaternary\" my={3} />\n <Button label={disconnectLabel} size=\"sm\" textStyle=\"negative\" variant=\"text\" onPress={onDisconnect}>\n <Button.LeadingIcon>\n <svg width=\"20\" height=\"20\">\n <circle cx=\"8\" cy=\"8\" r=\"8\" fill={token('colors.negative.lightest')} />\n <IcoRemove color={token('colors.negative.base')} x={3} y={3} height={10} width={10} />\n </svg>\n </Button.LeadingIcon>\n </Button>\n </>\n )}\n </Popover.Content>\n </Popover>\n {/* Empty div to balance out the QR code on other half */}\n {showReceive ? <Box w=\"1rem\"></Box> : null}\n </HStack>\n );\n};\n"],"names":["ConnectionMenu","connected","connectedLabel","disconnectLabel","disconnectedLabel","domain","showReceive","logoUrl","onDisconnect","error","setError","useState","useEffect","_jsxs","HStack","Popover","_jsx","token","Circle","IcoGlobe","css","Stack","Text","Divider","Button","IcoRemove","Box"],"mappings":"8qBAkBa,MAAAA,EAAiB,CAAC,CAC7B,UAAAC,EACA,eAAAC,EAAiB,YACjB,gBAAAC,EACA,kBAAAC,EAAoB,gBACpB,OAAAC,EACA,YAAAC,EACA,QAAAC,EACA,aAAAC,CACoB,IAAI,CACxB,KAAM,CAACC,EAAOC,CAAQ,EAAIC,EAAS,EAAK,EAExC,OAAAC,EAAU,IAAK,CACbF,EAAS,EAAK,CAChB,EAAG,CAACH,CAAO,CAAC,EAGVM,EAACC,EAAM,CAAA,SAAA,CACLD,EAACE,EAAO,CAAC,SAAU,GAAI,QAAQ,OAC7B,SAAA,CAAAC,EAACD,EAAQ,YAAY,CAAA,MAAOE,EAAM,sBAAsB,WACrDV,GAAWN,GAAa,CAACQ,EACxBI,EAACK,EAAO,CAAA,SAAS,WAAW,EAAG,EAAG,EAAG,YACnCF,EACE,MAAA,CAAA,MAAO,CAAE,aAAc,KAAK,EAC5B,MAAO,GACP,OAAQ,GACR,IAAKT,EACL,IAAI,WACJ,QAAS,IAAMG,EAAS,EAAI,CAC5B,CAAA,EACFM,EAACE,EAAM,CACL,KAAK,MACL,SAAS,WACT,GAAG,gBACH,YAAY,OACZ,YAAY,kBACZ,OAAO,OACP,MAAM,OACN,UAAU,YAAY,CAAA,CACtB,IAGJL,SAAK,MAAM,KAAK,OAAO,KAAI,SAAA,CACzBG,YAAQ,GAAG,KAAK,GAAG,KAAK,EAAE,KAAK,KAAMC,EAAM,yBAAyB,IACpED,EAACG,EAAS,CAAA,MAAOF,EAAM,sBAAsB,EAAG,EAAG,EAAG,EAAG,EAAG,OAAQ,GAAI,MAAO,EAAM,CAAA,CAAA,CAAA,CAAA,CAGrE,CAAA,EACtBJ,EAACE,EAAQ,QAAQ,CAAA,UAAWK,EAAI,CAAE,EAAG,QAAS,EAAC,SAAA,CAC7CP,EAACQ,EAAK,CAAC,EAAE,OAAO,IAAK,EAAG,SAAS,SAAQ,SAAA,CACrCpB,EAKAe,EAACM,EAAI,CAAC,KAAK,KAAK,QAAQ,UAAU,WAAW,kBAC1CpB,CAAc,CAAA,EALjBc,EAACM,EAAK,CAAA,UAAU,gBAAgB,KAAK,cAClClB,CAAiB,CAAA,EAOtBY,EAACM,EAAK,CAAA,qBAAUjB,CAAM,CAAA,CAAQ,CACxB,CAAA,EACPJ,GAAaE,GACZU,eACEG,EAACO,GAAQ,MAAM,qBAAqB,GAAI,CAAK,CAAA,EAC7CP,EAACQ,EAAM,CAAC,MAAOrB,EAAiB,KAAK,KAAK,UAAU,WAAW,QAAQ,OAAO,QAASK,WACrFQ,EAACQ,EAAO,YAAW,CAAA,SACjBX,SAAK,MAAM,KAAK,OAAO,KACrB,SAAA,CAAAG,EAAA,SAAA,CAAQ,GAAG,IAAI,GAAG,IAAI,EAAE,IAAI,KAAMC,EAAM,0BAA0B,CAAK,CAAA,EACvED,EAACS,GAAU,MAAOR,EAAM,sBAAsB,EAAG,EAAG,EAAG,EAAG,EAAG,OAAQ,GAAI,MAAO,EAAM,CAAA,CAAA,CAAA,CAAA,GAGnF,CAAA,CAAA,CAAA,CAAA,CAEZ,CACe,CAAA,CAAA,CAAA,CAAA,EAGnBX,EAAcU,EAACU,GAAI,EAAE,MAAa,CAAA,EAAG,IAAI,CACnC,CAAA,CAEb"}
@@ -3,7 +3,9 @@ export interface AccountMenuProps {
3
3
  email?: string;
4
4
  name?: string;
5
5
  logoutLabel?: string;
6
+ showReceive?: boolean;
7
+ onReceive?: () => void;
6
8
  onLogout?: () => void;
7
9
  }
8
- export declare const AccountMenu: ({ avatarUrl, email, name, logoutLabel, onLogout }: AccountMenuProps) => import("react/jsx-runtime").JSX.Element;
10
+ export declare const AccountMenu: ({ avatarUrl, email, name, showReceive, logoutLabel, onReceive, onLogout, }: AccountMenuProps) => import("react/jsx-runtime").JSX.Element;
9
11
  //# sourceMappingURL=account-menu.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"account-menu.d.ts","sourceRoot":"","sources":["../../../../../src/components/layouts/wallet-page/account-menu.tsx"],"names":[],"mappings":"AAKA,MAAM,WAAW,gBAAgB;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,eAAO,MAAM,WAAW,sDAAmE,gBAAgB,4CA2D1G,CAAC"}
1
+ {"version":3,"file":"account-menu.d.ts","sourceRoot":"","sources":["../../../../../src/components/layouts/wallet-page/account-menu.tsx"],"names":[],"mappings":"AAOA,MAAM,WAAW,gBAAgB;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,eAAO,MAAM,WAAW,+EAQrB,gBAAgB,4CAkElB,CAAC"}
@@ -4,11 +4,11 @@ export interface ActionsProps {
4
4
  buyDisabledLabel?: string;
5
5
  sendLabel?: string;
6
6
  sendDisabledLabel?: string;
7
- receiveLabel?: string;
8
- receiveDisabledLabel?: string;
7
+ swapLabel?: string;
8
+ swapDisabledLabel?: string;
9
9
  onBuy?: () => void;
10
10
  onSend?: () => void;
11
- onReceive?: () => void;
11
+ onSwap?: () => void;
12
12
  }
13
- export declare const Actions: ({ actionBox, buyLabel, buyDisabledLabel, sendLabel, sendDisabledLabel, receiveLabel, receiveDisabledLabel, onBuy, onSend, onReceive, }: ActionsProps) => import("react/jsx-runtime").JSX.Element;
13
+ export declare const Actions: ({ actionBox, buyLabel, buyDisabledLabel, sendLabel, sendDisabledLabel, swapLabel, swapDisabledLabel, onBuy, onSend, onSwap, }: ActionsProps) => import("react/jsx-runtime").JSX.Element;
14
14
  //# sourceMappingURL=actions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../../../src/components/layouts/wallet-page/actions.tsx"],"names":[],"mappings":"AAGA,MAAM,WAAW,YAAY;IAC3B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,KAAK,CAAC,EAAE,MAAM,IAAI,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB;AAED,eAAO,MAAM,OAAO,2IAWjB,YAAY,4CAkBd,CAAC"}
1
+ {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../../../src/components/layouts/wallet-page/actions.tsx"],"names":[],"mappings":"AAGA,MAAM,WAAW,YAAY;IAC3B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,IAAI,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,eAAO,MAAM,OAAO,kIAWjB,YAAY,4CAkBd,CAAC"}
@@ -5,7 +5,8 @@ export interface ConnectionMenuProps {
5
5
  disconnectedLabel?: string;
6
6
  domain: string;
7
7
  logoUrl?: string;
8
+ showReceive?: boolean;
8
9
  onDisconnect?: () => void;
9
10
  }
10
- export declare const ConnectionMenu: ({ connected, connectedLabel, disconnectLabel, disconnectedLabel, domain, logoUrl, onDisconnect, }: ConnectionMenuProps) => import("react/jsx-runtime").JSX.Element;
11
+ export declare const ConnectionMenu: ({ connected, connectedLabel, disconnectLabel, disconnectedLabel, domain, showReceive, logoUrl, onDisconnect, }: ConnectionMenuProps) => import("react/jsx-runtime").JSX.Element;
11
12
  //# sourceMappingURL=connection-menu.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"connection-menu.d.ts","sourceRoot":"","sources":["../../../../../src/components/layouts/wallet-page/connection-menu.tsx"],"names":[],"mappings":"AAOA,MAAM,WAAW,mBAAmB;IAClC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;CAC3B;AAED,eAAO,MAAM,cAAc,sGAQxB,mBAAmB,4CAmErB,CAAC"}
1
+ {"version":3,"file":"connection-menu.d.ts","sourceRoot":"","sources":["../../../../../src/components/layouts/wallet-page/connection-menu.tsx"],"names":[],"mappings":"AAOA,MAAM,WAAW,mBAAmB;IAClC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;CAC3B;AAED,eAAO,MAAM,cAAc,mHASxB,mBAAmB,4CAuErB,CAAC"}
@@ -2,10 +2,10 @@ import { PropsWithChildren } from 'react';
2
2
  export interface WalletPageProps extends PropsWithChildren {
3
3
  }
4
4
  export declare const WalletPage: (({ children, ...props }: WalletPageProps) => JSX.Element) & {
5
- AccountMenu: ({ avatarUrl, email, name, logoutLabel, onLogout }: import("./account-menu").AccountMenuProps) => import("react/jsx-runtime").JSX.Element;
6
- Actions: ({ actionBox, buyLabel, buyDisabledLabel, sendLabel, sendDisabledLabel, receiveLabel, receiveDisabledLabel, onBuy, onSend, onReceive, }: import("./actions").ActionsProps) => import("react/jsx-runtime").JSX.Element;
5
+ AccountMenu: ({ avatarUrl, email, name, showReceive, logoutLabel, onReceive, onLogout, }: import("./account-menu").AccountMenuProps) => import("react/jsx-runtime").JSX.Element;
6
+ Actions: ({ actionBox, buyLabel, buyDisabledLabel, sendLabel, sendDisabledLabel, swapLabel, swapDisabledLabel, onBuy, onSend, onSwap, }: import("./actions").ActionsProps) => import("react/jsx-runtime").JSX.Element;
7
7
  Address: ({ address, onAddressCopy }: import("./address").AddressProps) => import("react/jsx-runtime").JSX.Element;
8
- ConnectionMenu: ({ connected, connectedLabel, disconnectLabel, disconnectedLabel, domain, logoUrl, onDisconnect, }: import("./connection-menu").ConnectionMenuProps) => import("react/jsx-runtime").JSX.Element;
8
+ ConnectionMenu: ({ connected, connectedLabel, disconnectLabel, disconnectedLabel, domain, showReceive, logoUrl, onDisconnect, }: import("./connection-menu").ConnectionMenuProps) => import("react/jsx-runtime").JSX.Element;
9
9
  Content: ({ children }: any) => import("react/jsx-runtime").JSX.Element;
10
10
  Fiat: ({ fiatTotal, symbol }: import("./fiat").FiatProps) => import("react/jsx-runtime").JSX.Element;
11
11
  Navigation: ({ active, disabled, ...props }: import("../../sections/wallet-navigation").WalletNavigationProps) => import("react/jsx-runtime").JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@magiclabs/ui-components",
3
- "version": "1.36.6",
3
+ "version": "1.36.7",
4
4
  "description": "💅 A theme-able library of reusable UI components",
5
5
  "author": "Magic Labs <open-source@magic.link>",
6
6
  "repository": {