@servicetitan/navigation 11.0.0-canary.237.64cfcfe.0 → 11.0.0-canary.237.6c48c6d.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/badge-tag.d.ts +1 -1
- package/dist/components/badge-tag.d.ts.map +1 -1
- package/dist/components/header-navigation/header-navigation-stacked.stories.js +1 -1
- package/dist/components/header-navigation/header-navigation-stacked.stories.js.map +1 -1
- package/dist/components/header-navigation/header-navigation.stories.js +1 -1
- package/dist/components/header-navigation/header-navigation.stories.js.map +1 -1
- package/dist/components/left-navigation/header-navigation-tiny.stories.js +2 -2
- package/dist/components/left-navigation/header-navigation-tiny.stories.js.map +1 -1
- package/dist/components/logo/logo-titan-text.d.ts +1 -1
- package/dist/components/logo/logo-titan-text.d.ts.map +1 -1
- package/dist/components/profile-dropdown/profile-dropdown.d.ts +10 -7
- package/dist/components/profile-dropdown/profile-dropdown.d.ts.map +1 -1
- package/dist/components/profile-dropdown/profile-dropdown.js +2 -2
- package/dist/components/profile-dropdown/profile-dropdown.js.map +1 -1
- package/dist/components/profile-dropdown/profile-dropdown.module.less +2 -0
- package/dist/components/titan-layout/layout-context.js +1 -1
- package/dist/components/titan-layout/layout-context.js.map +1 -1
- package/dist/components/titan-layout/layout-header.d.ts +2 -0
- package/dist/components/titan-layout/layout-header.d.ts.map +1 -1
- package/dist/components/titan-layout/layout-header.js +3 -4
- package/dist/components/titan-layout/layout-header.js.map +1 -1
- package/dist/components/titan-layout/layout-header.module.less +47 -6
- package/dist/components/titan-layout/layout-logo.d.ts.map +1 -1
- package/dist/components/titan-layout/layout-logo.js +2 -1
- package/dist/components/titan-layout/layout-logo.js.map +1 -1
- package/dist/components/titan-layout/layout-profile.d.ts.map +1 -1
- package/dist/components/titan-layout/layout-profile.js +32 -8
- package/dist/components/titan-layout/layout-profile.js.map +1 -1
- package/dist/components/titan-layout/layout-profile.stories.d.ts.map +1 -1
- package/dist/components/titan-layout/layout-profile.stories.js +1 -1
- package/dist/components/titan-layout/layout-profile.stories.js.map +1 -1
- package/dist/components/titan-layout/layout-sidebar-links-internal.d.ts +2 -2
- package/dist/components/titan-layout/layout-sidebar-links-internal.d.ts.map +1 -1
- package/dist/components/titan-layout/layout-sidebar-links-internal.js +4 -4
- package/dist/components/titan-layout/layout-sidebar-links-internal.js.map +1 -1
- package/dist/components/titan-layout/layout-sidebar-links.d.ts.map +1 -1
- package/dist/components/titan-layout/layout-sidebar-links.js +9 -2
- package/dist/components/titan-layout/layout-sidebar-links.js.map +1 -1
- package/dist/components/titan-layout/layout-sidebar.d.ts +2 -0
- package/dist/components/titan-layout/layout-sidebar.d.ts.map +1 -1
- package/dist/components/titan-layout/layout-sidebar.js +6 -4
- package/dist/components/titan-layout/layout-sidebar.js.map +1 -1
- package/dist/components/titan-layout/layout-sidebar.module.less +25 -5
- package/dist/components/titan-layout/notifications-context.d.ts +13 -0
- package/dist/components/titan-layout/notifications-context.d.ts.map +1 -0
- package/dist/components/titan-layout/notifications-context.js +23 -0
- package/dist/components/titan-layout/notifications-context.js.map +1 -0
- package/dist/components/titan-layout/titan-layout.d.ts +6 -3
- package/dist/components/titan-layout/titan-layout.d.ts.map +1 -1
- package/dist/components/titan-layout/titan-layout.js +53 -18
- package/dist/components/titan-layout/titan-layout.js.map +1 -1
- package/dist/components/titan-layout/titan-layout.module.less +42 -20
- package/dist/components/titan-layout/titan-layout.stories.d.ts +5 -0
- package/dist/components/titan-layout/titan-layout.stories.d.ts.map +1 -1
- package/dist/components/titan-layout/titan-layout.stories.js +18 -7
- package/dist/components/titan-layout/titan-layout.stories.js.map +1 -1
- package/dist/test/data.d.ts +4 -1
- package/dist/test/data.d.ts.map +1 -1
- package/dist/test/data.js +2 -3
- package/dist/test/data.js.map +1 -1
- package/dist/utils/use-breakpoint.d.ts +1 -0
- package/dist/utils/use-breakpoint.d.ts.map +1 -1
- package/dist/utils/use-breakpoint.js +2 -1
- package/dist/utils/use-breakpoint.js.map +1 -1
- package/package.json +2 -2
- package/src/components/badge-tag.tsx +1 -1
- package/src/components/header-navigation/header-navigation-stacked.stories.tsx +1 -1
- package/src/components/header-navigation/header-navigation.stories.tsx +1 -1
- package/src/components/left-navigation/header-navigation-tiny.stories.tsx +2 -2
- package/src/components/logo/logo-titan-text.tsx +1 -1
- package/src/components/profile-dropdown/profile-dropdown.module.less +2 -0
- package/src/components/profile-dropdown/profile-dropdown.tsx +13 -6
- package/src/components/titan-layout/layout-context.tsx +1 -1
- package/src/components/titan-layout/layout-header.module.less +47 -6
- package/src/components/titan-layout/layout-header.tsx +7 -4
- package/src/components/titan-layout/layout-logo.tsx +13 -6
- package/src/components/titan-layout/layout-profile.stories.tsx +10 -1
- package/src/components/titan-layout/layout-profile.tsx +60 -25
- package/src/components/titan-layout/layout-sidebar-links-internal.tsx +18 -5
- package/src/components/titan-layout/layout-sidebar-links.tsx +11 -2
- package/src/components/titan-layout/layout-sidebar.module.less +25 -5
- package/src/components/titan-layout/layout-sidebar.module.less.d.ts +1 -0
- package/src/components/titan-layout/layout-sidebar.tsx +14 -5
- package/src/components/titan-layout/notifications-context.tsx +44 -0
- package/src/components/titan-layout/titan-layout.module.less +42 -20
- package/src/components/titan-layout/titan-layout.module.less.d.ts +2 -1
- package/src/components/titan-layout/titan-layout.stories.tsx +118 -7
- package/src/components/titan-layout/titan-layout.tsx +152 -75
- package/src/test/data.tsx +2 -3
- package/src/utils/use-breakpoint.ts +2 -0
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
margin-top: var(--nav-offset-top);
|
|
14
14
|
|
|
15
15
|
display: flex;
|
|
16
|
-
flex-direction:
|
|
16
|
+
flex-direction: column;
|
|
17
17
|
|
|
18
18
|
.side {
|
|
19
19
|
flex-basis: var(--nav-offset-left);
|
|
@@ -31,39 +31,43 @@
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
.layout-anvil2 {
|
|
34
|
-
.header {
|
|
34
|
+
.content-header {
|
|
35
35
|
position: sticky;
|
|
36
36
|
top: var(--nav-offset-top);
|
|
37
37
|
z-index: 989;
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
.layout-
|
|
42
|
-
.layout-anvil2 {
|
|
41
|
+
.layout-desktop {
|
|
43
42
|
padding-left: var(--nav-offset-left);
|
|
44
43
|
|
|
45
|
-
.
|
|
46
|
-
|
|
44
|
+
.side {
|
|
45
|
+
position: fixed;
|
|
46
|
+
top: var(--nav-offset-top);
|
|
47
|
+
bottom: 0;
|
|
48
|
+
left: 0;
|
|
49
|
+
right: 0;
|
|
50
|
+
z-index: @z-index-global-nav;
|
|
47
51
|
}
|
|
52
|
+
}
|
|
48
53
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
bottom: 0;
|
|
54
|
-
left: 0;
|
|
55
|
-
right: 0;
|
|
56
|
-
z-index: @z-index-global-nav;
|
|
57
|
-
}
|
|
54
|
+
.layout-legacy,
|
|
55
|
+
.layout-anvil2 {
|
|
56
|
+
.top-placeholder {
|
|
57
|
+
height: var(--nav-offset-top);
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
.layout {
|
|
62
|
-
--nav-offset-top:
|
|
62
|
+
--nav-offset-top: 0;
|
|
63
|
+
--nav-offset-left: 0;
|
|
64
|
+
|
|
65
|
+
&.layout-desktop.layout-top {
|
|
66
|
+
--nav-offset-top: 48px;
|
|
67
|
+
}
|
|
63
68
|
|
|
64
|
-
&.layout-mobile {
|
|
65
|
-
--nav-offset-top:
|
|
66
|
-
--nav-offset-left: 0;
|
|
69
|
+
&.layout-mobile.layout-top {
|
|
70
|
+
--nav-offset-top: 72px;
|
|
67
71
|
}
|
|
68
72
|
|
|
69
73
|
&.layout-desktop.layout-nav-slim {
|
|
@@ -76,9 +80,27 @@
|
|
|
76
80
|
|
|
77
81
|
.top {
|
|
78
82
|
position: fixed;
|
|
83
|
+
width: 100vw;
|
|
79
84
|
top: 0;
|
|
80
85
|
left: 0;
|
|
81
|
-
right: 0;
|
|
82
86
|
z-index: 991;
|
|
83
87
|
}
|
|
88
|
+
|
|
89
|
+
.content-header {
|
|
90
|
+
position: sticky;
|
|
91
|
+
left: 0;
|
|
92
|
+
right: 0;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
@media print {
|
|
97
|
+
.layout {
|
|
98
|
+
--nav-offset-left: 0px !important;
|
|
99
|
+
--nav-offset-right: 0px !important;
|
|
100
|
+
|
|
101
|
+
.side,
|
|
102
|
+
.top {
|
|
103
|
+
display: none !important;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
84
106
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"titan-layout.stories.d.ts","sourceRoot":"","sources":["../../../src/components/titan-layout/titan-layout.stories.tsx"],"names":[],"mappings":"AAsBA,UAAU,iBAAiB;IACvB,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"titan-layout.stories.d.ts","sourceRoot":"","sources":["../../../src/components/titan-layout/titan-layout.stories.tsx"],"names":[],"mappings":"AAsBA,UAAU,iBAAiB;IACvB,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,EAAE,OAAO,CAAC;IAChB,WAAW,EAAE,OAAO,CAAC;IACrB,WAAW,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;CACrB;;;;;;UAgBQ,iBAAiB;;AAd1B,wBAeE;AAmQF,eAAO,MAAM,iBAAiB,GAAI,MAAM,iBAAiB,4CASxD,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,MAAM,iBAAiB,4CASxD,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,MAAM,iBAAiB,4CAWxD,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Announcement, Page as Anvil2Page, Button, Popover } from '@servicetitan/anvil2';
|
|
2
|
+
import { Announcement, Page as Anvil2Page, Button, Popover, TextField } from '@servicetitan/anvil2';
|
|
3
3
|
import SvgSearch from '@servicetitan/anvil2/assets/icons/material/round/search.svg';
|
|
4
4
|
import SvgAtlas from '@servicetitan/anvil2/assets/icons/st/atlas_logo.svg';
|
|
5
5
|
import SvgSettingsActive from '@servicetitan/anvil2/assets/icons/st/gnav_settings_active.svg';
|
|
@@ -20,6 +20,11 @@ export default {
|
|
|
20
20
|
header: true,
|
|
21
21
|
sideTop: true,
|
|
22
22
|
extraText: true,
|
|
23
|
+
search: true,
|
|
24
|
+
longContent: true,
|
|
25
|
+
wideContent: false,
|
|
26
|
+
minWidth: false,
|
|
27
|
+
emptyNav: false,
|
|
23
28
|
},
|
|
24
29
|
};
|
|
25
30
|
const mainNavItems = [
|
|
@@ -36,7 +41,7 @@ const mainNavItems = [
|
|
|
36
41
|
items.pointOfSale,
|
|
37
42
|
items.reports,
|
|
38
43
|
];
|
|
39
|
-
const profile = (_jsxs(ProfileDropdown, { children: [_jsx(ProfileDropdown.Link, { id: "first", to: "https://google.com", tooltip: "Google it", target: "_blank", children: "first link" }), _jsx(ProfileDropdown.Section, { id: "second", onClick: () => alert('second click'), tooltip: "Second hint", children: "second link" }), _jsx(ProfileDropdown.Divider, {}), _jsx(ProfileDropdown.Section, { id: "content", children: "some content" }), _jsx(ProfileDropdown.Divider, {}), _jsx(ProfileDropdown.Divider, {}), _jsx(ProfileDropdown.Divider, {}), _jsx(ProfileDropdown.Link, { id: "third", to: "/third", children: "third link" }), _jsx(ProfileDropdown.Divider, {})] }));
|
|
44
|
+
const profile = (_jsxs(ProfileDropdown, { children: [_jsx(ProfileDropdown.Link, { id: "first", to: "https://google.com", tooltip: "Google it", target: "_blank", tag: { value: true }, children: "first link" }), _jsx(ProfileDropdown.Section, { id: "second", onClick: () => alert('second click'), tooltip: "Second hint", children: "second link" }), _jsx(ProfileDropdown.Divider, {}), _jsx(ProfileDropdown.Section, { id: "content", children: "some content" }), _jsx(ProfileDropdown.Divider, {}), _jsx(ProfileDropdown.Divider, {}), _jsx(ProfileDropdown.Divider, {}), _jsx(ProfileDropdown.Link, { id: "third", to: "/third", children: "third link" }), _jsx(ProfileDropdown.Divider, {})] }));
|
|
40
45
|
const extraLinks = (_jsxs(Fragment, { children: [_jsx(HeaderNavigationLink, { id: "search", to: "https://google.com", target: "_blank", title: "Search", hint: "Search: for all the questions", tooltip: "Search", icon: SvgSearch, iconActive: SvgSearch }), _jsx(CallsNavigationTrigger, {}), _jsx(HeaderNavigationLink, { id: "titanAdvisor", to: "/titanAdvisor", title: "Titan Advisor", icon: SvgRocket, iconActive: SvgRocketActive }), _jsx(HeaderNavigationLink, { id: "settings", to: "/settings", title: "Settings", target: "_blank", "aria-label": "search", hint: "Settings", icon: SvgSettings, iconActive: SvgSettingsActive })] }));
|
|
41
46
|
const extraLinksTop = (_jsx(HeaderNavigationTrigger, { id: "atlas", title: "Atlas", icon: SvgAtlas, iconActive: SvgAtlas, "data-pendo": "atlas-chat-button", "data-cy": "atlas-chat-button", "data-atlas-chat-button": true }));
|
|
42
47
|
const SideLinkPopoverWrapper = ({ children, context }) => {
|
|
@@ -51,22 +56,28 @@ const ContentHeader = () => {
|
|
|
51
56
|
const [longInfo, setLongInfo] = useState(false);
|
|
52
57
|
return (_jsxs(Fragment, { children: [_jsx(Announcement, { title: "Some info", status: "info" }), _jsx(Announcement, { title: "Some warning", status: "warning" }), _jsx("div", { className: "d-f justify-content-center align-items-center bg-purple-100-i", style: { height: longInfo ? '120px' : '48px' }, children: _jsxs("div", { className: "d-f align-items-center gap-1", children: ["custom content", ' ', _jsx(Button, { onClick: () => setLongInfo(!longInfo), size: "small", "aria-label": "test", children: longInfo ? '↑' : '↓' })] }) })] }));
|
|
53
58
|
};
|
|
59
|
+
const SearchBar = () => (_jsx(TextField, { size: "small", placeholder: "Search", className: "w-100-i m-x-half-i" }));
|
|
54
60
|
const useLayoutProps = (args) => {
|
|
55
61
|
const [state, setState] = useState(undefined);
|
|
56
62
|
return {
|
|
57
63
|
state,
|
|
58
64
|
onStateChange: setState,
|
|
59
65
|
navigationComponent: NavLinkMock,
|
|
60
|
-
navigationMainItems: mainNavItems,
|
|
66
|
+
navigationMainItems: args.emptyNav ? [] : mainNavItems,
|
|
61
67
|
profile,
|
|
68
|
+
top: args.search ? _jsx(SearchBar, {}) : undefined,
|
|
62
69
|
header: args.header ? _jsx(ContentHeader, {}) : undefined,
|
|
63
70
|
extraLinks,
|
|
64
71
|
extraLinksTop,
|
|
65
72
|
extraText: args.extraText ? 'EST (-8 hrs)' : undefined,
|
|
66
|
-
sideTop: args.sideTop ? sidebarTop() : undefined,
|
|
73
|
+
sideTop: args.sideTop && !args.emptyNav ? sidebarTop() : undefined,
|
|
74
|
+
minContentWidth: args.minWidth ? 900 : undefined,
|
|
67
75
|
};
|
|
68
76
|
};
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
77
|
+
const Content = (args) => {
|
|
78
|
+
return (_jsxs(Fragment, { children: [_jsx(LocationInfo, { className: "m-b-3" }), args.wideContent && (_jsx("div", { style: { width: '1200px' }, children: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." })), args.longContent && (_jsxs("div", { children: [_jsx("p", { children: "Lorem" }), _jsx("p", { children: "ipsum" }), _jsx("p", { children: "dolor" }), _jsx("p", { children: "sit" }), _jsx("p", { children: "amet," }), _jsx("p", { children: "consectetur" }), _jsx("p", { children: "adipiscing" }), _jsx("p", { children: "elit," }), _jsx("p", { children: "sed" }), _jsx("p", { children: "do" }), _jsx("p", { children: "eiusmod" }), _jsx("p", { children: "tempor" }), _jsx("p", { children: "incididunt" }), _jsx("p", { children: "ut" }), _jsx("p", { children: "labore" }), _jsx("p", { children: "et" }), _jsx("p", { children: "dolore" }), _jsx("p", { children: "magna" }), _jsx("p", { children: "aliqua." }), _jsx("p", { children: "Ut" }), _jsx("p", { children: "enim" }), _jsx("p", { children: "ad" }), _jsx("p", { children: "minim" }), _jsx("p", { children: "veniam," }), _jsx("p", { children: "quis" }), _jsx("p", { children: "nostrud" }), _jsx("p", { children: "exercitation" }), _jsx("p", { children: "ullamco" }), _jsx("p", { children: "laboris" }), _jsx("p", { children: "nisi" }), _jsx("p", { children: "ut" }), _jsx("p", { children: "aliquip" }), _jsx("p", { children: "ex" }), _jsx("p", { children: "ea" }), _jsx("p", { children: "commodo" }), _jsx("p", { children: "consequat." }), _jsx("p", { children: "Duis" }), _jsx("p", { children: "aute" }), _jsx("p", { children: "irure" }), _jsx("p", { children: "dolor" }), _jsx("p", { children: "in" }), _jsx("p", { children: "reprehenderit" }), _jsx("p", { children: "in" }), _jsx("p", { children: "voluptate" }), _jsx("p", { children: "velit" }), _jsx("p", { children: "esse" }), _jsx("p", { children: "cillum" }), _jsx("p", { children: "dolore" }), _jsx("p", { children: "eu" }), _jsx("p", { children: "fugiat" }), _jsx("p", { children: "nulla" }), _jsx("p", { children: "pariatur." }), _jsx("p", { children: "Excepteur" }), _jsx("p", { children: "sint" }), _jsx("p", { children: "occaecat" }), _jsx("p", { children: "cupidatat" }), _jsx("p", { children: "non" }), _jsx("p", { children: "proident," }), _jsx("p", { children: "sunt" }), _jsx("p", { children: "in" }), _jsx("p", { children: "culpa" }), _jsx("p", { children: "qui" }), _jsx("p", { children: "officia" }), _jsx("p", { children: "deserunt" }), _jsx("p", { children: "mollit" }), _jsx("p", { children: "anim" }), _jsx("p", { children: "id" }), _jsx("p", { children: "est" }), _jsx("p", { children: "laborum." })] }))] }));
|
|
79
|
+
};
|
|
80
|
+
export const TitanLayoutLegacy = (args) => (_jsxs(TitanLayout, { ...useLayoutProps(args), appearance: "legacy", children: [_jsx(TitanLayout.Logo, { title: true }), _jsx(TitanLayout.Content, { children: _jsx("div", { className: "p-3", children: _jsx(Content, { ...args }) }) })] }));
|
|
81
|
+
export const TitanLayoutAnvil1 = (args) => (_jsxs(TitanLayout, { ...useLayoutProps(args), appearance: "anvil1", children: [_jsx(TitanLayout.Logo, { title: true }), _jsx(TitanLayout.Content, { children: _jsx(Anvil1Page, { children: _jsx(Content, { ...args }) }) })] }));
|
|
82
|
+
export const TitanLayoutAnvil2 = (args) => (_jsxs(TitanLayout, { ...useLayoutProps(args), appearance: "anvil2", children: [_jsx(TitanLayout.Logo, { title: true }), _jsx(TitanLayout.Content, { children: _jsx(Anvil2Page, { children: _jsx(Anvil2Page.Content, { children: _jsx(Content, { ...args }) }) }) })] }));
|
|
72
83
|
//# sourceMappingURL=titan-layout.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"titan-layout.stories.js","sourceRoot":"","sources":["../../../src/components/titan-layout/titan-layout.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,IAAI,IAAI,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"titan-layout.stories.js","sourceRoot":"","sources":["../../../src/components/titan-layout/titan-layout.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,IAAI,IAAI,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACpG,OAAO,SAAS,MAAM,6DAA6D,CAAC;AACpF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,iBAAiB,MAAM,+DAA+D,CAAC;AAC9F,OAAO,WAAW,MAAM,iE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CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
1
2
|
import { NavLinkComponentProps } from '../utils/navigation-context';
|
|
2
3
|
import { HeaderNavigationItemData } from '../utils/navigation-legacy';
|
|
3
4
|
export declare const NavLinkMock: import("react").ForwardRefExoticComponent<Omit<NavLinkComponentProps, "ref"> & import("react").RefAttributes<any>>;
|
|
4
|
-
export declare const LocationInfo:
|
|
5
|
+
export declare const LocationInfo: FC<{
|
|
6
|
+
className?: string;
|
|
7
|
+
}>;
|
|
5
8
|
export declare const withMemoryRouter: (Story: any) => import("react/jsx-runtime").JSX.Element;
|
|
6
9
|
export declare const withAnvil: (Story: any) => import("react/jsx-runtime").JSX.Element;
|
|
7
10
|
export declare const InventoryIcon: () => import("react/jsx-runtime").JSX.Element;
|
package/dist/test/data.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../src/test/data.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../src/test/data.tsx"],"names":[],"mappings":"AAmCA,OAAO,EAAE,EAAE,EAA2C,MAAM,OAAO,CAAC;AAapE,OAAO,EACH,qBAAqB,EAIxB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAGtE,eAAO,MAAM,WAAW,oHAwBvB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,CAInD,CAAC;AAkBF,eAAO,MAAM,gBAAgB,GAAI,OAAO,GAAG,4CAQ1C,CAAC;AAEF,eAAO,MAAM,SAAS,GAAI,OAAO,GAAG,4CAInC,CAAC;AAEF,eAAO,MAAM,aAAa,+CAKzB,CAAC;AAEF,eAAO,MAAM,UAAU,+CAetB,CAAC;AA6CF,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;CAyIjB,CAAC;AAEF,eAAO,MAAM,sBAAsB,+CAwBlC,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,OAAO,GAAG,4CAS9C,CAAC"}
|
package/dist/test/data.js
CHANGED
|
@@ -45,15 +45,14 @@ export const NavLinkMock = forwardRef(({ to, children, activeClassName, classNam
|
|
|
45
45
|
const linkActive = location.pathname.startsWith(to);
|
|
46
46
|
return (_jsx("a", { ...rest, onClick: e => {
|
|
47
47
|
e.preventDefault();
|
|
48
|
-
e.stopPropagation();
|
|
49
48
|
if (!to.startsWith('http')) {
|
|
50
49
|
history.replace(to);
|
|
51
50
|
}
|
|
52
51
|
}, className: classNames(className, linkActive ? activeClassName : ''), href: to, ref: ref, children: children }));
|
|
53
52
|
});
|
|
54
|
-
export const LocationInfo = () => {
|
|
53
|
+
export const LocationInfo = ({ className }) => {
|
|
55
54
|
const location = useLocation();
|
|
56
|
-
return _jsxs(BodyText, { children: ["current location - ", location.pathname] });
|
|
55
|
+
return _jsxs(BodyText, { className: className, children: ["current location - ", location.pathname] });
|
|
57
56
|
};
|
|
58
57
|
const LocationProvider = ({ children }) => {
|
|
59
58
|
const location = useLocation();
|
package/dist/test/data.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data.js","sourceRoot":"","sources":["../../src/test/data.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,QAAQ,MAAM,qEAAqE,CAAC;AAC3F,OAAO,cAAc,MAAM,oEAAoE,CAAC;AAChG,OAAO,mBAAmB,MAAM,iEAAiE,CAAC;AAClG,OAAO,aAAa,MAAM,mEAAmE,CAAC;AAC9F,OAAO,cAAc,MAAM,4DAA4D,CAAC;AACxF,OAAO,QAAQ,MAAM,8DAA8D,CAAC;AACpF,OAAO,kBAAkB,MAAM,gEAAgE,CAAC;AAChG,OAAO,YAAY,MAAM,kEAAkE,CAAC;AAC5F,OAAO,iB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EAC3D,KAAC,QAAQ,IAAC,IAAI,EAAC,YAAY,EAAC,KAAK,QAAC,EAAE,EAAC,iBAAiB,GAAG,IACpD,EACT,KAAC,KAAK,KAAG,IACF,CACd,CAAC"}
|
|
@@ -2,6 +2,7 @@ import { BreakpointReturnProps } from '@servicetitan/anvil2';
|
|
|
2
2
|
export interface TitanBreakpoint {
|
|
3
3
|
name: BreakpointReturnProps['name'];
|
|
4
4
|
isMobile: boolean;
|
|
5
|
+
width: number;
|
|
5
6
|
}
|
|
6
7
|
export declare const useTitanBreakpoint: () => TitanBreakpoint;
|
|
7
8
|
//# sourceMappingURL=use-breakpoint.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-breakpoint.d.ts","sourceRoot":"","sources":["../../src/utils/use-breakpoint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAiB,MAAM,sBAAsB,CAAC;AAG5E,MAAM,WAAW,eAAe;IAC5B,IAAI,EAAE,qBAAqB,CAAC,MAAM,CAAC,CAAC;IACpC,QAAQ,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"use-breakpoint.d.ts","sourceRoot":"","sources":["../../src/utils/use-breakpoint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAiB,MAAM,sBAAsB,CAAC;AAG5E,MAAM,WAAW,eAAe;IAC5B,IAAI,EAAE,qBAAqB,CAAC,MAAM,CAAC,CAAC;IACpC,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,kBAAkB,QAAO,eAWrC,CAAC"}
|
|
@@ -3,10 +3,11 @@ import { useMemo } from 'react';
|
|
|
3
3
|
export const useTitanBreakpoint = () => {
|
|
4
4
|
const breakpoint = useBreakpoint();
|
|
5
5
|
return useMemo(() => {
|
|
6
|
-
var _a;
|
|
6
|
+
var _a, _b;
|
|
7
7
|
return ({
|
|
8
8
|
name: (_a = breakpoint === null || breakpoint === void 0 ? void 0 : breakpoint.name) !== null && _a !== void 0 ? _a : 'xl',
|
|
9
9
|
isMobile: breakpoint ? breakpoint.innerWidth <= 768 : false,
|
|
10
|
+
width: (_b = breakpoint === null || breakpoint === void 0 ? void 0 : breakpoint.innerWidth) !== null && _b !== void 0 ? _b : 0,
|
|
10
11
|
});
|
|
11
12
|
}, [breakpoint]);
|
|
12
13
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-breakpoint.js","sourceRoot":"","sources":["../../src/utils/use-breakpoint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyB,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC5E,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"use-breakpoint.js","sourceRoot":"","sources":["../../src/utils/use-breakpoint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyB,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC5E,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAQhC,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAoB,EAAE;IACpD,MAAM,UAAU,GAAG,aAAa,EAAE,CAAC;IAEnC,OAAO,OAAO,CACV,GAAG,EAAE;;QAAC,OAAA,CAAC;YACH,IAAI,EAAE,MAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,IAAI,mCAAI,IAAI;YAC9B,QAAQ,EAAE,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,UAAU,IAAI,GAAG,CAAC,CAAC,CAAC,KAAK;YAC3D,KAAK,EAAE,MAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,UAAU,mCAAI,CAAC;SACrC,CAAC,CAAA;KAAA,EACF,CAAC,UAAU,CAAC,CACf,CAAC;AACN,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@servicetitan/navigation",
|
|
3
|
-
"version": "11.0.0-canary.237.
|
|
3
|
+
"version": "11.0.0-canary.237.6c48c6d.0",
|
|
4
4
|
"description": "Navigation components",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"less": true,
|
|
43
43
|
"webpack": false
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "6c48c6d20cb5235b2f7d85ccd067303d02a22352"
|
|
46
46
|
}
|
|
@@ -130,7 +130,7 @@ export const WithAllMonolithData = () => (
|
|
|
130
130
|
Task Management
|
|
131
131
|
</ProfileDropdown.Link>
|
|
132
132
|
<ProfileDropdown.Divider />
|
|
133
|
-
<ProfileDropdown.Link id="sign-out" to="https://googgle.com">
|
|
133
|
+
<ProfileDropdown.Link id="sign-out" to="https://googgle.com" text="Sign Out">
|
|
134
134
|
Sign Out{' '}
|
|
135
135
|
<span className="c-neutral-100 m-l-half t-truncate">James Bond</span>
|
|
136
136
|
</ProfileDropdown.Link>
|
|
@@ -154,7 +154,7 @@ export const WithAllMonolithData = () => (
|
|
|
154
154
|
Task Management
|
|
155
155
|
</ProfileDropdown.Link>
|
|
156
156
|
<ProfileDropdown.Divider />
|
|
157
|
-
<ProfileDropdown.Link id="sign-out" to="https://googgle.com">
|
|
157
|
+
<ProfileDropdown.Link id="sign-out" to="https://googgle.com" text="Sign Out">
|
|
158
158
|
Sign Out <span className="c-neutral-100 m-l-half t-truncate">James Bond</span>
|
|
159
159
|
</ProfileDropdown.Link>
|
|
160
160
|
<ProfileDropdown.Section id="userid" className="c-neutral-100 fs-1">
|
|
@@ -93,7 +93,7 @@ export const WithAllMonolithData = () => (
|
|
|
93
93
|
Task Management
|
|
94
94
|
</ProfileDropdown.Link>
|
|
95
95
|
<ProfileDropdown.Divider />
|
|
96
|
-
<ProfileDropdown.Link id="sign-out" to="https://googgle.com">
|
|
96
|
+
<ProfileDropdown.Link id="sign-out" to="https://googgle.com" text="Sign Out">
|
|
97
97
|
Sign Out{' '}
|
|
98
98
|
<span className="c-neutral-100 m-l-half t-truncate">James Bond</span>
|
|
99
99
|
</ProfileDropdown.Link>
|
|
@@ -162,7 +162,7 @@ export const WithAllMonolithDataCommercial = () => (
|
|
|
162
162
|
Task Management
|
|
163
163
|
</ProfileDropdown.Link>
|
|
164
164
|
<ProfileDropdown.Divider />
|
|
165
|
-
<ProfileDropdown.Link id="sign-out" to="https://googgle.com">
|
|
165
|
+
<ProfileDropdown.Link id="sign-out" to="https://googgle.com" text="Sign Out">
|
|
166
166
|
Sign Out{' '}
|
|
167
167
|
<span className="c-neutral-100 m-l-half t-truncate">James Bond</span>
|
|
168
168
|
</ProfileDropdown.Link>
|
|
@@ -3,7 +3,7 @@ import { CSSProperties, FC, ReactNode } from 'react';
|
|
|
3
3
|
import { LogoTitanSvg } from './logo-titan';
|
|
4
4
|
import * as Styles from './logo-titan-text.module.less';
|
|
5
5
|
|
|
6
|
-
export type WrapperProps = FC<{ className
|
|
6
|
+
export type WrapperProps = FC<{ className?: string; children: ReactNode; style?: CSSProperties }>;
|
|
7
7
|
|
|
8
8
|
export interface LogoTitanProps {
|
|
9
9
|
mantleFill?: string;
|
|
@@ -6,6 +6,7 @@ import SvgAccountInactive from '@servicetitan/anvil2/assets/icons/st/gnav_accoun
|
|
|
6
6
|
import { BodyText, Popover, PopoverPropsStrict } from '@servicetitan/design-system';
|
|
7
7
|
import classNames from 'classnames';
|
|
8
8
|
import {
|
|
9
|
+
ComponentPropsWithoutRef,
|
|
9
10
|
FC,
|
|
10
11
|
HTMLAttributeAnchorTarget,
|
|
11
12
|
MouseEvent,
|
|
@@ -147,6 +148,10 @@ const ProfileDropdownTrigger: FC<ProfileDropdownTriggerProps> = ({
|
|
|
147
148
|
);
|
|
148
149
|
};
|
|
149
150
|
|
|
151
|
+
export type ProfileItemContent =
|
|
152
|
+
| { children: string; text?: string }
|
|
153
|
+
| { children: ReactNode; text: string };
|
|
154
|
+
|
|
150
155
|
export interface ProfileDropdownSectionPropsStrict {
|
|
151
156
|
children: ReactNode;
|
|
152
157
|
id: string;
|
|
@@ -155,14 +160,15 @@ export interface ProfileDropdownSectionPropsStrict {
|
|
|
155
160
|
onClick?(e: MouseEvent): void;
|
|
156
161
|
}
|
|
157
162
|
|
|
158
|
-
export
|
|
159
|
-
|
|
160
|
-
|
|
163
|
+
export type ProfileDropdownSectionProps = Omit<ComponentPropsWithoutRef<'div'>, 'children'> &
|
|
164
|
+
ProfileDropdownSectionPropsStrict &
|
|
165
|
+
ProfileItemContent;
|
|
161
166
|
|
|
162
167
|
export const ProfileDropdownSection: FC<ProfileDropdownSectionProps> = ({
|
|
163
168
|
children,
|
|
164
169
|
className,
|
|
165
170
|
id,
|
|
171
|
+
text,
|
|
166
172
|
tooltip,
|
|
167
173
|
onClick,
|
|
168
174
|
...rest
|
|
@@ -206,9 +212,9 @@ export interface ProfileDropdownLinkPropsStrict {
|
|
|
206
212
|
counter?: CounterTagValue;
|
|
207
213
|
}
|
|
208
214
|
|
|
209
|
-
export
|
|
210
|
-
|
|
211
|
-
|
|
215
|
+
export type ProfileDropdownLinkProps = Omit<ComponentPropsWithoutRef<'a'>, 'children'> &
|
|
216
|
+
ProfileDropdownLinkPropsStrict &
|
|
217
|
+
ProfileItemContent;
|
|
212
218
|
|
|
213
219
|
export const ProfileDropdownLink: FC<ProfileDropdownLinkProps> = ({
|
|
214
220
|
children,
|
|
@@ -218,6 +224,7 @@ export const ProfileDropdownLink: FC<ProfileDropdownLinkProps> = ({
|
|
|
218
224
|
counter,
|
|
219
225
|
tag,
|
|
220
226
|
target,
|
|
227
|
+
text,
|
|
221
228
|
to,
|
|
222
229
|
tooltip,
|
|
223
230
|
onClick,
|
|
@@ -19,7 +19,7 @@ export interface TitanLayoutContextType {
|
|
|
19
19
|
|
|
20
20
|
export const LayoutContext = createContext<TitanLayoutContextType>({
|
|
21
21
|
NavigationComponent: DefaultNavLinkComponent,
|
|
22
|
-
breakpoint: { name: 'lg', isMobile: false },
|
|
22
|
+
breakpoint: { name: 'lg', isMobile: false, width: 0 },
|
|
23
23
|
isTitanLayout: false,
|
|
24
24
|
sidebar: { styles: { popoverContent: {} } },
|
|
25
25
|
});
|
|
@@ -4,12 +4,14 @@
|
|
|
4
4
|
@size-links-tiny: 24px;
|
|
5
5
|
|
|
6
6
|
.header {
|
|
7
|
+
--nav-top-content-height: 32px;
|
|
7
8
|
display: flex;
|
|
8
9
|
justify-content: space-between;
|
|
9
10
|
|
|
10
11
|
background-color: @color-white;
|
|
11
12
|
color: @color-black;
|
|
12
|
-
|
|
13
|
+
box-sizing: border-box;
|
|
14
|
+
outline: 1px solid @color-neutral-60;
|
|
13
15
|
|
|
14
16
|
& > * {
|
|
15
17
|
overflow-y: hidden;
|
|
@@ -20,6 +22,10 @@
|
|
|
20
22
|
align-items: center;
|
|
21
23
|
}
|
|
22
24
|
|
|
25
|
+
.he-top-center {
|
|
26
|
+
overflow: hidden;
|
|
27
|
+
}
|
|
28
|
+
|
|
23
29
|
.he-top-right {
|
|
24
30
|
& > * {
|
|
25
31
|
color: @color-black;
|
|
@@ -87,6 +93,7 @@
|
|
|
87
93
|
// desktop
|
|
88
94
|
@media only screen and (min-width: 768px) {
|
|
89
95
|
.header {
|
|
96
|
+
height: var(--nav-offset-top);
|
|
90
97
|
.navigation-link {
|
|
91
98
|
margin: 6px 2px;
|
|
92
99
|
padding: 6px 6px;
|
|
@@ -95,6 +102,12 @@
|
|
|
95
102
|
.he-top-left {
|
|
96
103
|
padding-left: @spacing-1;
|
|
97
104
|
}
|
|
105
|
+
.he-top-center {
|
|
106
|
+
flex: 1;
|
|
107
|
+
margin-left: @spacing-2;
|
|
108
|
+
margin-right: @spacing-2;
|
|
109
|
+
max-width: 400px;
|
|
110
|
+
}
|
|
98
111
|
}
|
|
99
112
|
}
|
|
100
113
|
// desktop wide
|
|
@@ -109,21 +122,39 @@
|
|
|
109
122
|
.he-top-right {
|
|
110
123
|
grid-column: span 1;
|
|
111
124
|
}
|
|
125
|
+
|
|
126
|
+
.he-top-center {
|
|
127
|
+
max-width: unset;
|
|
128
|
+
}
|
|
112
129
|
}
|
|
113
130
|
}
|
|
114
131
|
|
|
115
132
|
// mobile
|
|
116
133
|
@media only screen and (max-width: 768px) {
|
|
117
134
|
.header {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
grid-template-rows: 44px;
|
|
135
|
+
padding: @spacing-2 @spacing-0;
|
|
136
|
+
height: var(--nav-offset-top);
|
|
121
137
|
|
|
122
|
-
|
|
138
|
+
--nav-top-content-height: 40px;
|
|
123
139
|
|
|
124
140
|
.navigation-link {
|
|
125
141
|
padding: 10px;
|
|
126
142
|
}
|
|
143
|
+
|
|
144
|
+
.he-top-center {
|
|
145
|
+
max-width: unset;
|
|
146
|
+
flex: 1;
|
|
147
|
+
margin-left: @spacing-3;
|
|
148
|
+
margin-right: @spacing-3;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.he-top-left {
|
|
152
|
+
margin-left: @spacing-half;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.he-top-right {
|
|
156
|
+
margin-right: @spacing-half;
|
|
157
|
+
}
|
|
127
158
|
}
|
|
128
159
|
}
|
|
129
160
|
|
|
@@ -140,7 +171,8 @@
|
|
|
140
171
|
color: @color-white;
|
|
141
172
|
font-weight: @font-weight-semibold;
|
|
142
173
|
font-size: 8px !important;
|
|
143
|
-
min-width:
|
|
174
|
+
min-width: 16px !important;
|
|
175
|
+
height: 16px !important;
|
|
144
176
|
position: absolute;
|
|
145
177
|
top: 4px;
|
|
146
178
|
right: -2px;
|
|
@@ -158,3 +190,12 @@
|
|
|
158
190
|
right: -8px;
|
|
159
191
|
}
|
|
160
192
|
}
|
|
193
|
+
|
|
194
|
+
@media only screen and (min-width: 768px) {
|
|
195
|
+
.navigation-link {
|
|
196
|
+
.navigation-item-counter {
|
|
197
|
+
min-width: 12px !important;
|
|
198
|
+
height: 12px !important;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|