@varity-labs/ui-kit 2.0.0-beta.7 → 2.0.0-beta.8

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 (242) hide show
  1. package/README.md +1 -1
  2. package/dist/components/PaymentWidget/PaymentWidget.d.ts +7 -19
  3. package/dist/components/PaymentWidget/PaymentWidget.d.ts.map +1 -1
  4. package/dist/components/PaymentWidget/PaymentWidget.js +10 -176
  5. package/dist/components/PaymentWidget/PaymentWidget.js.map +1 -1
  6. package/dist/components/PaymentWidget/useSeamlessPayment.d.ts +8 -34
  7. package/dist/components/PaymentWidget/useSeamlessPayment.d.ts.map +1 -1
  8. package/dist/components/PaymentWidget/useSeamlessPayment.js +12 -158
  9. package/dist/components/PaymentWidget/useSeamlessPayment.js.map +1 -1
  10. package/dist/components/PaymentWidget/useVarityPayment.d.ts +5 -6
  11. package/dist/components/PaymentWidget/useVarityPayment.d.ts.map +1 -1
  12. package/dist/components/PaymentWidget/useVarityPayment.js +11 -147
  13. package/dist/components/PaymentWidget/useVarityPayment.js.map +1 -1
  14. package/dist/providers/PrivyStack.d.ts +14 -9
  15. package/dist/providers/PrivyStack.d.ts.map +1 -1
  16. package/dist/providers/PrivyStack.js +2 -4
  17. package/dist/providers/PrivyStack.js.map +1 -1
  18. package/dist/providers/VarityDashboardProvider.d.ts +2 -2
  19. package/dist/providers/VarityDashboardProvider.d.ts.map +1 -1
  20. package/dist/providers/VarityDashboardProvider.js +3 -26
  21. package/dist/providers/VarityDashboardProvider.js.map +1 -1
  22. package/dist/providers/WalletSyncProvider.d.ts +3 -7
  23. package/dist/providers/WalletSyncProvider.d.ts.map +1 -1
  24. package/dist/providers/WalletSyncProvider.js +6 -14
  25. package/dist/providers/WalletSyncProvider.js.map +1 -1
  26. package/package.json +20 -20
  27. package/dist/components/Analytics/__tests__/DataTable.test.d.ts +0 -2
  28. package/dist/components/Analytics/__tests__/DataTable.test.d.ts.map +0 -1
  29. package/dist/components/Analytics/__tests__/DataTable.test.js +0 -113
  30. package/dist/components/Analytics/__tests__/DataTable.test.js.map +0 -1
  31. package/dist/components/Dashboard/__tests__/EmptyState.test.d.ts +0 -2
  32. package/dist/components/Dashboard/__tests__/EmptyState.test.d.ts.map +0 -1
  33. package/dist/components/Dashboard/__tests__/EmptyState.test.js +0 -81
  34. package/dist/components/Dashboard/__tests__/EmptyState.test.js.map +0 -1
  35. package/dist/components/Dashboard/__tests__/KPICard.test.d.ts +0 -2
  36. package/dist/components/Dashboard/__tests__/KPICard.test.d.ts.map +0 -1
  37. package/dist/components/Dashboard/__tests__/KPICard.test.js +0 -78
  38. package/dist/components/Dashboard/__tests__/KPICard.test.js.map +0 -1
  39. package/dist/components/InAppWallet/EmailLoginButton.d.ts +0 -27
  40. package/dist/components/InAppWallet/EmailLoginButton.d.ts.map +0 -1
  41. package/dist/components/InAppWallet/EmailLoginButton.js +0 -84
  42. package/dist/components/InAppWallet/EmailLoginButton.js.map +0 -1
  43. package/dist/components/InAppWallet/InAppWalletProvider.d.ts +0 -54
  44. package/dist/components/InAppWallet/InAppWalletProvider.d.ts.map +0 -1
  45. package/dist/components/InAppWallet/InAppWalletProvider.js +0 -225
  46. package/dist/components/InAppWallet/InAppWalletProvider.js.map +0 -1
  47. package/dist/components/InAppWallet/OnboardingFlow.d.ts +0 -25
  48. package/dist/components/InAppWallet/OnboardingFlow.d.ts.map +0 -1
  49. package/dist/components/InAppWallet/OnboardingFlow.js +0 -159
  50. package/dist/components/InAppWallet/OnboardingFlow.js.map +0 -1
  51. package/dist/components/InAppWallet/SocialLoginButtons.d.ts +0 -28
  52. package/dist/components/InAppWallet/SocialLoginButtons.d.ts.map +0 -1
  53. package/dist/components/InAppWallet/SocialLoginButtons.js +0 -128
  54. package/dist/components/InAppWallet/SocialLoginButtons.js.map +0 -1
  55. package/dist/components/InAppWallet/index.d.ts +0 -15
  56. package/dist/components/InAppWallet/index.d.ts.map +0 -1
  57. package/dist/components/InAppWallet/index.js +0 -14
  58. package/dist/components/InAppWallet/index.js.map +0 -1
  59. package/dist/components/Payments/CheckoutModal.d.ts +0 -19
  60. package/dist/components/Payments/CheckoutModal.d.ts.map +0 -1
  61. package/dist/components/Payments/CheckoutModal.js +0 -194
  62. package/dist/components/Payments/CheckoutModal.js.map +0 -1
  63. package/dist/components/Payments/SubscriptionWidget.d.ts +0 -17
  64. package/dist/components/Payments/SubscriptionWidget.d.ts.map +0 -1
  65. package/dist/components/Payments/SubscriptionWidget.js +0 -89
  66. package/dist/components/Payments/SubscriptionWidget.js.map +0 -1
  67. package/dist/components/Payments/constants.d.ts +0 -59
  68. package/dist/components/Payments/constants.d.ts.map +0 -1
  69. package/dist/components/Payments/constants.js +0 -145
  70. package/dist/components/Payments/constants.js.map +0 -1
  71. package/dist/components/Payments/index.d.ts +0 -10
  72. package/dist/components/Payments/index.d.ts.map +0 -1
  73. package/dist/components/Payments/index.js +0 -12
  74. package/dist/components/Payments/index.js.map +0 -1
  75. package/dist/components/Payments/types.d.ts +0 -119
  76. package/dist/components/Payments/types.d.ts.map +0 -1
  77. package/dist/components/Payments/types.js +0 -27
  78. package/dist/components/Payments/types.js.map +0 -1
  79. package/dist/components/Payments/usePayments.d.ts +0 -33
  80. package/dist/components/Payments/usePayments.d.ts.map +0 -1
  81. package/dist/components/Payments/usePayments.js +0 -249
  82. package/dist/components/Payments/usePayments.js.map +0 -1
  83. package/dist/components/Privy/__tests__/InitScreens.test.d.ts +0 -2
  84. package/dist/components/Privy/__tests__/InitScreens.test.d.ts.map +0 -1
  85. package/dist/components/Privy/__tests__/InitScreens.test.js +0 -74
  86. package/dist/components/Privy/__tests__/InitScreens.test.js.map +0 -1
  87. package/dist/components/SIWE/AuthStatus.d.ts +0 -15
  88. package/dist/components/SIWE/AuthStatus.d.ts.map +0 -1
  89. package/dist/components/SIWE/AuthStatus.js +0 -47
  90. package/dist/components/SIWE/AuthStatus.js.map +0 -1
  91. package/dist/components/SIWE/ProtectedRoute.d.ts +0 -17
  92. package/dist/components/SIWE/ProtectedRoute.d.ts.map +0 -1
  93. package/dist/components/SIWE/ProtectedRoute.js +0 -52
  94. package/dist/components/SIWE/ProtectedRoute.js.map +0 -1
  95. package/dist/components/SIWE/SIWEButton.d.ts +0 -22
  96. package/dist/components/SIWE/SIWEButton.d.ts.map +0 -1
  97. package/dist/components/SIWE/SIWEButton.js +0 -106
  98. package/dist/components/SIWE/SIWEButton.js.map +0 -1
  99. package/dist/components/SIWE/SIWEModal.d.ts +0 -19
  100. package/dist/components/SIWE/SIWEModal.d.ts.map +0 -1
  101. package/dist/components/SIWE/SIWEModal.js +0 -75
  102. package/dist/components/SIWE/SIWEModal.js.map +0 -1
  103. package/dist/components/SIWE/SIWEProvider.d.ts +0 -38
  104. package/dist/components/SIWE/SIWEProvider.d.ts.map +0 -1
  105. package/dist/components/SIWE/SIWEProvider.js +0 -227
  106. package/dist/components/SIWE/SIWEProvider.js.map +0 -1
  107. package/dist/components/SIWE/index.d.ts +0 -15
  108. package/dist/components/SIWE/index.d.ts.map +0 -1
  109. package/dist/components/SIWE/index.js +0 -10
  110. package/dist/components/SIWE/index.js.map +0 -1
  111. package/dist/core/VarityClient.d.ts +0 -76
  112. package/dist/core/VarityClient.d.ts.map +0 -1
  113. package/dist/core/VarityClient.js +0 -99
  114. package/dist/core/VarityClient.js.map +0 -1
  115. package/dist/core/config.d.ts +0 -136
  116. package/dist/core/config.d.ts.map +0 -1
  117. package/dist/core/config.js +0 -156
  118. package/dist/core/config.js.map +0 -1
  119. package/dist/hooks/useAnalytics.d.ts +0 -94
  120. package/dist/hooks/useAnalytics.d.ts.map +0 -1
  121. package/dist/hooks/useAnalytics.js +0 -116
  122. package/dist/hooks/useAnalytics.js.map +0 -1
  123. package/dist/hooks/useAuth.d.ts +0 -71
  124. package/dist/hooks/useAuth.d.ts.map +0 -1
  125. package/dist/hooks/useAuth.js +0 -198
  126. package/dist/hooks/useAuth.js.map +0 -1
  127. package/dist/hooks/useDashboard.d.ts +0 -110
  128. package/dist/hooks/useDashboard.d.ts.map +0 -1
  129. package/dist/hooks/useDashboard.js +0 -201
  130. package/dist/hooks/useDashboard.js.map +0 -1
  131. package/dist/hooks/useVarityAPI.d.ts +0 -88
  132. package/dist/hooks/useVarityAPI.d.ts.map +0 -1
  133. package/dist/hooks/useVarityAPI.js +0 -138
  134. package/dist/hooks/useVarityAPI.js.map +0 -1
  135. package/dist/hooks/useWalletAuth.d.ts +0 -108
  136. package/dist/hooks/useWalletAuth.d.ts.map +0 -1
  137. package/dist/hooks/useWalletAuth.js +0 -415
  138. package/dist/hooks/useWalletAuth.js.map +0 -1
  139. package/dist/hooks/web3/index.d.ts +0 -5
  140. package/dist/hooks/web3/index.d.ts.map +0 -1
  141. package/dist/hooks/web3/index.js +0 -6
  142. package/dist/hooks/web3/index.js.map +0 -1
  143. package/dist/hooks/web3/useAddressValidation.d.ts +0 -37
  144. package/dist/hooks/web3/useAddressValidation.d.ts.map +0 -1
  145. package/dist/hooks/web3/useAddressValidation.js +0 -59
  146. package/dist/hooks/web3/useAddressValidation.js.map +0 -1
  147. package/dist/hooks/web3/useBlockExplorer.d.ts +0 -37
  148. package/dist/hooks/web3/useBlockExplorer.d.ts.map +0 -1
  149. package/dist/hooks/web3/useBlockExplorer.js +0 -59
  150. package/dist/hooks/web3/useBlockExplorer.js.map +0 -1
  151. package/dist/hooks/web3/useUSDCFormat.d.ts +0 -34
  152. package/dist/hooks/web3/useUSDCFormat.d.ts.map +0 -1
  153. package/dist/hooks/web3/useUSDCFormat.js +0 -43
  154. package/dist/hooks/web3/useUSDCFormat.js.map +0 -1
  155. package/dist/hooks/web3/useVarityWallet.d.ts +0 -48
  156. package/dist/hooks/web3/useVarityWallet.d.ts.map +0 -1
  157. package/dist/hooks/web3/useVarityWallet.js +0 -70
  158. package/dist/hooks/web3/useVarityWallet.js.map +0 -1
  159. package/dist/modules/cache/index.d.ts +0 -12
  160. package/dist/modules/cache/index.d.ts.map +0 -1
  161. package/dist/modules/cache/index.js +0 -13
  162. package/dist/modules/cache/index.js.map +0 -1
  163. package/dist/providers/ChainContext.d.ts +0 -65
  164. package/dist/providers/ChainContext.d.ts.map +0 -1
  165. package/dist/providers/ChainContext.js +0 -92
  166. package/dist/providers/ChainContext.js.map +0 -1
  167. package/dist/providers/VarityProvider.d.ts +0 -32
  168. package/dist/providers/VarityProvider.d.ts.map +0 -1
  169. package/dist/providers/VarityProvider.js +0 -56
  170. package/dist/providers/VarityProvider.js.map +0 -1
  171. package/dist/providers/WalletContext.d.ts +0 -68
  172. package/dist/providers/WalletContext.d.ts.map +0 -1
  173. package/dist/providers/WalletContext.js +0 -98
  174. package/dist/providers/WalletContext.js.map +0 -1
  175. package/dist/providers/index.d.ts +0 -48
  176. package/dist/providers/index.d.ts.map +0 -1
  177. package/dist/providers/index.js +0 -53
  178. package/dist/providers/index.js.map +0 -1
  179. package/dist/types/api-extensions.d.ts +0 -92
  180. package/dist/types/api-extensions.d.ts.map +0 -1
  181. package/dist/types/api-extensions.js +0 -7
  182. package/dist/types/api-extensions.js.map +0 -1
  183. package/dist/wallets/SimpleSmartWallet.d.ts +0 -68
  184. package/dist/wallets/SimpleSmartWallet.d.ts.map +0 -1
  185. package/dist/wallets/SimpleSmartWallet.js +0 -74
  186. package/dist/wallets/SimpleSmartWallet.js.map +0 -1
  187. package/dist/wallets/SmartWalletProvider.d.ts +0 -217
  188. package/dist/wallets/SmartWalletProvider.d.ts.map +0 -1
  189. package/dist/wallets/SmartWalletProvider.js +0 -366
  190. package/dist/wallets/SmartWalletProvider.js.map +0 -1
  191. package/dist/wallets/config.d.ts +0 -222
  192. package/dist/wallets/config.d.ts.map +0 -1
  193. package/dist/wallets/config.js +0 -206
  194. package/dist/wallets/config.js.map +0 -1
  195. package/dist/wallets/index.d.ts +0 -9
  196. package/dist/wallets/index.d.ts.map +0 -1
  197. package/dist/wallets/index.js +0 -9
  198. package/dist/wallets/index.js.map +0 -1
  199. package/dist/web3/AddressDisplay/AddressDisplay.d.ts +0 -33
  200. package/dist/web3/AddressDisplay/AddressDisplay.d.ts.map +0 -1
  201. package/dist/web3/AddressDisplay/AddressDisplay.js +0 -42
  202. package/dist/web3/AddressDisplay/AddressDisplay.js.map +0 -1
  203. package/dist/web3/AddressInput/AddressInput.d.ts +0 -36
  204. package/dist/web3/AddressInput/AddressInput.d.ts.map +0 -1
  205. package/dist/web3/AddressInput/AddressInput.js +0 -54
  206. package/dist/web3/AddressInput/AddressInput.js.map +0 -1
  207. package/dist/web3/AmountInput/AmountInput.d.ts +0 -41
  208. package/dist/web3/AmountInput/AmountInput.d.ts.map +0 -1
  209. package/dist/web3/AmountInput/AmountInput.js +0 -74
  210. package/dist/web3/AmountInput/AmountInput.js.map +0 -1
  211. package/dist/web3/BalanceDisplay/BalanceDisplay.d.ts +0 -30
  212. package/dist/web3/BalanceDisplay/BalanceDisplay.d.ts.map +0 -1
  213. package/dist/web3/BalanceDisplay/BalanceDisplay.js +0 -35
  214. package/dist/web3/BalanceDisplay/BalanceDisplay.js.map +0 -1
  215. package/dist/web3/BlockExplorerLink/BlockExplorerLink.d.ts +0 -41
  216. package/dist/web3/BlockExplorerLink/BlockExplorerLink.d.ts.map +0 -1
  217. package/dist/web3/BlockExplorerLink/BlockExplorerLink.js +0 -46
  218. package/dist/web3/BlockExplorerLink/BlockExplorerLink.js.map +0 -1
  219. package/dist/web3/ConnectWallet/ConnectWallet.d.ts +0 -35
  220. package/dist/web3/ConnectWallet/ConnectWallet.d.ts.map +0 -1
  221. package/dist/web3/ConnectWallet/ConnectWallet.js +0 -58
  222. package/dist/web3/ConnectWallet/ConnectWallet.js.map +0 -1
  223. package/dist/web3/DisconnectButton/DisconnectButton.d.ts +0 -30
  224. package/dist/web3/DisconnectButton/DisconnectButton.d.ts.map +0 -1
  225. package/dist/web3/DisconnectButton/DisconnectButton.js +0 -48
  226. package/dist/web3/DisconnectButton/DisconnectButton.js.map +0 -1
  227. package/dist/web3/WalletBalance/WalletBalance.d.ts +0 -27
  228. package/dist/web3/WalletBalance/WalletBalance.d.ts.map +0 -1
  229. package/dist/web3/WalletBalance/WalletBalance.js +0 -49
  230. package/dist/web3/WalletBalance/WalletBalance.js.map +0 -1
  231. package/dist/web3/WalletDropdown/WalletDropdown.d.ts +0 -29
  232. package/dist/web3/WalletDropdown/WalletDropdown.d.ts.map +0 -1
  233. package/dist/web3/WalletDropdown/WalletDropdown.js +0 -93
  234. package/dist/web3/WalletDropdown/WalletDropdown.js.map +0 -1
  235. package/dist/web3/WalletInfo/WalletInfo.d.ts +0 -31
  236. package/dist/web3/WalletInfo/WalletInfo.d.ts.map +0 -1
  237. package/dist/web3/WalletInfo/WalletInfo.js +0 -41
  238. package/dist/web3/WalletInfo/WalletInfo.js.map +0 -1
  239. package/dist/web3/index.d.ts +0 -11
  240. package/dist/web3/index.d.ts.map +0 -1
  241. package/dist/web3/index.js +0 -14
  242. package/dist/web3/index.js.map +0 -1
