@ton/appkit-react 0.0.6-alpha.2 → 1.0.0-alpha.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 (797) hide show
  1. package/README.md +40 -9
  2. package/dist/esm/components/shared/amount-presets/amount-presets.js +8 -0
  3. package/dist/esm/components/shared/amount-presets/amount-presets.js.map +1 -0
  4. package/dist/esm/components/shared/amount-presets/amount-presets.module.css +20 -0
  5. package/dist/esm/components/shared/amount-presets/index.js +9 -0
  6. package/dist/esm/components/shared/amount-presets/index.js.map +1 -0
  7. package/dist/esm/components/shared/button-with-connect/button-with-connect.js +16 -0
  8. package/dist/esm/components/shared/button-with-connect/button-with-connect.js.map +1 -0
  9. package/dist/esm/components/shared/button-with-connect/index.js +9 -0
  10. package/dist/esm/components/shared/button-with-connect/index.js.map +1 -0
  11. package/dist/esm/components/{ton-icon → shared/low-balance-modal}/index.js +1 -1
  12. package/dist/esm/components/shared/low-balance-modal/index.js.map +1 -0
  13. package/dist/esm/components/shared/low-balance-modal/low-balance-modal.js +11 -0
  14. package/dist/esm/components/shared/low-balance-modal/low-balance-modal.js.map +1 -0
  15. package/dist/esm/components/shared/low-balance-modal/low-balance-modal.module.css +21 -0
  16. package/dist/esm/components/shared/option-switcher/index.js +9 -0
  17. package/dist/esm/components/shared/option-switcher/index.js.map +1 -0
  18. package/dist/esm/components/shared/option-switcher/option-switcher.js +14 -0
  19. package/dist/esm/components/shared/option-switcher/option-switcher.js.map +1 -0
  20. package/dist/esm/components/shared/option-switcher/option-switcher.module.css +18 -0
  21. package/dist/esm/components/shared/settings-button/index.js +9 -0
  22. package/dist/esm/components/shared/settings-button/index.js.map +1 -0
  23. package/dist/esm/components/shared/settings-button/settings-button.js +9 -0
  24. package/dist/esm/components/shared/settings-button/settings-button.js.map +1 -0
  25. package/dist/esm/components/shared/settings-button/settings-button.module.css +11 -0
  26. package/dist/esm/components/shared/token-select-modal/index.js +9 -0
  27. package/dist/esm/components/shared/token-select-modal/index.js.map +1 -0
  28. package/dist/esm/components/shared/token-select-modal/token-select-modal.js +36 -0
  29. package/dist/esm/components/shared/token-select-modal/token-select-modal.js.map +1 -0
  30. package/dist/esm/components/shared/token-select-modal/token-select-modal.module.css +27 -0
  31. package/dist/esm/components/ui/amount-reversed/amount-reversed.js +13 -0
  32. package/dist/esm/components/ui/amount-reversed/amount-reversed.js.map +1 -0
  33. package/dist/esm/components/ui/amount-reversed/amount-reversed.module.css +34 -0
  34. package/dist/esm/components/ui/amount-reversed/index.js +9 -0
  35. package/dist/esm/components/ui/amount-reversed/index.js.map +1 -0
  36. package/dist/esm/components/ui/block/block.js.map +1 -0
  37. package/dist/esm/components/{block → ui/block}/block.module.css +1 -1
  38. package/dist/esm/components/ui/block/index.js.map +1 -0
  39. package/dist/esm/components/ui/button/button.js +31 -0
  40. package/dist/esm/components/ui/button/button.js.map +1 -0
  41. package/dist/esm/components/ui/button/button.module.css +137 -0
  42. package/dist/esm/components/ui/button/index.js.map +1 -0
  43. package/dist/esm/components/ui/centered-amount-input/centered-amount-input.js +51 -0
  44. package/dist/esm/components/ui/centered-amount-input/centered-amount-input.js.map +1 -0
  45. package/dist/esm/components/ui/centered-amount-input/centered-amount-input.module.css +69 -0
  46. package/dist/esm/components/ui/centered-amount-input/index.js +9 -0
  47. package/dist/esm/components/ui/centered-amount-input/index.js.map +1 -0
  48. package/dist/esm/components/ui/collapsible/collapsible.js +34 -0
  49. package/dist/esm/components/ui/collapsible/collapsible.js.map +1 -0
  50. package/dist/esm/components/ui/collapsible/collapsible.module.css +4 -0
  51. package/dist/esm/components/ui/collapsible/index.js +9 -0
  52. package/dist/esm/components/ui/collapsible/index.js.map +1 -0
  53. package/dist/esm/components/ui/dialog/dialog.js +67 -0
  54. package/dist/esm/components/ui/dialog/dialog.js.map +1 -0
  55. package/dist/esm/components/ui/dialog/index.js +9 -0
  56. package/dist/esm/components/ui/dialog/index.js.map +1 -0
  57. package/dist/esm/components/ui/dialog/use-dialog-context.js +16 -0
  58. package/dist/esm/components/ui/dialog/use-dialog-context.js.map +1 -0
  59. package/dist/esm/components/ui/icons/chevron-down-icon.js +4 -0
  60. package/dist/esm/components/ui/icons/chevron-down-icon.js.map +1 -0
  61. package/dist/esm/components/ui/icons/chevrons-icon.js +4 -0
  62. package/dist/esm/components/ui/icons/chevrons-icon.js.map +1 -0
  63. package/dist/esm/components/ui/icons/close-icon.js +4 -0
  64. package/dist/esm/components/ui/icons/close-icon.js.map +1 -0
  65. package/dist/esm/components/ui/icons/failed-icon.js +4 -0
  66. package/dist/esm/components/ui/icons/failed-icon.js.map +1 -0
  67. package/dist/esm/components/ui/icons/flip-icon.js +4 -0
  68. package/dist/esm/components/ui/icons/flip-icon.js.map +1 -0
  69. package/dist/esm/components/ui/icons/image-icon.js +4 -0
  70. package/dist/esm/components/ui/icons/image-icon.js.map +1 -0
  71. package/dist/esm/components/ui/icons/index.js +21 -0
  72. package/dist/esm/components/ui/icons/index.js.map +1 -0
  73. package/dist/esm/components/ui/icons/search-icon.js +4 -0
  74. package/dist/esm/components/ui/icons/search-icon.js.map +1 -0
  75. package/dist/esm/components/ui/icons/sliders-icon.js +4 -0
  76. package/dist/esm/components/ui/icons/sliders-icon.js.map +1 -0
  77. package/dist/esm/components/ui/icons/spinner-icon.js +4 -0
  78. package/dist/esm/components/ui/icons/spinner-icon.js.map +1 -0
  79. package/dist/esm/components/ui/icons/success-icon.js +4 -0
  80. package/dist/esm/components/ui/icons/success-icon.js.map +1 -0
  81. package/dist/esm/components/ui/icons/ton-icon.js +5 -0
  82. package/dist/esm/components/ui/icons/ton-icon.js.map +1 -0
  83. package/dist/esm/components/ui/icons/types.js +10 -0
  84. package/dist/esm/components/ui/icons/types.js.map +1 -0
  85. package/dist/esm/components/ui/icons/verified-icon.js +4 -0
  86. package/dist/esm/components/ui/icons/verified-icon.js.map +1 -0
  87. package/dist/esm/components/ui/info-block/index.js +9 -0
  88. package/dist/esm/components/ui/info-block/index.js.map +1 -0
  89. package/dist/esm/components/ui/info-block/info-block.js +31 -0
  90. package/dist/esm/components/ui/info-block/info-block.js.map +1 -0
  91. package/dist/esm/components/ui/info-block/info-block.module.css +30 -0
  92. package/dist/esm/components/ui/input/index.js +9 -0
  93. package/dist/esm/components/ui/input/index.js.map +1 -0
  94. package/dist/esm/components/ui/input/input.js +62 -0
  95. package/dist/esm/components/ui/input/input.js.map +1 -0
  96. package/dist/esm/components/ui/input/input.module.css +147 -0
  97. package/dist/esm/components/ui/input/use-input-resize.js +56 -0
  98. package/dist/esm/components/ui/input/use-input-resize.js.map +1 -0
  99. package/dist/esm/components/ui/logo/index.js +9 -0
  100. package/dist/esm/components/ui/logo/index.js.map +1 -0
  101. package/dist/esm/components/ui/logo/logo.js +54 -0
  102. package/dist/esm/components/ui/logo/logo.js.map +1 -0
  103. package/dist/esm/components/{circle-icon/circle-icon.module.css → ui/logo/logo.module.css} +6 -6
  104. package/dist/esm/components/ui/logo/use-image-loading-status.js +44 -0
  105. package/dist/esm/components/ui/logo/use-image-loading-status.js.map +1 -0
  106. package/dist/esm/components/ui/modal/index.js +9 -0
  107. package/dist/esm/components/ui/modal/index.js.map +1 -0
  108. package/dist/esm/components/ui/modal/modal.js +9 -0
  109. package/dist/esm/components/ui/modal/modal.js.map +1 -0
  110. package/dist/esm/components/ui/modal/modal.module.css +71 -0
  111. package/dist/esm/components/ui/select/index.js +9 -0
  112. package/dist/esm/components/ui/select/index.js.map +1 -0
  113. package/dist/esm/components/ui/select/select.js +147 -0
  114. package/dist/esm/components/ui/select/select.js.map +1 -0
  115. package/dist/esm/components/ui/select/select.module.css +37 -0
  116. package/dist/esm/components/ui/select/use-select-context.js +16 -0
  117. package/dist/esm/components/ui/select/use-select-context.js.map +1 -0
  118. package/dist/esm/components/ui/skeleton/index.js +9 -0
  119. package/dist/esm/components/ui/skeleton/index.js.map +1 -0
  120. package/dist/esm/components/ui/skeleton/skeleton.js +16 -0
  121. package/dist/esm/components/ui/skeleton/skeleton.js.map +1 -0
  122. package/dist/esm/components/ui/skeleton/skeleton.module.css +25 -0
  123. package/dist/esm/components/ui/tabs/index.js +9 -0
  124. package/dist/esm/components/ui/tabs/index.js.map +1 -0
  125. package/dist/esm/components/ui/tabs/tabs.js +43 -0
  126. package/dist/esm/components/ui/tabs/tabs.js.map +1 -0
  127. package/dist/esm/components/ui/tabs/tabs.module.css +32 -0
  128. package/dist/esm/features/balances/components/balance-badge/balance-badge.js +3 -3
  129. package/dist/esm/features/balances/components/balance-badge/balance-badge.js.map +1 -1
  130. package/dist/esm/features/balances/components/balance-badge/balance-badge.module.css +2 -2
  131. package/dist/esm/features/balances/components/currency-item/currency-item.js +3 -2
  132. package/dist/esm/features/balances/components/currency-item/currency-item.js.map +1 -1
  133. package/dist/esm/features/balances/components/currency-item/currency-item.module.css +5 -11
  134. package/dist/esm/features/balances/components/send-jetton-button/send-jetton-button.js +1 -2
  135. package/dist/esm/features/balances/components/send-jetton-button/send-jetton-button.js.map +1 -1
  136. package/dist/esm/features/balances/components/send-ton-button/send-ton-button.js +1 -2
  137. package/dist/esm/features/balances/components/send-ton-button/send-ton-button.js.map +1 -1
  138. package/dist/esm/features/balances/hooks/use-balance-by-address.js +4 -2
  139. package/dist/esm/features/balances/hooks/use-balance-by-address.js.map +1 -1
  140. package/dist/esm/features/balances/hooks/use-watch-balance-by-address.js +1 -1
  141. package/dist/esm/features/balances/hooks/use-watch-balance-by-address.js.map +1 -1
  142. package/dist/esm/features/jettons/hooks/use-jetton-balance-by-address.js +4 -2
  143. package/dist/esm/features/jettons/hooks/use-jetton-balance-by-address.js.map +1 -1
  144. package/dist/esm/features/jettons/hooks/use-jetton-info.js +4 -2
  145. package/dist/esm/features/jettons/hooks/use-jetton-info.js.map +1 -1
  146. package/dist/esm/features/jettons/hooks/use-jetton-wallet-address.js +4 -2
  147. package/dist/esm/features/jettons/hooks/use-jetton-wallet-address.js.map +1 -1
  148. package/dist/esm/features/jettons/hooks/use-jettons-by-address.js +4 -2
  149. package/dist/esm/features/jettons/hooks/use-jettons-by-address.js.map +1 -1
  150. package/dist/esm/features/jettons/hooks/use-transfer-jetton.js +1 -1
  151. package/dist/esm/features/jettons/hooks/use-transfer-jetton.js.map +1 -1
  152. package/dist/esm/features/jettons/hooks/use-watch-jettons-by-address.js +1 -1
  153. package/dist/esm/features/jettons/hooks/use-watch-jettons-by-address.js.map +1 -1
  154. package/dist/esm/features/network/hooks/use-block-number.js +4 -2
  155. package/dist/esm/features/network/hooks/use-block-number.js.map +1 -1
  156. package/dist/esm/features/network/hooks/use-default-network.js +1 -1
  157. package/dist/esm/features/network/hooks/use-default-network.js.map +1 -1
  158. package/dist/esm/features/network/hooks/use-networks.js +1 -1
  159. package/dist/esm/features/network/hooks/use-networks.js.map +1 -1
  160. package/dist/esm/features/nft/components/nft-item/nft-item.js +3 -3
  161. package/dist/esm/features/nft/components/nft-item/nft-item.js.map +1 -1
  162. package/dist/esm/features/nft/components/nft-item/nft-item.module.css +4 -6
  163. package/dist/esm/features/nft/hooks/use-nft.js +4 -2
  164. package/dist/esm/features/nft/hooks/use-nft.js.map +1 -1
  165. package/dist/esm/features/nft/hooks/use-nfts-by-address.js +4 -2
  166. package/dist/esm/features/nft/hooks/use-nfts-by-address.js.map +1 -1
  167. package/dist/esm/features/nft/hooks/use-transfer-nft.js +1 -1
  168. package/dist/esm/features/nft/hooks/use-transfer-nft.js.map +1 -1
  169. package/dist/esm/features/settings/hooks/use-app-kit-theme.js.map +1 -0
  170. package/dist/esm/{hooks → features/settings/hooks}/use-app-kit.js +1 -1
  171. package/dist/esm/features/settings/hooks/use-app-kit.js.map +1 -0
  172. package/dist/esm/{hooks → features/settings/hooks}/use-i18n.js +1 -1
  173. package/dist/esm/features/settings/hooks/use-i18n.js.map +1 -0
  174. package/dist/esm/features/settings/index.js +11 -0
  175. package/dist/esm/features/settings/index.js.map +1 -0
  176. package/dist/esm/features/signing/hooks/use-sign-binary.js +1 -1
  177. package/dist/esm/features/signing/hooks/use-sign-binary.js.map +1 -1
  178. package/dist/esm/features/signing/hooks/use-sign-cell.js +1 -1
  179. package/dist/esm/features/signing/hooks/use-sign-cell.js.map +1 -1
  180. package/dist/esm/features/signing/hooks/use-sign-text.js +1 -1
  181. package/dist/esm/features/signing/hooks/use-sign-text.js.map +1 -1
  182. package/dist/esm/features/staking/components/select-unstake-mode/index.js +9 -0
  183. package/dist/esm/features/staking/components/select-unstake-mode/index.js.map +1 -0
  184. package/dist/esm/features/staking/components/select-unstake-mode/select-unstake-mode.js +55 -0
  185. package/dist/esm/features/staking/components/select-unstake-mode/select-unstake-mode.js.map +1 -0
  186. package/dist/esm/features/staking/components/select-unstake-mode/select-unstake-mode.module.css +115 -0
  187. package/dist/esm/features/staking/components/staking-balance-block/index.js +9 -0
  188. package/dist/esm/features/staking/components/staking-balance-block/index.js.map +1 -0
  189. package/dist/esm/features/staking/components/staking-balance-block/staking-balance-block.js +25 -0
  190. package/dist/esm/features/staking/components/staking-balance-block/staking-balance-block.js.map +1 -0
  191. package/dist/esm/features/staking/components/staking-balance-block/staking-balance-block.module.css +40 -0
  192. package/dist/esm/features/staking/components/staking-info/index.js +9 -0
  193. package/dist/esm/features/staking/components/staking-info/index.js.map +1 -0
  194. package/dist/esm/features/staking/components/staking-info/staking-info.js +13 -0
  195. package/dist/esm/features/staking/components/staking-info/staking-info.js.map +1 -0
  196. package/dist/esm/features/staking/components/staking-info/utils.js +13 -0
  197. package/dist/esm/features/staking/components/staking-info/utils.js.map +1 -0
  198. package/dist/esm/features/staking/components/staking-settings-modal/index.js +9 -0
  199. package/dist/esm/features/staking/components/staking-settings-modal/index.js.map +1 -0
  200. package/dist/esm/features/staking/components/staking-settings-modal/staking-settings-modal.js +38 -0
  201. package/dist/esm/features/staking/components/staking-settings-modal/staking-settings-modal.js.map +1 -0
  202. package/dist/esm/features/staking/components/staking-settings-modal/staking-settings-modal.module.css +24 -0
  203. package/dist/esm/features/staking/components/staking-widget/index.js +9 -0
  204. package/dist/esm/features/staking/components/staking-widget/index.js.map +1 -0
  205. package/dist/esm/features/staking/components/staking-widget/staking-widget.js +21 -0
  206. package/dist/esm/features/staking/components/staking-widget/staking-widget.js.map +1 -0
  207. package/dist/esm/features/staking/components/staking-widget-provider/index.js +9 -0
  208. package/dist/esm/features/staking/components/staking-widget-provider/index.js.map +1 -0
  209. package/dist/esm/features/staking/components/staking-widget-provider/staking-widget-provider.js +274 -0
  210. package/dist/esm/features/staking/components/staking-widget-provider/staking-widget-provider.js.map +1 -0
  211. package/dist/esm/features/staking/components/staking-widget-provider/use-staking-validation.js +48 -0
  212. package/dist/esm/features/staking/components/staking-widget-provider/use-staking-validation.js.map +1 -0
  213. package/dist/esm/features/staking/components/staking-widget-ui/index.js +9 -0
  214. package/dist/esm/features/staking/components/staking-widget-ui/index.js.map +1 -0
  215. package/dist/esm/features/staking/components/staking-widget-ui/staking-widget-ui.js +36 -0
  216. package/dist/esm/features/staking/components/staking-widget-ui/staking-widget-ui.js.map +1 -0
  217. package/dist/esm/features/staking/components/staking-widget-ui/staking-widget-ui.module.css +31 -0
  218. package/dist/esm/features/staking/hooks/use-build-stake-transaction.js +1 -1
  219. package/dist/esm/features/staking/hooks/use-build-stake-transaction.js.map +1 -1
  220. package/dist/esm/features/staking/hooks/use-staked-balance.js +4 -2
  221. package/dist/esm/features/staking/hooks/use-staked-balance.js.map +1 -1
  222. package/dist/esm/features/staking/hooks/use-staking-provider-info.js +10 -2
  223. package/dist/esm/features/staking/hooks/use-staking-provider-info.js.map +1 -1
  224. package/dist/esm/features/staking/hooks/use-staking-provider-metadata.js +28 -0
  225. package/dist/esm/features/staking/hooks/use-staking-provider-metadata.js.map +1 -0
  226. package/dist/esm/features/staking/hooks/use-staking-provider.js +30 -0
  227. package/dist/esm/features/staking/hooks/use-staking-provider.js.map +1 -0
  228. package/dist/esm/features/staking/hooks/use-staking-providers.js +12 -6
  229. package/dist/esm/features/staking/hooks/use-staking-providers.js.map +1 -1
  230. package/dist/esm/features/staking/hooks/use-staking-quote.js +4 -2
  231. package/dist/esm/features/staking/hooks/use-staking-quote.js.map +1 -1
  232. package/dist/esm/features/staking/index.js +10 -1
  233. package/dist/esm/features/staking/index.js.map +1 -1
  234. package/dist/esm/features/staking/utils/map-staking-error.js +25 -0
  235. package/dist/esm/features/staking/utils/map-staking-error.js.map +1 -0
  236. package/dist/esm/features/swap/components/swap-field/index.js +9 -0
  237. package/dist/esm/features/swap/components/swap-field/index.js.map +1 -0
  238. package/dist/esm/features/swap/components/swap-field/swap-field.js +17 -0
  239. package/dist/esm/features/swap/components/swap-field/swap-field.js.map +1 -0
  240. package/dist/esm/features/swap/components/swap-field/swap-field.module.css +65 -0
  241. package/dist/esm/features/swap/components/swap-flip-button/index.js +9 -0
  242. package/dist/esm/features/swap/components/swap-flip-button/index.js.map +1 -0
  243. package/dist/esm/features/swap/components/swap-flip-button/swap-flip-button.js +9 -0
  244. package/dist/esm/features/swap/components/swap-flip-button/swap-flip-button.js.map +1 -0
  245. package/dist/esm/features/swap/components/swap-flip-button/swap-flip-button.module.css +32 -0
  246. package/dist/esm/features/swap/components/swap-info/index.js +9 -0
  247. package/dist/esm/features/swap/components/swap-info/index.js.map +1 -0
  248. package/dist/esm/features/swap/components/swap-info/swap-info.js +12 -0
  249. package/dist/esm/features/swap/components/swap-info/swap-info.js.map +1 -0
  250. package/dist/esm/features/swap/components/swap-settings-modal/index.js +9 -0
  251. package/dist/esm/features/swap/components/swap-settings-modal/index.js.map +1 -0
  252. package/dist/esm/features/swap/components/swap-settings-modal/swap-settings-modal.js +41 -0
  253. package/dist/esm/features/swap/components/swap-settings-modal/swap-settings-modal.js.map +1 -0
  254. package/dist/esm/features/swap/components/swap-settings-modal/swap-settings-modal.module.css +24 -0
  255. package/dist/esm/features/swap/components/swap-token-select-modal/index.js +9 -0
  256. package/dist/esm/features/swap/components/swap-token-select-modal/index.js.map +1 -0
  257. package/dist/esm/features/swap/components/swap-token-select-modal/swap-token-select-modal.js +8 -0
  258. package/dist/esm/features/swap/components/swap-token-select-modal/swap-token-select-modal.js.map +1 -0
  259. package/dist/esm/features/swap/components/swap-token-select-modal/swap-token-select-modal.module.css +67 -0
  260. package/dist/esm/{components/circle-icon → features/swap/components/swap-widget}/index.js +1 -1
  261. package/dist/esm/features/swap/components/swap-widget/index.js.map +1 -0
  262. package/dist/esm/features/swap/components/swap-widget/swap-widget.js +21 -0
  263. package/dist/esm/features/swap/components/swap-widget/swap-widget.js.map +1 -0
  264. package/dist/esm/features/swap/components/swap-widget-provider/index.js +9 -0
  265. package/dist/esm/features/swap/components/swap-widget-provider/index.js.map +1 -0
  266. package/dist/esm/features/swap/components/swap-widget-provider/swap-widget-provider.js +237 -0
  267. package/dist/esm/features/swap/components/swap-widget-provider/swap-widget-provider.js.map +1 -0
  268. package/dist/esm/features/swap/components/swap-widget-provider/use-swap-balances.js +38 -0
  269. package/dist/esm/features/swap/components/swap-widget-provider/use-swap-balances.js.map +1 -0
  270. package/dist/esm/features/swap/components/swap-widget-provider/use-swap-token-state.js +62 -0
  271. package/dist/esm/features/swap/components/swap-widget-provider/use-swap-token-state.js.map +1 -0
  272. package/dist/esm/features/swap/components/swap-widget-provider/use-swap-validation.js +28 -0
  273. package/dist/esm/features/swap/components/swap-widget-provider/use-swap-validation.js.map +1 -0
  274. package/dist/esm/features/swap/components/swap-widget-ui/index.js +9 -0
  275. package/dist/esm/features/swap/components/swap-widget-ui/index.js.map +1 -0
  276. package/dist/esm/features/swap/components/swap-widget-ui/swap-widget-ui.js +49 -0
  277. package/dist/esm/features/swap/components/swap-widget-ui/swap-widget-ui.js.map +1 -0
  278. package/dist/esm/features/swap/components/swap-widget-ui/swap-widget-ui.module.css +51 -0
  279. package/dist/esm/features/swap/components/token-selector/index.js +9 -0
  280. package/dist/esm/features/swap/components/token-selector/index.js.map +1 -0
  281. package/dist/esm/features/swap/components/token-selector/token-selector.js +13 -0
  282. package/dist/esm/features/swap/components/token-selector/token-selector.js.map +1 -0
  283. package/dist/esm/features/swap/components/token-selector/token-selector.module.css +12 -0
  284. package/dist/esm/features/swap/hooks/use-build-swap-transaction.js +4 -1
  285. package/dist/esm/features/swap/hooks/use-build-swap-transaction.js.map +1 -1
  286. package/dist/esm/features/swap/hooks/use-swap-provider.js +34 -0
  287. package/dist/esm/features/swap/hooks/use-swap-provider.js.map +1 -0
  288. package/dist/esm/features/swap/hooks/use-swap-providers.js +24 -0
  289. package/dist/esm/features/swap/hooks/use-swap-providers.js.map +1 -0
  290. package/dist/esm/features/swap/hooks/use-swap-quote.js +7 -2
  291. package/dist/esm/features/swap/hooks/use-swap-quote.js.map +1 -1
  292. package/dist/esm/features/swap/index.js +8 -0
  293. package/dist/esm/features/swap/index.js.map +1 -1
  294. package/dist/esm/features/swap/utils/get-display-amount.js +19 -0
  295. package/dist/esm/features/swap/utils/get-display-amount.js.map +1 -0
  296. package/dist/esm/features/swap/utils/map-swap-error.js +29 -0
  297. package/dist/esm/features/swap/utils/map-swap-error.js.map +1 -0
  298. package/dist/esm/features/swap/utils/map-swap-widget-tokens.js +26 -0
  299. package/dist/esm/features/swap/utils/map-swap-widget-tokens.js.map +1 -0
  300. package/dist/esm/features/transaction/components/transaction/send.js +2 -2
  301. package/dist/esm/features/transaction/components/transaction/send.js.map +1 -1
  302. package/dist/esm/features/transaction/components/transaction-progress/transaction-progress-icons.js +7 -8
  303. package/dist/esm/features/transaction/components/transaction-progress/transaction-progress-icons.js.map +1 -1
  304. package/dist/esm/features/transaction/components/transaction-progress/transaction-progress.js +1 -1
  305. package/dist/esm/features/transaction/components/transaction-progress/transaction-progress.js.map +1 -1
  306. package/dist/esm/features/transaction/components/transaction-progress/transaction-progress.module.css +3 -3
  307. package/dist/esm/features/transaction/hooks/use-send-transaction.js +1 -1
  308. package/dist/esm/features/transaction/hooks/use-send-transaction.js.map +1 -1
  309. package/dist/esm/features/transaction/hooks/use-transaction-status.js +4 -2
  310. package/dist/esm/features/transaction/hooks/use-transaction-status.js.map +1 -1
  311. package/dist/esm/features/transaction/hooks/use-transfer-ton.js +1 -1
  312. package/dist/esm/features/transaction/hooks/use-transfer-ton.js.map +1 -1
  313. package/dist/esm/features/transaction/hooks/use-watch-transactions-by-address.js +1 -1
  314. package/dist/esm/features/transaction/hooks/use-watch-transactions-by-address.js.map +1 -1
  315. package/dist/esm/features/wallets/hooks/use-connect.js +1 -1
  316. package/dist/esm/features/wallets/hooks/use-connect.js.map +1 -1
  317. package/dist/esm/features/wallets/hooks/use-connected-wallets.js +1 -1
  318. package/dist/esm/features/wallets/hooks/use-connected-wallets.js.map +1 -1
  319. package/dist/esm/features/wallets/hooks/use-connector-by-id.js +1 -1
  320. package/dist/esm/features/wallets/hooks/use-connector-by-id.js.map +1 -1
  321. package/dist/esm/features/wallets/hooks/use-connectors.js +1 -1
  322. package/dist/esm/features/wallets/hooks/use-connectors.js.map +1 -1
  323. package/dist/esm/features/wallets/hooks/use-disconnect.js +1 -1
  324. package/dist/esm/features/wallets/hooks/use-disconnect.js.map +1 -1
  325. package/dist/esm/features/wallets/hooks/use-selected-wallet.js +1 -1
  326. package/dist/esm/features/wallets/hooks/use-selected-wallet.js.map +1 -1
  327. package/dist/esm/hooks/use-debounce-callback.js +41 -0
  328. package/dist/esm/hooks/use-debounce-callback.js.map +1 -0
  329. package/dist/esm/hooks/use-debounce-value.js +23 -0
  330. package/dist/esm/hooks/use-debounce-value.js.map +1 -0
  331. package/dist/esm/hooks/use-unmount.js +14 -0
  332. package/dist/esm/hooks/use-unmount.js.map +1 -0
  333. package/dist/esm/index.js +19 -7
  334. package/dist/esm/index.js.map +1 -1
  335. package/dist/esm/locales/en.js +75 -0
  336. package/dist/esm/locales/en.js.map +1 -1
  337. package/dist/esm/styles/index.css +106 -60
  338. package/dist/esm/styles/typography.module.css +104 -54
  339. package/dist/esm/tsconfig.build.tsbuildinfo +1 -1
  340. package/dist/esm/types/appkit-ui-token.js +9 -0
  341. package/dist/esm/types/appkit-ui-token.js.map +1 -0
  342. package/dist/esm/utils/map-defi-error.js +34 -0
  343. package/dist/esm/utils/map-defi-error.js.map +1 -0
  344. package/dist/esm/utils/validate-amount.js +30 -0
  345. package/dist/esm/utils/validate-amount.js.map +1 -0
  346. package/dist/types/components/shared/amount-presets/amount-presets.d.ts +20 -0
  347. package/dist/types/components/shared/amount-presets/amount-presets.d.ts.map +1 -0
  348. package/dist/types/components/shared/amount-presets/index.d.ts +10 -0
  349. package/dist/types/components/shared/amount-presets/index.d.ts.map +1 -0
  350. package/dist/types/components/shared/button-with-connect/button-with-connect.d.ts +11 -0
  351. package/dist/types/components/shared/button-with-connect/button-with-connect.d.ts.map +1 -0
  352. package/dist/types/components/{ton-icon → shared/button-with-connect}/index.d.ts +1 -1
  353. package/dist/types/components/shared/button-with-connect/index.d.ts.map +1 -0
  354. package/dist/types/components/shared/low-balance-modal/index.d.ts +10 -0
  355. package/dist/types/components/shared/low-balance-modal/index.d.ts.map +1 -0
  356. package/dist/types/components/shared/low-balance-modal/low-balance-modal.d.ts +23 -0
  357. package/dist/types/components/shared/low-balance-modal/low-balance-modal.d.ts.map +1 -0
  358. package/dist/types/components/shared/option-switcher/index.d.ts +9 -0
  359. package/dist/types/components/shared/option-switcher/index.d.ts.map +1 -0
  360. package/dist/types/components/shared/option-switcher/option-switcher.d.ts +28 -0
  361. package/dist/types/components/shared/option-switcher/option-switcher.d.ts.map +1 -0
  362. package/dist/types/components/shared/settings-button/index.d.ts +9 -0
  363. package/dist/types/components/shared/settings-button/index.d.ts.map +1 -0
  364. package/dist/types/components/shared/settings-button/settings-button.d.ts +14 -0
  365. package/dist/types/components/shared/settings-button/settings-button.d.ts.map +1 -0
  366. package/dist/types/components/shared/token-select-modal/index.d.ts +10 -0
  367. package/dist/types/components/shared/token-select-modal/index.d.ts.map +1 -0
  368. package/dist/types/components/shared/token-select-modal/token-select-modal.d.ts +19 -0
  369. package/dist/types/components/shared/token-select-modal/token-select-modal.d.ts.map +1 -0
  370. package/dist/types/components/ui/amount-reversed/amount-reversed.d.ts +19 -0
  371. package/dist/types/components/ui/amount-reversed/amount-reversed.d.ts.map +1 -0
  372. package/dist/types/components/ui/amount-reversed/index.d.ts +10 -0
  373. package/dist/types/components/ui/amount-reversed/index.d.ts.map +1 -0
  374. package/dist/types/components/ui/block/block.d.ts.map +1 -0
  375. package/dist/types/components/ui/block/index.d.ts.map +1 -0
  376. package/dist/types/components/ui/button/button.d.ts +31 -0
  377. package/dist/types/components/ui/button/button.d.ts.map +1 -0
  378. package/dist/types/components/ui/button/index.d.ts +10 -0
  379. package/dist/types/components/ui/button/index.d.ts.map +1 -0
  380. package/dist/types/components/ui/centered-amount-input/centered-amount-input.d.ts +17 -0
  381. package/dist/types/components/ui/centered-amount-input/centered-amount-input.d.ts.map +1 -0
  382. package/dist/types/components/ui/centered-amount-input/index.d.ts +10 -0
  383. package/dist/types/components/ui/centered-amount-input/index.d.ts.map +1 -0
  384. package/dist/types/components/{button/button.d.ts → ui/collapsible/collapsible.d.ts} +5 -2
  385. package/dist/types/components/ui/collapsible/collapsible.d.ts.map +1 -0
  386. package/dist/types/components/ui/collapsible/index.d.ts +10 -0
  387. package/dist/types/components/ui/collapsible/index.d.ts.map +1 -0
  388. package/dist/types/components/ui/dialog/dialog.d.ts +27 -0
  389. package/dist/types/components/ui/dialog/dialog.d.ts.map +1 -0
  390. package/dist/types/components/ui/dialog/index.d.ts +9 -0
  391. package/dist/types/components/ui/dialog/index.d.ts.map +1 -0
  392. package/dist/types/components/ui/dialog/use-dialog-context.d.ts +15 -0
  393. package/dist/types/components/ui/dialog/use-dialog-context.d.ts.map +1 -0
  394. package/dist/types/components/ui/icons/chevron-down-icon.d.ts +11 -0
  395. package/dist/types/components/ui/icons/chevron-down-icon.d.ts.map +1 -0
  396. package/dist/types/components/ui/icons/chevrons-icon.d.ts +11 -0
  397. package/dist/types/components/ui/icons/chevrons-icon.d.ts.map +1 -0
  398. package/dist/types/components/ui/icons/close-icon.d.ts +11 -0
  399. package/dist/types/components/ui/icons/close-icon.d.ts.map +1 -0
  400. package/dist/types/components/ui/icons/failed-icon.d.ts +11 -0
  401. package/dist/types/components/ui/icons/failed-icon.d.ts.map +1 -0
  402. package/dist/types/components/ui/icons/flip-icon.d.ts +11 -0
  403. package/dist/types/components/ui/icons/flip-icon.d.ts.map +1 -0
  404. package/dist/types/components/ui/icons/image-icon.d.ts +11 -0
  405. package/dist/types/components/ui/icons/image-icon.d.ts.map +1 -0
  406. package/dist/types/components/ui/icons/index.d.ts +21 -0
  407. package/dist/types/components/ui/icons/index.d.ts.map +1 -0
  408. package/dist/types/components/ui/icons/search-icon.d.ts +11 -0
  409. package/dist/types/components/ui/icons/search-icon.d.ts.map +1 -0
  410. package/dist/types/components/ui/icons/sliders-icon.d.ts +11 -0
  411. package/dist/types/components/ui/icons/sliders-icon.d.ts.map +1 -0
  412. package/dist/types/components/ui/icons/spinner-icon.d.ts +11 -0
  413. package/dist/types/components/ui/icons/spinner-icon.d.ts.map +1 -0
  414. package/dist/types/components/ui/icons/success-icon.d.ts +11 -0
  415. package/dist/types/components/ui/icons/success-icon.d.ts.map +1 -0
  416. package/dist/types/components/ui/icons/ton-icon.d.ts +12 -0
  417. package/dist/types/components/ui/icons/ton-icon.d.ts.map +1 -0
  418. package/dist/types/components/ui/icons/types.d.ts +20 -0
  419. package/dist/types/components/ui/icons/types.d.ts.map +1 -0
  420. package/dist/types/components/ui/icons/verified-icon.d.ts +11 -0
  421. package/dist/types/components/ui/icons/verified-icon.d.ts.map +1 -0
  422. package/dist/types/components/ui/info-block/index.d.ts +9 -0
  423. package/dist/types/components/ui/info-block/index.d.ts.map +1 -0
  424. package/dist/types/components/ui/info-block/info-block.d.ts +18 -0
  425. package/dist/types/components/ui/info-block/info-block.d.ts.map +1 -0
  426. package/dist/types/components/ui/input/index.d.ts +9 -0
  427. package/dist/types/components/ui/input/index.d.ts.map +1 -0
  428. package/dist/types/components/ui/input/input.d.ts +40 -0
  429. package/dist/types/components/ui/input/input.d.ts.map +1 -0
  430. package/dist/types/components/ui/input/use-input-resize.d.ts +31 -0
  431. package/dist/types/components/ui/input/use-input-resize.d.ts.map +1 -0
  432. package/dist/types/components/ui/logo/index.d.ts +9 -0
  433. package/dist/types/components/ui/logo/index.d.ts.map +1 -0
  434. package/dist/types/components/ui/logo/logo.d.ts +16 -0
  435. package/dist/types/components/ui/logo/logo.d.ts.map +1 -0
  436. package/dist/types/components/ui/logo/use-image-loading-status.d.ts +10 -0
  437. package/dist/types/components/ui/logo/use-image-loading-status.d.ts.map +1 -0
  438. package/dist/types/components/ui/modal/index.d.ts +9 -0
  439. package/dist/types/components/ui/modal/index.d.ts.map +1 -0
  440. package/dist/types/components/ui/modal/modal.d.ts +32 -0
  441. package/dist/types/components/ui/modal/modal.d.ts.map +1 -0
  442. package/dist/types/components/ui/select/index.d.ts +9 -0
  443. package/dist/types/components/ui/select/index.d.ts.map +1 -0
  444. package/dist/types/components/ui/select/select.d.ts +44 -0
  445. package/dist/types/components/ui/select/select.d.ts.map +1 -0
  446. package/dist/types/components/ui/select/use-select-context.d.ts +20 -0
  447. package/dist/types/components/ui/select/use-select-context.d.ts.map +1 -0
  448. package/dist/types/components/ui/skeleton/index.d.ts +10 -0
  449. package/dist/types/components/ui/skeleton/index.d.ts.map +1 -0
  450. package/dist/types/components/ui/skeleton/skeleton.d.ts +14 -0
  451. package/dist/types/components/ui/skeleton/skeleton.d.ts.map +1 -0
  452. package/dist/types/components/ui/tabs/index.d.ts +10 -0
  453. package/dist/types/components/ui/tabs/index.d.ts.map +1 -0
  454. package/dist/types/components/ui/tabs/tabs.d.ts +30 -0
  455. package/dist/types/components/ui/tabs/tabs.d.ts.map +1 -0
  456. package/dist/types/features/balances/components/balance-badge/balance-badge.d.ts +1 -1
  457. package/dist/types/features/balances/components/currency-item/currency-item.d.ts.map +1 -1
  458. package/dist/types/features/balances/components/send-jetton-button/send-jetton-button.d.ts.map +1 -1
  459. package/dist/types/features/balances/components/send-ton-button/send-ton-button.d.ts.map +1 -1
  460. package/dist/types/features/balances/hooks/use-balance-by-address.d.ts.map +1 -1
  461. package/dist/types/features/jettons/hooks/use-jetton-balance-by-address.d.ts.map +1 -1
  462. package/dist/types/features/jettons/hooks/use-jetton-info.d.ts.map +1 -1
  463. package/dist/types/features/jettons/hooks/use-jetton-wallet-address.d.ts.map +1 -1
  464. package/dist/types/features/jettons/hooks/use-jettons-by-address.d.ts.map +1 -1
  465. package/dist/types/features/network/hooks/use-block-number.d.ts.map +1 -1
  466. package/dist/types/features/nft/components/nft-item/nft-item.d.ts.map +1 -1
  467. package/dist/types/features/nft/hooks/use-nft.d.ts.map +1 -1
  468. package/dist/types/features/nft/hooks/use-nfts-by-address.d.ts.map +1 -1
  469. package/dist/types/features/settings/hooks/use-app-kit-theme.d.ts.map +1 -0
  470. package/dist/types/features/settings/hooks/use-app-kit.d.ts.map +1 -0
  471. package/dist/types/{hooks → features/settings/hooks}/use-i18n.d.ts +1 -1
  472. package/dist/types/features/settings/hooks/use-i18n.d.ts.map +1 -0
  473. package/dist/types/features/settings/index.d.ts +11 -0
  474. package/dist/types/features/settings/index.d.ts.map +1 -0
  475. package/dist/types/features/staking/components/select-unstake-mode/index.d.ts +10 -0
  476. package/dist/types/features/staking/components/select-unstake-mode/index.d.ts.map +1 -0
  477. package/dist/types/features/staking/components/select-unstake-mode/select-unstake-mode.d.ts +17 -0
  478. package/dist/types/features/staking/components/select-unstake-mode/select-unstake-mode.d.ts.map +1 -0
  479. package/dist/types/features/staking/components/staking-balance-block/index.d.ts +9 -0
  480. package/dist/types/features/staking/components/staking-balance-block/index.d.ts.map +1 -0
  481. package/dist/types/features/staking/components/staking-balance-block/staking-balance-block.d.ts +21 -0
  482. package/dist/types/features/staking/components/staking-balance-block/staking-balance-block.d.ts.map +1 -0
  483. package/dist/types/features/staking/components/staking-info/index.d.ts +10 -0
  484. package/dist/types/features/staking/components/staking-info/index.d.ts.map +1 -0
  485. package/dist/types/features/staking/components/staking-info/staking-info.d.ts +21 -0
  486. package/dist/types/features/staking/components/staking-info/staking-info.d.ts.map +1 -0
  487. package/dist/types/features/staking/components/staking-info/utils.d.ts +9 -0
  488. package/dist/types/features/staking/components/staking-info/utils.d.ts.map +1 -0
  489. package/dist/types/features/staking/components/staking-settings-modal/index.d.ts +9 -0
  490. package/dist/types/features/staking/components/staking-settings-modal/index.d.ts.map +1 -0
  491. package/dist/types/features/staking/components/staking-settings-modal/staking-settings-modal.d.ts +19 -0
  492. package/dist/types/features/staking/components/staking-settings-modal/staking-settings-modal.d.ts.map +1 -0
  493. package/dist/types/features/staking/components/staking-widget/index.d.ts +9 -0
  494. package/dist/types/features/staking/components/staking-widget/index.d.ts.map +1 -0
  495. package/dist/types/features/staking/components/staking-widget/staking-widget.d.ts +30 -0
  496. package/dist/types/features/staking/components/staking-widget/staking-widget.d.ts.map +1 -0
  497. package/dist/types/features/staking/components/staking-widget-provider/index.d.ts +9 -0
  498. package/dist/types/features/staking/components/staking-widget-provider/index.d.ts.map +1 -0
  499. package/dist/types/features/staking/components/staking-widget-provider/staking-widget-provider.d.ts +98 -0
  500. package/dist/types/features/staking/components/staking-widget-provider/staking-widget-provider.d.ts.map +1 -0
  501. package/dist/types/features/staking/components/staking-widget-provider/use-staking-validation.d.ts +26 -0
  502. package/dist/types/features/staking/components/staking-widget-provider/use-staking-validation.d.ts.map +1 -0
  503. package/dist/types/features/staking/components/staking-widget-ui/index.d.ts +9 -0
  504. package/dist/types/features/staking/components/staking-widget-ui/index.d.ts.map +1 -0
  505. package/dist/types/features/staking/components/staking-widget-ui/staking-widget-ui.d.ts +12 -0
  506. package/dist/types/features/staking/components/staking-widget-ui/staking-widget-ui.d.ts.map +1 -0
  507. package/dist/types/features/staking/hooks/use-staked-balance.d.ts.map +1 -1
  508. package/dist/types/features/staking/hooks/use-staking-provider-info.d.ts.map +1 -1
  509. package/dist/types/features/staking/hooks/use-staking-provider-metadata.d.ts +15 -0
  510. package/dist/types/features/staking/hooks/use-staking-provider-metadata.d.ts.map +1 -0
  511. package/dist/types/features/staking/hooks/use-staking-provider.d.ts +14 -0
  512. package/dist/types/features/staking/hooks/use-staking-provider.d.ts.map +1 -0
  513. package/dist/types/features/staking/hooks/use-staking-providers.d.ts +4 -6
  514. package/dist/types/features/staking/hooks/use-staking-providers.d.ts.map +1 -1
  515. package/dist/types/features/staking/hooks/use-staking-quote.d.ts.map +1 -1
  516. package/dist/types/features/staking/index.d.ts +10 -1
  517. package/dist/types/features/staking/index.d.ts.map +1 -1
  518. package/dist/types/features/staking/utils/map-staking-error.d.ts +13 -0
  519. package/dist/types/features/staking/utils/map-staking-error.d.ts.map +1 -0
  520. package/dist/types/features/swap/components/swap-field/index.d.ts +9 -0
  521. package/dist/types/features/swap/components/swap-field/index.d.ts.map +1 -0
  522. package/dist/types/features/swap/components/swap-field/swap-field.d.ts +25 -0
  523. package/dist/types/features/swap/components/swap-field/swap-field.d.ts.map +1 -0
  524. package/dist/types/features/swap/components/swap-flip-button/index.d.ts +9 -0
  525. package/dist/types/features/swap/components/swap-flip-button/index.d.ts.map +1 -0
  526. package/dist/types/features/swap/components/swap-flip-button/swap-flip-button.d.ts +14 -0
  527. package/dist/types/features/swap/components/swap-flip-button/swap-flip-button.d.ts.map +1 -0
  528. package/dist/types/features/swap/components/swap-info/index.d.ts +9 -0
  529. package/dist/types/features/swap/components/swap-info/index.d.ts.map +1 -0
  530. package/dist/types/features/swap/components/swap-info/swap-info.d.ts +20 -0
  531. package/dist/types/features/swap/components/swap-info/swap-info.d.ts.map +1 -0
  532. package/dist/types/features/swap/components/swap-settings-modal/index.d.ts +10 -0
  533. package/dist/types/features/swap/components/swap-settings-modal/index.d.ts.map +1 -0
  534. package/dist/types/features/swap/components/swap-settings-modal/swap-settings-modal.d.ts +20 -0
  535. package/dist/types/features/swap/components/swap-settings-modal/swap-settings-modal.d.ts.map +1 -0
  536. package/dist/types/features/swap/components/swap-token-select-modal/index.d.ts +10 -0
  537. package/dist/types/features/swap/components/swap-token-select-modal/index.d.ts.map +1 -0
  538. package/dist/types/features/swap/components/swap-token-select-modal/swap-token-select-modal.d.ts +12 -0
  539. package/dist/types/features/swap/components/swap-token-select-modal/swap-token-select-modal.d.ts.map +1 -0
  540. package/dist/types/{components/circle-icon → features/swap/components/swap-widget}/index.d.ts +1 -1
  541. package/dist/types/features/swap/components/swap-widget/index.d.ts.map +1 -0
  542. package/dist/types/features/swap/components/swap-widget/swap-widget.d.ts +31 -0
  543. package/dist/types/features/swap/components/swap-widget/swap-widget.d.ts.map +1 -0
  544. package/dist/types/features/swap/components/swap-widget-provider/index.d.ts +9 -0
  545. package/dist/types/features/swap/components/swap-widget-provider/index.d.ts.map +1 -0
  546. package/dist/types/features/swap/components/swap-widget-provider/swap-widget-provider.d.ts +106 -0
  547. package/dist/types/features/swap/components/swap-widget-provider/swap-widget-provider.d.ts.map +1 -0
  548. package/dist/types/features/swap/components/swap-widget-provider/use-swap-balances.d.ts +23 -0
  549. package/dist/types/features/swap/components/swap-widget-provider/use-swap-balances.d.ts.map +1 -0
  550. package/dist/types/features/swap/components/swap-widget-provider/use-swap-token-state.d.ts +24 -0
  551. package/dist/types/features/swap/components/swap-widget-provider/use-swap-token-state.d.ts.map +1 -0
  552. package/dist/types/features/swap/components/swap-widget-provider/use-swap-validation.d.ts +23 -0
  553. package/dist/types/features/swap/components/swap-widget-provider/use-swap-validation.d.ts.map +1 -0
  554. package/dist/types/features/swap/components/swap-widget-ui/index.d.ts +9 -0
  555. package/dist/types/features/swap/components/swap-widget-ui/index.d.ts.map +1 -0
  556. package/dist/types/features/swap/components/swap-widget-ui/swap-widget-ui.d.ts +12 -0
  557. package/dist/types/features/swap/components/swap-widget-ui/swap-widget-ui.d.ts.map +1 -0
  558. package/dist/types/features/swap/components/token-selector/index.d.ts +9 -0
  559. package/dist/types/features/swap/components/token-selector/index.d.ts.map +1 -0
  560. package/dist/types/features/swap/components/token-selector/token-selector.d.ts +15 -0
  561. package/dist/types/features/swap/components/token-selector/token-selector.d.ts.map +1 -0
  562. package/dist/types/features/swap/hooks/use-build-swap-transaction.d.ts +3 -0
  563. package/dist/types/features/swap/hooks/use-build-swap-transaction.d.ts.map +1 -1
  564. package/dist/types/features/swap/hooks/use-swap-provider.d.ts +15 -0
  565. package/dist/types/features/swap/hooks/use-swap-provider.d.ts.map +1 -0
  566. package/dist/types/features/swap/hooks/use-swap-providers.d.ts +14 -0
  567. package/dist/types/features/swap/hooks/use-swap-providers.d.ts.map +1 -0
  568. package/dist/types/features/swap/hooks/use-swap-quote.d.ts +3 -0
  569. package/dist/types/features/swap/hooks/use-swap-quote.d.ts.map +1 -1
  570. package/dist/types/features/swap/index.d.ts +8 -0
  571. package/dist/types/features/swap/index.d.ts.map +1 -1
  572. package/dist/types/features/swap/utils/get-display-amount.d.ts +13 -0
  573. package/dist/types/features/swap/utils/get-display-amount.d.ts.map +1 -0
  574. package/dist/types/features/swap/utils/map-swap-error.d.ts +13 -0
  575. package/dist/types/features/swap/utils/map-swap-error.d.ts.map +1 -0
  576. package/dist/types/features/swap/utils/map-swap-widget-tokens.d.ts +10 -0
  577. package/dist/types/features/swap/utils/map-swap-widget-tokens.d.ts.map +1 -0
  578. package/dist/types/features/transaction/components/transaction/send.d.ts +3 -2
  579. package/dist/types/features/transaction/components/transaction/send.d.ts.map +1 -1
  580. package/dist/types/features/transaction/components/transaction-progress/transaction-progress-icons.d.ts.map +1 -1
  581. package/dist/types/features/transaction/hooks/use-transaction-status.d.ts.map +1 -1
  582. package/dist/types/hooks/use-debounce-callback.d.ts +17 -0
  583. package/dist/types/hooks/use-debounce-callback.d.ts.map +1 -0
  584. package/dist/types/hooks/use-debounce-value.d.ts +15 -0
  585. package/dist/types/hooks/use-debounce-value.d.ts.map +1 -0
  586. package/dist/types/hooks/use-unmount.d.ts +9 -0
  587. package/dist/types/hooks/use-unmount.d.ts.map +1 -0
  588. package/dist/types/index.d.ts +19 -7
  589. package/dist/types/index.d.ts.map +1 -1
  590. package/dist/types/libs/i18n.d.ts +70 -0
  591. package/dist/types/libs/i18n.d.ts.map +1 -1
  592. package/dist/types/locales/en.d.ts +70 -0
  593. package/dist/types/locales/en.d.ts.map +1 -1
  594. package/dist/types/types/appkit-ui-token.d.ts +25 -0
  595. package/dist/types/types/appkit-ui-token.d.ts.map +1 -0
  596. package/dist/types/utils/map-defi-error.d.ts +14 -0
  597. package/dist/types/utils/map-defi-error.d.ts.map +1 -0
  598. package/dist/types/utils/validate-amount.d.ts +18 -0
  599. package/dist/types/utils/validate-amount.d.ts.map +1 -0
  600. package/package.json +4 -4
  601. package/src/components/shared/amount-presets/amount-presets.tsx +50 -0
  602. package/src/components/shared/amount-presets/index.ts +10 -0
  603. package/src/components/shared/button-with-connect/button-with-connect.tsx +37 -0
  604. package/src/components/shared/button-with-connect/index.ts +9 -0
  605. package/src/components/shared/low-balance-modal/index.ts +10 -0
  606. package/src/components/shared/low-balance-modal/low-balance-modal.tsx +58 -0
  607. package/src/components/{button → shared/option-switcher}/index.ts +1 -1
  608. package/src/components/shared/option-switcher/option-switcher.tsx +55 -0
  609. package/src/components/{ton-icon → shared/settings-button}/index.ts +1 -1
  610. package/src/components/shared/settings-button/settings-button.tsx +33 -0
  611. package/src/components/shared/token-select-modal/index.ts +10 -0
  612. package/src/components/shared/token-select-modal/token-select-modal.tsx +103 -0
  613. package/src/components/ui/amount-reversed/amount-reversed.tsx +65 -0
  614. package/src/components/ui/amount-reversed/index.ts +10 -0
  615. package/src/components/ui/button/button.tsx +100 -0
  616. package/{dist/types/components/button/index.d.ts → src/components/ui/button/index.ts} +2 -1
  617. package/src/components/ui/centered-amount-input/centered-amount-input.tsx +118 -0
  618. package/src/components/ui/centered-amount-input/index.ts +10 -0
  619. package/src/components/ui/collapsible/collapsible.tsx +54 -0
  620. package/src/components/ui/collapsible/index.ts +10 -0
  621. package/src/components/ui/dialog/dialog.tsx +105 -0
  622. package/src/components/{circle-icon → ui/dialog}/index.ts +1 -1
  623. package/src/components/ui/dialog/use-dialog-context.ts +23 -0
  624. package/src/components/ui/icons/chevron-down-icon.tsx +26 -0
  625. package/src/components/ui/icons/chevrons-icon.tsx +39 -0
  626. package/src/components/ui/icons/close-icon.tsx +32 -0
  627. package/src/components/ui/icons/failed-icon.tsx +32 -0
  628. package/src/components/ui/icons/flip-icon.tsx +39 -0
  629. package/src/components/ui/icons/image-icon.tsx +32 -0
  630. package/src/components/ui/icons/index.ts +21 -0
  631. package/src/components/ui/icons/search-icon.tsx +29 -0
  632. package/src/components/ui/icons/sliders-icon.tsx +31 -0
  633. package/src/components/ui/icons/spinner-icon.tsx +30 -0
  634. package/src/components/ui/icons/success-icon.tsx +31 -0
  635. package/src/components/ui/icons/ton-icon.tsx +50 -0
  636. package/src/components/ui/icons/types.ts +22 -0
  637. package/src/components/ui/icons/verified-icon.tsx +30 -0
  638. package/src/components/ui/info-block/index.ts +9 -0
  639. package/src/components/ui/info-block/info-block.tsx +47 -0
  640. package/src/components/ui/input/index.ts +9 -0
  641. package/src/components/ui/input/input.tsx +194 -0
  642. package/src/components/ui/input/use-input-resize.ts +96 -0
  643. package/src/components/ui/logo/index.ts +9 -0
  644. package/src/components/ui/logo/logo.tsx +106 -0
  645. package/src/components/ui/logo/use-image-loading-status.ts +50 -0
  646. package/src/components/ui/modal/index.ts +9 -0
  647. package/src/components/ui/modal/modal.tsx +57 -0
  648. package/src/components/ui/select/index.ts +9 -0
  649. package/src/components/ui/select/select.tsx +274 -0
  650. package/src/components/ui/select/use-select-context.ts +28 -0
  651. package/src/components/ui/skeleton/index.ts +10 -0
  652. package/src/components/ui/skeleton/skeleton.tsx +33 -0
  653. package/src/components/ui/tabs/index.ts +10 -0
  654. package/src/components/ui/tabs/tabs.tsx +116 -0
  655. package/src/features/balances/components/balance-badge/balance-badge.tsx +3 -3
  656. package/src/features/balances/components/currency-item/currency-item.tsx +12 -15
  657. package/src/features/balances/components/send-jetton-button/send-jetton-button.tsx +1 -2
  658. package/src/features/balances/components/send-ton-button/send-ton-button.tsx +1 -2
  659. package/src/features/balances/hooks/use-balance-by-address.ts +6 -2
  660. package/src/features/balances/hooks/use-watch-balance-by-address.ts +1 -1
  661. package/src/features/jettons/hooks/use-jetton-balance-by-address.ts +6 -2
  662. package/src/features/jettons/hooks/use-jetton-info.ts +4 -2
  663. package/src/features/jettons/hooks/use-jetton-wallet-address.ts +6 -2
  664. package/src/features/jettons/hooks/use-jettons-by-address.ts +6 -2
  665. package/src/features/jettons/hooks/use-transfer-jetton.ts +1 -1
  666. package/src/features/jettons/hooks/use-watch-jettons-by-address.ts +1 -1
  667. package/src/features/network/hooks/use-block-number.ts +6 -2
  668. package/src/features/network/hooks/use-default-network.ts +1 -1
  669. package/src/features/network/hooks/use-networks.ts +1 -1
  670. package/src/features/nft/components/nft-item/nft-item.tsx +3 -13
  671. package/src/features/nft/hooks/use-nft.ts +4 -2
  672. package/src/features/nft/hooks/use-nfts-by-address.ts +4 -2
  673. package/src/features/nft/hooks/use-transfer-nft.ts +1 -1
  674. package/src/{hooks → features/settings/hooks}/use-app-kit.ts +1 -1
  675. package/src/{hooks → features/settings/hooks}/use-i18n.ts +1 -1
  676. package/src/features/settings/index.ts +11 -0
  677. package/src/features/signing/hooks/use-sign-binary.ts +1 -1
  678. package/src/features/signing/hooks/use-sign-cell.ts +1 -1
  679. package/src/features/signing/hooks/use-sign-text.ts +1 -1
  680. package/src/features/staking/components/select-unstake-mode/index.ts +10 -0
  681. package/src/features/staking/components/select-unstake-mode/select-unstake-mode.tsx +128 -0
  682. package/src/features/staking/components/staking-balance-block/index.ts +9 -0
  683. package/src/features/staking/components/staking-balance-block/staking-balance-block.tsx +90 -0
  684. package/src/features/staking/components/staking-info/index.ts +10 -0
  685. package/src/features/staking/components/staking-info/staking-info.tsx +95 -0
  686. package/src/features/staking/components/staking-info/utils.ts +15 -0
  687. package/src/features/staking/components/staking-settings-modal/index.ts +9 -0
  688. package/src/features/staking/components/staking-settings-modal/staking-settings-modal.tsx +76 -0
  689. package/src/features/staking/components/staking-widget/index.ts +9 -0
  690. package/src/features/staking/components/staking-widget/staking-widget.tsx +54 -0
  691. package/src/features/staking/components/staking-widget-provider/index.ts +9 -0
  692. package/src/features/staking/components/staking-widget-provider/staking-widget-provider.tsx +421 -0
  693. package/src/features/staking/components/staking-widget-provider/use-staking-validation.ts +79 -0
  694. package/src/features/staking/components/staking-widget-ui/index.ts +9 -0
  695. package/src/features/staking/components/staking-widget-ui/staking-widget-ui.tsx +199 -0
  696. package/src/features/staking/hooks/use-build-stake-transaction.ts +1 -1
  697. package/src/features/staking/hooks/use-staked-balance.ts +7 -2
  698. package/src/features/staking/hooks/use-staking-provider-info.ts +13 -2
  699. package/src/features/staking/hooks/use-staking-provider-metadata.ts +34 -0
  700. package/src/features/staking/hooks/use-staking-provider.ts +42 -0
  701. package/src/features/staking/hooks/use-staking-providers.ts +20 -20
  702. package/src/features/staking/hooks/use-staking-quote.ts +7 -2
  703. package/src/features/staking/index.ts +15 -5
  704. package/src/features/staking/utils/map-staking-error.ts +28 -0
  705. package/src/features/swap/components/swap-field/index.ts +9 -0
  706. package/src/features/swap/components/swap-field/swap-field.tsx +114 -0
  707. package/src/features/swap/components/swap-flip-button/index.ts +9 -0
  708. package/src/features/swap/components/swap-flip-button/swap-flip-button.tsx +29 -0
  709. package/src/features/swap/components/swap-info/index.ts +9 -0
  710. package/src/features/swap/components/swap-info/swap-info.tsx +48 -0
  711. package/src/features/swap/components/swap-settings-modal/index.ts +10 -0
  712. package/src/features/swap/components/swap-settings-modal/swap-settings-modal.tsx +92 -0
  713. package/src/features/swap/components/swap-token-select-modal/index.ts +10 -0
  714. package/src/features/swap/components/swap-token-select-modal/swap-token-select-modal.tsx +21 -0
  715. package/src/features/swap/components/swap-widget/index.ts +9 -0
  716. package/src/features/swap/components/swap-widget/swap-widget.tsx +70 -0
  717. package/src/features/swap/components/swap-widget-provider/index.ts +9 -0
  718. package/src/features/swap/components/swap-widget-provider/swap-widget-provider.tsx +379 -0
  719. package/src/features/swap/components/swap-widget-provider/use-swap-balances.ts +53 -0
  720. package/src/features/swap/components/swap-widget-provider/use-swap-token-state.ts +96 -0
  721. package/src/features/swap/components/swap-widget-provider/use-swap-validation.ts +51 -0
  722. package/src/features/swap/components/swap-widget-ui/index.ts +9 -0
  723. package/src/features/swap/components/swap-widget-ui/swap-widget-ui.tsx +168 -0
  724. package/src/features/swap/components/token-selector/index.ts +9 -0
  725. package/src/features/swap/components/token-selector/token-selector.tsx +35 -0
  726. package/src/features/swap/hooks/use-build-swap-transaction.ts +4 -1
  727. package/src/features/swap/hooks/use-swap-provider.ts +49 -0
  728. package/src/features/swap/hooks/use-swap-providers.ts +35 -0
  729. package/src/features/swap/hooks/use-swap-quote.ts +7 -2
  730. package/src/features/swap/index.ts +9 -0
  731. package/src/features/swap/utils/get-display-amount.ts +21 -0
  732. package/src/features/swap/utils/map-swap-error.ts +32 -0
  733. package/src/features/swap/utils/map-swap-widget-tokens.ts +34 -0
  734. package/src/features/transaction/components/transaction/send.tsx +6 -5
  735. package/src/features/transaction/components/transaction-progress/transaction-progress-icons.tsx +13 -57
  736. package/src/features/transaction/components/transaction-progress/transaction-progress.tsx +1 -1
  737. package/src/features/transaction/hooks/use-send-transaction.ts +1 -1
  738. package/src/features/transaction/hooks/use-transaction-status.ts +6 -2
  739. package/src/features/transaction/hooks/use-transfer-ton.ts +1 -1
  740. package/src/features/transaction/hooks/use-watch-transactions-by-address.ts +1 -1
  741. package/src/features/wallets/hooks/use-connect.ts +1 -1
  742. package/src/features/wallets/hooks/use-connected-wallets.ts +1 -1
  743. package/src/features/wallets/hooks/use-connector-by-id.ts +1 -1
  744. package/src/features/wallets/hooks/use-connectors.ts +1 -1
  745. package/src/features/wallets/hooks/use-disconnect.ts +1 -1
  746. package/src/features/wallets/hooks/use-selected-wallet.ts +1 -1
  747. package/src/hooks/use-debounce-callback.ts +69 -0
  748. package/src/hooks/use-debounce-value.ts +38 -0
  749. package/src/hooks/use-unmount.ts +16 -0
  750. package/src/index.ts +20 -7
  751. package/src/locales/en.ts +82 -0
  752. package/src/storybook/fixtures/tokens.ts +88 -0
  753. package/src/types/appkit-ui-token.ts +26 -0
  754. package/src/utils/map-defi-error.ts +35 -0
  755. package/src/utils/validate-amount.ts +28 -0
  756. package/dist/esm/components/block/block.js.map +0 -1
  757. package/dist/esm/components/block/index.js.map +0 -1
  758. package/dist/esm/components/button/button.js +0 -7
  759. package/dist/esm/components/button/button.js.map +0 -1
  760. package/dist/esm/components/button/button.module.css +0 -38
  761. package/dist/esm/components/button/index.js.map +0 -1
  762. package/dist/esm/components/circle-icon/circle-icon.js +0 -8
  763. package/dist/esm/components/circle-icon/circle-icon.js.map +0 -1
  764. package/dist/esm/components/circle-icon/index.js.map +0 -1
  765. package/dist/esm/components/ton-icon/index.js.map +0 -1
  766. package/dist/esm/components/ton-icon/ton-icon.js +0 -8
  767. package/dist/esm/components/ton-icon/ton-icon.js.map +0 -1
  768. package/dist/esm/hooks/use-app-kit-theme.js.map +0 -1
  769. package/dist/esm/hooks/use-app-kit.js.map +0 -1
  770. package/dist/esm/hooks/use-i18n.js.map +0 -1
  771. package/dist/types/components/block/block.d.ts.map +0 -1
  772. package/dist/types/components/block/index.d.ts.map +0 -1
  773. package/dist/types/components/button/button.d.ts.map +0 -1
  774. package/dist/types/components/button/index.d.ts.map +0 -1
  775. package/dist/types/components/circle-icon/circle-icon.d.ts +0 -16
  776. package/dist/types/components/circle-icon/circle-icon.d.ts.map +0 -1
  777. package/dist/types/components/circle-icon/index.d.ts.map +0 -1
  778. package/dist/types/components/ton-icon/index.d.ts.map +0 -1
  779. package/dist/types/components/ton-icon/ton-icon.d.ts +0 -14
  780. package/dist/types/components/ton-icon/ton-icon.d.ts.map +0 -1
  781. package/dist/types/hooks/use-app-kit-theme.d.ts.map +0 -1
  782. package/dist/types/hooks/use-app-kit.d.ts.map +0 -1
  783. package/dist/types/hooks/use-i18n.d.ts.map +0 -1
  784. package/src/components/button/button.tsx +0 -16
  785. package/src/components/circle-icon/circle-icon.tsx +0 -34
  786. package/src/components/ton-icon/ton-icon.tsx +0 -46
  787. /package/dist/esm/components/{block → ui/block}/block.js +0 -0
  788. /package/dist/esm/components/{block → ui/block}/index.js +0 -0
  789. /package/dist/esm/components/{button → ui/button}/index.js +0 -0
  790. /package/dist/esm/{hooks → features/settings/hooks}/use-app-kit-theme.js +0 -0
  791. /package/dist/types/components/{block → ui/block}/block.d.ts +0 -0
  792. /package/dist/types/components/{block → ui/block}/index.d.ts +0 -0
  793. /package/dist/types/{hooks → features/settings/hooks}/use-app-kit-theme.d.ts +0 -0
  794. /package/dist/types/{hooks → features/settings/hooks}/use-app-kit.d.ts +0 -0
  795. /package/src/components/{block → ui/block}/block.tsx +0 -0
  796. /package/src/components/{block → ui/block}/index.ts +0 -0
  797. /package/src/{hooks → features/settings/hooks}/use-app-kit-theme.ts +0 -0
