@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.
Files changed (179) hide show
  1. package/dist/components/badge-tag.js +7 -2
  2. package/dist/components/badge-tag.js.map +1 -1
  3. package/dist/components/counter-tag.js +10 -2
  4. package/dist/components/counter-tag.js.map +1 -1
  5. package/dist/components/header-navigation/header-navigation-content.js +44 -8
  6. package/dist/components/header-navigation/header-navigation-content.js.map +1 -1
  7. package/dist/components/header-navigation/header-navigation-links.js +49 -13
  8. package/dist/components/header-navigation/header-navigation-links.js.map +1 -1
  9. package/dist/components/header-navigation/header-navigation-stories.module.less.d.ts +3 -0
  10. package/dist/components/header-navigation/header-navigation.js +178 -46
  11. package/dist/components/header-navigation/header-navigation.js.map +1 -1
  12. package/dist/components/header-navigation/header-navigation.module.less.d.ts +22 -0
  13. package/dist/components/header-navigation/index.js +1 -0
  14. package/dist/components/header-navigation/index.js.map +1 -1
  15. package/dist/components/header-navigation/with-tooltip.js +7 -1
  16. package/dist/components/header-navigation/with-tooltip.js.map +1 -1
  17. package/dist/components/left-navigation/header-navigation-tiny-links.js +62 -15
  18. package/dist/components/left-navigation/header-navigation-tiny-links.js.map +1 -1
  19. package/dist/components/left-navigation/header-navigation-tiny.js +27 -2
  20. package/dist/components/left-navigation/header-navigation-tiny.js.map +1 -1
  21. package/dist/components/left-navigation/header-navigation-tiny.module.less.d.ts +15 -0
  22. package/dist/components/left-navigation/index.d.ts +1 -1
  23. package/dist/components/left-navigation/index.d.ts.map +1 -1
  24. package/dist/components/left-navigation/index.js +1 -1
  25. package/dist/components/left-navigation/index.js.map +1 -1
  26. package/dist/components/left-navigation/interface-internal.js +2 -1
  27. package/dist/components/left-navigation/interface-internal.js.map +1 -1
  28. package/dist/components/left-navigation/interface.js +2 -1
  29. package/dist/components/left-navigation/interface.js.map +1 -1
  30. package/dist/components/left-navigation/side-navigation-context.js +4 -3
  31. package/dist/components/left-navigation/side-navigation-context.js.map +1 -1
  32. package/dist/components/left-navigation/side-navigation-links-internal.js +76 -16
  33. package/dist/components/left-navigation/side-navigation-links-internal.js.map +1 -1
  34. package/dist/components/left-navigation/side-navigation-links.js +34 -13
  35. package/dist/components/left-navigation/side-navigation-links.js.map +1 -1
  36. package/dist/components/left-navigation/side-navigation.js +314 -85
  37. package/dist/components/left-navigation/side-navigation.js.map +1 -1
  38. package/dist/components/left-navigation/side-navigation.module.less.d.ts +48 -0
  39. package/dist/components/left-navigation/with-tooltip.js +12 -1
  40. package/dist/components/left-navigation/with-tooltip.js.map +1 -1
  41. package/dist/components/links.js +28 -7
  42. package/dist/components/links.js.map +1 -1
  43. package/dist/components/logo/logo-company-title.js +19 -3
  44. package/dist/components/logo/logo-company-title.js.map +1 -1
  45. package/dist/components/logo/logo-titan-text.js +50 -6
  46. package/dist/components/logo/logo-titan-text.js.map +1 -1
  47. package/dist/components/logo/logo-titan-text.module.less.d.ts +6 -0
  48. package/dist/components/logo/logo-titan.d.ts +1 -0
  49. package/dist/components/logo/logo-titan.d.ts.map +1 -1
  50. package/dist/components/logo/logo-titan.js +53 -8
  51. package/dist/components/logo/logo-titan.js.map +1 -1
  52. package/dist/components/profile-dropdown/profile-dropdown.d.ts.map +1 -1
  53. package/dist/components/profile-dropdown/profile-dropdown.js +174 -33
  54. package/dist/components/profile-dropdown/profile-dropdown.js.map +1 -1
  55. package/dist/components/profile-dropdown/profile-dropdown.module.less.d.ts +23 -0
  56. package/dist/components/profile-dropdown/profile-icon.js +49 -3
  57. package/dist/components/profile-dropdown/profile-icon.js.map +1 -1
  58. package/dist/components/titan-layout/index.d.ts +2 -2
  59. package/dist/components/titan-layout/index.d.ts.map +1 -1
  60. package/dist/components/titan-layout/index.js +1 -2
  61. package/dist/components/titan-layout/index.js.map +1 -1
  62. package/dist/components/titan-layout/interface-internal.js +2 -1
  63. package/dist/components/titan-layout/interface-internal.js.map +1 -1
  64. package/dist/components/titan-layout/interface.js +2 -1
  65. package/dist/components/titan-layout/interface.js.map +1 -1
  66. package/dist/components/titan-layout/layout-context.js +15 -6
  67. package/dist/components/titan-layout/layout-context.js.map +1 -1
  68. package/dist/components/titan-layout/layout-header-dark.d.ts +10 -0
  69. package/dist/components/titan-layout/layout-header-dark.d.ts.map +1 -0
  70. package/dist/components/titan-layout/layout-header-dark.js +146 -0
  71. package/dist/components/titan-layout/layout-header-dark.js.map +1 -0
  72. package/dist/components/titan-layout/layout-header-links.js +61 -15
  73. package/dist/components/titan-layout/layout-header-links.js.map +1 -1
  74. package/dist/components/titan-layout/layout-header.d.ts +2 -6
  75. package/dist/components/titan-layout/layout-header.d.ts.map +1 -1
  76. package/dist/components/titan-layout/layout-header.js +46 -2
  77. package/dist/components/titan-layout/layout-header.js.map +1 -1
  78. package/dist/components/titan-layout/layout-header.module.less +337 -83
  79. package/dist/components/titan-layout/layout-header.module.less.d.ts +35 -0
  80. package/dist/components/titan-layout/layout-logo.d.ts +5 -3
  81. package/dist/components/titan-layout/layout-logo.d.ts.map +1 -1
  82. package/dist/components/titan-layout/layout-logo.js +47 -9
  83. package/dist/components/titan-layout/layout-logo.js.map +1 -1
  84. package/dist/components/titan-layout/layout-logo.stories.d.ts +15 -4
  85. package/dist/components/titan-layout/layout-logo.stories.d.ts.map +1 -1
  86. package/dist/components/titan-layout/layout-profile.js +75 -23
  87. package/dist/components/titan-layout/layout-profile.js.map +1 -1
  88. package/dist/components/titan-layout/layout-sidebar-links-internal.js +162 -36
  89. package/dist/components/titan-layout/layout-sidebar-links-internal.js.map +1 -1
  90. package/dist/components/titan-layout/layout-sidebar-links.js +33 -13
  91. package/dist/components/titan-layout/layout-sidebar-links.js.map +1 -1
  92. package/dist/components/titan-layout/layout-sidebar.js +198 -34
  93. package/dist/components/titan-layout/layout-sidebar.js.map +1 -1
  94. package/dist/components/titan-layout/layout-sidebar.module.less +6 -2
  95. package/dist/components/titan-layout/layout-sidebar.module.less.d.ts +49 -0
  96. package/dist/components/titan-layout/notifications-context.js +20 -10
  97. package/dist/components/titan-layout/notifications-context.js.map +1 -1
  98. package/dist/components/titan-layout/titan-layout.d.ts +7 -8
  99. package/dist/components/titan-layout/titan-layout.d.ts.map +1 -1
  100. package/dist/components/titan-layout/titan-layout.js +271 -117
  101. package/dist/components/titan-layout/titan-layout.js.map +1 -1
  102. package/dist/components/titan-layout/titan-layout.module.less +7 -2
  103. package/dist/components/titan-layout/titan-layout.module.less.d.ts +17 -0
  104. package/dist/components/titan-layout/titan-layout.stories.d.ts +6 -0
  105. package/dist/components/titan-layout/titan-layout.stories.d.ts.map +1 -1
  106. package/dist/components/titan-layout/with-tooltip.d.ts +4 -1
  107. package/dist/components/titan-layout/with-tooltip.d.ts.map +1 -1
  108. package/dist/components/titan-layout/with-tooltip.js +13 -1
  109. package/dist/components/titan-layout/with-tooltip.js.map +1 -1
  110. package/dist/index.d.ts +4 -3
  111. package/dist/index.d.ts.map +1 -1
  112. package/dist/index.js +2 -3
  113. package/dist/index.js.map +1 -1
  114. package/dist/test/data-stories.module.less.d.ts +3 -0
  115. package/dist/test/data.js +223 -90
  116. package/dist/test/data.js.map +1 -1
  117. package/dist/utils/counter-tag.js +2 -1
  118. package/dist/utils/counter-tag.js.map +1 -1
  119. package/dist/utils/navigation-context.js +12 -6
  120. package/dist/utils/navigation-context.js.map +1 -1
  121. package/dist/utils/navigation-legacy.js +2 -1
  122. package/dist/utils/navigation-legacy.js.map +1 -1
  123. package/dist/utils/navigation.js +2 -1
  124. package/dist/utils/navigation.js.map +1 -1
  125. package/dist/utils/side-nav.js +9 -6
  126. package/dist/utils/side-nav.js.map +1 -1
  127. package/dist/utils/use-breakpoint.js +11 -8
  128. package/dist/utils/use-breakpoint.js.map +1 -1
  129. package/package.json +4 -4
  130. package/src/components/left-navigation/index.ts +1 -1
  131. package/src/components/logo/logo-titan.tsx +3 -1
  132. package/src/components/profile-dropdown/profile-dropdown.tsx +8 -4
  133. package/src/components/titan-layout/index.ts +2 -2
  134. package/src/components/titan-layout/layout-header-dark.tsx +186 -0
  135. package/src/components/titan-layout/layout-header-links.tsx +1 -1
  136. package/src/components/titan-layout/layout-header.module.less +337 -83
  137. package/src/components/titan-layout/layout-header.module.less.d.ts +19 -2
  138. package/src/components/titan-layout/layout-header.tsx +13 -16
  139. package/src/components/titan-layout/layout-logo.stories.tsx +103 -15
  140. package/src/components/titan-layout/layout-logo.tsx +33 -36
  141. package/src/components/titan-layout/layout-profile.stories.tsx +1 -1
  142. package/src/components/titan-layout/layout-sidebar.module.less +6 -2
  143. package/src/components/titan-layout/layout-sidebar.tsx +1 -1
  144. package/src/components/titan-layout/titan-layout.module.less +7 -2
  145. package/src/components/titan-layout/titan-layout.module.less.d.ts +2 -1
  146. package/src/components/titan-layout/titan-layout.stories.tsx +80 -23
  147. package/src/components/titan-layout/titan-layout.tsx +96 -85
  148. package/src/components/titan-layout/with-tooltip.tsx +5 -2
  149. package/src/index.ts +4 -5
  150. package/dist/components/header-navigation/header-navigation-extra-stacked.stories.js +0 -13
  151. package/dist/components/header-navigation/header-navigation-extra-stacked.stories.js.map +0 -1
  152. package/dist/components/header-navigation/header-navigation-extra.stories.js +0 -29
  153. package/dist/components/header-navigation/header-navigation-extra.stories.js.map +0 -1
  154. package/dist/components/header-navigation/header-navigation-stacked.stories.js +0 -50
  155. package/dist/components/header-navigation/header-navigation-stacked.stories.js.map +0 -1
  156. package/dist/components/header-navigation/header-navigation.stories.js +0 -54
  157. package/dist/components/header-navigation/header-navigation.stories.js.map +0 -1
  158. package/dist/components/layout.stories.js +0 -29
  159. package/dist/components/layout.stories.js.map +0 -1
  160. package/dist/components/left-navigation/header-navigation-extra-tiny.stories.js +0 -13
  161. package/dist/components/left-navigation/header-navigation-extra-tiny.stories.js.map +0 -1
  162. package/dist/components/left-navigation/header-navigation-tiny.stories.js +0 -30
  163. package/dist/components/left-navigation/header-navigation-tiny.stories.js.map +0 -1
  164. package/dist/components/left-navigation/side-navigation.stories.js +0 -115
  165. package/dist/components/left-navigation/side-navigation.stories.js.map +0 -1
  166. package/dist/components/logo/logo.stories.js +0 -20
  167. package/dist/components/logo/logo.stories.js.map +0 -1
  168. package/dist/components/profile-dropdown/profile-dropdown-stacked.stories.js +0 -13
  169. package/dist/components/profile-dropdown/profile-dropdown-stacked.stories.js.map +0 -1
  170. package/dist/components/profile-dropdown/profile-dropdown-tiny.stories.js +0 -13
  171. package/dist/components/profile-dropdown/profile-dropdown-tiny.stories.js.map +0 -1
  172. package/dist/components/profile-dropdown/profile-dropdown.stories.js +0 -51
  173. package/dist/components/profile-dropdown/profile-dropdown.stories.js.map +0 -1
  174. package/dist/components/titan-layout/layout-logo.stories.js +0 -17
  175. package/dist/components/titan-layout/layout-logo.stories.js.map +0 -1
  176. package/dist/components/titan-layout/layout-profile.stories.js +0 -13
  177. package/dist/components/titan-layout/layout-profile.stories.js.map +0 -1
  178. package/dist/components/titan-layout/titan-layout.stories.js +0 -83
  179. package/dist/components/titan-layout/titan-layout.stories.js.map +0 -1
