@magiclabs/ui-components 1.34.5 → 1.34.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/info/text-box.js +1 -1
- package/dist/cjs/components/info/text-box.js.map +1 -1
- package/dist/cjs/components/layouts/wallet-page/fiat.js +1 -1
- package/dist/cjs/components/layouts/wallet-page/fiat.js.map +1 -1
- package/dist/es/components/info/text-box.js +1 -1
- package/dist/es/components/info/text-box.js.map +1 -1
- package/dist/es/components/layouts/wallet-page/fiat.js +1 -1
- package/dist/es/components/layouts/wallet-page/fiat.js.map +1 -1
- package/dist/types/components/layouts/wallet-page/fiat.d.ts +2 -1
- package/dist/types/components/layouts/wallet-page/fiat.d.ts.map +1 -1
- package/dist/types/components/layouts/wallet-page/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),c=require("../containers/button.js");require("../containers/card.js"),require("@styled/css");var l=require("@styled/jsx"),a=require("@styled/tokens"),p=require("../icons/ico-checkmark.js"),v=require("../icons/ico-copy.js"),w=require("../icons/ico-eye-closed.js"),y=require("../icons/ico-eye-opened.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"),r=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");const q=x=>{const{content:t,onCopy:u,showHideButton:i,mono:f}=x,[o,n]=r.useState(!!i),[s,d]=r.useState(!1);r.useEffect(()=>{if(s){const j=setTimeout(()=>{d(!1)},1500);return()=>clearTimeout(j)}},[s]),r.useEffect(()=>{n(!!i)},[i]);const b=r.useCallback(()=>{u&&(u(t),d(!0))},[t]);return e.jsxs(l.HStack,{w:"full",px:4,py:3,rounded:10,bg:"surface.secondary",justifyContent:"space-between",position:"relative",children:[e.jsx(l.Box,{textWrap:"nowrap",overflow:"hidden",userSelect:o?"none":"auto",filter:o?"blur(10px)":"",children:f?e.jsx(h.default.Mono,{truncate:!0,children:t}):e.jsx(h.default,{truncate:!0,children:t})}),e.jsxs(l.HStack,{gap:3,children:[o&&e.jsx(c.ButtonContainer,{onPress:()=>n(!1),"aria-label":"show",children:e.jsx(
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),c=require("../containers/button.js");require("../containers/card.js"),require("@styled/css");var l=require("@styled/jsx"),a=require("@styled/tokens"),p=require("../icons/ico-checkmark.js"),v=require("../icons/ico-copy.js"),w=require("../icons/ico-eye-closed.js"),y=require("../icons/ico-eye-opened.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"),r=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");const q=x=>{const{content:t,onCopy:u,showHideButton:i,mono:f}=x,[o,n]=r.useState(!!i),[s,d]=r.useState(!1);r.useEffect(()=>{if(s){const j=setTimeout(()=>{d(!1)},1500);return()=>clearTimeout(j)}},[s]),r.useEffect(()=>{n(!!i)},[i]);const b=r.useCallback(()=>{u&&(u(t),d(!0))},[t]);return e.jsxs(l.HStack,{w:"full",px:4,py:3,rounded:10,bg:"surface.secondary",justifyContent:"space-between",position:"relative",children:[e.jsx(l.Box,{textWrap:"nowrap",overflow:"hidden",userSelect:o?"none":"auto",filter:o?"blur(10px)":"",children:f?e.jsx(h.default.Mono,{truncate:!0,children:t}):e.jsx(h.default,{truncate:!0,children:t})}),e.jsxs(l.HStack,{gap:3,children:[o&&e.jsx(c.ButtonContainer,{onPress:()=>n(!1),"aria-label":"show",children:e.jsx(w.default,{width:22,height:22,color:a.token("colors.brand.base")})}),i&&!o&&e.jsx(c.ButtonContainer,{onPress:()=>n(!0),"aria-label":"hide",children:e.jsx(y.default,{width:22,height:22,color:a.token("colors.brand.base")})}),u&&e.jsx(e.Fragment,{children:s?e.jsx(p.default,{width:22,height:22,color:a.token("colors.brand.base")}):e.jsx(c.ButtonContainer,{onPress:b,"aria-label":"copy",children:e.jsx(v.default,{width:22,height:22,color:a.token("colors.brand.base")})})})]})]})};q.displayName="TextBox",exports.default=q;
|
|
2
2
|
//# sourceMappingURL=text-box.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-box.js","sources":["../../../../src/components/info/text-box.tsx"],"sourcesContent":["import { ButtonContainer } from '@components/containers';\nimport { IcoCheckmark, IcoCopy, IcoEyeClosed, IcoEyeOpened } from '@components/icons';\nimport { Text } from '@components/primitives';\nimport { Box, HStack } from '@styled/jsx';\nimport { token } from '@styled/tokens';\nimport { useCallback, useEffect, useState } from 'react';\n\nexport interface TextBoxProps {\n content: string;\n onCopy?: (content: string) => void;\n showHideButton?: boolean;\n mono?: boolean;\n}\n\nconst TextBox = (props: TextBoxProps) => {\n const { content, onCopy, showHideButton, mono } = props;\n const [isHidden, setIsHidden] = useState(Boolean(showHideButton));\n const [isCopied, setIsCopied] = useState(false);\n\n useEffect(() => {\n if (isCopied) {\n const timeoutId = setTimeout(() => {\n setIsCopied(false);\n }, 1500);\n\n return () => clearTimeout(timeoutId);\n }\n }, [isCopied]);\n\n useEffect(() => {\n if (showHideButton) {\n setIsHidden(true);\n } else {\n setIsHidden(false);\n }\n }, [showHideButton]);\n\n const handleOnCopy = useCallback(() => {\n if (!onCopy) return;\n onCopy(content);\n setIsCopied(true);\n }, [content]);\n\n return (\n <HStack\n w=\"full\"\n px={4}\n py={3}\n rounded={10}\n bg=\"surface.secondary\"\n justifyContent=\"space-between\"\n position=\"relative\"\n >\n <Box\n textWrap=\"nowrap\"\n overflow=\"hidden\"\n userSelect={isHidden ? 'none' : 'auto'}\n filter={isHidden ? 'blur(10px)' : ''}\n >\n {mono ? <Text.Mono truncate>{content}</Text.Mono> : <Text truncate>{content}</Text>}\n </Box>\n\n <HStack gap={3}>\n {isHidden && (\n <ButtonContainer onPress={() => setIsHidden(false)} aria-label=\"show\">\n <
|
|
1
|
+
{"version":3,"file":"text-box.js","sources":["../../../../src/components/info/text-box.tsx"],"sourcesContent":["import { ButtonContainer } from '@components/containers';\nimport { IcoCheckmark, IcoCopy, IcoEyeClosed, IcoEyeOpened } from '@components/icons';\nimport { Text } from '@components/primitives';\nimport { Box, HStack } from '@styled/jsx';\nimport { token } from '@styled/tokens';\nimport { useCallback, useEffect, useState } from 'react';\n\nexport interface TextBoxProps {\n content: string;\n onCopy?: (content: string) => void;\n showHideButton?: boolean;\n mono?: boolean;\n}\n\nconst TextBox = (props: TextBoxProps) => {\n const { content, onCopy, showHideButton, mono } = props;\n const [isHidden, setIsHidden] = useState(Boolean(showHideButton));\n const [isCopied, setIsCopied] = useState(false);\n\n useEffect(() => {\n if (isCopied) {\n const timeoutId = setTimeout(() => {\n setIsCopied(false);\n }, 1500);\n\n return () => clearTimeout(timeoutId);\n }\n }, [isCopied]);\n\n useEffect(() => {\n if (showHideButton) {\n setIsHidden(true);\n } else {\n setIsHidden(false);\n }\n }, [showHideButton]);\n\n const handleOnCopy = useCallback(() => {\n if (!onCopy) return;\n onCopy(content);\n setIsCopied(true);\n }, [content]);\n\n return (\n <HStack\n w=\"full\"\n px={4}\n py={3}\n rounded={10}\n bg=\"surface.secondary\"\n justifyContent=\"space-between\"\n position=\"relative\"\n >\n <Box\n textWrap=\"nowrap\"\n overflow=\"hidden\"\n userSelect={isHidden ? 'none' : 'auto'}\n filter={isHidden ? 'blur(10px)' : ''}\n >\n {mono ? <Text.Mono truncate>{content}</Text.Mono> : <Text truncate>{content}</Text>}\n </Box>\n\n <HStack gap={3}>\n {isHidden && (\n <ButtonContainer onPress={() => setIsHidden(false)} aria-label=\"show\">\n <IcoEyeClosed width={22} height={22} color={token('colors.brand.base')} />\n </ButtonContainer>\n )}\n {showHideButton && !isHidden && (\n <ButtonContainer onPress={() => setIsHidden(true)} aria-label=\"hide\">\n <IcoEyeOpened width={22} height={22} color={token('colors.brand.base')} />\n </ButtonContainer>\n )}\n {onCopy && (\n <>\n {isCopied ? (\n <IcoCheckmark width={22} height={22} color={token('colors.brand.base')} />\n ) : (\n <ButtonContainer onPress={handleOnCopy} aria-label=\"copy\">\n <IcoCopy width={22} height={22} color={token('colors.brand.base')} />\n </ButtonContainer>\n )}\n </>\n )}\n </HStack>\n </HStack>\n );\n};\n\nTextBox.displayName = 'TextBox';\n\nexport default TextBox;\n"],"names":["TextBox","props","content","onCopy","showHideButton","mono","isHidden","setIsHidden","useState","isCopied","setIsCopied","useEffect","timeoutId","handleOnCopy","useCallback","_jsxs","HStack","_jsx","Box","Text","ButtonContainer","IcoEyeClosed","token","IcoEyeOpened","_Fragment","IcoCheckmark","IcoCopy"],"mappings":"q9BAcMA,MAAAA,EAAWC,GAAuB,CACtC,KAAM,CAAE,QAAAC,EAAS,OAAAC,EAAQ,eAAAC,EAAgB,KAAAC,CAAI,EAAKJ,EAC5C,CAACK,EAAUC,CAAW,EAAIC,EAAS,SAAA,CAAA,CAAQJ,CAAe,EAC1D,CAACK,EAAUC,CAAW,EAAIF,WAAS,EAAK,EAE9CG,EAAAA,UAAU,IAAK,CACb,GAAIF,EAAU,CACZ,MAAMG,EAAY,WAAW,IAAK,CAChCF,EAAY,EAAK,CACnB,EAAG,IAAI,EAEP,MAAO,IAAM,aAAaE,CAAS,CACrC,CACF,EAAG,CAACH,CAAQ,CAAC,EAEbE,EAAU,UAAA,IAAK,CAEXJ,EADE,EAAAH,CACc,CAIpB,EAAG,CAACA,CAAc,CAAC,EAEnB,MAAMS,EAAeC,EAAY,YAAA,IAAK,C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,EAAAA,MAAM,mBAAmB,CAAK,CAAA,CAAA,CAAA,CAExE,CAAA,CAEJ,CAAA,CAAA,CACM,CACF,CAAA,CAEb,EAEAtB,EAAQ,YAAc"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var t=require("react/jsx-runtime"),i=require("../../primitives/text.js"),
|
|
1
|
+
"use strict";var t=require("react/jsx-runtime"),i=require("../../primitives/text.js"),a=require("@styled/jsx");const n=({fiatTotal:e,symbol:l})=>{const s=e?String(e).split("."):["0","00"],r=e?"text.primary":"text.tertiary";return t.jsxs(a.HStack,{alignItems:"flex-start",gap:1,my:3,children:[t.jsx(i.default.H4,{fontColor:r,styles:{lineHeight:"2.75rem"},children:l}),t.jsxs(a.HStack,{alignItems:"baseline",gap:0,children:[t.jsx(i.default.H1,{fontColor:r,children:s[0]}),t.jsx(i.default.H4,{fontColor:r,children:`.${s[1]||"00"}`})]})]})};exports.Fiat=n;
|
|
2
2
|
//# sourceMappingURL=fiat.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fiat.js","sources":["../../../../../src/components/layouts/wallet-page/fiat.tsx"],"sourcesContent":["import Text from '@components/primitives/text';\nimport { HStack } from '@styled/jsx';\n\nexport interface FiatProps {\n fiatTotal?: number;\n}\n\nexport const Fiat = ({ fiatTotal }: FiatProps) => {\n const fiat = fiatTotal ? fiatTotal
|
|
1
|
+
{"version":3,"file":"fiat.js","sources":["../../../../../src/components/layouts/wallet-page/fiat.tsx"],"sourcesContent":["import Text from '@components/primitives/text';\nimport { HStack } from '@styled/jsx';\n\nexport interface FiatProps {\n fiatTotal?: number;\n symbol?: string;\n}\n\nexport const Fiat = ({ fiatTotal, symbol }: FiatProps) => {\n const fiat = fiatTotal ? String(fiatTotal).split('.') : ['0', '00'];\n const fiatColor = fiatTotal ? 'text.primary' : 'text.tertiary';\n\n return (\n <HStack alignItems=\"flex-start\" gap={1} my={3}>\n <Text.H4 fontColor={fiatColor} styles={{ lineHeight: '2.75rem' }}>\n {symbol}\n </Text.H4>\n <HStack alignItems=\"baseline\" gap={0}>\n <Text.H1 fontColor={fiatColor}>{fiat[0]}</Text.H1>\n <Text.H4 fontColor={fiatColor}>{`.${fiat[1] || '00'}`}</Text.H4>\n </HStack>\n </HStack>\n );\n};\n"],"names":["Fiat","fiatTotal","symbol","fiat","fiatColor","_jsxs","HStack","_jsx","Text"],"mappings":"+GAQa,MAAAA,EAAO,CAAC,CAAE,UAAAC,EAAW,OAAAC,CAAmB,IAAI,CACvD,MAAMC,EAAOF,EAAY,OAAOA,CAAS,EAAE,MAAM,GAAG,EAAI,CAAC,IAAK,IAAI,EAC5DG,EAAYH,EAAY,eAAiB,gBAE/C,OACEI,EAAAA,KAACC,EAAAA,OAAO,CAAA,WAAW,aAAa,IAAK,EAAG,GAAI,EAAC,SAAA,CAC3CC,EAAAA,IAACC,EAAAA,QAAK,GAAE,CAAC,UAAWJ,EAAW,OAAQ,CAAE,WAAY,SAAS,WAC3DF,CAAM,CAAA,EAETG,EAAAA,KAACC,UAAO,WAAW,WAAW,IAAK,YACjCC,MAACC,EAAAA,QAAK,GAAE,CAAC,UAAWJ,EAAY,SAAAD,EAAK,CAAC,IACtCI,MAACC,EAAAA,QAAK,GAAG,CAAA,UAAWJ,EAAS,SAAG,IAAID,EAAK,CAAC,GAAK,IAAI,IAAa,CACzD,CAAA,CAAA,CAAA,CAAA,CAGf"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsxs as l,jsx as o,Fragment as y}from"react/jsx-runtime";import{ButtonContainer as p}from"../containers/button.js";import"../containers/card.js";import"@styled/css";import{HStack as s,Box as B}from"@styled/jsx";import{token as i}from"@styled/tokens";import C from"../icons/ico-checkmark.js";import $ from"../icons/ico-copy.js";import j from"../icons/ico-eye-closed.js";import k from"../icons/ico-eye-opened.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{useState as h,useEffect as f,useCallback as P}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";const u=b=>{const{content:r,onCopy:n,showHideButton:t,mono:w}=b,[e,m]=h(!!t),[a,c]=h(!1);f(()=>{if(a){const g=setTimeout(()=>{c(!1)},1500);return()=>clearTimeout(g)}},[a]),f(()=>{m(!!t)},[t]);const x=P(()=>{n&&(n(r),c(!0))},[r]);return l(s,{w:"full",px:4,py:3,rounded:10,bg:"surface.secondary",justifyContent:"space-between",position:"relative",children:[o(B,{textWrap:"nowrap",overflow:"hidden",userSelect:e?"none":"auto",filter:e?"blur(10px)":"",children:w?o(d.Mono,{truncate:!0,children:r}):o(d,{truncate:!0,children:r})}),l(s,{gap:3,children:[e&&o(p,{onPress:()=>m(!1),"aria-label":"show",children:o(
|
|
1
|
+
import{jsxs as l,jsx as o,Fragment as y}from"react/jsx-runtime";import{ButtonContainer as p}from"../containers/button.js";import"../containers/card.js";import"@styled/css";import{HStack as s,Box as B}from"@styled/jsx";import{token as i}from"@styled/tokens";import C from"../icons/ico-checkmark.js";import $ from"../icons/ico-copy.js";import j from"../icons/ico-eye-closed.js";import k from"../icons/ico-eye-opened.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{useState as h,useEffect as f,useCallback as P}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";const u=b=>{const{content:r,onCopy:n,showHideButton:t,mono:w}=b,[e,m]=h(!!t),[a,c]=h(!1);f(()=>{if(a){const g=setTimeout(()=>{c(!1)},1500);return()=>clearTimeout(g)}},[a]),f(()=>{m(!!t)},[t]);const x=P(()=>{n&&(n(r),c(!0))},[r]);return l(s,{w:"full",px:4,py:3,rounded:10,bg:"surface.secondary",justifyContent:"space-between",position:"relative",children:[o(B,{textWrap:"nowrap",overflow:"hidden",userSelect:e?"none":"auto",filter:e?"blur(10px)":"",children:w?o(d.Mono,{truncate:!0,children:r}):o(d,{truncate:!0,children:r})}),l(s,{gap:3,children:[e&&o(p,{onPress:()=>m(!1),"aria-label":"show",children:o(j,{width:22,height:22,color:i("colors.brand.base")})}),t&&!e&&o(p,{onPress:()=>m(!0),"aria-label":"hide",children:o(k,{width:22,height:22,color:i("colors.brand.base")})}),n&&o(y,{children:a?o(C,{width:22,height:22,color:i("colors.brand.base")}):o(p,{onPress:x,"aria-label":"copy",children:o($,{width:22,height:22,color:i("colors.brand.base")})})})]})]})};u.displayName="TextBox";export{u as default};
|
|
2
2
|
//# sourceMappingURL=text-box.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-box.js","sources":["../../../../src/components/info/text-box.tsx"],"sourcesContent":["import { ButtonContainer } from '@components/containers';\nimport { IcoCheckmark, IcoCopy, IcoEyeClosed, IcoEyeOpened } from '@components/icons';\nimport { Text } from '@components/primitives';\nimport { Box, HStack } from '@styled/jsx';\nimport { token } from '@styled/tokens';\nimport { useCallback, useEffect, useState } from 'react';\n\nexport interface TextBoxProps {\n content: string;\n onCopy?: (content: string) => void;\n showHideButton?: boolean;\n mono?: boolean;\n}\n\nconst TextBox = (props: TextBoxProps) => {\n const { content, onCopy, showHideButton, mono } = props;\n const [isHidden, setIsHidden] = useState(Boolean(showHideButton));\n const [isCopied, setIsCopied] = useState(false);\n\n useEffect(() => {\n if (isCopied) {\n const timeoutId = setTimeout(() => {\n setIsCopied(false);\n }, 1500);\n\n return () => clearTimeout(timeoutId);\n }\n }, [isCopied]);\n\n useEffect(() => {\n if (showHideButton) {\n setIsHidden(true);\n } else {\n setIsHidden(false);\n }\n }, [showHideButton]);\n\n const handleOnCopy = useCallback(() => {\n if (!onCopy) return;\n onCopy(content);\n setIsCopied(true);\n }, [content]);\n\n return (\n <HStack\n w=\"full\"\n px={4}\n py={3}\n rounded={10}\n bg=\"surface.secondary\"\n justifyContent=\"space-between\"\n position=\"relative\"\n >\n <Box\n textWrap=\"nowrap\"\n overflow=\"hidden\"\n userSelect={isHidden ? 'none' : 'auto'}\n filter={isHidden ? 'blur(10px)' : ''}\n >\n {mono ? <Text.Mono truncate>{content}</Text.Mono> : <Text truncate>{content}</Text>}\n </Box>\n\n <HStack gap={3}>\n {isHidden && (\n <ButtonContainer onPress={() => setIsHidden(false)} aria-label=\"show\">\n <
|
|
1
|
+
{"version":3,"file":"text-box.js","sources":["../../../../src/components/info/text-box.tsx"],"sourcesContent":["import { ButtonContainer } from '@components/containers';\nimport { IcoCheckmark, IcoCopy, IcoEyeClosed, IcoEyeOpened } from '@components/icons';\nimport { Text } from '@components/primitives';\nimport { Box, HStack } from '@styled/jsx';\nimport { token } from '@styled/tokens';\nimport { useCallback, useEffect, useState } from 'react';\n\nexport interface TextBoxProps {\n content: string;\n onCopy?: (content: string) => void;\n showHideButton?: boolean;\n mono?: boolean;\n}\n\nconst TextBox = (props: TextBoxProps) => {\n const { content, onCopy, showHideButton, mono } = props;\n const [isHidden, setIsHidden] = useState(Boolean(showHideButton));\n const [isCopied, setIsCopied] = useState(false);\n\n useEffect(() => {\n if (isCopied) {\n const timeoutId = setTimeout(() => {\n setIsCopied(false);\n }, 1500);\n\n return () => clearTimeout(timeoutId);\n }\n }, [isCopied]);\n\n useEffect(() => {\n if (showHideButton) {\n setIsHidden(true);\n } else {\n setIsHidden(false);\n }\n }, [showHideButton]);\n\n const handleOnCopy = useCallback(() => {\n if (!onCopy) return;\n onCopy(content);\n setIsCopied(true);\n }, [content]);\n\n return (\n <HStack\n w=\"full\"\n px={4}\n py={3}\n rounded={10}\n bg=\"surface.secondary\"\n justifyContent=\"space-between\"\n position=\"relative\"\n >\n <Box\n textWrap=\"nowrap\"\n overflow=\"hidden\"\n userSelect={isHidden ? 'none' : 'auto'}\n filter={isHidden ? 'blur(10px)' : ''}\n >\n {mono ? <Text.Mono truncate>{content}</Text.Mono> : <Text truncate>{content}</Text>}\n </Box>\n\n <HStack gap={3}>\n {isHidden && (\n <ButtonContainer onPress={() => setIsHidden(false)} aria-label=\"show\">\n <IcoEyeClosed width={22} height={22} color={token('colors.brand.base')} />\n </ButtonContainer>\n )}\n {showHideButton && !isHidden && (\n <ButtonContainer onPress={() => setIsHidden(true)} aria-label=\"hide\">\n <IcoEyeOpened width={22} height={22} color={token('colors.brand.base')} />\n </ButtonContainer>\n )}\n {onCopy && (\n <>\n {isCopied ? (\n <IcoCheckmark width={22} height={22} color={token('colors.brand.base')} />\n ) : (\n <ButtonContainer onPress={handleOnCopy} aria-label=\"copy\">\n <IcoCopy width={22} height={22} color={token('colors.brand.base')} />\n </ButtonContainer>\n )}\n </>\n )}\n </HStack>\n </HStack>\n );\n};\n\nTextBox.displayName = 'TextBox';\n\nexport default TextBox;\n"],"names":["TextBox","props","content","onCopy","showHideButton","mono","isHidden","setIsHidden","useState","isCopied","setIsCopied","useEffect","timeoutId","handleOnCopy","useCallback","_jsxs","HStack","_jsx","Box","Text","ButtonContainer","IcoEyeClosed","token","IcoEyeOpened","_Fragment","IcoCheckmark","IcoCopy"],"mappings":"m+BAcMA,MAAAA,EAAWC,GAAuB,CACtC,KAAM,CAAE,QAAAC,EAAS,OAAAC,EAAQ,eAAAC,EAAgB,KAAAC,CAAI,EAAKJ,EAC5C,CAACK,EAAUC,CAAW,EAAIC,EAAS,CAAA,CAAQJ,CAAe,EAC1D,CAACK,EAAUC,CAAW,EAAIF,EAAS,EAAK,EAE9CG,EAAU,IAAK,CACb,GAAIF,EAAU,CACZ,MAAMG,EAAY,WAAW,IAAK,CAChCF,EAAY,EAAK,CACnB,EAAG,IAAI,EAEP,MAAO,IAAM,aAAaE,CAAS,CACrC,CACF,EAAG,CAACH,CAAQ,CAAC,EAEbE,EAA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,CAAA,CAAA,CACM,CACF,CAAA,CAEb,EAEAtB,EAAQ,YAAc"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsxs as l,jsx as i}from"react/jsx-runtime";import o from"../../primitives/text.js";import{HStack as n}from"@styled/jsx";const a=({fiatTotal:t})=>{const e=t?t
|
|
1
|
+
import{jsxs as l,jsx as i}from"react/jsx-runtime";import o from"../../primitives/text.js";import{HStack as n}from"@styled/jsx";const a=({fiatTotal:t,symbol:s})=>{const e=t?String(t).split("."):["0","00"],r=t?"text.primary":"text.tertiary";return l(n,{alignItems:"flex-start",gap:1,my:3,children:[i(o.H4,{fontColor:r,styles:{lineHeight:"2.75rem"},children:s}),l(n,{alignItems:"baseline",gap:0,children:[i(o.H1,{fontColor:r,children:e[0]}),i(o.H4,{fontColor:r,children:`.${e[1]||"00"}`})]})]})};export{a as Fiat};
|
|
2
2
|
//# sourceMappingURL=fiat.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fiat.js","sources":["../../../../../src/components/layouts/wallet-page/fiat.tsx"],"sourcesContent":["import Text from '@components/primitives/text';\nimport { HStack } from '@styled/jsx';\n\nexport interface FiatProps {\n fiatTotal?: number;\n}\n\nexport const Fiat = ({ fiatTotal }: FiatProps) => {\n const fiat = fiatTotal ? fiatTotal
|
|
1
|
+
{"version":3,"file":"fiat.js","sources":["../../../../../src/components/layouts/wallet-page/fiat.tsx"],"sourcesContent":["import Text from '@components/primitives/text';\nimport { HStack } from '@styled/jsx';\n\nexport interface FiatProps {\n fiatTotal?: number;\n symbol?: string;\n}\n\nexport const Fiat = ({ fiatTotal, symbol }: FiatProps) => {\n const fiat = fiatTotal ? String(fiatTotal).split('.') : ['0', '00'];\n const fiatColor = fiatTotal ? 'text.primary' : 'text.tertiary';\n\n return (\n <HStack alignItems=\"flex-start\" gap={1} my={3}>\n <Text.H4 fontColor={fiatColor} styles={{ lineHeight: '2.75rem' }}>\n {symbol}\n </Text.H4>\n <HStack alignItems=\"baseline\" gap={0}>\n <Text.H1 fontColor={fiatColor}>{fiat[0]}</Text.H1>\n <Text.H4 fontColor={fiatColor}>{`.${fiat[1] || '00'}`}</Text.H4>\n </HStack>\n </HStack>\n );\n};\n"],"names":["Fiat","fiatTotal","symbol","fiat","fiatColor","_jsxs","HStack","_jsx","Text"],"mappings":"+HAQa,MAAAA,EAAO,CAAC,CAAE,UAAAC,EAAW,OAAAC,CAAmB,IAAI,CACvD,MAAMC,EAAOF,EAAY,OAAOA,CAAS,EAAE,MAAM,GAAG,EAAI,CAAC,IAAK,IAAI,EAC5DG,EAAYH,EAAY,eAAiB,gBAE/C,OACEI,EAACC,EAAO,CAAA,WAAW,aAAa,IAAK,EAAG,GAAI,EAAC,SAAA,CAC3CC,EAACC,EAAK,GAAE,CAAC,UAAWJ,EAAW,OAAQ,CAAE,WAAY,SAAS,WAC3DF,CAAM,CAAA,EAETG,EAACC,GAAO,WAAW,WAAW,IAAK,YACjCC,EAACC,EAAK,GAAE,CAAC,UAAWJ,EAAY,SAAAD,EAAK,CAAC,IACtCI,EAACC,EAAK,GAAG,CAAA,UAAWJ,EAAS,SAAG,IAAID,EAAK,CAAC,GAAK,IAAI,IAAa,CACzD,CAAA,CAAA,CAAA,CAAA,CAGf"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export interface FiatProps {
|
|
2
2
|
fiatTotal?: number;
|
|
3
|
+
symbol?: string;
|
|
3
4
|
}
|
|
4
|
-
export declare const Fiat: ({ fiatTotal }: FiatProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare const Fiat: ({ fiatTotal, symbol }: FiatProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
6
|
//# sourceMappingURL=fiat.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fiat.d.ts","sourceRoot":"","sources":["../../../../../src/components/layouts/wallet-page/fiat.tsx"],"names":[],"mappings":"AAGA,MAAM,WAAW,SAAS;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"fiat.d.ts","sourceRoot":"","sources":["../../../../../src/components/layouts/wallet-page/fiat.tsx"],"names":[],"mappings":"AAGA,MAAM,WAAW,SAAS;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,IAAI,0BAA2B,SAAS,4CAepD,CAAC"}
|
|
@@ -7,7 +7,7 @@ export declare const WalletPage: (({ children, ...props }: WalletPageProps) => J
|
|
|
7
7
|
Address: ({ address, onAddressCopy }: import("./address").AddressProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
ConnectionMenu: ({ connected, connectedLabel, disconnectLabel, disconnectedLabel, domain, logoUrl, onDisconnect, }: import("./connection-menu").ConnectionMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
Content: ({ children }: any) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
Fiat: ({ fiatTotal }: import("./fiat").FiatProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
Fiat: ({ fiatTotal, symbol }: import("./fiat").FiatProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
Navigation: ({ active, onActivity, onGallery, onHome, onSettings, }: import("../../sections/wallet-navigation").WalletNavigationProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
};
|
|
13
13
|
//# sourceMappingURL=index.d.ts.map
|