@bosonprotocol/react-kit 0.34.0-alpha.8 → 0.34.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 (352) hide show
  1. package/dist/cjs/components/buttons/BaseButton.d.ts +9 -3
  2. package/dist/cjs/components/buttons/BaseButton.d.ts.map +1 -1
  3. package/dist/cjs/components/buttons/BaseButton.js +11 -22
  4. package/dist/cjs/components/buttons/BaseButton.js.map +1 -1
  5. package/dist/cjs/components/buttons/Button.d.ts +1 -1
  6. package/dist/cjs/components/config/ConfigContext.d.ts +2 -1
  7. package/dist/cjs/components/config/ConfigContext.d.ts.map +1 -1
  8. package/dist/cjs/components/config/ConfigContext.js.map +1 -1
  9. package/dist/cjs/components/config/ConfigProvider.d.ts.map +1 -1
  10. package/dist/cjs/components/config/ConfigProvider.js +4 -1
  11. package/dist/cjs/components/config/ConfigProvider.js.map +1 -1
  12. package/dist/cjs/components/connection/utils.d.ts.map +1 -1
  13. package/dist/cjs/components/connection/utils.js +0 -1
  14. package/dist/cjs/components/connection/utils.js.map +1 -1
  15. package/dist/cjs/components/cta/common/CtaButton.d.ts.map +1 -1
  16. package/dist/cjs/components/cta/common/CtaButton.js +1 -1
  17. package/dist/cjs/components/cta/common/CtaButton.js.map +1 -1
  18. package/dist/cjs/components/cta/common/styles.d.ts.map +1 -1
  19. package/dist/cjs/components/cta/common/styles.js +10 -8
  20. package/dist/cjs/components/cta/common/styles.js.map +1 -1
  21. package/dist/cjs/components/currencyDisplay/CurrencyDisplay.d.ts +5 -2
  22. package/dist/cjs/components/currencyDisplay/CurrencyDisplay.d.ts.map +1 -1
  23. package/dist/cjs/components/currencyDisplay/CurrencyDisplay.js +6 -7
  24. package/dist/cjs/components/currencyDisplay/CurrencyDisplay.js.map +1 -1
  25. package/dist/cjs/components/exchangeCard/ExchangeCard.d.ts +1 -1
  26. package/dist/cjs/components/form/BaseCheckbox.d.ts +1 -1
  27. package/dist/cjs/components/form/BaseCheckbox.d.ts.map +1 -1
  28. package/dist/cjs/components/form/BaseCheckbox.js +9 -5
  29. package/dist/cjs/components/form/BaseCheckbox.js.map +1 -1
  30. package/dist/cjs/components/form/CountrySelect.d.ts +2 -2
  31. package/dist/cjs/components/form/CountrySelect.d.ts.map +1 -1
  32. package/dist/cjs/components/form/CountrySelect.js.map +1 -1
  33. package/dist/cjs/components/form/Field.styles.d.ts +28 -22
  34. package/dist/cjs/components/form/Field.styles.d.ts.map +1 -1
  35. package/dist/cjs/components/form/Field.styles.js +40 -13
  36. package/dist/cjs/components/form/Field.styles.js.map +1 -1
  37. package/dist/cjs/components/form/Select.d.ts +2 -2
  38. package/dist/cjs/components/form/Select.d.ts.map +1 -1
  39. package/dist/cjs/components/form/Select.js +2 -2
  40. package/dist/cjs/components/form/Select.js.map +1 -1
  41. package/dist/cjs/components/form/Upload/BaseUpload.d.ts +8 -0
  42. package/dist/cjs/components/form/Upload/BaseUpload.d.ts.map +1 -1
  43. package/dist/cjs/components/form/Upload/BaseUpload.js +99 -21
  44. package/dist/cjs/components/form/Upload/BaseUpload.js.map +1 -1
  45. package/dist/cjs/components/form/Upload/UploadedFile.d.ts +2 -1
  46. package/dist/cjs/components/form/Upload/UploadedFile.d.ts.map +1 -1
  47. package/dist/cjs/components/form/Upload/UploadedFile.js +3 -3
  48. package/dist/cjs/components/form/Upload/UploadedFile.js.map +1 -1
  49. package/dist/cjs/components/form/Upload/UploadedFiles.d.ts +2 -1
  50. package/dist/cjs/components/form/Upload/UploadedFiles.d.ts.map +1 -1
  51. package/dist/cjs/components/form/Upload/UploadedFiles.js +2 -2
  52. package/dist/cjs/components/form/Upload/UploadedFiles.js.map +1 -1
  53. package/dist/cjs/components/form/Upload/WithUploadToIpfs.d.ts +3 -1
  54. package/dist/cjs/components/form/Upload/WithUploadToIpfs.d.ts.map +1 -1
  55. package/dist/cjs/components/form/Upload/WithUploadToIpfs.js +5 -1
  56. package/dist/cjs/components/form/Upload/WithUploadToIpfs.js.map +1 -1
  57. package/dist/cjs/components/form/types.d.ts +21 -13
  58. package/dist/cjs/components/form/types.d.ts.map +1 -1
  59. package/dist/cjs/components/image/Image.styles.d.ts.map +1 -1
  60. package/dist/cjs/components/image/Image.styles.js +0 -2
  61. package/dist/cjs/components/image/Image.styles.js.map +1 -1
  62. package/dist/cjs/components/magicLink/MagicProvider.js +1 -1
  63. package/dist/cjs/components/magicLink/MagicProvider.js.map +1 -1
  64. package/dist/cjs/components/magicLink/UserContext.d.ts.map +1 -1
  65. package/dist/cjs/components/magicLink/UserContext.js +10 -2
  66. package/dist/cjs/components/magicLink/UserContext.js.map +1 -1
  67. package/dist/cjs/components/modal/components/Redeem/MyItems/Exchange.js +1 -1
  68. package/dist/cjs/components/modal/components/Redeem/MyItems/Exchange.js.map +1 -1
  69. package/dist/cjs/components/modal/components/SellerFinance/FinancesStyles.d.ts +22 -22
  70. package/dist/cjs/components/modal/components/common/detail/Detail.style.d.ts +51 -51
  71. package/dist/cjs/components/productCard/ProductCard.d.ts +5 -2
  72. package/dist/cjs/components/productCard/ProductCard.d.ts.map +1 -1
  73. package/dist/cjs/components/productCard/ProductCard.js +42 -34
  74. package/dist/cjs/components/productCard/ProductCard.js.map +1 -1
  75. package/dist/cjs/components/productCard/ProductCard.styles.d.ts +111 -4
  76. package/dist/cjs/components/productCard/ProductCard.styles.d.ts.map +1 -1
  77. package/dist/cjs/components/productCard/ProductCard.styles.js +52 -31
  78. package/dist/cjs/components/productCard/ProductCard.styles.js.map +1 -1
  79. package/dist/cjs/components/productCard/commonStyles.d.ts.map +1 -1
  80. package/dist/cjs/components/productCard/commonStyles.js +0 -1
  81. package/dist/cjs/components/productCard/commonStyles.js.map +1 -1
  82. package/dist/cjs/components/skeleton/CollectionsCardSkeleton.d.ts.map +1 -1
  83. package/dist/cjs/components/skeleton/CollectionsCardSkeleton.js +39 -17
  84. package/dist/cjs/components/skeleton/CollectionsCardSkeleton.js.map +1 -1
  85. package/dist/cjs/components/skeleton/ProductCardSkeleton.d.ts.map +1 -1
  86. package/dist/cjs/components/skeleton/ProductCardSkeleton.js +18 -19
  87. package/dist/cjs/components/skeleton/ProductCardSkeleton.js.map +1 -1
  88. package/dist/cjs/components/ui/ThemedButton.d.ts +1 -1
  89. package/dist/cjs/components/ui/Video.js +1 -1
  90. package/dist/cjs/components/ui/Video.js.map +1 -1
  91. package/dist/cjs/components/ui/column/index.d.ts +1 -1
  92. package/dist/cjs/components/ui/styles.d.ts +1 -1
  93. package/dist/cjs/components/ui/styles.d.ts.map +1 -1
  94. package/dist/cjs/components/ui/styles.js +18 -27
  95. package/dist/cjs/components/ui/styles.js.map +1 -1
  96. package/dist/cjs/components/wallet/ConnectButton.d.ts.map +1 -1
  97. package/dist/cjs/components/wallet/ConnectButton.js +3 -2
  98. package/dist/cjs/components/wallet/ConnectButton.js.map +1 -1
  99. package/dist/cjs/components/wallet/wallet-connection.d.ts +9559 -9559
  100. package/dist/cjs/components/wallet2/accountDrawer/AuthenticatedHeader.d.ts +3 -3
  101. package/dist/cjs/components/wallet2/accountDrawer/AuthenticatedHeader.d.ts.map +1 -1
  102. package/dist/cjs/components/wallet2/accountDrawer/AuthenticatedHeader.js +2 -2
  103. package/dist/cjs/components/wallet2/accountDrawer/AuthenticatedHeader.js.map +1 -1
  104. package/dist/cjs/components/wallet2/accountDrawer/IconButton.js +4 -3
  105. package/dist/cjs/components/wallet2/accountDrawer/IconButton.js.map +1 -1
  106. package/dist/cjs/components/wallet2/accountDrawer/miniPortfolio/index.d.ts +3 -3
  107. package/dist/cjs/components/wallet2/accountDrawer/miniPortfolio/index.d.ts.map +1 -1
  108. package/dist/cjs/components/wallet2/accountDrawer/miniPortfolio/index.js +2 -2
  109. package/dist/cjs/components/wallet2/accountDrawer/miniPortfolio/index.js.map +1 -1
  110. package/dist/cjs/components/wallet2/accountDrawer/miniPortfolio/tokens/index.d.ts +5 -2
  111. package/dist/cjs/components/wallet2/accountDrawer/miniPortfolio/tokens/index.d.ts.map +1 -1
  112. package/dist/cjs/components/wallet2/accountDrawer/miniPortfolio/tokens/index.js +3 -2
  113. package/dist/cjs/components/wallet2/accountDrawer/miniPortfolio/tokens/index.js.map +1 -1
  114. package/dist/cjs/components/wallet2/walletModal/ConnectionErrorView.d.ts +6 -1
  115. package/dist/cjs/components/wallet2/walletModal/ConnectionErrorView.d.ts.map +1 -1
  116. package/dist/cjs/components/wallet2/walletModal/ConnectionErrorView.js +7 -5
  117. package/dist/cjs/components/wallet2/walletModal/ConnectionErrorView.js.map +1 -1
  118. package/dist/cjs/components/wallet2/walletModal/Option.d.ts +5 -1
  119. package/dist/cjs/components/wallet2/walletModal/Option.d.ts.map +1 -1
  120. package/dist/cjs/components/wallet2/walletModal/Option.js +5 -2
  121. package/dist/cjs/components/wallet2/walletModal/Option.js.map +1 -1
  122. package/dist/cjs/components/wallet2/walletModal/index.d.ts +12 -4
  123. package/dist/cjs/components/wallet2/walletModal/index.d.ts.map +1 -1
  124. package/dist/cjs/components/wallet2/walletModal/index.js +3 -3
  125. package/dist/cjs/components/wallet2/walletModal/index.js.map +1 -1
  126. package/dist/cjs/hooks/connection/connection.d.ts.map +1 -1
  127. package/dist/cjs/hooks/connection/connection.js +41 -12
  128. package/dist/cjs/hooks/connection/connection.js.map +1 -1
  129. package/dist/cjs/hooks/connection/useSyncChainQuery.js.map +1 -1
  130. package/dist/cjs/hooks/index.d.ts +2 -0
  131. package/dist/cjs/hooks/index.d.ts.map +1 -1
  132. package/dist/cjs/hooks/index.js +7 -1
  133. package/dist/cjs/hooks/index.js.map +1 -1
  134. package/dist/cjs/hooks/magic.d.ts +4 -4
  135. package/dist/cjs/hooks/magic.d.ts.map +1 -1
  136. package/dist/cjs/hooks/magic.js +9 -6
  137. package/dist/cjs/hooks/magic.js.map +1 -1
  138. package/dist/cjs/lib/config/config.d.ts.map +1 -1
  139. package/dist/cjs/lib/config/config.js +0 -3
  140. package/dist/cjs/lib/config/config.js.map +1 -1
  141. package/dist/cjs/lib/signer/externalSigner.d.ts.map +1 -1
  142. package/dist/cjs/lib/signer/externalSigner.js +7 -0
  143. package/dist/cjs/lib/signer/externalSigner.js.map +1 -1
  144. package/dist/cjs/theme.d.ts +2 -0
  145. package/dist/cjs/theme.d.ts.map +1 -1
  146. package/dist/cjs/theme.js +3 -1
  147. package/dist/cjs/theme.js.map +1 -1
  148. package/dist/cjs/types/helpers.d.ts +3 -12
  149. package/dist/cjs/types/helpers.d.ts.map +1 -1
  150. package/dist/cjs/types/helpers.js +0 -1
  151. package/dist/cjs/types/helpers.js.map +1 -1
  152. package/dist/esm/components/buttons/BaseButton.d.ts +9 -3
  153. package/dist/esm/components/buttons/BaseButton.d.ts.map +1 -1
  154. package/dist/esm/components/buttons/BaseButton.js +11 -22
  155. package/dist/esm/components/buttons/BaseButton.js.map +1 -1
  156. package/dist/esm/components/buttons/Button.d.ts +1 -1
  157. package/dist/esm/components/config/ConfigContext.d.ts +2 -1
  158. package/dist/esm/components/config/ConfigContext.d.ts.map +1 -1
  159. package/dist/esm/components/config/ConfigContext.js.map +1 -1
  160. package/dist/esm/components/config/ConfigProvider.d.ts.map +1 -1
  161. package/dist/esm/components/config/ConfigProvider.js +4 -1
  162. package/dist/esm/components/config/ConfigProvider.js.map +1 -1
  163. package/dist/esm/components/connection/utils.d.ts.map +1 -1
  164. package/dist/esm/components/connection/utils.js +0 -1
  165. package/dist/esm/components/connection/utils.js.map +1 -1
  166. package/dist/esm/components/cta/common/CtaButton.d.ts.map +1 -1
  167. package/dist/esm/components/cta/common/CtaButton.js +1 -1
  168. package/dist/esm/components/cta/common/CtaButton.js.map +1 -1
  169. package/dist/esm/components/cta/common/styles.d.ts.map +1 -1
  170. package/dist/esm/components/cta/common/styles.js +10 -8
  171. package/dist/esm/components/cta/common/styles.js.map +1 -1
  172. package/dist/esm/components/currencyDisplay/CurrencyDisplay.d.ts +5 -2
  173. package/dist/esm/components/currencyDisplay/CurrencyDisplay.d.ts.map +1 -1
  174. package/dist/esm/components/currencyDisplay/CurrencyDisplay.js +6 -7
  175. package/dist/esm/components/currencyDisplay/CurrencyDisplay.js.map +1 -1
  176. package/dist/esm/components/exchangeCard/ExchangeCard.d.ts +1 -1
  177. package/dist/esm/components/form/BaseCheckbox.d.ts +1 -1
  178. package/dist/esm/components/form/BaseCheckbox.d.ts.map +1 -1
  179. package/dist/esm/components/form/BaseCheckbox.js +8 -5
  180. package/dist/esm/components/form/BaseCheckbox.js.map +1 -1
  181. package/dist/esm/components/form/CountrySelect.d.ts +2 -2
  182. package/dist/esm/components/form/CountrySelect.d.ts.map +1 -1
  183. package/dist/esm/components/form/CountrySelect.js.map +1 -1
  184. package/dist/esm/components/form/Field.styles.d.ts +28 -22
  185. package/dist/esm/components/form/Field.styles.d.ts.map +1 -1
  186. package/dist/esm/components/form/Field.styles.js +39 -12
  187. package/dist/esm/components/form/Field.styles.js.map +1 -1
  188. package/dist/esm/components/form/Select.d.ts +2 -2
  189. package/dist/esm/components/form/Select.d.ts.map +1 -1
  190. package/dist/esm/components/form/Select.js +2 -2
  191. package/dist/esm/components/form/Select.js.map +1 -1
  192. package/dist/esm/components/form/Upload/BaseUpload.d.ts +8 -0
  193. package/dist/esm/components/form/Upload/BaseUpload.d.ts.map +1 -1
  194. package/dist/esm/components/form/Upload/BaseUpload.js +101 -25
  195. package/dist/esm/components/form/Upload/BaseUpload.js.map +1 -1
  196. package/dist/esm/components/form/Upload/UploadedFile.d.ts +2 -1
  197. package/dist/esm/components/form/Upload/UploadedFile.d.ts.map +1 -1
  198. package/dist/esm/components/form/Upload/UploadedFile.js +4 -4
  199. package/dist/esm/components/form/Upload/UploadedFile.js.map +1 -1
  200. package/dist/esm/components/form/Upload/UploadedFiles.d.ts +2 -1
  201. package/dist/esm/components/form/Upload/UploadedFiles.d.ts.map +1 -1
  202. package/dist/esm/components/form/Upload/UploadedFiles.js +2 -2
  203. package/dist/esm/components/form/Upload/UploadedFiles.js.map +1 -1
  204. package/dist/esm/components/form/Upload/WithUploadToIpfs.d.ts +3 -1
  205. package/dist/esm/components/form/Upload/WithUploadToIpfs.d.ts.map +1 -1
  206. package/dist/esm/components/form/Upload/WithUploadToIpfs.js +5 -1
  207. package/dist/esm/components/form/Upload/WithUploadToIpfs.js.map +1 -1
  208. package/dist/esm/components/form/types.d.ts +21 -13
  209. package/dist/esm/components/form/types.d.ts.map +1 -1
  210. package/dist/esm/components/image/Image.styles.d.ts.map +1 -1
  211. package/dist/esm/components/image/Image.styles.js +0 -2
  212. package/dist/esm/components/image/Image.styles.js.map +1 -1
  213. package/dist/esm/components/magicLink/MagicProvider.js +1 -1
  214. package/dist/esm/components/magicLink/MagicProvider.js.map +1 -1
  215. package/dist/esm/components/magicLink/UserContext.d.ts.map +1 -1
  216. package/dist/esm/components/magicLink/UserContext.js +10 -2
  217. package/dist/esm/components/magicLink/UserContext.js.map +1 -1
  218. package/dist/esm/components/modal/components/Redeem/MyItems/Exchange.js +1 -1
  219. package/dist/esm/components/modal/components/Redeem/MyItems/Exchange.js.map +1 -1
  220. package/dist/esm/components/modal/components/SellerFinance/FinancesStyles.d.ts +22 -22
  221. package/dist/esm/components/modal/components/common/detail/Detail.style.d.ts +51 -51
  222. package/dist/esm/components/productCard/ProductCard.d.ts +5 -2
  223. package/dist/esm/components/productCard/ProductCard.d.ts.map +1 -1
  224. package/dist/esm/components/productCard/ProductCard.js +20 -32
  225. package/dist/esm/components/productCard/ProductCard.js.map +1 -1
  226. package/dist/esm/components/productCard/ProductCard.styles.d.ts +111 -4
  227. package/dist/esm/components/productCard/ProductCard.styles.d.ts.map +1 -1
  228. package/dist/esm/components/productCard/ProductCard.styles.js +51 -29
  229. package/dist/esm/components/productCard/ProductCard.styles.js.map +1 -1
  230. package/dist/esm/components/productCard/commonStyles.d.ts.map +1 -1
  231. package/dist/esm/components/productCard/commonStyles.js +0 -1
  232. package/dist/esm/components/productCard/commonStyles.js.map +1 -1
  233. package/dist/esm/components/skeleton/CollectionsCardSkeleton.d.ts.map +1 -1
  234. package/dist/esm/components/skeleton/CollectionsCardSkeleton.js +39 -17
  235. package/dist/esm/components/skeleton/CollectionsCardSkeleton.js.map +1 -1
  236. package/dist/esm/components/skeleton/ProductCardSkeleton.d.ts.map +1 -1
  237. package/dist/esm/components/skeleton/ProductCardSkeleton.js +19 -20
  238. package/dist/esm/components/skeleton/ProductCardSkeleton.js.map +1 -1
  239. package/dist/esm/components/ui/ThemedButton.d.ts +1 -1
  240. package/dist/esm/components/ui/Video.js +1 -1
  241. package/dist/esm/components/ui/Video.js.map +1 -1
  242. package/dist/esm/components/ui/column/index.d.ts +1 -1
  243. package/dist/esm/components/ui/styles.d.ts +1 -1
  244. package/dist/esm/components/ui/styles.d.ts.map +1 -1
  245. package/dist/esm/components/ui/styles.js +17 -26
  246. package/dist/esm/components/ui/styles.js.map +1 -1
  247. package/dist/esm/components/wallet/ConnectButton.d.ts.map +1 -1
  248. package/dist/esm/components/wallet/ConnectButton.js +4 -3
  249. package/dist/esm/components/wallet/ConnectButton.js.map +1 -1
  250. package/dist/esm/components/wallet/wallet-connection.d.ts +9559 -9559
  251. package/dist/esm/components/wallet2/accountDrawer/AuthenticatedHeader.d.ts +3 -3
  252. package/dist/esm/components/wallet2/accountDrawer/AuthenticatedHeader.d.ts.map +1 -1
  253. package/dist/esm/components/wallet2/accountDrawer/AuthenticatedHeader.js +2 -2
  254. package/dist/esm/components/wallet2/accountDrawer/AuthenticatedHeader.js.map +1 -1
  255. package/dist/esm/components/wallet2/accountDrawer/IconButton.js +4 -3
  256. package/dist/esm/components/wallet2/accountDrawer/IconButton.js.map +1 -1
  257. package/dist/esm/components/wallet2/accountDrawer/miniPortfolio/index.d.ts +3 -3
  258. package/dist/esm/components/wallet2/accountDrawer/miniPortfolio/index.d.ts.map +1 -1
  259. package/dist/esm/components/wallet2/accountDrawer/miniPortfolio/index.js +2 -2
  260. package/dist/esm/components/wallet2/accountDrawer/miniPortfolio/index.js.map +1 -1
  261. package/dist/esm/components/wallet2/accountDrawer/miniPortfolio/tokens/index.d.ts +5 -2
  262. package/dist/esm/components/wallet2/accountDrawer/miniPortfolio/tokens/index.d.ts.map +1 -1
  263. package/dist/esm/components/wallet2/accountDrawer/miniPortfolio/tokens/index.js +3 -2
  264. package/dist/esm/components/wallet2/accountDrawer/miniPortfolio/tokens/index.js.map +1 -1
  265. package/dist/esm/components/wallet2/walletModal/ConnectionErrorView.d.ts +6 -1
  266. package/dist/esm/components/wallet2/walletModal/ConnectionErrorView.d.ts.map +1 -1
  267. package/dist/esm/components/wallet2/walletModal/ConnectionErrorView.js +7 -5
  268. package/dist/esm/components/wallet2/walletModal/ConnectionErrorView.js.map +1 -1
  269. package/dist/esm/components/wallet2/walletModal/Option.d.ts +5 -1
  270. package/dist/esm/components/wallet2/walletModal/Option.d.ts.map +1 -1
  271. package/dist/esm/components/wallet2/walletModal/Option.js +5 -2
  272. package/dist/esm/components/wallet2/walletModal/Option.js.map +1 -1
  273. package/dist/esm/components/wallet2/walletModal/index.d.ts +12 -4
  274. package/dist/esm/components/wallet2/walletModal/index.d.ts.map +1 -1
  275. package/dist/esm/components/wallet2/walletModal/index.js +3 -3
  276. package/dist/esm/components/wallet2/walletModal/index.js.map +1 -1
  277. package/dist/esm/hooks/connection/connection.d.ts.map +1 -1
  278. package/dist/esm/hooks/connection/connection.js +41 -12
  279. package/dist/esm/hooks/connection/connection.js.map +1 -1
  280. package/dist/esm/hooks/connection/useSyncChainQuery.js.map +1 -1
  281. package/dist/esm/hooks/index.d.ts +2 -0
  282. package/dist/esm/hooks/index.d.ts.map +1 -1
  283. package/dist/esm/hooks/index.js +2 -0
  284. package/dist/esm/hooks/index.js.map +1 -1
  285. package/dist/esm/hooks/magic.d.ts +4 -4
  286. package/dist/esm/hooks/magic.d.ts.map +1 -1
  287. package/dist/esm/hooks/magic.js +9 -6
  288. package/dist/esm/hooks/magic.js.map +1 -1
  289. package/dist/esm/lib/config/config.d.ts.map +1 -1
  290. package/dist/esm/lib/config/config.js +0 -3
  291. package/dist/esm/lib/config/config.js.map +1 -1
  292. package/dist/esm/lib/signer/externalSigner.d.ts.map +1 -1
  293. package/dist/esm/lib/signer/externalSigner.js +7 -0
  294. package/dist/esm/lib/signer/externalSigner.js.map +1 -1
  295. package/dist/esm/theme.d.ts +2 -0
  296. package/dist/esm/theme.d.ts.map +1 -1
  297. package/dist/esm/theme.js +3 -1
  298. package/dist/esm/theme.js.map +1 -1
  299. package/dist/esm/types/helpers.d.ts +3 -12
  300. package/dist/esm/types/helpers.d.ts.map +1 -1
  301. package/dist/esm/types/helpers.js +0 -1
  302. package/dist/esm/types/helpers.js.map +1 -1
  303. package/package.json +5 -5
  304. package/src/components/buttons/BaseButton.tsx +20 -38
  305. package/src/components/config/ConfigContext.ts +2 -1
  306. package/src/components/config/ConfigProvider.tsx +5 -2
  307. package/src/components/connection/utils.ts +0 -1
  308. package/src/components/cta/common/CtaButton.tsx +1 -1
  309. package/src/components/cta/common/styles.ts +10 -8
  310. package/src/components/currencyDisplay/CurrencyDisplay.tsx +21 -18
  311. package/src/components/exchangeCard/ExchangeCard.tsx +1 -1
  312. package/src/components/form/BaseCheckbox.tsx +15 -3
  313. package/src/components/form/CountrySelect.tsx +27 -26
  314. package/src/components/form/Field.styles.ts +49 -13
  315. package/src/components/form/Select.tsx +11 -11
  316. package/src/components/form/Upload/BaseUpload.tsx +186 -70
  317. package/src/components/form/Upload/UploadedFile.tsx +5 -3
  318. package/src/components/form/Upload/UploadedFiles.tsx +7 -1
  319. package/src/components/form/Upload/WithUploadToIpfs.tsx +8 -2
  320. package/src/components/form/types.ts +67 -20
  321. package/src/components/image/Image.styles.ts +0 -2
  322. package/src/components/magicLink/MagicProvider.tsx +1 -1
  323. package/src/components/magicLink/UserContext.tsx +10 -3
  324. package/src/components/modal/components/Redeem/MyItems/Exchange.tsx +1 -1
  325. package/src/components/productCard/ProductCard.styles.ts +58 -31
  326. package/src/components/productCard/ProductCard.tsx +54 -56
  327. package/src/components/productCard/commonStyles.ts +0 -1
  328. package/src/components/skeleton/CollectionsCardSkeleton.tsx +63 -39
  329. package/src/components/skeleton/ProductCardSkeleton.tsx +24 -37
  330. package/src/components/ui/Video.tsx +1 -1
  331. package/src/components/ui/styles.ts +18 -27
  332. package/src/components/wallet/ConnectButton.tsx +12 -9
  333. package/src/components/wallet2/accountDrawer/AuthenticatedHeader.tsx +5 -6
  334. package/src/components/wallet2/accountDrawer/IconButton.tsx +4 -4
  335. package/src/components/wallet2/accountDrawer/miniPortfolio/index.tsx +8 -4
  336. package/src/components/wallet2/accountDrawer/miniPortfolio/tokens/index.tsx +8 -2
  337. package/src/components/wallet2/walletModal/ConnectionErrorView.tsx +21 -6
  338. package/src/components/wallet2/walletModal/Option.tsx +9 -2
  339. package/src/components/wallet2/walletModal/index.tsx +17 -6
  340. package/src/hooks/connection/connection.ts +42 -12
  341. package/src/hooks/connection/useSyncChainQuery.ts +1 -1
  342. package/src/hooks/index.ts +7 -0
  343. package/src/hooks/magic.ts +9 -6
  344. package/src/lib/config/config.ts +0 -5
  345. package/src/lib/signer/externalSigner.ts +7 -0
  346. package/src/stories/ConnectWallet.stories.tsx +34 -1
  347. package/src/stories/ProductCard.stories.tsx +1 -7
  348. package/src/stories/buttons/Upload.stories.tsx +17 -7
  349. package/src/stories/form/BaseCheckbox.stories.tsx +8 -0
  350. package/src/stories/widgets/Commit.stories.tsx +2 -1
  351. package/src/theme.ts +3 -1
  352. package/src/types/helpers.ts +3 -27
