@ssa-ui-kit/widgets 0.0.1-alpha → 0.0.2-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/dist/components/CollapsibleNavBar/CollapsibleNavBar.d.ts +6 -0
- package/dist/components/CollapsibleNavBar/CollapsibleNavBarBase.d.ts +8 -0
- package/dist/components/CollapsibleNavBar/CollapsibleNavBarItem.d.ts +8 -0
- package/dist/components/CollapsibleNavBar/CollapsibleNavBarLink.d.ts +9 -0
- package/dist/components/CollapsibleNavBar/CollapsibleNavBarList.d.ts +8 -0
- package/dist/components/CollapsibleNavBar/CollapsibleNavBarWrapper.d.ts +8 -0
- package/dist/components/CollapsibleNavBar/CollapsibleNavContentToggle.d.ts +3 -0
- package/dist/components/CollapsibleNavBar/CollapsibleNavToggle.d.ts +2 -0
- package/dist/components/CollapsibleNavBar/CollapsibleNavToggleWrapper.d.ts +8 -0
- package/dist/components/CollapsibleNavBar/NavBarAccordionContent.d.ts +16 -0
- package/dist/components/CollapsibleNavBar/NavBarItemWithSubMenu.d.ts +5 -0
- package/dist/components/CollapsibleNavBar/NavBarItemWithoutSubMenu.d.ts +6 -0
- package/dist/components/CollapsibleNavBar/NavBarPopover.d.ts +6 -0
- package/dist/components/CollapsibleNavBar/TriggerIcon.d.ts +6 -0
- package/dist/components/CollapsibleNavBar/index.d.ts +2 -0
- package/dist/components/CollapsibleNavBar/stories/Logo.d.ts +1 -0
- package/dist/components/CollapsibleNavBar/stories/StoryComponent.d.ts +2 -0
- package/dist/components/CollapsibleNavBar/stories/consts.d.ts +2 -0
- package/dist/components/CollapsibleNavBar/stories/styles.d.ts +2 -0
- package/dist/components/CollapsibleNavBar/styles.d.ts +10 -0
- package/dist/components/CollapsibleNavBar/types.d.ts +12 -0
- package/dist/components/NavBar/types.d.ts +17 -0
- package/dist/components/TableFilters/TableFiltersAccordion.d.ts +1 -1
- package/dist/components/TableFilters/TableFiltersAccordionContent.d.ts +2 -2
- package/dist/index.d.ts +3 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
- package/src/components/CollapsibleNavBar/CollapsibleNavBar.e2e.ts +115 -0
- package/src/components/CollapsibleNavBar/CollapsibleNavBar.spec.tsx +54 -0
- package/src/components/CollapsibleNavBar/CollapsibleNavBar.tsx +55 -0
- package/src/components/CollapsibleNavBar/CollapsibleNavBarBase.ts +122 -0
- package/src/components/CollapsibleNavBar/CollapsibleNavBarItem.ts +28 -0
- package/src/components/CollapsibleNavBar/CollapsibleNavBarLink.ts +34 -0
- package/src/components/CollapsibleNavBar/CollapsibleNavBarList.ts +18 -0
- package/src/components/CollapsibleNavBar/CollapsibleNavBarWrapper.ts +23 -0
- package/src/components/CollapsibleNavBar/CollapsibleNavContentToggle.tsx +24 -0
- package/src/components/CollapsibleNavBar/CollapsibleNavToggle.tsx +52 -0
- package/src/components/CollapsibleNavBar/CollapsibleNavToggleWrapper.ts +16 -0
- package/src/components/CollapsibleNavBar/NavBarAccordionContent.tsx +33 -0
- package/src/components/CollapsibleNavBar/NavBarItemWithSubMenu.tsx +84 -0
- package/src/components/CollapsibleNavBar/NavBarItemWithoutSubMenu.tsx +39 -0
- package/src/components/CollapsibleNavBar/NavBarPopover.tsx +123 -0
- package/src/components/CollapsibleNavBar/TriggerIcon.tsx +35 -0
- package/src/components/CollapsibleNavBar/index.ts +2 -0
- package/src/components/CollapsibleNavBar/stories/CollapsibleNavBar.stories.tsx +57 -0
- package/src/components/CollapsibleNavBar/stories/Logo.tsx +12 -0
- package/src/components/CollapsibleNavBar/stories/StoryComponent.tsx +20 -0
- package/src/components/CollapsibleNavBar/stories/consts.ts +22 -0
- package/src/components/CollapsibleNavBar/stories/styles.ts +21 -0
- package/src/components/CollapsibleNavBar/styles.ts +119 -0
- package/src/components/CollapsibleNavBar/types.ts +14 -0
- package/src/components/ExchangeAccount/styles.ts +2 -2
- package/src/components/ExchangeAccountKeys/styles.ts +1 -0
- package/src/components/NavBar/NavBarBase.ts +2 -5
- package/src/components/NavBar/NavBarWrapper.ts +2 -2
- package/src/components/NavBar/types.ts +17 -0
- package/src/components/TableFilters/TableFiltersAccordion.tsx +1 -2
- package/src/components/TableFilters/TableFiltersAccordionContent.tsx +1 -2
- package/src/index.ts +3 -0
- package/tsbuildcache +1 -1
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import CollapsibleNavBarItem from './CollapsibleNavBarItem';
|
|
2
|
+
import { CollapsibleNavBarPopover } from './NavBarPopover';
|
|
3
|
+
import { TriggerIcon } from './TriggerIcon';
|
|
4
|
+
import CollapsibleNavBarLink from './CollapsibleNavBarLink';
|
|
5
|
+
import * as T from './types';
|
|
6
|
+
|
|
7
|
+
export const NavBarItemWithoutSubMenu = ({
|
|
8
|
+
item,
|
|
9
|
+
pathname,
|
|
10
|
+
}: {
|
|
11
|
+
item: T.CollapsibleNavBarItem;
|
|
12
|
+
pathname: string;
|
|
13
|
+
}) => {
|
|
14
|
+
const { path, iconName, title, iconSize } = item;
|
|
15
|
+
return (
|
|
16
|
+
<CollapsibleNavBarItem key={path}>
|
|
17
|
+
<CollapsibleNavBarLink
|
|
18
|
+
to={'/' + path}
|
|
19
|
+
active={pathname === path ? true : undefined}>
|
|
20
|
+
<CollapsibleNavBarPopover
|
|
21
|
+
triggerIcon={
|
|
22
|
+
<TriggerIcon
|
|
23
|
+
iconName={iconName}
|
|
24
|
+
iconSize={iconSize}
|
|
25
|
+
css={{ marginRight: 20 }}
|
|
26
|
+
/>
|
|
27
|
+
}
|
|
28
|
+
title={title}
|
|
29
|
+
/>
|
|
30
|
+
<TriggerIcon
|
|
31
|
+
iconName={iconName}
|
|
32
|
+
iconSize={iconSize}
|
|
33
|
+
css={{ marginRight: 20 }}
|
|
34
|
+
/>
|
|
35
|
+
<span>{title}</span>
|
|
36
|
+
</CollapsibleNavBarLink>
|
|
37
|
+
</CollapsibleNavBarItem>
|
|
38
|
+
);
|
|
39
|
+
};
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { useEffect, useState } from 'react';
|
|
2
|
+
import { offset } from '@floating-ui/react';
|
|
3
|
+
import { useTheme } from '@emotion/react';
|
|
4
|
+
import {
|
|
5
|
+
Popover,
|
|
6
|
+
PopoverContent,
|
|
7
|
+
PopoverDescription,
|
|
8
|
+
PopoverHeading,
|
|
9
|
+
PopoverTrigger,
|
|
10
|
+
} from '@ssa-ui-kit/core';
|
|
11
|
+
import { useWindowSize } from '@ssa-ui-kit/hooks';
|
|
12
|
+
|
|
13
|
+
export const CollapsibleNavBarPopover = ({
|
|
14
|
+
triggerIcon,
|
|
15
|
+
title,
|
|
16
|
+
content,
|
|
17
|
+
}: {
|
|
18
|
+
triggerIcon: React.ReactElement;
|
|
19
|
+
title: string;
|
|
20
|
+
content?: React.ReactElement;
|
|
21
|
+
}) => {
|
|
22
|
+
const theme = useTheme();
|
|
23
|
+
const [open, setOpen] = useState(false);
|
|
24
|
+
|
|
25
|
+
const onOpenChange = (open: boolean) => {
|
|
26
|
+
setOpen(open);
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
const { width } = useWindowSize();
|
|
30
|
+
|
|
31
|
+
useEffect(() => {
|
|
32
|
+
setOpen(false);
|
|
33
|
+
}, [width]);
|
|
34
|
+
|
|
35
|
+
return (
|
|
36
|
+
<Popover
|
|
37
|
+
floatingOptions={{
|
|
38
|
+
onOpenChange,
|
|
39
|
+
open,
|
|
40
|
+
middleware: [
|
|
41
|
+
offset({
|
|
42
|
+
mainAxis: 37,
|
|
43
|
+
}),
|
|
44
|
+
],
|
|
45
|
+
}}
|
|
46
|
+
placement="right-start"
|
|
47
|
+
interactionsEnabled="both">
|
|
48
|
+
<PopoverTrigger
|
|
49
|
+
variant="custom"
|
|
50
|
+
dataTestId="collapsible-nav-bar-trigger-button"
|
|
51
|
+
css={{
|
|
52
|
+
height: 'auto',
|
|
53
|
+
padding: 0,
|
|
54
|
+
cursor: 'pointer',
|
|
55
|
+
backgroundColor: 'unset',
|
|
56
|
+
}}
|
|
57
|
+
startIcon={triggerIcon}
|
|
58
|
+
/>
|
|
59
|
+
<PopoverContent
|
|
60
|
+
css={{
|
|
61
|
+
[theme.mediaQueries.xs]: {
|
|
62
|
+
display: 'none',
|
|
63
|
+
},
|
|
64
|
+
[theme.mediaQueries.md]: {
|
|
65
|
+
display: 'block',
|
|
66
|
+
},
|
|
67
|
+
}}>
|
|
68
|
+
<PopoverHeading
|
|
69
|
+
css={{
|
|
70
|
+
color: theme.colors.white,
|
|
71
|
+
fontSize: 12,
|
|
72
|
+
padding: '3px 5px 5px 5px',
|
|
73
|
+
background: theme.colors.greyGraphite,
|
|
74
|
+
borderRadius: 5,
|
|
75
|
+
cursor: 'default',
|
|
76
|
+
marginBottom: 1,
|
|
77
|
+
width: 85,
|
|
78
|
+
'&::before': {
|
|
79
|
+
content: '""',
|
|
80
|
+
display: 'block',
|
|
81
|
+
background: 'rgba(71, 74, 80, 1)',
|
|
82
|
+
borderRadius: 2,
|
|
83
|
+
position: 'absolute',
|
|
84
|
+
width: 9,
|
|
85
|
+
height: 9,
|
|
86
|
+
top: 7,
|
|
87
|
+
left: -4,
|
|
88
|
+
transform: 'rotate(45deg)',
|
|
89
|
+
zIndex: -1,
|
|
90
|
+
},
|
|
91
|
+
}}>
|
|
92
|
+
{title}
|
|
93
|
+
</PopoverHeading>
|
|
94
|
+
<PopoverDescription
|
|
95
|
+
css={{
|
|
96
|
+
'& > div': {
|
|
97
|
+
padding: 0,
|
|
98
|
+
background: theme.colors.greyGraphite,
|
|
99
|
+
borderRadius: 5,
|
|
100
|
+
width: 85,
|
|
101
|
+
'& > a': {
|
|
102
|
+
color: theme.colors.white,
|
|
103
|
+
padding: 5,
|
|
104
|
+
fontSize: 12,
|
|
105
|
+
fontWeight: 400,
|
|
106
|
+
'&:first-of-type': {
|
|
107
|
+
paddingTop: 5,
|
|
108
|
+
},
|
|
109
|
+
'&:last-of-type': {
|
|
110
|
+
paddingBottom: 9,
|
|
111
|
+
},
|
|
112
|
+
'&:hover': {
|
|
113
|
+
background: '#62656B',
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
}}>
|
|
118
|
+
{content}
|
|
119
|
+
</PopoverDescription>
|
|
120
|
+
</PopoverContent>
|
|
121
|
+
</Popover>
|
|
122
|
+
);
|
|
123
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { css, useTheme } from '@emotion/react';
|
|
2
|
+
import { Wrapper, Icon, IMapIcons } from '@ssa-ui-kit/core';
|
|
3
|
+
import * as S from './styles';
|
|
4
|
+
|
|
5
|
+
export const TriggerIcon = ({
|
|
6
|
+
iconName,
|
|
7
|
+
iconSize,
|
|
8
|
+
className,
|
|
9
|
+
}: {
|
|
10
|
+
iconName: keyof IMapIcons;
|
|
11
|
+
iconSize?: number;
|
|
12
|
+
className?: string;
|
|
13
|
+
}) => {
|
|
14
|
+
const theme = useTheme();
|
|
15
|
+
return (
|
|
16
|
+
<Wrapper
|
|
17
|
+
css={css`
|
|
18
|
+
width: 24px;
|
|
19
|
+
height: 24px;
|
|
20
|
+
justify-content: center;
|
|
21
|
+
&:hover {
|
|
22
|
+
${S.SVGHoverShadow(theme)}
|
|
23
|
+
}
|
|
24
|
+
`}
|
|
25
|
+
className="trigger-icon">
|
|
26
|
+
<Icon
|
|
27
|
+
name={iconName}
|
|
28
|
+
color={theme.colors.grey}
|
|
29
|
+
css={{ marginRight: 20 }}
|
|
30
|
+
size={iconSize}
|
|
31
|
+
className={className}
|
|
32
|
+
/>
|
|
33
|
+
</Wrapper>
|
|
34
|
+
);
|
|
35
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { Fragment } from 'react';
|
|
2
|
+
import { Routes, Route, MemoryRouter } from 'react-router-dom';
|
|
3
|
+
import { Meta } from '@storybook/react';
|
|
4
|
+
import { Title, Description, Source } from '@storybook/addon-docs';
|
|
5
|
+
|
|
6
|
+
import { DecoratorFunction } from '@storybook/types';
|
|
7
|
+
import { CollapsibleNavBar } from '../CollapsibleNavBar';
|
|
8
|
+
import { ITEMS } from './consts';
|
|
9
|
+
import { Logo } from './Logo';
|
|
10
|
+
|
|
11
|
+
type Args = Parameters<typeof CollapsibleNavBar>[0];
|
|
12
|
+
|
|
13
|
+
const reactRouterDecorator: DecoratorFunction<
|
|
14
|
+
{
|
|
15
|
+
component: typeof CollapsibleNavBar;
|
|
16
|
+
storyResult: React.ReactElement;
|
|
17
|
+
canvasElement: unknown;
|
|
18
|
+
},
|
|
19
|
+
Args
|
|
20
|
+
> = (Story) => {
|
|
21
|
+
return (
|
|
22
|
+
<MemoryRouter>
|
|
23
|
+
<Routes>
|
|
24
|
+
<Route path="/*" element={<Story />} />
|
|
25
|
+
</Routes>
|
|
26
|
+
</MemoryRouter>
|
|
27
|
+
);
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export default {
|
|
31
|
+
title: 'Widgets/CollapsibleNavBar',
|
|
32
|
+
component: CollapsibleNavBar,
|
|
33
|
+
parameters: {
|
|
34
|
+
layout: 'fullscreen',
|
|
35
|
+
docs: {
|
|
36
|
+
page: () => (
|
|
37
|
+
<Fragment>
|
|
38
|
+
<Title />
|
|
39
|
+
<Description />
|
|
40
|
+
<Source code={`<CollapsibleNavBar />`} />
|
|
41
|
+
</Fragment>
|
|
42
|
+
),
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
decorators: [
|
|
46
|
+
reactRouterDecorator,
|
|
47
|
+
(Story) => (
|
|
48
|
+
<div style={{ height: '100vh', position: 'relative' }}>{Story()}</div>
|
|
49
|
+
),
|
|
50
|
+
],
|
|
51
|
+
args: {
|
|
52
|
+
items: ITEMS,
|
|
53
|
+
renderLogo: <Logo />,
|
|
54
|
+
},
|
|
55
|
+
} as Meta<typeof CollapsibleNavBar>;
|
|
56
|
+
|
|
57
|
+
export const Default = {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ResponsiveImage } from '@ssa-ui-kit/core';
|
|
2
|
+
import * as S from './styles';
|
|
3
|
+
|
|
4
|
+
export const Logo = () => (
|
|
5
|
+
<ResponsiveImage
|
|
6
|
+
css={S.ResponsiveLogo}
|
|
7
|
+
srcSet="https://firebasestorage.googleapis.com/v0/b/admin-themes.appspot.com/o/logo%2FCTP_Large_Left.png?alt=media&token=b6fe7ab8-fd0b-475f-bb08-360311f27693 69w, https://firebasestorage.googleapis.com/v0/b/admin-themes.appspot.com/o/logo%2FCTP_Medium_Left.png?alt=media&token=a1aeba69-7c07-40c9-aeac-c2477640870d 55w"
|
|
8
|
+
sizes="(min-width: 900px) 55px, (min-width: 1440px) 69px"
|
|
9
|
+
src="https://firebasestorage.googleapis.com/v0/b/admin-themes.appspot.com/o/logo%2FCTP_Small_Left.png?alt=media&token=bff7149e-3b90-4657-8a11-040e83990e6f"
|
|
10
|
+
alt="SSA CTP logo"
|
|
11
|
+
/>
|
|
12
|
+
);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { MemoryRouter, Routes, Route } from 'react-router-dom';
|
|
2
|
+
import { CollapsibleNavBar } from '../CollapsibleNavBar';
|
|
3
|
+
import { Logo } from './Logo';
|
|
4
|
+
|
|
5
|
+
export const StoryComponent = ({
|
|
6
|
+
items,
|
|
7
|
+
}: Parameters<typeof CollapsibleNavBar>[0]) => (
|
|
8
|
+
<MemoryRouter>
|
|
9
|
+
<Routes>
|
|
10
|
+
<Route
|
|
11
|
+
path="/*"
|
|
12
|
+
element={
|
|
13
|
+
<div style={{ height: '100vh', position: 'relative' }}>
|
|
14
|
+
<CollapsibleNavBar items={items} renderLogo={<Logo />} />
|
|
15
|
+
</div>
|
|
16
|
+
}
|
|
17
|
+
/>
|
|
18
|
+
</Routes>
|
|
19
|
+
</MemoryRouter>
|
|
20
|
+
);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { CollapsibleNavBarExtendedProps } from '../types';
|
|
2
|
+
|
|
3
|
+
export const ITEMS: CollapsibleNavBarExtendedProps['items'] = [
|
|
4
|
+
{ path: '', iconName: 'home', iconSize: 20, title: 'Dashboard' },
|
|
5
|
+
{ path: 'bots', iconName: 'robot', iconSize: 24, title: 'Bots' },
|
|
6
|
+
{
|
|
7
|
+
prefix: 'statistics/',
|
|
8
|
+
iconName: 'chart',
|
|
9
|
+
iconSize: 22,
|
|
10
|
+
title: 'Statistics',
|
|
11
|
+
items: [
|
|
12
|
+
{ path: 'balance', title: 'Balance' },
|
|
13
|
+
{ path: 'max-in-work', title: 'Max in Work' },
|
|
14
|
+
{ path: 'orders', title: 'Orders' },
|
|
15
|
+
{ path: 'pnl', title: 'PNL' },
|
|
16
|
+
{ path: 'turnover', title: 'Turnover' },
|
|
17
|
+
{ path: 'hourly-pnl', title: 'Hourly PNL' },
|
|
18
|
+
],
|
|
19
|
+
},
|
|
20
|
+
{ path: 'history', iconName: 'clock', iconSize: 24, title: 'History' },
|
|
21
|
+
{ path: 'settings', iconName: 'settings', iconSize: 20, title: 'Settings' },
|
|
22
|
+
];
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Theme, css } from '@emotion/react';
|
|
2
|
+
|
|
3
|
+
export const ResponsiveLogo = (theme: Theme) => css`
|
|
4
|
+
width: 48px;
|
|
5
|
+
height: 42px;
|
|
6
|
+
&:hover: {
|
|
7
|
+
filter: drop-shadow(0px 5px 5px ${theme.colors.grey});
|
|
8
|
+
}
|
|
9
|
+
display: none;
|
|
10
|
+
${theme.mediaQueries.md} {
|
|
11
|
+
display: block;
|
|
12
|
+
}
|
|
13
|
+
${theme.mediaQueries.lg} {
|
|
14
|
+
width: 55px;
|
|
15
|
+
height: 48px;
|
|
16
|
+
margin-left: 7px;
|
|
17
|
+
&:has(~ div > input[type='checkbox']:checked) {
|
|
18
|
+
margin-left: 34px;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
`;
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { Theme, css } from '@emotion/react';
|
|
2
|
+
|
|
3
|
+
export const SVGHoverShadow = (theme: Theme) => css`
|
|
4
|
+
filter: drop-shadow(-4px 4px 14px ${theme.colors.white});
|
|
5
|
+
& path {
|
|
6
|
+
fill: ${theme.colors.white};
|
|
7
|
+
}
|
|
8
|
+
& circle {
|
|
9
|
+
stroke: ${theme.colors.white};
|
|
10
|
+
}
|
|
11
|
+
`;
|
|
12
|
+
|
|
13
|
+
export const SVGMainStyle = (theme: Theme) => css`
|
|
14
|
+
& svg {
|
|
15
|
+
& path {
|
|
16
|
+
fill: ${theme.colors.greyDisabledCheckbox};
|
|
17
|
+
}
|
|
18
|
+
& circle {
|
|
19
|
+
stroke: ${theme.colors.greyDisabledCheckbox};
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
`;
|
|
23
|
+
|
|
24
|
+
export const AccordionTitleWrapper = (theme: Theme) => css`
|
|
25
|
+
cursor: pointer;
|
|
26
|
+
align-items: flex-start;
|
|
27
|
+
${SVGMainStyle(theme)}
|
|
28
|
+
${theme.mediaQueries.md} {
|
|
29
|
+
justify-content: center;
|
|
30
|
+
}
|
|
31
|
+
&:hover {
|
|
32
|
+
& > div:nth-of-type(2) > svg {
|
|
33
|
+
${SVGHoverShadow(theme)}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
`;
|
|
37
|
+
|
|
38
|
+
export const AccordionTitle = (theme: Theme) => css`
|
|
39
|
+
padding: 0 14px 0 22px;
|
|
40
|
+
& svg {
|
|
41
|
+
& path {
|
|
42
|
+
fill: none;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
${theme.mediaQueries.md} {
|
|
46
|
+
display: none;
|
|
47
|
+
}
|
|
48
|
+
`;
|
|
49
|
+
|
|
50
|
+
export const AccordionContent = (theme: Theme) => css`
|
|
51
|
+
display: flex;
|
|
52
|
+
align-items: flex-start;
|
|
53
|
+
width: 100%;
|
|
54
|
+
padding-left: 44px;
|
|
55
|
+
& a {
|
|
56
|
+
width: 100%;
|
|
57
|
+
padding: 4.8px 0;
|
|
58
|
+
&:first-of-type {
|
|
59
|
+
padding-top: 15px;
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
${theme.mediaQueries.md} {
|
|
63
|
+
display: none;
|
|
64
|
+
}
|
|
65
|
+
${theme.mediaQueries.lg} {
|
|
66
|
+
display: none;
|
|
67
|
+
}
|
|
68
|
+
`;
|
|
69
|
+
|
|
70
|
+
export const AccordionContentPopover = (theme: Theme) => css`
|
|
71
|
+
display: flex;
|
|
72
|
+
${theme.mediaQueries.md} {
|
|
73
|
+
display: flex;
|
|
74
|
+
}
|
|
75
|
+
${theme.mediaQueries.lg} {
|
|
76
|
+
display: flex;
|
|
77
|
+
}
|
|
78
|
+
`;
|
|
79
|
+
|
|
80
|
+
export const IconWrapper = (theme: Theme) => css`
|
|
81
|
+
width: 24px;
|
|
82
|
+
height: 24px;
|
|
83
|
+
${SVGMainStyle(theme)}
|
|
84
|
+
&:hover svg {
|
|
85
|
+
${SVGHoverShadow(theme)}
|
|
86
|
+
}
|
|
87
|
+
`;
|
|
88
|
+
|
|
89
|
+
export const LogoWrapper = (theme: Theme) => css`
|
|
90
|
+
position: relative;
|
|
91
|
+
${theme.mediaQueries.md} {
|
|
92
|
+
justify-content: center;
|
|
93
|
+
}
|
|
94
|
+
${theme.mediaQueries.lg} {
|
|
95
|
+
justify-content: flex-start;
|
|
96
|
+
}
|
|
97
|
+
`;
|
|
98
|
+
|
|
99
|
+
export const ContentToggle = (theme: Theme) => css`
|
|
100
|
+
display: none;
|
|
101
|
+
position: absolute;
|
|
102
|
+
cursor: pointer;
|
|
103
|
+
right: -17px;
|
|
104
|
+
width: 34px;
|
|
105
|
+
height: 34px;
|
|
106
|
+
background: ${theme.colors.greyLighter};
|
|
107
|
+
border-radius: 12px;
|
|
108
|
+
justify-content: center;
|
|
109
|
+
align-items: center;
|
|
110
|
+
& input {
|
|
111
|
+
display: none;
|
|
112
|
+
}
|
|
113
|
+
& svg {
|
|
114
|
+
cursor: pointer;
|
|
115
|
+
}
|
|
116
|
+
${theme.mediaQueries.lg} {
|
|
117
|
+
display: flex;
|
|
118
|
+
}
|
|
119
|
+
`;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { NavBarExtendedGroup, NavBarExtendedItem } from '../..';
|
|
2
|
+
|
|
3
|
+
export interface CollapsibleNavBarItem extends NavBarExtendedItem {
|
|
4
|
+
iconSize: number;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export interface CollapsibleNavBarGroup extends NavBarExtendedGroup {
|
|
8
|
+
iconSize: number;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface CollapsibleNavBarExtendedProps {
|
|
12
|
+
items: Array<CollapsibleNavBarItem | CollapsibleNavBarGroup>;
|
|
13
|
+
renderLogo: React.ReactElement;
|
|
14
|
+
}
|
|
@@ -92,7 +92,7 @@ export const CardContent = (theme: Theme) => css`
|
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
-
${theme.mediaQueries.
|
|
95
|
+
${theme.mediaQueries.md} {
|
|
96
96
|
> div {
|
|
97
97
|
display: block;
|
|
98
98
|
text-align: center;
|
|
@@ -112,7 +112,7 @@ export const CardContent = (theme: Theme) => css`
|
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
114
|
|
|
115
|
-
${theme.mediaQueries.
|
|
115
|
+
${theme.mediaQueries.lg} {
|
|
116
116
|
> div {
|
|
117
117
|
display: flex;
|
|
118
118
|
justify-content: space-around;
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import styled from '@emotion/styled';
|
|
2
2
|
|
|
3
|
-
import NavBarWrapper from './NavBarWrapper';
|
|
4
|
-
import NavToggleWrapper from './NavToggleWrapper';
|
|
5
|
-
|
|
6
3
|
const NavBarBase = styled.nav`
|
|
7
4
|
align-items: center;
|
|
8
5
|
justify-content: center;
|
|
@@ -15,11 +12,11 @@ const NavBarBase = styled.nav`
|
|
|
15
12
|
display: none;
|
|
16
13
|
|
|
17
14
|
&:checked {
|
|
18
|
-
& ~
|
|
15
|
+
& ~ div:first-of-type {
|
|
19
16
|
background-color: #dee1ec;
|
|
20
17
|
}
|
|
21
18
|
|
|
22
|
-
& ~
|
|
19
|
+
& ~ div:nth-of-type(2) {
|
|
23
20
|
transform: translateY(0);
|
|
24
21
|
border-radius: 12px 12px 0 0;
|
|
25
22
|
height: calc(100vh - 60px);
|
|
@@ -18,11 +18,11 @@ const NavBarWrapper = styled.div`
|
|
|
18
18
|
transform: translateY(-200vh);
|
|
19
19
|
transition: height 475ms ease, transform 450ms ease, border-radius 450ms ease;
|
|
20
20
|
|
|
21
|
-
${({ theme }) => theme.mediaQueries.
|
|
21
|
+
${({ theme }) => theme.mediaQueries.md} {
|
|
22
22
|
width: 64px;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
${({ theme }) => theme.mediaQueries.
|
|
25
|
+
${({ theme }) => theme.mediaQueries.xlg} {
|
|
26
26
|
display: flex;
|
|
27
27
|
position: fixed;
|
|
28
28
|
|
|
@@ -3,3 +3,20 @@ import { IMapIcons } from '@ssa-ui-kit/core';
|
|
|
3
3
|
export interface INavBarProps {
|
|
4
4
|
items: Array<{ path: string; iconName: keyof IMapIcons }>;
|
|
5
5
|
}
|
|
6
|
+
|
|
7
|
+
export type NavBarExtendedItem = {
|
|
8
|
+
path: string;
|
|
9
|
+
iconName: keyof IMapIcons;
|
|
10
|
+
title: string;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export type NavBarExtendedGroup = {
|
|
14
|
+
prefix?: string;
|
|
15
|
+
iconName: keyof IMapIcons;
|
|
16
|
+
title: string;
|
|
17
|
+
items: Array<{ path: string; title: string }>;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export interface INavBarExtendedProps {
|
|
21
|
+
items: Array<NavBarExtendedItem | NavBarExtendedGroup>;
|
|
22
|
+
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { Accordion } from '@ssa-ui-kit/core';
|
|
2
|
-
import { AccordionViewProps } from '@ssa-ui-kit/core/src/components/AccordionGroup/types';
|
|
1
|
+
import { Accordion, AccordionViewProps } from '@ssa-ui-kit/core';
|
|
3
2
|
|
|
4
3
|
export const TableFiltersAccordion = (props: AccordionViewProps) => (
|
|
5
4
|
<Accordion
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { AccordionContent } from '@ssa-ui-kit/core';
|
|
2
|
-
import { RenderContentProps } from '@ssa-ui-kit/core/src/components/AccordionGroup/types';
|
|
1
|
+
import { AccordionContent, RenderContentProps } from '@ssa-ui-kit/core';
|
|
3
2
|
|
|
4
3
|
export const TableFiltersAccordionContent = ({
|
|
5
4
|
isOpened,
|
package/src/index.ts
CHANGED
|
@@ -47,4 +47,7 @@ export * from './components/AddNewAccountCard';
|
|
|
47
47
|
export * from './components/PieChart';
|
|
48
48
|
export * from './components/AccountBalance';
|
|
49
49
|
export * from './components/ExchangeAccount';
|
|
50
|
+
export * from './components/CollapsibleNavBar';
|
|
50
51
|
export * from './components/ExchangeAccountKeys';
|
|
52
|
+
export * from './components/Filters';
|
|
53
|
+
export * from './components/TableFilters';
|