@ssa-ui-kit/widgets 0.0.32-alpha → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/.storybook/main.ts +4 -0
  2. package/dist/components/AccountBalance/BalancePieChart.d.ts +1 -2
  3. package/dist/components/AccountBalance/BalancePieChartTitle.d.ts +1 -2
  4. package/dist/components/AccountBalance/WithLink.d.ts +1 -2
  5. package/dist/components/Bmi/BmiHeatbar.d.ts +2 -3
  6. package/dist/components/Bmi/BmiInfo.d.ts +2 -3
  7. package/dist/components/Bmi/BmiLabel.d.ts +1 -2
  8. package/dist/components/Bmi/BmiPointer.d.ts +2 -3
  9. package/dist/components/BotsTable/BotsTableCell.d.ts +4 -5
  10. package/dist/components/BotsTable/BotsTableHead.d.ts +3 -4
  11. package/dist/components/BotsTable/BotsTableRow.d.ts +4 -5
  12. package/dist/components/BotsTable/BotsTableWrapper.d.ts +3 -4
  13. package/dist/components/BotsTable/stories/BotsTable/components/Actions/ActionIcon.d.ts +1 -1
  14. package/dist/components/BotsTable/types.d.ts +0 -1
  15. package/dist/components/ListGoals/types.d.ts +0 -1
  16. package/dist/components/MealNutrients/mockMealNutrientsRequest.d.ts +2 -2
  17. package/dist/components/MealNutrients/types.d.ts +0 -1
  18. package/dist/components/MealPlanner/MealPlannerBadge.d.ts +1 -2
  19. package/dist/components/MealPlanner/MealPlannerBars.d.ts +2 -3
  20. package/dist/components/MealPlanner/MealPlannerLegends.d.ts +4 -5
  21. package/dist/components/TradingScoreboard/TradingScoreboardBase.d.ts +3 -4
  22. package/dist/components/TradingScoreboard/types.d.ts +0 -1
  23. package/dist/components/UpcomingWorkouts/types.d.ts +0 -1
  24. package/dist/components/UserCard/UserCardBMI.d.ts +1 -1
  25. package/dist/components/UserCard/UserCardCredentials.d.ts +1 -1
  26. package/dist/index.js +1 -1
  27. package/dist/index.js.map +1 -1
  28. package/package.json +5 -4
  29. package/src/components/AccountBalance/{AccountBalance.spec.old.tsx → AccountBalance.spec.tsx} +3 -9
  30. package/src/components/ExchangeAccount/{ExchangeAccount.spec.old.tsx → ExchangeAccount.spec.tsx} +3 -9
  31. package/tsbuildcache +1 -1
  32. package/webpack.config.js +1 -0
  33. /package/src/components/Activity/{Activity.spec.old.tsx → Activity.spec.tsx} +0 -0
  34. /package/src/components/Bmi/{Bmi.spec.old.tsx → Bmi.spec.tsx} +0 -0
  35. /package/src/components/BotsTable/{BotsTable.spec.old.tsx → BotsTable.spec.tsx} +0 -0
  36. /package/src/components/Calories/{Calories.spec.old.tsx → Calories.spec.tsx} +0 -0
  37. /package/src/components/ExchangeAccountKeys/{ExchangeAccountKeys.spec.old.tsx → ExchangeAccountKeys.spec.tsx} +0 -0
  38. /package/src/components/HeartRate/{HeartRate.spec.old.tsx → HeartRate.spec.tsx} +0 -0
  39. /package/src/components/ListGoals/{ListGoals.spec.old.tsx → ListGoals.spec.tsx} +0 -0
  40. /package/src/components/MealNutrients/{MealNutrients.spec.old.tsx → MealNutrients.spec.tsx} +0 -0
  41. /package/src/components/MealPlanner/{MealPlanner.spec.old.tsx → MealPlanner.spec.tsx} +0 -0
  42. /package/src/components/StepsCounter/{StepsCounter.spec.old.tsx → StepsCounter.spec.tsx} +0 -0
  43. /package/src/components/TradingInfoCard/{TradingInfoCard.spec.old.tsx → TradingInfoCard.spec.tsx} +0 -0
  44. /package/src/components/TradingScoreboard/{TradingScoreboard.spec.old.tsx → TradingScoreboard.spec.tsx} +0 -0
  45. /package/src/components/UpcomingWorkouts/{UpcomingWorkouts.spec.old.tsx → UpcomingWorkouts.spec.tsx} +0 -0
  46. /package/src/components/WaterConsume/{WaterConsume.spec.old.tsx → WaterConsume.spec.tsx} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ssa-ui-kit/widgets",
