@ssa-ui-kit/widgets 0.0.28-alpha → 0.0.29-alpha
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/custom-shots/widgets-bots-table--no-control-orders--run-reason-modal_[w1920px].png +0 -0
- package/custom-shots/widgets-collapsiblenavbar-opened__[w899px]_menu_opened.png +0 -0
- package/custom-shots/widgets-collapsiblenavbar-opened__[w899px]_statistics_submenu.png +0 -0
- package/custom-shots/widgets-filters--default__[w1920px].png +0 -0
- package/custom-shots/widgets-meal-nutrients--hint-opened__[w1440px].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__[w390px].png +0 -0
- package/custom-shots/widgets-meal-nutrients--hint-opened__dropdown__[w900px].png +0 -0
- package/custom-shots/widgets-notification-menu--is-opened__[w1440px].png +0 -0
- package/custom-shots/widgets-notification-menu--is-opened__[w1920px].png +0 -0
- package/custom-shots/widgets-notification-menu--is-opened__[w900px].png +0 -0
- package/custom-shots/widgets-pagination--selected-hover__[w1920px].png +0 -0
- package/custom-shots/widgets-pagination-disabled--selected-hover__[w1920px].png +0 -0
- package/custom-shots/widgets-progressInfo__dropdown__[w1920px].png +0 -0
- package/custom-shots/widgets-progressInfo__dropdown__[w390px].png +0 -0
- package/custom-shots/widgets-progressInfo__dropdown__[w900px].png +0 -0
- package/custom-shots/widgets-searchbox--cross-icon__[w900px].png +0 -0
- package/custom-shots/widgets-table-filters--opened__[w1920px].png +0 -0
- package/custom-shots/widgets-trading-info-card--hover__[w1920px].png +0 -0
- package/custom-shots/widgets-user-profile--is-opened__[w1920px].png +0 -0
- package/dist/components/Calories/Calories.d.ts +2 -2
- package/dist/components/Calories/innerContent.d.ts +2 -2
- package/dist/components/Calories/types.d.ts +1 -1
- package/dist/components/CardList/CardList.d.ts +2 -2
- package/dist/components/CardList/types.d.ts +1 -1
- package/dist/components/CollapsibleNavBar/TriggerIcon.d.ts +2 -2
- package/dist/components/HeartRate/BPM.d.ts +2 -2
- package/dist/components/HeartRate/HeartRate.d.ts +2 -2
- package/dist/components/HeartRate/types.d.ts +3 -3
- package/dist/components/ListGoals/ListGoals.d.ts +2 -2
- package/dist/components/ListGoals/ListGoalsCard.d.ts +2 -2
- package/dist/components/ListGoals/types.d.ts +2 -2
- package/dist/components/MealNutrients/MealNutrients.d.ts +2 -2
- package/dist/components/MealNutrients/MealNutrientsTooltip.d.ts +2 -2
- package/dist/components/MealNutrients/types.d.ts +4 -4
- package/dist/components/NavBar/NavBar.d.ts +2 -2
- package/dist/components/NavBar/types.d.ts +6 -6
- package/dist/components/Pagination/ArrowButton.d.ts +2 -2
- package/dist/components/Pagination/Pagination.d.ts +2 -2
- package/dist/components/Pagination/PaginationButtons.d.ts +2 -2
- package/dist/components/Pagination/PaginationContext.d.ts +4 -4
- package/dist/components/Pagination/types.d.ts +6 -6
- package/dist/components/ProgressInfo/ProgressInfo.d.ts +2 -2
- package/dist/components/ProgressInfo/types.d.ts +1 -1
- package/dist/components/TableFilters/TableFilterCheckbox.d.ts +2 -2
- package/dist/components/TradingInfoCard/TradingInfoCard.d.ts +2 -2
- package/dist/components/TradingInfoCard/TradingInfoCardTooltip.d.ts +2 -2
- package/dist/components/TradingInfoCard/TradingInfoCardWrapper.d.ts +2 -2
- package/dist/components/TradingInfoCard/types.d.ts +4 -4
- package/dist/components/TradingScoreboard/TradingScoreboard.d.ts +2 -2
- package/dist/components/TradingScoreboard/types.d.ts +3 -3
- package/dist/components/UpcomingWorkouts/UpcomingWorkoutCard.d.ts +2 -2
- package/dist/components/UpcomingWorkouts/UpcomingWorkouts.d.ts +2 -2
- package/dist/components/UpcomingWorkouts/types.d.ts +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
- package/src/components/Activity/Activity.tsx +3 -3
- package/src/components/Calories/Calories.tsx +2 -2
- package/src/components/Calories/innerContent.tsx +2 -2
- package/src/components/Calories/types.ts +1 -1
- package/src/components/CardList/CardList.tsx +2 -2
- package/src/components/CardList/types.ts +1 -1
- package/src/components/CollapsibleNavBar/TriggerIcon.tsx +2 -2
- package/src/components/Filters/FiltersBlock.tsx +1 -0
- package/src/components/HeartRate/BPM.tsx +2 -2
- package/src/components/HeartRate/HeartRate.tsx +2 -2
- package/src/components/HeartRate/types.ts +3 -3
- package/src/components/ListGoals/ListGoals.tsx +2 -2
- package/src/components/ListGoals/ListGoalsCard.tsx +2 -2
- package/src/components/ListGoals/types.ts +2 -2
- package/src/components/MealNutrients/MealNutrients.stories.tsx +3 -3
- package/src/components/MealNutrients/MealNutrients.tsx +2 -2
- package/src/components/MealNutrients/MealNutrientsTooltip.tsx +4 -4
- package/src/components/MealNutrients/types.ts +4 -4
- package/src/components/MealPlanner/MealPlanner.tsx +3 -3
- package/src/components/NavBar/NavBar.tsx +2 -2
- package/src/components/NavBar/types.ts +6 -6
- package/src/components/NotificationCard/NotificationCard.tsx +2 -2
- package/src/components/Pagination/ArrowButton.tsx +2 -2
- package/src/components/Pagination/Pagination.tsx +2 -2
- package/src/components/Pagination/PaginationButtons.tsx +3 -3
- package/src/components/Pagination/PaginationContext.tsx +7 -4
- package/src/components/Pagination/types.ts +6 -6
- package/src/components/ProgressInfo/ProgressInfo.stories.tsx +2 -2
- package/src/components/ProgressInfo/ProgressInfo.tsx +4 -4
- package/src/components/ProgressInfo/types.ts +1 -1
- package/src/components/TableFilters/TableFilterCheckbox.tsx +2 -2
- package/src/components/TableFilters/TableFilters.tsx +2 -2
- package/src/components/TradingInfoCard/TradingInfoCard.stories.tsx +6 -6
- package/src/components/TradingInfoCard/TradingInfoCard.tsx +3 -3
- package/src/components/TradingInfoCard/TradingInfoCardTooltip.tsx +2 -2
- package/src/components/TradingInfoCard/TradingInfoCardWrapper.tsx +2 -2
- package/src/components/TradingInfoCard/types.ts +5 -5
- package/src/components/TradingScoreboard/TradingScoreboard.stories.tsx +5 -5
- package/src/components/TradingScoreboard/TradingScoreboard.tsx +2 -2
- package/src/components/TradingScoreboard/types.ts +3 -3
- package/src/components/UpcomingWorkouts/UpcomingWorkoutCard.tsx +2 -2
- package/src/components/UpcomingWorkouts/UpcomingWorkouts.tsx +2 -2
- package/src/components/UpcomingWorkouts/types.ts +2 -2
- package/tsbuildcache +1 -1
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
Popover,
|
|
13
13
|
PopoverContent,
|
|
14
14
|
PopoverDescription,
|
|
15
|
-
|
|
15
|
+
CheckboxProps,
|
|
16
16
|
} from '@ssa-ui-kit/core';
|
|
17
17
|
import {
|
|
18
18
|
tableFilterDividerStyles,
|
|
@@ -145,7 +145,7 @@ export const TableFilters = ({
|
|
|
145
145
|
<TableFiltersAccordionContent {...props}>
|
|
146
146
|
{Object.keys(accordionInfo.items).map((itemKey) => {
|
|
147
147
|
const info = accordionInfo.items[itemKey];
|
|
148
|
-
const extraProps: Partial<
|
|
148
|
+
const extraProps: Partial<CheckboxProps> = {};
|
|
149
149
|
const currentState = !!localCheckboxData?.[
|
|
150
150
|
accordionInfo.id
|
|
151
151
|
].selectedItemsDraft?.includes(info.name);
|
|
@@ -2,7 +2,7 @@ import { MemoryRouter, Route, Routes } from 'react-router-dom';
|
|
|
2
2
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
3
3
|
import { Icon } from '@ssa-ui-kit/core';
|
|
4
4
|
import TradingInfoCard from './TradingInfoCard';
|
|
5
|
-
import {
|
|
5
|
+
import { TradingInfoCardProps } from './types';
|
|
6
6
|
|
|
7
7
|
export default {
|
|
8
8
|
title: 'Widgets/TradingInfoCard',
|
|
@@ -10,7 +10,7 @@ export default {
|
|
|
10
10
|
} as Meta<typeof TradingInfoCard>;
|
|
11
11
|
|
|
12
12
|
export const Default: StoryObj<typeof TradingInfoCard> = (
|
|
13
|
-
args:
|
|
13
|
+
args: TradingInfoCardProps,
|
|
14
14
|
) => {
|
|
15
15
|
return (
|
|
16
16
|
<TradingInfoCard
|
|
@@ -30,7 +30,7 @@ Default.args = {
|
|
|
30
30
|
};
|
|
31
31
|
|
|
32
32
|
export const WithLink: StoryObj<typeof TradingInfoCard> = (
|
|
33
|
-
args:
|
|
33
|
+
args: TradingInfoCardProps,
|
|
34
34
|
) => {
|
|
35
35
|
return (
|
|
36
36
|
<MemoryRouter>
|
|
@@ -59,7 +59,7 @@ WithLink.args = {
|
|
|
59
59
|
};
|
|
60
60
|
|
|
61
61
|
export const WithTooltip: StoryObj<typeof TradingInfoCard> = (
|
|
62
|
-
args:
|
|
62
|
+
args: TradingInfoCardProps,
|
|
63
63
|
) => {
|
|
64
64
|
return (
|
|
65
65
|
<TradingInfoCard
|
|
@@ -79,7 +79,7 @@ WithTooltip.args = {
|
|
|
79
79
|
};
|
|
80
80
|
|
|
81
81
|
export const WithIcon: StoryObj<typeof TradingInfoCard> = (
|
|
82
|
-
args:
|
|
82
|
+
args: TradingInfoCardProps,
|
|
83
83
|
) => {
|
|
84
84
|
return (
|
|
85
85
|
<TradingInfoCard
|
|
@@ -100,7 +100,7 @@ WithIcon.args = {
|
|
|
100
100
|
};
|
|
101
101
|
|
|
102
102
|
export const WithoutUnit: StoryObj<typeof TradingInfoCard> = (
|
|
103
|
-
args:
|
|
103
|
+
args: TradingInfoCardProps,
|
|
104
104
|
) => {
|
|
105
105
|
return (
|
|
106
106
|
<TradingInfoCard
|
|
@@ -3,7 +3,7 @@ import { CardContent, Typography } from '@ssa-ui-kit/core';
|
|
|
3
3
|
import TradingInfoCardContent from './TradingInfoCardContent';
|
|
4
4
|
import TradingInfoCardTooltip from './TradingInfoCardTooltip';
|
|
5
5
|
import TradingInfoCardWrapper from './TradingInfoCardWrapper';
|
|
6
|
-
import {
|
|
6
|
+
import { TradingInfoCardProps } from './types';
|
|
7
7
|
|
|
8
8
|
const TradingInfoCardView = ({
|
|
9
9
|
value,
|
|
@@ -12,7 +12,7 @@ const TradingInfoCardView = ({
|
|
|
12
12
|
icon,
|
|
13
13
|
link,
|
|
14
14
|
onClick,
|
|
15
|
-
}:
|
|
15
|
+
}: TradingInfoCardProps) => {
|
|
16
16
|
const number = Number(value);
|
|
17
17
|
const currentValue = Number.isNaN(number)
|
|
18
18
|
? value
|
|
@@ -30,7 +30,7 @@ const TradingInfoCardView = ({
|
|
|
30
30
|
);
|
|
31
31
|
};
|
|
32
32
|
|
|
33
|
-
const TradingInfoCard = (props:
|
|
33
|
+
const TradingInfoCard = (props: TradingInfoCardProps) => {
|
|
34
34
|
const { value, unit } = props;
|
|
35
35
|
const number = Number(value);
|
|
36
36
|
const isInteger = Number.isInteger(number);
|
|
@@ -6,12 +6,12 @@ import {
|
|
|
6
6
|
Typography,
|
|
7
7
|
} from '@ssa-ui-kit/core';
|
|
8
8
|
|
|
9
|
-
import {
|
|
9
|
+
import { TradingInfoCardTooltipProps } from './types';
|
|
10
10
|
|
|
11
11
|
const TradingInfoCardTooltip = ({
|
|
12
12
|
trigger,
|
|
13
13
|
children,
|
|
14
|
-
}:
|
|
14
|
+
}: TradingInfoCardTooltipProps) => {
|
|
15
15
|
const theme = useTheme();
|
|
16
16
|
return (
|
|
17
17
|
<Tooltip
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { Link } from 'react-router-dom';
|
|
3
3
|
import { Theme, css } from '@emotion/react';
|
|
4
4
|
import { CardBase } from '@ssa-ui-kit/core';
|
|
5
|
-
import {
|
|
5
|
+
import { TradingInfoCardWrapperProps } from './types';
|
|
6
6
|
|
|
7
7
|
const infoCardWrapper = (theme: Theme) => css`
|
|
8
8
|
position: relative;
|
|
@@ -45,7 +45,7 @@ const TradingInfoCardWrapper = ({
|
|
|
45
45
|
onClick,
|
|
46
46
|
link,
|
|
47
47
|
children,
|
|
48
|
-
}:
|
|
48
|
+
}: TradingInfoCardWrapperProps) => {
|
|
49
49
|
return (
|
|
50
50
|
<React.Fragment>
|
|
51
51
|
{link ? (
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
-
export interface
|
|
3
|
+
export interface TradingInfoCardProps {
|
|
4
4
|
value: React.ReactNode;
|
|
5
5
|
title: string;
|
|
6
6
|
unit?: string;
|
|
@@ -10,18 +10,18 @@ export interface ITradingInfoCardProps {
|
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
export type TradingInfoContent = Pick<
|
|
13
|
-
|
|
13
|
+
TradingInfoCardProps,
|
|
14
14
|
'value' | 'unit' | 'icon'
|
|
15
15
|
>;
|
|
16
16
|
|
|
17
|
-
export type
|
|
18
|
-
|
|
17
|
+
export type TradingInfoCardWrapperProps = Pick<
|
|
18
|
+
TradingInfoCardProps,
|
|
19
19
|
'onClick' | 'link'
|
|
20
20
|
> & {
|
|
21
21
|
children?: React.ReactNode;
|
|
22
22
|
};
|
|
23
23
|
|
|
24
|
-
export interface
|
|
24
|
+
export interface TradingInfoCardTooltipProps {
|
|
25
25
|
trigger: string | number | JSX.Element;
|
|
26
26
|
children: React.ReactNode;
|
|
27
27
|
}
|
|
@@ -3,7 +3,7 @@ import { Meta, StoryObj } from '@storybook/react';
|
|
|
3
3
|
import { css } from '@emotion/react';
|
|
4
4
|
import { Button } from '@ssa-ui-kit/core';
|
|
5
5
|
import TradingScoreboard from './TradingScoreboard';
|
|
6
|
-
import {
|
|
6
|
+
import { TradingScoreboardProps } from './types';
|
|
7
7
|
import { defaultBoardArr, linkBoardArr, oneLineBoardArr } from './helpers';
|
|
8
8
|
|
|
9
9
|
export default {
|
|
@@ -12,7 +12,7 @@ export default {
|
|
|
12
12
|
} as Meta<typeof TradingScoreboard>;
|
|
13
13
|
|
|
14
14
|
export const Default: StoryObj<typeof TradingScoreboard> = (
|
|
15
|
-
args:
|
|
15
|
+
args: TradingScoreboardProps,
|
|
16
16
|
) => {
|
|
17
17
|
return (
|
|
18
18
|
<TradingScoreboard
|
|
@@ -32,7 +32,7 @@ Default.args = {
|
|
|
32
32
|
};
|
|
33
33
|
|
|
34
34
|
export const OneLine: StoryObj<typeof TradingScoreboard> = (
|
|
35
|
-
args:
|
|
35
|
+
args: TradingScoreboardProps,
|
|
36
36
|
) => {
|
|
37
37
|
return (
|
|
38
38
|
<TradingScoreboard
|
|
@@ -52,7 +52,7 @@ OneLine.args = {
|
|
|
52
52
|
};
|
|
53
53
|
|
|
54
54
|
export const WithCustomComponent: StoryObj<typeof TradingScoreboard> = (
|
|
55
|
-
args:
|
|
55
|
+
args: TradingScoreboardProps,
|
|
56
56
|
) => {
|
|
57
57
|
return (
|
|
58
58
|
<TradingScoreboard
|
|
@@ -91,7 +91,7 @@ WithCustomComponent.args = {
|
|
|
91
91
|
};
|
|
92
92
|
|
|
93
93
|
export const WithLink: StoryObj<typeof TradingScoreboard> = (
|
|
94
|
-
args:
|
|
94
|
+
args: TradingScoreboardProps,
|
|
95
95
|
) => {
|
|
96
96
|
return (
|
|
97
97
|
<MemoryRouter>
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { TradingInfoCard } from '@components/TradingInfoCard';
|
|
2
2
|
import TradingScoreboardBase from './TradingScoreboardBase';
|
|
3
|
-
import {
|
|
3
|
+
import { TradingScoreboardProps } from './types';
|
|
4
4
|
|
|
5
5
|
const TradingScoreboard = ({
|
|
6
6
|
items,
|
|
7
7
|
onClick,
|
|
8
8
|
renderCard,
|
|
9
9
|
...props
|
|
10
|
-
}:
|
|
10
|
+
}: TradingScoreboardProps) => {
|
|
11
11
|
return (
|
|
12
12
|
<div>
|
|
13
13
|
<TradingScoreboardBase {...props}>
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TradingInfoCardProps } from '@components/TradingInfoCard/types';
|
|
2
2
|
import { SerializedStyles } from '@emotion/react';
|
|
3
3
|
|
|
4
4
|
type TradingScoreboardItem = Pick<
|
|
5
|
-
|
|
5
|
+
TradingInfoCardProps,
|
|
6
6
|
'value' | 'unit' | 'title' | 'icon' | 'link'
|
|
7
7
|
>;
|
|
8
8
|
|
|
9
|
-
export interface
|
|
9
|
+
export interface TradingScoreboardProps {
|
|
10
10
|
itemsPerRow: number;
|
|
11
11
|
items: Array<TradingScoreboardItem>;
|
|
12
12
|
onClick?: (item: TradingScoreboardItem) => void;
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
Icon,
|
|
11
11
|
} from '@ssa-ui-kit/core';
|
|
12
12
|
|
|
13
|
-
import {
|
|
13
|
+
import { UpcomingWorkoutCardProps } from './types';
|
|
14
14
|
import { contentWrapper } from './style';
|
|
15
15
|
|
|
16
16
|
/**
|
|
@@ -23,7 +23,7 @@ export const UpcomingWorkoutCard = ({
|
|
|
23
23
|
workoutTime,
|
|
24
24
|
renderDetails,
|
|
25
25
|
onClick,
|
|
26
|
-
}:
|
|
26
|
+
}: UpcomingWorkoutCardProps) => {
|
|
27
27
|
const theme = useTheme();
|
|
28
28
|
return (
|
|
29
29
|
<Card noShadow>
|
|
@@ -4,9 +4,9 @@ import CardList from '@components/CardList';
|
|
|
4
4
|
|
|
5
5
|
import { UpcomingWorkoutCard } from './UpcomingWorkoutCard';
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import { UpcomingWorkoutsProps } from './types';
|
|
8
8
|
|
|
9
|
-
export const UpcomingWorkouts = ({ workouts }:
|
|
9
|
+
export const UpcomingWorkouts = ({ workouts }: UpcomingWorkoutsProps) => (
|
|
10
10
|
<CardList
|
|
11
11
|
title="Upcoming Workout"
|
|
12
12
|
items={workouts}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export interface
|
|
1
|
+
export interface UpcomingWorkoutCardProps {
|
|
2
2
|
image: string;
|
|
3
3
|
title: string;
|
|
4
4
|
workoutTime: string;
|
|
@@ -18,6 +18,6 @@ export type Workout = {
|
|
|
18
18
|
};
|
|
19
19
|
};
|
|
20
20
|
|
|
21
|
-
export interface
|
|
21
|
+
export interface UpcomingWorkoutsProps {
|
|
22
22
|
workouts: Array<Workout>;
|
|
23
23
|
}
|