@rango-dev/widget-embedded 0.25.1-next.2 → 0.25.1-next.4

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.
Files changed (25) hide show
  1. package/dist/components/ConfirmWalletsModal/ConfirmWallets.styles.d.ts.map +1 -1
  2. package/dist/components/CustomCollapsible/CustomCollapsible.styles.d.ts.map +1 -1
  3. package/dist/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.d.ts.map +1 -1
  4. package/dist/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.types.d.ts +1 -0
  5. package/dist/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.types.d.ts.map +1 -1
  6. package/dist/components/SwapDetails/SwapDetails.d.ts.map +1 -1
  7. package/dist/components/TokenList/TokenList.d.ts.map +1 -1
  8. package/dist/components/TokenList/TokenList.styles.d.ts +162 -0
  9. package/dist/components/TokenList/TokenList.styles.d.ts.map +1 -1
  10. package/dist/index.js +2 -2
  11. package/dist/index.js.map +3 -3
  12. package/dist/pages/ConfirmSwapPage.d.ts.map +1 -1
  13. package/dist/pages/Home.d.ts.map +1 -1
  14. package/package.json +6 -6
  15. package/src/components/ConfirmWalletsModal/ConfirmWallets.styles.ts +3 -2
  16. package/src/components/CustomCollapsible/CustomCollapsible.styles.ts +1 -0
  17. package/src/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.tsx +4 -0
  18. package/src/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.types.ts +1 -0
  19. package/src/components/RefreshModal/RefreshModal.tsx +2 -2
  20. package/src/components/SwapDetails/SwapDetails.styles.ts +1 -1
  21. package/src/components/SwapDetails/SwapDetails.tsx +9 -7
  22. package/src/components/TokenList/TokenList.styles.ts +7 -0
  23. package/src/components/TokenList/TokenList.tsx +9 -7
  24. package/src/pages/ConfirmSwapPage.tsx +1 -17
  25. package/src/pages/Home.tsx +1 -0