@@ -0,0 +1,54 @@
1
+ /**
2
+ * Copyright (c) TonTech.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ */
8
+
9
+ import { useRef, useLayoutEffect, useState } from 'react';
10
+ import type { FC, ComponentProps } from 'react';
11
+
12
+ import styles from './collapsible.module.css';
13
+
14
+ export interface CollapsibleProps extends ComponentProps<'div'> {
15
+ open: boolean;
16
+ }
17
+
18
+ export const Collapsible: FC<CollapsibleProps> = ({ open, children, ...props }) => {
19
+ const contentRef = useRef<HTMLDivElement>(null);
20
+ const [height, setHeight] = useState<number | undefined>(open ? undefined : 0);
21
+
22
+ useLayoutEffect(() => {
23
+ const el = contentRef.current;
24
+ if (!el) return undefined;
25
+
26
+ if (open) {
27
+ setHeight(el.scrollHeight);
28
+
29
+ const onEnd = () => setHeight(undefined);
30
+ el.addEventListener('transitionend', onEnd, { once: true });
31
+ return () => el.removeEventListener('transitionend', onEnd);
32
+ }
33
+
34
+ setHeight(el.scrollHeight);
35
+ const id = requestAnimationFrame(() => {
36
+ requestAnimationFrame(() => {
37
+ setHeight(0);
38
+ });
39
+ });
40
+ return () => cancelAnimationFrame(id);
41
+ }, [open]);
42
+
43
+ return (
44
+ <div
45
+ ref={contentRef}
46
+ className={styles.collapsible}
47
+ style={{ height: height !== undefined ? `${height}px` : undefined }}
48
+ aria-hidden={!open}
49
+ {...props}
50
+ >
51
+ {children}
52
+ </div>
53
+ );
54
+ };
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Copyright (c) TonTech.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ */
8
+
9
+ export { Collapsible } from './collapsible';
10
+ export type { CollapsibleProps } from './collapsible';
@@ -0,0 +1,105 @@
1
+ /**
2
+ * Copyright (c) TonTech.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ */
8
+
9
+ import { forwardRef, useCallback, useEffect, useId } from 'react';
10
+ import { createPortal } from 'react-dom';
11
+ import type { ComponentPropsWithoutRef, ComponentRef, FC, ReactNode } from 'react';
12
+
13
+ import { DialogContext, useDialogContext } from './use-dialog-context';
14
+
15
+ interface DialogRootProps {
16
+ children: ReactNode;
17
+ open?: boolean;
18
+ onOpenChange?: (open: boolean) => void;
19
+ }
20
+
21
+ const DialogRoot: FC<DialogRootProps> = ({ children, open = false, onOpenChange }) => {
22
+ const titleId = useId();
23
+ const handleOpenChange = useCallback((value: boolean) => onOpenChange?.(value), [onOpenChange]);
24
+
25
+ return (
26
+ <DialogContext.Provider value={{ open, onOpenChange: handleOpenChange, titleId }}>
27
+ {children}
28
+ </DialogContext.Provider>
29
+ );
30
+ };
31
+
32
+ interface DialogPortalProps {
33
+ children: ReactNode;
34
+ container?: Element | null;
35
+ }
36
+
37
+ const DialogPortal: FC<DialogPortalProps> = ({ children, container }) => {
38
+ const { open } = useDialogContext();
39
+ if (!open || typeof document === 'undefined') return null;
40
+ return createPortal(children, container ?? document.body);
41
+ };
42
+
43
+ const DialogOverlay = forwardRef<ComponentRef<'div'>, ComponentPropsWithoutRef<'div'>>((props, ref) => {
44
+ useEffect(() => {
45
+ document.body.style.overflow = 'hidden';
46
+ return () => {
47
+ document.body.style.overflow = '';
48
+ };
49
+ }, []);
50
+
51
+ return <div {...props} ref={ref} />;
52
+ });
53
+
54
+ DialogOverlay.displayName = 'DialogOverlay';
55
+
56
+ const DialogContent = forwardRef<ComponentRef<'div'>, ComponentPropsWithoutRef<'div'>>((props, ref) => {
57
+ const { onOpenChange, titleId } = useDialogContext();
58
+
59
+ useEffect(() => {
60
+ const handleKeyDown = (e: KeyboardEvent) => {
61
+ if (e.key === 'Escape') onOpenChange(false);
62
+ };
63
+ document.addEventListener('keydown', handleKeyDown);
64
+ return () => document.removeEventListener('keydown', handleKeyDown);
65
+ }, [onOpenChange]);
66
+
67
+ return <div role="dialog" aria-modal="true" aria-labelledby={titleId} {...props} ref={ref} />;
68
+ });
69
+
70
+ DialogContent.displayName = 'DialogContent';
71
+
72
+ const DialogTitle = forwardRef<ComponentRef<'h2'>, ComponentPropsWithoutRef<'h2'>>((props, ref) => {
73
+ const { titleId } = useDialogContext();
74
+ return <h2 id={titleId} {...props} ref={ref} />;
75
+ });
76
+
77
+ DialogTitle.displayName = 'DialogTitle';
78
+
79
+ const DialogClose = forwardRef<ComponentRef<'button'>, ComponentPropsWithoutRef<'button'>>(
80
+ ({ onClick, ...props }, ref) => {
81
+ const { onOpenChange } = useDialogContext();
82
+ return (
83
+ <button
84
+ type="button"
85
+ {...props}
86
+ ref={ref}
87
+ onClick={(e) => {
88
+ onClick?.(e);
89
+ onOpenChange(false);
90
+ }}
91
+ />
92
+ );
93
+ },
94
+ );
95
+
96
+ DialogClose.displayName = 'DialogClose';
97
+
98
+ export const Dialog = {
99
+ Root: DialogRoot,
100
+ Portal: DialogPortal,
101
+ Overlay: DialogOverlay,
102
+ Content: DialogContent,
103
+ Title: DialogTitle,
104
+ Close: DialogClose,
105
+ };
@@ -6,4 +6,4 @@
6
6
  *
