@ssa-ui-kit/widgets 1.0.12 → 1.1.55-canary-79b6b0d-20250224

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 (257) hide show
  1. package/dist/components/AccountBalance/AccountBalance.d.ts +1 -1
  2. package/dist/components/AccountBalance/BalancePieChart.d.ts +1 -1
  3. package/dist/components/AccountBalance/BalancePieChartTitle.d.ts +1 -1
  4. package/dist/components/AccountKeys/AccountKeys.d.ts +1 -1
  5. package/dist/components/AccountKeys/stories/StoryComponent.d.ts +1 -1
  6. package/dist/components/Activity/Activity.d.ts +1 -1
  7. package/dist/components/Activity/ActivityItem.d.ts +1 -1
  8. package/dist/components/Bmi/Bmi.d.ts +1 -1
  9. package/dist/components/Bmi/BmiLabels.d.ts +1 -1
  10. package/dist/components/BotsTable/BotsTable.d.ts +1 -1
  11. package/dist/components/BotsTable/stories/BotsTable/StoryComponent.d.ts +1 -1
  12. package/dist/components/BotsTable/stories/BotsTable/components/Actions/ActionIcon.d.ts +1 -1
  13. package/dist/components/BotsTable/stories/BotsTable/components/Actions/ActionItem.d.ts +1 -1
  14. package/dist/components/BotsTable/stories/BotsTable/components/Actions/ActionMore.d.ts +1 -1
  15. package/dist/components/BotsTable/stories/BotsTable/components/Actions/ActionRun.d.ts +1 -1
  16. package/dist/components/BotsTable/stories/BotsTable/components/Actions/Actions.d.ts +1 -1
  17. package/dist/components/BotsTable/stories/BotsTable/components/Actions/ActionsWrapper.d.ts +1 -1
  18. package/dist/components/BotsTable/stories/BotsTable/components/Actions/consts.d.ts +3 -3
  19. package/dist/components/BotsTable/stories/BotsTable/components/Exchange/Exchange.d.ts +1 -1
  20. package/dist/components/BotsTable/stories/BotsTable/components/Exchange/consts.d.ts +3 -3
  21. package/dist/components/BotsTable/stories/BotsTable/components/PNL.d.ts +1 -1
  22. package/dist/components/BotsTable/stories/BotsTable/components/ROI.d.ts +1 -1
  23. package/dist/components/BotsTable/stories/BotsTable/components/TableTag.d.ts +1 -1
  24. package/dist/components/BotsTable/stories/BotsTable/components/Trade/Trade.d.ts +1 -1
  25. package/dist/components/BotsTable/stories/NoControlOrders/StoryComponent.d.ts +1 -1
  26. package/dist/components/BotsTable/stories/NoControlOrders/components/ActionMore.d.ts +1 -1
  27. package/dist/components/BotsTable/stories/NoControlOrders/components/Reason.d.ts +1 -1
  28. package/dist/components/BotsTable/stories/NoControlOrders/components/TableList.d.ts +1 -1
  29. package/dist/components/BotsTable/stories/NoControlOrders/components/TableRow.d.ts +1 -1
  30. package/dist/components/Calories/Calories.d.ts +1 -1
  31. package/dist/components/Calories/innerContent.d.ts +1 -1
  32. package/dist/components/ExchangeAccount/ExchangeAccount.d.ts +1 -1
  33. package/dist/components/HeartRate/BPM.d.ts +1 -1
  34. package/dist/components/HeartRate/HeartRate.d.ts +1 -1
  35. package/dist/components/HeartRate/HeartRateLineChart.d.ts +1 -1
  36. package/dist/components/ListGoals/ListGoals.d.ts +1 -1
  37. package/dist/components/ListGoals/ListGoalsCard.d.ts +1 -1
  38. package/dist/components/MealNutrients/MealNutrients.d.ts +1 -1
  39. package/dist/components/MealNutrients/MealNutrientsLineChart.d.ts +1 -1
  40. package/dist/components/MealNutrients/MealNutrientsTooltip.d.ts +1 -1
  41. package/dist/components/MealPlanner/MealPlanner.d.ts +1 -1
  42. package/dist/components/MealPlanner/MealPlannerCard.d.ts +1 -1
  43. package/dist/components/StepsCounter/StepsCounter.d.ts +1 -1
  44. package/dist/components/TradingInfoCard/TradingInfoCard.d.ts +1 -1
  45. package/dist/components/TradingInfoCard/TradingInfoCardContent.d.ts +1 -1
  46. package/dist/components/TradingInfoCard/TradingInfoCardTooltip.d.ts +1 -1
  47. package/dist/components/TradingInfoCard/TradingInfoCardWrapper.d.ts +1 -1
  48. package/dist/components/TradingScoreboard/TradingScoreboard.d.ts +1 -1
  49. package/dist/components/TradingScoreboard/helpers.d.ts +4 -4
  50. package/dist/components/UpcomingWorkouts/UpcomingWorkoutCard.d.ts +1 -1
  51. package/dist/components/UpcomingWorkouts/UpcomingWorkouts.d.ts +1 -1
  52. package/dist/components/UserCard/UserCard.d.ts +1 -1
  53. package/dist/components/UserCard/UserCardBMI.d.ts +1 -1
  54. package/dist/components/UserCard/UserCardCredentials.d.ts +1 -1
  55. package/dist/components/UserCard/UserCardItem.d.ts +1 -1
  56. package/dist/components/WaterConsume/WaterConsume.d.ts +1 -1
  57. package/dist/index.js +2439 -1
  58. package/dist/index.js.map +1 -1
  59. package/package.json +24 -27
  60. package/.babelrc.js +0 -4
  61. package/.env +0 -7
  62. package/.storybook/main.ts +0 -47
  63. package/.storybook/preview.tsx +0 -22
  64. package/.storybook/style.css +0 -40
  65. package/custom-shots/widgets-bots-table--no-control-orders--menu-opened_[w1920px].png +0 -0
  66. package/custom-shots/widgets-bots-table--no-control-orders--run-reason-modal_[w1920px].png +0 -0
  67. package/custom-shots/widgets-heart-rate--hint-opened__[w1440px].png +0 -0
  68. package/custom-shots/widgets-heart-rate--hint-opened__[w1920px].png +0 -0
  69. package/custom-shots/widgets-heart-rate--hint-opened__[w390px].png +0 -0
  70. package/custom-shots/widgets-heart-rate--hint-opened__[w900px].png +0 -0
  71. package/custom-shots/widgets-meal-nutrients--hint-opened__[w1440px].png +0 -0
  72. package/custom-shots/widgets-meal-nutrients--hint-opened__[w1920px].png +0 -0
  73. package/custom-shots/widgets-meal-nutrients--hint-opened__[w390px].png +0 -0
  74. package/custom-shots/widgets-meal-nutrients--hint-opened__[w900px].png +0 -0
  75. package/custom-shots/widgets-meal-nutrients--hint-opened__dropdown__[w1440px].png +0 -0
  76. package/custom-shots/widgets-meal-nutrients--hint-opened__dropdown__[w1920px].png +0 -0
  77. package/custom-shots/widgets-meal-nutrients--hint-opened__dropdown__[w390px].png +0 -0
  78. package/custom-shots/widgets-meal-nutrients--hint-opened__dropdown__[w900px].png +0 -0
  79. package/custom-shots/widgets-trading-info-card--hover__[w1920px].png +0 -0
  80. package/customTest.tsx +0 -35
  81. package/jest-setup.ts +0 -20
  82. package/lostpixel.config.ts +0 -29
  83. package/playwright.config.ts +0 -7
  84. package/src/components/AccountBalance/AccountBalance.specBackup.tsx +0 -105
  85. package/src/components/AccountBalance/AccountBalance.stories.tsx +0 -138
  86. package/src/components/AccountBalance/AccountBalance.tsx +0 -60
  87. package/src/components/AccountBalance/BalancePieChart.tsx +0 -127
  88. package/src/components/AccountBalance/BalancePieChartTitle.tsx +0 -54
  89. package/src/components/AccountBalance/index.ts +0 -4
  90. package/src/components/AccountBalance/stories/fixtures.ts +0 -26
  91. package/src/components/AccountBalance/types.ts +0 -41
  92. package/src/components/AccountKeys/AccountKeys.specBackup.tsx +0 -43
  93. package/src/components/AccountKeys/AccountKeys.stories.tsx +0 -14
  94. package/src/components/AccountKeys/AccountKeys.tsx +0 -73
  95. package/src/components/AccountKeys/helpers.ts +0 -7
  96. package/src/components/AccountKeys/index.ts +0 -2
  97. package/src/components/AccountKeys/stories/StoryComponent.tsx +0 -33
  98. package/src/components/AccountKeys/styles.ts +0 -87
  99. package/src/components/AccountKeys/types.ts +0 -8
  100. package/src/components/Activity/Activity.specBackup.tsx +0 -79
  101. package/src/components/Activity/Activity.stories.tsx +0 -15
  102. package/src/components/Activity/Activity.tsx +0 -83
  103. package/src/components/Activity/ActivityItem.tsx +0 -38
  104. package/src/components/Activity/index.tsx +0 -2
  105. package/src/components/Activity/mockActivityRequest.ts +0 -106
  106. package/src/components/Activity/styles.ts +0 -12
  107. package/src/components/Activity/types.ts +0 -10
  108. package/src/components/Bmi/Bmi.spec.Backup.tsx +0 -68
  109. package/src/components/Bmi/Bmi.stories.tsx +0 -10
  110. package/src/components/Bmi/Bmi.tsx +0 -96
  111. package/src/components/Bmi/BmiHeatbar.tsx +0 -18
  112. package/src/components/Bmi/BmiInfo.tsx +0 -11
  113. package/src/components/Bmi/BmiLabel.tsx +0 -9
  114. package/src/components/Bmi/BmiLabels.tsx +0 -33
  115. package/src/components/Bmi/BmiPointer.tsx +0 -15
  116. package/src/components/Bmi/index.tsx +0 -2
  117. package/src/components/Bmi/styles.ts +0 -18
  118. package/src/components/Bmi/types.ts +0 -4
  119. package/src/components/BotsTable/BotsTable.e2e.ts +0 -77
  120. package/src/components/BotsTable/BotsTable.specBackup.tsx +0 -125
  121. package/src/components/BotsTable/BotsTable.tsx +0 -32
  122. package/src/components/BotsTable/BotsTableCell.tsx +0 -13
  123. package/src/components/BotsTable/BotsTableHead.tsx +0 -13
  124. package/src/components/BotsTable/BotsTableRow.tsx +0 -17
  125. package/src/components/BotsTable/BotsTableWrapper.tsx +0 -23
  126. package/src/components/BotsTable/index.ts +0 -5
  127. package/src/components/BotsTable/stories/BotsTable/StoryComponent.tsx +0 -59
  128. package/src/components/BotsTable/stories/BotsTable/components/Actions/ActionIcon.tsx +0 -11
  129. package/src/components/BotsTable/stories/BotsTable/components/Actions/ActionItem.tsx +0 -40
  130. package/src/components/BotsTable/stories/BotsTable/components/Actions/ActionMore.tsx +0 -89
  131. package/src/components/BotsTable/stories/BotsTable/components/Actions/ActionRun.tsx +0 -133
  132. package/src/components/BotsTable/stories/BotsTable/components/Actions/Actions.tsx +0 -13
  133. package/src/components/BotsTable/stories/BotsTable/components/Actions/ActionsWrapper.tsx +0 -21
  134. package/src/components/BotsTable/stories/BotsTable/components/Actions/consts.tsx +0 -118
  135. package/src/components/BotsTable/stories/BotsTable/components/Actions/index.ts +0 -6
  136. package/src/components/BotsTable/stories/BotsTable/components/Exchange/Exchange.tsx +0 -26
  137. package/src/components/BotsTable/stories/BotsTable/components/Exchange/consts.tsx +0 -157
  138. package/src/components/BotsTable/stories/BotsTable/components/Exchange/index.ts +0 -1
  139. package/src/components/BotsTable/stories/BotsTable/components/Exchange/types.ts +0 -6
  140. package/src/components/BotsTable/stories/BotsTable/components/PNL.tsx +0 -27
  141. package/src/components/BotsTable/stories/BotsTable/components/ROI.tsx +0 -25
  142. package/src/components/BotsTable/stories/BotsTable/components/TableTag.tsx +0 -22
  143. package/src/components/BotsTable/stories/BotsTable/components/Trade/Trade.tsx +0 -8
  144. package/src/components/BotsTable/stories/BotsTable/components/Trade/consts.ts +0 -14
  145. package/src/components/BotsTable/stories/BotsTable/components/Trade/index.ts +0 -1
  146. package/src/components/BotsTable/stories/BotsTable/components/Trade/types.ts +0 -5
  147. package/src/components/BotsTable/stories/BotsTable/components/index.ts +0 -6
  148. package/src/components/BotsTable/stories/BotsTable/index.ts +0 -1
  149. package/src/components/BotsTable/stories/BotsTable/mockData.ts +0 -84
  150. package/src/components/BotsTable/stories/BotsTable.stories.tsx +0 -39
  151. package/src/components/BotsTable/stories/NoControlOrders/StoryComponent.tsx +0 -35
  152. package/src/components/BotsTable/stories/NoControlOrders/components/ActionMore.tsx +0 -95
  153. package/src/components/BotsTable/stories/NoControlOrders/components/Reason.tsx +0 -11
  154. package/src/components/BotsTable/stories/NoControlOrders/components/TableList.tsx +0 -45
  155. package/src/components/BotsTable/stories/NoControlOrders/components/TableRow.tsx +0 -31
  156. package/src/components/BotsTable/stories/NoControlOrders/components/index.ts +0 -4
  157. package/src/components/BotsTable/stories/NoControlOrders/mockData.ts +0 -23
  158. package/src/components/BotsTable/stories/NoControlOrders/types.ts +0 -16
  159. package/src/components/BotsTable/types.ts +0 -31
  160. package/src/components/Calories/Calories.specBackup.tsx +0 -11
  161. package/src/components/Calories/Calories.stories.tsx +0 -26
  162. package/src/components/Calories/Calories.tsx +0 -54
  163. package/src/components/Calories/index.tsx +0 -2
  164. package/src/components/Calories/innerContent.tsx +0 -30
  165. package/src/components/Calories/types.ts +0 -4
  166. package/src/components/ExchangeAccount/ExchangeAccount.specBackup.tsx +0 -104
  167. package/src/components/ExchangeAccount/ExchangeAccount.stories.tsx +0 -108
  168. package/src/components/ExchangeAccount/ExchangeAccount.tsx +0 -90
  169. package/src/components/ExchangeAccount/helpers.tsx +0 -153
  170. package/src/components/ExchangeAccount/index.ts +0 -2
  171. package/src/components/ExchangeAccount/styles.ts +0 -115
  172. package/src/components/ExchangeAccount/types.ts +0 -14
  173. package/src/components/HeartRate/BPM.tsx +0 -43
  174. package/src/components/HeartRate/HeartRate.e2e.ts +0 -78
  175. package/src/components/HeartRate/HeartRate.specBackup.tsx +0 -91
  176. package/src/components/HeartRate/HeartRate.stories.tsx +0 -36
  177. package/src/components/HeartRate/HeartRate.tsx +0 -105
  178. package/src/components/HeartRate/HeartRateLineChart.tsx +0 -53
  179. package/src/components/HeartRate/index.ts +0 -2
  180. package/src/components/HeartRate/mockHeartRateRequest.ts +0 -15
  181. package/src/components/HeartRate/types.ts +0 -15
  182. package/src/components/HeartRate/utils.tsx +0 -8
  183. package/src/components/ListGoals/ListGoals.specBackup.tsx +0 -82
  184. package/src/components/ListGoals/ListGoals.stories.tsx +0 -58
  185. package/src/components/ListGoals/ListGoals.tsx +0 -29
  186. package/src/components/ListGoals/ListGoalsCard.tsx +0 -61
  187. package/src/components/ListGoals/index.ts +0 -2
  188. package/src/components/ListGoals/styles.tsx +0 -11
  189. package/src/components/ListGoals/types.ts +0 -25
  190. package/src/components/MealNutrients/MealNutrients.e2e.ts +0 -68
  191. package/src/components/MealNutrients/MealNutrients.specBackup.tsx +0 -134
  192. package/src/components/MealNutrients/MealNutrients.stories.tsx +0 -37
  193. package/src/components/MealNutrients/MealNutrients.tsx +0 -84
  194. package/src/components/MealNutrients/MealNutrientsLineChart.tsx +0 -89
  195. package/src/components/MealNutrients/MealNutrientsTooltip.tsx +0 -30
  196. package/src/components/MealNutrients/chartDefaultConfig.tsx +0 -87
  197. package/src/components/MealNutrients/index.tsx +0 -2
  198. package/src/components/MealNutrients/mockMealNutrientsRequest.ts +0 -1246
  199. package/src/components/MealNutrients/types.ts +0 -37
  200. package/src/components/MealNutrients/useChartConfig.ts +0 -69
  201. package/src/components/MealPlanner/MealPlanner.specBackup.tsx +0 -77
  202. package/src/components/MealPlanner/MealPlanner.stories.tsx +0 -15
  203. package/src/components/MealPlanner/MealPlanner.tsx +0 -100
  204. package/src/components/MealPlanner/MealPlannerBadge.tsx +0 -15
  205. package/src/components/MealPlanner/MealPlannerBars.tsx +0 -19
  206. package/src/components/MealPlanner/MealPlannerCard.tsx +0 -73
  207. package/src/components/MealPlanner/MealPlannerLegends.tsx +0 -22
  208. package/src/components/MealPlanner/index.ts +0 -2
  209. package/src/components/MealPlanner/mockMealPlannerRequest.ts +0 -70
  210. package/src/components/MealPlanner/types.ts +0 -21
  211. package/src/components/StepsCounter/StepsCounter.specBackup.tsx +0 -14
  212. package/src/components/StepsCounter/StepsCounter.stories.tsx +0 -16
  213. package/src/components/StepsCounter/StepsCounter.tsx +0 -74
  214. package/src/components/StepsCounter/index.ts +0 -2
  215. package/src/components/StepsCounter/types.ts +0 -4
  216. package/src/components/TradingInfoCard/TradingInfoCard.e2e.ts +0 -18
  217. package/src/components/TradingInfoCard/TradingInfoCard.specBackup.tsx +0 -116
  218. package/src/components/TradingInfoCard/TradingInfoCard.stories.tsx +0 -118
  219. package/src/components/TradingInfoCard/TradingInfoCard.tsx +0 -49
  220. package/src/components/TradingInfoCard/TradingInfoCardContent.tsx +0 -32
  221. package/src/components/TradingInfoCard/TradingInfoCardTooltip.tsx +0 -47
  222. package/src/components/TradingInfoCard/TradingInfoCardWrapper.tsx +0 -72
  223. package/src/components/TradingInfoCard/index.ts +0 -3
  224. package/src/components/TradingInfoCard/types.ts +0 -27
  225. package/src/components/TradingScoreboard/TradingScoreboard.specBackup.tsx +0 -119
  226. package/src/components/TradingScoreboard/TradingScoreboard.stories.tsx +0 -119
  227. package/src/components/TradingScoreboard/TradingScoreboard.tsx +0 -41
  228. package/src/components/TradingScoreboard/TradingScoreboardBase.tsx +0 -17
  229. package/src/components/TradingScoreboard/helpers.tsx +0 -134
  230. package/src/components/TradingScoreboard/index.ts +0 -2
  231. package/src/components/TradingScoreboard/types.ts +0 -18
  232. package/src/components/UpcomingWorkouts/UpcomingWorkoutCard.tsx +0 -64
  233. package/src/components/UpcomingWorkouts/UpcomingWorkouts.specBackup.tsx +0 -56
  234. package/src/components/UpcomingWorkouts/UpcomingWorkouts.stories.tsx +0 -32
  235. package/src/components/UpcomingWorkouts/UpcomingWorkouts.tsx +0 -27
  236. package/src/components/UpcomingWorkouts/index.ts +0 -2
  237. package/src/components/UpcomingWorkouts/style.ts +0 -12
  238. package/src/components/UpcomingWorkouts/types.ts +0 -23
  239. package/src/components/UserCard/UserCard.tsx +0 -46
  240. package/src/components/UserCard/UserCardBMI.tsx +0 -37
  241. package/src/components/UserCard/UserCardCredentials.tsx +0 -56
  242. package/src/components/UserCard/UserCardItem.tsx +0 -42
  243. package/src/components/UserCard/index.tsx +0 -2
  244. package/src/components/UserCard/types.ts +0 -8
  245. package/src/components/WaterConsume/WaterConsume.specBackup.tsx +0 -62
  246. package/src/components/WaterConsume/WaterConsume.stories.tsx +0 -36
  247. package/src/components/WaterConsume/WaterConsume.tsx +0 -188
  248. package/src/components/WaterConsume/index.ts +0 -2
  249. package/src/components/WaterConsume/types.ts +0 -11
  250. package/src/consts.ts +0 -18
  251. package/src/index.ts +0 -36
  252. package/src/injectGlobal.ts +0 -41
  253. package/test-results/.last-run.json +0 -21
  254. package/tsbuildcache +0 -1
  255. package/tsconfig.build.json +0 -44
  256. package/tsconfig.json +0 -17
  257. package/webpack.config.js +0 -28
