@servicetitan/navigation 11.0.0 → 11.1.1
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/badge-tag.js +7 -2
- package/dist/components/badge-tag.js.map +1 -1
- package/dist/components/counter-tag.js +10 -2
- package/dist/components/counter-tag.js.map +1 -1
- package/dist/components/header-navigation/header-navigation-content.js +44 -8
- package/dist/components/header-navigation/header-navigation-content.js.map +1 -1
- package/dist/components/header-navigation/header-navigation-links.js +49 -13
- package/dist/components/header-navigation/header-navigation-links.js.map +1 -1
- package/dist/components/header-navigation/header-navigation-stories.module.less.d.ts +3 -0
- package/dist/components/header-navigation/header-navigation.js +178 -46
- package/dist/components/header-navigation/header-navigation.js.map +1 -1
- package/dist/components/header-navigation/header-navigation.module.less.d.ts +22 -0
- package/dist/components/header-navigation/index.js +1 -0
- package/dist/components/header-navigation/index.js.map +1 -1
- package/dist/components/header-navigation/with-tooltip.js +7 -1
- package/dist/components/header-navigation/with-tooltip.js.map +1 -1
- package/dist/components/left-navigation/header-navigation-tiny-links.js +62 -15
- package/dist/components/left-navigation/header-navigation-tiny-links.js.map +1 -1
- package/dist/components/left-navigation/header-navigation-tiny.js +27 -2
- package/dist/components/left-navigation/header-navigation-tiny.js.map +1 -1
- package/dist/components/left-navigation/header-navigation-tiny.module.less.d.ts +15 -0
- package/dist/components/left-navigation/index.d.ts +1 -1
- package/dist/components/left-navigation/index.d.ts.map +1 -1
- package/dist/components/left-navigation/index.js +1 -1
- package/dist/components/left-navigation/index.js.map +1 -1
- package/dist/components/left-navigation/interface-internal.js +2 -1
- package/dist/components/left-navigation/interface-internal.js.map +1 -1
- package/dist/components/left-navigation/interface.js +2 -1
- package/dist/components/left-navigation/interface.js.map +1 -1
- package/dist/components/left-navigation/side-navigation-context.js +4 -3
- package/dist/components/left-navigation/side-navigation-context.js.map +1 -1
- package/dist/components/left-navigation/side-navigation-links-internal.js +76 -16
- package/dist/components/left-navigation/side-navigation-links-internal.js.map +1 -1
- package/dist/components/left-navigation/side-navigation-links.js +34 -13
- package/dist/components/left-navigation/side-navigation-links.js.map +1 -1
- package/dist/components/left-navigation/side-navigation.js +314 -85
- package/dist/components/left-navigation/side-navigation.js.map +1 -1
- package/dist/components/left-navigation/side-navigation.module.less.d.ts +48 -0
- package/dist/components/left-navigation/with-tooltip.js +12 -1
- package/dist/components/left-navigation/with-tooltip.js.map +1 -1
- package/dist/components/links.js +28 -7
- package/dist/components/links.js.map +1 -1
- package/dist/components/logo/logo-company-title.js +19 -3
- package/dist/components/logo/logo-company-title.js.map +1 -1
- package/dist/components/logo/logo-titan-text.js +50 -6
- package/dist/components/logo/logo-titan-text.js.map +1 -1
- package/dist/components/logo/logo-titan-text.module.less.d.ts +6 -0
- package/dist/components/logo/logo-titan.d.ts +1 -0
- package/dist/components/logo/logo-titan.d.ts.map +1 -1
- package/dist/components/logo/logo-titan.js +53 -8
- package/dist/components/logo/logo-titan.js.map +1 -1
- package/dist/components/profile-dropdown/profile-dropdown.d.ts.map +1 -1
- package/dist/components/profile-dropdown/profile-dropdown.js +174 -33
- package/dist/components/profile-dropdown/profile-dropdown.js.map +1 -1
- package/dist/components/profile-dropdown/profile-dropdown.module.less.d.ts +23 -0
- package/dist/components/profile-dropdown/profile-icon.js +49 -3
- package/dist/components/profile-dropdown/profile-icon.js.map +1 -1
- package/dist/components/titan-layout/index.d.ts +2 -2
- package/dist/components/titan-layout/index.d.ts.map +1 -1
- package/dist/components/titan-layout/index.js +1 -2
- package/dist/components/titan-layout/index.js.map +1 -1
- package/dist/components/titan-layout/interface-internal.js +2 -1
- package/dist/components/titan-layout/interface-internal.js.map +1 -1
- package/dist/components/titan-layout/interface.js +2 -1
- package/dist/components/titan-layout/interface.js.map +1 -1
- package/dist/components/titan-layout/layout-context.js +15 -6
- package/dist/components/titan-layout/layout-context.js.map +1 -1
- package/dist/components/titan-layout/layout-header-dark.d.ts +10 -0
- package/dist/components/titan-layout/layout-header-dark.d.ts.map +1 -0
- package/dist/components/titan-layout/layout-header-dark.js +146 -0
- package/dist/components/titan-layout/layout-header-dark.js.map +1 -0
- package/dist/components/titan-layout/layout-header-links.js +61 -15
- package/dist/components/titan-layout/layout-header-links.js.map +1 -1
- package/dist/components/titan-layout/layout-header.d.ts +2 -6
- package/dist/components/titan-layout/layout-header.d.ts.map +1 -1
- package/dist/components/titan-layout/layout-header.js +46 -2
- package/dist/components/titan-layout/layout-header.js.map +1 -1
- package/dist/components/titan-layout/layout-header.module.less +337 -83
- package/dist/components/titan-layout/layout-header.module.less.d.ts +35 -0
- package/dist/components/titan-layout/layout-logo.d.ts +5 -3
- package/dist/components/titan-layout/layout-logo.d.ts.map +1 -1
- package/dist/components/titan-layout/layout-logo.js +47 -9
- package/dist/components/titan-layout/layout-logo.js.map +1 -1
- package/dist/components/titan-layout/layout-logo.stories.d.ts +15 -4
- package/dist/components/titan-layout/layout-logo.stories.d.ts.map +1 -1
- package/dist/components/titan-layout/layout-profile.js +75 -23
- package/dist/components/titan-layout/layout-profile.js.map +1 -1
- package/dist/components/titan-layout/layout-sidebar-links-internal.js +162 -36
- package/dist/components/titan-layout/layout-sidebar-links-internal.js.map +1 -1
- package/dist/components/titan-layout/layout-sidebar-links.js +33 -13
- package/dist/components/titan-layout/layout-sidebar-links.js.map +1 -1
- package/dist/components/titan-layout/layout-sidebar.js +198 -34
- package/dist/components/titan-layout/layout-sidebar.js.map +1 -1
- package/dist/components/titan-layout/layout-sidebar.module.less +6 -2
- package/dist/components/titan-layout/layout-sidebar.module.less.d.ts +49 -0
- package/dist/components/titan-layout/notifications-context.js +20 -10
- package/dist/components/titan-layout/notifications-context.js.map +1 -1
- package/dist/components/titan-layout/titan-layout.d.ts +7 -8
- package/dist/components/titan-layout/titan-layout.d.ts.map +1 -1
- package/dist/components/titan-layout/titan-layout.js +271 -117
- package/dist/components/titan-layout/titan-layout.js.map +1 -1
- package/dist/components/titan-layout/titan-layout.module.less +7 -2
- package/dist/components/titan-layout/titan-layout.module.less.d.ts +17 -0
- package/dist/components/titan-layout/titan-layout.stories.d.ts +6 -0
- package/dist/components/titan-layout/titan-layout.stories.d.ts.map +1 -1
- package/dist/components/titan-layout/with-tooltip.d.ts +4 -1
- package/dist/components/titan-layout/with-tooltip.d.ts.map +1 -1
- package/dist/components/titan-layout/with-tooltip.js +13 -1
- package/dist/components/titan-layout/with-tooltip.js.map +1 -1
- package/dist/index.d.ts +4 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -3
- package/dist/index.js.map +1 -1
- package/dist/test/data-stories.module.less.d.ts +3 -0
- package/dist/test/data.js +223 -90
- package/dist/test/data.js.map +1 -1
- package/dist/utils/counter-tag.js +2 -1
- package/dist/utils/counter-tag.js.map +1 -1
- package/dist/utils/navigation-context.js +12 -6
- package/dist/utils/navigation-context.js.map +1 -1
- package/dist/utils/navigation-legacy.js +2 -1
- package/dist/utils/navigation-legacy.js.map +1 -1
- package/dist/utils/navigation.js +2 -1
- package/dist/utils/navigation.js.map +1 -1
- package/dist/utils/side-nav.js +9 -6
- package/dist/utils/side-nav.js.map +1 -1
- package/dist/utils/use-breakpoint.js +11 -8
- package/dist/utils/use-breakpoint.js.map +1 -1
- package/package.json +4 -4
- package/src/components/left-navigation/index.ts +1 -1
- package/src/components/logo/logo-titan.tsx +3 -1
- package/src/components/profile-dropdown/profile-dropdown.tsx +8 -4
- package/src/components/titan-layout/index.ts +2 -2
- package/src/components/titan-layout/layout-header-dark.tsx +186 -0
- package/src/components/titan-layout/layout-header-links.tsx +1 -1
- package/src/components/titan-layout/layout-header.module.less +337 -83
- package/src/components/titan-layout/layout-header.module.less.d.ts +19 -2
- package/src/components/titan-layout/layout-header.tsx +13 -16
- package/src/components/titan-layout/layout-logo.stories.tsx +103 -15
- package/src/components/titan-layout/layout-logo.tsx +33 -36
- package/src/components/titan-layout/layout-profile.stories.tsx +1 -1
- package/src/components/titan-layout/layout-sidebar.module.less +6 -2
- package/src/components/titan-layout/layout-sidebar.tsx +1 -1
- package/src/components/titan-layout/titan-layout.module.less +7 -2
- package/src/components/titan-layout/titan-layout.module.less.d.ts +2 -1
- package/src/components/titan-layout/titan-layout.stories.tsx +80 -23
- package/src/components/titan-layout/titan-layout.tsx +96 -85
- package/src/components/titan-layout/with-tooltip.tsx +5 -2
- package/src/index.ts +4 -5
- package/dist/components/header-navigation/header-navigation-extra-stacked.stories.js +0 -13
- package/dist/components/header-navigation/header-navigation-extra-stacked.stories.js.map +0 -1
- package/dist/components/header-navigation/header-navigation-extra.stories.js +0 -29
- package/dist/components/header-navigation/header-navigation-extra.stories.js.map +0 -1
- package/dist/components/header-navigation/header-navigation-stacked.stories.js +0 -50
- package/dist/components/header-navigation/header-navigation-stacked.stories.js.map +0 -1
- package/dist/components/header-navigation/header-navigation.stories.js +0 -54
- package/dist/components/header-navigation/header-navigation.stories.js.map +0 -1
- package/dist/components/layout.stories.js +0 -29
- package/dist/components/layout.stories.js.map +0 -1
- package/dist/components/left-navigation/header-navigation-extra-tiny.stories.js +0 -13
- package/dist/components/left-navigation/header-navigation-extra-tiny.stories.js.map +0 -1
- package/dist/components/left-navigation/header-navigation-tiny.stories.js +0 -30
- package/dist/components/left-navigation/header-navigation-tiny.stories.js.map +0 -1
- package/dist/components/left-navigation/side-navigation.stories.js +0 -115
- package/dist/components/left-navigation/side-navigation.stories.js.map +0 -1
- package/dist/components/logo/logo.stories.js +0 -20
- package/dist/components/logo/logo.stories.js.map +0 -1
- package/dist/components/profile-dropdown/profile-dropdown-stacked.stories.js +0 -13
- package/dist/components/profile-dropdown/profile-dropdown-stacked.stories.js.map +0 -1
- package/dist/components/profile-dropdown/profile-dropdown-tiny.stories.js +0 -13
- package/dist/components/profile-dropdown/profile-dropdown-tiny.stories.js.map +0 -1
- package/dist/components/profile-dropdown/profile-dropdown.stories.js +0 -51
- package/dist/components/profile-dropdown/profile-dropdown.stories.js.map +0 -1
- package/dist/components/titan-layout/layout-logo.stories.js +0 -17
- package/dist/components/titan-layout/layout-logo.stories.js.map +0 -1
- package/dist/components/titan-layout/layout-profile.stories.js +0 -13
- package/dist/components/titan-layout/layout-profile.stories.js.map +0 -1
- package/dist/components/titan-layout/titan-layout.stories.js +0 -83
- package/dist/components/titan-layout/titan-layout.stories.js.map +0 -1
|
@@ -1,31 +1,119 @@
|
|
|
1
1
|
import { Chip } from '@servicetitan/anvil2';
|
|
2
|
-
import { ReactElement } from 'react';
|
|
3
2
|
import { withAnvil, withDefaultRedirects, withMemoryRouter } from '../../test/data';
|
|
4
|
-
import {
|
|
5
|
-
import { TitanLayout } from './titan-layout';
|
|
3
|
+
import { LayoutLogo, TitanLayoutLogoProps } from './layout-logo';
|
|
4
|
+
import { TitanLayout, TitanLayoutProps } from './titan-layout';
|
|
6
5
|
|
|
7
|
-
const withTitanLayout = (
|
|
8
|
-
<TitanLayout navigationMainItems={[]}
|
|
9
|
-
{element}
|
|
10
|
-
<TitanLayout.Content>logo</TitanLayout.Content>
|
|
11
|
-
</TitanLayout>
|
|
6
|
+
const withTitanLayout = (logo: TitanLayoutLogoProps, layoutProps?: TitanLayoutProps) => () => (
|
|
7
|
+
<TitanLayout navigationMainItems={[]} {...layoutProps} logo={logo} />
|
|
12
8
|
);
|
|
13
9
|
|
|
14
10
|
export default {
|
|
15
11
|
title: 'Navigation/TitanLayoutLogo',
|
|
16
|
-
component:
|
|
12
|
+
component: LayoutLogo,
|
|
17
13
|
decorators: [withDefaultRedirects, withMemoryRouter, withAnvil],
|
|
18
14
|
parameters: {},
|
|
19
15
|
};
|
|
20
16
|
|
|
21
|
-
export const
|
|
17
|
+
export const LogoTinyDefault = withTitanLayout({});
|
|
22
18
|
|
|
23
|
-
export const
|
|
19
|
+
export const LogoTinyCompanyTitle = withTitanLayout({ title: true });
|
|
24
20
|
|
|
25
|
-
export const
|
|
26
|
-
|
|
21
|
+
export const LogoTinyCommercial = withTitanLayout({ title: 'Commercial', mantleFill: '#2270EE' });
|
|
22
|
+
|
|
23
|
+
export const LogoTinyWithPostfix = withTitanLayout({
|
|
24
|
+
title: true,
|
|
25
|
+
postfix: <Chip size="small" label="demo" />,
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
export const LogoTinyCommercialWithPostfix = withTitanLayout({
|
|
29
|
+
title: 'Commercial',
|
|
30
|
+
mantleFill: '#2270EE',
|
|
31
|
+
postfix: <Chip size="small" label="demo" />,
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
export const LogoStackedDefault = withTitanLayout(
|
|
35
|
+
{},
|
|
36
|
+
{
|
|
37
|
+
navVariant: 'top',
|
|
38
|
+
top: <div />,
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
export const LogoStackedCompanyTitle = withTitanLayout(
|
|
42
|
+
{ title: true },
|
|
43
|
+
{
|
|
44
|
+
navVariant: 'top',
|
|
45
|
+
top: <div />,
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
|
|
49
|
+
export const LogoStackedCommercial = withTitanLayout(
|
|
50
|
+
{ title: 'Commercial', mantleFill: '#2270EE' },
|
|
51
|
+
{
|
|
52
|
+
navVariant: 'top',
|
|
53
|
+
top: <div />,
|
|
54
|
+
}
|
|
55
|
+
);
|
|
56
|
+
|
|
57
|
+
export const LogoStackedWithPostfix = withTitanLayout(
|
|
58
|
+
{
|
|
59
|
+
title: true,
|
|
60
|
+
postfix: <Chip size="small" label="demo" />,
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
navVariant: 'top',
|
|
64
|
+
top: <div />,
|
|
65
|
+
}
|
|
66
|
+
);
|
|
67
|
+
|
|
68
|
+
export const LogoStackedCommercialWithPostfix = withTitanLayout(
|
|
69
|
+
{
|
|
70
|
+
title: 'Commercial',
|
|
71
|
+
mantleFill: '#2270EE',
|
|
72
|
+
postfix: <Chip size="small" label="demo" />,
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
navVariant: 'top',
|
|
76
|
+
top: <div />,
|
|
77
|
+
}
|
|
78
|
+
);
|
|
79
|
+
|
|
80
|
+
export const LogoDarkDefault = withTitanLayout(
|
|
81
|
+
{},
|
|
82
|
+
{
|
|
83
|
+
navVariant: 'top',
|
|
84
|
+
}
|
|
85
|
+
);
|
|
86
|
+
export const LogoDarkCompanyTitle = withTitanLayout(
|
|
87
|
+
{ title: true },
|
|
88
|
+
{
|
|
89
|
+
navVariant: 'top',
|
|
90
|
+
}
|
|
91
|
+
);
|
|
92
|
+
|
|
93
|
+
export const LogoDarkCommercial = withTitanLayout(
|
|
94
|
+
{ title: 'Commercial', mantleFill: '#2270EE' },
|
|
95
|
+
{
|
|
96
|
+
navVariant: 'top',
|
|
97
|
+
}
|
|
98
|
+
);
|
|
99
|
+
|
|
100
|
+
export const LogoDarkWithPostfix = withTitanLayout(
|
|
101
|
+
{
|
|
102
|
+
title: true,
|
|
103
|
+
postfix: <Chip size="small" label="demo" />,
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
navVariant: 'top',
|
|
107
|
+
}
|
|
27
108
|
);
|
|
28
109
|
|
|
29
|
-
export const
|
|
30
|
-
|
|
110
|
+
export const LogoDarkCommercialWithPostfix = withTitanLayout(
|
|
111
|
+
{
|
|
112
|
+
title: 'Commercial',
|
|
113
|
+
mantleFill: '#2270EE',
|
|
114
|
+
postfix: <Chip size="small" label="demo" />,
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
navVariant: 'top',
|
|
118
|
+
}
|
|
31
119
|
);
|
|
@@ -1,64 +1,61 @@
|
|
|
1
1
|
import classNames from 'classnames';
|
|
2
2
|
import { FC, Fragment, ReactNode } from 'react';
|
|
3
3
|
import { LogoCompanyTitle } from '../logo/logo-company-title';
|
|
4
|
-
import {
|
|
4
|
+
import { LogoTitanSvg } from '../logo/logo-titan';
|
|
5
|
+
import { LogoTitanTitle, WrapperProps } from '../logo/logo-titan-text';
|
|
5
6
|
import { useTitanLayoutContext } from './layout-context';
|
|
7
|
+
import * as Styles from './layout-header.module.less';
|
|
6
8
|
|
|
7
9
|
export interface TitanLayoutLogoProps {
|
|
8
|
-
/** container class name */
|
|
9
|
-
className?: string;
|
|
10
|
-
|
|
11
10
|
title?: string | boolean;
|
|
12
|
-
|
|
13
11
|
postfix?: ReactNode;
|
|
14
|
-
|
|
15
12
|
logoWrapper?: WrapperProps;
|
|
16
|
-
|
|
17
13
|
mantleFill?: string;
|
|
14
|
+
to?: string;
|
|
18
15
|
}
|
|
19
16
|
|
|
20
17
|
const EmptyWrapper: FC<any> = ({ children }) => children;
|
|
21
18
|
|
|
22
|
-
export const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
19
|
+
export const isLogoCompany = (props: TitanLayoutLogoProps | undefined, isMobile: boolean) =>
|
|
20
|
+
props?.title === true && !isMobile;
|
|
21
|
+
export const isLogoCustom = (props: TitanLayoutLogoProps | undefined, isMobile: boolean) =>
|
|
22
|
+
!isLogoCompany(props, isMobile) && !!props?.mantleFill;
|
|
23
|
+
export const isLogoText = (props: TitanLayoutLogoProps | undefined, isMobile: boolean) =>
|
|
24
|
+
typeof props?.title === 'string' && !isMobile;
|
|
25
|
+
|
|
26
|
+
export const LayoutLogo: FC<TitanLayoutLogoProps> = props => {
|
|
29
27
|
const {
|
|
28
|
+
NavigationComponent,
|
|
30
29
|
breakpoint: { isMobile },
|
|
31
30
|
} = useTitanLayoutContext();
|
|
32
|
-
|
|
33
|
-
const
|
|
34
|
-
const logoSize = isMobile ? 44 : 56;
|
|
35
|
-
const logoCompanySize = 48;
|
|
36
|
-
const showCompanyTitle = title === true && !isMobile;
|
|
31
|
+
const Wrapper: FC<any> = props.to ? NavigationComponent : EmptyWrapper;
|
|
32
|
+
const showCompanyTitle = isLogoCompany(props, isMobile);
|
|
37
33
|
|
|
38
34
|
return (
|
|
39
|
-
<div
|
|
40
|
-
className={classNames(
|
|
41
|
-
'd-f align-items-center',
|
|
42
|
-
{ 'p-t-half': showCompanyTitle },
|
|
43
|
-
className
|
|
44
|
-
)}
|
|
45
|
-
>
|
|
35
|
+
<div className={classNames(Styles.logo)} data-cy="navigation-left">
|
|
46
36
|
{showCompanyTitle ? (
|
|
47
|
-
<
|
|
48
|
-
<
|
|
49
|
-
|
|
50
|
-
|
|
37
|
+
<div className={Styles.logoCompanyWrapper}>
|
|
38
|
+
<Wrapper to={props.to} className={Styles.logoLink}>
|
|
39
|
+
<LogoCompanyTitle />
|
|
40
|
+
</Wrapper>
|
|
41
|
+
</div>
|
|
42
|
+
) : (
|
|
51
43
|
<Fragment>
|
|
52
|
-
<
|
|
53
|
-
|
|
54
|
-
|
|
44
|
+
<div className={Styles.logoShortWrapper}>
|
|
45
|
+
<Wrapper to={props.to} className={Styles.logoLink}>
|
|
46
|
+
<LogoTitanSvg mantleFill={props.mantleFill} />
|
|
47
|
+
</Wrapper>
|
|
48
|
+
</div>
|
|
49
|
+
|
|
50
|
+
{isLogoText(props, isMobile) && (
|
|
51
|
+
<LogoTitanTitle className={Styles.logoTitle}>{props.title}</LogoTitanTitle>
|
|
55
52
|
)}
|
|
56
53
|
</Fragment>
|
|
57
|
-
) : (
|
|
58
|
-
<LogoTitan size={logoSize} mantleFill={mantleFill} logoWrapper={Wrapper} />
|
|
59
54
|
)}
|
|
60
55
|
|
|
61
|
-
{!isMobile && postfix
|
|
56
|
+
{!isMobile && props.postfix && (
|
|
57
|
+
<div className={Styles.logoPostfix}>{props.postfix}</div>
|
|
58
|
+
)}
|
|
62
59
|
</div>
|
|
63
60
|
);
|
|
64
61
|
};
|
|
@@ -85,10 +85,14 @@
|
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
@media only screen and (min-width: 361px) {
|
|
88
|
-
|
|
88
|
+
.nav-drawer-opened {
|
|
89
|
+
width: 85vw;
|
|
90
|
+
}
|
|
89
91
|
}
|
|
90
92
|
@media only screen and (min-width: 481px) {
|
|
91
|
-
|
|
93
|
+
.nav-drawer-opened {
|
|
94
|
+
width: 80vw;
|
|
95
|
+
}
|
|
92
96
|
}
|
|
93
97
|
|
|
94
98
|
// desktop version collapsed
|
|
@@ -64,11 +64,16 @@
|
|
|
64
64
|
--content-offset-top: var(--nav-offset-top);
|
|
65
65
|
--offset: var(--content-offset-top);
|
|
66
66
|
|
|
67
|
-
&.layout-desktop.layout-top {
|
|
67
|
+
&.layout-desktop.layout-top-light {
|
|
68
68
|
--nav-offset-top: 48px;
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
&.layout-
|
|
71
|
+
&.layout-desktop.layout-top-nav {
|
|
72
|
+
--nav-offset-top: 80px;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
&.layout-mobile.layout-top-light,
|
|
76
|
+
&.layout-mobile.layout-top-nav {
|
|
72
77
|
--nav-offset-top: 72px;
|
|
73
78
|
}
|
|
74
79
|
|
|
@@ -9,7 +9,8 @@ export const layoutLegacy: string;
|
|
|
9
9
|
export const layoutMobile: string;
|
|
10
10
|
export const layoutNavSlim: string;
|
|
11
11
|
export const layoutNavWide: string;
|
|
12
|
-
export const
|
|
12
|
+
export const layoutTopLight: string;
|
|
13
|
+
export const layoutTopNav: string;
|
|
13
14
|
export const side: string;
|
|
14
15
|
export const top: string;
|
|
15
16
|
export const topPlaceholder: string;
|
|
@@ -65,6 +65,11 @@ const mainNavItems = [
|
|
|
65
65
|
items.reports,
|
|
66
66
|
];
|
|
67
67
|
|
|
68
|
+
const overflowNavItems = [
|
|
69
|
+
{ ...items.accounting, id: 'accounting-overflow', title: 'Other Accounting' },
|
|
70
|
+
{ ...items.reports, id: 'reports-overflow', title: 'Other Reports' },
|
|
71
|
+
];
|
|
72
|
+
|
|
68
73
|
const profile = (
|
|
69
74
|
<ProfileDropdown>
|
|
70
75
|
<ProfileDropdown.Link
|
|
@@ -199,11 +204,14 @@ const useLayoutProps = (args: LayoutContentArgs): TitanLayoutProps => {
|
|
|
199
204
|
|
|
200
205
|
navigationComponent: NavLinkMock,
|
|
201
206
|
navigationMainItems: args.emptyNav ? [] : mainNavItems,
|
|
207
|
+
navigationOverflowItems: args.emptyNav ? [] : overflowNavItems,
|
|
202
208
|
|
|
203
209
|
profile,
|
|
204
210
|
top: args.search ? <SearchBar /> : undefined,
|
|
205
211
|
header: args.header ? <ContentHeader /> : undefined,
|
|
206
212
|
|
|
213
|
+
logo: { title: true },
|
|
214
|
+
|
|
207
215
|
extraLinks,
|
|
208
216
|
extraLinksTop,
|
|
209
217
|
extraText: args.extraText ? 'EST (-8 hrs)' : undefined,
|
|
@@ -309,38 +317,87 @@ const Content = (args: LayoutContentArgs) => {
|
|
|
309
317
|
|
|
310
318
|
export const TitanLayoutLegacy = (args: LayoutContentArgs) => (
|
|
311
319
|
<TitanLayout {...useLayoutProps(args)} appearance="legacy">
|
|
312
|
-
<
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
320
|
+
<div
|
|
321
|
+
className="p-3"
|
|
322
|
+
style={{ position: 'absolute', width: 'calc(100% - var(--nav-offset-left))' }}
|
|
323
|
+
>
|
|
324
|
+
<Content {...args} />
|
|
325
|
+
</div>
|
|
326
|
+
</TitanLayout>
|
|
327
|
+
);
|
|
328
|
+
|
|
329
|
+
export const TitanLayoutLegacyTopNav = (args: LayoutContentArgs) => (
|
|
330
|
+
<TitanLayout {...useLayoutProps(args)} appearance="legacy" navVariant="top">
|
|
331
|
+
<div
|
|
332
|
+
className="p-3"
|
|
333
|
+
style={{ position: 'absolute', width: 'calc(100% - var(--nav-offset-left))' }}
|
|
334
|
+
>
|
|
335
|
+
<Content {...args} />
|
|
336
|
+
</div>
|
|
337
|
+
</TitanLayout>
|
|
338
|
+
);
|
|
339
|
+
|
|
340
|
+
export const TitanLayoutLegacyTop = (args: LayoutContentArgs) => (
|
|
341
|
+
<TitanLayout {...useLayoutProps(args)} appearance="legacy" navVariant="top" top={undefined}>
|
|
342
|
+
<div
|
|
343
|
+
className="p-3"
|
|
344
|
+
style={{ position: 'absolute', width: 'calc(100% - var(--nav-offset-left))' }}
|
|
345
|
+
>
|
|
346
|
+
<Content {...args} />
|
|
347
|
+
</div>
|
|
321
348
|
</TitanLayout>
|
|
322
349
|
);
|
|
323
350
|
|
|
324
351
|
export const TitanLayoutAnvil1 = (args: LayoutContentArgs) => (
|
|
325
352
|
<TitanLayout {...useLayoutProps(args)} appearance="anvil1">
|
|
326
|
-
<
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
353
|
+
<Anvil1Page>
|
|
354
|
+
<Content {...args} />
|
|
355
|
+
</Anvil1Page>
|
|
356
|
+
</TitanLayout>
|
|
357
|
+
);
|
|
358
|
+
|
|
359
|
+
export const TitanLayoutAnvil1TopNav = (args: LayoutContentArgs) => (
|
|
360
|
+
<TitanLayout {...useLayoutProps(args)} appearance="anvil1" navVariant="top">
|
|
361
|
+
<Anvil1Page>
|
|
362
|
+
<Content {...args} />
|
|
363
|
+
</Anvil1Page>
|
|
364
|
+
</TitanLayout>
|
|
365
|
+
);
|
|
366
|
+
|
|
367
|
+
export const TitanLayoutAnvil1Top = (args: LayoutContentArgs) => (
|
|
368
|
+
<TitanLayout {...useLayoutProps(args)} appearance="anvil1" navVariant="top" top={undefined}>
|
|
369
|
+
<Anvil1Page>
|
|
370
|
+
<Content {...args} />
|
|
371
|
+
</Anvil1Page>
|
|
332
372
|
</TitanLayout>
|
|
333
373
|
);
|
|
334
374
|
|
|
335
375
|
export const TitanLayoutAnvil2 = (args: LayoutContentArgs) => (
|
|
336
376
|
<TitanLayout {...useLayoutProps(args)} appearance="anvil2">
|
|
337
|
-
<
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
377
|
+
<Anvil2Page>
|
|
378
|
+
<Anvil2Page.Content>
|
|
379
|
+
<Content {...args} />
|
|
380
|
+
</Anvil2Page.Content>
|
|
381
|
+
</Anvil2Page>
|
|
382
|
+
</TitanLayout>
|
|
383
|
+
);
|
|
384
|
+
|
|
385
|
+
export const TitanLayoutAnvil2TopNav = (args: LayoutContentArgs) => (
|
|
386
|
+
<TitanLayout {...useLayoutProps(args)} appearance="anvil2" navVariant="top">
|
|
387
|
+
<Anvil2Page>
|
|
388
|
+
<Anvil2Page.Content>
|
|
389
|
+
<Content {...args} />
|
|
390
|
+
</Anvil2Page.Content>
|
|
391
|
+
</Anvil2Page>
|
|
392
|
+
</TitanLayout>
|
|
393
|
+
);
|
|
394
|
+
|
|
395
|
+
export const TitanLayoutAnvil2Top = (args: LayoutContentArgs) => (
|
|
396
|
+
<TitanLayout {...useLayoutProps(args)} appearance="anvil2" navVariant="top" top={undefined}>
|
|
397
|
+
<Anvil2Page>
|
|
398
|
+
<Anvil2Page.Content>
|
|
399
|
+
<Content {...args} />
|
|
400
|
+
</Anvil2Page.Content>
|
|
401
|
+
</Anvil2Page>
|
|
345
402
|
</TitanLayout>
|
|
346
403
|
);
|