@rango-dev/ui 0.15.1-next.11 → 0.15.1-next.13

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 (51) hide show
  1. package/dist/index.js +2 -2
  2. package/dist/index.js.map +3 -3
  3. package/dist/widget/ui/src/components/BestRoute/BestRoute.d.ts.map +1 -1
  4. package/dist/widget/ui/src/components/BestRoute/BestRoute.styles.d.ts +1 -0
  5. package/dist/widget/ui/src/components/BestRoute/BestRoute.styles.d.ts.map +1 -1
  6. package/dist/widget/ui/src/components/BestRoute/BestRoute.types.d.ts +1 -0
  7. package/dist/widget/ui/src/components/BestRoute/BestRoute.types.d.ts.map +1 -1
  8. package/dist/widget/ui/src/components/BestRoute/BestRouteSkeleton.styles.d.ts.map +1 -1
  9. package/dist/widget/ui/src/components/Button/Button.styles.d.ts.map +1 -1
  10. package/dist/widget/ui/src/components/Checkbox/Checkbox.styles.d.ts.map +1 -1
  11. package/dist/widget/ui/src/components/Chip/Chip.styles.d.ts.map +1 -1
  12. package/dist/widget/ui/src/components/Header/Header.styles.d.ts.map +1 -1
  13. package/dist/widget/ui/src/components/ListItem/ListItem.styles.d.ts.map +1 -1
  14. package/dist/widget/ui/src/components/ListItemButton/ListItemButton.styles.d.ts.map +1 -1
  15. package/dist/widget/ui/src/components/MessageBox/CollapsibleMessageBox.styles.d.ts.map +1 -1
  16. package/dist/widget/ui/src/components/MessageBox/MessageBox.styles.d.ts.map +1 -1
  17. package/dist/widget/ui/src/components/Radio/Radio.styles.d.ts.map +1 -1
  18. package/dist/widget/ui/src/components/StepDetails/StepDetails.styles.d.ts.map +1 -1
  19. package/dist/widget/ui/src/components/SwapListItem/SwapListItem.styles.d.ts.map +1 -1
  20. package/dist/widget/ui/src/components/TextField/TextField.styles.d.ts.map +1 -1
  21. package/dist/widget/ui/src/components/Wallet/Wallet.styles.d.ts.map +1 -1
  22. package/dist/widget/ui/src/components/Wallet/Wallet.types.d.ts +1 -0
  23. package/dist/widget/ui/src/components/Wallet/Wallet.types.d.ts.map +1 -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 +1 -3
  26. package/dist/widget/ui/src/containers/SwapInput/TokenSection.styles.d.ts.map +1 -1
  27. package/package.json +2 -2
  28. package/src/components/BestRoute/BestRoute.styles.ts +55 -9
  29. package/src/components/BestRoute/BestRoute.tsx +6 -1
  30. package/src/components/BestRoute/BestRoute.types.ts +1 -0
  31. package/src/components/BestRoute/BestRouteSkeleton.styles.ts +6 -2
  32. package/src/components/Button/Button.styles.tsx +116 -12
  33. package/src/components/Checkbox/Checkbox.styles.ts +7 -6
  34. package/src/components/Chip/Chip.styles.ts +13 -4
  35. package/src/components/Header/Header.styles.ts +6 -2
  36. package/src/components/ListItem/ListItem.styles.ts +7 -2
  37. package/src/components/ListItemButton/ListItemButton.styles.ts +8 -3
  38. package/src/components/MessageBox/CollapsibleMessageBox.styles.tsx +14 -2
  39. package/src/components/MessageBox/MessageBox.styles.tsx +26 -6
  40. package/src/components/Modal/Modal.styles.ts +2 -2
  41. package/src/components/Radio/Radio.styles.tsx +7 -6
  42. package/src/components/StepDetails/StepDetails.styles.ts +5 -2
  43. package/src/components/SwapListItem/SwapListItem.styles.ts +16 -4
  44. package/src/components/Switch/Switch.styles.tsx +7 -7
  45. package/src/components/TextField/TextField.styles.ts +6 -2
  46. package/src/components/Wallet/ClickableWallet.tsx +1 -1
  47. package/src/components/Wallet/Wallet.styles.ts +19 -3
  48. package/src/components/Wallet/Wallet.types.ts +1 -0
  49. package/src/containers/SwapInput/SwapInput.styles.ts +12 -1
  50. package/src/containers/SwapInput/TokenSection.styles.ts +21 -17
  51. package/src/containers/SwapInput/TokenSection.tsx +1 -1