@@ -1,41 +0,0 @@
1
- import { TradingInfoCard } from '@components/TradingInfoCard';
2
- import TradingScoreboardBase from './TradingScoreboardBase';
3
- import { TradingScoreboardProps } from './types';
4
-
5
- const TradingScoreboard = ({
6
- items,
7
- onClick,
8
- renderCard,
9
- ...props
10
- }: TradingScoreboardProps) => {
11
- return (
12
- <div>
13
- <TradingScoreboardBase {...props}>
14
- {items.map((item, index) => {
15
- return (
16
- <div key={index}>
17
- {typeof renderCard === 'function' ? (
18
- renderCard(item, onClick)
19
- ) : (
20
- <TradingInfoCard
21
- value={item.value}
22
- unit={item.unit}
23
- title={item.title}
24
- icon={item.icon}
25
- link={item.link}
26
- onClick={() => {
27
- if (typeof onClick === 'function') {
28
- onClick(item);
29
- }
30
- }}
31
- />
32
- )}
33
- </div>
34
- );
35
- })}
36
- </TradingScoreboardBase>
37
- </div>
38
- );
39
- };
40
-
41
- export default TradingScoreboard;
@@ -1,17 +0,0 @@
1
- import styled from '@emotion/styled';
2
-
3
- const TradingScoreboardBase = styled.div<{ itemsPerRow?: number }>`
4
- display: grid;
5
- gap: 5px;
6
- grid-auto-flow: column;
7
- overflow: auto;
8
-
9
- ${({ theme }) => theme.mediaQueries.md} {
10
- grid-template-columns: ${({ itemsPerRow }) =>
11
- itemsPerRow && `repeat(${itemsPerRow}, 1fr)`};
12
- grid-auto-flow: inherit;
13
- overflow: inherit;
14
- }
15
- `;
16
-
17
- export default TradingScoreboardBase;
@@ -1,134 +0,0 @@
1
- import { Icon } from '@ssa-ui-kit/core';
2
-
3
- export const defaultBoardArr = [
4
- {
5
- value: (
6
- <div>
7
- <Icon name="stats" color="gold" size={16} />
8
- <span css={{ marginLeft: '10px' }}>Binance</span>
9
- </div>
10
- ),
11
- title: 'Exchange',
12
- },
13
- {
14
- value: 'Account name',
15
- title: 'Account',
16
- },
17
- {
18
- value: 'Grid v7',
19
- title: 'Strategy',
20
- },
21
- {
22
- value: 'ETH/USDT',
23
- title: 'Pairs',
24
- },
25
- {
26
- value: '25',
27
- title: 'Orders',
28
- },
29
- {
30
- value: '27.07.23',
31
- unit: '4:22:23 pm',
32
- title: 'Start Date',
33
- },
34
- {
35
- value: '30.07.23',
36
- unit: '4:22:23 pm',
37
- title: 'End date',
38
- },
39
- {
40
- value: '4d 5h 36m 2s',
41
- title: 'Launch duration',
42
- },
43
- {
44
- value: '25',
45
- unit: '%',
46
- title: 'ROI',
47
- icon: <Icon name="arrow-up" color="#2CA24D" size={16} />,
48
- },
49
- {
50
- value: '340.025',
51
- unit: 'USD',
52
- title: 'PNL',
53
- icon: <Icon name="arrow-up" color="#2CA24D" size={16} />,
54
- },
55
- ];
56
-
57
- export const oneLineBoardArr = [
58
- {
59
- value: '16',
60
- title: 'Exchanges',
61
- },
62
- {
63
- value: '6',
64
- title: 'Accounts',
65
- },
66
- {
67
- value: '62',
68
- title: 'Orders',
69
- },
70
- {
71
- value: '500.125',
72
- unit: 'USD',
73
- title: 'Turnover',
74
- },
75
- {
76
- value: '340',
77
- unit: 'USD',
78
- title: 'PNL',
79
- icon: <Icon name="arrow-up" color="#2CA24D" size={16} />,
80
- },
81
- {
82
- value: '25',
83
- unit: '%',
84
- title: 'ROI',
85
- icon: <Icon name="arrow-up" color="#2CA24D" size={16} />,
86
- },
87
- {
88
- value: '15',
89
- title: 'Errors',
90
- },
91
- ];
92
-
93
- export const linkBoardArr = [
94
- {
95
- value: '16',
96
- title: 'Exchanges',
97
- link: '/Exchanges',
98
- },
99
- {
100
- value: '6',
101
- title: 'Accounts',
102
- link: '/Accounts',
103
- },
104
- {
105
- value: '62',
106
- title: 'Orders',
107
- link: '/Orders',
108
- },
109
- {
110
- value: '500.025',
111
- unit: 'USD',
112
- title: 'Turnover',
113
- link: '/Turnover',
114
- },
115
- {
116
- value: '340',
117
- unit: 'USD',
118
- title: 'PNL',
119
- icon: <Icon name="arrow-up" color="#2CA24D" size={16} />,
120
- link: '/PNL',
121
- },
122
- {
123
- value: '25',
124
- unit: '%',
125
- title: 'ROI',
126
- icon: <Icon name="arrow-up" color="#2CA24D" size={16} />,
127
- link: '/ROI',
128
- },
129
- {
130
- value: '15',
131
- title: 'Errors',
132
- link: '/Errors',
133
- },
134
- ];
@@ -1,2 +0,0 @@
1
- export { default as TradingScoreboard } from './TradingScoreboard';
2
- export * from './types';
@@ -1,18 +0,0 @@
1
- import { TradingInfoCardProps } from '@components/TradingInfoCard/types';
2
- import { SerializedStyles } from '@emotion/react';
3
-
4
- type TradingScoreboardItem = Pick<
5
- TradingInfoCardProps,
6
- 'value' | 'unit' | 'title' | 'icon' | 'link'
7
- >;
8
-
9
- export interface TradingScoreboardProps {
10
- itemsPerRow: number;
11
- items: Array<TradingScoreboardItem>;
12
- onClick?: (item: TradingScoreboardItem) => void;
13
- renderCard?: (
14
- item: TradingScoreboardItem,
15
- onClick?: (item: TradingScoreboardItem) => void,
16
- ) => React.ReactNode;
17
- css?: SerializedStyles;
18
- }
@@ -1,64 +0,0 @@
1
- import { useTheme, css } from '@emotion/react';
2
-
3
- import {
4
- Avatar,
5
- Button,
6
- Card,
7
- CardContent,
8
- Wrapper,
9
- Typography,
10
- Icon,
11
- } from '@ssa-ui-kit/core';
12
-
13
- import { UpcomingWorkoutCardProps } from './types';
14
- import { contentWrapper } from './style';
15
-
16
- /**
17
- *
18
- * UI Component that use CardList to render a list of upcoming workouts
19
- */
20
- export const UpcomingWorkoutCard = ({
21
- image,
22
- title,
23
- workoutTime,
24
- renderDetails,
25
- onClick,
26
- }: UpcomingWorkoutCardProps) => {
27
- const theme = useTheme();
28
- return (
29
- <Card noShadow>
30
- <Wrapper direction="row">
31
- <Avatar size={42} image={image} />
32
-
33
- <CardContent
34
- css={css`
35
- width: calc(100% - 42px);
36
- `}>
37
- <Wrapper direction="column">
38
- <div css={contentWrapper}>
39
- <Typography variant="h6">{title}</Typography>
40
- <Button
41
- endIcon={<Icon name="more" />}
42
- variant="tertiary"
43
- size="small"
44
- onClick={onClick}
45
- />
46
- </div>
47
-
48
- <div css={contentWrapper}>
49
- <Typography
50
- variant="subtitle"
51
- color={theme.colors.greyDarker60}
52
- as="p">
53
- {renderDetails()}
54
- </Typography>
55
- <Typography variant="subtitle" as="p">
56
- {workoutTime}
57
- </Typography>
58
- </div>
59
- </Wrapper>
60
- </CardContent>
61
- </Wrapper>
62
- </Card>
63
- );
64
- };
@@ -1,56 +0,0 @@
1
- import { fireEvent, screen, waitFor } from '../../../customTest';
2
- import UpcomingWorkouts from './index';
3
-
4
- describe('UpcomingWorkouts', () => {
5
- it('Render component', async () => {
6
- const mockClick = jest.fn();
7
-
8
- render(
9
- <UpcomingWorkouts
10
- workouts={[
11
- {
12
- id: 'cardio_training',
13
- image:
14
- 'https://firebasestorage.googleapis.com/v0/b/admin-themes.appspot.com/o/img%2Fmat%2Fmat_42.png?alt=media&token=462a4e3c-4e57-4f76-aad3-97b72c75b4ff',
15
- title: 'HIIT Cardio training',
16
- workoutTime: '8:00 AM',
17
- handleClick: mockClick,
18
- details: {
19
- exercises: 40,
20
- minutes: 20,
21
- },
22
- },
23
- {
24
- id: 'other_training',
25
- image:
26
- 'https://firebasestorage.googleapis.com/v0/b/admin-themes.appspot.com/o/img%2Fmat%2Fmat_42.png?alt=media&token=462a4e3c-4e57-4f76-aad3-97b72c75b4ff',
27
- title: 'Other training',
28
- workoutTime: '8:00 AM',
29
- handleClick: mockClick,
30
- details: {
31
- exercises: 40,
32
- minutes: 20,
33
- },
34
- },
35
- ]}
36
- />,
37
- );
38
-
39
- await waitFor(async () => {
40
- const list = await screen.findAllByRole('listitem');
41
- const itemA = await screen.findByText('HIIT Cardio training');
42
- const itemB = await screen.findByText('Other training');
43
-
44
- expect(list.length).toBe(2);
45
- expect(itemA).toBeInTheDocument();
46
- expect(itemB).toBeInTheDocument();
47
-
48
- const btn = screen.queryAllByRole('button')[0];
49
-
50
- await fireEvent.click(btn);
51
-
52
- expect(mockClick).toHaveBeenCalled();
53
- expect(mockClick).toHaveBeenCalledTimes(1);
54
- });
55
- });
56
- });
@@ -1,32 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
-
3
- import { UpcomingWorkouts } from './UpcomingWorkouts';
4
-
5
- export default {
6
- title: 'Fitness/UpcomingWorkouts',
7
- component: UpcomingWorkouts,
8
- } as Meta<typeof UpcomingWorkouts>;
9
-
10
- export const Default: StoryObj<typeof UpcomingWorkouts> = () => {
11
- return (
12
- <div style={{ background: '#f1f1f1', padding: 20 }}>
13
- <UpcomingWorkouts
14
- workouts={[
15
- {
16
- id: 'cardio_training',
17
- image:
18
- 'https://firebasestorage.googleapis.com/v0/b/admin-themes.appspot.com/o/img%2Fmat%2Fmat_42.png?alt=media&token=462a4e3c-4e57-4f76-aad3-97b72c75b4ff',
19
- title: 'HIIT Cardio training',
20
- workoutTime: '8:00 AM',
21
- details: {
22
- exercises: 40,
23
- minutes: 20,
24
- },
25
- },
26
- ]}
27
- />
28
- </div>
29
- );
30
- };
31
-
32
- Default.storyName = 'UpcomingWorkouts';
@@ -1,27 +0,0 @@
1
- import { Fragment } from 'react';
2
-
3
- import { CardList } from '@ssa-ui-kit/core';
4
-
5
- import { UpcomingWorkoutCard } from './UpcomingWorkoutCard';
6
-
7
- import { UpcomingWorkoutsProps } from './types';
8
-
9
- export const UpcomingWorkouts = ({ workouts }: UpcomingWorkoutsProps) => (
10
- <CardList
11
- title="Upcoming Workout"
12
- items={workouts}
13
- renderItem={(workout) => (
14
- <UpcomingWorkoutCard
15
- image={workout.image}
16
- title={workout.title}
17
- workoutTime={workout.workoutTime}
18
- onClick={workout.handleClick}
19
- renderDetails={() => (
20
- <Fragment>
21
- <strong>{workout.details.exercises}</strong> Exercises |{' '}
22
- <strong>{workout.details.minutes}</strong> mins
23
- </Fragment>
24
- )}
25
- />
26
- )}></CardList>
27
- );
@@ -1,2 +0,0 @@
1
- export { UpcomingWorkouts as default } from './UpcomingWorkouts';
2
- export * from './types';
@@ -1,12 +0,0 @@
1
- import { css } from '@emotion/react';
2
-
3
- export const contentWrapper = () => css`
4
- display: flex;
5
-
6
- justify-content: space-between;
7
- align-items: center;
8
-
9
- width: 100%;
10
-
11
- padding-left: 15px;
12
- `;
@@ -1,23 +0,0 @@
1
- export interface UpcomingWorkoutCardProps {
2
- image: string;
3
- title: string;
4
- workoutTime: string;
5
- renderDetails: () => React.ReactNode;
6
- onClick?: () => void;
7
- }
8
-
9
- export type Workout = {
10
- id: string;
11
- image: string;
12
- title: string;
13
- workoutTime: string;
14
- handleClick?: () => void;
15
- details: {
16
- exercises: number;
17
- minutes: number;
18
- };
19
- };
20
-
21
- export interface UpcomingWorkoutsProps {
22
- workouts: Array<Workout>;
23
- }
@@ -1,46 +0,0 @@
1
- import { Fragment } from 'react';
2
- import { css, Theme } from '@emotion/react';
3
-
4
- import { Icon } from '@ssa-ui-kit/core';
5
-
6
- import { User } from './types';
7
-
8
- import UserCardBMI from './UserCardBMI';
9
- import UserCardCredentials from './UserCardCredentials';
10
-
11
- const container = (theme: Theme) => css`
12
- display: grid;
13
- grid-template-columns: 50px auto;
14
- align-items: center;
15
-
16
- ${theme.mediaQueries.lg} {
17
- grid-template-columns: auto;
18
- }
19
- `;
20
-
21
- const UserCard = ({ user }: { user: User | null }) => (
22
- <Fragment>
23
- <div css={container}>
24
- <div
25
- css={(theme: Theme) => css`
26
- ${theme.mediaQueries.lg} {
27
- display: none;
28
- }
29
- `}>
30
- <label
31
- htmlFor="aside"
32
- css={css`
33
- cursor: pointer;
34
- `}>
35
- <Icon name="carrot-left" size={16} />
36
- </label>
37
- </div>
38
-
39
- <UserCardCredentials name={user?.name} email={user?.email} />
40
- </div>
41
-
42
- <UserCardBMI weight={user?.weight} height={user?.height} age={user?.age} />
43
- </Fragment>
44
- );
45
-
46
- export default UserCard;
@@ -1,37 +0,0 @@
1
- import { css } from '@emotion/react';
2
-
3
- import UserCardItem from './UserCardItem';
4
-
5
- import { User } from './types';
6
-
7
- const listCards = css`
8
- display: flex;
9
- justify-content: space-between;
10
-
11
- list-style: none;
12
- padding: 0;
13
-
14
- li {
15
- max-width: 92px;
16
- }
17
- `;
18
-
19
- const UserCardBMI = ({
20
- weight,
21
- height,
22
- age,
23
- }: Partial<Pick<User, 'weight' | 'height' | 'age'>>) => (
24
- <ul css={listCards}>
25
- <li>
26
- <UserCardItem value={weight || ''} unit="kg" caption="Weight" />
27
- </li>
28
- <li>
29
- <UserCardItem value={height || ''} unit="cm" caption="Height" />
30
- </li>
31
- <li>
32
- <UserCardItem value={age || ''} unit="yrs" caption="Age" />
33
- </li>
34
- </ul>
35
- );
36
-
37
- export default UserCardBMI;
@@ -1,56 +0,0 @@
1
- import { css, Theme } from '@emotion/react';
2
-
3
- import { Avatar, Button, Typography, Icon } from '@ssa-ui-kit/core';
4
-
5
- import { User } from './types';
6
-
7
- const container = (theme: Theme) => css`
8
- display: flex;
9
- align-items: center;
10
-
11
- button {
12
- display: none;
13
- }
14
-
15
- ${theme.mediaQueries.lg} {
16
- justify-content: space-between;
17
-
18
- button {
19
- display: block;
20
- }
21
- }
22
- `;
23
- const UserCardCredentials = ({
24
- name,
25
- email,
26
- }: Partial<Pick<User, 'name' | 'email'>>) => (
27
- <div css={container}>
28
- <div
29
- css={css`
30
- display: flex;
31
- align-items: center;
32
- `}>
33
- <Avatar
34
- size={42}
35
- image={
36
- 'https://firebasestorage.googleapis.com/v0/b/admin-themes.appspot.com/o/img%2Fface%2Fface_46.png?alt=media&token=aaa3a75c-4779-4887-b011-352f8dd6c214'
37
- }
38
- />
39
- <div
40
- css={css`
41
- padding-inline: 15px;
42
- `}>
43
- <Typography variant="subtitle">{name}</Typography>
44
- <Typography variant="body1">{email}</Typography>
45
- </div>
46
- </div>
47
-
48
- <Button
49
- variant="tertiary"
50
- size="large"
51
- endIcon={<Icon name="notification" />}
52
- />
53
- </div>
54
- );
55
-
56
- export default UserCardCredentials;
@@ -1,42 +0,0 @@
1
- import { Theme, css } from '@emotion/react';
2
-
3
- import { Typography, Wrapper } from '@ssa-ui-kit/core';
4
-
5
- const cardShadow = (theme: Theme) => css`
6
- display: flex;
7
-
8
- width: 92px;
9
- height: 68px;
10
-
11
- align-items: center;
12
- flex-flow: column;
13
- justify-content: center;
14
-
15
- background: ${theme.colors.white};
16
- border-radius: 16px;
17
- box-shadow: 0 10px 40px rgba(42, 48, 57, 0.08);
18
- `;
19
-
20
- interface UserCardItemProps {
21
- value: string | number;
22
- unit: string;
23
- caption: string;
24
- }
25
-
26
- const UserCardItem = ({ value, unit, caption }: UserCardItemProps) => (
27
- <div css={cardShadow}>
28
- <Wrapper
29
- css={css`
30
- align-items: baseline;
31
- justify-content: center;
32
- `}>
33
- <Typography variant="h4" weight="bold">
34
- {value}
35
- </Typography>
36
- <Typography variant="subtitle">{unit}</Typography>
37
- </Wrapper>
38
- <Typography variant="subtitle">{caption}</Typography>
39
- </div>
40
- );
41
-
42
- export default UserCardItem;
@@ -1,2 +0,0 @@
1
- export { default } from './UserCard';
2
- export * from './types';
@@ -1,8 +0,0 @@
1
- export type User = {
2
- id: string;
3
- name: string;
4
- email: string;
5
- weight: number;
6
- height: number;
7
- age: number;
8
- };