@@ -3,27 +3,45 @@ import styled from "styled-components";
3
3
  import { theme } from "../../theme";
4
4
  import { cardWrapperStyles } from "../productCard/commonStyles";
5
5
  import { LoadingBubble } from "./common";
6
-
6
+ import { Grid } from "../ui/Grid";
7
+ const colors = theme.colors.light;
7
8
  const Container = styled.div`
8
- display: grid;
9
- grid-template-columns: 1fr;
10
- grid-template-rows: repeat(2, min-content);
9
+ display: flex;
10
+ flex-direction: column;
11
11
  ${cardWrapperStyles}
12
+ /* REMs gives bad height here on smaller views */
13
+ height: 279px;
14
+ min-width: 265px;
12
15
  `;
13
16
 
14
17
  const ImagesContainer = styled.div`
15
18
  width: 100%;
16
- display: grid;
17
- grid-template-columns: repeat(2, 1fr);
18
- grid-template-rows: repeat(2, 1fr);
19
- grid-column-gap: 1px;
20
- grid-row-gap: 1px;
19
+ position: relative;
20
+ /* REMs gives bad height here on smaller views */
21
+ height: 208px;
22
+ background-color: ${colors.lightGrey};
21
23
  `;
22
24
 
23
25
  const BottomCard = styled.div`
24
- padding: 1rem 1.5rem 1rem 1.5rem;
26
+ padding: 1rem 1.5rem 1rem 0.3125rem;
25
27
  `;