7
7
  */
8
8
 
9
- export * from './circle-icon';
9
+ export * from './dialog';
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Copyright (c) TonTech.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ */
8
+
9
+ import { createContext, useContext } from 'react';
10
+
11
+ export interface DialogContextValue {
12
+ open: boolean;
13
+ onOpenChange: (open: boolean) => void;
14
+ titleId: string;
15
+ }
16
+
17
+ export const DialogContext = createContext<DialogContextValue | null>(null);
18
+
19
+ export const useDialogContext = (): DialogContextValue => {
20
+ const ctx = useContext(DialogContext);
21
+ if (!ctx) throw new Error('Dialog compound components must be used within Dialog.Root');
22
+ return ctx;
23
+ };
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Copyright (c) TonTech.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ */
8
+
9
+ import type { FC } from 'react';
10
+
11
+ import { DEFAULT_ICON_SIZE } from './types';
12
+ import type { IconProps } from './types';
13
+
14
+ export const ChevronDownIcon: FC<IconProps> = ({ size = DEFAULT_ICON_SIZE, ...props }) => (
15
+ <svg
16
+ width={size}
17
+ height={size}
18
+ viewBox="0 0 16 16"
19
+ fill="none"
20
+ xmlns="http://www.w3.org/2000/svg"
21
+ aria-hidden="true"
22
+ {...props}
23
+ >
24
+ <path d="M4 6L8 10L12 6" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
25
+ </svg>
26
+ );
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Copyright (c) TonTech.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ */
8
+
9
+ import type { FC } from 'react';
10
+
11
+ import { DEFAULT_ICON_SIZE } from './types';
12
+ import type { IconProps } from './types';
13
+
14
+ export const ChevronsIcon: FC<IconProps> = ({ size = DEFAULT_ICON_SIZE, ...props }) => (
15
+ <svg
16
+ width={size}
17
+ height={size}
18
+ viewBox="0 0 20 20"
19
+ fill="none"
20
+ xmlns="http://www.w3.org/2000/svg"
21
+ aria-hidden="true"
22
+ {...props}
23
+ >
24
+ <path
25
+ d="M6 13L9.29289 16.2929C9.68342 16.6834 10.3166 16.6834 10.7071 16.2929L14 13"
26
+ stroke="currentColor"
27
+ strokeWidth="1.8"
28
+ strokeLinecap="round"
29
+ strokeLinejoin="round"
30
+ />
31
+ <path
32
+ d="M14 6.58578L10.7071 3.29289C10.3166 2.90237 9.68342 2.90237 9.29289 3.29289L6 6.58578"
33
+ stroke="currentColor"
34
+ strokeWidth="1.8"
35
+ strokeLinecap="round"
36
+ strokeLinejoin="round"
37
+ />
38
+ </svg>
39
+ );
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Copyright (c) TonTech.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ */
8
+
9
+ import type { FC } from 'react';
10
+
11
+ import { DEFAULT_ICON_SIZE } from './types';
12
+ import type { IconProps } from './types';
13
+
14
+ export const CloseIcon: FC<IconProps> = ({ size = DEFAULT_ICON_SIZE, ...props }) => (
15
+ <svg
16
+ width={size}
17
+ height={size}
18
+ viewBox="0 0 12 12"
19
+ fill="none"
20
+ xmlns="http://www.w3.org/2000/svg"
21
+ aria-hidden="true"
22
+ {...props}
23
+ >
24
+ <path
25
+ d="M1 1L11 11M1 11L11 1"
26
+ stroke="currentColor"
27
+ strokeWidth="2"
28
+ strokeLinecap="round"
29
+ strokeLinejoin="round"
30
+ />
31
+ </svg>
32
+ );
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Copyright (c) TonTech.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ */
8
+
9
+ import type { FC } from 'react';
10
+
11
+ import { DEFAULT_ICON_SIZE } from './types';
12
+ import type { IconProps } from './types';
13
+
14
+ export const FailedIcon: FC<IconProps> = ({ size = DEFAULT_ICON_SIZE, ...props }) => (
15
+ <svg
16
+ width={size}
17
+ height={size}
18
+ viewBox="0 0 24 24"
19
+ fill="none"
20
+ stroke="currentColor"
21
+ strokeWidth="2"
22
+ strokeLinecap="round"
23
+ strokeLinejoin="round"
24
+ xmlns="http://www.w3.org/2000/svg"
25
+ aria-hidden="true"
26
+ {...props}
27
+ >
28
+ <circle cx="12" cy="12" r="10" />
29
+ <line x1="15" y1="9" x2="9" y2="15" />
30
+ <line x1="9" y1="9" x2="15" y2="15" />
31
+ </svg>
32
+ );
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Copyright (c) TonTech.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ */
8
+
9
+ import type { FC } from 'react';
10
+
11
+ import { DEFAULT_ICON_SIZE } from './types';
12
+ import type { IconProps } from './types';
13
+
14
+ export const FlipIcon: FC<IconProps> = ({ size = DEFAULT_ICON_SIZE, ...props }) => (
15
+ <svg
16
+ width={size}
17
+ height={size}
18
+ viewBox="0 0 24 24"
19
+ fill="none"
20
+ xmlns="http://www.w3.org/2000/svg"
21
+ aria-hidden="true"
22
+ {...props}
23
+ >
24
+ <path
25
+ d="M7 19V4M7 4L3.5 7.5M7 4L10.5 7.5"
26
+ stroke="currentColor"
27
+ strokeWidth="2"
28
+ strokeLinecap="round"
29
+ strokeLinejoin="round"
30
+ />
31
+ <path
32
+ d="M17 5V20M17 20L13.5 16.5M17 20L20.5 16.5"
33
+ stroke="currentColor"
34
+ strokeWidth="2"
35
+ strokeLinecap="round"
36
+ strokeLinejoin="round"
37
+ />
38
+ </svg>
39
+ );
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Copyright (c) TonTech.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ */
8
+
9
+ import type { FC } from 'react';
10
+
11
+ import { DEFAULT_ICON_SIZE } from './types';
12
+ import type { IconProps } from './types';
13
+
14
+ export const ImageIcon: FC<IconProps> = ({ size = DEFAULT_ICON_SIZE, ...props }) => (
15
+ <svg
16
+ width={size}
17
+ height={size}
18
+ viewBox="0 0 24 24"
19
+ fill="none"
20
+ stroke="currentColor"
21
+ xmlns="http://www.w3.org/2000/svg"
22
+ aria-hidden="true"
23
+ {...props}
24
+ >
25
+ <path
26
+ strokeLinecap="round"
27
+ strokeLinejoin="round"
28
+ strokeWidth={2}
29
+ d="M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"
30
+ />
31
+ </svg>
32
+ );
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Copyright (c) TonTech.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ */
8
+
9
+ export * from './types';
10
+ export * from './chevrons-icon';
11
+ export * from './chevron-down-icon';
12
+ export * from './close-icon';
13
+ export * from './failed-icon';
14
+ export * from './flip-icon';
15
+ export * from './image-icon';
16
+ export * from './search-icon';
17
+ export * from './sliders-icon';
18
+ export * from './spinner-icon';
19
+ export * from './success-icon';
20
+ export * from './ton-icon';
21
+ export * from './verified-icon';
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Copyright (c) TonTech.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ */
8
+
9
+ import type { FC } from 'react';
10
+
11
+ import { DEFAULT_ICON_SIZE } from './types';
12
+ import type { IconProps } from './types';
13
+
14
+ export const SearchIcon: FC<IconProps> = ({ size = DEFAULT_ICON_SIZE, ...props }) => (
15
+ <svg
16
+ width={size}
17
+ height={size}
18
+ viewBox="0 0 24 24"
19
+ fill="none"
20
+ xmlns="http://www.w3.org/2000/svg"
21
+ aria-hidden="true"
22
+ {...props}
23
+ >
24
+ <path
25
+ d="M3.21973 10.4735C3.21973 9.47253 3.40778 8.53529 3.78389 7.66175C4.16 6.78214 4.6817 6.00868 5.34899 5.34139C6.01628 4.6741 6.7867 4.1524 7.66024 3.77629C8.53986 3.40018 9.48013 3.21213 10.4811 3.21213C11.482 3.21213 12.4192 3.40018 13.2928 3.77629C14.1724 4.1524 14.9459 4.6741 15.6131 5.34139C16.2804 6.00868 16.8021 6.78214 17.1782 7.66175C17.5544 8.53529 17.7424 9.47253 17.7424 10.4735C17.7424 11.3045 17.6089 12.0932 17.342 12.8393C17.0812 13.5855 16.7172 14.2619 16.2501 14.8685L20.6997 19.3454C20.7968 19.4425 20.8696 19.5547 20.9181 19.6821C20.9727 19.8095 21 19.946 21 20.0916C21 20.2917 20.9545 20.4737 20.8635 20.6375C20.7786 20.8013 20.6573 20.9287 20.4995 21.0197C20.3418 21.1168 20.1598 21.1653 19.9536 21.1653C19.808 21.1653 19.6685 21.138 19.535 21.0834C19.4076 21.0349 19.2893 20.959 19.1801 20.8559L14.7032 16.3699C14.1087 16.7945 13.4535 17.1282 12.7377 17.3708C12.0219 17.6135 11.2697 17.7348 10.4811 17.7348C9.48013 17.7348 8.53986 17.5468 7.66024 17.1706C6.7867 16.7945 6.01628 16.2728 5.34899 15.6055C4.6817 14.9383 4.16 14.1678 3.78389 13.2943C3.40778 12.4147 3.21973 11.4744 3.21973 10.4735ZM4.77573 10.4735C4.77573 11.2621 4.92132 12.0022 5.2125 12.6937C5.50975 13.3792 5.91922 13.9828 6.44092 14.5045C6.96869 15.0262 7.57532 15.4357 8.26081 15.7329C8.95236 16.0302 9.69245 16.1788 10.4811 16.1788C11.2697 16.1788 12.0067 16.0302 12.6922 15.7329C13.3838 15.4357 13.9904 15.0262 14.5121 14.5045C15.0338 13.9828 15.4433 13.3792 15.7405 12.6937C16.0378 12.0022 16.1864 11.2621 16.1864 10.4735C16.1864 9.68485 16.0378 8.9478 15.7405 8.26231C15.4433 7.57075 15.0338 6.96412 14.5121 6.44242C13.9904 5.91466 13.3838 5.50518 12.6922 5.214C12.0067 4.91675 11.2697 4.76813 10.4811 4.76813C9.69245 4.76813 8.95236 4.91675 8.26081 5.214C7.57532 5.50518 6.96869 5.91466 6.44092 6.44242C5.91922 6.96412 5.50975 7.57075 5.2125 8.26231C4.92132 8.9478 4.77573 9.68485 4.77573 10.4735Z"
26
+ fill="currentColor"
27
+ />
28
+ </svg>
29
+ );
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Copyright (c) TonTech.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ */
8
+
9
+ import type { FC } from 'react';
10
+
11
+ import { DEFAULT_ICON_SIZE } from './types';
12
+ import type { IconProps } from './types';
13
+
14
+ export const SlidersIcon: FC<IconProps> = ({ size = DEFAULT_ICON_SIZE, ...props }) => (
15
+ <svg
16
+ width={size}
17
+ height={size}
18
+ viewBox="0 0 24 24"
19
+ fill="none"
20
+ xmlns="http://www.w3.org/2000/svg"
21
+ aria-hidden="true"
22
+ {...props}
23
+ >
24
+ <path d="M4 7H8" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" />
25
+ <path d="M12 7H20" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" />
26
+ <path d="M8 10V4" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" />
27
+ <path d="M4 17H12" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" />
28
+ <path d="M17 17H20" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" />
29
+ <path d="M16 20V14" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" />
30
+ </svg>
31
+ );
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Copyright (c) TonTech.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ */
8
+
9
+ import type { FC } from 'react';
10
+
11
+ import { DEFAULT_ICON_SIZE } from './types';
12
+ import type { IconProps } from './types';
13
+
14
+ export const SpinnerIcon: FC<IconProps> = ({ size = DEFAULT_ICON_SIZE, ...props }) => (
15
+ <svg
16
+ width={size}
17
+ height={size}
18
+ viewBox="0 0 24 24"
19
+ fill="none"
20
+ stroke="currentColor"
21
+ strokeWidth="2"
22
+ strokeLinecap="round"
23
+ strokeLinejoin="round"
24
+ xmlns="http://www.w3.org/2000/svg"
25
+ aria-hidden="true"
26
+ {...props}
27
+ >
28
+ <path d="M21 12a9 9 0 1 1-6.219-8.56" />
29
+ </svg>
30
+ );
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Copyright (c) TonTech.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ */
8
+
9
+ import type { FC } from 'react';
10
+
11
+ import { DEFAULT_ICON_SIZE } from './types';
12
+ import type { IconProps } from './types';
13
+
14
+ export const SuccessIcon: FC<IconProps> = ({ size = DEFAULT_ICON_SIZE, ...props }) => (
15
+ <svg
16
+ width={size}
17
+ height={size}
18
+ viewBox="0 0 24 24"
19
+ fill="none"
20
+ stroke="currentColor"
21
+ strokeWidth="2"
22
+ strokeLinecap="round"
23
+ strokeLinejoin="round"
24
+ xmlns="http://www.w3.org/2000/svg"
25
+ aria-hidden="true"
26
+ {...props}
27
+ >
28
+ <path d="M22 11.08V12a10 10 0 1 1-5.93-9.14" />
29
+ <polyline points="22 4 12 14.01 9 11.01" />
30
+ </svg>
31
+ );
@@ -0,0 +1,50 @@
1
+ /**
2
+ * Copyright (c) TonTech.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ */
8
+
9
+ import type { FC } from 'react';
10
+
11
+ import { DEFAULT_ICON_SIZE } from './types';
12
+ import type { IconProps } from './types';
13
+
14
+ export const TonIcon: FC<IconProps> = ({ size = DEFAULT_ICON_SIZE, ...props }) => (
15
+ <svg
16
+ width={size}
17
+ height={size}
18
+ viewBox="0 0 29 29"
19
+ fill="none"
20
+ xmlns="http://www.w3.org/2000/svg"
21
+ aria-hidden="true"
22
+ {...props}
23
+ >
24
+ <path
25
+ d="M23.7861 0H4.58614C1.08614 0 -1.11386 3.8 0.586136 6.9L12.3861 27.4C13.1861 28.7 15.0861 28.7 15.8861 27.4L27.6861 6.9C29.4861 3.8 27.2861 0 23.7861 0ZM12.4861 21.2L9.88614 16.2L3.68614 5.1C3.28614 4.4 3.78614 3.5 4.68614 3.5H12.4861V21.2ZM24.6861 5.1L18.4861 16.2L15.8861 21.2V3.5H23.6861C24.5861 3.5 25.0861 4.4 24.6861 5.1Z"
26
+ fill="currentColor"
27
+ />
28
+ </svg>
29
+ );
30
+
31
+ export const TonIconCircle: FC<IconProps> = ({ size = DEFAULT_ICON_SIZE, ...props }) => (
32
+ <svg
33
+ width={size}
34
+ height={size}
35
+ viewBox="0 0 56 56"
36
+ fill="none"
37
+ xmlns="http://www.w3.org/2000/svg"
38
+ aria-hidden="true"
39
+ {...props}
40
+ >
41
+ <path
42
+ d="M28 56C43.5 56 56 43.5 56 28C56 12.5 43.5 0 28 0C12.5 0 0 12.5 0 28C0 43.5 12.5 56 28 56Z"
43
+ fill="var(--ta-color-ton)"
44
+ />
45
+ <path
46
+ d="M37.5996 15.6H18.3996C14.8996 15.6 12.6996 19.4 14.3996 22.5L26.1996 43C26.9996 44.3 28.8996 44.3 29.6996 43L41.4996 22.5C43.2996 19.4 41.0996 15.6 37.5996 15.6ZM26.2996 36.8L23.6996 31.8L17.4996 20.7C17.0996 20 17.5996 19.1 18.4996 19.1H26.2996V36.8ZM38.4996 20.7L32.2996 31.8L29.6996 36.8V19.1H37.4996C38.3996 19.1 38.8996 20 38.4996 20.7Z"
47
+ fill="var(--ta-color-white)"
48
+ />
49
+ </svg>
50
+ );
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Copyright (c) TonTech.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ */
8
+
9
+ import type { ComponentProps } from 'react';
10
+
11
+ /**
12
+ * Standard props for all icon components.
13
+ *
14
+ * Icons render an `<svg>` whose dimensions are controlled by `size`. Color is
15
+ * inherited from `currentColor`, so style icons by setting `color` on a parent.
16
+ */
17
+ export interface IconProps extends Omit<ComponentProps<'svg'>, 'width' | 'height'> {
18
+ size?: number;
19
+ }
20
+
21
+ /** Default size in pixels for all icons. Override via the `size` prop. */
22
+ export const DEFAULT_ICON_SIZE = 24;
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Copyright (c) TonTech.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ */
8
+
9
+ import type { FC } from 'react';
10
+
11
+ import { DEFAULT_ICON_SIZE } from './types';
12
+ import type { IconProps } from './types';
13
+
14
+ export const VerifiedIcon: FC<IconProps> = ({ size = DEFAULT_ICON_SIZE, ...props }) => (
15
+ <svg
16
+ width={size}
17
+ height={size}
18
+ viewBox="0 0 20 20"
19
+ fill="currentColor"
20
+ xmlns="http://www.w3.org/2000/svg"
21
+ aria-hidden="true"
22
+ {...props}
23
+ >
24
+ <path
25
+ fillRule="evenodd"
26
+ d="M6.267 3.455a3.066 3.066 0 001.745-.723 3.066 3.066 0 013.976 0 3.066 3.066 0 001.745.723 3.066 3.066 0 012.812 2.812c.051.643.304 1.254.723 1.745a3.066 3.066 0 010 3.976 3.066 3.066 0 00-.723 1.745 3.066 3.066 0 01-2.812 2.812 3.066 3.066 0 00-1.745.723 3.066 3.066 0 01-3.976 0 3.066 3.066 0 00-1.745-.723 3.066 3.066 0 01-2.812-2.812 3.066 3.066 0 00-.723-1.745 3.066 3.066 0 010-3.976 3.066 3.066 0 00.723-1.745 3.066 3.066 0 012.812-2.812zm7.44 5.252a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z"
27
+ clipRule="evenodd"
28
+ />
29
+ </svg>
30
+ );
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Copyright (c) TonTech.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ */
8
+
9
+ export * from './info-block';