@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.
- package/dist/components/AccountBalance/AccountBalance.d.ts +1 -1
- package/dist/components/AccountBalance/BalancePieChart.d.ts +1 -1
- package/dist/components/AccountBalance/BalancePieChartTitle.d.ts +1 -1
- package/dist/components/AccountKeys/AccountKeys.d.ts +1 -1
- package/dist/components/AccountKeys/stories/StoryComponent.d.ts +1 -1
- package/dist/components/Activity/Activity.d.ts +1 -1
- package/dist/components/Activity/ActivityItem.d.ts +1 -1
- package/dist/components/Bmi/Bmi.d.ts +1 -1
- package/dist/components/Bmi/BmiLabels.d.ts +1 -1
- package/dist/components/BotsTable/BotsTable.d.ts +1 -1
- package/dist/components/BotsTable/stories/BotsTable/StoryComponent.d.ts +1 -1
- package/dist/components/BotsTable/stories/BotsTable/components/Actions/ActionIcon.d.ts +1 -1
- package/dist/components/BotsTable/stories/BotsTable/components/Actions/ActionItem.d.ts +1 -1
- package/dist/components/BotsTable/stories/BotsTable/components/Actions/ActionMore.d.ts +1 -1
- package/dist/components/BotsTable/stories/BotsTable/components/Actions/ActionRun.d.ts +1 -1
- package/dist/components/BotsTable/stories/BotsTable/components/Actions/Actions.d.ts +1 -1
- package/dist/components/BotsTable/stories/BotsTable/components/Actions/ActionsWrapper.d.ts +1 -1
- package/dist/components/BotsTable/stories/BotsTable/components/Actions/consts.d.ts +3 -3
- package/dist/components/BotsTable/stories/BotsTable/components/Exchange/Exchange.d.ts +1 -1
- package/dist/components/BotsTable/stories/BotsTable/components/Exchange/consts.d.ts +3 -3
- package/dist/components/BotsTable/stories/BotsTable/components/PNL.d.ts +1 -1
- package/dist/components/BotsTable/stories/BotsTable/components/ROI.d.ts +1 -1
- package/dist/components/BotsTable/stories/BotsTable/components/TableTag.d.ts +1 -1
- package/dist/components/BotsTable/stories/BotsTable/components/Trade/Trade.d.ts +1 -1
- package/dist/components/BotsTable/stories/NoControlOrders/StoryComponent.d.ts +1 -1
- package/dist/components/BotsTable/stories/NoControlOrders/components/ActionMore.d.ts +1 -1
- package/dist/components/BotsTable/stories/NoControlOrders/components/Reason.d.ts +1 -1
- package/dist/components/BotsTable/stories/NoControlOrders/components/TableList.d.ts +1 -1
- package/dist/components/BotsTable/stories/NoControlOrders/components/TableRow.d.ts +1 -1
- package/dist/components/Calories/Calories.d.ts +1 -1
- package/dist/components/Calories/innerContent.d.ts +1 -1
- package/dist/components/ExchangeAccount/ExchangeAccount.d.ts +1 -1
- package/dist/components/HeartRate/BPM.d.ts +1 -1
- package/dist/components/HeartRate/HeartRate.d.ts +1 -1
- package/dist/components/HeartRate/HeartRateLineChart.d.ts +1 -1
- package/dist/components/ListGoals/ListGoals.d.ts +1 -1
- package/dist/components/ListGoals/ListGoalsCard.d.ts +1 -1
- package/dist/components/MealNutrients/MealNutrients.d.ts +1 -1
- package/dist/components/MealNutrients/MealNutrientsLineChart.d.ts +1 -1
- package/dist/components/MealNutrients/MealNutrientsTooltip.d.ts +1 -1
- package/dist/components/MealPlanner/MealPlanner.d.ts +1 -1
- package/dist/components/MealPlanner/MealPlannerCard.d.ts +1 -1
- package/dist/components/StepsCounter/StepsCounter.d.ts +1 -1
- package/dist/components/TradingInfoCard/TradingInfoCard.d.ts +1 -1
- package/dist/components/TradingInfoCard/TradingInfoCardContent.d.ts +1 -1
- package/dist/components/TradingInfoCard/TradingInfoCardTooltip.d.ts +1 -1
- package/dist/components/TradingInfoCard/TradingInfoCardWrapper.d.ts +1 -1
- package/dist/components/TradingScoreboard/TradingScoreboard.d.ts +1 -1
- package/dist/components/TradingScoreboard/helpers.d.ts +4 -4
- package/dist/components/UpcomingWorkouts/UpcomingWorkoutCard.d.ts +1 -1
- package/dist/components/UpcomingWorkouts/UpcomingWorkouts.d.ts +1 -1
- package/dist/components/UserCard/UserCard.d.ts +1 -1
- package/dist/components/UserCard/UserCardBMI.d.ts +1 -1
- package/dist/components/UserCard/UserCardCredentials.d.ts +1 -1
- package/dist/components/UserCard/UserCardItem.d.ts +1 -1
- package/dist/components/WaterConsume/WaterConsume.d.ts +1 -1
- package/dist/index.js +2439 -1
- package/dist/index.js.map +1 -1
- package/package.json +24 -27
- package/.babelrc.js +0 -4
- package/.env +0 -7
- package/.storybook/main.ts +0 -47
- package/.storybook/preview.tsx +0 -22
- package/.storybook/style.css +0 -40
- package/custom-shots/widgets-bots-table--no-control-orders--menu-opened_[w1920px].png +0 -0
- package/custom-shots/widgets-bots-table--no-control-orders--run-reason-modal_[w1920px].png +0 -0
- package/custom-shots/widgets-heart-rate--hint-opened__[w1440px].png +0 -0
- package/custom-shots/widgets-heart-rate--hint-opened__[w1920px].png +0 -0
- package/custom-shots/widgets-heart-rate--hint-opened__[w390px].png +0 -0
- package/custom-shots/widgets-heart-rate--hint-opened__[w900px].png +0 -0
- package/custom-shots/widgets-meal-nutrients--hint-opened__[w1440px].png +0 -0
- package/custom-shots/widgets-meal-nutrients--hint-opened__[w1920px].png +0 -0
- package/custom-shots/widgets-meal-nutrients--hint-opened__[w390px].png +0 -0
- package/custom-shots/widgets-meal-nutrients--hint-opened__[w900px].png +0 -0
- package/custom-shots/widgets-meal-nutrients--hint-opened__dropdown__[w1440px].png +0 -0
- package/custom-shots/widgets-meal-nutrients--hint-opened__dropdown__[w1920px].png +0 -0
- package/custom-shots/widgets-meal-nutrients--hint-opened__dropdown__[w390px].png +0 -0
- package/custom-shots/widgets-meal-nutrients--hint-opened__dropdown__[w900px].png +0 -0
- package/custom-shots/widgets-trading-info-card--hover__[w1920px].png +0 -0
- package/customTest.tsx +0 -35
- package/jest-setup.ts +0 -20
- package/lostpixel.config.ts +0 -29
- package/playwright.config.ts +0 -7
- package/src/components/AccountBalance/AccountBalance.specBackup.tsx +0 -105
- package/src/components/AccountBalance/AccountBalance.stories.tsx +0 -138
- package/src/components/AccountBalance/AccountBalance.tsx +0 -60
- package/src/components/AccountBalance/BalancePieChart.tsx +0 -127
- package/src/components/AccountBalance/BalancePieChartTitle.tsx +0 -54
- package/src/components/AccountBalance/index.ts +0 -4
- package/src/components/AccountBalance/stories/fixtures.ts +0 -26
- package/src/components/AccountBalance/types.ts +0 -41
- package/src/components/AccountKeys/AccountKeys.specBackup.tsx +0 -43
- package/src/components/AccountKeys/AccountKeys.stories.tsx +0 -14
- package/src/components/AccountKeys/AccountKeys.tsx +0 -73
- package/src/components/AccountKeys/helpers.ts +0 -7
- package/src/components/AccountKeys/index.ts +0 -2
- package/src/components/AccountKeys/stories/StoryComponent.tsx +0 -33
- package/src/components/AccountKeys/styles.ts +0 -87
- package/src/components/AccountKeys/types.ts +0 -8
- package/src/components/Activity/Activity.specBackup.tsx +0 -79
- package/src/components/Activity/Activity.stories.tsx +0 -15
- package/src/components/Activity/Activity.tsx +0 -83
- package/src/components/Activity/ActivityItem.tsx +0 -38
- package/src/components/Activity/index.tsx +0 -2
- package/src/components/Activity/mockActivityRequest.ts +0 -106
- package/src/components/Activity/styles.ts +0 -12
- package/src/components/Activity/types.ts +0 -10
- package/src/components/Bmi/Bmi.spec.Backup.tsx +0 -68
- package/src/components/Bmi/Bmi.stories.tsx +0 -10
- package/src/components/Bmi/Bmi.tsx +0 -96
- package/src/components/Bmi/BmiHeatbar.tsx +0 -18
- package/src/components/Bmi/BmiInfo.tsx +0 -11
- package/src/components/Bmi/BmiLabel.tsx +0 -9
- package/src/components/Bmi/BmiLabels.tsx +0 -33
- package/src/components/Bmi/BmiPointer.tsx +0 -15
- package/src/components/Bmi/index.tsx +0 -2
- package/src/components/Bmi/styles.ts +0 -18
- package/src/components/Bmi/types.ts +0 -4
- package/src/components/BotsTable/BotsTable.e2e.ts +0 -77
- package/src/components/BotsTable/BotsTable.specBackup.tsx +0 -125
- package/src/components/BotsTable/BotsTable.tsx +0 -32
- package/src/components/BotsTable/BotsTableCell.tsx +0 -13
- package/src/components/BotsTable/BotsTableHead.tsx +0 -13
- package/src/components/BotsTable/BotsTableRow.tsx +0 -17
- package/src/components/BotsTable/BotsTableWrapper.tsx +0 -23
- package/src/components/BotsTable/index.ts +0 -5
- package/src/components/BotsTable/stories/BotsTable/StoryComponent.tsx +0 -59
- package/src/components/BotsTable/stories/BotsTable/components/Actions/ActionIcon.tsx +0 -11
- package/src/components/BotsTable/stories/BotsTable/components/Actions/ActionItem.tsx +0 -40
- package/src/components/BotsTable/stories/BotsTable/components/Actions/ActionMore.tsx +0 -89
- package/src/components/BotsTable/stories/BotsTable/components/Actions/ActionRun.tsx +0 -133
- package/src/components/BotsTable/stories/BotsTable/components/Actions/Actions.tsx +0 -13
- package/src/components/BotsTable/stories/BotsTable/components/Actions/ActionsWrapper.tsx +0 -21
- package/src/components/BotsTable/stories/BotsTable/components/Actions/consts.tsx +0 -118
- package/src/components/BotsTable/stories/BotsTable/components/Actions/index.ts +0 -6
- package/src/components/BotsTable/stories/BotsTable/components/Exchange/Exchange.tsx +0 -26
- package/src/components/BotsTable/stories/BotsTable/components/Exchange/consts.tsx +0 -157
- package/src/components/BotsTable/stories/BotsTable/components/Exchange/index.ts +0 -1
- package/src/components/BotsTable/stories/BotsTable/components/Exchange/types.ts +0 -6
- package/src/components/BotsTable/stories/BotsTable/components/PNL.tsx +0 -27
- package/src/components/BotsTable/stories/BotsTable/components/ROI.tsx +0 -25
- package/src/components/BotsTable/stories/BotsTable/components/TableTag.tsx +0 -22
- package/src/components/BotsTable/stories/BotsTable/components/Trade/Trade.tsx +0 -8
- package/src/components/BotsTable/stories/BotsTable/components/Trade/consts.ts +0 -14
- package/src/components/BotsTable/stories/BotsTable/components/Trade/index.ts +0 -1
- package/src/components/BotsTable/stories/BotsTable/components/Trade/types.ts +0 -5
- package/src/components/BotsTable/stories/BotsTable/components/index.ts +0 -6
- package/src/components/BotsTable/stories/BotsTable/index.ts +0 -1
- package/src/components/BotsTable/stories/BotsTable/mockData.ts +0 -84
- package/src/components/BotsTable/stories/BotsTable.stories.tsx +0 -39
- package/src/components/BotsTable/stories/NoControlOrders/StoryComponent.tsx +0 -35
- package/src/components/BotsTable/stories/NoControlOrders/components/ActionMore.tsx +0 -95
- package/src/components/BotsTable/stories/NoControlOrders/components/Reason.tsx +0 -11
- package/src/components/BotsTable/stories/NoControlOrders/components/TableList.tsx +0 -45
- package/src/components/BotsTable/stories/NoControlOrders/components/TableRow.tsx +0 -31
- package/src/components/BotsTable/stories/NoControlOrders/components/index.ts +0 -4
- package/src/components/BotsTable/stories/NoControlOrders/mockData.ts +0 -23
- package/src/components/BotsTable/stories/NoControlOrders/types.ts +0 -16
- package/src/components/BotsTable/types.ts +0 -31
- package/src/components/Calories/Calories.specBackup.tsx +0 -11
- package/src/components/Calories/Calories.stories.tsx +0 -26
- package/src/components/Calories/Calories.tsx +0 -54
- package/src/components/Calories/index.tsx +0 -2
- package/src/components/Calories/innerContent.tsx +0 -30
- package/src/components/Calories/types.ts +0 -4
- package/src/components/ExchangeAccount/ExchangeAccount.specBackup.tsx +0 -104
- package/src/components/ExchangeAccount/ExchangeAccount.stories.tsx +0 -108
- package/src/components/ExchangeAccount/ExchangeAccount.tsx +0 -90
- package/src/components/ExchangeAccount/helpers.tsx +0 -153
- package/src/components/ExchangeAccount/index.ts +0 -2
- package/src/components/ExchangeAccount/styles.ts +0 -115
- package/src/components/ExchangeAccount/types.ts +0 -14
- package/src/components/HeartRate/BPM.tsx +0 -43
- package/src/components/HeartRate/HeartRate.e2e.ts +0 -78
- package/src/components/HeartRate/HeartRate.specBackup.tsx +0 -91
- package/src/components/HeartRate/HeartRate.stories.tsx +0 -36
- package/src/components/HeartRate/HeartRate.tsx +0 -105
- package/src/components/HeartRate/HeartRateLineChart.tsx +0 -53
- package/src/components/HeartRate/index.ts +0 -2
- package/src/components/HeartRate/mockHeartRateRequest.ts +0 -15
- package/src/components/HeartRate/types.ts +0 -15
- package/src/components/HeartRate/utils.tsx +0 -8
- package/src/components/ListGoals/ListGoals.specBackup.tsx +0 -82
- package/src/components/ListGoals/ListGoals.stories.tsx +0 -58
- package/src/components/ListGoals/ListGoals.tsx +0 -29
- package/src/components/ListGoals/ListGoalsCard.tsx +0 -61
- package/src/components/ListGoals/index.ts +0 -2
- package/src/components/ListGoals/styles.tsx +0 -11
- package/src/components/ListGoals/types.ts +0 -25
- package/src/components/MealNutrients/MealNutrients.e2e.ts +0 -68
- package/src/components/MealNutrients/MealNutrients.specBackup.tsx +0 -134
- package/src/components/MealNutrients/MealNutrients.stories.tsx +0 -37
- package/src/components/MealNutrients/MealNutrients.tsx +0 -84
- package/src/components/MealNutrients/MealNutrientsLineChart.tsx +0 -89
- package/src/components/MealNutrients/MealNutrientsTooltip.tsx +0 -30
- package/src/components/MealNutrients/chartDefaultConfig.tsx +0 -87
- package/src/components/MealNutrients/index.tsx +0 -2
- package/src/components/MealNutrients/mockMealNutrientsRequest.ts +0 -1246
- package/src/components/MealNutrients/types.ts +0 -37
- package/src/components/MealNutrients/useChartConfig.ts +0 -69
- package/src/components/MealPlanner/MealPlanner.specBackup.tsx +0 -77
- package/src/components/MealPlanner/MealPlanner.stories.tsx +0 -15
- package/src/components/MealPlanner/MealPlanner.tsx +0 -100
- package/src/components/MealPlanner/MealPlannerBadge.tsx +0 -15
- package/src/components/MealPlanner/MealPlannerBars.tsx +0 -19
- package/src/components/MealPlanner/MealPlannerCard.tsx +0 -73
- package/src/components/MealPlanner/MealPlannerLegends.tsx +0 -22
- package/src/components/MealPlanner/index.ts +0 -2
- package/src/components/MealPlanner/mockMealPlannerRequest.ts +0 -70
- package/src/components/MealPlanner/types.ts +0 -21
- package/src/components/StepsCounter/StepsCounter.specBackup.tsx +0 -14
- package/src/components/StepsCounter/StepsCounter.stories.tsx +0 -16
- package/src/components/StepsCounter/StepsCounter.tsx +0 -74
- package/src/components/StepsCounter/index.ts +0 -2
- package/src/components/StepsCounter/types.ts +0 -4
- package/src/components/TradingInfoCard/TradingInfoCard.e2e.ts +0 -18
- package/src/components/TradingInfoCard/TradingInfoCard.specBackup.tsx +0 -116
- package/src/components/TradingInfoCard/TradingInfoCard.stories.tsx +0 -118
- package/src/components/TradingInfoCard/TradingInfoCard.tsx +0 -49
- package/src/components/TradingInfoCard/TradingInfoCardContent.tsx +0 -32
- package/src/components/TradingInfoCard/TradingInfoCardTooltip.tsx +0 -47
- package/src/components/TradingInfoCard/TradingInfoCardWrapper.tsx +0 -72
- package/src/components/TradingInfoCard/index.ts +0 -3
- package/src/components/TradingInfoCard/types.ts +0 -27
- package/src/components/TradingScoreboard/TradingScoreboard.specBackup.tsx +0 -119
- package/src/components/TradingScoreboard/TradingScoreboard.stories.tsx +0 -119
- package/src/components/TradingScoreboard/TradingScoreboard.tsx +0 -41
- package/src/components/TradingScoreboard/TradingScoreboardBase.tsx +0 -17
- package/src/components/TradingScoreboard/helpers.tsx +0 -134
- package/src/components/TradingScoreboard/index.ts +0 -2
- package/src/components/TradingScoreboard/types.ts +0 -18
- package/src/components/UpcomingWorkouts/UpcomingWorkoutCard.tsx +0 -64
- package/src/components/UpcomingWorkouts/UpcomingWorkouts.specBackup.tsx +0 -56
- package/src/components/UpcomingWorkouts/UpcomingWorkouts.stories.tsx +0 -32
- package/src/components/UpcomingWorkouts/UpcomingWorkouts.tsx +0 -27
- package/src/components/UpcomingWorkouts/index.ts +0 -2
- package/src/components/UpcomingWorkouts/style.ts +0 -12
- package/src/components/UpcomingWorkouts/types.ts +0 -23
- package/src/components/UserCard/UserCard.tsx +0 -46
- package/src/components/UserCard/UserCardBMI.tsx +0 -37
- package/src/components/UserCard/UserCardCredentials.tsx +0 -56
- package/src/components/UserCard/UserCardItem.tsx +0 -42
- package/src/components/UserCard/index.tsx +0 -2
- package/src/components/UserCard/types.ts +0 -8
- package/src/components/WaterConsume/WaterConsume.specBackup.tsx +0 -62
- package/src/components/WaterConsume/WaterConsume.stories.tsx +0 -36
- package/src/components/WaterConsume/WaterConsume.tsx +0 -188
- package/src/components/WaterConsume/index.ts +0 -2
- package/src/components/WaterConsume/types.ts +0 -11
- package/src/consts.ts +0 -18
- package/src/index.ts +0 -36
- package/src/injectGlobal.ts +0 -41
- package/test-results/.last-run.json +0 -21
- package/tsbuildcache +0 -1
- package/tsconfig.build.json +0 -44
- package/tsconfig.json +0 -17
- package/webpack.config.js +0 -28
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { screen, within } from '../../../customTest';
|
|
2
|
-
|
|
3
|
-
import WaterConsume from './index';
|
|
4
|
-
|
|
5
|
-
const steps = [
|
|
6
|
-
{
|
|
7
|
-
title: '600ml',
|
|
8
|
-
caption: '2pm - 4pm',
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
title: '500ml',
|
|
12
|
-
caption: '11am - 2pm',
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
title: '1000ml',
|
|
16
|
-
caption: '9am - 11am',
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
title: '700ml',
|
|
20
|
-
caption: '6am - 8am',
|
|
21
|
-
},
|
|
22
|
-
];
|
|
23
|
-
|
|
24
|
-
const checkListItems = async () => {
|
|
25
|
-
const listItems = await screen.findAllByRole('listitem');
|
|
26
|
-
|
|
27
|
-
for (let i = 0; i < listItems.length; ++i) {
|
|
28
|
-
const itemEl = listItems[i];
|
|
29
|
-
within(itemEl).getByText(steps[steps.length - i - 1].title);
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
describe('WaterConsume', () => {
|
|
34
|
-
it('Renders with a custom unit', async () => {
|
|
35
|
-
render(
|
|
36
|
-
<WaterConsume
|
|
37
|
-
minValue={0}
|
|
38
|
-
maxValue={3}
|
|
39
|
-
currentValue={2.7}
|
|
40
|
-
unit={'L'}
|
|
41
|
-
active={2}
|
|
42
|
-
steps={steps}
|
|
43
|
-
/>,
|
|
44
|
-
);
|
|
45
|
-
|
|
46
|
-
screen.getByText('0L');
|
|
47
|
-
screen.getByText('2.7L');
|
|
48
|
-
screen.getByText('3L');
|
|
49
|
-
|
|
50
|
-
await checkListItems();
|
|
51
|
-
});
|
|
52
|
-
|
|
53
|
-
it('Render with the default unit (%)', async () => {
|
|
54
|
-
render(<WaterConsume currentValue={50} active={1} steps={steps} />);
|
|
55
|
-
|
|
56
|
-
screen.getByText('0%');
|
|
57
|
-
screen.getByText('50%');
|
|
58
|
-
screen.getByText('100%');
|
|
59
|
-
|
|
60
|
-
await checkListItems();
|
|
61
|
-
});
|
|
62
|
-
});
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import type { Meta } from '@storybook/react';
|
|
2
|
-
|
|
3
|
-
import { WaterConsume } from './WaterConsume';
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
title: 'Fitness/WaterConsume',
|
|
7
|
-
component: WaterConsume,
|
|
8
|
-
} as Meta<typeof WaterConsume>;
|
|
9
|
-
|
|
10
|
-
export const Default = {
|
|
11
|
-
args: {
|
|
12
|
-
minValue: 0,
|
|
13
|
-
maxValue: 3,
|
|
14
|
-
currentValue: 2.7,
|
|
15
|
-
unit: 'L',
|
|
16
|
-
active: 3,
|
|
17
|
-
steps: [
|
|
18
|
-
{
|
|
19
|
-
title: '600ml',
|
|
20
|
-
caption: '2pm - 4pm',
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
title: '500ml',
|
|
24
|
-
caption: '11am - 2pm',
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
title: '1000ml',
|
|
28
|
-
caption: '9am - 11am',
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
title: '700ml',
|
|
32
|
-
caption: '6am - 8am',
|
|
33
|
-
},
|
|
34
|
-
],
|
|
35
|
-
},
|
|
36
|
-
};
|
|
@@ -1,188 +0,0 @@
|
|
|
1
|
-
import { css, useTheme } from '@emotion/react';
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
Card,
|
|
5
|
-
CardContent,
|
|
6
|
-
CardHeader,
|
|
7
|
-
Stepper,
|
|
8
|
-
Step,
|
|
9
|
-
StepLabel,
|
|
10
|
-
Typography,
|
|
11
|
-
ResponsiveImage,
|
|
12
|
-
ProgressBar,
|
|
13
|
-
ProgressLegend,
|
|
14
|
-
ProgressLegendItem,
|
|
15
|
-
ProgressVertical,
|
|
16
|
-
} from '@ssa-ui-kit/core';
|
|
17
|
-
|
|
18
|
-
import { WaterConsumeProps } from './types';
|
|
19
|
-
|
|
20
|
-
const CustomConnector = ({
|
|
21
|
-
active,
|
|
22
|
-
completed,
|
|
23
|
-
}: {
|
|
24
|
-
active?: boolean;
|
|
25
|
-
completed?: boolean;
|
|
26
|
-
}) => {
|
|
27
|
-
const theme = useTheme();
|
|
28
|
-
return (
|
|
29
|
-
<div
|
|
30
|
-
css={css`
|
|
31
|
-
flex: 1 1 auto;
|
|
32
|
-
margin-left: 11.5px;
|
|
33
|
-
`}>
|
|
34
|
-
<span
|
|
35
|
-
css={css`
|
|
36
|
-
display: block;
|
|
37
|
-
border-color: ${active || completed
|
|
38
|
-
? theme.colors.blueLightLighter
|
|
39
|
-
: theme.colors.greyDarker60};
|
|
40
|
-
border-left-style: dashed;
|
|
41
|
-
border-left-width: 1px;
|
|
42
|
-
min-height: 20px;
|
|
43
|
-
`}></span>
|
|
44
|
-
</div>
|
|
45
|
-
);
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
const CustomStep: React.FC = (props: {
|
|
49
|
-
active?: boolean;
|
|
50
|
-
completed?: boolean;
|
|
51
|
-
}) => {
|
|
52
|
-
const { active, completed } = props;
|
|
53
|
-
const theme = useTheme();
|
|
54
|
-
|
|
55
|
-
return (
|
|
56
|
-
<div
|
|
57
|
-
css={css`
|
|
58
|
-
width: 6px;
|
|
59
|
-
height: 6px;
|
|
60
|
-
background-color: ${active || completed
|
|
61
|
-
? theme.colors.blueLightLighter
|
|
62
|
-
: theme.colors.greyDarker60};
|
|
63
|
-
border-radius: 50%;
|
|
64
|
-
`}></div>
|
|
65
|
-
);
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
*
|
|
70
|
-
* UI Component shows the water consumption objective of the user
|
|
71
|
-
* @param steps - the order goes from top to bottom, from left to right
|
|
72
|
-
*/
|
|
73
|
-
export const WaterConsume = ({
|
|
74
|
-
minValue = 0,
|
|
75
|
-
maxValue = 100,
|
|
76
|
-
currentValue,
|
|
77
|
-
active,
|
|
78
|
-
steps,
|
|
79
|
-
unit = '%',
|
|
80
|
-
}: WaterConsumeProps) => {
|
|
81
|
-
const theme = useTheme();
|
|
82
|
-
const currentPercentage = Math.round((currentValue * 100) / maxValue);
|
|
83
|
-
|
|
84
|
-
return (
|
|
85
|
-
<Card
|
|
86
|
-
css={css`
|
|
87
|
-
box-shadow: 0 10px 40px rgba(42, 48, 57, 0.08);
|
|
88
|
-
border-radius: 20px;
|
|
89
|
-
`}>
|
|
90
|
-
<CardHeader
|
|
91
|
-
icon={
|
|
92
|
-
<ResponsiveImage
|
|
93
|
-
css={{ filter: `drop-shadow(0px 5px 5px ${theme.colors.grey})` }}
|
|
94
|
-
srcSet="https://firebasestorage.googleapis.com/v0/b/admin-themes.appspot.com/o/img%2Fwater%2Fwater_64.png?alt=media&token=2abf9f9c-2159-4235-856c-f054783a007d 64w, https://firebasestorage.googleapis.com/v0/b/admin-themes.appspot.com/o/img%2Fwater%2Fwater_48.png?alt=media&token=abc1e619-940a-4fc0-9f83-ef0a998464f2 48w"
|
|
95
|
-
sizes="(min-width: 1440px) 64px, 48px"
|
|
96
|
-
src="https://firebasestorage.googleapis.com/v0/b/admin-themes.appspot.com/o/img%2Fwater%2Fwater_48.png?alt=media&token=abc1e619-940a-4fc0-9f83-ef0a998464f2"
|
|
97
|
-
alt="Water"
|
|
98
|
-
/>
|
|
99
|
-
}>
|
|
100
|
-
<Typography variant="h6" weight="bold">
|
|
101
|
-
Water
|
|
102
|
-
</Typography>
|
|
103
|
-
</CardHeader>
|
|
104
|
-
|
|
105
|
-
<CardContent
|
|
106
|
-
css={{
|
|
107
|
-
width: '100%',
|
|
108
|
-
justifyContent: 'center',
|
|
109
|
-
alignItems: 'stretch',
|
|
110
|
-
}}>
|
|
111
|
-
<div style={{ fontSize: 14, marginRight: '15px' }}>
|
|
112
|
-
<ProgressVertical>
|
|
113
|
-
<ProgressLegend>
|
|
114
|
-
<ProgressLegendItem position="end" percentage={100}>
|
|
115
|
-
<span
|
|
116
|
-
style={{
|
|
117
|
-
textAlign: 'right',
|
|
118
|
-
display: 'block',
|
|
119
|
-
paddingRight: 6,
|
|
120
|
-
}}>
|
|
121
|
-
{`${maxValue}${unit}`}
|
|
122
|
-
</span>
|
|
123
|
-
</ProgressLegendItem>
|
|
124
|
-
<ProgressLegendItem
|
|
125
|
-
position="current"
|
|
126
|
-
percentage={currentPercentage}>
|
|
127
|
-
<span
|
|
128
|
-
style={{
|
|
129
|
-
textAlign: 'right',
|
|
130
|
-
display: 'block',
|
|
131
|
-
paddingRight: 6,
|
|
132
|
-
}}>
|
|
133
|
-
{`${currentValue}${unit}`}
|
|
134
|
-
</span>
|
|
135
|
-
</ProgressLegendItem>
|
|
136
|
-
<ProgressLegendItem position="start" percentage={0}>
|
|
137
|
-
<span
|
|
138
|
-
style={{
|
|
139
|
-
textAlign: 'right',
|
|
140
|
-
display: 'block',
|
|
141
|
-
paddingRight: 6,
|
|
142
|
-
}}>
|
|
143
|
-
{`${minValue}${unit}`}
|
|
144
|
-
</span>
|
|
145
|
-
</ProgressLegendItem>
|
|
146
|
-
</ProgressLegend>
|
|
147
|
-
<ProgressBar percentage={currentPercentage} color="blueLight" />
|
|
148
|
-
</ProgressVertical>
|
|
149
|
-
</div>
|
|
150
|
-
|
|
151
|
-
<Stepper
|
|
152
|
-
color={theme.colors.blueLight}
|
|
153
|
-
activeStep={active}
|
|
154
|
-
orientation={'vertical'}
|
|
155
|
-
inverted
|
|
156
|
-
sx={{
|
|
157
|
-
rowGap: 0,
|
|
158
|
-
}}>
|
|
159
|
-
{steps.map((step, index) => {
|
|
160
|
-
return (
|
|
161
|
-
<Step key={index} Connector={CustomConnector}>
|
|
162
|
-
<StepLabel StepIcon={CustomStep}>
|
|
163
|
-
<span
|
|
164
|
-
style={{
|
|
165
|
-
textAlign: 'left',
|
|
166
|
-
display: 'block',
|
|
167
|
-
fontSize: 9,
|
|
168
|
-
}}>
|
|
169
|
-
{step.caption}
|
|
170
|
-
</span>
|
|
171
|
-
<span
|
|
172
|
-
style={{
|
|
173
|
-
textAlign: 'left',
|
|
174
|
-
display: 'block',
|
|
175
|
-
fontSize: 9,
|
|
176
|
-
fontWeight: 700,
|
|
177
|
-
}}>
|
|
178
|
-
{step.title}
|
|
179
|
-
</span>
|
|
180
|
-
</StepLabel>
|
|
181
|
-
</Step>
|
|
182
|
-
);
|
|
183
|
-
})}
|
|
184
|
-
</Stepper>
|
|
185
|
-
</CardContent>
|
|
186
|
-
</Card>
|
|
187
|
-
);
|
|
188
|
-
};
|
package/src/consts.ts
DELETED
package/src/index.ts
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/no-empty-interface */
|
|
2
|
-
import './injectGlobal';
|
|
3
|
-
import '@emotion/react';
|
|
4
|
-
|
|
5
|
-
import { Theme as T } from '@ssa-ui-kit/core';
|
|
6
|
-
|
|
7
|
-
declare module '@emotion/react' {
|
|
8
|
-
export interface Theme extends T {}
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export { default as Activity } from './components/Activity';
|
|
12
|
-
export * from './components/Activity';
|
|
13
|
-
export { default as Calories } from './components/Calories';
|
|
14
|
-
export * from './components/Calories';
|
|
15
|
-
export * from './components/HeartRate';
|
|
16
|
-
export * from './components/MealNutrients';
|
|
17
|
-
export { default as UpcomingWorkouts } from './components/UpcomingWorkouts';
|
|
18
|
-
export * from './components/UpcomingWorkouts';
|
|
19
|
-
export { default as WaterConsume } from './components/WaterConsume';
|
|
20
|
-
export * from './components/WaterConsume';
|
|
21
|
-
export { default as Bmi } from './components/Bmi';
|
|
22
|
-
export * from './components/Bmi';
|
|
23
|
-
export { default as ListGoals } from './components/ListGoals';
|
|
24
|
-
export * from './components/ListGoals';
|
|
25
|
-
export { default as MealPlanner } from './components/MealPlanner';
|
|
26
|
-
export * from './components/MealPlanner';
|
|
27
|
-
export { default as StepsCounter } from './components/StepsCounter';
|
|
28
|
-
export * from './components/StepsCounter';
|
|
29
|
-
export { default as UserCard } from './components/UserCard';
|
|
30
|
-
export * from './components/UserCard';
|
|
31
|
-
export * from './components/TradingInfoCard';
|
|
32
|
-
export * from './components/TradingScoreboard';
|
|
33
|
-
export * from './components/BotsTable';
|
|
34
|
-
export * from './components/AccountBalance';
|
|
35
|
-
export * from './components/ExchangeAccount';
|
|
36
|
-
export * from './components/AccountKeys';
|
package/src/injectGlobal.ts
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { injectGlobal } from '@emotion/css';
|
|
2
|
-
|
|
3
|
-
injectGlobal`
|
|
4
|
-
* {
|
|
5
|
-
outline: none;
|
|
6
|
-
|
|
7
|
-
box-sizing: border-box;
|
|
8
|
-
font-family: 'Manrope', sans-serif;
|
|
9
|
-
|
|
10
|
-
&::after,
|
|
11
|
-
&::before {
|
|
12
|
-
box-sizing: border-box;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
html {
|
|
17
|
-
font-size: 1rem;
|
|
18
|
-
font-weight: 400;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
body {
|
|
22
|
-
margin: 0;
|
|
23
|
-
padding: 0;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
h1,
|
|
27
|
-
h2,
|
|
28
|
-
h3,
|
|
29
|
-
h4,
|
|
30
|
-
h5,
|
|
31
|
-
h6,
|
|
32
|
-
p {
|
|
33
|
-
margin: 0;
|
|
34
|
-
padding: 0;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
#root {
|
|
38
|
-
height: 100vh;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
`;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"status": "failed",
|
|
3
|
-
"failedTests": [
|
|
4
|
-
"e9b658dfa47cbcc923fa-5d8f192ca399a0e3af8d",
|
|
5
|
-
"e9b658dfa47cbcc923fa-fa2e3998b096c2a84a78",
|
|
6
|
-
"e9b658dfa47cbcc923fa-fd3540ef424862ee1613",
|
|
7
|
-
"e9b658dfa47cbcc923fa-593ad1271cc938aaa552",
|
|
8
|
-
"e9b658dfa47cbcc923fa-1bac0b243ac805b359d7",
|
|
9
|
-
"f842a66268b5977a58f7-a0c08d47595dd7f659fa",
|
|
10
|
-
"f842a66268b5977a58f7-4efdb0edbfec872edd6a",
|
|
11
|
-
"f842a66268b5977a58f7-6ef7b0ec18215b6dc2f4",
|
|
12
|
-
"f842a66268b5977a58f7-c42323a029ec8bb42609",
|
|
13
|
-
"f842a66268b5977a58f7-92d257b6c4ef385a908e",
|
|
14
|
-
"dc515447f22f49e5c441-5df2e440933bc5ee2b27",
|
|
15
|
-
"dc515447f22f49e5c441-2b56a90eb61ef7e0fd51",
|
|
16
|
-
"dc515447f22f49e5c441-4165392e40a58aa9249e",
|
|
17
|
-
"dc515447f22f49e5c441-20b74ff58c12bdb09590",
|
|
18
|
-
"dc515447f22f49e5c441-ff84682b66bfd613fd24",
|
|
19
|
-
"a2ee24e0f108a5cb0d28-bdfc5b569adaa00d522c"
|
|
20
|
-
]
|
|
21
|
-
}
|