26
28
 
29
+ const ImageOne = styled.div`
30
+ position: absolute;
31
+ top: 50%;
32
+ left: 10%;
33
+ transform: translateY(-50%);
34
+ `;
35
+ const ImageTwo = styled.div`
36
+ position: absolute;
37
+ right: 10%;
38
+ top: 5%;
39
+ `;
40
+ const ImageThree = styled.div`
41
+ position: absolute;
42
+ right: 10%;
43
+ bottom: 5%;
44
+ `;
27
45
  type SkeletonCardProps = ButtonHTMLAttributes<HTMLDivElement> & {
28
46
  withBottomText?: boolean;
29
47
  };
@@ -31,36 +49,42 @@ export const CollectionsCardSkeleton = (props: SkeletonCardProps) => {
31
49
  return (
32
50
  <Container>
33
51
  <ImagesContainer>
34
- <LoadingBubble
35
- $width="100%"
36
- $height="170px"
37
- $borderRadius="0px"
38
- $backgroundColor={theme.colors.light.darkGrey}
39
- />
40
- <LoadingBubble
41
- $width="100%"
42
- $height="170px"
43
- $borderRadius="0px"
44
- $backgroundColor={theme.colors.light.darkGrey}
45
- />
46
- <LoadingBubble
47
- $width="100%"
48
- $height="170px"
49
- $borderRadius="0px"
50
- $backgroundColor={theme.colors.light.darkGrey}
51
- />
52
- <LoadingBubble
53
- $width="100%"
54
- $height="170px"
55
- $borderRadius="0px"
56
- $backgroundColor={theme.colors.light.darkGrey}
57
- />
52
+ <ImageOne>
53
+ <LoadingBubble
54
+ $width="140px"
55
+ $height="102px"
56
+ $borderRadius="0px"
57
+ $backgroundColor={theme.colors.light.darkGrey}
58
+ />
59
+ </ImageOne>
60
+ <ImageTwo>
61
+ <LoadingBubble
62
+ $width="60px"
63
+ $height="50px"
64
+ $borderRadius="0px"
65
+ $backgroundColor={theme.colors.light.darkGrey}
66
+ />
67
+ </ImageTwo>
68
+ <ImageThree>
69
+ <LoadingBubble
70
+ $width="60px"
71
+ $height="50px"
72
+ $borderRadius="0px"
73
+ $backgroundColor={theme.colors.light.darkGrey}
74
+ />
75
+ </ImageThree>
58
76
  </ImagesContainer>
59
- <BottomCard>
60
- <LoadingBubble $width="50%" $height="26px" $margin="0 0 8.75px 0" />
61
- <LoadingBubble $width="52px" $height="18px" $margin="0 0 4.375px 0" />
62
- <LoadingBubble $width="30px" $height="30px" />
63
- </BottomCard>
77
+ <Grid
78
+ justifyContent="flex-start"
79
+ align-items="center"
80
+ marginLeft={"1.5rem"}
81
+ >
82
+ <LoadingBubble $width="43px" $height="43px" $borderRadius={"100%"} />
83
+ <BottomCard>
84
+ <LoadingBubble $width="52px" $height="18px" $margin="0 0 4.375px 0" />
85
+ <LoadingBubble $width="30px" $height="25px" />
86
+ </BottomCard>
87
+ </Grid>
64
88
  </Container>
65
89
  );
66
90
  };