@@ -1,6 +1,6 @@
1
1
  import * as RadixCheckbox from '@radix-ui/react-checkbox';
2
2
 
3
- import { styled } from '../../theme';
3
+ import { darkTheme, styled } from '../../theme';
4
4
 
5
5
  export const CheckboxContainer = styled('div', {
6
6
  display: 'flex',
@@ -16,12 +16,13 @@ export const CheckboxRoot = styled(RadixCheckbox.Root, {
16
16
  border: '1px solid $neutral800',
17
17
  backgroundColor: 'transparent',
18
18
  cursor: 'pointer',
19
- '&:hover': {
20
- borderColor: '$secondary600',
21
- },
22
19
  '&[data-state="checked"]': {
23
- backgroundColor: '$secondary600',
24
- borderColor: '$secondary600',
20
+ $$color: '$colors$secondary500',
21
+ [`.${darkTheme} &`]: {
22
+ $$color: '$colors$secondary400',
23
+ },
24
+ backgroundColor: '$$color',
25
+ borderColor: '$$color',
25
26
  },
26
27
  });
27
28
 
@@ -8,19 +8,28 @@ export const ChipContainer = styled('button', {
8
8
  padding: '$5 $15',
9
9
  cursor: 'pointer',
10
10
  transition: 'all 0.35s',
11
- backgroundColor: '$neutral100',
12
11
  border: '1px solid transparent',
12
+ $$color: '$colors$neutral100',
13
+ [`.${darkTheme} &`]: {
14
+ $$color: '$colors$neutral300',
15
+ },
16
+ backgroundColor: '$$color',
13
17
 
14
18
  '&:hover': {
15
19
  $$color: '$colors$info100',
16
20
  [`.${darkTheme} &`]: {
17
- $$color: '$colors$neutral400',
21
+ $$color: '$colors$neutral100',
18
22
  },
19
23
  backgroundColor: '$$color',
20
24
  },
21
25
 
22
- '&:focus': {
23
- outline: '1px solid gray',
26
+ '&:focus-visible': {
27
+ $$color: '$colors$info100',
28
+ [`.${darkTheme} &`]: {
29
+ $$color: '$colors$info700',
30
+ },
31
+ backgroundColor: '$$color',
32
+ outline: 0,
24
33
  },
25
34
 
26
35
  variants: {
@@ -1,11 +1,15 @@
1
- import { styled } from '../../theme';
1
+ import { darkTheme, styled } from '../../theme';
2
2
 
3
3
  export const Container = styled('div', {
4
4
  display: 'flex',
5
5
  justifyContent: 'space-between',
6
6
  alignItems: 'center',
7
7
  padding: '$15 $20',
8
- backgroundColor: '$neutral100',
8
+ $$color: '$colors$neutral100',
9
+ [`.${darkTheme} &`]: {
10
+ $$color: '$colors$neutral300',
11
+ },
12
+ backgroundColor: '$$color',
9
13
  position: 'relative',
10
14
  borderTopRightRadius: '$primary',
11
15
  borderTopLeftRadius: '$primary',
@@ -1,4 +1,4 @@
1
- import { styled } from '../../theme';
1
+ import { darkTheme, styled } from '../../theme';
2
2
 
3
3
  export const BaseListItem = styled('li', {
4
4
  width: '100%',
@@ -38,7 +38,12 @@ export const BaseListItem = styled('li', {
38
38
  variants: {
39
39
  hasDivider: {
40
40
  true: {
41
- borderBottom: '1px solid $neutral300',
41
+ borderBottom: '1px solid',
42
+ $$color: '$colors$neutral300',
43
+ [`.${darkTheme} &`]: {
44
+ $$color: '$colors$neutral400',
45
+ },
46
+ borderColor: '$$color',
42
47
  borderBottomRightRadius: 0,
43
48
  borderBottomLeftRadius: 0,
44
49
  },
@@ -11,7 +11,7 @@ export const BaseListItemButton = styled('button', {
11
11
  outline: 0,
12
12
  $$color: '$colors$info100',
13
13
  [`.${darkTheme} &`]: {
14
- $$color: '$colors$neutral400',
14
+ $$color: '$colors$info700',
15
15
  },
16
16
  backgroundColor: '$$color',
17
17
  },
@@ -20,7 +20,7 @@ export const BaseListItemButton = styled('button', {
20
20
  borderRadius: '$xs',
21
21
 
22
22
  [`.${darkTheme} &`]: {
23
- $$color: '$colors$neutral400',
23
+ $$color: '$colors$neutral100',
24
24
  },
25
25
  backgroundColor: '$$color',
26
26
  cursor: 'pointer',
@@ -31,7 +31,12 @@ export const BaseListItemButton = styled('button', {
31
31
  variants: {
32
32
  hasDivider: {
33
33
  true: {
34
- borderBottom: '1px solid $neutral300',
34
+ borderBottom: '1px solid',
35
+ $$color: '$colors$neutral300',
36
+ [`.${darkTheme} &`]: {
37
+ $$color: '$colors$neutral400',
38
+ },
39
+ borderColor: '$$color',
35
40
  borderBottomRightRadius: 0,
36
41
  borderBottomLeftRadius: 0,
37
42
  },
@@ -7,15 +7,27 @@ export const Trigger = styled(Collapsible.Trigger, {
7
7
  paddingBottom: '$5',
8
8
  borderRadius: '$xm',
9
9
  cursor: 'pointer',
10
- backgroundColor: '$neutral200',
10
+ $$backgroundColor: '$colors$neutral200',
11
+ [`.${darkTheme} &`]: {
12
+ $$backgroundColor: '$colors$neutral500',
13
+ },
14
+ backgroundColor: '$$backgroundColor',
11
15
  textAlign: 'center',
12
16
  border: 0,
13
17
  width: '100%',
14
18
  '&:hover': {
15
19
  $$color: '$colors$info100',
16
20
  [`.${darkTheme} &`]: {
17
- $$color: '$colors$neutral400',
21
+ $$color: '$colors$neutral100',
22
+ },
23
+ backgroundColor: '$$color',
24
+ },
25
+ '&:focus-visible': {
26
+ $$color: '$colors$info100',
27
+ [`.${darkTheme} &`]: {
28
+ $$color: '$colors$info700',
18
29
  },
19
30
  backgroundColor: '$$color',
31
+ outline: 0,
20
32
  },
21
33
  });
@@ -1,4 +1,4 @@
1
- import { styled } from '../../theme';
1
+ import { darkTheme, styled } from '../../theme';
2
2
 
3
3
  export const Container = styled('div', {
4
4
  display: 'flex',
@@ -21,19 +21,39 @@ export const IconHighlight = styled('div', {
21
21
  variants: {
22
22
  type: {
23
23
  success: {
24
- backgroundColor: '$success300',
24
+ $$color: '$colors$success300',
25
+ [`.${darkTheme} &`]: {
26
+ $$color: '$colors$success600',
27
+ },
28
+ backgroundColor: '$$color',
25
29
  },
26
30
  warning: {
27
- backgroundColor: '$warning300',
31
+ $$color: '$colors$warning300',
32
+ [`.${darkTheme} &`]: {
33
+ $$color: '$colors$warning600',
34
+ },
35
+ backgroundColor: '$$color',
28
36
  },
29
37
  error: {
30
- backgroundColor: '$error300',
38
+ $$color: '$colors$error300',
39
+ [`.${darkTheme} &`]: {
40
+ $$color: '$colors$error600',
41
+ },
42
+ backgroundColor: '$$color',
31
43
  },
32
44
  info: {
33
- backgroundColor: '$info300',
45
+ $$color: '$colors$info300',
46
+ [`.${darkTheme} &`]: {
47
+ $$color: '$colors$info600',
48
+ },
49
+ backgroundColor: '$$color',
34
50
  },
35
51
  loading: {
36
- backgroundColor: '$info300',
52
+ $$color: '$colors$info300',
53
+ [`.${darkTheme} &`]: {
54
+ $$color: '$colors$info600',
55
+ },
56
+ backgroundColor: '$$color',
37
57
  },
38
58
  },
39
59
  },
@@ -7,7 +7,7 @@ export const BackDrop = styled('div', {
7
7
  left: '0',
8
8
  width: '100%',
9
9
  height: '100%',
10
- backgroundColor: 'rgba(0,0,0,0)',
10
+ backgroundColor: 'transparent',
11
11
  zIndex: 10,
12
12
  borderRadius: '$primary',
13
13
  display: 'flex',
@@ -28,7 +28,7 @@ export const BackDrop = styled('div', {
28
28
  },
29
29
  active: {
30
30
  true: {
31
- backgroundColor: 'rgba(0,0,0,.1)',
31
+ backgroundColor: 'color-mix(in srgb, $neutral500 70%, transparent)',
32
32
  },
33
33
  },
34
34
  },
@@ -1,6 +1,6 @@
1
1
  import * as Radio from '@radix-ui/react-radio-group';
2
2
 
3
- import { styled } from '../../theme';
3
+ import { darkTheme, styled } from '../../theme';
4
4
 
5
5
  export const StyledItem = styled(Radio.Item, {
6
6
  padding: '0',
@@ -11,12 +11,13 @@ export const StyledItem = styled(Radio.Item, {
11
11
  backgroundColor: 'transparent',
12
12
  border: '1px solid $neutral800',
13
13
 
14
- '&:hover': {
15
- borderColor: '$secondary600',
16
- },
17
14
  '&[data-state="checked"]': {
18
- backgroundColor: '$secondary600',
19
- borderColor: '$secondary600',
15
+ $$color: '$colors$secondary500',
16
+ [`.${darkTheme} &`]: {
17
+ $$color: '$colors$secondary400',
18
+ },
19
+ backgroundColor: '$$color',
20
+ borderColor: '$$color',
20
21
  },
21
22
  });
22
23
 
@@ -1,4 +1,4 @@
1
- import { styled } from '../../theme';
1
+ import { darkTheme, styled } from '../../theme';
2
2
 
3
3
  export const Container = styled('div', {
4
4
  width: '100%',
@@ -10,7 +10,10 @@ export const Container = styled('div', {
10
10
  type: {
11
11
  'route-details': { border: 'none' },
12
12
  'route-progress': {
13
- backgroundColor: '$neutral100',
13
+ $$color: '$colors$neutral100',
14
+ [`.${darkTheme} &`]: {
15
+ $$color: '$colors$neutral300',
16
+ },
14
17
  borderRadius: '$xm',
15
18
  padding: '$10 $15',
16
19
  marginBottom: '15px',
@@ -17,7 +17,11 @@ export const Header = styled('div', {
17
17
  });
18
18
 
19
19
  export const Main = styled('button', {
20
- backgroundColor: '$neutral100',
20
+ $$color: '$colors$neutral100',
21
+ [`.${darkTheme} &`]: {
22
+ $$color: '$colors$neutral300',
23
+ },
24
+ backgroundColor: '$$color',
21
25
  border: 'none',
22
26
  width: '100%',
23
27
  borderRadius: '$xm',
@@ -27,12 +31,16 @@ export const Main = styled('button', {
27
31
  '&:hover': {
28
32
  $$color: '$colors$info100',
29
33
  [`.${darkTheme} &`]: {
30
- $$color: '$colors$neutral400',
34
+ $$color: '$colors$neutral100',
31
35
  },
32
36
  backgroundColor: '$$color',
33
37
  },
34
38
  '&:focus-visible': {
35
- backgroundColor: '$surface600',
39
+ $$color: '$colors$info100',
40
+ [`.${darkTheme} &`]: {
41
+ $$color: '$colors$info700',
42
+ },
43
+ backgroundColor: '$$color',
36
44
  outline: 'none',
37
45
  },
38
46
  });
@@ -44,7 +52,11 @@ export const Date = styled('div', {
44
52
  });
45
53
 
46
54
  export const LoadingMain = styled('div', {
47
- backgroundColor: '$neutral100',
55
+ $$color: '$colors$neutral100',
56
+ [`.${darkTheme} &`]: {
57
+ $$color: '$colors$neutral300',
58
+ },
59
+ backgroundColor: '$$color',
48
60
  border: 'none',
49
61
  width: '100%',
50
62
  borderRadius: '$xm',
@@ -1,6 +1,6 @@
1
1
  import * as RadixSwitch from '@radix-ui/react-switch';
2
2
 
3
- import { styled } from '../../theme';
3
+ import { darkTheme, styled } from '../../theme';
4
4
 
5
5
  export const StyledSwitchRoot = styled(RadixSwitch.Root, {
6
6
  boxSizing: 'border-box',
@@ -16,13 +16,13 @@ export const StyledSwitchRoot = styled(RadixSwitch.Root, {
16
16
  cursor: 'pointer',
17
17
  transition: 'all 0.35s',
18
18
 
19
- '&:hover': {
20
- backgroundColor: '$secondary500',
21
- borderColor: '$secondary500',
22
- },
23
19
  '&[data-state="checked"]': {
24
- backgroundColor: '$secondary600',
25
- borderColor: '$secondary600',
20
+ $$color: '$colors$secondary500',
21
+ [`.${darkTheme} &`]: {
22
+ $$color: '$colors$secondary400',
23
+ },
24
+ backgroundColor: '$$color',
25
+ borderColor: '$$color',
26
26
  },
27
27
  '-webkit-tap-highlight-color': 'rgba(0, 0, 0, 0)',
28
28
  });
@@ -25,11 +25,15 @@ export const InputContainer = styled('div', {
25
25
  },
26
26
  variant: {
27
27
  contained: {
28
- backgroundColor: '$neutral100',
28
+ $$color: '$colors$neutral100',
29
+ [`.${darkTheme} &`]: {
30
+ $$color: '$colors$neutral300',
31
+ },
32
+ backgroundColor: '$$color',
29
33
  '&:hover': {
30
34
  $$color: '$colors$info100',
31
35
  [`.${darkTheme} &`]: {
32
- $$color: '$colors$neutral400',
36
+ $$color: '$colors$neutral100',
33
37
  },
34
38
  backgroundColor: '$$color',
35
39
  },
@@ -36,7 +36,7 @@ function Wallet(props: WalletPropTypes) {
36
36
  }
37
37
 
38
38
  return (
39
- <Tooltip content={info.tooltipText} side="top">
39
+ <Tooltip container={props.container} content={info.tooltipText} side="top">
40
40
  <WalletButton
41
41
  disabled={props.state == WalletState.CONNECTING}
42
42
  onClick={() => {
@@ -23,7 +23,11 @@ export const WalletButton = styled('button', {
23
23
  border: '0',
24
24
  display: 'flex',
25
25
  flexDirection: 'column',
26
- backgroundColor: '$neutral100',
26
+ $$color: '$colors$neutral100',
27
+ [`.${darkTheme} &`]: {
28
+ $$color: '$colors$neutral300',
29
+ },
30
+ backgroundColor: '$$color',
27
31
  alignItems: 'center',
28
32
  cursor: 'pointer',
29
33
  width: 110,
@@ -31,15 +35,27 @@ export const WalletButton = styled('button', {
31
35
  '&:hover': {
32
36
  $$color: '$colors$info100',
33
37
  [`.${darkTheme} &`]: {
34
- $$color: '$colors$neutral400',
38
+ $$color: '$colors$neutral100',
39
+ },
40
+ backgroundColor: '$$color',
41
+ },
42
+ '&:focus-visible': {
43
+ $$color: '$colors$info100',
44
+ [`.${darkTheme} &`]: {
45
+ $$color: '$colors$info700',
35
46
  },
36
47
  backgroundColor: '$$color',
48
+ outline: 0,
37
49
  },
38
50
  variants: {
39
51
  selected: {
40
52
  true: {
41
53
  outlineWidth: 1,
42
- outlineColor: '$secondary500',
54
+ $$outline: '$colors$secondary500',
55
+ [`.${darkTheme} &`]: {
56
+ $$outline: '$colors$secondary400',
57
+ },
58
+ outlineColor: '$$outline',
43
59
  outlineStyle: 'solid',
44
60
  },
45
61
  },
@@ -56,6 +56,7 @@ interface WalletProps {
56
56
  selected?: boolean;
57
57
  description?: string;
58
58
  isLoading?: boolean;
59
+ container?: HTMLElement;
59
60
  }
60
61
 
61
62
  export type WalletPropTypes = State & WalletProps;
@@ -2,7 +2,11 @@ import { Button, TextField } from '../../components';
2
2
  import { darkTheme, styled } from '../../theme';
3
3
 
4
4
  export const Container = styled('div', {
5
- backgroundColor: '$neutral100',
5
+ $$color: '$colors$neutral100',
6
+ [`.${darkTheme} &`]: {
7
+ $$color: '$colors$neutral300',
8
+ },
9
+ backgroundColor: '$$color',
6
10
  borderRadius: '$xm',
7
11
  padding: '$15',
8
12
  variants: {
@@ -57,4 +61,11 @@ export const MaxButton = styled(Button, {
57
61
  $$color: '$colors$secondary800',
58
62
  },
59
63
  backgroundColor: '$$color',
64
+ '&:focus-visible': {
65
+ $$outline: '$colors$info600',
66
+ [`.${darkTheme} &`]: {
67
+ $$outline: '$colors$info100',
68
+ },
69
+ outlineColor: '$$outline',
70
+ },
60
71
  });
@@ -2,24 +2,28 @@ import { Button } from '../../components';
2
2
  import { darkTheme, styled } from '../../theme';
3
3
 
4
4
  export const Container = styled(Button, {
5
- variants: {
6
- loading: {
7
- true: {
8
- '&:hover': {
9
- background: 'none',
10
- },
11
- },
12
- false: {
13
- '&:hover': {
14
- borderRadius: '$xs',
15
- $$color: '$colors$info100',
16
- [`.${darkTheme} &`]: {
17
- $$color: '$colors$neutral400',
18
- },
19
- backgroundColor: '$$color',
20
- },
21
- },
5
+ backgroundColor: 'transparent',
6
+ color: '$neutral900',
7
+ '&:disabled': {
8
+ color: '$neutral800',
9
+ },
10
+ '&:focus-visible': {
11
+ $$color: '$colors$info100',
12
+ [`.${darkTheme} &`]: {
13
+ $$color: '$colors$info700',
14
+ },
15
+ backgroundColor: '$$color !important',
16
+ outline: 0,
17
+ },
18
+ '&:disabled:hover': {
19
+ backgroundColor: 'transparent',
20
+ },
21
+ '&:hover': {
22
+ $$color: '$colors$info100',
23
+ [`.${darkTheme} &`]: {
24
+ $$color: '$colors$neutral400',
22
25
  },
26
+ backgroundColor: '$$color !important',
23
27
  },
24
28
  });
25
29
 
@@ -18,7 +18,7 @@ export function TokenSection(props: TokenSectionProps) {
18
18
  loading,
19
19
  } = props;
20
20
  return (
21
- <Container variant="ghost" disabled={error || loading} onClick={onClick}>
21
+ <Container variant="default" disabled={error || loading} onClick={onClick}>
22
22
  <TokenSectionContainer>
23
23
  <ChainToken
24
24
  size="large"