3
- "version": "0.0.32-alpha",
3
+ "version": "1.0.0",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "private": false,
@@ -29,9 +29,9 @@
29
29
  "js-tokens": "^4.0.0",
30
30
  "loose-envify": "^1.4.0",
31
31
  "scheduler": "^0.23.0",
32
- "@ssa-ui-kit/hooks": "^0.0.2-alpha",
33
- "@ssa-ui-kit/core": "^0.0.29-alpha",
34
- "@ssa-ui-kit/utils": "^0.0.1-alpha"
32
+ "@ssa-ui-kit/core": "^1.0.0",
33
+ "@ssa-ui-kit/hooks": "^1.0.0",
34
+ "@ssa-ui-kit/utils": "^1.0.0"
35
35
  },
36
36
  "browserslist": [
37
37
  ">0.1%",
@@ -58,6 +58,7 @@
58
58
  "@nivo/core": "^0.83.0",
59
59
  "@nivo/line": "^0.83.0",
60
60
  "@nivo/scales": "^0.83.0",
61
+ "@nivo/pie": "^0.83.0",
61
62
  "react": "18.x",
62
63
  "react-dom": "18.x",
63
64
  "react-hook-form": "^7.46.1",
@@ -3,21 +3,15 @@ import { MemoryRouter, Route, Routes } from 'react-router-dom';
3
3
  import { data } from './stories/fixtures';
4
4
  import { AccountBalance } from './index';
5
5
 
6
- const ResponsivePieMock = () => <div data-testid="responsive-pie"></div>;
7
-
8
- jest.mock('@nivo/pie', () => ({
9
- PieCustomLayerProps: {},
10
- ResponsivePie: ResponsivePieMock,
11
- }));
12
-
13
6
  describe('AccountBalance', () => {
14
7
  it('Renders', () => {
15
- const { getByRole, getByText, getByTestId } = render(
8
+ const { getByRole, getByText, container } = render(
16
9
  <AccountBalance total="798" currency="USDT" data={data} />,
17
10
  );
11
+ const pieChartWrapper = container.querySelector('.pie-chart-wrapper');
12
+ expect(pieChartWrapper).toBeInTheDocument();
18
13
 
19
14
  getByRole('heading', { name: 'Balance' });
20
- getByTestId('responsive-pie');
21
15
  getByText('798');
22
16
  getByText('USDT');
23
17
 
@@ -11,13 +11,6 @@ const commonProps = {
11
11
  onDelete: jest.fn(),
12
12
  };
13
13
 
14
- const ResponsivePieMock = () => <div data-testid="responsive-pie"></div>;
15
-
16
- jest.mock('@nivo/pie', () => ({
17
- PieCustomLayerProps: {},
18
- ResponsivePie: ResponsivePieMock,
19
- }));
20
-
21
14
  describe('ExchangeAccount', () => {
22
15
  it('Renders with platform', () => {
23
16
  const { getByText } = render(<ExchangeAccount {...commonProps} />);
@@ -42,9 +35,10 @@ describe('ExchangeAccount', () => {
42
35
  });
43
36
 
44
37
  it('Renders with BalancePieChart component', () => {
45
- const { getByTestId } = render(<ExchangeAccount {...commonProps} />);
38
+ const { container } = render(<ExchangeAccount {...commonProps} />);
46
39
 
47
- getByTestId('responsive-pie');
40
+ const pieChartWrapper = container.querySelector('.pie-chart-wrapper');
41
+ expect(pieChartWrapper).toBeInTheDocument();
48
42
  });
49
43
 
50
44
  it('Clicks on delete button', async () => {