@@ -1 +1 @@
1
- {"version":3,"file":"ConfirmSwapPage.d.ts","sourceRoot":"","sources":["../../src/pages/ConfirmSwapPage.tsx"],"names":[],"mappings":"AAoBA,OAAO,KAAuD,MAAM,OAAO,CAAC;AAmD5E,wBAAgB,eAAe,sBAuU9B"}
1
+ {"version":3,"file":"ConfirmSwapPage.d.ts","sourceRoot":"","sources":["../../src/pages/ConfirmSwapPage.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAuD,MAAM,OAAO,CAAC;AAiD5E,wBAAgB,eAAe,sBA2T9B"}
@@ -1 +1 @@
1
- {"version":3,"file":"Home.d.ts","sourceRoot":"","sources":["../../src/pages/Home.tsx"],"names":[],"mappings":"AAKA,OAAO,KAA8B,MAAM,OAAO,CAAC;AA4BnD,eAAO,MAAM,6BAA6B,MAAM,CAAC;AAEjD,wBAAgB,IAAI,sBAyMnB"}
1
+ {"version":3,"file":"Home.d.ts","sourceRoot":"","sources":["../../src/pages/Home.tsx"],"names":[],"mappings":"AAKA,OAAO,KAA8B,MAAM,OAAO,CAAC;AA4BnD,eAAO,MAAM,6BAA6B,MAAM,CAAC;AAEjD,wBAAgB,IAAI,sBA0MnB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rango-dev/widget-embedded",
3
- "version": "0.25.1-next.2",
3
+ "version": "0.25.1-next.4",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "source": "./src/index.ts",
@@ -25,13 +25,13 @@
25
25
  "@lingui/core": "4.2.1",
26
26
  "@lingui/react": "4.2.1",
27
27
  "@rango-dev/logging-core": "^0.2.0",
28
- "@rango-dev/provider-all": "^0.30.1-next.1",
28
+ "@rango-dev/provider-all": "^0.30.1-next.3",
29
29
  "@rango-dev/queue-manager-core": "^0.26.0",
30
- "@rango-dev/queue-manager-rango-preset": "^0.30.0",
30
+ "@rango-dev/queue-manager-rango-preset": "^0.30.1-next.1",
31
31
  "@rango-dev/queue-manager-react": "^0.26.0",
32
- "@rango-dev/ui": "^0.31.0",
33
- "@rango-dev/wallets-react": "^0.16.0",
34
- "@rango-dev/wallets-shared": "^0.30.0",
32
+ "@rango-dev/ui": "^0.31.1-next.0",
33
+ "@rango-dev/wallets-react": "^0.16.1-next.0",
34
+ "@rango-dev/wallets-shared": "^0.30.1-next.0",
35
35
  "bignumber.js": "^9.1.1",
36
36
  "copy-to-clipboard": "^3.3.3",
37
37
  "dayjs": "^1.11.7",
@@ -104,7 +104,7 @@ export const CustomDestination = styled('div', {
104
104
  backgroundColor: '$neutral100',
105
105
  },
106
106
  '& .collapsible_root': {
107
- backgroundColor: '$neutral200',
107
+ backgroundColor: '$neutral100',
108
108
  },
109
109
  });
110
110
 
@@ -135,7 +135,8 @@ export const CustomDestinationButton = styled('div', {
135
135
  $$color: '$colors$neutral300',
136
136
  },
137
137
  backgroundColor: '$$color',
138
-
138
+ borderBottomRightRadius: '0',
139
+ borderBottomLeftRadius: '0',
139
140
  '&:hover': {
140
141
  $$color: '$colors$info100',
141
142
  [`.${darkTheme} &`]: {
@@ -23,6 +23,7 @@ const slideUp = keyframes({
23
23
 
24
24
  export const CollapsibleRoot = styled(Collapsible.Root, {
25
25
  borderRadius: '$sm',
26
+ overflow: 'hidden',
26
27
  variants: {
27
28
  selected: {
28
29
  true: {
@@ -17,6 +17,7 @@ export function QuoteWarningsAndErrors(props: PropTypes) {
17
17
  const {
18
18
  warning,
19
19
  error,
20
+ couldChangeSettings,
20
21
  showWarningModal,
21
22
  confirmationDisabled,
22
23
  refetchQuote,
@@ -44,6 +45,9 @@ export function QuoteWarningsAndErrors(props: PropTypes) {
44
45
  ? error
45
46
  : null
46
47
  );
48
+ if (alertInfo && !couldChangeSettings) {
49
+ alertInfo.action = null;
50
+ }
47
51
 
48
52
  const showAlerts = !!alertInfo;
49
53
 
@@ -5,6 +5,7 @@ export interface PropTypes {
5
5
  warning: QuoteWarning | null;
6
6
  showWarningModal: boolean;
7
7
  confirmationDisabled: boolean;
8
+ couldChangeSettings: boolean;
8
9
  refetchQuote: () => void;
9
10
  onOpenWarningModal: () => void;
10
11
  onCloseWarningModal: () => void;
@@ -19,9 +19,9 @@ export function RefreshModal(props: PropTypes) {
19
19
  onClose={onClose}
20
20
  container={getContainer()}>
21
21
  <MessageBox
22
- title={i18n.t('Something wrong')}
22
+ title={i18n.t('Something went wrong')}
23
23
  type="error"
24
- description={i18n.t('Something Wrong. Please refresh the app')}>
24
+ description={i18n.t('Something went wrong. Please refresh the app.')}>
25
25
  <Divider size={30} />
26
26
  <RefreshButton
27
27
  variant="outlined"
@@ -92,5 +92,5 @@ export const ErrorMessages = styled('div', {
92
92
  gap: '$5',
93
93
  });
94
94
  export const MessageText = styled(Typography, {
95
- wordBreak: 'break-all',
95
+ wordBreak: 'break-word',
96
96
  });
@@ -253,13 +253,15 @@ export function SwapDetails(props: SwapDetailsProps) {
253
253
  })}`
254
254
  : ''}
255
255
  </Typography>
256
- <MessageText
257
- align="center"
258
- variant="body"
259
- size="medium"
260
- color="neutral700">
261
- {stepDetailMessage}
262
- </MessageText>
256
+ {stepDetailMessage && (
257
+ <MessageText
258
+ align="center"
259
+ variant="body"
260
+ size="medium"
261
+ color="neutral700">
262
+ <b>Reason:</b> {stepDetailMessage}
263
+ </MessageText>
264
+ )}
263
265
  </ErrorMessages>
264
266
  );
265
267
 
@@ -30,6 +30,7 @@ export const tokenTitleStyles = css({
30
30
  export const tokenAddressStyles = css({
31
31
  transform: 'translateY(12px)',
32
32
  visibility: 'hidden',
33
+ display: 'flex',
33
34
  '& a': {
34
35
  display: 'flex',
35
36
  justifyContent: 'center',
@@ -157,3 +158,9 @@ export const TokenBalance = styled(Typography, {
157
158
  textOverflow: 'ellipsis',
158
159
  whiteSpace: 'nowrap',
159
160
  });
161
+
162
+ export const StyledLink = styled('a', {
163
+ '& svg:hover': {
164
+ color: '$colors$info',
165
+ },
166
+ });
@@ -31,6 +31,7 @@ import {
31
31
  ImageSection,
32
32
  List,
33
33
  Pin,
34
+ StyledLink,
34
35
  Tag,
35
36
  TagTitle,
36
37
  Title,
@@ -72,17 +73,17 @@ const renderDesc = (props: RenderDescProps) => {
72
73
  className={`${tokenAddressStyles()} ${
73
74
  !name && tokenWithoutNameStyles()
74
75
  }`}>
75
- <a
76
+ {length > 10
77
+ ? `${address.slice(0, 5)}...${address.slice(length - 6, length)}`
78
+ : address}{' '}
79
+ <Divider size={4} direction="horizontal" />
80
+ <StyledLink
76
81
  href={url}
77
82
  target="_blank"
78
83
  rel="nofollow noreferrer"
79
84
  onClick={(e) => e.stopPropagation()}>
80
- {length > 10
81
- ? `${address.slice(0, 5)}...${address.slice(length - 6, length)}`
82
- : address}{' '}
83
- <Divider size={4} direction="horizontal" />
84
- <ExternalLinkIcon color="gray" size={12} />
85
- </a>
85
+ <ExternalLinkIcon size={12} />
86
+ </StyledLink>
86
87
  </div>
87
88
  )}
88
89
  </div>
@@ -164,6 +165,7 @@ export function TokenList(props: PropTypes) {
164
165
  style={{
165
166
  width: '100%',
166
167
  overflow: 'hidden',
168
+ height: '60px',
167
169
  }}
168
170
  tab-index={index}
169
171
  key={`${token.symbol}${token.address}`}
@@ -12,9 +12,7 @@ import {
12
12
  css,
13
13
  Divider,
14
14
  IconButton,
15
- SettingsIcon,
16
15
  styled,
17
- Tooltip,
18
16
  Typography,
19
17
  WalletIcon,
20
18
  } from '@rango-dev/ui';
@@ -24,7 +22,6 @@ import { useLocation, useNavigate } from 'react-router-dom';
24
22
 
25
23
  import { getRequiredWallets } from '../components/ConfirmWalletsModal/ConfirmWallets.helpers';
26
24
  import { ConfirmWalletsModal } from '../components/ConfirmWalletsModal/ConfirmWalletsModal';
27
- import { HeaderButton } from '../components/HeaderButtons/HeaderButtons.styles';
28
25
  import { RefreshButton } from '../components/HeaderButtons/RefreshButton';
29
26
  import { Layout, PageContainer } from '../components/Layout';
30
27
  import { QuoteWarningsAndErrors } from '../components/QuoteWarningsAndErrors';
@@ -37,7 +34,6 @@ import { useQuoteStore } from '../store/quote';
37
34
  import { useUiStore } from '../store/ui';
38
35
  import { useWalletsStore } from '../store/wallets';
39
36
  import { QuoteWarningType } from '../types';
40
- import { getContainer } from '../utils/common';
41
37
  import { joinList } from '../utils/ui';
42
38
 
43
39
  const Buttons = styled('div', {
@@ -285,6 +281,7 @@ export function ConfirmSwapPage() {
285
281
  <QuoteWarningsAndErrors
286
282
  warning={quoteWarning}
287
283
  error={quoteError}
284
+ couldChangeSettings={false}
288
285
  refetchQuote={onRefresh}
289
286
  showWarningModal={showQuoteWarningModal}
290
287
  confirmationDisabled={!isActiveTab}
@@ -307,19 +304,6 @@ export function ConfirmSwapPage() {
307
304
  const wallets_url = `../${navigationRoutes.wallets}`;
308
305
  navigate(wallets_url);
309
306
  },
310
- suffix: (
311
- <Tooltip
312
- container={getContainer()}
313
- side="bottom"
314
- content={i18n.t('Settings')}>
315
- <HeaderButton
316
- size="small"
317
- variant="ghost"
318
- onClick={() => navigate('../' + navigationRoutes.settings)}>
319
- <SettingsIcon size={18} color="black" />
320
- </HeaderButton>
321
- </Tooltip>
322
- ),
323
307
  }}
324
308
  footer={
325
309
  <Buttons>
@@ -205,6 +205,7 @@ export function Home() {
205
205
  <QuoteWarningsAndErrors
206
206
  warning={quoteWarning}
207
207
  error={quoteError}
208
+ couldChangeSettings={true}
208
209
  refetchQuote={fetchQuote}
209
210
  showWarningModal={showQuoteWarningModal}
210
211
  confirmationDisabled={!isActiveTab}