@rango-dev/ui 0.26.1-next.5 → 0.26.1-next.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.
Files changed (138) hide show
  1. package/dist/index.js +2 -2
  2. package/dist/index.js.map +4 -4
  3. package/dist/translations/en.d.ts.map +1 -1
  4. package/dist/translations/es.d.ts.map +1 -1
  5. package/dist/translations/fr.d.ts.map +1 -1
  6. package/dist/translations/ja.d.ts.map +1 -1
  7. package/dist/widget/ui/src/components/Alert/Alert.styles.d.ts +8 -0
  8. package/dist/widget/ui/src/components/Alert/Alert.styles.d.ts.map +1 -1
  9. package/dist/widget/ui/src/components/BlockchainsChip/BlockchainsChip.styles.d.ts +2 -0
  10. package/dist/widget/ui/src/components/BlockchainsChip/BlockchainsChip.styles.d.ts.map +1 -1
  11. package/dist/widget/ui/src/components/BottomLogo/BottomLogo.styles.d.ts +4 -0
  12. package/dist/widget/ui/src/components/BottomLogo/BottomLogo.styles.d.ts.map +1 -1
  13. package/dist/widget/ui/src/components/Button/Button.styles.d.ts +6 -0
  14. package/dist/widget/ui/src/components/Button/Button.styles.d.ts.map +1 -1
  15. package/dist/widget/ui/src/components/ChainToken/ChainToken.styles.d.ts +4 -0
  16. package/dist/widget/ui/src/components/ChainToken/ChainToken.styles.d.ts.map +1 -1
  17. package/dist/widget/ui/src/components/Checkbox/Checkbox.styles.d.ts +8 -0
  18. package/dist/widget/ui/src/components/Checkbox/Checkbox.styles.d.ts.map +1 -1
  19. package/dist/widget/ui/src/components/Chip/Chip.styles.d.ts +2 -0
  20. package/dist/widget/ui/src/components/Chip/Chip.styles.d.ts.map +1 -1
  21. package/dist/widget/ui/src/components/Collapsible/Collapsible.styles.d.ts +2 -0
  22. package/dist/widget/ui/src/components/Collapsible/Collapsible.styles.d.ts.map +1 -1
  23. package/dist/widget/ui/src/components/Divider/Divider.d.ts +2 -5
  24. package/dist/widget/ui/src/components/Divider/Divider.d.ts.map +1 -1
  25. package/dist/widget/ui/src/components/Divider/Divider.styles.d.ts +163 -0
  26. package/dist/widget/ui/src/components/Divider/Divider.styles.d.ts.map +1 -0
  27. package/dist/widget/ui/src/components/Divider/Divider.types.d.ts +10 -0
  28. package/dist/widget/ui/src/components/Divider/Divider.types.d.ts.map +1 -0
  29. package/dist/widget/ui/src/components/Drawer/Drawer.styles.d.ts +10 -0
  30. package/dist/widget/ui/src/components/Drawer/Drawer.styles.d.ts.map +1 -1
  31. package/dist/widget/ui/src/components/Header/Header.styles.d.ts +4 -0
  32. package/dist/widget/ui/src/components/Header/Header.styles.d.ts.map +1 -1
  33. package/dist/widget/ui/src/components/Icon/CloseIcon.d.ts +2 -0
  34. package/dist/widget/ui/src/components/Icon/CloseIcon.d.ts.map +1 -1
  35. package/dist/widget/ui/src/components/Icon/common.d.ts +4 -0
  36. package/dist/widget/ui/src/components/Icon/common.d.ts.map +1 -1
  37. package/dist/widget/ui/src/components/List/List.styles.d.ts +2 -0
  38. package/dist/widget/ui/src/components/List/List.styles.d.ts.map +1 -1
  39. package/dist/widget/ui/src/components/ListItem/ListItem.styles.d.ts +2 -0
  40. package/dist/widget/ui/src/components/ListItem/ListItem.styles.d.ts.map +1 -1
  41. package/dist/widget/ui/src/components/ListItemButton/ListItemButton.styles.d.ts +2 -0
  42. package/dist/widget/ui/src/components/ListItemButton/ListItemButton.styles.d.ts.map +1 -1
  43. package/dist/widget/ui/src/components/MessageBox/CollapsibleMessageBox.styles.d.ts +2 -0
  44. package/dist/widget/ui/src/components/MessageBox/CollapsibleMessageBox.styles.d.ts.map +1 -1
  45. package/dist/widget/ui/src/components/MessageBox/MessageBox.styles.d.ts +6 -0
  46. package/dist/widget/ui/src/components/MessageBox/MessageBox.styles.d.ts.map +1 -1
  47. package/dist/widget/ui/src/components/Modal/Modal.styles.d.ts +12 -0
  48. package/dist/widget/ui/src/components/Modal/Modal.styles.d.ts.map +1 -1
  49. package/dist/widget/ui/src/components/NotFound/NotFound.styles.d.ts +2 -0
  50. package/dist/widget/ui/src/components/NotFound/NotFound.styles.d.ts.map +1 -1
  51. package/dist/widget/ui/src/components/Popover/Popover.styles.d.ts +4 -0
  52. package/dist/widget/ui/src/components/Popover/Popover.styles.d.ts.map +1 -1
  53. package/dist/widget/ui/src/components/PriceImpact/PriceImpact.styles.d.ts +4 -0
  54. package/dist/widget/ui/src/components/PriceImpact/PriceImpact.styles.d.ts.map +1 -1
  55. package/dist/widget/ui/src/components/QuoteCost/QuoteCost.styles.d.ts +8 -0
  56. package/dist/widget/ui/src/components/QuoteCost/QuoteCost.styles.d.ts.map +1 -1
  57. package/dist/widget/ui/src/components/Radio/Radio.styles.d.ts +4 -0
  58. package/dist/widget/ui/src/components/Radio/Radio.styles.d.ts.map +1 -1
  59. package/dist/widget/ui/src/components/RadioGroup/RadioGroup.styles.d.ts +8 -0
  60. package/dist/widget/ui/src/components/RadioGroup/RadioGroup.styles.d.ts.map +1 -1
  61. package/dist/widget/ui/src/components/RefreshProgressButton/RefreshProgressButton.styles.d.ts +4 -0
  62. package/dist/widget/ui/src/components/RefreshProgressButton/RefreshProgressButton.styles.d.ts.map +1 -1
  63. package/dist/widget/ui/src/components/RoutesOverview/RoutesOverview.d.ts +2 -0
  64. package/dist/widget/ui/src/components/RoutesOverview/RoutesOverview.d.ts.map +1 -1
  65. package/dist/widget/ui/src/components/SelectableCategoryList/SelectableCategoryList.styles.d.ts +6 -0
  66. package/dist/widget/ui/src/components/SelectableCategoryList/SelectableCategoryList.styles.d.ts.map +1 -1
  67. package/dist/widget/ui/src/components/Skeleton/Skeleton.styles.d.ts +2 -0
  68. package/dist/widget/ui/src/components/Skeleton/Skeleton.styles.d.ts.map +1 -1
  69. package/dist/widget/ui/src/components/StepDetails/StepDetails.d.ts.map +1 -1
  70. package/dist/widget/ui/src/components/StepDetails/StepDetails.styles.d.ts +173 -1
  71. package/dist/widget/ui/src/components/StepDetails/StepDetails.styles.d.ts.map +1 -1
  72. package/dist/widget/ui/src/components/StepDetails/StepDetails.types.d.ts +15 -1
  73. package/dist/widget/ui/src/components/StepDetails/StepDetails.types.d.ts.map +1 -1
  74. package/dist/widget/ui/src/components/SvgIcon/SvgIcon.style.d.ts +2 -0
  75. package/dist/widget/ui/src/components/SvgIcon/SvgIcon.style.d.ts.map +1 -1
  76. package/dist/widget/ui/src/components/SwapDetailsPlaceholder/SwapDetailsPlaceholder.d.ts +2 -0
  77. package/dist/widget/ui/src/components/SwapDetailsPlaceholder/SwapDetailsPlaceholder.d.ts.map +1 -1
  78. package/dist/widget/ui/src/components/SwapListItem/SwapListItem.styles.d.ts +12 -0
  79. package/dist/widget/ui/src/components/SwapListItem/SwapListItem.styles.d.ts.map +1 -1
  80. package/dist/widget/ui/src/components/SwapListItem/SwapToken.styles.d.ts +18 -0
  81. package/dist/widget/ui/src/components/SwapListItem/SwapToken.styles.d.ts.map +1 -1
  82. package/dist/widget/ui/src/components/Switch/Switch.styles.d.ts +4 -0
  83. package/dist/widget/ui/src/components/Switch/Switch.styles.d.ts.map +1 -1
  84. package/dist/widget/ui/src/components/TextField/TextField.d.ts +2 -1
  85. package/dist/widget/ui/src/components/TextField/TextField.d.ts.map +1 -1
  86. package/dist/widget/ui/src/components/TextField/TextField.stories.d.ts +2 -1
  87. package/dist/widget/ui/src/components/TextField/TextField.stories.d.ts.map +1 -1
  88. package/dist/widget/ui/src/components/TextField/TextField.styles.d.ts +6 -0
  89. package/dist/widget/ui/src/components/TextField/TextField.styles.d.ts.map +1 -1
  90. package/dist/widget/ui/src/components/TextField/TextField.types.d.ts +3 -1
  91. package/dist/widget/ui/src/components/TextField/TextField.types.d.ts.map +1 -1
  92. package/dist/widget/ui/src/components/TokenAmount/TokenAmount.styles.d.ts +6 -0
  93. package/dist/widget/ui/src/components/TokenAmount/TokenAmount.styles.d.ts.map +1 -1
  94. package/dist/widget/ui/src/components/Tooltip/Tooltip.styles.d.ts +6 -0
  95. package/dist/widget/ui/src/components/Tooltip/Tooltip.styles.d.ts.map +1 -1
  96. package/dist/widget/ui/src/components/Typography/Typography.styles.d.ts +2 -0
  97. package/dist/widget/ui/src/components/Typography/Typography.styles.d.ts.map +1 -1
  98. package/dist/widget/ui/src/components/Wallet/Wallet.styles.d.ts +10 -0
  99. package/dist/widget/ui/src/components/Wallet/Wallet.styles.d.ts.map +1 -1
  100. package/dist/widget/ui/src/components/common/FilledCircle.d.ts +2 -0
  101. package/dist/widget/ui/src/components/common/FilledCircle.d.ts.map +1 -1
  102. package/dist/widget/ui/src/components/common/Image.d.ts +2 -0
  103. package/dist/widget/ui/src/components/common/Image.d.ts.map +1 -1
  104. package/dist/widget/ui/src/components/common/styles.d.ts +2 -0
  105. package/dist/widget/ui/src/components/common/styles.d.ts.map +1 -1
  106. package/dist/widget/ui/src/containers/SwapHistory/SwapHistory.d.ts +20 -0
  107. package/dist/widget/ui/src/containers/SwapHistory/SwapHistory.d.ts.map +1 -1
  108. package/dist/widget/ui/src/containers/SwapInput/SwapInput.styles.d.ts +24 -1
  109. package/dist/widget/ui/src/containers/SwapInput/SwapInput.styles.d.ts.map +1 -1
  110. package/dist/widget/ui/src/containers/SwapInput/TokenSection.styles.d.ts +10 -0
  111. package/dist/widget/ui/src/containers/SwapInput/TokenSection.styles.d.ts.map +1 -1
  112. package/dist/widget/ui/src/containers/TokenSelector/TokenSelector.d.ts +2 -0
  113. package/dist/widget/ui/src/containers/TokenSelector/TokenSelector.d.ts.map +1 -1
  114. package/dist/widget/ui/src/icons/Height.d.ts +5 -0
  115. package/dist/widget/ui/src/icons/Height.d.ts.map +1 -0
  116. package/dist/widget/ui/src/icons/Key.d.ts +5 -0
  117. package/dist/widget/ui/src/icons/Key.d.ts.map +1 -0
  118. package/dist/widget/ui/src/icons/Width.d.ts +5 -0
  119. package/dist/widget/ui/src/icons/Width.d.ts.map +1 -0
  120. package/dist/widget/ui/src/icons/index.d.ts +3 -0
  121. package/dist/widget/ui/src/icons/index.d.ts.map +1 -1
  122. package/dist/widget/ui/src/theme.d.ts +20 -0
  123. package/dist/widget/ui/src/theme.d.ts.map +1 -1
  124. package/package.json +1 -1
  125. package/src/components/Divider/Divider.styles.ts +165 -0
  126. package/src/components/Divider/Divider.tsx +8 -140
  127. package/src/components/Divider/Divider.types.ts +10 -0
  128. package/src/components/StepDetails/StepDetails.styles.ts +28 -5
  129. package/src/components/StepDetails/StepDetails.tsx +73 -23
  130. package/src/components/StepDetails/StepDetails.types.ts +17 -1
  131. package/src/components/Switch/Switch.styles.tsx +7 -0
  132. package/src/components/TextField/TextField.tsx +5 -2
  133. package/src/components/TextField/TextField.types.tsx +3 -1
  134. package/src/icons/Height.tsx +24 -0
  135. package/src/icons/Key.tsx +32 -0
  136. package/src/icons/Width.tsx +29 -0
  137. package/src/icons/index.ts +3 -0
  138. package/src/theme.ts +2 -0