@@ -1,13 +1,11 @@
1
1
  import classNames from 'classnames';
2
2
  import {
3
3
  CSSProperties,
4
- Children,
5
4
  ComponentPropsWithoutRef,
6
5
  FC,
7
6
  Fragment,
8
7
  ReactElement,
9
8
  ReactNode,
10
- isValidElement,
11
9
  useCallback,
12
10
  useEffect,
13
11
  useMemo,
@@ -25,21 +23,23 @@ import {
25
23
  TitanLayoutSidebarContextType,
26
24
  } from './layout-context';
27
25
  import { LayoutHeader } from './layout-header';
28
- import { TitanLayoutLogo, TitanLayoutLogoProps } from './layout-logo';
26
+ import { LayoutHeaderDark } from './layout-header-dark';
27
+ import { TitanLayoutLogoProps } from './layout-logo';
29
28
  import { LayoutSidebar } from './layout-sidebar';
30
29
  import { TitanLayoutSidebarLink, TitanLayoutSidebarTrigger } from './layout-sidebar-links';
31
30
  import { InternalSideNavigationTrigger } from './layout-sidebar-links-internal';
32
31
  import { useNotificationsState } from './notifications-context';
33
32
  import * as Styles from './titan-layout.module.less';
34
33
 
35
- type TitanLayoutChild = ReactElement<TitanLayoutContentProps> | ReactElement<TitanLayoutLogoProps>;
36
-
37
34
  export type TitanLayoutProps = Omit<ComponentPropsWithoutRef<'div'>, 'children' | 'style'> & {
38
35
  /** layout appearance */
39
36
  appearance?: 'legacy' | 'anvil1' | 'anvil2';
40
37
 
38
+ /** layout navigation variant (left by default) */
39
+ navVariant?: 'left' | 'top';
40
+
41
41
  /** layout's content */
42
- children?: TitanLayoutChild | TitanLayoutChild[];
42
+ children?: ReactNode;
43
43
 
44
44
  /** show only content without side and top bars */
45
45
  contentOnly?: boolean;
@@ -50,6 +50,12 @@ export type TitanLayoutProps = Omit<ComponentPropsWithoutRef<'div'>, 'children'
50
50
  /** data for main navigation links */
51
51
  navigationMainItems?: NavigationItemData[];
52
52
 
53
+ /** data for overflow navigation links (used only with top variant) */
54
+ navigationOverflowItems?: NavigationItemData[];
55
+
56
+ /** logo props */
57
+ logo?: TitanLayoutLogoProps;
58
+
53
59
  state?: TitanLayoutState;
54
60
  onStateChange?: (state: TitanLayoutState) => void;
55
61
 
@@ -72,7 +78,7 @@ const defaultSidebarContext: TitanLayoutSidebarContextType = {
72
78
  },
73
79
  };
74
80
 
75
- const useVariant = (appearance: TitanLayoutProps['appearance']) =>
81
+ const useAppearance = (appearance: TitanLayoutProps['appearance']) =>
76
82
  useMemo(() => {
77
83
  const isLegacy = appearance === 'legacy';
78
84
  const isAnvil1 = appearance === 'anvil1';
@@ -86,37 +92,9 @@ const useVariant = (appearance: TitanLayoutProps['appearance']) =>
86
92
  };
87
93
  }, [appearance]);
