@rango-dev/ui 0.15.1-next.8 → 0.16.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 (220) hide show
  1. package/CHANGELOG.md +59 -0
  2. package/dist/index.js +6 -6
  3. package/dist/index.js.map +4 -4
  4. package/dist/translations/en.d.ts.map +1 -1
  5. package/dist/translations/es.d.ts.map +1 -1
  6. package/dist/translations/fr.d.ts.map +1 -1
  7. package/dist/translations/jp.d.ts.map +1 -1
  8. package/dist/widget/ui/src/components/Alert/Alert.styles.d.ts +18 -3
  9. package/dist/widget/ui/src/components/Alert/Alert.styles.d.ts.map +1 -1
  10. package/dist/widget/ui/src/components/BestRoute/BestRoute.d.ts.map +1 -1
  11. package/dist/widget/ui/src/components/BestRoute/BestRoute.styles.d.ts +55 -9
  12. package/dist/widget/ui/src/components/BestRoute/BestRoute.styles.d.ts.map +1 -1
  13. package/dist/widget/ui/src/components/BestRoute/BestRoute.types.d.ts +1 -0
  14. package/dist/widget/ui/src/components/BestRoute/BestRoute.types.d.ts.map +1 -1
  15. package/dist/widget/ui/src/components/BestRoute/BestRouteSkeleton.styles.d.ts +12 -2
  16. package/dist/widget/ui/src/components/BestRoute/BestRouteSkeleton.styles.d.ts.map +1 -1
  17. package/dist/widget/ui/src/components/BestRoute/RouteSummary.styles.d.ts +6 -1
  18. package/dist/widget/ui/src/components/BestRoute/RouteSummary.styles.d.ts.map +1 -1
  19. package/dist/widget/ui/src/components/BlockchainsChip/BlockchainsChip.d.ts +5 -0
  20. package/dist/widget/ui/src/components/BlockchainsChip/BlockchainsChip.d.ts.map +1 -0
  21. package/dist/widget/ui/src/components/BlockchainsChip/BlockchainsChip.styles.d.ts +156 -0
  22. package/dist/widget/ui/src/components/BlockchainsChip/BlockchainsChip.styles.d.ts.map +1 -0
  23. package/dist/widget/ui/src/components/BlockchainsChip/BlockchainsChip.types.d.ts +6 -0
  24. package/dist/widget/ui/src/components/BlockchainsChip/BlockchainsChip.types.d.ts.map +1 -0
  25. package/dist/widget/ui/src/components/BlockchainsChip/index.d.ts +2 -0
  26. package/dist/widget/ui/src/components/BlockchainsChip/index.d.ts.map +1 -0
  27. package/dist/widget/ui/src/components/BottomLogo/BottomLogo.styles.d.ts +12 -2
  28. package/dist/widget/ui/src/components/BottomLogo/BottomLogo.styles.d.ts.map +1 -1
  29. package/dist/widget/ui/src/components/Button/Button.styles.d.ts +18 -3
  30. package/dist/widget/ui/src/components/Button/Button.styles.d.ts.map +1 -1
  31. package/dist/widget/ui/src/components/ChainToken/ChainToken.styles.d.ts +12 -2
  32. package/dist/widget/ui/src/components/ChainToken/ChainToken.styles.d.ts.map +1 -1
  33. package/dist/widget/ui/src/components/Checkbox/Checkbox.styles.d.ts +24 -4
  34. package/dist/widget/ui/src/components/Checkbox/Checkbox.styles.d.ts.map +1 -1
  35. package/dist/widget/ui/src/components/Checkbox/Checkbox.types.d.ts +2 -1
  36. package/dist/widget/ui/src/components/Checkbox/Checkbox.types.d.ts.map +1 -1
  37. package/dist/widget/ui/src/components/Chip/Chip.styles.d.ts +6 -1
  38. package/dist/widget/ui/src/components/Chip/Chip.styles.d.ts.map +1 -1
  39. package/dist/widget/ui/src/components/Collapsible/Collapsible.d.ts +5 -0
  40. package/dist/widget/ui/src/components/Collapsible/Collapsible.d.ts.map +1 -0
  41. package/dist/widget/ui/src/components/Collapsible/Collapsible.stories.d.ts +23 -0
  42. package/dist/widget/ui/src/components/Collapsible/Collapsible.stories.d.ts.map +1 -0
  43. package/dist/widget/ui/src/components/Collapsible/Collapsible.styles.d.ts +156 -0
  44. package/dist/widget/ui/src/components/Collapsible/Collapsible.styles.d.ts.map +1 -0
  45. package/dist/widget/ui/src/components/Collapsible/Collapsible.types.d.ts +7 -0
  46. package/dist/widget/ui/src/components/Collapsible/Collapsible.types.d.ts.map +1 -0
  47. package/dist/widget/ui/src/components/Collapsible/index.d.ts +2 -0
  48. package/dist/widget/ui/src/components/Collapsible/index.d.ts.map +1 -0
  49. package/dist/widget/ui/src/components/Drawer/Drawer.styles.d.ts +30 -5
  50. package/dist/widget/ui/src/components/Drawer/Drawer.styles.d.ts.map +1 -1
  51. package/dist/widget/ui/src/components/Header/Header.styles.d.ts +12 -2
  52. package/dist/widget/ui/src/components/Header/Header.styles.d.ts.map +1 -1
  53. package/dist/widget/ui/src/components/Icon/CloseIcon.d.ts +6 -1
  54. package/dist/widget/ui/src/components/Icon/CloseIcon.d.ts.map +1 -1
  55. package/dist/widget/ui/src/components/Icon/common.d.ts +14 -4
  56. package/dist/widget/ui/src/components/Icon/common.d.ts.map +1 -1
  57. package/dist/widget/ui/src/components/IconButton/IconButton.d.ts +3 -5
  58. package/dist/widget/ui/src/components/IconButton/IconButton.d.ts.map +1 -1
  59. package/dist/widget/ui/src/components/List/List.styles.d.ts +6 -1
  60. package/dist/widget/ui/src/components/List/List.styles.d.ts.map +1 -1
  61. package/dist/widget/ui/src/components/ListItem/ListItem.styles.d.ts +6 -1
  62. package/dist/widget/ui/src/components/ListItem/ListItem.styles.d.ts.map +1 -1
  63. package/dist/widget/ui/src/components/ListItemButton/ListItemButton.styles.d.ts +6 -1
  64. package/dist/widget/ui/src/components/ListItemButton/ListItemButton.styles.d.ts.map +1 -1
  65. package/dist/widget/ui/src/components/MessageBox/CollapsibleMessageBox.styles.d.ts +6 -1
  66. package/dist/widget/ui/src/components/MessageBox/CollapsibleMessageBox.styles.d.ts.map +1 -1
  67. package/dist/widget/ui/src/components/MessageBox/MessageBox.styles.d.ts +18 -3
  68. package/dist/widget/ui/src/components/MessageBox/MessageBox.styles.d.ts.map +1 -1
  69. package/dist/widget/ui/src/components/Modal/Modal.d.ts.map +1 -1
  70. package/dist/widget/ui/src/components/Modal/Modal.styles.d.ts +36 -6
  71. package/dist/widget/ui/src/components/Modal/Modal.styles.d.ts.map +1 -1
  72. package/dist/widget/ui/src/components/Modal/index.d.ts +1 -0
  73. package/dist/widget/ui/src/components/Modal/index.d.ts.map +1 -1
  74. package/dist/widget/ui/src/components/NotFound/NotFound.styles.d.ts +6 -1
  75. package/dist/widget/ui/src/components/NotFound/NotFound.styles.d.ts.map +1 -1
  76. package/dist/widget/ui/src/components/Popover/Popover.styles.d.ts +12 -2
  77. package/dist/widget/ui/src/components/Popover/Popover.styles.d.ts.map +1 -1
  78. package/dist/widget/ui/src/components/PriceImpact/PriceImpact.styles.d.ts +6 -1
  79. package/dist/widget/ui/src/components/PriceImpact/PriceImpact.styles.d.ts.map +1 -1
  80. package/dist/widget/ui/src/components/Radio/Radio.styles.d.ts +12 -2
  81. package/dist/widget/ui/src/components/Radio/Radio.styles.d.ts.map +1 -1
  82. package/dist/widget/ui/src/components/RadioGroup/RadioGroup.styles.d.ts +24 -4
  83. package/dist/widget/ui/src/components/RadioGroup/RadioGroup.styles.d.ts.map +1 -1
  84. package/dist/widget/ui/src/components/RouteCost/RouteCost.styles.d.ts +6 -1
  85. package/dist/widget/ui/src/components/RouteCost/RouteCost.styles.d.ts.map +1 -1
  86. package/dist/widget/ui/src/components/RoutesOverview/RoutesOverview.d.ts +6 -1
  87. package/dist/widget/ui/src/components/RoutesOverview/RoutesOverview.d.ts.map +1 -1
  88. package/dist/widget/ui/src/components/SelectableCategoryList/SelectableCategoryList.d.ts +4 -0
  89. package/dist/widget/ui/src/components/SelectableCategoryList/SelectableCategoryList.d.ts.map +1 -0
  90. package/dist/widget/ui/src/components/SelectableCategoryList/SelectableCategoryList.helpers.d.ts +4 -0
  91. package/dist/widget/ui/src/components/SelectableCategoryList/SelectableCategoryList.helpers.d.ts.map +1 -0
  92. package/dist/widget/ui/src/components/SelectableCategoryList/SelectableCategoryList.styles.d.ts +460 -0
  93. package/dist/widget/ui/src/components/SelectableCategoryList/SelectableCategoryList.styles.d.ts.map +1 -0
  94. package/dist/widget/ui/src/components/SelectableCategoryList/SelectableCategoryList.types.d.ts +15 -0
  95. package/dist/widget/ui/src/components/SelectableCategoryList/SelectableCategoryList.types.d.ts.map +1 -0
  96. package/dist/widget/ui/src/components/SelectableCategoryList/index.d.ts +3 -0
  97. package/dist/widget/ui/src/components/SelectableCategoryList/index.d.ts.map +1 -0
  98. package/dist/widget/ui/src/components/Skeleton/Skeleton.styles.d.ts +6 -1
  99. package/dist/widget/ui/src/components/Skeleton/Skeleton.styles.d.ts.map +1 -1
  100. package/dist/widget/ui/src/components/StepDetails/StepDetails.d.ts.map +1 -1
  101. package/dist/widget/ui/src/components/StepDetails/StepDetails.styles.d.ts +30 -5
  102. package/dist/widget/ui/src/components/StepDetails/StepDetails.styles.d.ts.map +1 -1
  103. package/dist/widget/ui/src/components/SvgIcon/SvgIcon.style.d.ts +7 -2
  104. package/dist/widget/ui/src/components/SvgIcon/SvgIcon.style.d.ts.map +1 -1
  105. package/dist/widget/ui/src/components/SwapDetailsPlaceholder/SwapDetailsPlaceholder.d.ts +6 -1
  106. package/dist/widget/ui/src/components/SwapDetailsPlaceholder/SwapDetailsPlaceholder.d.ts.map +1 -1
  107. package/dist/widget/ui/src/components/SwapListItem/SwapListItem.styles.d.ts +36 -6
  108. package/dist/widget/ui/src/components/SwapListItem/SwapListItem.styles.d.ts.map +1 -1
  109. package/dist/widget/ui/src/components/SwapListItem/SwapToken.styles.d.ts +54 -9
  110. package/dist/widget/ui/src/components/SwapListItem/SwapToken.styles.d.ts.map +1 -1
  111. package/dist/widget/ui/src/components/Switch/Switch.styles.d.ts +12 -2
  112. package/dist/widget/ui/src/components/Switch/Switch.styles.d.ts.map +1 -1
  113. package/dist/widget/ui/src/components/TextField/TextField.styles.d.ts +18 -3
  114. package/dist/widget/ui/src/components/TextField/TextField.styles.d.ts.map +1 -1
  115. package/dist/widget/ui/src/components/Tooltip/Tooltip.d.ts.map +1 -1
  116. package/dist/widget/ui/src/components/Tooltip/Tooltip.styles.d.ts +314 -1
  117. package/dist/widget/ui/src/components/Tooltip/Tooltip.styles.d.ts.map +1 -1
  118. package/dist/widget/ui/src/components/Typography/Typography.styles.d.ts +6 -1
  119. package/dist/widget/ui/src/components/Typography/Typography.styles.d.ts.map +1 -1
  120. package/dist/widget/ui/src/components/Wallet/Wallet.helpers.d.ts.map +1 -1
  121. package/dist/widget/ui/src/components/Wallet/Wallet.styles.d.ts +30 -5
  122. package/dist/widget/ui/src/components/Wallet/Wallet.styles.d.ts.map +1 -1
  123. package/dist/widget/ui/src/components/Wallet/Wallet.types.d.ts +1 -0
  124. package/dist/widget/ui/src/components/Wallet/Wallet.types.d.ts.map +1 -1
  125. package/dist/widget/ui/src/components/common/FilledCircle.d.ts +6 -1
  126. package/dist/widget/ui/src/components/common/FilledCircle.d.ts.map +1 -1
  127. package/dist/widget/ui/src/components/common/styles.d.ts +6 -1
  128. package/dist/widget/ui/src/components/common/styles.d.ts.map +1 -1
  129. package/dist/widget/ui/src/components/index.d.ts +3 -0
  130. package/dist/widget/ui/src/components/index.d.ts.map +1 -1
  131. package/dist/widget/ui/src/containers/SwapHistory/SwapHistory.d.ts +60 -10
  132. package/dist/widget/ui/src/containers/SwapHistory/SwapHistory.d.ts.map +1 -1
  133. package/dist/widget/ui/src/containers/SwapInput/SwapInput.d.ts.map +1 -1
  134. package/dist/widget/ui/src/containers/SwapInput/SwapInput.stories.d.ts.map +1 -1
  135. package/dist/widget/ui/src/containers/SwapInput/SwapInput.styles.d.ts +18 -3
  136. package/dist/widget/ui/src/containers/SwapInput/SwapInput.styles.d.ts.map +1 -1
  137. package/dist/widget/ui/src/containers/SwapInput/SwapInput.types.d.ts +4 -6
  138. package/dist/widget/ui/src/containers/SwapInput/SwapInput.types.d.ts.map +1 -1
  139. package/dist/widget/ui/src/containers/SwapInput/TokenSection.styles.d.ts +13 -5
  140. package/dist/widget/ui/src/containers/SwapInput/TokenSection.styles.d.ts.map +1 -1
  141. package/dist/widget/ui/src/containers/TokenSelector/TokenSelector.d.ts +6 -1
  142. package/dist/widget/ui/src/containers/TokenSelector/TokenSelector.d.ts.map +1 -1
  143. package/dist/widget/ui/src/hooks/index.d.ts +0 -1
  144. package/dist/widget/ui/src/hooks/index.d.ts.map +1 -1
  145. package/dist/widget/ui/src/icons/BorderRadius.d.ts +5 -0
  146. package/dist/widget/ui/src/icons/BorderRadius.d.ts.map +1 -0
  147. package/dist/widget/ui/src/icons/Desktop.d.ts +5 -0
  148. package/dist/widget/ui/src/icons/Desktop.d.ts.map +1 -0
  149. package/dist/widget/ui/src/icons/Font.d.ts +5 -0
  150. package/dist/widget/ui/src/icons/Font.d.ts.map +1 -0
  151. package/dist/widget/ui/src/icons/LogoWithText.d.ts +5 -0
  152. package/dist/widget/ui/src/icons/LogoWithText.d.ts.map +1 -0
  153. package/dist/widget/ui/src/icons/index.d.ts +5 -1
  154. package/dist/widget/ui/src/icons/index.d.ts.map +1 -1
  155. package/dist/widget/ui/src/theme.d.ts +60 -10
  156. package/dist/widget/ui/src/theme.d.ts.map +1 -1
  157. package/package.json +2 -2
  158. package/src/components/BestRoute/BestRoute.styles.ts +55 -9
  159. package/src/components/BestRoute/BestRoute.tsx +10 -3
  160. package/src/components/BestRoute/BestRoute.types.ts +1 -0
  161. package/src/components/BestRoute/BestRouteSkeleton.styles.ts +6 -2
  162. package/src/components/BlockchainsChip/BlockchainsChip.styles.ts +43 -0
  163. package/src/components/BlockchainsChip/BlockchainsChip.tsx +15 -0
  164. package/src/components/BlockchainsChip/BlockchainsChip.types.ts +4 -0
  165. package/src/components/BlockchainsChip/index.ts +1 -0
  166. package/src/components/Button/Button.styles.tsx +122 -32
  167. package/src/components/ChainToken/ChainToken.tsx +3 -3
  168. package/src/components/Checkbox/Checkbox.styles.ts +7 -6
  169. package/src/components/Checkbox/Checkbox.types.ts +1 -1
  170. package/src/components/Chip/Chip.styles.ts +14 -4
  171. package/src/components/Collapsible/Collapsible.stories.tsx +46 -0
  172. package/src/components/Collapsible/Collapsible.styles.ts +9 -0
  173. package/src/components/Collapsible/Collapsible.tsx +21 -0
  174. package/src/components/Collapsible/Collapsible.types.ts +7 -0
  175. package/src/components/Collapsible/index.ts +1 -0
  176. package/src/components/Header/Header.styles.ts +8 -4
  177. package/src/components/IconButton/IconButton.tsx +8 -2
  178. package/src/components/ListItem/ListItem.styles.ts +7 -2
  179. package/src/components/ListItemButton/ListItemButton.styles.ts +9 -3
  180. package/src/components/MessageBox/CollapsibleMessageBox.styles.tsx +14 -2
  181. package/src/components/MessageBox/MessageBox.styles.tsx +26 -6
  182. package/src/components/Modal/Modal.styles.ts +4 -4
  183. package/src/components/Modal/Modal.tsx +2 -10
  184. package/src/components/Modal/index.ts +1 -0
  185. package/src/components/Radio/Radio.styles.tsx +7 -6
  186. package/src/components/RouteCost/RouteCost.tsx +1 -1
  187. package/src/components/SelectableCategoryList/SelectableCategoryList.helpers.ts +35 -0
  188. package/src/components/SelectableCategoryList/SelectableCategoryList.styles.ts +21 -0
  189. package/src/components/SelectableCategoryList/SelectableCategoryList.tsx +76 -0
  190. package/src/components/SelectableCategoryList/SelectableCategoryList.types.ts +16 -0
  191. package/src/components/SelectableCategoryList/index.ts +2 -0
  192. package/src/components/StepDetails/StepDetails.styles.ts +5 -2
  193. package/src/components/StepDetails/StepDetails.tsx +11 -1
  194. package/src/components/SwapListItem/SwapListItem.styles.ts +17 -4
  195. package/src/components/SwapListItem/SwapToken.tsx +4 -4
  196. package/src/components/Switch/Switch.styles.tsx +7 -7
  197. package/src/components/TextField/TextField.styles.ts +10 -3
  198. package/src/components/Tooltip/Tooltip.styles.ts +10 -0
  199. package/src/components/Tooltip/Tooltip.tsx +9 -4
  200. package/src/components/Wallet/ClickableWallet.tsx +1 -1
  201. package/src/components/Wallet/Wallet.helpers.ts +11 -9
  202. package/src/components/Wallet/Wallet.styles.ts +20 -3
  203. package/src/components/Wallet/Wallet.types.ts +1 -0
  204. package/src/components/index.ts +3 -0
  205. package/src/containers/SwapInput/SwapInput.stories.tsx +1 -0
  206. package/src/containers/SwapInput/SwapInput.styles.ts +5 -1
  207. package/src/containers/SwapInput/SwapInput.tsx +7 -4
  208. package/src/containers/SwapInput/SwapInput.types.ts +4 -7
  209. package/src/containers/SwapInput/TokenSection.styles.ts +21 -17
  210. package/src/containers/SwapInput/TokenSection.tsx +2 -2
  211. package/src/hooks/index.ts +0 -1
  212. package/src/icons/BorderRadius.tsx +21 -0
  213. package/src/icons/Desktop.tsx +271 -0
  214. package/src/icons/Font.tsx +27 -0
  215. package/src/icons/LogoWithText.tsx +159 -0
  216. package/src/icons/index.ts +5 -1
  217. package/src/theme.ts +6 -1
  218. package/dist/widget/ui/src/hooks/usePaddingRight.d.ts +0 -8
  219. package/dist/widget/ui/src/hooks/usePaddingRight.d.ts.map +0 -1
  220. package/src/hooks/usePaddingRight.ts +0 -41