@@ -0,0 +1,165 @@
1
+ import { styled } from '../../theme';
2
+
3
+ export const DividerContainer = styled('div', {
4
+ flexShrink: 0,
5
+ variants: {
6
+ size: {
7
+ 4: {},
8
+ 8: {},
9
+ 10: {},
10
+ 12: {},
11
+ 16: {},
12
+ 18: {},
13
+ 20: {},
14
+ 24: {},
15
+ 30: {},
16
+ 32: {},
17
+ },
18
+ direction: {
19
+ vertical: {},
20
+ horizontal: {},
21
+ },
22
+ },
23
+ compoundVariants: [
24
+ {
25
+ size: 4,
26
+ direction: 'horizontal',
27
+ css: {
28
+ width: '$4',
29
+ },
30
+ },
31
+ {
32
+ size: 4,
33
+ direction: 'vertical',
34
+ css: {
35
+ height: '$4',
36
+ },
37
+ },
38
+ {
39
+ size: 8,
40
+ direction: 'horizontal',
41
+ css: {
42
+ width: '$8',
43
+ },
44
+ },
45
+ {
46
+ size: 8,
47
+ direction: 'vertical',
48
+ css: {
49
+ height: '$8',
50
+ },
51
+ },
52
+ {
53
+ size: 10,
54
+ direction: 'horizontal',
55
+ css: {
56
+ width: '$10',
57
+ },
58
+ },
59
+ {
60
+ size: 10,
61
+ direction: 'vertical',
62
+ css: {
63
+ height: '$10',
64
+ },
65
+ },
66
+ {
67
+ size: 12,
68
+ direction: 'horizontal',
69
+ css: {
70
+ width: '$12',
71
+ },
72
+ },
73
+ {
74
+ size: 12,
75
+ direction: 'vertical',
76
+ css: {
77
+ height: '$12',
78
+ },
79
+ },
80
+ {
81
+ size: 16,
82
+ direction: 'horizontal',
83
+ css: {
84
+ width: '$16',
85
+ },
86
+ },
87
+ {
88
+ size: 16,
89
+ direction: 'vertical',
90
+ css: {
91
+ height: '$16',
92
+ },
93
+ },
94
+ {
95
+ size: 18,
96
+ direction: 'horizontal',
97
+ css: {
98
+ width: '$18',
99
+ },
100
+ },
101
+ {
102
+ size: 18,
103
+ direction: 'vertical',
104
+ css: {
105
+ height: '$18',
106
+ },
107
+ },
108
+ {
109
+ size: 20,
110
+ direction: 'horizontal',
111
+ css: {
112
+ width: '$20',
113
+ },
114
+ },
115
+ {
116
+ size: 20,
117
+ direction: 'vertical',
118
+ css: {
119
+ height: '$20',
120
+ },
121
+ },
122
+ {
123
+ size: 24,
124
+ direction: 'horizontal',
125
+ css: {
126
+ width: '$24',
127
+ },
128
+ },
129
+ {
130
+ size: 24,
131
+ direction: 'vertical',
132
+ css: {
133
+ height: '$24',
134
+ },
135
+ },
136
+ {
137
+ size: 30,
138
+ direction: 'horizontal',
139
+ css: {
140
+ width: '$30',
141
+ },
142
+ },
143
+ {
144
+ size: 30,
145
+ direction: 'vertical',
146
+ css: {
147
+ height: '$30',
148
+ },
149
+ },
150
+ {
151
+ size: 32,
152
+ direction: 'horizontal',
153
+ css: {
154
+ width: '$32',
155
+ },
156
+ },
157
+ {
158
+ size: 32,
159
+ direction: 'vertical',
160
+ css: {
161
+ height: '$32',
162
+ },
163
+ },
164
+ ],
165
+ });
@@ -1,146 +1,14 @@
1
- /* eslint-disable @typescript-eslint/no-magic-numbers */
1
+ import type { PropTypes } from './Divider.types';
2
+
2
3
  import React from 'react';
