@rango-dev/ui 0.33.1-next.5 → 0.34.1-next.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.
Files changed (44) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/index.js +1 -1
  3. package/dist/index.js.map +3 -3
  4. package/dist/translations/de.d.ts.map +1 -1
  5. package/dist/translations/el.d.ts.map +1 -1
  6. package/dist/translations/en.d.ts.map +1 -1
  7. package/dist/translations/es.d.ts.map +1 -1
  8. package/dist/translations/fi.d.ts.map +1 -1
  9. package/dist/translations/fr.d.ts.map +1 -1
  10. package/dist/translations/it.d.ts.map +1 -1
  11. package/dist/translations/ja.d.ts.map +1 -1
  12. package/dist/translations/nl.d.ts.map +1 -1
  13. package/dist/translations/pl.d.ts.map +1 -1
  14. package/dist/translations/pt.d.ts.map +1 -1
  15. package/dist/translations/ru.d.ts.map +1 -1
  16. package/dist/translations/sv.d.ts.map +1 -1
  17. package/dist/translations/uk.d.ts.map +1 -1
  18. package/dist/translations/zh.d.ts.map +1 -1
  19. package/dist/widget/ui/src/components/ChainToken/ChainToken.d.ts.map +1 -1
  20. package/dist/widget/ui/src/components/ChainToken/ChainToken.styles.d.ts +165 -0
  21. package/dist/widget/ui/src/components/ChainToken/ChainToken.styles.d.ts.map +1 -1
  22. package/dist/widget/ui/src/containers/SwapInput/SwapInput.d.ts.map +1 -1
  23. package/dist/widget/ui/src/containers/SwapInput/SwapInput.styles.d.ts +3 -1
  24. package/dist/widget/ui/src/containers/SwapInput/SwapInput.styles.d.ts.map +1 -1
  25. package/dist/widget/ui/src/containers/SwapInput/TokenSection.styles.d.ts.map +1 -1
  26. package/package.json +3 -3
  27. package/src/components/BlockchainsChip/BlockchainsChip.styles.ts +2 -2
  28. package/src/components/ChainToken/ChainToken.styles.ts +36 -3
  29. package/src/components/ChainToken/ChainToken.tsx +19 -9
  30. package/src/components/Chip/Chip.styles.ts +2 -2
  31. package/src/components/ListItemButton/ListItemButton.styles.ts +2 -2
  32. package/src/components/MessageBox/CollapsibleMessageBox.styles.tsx +2 -2
  33. package/src/components/PriceImpact/PriceImpact.tsx +1 -1
  34. package/src/components/Select/Select.styles.ts +2 -2
  35. package/src/components/SwapListItem/SwapListItem.styles.ts +2 -2
  36. package/src/components/Tabs/Tabs.styles.tsx +1 -1
  37. package/src/components/TextField/TextField.styles.ts +2 -2
  38. package/src/components/Toast/Toast.styles.ts +1 -1
  39. package/src/components/Wallet/Wallet.styles.ts +2 -2
  40. package/src/containers/SwapInput/SwapInput.styles.ts +11 -0
  41. package/src/containers/SwapInput/SwapInput.tsx +9 -2
  42. package/src/containers/SwapInput/TokenSection.styles.ts +14 -2
  43. package/src/containers/SwapInput/TokenSection.tsx +2 -2
  44. package/src/theme.ts +1 -1
@@ -29,7 +29,11 @@ import { TokenSection } from './TokenSection';
29
29
 
30
30
  export function SwapInput(props: SwapInputPropTypes) {
31
31
  const showBalance =
32
- 'balance' in props && !props.loading && !props.loadingBalance;
32
+ 'balance' in props &&
33
+ !props.loading &&
34
+ !props.loadingBalance &&
35
+ props.token.displayName;
36
+
33
37
  const showBalanceSkeleton =
34
38
  'balance' in props && (props.loading || props.loadingBalance);
35
39
  return (
@@ -108,6 +112,7 @@ export function SwapInput(props: SwapInputPropTypes) {
108
112
  size="large"
109
113
  placeholder="0"
110
114
  variant="ghost"
115
+ isZero={props.price.value === '0'}
111
116
  min={0}
112
117
  {...('onInputChange' in props && {
113
118
  onChange: (event: React.ChangeEvent<HTMLInputElement>) =>
@@ -142,7 +147,9 @@ export function SwapInput(props: SwapInputPropTypes) {
142
147
  <ValueTypography hasWarning={!!props.price.error}>
143
148
  <UsdPrice variant="body" size="medium">
144
149
  {props.price.usdValue
145
- ? `~$${props.price.usdValue}`
150
+ ? props.price.usdValue === '0'
151
+ ? '0.00'
152
+ : `~$${props.price.usdValue}`
146
153
  : props.price.error}
147
154
  </UsdPrice>
148
155
  </ValueTypography>
@@ -1,3 +1,5 @@
1
+ import { ChainImageContainer } from 'src/components/ChainToken/ChainToken.styles';
2
+
1
3
  import { Button } from '../../components';
2
4
  import { css, darkTheme, styled } from '../../theme';
3
5
 
@@ -6,12 +8,14 @@ export const Container = styled(Button, {
6
8
  minWidth: '130px',
7
9
  flexGrow: 1,
8
10
  backgroundColor: 'transparent',
11
+ borderRadius: '$xs',
12
+
9
13
  color: '$neutral700',
10
14
  '&:disabled': {
11
15
  color: '$neutral600',
12
16
  },
13
17
  '&:focus-visible': {
14
- $$color: '$colors$info100',
18
+ $$color: '$colors$secondary100',
15
19
  [`.${darkTheme} &`]: {
16
20
  $$color: '$colors$info700',
17
21
  },
@@ -22,11 +26,19 @@ export const Container = styled(Button, {
22
26
  backgroundColor: 'transparent',
23
27
  },
24
28
  '&:hover': {
25
- $$color: '$colors$info100',
29
+ $$color: '$colors$secondary100',
26
30
  [`.${darkTheme} &`]: {
27
31
  $$color: '$colors$neutral100',
28
32
  },
29
33
  backgroundColor: '$$color !important',
34
+
35
+ [`& ${ChainImageContainer}`]: {
36
+ $$color: '$colors$secondary100',
37
+ [`.${darkTheme} &`]: {
38
+ $$color: '$colors$neutral100',
39
+ },
40
+ backgroundColor: '$$color !important',
41
+ },
30
42
  },
31
43
  });
32
44
 
@@ -46,14 +46,14 @@ export function TokenSection(props: TokenSectionProps) {
46
46
  <>
47
47
  <Typography variant="title" size="medium">
48
48
  {error || (!loading && !tokenSymbol)
49
- ? i18n.t('Token')
49
+ ? i18n.t('Select Token')
50
50
  : tokenSymbol}
51
51
  </Typography>
52
52
  <Typography
53
53
  variant="body"
54
54
  size="medium"
55
55
  className={chainNameStyles()}>
56
- {error || (!loading && !chain) ? i18n.t('Chain') : chain}
56
+ {error || (!loading && !chain) ? i18n.t('Select Chain') : chain}
57
57
  </Typography>
58
58
  </>
59
59
  )}
package/src/theme.ts CHANGED
@@ -14,7 +14,7 @@ export const theme = {
14
14
  primary600: '#0B27C5',
15
15
 
16
16
  secondary: '#469BF5',
17
- secondary100: '#E9F4FF',
17
+ secondary100: '#E9F3FF',
18
18
  secondary200: '#D6EAFF',
19
19
  secondary300: '#C8E3FF',
20
20
  secondary400: '#B5D9FF',