@@ -1,41 +0,0 @@
1
- export interface AmountInputProps {
2
- value: string;
3
- onChange: (value: string, valueBigInt: bigint) => void;
4
- max?: bigint;
5
- showMax?: boolean;
6
- label?: string;
7
- placeholder?: string;
8
- error?: string;
9
- className?: string;
10
- }
11
- /**
12
- * Amount Input Component
13
- *
14
- * Input field for USDC amounts with proper 6-decimal handling:
15
- * - Validates numeric input
16
- * - Formats to 6 decimals
17
- * - Max button for full balance
18
- * - Error states
19
- *
20
- * @example
21
- * ```tsx
22
- * import { AmountInput } from '@varity-labs/ui-kit';
23
- *
24
- * function SendForm() {
25
- * const [amount, setAmount] = useState('');
26
- *
27
- * return (
28
- * <AmountInput
29
- * value={amount}
30
- * onChange={(value, valueBigInt) => setAmount(value)}
31
- * max={BigInt(1000000000)} // 1000 USDC
32
- * showMax
33
- * label="Amount to send"
34
- * placeholder="0.00"
35
- * />
36
- * );
37
- * }
38
- * ```
39
- */
40
- export declare function AmountInput({ value, onChange, max, showMax, label, placeholder, error, className, }: AmountInputProps): JSX.Element;
41
- //# sourceMappingURL=AmountInput.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AmountInput.d.ts","sourceRoot":"","sources":["../../../src/web3/AmountInput/AmountInput.tsx"],"names":[],"mappings":"AAGA,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;IACvD,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,QAAQ,EACR,GAAG,EACH,OAAc,EACd,KAAK,EACL,WAAoB,EACpB,KAAK,EACL,SAAc,GACf,EAAE,gBAAgB,GAAG,GAAG,CAAC,OAAO,CAiFhC"}
@@ -1,74 +0,0 @@
1
- import React, { useState } from 'react';
2
- import { parseUSDC, formatUSDC } from '../../config/chains';
3
- /**
4
- * Amount Input Component
5
- *
6
- * Input field for USDC amounts with proper 6-decimal handling:
7
- * - Validates numeric input
8
- * - Formats to 6 decimals
9
- * - Max button for full balance
10
- * - Error states
11
- *
12
- * @example
13
- * ```tsx
14
- * import { AmountInput } from '@varity-labs/ui-kit';
15
- *
16
- * function SendForm() {
17
- * const [amount, setAmount] = useState('');
18
- *
19
- * return (
20
- * <AmountInput
21
- * value={amount}
22
- * onChange={(value, valueBigInt) => setAmount(value)}
23
- * max={BigInt(1000000000)} // 1000 USDC
24
- * showMax
25
- * label="Amount to send"
26
- * placeholder="0.00"
27
- * />
28
- * );
29
- * }
30
- * ```
31
- */
32
- export function AmountInput({ value, onChange, max, showMax = true, label, placeholder = '0.00', error, className = '', }) {
33
- const [isFocused, setIsFocused] = useState(false);
34
- const handleChange = (e) => {
35
- const inputValue = e.target.value;
36
- // Allow empty string
37
- if (inputValue === '') {
38
- onChange('', BigInt(0));
39
- return;
40
- }
41
- // Validate numeric input with up to 6 decimals
42
- const regex = /^\d*\.?\d{0,6}$/;
43
- if (!regex.test(inputValue)) {
44
- return;
45
- }
46
- try {
47
- const valueBigInt = parseUSDC(inputValue);
48
- onChange(inputValue, valueBigInt);
49
- }
50
- catch (err) {
51
- // Invalid input, don't update
52
- }
53
- };
54
- const handleMax = () => {
55
- if (max) {
56
- const maxValue = formatUSDC(max, 6);
57
- onChange(maxValue, max);
58
- }
59
- };
60
- const isOverMax = max && value ? parseUSDC(value) > max : false;
61
- return (React.createElement("div", { className: `space-y-2 ${className}` },
62
- label && (React.createElement("label", { className: "block text-sm font-medium text-gray-700 dark:text-gray-300" }, label)),
63
- React.createElement("div", { className: "relative" },
64
- React.createElement("input", { type: "text", value: value, onChange: handleChange, onFocus: () => setIsFocused(true), onBlur: () => setIsFocused(false), placeholder: placeholder, className: `input pr-20 ${error || isOverMax ? 'border-red-500 focus:ring-red-500' : ''}` }),
65
- React.createElement("div", { className: "absolute right-2 top-1/2 -translate-y-1/2 flex items-center gap-2" },
66
- Boolean(showMax && max) && (React.createElement("button", { type: "button", onClick: handleMax, className: "text-xs text-varity-primary hover:text-varity-primary/80 font-medium" }, "MAX")),
67
- React.createElement("span", { className: "text-sm text-gray-500" }, "USDC"))),
68
- (error || isOverMax) && (React.createElement("p", { className: "text-sm text-red-500" }, error || 'Amount exceeds maximum')),
69
- Boolean(max && value && !error && !isOverMax) && (React.createElement("p", { className: "text-xs text-gray-500" },
70
- "Maximum: ",
71
- max ? formatUSDC(max, 2).toString() : '',
72
- " USDC"))));
73
- }
74
- //# sourceMappingURL=AmountInput.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AmountInput.js","sourceRoot":"","sources":["../../../src/web3/AmountInput/AmountInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAA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ceDisplayProps {
2
- balance: bigint | string | number;
3
- showSymbol?: boolean;
4
- decimals?: number;
5
- className?: string;
6
- size?: 'sm' | 'md' | 'lg';
7
- }
8
- /**
9
- * Balance Display Component
10
- *
11
- * Formats and displays USDC balance with proper 6-decimal formatting
12
- *
13
- * @example
14
- * ```tsx
15
- * import { BalanceDisplay } from '@varity-labs/ui-kit';
16
- *
17
- * function Portfolio() {
18
- * return (
19
- * <BalanceDisplay
20
- * balance={BigInt(1500000000)} // 1,500 USDC
21
- * showSymbol
22
- * decimals={2}
23
- * size="lg"
24
- * />
25
- * );
26
- * }
27
- * ```
28
- */
29
- export declare function BalanceDisplay({ balance, showSymbol, decimals, className, size, }: BalanceDisplayProps): JSX.Element;
30
- //# sourceMappingURL=BalanceDisplay.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BalanceDisplay.d.ts","sourceRoot":"","sources":["../../../src/web3/BalanceDisplay/BalanceDisplay.tsx"],"names":[],"mappings":"AAGA,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;IAClC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;CAC3B;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,cAAc,CAAC,EAC7B,OAAO,EACP,UAAiB,EACjB,QAAY,EACZ,SAAc,EACd,IAAW,GACZ,EAAE,mBAAmB,GAAG,GAAG,CAAC,OAAO,CAmBnC"}
@@ -1,35 +0,0 @@
1
- import React from 'react';
2
- import { formatUSDC } from '../../config/chains';
3
- /**
4
- * Balance Display Component
5
- *
6
- * Formats and displays USDC balance with proper 6-decimal formatting
7
- *
8
- * @example
9
- * ```tsx
10
- * import { BalanceDisplay } from '@varity-labs/ui-kit';
11
- *
12
- * function Portfolio() {
13
- * return (
14
- * <BalanceDisplay
15
- * balance={BigInt(1500000000)} // 1,500 USDC
16
- * showSymbol
17
- * decimals={2}
18
- * size="lg"
19
- * />
20
- * );
21
- * }
22
- * ```
23
- */
24
- export function BalanceDisplay({ balance, showSymbol = true, decimals = 2, className = '', size = 'md', }) {
25
- const formattedBalance = formatUSDC(balance, decimals);
26
- const sizeClasses = {
27
- sm: 'text-sm',
28
- md: 'text-base',
29
- lg: 'text-2xl',
30
- };
31
- return (React.createElement("div", { className: `flex items-baseline gap-1 ${className}` },
32
- React.createElement("span", { className: `font-semibold ${sizeClasses[size]}` }, formattedBalance),
33
- showSymbol && (React.createElement("span", { className: "text-sm text-gray-600 dark:text-gray-400" }, "USDC"))));
34
- }
35
- //# sourceMappingURL=BalanceDisplay.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BalanceDisplay.js","sourceRoot":"","sources":["../../../src/web3/BalanceDisplay/BalanceDisplay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAUjD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,UAAU,cAAc,CAAC,EAC7B,OAAO,EACP,UAAU,GAAG,IAAI,EACjB,QAAQ,GAAG,CAAC,EACZ,SAAS,GAAG,EAAE,EACd,IAAI,GAAG,IAAI,GACS;IACpB,MAAM,gBAAgB,GAAG,UAAU,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;IAEvD,MAAM,WAAW,GAAG;QAClB,EAAE,EAAE,SAAS;QACb,EAAE,EAAE,WAAW;QACf,EAAE,EAAE,UAAU;KACf,CAAC;IAEF,OAAO,CACL,6BAAK,SAAS,EAAE,6BAA6B,SAAS,EAAE;QACtD,8BAAM,SAAS,EAAE,iBAAiB,WAAW,CAAC,IAAI,CAAC,EAAE,IAClD,gBAAgB,CACZ;QACN,UAAU,IAAI,CACb,8BAAM,SAAS,EAAC,0CAA0C,WAAY,CACvE,CACG,CACP,CAAC;AACJ,CAAC"}
@@ -1,41 +0,0 @@
1
- import React from 'react';
2
- export interface BlockExplorerLinkProps {
3
- type: 'tx' | 'address' | 'block';
4
- hash: string;
5
- chainId?: number;
6
- label?: string;
7
- children?: React.ReactNode;
8
- className?: string;
9
- }
10
- /**
11
- * Block Explorer Link Component
12
- *
13
- * Creates links to Arbiscan block explorer for transactions, addresses, or blocks
14
- *
15
- * @example
16
- * ```tsx
17
- * import { BlockExplorerLink } from '@varity-labs/ui-kit';
18
- *
19
- * function Transaction() {
20
- * return (
21
- * <>
22
- * <BlockExplorerLink
23
- * type="tx"
24
- * hash="0xabc..."
25
- * label="View Transaction"
26
- * />
27
- *
28
- * <BlockExplorerLink
29
- * type="address"
30
- * hash="0x123..."
31
- * >
32
- * View on Explorer
33
- * </BlockExplorerLink>
34
- * </>
35
- * );
36
- * }
37
- * ```
38
- */
39
- export declare function BlockExplorerLink({ type, hash, chainId, // Default to Arbitrum Sepolia
40
- label, children, className, }: BlockExplorerLinkProps): JSX.Element;
41
- //# sourceMappingURL=BlockExplorerLink.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BlockExplorerLink.d.ts","sourceRoot":"","sources":["../../../src/web3/BlockExplorerLink/BlockExplorerLink.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,IAAI,GAAG,SAAS,GAAG,OAAO,CAAC;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,IAAI,EACJ,IAAI,EACJ,OAAgB,EAAE,8BAA8B;AAChD,KAAK,EACL,QAAQ,EACR,SAAc,GACf,EAAE,sBAAsB,GAAG,GAAG,CAAC,OAAO,CAwBtC"}
@@ -1,46 +0,0 @@
1
- import React from 'react';
2
- import { getBlockExplorerUrl } from '../../config/chains';
3
- /**
4
- * Block Explorer Link Component
5
- *
6
- * Creates links to Arbiscan block explorer for transactions, addresses, or blocks
7
- *
8
- * @example
9
- * ```tsx
10
- * import { BlockExplorerLink } from '@varity-labs/ui-kit';
11
- *
12
- * function Transaction() {
13
- * return (
14
- * <>
15
- * <BlockExplorerLink
16
- * type="tx"
17
- * hash="0xabc..."
18
- * label="View Transaction"
19
- * />
20
- *
21
- * <BlockExplorerLink
22
- * type="address"
23
- * hash="0x123..."
24
- * >
25
- * View on Explorer
26
- * </BlockExplorerLink>
27
- * </>
28
- * );
29
- * }
30
- * ```
31
- */
32
- export function BlockExplorerLink({ type, hash, chainId = 421614, // Default to Arbitrum Sepolia
33
- label, children, className = '', }) {
34
- const url = getBlockExplorerUrl(chainId, type, hash);
35
- const defaultLabels = {
36
- tx: 'View Transaction',
37
- address: 'View Address',
38
- block: 'View Block',
39
- };
40
- const displayText = children || label || defaultLabels[type];
41
- return (React.createElement("a", { href: url, target: "_blank", rel: "noopener noreferrer", className: `inline-flex items-center gap-1 text-varity-primary hover:text-varity-primary/80 underline ${className}` },
42
- displayText,
43
- React.createElement("svg", { className: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24" },
44
- React.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14" }))));
45
- }
46
- //# sourceMappingURL=BlockExplorerLink.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BlockExplorerLink.js","sourceRoot":"","sources":["../../../src/web3/BlockExplorerLink/BlockExplorerLink.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAW1D;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,UAAU,iBAAiB,CAAC,EAChC,IAAI,EACJ,IAAI,EACJ,OAAO,GAAG,MAAM,EAAE,8BAA8B;AAChD,KAAK,EACL,QAAQ,EACR,SAAS,GAAG,EAAE,GACS;IACvB,MAAM,GAAG,GAAG,mBAAmB,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IAErD,MAAM,aAAa,GAAG;QACpB,EAAE,EAAE,kBAAkB;QACtB,OAAO,EAAE,cAAc;QACvB,KAAK,EAAE,YAAY;KACpB,CAAC;IAEF,MAAM,WAAW,GAAG,QAAQ,IAAI,KAAK,IAAI,aAAa,CAAC,IAAI,CAAC,CAAC;IAE7D,OAAO,CACL,2BACE,IAAI,EAAE,GAAG,EACT,MAAM,EAAC,QAAQ,EACf,GAAG,EAAC,qBAAqB,EACzB,SAAS,EAAE,6FAA6F,SAAS,EAAE;QAElH,WAAW;QACZ,6BAAK,SAAS,EAAC,SAAS,EAAC,IAAI,EAAC,MAAM,EAAC,MAAM,EAAC,cAAc,EAAC,OAAO,EAAC,WAAW;YAC5E,8BAAM,aAAa,EAAC,OAAO,EAAC,cAAc,EAAC,OAAO,EAAC,WAAW,EAAE,CAAC,EAAE,CAAC,EAAC,8EAA8E,GAAG,CAClJ,CACJ,CACL,CAAC;AACJ,CAAC"}
@@ -1,35 +0,0 @@
1
- export interface ConnectWalletProps {
2
- variant?: 'primary' | 'secondary' | 'outline';
3
- size?: 'sm' | 'md' | 'lg';
4
- onConnect?: (address: string) => void;
5
- onError?: (error: Error) => void;
6
- className?: string;
7
- label?: string;
8
- }
9
- /**
10
- * Connect Wallet Button Component
11
- *
12
- * Displays a button that opens wallet connection modal with support for:
13
- * - MetaMask
14
- * - WalletConnect
15
- * - Coinbase Wallet
16
- * - Email/Social logins
17
- *
18
- * @example
19
- * ```tsx
20
- * import { ConnectWallet } from '@varity-labs/ui-kit';
21
- *
22
- * function Header() {
23
- * return (
24
- * <ConnectWallet
25
- * variant="primary"
26
- * size="md"
27
- * onConnect={(address) => console.log('Connected:', address)}
28
- * onError={(error) => console.error('Connection failed:', error)}
29
- * />
30
- * );
31
- * }
32
- * ```
33
- */
34
- export declare function ConnectWallet({ variant, size, onConnect, onError, className, label, }: ConnectWalletProps): JSX.Element;
35
- //# sourceMappingURL=ConnectWallet.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ConnectWallet.d.ts","sourceRoot":"","sources":["../../../src/web3/ConnectWallet/ConnectWallet.tsx"],"names":[],"mappings":"AAMA,MAAM,WAAW,kBAAkB;IACjC,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,SAAS,CAAC;IAC9C,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,aAAa,CAAC,EAC5B,OAAmB,EACnB,IAAW,EACX,SAAS,EACT,OAAO,EACP,SAAc,EACd,KAAwB,GACzB,EAAE,kBAAkB,GAAG,GAAG,CAAC,OAAO,CA0ClC"}
@@ -1,58 +0,0 @@
1
- import React from 'react';
2
- import { ConnectButton } from 'thirdweb/react';
3
- import { createWallet } from 'thirdweb/wallets';
4
- import { createThirdwebClient } from 'thirdweb';
5
- import { THIRDWEB_CLIENT_ID, DEFAULT_CHAIN } from '../../config/chains';
6
- /**
7
- * Connect Wallet Button Component
8
- *
9
- * Displays a button that opens wallet connection modal with support for:
10
- * - MetaMask
11
- * - WalletConnect
12
- * - Coinbase Wallet
13
- * - Email/Social logins
14
- *
15
- * @example
16
- * ```tsx
17
- * import { ConnectWallet } from '@varity-labs/ui-kit';
18
- *
19
- * function Header() {
20
- * return (
21
- * <ConnectWallet
22
- * variant="primary"
23
- * size="md"
24
- * onConnect={(address) => console.log('Connected:', address)}
25
- * onError={(error) => console.error('Connection failed:', error)}
26
- * />
27
- * );
28
- * }
29
- * ```
30
- */
31
- export function ConnectWallet({ variant = 'primary', size = 'md', onConnect, onError, className = '', label = 'Connect Wallet', }) {
32
- const client = React.useMemo(() => createThirdwebClient({ clientId: THIRDWEB_CLIENT_ID }), []);
33
- const wallets = React.useMemo(() => [
34
- createWallet('io.metamask'),
35
- createWallet('com.coinbase.wallet'),
36
- createWallet('walletConnect'),
37
- ], []);
38
- const variantClasses = {
39
- primary: 'btn btn-primary',
40
- secondary: 'btn btn-secondary',
41
- outline: 'btn btn-outline',
42
- };
43
- const sizeClasses = {
44
- sm: 'btn-sm',
45
- md: 'btn-md',
46
- lg: 'btn-lg',
47
- };
48
- const buttonClasses = `${variantClasses[variant]} ${sizeClasses[size]} ${className}`;
49
- return (React.createElement(ConnectButton, { client: client, wallets: wallets, chain: DEFAULT_CHAIN, connectButton: {
50
- label: label,
51
- className: buttonClasses,
52
- }, onConnect: (wallet) => {
53
- if (onConnect && wallet.getAccount()?.address) {
54
- onConnect(wallet.getAccount().address);
55
- }
56
- } }));
57
- }
58
- //# sourceMappingURL=ConnectWallet.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ConnectWallet.js","sourceRoot":"","sources":["../../../src/web3/ConnectWallet/ConnectWallet.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AACh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AAC,MAAM,CAAC,UAAU,EAAG,CAAC,OAAO,CAAC,CAAC;YAC1C,CAAC;QACH,CAAC,GACD,CACH,CAAC;AACJ,CAAC"}
@@ -1,30 +0,0 @@
1
- export interface DisconnectButtonProps {
2
- variant?: 'primary' | 'secondary' | 'outline';
3
- size?: 'sm' | 'md' | 'lg';
4
- onDisconnect?: () => void;
5
- className?: string;
6
- label?: string;
7
- }
8
- /**
9
- * Disconnect Wallet Button Component
10
- *
11
- * Displays a button to disconnect the currently connected wallet
12
- *
13
- * @example
14
- * ```tsx
15
- * import { DisconnectButton } from '@varity-labs/ui-kit';
16
- *
17
- * function Settings() {
18
- * return (
19
- * <DisconnectButton
20
- * variant="secondary"
21
- * size="md"
22
- * onDisconnect={() => console.log('Disconnected')}
23
- * label="Disconnect Wallet"
24
- * />
25
- * );
26
- * }
27
- * ```
28
- */
29
- export declare function DisconnectButton({ variant, size, onDisconnect, className, label, }: DisconnectButtonProps): JSX.Element | null;
30
- //# sourceMappingURL=DisconnectButton.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DisconnectButton.d.ts","sourceRoot":"","sources":["../../../src/web3/DisconnectButton/DisconnectButton.tsx"],"names":[],"mappings":"AAGA,MAAM,WAAW,qBAAqB;IACpC,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,SAAS,CAAC;IAC9C,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,OAAqB,EACrB,IAAW,EACX,YAAY,EACZ,SAAc,EACd,KAAoB,GACrB,EAAE,qBAAqB,GAAG,GAAG,CAAC,OAAO,GAAG,IAAI,CAmC5C"}
@@ -1,48 +0,0 @@
1
- import React from 'react';
2
- import { useDisconnect, useActiveWallet } from 'thirdweb/react';
3
- /**
4
- * Disconnect Wallet Button Component
5
- *
6
- * Displays a button to disconnect the currently connected wallet
7
- *
8
- * @example
9
- * ```tsx
10
- * import { DisconnectButton } from '@varity-labs/ui-kit';
11
- *
12
- * function Settings() {
13
- * return (
14
- * <DisconnectButton
15
- * variant="secondary"
16
- * size="md"
17
- * onDisconnect={() => console.log('Disconnected')}
18
- * label="Disconnect Wallet"
19
- * />
20
- * );
21
- * }
22
- * ```
23
- */
24
- export function DisconnectButton({ variant = 'secondary', size = 'md', onDisconnect, className = '', label = 'Disconnect', }) {
25
- const wallet = useActiveWallet();
26
- const { disconnect } = useDisconnect();
27
- if (!wallet) {
28
- return null;
29
- }
30
- const variantClasses = {
31
- primary: 'btn btn-primary',
32
- secondary: 'btn btn-secondary',
33
- outline: 'btn btn-outline',
34
- };
35
- const sizeClasses = {
36
- sm: 'btn-sm',
37
- md: 'btn-md',
38
- lg: 'btn-lg',
39
- };
40
- const handleDisconnect = async () => {
41
- await disconnect(wallet);
42
- if (onDisconnect) {
43
- onDisconnect();
44
- }
45
- };
46
- return (React.createElement("button", { onClick: handleDisconnect, className: `${variantClasses[variant]} ${sizeClasses[size]} ${className}` }, label));
47
- }
48
- //# sourceMappingURL=DisconnectButton.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DisconnectButton.js","sourceRoot":"","sources":["../../../src/web3/DisconnectButton/DisconnectButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAUhE;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,UAAU,gBAAgB,CAAC,EAC/B,OAAO,GAAG,WAAW,EACrB,IAAI,GAAG,IAAI,EACX,YAAY,EACZ,SAAS,GAAG,EAAE,EACd,KAAK,GAAG,YAAY,GACE;IACtB,MAAM,MAAM,GAAG,eAAe,EAAE,CAAC;IACjC,MAAM,EAAE,UAAU,EAAE,GAAG,aAAa,EAAE,CAAC;IAEvC,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,cAAc,GAAG;QACrB,OAAO,EAAE,iBAAiB;QAC1B,SAAS,EAAE,mBAAmB;QAC9B,OAAO,EAAE,iBAAiB;KAC3B,CAAC;IAEF,MAAM,WAAW,GAAG;QAClB,EAAE,EAAE,QAAQ;QACZ,EAAE,EAAE,QAAQ;QACZ,EAAE,EAAE,QAAQ;KACb,CAAC;IAEF,MAAM,gBAAgB,GAAG,KAAK,IAAI,EAAE;QAClC,MAAM,UAAU,CAAC,MAAM,CAAC,CAAC;QACzB,IAAI,YAAY,EAAE,CAAC;YACjB,YAAY,EAAE,CAAC;QACjB,CAAC;IACH,CAAC,CAAC;IAEF,OAAO,CACL,gCACE,OAAO,EAAE,gBAAgB,EACzB,SAAS,EAAE,GAAG,cAAc,CAAC,OAAO,CAAC,IAAI,WAAW,CAAC,IAAI,CAAC,IAAI,SAAS,EAAE,IAExE,KAAK,CACC,CACV,CAAC;AACJ,CAAC"}
@@ -1,27 +0,0 @@
1
- export interface WalletBalanceProps {
2
- showSymbol?: boolean;
3
- decimals?: number;
4
- className?: string;
5
- loadingText?: string;
6
- }
7
- /**
8
- * Wallet Balance Display Component
9
- *
10
- * Displays wallet USDC balance with automatic formatting (6 decimals)
11
- *
12
- * @example
13
- * ```tsx
14
- * import { WalletBalance } from '@varity-labs/ui-kit';
15
- *
16
- * function Balance() {
17
- * return (
18
- * <WalletBalance
19
- * showSymbol
20
- * decimals={2}
21
- * />
22
- * );
23
- * }
24
- * ```
25
- */
26
- export declare function WalletBalance({ showSymbol, decimals, className, loadingText, }: WalletBalanceProps): JSX.Element | null;
27
- //# sourceMappingURL=WalletBalance.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"WalletBalance.d.ts","sourceRoot":"","sources":["../../../src/web3/WalletBalance/WalletBalance.tsx"],"names":[],"mappings":"AAKA,MAAM,WAAW,kBAAkB;IACjC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,aAAa,CAAC,EAC5B,UAAiB,EACjB,QAAY,EACZ,SAAc,EACd,WAA0B,GAC3B,EAAE,kBAAkB,GAAG,GAAG,CAAC,OAAO,GAAG,IAAI,CA6CzC"}
@@ -1,49 +0,0 @@
1
- import React from 'react';
2
- import { useActiveAccount, useWalletBalance } from 'thirdweb/react';
3
- import { createThirdwebClient } from 'thirdweb';
4
- import { THIRDWEB_CLIENT_ID, DEFAULT_CHAIN, formatUSDC } from '../../config/chains';
5
- /**
6
- * Wallet Balance Display Component
7
- *
8
- * Displays wallet USDC balance with automatic formatting (6 decimals)
9
- *
10
- * @example
11
- * ```tsx
12
- * import { WalletBalance } from '@varity-labs/ui-kit';
13
- *
14
- * function Balance() {
15
- * return (
16
- * <WalletBalance
17
- * showSymbol
18
- * decimals={2}
19
- * />
20
- * );
21
- * }
22
- * ```
23
- */
24
- export function WalletBalance({ showSymbol = true, decimals = 2, className = '', loadingText = 'Loading...', }) {
25
- const account = useActiveAccount();
26
- const client = React.useMemo(() => createThirdwebClient({ clientId: THIRDWEB_CLIENT_ID }), []);
27
- const { data: balance, isLoading, error } = useWalletBalance({
28
- client,
29
- chain: DEFAULT_CHAIN,
30
- address: account?.address,
31
- });
32
- if (!account) {
33
- return null;
34
- }
35
- if (isLoading) {
36
- return (React.createElement("div", { className: `flex items-center gap-2 ${className}` },
37
- React.createElement("div", { className: "animate-spin rounded-full h-4 w-4 border-b-2 border-varity-primary" }),
38
- React.createElement("span", { className: "text-sm text-gray-500" }, loadingText)));
39
- }
40
- if (error) {
41
- return (React.createElement("div", { className: `text-sm text-red-500 ${className}` }, "Error loading balance"));
42
- }
43
- const balanceValue = balance?.value || BigInt(0);
44
- const formattedBalance = formatUSDC(balanceValue, decimals);
45
- return (React.createElement("div", { className: `flex items-center gap-1 ${className}` },
46
- React.createElement("span", { className: "text-lg font-semibold" }, formattedBalance),
47
- showSymbol && (React.createElement("span", { className: "text-sm text-gray-600 dark:text-gray-400" }, "USDC"))));
48
- }
49
- //# sourceMappingURL=WalletBalance.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"WalletBalance.js","sourceRoot":"","sources":["../../../src/web3/WalletBalance/WalletBalance.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AASpF;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,aAAa,CAAC,EAC5B,UAAU,GAAG,IAAI,EACjB,QAAQ,GAAG,CAAC,EACZ,SAAS,GAAG,EAAE,EACd,WAAW,GAAG,YAAY,GACP;IACnB,MAAM,OAAO,GAAG,gBAAgB,EAAE,CAAC;IACnC,MAAM,MAAM,GAAG,KAAK,CAAC,OAAO,CAC1B,GAAG,EAAE,CAAC,oBAAoB,CAAC,EAAE,QAAQ,EAAE,kBAAkB,EAAE,CAAC,EAC5D,EAAE,CACH,CAAC;IAEF,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,gBAAgB,CAAC;QAC3D,MAAM;QACN,KAAK,EAAE,aAAa;QACpB,OAAO,EAAE,OAAO,EAAE,OAAO;KAC1B,CAAC,CAAC;IAEH,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,SAAS,EAAE,CAAC;QACd,OAAO,CACL,6BAAK,SAAS,EAAE,2BAA2B,SAAS,EAAE;YACpD,6BAAK,SAAS,EAAC,oEAAoE,GAAG;YACtF,8BAAM,SAAS,EAAC,uBAAuB,IAAE,WAAW,CAAQ,CACxD,CACP,CAAC;IACJ,CAAC;IAED,IAAI,KAAK,EAAE,CAAC;QACV,OAAO,CACL,6BAAK,SAAS,EAAE,wBAAwB,SAAS,EAAE,4BAE7C,CACP,CAAC;IACJ,CAAC;IAED,MAAM,YAAY,GAAG,OAAO,EAAE,KAAK,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC;IACjD,MAAM,gBAAgB,GAAG,UAAU,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;IAE5D,OAAO,CACL,6BAAK,SAAS,EAAE,2BAA2B,SAAS,EAAE;QACpD,8BAAM,SAAS,EAAC,uBAAuB,IAAE,gBAAgB,CAAQ;QAChE,UAAU,IAAI,CACb,8BAAM,SAAS,EAAC,0CAA0C,WAAY,CACvE,CACG,CACP,CAAC;AACJ,CAAC"}
@@ -1,29 +0,0 @@
1
- export interface WalletDropdownProps {
2
- onDisconnect?: () => void;
3
- className?: string;
4
- }
5
- /**
6
- * Wallet Dropdown Menu Component
7
- *
8
- * Displays a dropdown menu with wallet information and actions:
9
- * - Address
10
- * - Balance
11
- * - Copy address
12
- * - View on explorer
13
- * - Disconnect
14
- *
15
- * @example
16
- * ```tsx
17
- * import { WalletDropdown } from '@varity-labs/ui-kit';
18
- *
19
- * function Header() {
20
- * return (
21
- * <WalletDropdown
22
- * onDisconnect={() => console.log('Disconnected')}
23
- * />
24
- * );
25
- * }
26
- * ```
27
- */
28
- export declare function WalletDropdown({ onDisconnect, className, }: WalletDropdownProps): JSX.Element | null;
29
- //# sourceMappingURL=WalletDropdown.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"WalletDropdown.d.ts","sourceRoot":"","sources":["../../../src/web3/WalletDropdown/WalletDropdown.tsx"],"names":[],"mappings":"AAKA,MAAM,WAAW,mBAAmB;IAClC,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,cAAc,CAAC,EAC7B,YAAY,EACZ,SAAc,GACf,EAAE,mBAAmB,GAAG,GAAG,CAAC,OAAO,GAAG,IAAI,CAgH1C"}