3
4
 
4
- import { styled } from '../../theme';
5
+ import { DividerContainer } from './Divider.styles';
5
6
 
6
- const DividerContainer = styled('div', {
7
- flexShrink: 0,
8
- variants: {
9
- size: {
10
- 4: {},
11
- 8: {},
12
- 12: {},
13
- 16: {},
14
- 18: {},
15
- 20: {},
16
- 24: {},
17
- 32: {},
18
- },
19
- direction: {
20
- vertical: {},
21
- horizontal: {},
22
- },
23
- },
24
- compoundVariants: [
25
- {
26
- size: 4,
27
- direction: 'horizontal',
28
- css: {
29
- width: '$4',
30
- },
31
- },
32
- {
33
- size: 4,
34
- direction: 'vertical',
35
- css: {
36
- height: '$4',
37
- },
38
- },
39
- {
40
- size: 8,
41
- direction: 'horizontal',
42
- css: {
43
- width: '$8',
44
- },
45
- },
46
- {
47
- size: 8,
48
- direction: 'vertical',
49
- css: {
50
- height: '$8',
51
- },
52
- },
53
- {
54
- size: 12,
55
- direction: 'horizontal',
56
- css: {
57
- width: '$12',
58
- },
59
- },
60
- {
61
- size: 12,
62
- direction: 'vertical',
63
- css: {
64
- height: '$12',
65
- },
66
- },
67
- {
68
- size: 16,
69
- direction: 'horizontal',
70
- css: {
71
- width: '$16',
72
- },
73
- },
74
- {
75
- size: 16,
76
- direction: 'vertical',
77
- css: {
78
- height: '$16',
79
- },
80
- },
81
- {
82
- size: 18,
83
- direction: 'horizontal',
84
- css: {
85
- width: '$18',
86
- },
87
- },
88
- {
89
- size: 18,
90
- direction: 'vertical',
91
- css: {
92
- height: '$18',
93
- },
94
- },
95
- {
96
- size: 20,
97
- direction: 'horizontal',
98
- css: {
99
- width: '$20',
100
- },
101
- },
102
- {
103
- size: 20,
104
- direction: 'vertical',
105
- css: {
106
- height: '$20',
107
- },
108
- },
109
- {
110
- size: 24,
111
- direction: 'horizontal',
112
- css: {
113
- width: '$24',
114
- },
115
- },
116
- {
117
- size: 24,
118
- direction: 'vertical',
119
- css: {
120
- height: '$24',
121
- },
122
- },
123
- {
124
- size: 32,
125
- direction: 'horizontal',
126
- css: {
127
- width: '$32',
128
- },
129
- },
130
- {
131
- size: 32,
132
- direction: 'vertical',
133
- css: {
134
- height: '$32',
135
- },
136
- },
137
- ],
138
- });
139
- export interface PropTypes {
140
- size?: 4 | 8 | 12 | 16 | 18 | 20 | 24 | 32;
141
- direction?: 'vertical' | 'horizontal';
142
- }
7
+ const Default_Size = 12;
143
8
 