@@ -9,40 +9,35 @@ export const ButtonBase = styled('button', {
9
9
  fontSize: '$16',
10
10
  fontWeight: '$400',
11
11
  border: '0',
12
- borderRadius: '$xs',
12
+ borderRadius: '$secondary',
13
13
  cursor: 'pointer',
14
14
  transition: 'all 0.35s',
15
-
15
+ fontFamily: 'inherit',
16
16
  variants: {
17
17
  size: {
18
18
  xxsmall: {
19
- borderRadius: '$xm',
20
19
  fontSize: '$10',
21
20
  lineHeight: '12px',
22
21
  padding: '$4',
23
22
  },
24
23
  xsmall: {
25
- borderRadius: '$xm',
26
24
  fontSize: '$12',
27
25
  lineHeight: '12px',
28
26
  padding: '$0 $4',
29
27
  },
30
28
  small: {
31
- borderRadius: '$xm',
32
29
  fontSize: '$14',
33
30
  fontWeight: '$medium',
34
31
  lineHeight: '20px',
35
32
  padding: '$4 $4',
36
33
  },
37
34
  medium: {
38
- borderRadius: '$md',
39
35
  fontSize: '$16',
40
36
  lineHeight: '24px',
41
37
  fontWeight: '$medium',
42
38
  padding: '$8 $8',
43
39
  },
44
40
  large: {
45
- borderRadius: '$md',
46
41
  fontSize: '$18',
47
42
  lineHeight: '26px',
48
43
  padding: '$12 $24',
@@ -57,22 +52,18 @@ export const ButtonBase = styled('button', {
57
52
  '&:hover': {
58
53
  backgroundColor: '$neutral300',
59
54
  },
60
- '&:disabled': {
61
- $$color: '$colors$background',
62
- [`.${darkTheme} &`]: {
63
- $$color: '$colors$foreground',
64
- },
65
- backgroundColor: '$neutral800',
66
- color: '$$color',
55
+ '&:focus-visible': {
56
+ backgroundColor: '$neutral500',
57
+ outline: 0,
67
58
  },
68
- '&:disabled:hover': {
59
+ '&:disabled': {
69
60
  $$color: '$colors$background',
70
61
  [`.${darkTheme} &`]: {
71
62
  $$color: '$colors$foreground',
72
63
  },
73
64
  backgroundColor: '$neutral800',
74
65
  color: '$$color',
75
- transform: 'unset',
66
+ pointerEvents: 'none',
76
67
  },
77
68
  },
78
69
  outlined: {
@@ -84,13 +75,14 @@ export const ButtonBase = styled('button', {
84
75
  '&:hover': {
85
76
  borderColor: '$neutral300',
86
77
  },
78
+ '&:focus-visible': {
79
+ borderColor: '$neutral500',
80
+ outline: 0,
81
+ },
87
82
  '&:disabled': {
88
83
  borderColor: '$neutral800',
89
84
  color: '$neutral800',
90
- },
91
- '&:disabled:hover': {
92
- borderColor: '$neutral800',
93
- transform: 'unset',
85
+ pointerEvents: 'none',
94
86
  },
95
87
  },
96
88
  ghost: {
@@ -98,6 +90,11 @@ export const ButtonBase = styled('button', {
98
90
  color: '$neutral900',
99
91
  '&:disabled': {
100
92
  color: '$neutral800',
93
+ pointerEvents: 'none',
94
+ },
95
+ '&:focus-visible': {
96
+ backgroundColor: '$neutral500',
97
+ outline: 0,
101
98
  },
102
99
  '&:hover': {
103
100
  color: '$secondary500',
@@ -145,6 +142,7 @@ export const ButtonBase = styled('button', {
145
142
  },
146
143
  background: '$neutral800',
147
144
  color: '$$color',
145
+ pointerEvents: 'none',
148
146
  },
149
147
  '&:visited': {
150
148
  background: '$primary500',
@@ -154,6 +152,10 @@ export const ButtonBase = styled('button', {
154
152
  backgroundSize: '100%',
155
153
  transition: 'background 0s',
156
154
  },
155
+ '&:focus-visible': {
156
+ background: '$primary600',
157
+ outline: 0,
158
+ },
157
159
  },
158
160
  },
159
161
  {
@@ -166,6 +168,11 @@ export const ButtonBase = styled('button', {
166
168
  color: '$primary600',
167
169
  borderColor: '$primary600',
168
170
  },
171
+ '&:focus-visible': {
172
+ color: '$primary600',
173
+ borderColor: '$primary600',
174
+ outline: 0,
175
+ },
169
176
  },
170
177
  },
171
178
  {
@@ -176,6 +183,10 @@ export const ButtonBase = styled('button', {
176
183
  '&:hover': {
177
184
  color: '$primary600',
178
185
  },
186
+ '&:focus-visible': {
187
+ color: '$primary600',
188
+ outline: 0,
189
+ },
179
190
  },
180
191
  },
181
192
  {
@@ -189,7 +200,7 @@ export const ButtonBase = styled('button', {
189
200
  },
190
201
  color: '$$color',
191
202
  '&:hover': {
192
- background: '$secondary500',
203
+ background: '$secondary600',
193
204
  $$color: '$colors$background',
194
205
  [`.${darkTheme} &`]: {
195
206
  $$color: '$colors$foreground',
@@ -200,7 +211,12 @@ export const ButtonBase = styled('button', {
200
211
  background: '$secondary500',
201
212
  },
202
213
  '&:focus': {
203
- background: '$secondary500',
214
+ background: '$secondary600',
215
+ outline: 0,
216
+ },
217
+ '&:focus-visible': {
218
+ background: '$secondary600',
219
+ outline: 0,
204
220
  },
205
221
  },
206
222
  },
@@ -211,16 +227,22 @@ export const ButtonBase = styled('button', {
211
227
  color: '$secondary500',
212
228
  borderColor: '$secondary500',
213
229
  '&:hover': {
214
- color: '$secondary500',
215
- borderColor: '$secondary500',
230
+ color: '$secondary600',
231
+ borderColor: '$secondary600',
216
232
  },
217
233
  '&:visited': {
218
234
  color: '$secondary500',
219
235
  borderColor: '$secondary500',
220
236
  },
221
237
  '&:focus': {
222
- color: '$secondary500',
238
+ color: '$secondary600',
239
+ borderColor: '$secondary500',
240
+ outline: 0,
241
+ },
242
+ '&:focus-visible': {
243
+ color: '$secondary600',
223
244
  borderColor: '$secondary500',
245
+ outline: 0,
224
246
  },
225
247
  },
226
248
  },
@@ -230,13 +252,18 @@ export const ButtonBase = styled('button', {
230
252
  css: {
231
253
  color: '$secondary500',
232
254
  '&:hover': {
233
- color: '$secondary500',
255
+ color: '$secondary600',
234
256
  },
235
257
  '&:visited': {
236
258
  color: '$secondary500',
237
259
  },
238
260
  '&:focus': {
239
- color: '$secondary500',
261
+ color: '$secondary600',
262
+ outline: 0,
263
+ },
264
+ '&:focus-visible': {
265
+ color: '$secondary600',
266
+ outline: 0,
240
267
  },
241
268
  },
242
269
  },
@@ -252,11 +279,6 @@ export const ButtonBase = styled('button', {
252
279
  color: '$$color',
253
280
  '&:hover': {
254
281
  background: '$error500',
255
- $$color: '$colors$background',
256
- [`.${darkTheme} &`]: {
257
- $$color: '$colors$foreground',
258
- },
259
- color: '$$color',
260
282
  },
261
283
  '&:visited': {
262
284
  background: '$error500',
@@ -264,6 +286,13 @@ export const ButtonBase = styled('button', {
264
286
  '&:focus': {
265
287
  background: '$error500',
266
288
  },
289
+ '&:focus-visible': {
290
+ $$outline: '$colors$error600',
291
+ [`.${darkTheme} &`]: {
292
+ $$outline: '$colors$error300',
293
+ },
294
+ outlineColor: '$$outline',
295
+ },
267
296
  },
268
297
  },
269
298
  {
@@ -284,6 +313,14 @@ export const ButtonBase = styled('button', {
284
313
  color: '$error500',
285
314
  borderColor: '$error500',
286
315
  },
316
+ '&:focus-visible': {
317
+ $$outline: '$colors$error600',
318
+ [`.${darkTheme} &`]: {
319
+ $$outline: '$colors$error300',
320
+ },
321
+ color: '$$outline',
322
+ outlineColor: '$$outline',
323
+ },
287
324
  },
288
325
  },
289
326
  {
@@ -300,6 +337,14 @@ export const ButtonBase = styled('button', {
300
337
  '&:focus': {
301
338
  color: '$error500',
302
339
  },
340
+ '&:focus-visible': {
341
+ $$outline: '$colors$error600',
342
+ [`.${darkTheme} &`]: {
343
+ $$outline: '$colors$error300',
344
+ },
345
+ color: '$$outline',
346
+ outline: 0,
347
+ },
303
348
  },
304
349
  },
305
350
  {
@@ -326,6 +371,13 @@ export const ButtonBase = styled('button', {
326
371
  '&:focus': {
327
372
  background: '$warning500',
328
373
  },
374
+ '&:focus-visible': {
375
+ $$outline: '$colors$warning600',
376
+ [`.${darkTheme} &`]: {
377
+ $$outline: '$colors$warning300',
378
+ },
379
+ outlineColor: '$$outline',
380
+ },
329
381
  },
330
382
  },
331
383
  {
@@ -346,6 +398,14 @@ export const ButtonBase = styled('button', {
346
398
  color: '$warning500',
347
399
  borderColor: '$warning500',
348
400
  },
401
+ '&:focus-visible': {
402
+ $$outline: '$colors$warning600',
403
+ [`.${darkTheme} &`]: {
404
+ $$outline: '$colors$warning300',
405
+ },
406
+ outlineColor: '$$outline',
407
+ color: '$$outline',
408
+ },
349
409
  },
350
410
  },
351
411
  {
@@ -362,6 +422,13 @@ export const ButtonBase = styled('button', {
362
422
  '&:focus': {
363
423
  color: '$warning500',
364
424
  },
425
+ '&:focus-visible': {
426
+ $$outline: '$colors$warning600',
427
+ [`.${darkTheme} &`]: {
428
+ $$outline: '$colors$warning300',
429
+ },
430
+ color: '$$outline',
431
+ },
365
432
  },
366
433
  },
367
434
  {
@@ -388,6 +455,13 @@ export const ButtonBase = styled('button', {
388
455
  '&:focus': {
389
456
  background: '$success500',
390
457
  },
458
+ '&:focus-visible': {
459
+ $$outline: '$colors$success600',
460
+ [`.${darkTheme} &`]: {
461
+ $$outline: '$colors$success300',
462
+ },
463
+ outlineColor: '$$outline',
464
+ },
391
465
  },
392
466
  },
393
467
  {
@@ -408,6 +482,14 @@ export const ButtonBase = styled('button', {
408
482
  color: '$success500',
409
483
  borderColor: '$success500',
410
484
  },
485
+ '&:focus-visible': {
486
+ $$outline: '$colors$success600',
487
+ [`.${darkTheme} &`]: {
488
+ $$outline: '$colors$success300',
489
+ },
490
+ outlineColor: '$$outline',
491
+ color: '$$outline',
492
+ },
411
493
  },
412
494
  },
413
495
  {
@@ -424,6 +506,14 @@ export const ButtonBase = styled('button', {
424
506
  '&:focus': {
425
507
  color: '$success500',
426
508
  },
509
+ '&:focus-visible': {
510
+ $$outline: '$colors$success600',
511
+ [`.${darkTheme} &`]: {
512
+ $$outline: '$colors$success300',
513
+ },
514
+ outline: 0,
515
+ color: '$$outline',
516
+ },
427
517
  },
428
518
  },
429
519
  ],
@@ -31,7 +31,7 @@ export const ChainToken: React.FC<PropTypes> = (props) => {
31
31
  size={tokenChainSizeMap[size].token}
32
32
  src={tokenImage}
33
33
  type="circular"
34
- {...(useAsPlaceholder && { useAsPlaceholder })}
34
+ {...((useAsPlaceholder || !tokenImage) && { useAsPlaceholder: true })}
35
35
  />
36
36
  )}
37
37
  <ChainImageContainer size={size}>
@@ -46,8 +46,8 @@ export const ChainToken: React.FC<PropTypes> = (props) => {
46
46
  size={tokenChainSizeMap[size].chain}
47
47
  src={chainImage}
48
48
  type="circular"
49
- {...(useAsPlaceholder && {
50
- useAsPlaceholder,
49
+ {...((useAsPlaceholder || !chainImage) && {
50
+ useAsPlaceholder: true,
51
51
  backgroundColor: '$secondary300',
52
52
  })}
53
53
  />
@@ -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
 
@@ -7,7 +7,7 @@ type RadixCheckboxProps = Pick<
7
7
 
8
8
  interface WithLabelProps {
9
9
  id: string;
10
- label: string;
10
+ label: React.ReactNode;
11
11
  }
12
12
  interface ComponentProps {
13
13
  id?: never;
@@ -8,19 +8,29 @@ 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
+ fontFamily: 'inherit',
13
+ $$color: '$colors$neutral100',
14
+ [`.${darkTheme} &`]: {
15
+ $$color: '$colors$neutral300',
16
+ },
17
+ backgroundColor: '$$color',
13
18
 
14
19
  '&:hover': {
15
20
  $$color: '$colors$info100',
16
21
  [`.${darkTheme} &`]: {
17
- $$color: '$colors$neutral400',
22
+ $$color: '$colors$neutral100',
18
23
  },
19
24
  backgroundColor: '$$color',
20
25
  },
21
26
 
22
- '&:focus': {
23
- outline: '1px solid gray',
27
+ '&:focus-visible': {
28
+ $$color: '$colors$info100',
29
+ [`.${darkTheme} &`]: {
30
+ $$color: '$colors$info700',
31
+ },
32
+ backgroundColor: '$$color',
33
+ outline: 0,
24
34
  },
25
35
 
26
36
  variants: {
@@ -0,0 +1,46 @@
1
+ import type { CollapsibleProps } from './Collapsible.types';
2
+
3
+ import React, { useState } from 'react';
4
+
5
+ import { ChevronUpIcon } from '../../icons';
6
+ import { Typography } from '../Typography';
7
+
8
+ import { CollapsibleComponent as Collapsible } from './Collapsible';
9
+
10
+ export default {
11
+ title: 'Components/Collapsible',
12
+ component: Collapsible,
13
+ args: {
14
+ open: false,
15
+ trigger: (
16
+ <>
17
+ <Typography size="medium" variant="title">
18
+ Trigger
19
+ </Typography>
20
+ <ChevronUpIcon size={10} color="gray" />
21
+ </>
22
+ ),
23
+ },
24
+ argTypes: {
25
+ open: {
26
+ name: 'open',
27
+ defaultValue: false,
28
+ control: { type: 'boolean' },
29
+ },
30
+ },
31
+ };
32
+
33
+ export const Main = (args: CollapsibleProps) => {
34
+ const [open, setOpen] = useState<boolean>(false);
35
+
36
+ return (
37
+ <Collapsible
38
+ {...args}
39
+ open={open || args.open}
40
+ onOpenChange={() => setOpen(!open)}>
41
+ <Typography size="medium" variant="title">
42
+ Content
43
+ </Typography>
44
+ </Collapsible>
45
+ );
46
+ };
@@ -0,0 +1,9 @@
1
+ import * as Collapsible from '@radix-ui/react-collapsible';
2
+
3
+ import { styled } from '../../theme';
4
+
5
+ export const Trigger = styled(Collapsible.Trigger, {
6
+ border: 'none',
7
+ background: 'transparent',
8
+ width: '100%',
9
+ });
@@ -0,0 +1,21 @@
1
+ import type { CollapsibleProps } from './Collapsible.types';
2
+ import type { PropsWithChildren } from 'react';
3
+
4
+ import * as Collapsible from '@radix-ui/react-collapsible';
5
+ import React from 'react';
6
+
7
+ import { CollapsibleContent } from '../common/styles';
8
+
9
+ import { Trigger } from './Collapsible.styles';
10
+
11
+ export function CollapsibleComponent(
12
+ props: PropsWithChildren<CollapsibleProps>
13
+ ) {
14
+ const { open, onOpenChange, trigger, children, ...otherProps } = props;
15
+ return (
16
+ <Collapsible.Root open={open} onOpenChange={onOpenChange} {...otherProps}>
17
+ <Trigger asChild>{trigger}</Trigger>
18
+ <CollapsibleContent open={open}>{children}</CollapsibleContent>
19
+ </Collapsible.Root>
20
+ );
21
+ }
@@ -0,0 +1,7 @@
1
+ import type React from 'react';
2
+
3
+ export interface CollapsibleProps {
4
+ trigger: React.ReactNode;
5
+ open: boolean;
6
+ onOpenChange: (open: boolean) => void;
7
+ }
@@ -0,0 +1 @@
1
+ export { CollapsibleComponent as Collapsible } from './Collapsible';
@@ -1,14 +1,18 @@
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
- borderTopRightRadius: '$md',
11
- borderTopLeftRadius: '$md',
14
+ borderTopRightRadius: '$primary',
15
+ borderTopLeftRadius: '$primary',
12
16
  });
13
17
 
14
18
  export const Suffix = styled('div', {
@@ -1,16 +1,20 @@
1
1
  import type { PropTypes } from './IconButton.types';
2
- import type { PropsWithChildren } from 'react';
2
+ import type { PropsWithChildren, Ref } from 'react';
3
3
 
4
4
  import React from 'react';
5
5
 
6
6
  import { Button } from '../Button';
7
7
 
8
8
  // border-radius: 100% + overflow: hidden
9
- function IconButton(props: PropsWithChildren<PropTypes>) {
9
+ function IconButtonComponent(
10
+ props: PropsWithChildren<PropTypes>,
11
+ ref: Ref<HTMLButtonElement>
12
+ ) {
10
13
  const { style, ...otherProps } = props;
11
14
  return (
12
15
  <Button
13
16
  className="_icon-button"
17
+ ref={ref}
14
18
  {...otherProps}
15
19
  style={{
16
20
  borderRadius: '100%',
@@ -22,6 +26,8 @@ function IconButton(props: PropsWithChildren<PropTypes>) {
22
26
  );
23
27
  }
24
28
 
29
+ const IconButton = React.forwardRef(IconButtonComponent);
30
+ IconButton.displayName = 'IconButton';
25
31
  IconButton.toString = () => '._icon-button';
26
32
 
27
33
  export { IconButton };
@@ -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
  },
@@ -5,13 +5,14 @@ export const BaseListItemButton = styled('button', {
5
5
  border: 0,
6
6
  width: '100%',
7
7
  backgroundColor: 'transparent',
8
+ fontFamily: 'inherit',
8
9
  '&:focus-visible': {
9
10
  borderRadius: '$xs',
10
11
 
11
12
  outline: 0,
12
13
  $$color: '$colors$info100',
13
14
  [`.${darkTheme} &`]: {
14
- $$color: '$colors$neutral400',
15
+ $$color: '$colors$info700',
15
16
  },
16
17
  backgroundColor: '$$color',
17
18
  },
@@ -20,7 +21,7 @@ export const BaseListItemButton = styled('button', {
20
21
  borderRadius: '$xs',
21
22
 
22
23
  [`.${darkTheme} &`]: {
23
- $$color: '$colors$neutral400',
24
+ $$color: '$colors$neutral100',
24
25
  },
25
26
  backgroundColor: '$$color',
26
27
  cursor: 'pointer',
@@ -31,7 +32,12 @@ export const BaseListItemButton = styled('button', {
31
32
  variants: {
32
33
  hasDivider: {
33
34
  true: {
34
- borderBottom: '1px solid $neutral300',
35
+ borderBottom: '1px solid',
36
+ $$color: '$colors$neutral300',
37
+ [`.${darkTheme} &`]: {
38
+ $$color: '$colors$neutral400',
39
+ },
40
+ borderColor: '$$color',
35
41
  borderBottomRightRadius: 0,
36
42
  borderBottomLeftRadius: 0,
37
43
  },
@@ -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
  });