@servicetitan/navigation 2.0.0 → 2.2.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.
- package/dist/components/header-navigation/header-navigation-content.d.ts +30 -0
- package/dist/components/header-navigation/header-navigation-content.d.ts.map +1 -0
- package/dist/components/header-navigation/header-navigation-content.js +21 -0
- package/dist/components/header-navigation/header-navigation-content.js.map +1 -0
- package/dist/components/header-navigation/header-navigation-extra.stories.d.ts +1 -1
- package/dist/components/header-navigation/header-navigation-extra.stories.d.ts.map +1 -1
- package/dist/components/header-navigation/header-navigation-extra.stories.js +6 -6
- package/dist/components/header-navigation/header-navigation-extra.stories.js.map +1 -1
- package/dist/components/header-navigation/header-navigation-links.d.ts +38 -0
- package/dist/components/header-navigation/header-navigation-links.d.ts.map +1 -0
- package/dist/components/header-navigation/header-navigation-links.js +38 -0
- package/dist/components/header-navigation/header-navigation-links.js.map +1 -0
- package/dist/components/header-navigation/header-navigation-stacked.stories.d.ts +11 -0
- package/dist/components/header-navigation/header-navigation-stacked.stories.d.ts.map +1 -0
- package/dist/components/header-navigation/header-navigation-stacked.stories.js +68 -0
- package/dist/components/header-navigation/header-navigation-stacked.stories.js.map +1 -0
- package/dist/components/header-navigation/header-navigation-stories.module.less +6 -0
- package/dist/components/header-navigation/header-navigation.d.ts +32 -55
- package/dist/components/header-navigation/header-navigation.d.ts.map +1 -1
- package/dist/components/header-navigation/header-navigation.js +41 -48
- package/dist/components/header-navigation/header-navigation.js.map +1 -1
- package/dist/components/header-navigation/header-navigation.module.less +171 -95
- package/dist/components/header-navigation/header-navigation.stories.d.ts.map +1 -1
- package/dist/components/header-navigation/header-navigation.stories.js +6 -4
- package/dist/components/header-navigation/header-navigation.stories.js.map +1 -1
- package/dist/components/header-navigation/index.d.ts +3 -0
- package/dist/components/header-navigation/index.d.ts.map +1 -0
- package/dist/components/header-navigation/index.js +3 -0
- package/dist/components/header-navigation/index.js.map +1 -0
- package/dist/components/logo/logo-titan-text.d.ts +21 -5
- package/dist/components/logo/logo-titan-text.d.ts.map +1 -1
- package/dist/components/logo/logo-titan-text.js +9 -3
- package/dist/components/logo/logo-titan-text.js.map +1 -1
- package/dist/components/logo/logo-titan-text.module.less +12 -9
- package/dist/components/logo/logo-titan.d.ts +2 -2
- package/dist/components/logo/logo-titan.d.ts.map +1 -1
- package/dist/components/logo/logo-titan.js +1 -1
- package/dist/components/logo/logo-titan.js.map +1 -1
- package/dist/components/logo/logo.stories.d.ts +2 -1
- package/dist/components/logo/logo.stories.d.ts.map +1 -1
- package/dist/components/logo/logo.stories.js +7 -5
- package/dist/components/logo/logo.stories.js.map +1 -1
- package/dist/components/profile-dropdown/profile-dropdown-stacked.stories.d.ts +15 -0
- package/dist/components/profile-dropdown/profile-dropdown-stacked.stories.d.ts.map +1 -0
- package/dist/components/profile-dropdown/profile-dropdown-stacked.stories.js +51 -0
- package/dist/components/profile-dropdown/profile-dropdown-stacked.stories.js.map +1 -0
- package/dist/components/profile-dropdown/profile-dropdown.d.ts +1 -0
- package/dist/components/profile-dropdown/profile-dropdown.d.ts.map +1 -1
- package/dist/components/profile-dropdown/profile-dropdown.js +3 -3
- package/dist/components/profile-dropdown/profile-dropdown.js.map +1 -1
- package/dist/components/profile-dropdown/profile-dropdown.module.less +0 -2
- package/dist/components/profile-dropdown/profile-dropdown.stories.js +1 -1
- package/dist/components/profile-dropdown/profile-dropdown.stories.js.map +1 -1
- package/dist/components/profile-dropdown/profile-icon.d.ts +1 -1
- package/dist/components/profile-dropdown/profile-icon.d.ts.map +1 -1
- package/dist/components/profile-dropdown/profile-icon.js +1 -1
- package/dist/components/profile-dropdown/profile-icon.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/utils/with-tooltip.d.ts +3 -0
- package/dist/utils/with-tooltip.d.ts.map +1 -0
- package/dist/utils/with-tooltip.js +4 -0
- package/dist/utils/with-tooltip.js.map +1 -0
- package/package.json +2 -2
- package/src/components/header-navigation/header-navigation-content.tsx +118 -0
- package/src/components/header-navigation/header-navigation-extra.stories.tsx +12 -12
- package/src/components/header-navigation/header-navigation-links.tsx +143 -0
- package/src/components/header-navigation/header-navigation-stacked.stories.tsx +187 -0
- package/src/components/header-navigation/header-navigation-stories.module.less +6 -0
- package/src/components/header-navigation/header-navigation-stories.module.less.d.ts +3 -0
- package/src/components/header-navigation/header-navigation.module.less +171 -95
- package/src/components/header-navigation/header-navigation.module.less.d.ts +14 -9
- package/src/components/header-navigation/header-navigation.stories.tsx +25 -16
- package/src/components/header-navigation/header-navigation.tsx +151 -266
- package/src/components/header-navigation/index.ts +2 -0
- package/src/components/logo/logo-titan-text.module.less +12 -9
- package/src/components/logo/logo-titan-text.tsx +62 -20
- package/src/components/logo/logo-titan.tsx +2 -2
- package/src/components/logo/logo.stories.tsx +13 -4
- package/src/components/profile-dropdown/profile-dropdown-stacked.stories.tsx +178 -0
- package/src/components/profile-dropdown/profile-dropdown.module.less +0 -2
- package/src/components/profile-dropdown/profile-dropdown.stories.tsx +1 -1
- package/src/components/profile-dropdown/profile-dropdown.tsx +5 -3
- package/src/components/profile-dropdown/profile-icon.tsx +2 -1
- package/src/index.ts +2 -1
- package/src/utils/with-tooltip.tsx +11 -0
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import classNames from 'classnames';
|
|
2
|
+
import { FC, HTMLAttributeAnchorTarget, ReactNode } from 'react';
|
|
3
|
+
import { useNavLink } from '../../utils/navigation-context';
|
|
4
|
+
import { withTooltip } from '../../utils/with-tooltip';
|
|
5
|
+
import {
|
|
6
|
+
HeaderNavigationItemContent,
|
|
7
|
+
HeaderNavigationItemContentPropsStrict,
|
|
8
|
+
} from './header-navigation-content';
|
|
9
|
+
import * as Styles from './header-navigation.module.less';
|
|
10
|
+
|
|
11
|
+
export interface HeaderNavigationTriggerPropsStrict
|
|
12
|
+
extends Omit<HeaderNavigationItemContentPropsStrict, 'title' | 'size'> {
|
|
13
|
+
/** unique identifier */
|
|
14
|
+
id: string;
|
|
15
|
+
/** tooltip text */
|
|
16
|
+
tooltip?: string;
|
|
17
|
+
/** item description */
|
|
18
|
+
hint?: string;
|
|
19
|
+
/** container class name */
|
|
20
|
+
className?: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
interface HeaderNavigationTriggerProps extends HeaderNavigationTriggerPropsStrict {
|
|
24
|
+
/** unstrict props */
|
|
25
|
+
[key: string]: any;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface HeaderNavigationLinkPropsStrict extends HeaderNavigationTriggerPropsStrict {
|
|
29
|
+
/** link href */
|
|
30
|
+
to: string;
|
|
31
|
+
/** isActive */
|
|
32
|
+
isActive?: boolean | ((pathname: string) => boolean);
|
|
33
|
+
/** link html target */
|
|
34
|
+
target?: HTMLAttributeAnchorTarget;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface HeaderNavigationLinkProps extends HeaderNavigationLinkPropsStrict {
|
|
38
|
+
/** unstrict props */
|
|
39
|
+
[key: string]: any;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/** Navigation extra item with link */
|
|
43
|
+
export const HeaderNavigationLink: FC<HeaderNavigationLinkProps> = ({
|
|
44
|
+
id,
|
|
45
|
+
to,
|
|
46
|
+
hint,
|
|
47
|
+
tooltip,
|
|
48
|
+
counter,
|
|
49
|
+
className,
|
|
50
|
+
iconClassName,
|
|
51
|
+
iconComponent,
|
|
52
|
+
iconName,
|
|
53
|
+
isActive,
|
|
54
|
+
target,
|
|
55
|
+
...rest
|
|
56
|
+
}) => {
|
|
57
|
+
const NavigationComponent = useNavLink();
|
|
58
|
+
|
|
59
|
+
return withTooltip(
|
|
60
|
+
<NavigationComponent
|
|
61
|
+
data-cy={`navigation-link-${id}`}
|
|
62
|
+
data-pendo={`navigation-link-${id}`}
|
|
63
|
+
{...rest}
|
|
64
|
+
key={id}
|
|
65
|
+
to={to}
|
|
66
|
+
title={hint}
|
|
67
|
+
className={classNames(Styles.navigationLink, Styles.navigationItem, className, {
|
|
68
|
+
[Styles.navigationItemActive]: isActive === true,
|
|
69
|
+
})}
|
|
70
|
+
isActive={typeof isActive === 'function' ? isActive : undefined}
|
|
71
|
+
activeClassName={Styles.navigationItemActive}
|
|
72
|
+
target={target}
|
|
73
|
+
>
|
|
74
|
+
<HeaderNavigationItemContent
|
|
75
|
+
counter={counter}
|
|
76
|
+
iconComponent={iconComponent}
|
|
77
|
+
iconClassName={iconClassName}
|
|
78
|
+
iconName={iconName}
|
|
79
|
+
/>
|
|
80
|
+
</NavigationComponent>,
|
|
81
|
+
tooltip
|
|
82
|
+
);
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
/** Navigation extra item with icon button */
|
|
86
|
+
export const HeaderNavigationTrigger: FC<HeaderNavigationTriggerProps> = ({
|
|
87
|
+
id,
|
|
88
|
+
className,
|
|
89
|
+
counter,
|
|
90
|
+
iconClassName,
|
|
91
|
+
iconComponent,
|
|
92
|
+
iconName,
|
|
93
|
+
hint,
|
|
94
|
+
tooltip,
|
|
95
|
+
...rest
|
|
96
|
+
}) =>
|
|
97
|
+
withTooltip(
|
|
98
|
+
<div
|
|
99
|
+
data-cy={`navigation-trigger-${id}`}
|
|
100
|
+
data-pendo={`navigation-trigger-${id}`}
|
|
101
|
+
{...rest}
|
|
102
|
+
title={hint}
|
|
103
|
+
className={classNames(
|
|
104
|
+
Styles.navigationItem,
|
|
105
|
+
Styles.navigationLink,
|
|
106
|
+
'cursor-pointer',
|
|
107
|
+
className
|
|
108
|
+
)}
|
|
109
|
+
>
|
|
110
|
+
<HeaderNavigationItemContent
|
|
111
|
+
counter={counter}
|
|
112
|
+
iconComponent={iconComponent}
|
|
113
|
+
iconClassName={iconClassName}
|
|
114
|
+
iconName={iconName}
|
|
115
|
+
/>
|
|
116
|
+
</div>,
|
|
117
|
+
tooltip
|
|
118
|
+
);
|
|
119
|
+
|
|
120
|
+
/** Navigation extra item with custom content */
|
|
121
|
+
export const HeaderNavigationTriggerCustom: FC<
|
|
122
|
+
Omit<
|
|
123
|
+
HeaderNavigationTriggerProps,
|
|
124
|
+
'counter' | 'iconSize' | 'iconName' | 'iconComponent' | 'iconClassName'
|
|
125
|
+
> & { children: ReactNode }
|
|
126
|
+
> = ({ children, id, className, tooltip, title, ...rest }) =>
|
|
127
|
+
withTooltip(
|
|
128
|
+
<div
|
|
129
|
+
data-cy={`navigation-custom-${id}`}
|
|
130
|
+
data-pendo={`navigation-custom-${id}`}
|
|
131
|
+
{...rest}
|
|
132
|
+
title={title}
|
|
133
|
+
className={classNames(
|
|
134
|
+
Styles.navigationItem,
|
|
135
|
+
Styles.navigationLink,
|
|
136
|
+
'cursor-pointer',
|
|
137
|
+
className
|
|
138
|
+
)}
|
|
139
|
+
>
|
|
140
|
+
{children}
|
|
141
|
+
</div>,
|
|
142
|
+
tooltip
|
|
143
|
+
);
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import { Input, Stack } from '@servicetitan/design-system';
|
|
2
|
+
import { FC, Fragment } from 'react';
|
|
3
|
+
import { HeaderNavigationItemData, NavLinkComponentProps } from '../../utils/navigation';
|
|
4
|
+
import { LogoCompanyTitle } from '../logo/logo-company-title';
|
|
5
|
+
import { LogoTitan, LogoTitanTitle } from '../logo/logo-titan-text';
|
|
6
|
+
import { ProfileDropdown } from '../profile-dropdown/profile-dropdown';
|
|
7
|
+
import * as Styles from './header-navigation-stories.module.less';
|
|
8
|
+
import { HeaderNavigationLink, HeaderNavigationStacked, HeaderNavigationTrigger } from './';
|
|
9
|
+
|
|
10
|
+
export default {
|
|
11
|
+
title: 'Navigation/HeaderNavigationStacked',
|
|
12
|
+
component: HeaderNavigationStacked,
|
|
13
|
+
parameters: {},
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const getItem = (
|
|
17
|
+
id: string,
|
|
18
|
+
data: Partial<HeaderNavigationItemData>
|
|
19
|
+
): HeaderNavigationItemData => ({
|
|
20
|
+
id,
|
|
21
|
+
to: '/',
|
|
22
|
+
title: id[0].toUpperCase() + id.substring(1),
|
|
23
|
+
hint: id,
|
|
24
|
+
...(data ?? {}),
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
const InventoryIcon = () => (
|
|
28
|
+
<svg width="20" xmlns="http://www.w3.org/2000/svg" viewBox="-293 385 24 24" fill="currentColor">
|
|
29
|
+
<polyline points="-288,400.9 -282,404.3 -282,397.6 -288,394.2 -288,400.9 " />
|
|
30
|
+
<path d="M-272,401.5c0,0.4-0.2,0.7-0.5,0.9l-7.9,4.4c-0.2,0.1-0.4,0.2-0.6,0.2s-0.4-0.1-0.6-0.2l-7.9-4.4c-0.3-0.2-0.5-0.5-0.5-0.9v-9c0-0.4,0.2-0.7,0.5-0.9l7.9-4.4c0.2-0.1,0.4-0.2,0.6-0.2s0.4,0.1,0.6,0.2l7.9,4.4c0.3,0.2,0.5,0.5,0.5,0.9V401.5 M-287,392.5 l6,3.4l5.9-3.3l-5.9-3.4L-287,392.5 M-274,400.9v-6.7l-6,3.4v6.7L-274,400.9z" />
|
|
31
|
+
</svg>
|
|
32
|
+
);
|
|
33
|
+
|
|
34
|
+
const SearchIcon = () => (
|
|
35
|
+
<svg width="24" height="24" viewBox="-4 2 26 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
36
|
+
<path
|
|
37
|
+
d="M0 15.7992V13.9992H12V15.7992H0ZM0 9.49922V7.69922H6V9.49922H0ZM0 3.19922V1.39922H6V3.19922H0ZM22.74 15.7992L17.94 10.9992C17.42 11.3992 16.86 11.6992 16.26 11.8992C15.66 12.0992 15.04 12.1992 14.4 12.1992C12.74 12.1992 11.325 11.6142 10.155 10.4442C8.985 9.27422 8.4 7.85922 8.4 6.19922C8.4 4.53922 8.985 3.12422 10.155 1.95422C11.325 0.784219 12.74 0.199219 14.4 0.199219C16.06 0.199219 17.475 0.784219 18.645 1.95422C19.815 3.12422 20.4 4.53922 20.4 6.19922C20.4 6.83922 20.3 7.45922 20.1 8.05922C19.9 8.65922 19.6 9.21922 19.2 9.73922L24 14.5392L22.74 15.7992ZM14.393 10.3992C15.5577 10.3992 16.55 9.99157 17.37 9.17627C18.19 8.36099 18.6 7.37099 18.6 6.20627C18.6 5.04157 18.1923 4.04922 17.377 3.22922C16.5618 2.40922 15.5718 1.99922 14.407 1.99922C13.2423 1.99922 12.25 2.40687 11.43 3.22217C10.61 4.03745 10.2 5.02745 10.2 6.19217C10.2 7.35687 10.6077 8.34922 11.423 9.16922C12.2382 9.98922 13.2282 10.3992 14.393 10.3992Z"
|
|
38
|
+
fill="white"
|
|
39
|
+
style={{ fill: 'white', fillOpacity: 1 }}
|
|
40
|
+
/>
|
|
41
|
+
</svg>
|
|
42
|
+
);
|
|
43
|
+
|
|
44
|
+
const items = {
|
|
45
|
+
calendar: getItem('calendar', { iconName: 'event' }),
|
|
46
|
+
calls: getItem('calls', { iconName: 'local_phone', isActive: true, counter: 12 }),
|
|
47
|
+
dashboard: getItem('dashboard', { iconName: 'odometer', isActive: true }),
|
|
48
|
+
dispatch: getItem('dispatch', { iconName: 'location_disabled', counter: 1 }),
|
|
49
|
+
fleet: getItem('fleet', { iconName: 'fleet-pro', title: 'Fleet Pro' }),
|
|
50
|
+
followUps: getItem('followUps', { iconName: 'flag', title: 'Follow Ups' }),
|
|
51
|
+
inventory: getItem('inventory', { iconName: 'toys' }),
|
|
52
|
+
purchasing: getItem('purchasing', { iconComponent: InventoryIcon }),
|
|
53
|
+
accounting: getItem('accounting', { iconName: 'assignment' }),
|
|
54
|
+
marketing: getItem('marketing', { iconName: 'bullhorn' }),
|
|
55
|
+
priceBook: getItem('priceBook', { iconName: 'book' }),
|
|
56
|
+
pointOfSale: getItem('pointOfSale', { iconName: 'cash-register' }),
|
|
57
|
+
projects: getItem('projects', { iconName: 'folder_special' }),
|
|
58
|
+
reports: getItem('reports', { iconName: 'poll' }),
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
const NavLinkMock: FC<NavLinkComponentProps> = props => (
|
|
62
|
+
<a
|
|
63
|
+
href={props.to}
|
|
64
|
+
target={props.target}
|
|
65
|
+
onClick={e => {
|
|
66
|
+
e.preventDefault();
|
|
67
|
+
}}
|
|
68
|
+
className={props.className}
|
|
69
|
+
>
|
|
70
|
+
{props.children}
|
|
71
|
+
</a>
|
|
72
|
+
);
|
|
73
|
+
|
|
74
|
+
export const defaultNavigation = () => (
|
|
75
|
+
<HeaderNavigationStacked
|
|
76
|
+
left={<LogoCompanyTitle className="m-l-1" fill="#fff" />}
|
|
77
|
+
leftClassName="d-f align-items-center"
|
|
78
|
+
items={[
|
|
79
|
+
items.dashboard,
|
|
80
|
+
items.calendar,
|
|
81
|
+
items.calls,
|
|
82
|
+
items.accounting,
|
|
83
|
+
items.dispatch,
|
|
84
|
+
items.fleet,
|
|
85
|
+
]}
|
|
86
|
+
navigationComponent={NavLinkMock}
|
|
87
|
+
/>
|
|
88
|
+
);
|
|
89
|
+
|
|
90
|
+
export const withLogoTextAndOverflow = () => (
|
|
91
|
+
<HeaderNavigationStacked
|
|
92
|
+
left={
|
|
93
|
+
<Stack alignItems="center">
|
|
94
|
+
<LogoTitan mantleFill="#2270EE" size={44} />
|
|
95
|
+
<LogoTitanTitle className="c-white m-l-1">Commercial</LogoTitanTitle>
|
|
96
|
+
</Stack>
|
|
97
|
+
}
|
|
98
|
+
items={[
|
|
99
|
+
items.dashboard,
|
|
100
|
+
items.calendar,
|
|
101
|
+
items.calls,
|
|
102
|
+
items.accounting,
|
|
103
|
+
items.dispatch,
|
|
104
|
+
items.purchasing,
|
|
105
|
+
items.fleet,
|
|
106
|
+
]}
|
|
107
|
+
itemsOverflow={[items.calls, items.accounting, items.purchasing, items.dispatch]}
|
|
108
|
+
navigationComponent={NavLinkMock}
|
|
109
|
+
/>
|
|
110
|
+
);
|
|
111
|
+
|
|
112
|
+
const TimeZoneOffset: FC = () => (
|
|
113
|
+
<div className="fs-2 ff-default p-r-2">
|
|
114
|
+
<span>EST (-9 hrs)</span>
|
|
115
|
+
</div>
|
|
116
|
+
);
|
|
117
|
+
|
|
118
|
+
export const withAllMonolithData = () => (
|
|
119
|
+
<HeaderNavigationStacked
|
|
120
|
+
left={<LogoCompanyTitle className="m-l-1" fill="#fff" />}
|
|
121
|
+
leftClassName="d-f align-items-center"
|
|
122
|
+
items={[
|
|
123
|
+
items.dashboard,
|
|
124
|
+
items.calendar,
|
|
125
|
+
items.calls,
|
|
126
|
+
items.accounting,
|
|
127
|
+
items.dispatch,
|
|
128
|
+
|
|
129
|
+
items.fleet,
|
|
130
|
+
items.followUps,
|
|
131
|
+
items.inventory,
|
|
132
|
+
|
|
133
|
+
items.marketing,
|
|
134
|
+
items.priceBook,
|
|
135
|
+
items.pointOfSale,
|
|
136
|
+
items.reports,
|
|
137
|
+
]}
|
|
138
|
+
navigationComponent={NavLinkMock}
|
|
139
|
+
right={
|
|
140
|
+
<Fragment>
|
|
141
|
+
<TimeZoneOffset />
|
|
142
|
+
|
|
143
|
+
<HeaderNavigationLink
|
|
144
|
+
id="search"
|
|
145
|
+
to="https://google.com"
|
|
146
|
+
target="_blank"
|
|
147
|
+
iconComponent={SearchIcon}
|
|
148
|
+
hint="Search: for all the questions"
|
|
149
|
+
/>
|
|
150
|
+
|
|
151
|
+
<HeaderNavigationTrigger id="dialpad" iconName="phone" counter={2} />
|
|
152
|
+
|
|
153
|
+
<HeaderNavigationTrigger
|
|
154
|
+
id="titanAdvisor"
|
|
155
|
+
iconName="rocket"
|
|
156
|
+
iconClassName={Styles.rocketIcon}
|
|
157
|
+
/>
|
|
158
|
+
|
|
159
|
+
<HeaderNavigationLink
|
|
160
|
+
id="settings"
|
|
161
|
+
to="https://google.com"
|
|
162
|
+
target="_blank"
|
|
163
|
+
iconName="settings"
|
|
164
|
+
aria-label="search"
|
|
165
|
+
hint="Settings"
|
|
166
|
+
isActive
|
|
167
|
+
/>
|
|
168
|
+
|
|
169
|
+
<ProfileDropdown>
|
|
170
|
+
<ProfileDropdown.Link id="tasks" to="https://googgle.com" counter={10}>
|
|
171
|
+
Task Management
|
|
172
|
+
</ProfileDropdown.Link>
|
|
173
|
+
<ProfileDropdown.Divider />
|
|
174
|
+
<ProfileDropdown.Link id="sign-out" to="https://googgle.com">
|
|
175
|
+
Sign Out{' '}
|
|
176
|
+
<span className="c-neutral-100 m-l-half t-truncate">James Bond</span>
|
|
177
|
+
</ProfileDropdown.Link>
|
|
178
|
+
<ProfileDropdown.Section id="userid" className="c-neutral-100 fs-1">
|
|
179
|
+
User ID: 007
|
|
180
|
+
</ProfileDropdown.Section>
|
|
181
|
+
</ProfileDropdown>
|
|
182
|
+
</Fragment>
|
|
183
|
+
}
|
|
184
|
+
center={<Input placeholder="Search smth" size="xsmall" className="w-100" />}
|
|
185
|
+
centerClassName="d-f align-items-center"
|
|
186
|
+
/>
|
|
187
|
+
);
|
|
@@ -1,25 +1,6 @@
|
|
|
1
1
|
/* stylelint-disable no-descending-specificity */
|
|
2
2
|
@import (reference) '@servicetitan/tokens/core/tokens.less';
|
|
3
3
|
|
|
4
|
-
.link {
|
|
5
|
-
display: flex;
|
|
6
|
-
align-items: center;
|
|
7
|
-
flex-wrap: nowrap;
|
|
8
|
-
|
|
9
|
-
.icon {
|
|
10
|
-
display: inline-block;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
ins {
|
|
14
|
-
font-size: @typescale-2;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
& * {
|
|
18
|
-
text-decoration: none;
|
|
19
|
-
white-space: nowrap;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
4
|
.header {
|
|
24
5
|
height: 56px;
|
|
25
6
|
display: flex;
|
|
@@ -29,96 +10,105 @@
|
|
|
29
10
|
background-color: @color-neutral-300;
|
|
30
11
|
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.25);
|
|
31
12
|
|
|
32
|
-
.
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
position: relative;
|
|
13
|
+
.right > * {
|
|
14
|
+
color: @color-white;
|
|
15
|
+
}
|
|
36
16
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
17
|
+
.right {
|
|
18
|
+
.navigation-icon {
|
|
19
|
+
height: 24px;
|
|
20
|
+
width: 24px;
|
|
21
|
+
font-size: 24px;
|
|
41
22
|
}
|
|
42
23
|
}
|
|
43
24
|
|
|
44
|
-
.
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
25
|
+
.center {
|
|
26
|
+
min-width: 0;
|
|
27
|
+
overflow-x: hidden;
|
|
28
|
+
overflow-y: hidden;
|
|
48
29
|
|
|
49
|
-
|
|
50
|
-
// styles specific to main nav links and overflow nav links
|
|
51
|
-
i {
|
|
30
|
+
.navigation-icon {
|
|
52
31
|
height: 20px;
|
|
53
32
|
width: 20px;
|
|
33
|
+
font-size: @typescale-4;
|
|
54
34
|
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.navigation-item-main {
|
|
38
|
+
// styles specific to main nav links
|
|
39
|
+
padding: 18px 12px;
|
|
40
|
+
}
|
|
55
41
|
|
|
56
|
-
|
|
57
|
-
|
|
42
|
+
&.calculating {
|
|
43
|
+
.center {
|
|
44
|
+
opacity: 0;
|
|
58
45
|
}
|
|
59
46
|
}
|
|
60
47
|
|
|
61
|
-
.
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
48
|
+
:global(.profile-dropdown-image) {
|
|
49
|
+
height: 32px;
|
|
50
|
+
width: 32px;
|
|
51
|
+
}
|
|
65
52
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
53
|
+
:global(.profile-dropdown-svg) {
|
|
54
|
+
height: 28px;
|
|
55
|
+
width: 28px;
|
|
56
|
+
}
|
|
69
57
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
58
|
+
.navigation-item-counter {
|
|
59
|
+
font-size: @typescale-0 !important;
|
|
60
|
+
}
|
|
73
61
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
right: 0;
|
|
62
|
+
.navigation-item-main .navigation-item-counter {
|
|
63
|
+
top: 8px;
|
|
64
|
+
right: -4px;
|
|
78
65
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}
|
|
66
|
+
&.navigation-item-counter-long {
|
|
67
|
+
right: -8px;
|
|
82
68
|
}
|
|
83
69
|
}
|
|
84
70
|
|
|
85
|
-
.link-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
71
|
+
.navigation-link .navigation-item-counter {
|
|
72
|
+
top: 8px;
|
|
73
|
+
right: -4px;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
90
76
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
}
|
|
77
|
+
.overflow-popover {
|
|
78
|
+
padding: @spacing-1 @spacing-0 !important;
|
|
94
79
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
80
|
+
.navigation-overflow {
|
|
81
|
+
display: flex;
|
|
82
|
+
flex-direction: column;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
99
85
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
86
|
+
.header-stacked {
|
|
87
|
+
display: grid;
|
|
88
|
+
grid-template-columns: repeat(3, 1fr);
|
|
89
|
+
grid-template-rows: 44px 36px;
|
|
103
90
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
91
|
+
background-color: @color-neutral-500;
|
|
92
|
+
|
|
93
|
+
& > * {
|
|
94
|
+
overflow-y: hidden;
|
|
108
95
|
}
|
|
109
96
|
|
|
110
|
-
.
|
|
111
|
-
|
|
112
|
-
|
|
97
|
+
.he-top-left {
|
|
98
|
+
grid-column: span 1;
|
|
99
|
+
}
|
|
113
100
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
101
|
+
.he-top-center {
|
|
102
|
+
grid-column: span 1;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.he-top-right {
|
|
106
|
+
grid-column: span 1;
|
|
118
107
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
108
|
+
.navigation-icon {
|
|
109
|
+
height: 20px;
|
|
110
|
+
width: 20px;
|
|
111
|
+
font-size: @typescale-4;
|
|
122
112
|
}
|
|
123
113
|
|
|
124
114
|
& > * {
|
|
@@ -126,30 +116,116 @@
|
|
|
126
116
|
}
|
|
127
117
|
}
|
|
128
118
|
|
|
129
|
-
.
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
119
|
+
.he-bottom {
|
|
120
|
+
grid-column: span 3;
|
|
121
|
+
border-top: 1px solid @color-neutral-200;
|
|
122
|
+
|
|
123
|
+
.navigation-icon {
|
|
124
|
+
height: 20px;
|
|
125
|
+
width: 20px;
|
|
126
|
+
font-size: @typescale-4;
|
|
127
|
+
}
|
|
133
128
|
}
|
|
134
129
|
|
|
135
130
|
&.calculating {
|
|
136
|
-
.
|
|
131
|
+
.he-bottom {
|
|
137
132
|
opacity: 0;
|
|
138
133
|
}
|
|
139
134
|
}
|
|
140
135
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
136
|
+
:global(.profile-dropdown-image) {
|
|
137
|
+
height: 24px;
|
|
138
|
+
width: 24px;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
:global(.profile-dropdown-svg) {
|
|
142
|
+
height: 20px;
|
|
143
|
+
width: 20px;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.navigation-item-counter {
|
|
147
|
+
font-size: 8px !important;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.navigation-item-main .navigation-item-counter {
|
|
151
|
+
top: 4px;
|
|
152
|
+
right: -4px;
|
|
153
|
+
|
|
154
|
+
&.navigation-item-counter-long {
|
|
155
|
+
right: -8px;
|
|
144
156
|
}
|
|
145
157
|
}
|
|
158
|
+
|
|
159
|
+
.navigation-link .navigation-item-counter {
|
|
160
|
+
top: 12px;
|
|
161
|
+
right: 0;
|
|
162
|
+
}
|
|
146
163
|
}
|
|
147
164
|
|
|
148
|
-
.
|
|
149
|
-
|
|
165
|
+
.navigation-icon {
|
|
166
|
+
display: inline-block;
|
|
167
|
+
}
|
|
150
168
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
169
|
+
.navigation-item {
|
|
170
|
+
// styles specific to main nav links and extra nav links
|
|
171
|
+
font-family: @base-font-family;
|
|
172
|
+
color: @color-white;
|
|
173
|
+
position: relative;
|
|
174
|
+
display: flex;
|
|
175
|
+
align-items: center;
|
|
176
|
+
flex-wrap: nowrap;
|
|
177
|
+
text-wrap: nowrap;
|
|
178
|
+
|
|
179
|
+
&.navigation-item-active:not(.navigation-item-overflow) {
|
|
180
|
+
color: @color-blue-200 !important;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
&:hover:not(.navigation-item-active):not(.navigation-item-overflow) {
|
|
184
|
+
opacity: 0.7;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.navigation-item-counter {
|
|
188
|
+
color: @color-white;
|
|
189
|
+
font-weight: @font-weight-semibold;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
&:not(.navigation-item-overflow) .navigation-item-counter {
|
|
193
|
+
position: absolute;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.navigation-item-title {
|
|
197
|
+
font-family: @base-font-family;
|
|
198
|
+
font-size: @typescale-2;
|
|
199
|
+
margin-left: @spacing-half;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.navigation-item-main {
|
|
204
|
+
// styles specific to main nav links
|
|
205
|
+
padding: 6px 10px;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.navigation-item-overflow {
|
|
209
|
+
// styles specific to overflow links
|
|
210
|
+
display: inline-flex;
|
|
211
|
+
color: @color-black;
|
|
212
|
+
padding: @spacing-1 12px;
|
|
213
|
+
|
|
214
|
+
&.navigation-item-active:not(:hover) {
|
|
215
|
+
color: @color-blue-500;
|
|
154
216
|
}
|
|
217
|
+
|
|
218
|
+
&:hover {
|
|
219
|
+
background-color: @color-blue-500;
|
|
220
|
+
color: @color-white;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.navigation-item-counter {
|
|
224
|
+
margin-left: @spacing-half;
|
|
225
|
+
margin-top: -@spacing-1;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.navigation-link {
|
|
230
|
+
padding: 18px @spacing-1;
|
|
155
231
|
}
|
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
export const __esModule: true;
|
|
2
|
-
export const active: string;
|
|
3
2
|
export const calculating: string;
|
|
4
3
|
export const center: string;
|
|
5
|
-
export const
|
|
6
|
-
export const
|
|
4
|
+
export const heBottom: string;
|
|
5
|
+
export const heTopCenter: string;
|
|
6
|
+
export const heTopLeft: string;
|
|
7
|
+
export const heTopRight: string;
|
|
7
8
|
export const header: string;
|
|
8
|
-
export const
|
|
9
|
-
export const
|
|
10
|
-
export const
|
|
11
|
-
export const
|
|
12
|
-
export const
|
|
13
|
-
export const
|
|
9
|
+
export const headerStacked: string;
|
|
10
|
+
export const navigationIcon: string;
|
|
11
|
+
export const navigationItem: string;
|
|
12
|
+
export const navigationItemActive: string;
|
|
13
|
+
export const navigationItemCounter: string;
|
|
14
|
+
export const navigationItemCounterLong: string;
|
|
15
|
+
export const navigationItemMain: string;
|
|
16
|
+
export const navigationItemOverflow: string;
|
|
17
|
+
export const navigationItemTitle: string;
|
|
18
|
+
export const navigationLink: string;
|
|
14
19
|
export const navigationOverflow: string;
|
|
15
20
|
export const overflowPopover: string;
|
|
16
21
|
export const right: string;
|