144
- export function Divider({ size = 12, direction = 'vertical' }: PropTypes) {
9
+ export function Divider({
10
+ size = Default_Size,
11
+ direction = 'vertical',
12
+ }: PropTypes) {
145
13
  return <DividerContainer size={size} direction={direction} />;
146
14
  }
@@ -0,0 +1,10 @@
1
+ import type { DividerContainer } from './Divider.styles';
2
+ import type * as Stitches from '@stitches/react';
3
+
4
+ type BaseProps = Stitches.VariantProps<typeof DividerContainer>;
5
+ type BaseSizes = Exclude<BaseProps['size'], object>;
6
+
7
+ export interface PropTypes {
8
+ size?: BaseSizes;
9
+ direction?: 'vertical' | 'horizontal';
10
+ }
@@ -12,6 +12,7 @@ export const Container = styled('div', {
12
12
  type: {
13
13
  'quote-details': { border: 'none' },
14
14
  'swap-progress': {
15
+ backgroundColor: '$neutral100',
15
16
  $$color: '$colors$neutral100',
16
17
  [`.${darkTheme} &`]: {
17
18
  $$color: '$colors$neutral300',
@@ -33,10 +34,6 @@ export const Container = styled('div', {
33
34
  error: { borderColor: '$error500' },
34
35
  },
35
36
  },
36
- '& .swapper__description': {
37
- fontWeight: '$medium',
38
- },
39
- '& div:nth-child(3)': { display: 'flex', flexDirection: 'column', flex: 1 },
40
37
  });
41
38
 
42
39
  export const SwapperImage = styled('div', {
@@ -86,6 +83,26 @@ export const DashedLine = styled('div', {
86
83
  },
87
84
  });
88
85
 
86
+ export const SwapperSeparator = styled('div', {
87
+ borderLeft: '1px solid transparent',
88
+ margin: '0 $12',
89
+ display: 'block',
90
+ height: '8px',
91
+ variants: {
92
+ state: {
93
+ default: {
94
+ borderColor: 'transparent',
95
+ },
96
+ 'in-progress': { borderColor: '$info500' },
97
+ completed: {
98
+ borderColor: '$success500',
99
+ },
100
+ warning: { borderColor: '$warning500' },
101
+ error: { borderColor: '$error500' },
102
+ },
103
+ },
104
+ });
105
+
89
106
  export const StepSeparator = styled('div', {
90
107
  borderLeft: '1px dashed transparent',
91
108
  margin: '0 $10',
@@ -114,7 +131,13 @@ export const tokensContainerStyles = css({
114
131
  width: '100%',
115
132
  });
116
133
 
117
- export const swapperStyles = css({
134
+ export const swappersStyles = css({
135
+ display: 'flex',
136
+ flexDirection: 'column',
137
+ justifyContent: 'center',
138
+ });
139
+
140
+ export const swapperItemStyles = css({
118
141
  display: 'flex',
119
142
  alignItems: 'center',
120
143
  });
@@ -1,7 +1,7 @@
1
- import type { StepDetailsProps } from './StepDetails.types';
1
+ import type { InternalSwap, StepDetailsProps } from './StepDetails.types';
2
2
 
3
3
  import { i18n } from '@lingui/core';
4
- import React, { forwardRef, memo, useEffect, useRef } from 'react';
4
+ import React, { forwardRef, Fragment, memo, useEffect, useRef } from 'react';
5
5
 
6
6
  import { ChainToken } from '../../components/ChainToken/ChainToken';
7
7
  import { NextIcon } from '../../icons';
@@ -17,7 +17,9 @@ import {
17
17
  stepInfoStyles,
18
18
  StepSeparator,
19
19
  SwapperImage,
20
- swapperStyles,
20
+ swapperItemStyles,
21
+ SwapperSeparator,
22
+ swappersStyles,
21
23
  tokensContainerStyles,
22
24
  tokensStyles,
23
25
  } from './StepDetails.styles';
@@ -33,8 +35,20 @@ const StepDetailsComponent = forwardRef<HTMLDivElement, StepDetailsProps>(
33
35
  tabIndex,
34
36
  tooltipContainer,
35
37
  } = props;
38
+
39
+ const { from, to, swapper } = step;
36
40
  const containerRef = useRef<HTMLDivElement>(null);
37
41
  const isCompleted = state === 'completed' || state === 'error';
42
+ const swappers: InternalSwap[] = step.internalSwaps?.length
43
+ ? step.internalSwaps
44
+ : [
45
+ {
46
+ from: { blockchain: from.chain.displayName },
47
+ to: { blockchain: to.chain.displayName },
48
+ swapper,
49
+ },
50
+ ];
51
+
38
52
  useEffect(() => {
39
53
  const parentElement = (parentRef as React.RefObject<HTMLDivElement>)
40
54
  ?.current;
@@ -51,27 +65,63 @@ const StepDetailsComponent = forwardRef<HTMLDivElement, StepDetailsProps>(
51
65
  state={state}
52
66
  ref={containerRef}
53
67
  tabIndex={tabIndex}>
54
- <div className={swapperStyles()}>
55
- {type === 'swap-progress' && hasSeparator && (
56
- <StepSeparator state={state} />
57
- )}
58
- <SwapperImage state={state}>
59
- <Image size={22} src={step.swapper.image} />
60
- </SwapperImage>
61
- <Typography
62
- className="swapper__description"
63
- ml={8}
64
- size="small"
65
- variant="body">
66
- {i18n.t({
67
- id: 'Swap on {fromChain} via {swapper}',
68
- values: {
69
- fromChain: step.from.chain.displayName,
70
- swapper: step.swapper.displayName,
71
- },
68
+ {type === 'quote-details' && (
69
+ <div className={swapperItemStyles()}>
70
+ <SwapperImage state={state}>
71
+ <Image size={22} src={step.swapper.image} />
72
+ </SwapperImage>
73
+ <Typography ml={8} size="medium" variant="label">
74
+ {i18n.t({
75
+ id: 'Swap on {fromChain} via {swapper}',
76
+ values: {
77
+ fromChain: step.from.chain.displayName,
78
+ swapper: step.swapper.displayName,
79
+ },
80
+ })}
81
+ </Typography>
82
+ </div>
83
+ )}
84
+
85
+ {type === 'swap-progress' && (
86
+ <div className={swappersStyles()}>
87
+ {hasSeparator && <StepSeparator state={state} />}
88
+ {swappers.map((swapperItem, index) => {
89
+ const key = `${swapperItem.swapper.displayName}-${index}`;
90
+ return (
91
+ <Fragment key={key}>
92
+ <div
93
+ id={swapperItem.swapper.displayName}
94
+ className={swapperItemStyles()}>
95
+ <SwapperImage state={state}>
96
+ <Image size={22} src={swapperItem.swapper.image} />
97
+ </SwapperImage>
98
+ <Typography ml={8} size="medium" variant="label">
99
+ {swapperItem?.swapper.type === 'DEX'
100
+ ? i18n.t({
101
+ id: 'Swap on {fromChain} via {swapper}',
102
+ values: {
103
+ fromChain: swapperItem.from.blockchain,
104
+ swapper: swapperItem.swapper.displayName,
105
+ },
106
+ })
107
+ : i18n.t({
108
+ id: 'Bridge to {toChain} via {swapper}',
109
+ values: {
110
+ toChain: swapperItem.to.blockchain,
111
+ swapper: swapperItem.swapper.displayName,
112
+ },
113
+ })}
114
+ </Typography>
115
+ </div>
116
+ {index !== swappers.length - 1 && (
117
+ <SwapperSeparator state={state} />
118
+ )}
119
+ </Fragment>
120
+ );
72
121
  })}
73
- </Typography>
74
- </div>
122
+ </div>
123
+ )}
124
+
75
125
  <div className={stepInfoStyles()}>
76
126
  <DashedLine invisible={!hasSeparator || type === 'swap-progress'} />
77
127
  <div className={tokensContainerStyles()}>
@@ -1,10 +1,25 @@
1
+ import type { SwapperType } from 'rango-sdk';
1
2
  import type { ReactNode } from 'react';
2
3
  import type { SwapInputProps } from 'src/containers/SwapInput/SwapInput.types';
3
4
 
4
5
  type BaseStep = Pick<SwapInputProps, 'chain' | 'token' | 'price'>;
5
6
 
7
+ type SwapperInfo = SwapInputProps['chain'] & {
8
+ type?: SwapperType;
9
+ };
10
+
11
+ export type InternalSwap = {
12
+ swapper: SwapperInfo;
13
+ from: {
14
+ blockchain: string;
15
+ };
16
+ to: {
17
+ blockchain: string;
18
+ };
19
+ };
20
+
6
21
  export type Step = {
7
- swapper: SwapInputProps['chain'];
22
+ swapper: SwapperInfo;
8
23
  from: BaseStep;
9
24
  to: BaseStep;
10
25
  error?: {
@@ -13,6 +28,7 @@ export type Step = {
13
28
  };
14
29
  alerts?: ReactNode;
15
30
  state?: 'error' | 'warning';
31
+ internalSwaps?: InternalSwap[];
16
32
  };
17
33
 
18
34
  export type StepDetailsProps = {
@@ -17,6 +17,7 @@ export const StyledSwitchRoot = styled(RadixSwitch.Root, {
17
17
  padding: '0',
18
18
  cursor: 'pointer',
19
19
  transition: 'all 0.35s',
20
+ overflow: 'hidden',
20
21
 
21
22
  '&[data-state="checked"]': {
22
23
  $$color: '$colors$secondary500',
@@ -41,6 +42,12 @@ export const StyledSwitchThumb = styled(RadixSwitch.Thumb, {
41
42
  transition: ' transform 300ms',
42
43
  borderRadius: '999999px',
43
44
  willChange: 'transform',
45
+ '&:hover': {
46
+ boxShadow: 'rgba(0, 0, 0, 0.6) 0px 3px 8px',
47
+ '-moz-box-shadow': 'rgba(0, 0, 0, 0.6) 0px 3px 8px',
48
+ '-webkit-box-shadow': 'rgba(0, 0, 0, 0.6) 0px 3px 8px',
49
+ '-o-box-shadow': 'rgba(0, 0, 0, 0.6) 0px 3px 8px',
50
+ },
44
51
 
45
52
  '&[data-state="checked"]': {
46
53
  transform: 'translateX(8px)',
@@ -17,14 +17,17 @@ function TextFieldComponent(props: PropsWithChildren<PropTypes>, ref?: Ref) {
17
17
  style,
18
18
  variant,
19
19
  fullWidth,
20
+ labelProps,
20
21
  ...inputAttributes
21
22
  } = props;
22
23
  return (
23
24
  <>
24
25
  {label && (
25
26
  <>
26
- <Label {...(inputAttributes.id && { htmlFor: inputAttributes.id })}>
27
- <Typography variant="label" size="large">
27
+ <Label
28
+ className="_text"
29
+ {...(inputAttributes.id && { htmlFor: inputAttributes.id })}>
30
+ <Typography variant="label" size="large" {...labelProps}>
28
31
  {label}
29
32
  </Typography>
30
33
  </Label>
@@ -1,4 +1,5 @@
1
1
  import type { InputContainer } from './TextField.styles';
2
+ import type { PropTypes as TypographyProps } from '../Typography/Typography.types';
2
3
  import type * as Stitches from '@stitches/react';
3
4
 
4
5
  type BaseProps = Stitches.VariantProps<typeof InputContainer>;
@@ -12,10 +13,11 @@ export type Ref =
12
13
  | undefined;
13
14
 
14
15
  export type PropTypes = {
15
- label?: string;
16
+ label?: string | React.ReactNode;
16
17
  prefix?: React.ReactNode;
17
18
  suffix?: React.ReactNode;
18
19
  size?: BaseSizes;
19
20
  variant?: BaseVariants;
20
21
  fullWidth?: boolean;
22
+ labelProps?: TypographyProps;
21
23
  } & Omit<React.InputHTMLAttributes<HTMLInputElement>, 'prefix' | 'size'>;
@@ -0,0 +1,24 @@
1
+ import type { SvgIconPropsWithChildren } from '../components/SvgIcon';
2
+
3
+ import React, { createElement } from 'react';
4
+
5
+ import { SvgIcon } from '../components/SvgIcon';
6
+
7
+ function SvgHeight(props: SvgIconPropsWithChildren) {
8
+ return createElement(
9
+ SvgIcon,
10
+ props,
11
+ <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
12
+ <g id="Height">
13
+ <path
14
+ id="Height_2"
15
+ fillRule="evenodd"
16
+ clipRule="evenodd"
17
+ d="M12.3807 23.7933C12.1204 24.0689 11.6983 24.0689 11.4379 23.7933L7.19526 19.301C6.93491 19.0254 6.93491 18.5784 7.19526 18.3028C7.45561 18.0271 7.87772 18.0271 8.13807 18.3028L11.2426 21.59V2.41003L8.13807 5.69723C7.87772 5.97289 7.45561 5.97289 7.19526 5.69723C6.93491 5.42156 6.93491 4.97462 7.19526 4.69896L11.4379 0.206747C11.6983 -0.0689157 12.1204 -0.0689157 12.3807 0.206747L16.6234 4.69896C16.8837 4.97462 16.8837 5.42156 16.6234 5.69723C16.363 5.97289 15.9409 5.97289 15.6805 5.69723L12.576 2.41003V21.59L15.6805 18.3028C15.9409 18.0271 16.363 18.0271 16.6234 18.3028C16.8837 18.5784 16.8837 19.0254 16.6234 19.301L12.3807 23.7933Z"
18
+ fill="currentColor"
19
+ />
20
+ </g>
21
+ </svg>
22
+ );
23
+ }
24
+ export default SvgHeight;
@@ -0,0 +1,32 @@
1
+ import type { SvgIconPropsWithChildren } from '../components/SvgIcon';
2
+
3
+ import React, { createElement } from 'react';
4
+
5
+ import { SvgIcon } from '../components/SvgIcon';
6
+
7
+ function SvgKey(props: SvgIconPropsWithChildren) {
8
+ return createElement(
9
+ SvgIcon,
10
+ props,
11
+ <svg viewBox="0 0 12 13" xmlns="http://www.w3.org/2000/svg">
12
+ <g id="key">
13
+ <path
14
+ id="Vector"
15
+ d="M3.26028 12.4995C3.20753 12.4995 3.1495 12.4942 3.10203 12.489L1.95736 12.3307C1.40876 12.2569 0.912912 11.7663 0.828513 11.2072L0.670263 10.052C0.617513 9.68278 0.775763 9.20278 1.03951 8.93377L3.35523 6.61815C2.98071 5.12011 3.41325 3.53768 4.51573 2.44581C6.22482 0.742057 9.00473 0.736782 10.7191 2.44581C11.5473 3.27394 12.0009 4.37637 12.0009 5.54737C12.0009 6.71837 11.5473 7.82079 10.7191 8.64893C9.61136 9.74608 8.03414 10.1786 6.54659 9.79883L4.2256 12.1144C4.00405 12.3465 3.60843 12.4995 3.26028 12.4995ZM7.61214 1.95525C6.68902 1.95525 5.77117 2.30339 5.0696 3.00493C4.1201 3.94911 3.77723 5.3311 4.17285 6.61815C4.21505 6.76056 4.17813 6.90826 4.07263 7.01375L1.59338 9.49289C1.50371 9.58256 1.42986 9.81465 1.44569 9.93597L1.60393 11.0911C1.63558 11.2916 1.85186 11.5184 2.05231 11.5448L3.20225 11.703C3.32885 11.7241 3.56095 11.6503 3.65063 11.5606L6.14042 9.07619C6.24592 8.97069 6.39889 8.93904 6.53604 8.98124C7.80731 9.38212 9.19463 9.03926 10.1441 8.0898C10.8193 7.41463 11.1939 6.50737 11.1939 5.54737C11.1939 4.58209 10.8193 3.6801 10.1441 3.00493C9.45838 2.30866 8.53526 1.95525 7.61214 1.95525Z"
16
+ fill="#727272"
17
+ />
18
+ <path
19
+ id="Vector_2"
20
+ d="M4.84974 11.3351C4.74951 11.3351 4.64929 11.2982 4.57016 11.2191L3.35692 10.0059C3.20394 9.85291 3.20394 9.59973 3.35692 9.44676C3.50989 9.29379 3.76309 9.29379 3.91607 9.44676L5.12931 10.66C5.28229 10.8129 5.28229 11.0661 5.12931 11.2191C5.05019 11.2982 4.94996 11.3351 4.84974 11.3351Z"
21
+ fill="#727272"
22
+ />
23
+ <path
24
+ id="Vector_3"
25
+ d="M7.64781 6.69786C6.99371 6.69786 6.46094 6.16511 6.46094 5.51104C6.46094 4.85697 6.99371 4.32422 7.64781 4.32422C8.30191 4.32422 8.83468 4.85697 8.83468 5.51104C8.83468 6.16511 8.30191 6.69786 7.64781 6.69786ZM7.64781 5.11543C7.43153 5.11543 7.25218 5.29478 7.25218 5.51104C7.25218 5.72731 7.43153 5.90665 7.64781 5.90665C7.86408 5.90665 8.04343 5.72731 8.04343 5.51104C8.04343 5.29478 7.86408 5.11543 7.64781 5.11543Z"
26
+ fill="#727272"
27
+ />
28
+ </g>
29
+ </svg>
30
+ );
31
+ }
32
+ export default SvgKey;