@rango-dev/ui 0.43.1-next.7 → 0.44.0
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/index.js +1 -1
- package/dist/index.js.map +3 -3
- package/dist/translations/af.d.ts.map +1 -1
- package/dist/translations/ar.d.ts.map +1 -1
- package/dist/translations/bn.d.ts.map +1 -1
- package/dist/translations/ca.d.ts.map +1 -1
- package/dist/translations/da.d.ts.map +1 -1
- package/dist/translations/de.d.ts.map +1 -1
- package/dist/translations/el.d.ts.map +1 -1
- package/dist/translations/en.d.ts.map +1 -1
- package/dist/translations/es.d.ts.map +1 -1
- package/dist/translations/fi.d.ts.map +1 -1
- package/dist/translations/fil.d.ts.map +1 -1
- package/dist/translations/fr.d.ts.map +1 -1
- package/dist/translations/hi.d.ts.map +1 -1
- package/dist/translations/hu.d.ts.map +1 -1
- package/dist/translations/id.d.ts.map +1 -1
- package/dist/translations/it.d.ts.map +1 -1
- package/dist/translations/ja.d.ts.map +1 -1
- package/dist/translations/ko.d.ts.map +1 -1
- package/dist/translations/lt.d.ts.map +1 -1
- package/dist/translations/ms.d.ts.map +1 -1
- package/dist/translations/nl.d.ts.map +1 -1
- package/dist/translations/pl.d.ts.map +1 -1
- package/dist/translations/pt.d.ts.map +1 -1
- package/dist/translations/ru.d.ts.map +1 -1
- package/dist/translations/sk.d.ts.map +1 -1
- package/dist/translations/sr.d.ts.map +1 -1
- package/dist/translations/sv.d.ts.map +1 -1
- package/dist/translations/sw.d.ts.map +1 -1
- package/dist/translations/th.d.ts.map +1 -1
- package/dist/translations/tr.d.ts.map +1 -1
- package/dist/translations/uk.d.ts.map +1 -1
- package/dist/translations/ur.d.ts.map +1 -1
- package/dist/translations/vi.d.ts.map +1 -1
- package/dist/translations/zh-CN.d.ts.map +1 -1
- package/dist/translations/zh-TW.d.ts.map +1 -1
- package/dist/ui.build.json +1 -1
- package/dist/widget/ui/src/components/Wallet/ClickableWallet.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/components/Wallet/ClickableWallet.tsx +40 -33
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClickableWallet.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Wallet/ClickableWallet.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGzD,OAAO,
|
|
1
|
+
{"version":3,"file":"ClickableWallet.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Wallet/ClickableWallet.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGzD,OAAO,KAAK,MAAM,OAAO,CAAC;AAkB1B,iBAAS,MAAM,CAAC,KAAK,EAAE,eAAe,qBA2DrC;AAED,eAAe,MAAM,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rango-dev/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.44.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"source": "./src/index.ts",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"@radix-ui/react-select": "^2.0.0",
|
|
54
54
|
"@radix-ui/react-switch": "^1.0.1",
|
|
55
55
|
"@radix-ui/react-tooltip": "^1.0.2",
|
|
56
|
-
"@rango-dev/wallets-shared": "^0.
|
|
56
|
+
"@rango-dev/wallets-shared": "^0.42.0",
|
|
57
57
|
"@stitches/react": "^1.2.8",
|
|
58
58
|
"copy-to-clipboard": "^3.3.3",
|
|
59
59
|
"rango-types": "^0.1.78",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { WalletPropTypes } from './Wallet.types.js';
|
|
2
2
|
|
|
3
3
|
import { detectInstallLink } from '@rango-dev/wallets-shared';
|
|
4
|
-
import React
|
|
4
|
+
import React from 'react';
|
|
5
5
|
|
|
6
6
|
import { Image } from '../common/index.js';
|
|
7
7
|
import { Divider } from '../Divider/index.js';
|
|
@@ -35,41 +35,48 @@ function Wallet(props: WalletPropTypes) {
|
|
|
35
35
|
);
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
const
|
|
38
|
+
const wrapComponentWithTooltip = (children: React.ReactNode) => {
|
|
39
|
+
if (disabled) {
|
|
40
|
+
return <>{children}</>;
|
|
41
|
+
}
|
|
42
|
+
return (
|
|
43
|
+
<Tooltip
|
|
44
|
+
container={props.container}
|
|
45
|
+
content={info.tooltipText}
|
|
46
|
+
side="top">
|
|
47
|
+
{children}
|
|
48
|
+
</Tooltip>
|
|
49
|
+
);
|
|
50
|
+
};
|
|
39
51
|
|
|
40
|
-
return (
|
|
41
|
-
<
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}}>
|
|
54
|
-
<WalletImageContainer>
|
|
55
|
-
<Image src={image} size={35} />
|
|
56
|
-
</WalletImageContainer>
|
|
52
|
+
return wrapComponentWithTooltip(
|
|
53
|
+
<WalletButton
|
|
54
|
+
disabled={props.state == WalletState.CONNECTING || disabled}
|
|
55
|
+
onClick={() => {
|
|
56
|
+
if (props.state === WalletState.NOT_INSTALLED) {
|
|
57
|
+
window.open(detectInstallLink(props.link), '_blank');
|
|
58
|
+
} else {
|
|
59
|
+
onClick(type);
|
|
60
|
+
}
|
|
61
|
+
}}>
|
|
62
|
+
<WalletImageContainer>
|
|
63
|
+
<Image src={image} size={35} />
|
|
64
|
+
</WalletImageContainer>
|
|
57
65
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
66
|
+
<Text>
|
|
67
|
+
<Title variant="label" size="medium" noWrap={false}>
|
|
68
|
+
{title}
|
|
69
|
+
</Title>
|
|
62
70
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
</WrapperComponent>
|
|
71
|
+
<Typography
|
|
72
|
+
variant="body"
|
|
73
|
+
size="xsmall"
|
|
74
|
+
noWrap={false}
|
|
75
|
+
color={info.color}>
|
|
76
|
+
{info.description}
|
|
77
|
+
</Typography>
|
|
78
|
+
</Text>
|
|
79
|
+
</WalletButton>
|
|
73
80
|
);
|
|
74
81
|
}
|
|
75
82
|
|