88
94
 
89
- const useLayoutChildren = (children: TitanLayoutProps['children']) =>
90
- useMemo(
91
- () =>
92
- Children.toArray(children).reduce(
93
- (out, item) => {
94
- if (
95
- item &&
96
- isValidElement(item) &&
97
- item.type &&
98
- typeof item.type !== 'string'
99
- ) {
100
- if (item.type.name === TitanLayoutContent.name) {
101
- out.content = item as any;
102
- } else if (item.type.name === TitanLayoutLogo.name) {
103
- out.logo = item as any;
104
- }
105
- }
106
- return out;
107
- },
108
- {
109
- logo: <TitanLayoutLogo />,
110
- } as {
111
- content?: ReactElement<TitanLayoutContentProps>;
112
- logo: ReactElement<TitanLayoutLogoProps>;
113
- }
114
- ),
115
- [children]
116
- );
117
-
118
95
  const TitanLayoutComponent: FC<TitanLayoutProps> = ({
119
96
  appearance = 'anvil2',
97
+ navVariant = 'left',
120
98
  id,
121
99
  children,
122
100
  contentOnly,
@@ -125,8 +103,10 @@ const TitanLayoutComponent: FC<TitanLayoutProps> = ({
125
103
  top,
126
104
  profile,
127
105
  state,
106
+ logo,
128
107
  onStateChange,
129
108
  navigationMainItems,
109
+ navigationOverflowItems,
130
110
  extraLinks,
131
111
  extraLinksTop,
132
112
  extraText,
@@ -143,9 +123,8 @@ const TitanLayoutComponent: FC<TitanLayoutProps> = ({
143
123
  }),
144
124
  [navigationComponent, breakpoint]
145
125
  );
146
- const variant = useVariant(appearance);
126
+ const view = useAppearance(appearance);
147
127
  const [mobileDrawerOpened, setMobileDrawerOpened] = useState(false);
148
- const { content, logo } = useLayoutChildren(children);
149
128
  const { hasNotifications, NotificationsContextProvider } = useNotificationsState();
150
129
  const [offsetTopStyles, setOffsetTopStyles] = useState<object>({});
151
130
  const updateIndicatorsHeight = useCallback((offset: number) => {
@@ -155,16 +134,19 @@ const TitanLayoutComponent: FC<TitanLayoutProps> = ({
155
134
  }, []);
156
135
 
157
136
  const isMobile = breakpoint.isMobile;
158
- const hasSideBar = !contentOnly && (!!navigationMainItems?.length || !!sideTop?.length);
137
+ const hasSideBar =
138
+ !contentOnly &&
139
+ (navVariant === 'left' || (navVariant === 'top' && isMobile)) &&
140
+ (!!navigationMainItems?.length || !!sideTop?.length);
159
141
  const hasTopBar = !contentOnly;
160
142
 
161
143
  useEffect(() => {
162
- if (variant.isAnvil1) {
144
+ if (view.isAnvil1) {
163
145
  const bodyClassName = 'of-hidden-i';
164
146
  document.body.classList.add(bodyClassName);
165
147
  return () => document.body.classList.remove(bodyClassName);
166
148
  }
167
- }, [variant.isAnvil1]);
149
+ }, [view.isAnvil1]);
168
150
 
169
151
  const onBurgerClick = useCallback((e: MouseEvent) => {
170
152
  setMobileDrawerOpened(true);
@@ -190,10 +172,22 @@ const TitanLayoutComponent: FC<TitanLayoutProps> = ({
190
172
  },
191
173
  [state, onStateChange]
192
174
  );
175
+ const sidebarNavItems = useMemo(() => {
176
+ if (!hasSideBar) {
177
+ return undefined;
178
+ }
179
+
180
+ if (navVariant === 'left') {
181
+ return navigationMainItems;
182
+ }
183
+
184
+ return [...(navigationMainItems ?? []), ...(navigationOverflowItems ?? [])];
185
+ }, [hasSideBar, navigationMainItems, navigationOverflowItems, navVariant]);
186
+
193
187
  const hasMenuNotifications = useMemo(() => {
194
188
  try {
195
189
  return (
196
- navigationMainItems?.some(item => {
190
+ sidebarNavItems?.some(item => {
197
191
  if (item.counter || item.tag?.value) {
198
192
  return true;
199
193
  } else if (item.submenu) {
@@ -207,24 +201,24 @@ const TitanLayoutComponent: FC<TitanLayoutProps> = ({
207
201
  } catch {
208
202
  return false;
209
203
  }
210
- }, [navigationMainItems]);
204
+ }, [sidebarNavItems]);
211
205
 
212
206
  const limitContentWidth = useMemo(() => {
213
- if (variant.isAnvil2 || !minContentWidth) {
207
+ if (view.isAnvil2 || !minContentWidth) {
214
208
  return undefined;
215
209
  }
216
210
 
217
211
  if (breakpoint.width < minContentWidth) {
218
212
  return minContentWidth;
219
213
  }
220
- }, [variant, minContentWidth, breakpoint.width]);
214
+ }, [view, minContentWidth, breakpoint.width]);
221
215
 
222
216
  const contentStyles = useMemo(() => {
223
- if (variant.isAnvil2) {
217
+ if (view.isAnvil2) {
224
218
  return offsetTopStyles;
225
219
  }
226
220
 
227
- if (variant.isLegacy) {
221
+ if (view.isLegacy) {
228
222
  return {
229
223
  ...(limitContentWidth
230
224
  ? { display: 'flex', flexDirection: 'column', minHeight: '100vh' }
@@ -232,11 +226,11 @@ const TitanLayoutComponent: FC<TitanLayoutProps> = ({
232
226
  ...offsetTopStyles,
233
227
  };
234
228
  }
235
- }, [variant, offsetTopStyles, limitContentWidth]);
229
+ }, [view, offsetTopStyles, limitContentWidth]);
236
230
 
237
- const layoutClass = variant.isLegacy
231
+ const layoutClass = view.isLegacy
238
232
  ? Styles.layoutLegacy
239
- : variant.isAnvil1
233
+ : view.isAnvil1
240
234
  ? Styles.layoutAnvil1
241
235
  : Styles.layoutAnvil2;
242
236
 
@@ -248,8 +242,11 @@ const TitanLayoutComponent: FC<TitanLayoutProps> = ({
248
242
  className={classNames(
249
243
  Styles.layout,
250
244
  isMobile ? Styles.layoutMobile : Styles.layoutDesktop,
245
+ hasTopBar &&
246
+ (navVariant === 'left' || !top
247
+ ? Styles.layoutTopLight
248
+ : Styles.layoutTopNav),
251
249
  {
252
- [Styles.layoutTop]: hasTopBar,
253
250
  [Styles.layoutNavSlim]: !isMobile && hasSideBar && state?.navCollapsed,
254
251
  [Styles.layoutNavWide]: !isMobile && hasSideBar && !state?.navCollapsed,
255
252
  },
@@ -257,25 +254,46 @@ const TitanLayoutComponent: FC<TitanLayoutProps> = ({
257
254
  )}
258
255
  style={contentStyles}
259
256
  >
260
- {variant.isSequent && <div className={Styles.topPlaceholder} />}
261
- {hasTopBar && (
262
- <LayoutHeader
263
- className={Styles.top}
264
- logo={logo}
265
- profile={isMobile ? undefined : profile}
266
- center={top}
267
- rightText={isMobile ? undefined : extraText}
268
- right={
269
- <Fragment>
270
- {extraLinksTop}
271
- {!isMobile && extraLinks}
272
- </Fragment>
273
- }
274
- isMobile={isMobile}
275
- hasNotifications={hasNotifications || hasMenuNotifications}
276
- onBurgerClick={onBurgerClick}
277
- />
278
- )}
257
+ {view.isSequent && <div className={Styles.topPlaceholder} />}
258
+ {hasTopBar &&
259
+ (navVariant === 'left' ? (
260
+ <LayoutHeader
261
+ className={Styles.top}
262
+ variant="light"
263
+ logo={logo}
264
+ profile={isMobile ? undefined : profile}
265
+ center={top}
266
+ rightText={isMobile ? undefined : extraText}
267
+ right={
268
+ <Fragment>
269
+ {extraLinksTop}
270
+ {!isMobile && extraLinks}
271
+ </Fragment>
272
+ }
273
+ isMobile={isMobile}
274
+ hasNotifications={hasNotifications || hasMenuNotifications}
275
+ onBurgerClick={onBurgerClick}
276
+ />
277
+ ) : (
278
+ <LayoutHeaderDark
279
+ className={Styles.top}
280
+ logo={logo}
281
+ profile={isMobile ? undefined : profile}
282
+ center={top}
283
+ rightText={isMobile ? undefined : extraText}
284
+ right={
285
+ <Fragment>
286
+ {extraLinksTop}
287
+ {!isMobile && extraLinks}
288
+ </Fragment>
289
+ }
290
+ isMobile={isMobile}
291
+ hasNotifications={hasNotifications || hasMenuNotifications}
292
+ onBurgerClick={onBurgerClick}
293
+ navigationMainItems={navigationMainItems}
294
+ navigationOverflowItems={navigationOverflowItems}
295
+ />
296
+ ))}
279
297
 
280
298
  {hasSideBar && (
281
299
  <NotificationsContextProvider>
@@ -289,7 +307,7 @@ const TitanLayoutComponent: FC<TitanLayoutProps> = ({
289
307
  drawerOpened={mobileDrawerOpened}
290
308
  onDrawerOpenChange={setMobileDrawerOpened}
291
309
  top={sideTop}
292
- mainItems={navigationMainItems}
310
+ mainItems={sidebarNavItems}
293
311
  navigationComponent={context.NavigationComponent}
294
312
  bottom={
295
313
  isMobile ? (
@@ -314,18 +332,18 @@ const TitanLayoutComponent: FC<TitanLayoutProps> = ({
314
332
  </NotificationsContextProvider>
315
333
  )}
316
334
 
317
- {variant.isSequent && (
335
+ {view.isSequent && (
318
336
  <TitanLayoutHeaderObserved heightChange={updateIndicatorsHeight}>
319
337
  {header}
320
338
  </TitanLayoutHeaderObserved>
321
339
  )}
322
- {variant.isAnvil1 ? (
340
+ {view.isAnvil1 ? (
323
341
  <LayoutContentAnvil1 header={header} minWidth={limitContentWidth}>
324
- {content}
342
+ {children}
325
343
  </LayoutContentAnvil1>
326
- ) : variant.isLegacy ? (
344
+ ) : view.isLegacy ? (
327
345
  <LayoutContentLegacy minWidth={limitContentWidth}>
328
- {content}
346
+ {children}
329
347
  </LayoutContentLegacy>
330
348
  ) : (
331
349
  children
@@ -378,11 +396,6 @@ const TitanLayoutHeader: FC<{ children: ReactNode }> = ({ children }) => {
378
396
  );
379
397
  };
380
398
 
381
- export interface TitanLayoutContentProps {
382
- children: ReactNode;
383
- }
384
- const TitanLayoutContent: FC<TitanLayoutContentProps> = ({ children }) => children;
385
-
386
399
  const LayoutContentAnvil1: FC<{
387
400
  children: ReactNode;
388
401
  header?: ReactNode;
@@ -390,7 +403,7 @@ const LayoutContentAnvil1: FC<{
390
403
  }> = ({ children, header, minWidth }) => {
391
404
  const innerContentStyles: CSSProperties = useMemo(
392
405
  () => ({
393
- ...(minWidth ? { minWidth: `${minWidth}px` } : {}),
406
+ ...(minWidth ? { minWidth: `${minWidth}px`, overflowX: 'auto' } : {}),
394
407
  }),
395
408
  [minWidth]
396
409
  );
@@ -399,7 +412,7 @@ const LayoutContentAnvil1: FC<{
399
412
  <Fragment>
400
413
  <TitanLayoutHeader>{header}</TitanLayoutHeader>
401
414
  <div
402
- className={classNames(Styles.content, { 'of-x-auto': !!minWidth })}
415
+ className={classNames(Styles.content, { 'of-x-auto-i': !!minWidth })}
403
416
  data-cy="layout-content"
404
417
  >
405
418
  <div
@@ -433,8 +446,6 @@ const LayoutContentLegacy: FC<{
433
446
  };
434
447
 
435
448
  export const TitanLayout = Object.assign(TitanLayoutComponent, {
436
- Content: TitanLayoutContent,
437
- Logo: TitanLayoutLogo,
438
449
  Link: TitanLayoutSidebarLink,
439
450
  Trigger: TitanLayoutSidebarTrigger,
440
451
  });
@@ -4,10 +4,13 @@ import { ReactElement } from 'react';
4
4
  export const withTooltip = (
5
5
  element: ReactElement,
6
6
  tooltip: string | undefined,
7
- placement: TooltipProps['placement'] = 'bottom'
7
+ props: {
8
+ placement?: TooltipProps['placement'];
9
+ key?: string;
10
+ }
8
11
  ) =>
9
12
  tooltip ? (
10
- <Tooltip placement={placement}>
13
+ <Tooltip placement="bottom" {...props}>
11
14
  <Tooltip.Content>{tooltip}</Tooltip.Content>
12
15
  <Tooltip.Trigger>{element}</Tooltip.Trigger>
13
16
  </Tooltip>
package/src/index.ts CHANGED
@@ -6,15 +6,14 @@ export * from './components/counter-tag';
6
6
  export * from './components/left-navigation';
7
7
  export * from './components/titan-layout';
8
8
  export * from './components/links';
9
- export * from './utils/navigation';
10
- export {
11
- NavigationComponentContext,
9
+ export type * from './utils/navigation';
10
+ export type {
12
11
  NavLinkComponentPropsStrict,
13
12
  NavLinkComponentProps,
14
- NavigationLocationContext,
15
13
  NavigationLocationContextType,
16
14
  NavigationLocationInfo,
17
15
  NavigationActiveLinkMatcher,
18
16
  } from './utils/navigation-context';
19
- export * from './utils/navigation-legacy';
17
+ export { NavigationComponentContext, NavigationLocationContext } from './utils/navigation-context';
18
+ export type * from './utils/navigation-legacy';
20
19
  export * from './utils/use-breakpoint';
@@ -1,13 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { withAnvil, withMemoryRouter } from '../../test/data';
3
- import { HeaderNavigationLink } from '../links';
4
- import { HeaderNavigationStacked } from './header-navigation';
5
- const withHeaderNavigationStacked = (Story) => _jsx(HeaderNavigationStacked, { right: _jsx(Story, {}) });
6
- export default {
7
- title: 'Navigation/Extra/Stacked',
8
- component: HeaderNavigationLink,
9
- decorators: [withHeaderNavigationStacked, withMemoryRouter, withAnvil],
10
- parameters: {},
11
- };
12
- export { ExtraWithTooltip, ExtraLink, ExtraTrigger, ExtraWithLabel, } from './header-navigation-extra.stories';
13
- //# sourceMappingURL=header-navigation-extra-stacked.stories.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"header-navigation-extra-stacked.stories.js","sourceRoot":"","sources":["../../../src/components/header-navigation/header-navigation-extra-stacked.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAC9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAE9D,MAAM,2BAA2B,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,KAAC,uBAAuB,IAAC,KAAK,EAAE,KAAC,KAAK,KAAG,GAAI,CAAC;AAElG,eAAe;IACX,KAAK,EAAE,0BAA0B;IACjC,SAAS,EAAE,oBAAoB;IAC/B,UAAU,EAAE,CAAC,2BAA2B,EAAE,gBAAgB,EAAE,SAAS,CAAC;IACtE,UAAU,EAAE,EAAE;CACjB,CAAC;AAEF,OAAO,EACH,gBAAgB,EAChB,SAAS,EACT,YAAY,EACZ,cAAc,GACjB,MAAM,mCAAmC,CAAC"}
@@ -1,29 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import SvgHelp from '@servicetitan/anvil2/assets/icons/material/round/help_outline.svg';
3
- import SvgPhone from '@servicetitan/anvil2/assets/icons/material/round/phone.svg';
4
- import SvgSearch from '@servicetitan/anvil2/assets/icons/material/round/search.svg';
5
- import { Button, Popover } from '@servicetitan/design-system';
6
- import { Fragment, useState } from 'react';
7
- import { withAnvil, withMemoryRouter } from '../../test/data';
8
- import { HeaderNavigationLink, HeaderNavigationTrigger } from '../links';
9
- import { HeaderNavigation } from './';
10
- const withHeaderNavigation = (Story) => (_jsx(HeaderNavigation, { rightClassName: "m-r-1", children: _jsx(Story, {}) }));
11
- export default {
12
- title: 'Navigation/Extra/Legacy',
13
- component: HeaderNavigationLink,
14
- decorators: [withHeaderNavigation, withMemoryRouter, withAnvil],
15
- parameters: {},
16
- };
17
- export const ExtraLink = () => (_jsx(HeaderNavigationLink, { id: "search", title: "Search", to: "https://google.com", target: "_blank", iconName: "search", icon: SvgSearch, iconActive: undefined, hint: "Search: for all the questions" }));
18
- export const ExtraTrigger = () => (_jsx(HeaderNavigationTrigger, { id: "dialpad", title: "Dialpad", iconName: "phone", counter: 2, tooltip: "Phones pro", icon: SvgPhone, iconActive: undefined }));
19
- export const ExtraWithTooltip = () => (_jsxs(Fragment, { children: [_jsx(HeaderNavigationLink, { id: "search", title: "Search", to: "https://google.com", target: "_blank", iconName: "search", icon: SvgSearch, iconActive: undefined, tooltip: "Search: for all the questions", hint: "Google" }), _jsx(HeaderNavigationTrigger, { id: "dialpad", title: "Dialpad", iconName: "phone", hint: "Dialpad", counter: 2, icon: SvgPhone, iconActive: undefined }), _jsx(HelpCenterButton, {})] }));
20
- const HelpCenterButton = () => {
21
- const [open, setOpen] = useState(false);
22
- return (_jsx(Popover, { onClickOutside: () => setOpen(false), open: open, direction: "bl", width: "xs", trigger: _jsx(Button, { className: "c-inherit", iconName: "help_outline", fill: "subtle", onClick: () => setOpen(true) }), portal: true, children: "help center" }));
23
- };
24
- const HelpTrigger = () => {
25
- const [active, setActive] = useState(true);
26
- return (_jsx(HeaderNavigationTrigger, { id: "help", title: "Help", iconName: "help_outline", hint: "Help", icon: SvgHelp, iconActive: undefined, label: "Live Chat", onClick: () => setActive(!active), isActive: active }));
27
- };
28
- export const ExtraWithLabel = () => (_jsxs(Fragment, { children: [_jsx(HeaderNavigationLink, { id: "search", title: "Search", to: "https://google.com", target: "_blank", iconName: "search", icon: SvgSearch, iconActive: undefined, tooltip: "Search: for all the questions", hint: "Google" }), _jsx(HelpTrigger, {}), _jsx(HeaderNavigationTrigger, { id: "dialpad", title: "Dialpad", iconName: "phone", hint: "Dialpad", tag: { value: 2 }, icon: SvgPhone, iconActive: undefined })] }));
29
- //# sourceMappingURL=header-navigation-extra.stories.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"header-navigation-extra.stories.js","sourceRoot":"","sources":["../../../src/components/header-navigation/header-navigation-extra.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,OAAO,MAAM,mEAAmE,CAAC;AACxF,OAAO,QAAQ,MAAM,4DAA4D,CAAC;AAClF,OAAO,SAAS,MAAM,6DAA6D,CAAC;AACpF,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,Q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AAE,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,EACjC,QAAQ,EAAE,MAAM,GAClB,CACL,CAAC;AACN,CAAC,CAAC;AACF,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,EAAE,CAAC,CAChC,MAAC,QAAQ,eACL,KAAC,oBAAoB,IACjB,EAAE,EAAC,QAAQ,EACX,KAAK,EAAC,QAAQ,EACd,EAAE,EAAC,oBAAoB,EACvB,MAAM,EAAC,QAAQ,EACf,QAAQ,EAAC,QAAQ,EACjB,IAAI,EAAE,SAAS,EACf,UAAU,EAAE,SAAS,EACrB,OAAO,EAAC,+BAA+B,EACvC,IAAI,EAAC,QAAQ,GACf,EAEF,KAAC,WAAW,KAAG,EACf,KAAC,uBAAuB,IACpB,EAAE,EAAC,SAAS,EACZ,KAAK,EAAC,SAAS,EACf,QAAQ,EAAC,OAAO,EAChB,IAAI,EAAC,SAAS,EACd,GAAG,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,EACjB,IAAI,EAAE,QAAQ,EACd,UAAU,EAAE,SAAS,GACvB,IACK,CACd,CAAC"}
@@ -1,50 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Input, Stack } from '@servicetitan/design-system';
3
- import { Fragment } from 'react';
4
- import { SearchIcon, items, withMemoryRouter } from '../../test/data';
5
- import { LogoCompanyTitle } from '../logo/logo-company-title';
6
- import { LogoTitan, LogoTitanTitle } from '../logo/logo-titan-text';
7
- import { ProfileDropdown } from '../profile-dropdown/profile-dropdown';
8
- import { HeaderNavigationLink, HeaderNavigationTrigger } from './header-navigation-links';
9
- import * as Styles from './header-navigation-stories.module.less';
10
- import { HeaderNavigationStacked } from './';
11
- export default {
12
- title: 'Navigation/HeaderNavigationStacked',
13
- component: HeaderNavigationStacked,
14
- parameters: {},
15
- decorators: [withMemoryRouter],
16
- };
17
- const SvgIcon = undefined;
18
- export const DefaultNavigation = () => (_jsx(HeaderNavigationStacked, { left: _jsx(LogoCompanyTitle, { className: "m-l-1", fill: "#fff", size: "150" }), leftClassName: "d-f align-items-center", items: [
19
- items.dashboard,
20
- items.calendar,
21
- items.calls,
22
- items.accounting,
23
- items.dispatch,
24
- items.fleet,
25
- ] }));
26
- export const WithLogoTextAndOverflow = () => (_jsx(HeaderNavigationStacked, { left: _jsxs(Stack, { alignItems: "center", children: [_jsx(LogoTitan, { mantleFill: "#2270EE", size: 44 }), _jsx(LogoTitanTitle, { className: "c-white m-l-1", children: "Commercial" })] }), items: [
27
- items.dashboard,
28
- items.calendar,
29
- items.calls,
30
- items.accounting,
31
- items.dispatch,
32
- items.purchasing,
33
- items.fleet,
34
- ], itemsOverflow: [items.calls, items.accounting, items.purchasing, items.dispatch] }));
35
- const TimeZoneOffset = () => (_jsx("div", { className: "fs-2 ff-default p-r-2", children: _jsx("span", { children: "EST (-9 hrs)" }) }));
36
- export const WithAllMonolithData = () => (_jsx(HeaderNavigationStacked, { left: _jsx(LogoCompanyTitle, { className: "m-l-1", fill: "#fff", size: "150" }), leftClassName: "d-f align-items-center", items: [
37
- items.dashboard,
38
- items.calendar,
39
- items.calls,
40
- items.accounting,
41
- items.dispatch,
42
- items.fleet,
43
- items.followUps,
44
- items.inventory,
45
- items.marketing,
46
- items.priceBook,
47
- items.pointOfSale,
48
- items.reports,
49
- ], right: _jsxs(Fragment, { children: [_jsx(TimeZoneOffset, {}), _jsx(HeaderNavigationLink, { id: "search", title: "Search", to: "https://google.com", target: "_blank", iconComponent: SearchIcon, hint: "Search: for all the questions", icon: SvgIcon, iconActive: SvgIcon }), _jsx(HeaderNavigationTrigger, { id: "dialpad", title: "Dialpad", iconName: "phone", tag: { value: 2 }, icon: SvgIcon, iconActive: SvgIcon }), _jsx(HeaderNavigationTrigger, { id: "titanAdvisor", title: "Titan Advisor", iconName: "rocket", iconClassName: Styles.rocketIcon, icon: SvgIcon, iconActive: SvgIcon }), _jsx(HeaderNavigationLink, { id: "settings", title: "Settings", to: "https://google.com", target: "_blank", iconName: "settings", "aria-label": "search", hint: "Settings", isActive: true, icon: SvgIcon, iconActive: SvgIcon }), _jsxs(ProfileDropdown, { children: [_jsx(ProfileDropdown.Link, { id: "tasks", to: "https://googgle.com", counter: 10, children: "Task Management" }), _jsx(ProfileDropdown.Divider, {}), _jsxs(ProfileDropdown.Link, { id: "sign-out", to: "https://googgle.com", text: "Sign Out", children: ["Sign Out", ' ', _jsx("span", { className: "c-neutral-100 m-l-half t-truncate", children: "James Bond" })] }), _jsx(ProfileDropdown.Section, { id: "userid", className: "c-neutral-100 fs-1", children: "User ID: 007" })] })] }), center: _jsx(Input, { placeholder: "Search smth", size: "xsmall", className: "w-100" }), centerClassName: "d-f align-items-center" }));
50
- //# sourceMappingURL=header-navigation-stacked.stories.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"header-navigation-stacked.stories.js","sourceRoot":"","sources":["../../../src/components/header-navigation/header-navigation-stacked.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAM,QAAQ,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAC1F,OAAO,KAAK,MAAM,MAAM,yCAAyC,CAAC;AAClE,OAAO,EAAE,uBAAuB,EAAE,MAAM,IAAI,CAAC;AAE7C,eAAe;IACX,KAAK,EAAE,oCAAoC;IAC3C,SAAS,EAAE,uBAAuB;IAClC,UAAU,EAAE,EAAE;IACd,UAAU,EAAE,CAAC,gBAAgB,CAAC;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,EACnB,IAAI,EAAC,UAAU,EACf,QAAQ,QACR,IAAI,EAAE,OAAO,EACb,UAAU,EAAE,OAAO,GACrB,EAEF,MAAC,eAAe,eACZ,KAAC,eAAe,CAAC,IAAI,IAAC,EAAE,EAAC,OAAO,EAAC,EAAE,EAAC,qBAAqB,EAAC,OAAO,EAAE,EAAE,gCAE9C,EACvB,KAAC,eAAe,CAAC,OAAO,KAAG,EAC3B,MAAC,eAAe,CAAC,IAAI,IAAC,EAAE,EAAC,UAAU,EAAC,EAAE,EAAC,qBAAqB,EAAC,IAAI,EAAC,UAAU,yBAC/D,GAAG,EACZ,eAAM,SAAS,EAAC,mCAAmC,2BAAkB,IAClD,EACvB,KAAC,eAAe,CAAC,OAAO,IAAC,EAAE,EAAC,QAAQ,EAAC,SAAS,EAAC,oBAAoB,6BAEzC,IACZ,IACX,EAEf,MAAM,EAAE,KAAC,KAAK,IAAC,WAAW,EAAC,aAAa,EAAC,IAAI,EAAC,QAAQ,EAAC,SAAS,EAAC,OAAO,GAAG,EAC3E,eAAe,EAAC,wBAAwB,GAC1C,CACL,CAAC"}
@@ -1,54 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Popover } from '@servicetitan/design-system';
3
- import { useState } from 'react';
4
- import { SearchIcon, items, withMemoryRouter } from '../../test/data';
5
- import { LogoCompanyTitle } from '../logo/logo-company-title';
6
- import { LogoTitanText } from '../logo/logo-titan-text';
7
- import { ProfileDropdown } from '../profile-dropdown/profile-dropdown';
8
- import { HeaderNavigationLink, HeaderNavigationTrigger } from './header-navigation-links';
9
- import * as Styles from './header-navigation-stories.module.less';
10
- import { HeaderNavigation } from './';
11
- export default {
12
- title: 'Navigation/HeaderNavigation',
13
- component: HeaderNavigation,
14
- parameters: {},
15
- decorators: [withMemoryRouter],
16
- };
17
- const SvgIcon = undefined;
18
- export const DefaultNavigation = () => (_jsx(HeaderNavigation, { left: _jsx(LogoCompanyTitle, { className: "m-l-1", fill: "#fff" }), items: [
19
- items.dashboard,
20
- items.calendar,
21
- items.calls,
22
- items.accounting,
23
- items.dispatch,
24
- items.fleet,
25
- ] }));
26
- export const WithLogoTextAndOverflow = () => (_jsx(HeaderNavigation, { left: _jsx(LogoTitanText, { mantleFill: "#2270EE", title: "Commercial", description: "tenant tenant tenant tenant tenant" }), items: [
27
- items.dashboard,
28
- items.calendar,
29
- items.calls,
30
- items.accounting,
31
- items.dispatch,
32
- items.purchasing,
33
- items.fleet,
34
- ], itemsOverflow: [items.calls, items.accounting, items.purchasing, items.dispatch] }));
35
- const HelpCenterButton = () => {
36
- const [open, setOpen] = useState(false);
37
- return (_jsx(Popover, { onClickOutside: () => setOpen(false), open: open, direction: "bl", width: "xs", trigger: _jsx(HeaderNavigationTrigger, { id: "help", title: "Help", iconName: "help_outline", onClick: () => setOpen(true), icon: SvgIcon, iconActive: SvgIcon }), portal: true, children: "help center" }));
38
- };
39
- const TimeZoneOffset = () => (_jsx("div", { className: "fs-2 ff-default p-r-2", children: _jsx("span", { children: "EST (-9 hrs)" }) }));
40
- export const WithAllMonolithData = () => (_jsxs(HeaderNavigation, { left: _jsx(LogoCompanyTitle, { className: "m-l-1", fill: "#fff" }), items: [
41
- items.dashboard,
42
- items.calendar,
43
- items.calls,
44
- items.accounting,
45
- items.dispatch,
46
- items.fleet,
47
- items.followUps,
48
- items.inventory,
49
- items.marketing,
50
- items.priceBook,
51
- items.pointOfSale,
52
- items.reports,
53
- ], children: [_jsx(TimeZoneOffset, {}), _jsx(HeaderNavigationTrigger, { id: "dialpad", title: "Dialpad", iconName: "phone", counter: 2, icon: SvgIcon, iconActive: SvgIcon }), _jsx(HeaderNavigationLink, { id: "search", title: "Search", to: "https://google.com", target: "_blank", iconComponent: SearchIcon, hint: "Search: for all the questions", icon: SvgIcon, iconActive: SvgIcon }), _jsx(HelpCenterButton, {}), _jsx(HeaderNavigationTrigger, { id: "titanAdvisor", title: "Titan Advisor", iconName: "rocket", iconClassName: Styles.rocketIcon, icon: SvgIcon, iconActive: SvgIcon }), _jsx(HeaderNavigationLink, { id: "settings", title: "Settings", to: "https://google.com", target: "_blank", iconName: "settings", "aria-label": "search", hint: "Settings", isActive: true, icon: SvgIcon, iconActive: SvgIcon }), _jsxs(ProfileDropdown, { children: [_jsx(ProfileDropdown.Link, { id: "tasks", to: "https://googgle.com", counter: 10, children: "Task Management" }), _jsx(ProfileDropdown.Divider, {}), _jsxs(ProfileDropdown.Link, { id: "sign-out", to: "https://googgle.com", text: "Sign Out", children: ["Sign Out ", _jsx("span", { className: "c-neutral-100 m-l-half t-truncate", children: "James Bond" })] }), _jsx(ProfileDropdown.Section, { id: "userid", className: "c-neutral-100 fs-1", children: "User ID: 007" })] })] }));
54
- //# sourceMappingURL=header-navigation.stories.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"header-navigation.stories.js","sourceRoot":"","sources":["../../../src/components/header-navigation/header-navigation.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AACtD,OAAO,EAAM,QAAQ,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAC1F,OAAO,KAAK,MAAM,MAAM,yCAAyC,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,IAAI,CAAC;AAEtC,eAAe;IACX,KAAK,EAAE,6BAA6B;IACpC,SAAS,EAAE,gBAAgB;IAC3B,UAAU,EAAE,EAAE;IACd,UAAU,EAAE,CAAC,gBAAgB,CAAC;CACjC,CAAC;AACF,MAAM,O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,EAAC,cAAc,EACjB,KAAK,EAAC,eAAe,EACrB,QAAQ,EAAC,QAAQ,EACjB,aAAa,EAAE,MAAM,CAAC,UAAU,EAChC,IAAI,EAAE,OAAO,EACb,UAAU,EAAE,OAAO,GACrB,EAEF,KAAC,oBAAoB,IACjB,EAAE,EAAC,UAAU,EACb,KAAK,EAAC,UAAU,EAChB,EAAE,EAAC,oBAAoB,EACvB,MAAM,EAAC,QAAQ,EACf,QAAQ,EAAC,UAAU,gBACR,QAAQ,EACnB,IAAI,EAAC,UAAU,EACf,QAAQ,QACR,IAAI,EAAE,OAAO,EACb,UAAU,EAAE,OAAO,GACrB,EAEF,MAAC,eAAe,eACZ,KAAC,eAAe,CAAC,IAAI,IAAC,EAAE,EAAC,OAAO,EAAC,EAAE,EAAC,qBAAqB,EAAC,OAAO,EAAE,EAAE,gCAE9C,EACvB,KAAC,eAAe,CAAC,OAAO,KAAG,EAC3B,MAAC,eAAe,CAAC,IAAI,IAAC,EAAE,EAAC,UAAU,EAAC,EAAE,EAAC,qBAAqB,EAAC,IAAI,EAAC,UAAU,0BAC/D,eAAM,SAAS,EAAC,mCAAmC,2BAAkB,IAC3D,EACvB,KAAC,eAAe,CAAC,OAAO,IAAC,EAAE,EAAC,QAAQ,EAAC,SAAS,EAAC,oBAAoB,6BAEzC,IACZ,IACH,CACtB,CAAC"}
@@ -1,29 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Page, Sidebar } from '@servicetitan/design-system';
3
- import { LocationInfo, withAnvil, withDefaultRedirects, withMemoryRouter } from '../test/data';
4
- import { WithAllMonolithData, WithAllMonolithDataCommercial, } from './left-navigation/header-navigation-tiny.stories';
5
- import { DefaultSideNavigation, SideNavigationLinksOnly, SideNavigationWithSubmenu, SideNavigationWithSubmenuBar, SideNavigationWithSubmenuBarAndTop, } from './left-navigation/side-navigation.stories';
6
- export default {
7
- title: 'Navigation/Layout',
8
- parameters: {},
9
- decorators: [withDefaultRedirects, withMemoryRouter, withAnvil],
10
- };
11
- export const LeftNavLayout = () => {
12
- return (_jsxs("div", { className: "d-f border flex-column", style: { height: '800px' }, children: [_jsx(WithAllMonolithData, {}), _jsxs("div", { className: "flex-grow-1 flex-basis-0 d-f", children: [_jsx(DefaultSideNavigation, {}), _jsx("div", { className: "flex-grow-1 flex-basis-0" })] })] }));
13
- };
14
- export const LeftNavLayoutCommercial = () => {
15
- return (_jsxs("div", { className: "d-f border flex-column", style: { height: '800px' }, children: [_jsx(WithAllMonolithDataCommercial, {}), _jsxs("div", { className: "flex-grow-1 flex-basis-0 d-f", children: [_jsx(DefaultSideNavigation, {}), _jsx("div", { className: "flex-grow-1 flex-basis-0" })] })] }));
16
- };
17
- export const LeftNavLayoutOnlyLinks = () => {
18
- return (_jsxs("div", { className: "d-f border flex-column", style: { height: '800px' }, children: [_jsx(WithAllMonolithDataCommercial, {}), _jsxs("div", { className: "flex-grow-1 flex-basis-0 d-f", children: [_jsx(SideNavigationLinksOnly, {}), _jsx("div", { className: "flex-grow-1 flex-basis-0" })] })] }));
19
- };
20
- export const LeftNavLayoutSubmenu = () => {
21
- return (_jsxs("div", { className: "d-f border flex-column", style: { height: '800px' }, children: [_jsx(WithAllMonolithDataCommercial, {}), _jsxs("div", { className: "flex-grow-1 flex-basis-0 d-f", children: [_jsx(SideNavigationWithSubmenu, {}), _jsx("div", { className: "flex-grow-1 flex-basis-0", children: _jsx(Page, { sidebar: _jsx(Sidebar, { localStorageKey: "undefined", children: "sidebar" }), children: _jsx(LocationInfo, {}) }) })] })] }));
22
- };
23
- export const LeftNavLayoutSubmenuBar = () => {
24
- return (_jsxs("div", { className: "d-f border flex-column", style: { height: '800px' }, children: [_jsx(WithAllMonolithDataCommercial, {}), _jsxs("div", { className: "flex-grow-1 flex-basis-0 d-f", children: [_jsx(SideNavigationWithSubmenuBar, {}), _jsx("div", { className: "flex-grow-1 flex-basis-0", children: _jsx(Page, { sidebar: _jsx(Sidebar, { localStorageKey: "undefined", children: "sidebar" }), children: _jsx(LocationInfo, {}) }) })] })] }));
25
- };
26
- export const LeftNavLayoutSubmenuBarWithTop = () => {
27
- return (_jsxs("div", { className: "d-f border flex-column", style: { height: '800px' }, children: [_jsx(WithAllMonolithDataCommercial, {}), _jsxs("div", { className: "flex-grow-1 flex-basis-0 d-f", children: [_jsx(SideNavigationWithSubmenuBarAndTop, {}), _jsx("div", { className: "flex-grow-1 flex-basis-0", children: _jsx(Page, { sidebar: _jsx(Sidebar, { localStorageKey: "undefined", children: "sidebar" }), children: _jsx(LocationInfo, {}) }) })] })] }));
28
- };
29
- //# sourceMappingURL=layout.stories.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"layout.stories.js","sourceRoot":"","sources":["../../src/components/layout.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAC/F,OAAO,EACH,mBAAmB,EACnB,6BAA6B,GAChC,MAAM,kDAAkD,CAAC;AAC1D,OAAO,EACH,qBAAqB,EACrB,uBAAuB,EACvB,yBAAyB,EACzB,4BAA4B,EAC5B,kCAAkC,GACrC,MAAM,2CAA2C,CAAC;AAEnD,eAAe;IACX,KAAK,EAAE,mBAAmB;IAC1B,UAAU,EAAE,EAAE;IACd,UAAU,EAAE,CAAC,oBAAoB,EAAE,gBAAgB,EAAE,SAAS,CAAC;CAClE,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,EAAE;IAC9B,OAAO,CACH,eAAK,SAAS,EAAC,wBAAwB,EAAC,KAAK,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,aAC9D,KAAC,mBAAmB,KAAG,EACvB,eAAK,SAAS,EAAC,8BAA8B,aACzC,KAAC,qBAAqB,KAAG,EACzB,cAAK,SAAS,EAAC,0BAA0B,GAAG,IAC1C,IACJ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