tek-wallet 0.0.805 → 0.0.807

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 (196) hide show
  1. package/dist/components/TekWallet/components/index.d.ts +2 -1
  2. package/dist/components/TekWallet/components/index.js +2 -1
  3. package/dist/components/TekWallet/components/layouts/ChildPageLayout/index.js +3 -3
  4. package/dist/components/TekWallet/components/layouts/DefaultPageLayout/index.js +3 -3
  5. package/dist/components/TekWallet/components/ui/ActivitiesTypeSlice/index.js +12 -8
  6. package/dist/components/TekWallet/components/ui/ActivityDetail/index.js +17 -19
  7. package/dist/components/TekWallet/components/ui/ActivityItem/index.js +13 -13
  8. package/dist/components/TekWallet/components/ui/AmountGroupAndChart/index.js +3 -3
  9. package/dist/components/TekWallet/components/ui/AnalyticGroup/index.js +20 -20
  10. package/dist/components/TekWallet/components/ui/AnalyticGroupCenter/index.js +9 -8
  11. package/dist/components/TekWallet/components/ui/AppBackDrop/index.js +3 -3
  12. package/dist/components/TekWallet/components/ui/AppDialog/index.js +3 -3
  13. package/dist/components/TekWallet/components/ui/AssetViewHeader/index.js +9 -8
  14. package/dist/components/TekWallet/components/ui/BackHeader/index.js +6 -6
  15. package/dist/components/TekWallet/components/ui/BottomActionLayout/index.js +3 -3
  16. package/dist/components/TekWallet/components/ui/Button/index.js +4 -4
  17. package/dist/components/TekWallet/components/ui/CardToken/index.js +8 -8
  18. package/dist/components/TekWallet/components/ui/Column/index.js +3 -3
  19. package/dist/components/TekWallet/components/ui/ConfirmByPasscode/index.js +6 -4
  20. package/dist/components/TekWallet/components/ui/ConfirmLayout/index.js +3 -3
  21. package/dist/components/TekWallet/components/ui/ConfirmSwapToken/Result.js +17 -17
  22. package/dist/components/TekWallet/components/ui/ConfirmTransfer/index.js +3 -3
  23. package/dist/components/TekWallet/components/ui/CopyTextComponent/index.js +6 -6
  24. package/dist/components/TekWallet/components/ui/CustomTooltip/index.js +4 -2
  25. package/dist/components/TekWallet/components/ui/DetailSwap/index.js +9 -9
  26. package/dist/components/TekWallet/components/ui/DialogContentLayout/index.js +6 -6
  27. package/dist/components/TekWallet/components/ui/DrawerDrag/index.js +3 -3
  28. package/dist/components/TekWallet/components/ui/EmptyData/index.js +3 -3
  29. package/dist/components/TekWallet/components/ui/Fees/index.js +25 -25
  30. package/dist/components/TekWallet/components/ui/FeesAutoDebounce/index.js +24 -25
  31. package/dist/components/TekWallet/components/ui/FiatDeposit/components/shareAction.js +4 -6
  32. package/dist/components/TekWallet/components/ui/FiatDeposit/components/shareDrawer.js +2 -5
  33. package/dist/components/TekWallet/components/ui/FiatDeposit/components/shareImage.js +1 -2
  34. package/dist/components/TekWallet/components/ui/FiatDeposit/index.js +28 -26
  35. package/dist/components/TekWallet/components/ui/Formatter/index.js +3 -0
  36. package/dist/components/TekWallet/components/ui/FunctionItem/index.js +4 -5
  37. package/dist/components/TekWallet/components/ui/Icon/index.js +1 -1
  38. package/dist/components/TekWallet/components/ui/IconText/index.js +3 -3
  39. package/dist/components/TekWallet/components/ui/IncomeWallet/components/AnalyticGroup.js +19 -20
  40. package/dist/components/TekWallet/components/ui/IncomeWallet/components/BalanceChart.js +5 -5
  41. package/dist/components/TekWallet/components/ui/IncomeWallet/components/FunctionItem.js +3 -3
  42. package/dist/components/TekWallet/components/ui/IncomeWallet/components/HistoryItem.js +3 -3
  43. package/dist/components/TekWallet/components/ui/IncomeWallet/components/WealthDeposit.js +3 -1
  44. package/dist/components/TekWallet/components/ui/IncomeWallet/components/WealthWithdraw.js +3 -1
  45. package/dist/components/TekWallet/components/ui/IncomeWallet/components/history/index.js +3 -3
  46. package/dist/components/TekWallet/components/ui/IncomeWallet/index.js +10 -10
  47. package/dist/components/TekWallet/components/ui/InlineTitleValue/index.js +3 -3
  48. package/dist/components/TekWallet/components/ui/Input/index.js +5 -5
  49. package/dist/components/TekWallet/components/ui/LineValue/index.js +3 -3
  50. package/dist/components/TekWallet/components/ui/ListItemCustom/index.js +8 -6
  51. package/dist/components/TekWallet/components/ui/LoadingLayout/index.js +3 -3
  52. package/dist/components/TekWallet/components/ui/LockToken/index.js +4 -4
  53. package/dist/components/TekWallet/components/ui/ModalCheckboxToken/index.js +22 -22
  54. package/dist/components/TekWallet/components/ui/ModalDateFilter/index.js +11 -11
  55. package/dist/components/TekWallet/components/ui/ModalLayout/index.js +3 -3
  56. package/dist/components/TekWallet/components/ui/ModalSelectToken/index.js +12 -12
  57. package/dist/components/TekWallet/components/ui/ModalStatusFilter/index.js +16 -16
  58. package/dist/components/TekWallet/components/ui/ModalTitle/index.js +3 -3
  59. package/dist/components/TekWallet/components/ui/NeonLineChart/index.js +4 -4
  60. package/dist/components/TekWallet/components/ui/NetworkSelection/index.js +5 -5
  61. package/dist/components/TekWallet/components/ui/OTP/index.js +24 -18
  62. package/dist/components/TekWallet/components/ui/PageHeader/index.js +3 -3
  63. package/dist/components/TekWallet/components/ui/QRCode/index.js +3 -1
  64. package/dist/components/TekWallet/components/ui/QrCodeReader/index.js +2 -3
  65. package/dist/components/TekWallet/components/ui/ReceiveDirectly/index.d.ts +26 -0
  66. package/dist/components/TekWallet/components/ui/ReceiveDirectly/index.js +365 -0
  67. package/dist/components/TekWallet/components/ui/ReceiveFunction/components/HelpView.js +4 -4
  68. package/dist/components/TekWallet/components/ui/ReceiveFunction/components/SortGroup.js +4 -4
  69. package/dist/components/TekWallet/components/ui/ReceiveFunction/components/SortTool.js +7 -12
  70. package/dist/components/TekWallet/components/ui/ReceiveFunction/index.js +39 -56
  71. package/dist/components/TekWallet/components/ui/ReceiveHistory/ReceiveCardHistory.js +13 -13
  72. package/dist/components/TekWallet/components/ui/ReceiveHistory/ReceiveHistoryDetails.js +22 -29
  73. package/dist/components/TekWallet/components/ui/ReceiveHistory/index.js +19 -19
  74. package/dist/components/TekWallet/components/ui/Row/index.js +3 -3
  75. package/dist/components/TekWallet/components/ui/ScanQRToSend/index.js +7 -7
  76. package/dist/components/TekWallet/components/ui/SearchBar.d.ts +10 -0
  77. package/dist/components/TekWallet/components/ui/SearchBar.js +42 -0
  78. package/dist/components/TekWallet/components/ui/SendExternalToken/index.js +7 -7
  79. package/dist/components/TekWallet/components/ui/SendInternalToken/index.js +5 -5
  80. package/dist/components/TekWallet/components/ui/SmartList/index.js +3 -3
  81. package/dist/components/TekWallet/components/ui/StatusDisplay/index.js +7 -7
  82. package/dist/components/TekWallet/components/ui/SvgPath/index.js +27 -27
  83. package/dist/components/TekWallet/components/ui/SwiperControlled/index.js +1 -3
  84. package/dist/components/TekWallet/components/ui/TimeFilter/index.js +9 -8
  85. package/dist/components/TekWallet/components/ui/TimeText/index.js +1 -1
  86. package/dist/components/TekWallet/components/ui/TokenItem/index.js +7 -15
  87. package/dist/components/TekWallet/components/ui/TokenSelection/index.js +5 -5
  88. package/dist/components/TekWallet/components/ui/TokensBoard/index.js +12 -12
  89. package/dist/components/TekWallet/components/ui/TransferConfirmation/index.js +3 -3
  90. package/dist/components/TekWallet/components/ui/TransferInternal/index.js +3 -3
  91. package/dist/components/TekWallet/components/ui/UpdateLockToken/index.js +4 -4
  92. package/dist/components/TekWallet/components/ui/UserInfo/index.js +4 -4
  93. package/dist/components/TekWallet/components/ui/WaitingData/index.js +13 -12
  94. package/dist/components/TekWallet/components/ui/WithdrawFunction/components/selectToken.js +11 -11
  95. package/dist/components/TekWallet/components/ui/WithdrawFunction/components/sendForm.js +30 -30
  96. package/dist/components/TekWallet/components/ui/WithdrawFunction/components/sortByBalance.js +3 -3
  97. package/dist/components/TekWallet/components/ui/WithdrawFunction/components/sortByToken.js +3 -3
  98. package/dist/components/TekWallet/components/ui/WithdrawFunction/components/summary/infoSummary.js +8 -8
  99. package/dist/components/TekWallet/components/ui/WithdrawFunction/index.js +9 -9
  100. package/dist/components/TekWallet/components/views/ActivityView/index.js +4 -4
  101. package/dist/components/TekWallet/components/views/AssetView/Menu.js +3 -3
  102. package/dist/components/TekWallet/components/views/AssetView/index.js +12 -12
  103. package/dist/components/TekWallet/components/views/AuthView/index.js +4 -4
  104. package/dist/components/TekWallet/components/views/AuthViewSignIn/index.js +4 -4
  105. package/dist/components/TekWallet/components/views/ChangePasscodeView/index.js +8 -6
  106. package/dist/components/TekWallet/components/views/CreateWalletView/index.js +4 -4
  107. package/dist/components/TekWallet/components/views/DetailActivityView/LoadingView.js +4 -4
  108. package/dist/components/TekWallet/components/views/GetSeedPhraseWalletView/index.js +7 -7
  109. package/dist/components/TekWallet/components/views/ImportWalletView/index.js +4 -7
  110. package/dist/components/TekWallet/components/views/SendExternalView/components/Form.js +32 -37
  111. package/dist/components/TekWallet/components/views/SendExternalView/components/Result.js +16 -16
  112. package/dist/components/TekWallet/components/views/SendExternalView/components/SelectNetwork.js +3 -3
  113. package/dist/components/TekWallet/components/views/SendExternalView/components/SelectToken.js +7 -32
  114. package/dist/components/TekWallet/components/views/SendExternalView/components/Summary.js +12 -12
  115. package/dist/components/TekWallet/components/views/SendExternalView/index.js +3 -3
  116. package/dist/components/TekWallet/components/views/SendInternalView/components/AmountForm.js +26 -24
  117. package/dist/components/TekWallet/components/views/SendInternalView/components/Form.js +27 -33
  118. package/dist/components/TekWallet/components/views/SendInternalView/components/Result.js +14 -14
  119. package/dist/components/TekWallet/components/views/SendInternalView/components/SelectToken.js +7 -32
  120. package/dist/components/TekWallet/components/views/SendInternalView/components/Summary.js +10 -10
  121. package/dist/components/TekWallet/components/views/SendInternalView/index.js +3 -3
  122. package/dist/components/TekWallet/components/views/SettingView/index.js +4 -13
  123. package/dist/components/TekWallet/components/views/SwapView/components/FromCard/FromCardSkeleton.js +7 -8
  124. package/dist/components/TekWallet/components/views/SwapView/components/FromCard/index.js +20 -25
  125. package/dist/components/TekWallet/components/views/SwapView/components/SelectToken.js +7 -32
  126. package/dist/components/TekWallet/components/views/SwapView/components/Summary.js +36 -39
  127. package/dist/components/TekWallet/components/views/SwapView/components/ToCard/index.js +7 -7
  128. package/dist/components/TekWallet/components/views/SwapView/index.js +12 -10
  129. package/dist/components/TekWallet/hooks/useEventHandler.d.ts +1 -0
  130. package/dist/components/TekWallet/hooks/useEventHandler.js +9 -7
  131. package/dist/components/TekWallet/hooks/useRefetchOnWindowFocused.d.ts +7 -0
  132. package/dist/components/TekWallet/hooks/useRefetchOnWindowFocused.js +144 -0
  133. package/dist/components/TekWallet/hooks/useValidateAmount.js +3 -3
  134. package/dist/components/TekWallet/hooks/useWarningWrongPasscode.js +5 -5
  135. package/dist/components/TekWallet/index.d.ts +2 -0
  136. package/dist/components/TekWallet/index.js +2 -12
  137. package/dist/components/TekWallet/layouts/ChildPageLayout/index.js +3 -3
  138. package/dist/components/TekWallet/providers/ActivitiesProvider/index.js +28 -0
  139. package/dist/components/TekWallet/providers/ActivitiesProvider/type.d.ts +1 -0
  140. package/dist/components/TekWallet/providers/EventHandlerProvider/index.js +11 -1
  141. package/dist/components/TekWallet/providers/RealtimeProvider/index.js +15 -13
  142. package/dist/components/TekWallet/providers/TekWalletProvider/index.d.ts +9 -1
  143. package/dist/components/TekWallet/providers/TekWalletProvider/index.js +11 -4
  144. package/dist/components/TekWallet/providers/index.d.ts +0 -1
  145. package/dist/components/TekWallet/providers/index.js +0 -1
  146. package/dist/components/TekWallet/theme/mui/components/index.d.ts +133 -0
  147. package/dist/components/TekWallet/theme/mui/components/index.js +14 -0
  148. package/dist/components/TekWallet/theme/mui/components/overrides/Button.d.ts +142 -0
  149. package/dist/components/TekWallet/theme/mui/components/overrides/Button.js +84 -0
  150. package/dist/components/TekWallet/theme/mui/components/overrides/Drawer.d.ts +4 -0
  151. package/dist/components/TekWallet/theme/mui/components/overrides/Drawer.js +9 -0
  152. package/dist/components/TekWallet/theme/mui/components/overrides/Paper.d.ts +3 -0
  153. package/dist/components/TekWallet/theme/mui/components/overrides/Paper.js +15 -0
  154. package/dist/components/TekWallet/theme/mui/components/overrides/SnackBar.d.ts +3 -0
  155. package/dist/components/TekWallet/theme/mui/components/overrides/SnackBar.js +32 -0
  156. package/dist/components/TekWallet/theme/mui/fixed-mixins.d.ts +2 -0
  157. package/dist/components/TekWallet/theme/mui/fixed-mixins.js +218 -0
  158. package/dist/components/TekWallet/theme/mui/index.d.ts +3 -3
  159. package/dist/components/TekWallet/theme/mui/index.js +16 -32
  160. package/dist/components/TekWallet/theme/mui/palette.d.ts +34 -0
  161. package/dist/components/TekWallet/theme/mui/palette.js +133 -0
  162. package/dist/components/TekWallet/theme/mui/shadows/index.d.ts +3 -0
  163. package/dist/components/TekWallet/theme/mui/shadows/index.js +64 -0
  164. package/dist/components/TekWallet/theme/mui/spacing.d.ts +1 -0
  165. package/dist/components/TekWallet/theme/mui/spacing.js +5 -0
  166. package/dist/components/TekWallet/theme/mui/theme.d.ts +9 -442
  167. package/dist/components/TekWallet/theme/mui/theme.js +38 -415
  168. package/dist/components/TekWallet/theme/mui/type.d.ts +5 -0
  169. package/dist/components/TekWallet/theme/mui/type.js +9 -0
  170. package/dist/components/TekWallet/theme/mui/typography.d.ts +27 -0
  171. package/dist/components/TekWallet/theme/mui/typography.js +30 -0
  172. package/dist/components/TekWallet/theme/mui/utils/deepMergeTheme.d.ts +2 -0
  173. package/dist/components/TekWallet/theme/mui/utils/deepMergeTheme.js +7 -0
  174. package/dist/components/TekWallet/utils/getContractColor.d.ts +1 -0
  175. package/dist/components/TekWallet/utils/getContractColor.js +30 -0
  176. package/package.json +1 -1
  177. package/dist/components/TekWallet/components/ui/CardHistorySwap/index.d.ts +0 -12
  178. package/dist/components/TekWallet/components/ui/CardHistorySwap/index.js +0 -75
  179. package/dist/components/TekWallet/components/ui/DetailSwapResult/index.d.ts +0 -8
  180. package/dist/components/TekWallet/components/ui/DetailSwapResult/index.js +0 -122
  181. package/dist/components/TekWallet/components/ui/HistorySwap/index.d.ts +0 -16
  182. package/dist/components/TekWallet/components/ui/HistorySwap/index.js +0 -434
  183. package/dist/components/TekWallet/components/ui/SwapFunction/index.d.ts +0 -16
  184. package/dist/components/TekWallet/components/ui/SwapFunction/index.js +0 -271
  185. package/dist/components/TekWallet/components/ui/SwapToken/index.d.ts +0 -31
  186. package/dist/components/TekWallet/components/ui/SwapToken/index.js +0 -293
  187. package/dist/components/TekWallet/providers/ThemeProvider/index.d.ts +0 -8
  188. package/dist/components/TekWallet/providers/ThemeProvider/index.js +0 -43
  189. package/dist/components/TekWallet/theme/mui/deposit-fiat-theme/components.d.ts +0 -3
  190. package/dist/components/TekWallet/theme/mui/deposit-fiat-theme/components.js +0 -158
  191. package/dist/components/TekWallet/theme/mui/deposit-fiat-theme/palette.d.ts +0 -55
  192. package/dist/components/TekWallet/theme/mui/deposit-fiat-theme/palette.js +0 -45
  193. package/dist/components/TekWallet/theme/mui/deposit-fiat-theme/theme.d.ts +0 -2
  194. package/dist/components/TekWallet/theme/mui/deposit-fiat-theme/theme.js +0 -13
  195. package/dist/components/TekWallet/theme/mui/deposit-fiat-theme/typography.d.ts +0 -39
  196. package/dist/components/TekWallet/theme/mui/deposit-fiat-theme/typography.js +0 -65
