@magiclabs/ui-components 1.36.5 → 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.
- package/dist/cjs/components/layouts/wallet-page/account-menu.js +1 -1
- package/dist/cjs/components/layouts/wallet-page/account-menu.js.map +1 -1
- package/dist/cjs/components/layouts/wallet-page/actions.js +1 -1
- package/dist/cjs/components/layouts/wallet-page/actions.js.map +1 -1
- package/dist/cjs/components/layouts/wallet-page/connection-menu.js +1 -1
- package/dist/cjs/components/layouts/wallet-page/connection-menu.js.map +1 -1
- package/dist/cjs/components/list-items/navigation-button.js +1 -1
- package/dist/cjs/components/list-items/navigation-button.js.map +1 -1
- package/dist/es/components/layouts/wallet-page/account-menu.js +1 -1
- package/dist/es/components/layouts/wallet-page/account-menu.js.map +1 -1
- package/dist/es/components/layouts/wallet-page/actions.js +1 -1
- package/dist/es/components/layouts/wallet-page/actions.js.map +1 -1
- package/dist/es/components/layouts/wallet-page/connection-menu.js +1 -1
- package/dist/es/components/layouts/wallet-page/connection-menu.js.map +1 -1
- package/dist/es/components/list-items/navigation-button.js +1 -1
- package/dist/es/components/list-items/navigation-button.js.map +1 -1
- package/dist/types/components/layouts/wallet-page/account-menu.d.ts +3 -1
- package/dist/types/components/layouts/wallet-page/account-menu.d.ts.map +1 -1
- package/dist/types/components/layouts/wallet-page/actions.d.ts +4 -4
- package/dist/types/components/layouts/wallet-page/actions.d.ts.map +1 -1
- package/dist/types/components/layouts/wallet-page/connection-menu.d.ts +2 -1
- package/dist/types/components/layouts/wallet-page/connection-menu.d.ts.map +1 -1
- package/dist/types/components/layouts/wallet-page/index.d.ts +3 -3
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var e=require("react/jsx-runtime"),
|
|
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 = ({
|
|
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,C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AWC,EAAAA,IAAI,CAAE,EAAGhB,GAAQD,EAAQ,QAAU,cAAe,KAAM,OAAS,CAAA,WAC3FU,EAAAA,KAACQ,EAAAA,OAAM,EAAE,OAAO,WAAW,QAAQ,IAAK,aACpClB,GAASC,IACTS,EAAAA,KAACQ,EAAAA,MAAM,CAAA,EAAE,OAAO,IAAK,YAClBjB,GAAQW,EAAAA,IAACO,EAAAA,QAAI,CAAC,WAAW,kBAAUlB,CAAI,CAAA,EACvCD,GACCY,EAAAA,IAACO,WAAK,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-
|
|
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,
|
|
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"),
|
|
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
|
|
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,EAAK,EA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AgB,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
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),m=require("../containers/button.js");require("../containers/card.js");var o=require("@styled/css"),t=require("@styled/jsx"),g=require("@styled/tokens"),v=require("../icons/ico-external-link.js");require("../primitives/button.js"),require("../primitives/checkbox.js"),require("../primitives/dropdown-selector.js"),require("../primitives/popover.js"),require("../primitives/radio.js"),require("../primitives/segmented-control.js"),require("../primitives/switch.js");var h=require("../primitives/text.js"),s=require("react");require("../utils/client-asset-logo.js"),require("react-qrcode-logo"),require("../utils/secured-by-magic.js"),require("../containers/header.js"),require("../containers/menu.js"),require("../containers/modal.js"),require("../containers/overlay.js");var c=require("create-slots");const q=c.createSlot(({children:r,...i})=>e.jsx(t.Center,{children:s.Children.map(r,a=>s.cloneElement(a,i))})),p=c.createSlot(({children:r,...i})=>e.jsx(t.Center,{children:s.Children.map(r,a=>s.cloneElement(a,i))})),x=s.forwardRef((r,i)=>{const{primaryLabel:a,secondaryLabel:u,isExternalLink:j}=r;return c.createHost(r.children,d=>{const n=d.get(q),l=d.get(p);return e.jsx(m.ButtonContainer,{ref:i,className:o.css({p:4,bg:"neutral.quaternary",_hover:{bg:"neutral.secondary"}}),borderRadius:"0.5rem",expand:!0,...r,children:e.jsxs(t.HStack,{justify:"space-between",w:"full",children:[e.jsxs(t.HStack,{children:[n&&{...n,props:{
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),m=require("../containers/button.js");require("../containers/card.js");var o=require("@styled/css"),t=require("@styled/jsx"),g=require("@styled/tokens"),v=require("../icons/ico-external-link.js");require("../primitives/button.js"),require("../primitives/checkbox.js"),require("../primitives/dropdown-selector.js"),require("../primitives/popover.js"),require("../primitives/radio.js"),require("../primitives/segmented-control.js"),require("../primitives/switch.js");var h=require("../primitives/text.js"),s=require("react");require("../utils/client-asset-logo.js"),require("react-qrcode-logo"),require("../utils/secured-by-magic.js"),require("../containers/header.js"),require("../containers/menu.js"),require("../containers/modal.js"),require("../containers/overlay.js");var c=require("create-slots");const q=c.createSlot(({children:r,...i})=>e.jsx(t.Center,{children:s.Children.map(r,a=>s.cloneElement(a,i))})),p=c.createSlot(({children:r,...i})=>e.jsx(t.Center,{children:s.Children.map(r,a=>s.cloneElement(a,i))})),x=s.forwardRef((r,i)=>{const{primaryLabel:a,secondaryLabel:u,isExternalLink:j}=r;return c.createHost(r.children,d=>{const n=d.get(q),l=d.get(p);return e.jsx(m.ButtonContainer,{ref:i,className:o.css({p:4,bg:"neutral.quaternary",_hover:{bg:"neutral.secondary"}}),borderRadius:"0.5rem",expand:!0,...r,children:e.jsxs(t.HStack,{justify:"space-between",w:"full",children:[e.jsxs(t.HStack,{children:[n&&{...n,props:{height:24,...n.props,className:n.props.color?void 0:o.css({color:"brand.base"})}},e.jsxs(t.VStack,{gap:0,alignItems:"start",children:[e.jsxs(t.HStack,{children:[e.jsx(h.default,{fontWeight:"medium",children:a}),j&&e.jsx(v.default,{width:14,height:14,color:g.token("colors.neutral.primary")})]}),u&&e.jsx(h.default,{size:"sm",fontColor:"text.tertiary",children:u})]})]}),e.jsx(t.HStack,{children:l&&{...l,props:{...l.props,className:l.props.color?void 0:o.css({color:"neutral.primary"}),width:16,height:16}}})]})})})});x.displayName="NavigationButton";const b=Object.assign(x,{LeadingIcon:q,TrailingIcon:p});exports.default=b;
|
|
2
2
|
//# sourceMappingURL=navigation-button.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navigation-button.js","sources":["../../../../src/components/list-items/navigation-button.tsx"],"sourcesContent":["import { ButtonContainer } from '@components/containers';\nimport { IcoExternalLink } from '@components/icons';\nimport { Text } from '@components/primitives';\nimport { css } from '@styled/css';\nimport { Center, HStack, VStack } from '@styled/jsx';\nimport { token } from '@styled/tokens';\nimport { createHost, createSlot } from 'create-slots';\nimport { Children, cloneElement, forwardRef } from 'react';\nimport { AriaButtonProps } from 'react-aria';\n\nexport interface NavigationButtonProps extends AriaButtonProps {\n primaryLabel: string;\n secondaryLabel?: string;\n isExternalLink?: boolean;\n disabled?: boolean;\n}\n\nconst LeadingIcon = createSlot(({ children, ...props }) => {\n return (\n <Center>\n {Children.map(children, child => {\n return cloneElement(child, props);\n })}\n </Center>\n );\n});\n\nconst TrailingIcon = createSlot(({ children, ...props }) => {\n return (\n <Center>\n {Children.map(children, child => {\n return cloneElement(child, props);\n })}\n </Center>\n );\n});\n\nconst NavigationButtonBase = forwardRef<HTMLButtonElement, NavigationButtonProps>((props, forwardedRef) => {\n const { primaryLabel, secondaryLabel, isExternalLink } = props;\n\n return createHost(props.children, slots => {\n const leadingIcon = slots.get(LeadingIcon);\n const trailingIcon = slots.get(TrailingIcon);\n\n return (\n <ButtonContainer\n ref={forwardedRef}\n className={css({\n p: 4,\n bg: 'neutral.quaternary',\n _hover: { bg: 'neutral.secondary' },\n })}\n borderRadius=\"0.5rem\"\n expand\n {...props}\n >\n <HStack justify=\"space-between\" w=\"full\">\n <HStack>\n {leadingIcon && {\n ...leadingIcon,\n props: {\n ...leadingIcon.props,\n className: !leadingIcon.props.color ? css({ color: 'brand.base' }) : undefined,\n
|
|
1
|
+
{"version":3,"file":"navigation-button.js","sources":["../../../../src/components/list-items/navigation-button.tsx"],"sourcesContent":["import { ButtonContainer } from '@components/containers';\nimport { IcoExternalLink } from '@components/icons';\nimport { Text } from '@components/primitives';\nimport { css } from '@styled/css';\nimport { Center, HStack, VStack } from '@styled/jsx';\nimport { token } from '@styled/tokens';\nimport { createHost, createSlot } from 'create-slots';\nimport { Children, cloneElement, forwardRef } from 'react';\nimport { AriaButtonProps } from 'react-aria';\n\nexport interface NavigationButtonProps extends AriaButtonProps {\n primaryLabel: string;\n secondaryLabel?: string;\n isExternalLink?: boolean;\n disabled?: boolean;\n}\n\nconst LeadingIcon = createSlot(({ children, ...props }) => {\n return (\n <Center>\n {Children.map(children, child => {\n return cloneElement(child, props);\n })}\n </Center>\n );\n});\n\nconst TrailingIcon = createSlot(({ children, ...props }) => {\n return (\n <Center>\n {Children.map(children, child => {\n return cloneElement(child, props);\n })}\n </Center>\n );\n});\n\nconst NavigationButtonBase = forwardRef<HTMLButtonElement, NavigationButtonProps>((props, forwardedRef) => {\n const { primaryLabel, secondaryLabel, isExternalLink } = props;\n\n return createHost(props.children, slots => {\n const leadingIcon = slots.get(LeadingIcon);\n const trailingIcon = slots.get(TrailingIcon);\n\n return (\n <ButtonContainer\n ref={forwardedRef}\n className={css({\n p: 4,\n bg: 'neutral.quaternary',\n _hover: { bg: 'neutral.secondary' },\n })}\n borderRadius=\"0.5rem\"\n expand\n {...props}\n >\n <HStack justify=\"space-between\" w=\"full\">\n <HStack>\n {leadingIcon && {\n ...leadingIcon,\n props: {\n height: 24,\n ...leadingIcon.props,\n className: !leadingIcon.props.color ? css({ color: 'brand.base' }) : undefined,\n },\n }}\n <VStack gap={0} alignItems=\"start\">\n <HStack>\n <Text fontWeight=\"medium\">{primaryLabel}</Text>\n {isExternalLink && <IcoExternalLink width={14} height={14} color={token('colors.neutral.primary')} />}\n </HStack>\n {secondaryLabel && (\n <Text size=\"sm\" fontColor=\"text.tertiary\">\n {secondaryLabel}\n </Text>\n )}\n </VStack>\n </HStack>\n <HStack>\n {trailingIcon && {\n ...trailingIcon,\n props: {\n ...trailingIcon.props,\n className: !trailingIcon.props.color ? css({ color: 'neutral.primary' }) : undefined,\n width: 16,\n height: 16,\n },\n }}\n </HStack>\n </HStack>\n </ButtonContainer>\n );\n });\n});\n\nNavigationButtonBase.displayName = 'NavigationButton';\n\nconst NavigationButton = Object.assign(NavigationButtonBase, { LeadingIcon, TrailingIcon });\n\nexport default NavigationButton;\n"],"names":["LeadingIcon","createSlot","children","props","_jsx","Center","Children","child","cloneElement","TrailingIcon","NavigationButtonBase","forwardRef","forwardedRef","primaryLabel","secondaryLabel","isExternalLink","createHost","slots","leadingIcon","trailingIcon","ButtonContainer","css","_jsxs","HStack","VStack","Text","IcoExternalLink","token","NavigationButton"],"mappings":"u4BAiBA,MAAMA,EAAcC,EAAW,WAAA,CAAC,CAAE,SAAAC,EAAU,GAAGC,CAAO,IAElDC,MAACC,EAAAA,OAAM,CAAA,SACJC,EAAAA,SAAS,IAAIJ,EAAUK,GACfC,EAAAA,aAAaD,EAAOJ,CAAK,CACjC,CACM,CAAA,CAEZ,EAEKM,EAAeR,EAAW,WAAA,CAAC,CAAE,SAAAC,EAAU,GAAGC,CAAO,IAEnDC,MAACC,EAAAA,OAAM,CAAA,SACJC,EAAAA,SAAS,IAAIJ,EAAUK,GACfC,EAAaD,aAAAA,EAAOJ,CAAK,CACjC,CACM,CAAA,CAEZ,EAEKO,EAAuBC,EAAAA,WAAqD,CAACR,EAAOS,IAAgB,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,CAAC,EAEDX,EAAqB,YAAc,mBAEnC,MAAMkB,EAAmB,OAAO,OAAOlB,EAAsB,CAAE,YAAAV,EAAa,aAAAS,CAAY,CAAE"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsxs as
|
|
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 = ({
|
|
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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ACI,EAAQ,QAAO,CAAC,UAAWC,EAAI,CAAE,EAAGhB,GAAQD,EAAQ,QAAU,cAAe,KAAM,OAAS,CAAA,WAC3FU,EAACQ,GAAM,EAAE,OAAO,WAAW,QAAQ,IAAK,aACpClB,GAASC,IACTS,EAACQ,EAAM,CAAA,EAAE,OAAO,IAAK,YAClBjB,GAAQW,EAACO,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-
|
|
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,
|
|
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
|
|
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
|
|
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,CAA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M,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"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as o,jsxs as m}from"react/jsx-runtime";import{ButtonContainer as w}from"../containers/button.js";import"../containers/card.js";import{css as a}from"@styled/css";import{Center as c,HStack as p,VStack as L}from"@styled/jsx";import{token as N}from"@styled/tokens";import j from"../icons/ico-external-link.js";import"../primitives/button.js";import"../primitives/checkbox.js";import"../primitives/dropdown-selector.js";import"../primitives/popover.js";import"../primitives/radio.js";import"../primitives/segmented-control.js";import"../primitives/switch.js";import d from"../primitives/text.js";import{Children as h,cloneElement as f,forwardRef as k}from"react";import"../utils/client-asset-logo.js";import"react-qrcode-logo";import"../utils/secured-by-magic.js";import"../containers/header.js";import"../containers/menu.js";import"../containers/modal.js";import"../containers/overlay.js";import{createSlot as g,createHost as v}from"create-slots";const u=g(({children:r,...t})=>o(c,{children:h.map(r,e=>f(e,t))})),b=g(({children:r,...t})=>o(c,{children:h.map(r,e=>f(e,t))})),y=k((r,t)=>{const{primaryLabel:e,secondaryLabel:l,isExternalLink:x}=r;return v(r.children,s=>{const i=s.get(u),n=s.get(b);return o(w,{ref:t,className:a({p:4,bg:"neutral.quaternary",_hover:{bg:"neutral.secondary"}}),borderRadius:"0.5rem",expand:!0,...r,children:m(p,{justify:"space-between",w:"full",children:[m(p,{children:[i&&{...i,props:{
|
|
1
|
+
import{jsx as o,jsxs as m}from"react/jsx-runtime";import{ButtonContainer as w}from"../containers/button.js";import"../containers/card.js";import{css as a}from"@styled/css";import{Center as c,HStack as p,VStack as L}from"@styled/jsx";import{token as N}from"@styled/tokens";import j from"../icons/ico-external-link.js";import"../primitives/button.js";import"../primitives/checkbox.js";import"../primitives/dropdown-selector.js";import"../primitives/popover.js";import"../primitives/radio.js";import"../primitives/segmented-control.js";import"../primitives/switch.js";import d from"../primitives/text.js";import{Children as h,cloneElement as f,forwardRef as k}from"react";import"../utils/client-asset-logo.js";import"react-qrcode-logo";import"../utils/secured-by-magic.js";import"../containers/header.js";import"../containers/menu.js";import"../containers/modal.js";import"../containers/overlay.js";import{createSlot as g,createHost as v}from"create-slots";const u=g(({children:r,...t})=>o(c,{children:h.map(r,e=>f(e,t))})),b=g(({children:r,...t})=>o(c,{children:h.map(r,e=>f(e,t))})),y=k((r,t)=>{const{primaryLabel:e,secondaryLabel:l,isExternalLink:x}=r;return v(r.children,s=>{const i=s.get(u),n=s.get(b);return o(w,{ref:t,className:a({p:4,bg:"neutral.quaternary",_hover:{bg:"neutral.secondary"}}),borderRadius:"0.5rem",expand:!0,...r,children:m(p,{justify:"space-between",w:"full",children:[m(p,{children:[i&&{...i,props:{height:24,...i.props,className:i.props.color?void 0:a({color:"brand.base"})}},m(L,{gap:0,alignItems:"start",children:[m(p,{children:[o(d,{fontWeight:"medium",children:e}),x&&o(j,{width:14,height:14,color:N("colors.neutral.primary")})]}),l&&o(d,{size:"sm",fontColor:"text.tertiary",children:l})]})]}),o(p,{children:n&&{...n,props:{...n.props,className:n.props.color?void 0:a({color:"neutral.primary"}),width:16,height:16}}})]})})})});y.displayName="NavigationButton";const C=Object.assign(y,{LeadingIcon:u,TrailingIcon:b});export{C as default};
|
|
2
2
|
//# sourceMappingURL=navigation-button.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navigation-button.js","sources":["../../../../src/components/list-items/navigation-button.tsx"],"sourcesContent":["import { ButtonContainer } from '@components/containers';\nimport { IcoExternalLink } from '@components/icons';\nimport { Text } from '@components/primitives';\nimport { css } from '@styled/css';\nimport { Center, HStack, VStack } from '@styled/jsx';\nimport { token } from '@styled/tokens';\nimport { createHost, createSlot } from 'create-slots';\nimport { Children, cloneElement, forwardRef } from 'react';\nimport { AriaButtonProps } from 'react-aria';\n\nexport interface NavigationButtonProps extends AriaButtonProps {\n primaryLabel: string;\n secondaryLabel?: string;\n isExternalLink?: boolean;\n disabled?: boolean;\n}\n\nconst LeadingIcon = createSlot(({ children, ...props }) => {\n return (\n <Center>\n {Children.map(children, child => {\n return cloneElement(child, props);\n })}\n </Center>\n );\n});\n\nconst TrailingIcon = createSlot(({ children, ...props }) => {\n return (\n <Center>\n {Children.map(children, child => {\n return cloneElement(child, props);\n })}\n </Center>\n );\n});\n\nconst NavigationButtonBase = forwardRef<HTMLButtonElement, NavigationButtonProps>((props, forwardedRef) => {\n const { primaryLabel, secondaryLabel, isExternalLink } = props;\n\n return createHost(props.children, slots => {\n const leadingIcon = slots.get(LeadingIcon);\n const trailingIcon = slots.get(TrailingIcon);\n\n return (\n <ButtonContainer\n ref={forwardedRef}\n className={css({\n p: 4,\n bg: 'neutral.quaternary',\n _hover: { bg: 'neutral.secondary' },\n })}\n borderRadius=\"0.5rem\"\n expand\n {...props}\n >\n <HStack justify=\"space-between\" w=\"full\">\n <HStack>\n {leadingIcon && {\n ...leadingIcon,\n props: {\n ...leadingIcon.props,\n className: !leadingIcon.props.color ? css({ color: 'brand.base' }) : undefined,\n
|
|
1
|
+
{"version":3,"file":"navigation-button.js","sources":["../../../../src/components/list-items/navigation-button.tsx"],"sourcesContent":["import { ButtonContainer } from '@components/containers';\nimport { IcoExternalLink } from '@components/icons';\nimport { Text } from '@components/primitives';\nimport { css } from '@styled/css';\nimport { Center, HStack, VStack } from '@styled/jsx';\nimport { token } from '@styled/tokens';\nimport { createHost, createSlot } from 'create-slots';\nimport { Children, cloneElement, forwardRef } from 'react';\nimport { AriaButtonProps } from 'react-aria';\n\nexport interface NavigationButtonProps extends AriaButtonProps {\n primaryLabel: string;\n secondaryLabel?: string;\n isExternalLink?: boolean;\n disabled?: boolean;\n}\n\nconst LeadingIcon = createSlot(({ children, ...props }) => {\n return (\n <Center>\n {Children.map(children, child => {\n return cloneElement(child, props);\n })}\n </Center>\n );\n});\n\nconst TrailingIcon = createSlot(({ children, ...props }) => {\n return (\n <Center>\n {Children.map(children, child => {\n return cloneElement(child, props);\n })}\n </Center>\n );\n});\n\nconst NavigationButtonBase = forwardRef<HTMLButtonElement, NavigationButtonProps>((props, forwardedRef) => {\n const { primaryLabel, secondaryLabel, isExternalLink } = props;\n\n return createHost(props.children, slots => {\n const leadingIcon = slots.get(LeadingIcon);\n const trailingIcon = slots.get(TrailingIcon);\n\n return (\n <ButtonContainer\n ref={forwardedRef}\n className={css({\n p: 4,\n bg: 'neutral.quaternary',\n _hover: { bg: 'neutral.secondary' },\n })}\n borderRadius=\"0.5rem\"\n expand\n {...props}\n >\n <HStack justify=\"space-between\" w=\"full\">\n <HStack>\n {leadingIcon && {\n ...leadingIcon,\n props: {\n height: 24,\n ...leadingIcon.props,\n className: !leadingIcon.props.color ? css({ color: 'brand.base' }) : undefined,\n },\n }}\n <VStack gap={0} alignItems=\"start\">\n <HStack>\n <Text fontWeight=\"medium\">{primaryLabel}</Text>\n {isExternalLink && <IcoExternalLink width={14} height={14} color={token('colors.neutral.primary')} />}\n </HStack>\n {secondaryLabel && (\n <Text size=\"sm\" fontColor=\"text.tertiary\">\n {secondaryLabel}\n </Text>\n )}\n </VStack>\n </HStack>\n <HStack>\n {trailingIcon && {\n ...trailingIcon,\n props: {\n ...trailingIcon.props,\n className: !trailingIcon.props.color ? css({ color: 'neutral.primary' }) : undefined,\n width: 16,\n height: 16,\n },\n }}\n </HStack>\n </HStack>\n </ButtonContainer>\n );\n });\n});\n\nNavigationButtonBase.displayName = 'NavigationButton';\n\nconst NavigationButton = Object.assign(NavigationButtonBase, { LeadingIcon, TrailingIcon });\n\nexport default NavigationButton;\n"],"names":["LeadingIcon","createSlot","children","props","_jsx","Center","Children","child","cloneElement","TrailingIcon","NavigationButtonBase","forwardRef","forwardedRef","primaryLabel","secondaryLabel","isExternalLink","createHost","slots","leadingIcon","trailingIcon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F,CAAA,EACRb,GACCV,EAACqB,EAAK,CAAA,KAAK,KAAK,UAAU,yBACvBX,CAAc,CAAA,CAElB,CAAA,CAAA,CACM,IAEXV,EAACmB,EAAM,CAAA,SACJJ,GAAgB,CACf,GAAGA,EACH,MAAO,CACL,GAAGA,EAAa,MAChB,UAAYA,EAAa,MAAM,MAA4C,OAApCE,EAAI,CAAE,MAAO,kBAAmB,EACvE,MAAO,GACP,OAAQ,EACT,EAEI,CAAA,CAAA,CAAA,CAAA,CAEK,CAAA,CAEtB,CAAC,CACH,CAAC,EAEDX,EAAqB,YAAc,mBAEnC,MAAMkB,EAAmB,OAAO,OAAOlB,EAAsB,CAAE,YAAAV,EAAa,aAAAS,CAAY,CAAE"}
|
|
@@ -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":"
|
|
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
|
-
|
|
8
|
-
|
|
7
|
+
swapLabel?: string;
|
|
8
|
+
swapDisabledLabel?: string;
|
|
9
9
|
onBuy?: () => void;
|
|
10
10
|
onSend?: () => void;
|
|
11
|
-
|
|
11
|
+
onSwap?: () => void;
|
|
12
12
|
}
|
|
13
|
-
export declare const Actions: ({ actionBox, buyLabel, buyDisabledLabel, sendLabel, sendDisabledLabel,
|
|
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,
|
|
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,
|
|
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,
|
|
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;
|