@@ -2,72 +2,59 @@ import React, { ButtonHTMLAttributes } from "react";
2
2
  import {
3
3
  BottomText,
4
4
  ProductCardBottom,
5
- ProductCardBottomContent,
6
- ProductCardCreator,
7
- ProductCardCreatorAvatar,
8
- ProductCardCreatorName,
9
- ProductCardData,
10
5
  ProductCardImageWrapper,
11
- ProductCardPrice,
12
- ProductCardPriceWrapper,
13
6
  ProductCardTitle,
14
7
  ProductCardTitleWrapper,
15
8
  ProductCardWrapper
16
9
  } from "../productCard/ProductCard.styles";
17
- import { Grid } from "../ui/Grid";
18
10
  import { theme } from "../../theme";
19
11
  import { LoadingBubble } from "./common";
12
+ import styled from "styled-components";
20
13
 
21
14
  type SkeletonCardProps = ButtonHTMLAttributes<HTMLDivElement> & {
22
15
  withBottomText?: boolean;
23
16
  };
17
+
18
+ const ProductCardImageWrapperStyled = styled(ProductCardImageWrapper)`
19
+ overflow: hidden;
20
+ width: 100%;
21
+ /* REMs gives bad height here on smaller views */
22
+ max-height: 210px;
23
+ min-height: 11.25rem;
24
+ `;
25
+
26
+ const ProductCardTitleWrapperStyled = styled(ProductCardTitleWrapper)`
27
+ margin-bottom: 5px;
28
+ `;
24
29
  export const ProductCardSkeleton = (props: SkeletonCardProps) => {
25
30
  const { withBottomText } = props;
26
31
 
27
32
  return (
28
33
  <ProductCardWrapper {...props} $isHoverDisabled={true}>
29
- <ProductCardImageWrapper>
34
+ <ProductCardImageWrapperStyled>
30
35
  <LoadingBubble
31
36
  $width="100%"
32
37
  $height="340px"
33
38
  $borderRadius="0px"
34
39
  $backgroundColor={theme.colors.light.darkGrey}
35
40
  />
36
- </ProductCardImageWrapper>
41
+ </ProductCardImageWrapperStyled>
37
42
  <ProductCardBottom>
38
43
  <div>
39
- <ProductCardBottomContent>
40
- <ProductCardData>
41
- <ProductCardCreator>
42
- <ProductCardCreatorAvatar>
43
- <LoadingBubble $width="16px" $height="16px" />
44
- </ProductCardCreatorAvatar>
45
- <ProductCardCreatorName data-avatarname="product-card">
46
- <LoadingBubble $width="50px" $height="12.5px" />
47
- </ProductCardCreatorName>
48
- </ProductCardCreator>
49
- </ProductCardData>
50
- <ProductCardPriceWrapper>
51
- <ProductCardPrice>
52
- <Grid justifyContent="flex-end">
53
- <LoadingBubble $width="30px" $height="10px" />
54
- </Grid>
55
- </ProductCardPrice>
56
- <Grid justifyContent="flex-end" gap="8px">
57
- <LoadingBubble $width="24px" $height="24px" />
58
- <LoadingBubble $width="calc(100% - 24px - 8px)" />
59
- </Grid>
60
- </ProductCardPriceWrapper>
61
- </ProductCardBottomContent>
62
- <ProductCardTitleWrapper>
44
+ <ProductCardTitleWrapperStyled>
45
+ <ProductCardTitle>
46
+ <LoadingBubble $width="50%" $height="12px" />
47
+ </ProductCardTitle>
48
+ </ProductCardTitleWrapperStyled>
49
+ <ProductCardTitleWrapperStyled>
63
50
  <ProductCardTitle>
64
- <LoadingBubble $width="100%" $height="30px" />
51
+ <LoadingBubble $width="20%" $height="8px" />
65
52
  </ProductCardTitle>
66
- </ProductCardTitleWrapper>
53
+ </ProductCardTitleWrapperStyled>
67
54
  </div>
68
55
  {withBottomText && (
69
56
  <BottomText>
70
- <LoadingBubble $width="100%" $height="15.5px" />
57
+ <LoadingBubble $width="15%" $height="13px" />
71
58
  </BottomText>
72
59
  )}
73
60
  </ProductCardBottom>
@@ -198,7 +198,7 @@ export const Video: React.FC<VideoProps> = ({
198
198
  return <ComponentWhileLoading />;
199
199
  }
200
200
  return (
201
- <VideoWrapper {...rest}>
201
+ <VideoWrapper {...rest} className="video-container">
202
202
  <VideoPlaceholder $position="static">
203
203
  <Typography tag="div">
204
204
  <Loading />
@@ -5,6 +5,14 @@ export const transition = css`
5
5
  transition: all 150ms ease-in-out;
6
6
  `;
7
7
 
8
+ export const buttonText = css`
9
+ letter-spacing: 0.5px;
10
+ font-style: normal;
11
+ font-size: 1rem;
12
+ font-weight: 500;
13
+ line-height: 24px;
14
+ `;
15
+
8
16
  export const button = css`
9
17
  box-sizing: border-box;
10
18
  cursor: pointer;
@@ -18,7 +26,7 @@ export const button = css`
18
26
  position: relative;
19
27
  overflow: hidden;
20
28
  box-shadow: 0px 0px 0px #000000;
21
-
29
+ ${buttonText}
22
30
  ${transition}
23
31
  svg {
24
32
  ${transition}
@@ -47,51 +55,34 @@ export const text = css`
47
55
  line-height: 24px;
48
56
  `;
49
57
 
50
- export const buttonText = css`
51
- letter-spacing: 0.5px;
52
- font-style: normal;
53
- font-size: 1rem;
54
- font-weight: 500;
55
- line-height: 24px;
56
- `;
57
-
58
58
  export const small = css`
59
59
  min-height: 2.125rem;
60
60
  padding: 0.5rem 1rem;
61
- > * {
62
- font-size: 0.75rem !important;
63
- }
64
- #buttonText {
61
+ * {
65
62
  font-size: 0.75rem;
66
63
  }
67
64
  `;
68
65
  export const regular = css`
69
66
  min-height: 2.813rem;
70
67
  padding: 0.75rem 1.5rem;
71
- > * {
72
- font-size: 1rem !important;
68
+ * {
69
+ font-size: 1rem;
73
70
  }
74
71
  ${breakpoint.xxs} {
75
- > * {
76
- font-size: 0.875rem !important;
72
+ * {
73
+ font-size: 0.875rem;
77
74
  }
78
75
  }
79
- #buttonText {
80
- font-size: 0.875rem;
81
- }
82
76
  `;
83
77
  export const large = css`
84
78
  min-height: 3.5rem;
85
79
  padding: 1rem 2rem;
86
- > * {
87
- font-size: 1.125rem !important;
80
+ * {
81
+ font-size: 1.125rem;
88
82
  }
89
83
  ${breakpoint.xxs} {
90
- > * {
91
- font-size: 1rem !important;
84
+ * {
85
+ font-size: 1rem;
92
86
  }
93
87
  }
94
- #buttonText {
95
- font-size: 1rem;
96
- }
97
88
  `;
@@ -10,7 +10,7 @@ import ThemedButton, { bosonButtonThemes } from "../ui/ThemedButton";
10
10
  import { useBreakpoints } from "../../hooks/useBreakpoints";
11
11
  import { saveItemInStorage } from "../../hooks/storage/useBosonLocalStorage";
12
12
  import { SignOut, Wallet } from "phosphor-react";
13
- import { useIsMagicLoggedIn } from "../../hooks";
13
+ import { useConfigContext, useIsMagicLoggedIn } from "../../hooks";
14
14
  import { useAccount, useChainId } from "../../hooks/connection/connection";
15
15
  import { useDisconnect } from "../../hooks/connection/useDisconnect";
16
16
  import { MagicLoginButton } from "../magicLink/Login";
@@ -79,6 +79,7 @@ export default function ConnectButton({
79
79
  showChangeWallet,
80
80
  ...rest
81
81
  }: Props) {
82
+ const { withMagicLink } = useConfigContext();
82
83
  const { isLteXS, isLteS } = useBreakpoints();
83
84
  const isSideBar = ["left", "right"].includes(navigationBarPosition);
84
85
  const buttonPadding = isSideBar ? "0.75rem 1rem" : "";
@@ -120,14 +121,16 @@ export default function ConnectButton({
120
121
 
121
122
  return (
122
123
  <>
123
- <MagicLoginButton
124
- buttonProps={{
125
- size: isLteXS ? "small" : "regular",
126
- theme: bosonButtonThemes({
127
- withBosonStyle: false
128
- })["primary"]
129
- }}
130
- />
124
+ {withMagicLink && (
125
+ <MagicLoginButton
126
+ buttonProps={{
127
+ size: isLteXS ? "small" : "regular",
128
+ theme: bosonButtonThemes({
129
+ withBosonStyle: false
130
+ })["primary"]
131
+ }}
132
+ />
133
+ )}
131
134
  <Button
132
135
  onClick={() => {
133
136
  saveItemInStorage(
@@ -9,13 +9,12 @@ import {
9
9
  } from "phosphor-react";
10
10
  import React, { useCallback, useState } from "react";
11
11
  import styled, { CSSProperties } from "styled-components";
12
-
13
12
  import { Typography } from "../../ui/Typography";
14
13
  import StatusIcon from "../identicon/StatusIcon";
15
14
  import { FiatLink, useFiatLinkContext } from "./fiatOnrampModal/FiatLink";
16
15
  // import FiatOnrampModal from "./fiatOnrampModal";
17
16
  import { IconWithConfirmTextButton } from "./IconButton";
18
- import MiniPortfolio from "./miniPortfolio";
17
+ import MiniPortfolio, { MiniPortfolioProps } from "./miniPortfolio";
19
18
  import { Column } from "../../ui/column";
20
19
  import { theme } from "../../../theme";
21
20
  import { useENSName } from "../../../hooks/ens/useENSName";
@@ -131,8 +130,7 @@ export function PortfolioArrow({
131
130
  <ArrowUpRight size={20} {...rest} />
132
131
  );
133
132
  }
134
- export type AuthenticatedHeaderProps = {
135
- account: string;
133
+ export type AuthenticatedHeaderProps = MiniPortfolioProps & {
136
134
  onUserDisconnect?: () => unknown;
137
135
  disconnectColor: CSSProperties["color"];
138
136
  disconnectBackgroundColor: CSSProperties["backgroundColor"];
@@ -145,7 +143,8 @@ export function AuthenticatedHeader({
145
143
  disconnectColor,
146
144
  disconnectBackgroundColor,
147
145
  disconnectBorderRadius,
148
- buyCryptoTheme
146
+ buyCryptoTheme,
147
+ defaultTokens
149
148
  }: AuthenticatedHeaderProps) {
150
149
  const { connector } = useWeb3React();
151
150
  const { ENSName } = useENSName(account);
@@ -292,7 +291,7 @@ export function AuthenticatedHeader({
292
291
  </Tooltip>
293
292
  </FiatOnrampNotAvailableText>
294
293
  )}
295
- <MiniPortfolio account={account} />
294
+ <MiniPortfolio account={account} defaultTokens={defaultTokens} />
296
295
  </PortfolioDrawerContainer>
297
296
  </AuthenticatedHeaderWrapper>
298
297
  );
@@ -112,19 +112,19 @@ const IconBlock = forwardRef<
112
112
  borderRadius: CSSProperties["borderRadius"];
113
113
  }
114
114
  >(function IconBlock(props, ref) {
115
- const { color, backgroundColor, borderRadius } = props;
116
115
  if ("href" in props) {
116
+ const { color, backgroundColor, borderRadius, ...restProps } = props;
117
117
  return (
118
118
  <IconBlockLink
119
119
  ref={ref as React.ForwardedRef<HTMLAnchorElement>}
120
120
  $color={color}
121
121
  $backgroundColor={backgroundColor}
122
122
  $borderRadius={borderRadius}
123
- {...props}
123
+ {...restProps}
124
124
  />
125
125
  );
126
126
  }
127
-
127
+ const { color, backgroundColor, borderRadius, ...restProps } = props;
128
128
  return (
129
129
  <IconBlockButton
130
130
  // ignoring 'button' 'type' conflict between React and styled-components
@@ -134,7 +134,7 @@ const IconBlock = forwardRef<
134
134
  $color={color}
135
135
  $backgroundColor={backgroundColor}
136
136
  $borderRadius={borderRadius}
137
- {...props}
137
+ {...restProps}
138
138
  />
139
139
  );
140
140
  });
@@ -3,7 +3,7 @@ import styled from "styled-components";
3
3
 
4
4
  import { Grid } from "../../../ui/Grid";
5
5
  import { Typography } from "../../../ui/Typography";
6
- import Tokens from "./tokens";
6
+ import Tokens, { TokensProps } from "./tokens";
7
7
  import { breakpointNumbers } from "../../../../lib/ui/breakpoint";
8
8
  import { Column } from "../../../ui/column";
9
9
 
@@ -41,7 +41,7 @@ const PageWrapper = styled.div`
41
41
  interface Page {
42
42
  title: React.ReactNode;
43
43
  key: string;
44
- component: ({ account }: { account: string }) => JSX.Element;
44
+ component: ({ account }: MiniPortfolioProps) => JSX.Element;
45
45
  }
46
46
 
47
47
  const Pages: Array<Page> = [
@@ -52,7 +52,11 @@ const Pages: Array<Page> = [
52
52
  }
53
53
  ];
54
54
 
55
- export default function MiniPortfolio({ account }: { account: string }) {
55
+ export type MiniPortfolioProps = TokensProps;
56
+ export default function MiniPortfolio({
57
+ account,
58
+ defaultTokens
59
+ }: MiniPortfolioProps) {
56
60
  const [currentPage, setCurrentPage] = useState(0);
57
61
 
58
62
  const { component: Page } = Pages[currentPage];
@@ -72,7 +76,7 @@ export default function MiniPortfolio({ account }: { account: string }) {
72
76
  })}
73
77
  </Nav>
74
78
  <PageWrapper data-testid="mini-portfolio-page">
75
- <Page account={account} />
79
+ <Page account={account} defaultTokens={defaultTokens} />
76
80
  </PageWrapper>
77
81
  </Wrapper>
78
82
  );
@@ -1,4 +1,5 @@
1
1
  import React from "react";
2
+ import { Token as TokenType } from "@bosonprotocol/common";
2
3
  import { Token } from "@uniswap/sdk-core";
3
4
  import { ethers } from "ethers";
4
5
  import styled from "styled-components";
@@ -20,11 +21,16 @@ import {
20
21
  import { nativeOnChain } from "../../../../../lib/const/tokens";
21
22
  import { PortfolioLogo } from "../../../../logo/PortfolioLogo";
22
23
 
23
- export default function Tokens({ account }: { account: string }) {
24
+ export type TokensProps = {
25
+ account: string;
26
+ defaultTokens?: TokenType[];
27
+ };
28
+ export default function Tokens({ account, defaultTokens }: TokensProps) {
24
29
  const chainId = useChainId();
25
30
  const { data: tokenBalances, isLoading } = useTokenBalances({
26
31
  address: account,
27
- chainId
32
+ chainId,
33
+ tokens: defaultTokens
28
34
  });
29
35
 
30
36
  if (!chainId || isLoading) {
@@ -5,12 +5,13 @@ import styled from "styled-components";
5
5
  import { Typography } from "../../ui/Typography";
6
6
  import { useCloseAccountDrawer } from "../accountDrawer";
7
7
  import { flexColumnNoWrap } from "../styles";
8
- import { Button } from "../../buttons/Button";
9
8
  import {
10
9
  ActivationStatus,
11
10
  useActivationState
12
11
  } from "../../connection/activate";
13
12
  import { theme } from "../../../theme";
13
+ import { Grid } from "../../ui/Grid";
14
+ import { BaseButton, BaseButtonProps } from "../../buttons/BaseButton";
14
15
  const colors = theme.colors.light;
15
16
  const Wrapper = styled.div`
16
17
  ${flexColumnNoWrap};
@@ -27,8 +28,15 @@ const AlertTriangleIcon = styled(Warning)`
27
28
  color: ${colors.red};
28
29
  `;
29
30
 
31
+ export type ConnectionErrorViewProps = {
32
+ tryAgainTheme: BaseButtonProps["theme"];
33
+ backToWalletSelectionTheme: BaseButtonProps["theme"];
34
+ };
30
35
  // TODO(cartcrom): move this to a top level modal, rather than inline in the drawer
31
- export default function ConnectionErrorView() {
36
+ export default function ConnectionErrorView({
37
+ tryAgainTheme,
38
+ backToWalletSelectionTheme
39
+ }: ConnectionErrorViewProps) {
32
40
  const { activationState, tryActivation, cancelActivation } =
33
41
  useActivationState();
34
42
  const closeDrawer = useCloseAccountDrawer();
@@ -50,10 +58,17 @@ export default function ConnectionErrorView() {
50
58
  The connection attempt failed. Please click try again and follow the
51
59
  steps to connect in your wallet.
52
60
  </Typography>
53
- <Button onClick={retry}>Try Again</Button>
54
- <Button onClick={cancelActivation}>
55
- <Typography marginBottom={12}>Back to wallet selection</Typography>
56
- </Button>
61
+ <Grid gap="1rem">
62
+ <BaseButton onClick={retry} theme={tryAgainTheme}>
63
+ Try Again
64
+ </BaseButton>
65
+ <BaseButton
66
+ onClick={cancelActivation}
67
+ theme={backToWalletSelectionTheme}
68
+ >
69
+ <Typography marginBottom={12}>Back to wallet selection</Typography>
70
+ </BaseButton>
71
+ </Grid>
57
72
  </Wrapper>
58
73
  );
59
74
  }
@@ -110,6 +110,9 @@ export interface OptionProps {
110
110
  hoverColor: CSSProperties["color"];
111
111
  backgroundColor: CSSProperties["backgroundColor"];
112
112
  borderRadius: CSSProperties["borderRadius"];
113
+ onOptionClick?: (arg0: {
114
+ activationState: ReturnType<typeof useActivationState>["activationState"];
115
+ }) => void;
113
116
  }
114
117
  export function Option({
115
118
  connection,
@@ -117,7 +120,8 @@ export function Option({
117
120
  hoverFocusBackgroundColor,
118
121
  hoverColor,
119
122
  backgroundColor,
120
- borderRadius
123
+ borderRadius,
124
+ onOptionClick
121
125
  }: OptionProps) {
122
126
  const { activationState, tryActivation } = useActivationState();
123
127
  const toggleAccountDrawer = useToggleAccountDrawer();
@@ -139,7 +143,10 @@ export function Option({
139
143
  >
140
144
  <OptionCardClickable
141
145
  disabled={isSomeOptionPending}
142
- onClick={activate}
146
+ onClick={() => {
147
+ activate();
148
+ onOptionClick?.({ activationState });
149
+ }}
143
150
  selected={isCurrentOptionPending}
144
151
  data-testid={`wallet-option-${connection.type}`}
145
152
  >
@@ -5,7 +5,9 @@ import styled, { CSSProperties } from "styled-components";
5
5
 
6
6
  import { Grid } from "../../ui/Grid";
7
7
  import { flexColumnNoWrap } from "../styles";
8
- import ConnectionErrorView from "./ConnectionErrorView";
8
+ import ConnectionErrorView, {
9
+ ConnectionErrorViewProps
10
+ } from "./ConnectionErrorView";
9
11
  import { Option, OptionProps } from "./Option";
10
12
  import {
11
13
  ActivationStatus,
@@ -39,7 +41,6 @@ const OptionGrid = styled.div<{ $borderRadius: CSSProperties["borderRadius"] }>`
39
41
 
40
42
  export type WalletModalProps = {
41
43
  PrivacyPolicy: React.FC;
42
- magicLoginButtonProps: MagicLoginButtonProps;
43
44
  optionProps: Pick<
44
45
  OptionProps,
45
46
  | "color"
@@ -47,12 +48,20 @@ export type WalletModalProps = {
47
48
  | "hoverColor"
48
49
  | "backgroundColor"
49
50
  | "borderRadius"
51
+ | "onOptionClick"
50
52
  > & { iconBorderRadius: CSSProperties["borderRadius"] };
51
- };
53
+ withMagicLogin?: boolean;
54
+ connectionErrorProps: ConnectionErrorViewProps;
55
+ } & (
56
+ | { withMagicLogin: true; magicLoginButtonProps: MagicLoginButtonProps }
57
+ | { withMagicLogin?: false; magicLoginButtonProps?: undefined }
58
+ );
52
59
  export function WalletModal({
53
60
  PrivacyPolicy,
54
61
  magicLoginButtonProps,
55
- optionProps
62
+ optionProps,
63
+ withMagicLogin = true,
64
+ connectionErrorProps
56
65
  }: WalletModalProps) {
57
66
  const chainId = useChainId();
58
67
  const { config } = useConfigContext();
@@ -82,7 +91,7 @@ export function WalletModal({
82
91
  Connect a wallet
83
92
  </Grid>
84
93
  {activationState.status === ActivationStatus.ERROR ? (
85
- <ConnectionErrorView />
94
+ <ConnectionErrorView {...connectionErrorProps} />
86
95
  ) : (
87
96
  <AutoColumn $gap="16px">
88
97
  <OptionGrid
@@ -100,7 +109,9 @@ export function WalletModal({
100
109
  />
101
110
  ))}
102
111
  </OptionGrid>
103
- <MagicLoginButton {...magicLoginButtonProps} />
112
+ {withMagicLogin && magicLoginButtonProps && (
113
+ <MagicLoginButton {...magicLoginButtonProps} />
114
+ )}
104
115
  <PrivacyPolicy />
105
116
  </AutoColumn>
106
117
  )}