@ssa-ui-kit/widgets 0.0.20-alpha → 0.0.22-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.
Files changed (35) hide show
  1. package/custom-shots/widgets-bots-table--no-control-orders--menu-opened_[w1920px].png +0 -0
  2. package/custom-shots/widgets-bots-table--no-control-orders--run-reason-modal_[w1920px].png +0 -0
  3. package/custom-shots/widgets-collapsiblenavbar-opened__[w1439px].png +0 -0
  4. package/custom-shots/widgets-collapsiblenavbar-opened__[w1439px]_statistics_submenu_popover.png +0 -0
  5. package/custom-shots/widgets-collapsiblenavbar-opened__[w1920px].png +0 -0
  6. package/custom-shots/widgets-collapsiblenavbar-opened__[w1920px]_side_menu_expanded.png +0 -0
  7. package/custom-shots/widgets-collapsiblenavbar-opened__[w1920px]_statistics_submenu_expanded.png +0 -0
  8. package/custom-shots/widgets-collapsiblenavbar-opened__[w1920px]_statistics_submenu_popover.png +0 -0
  9. package/custom-shots/widgets-collapsiblenavbar-opened__[w899px]_menu_opened.png +0 -0
  10. package/custom-shots/widgets-collapsiblenavbar-opened__[w899px]_statistics_submenu.png +0 -0
  11. package/custom-shots/widgets-filters--default__[w1920px].png +0 -0
  12. package/custom-shots/widgets-filters--more-button-items-selected__[w390px].png +0 -0
  13. package/custom-shots/widgets-linkstabbar--current-focus__[w1920px].png +0 -0
  14. package/custom-shots/widgets-meal-nutrients--hint-opened__[w1440px].png +0 -0
  15. package/custom-shots/widgets-meal-nutrients--hint-opened__[w1920px].png +0 -0
  16. package/custom-shots/widgets-meal-nutrients--hint-opened__[w900px].png +0 -0
  17. package/custom-shots/widgets-meal-nutrients--hint-opened__dropdown__[w390px].png +0 -0
  18. package/custom-shots/widgets-notification-menu--is-opened__[w1920px].png +0 -0
  19. package/custom-shots/widgets-notification-menu--is-opened__[w900px].png +0 -0
  20. package/custom-shots/widgets-searchbox--cross-icon__[w900px].png +0 -0
  21. package/custom-shots/widgets-searchbox--search-icon__[w900px].png +0 -0
  22. package/custom-shots/widgets-table-filters--opened__[w1920px].png +0 -0
  23. package/custom-shots/widgets-trading-info-card--hover__[w1920px].png +0 -0
  24. package/custom-shots/widgets-user-profile--is-opened__[w1920px].png +0 -0
  25. package/dist/components/CollapsibleNavBar/NavBarAccordionContent.d.ts +1 -1
  26. package/dist/components/TableFilters/TableFiltersAccordionContent.d.ts +1 -1
  27. package/dist/components/TradingInfoCard/TradingInfoCard.d.ts +1 -1
  28. package/dist/index.js +1 -1
  29. package/dist/index.js.map +1 -1
  30. package/package.json +4 -4
  31. package/src/components/CollapsibleNavBar/NavBarPopover.tsx +2 -1
  32. package/src/components/TradingInfoCard/TradingInfoCard.stories.tsx +1 -1
  33. package/src/components/TradingInfoCard/TradingInfoCard.tsx +24 -18
  34. package/src/components/TradingScoreboard/helpers.tsx +1 -1
  35. package/tsbuildcache +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ssa-ui-kit/widgets",
3
- "version": "0.0.20-alpha",
3
+ "version": "0.0.22-alpha",
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/core": "^0.0.18-alpha",
33
- "@ssa-ui-kit/hooks": "^0.0.1-alpha",
34
- "@ssa-ui-kit/utils": "^0.0.1-alpha"
32
+ "@ssa-ui-kit/core": "^0.0.22-alpha",
33
+ "@ssa-ui-kit/utils": "^0.0.1-alpha",
34
+ "@ssa-ui-kit/hooks": "^0.0.1-alpha"
35
35
  },
36
36
  "browserslist": [
37
37
  ">0.1%",
@@ -67,7 +67,8 @@ export const CollapsibleNavBarPopover = ({
67
67
  display: 'block',
68
68
  },
69
69
  zIndex: 2,
70
- }}>
70
+ }}
71
+ isFocusManagerDisabled={true}>
71
72
  <PopoverHeading
72
73
  css={{
73
74
  color: theme.colors.white,
@@ -24,7 +24,7 @@ export const Default: StoryObj<typeof TradingInfoCard> = (
24
24
  };
25
25
 
26
26
  Default.args = {
27
- value: '500',
27
+ value: 500.55,
28
28
  unit: 'USD',
29
29
  title: 'Turnover',
30
30
  };
@@ -5,34 +5,24 @@ import TradingInfoCardTooltip from './TradingInfoCardTooltip';
5
5
  import TradingInfoCardWrapper from './TradingInfoCardWrapper';
6
6
  import { ITradingInfoCardProps } from './types';
7
7
 
8
- const TradingInfoCard = ({
8
+ const TradingInfoCardView = ({
9
9
  value,
10
10
  unit,
11
11
  title,
12
- onClick,
13
12
  icon,
14
13
  link,
14
+ onClick,
15
15
  }: ITradingInfoCardProps) => {
16
16
  const number = Number(value);
17
- const isInteger = Number.isInteger(number);
18
- const currentValue = Number.isNaN(number) ? value : Math.floor(number);
17
+ const currentValue = Number.isNaN(number)
18
+ ? value
19
+ : number.toFixed(1).includes('.0')
20
+ ? Math.floor(number)
21
+ : number.toFixed(1);
19
22
 
20
23
  return (
21
24
  <TradingInfoCardWrapper onClick={onClick} link={link}>
22
- {isInteger || Number.isNaN(number) ? (
23
- <TradingInfoCardContent value={currentValue} unit={unit} icon={icon} />
24
- ) : (
25
- <TradingInfoCardTooltip
26
- trigger={
27
- <TradingInfoCardContent
28
- value={currentValue}
29
- unit={unit}
30
- icon={icon}
31
- />
32
- }>
33
- {value} {unit}
34
- </TradingInfoCardTooltip>
35
- )}
25
+ <TradingInfoCardContent value={currentValue} unit={unit} icon={icon} />
36
26
  <CardContent>
37
27
  <Typography css={{ fontSize: '12px' }}>{title}</Typography>
38
28
  </CardContent>
@@ -40,4 +30,20 @@ const TradingInfoCard = ({
40
30
  );
41
31
  };
42
32
 
33
+ const TradingInfoCard = (props: ITradingInfoCardProps) => {
34
+ const { value, unit } = props;
35
+ const number = Number(value);
36
+ const isInteger = Number.isInteger(number);
37
+
38
+ if (isInteger || Number.isNaN(number)) {
39
+ return <TradingInfoCardView {...props} />;
40
+ } else {
41
+ return (
42
+ <TradingInfoCardTooltip trigger={<TradingInfoCardView {...props} />}>
43
+ {value} {unit}
44
+ </TradingInfoCardTooltip>
45
+ );
46
+ }
47
+ };
48
+
43
49
  export default TradingInfoCard;
@@ -68,7 +68,7 @@ export const oneLineBoardArr = [
68
68
  title: 'Orders',
69
69
  },
70
70
  {
71
- value: '500.025',
71
+ value: '500.125',
72
72
  unit: 'USD',
73
73
  title: 'Turnover',
74
74
  },