@@ -1,417 +1,40 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var typography = {
4
- fontSize10: "0.625rem",
5
- fontSize11: "0.6875rem",
6
- fontSize12: "0.75rem",
7
- fontSize13: "0.8125rem",
8
- fontSize14: "0.875rem",
9
- fontSize15: "0.9375rem",
10
- fontSize16: "1rem",
11
- fontSize17: "1.0625rem",
12
- fontSize18: "1.125rem",
13
- fontSize19: "1.1875rem",
14
- fontSize20: "1.25rem",
15
- fontSize21: "1.3125rem",
16
- fontSize22: "1.375rem",
17
- fontSize24: "1.5rem",
18
- leading100: "100%",
19
- leading120: "120%",
20
- leading140: "140%",
21
- leading160: "160%",
22
- leading180: "180%",
23
- leading200: "200%",
24
- fontWeight300: 300,
25
- fontWeight400: 400,
26
- fontWeight500: 500,
27
- fontWeight600: 600,
28
- fontWeight700: 700,
29
- };
30
- var background = {
31
- white: "#ffffff",
32
- white80: "rgba(255, 255, 255, 0.8)",
33
- white64: "rgba(255, 255, 255, 0.64)",
34
- white24: "rgba(255, 255, 255, 0.24)",
35
- white16: "rgba(255, 255, 255, 0.16)",
36
- black: "#000000",
37
- black64: "rgba(0, 0, 0, 0.64)",
38
- black24: "rgba(0, 0, 0, 0.24)",
39
- black16: "rgba(0, 0, 0, 0.16)",
40
- primary: "#044C2F",
41
- primary16: "#044C2F29",
42
- secondary: "#C5E99F",
43
- secondary16: "#C5E99F29",
44
- error: "#FF434E",
45
- error16: "rgba(254, 101, 101, 0.16)",
46
- tertiary: "#ECF4E9",
47
- accent3: "#E5E6E6",
48
- successStatus: "#1EA031",
49
- infoStatus: "#29C8F0",
50
- errorStatus: "#FF434E",
51
- };
52
- var border = {
53
- primary: "#044C2F",
54
- white: "#ffffff",
55
- white64: "rgba(255, 255, 255, 0.64)",
56
- white24: "rgba(255, 255, 255, 0.24)",
57
- white16: "rgba(255, 255, 255, 0.16)",
58
- black: "#000000",
59
- black64: "rgba(0, 0, 0, 0.64)",
60
- black24: "rgba(0, 0, 0, 0.24)",
61
- black16: "rgba(0, 0, 0, 0.16)",
62
- secondary: "#C5E99F",
63
- secondary16: "rgba(1, 255, 255, 0.16)",
64
- accent: "#A3A3A3",
65
- accent3: "#E5E6E6",
66
- tertiary: "#ECF4E9",
67
- success: "#1EA031",
68
- error: "#FF434E",
69
- info: "#29C8F0",
70
- warning: "#FFA500",
71
- };
72
- var text = {
73
- white: "#ffffff",
74
- white80: "rgba(255, 255, 255, 0.8)",
75
- white64: "rgba(255, 255, 255, 0.64)",
76
- white24: "rgba(255, 255, 255, 0.24)",
77
- black: "#000000",
78
- black80: "rgba(0, 0, 0, 0.8)",
79
- black64: "rgba(0, 0, 0, 0.64)",
80
- black24: "rgba(0, 0, 0, 0.24)",
81
- blackContrast: "#121212",
82
- primary: "#044C2F",
83
- secondary: "#C5E99F",
84
- accent: "#A3A3A3",
85
- accent2: "#6B7271",
86
- successStatus: "#1EA031",
87
- errorStatus: "#FF434E",
88
- loadingStatus: "#000000",
89
- increase: "#1EA031",
90
- decrease: "#FE6565",
91
- warningStatus: "#FFA500",
92
- alertStatus: "#1EA031",
93
- tertiary: "#ECF4E9",
94
- };
95
- var gaps = {
96
- g2: "0.125rem",
97
- g4: "0.25rem",
98
- g6: "0.375rem",
99
- g8: "0.5rem",
100
- g10: "0.625rem",
101
- g12: "0.75rem",
102
- g16: "1rem",
103
- g20: "1.25rem",
104
- g24: "1.5rem",
105
- g32: "2rem",
106
- g40: "2.5rem",
107
- };
108
- var pagePadding = {
109
- paddingLeft: "1rem",
110
- paddingRight: "1rem",
111
- paddingTop: "1rem",
112
- paddingBottom: "2rem",
113
- };
114
- var customPadding = {
115
- p0: "0rem",
116
- p4: "0.25rem",
117
- p6: "0.375rem",
118
- p8: "0.5rem",
119
- p10: "0.625rem",
120
- p12: "0.75rem",
121
- p16: "1rem",
122
- p20: "1.25rem",
123
- p24: "1.5rem",
124
- p32: "2rem",
125
- p40: "2.5rem",
126
- p48: "3rem",
127
- };
128
- var customMargin = {
129
- m4: "0.25rem",
130
- m6: "0.375rem",
131
- m8: "0.5rem",
132
- m10: "0.625rem",
133
- m12: "0.75rem",
134
- m16: "1rem",
135
- m20: "1.25rem",
136
- m24: "1.5rem",
137
- m32: "2rem",
138
- m40: "2.5rem",
139
- m48: "3rem",
140
- };
141
- var customRadius = {
142
- full: "999px",
143
- r4: "0.25rem",
144
- r6: "0.375rem",
145
- r8: "0.5rem",
146
- r10: "0.625rem",
147
- r12: "0.75rem",
148
- r16: "1rem",
149
- r20: "1.25rem",
150
- r24: "1.5rem",
151
- r32: "2rem",
152
- r40: "2.5rem",
153
- r48: "3rem",
154
- };
155
- var shadows = [
156
- "none",
157
- "inset 0px 0px 50px 8px rgba(255, 255, 255, 0.1)", // 0
158
- "0px 0px 50px 8px rgba(255, 255, 255, 0.1)", // 1
159
- "0px 5px 15px rgba(255, 255, 255, 0.1)", // 2
160
- "0px 5px 15px rgba(255, 255, 255, 0.2)", // 3
161
- "0px 6px 24px rgba(255, 255, 255, 0.1)", // 4
162
- "0px 10px 20px rgba(255, 255, 255, 0.1)", // 5
163
- "0px 12px 24px rgba(255, 255, 255, 0.2)", // 6
164
- "0px 15px 30px rgba(255, 255, 255, 0.1)", // 7
165
- "0px 15px 30px rgba(255, 255, 255, 0.2)", // 8
166
- "0px 18px 36px rgba(255, 255, 255, 0.1)", // 9
167
- "0px 18px 36px rgba(255, 255, 255, 0.2)", // 10
168
- "0px 20px 40px rgba(255, 255, 255, 0.1)", // 11
169
- "2px 2px 10px 5px rgba(0, 0, 0, 0.1)", // 12
170
- "1px 1px 10px 2px rgba(0, 0, 0, 0.1)", // 13
171
- "0px 24px 48px rgba(0, 0, 0, 0.2)", // 14
172
- "0px 30px 60px rgba(0, 0, 0, 0.1)", // 15
173
- "0px 30px 60px rgba(0, 0, 0, 0.2)", // 16
174
- "0px 35px 70px rgba(0, 0, 0, 0.1)", // 17
175
- "0px 35px 70px rgba(0, 0, 0, 0.2)", // 18
176
- "0px 40px 80px rgba(0, 0, 0, 0.1)", // 19
177
- "0px 40px 80px rgba(0, 0, 0, 0.2)", // 20
178
- "0px 45px 90px rgba(0, 0, 0, 0.1)", // 21
179
- "0px 45px 90px rgba(0, 0, 0, 0.2)", // 22
180
- "0px 50px 100px rgba(0, 0, 0, 0.1)", // 23
181
- ];
182
- var zIndex = {
183
- drawer: 1200,
184
- };
185
- var theme = {
186
- palette: {
187
- primary: {
188
- main: "#044C2F",
189
- contrastText: "#000000",
190
- },
191
- secondary: {
192
- main: "#C5E99F",
193
- contrastText: "#000000",
194
- },
195
- success: {
196
- main: "#1EA031",
197
- contrastText: "#000000",
198
- },
199
- error: {
200
- main: "#FF434E",
201
- contrastText: "#000000",
202
- },
203
- warning: {
204
- main: "#FFA500",
205
- contrastText: "#000000",
206
- },
207
- info: {
208
- main: "#29C8F0",
209
- contrastText: "#000000",
210
- },
211
- background: background,
212
- border: border,
213
- text: text,
214
- divider: "rgba(255, 255, 255)",
215
- },
216
- zIndex: zIndex,
217
- typography: typography,
218
- shadows: shadows,
219
- components: {
220
- MuiButton: {
221
- variants: [
222
- {
223
- props: { variant: "contained" },
224
- style: {
225
- color: text.secondary,
226
- backgroundColor: background.primary,
227
- fontSize: typography.fontSize16,
228
- lineHeight: typography.leading100,
229
- fontWeight: typography.fontWeight500,
230
- padding: "".concat(customPadding.p12, " ").concat(customPadding.p16),
231
- borderRadius: customRadius.r12,
232
- textTransform: "capitalize",
233
- },
234
- },
235
- {
236
- props: { variant: "outlined" },
237
- style: {
238
- color: text.primary,
239
- backgroundColor: "transparent",
240
- fontSize: typography.fontSize16,
241
- lineHeight: typography.leading100,
242
- fontWeight: typography.fontWeight500,
243
- padding: "".concat(customPadding.p12, " ").concat(customPadding.p16),
244
- borderRadius: customRadius.r12,
245
- textTransform: "capitalize",
246
- borderColor: "currentColor",
247
- },
248
- },
249
- ],
250
- },
251
- },
252
- mixins: {
253
- pagePadding: pagePadding,
254
- customPadding: customPadding,
255
- customMargin: customMargin,
256
- customRadius: customRadius,
257
- gaps: gaps,
258
- background: background,
259
- border: border,
260
- text: text,
261
- row: {
262
- display: "flex",
263
- alignItems: "center",
264
- },
265
- column: {
266
- display: "flex",
267
- flexDirection: "column",
268
- width: "100%",
269
- },
270
- headerTitle: {
271
- color: text.black,
272
- fontWeight: typography.fontWeight700,
273
- fontSize: typography.fontSize16,
274
- textAlign: "center",
275
- },
276
- sessionTitle: {
277
- color: text.black,
278
- fontWeight: typography.fontWeight600,
279
- fontSize: typography.fontSize18,
280
- textAlign: "center",
281
- },
282
- sessionDescription: {
283
- color: text.black64,
284
- fontWeight: typography.fontWeight400,
285
- fontSize: typography.fontSize14,
286
- textAlign: "center",
287
- },
288
- noteContent: {
289
- color: text.black64,
290
- fontWeight: typography.fontWeight400,
291
- fontSize: typography.fontSize12,
292
- },
293
- fieldTitle: {
294
- color: text.black80,
295
- fontWeight: typography.fontWeight500,
296
- fontSize: typography.fontSize14,
297
- },
298
- inputLabel: {
299
- color: "text.black80",
300
- fontWeight: typography.fontWeight700,
301
- fontSize: typography.fontSize14,
302
- },
303
- center: {
304
- position: "absolute",
305
- left: "50%",
306
- top: "50%",
307
- transform: "translate(-50%, -50%)",
308
- },
309
- value: {
310
- color: text.black,
311
- fontWeight: typography.fontWeight700,
312
- fontSize: typography.fontSize14,
313
- lineHeight: typography.leading140,
314
- },
315
- valueDescription: {
316
- color: text.black64,
317
- fontWeight: typography.fontWeight400,
318
- fontSize: typography.fontSize12,
319
- lineHeight: typography.leading140,
320
- },
321
- validationError: {
322
- color: text.errorStatus,
323
- fontWeight: typography.fontWeight400,
324
- fontSize: typography.fontSize12,
325
- lineHeight: typography.leading140,
326
- },
327
- validationDescription: {
328
- color: text.accent,
329
- fontWeight: typography.fontWeight400,
330
- fontSize: typography.fontSize11,
331
- lineHeight: typography.leading160,
332
- },
333
- whiteLoadingOverlay: {
334
- backgroundColor: "background.black16",
335
- backdropFilter: "blur(2px)",
336
- zIndex: 1000,
337
- position: "absolute",
338
- inset: 0,
339
- },
340
- paper: {
341
- display: "flex",
342
- flexDirection: "column",
343
- width: "100%",
344
- gap: gaps.g12,
345
- padding: customPadding.p12,
346
- backgroundColor: "background.black16",
347
- borderRadius: customRadius.r16,
348
- },
349
- listTitle: {
350
- color: text.black,
351
- fontWeight: typography.fontWeight500,
352
- fontSize: typography.fontSize14,
353
- lineHeight: typography.leading140,
354
- textTransform: "capitalize",
355
- },
356
- listDescription: {
357
- color: text.black64,
358
- fontWeight: typography.fontWeight400,
359
- fontSize: typography.fontSize12,
360
- lineHeight: typography.leading140,
361
- },
362
- smallButton: {
363
- fontSize: typography.fontSize11,
364
- padding: "".concat(customPadding.p4, " ").concat(customPadding.p8),
365
- height: "fit-content",
366
- minHeight: "unset",
367
- minWidth: "unset",
368
- width: "fit-content",
369
- borderRadius: customRadius.full,
370
- lineHeight: typography.leading100,
371
- },
372
- dialogContent: {
373
- fontSize: typography.fontSize14,
374
- lineHeight: typography.leading140,
375
- color: text.white,
376
- },
377
- dialogActionsOk: {
378
- fontSize: typography.fontSize14,
379
- lineHeight: typography.leading100,
380
- color: "#2482ff",
381
- textAlign: "center",
382
- padding: "".concat(customPadding.p8, " ").concat(customPadding.p16),
383
- },
384
- dialogActionsCancel: {
385
- fontSize: typography.fontSize14,
386
- lineHeight: typography.leading140,
387
- color: text.white64,
388
- textAlign: "center",
389
- padding: "".concat(customPadding.p8, " ").concat(customPadding.p16),
390
- },
391
- warning: {
392
- color: text.warningStatus,
393
- fontSize: typography.fontSize12,
394
- lineHeight: typography.leading140,
395
- },
396
- activityTitle: {
397
- color: text.black,
398
- fontWeight: typography.fontWeight500,
399
- fontSize: typography.fontSize14,
400
- lineHeight: typography.leading140,
401
- textTransform: "capitalize",
402
- },
403
- activityDescription: {
404
- color: text.black64,
405
- fontWeight: typography.fontWeight400,
406
- fontSize: typography.fontSize12,
407
- lineHeight: typography.leading140,
408
- },
409
- bigValue: {
410
- color: text.black,
411
- fontWeight: typography.fontWeight600,
412
- fontSize: typography.fontSize18,
413
- lineHeight: typography.leading140,
414
- },
415
- },
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ var __importDefault = (this && this.__importDefault) || function (mod) {
14
+ return (mod && mod.__esModule) ? mod : { "default": mod };
416
15
  };
417
- exports.default = theme;
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ var styles_1 = require("@mui/material/styles");
18
+ var palette_1 = require("./palette");
19
+ var components_1 = __importDefault(require("./components"));
20
+ var shadows_1 = __importDefault(require("./shadows"));
21
+ var spacing_1 = require("./spacing");
22
+ var fixed_mixins_1 = require("./fixed-mixins");
23
+ var typography_1 = require("./typography");
24
+ var createThemeByMode = function (mode) {
25
+ var theme = (0, styles_1.createTheme)({
26
+ palette: palette_1.palettes[mode],
27
+ typography: typography_1.typography,
28
+ shadows: (0, shadows_1.default)(),
29
+ spacing: spacing_1.spacing,
30
+ cssVariables: true,
31
+ shape: {
32
+ borderRadius: 16,
33
+ },
34
+ styleMixins: __assign({}, fixed_mixins_1.FIXED_MIXINS),
35
+ });
36
+ return (0, styles_1.createTheme)(theme, {
37
+ components: (0, components_1.default)(theme),
38
+ });
39
+ };
40
+ exports.default = createThemeByMode;
@@ -0,0 +1,5 @@
1
+ export declare enum ThemeModes {
2
+ LIGHT = "light",
3
+ DARK = "dark",
4
+ SYSTEM = "system"
5
+ }
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ThemeModes = void 0;
4
+ var ThemeModes;
5
+ (function (ThemeModes) {
6
+ ThemeModes["LIGHT"] = "light";
7
+ ThemeModes["DARK"] = "dark";
8
+ ThemeModes["SYSTEM"] = "system";
9
+ })(ThemeModes || (exports.ThemeModes = ThemeModes = {}));
@@ -0,0 +1,27 @@
1
+ export declare const typography: {
2
+ fontSize10: string;
3
+ fontSize11: string;
4
+ fontSize12: string;
5
+ fontSize13: string;
6
+ fontSize14: string;
7
+ fontSize15: string;
8
+ fontSize16: string;
9
+ fontSize17: string;
10
+ fontSize18: string;
11
+ fontSize19: string;
12
+ fontSize20: string;
13
+ fontSize21: string;
14
+ fontSize22: string;
15
+ fontSize24: string;
16
+ leading100: string;
17
+ leading120: string;
18
+ leading140: string;
19
+ leading160: string;
20
+ leading180: string;
21
+ leading200: string;
22
+ fontWeight300: number;
23
+ fontWeight400: number;
24
+ fontWeight500: number;
25
+ fontWeight600: number;
26
+ fontWeight700: number;
27
+ };
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.typography = void 0;
4
+ exports.typography = {
5
+ fontSize10: "0.625rem",
6
+ fontSize11: "0.6875rem",
7
+ fontSize12: "0.75rem",
8
+ fontSize13: "0.8125rem",
9
+ fontSize14: "0.875rem",
10
+ fontSize15: "0.9375rem",
11
+ fontSize16: "1rem",
12
+ fontSize17: "1.0625rem",
13
+ fontSize18: "1.125rem",
14
+ fontSize19: "1.1875rem",
15
+ fontSize20: "1.25rem",
16
+ fontSize21: "1.3125rem",
17
+ fontSize22: "1.375rem",
18
+ fontSize24: "1.5rem",
19
+ leading100: "100%",
20
+ leading120: "120%",
21
+ leading140: "140%",
22
+ leading160: "160%",
23
+ leading180: "180%",
24
+ leading200: "200%",
25
+ fontWeight300: 300,
26
+ fontWeight400: 400,
27
+ fontWeight500: 500,
28
+ fontWeight600: 600,
29
+ fontWeight700: 700,
30
+ };
@@ -0,0 +1,2 @@
1
+ import { Theme } from "@mui/material/styles";
2
+ export declare function deepMergeTheme(theme: Theme, config: Theme): Theme;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.deepMergeTheme = deepMergeTheme;
4
+ var utils_1 = require("@mui/utils");
5
+ function deepMergeTheme(theme, config) {
6
+ return (0, utils_1.deepmerge)(theme, config);
7
+ }
@@ -0,0 +1 @@
1
+ export declare const getContrastingColor: (color: string) => "#000000" | "#FFFFFF";
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getContrastingColor = void 0;
4
+ var getContrastingColor = function (color) {
5
+ try {
6
+ var hexToRgb = function (hex) {
7
+ var r = 0, g = 0, b = 0;
8
+ if (hex.length === 4) {
9
+ r = parseInt(hex[1] + hex[1], 16);
10
+ g = parseInt(hex[2] + hex[2], 16);
11
+ b = parseInt(hex[3] + hex[3], 16);
12
+ }
13
+ else if (hex.length === 7) {
14
+ r = parseInt(hex[1] + hex[2], 16);
15
+ g = parseInt(hex[3] + hex[4], 16);
16
+ b = parseInt(hex[5] + hex[6], 16);
17
+ }
18
+ return { r: r, g: g, b: b };
19
+ };
20
+ var rgb = hexToRgb(color);
21
+ // Lấy giá trị độ sáng trung bình
22
+ var brightness = (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1000;
23
+ return brightness > 128 ? "#000000" : "#FFFFFF"; // Nếu sáng thì lấy màu đen, nếu tối thì lấy màu trắng
24
+ }
25
+ catch (error) {
26
+ console.error(error);
27
+ return "#FFFFFF";
28
+ }
29
+ };
30
+ exports.getContrastingColor = getContrastingColor;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tek-wallet",
3
- "version": "0.0.805",
3
+ "version": "0.0.807",
4
4
  "description": "A custom React provider with TypeScript support",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,12 +0,0 @@
1
- interface CardHistorySwap {
2
- className?: string;
3
- amount?: number;
4
- fromCurrency?: string;
5
- toCurrency?: string;
6
- swapAmount?: number;
7
- date?: Date;
8
- status?: string;
9
- description?: string;
10
- }
11
- declare const CardHistorySwap: ({ amount, fromCurrency, toCurrency, swapAmount, date, status, description, }: CardHistorySwap) => import("react/jsx-runtime").JSX.Element;
12
- export default CardHistorySwap;
@@ -1,75 +0,0 @@
1
- "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
- var __importDefault = (this && this.__importDefault) || function (mod) {
14
- return (mod && mod.__esModule) ? mod : { "default": mod };
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- var jsx_runtime_1 = require("react/jsx-runtime");
18
- var material_1 = require("@mui/material");
19
- var providers_1 = require("../../../providers");
20
- var Text_1 = __importDefault(require("../Text"));
21
- var formatDate_1 = __importDefault(require("../../../utils/formatDate"));
22
- var roundToTwoSignificantDecimals_1 = __importDefault(require("../../../utils/roundToTwoSignificantDecimals"));
23
- var Icon_1 = __importDefault(require("../Icon"));
24
- var getIcon_1 = __importDefault(require("../../../utils/getIcon"));
25
- var type_1 = require("../../../services/axios/get-activities-service/type");
26
- var formatter_1 = require("../../../utils/formatter");
27
- var CardHistorySwap = function (_a) {
28
- var _b;
29
- var amount = _a.amount, fromCurrency = _a.fromCurrency, toCurrency = _a.toCurrency, swapAmount = _a.swapAmount, date = _a.date, status = _a.status, description = _a.description;
30
- var theme = (0, providers_1.useTheme)();
31
- return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g4, pl: theme.mixins.customPadding.p10, pr: theme.mixins.customPadding.p10 }), children: [(0, jsx_runtime_1.jsxs)(Text_1.default, { sx: {
32
- fontWeight: theme.typography.fontWeight700,
33
- color: theme.palette.text.blackContrast,
34
- fontSize: theme.typography.fontSize16,
35
- }, children: ["+", (0, formatter_1.formatNumber)(Number(amount)), " ", fromCurrency] }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
36
- borderRadius: theme.mixins.customRadius.r16,
37
- backgroundColor: status == "processing"
38
- ? theme.palette.background.infoStatus
39
- : status == "success"
40
- ? theme.palette.background.successStatus
41
- : status == "failed"
42
- ? theme.palette.background.errorStatus
43
- : theme.palette.background.infoStatus,
44
- maxWidth: "fit-content",
45
- maxHeight: "fit-content",
46
- px: theme.mixins.customPadding.p4,
47
- py: "2px",
48
- }, children: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.row), { color: theme.palette.text.white, justifyContent: "center", fontSize: "9px", fontWeight: theme.typography.fontWeight600 }), children: status &&
49
- (status === null || status === void 0 ? void 0 : status.charAt(0).toUpperCase()) + ((_b = status === null || status === void 0 ? void 0 : status.slice(1)) === null || _b === void 0 ? void 0 : _b.toLowerCase().replace(/_/g, " ")) }) }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { justifyContent: "space-between" }), children: [(0, jsx_runtime_1.jsxs)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g4, fontSize: theme.typography.fontSize12, fontWeight: theme.typography.fontWeight500, color: theme.palette.text.accent2 }), children: ["Amount:", (0, jsx_runtime_1.jsxs)(Text_1.default, { sx: {
50
- fontSize: theme.typography.fontSize12,
51
- fontWeight: theme.typography.fontWeight500,
52
- color: theme.palette.text.blackContrast,
53
- }, children: [(0, formatter_1.formatNumber)(Number(amount)), " ", fromCurrency] })] }), (0, jsx_runtime_1.jsx)(Icon_1.default, { src: (0, getIcon_1.default)("keyboard_arrow_down"), width: 10, height: 10 })] }), (0, jsx_runtime_1.jsxs)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g4, fontSize: theme.typography.fontSize12, fontWeight: theme.typography.fontWeight500, color: theme.palette.text.accent2 }), children: ["Price:", (0, jsx_runtime_1.jsxs)(Text_1.default, { sx: {
54
- fontSize: theme.typography.fontSize12,
55
- fontWeight: theme.typography.fontWeight500,
56
- color: theme.palette.text.blackContrast,
57
- }, children: ["1 ", fromCurrency, " ~ ", (0, roundToTwoSignificantDecimals_1.default)(Number(swapAmount)), " ", toCurrency] })] }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
58
- fontSize: theme.typography.fontSize12,
59
- fontWeight: theme.typography.fontWeight500,
60
- color: theme.palette.text.accent2,
61
- }, children: date ? (0, formatDate_1.default)(date.toLocaleString()) : undefined }), status === type_1.TransactionStatus.Failed && ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g4 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
62
- fontSize: theme.typography.fontSize12,
63
- fontWeight: theme.typography.fontWeight500,
64
- color: theme.palette.text.accent2,
65
- }, children: "Description:" }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
66
- fontSize: theme.typography.fontSize12,
67
- fontWeight: theme.typography.fontWeight500,
68
- color: theme.palette.text.blackContrast,
69
- }, children: description })] })), (0, jsx_runtime_1.jsx)(material_1.Divider, { sx: {
70
- mt: theme.mixins.customMargin.m6,
71
- backgroundColor: theme.palette.border.accent3,
72
- width: "100%",
73
- } })] }));
74
- };
75
- exports.default = CardHistorySwap;