@servicetitan/navigation 10.6.1 → 11.0.0-canary.237.0c461af.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-extra.stories.d.ts.map +1 -1
- package/dist/components/header-navigation/header-navigation-extra.stories.js +5 -5
- package/dist/components/header-navigation/header-navigation-extra.stories.js.map +1 -1
- package/dist/components/header-navigation/header-navigation-links.d.ts.map +1 -1
- package/dist/components/header-navigation/header-navigation-links.js +2 -2
- package/dist/components/header-navigation/header-navigation-links.js.map +1 -1
- package/dist/components/header-navigation/header-navigation-stacked.stories.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.d.ts.map +1 -1
- package/dist/components/header-navigation/header-navigation.stories.js +2 -2
- package/dist/components/header-navigation/header-navigation.stories.js.map +1 -1
- package/dist/components/header-navigation/with-tooltip.d.ts +1 -1
- package/dist/components/header-navigation/with-tooltip.d.ts.map +1 -1
- package/dist/components/left-navigation/header-navigation-tiny.stories.d.ts.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/left-navigation/interface.d.ts +1 -1
- package/dist/components/left-navigation/interface.d.ts.map +1 -1
- package/dist/components/left-navigation/side-navigation-links-internal.d.ts +3 -1
- package/dist/components/left-navigation/side-navigation-links-internal.d.ts.map +1 -1
- package/dist/components/left-navigation/side-navigation-links-internal.js +3 -3
- package/dist/components/left-navigation/side-navigation-links-internal.js.map +1 -1
- package/dist/components/left-navigation/side-navigation.d.ts.map +1 -1
- package/dist/components/left-navigation/side-navigation.js +8 -7
- package/dist/components/left-navigation/side-navigation.js.map +1 -1
- package/dist/components/left-navigation/side-navigation.module.less +21 -19
- package/dist/components/links.d.ts.map +1 -1
- package/dist/components/links.js +7 -7
- package/dist/components/links.js.map +1 -1
- package/dist/components/logo/logo-company-title.d.ts +1 -0
- package/dist/components/logo/logo-company-title.d.ts.map +1 -1
- package/dist/components/logo/logo-company-title.js +2 -2
- package/dist/components/logo/logo-company-title.js.map +1 -1
- package/dist/components/profile-dropdown/profile-dropdown.d.ts +15 -9
- package/dist/components/profile-dropdown/profile-dropdown.d.ts.map +1 -1
- package/dist/components/profile-dropdown/profile-dropdown.js +7 -8
- package/dist/components/profile-dropdown/profile-dropdown.js.map +1 -1
- package/dist/components/profile-dropdown/profile-dropdown.module.less +4 -0
- package/dist/components/profile-dropdown/profile-dropdown.stories.js +2 -2
- package/dist/components/profile-dropdown/profile-dropdown.stories.js.map +1 -1
- package/dist/components/titan-layout/index.d.ts +6 -0
- package/dist/components/titan-layout/index.d.ts.map +1 -0
- package/dist/components/titan-layout/index.js +6 -0
- package/dist/components/titan-layout/index.js.map +1 -0
- package/dist/components/titan-layout/interface-internal.d.ts +6 -0
- package/dist/components/titan-layout/interface-internal.d.ts.map +1 -0
- package/dist/components/titan-layout/interface-internal.js +2 -0
- package/dist/components/titan-layout/interface-internal.js.map +1 -0
- package/dist/components/titan-layout/interface.d.ts +21 -0
- package/dist/components/titan-layout/interface.d.ts.map +1 -0
- package/dist/components/titan-layout/interface.js +2 -0
- package/dist/components/titan-layout/interface.js.map +1 -0
- package/dist/components/titan-layout/layout-context.d.ts +20 -0
- package/dist/components/titan-layout/layout-context.d.ts.map +1 -0
- package/dist/components/titan-layout/layout-context.js +12 -0
- package/dist/components/titan-layout/layout-context.js.map +1 -0
- package/dist/components/titan-layout/layout-header-links.d.ts +7 -0
- package/dist/components/titan-layout/layout-header-links.d.ts.map +1 -0
- package/dist/components/titan-layout/layout-header-links.js +32 -0
- package/dist/components/titan-layout/layout-header-links.js.map +1 -0
- package/dist/components/titan-layout/layout-header.d.ts +20 -0
- package/dist/components/titan-layout/layout-header.d.ts.map +1 -0
- package/dist/components/titan-layout/layout-header.js +11 -0
- package/dist/components/titan-layout/layout-header.js.map +1 -0
- package/dist/components/titan-layout/layout-header.module.less +174 -0
- package/dist/components/titan-layout/layout-logo.d.ts +12 -0
- package/dist/components/titan-layout/layout-logo.d.ts.map +1 -0
- package/dist/components/titan-layout/layout-logo.js +15 -0
- package/dist/components/titan-layout/layout-logo.js.map +1 -0
- package/dist/components/titan-layout/layout-logo.stories.d.ts +13 -0
- package/dist/components/titan-layout/layout-logo.stories.d.ts.map +1 -0
- package/dist/components/titan-layout/layout-logo.stories.js +17 -0
- package/dist/components/titan-layout/layout-logo.stories.js.map +1 -0
- package/dist/components/titan-layout/layout-profile.d.ts +9 -0
- package/dist/components/titan-layout/layout-profile.d.ts.map +1 -0
- package/dist/components/titan-layout/layout-profile.js +54 -0
- package/dist/components/titan-layout/layout-profile.js.map +1 -0
- package/dist/components/titan-layout/layout-profile.stories.d.ts +13 -0
- package/dist/components/titan-layout/layout-profile.stories.d.ts.map +1 -0
- package/dist/components/titan-layout/layout-profile.stories.js +13 -0
- package/dist/components/titan-layout/layout-profile.stories.js.map +1 -0
- package/dist/components/titan-layout/layout-sidebar-links-internal.d.ts +46 -0
- package/dist/components/titan-layout/layout-sidebar-links-internal.d.ts.map +1 -0
- package/dist/components/titan-layout/layout-sidebar-links-internal.js +61 -0
- package/dist/components/titan-layout/layout-sidebar-links-internal.js.map +1 -0
- package/dist/components/titan-layout/layout-sidebar-links.d.ts +6 -0
- package/dist/components/titan-layout/layout-sidebar-links.d.ts.map +1 -0
- package/dist/components/titan-layout/layout-sidebar-links.js +21 -0
- package/dist/components/titan-layout/layout-sidebar-links.js.map +1 -0
- package/dist/components/titan-layout/layout-sidebar.d.ts +17 -0
- package/dist/components/titan-layout/layout-sidebar.d.ts.map +1 -0
- package/dist/components/titan-layout/layout-sidebar.js +65 -0
- package/dist/components/titan-layout/layout-sidebar.js.map +1 -0
- package/dist/components/titan-layout/layout-sidebar.module.less +516 -0
- package/dist/components/titan-layout/titan-layout.d.ts +38 -0
- package/dist/components/titan-layout/titan-layout.d.ts.map +1 -0
- package/dist/components/titan-layout/titan-layout.js +147 -0
- package/dist/components/titan-layout/titan-layout.js.map +1 -0
- package/dist/components/titan-layout/titan-layout.module.less +103 -0
- package/dist/components/titan-layout/titan-layout.stories.d.ts +20 -0
- package/dist/components/titan-layout/titan-layout.stories.d.ts.map +1 -0
- package/dist/components/titan-layout/titan-layout.stories.js +80 -0
- package/dist/components/titan-layout/titan-layout.stories.js.map +1 -0
- package/dist/components/titan-layout/with-tooltip.d.ts +4 -0
- package/dist/components/titan-layout/with-tooltip.d.ts.map +1 -0
- package/dist/components/titan-layout/with-tooltip.js +4 -0
- package/dist/components/titan-layout/with-tooltip.js.map +1 -0
- 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/test/data.d.ts.map +1 -1
- package/dist/test/data.js +3 -3
- package/dist/test/data.js.map +1 -1
- package/dist/utils/navigation-legacy.d.ts +3 -1
- package/dist/utils/navigation-legacy.d.ts.map +1 -1
- package/dist/utils/use-breakpoint.d.ts +7 -0
- package/dist/utils/use-breakpoint.d.ts.map +1 -0
- package/dist/utils/use-breakpoint.js +13 -0
- package/dist/utils/use-breakpoint.js.map +1 -0
- package/package.json +5 -6
- package/src/components/header-navigation/header-navigation-extra.stories.tsx +7 -0
- package/src/components/header-navigation/header-navigation-links.tsx +2 -0
- package/src/components/header-navigation/header-navigation-stacked.stories.tsx +5 -1
- package/src/components/header-navigation/header-navigation.stories.tsx +6 -1
- package/src/components/left-navigation/header-navigation-tiny.stories.tsx +8 -2
- package/src/components/left-navigation/interface.ts +2 -2
- package/src/components/left-navigation/side-navigation-links-internal.tsx +21 -6
- package/src/components/left-navigation/side-navigation-links.tsx +1 -1
- package/src/components/left-navigation/side-navigation.module.less +21 -19
- package/src/components/left-navigation/side-navigation.module.less.d.ts +2 -1
- package/src/components/left-navigation/side-navigation.tsx +15 -8
- package/src/components/links.tsx +33 -13
- package/src/components/logo/logo-company-title.tsx +8 -6
- package/src/components/profile-dropdown/profile-dropdown.module.less +4 -0
- package/src/components/profile-dropdown/profile-dropdown.stories.tsx +4 -4
- package/src/components/profile-dropdown/profile-dropdown.tsx +55 -51
- package/src/components/titan-layout/index.ts +5 -0
- package/src/components/titan-layout/interface-internal.ts +6 -0
- package/src/components/titan-layout/interface.ts +26 -0
- package/src/components/titan-layout/layout-context.tsx +30 -0
- package/src/components/titan-layout/layout-header-links.tsx +144 -0
- package/src/components/titan-layout/layout-header.module.less +174 -0
- package/src/components/titan-layout/layout-header.module.less.d.ts +16 -0
- package/src/components/titan-layout/layout-header.tsx +90 -0
- package/src/components/titan-layout/layout-logo.stories.tsx +31 -0
- package/src/components/titan-layout/layout-logo.tsx +57 -0
- package/src/components/titan-layout/layout-profile.stories.tsx +46 -0
- package/src/components/titan-layout/layout-profile.tsx +132 -0
- package/src/components/titan-layout/layout-sidebar-links-internal.tsx +275 -0
- package/src/components/titan-layout/layout-sidebar-links.tsx +59 -0
- package/src/components/titan-layout/layout-sidebar.module.less +516 -0
- package/src/components/titan-layout/layout-sidebar.module.less.d.ts +48 -0
- package/src/components/titan-layout/layout-sidebar.tsx +295 -0
- package/src/components/titan-layout/titan-layout.module.less +103 -0
- package/src/components/titan-layout/titan-layout.module.less.d.ts +15 -0
- package/src/components/titan-layout/titan-layout.stories.tsx +332 -0
- package/src/components/titan-layout/titan-layout.tsx +365 -0
- package/src/components/titan-layout/with-tooltip.tsx +16 -0
- package/src/index.ts +2 -1
- package/src/test/data.tsx +3 -2
- package/src/utils/navigation-legacy.ts +3 -1
- package/src/utils/use-breakpoint.ts +19 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
/* tslint:disable: max-line-length */
|
|
3
|
-
export const LogoCompanyTitle = ({ className, fill = 'currentColor', size = '162', }) => {
|
|
4
|
-
return (_jsxs("svg", { className: className, width: size, view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.9-.1zm.7-9.3s-1.9.5-3.9-1.6c0 0 .8.1 1-1 0 0 1.1 2.2 2.9 2.6zM18 54.4c3.7 2.2 11.9 4.7 13.6 9.3 0 0 .6 1-2.6 1-2.4 0-3.1-.6-4.8-2.7-2.5-3.1-7.6-4.9-7.6-7.2 0 0 0-1.2 1.4-.4z", fill: fill })] }));
|
|
3
|
+
export const LogoCompanyTitle = ({ className, fill = 'currentColor', size = '162', height }) => {
|
|
4
|
+
return (_jsxs("svg", { className: className, width: height ? undefined : size, height: height, viewBox: "0 0 322 80", xmlns: "http://www.w3.org/2000/svg", children: [_jsx("path", { d: "M102.9 34.5c-1-.6-3.6-1.8-5.9-1.8-2 0-3.4.8-3.4 2.3 0 1.1.7 2 3.5 2.8.6.2 1.3.4 1.9.6 2.5.8 4.3 1.9 5.4 3.3 1.1 1.4 1.7 3.2 1.7 5.4 0 6.3-4.4 9.7-11.5 9.7-3.9 0-7.3-1.3-10-3.3l2.6-6.1c1.1 1 4.5 3 7.5 3 2.3 0 3.6-1.1 3.6-2.6 0-1.7-1.1-2.4-4-3.4-1-.3-2.5-.8-3.5-1.2-2.8-1.1-5-3.6-5-7.9 0-5.2 4.3-8.9 10.7-8.9 3.6 0 7 1.1 8.6 2.2l-2.2 5.9zm11.4 12.9c0 3 1.9 4.5 4.1 4.5 1.5 0 2.6-.6 3.3-1.9h6.3c-.8 3.7-4.2 6.8-9.7 6.8-7.4 0-11.2-4.6-11.2-10.7 0-6.2 4.5-10.5 10.8-10.5 6.8 0 10.6 4 10.6 10v1.8h-14.2zm7.8-4c-.2-1-.6-3.2-3.8-3.2-2.8 0-3.5 2.2-3.7 3.2h7.5zm79.1 4c0 3 1.9 4.5 4.1 4.5 1.5 0 2.6-.6 3.3-1.9h6.3c-.8 3.7-4.2 6.8-9.7 6.8-7.4 0-11.2-4.6-11.2-10.7 0-6.2 4.5-10.5 10.8-10.5 6.8 0 10.6 4 10.6 10v1.8h-14.2zm7.7-4c-.2-1-.6-3.2-3.8-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.6zm0 19.2s-2 3.9-4.7 3.9c-1.1 0-1.9-.8-1.9-1.9 0-1.1 1.4-5.1 7.2-5.1 1.4 0 2.5.3 2.5 1.1s-1.4 2.3-3.1 2zM66 39.1s-.3 2.3-3.1 2.3c-2.7 0-5.2-4-6.1-13 .7 1.1 1.4 2.1 1.9 3.3 0-1.3.6-3.4-2.2-5.6 0 0 7.4 1.6 7.6 9.3 0 1.3-.8 2.7-1.3 3.2 0 0-.3.3-.1.7.2.4.7.3 1.4-.1.8-.5 1.9-1.3 1.9-.1zm.7-9.3s-1.9.5-3.9-1.6c0 0 .8.1 1-1 0 0 1.1 2.2 2.9 2.6zM18 54.4c3.7 2.2 11.9 4.7 13.6 9.3 0 0 .6 1-2.6 1-2.4 0-3.1-.6-4.8-2.7-2.5-3.1-7.6-4.9-7.6-7.2 0 0 0-1.2 1.4-.4z", fill: fill })] }));
|
|
5
5
|
};
|
|
6
6
|
//# sourceMappingURL=logo-company-title.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logo-company-title.js","sourceRoot":"","sources":["../../../src/components/logo/logo-company-title.tsx"],"names":[],"mappings":";AAEA,qCAAqC;AACrC,MAAM,CAAC,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"logo-company-title.js","sourceRoot":"","sources":["../../../src/components/logo/logo-company-title.tsx"],"names":[],"mappings":";AAEA,qCAAqC;AACrC,MAAM,CAAC,MAAM,gBAAgB,GAKxB,CAAC,EAAE,SAAS,EAAE,IAAI,GAAG,cAAc,EAAE,IAAI,GAAG,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE;IAChE,OAAO,CACH,eACI,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,EAChC,MAAM,EAAE,MAAM,EACd,OAAO,EAAC,YAAY,EACpB,KAAK,EAAC,4BAA4B,aAElC,eACI,CAAC,EAAC,m3BAAm3B,EACr3B,IAAI,EAAE,IAAI,GACZ,EACF,eACI,CAAC,EAAC,22KAA22K,EAC72K,IAAI,EAAE,IAAI,GACZ,IACA,CACT,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PopoverPropsStrict } from '@servicetitan/design-system';
|
|
2
|
-
import { FC, HTMLAttributeAnchorTarget, MouseEvent, ReactNode } from 'react';
|
|
2
|
+
import { ComponentPropsWithoutRef, FC, HTMLAttributeAnchorTarget, MouseEvent, ReactNode } from 'react';
|
|
3
3
|
import { CounterTagData, CounterTagValue } from '../../utils/counter-tag';
|
|
4
4
|
export interface ProfileDropdownTriggerProps {
|
|
5
5
|
className?: string;
|
|
@@ -17,15 +17,22 @@ export interface ProfileDropdownTriggerProps {
|
|
|
17
17
|
open: boolean;
|
|
18
18
|
onClick?(e: MouseEvent): void;
|
|
19
19
|
}
|
|
20
|
+
declare const ProfileDropdownTrigger: FC<ProfileDropdownTriggerProps>;
|
|
21
|
+
export type ProfileItemContent = {
|
|
22
|
+
children: string;
|
|
23
|
+
text?: string;
|
|
24
|
+
} | {
|
|
25
|
+
children: ReactNode;
|
|
26
|
+
text: string;
|
|
27
|
+
};
|
|
20
28
|
export interface ProfileDropdownSectionPropsStrict {
|
|
21
29
|
children: ReactNode;
|
|
22
30
|
id: string;
|
|
31
|
+
tooltip?: string;
|
|
23
32
|
className?: string;
|
|
24
33
|
onClick?(e: MouseEvent): void;
|
|
25
34
|
}
|
|
26
|
-
|
|
27
|
-
[key: string]: any;
|
|
28
|
-
}
|
|
35
|
+
export type ProfileDropdownSectionProps = Omit<ComponentPropsWithoutRef<'div'>, 'children'> & ProfileDropdownSectionPropsStrict & ProfileItemContent;
|
|
29
36
|
export declare const ProfileDropdownSection: FC<ProfileDropdownSectionProps>;
|
|
30
37
|
export declare const ProfileDropdownDivider: FC;
|
|
31
38
|
export interface ProfileDropdownLinkPropsStrict {
|
|
@@ -34,14 +41,12 @@ export interface ProfileDropdownLinkPropsStrict {
|
|
|
34
41
|
className?: string;
|
|
35
42
|
external?: boolean;
|
|
36
43
|
target?: HTMLAttributeAnchorTarget;
|
|
37
|
-
|
|
44
|
+
tooltip?: string;
|
|
45
|
+
to: string;
|
|
38
46
|
tag?: CounterTagData;
|
|
39
47
|
counter?: CounterTagValue;
|
|
40
|
-
onClick?: () => void;
|
|
41
|
-
}
|
|
42
|
-
export interface ProfileDropdownLinkProps extends ProfileDropdownLinkPropsStrict {
|
|
43
|
-
[key: string]: any;
|
|
44
48
|
}
|
|
49
|
+
export type ProfileDropdownLinkProps = Omit<ComponentPropsWithoutRef<'a'>, 'children'> & ProfileDropdownLinkPropsStrict & ProfileItemContent;
|
|
45
50
|
export declare const ProfileDropdownLink: FC<ProfileDropdownLinkProps>;
|
|
46
51
|
export interface ProfileDropdownPropsStrict {
|
|
47
52
|
children?: ReactNode;
|
|
@@ -67,6 +72,7 @@ export interface ProfileDropdownProps extends ProfileDropdownPropsStrict {
|
|
|
67
72
|
export interface ProfileDropdownType extends FC<ProfileDropdownProps> {
|
|
68
73
|
Divider: typeof ProfileDropdownDivider;
|
|
69
74
|
Link: typeof ProfileDropdownLink;
|
|
75
|
+
Trigger: typeof ProfileDropdownTrigger;
|
|
70
76
|
Section: typeof ProfileDropdownSection;
|
|
71
77
|
}
|
|
72
78
|
export declare const ProfileDropdown: ProfileDropdownType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profile-dropdown.d.ts","sourceRoot":"","sources":["../../../src/components/profile-dropdown/profile-dropdown.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAqB,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAEpF,OAAO,EACH,EAAE,EACF,yBAAyB,EACzB,UAAU,EAEV,SAAS,EAMZ,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"profile-dropdown.d.ts","sourceRoot":"","sources":["../../../src/components/prof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AAO,CAAC,EAAE,MAAM,IAAI,CAAC;KACxB,CAAC;IACF,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,kBAAkB,CAAC,OAAO,CAAC,CAAC;IACpC,OAAO,CAAC,IAAI,IAAI,CAAC;IACjB,MAAM,CAAC,IAAI,IAAI,CAAC;CACnB;AAED,MAAM,WAAW,oBAAqB,SAAQ,0BAA0B;IACpE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACtB;AAED,MAAM,WAAW,mBAAoB,SAAQ,EAAE,CAAC,oBAAoB,CAAC;IACjE,OAAO,EAAE,OAAO,sBAAsB,CAAC;IACvC,IAAI,EAAE,OAAO,mBAAmB,CAAC;IACjC,OAAO,EAAE,OAAO,sBAAsB,CAAC;IACvC,OAAO,EAAE,OAAO,sBAAsB,CAAC;CAC1C;AAED,eAAO,MAAM,eAAe,EAAE,mBAqFL,CAAC"}
|
|
@@ -10,6 +10,7 @@ import { useCallback, useContext, useEffect, useMemo, useState, } from 'react';
|
|
|
10
10
|
import { NavigationComponentContext, NavigationLegacyContext, } from '../../utils/navigation-context';
|
|
11
11
|
import { getCounterTag } from '../../utils/side-nav';
|
|
12
12
|
import { CounterTag } from '../counter-tag';
|
|
13
|
+
import { withTooltip } from '../titan-layout/with-tooltip';
|
|
13
14
|
import * as Styles from './profile-dropdown.module.less';
|
|
14
15
|
import { ProfileLogo } from './profile-icon';
|
|
15
16
|
const ProfileDropdownTrigger = ({ avatarBadge, badge, className, hintArrow, imageSrc, info, onClick, open, }) => {
|
|
@@ -32,7 +33,7 @@ const ProfileDropdownTrigger = ({ avatarBadge, badge, className, hintArrow, imag
|
|
|
32
33
|
[Styles.triggerContainerLegacy]: isLegacy,
|
|
33
34
|
}, className), onClick: onClick, "data-cy": "profile-dropdown-trigger", "data-pendo": "profile-dropdown-trigger", children: [avatarSource && !avatarSourceError ? (_jsx("img", { src: avatarSource, className: classNames(Styles.profileImage, 'profile-dropdown-image'), onError: onAvatarError, alt: "user dropdown menu" })) : isLegacy ? (_jsx(ProfileLogo, {})) : (_jsx(Icon, { size: "large", svg: open ? SvgAccountActive : SvgAccountInactive })), !!info && (_jsxs("div", { className: Styles.info, children: [_jsx(BodyText, { bold: true, title: info.title, className: "t-truncate c-inherit", size: "xsmall", children: info.title }), _jsx(BodyText, { title: info.text, className: "t-truncate c-neutral-70 tt-uppercase", size: "xsmall", children: info.text })] })), _jsx(Icon, { svg: open ? SvgExpandLess : SvgExpandMore, className: classNames(Styles.expandIcon), size: "small" }), !!avatarBadge && (_jsx("div", { className: classNames(Styles.avatarBadge, avatarBadge === true ? 'bg-blue-500' : `bg-${avatarBadge}`) })), !!badge && (_jsx("span", { className: classNames(Styles.badge, badge.content ? Styles.badgeWithContent : Styles.badgeNoContent, badge.className), children: badge.content }))] }));
|
|
34
35
|
};
|
|
35
|
-
export const ProfileDropdownSection = ({ children, className, id, onClick, ...rest }) => {
|
|
36
|
+
export const ProfileDropdownSection = ({ children, className, id, text, tooltip, onClick, ...rest }) => {
|
|
36
37
|
const clickHandler = e => {
|
|
37
38
|
if (onClick) {
|
|
38
39
|
onClick(e);
|
|
@@ -41,18 +42,16 @@ export const ProfileDropdownSection = ({ children, className, id, onClick, ...re
|
|
|
41
42
|
e.stopPropagation();
|
|
42
43
|
}
|
|
43
44
|
};
|
|
44
|
-
return (_jsx("div", { className: classNames(Styles.dropdownSection, className
|
|
45
|
+
return withTooltip(_jsx("div", { className: classNames(Styles.dropdownSection, className, {
|
|
46
|
+
'cursor-pointer': !!onClick,
|
|
47
|
+
}), onClick: clickHandler, "data-cy": `profile-dropdown-section-${id}`, "data-pendo": `profile-dropdown-section-${id}`, ...rest, children: children }), tooltip, 'left');
|
|
45
48
|
};
|
|
46
49
|
export const ProfileDropdownDivider = Popover.Divider;
|
|
47
|
-
export const ProfileDropdownLink = ({ children, className, external, id, counter, tag, target, to, onClick, ...rest }) => {
|
|
50
|
+
export const ProfileDropdownLink = ({ children, className, external, id, counter, tag, target, text, to, tooltip, onClick, ...rest }) => {
|
|
48
51
|
const NavigationComponent = useContext(NavigationComponentContext);
|
|
49
|
-
const clickHandler = (e) => {
|
|
50
|
-
e.preventDefault();
|
|
51
|
-
onClick === null || onClick === void 0 ? void 0 : onClick();
|
|
52
|
-
};
|
|
53
52
|
const isExternalLink = external !== null && external !== void 0 ? external : to === null || to === void 0 ? void 0 : to.startsWith('http');
|
|
54
53
|
const tagElement = useMemo(() => _jsx(CounterTag, { data: getCounterTag(counter, tag), className: Styles.counter }), [counter, tag]);
|
|
55
|
-
return isExternalLink ? (_jsxs("a", { className: classNames(Styles.dropdownSection, Styles.dropdownLink, className), href: to, target: target, "data-cy": `profile-dropdown-link-${id}`, "data-pendo": `profile-dropdown-link-${id}`, ...rest, children: [children, tagElement] })) :
|
|
54
|
+
return withTooltip(isExternalLink ? (_jsxs("a", { className: classNames(Styles.dropdownSection, Styles.dropdownLink, className), href: to, target: target, "data-cy": `profile-dropdown-link-${id}`, "data-pendo": `profile-dropdown-link-${id}`, ...rest, children: [children, tagElement] })) : (_jsxs(NavigationComponent, { className: classNames(Styles.dropdownSection, Styles.dropdownLink, className), target: target, to: to, "data-cy": `profile-dropdown-link-${id}`, "data-pendo": `profile-dropdown-link-${id}`, ...rest, children: [children, tagElement] })), tooltip, 'left');
|
|
56
55
|
};
|
|
57
56
|
export const ProfileDropdown = (({ children, className, direction, hintPopup, onClose, onOpen, portal, trigger, width, }) => {
|
|
58
57
|
var _a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profile-dropdown.js","sourceRoot":"","sources":["../../../src/components/profile-dropdown/profile-dropdown.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,aAAa,MAAM,kEAAkE,CAAC;AAC7F,OAAO,aAAa,MAAM,kEAAkE,CAAC;AAC7F,OAAO,gBAAgB,MAAM,8DAA8D,CAAC;AAC5F,OAAO,kBAAkB,MAAM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E,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,IAAI,EACpB,OAAO,EAAE,cAAc,EACvB,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,EACd,cAAc,EAAE,WAAW,EAC3B,SAAS,EAAE,MAAM,CAAC,QAAQ,EAC1B,uBAAuB,EAAE,UAAU,CAC/B,MAAM,CAAC,eAAe,EACtB,MAAM,CAAC,yBAAyB,CACnC,YAED,cACI,SAAS,EAAE,MAAM,CAAC,sBAAsB,EACxC,OAAO,EAAE,WAAW,aACZ,0BAA0B,YAEjC,QAAQ,GACP,GACA,CACb,GACC,CACT,CAAC;AACN,CAAC,CAAwB,CAAC;AAE1B,eAAe,CAAC,OAAO,GAAG,sBAAsB,CAAC;AACjD,eAAe,CAAC,IAAI,GAAG,mBAAmB,CAAC;AAC3C,eAAe,CAAC,OAAO,GAAG,sBAAsB,CAAC"}
|
|
@@ -10,10 +10,10 @@ export default {
|
|
|
10
10
|
parameters: {},
|
|
11
11
|
decorators: [withMemoryRouter, withAnvil, withHeaderNavigation],
|
|
12
12
|
};
|
|
13
|
-
export const ProfileDropdownDefault = () => (_jsxs(ProfileDropdown, { children: [_jsx(ProfileDropdown.Link, { id: "first", to: "https://google.com", children: "first link" }), _jsx(ProfileDropdown.
|
|
13
|
+
export const ProfileDropdownDefault = () => (_jsxs(ProfileDropdown, { children: [_jsx(ProfileDropdown.Link, { id: "first", to: "https://google.com", children: "first link" }), _jsx(ProfileDropdown.Section, { id: "second", onClick: () => alert('second click'), 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, {})] }));
|
|
14
14
|
export const ProfileDropdownWithLogo = () => (_jsxs(ProfileDropdown, { trigger: {
|
|
15
15
|
imageSrc: 'https://upload.wikimedia.org/wikipedia/en/1/11/Milhouse_Van_Houten.png',
|
|
16
|
-
}, children: [_jsx(ProfileDropdown.Link, { id: "first", to: "https://google.com", children: "first link" }), _jsx(ProfileDropdown.
|
|
16
|
+
}, children: [_jsx(ProfileDropdown.Link, { id: "first", to: "https://google.com", children: "first link" }), _jsx(ProfileDropdown.Section, { id: "second", onClick: () => alert('second click'), children: "second link" })] }));
|
|
17
17
|
export const ProfileDropdownWithErrorLogo = () => (_jsx(ProfileDropdown, { trigger: {
|
|
18
18
|
imageSrc: 'https://some.incorrect.url/logo.png',
|
|
19
19
|
} }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profile-dropdown.stories.js","sourceRoot":"","sources":["../../../src/components/profile-dropdown/profile-dropdown.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,MAAM,oBAAoB,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,CACzC,KAAC,gBAAgB,cACb,KAAC,KAAK,KAAG,GACM,CACtB,CAAC;AAEF,eAAe;IACX,KAAK,EAAE,mCAAmC;IAC1C,SAAS,EAAE,eAAe;IAC1B,UAAU,EAAE,EAAE;IACd,UAAU,EAAE,CAAC,gBAAgB,EAAE,SAAS,EAAE,oBAAoB,CAAC;CAClE,CAAC;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAG,EAAE,CAAC,CACxC,MAAC,eAAe,eACZ,KAAC,eAAe,CAAC,IAAI,IAAC,EAAE,EAAC,OAAO,EAAC,EAAE,EAAC,oBAAoB,2BAEjC,EACvB,KAAC,eAAe,CAAC,
|
|
1
|
+
{"version":3,"file":"profile-dropd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,EAAE;KAC3C,EACD,SAAS,EAAE;QACP,OAAO,EAAE,GAAG,EAAE,CAAC,kCAAgB;KAClC,GACH,CACL,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/titan-layout/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/titan-layout/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interface-internal.d.ts","sourceRoot":"","sources":["../../../src/components/titan-layout/interface-internal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAC3B,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAEvE,MAAM,WAAW,wBAAwB;IACrC,mBAAmB,EAAE,EAAE,CAAC,qBAAqB,CAAC,CAAC;CAClD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interface-internal.js","sourceRoot":"","sources":["../../../src/components/titan-layout/interface-internal.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { FC, ReactElement } from 'react';
|
|
2
|
+
import { NavigationItemData } from '../../utils/navigation';
|
|
3
|
+
import { TitanLayoutSidebarContextType } from './layout-context';
|
|
4
|
+
export interface TitanLayoutSidebarLinkWrapperProps {
|
|
5
|
+
children: ReactElement<TitanLayoutSidebarLinkProps> | ReactElement<TitanLayoutSidebarTriggerProps>;
|
|
6
|
+
context: TitanLayoutSidebarContextType;
|
|
7
|
+
}
|
|
8
|
+
export interface TitanLayoutSidebarLinkProps extends Omit<NavigationItemData, 'submenu'> {
|
|
9
|
+
wrapper?: FC<TitanLayoutSidebarLinkWrapperProps>;
|
|
10
|
+
}
|
|
11
|
+
export interface TitanLayoutSidebarTriggerProps extends Omit<TitanLayoutSidebarLinkProps, 'to' | 'isActive'> {
|
|
12
|
+
isActive?: boolean;
|
|
13
|
+
wrapper?: FC<TitanLayoutSidebarLinkWrapperProps>;
|
|
14
|
+
onClick?: () => void;
|
|
15
|
+
onMobileClick?: () => void;
|
|
16
|
+
}
|
|
17
|
+
export interface TitanLayoutState {
|
|
18
|
+
navCollapsed: boolean;
|
|
19
|
+
submenuExpanded?: string;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../src/components/titan-layout/interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,6BAA6B,EAAE,MAAM,kBAAkB,CAAC;AAEjE,MAAM,WAAW,kCAAkC;IAC/C,QAAQ,EACF,YAAY,CAAC,2BAA2B,CAAC,GACzC,YAAY,CAAC,8BAA8B,CAAC,CAAC;IACnD,OAAO,EAAE,6BAA6B,CAAC;CAC1C;AAED,MAAM,WAAW,2BAA4B,SAAQ,IAAI,CAAC,kBAAkB,EAAE,SAAS,CAAC;IACpF,OAAO,CAAC,EAAE,EAAE,CAAC,kCAAkC,CAAC,CAAC;CACpD;AACD,MAAM,WAAW,8BACb,SAAQ,IAAI,CAAC,2BAA2B,EAAE,IAAI,GAAG,UAAU,CAAC;IAC5D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,EAAE,CAAC,kCAAkC,CAAC,CAAC;IACjD,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;CAC9B;AAED,MAAM,WAAW,gBAAgB;IAC7B,YAAY,EAAE,OAAO,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC5B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../../src/components/titan-layout/interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { CSSProperties, FC } from 'react';
|
|
2
|
+
import { NavLinkComponentProps } from '../../utils/navigation-context';
|
|
3
|
+
import { TitanBreakpoint } from '../../utils/use-breakpoint';
|
|
4
|
+
export interface TitanLayoutSidebarContextType {
|
|
5
|
+
styles: {
|
|
6
|
+
popoverContent: CSSProperties;
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
export type TitanLayoutPlacement = 'top' | 'side' | 'unset';
|
|
10
|
+
export interface TitanLayoutContextType {
|
|
11
|
+
NavigationComponent: FC<NavLinkComponentProps>;
|
|
12
|
+
breakpoint: TitanBreakpoint;
|
|
13
|
+
isTitanLayout: boolean;
|
|
14
|
+
sidebar: TitanLayoutSidebarContextType;
|
|
15
|
+
}
|
|
16
|
+
export declare const LayoutContext: import("react").Context<TitanLayoutContextType>;
|
|
17
|
+
export declare const useTitanLayoutContext: () => TitanLayoutContextType;
|
|
18
|
+
export declare const LayoutPlacementContext: import("react").Context<TitanLayoutPlacement | undefined>;
|
|
19
|
+
export declare const useTitanLayoutPlacementContext: () => TitanLayoutPlacement | undefined;
|
|
20
|
+
//# sourceMappingURL=layout-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout-context.d.ts","sourceRoot":"","sources":["../../../src/components/titan-layout/layout-context.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,EAAE,EAA6B,MAAM,OAAO,CAAC;AACrE,OAAO,EAA2B,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAChG,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAE7D,MAAM,WAAW,6BAA6B;IAC1C,MAAM,EAAE;QACJ,cAAc,EAAE,aAAa,CAAC;KACjC,CAAC;CACL;AAED,MAAM,MAAM,oBAAoB,GAAG,KAAK,GAAG,MAAM,GAAG,OAAO,CAAC;AAE5D,MAAM,WAAW,sBAAsB;IACnC,mBAAmB,EAAE,EAAE,CAAC,qBAAqB,CAAC,CAAC;IAC/C,UAAU,EAAE,eAAe,CAAC;IAC5B,aAAa,EAAE,OAAO,CAAC;IACvB,OAAO,EAAE,6BAA6B,CAAC;CAC1C;AAED,eAAO,MAAM,aAAa,iDAKxB,CAAC;AAEH,eAAO,MAAM,qBAAqB,8BAAkC,CAAC;AAErE,eAAO,MAAM,sBAAsB,2DAA6D,CAAC;AACjG,eAAO,MAAM,8BAA8B,wCAA2C,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { createContext, useContext } from 'react';
|
|
2
|
+
import { DefaultNavLinkComponent } from '../../utils/navigation-context';
|
|
3
|
+
export const LayoutContext = createContext({
|
|
4
|
+
NavigationComponent: DefaultNavLinkComponent,
|
|
5
|
+
breakpoint: { name: 'lg', isMobile: false },
|
|
6
|
+
isTitanLayout: false,
|
|
7
|
+
sidebar: { styles: { popoverContent: {} } },
|
|
8
|
+
});
|
|
9
|
+
export const useTitanLayoutContext = () => useContext(LayoutContext);
|
|
10
|
+
export const LayoutPlacementContext = createContext(undefined);
|
|
11
|
+
export const useTitanLayoutPlacementContext = () => useContext(LayoutPlacementContext);
|
|
12
|
+
//# sourceMappingURL=layout-context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout-context.js","sourceRoot":"","sources":["../../../src/components/titan-layout/layout-context.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqB,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACrE,OAAO,EAAE,uBAAuB,EAAyB,MAAM,gCAAgC,CAAC;AAkBhG,MAAM,CAAC,MAAM,aAAa,GAAG,aAAa,CAAyB;IAC/D,mBAAmB,EAAE,uBAAuB;IAC5C,UAAU,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE;IAC3C,aAAa,EAAE,KAAK;IACpB,OAAO,EAAE,EAAE,MAAM,EAAE,EAAE,cAAc,EAAE,EAAE,EAAE,EAAE;CAC9C,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;AAErE,MAAM,CAAC,MAAM,sBAAsB,GAAG,aAAa,CAAmC,SAAS,CAAC,CAAC;AACjG,MAAM,CAAC,MAAM,8BAA8B,GAAG,GAAG,EAAE,CAAC,UAAU,CAAC,sBAAsB,CAAC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { HeaderNavigationLinkProps, HeaderNavigationTriggerProps } from '../../utils/navigation-legacy';
|
|
3
|
+
/** Navigation extra item with link */
|
|
4
|
+
export declare const LayoutHeaderNavigationLink: FC<HeaderNavigationLinkProps>;
|
|
5
|
+
/** Navigation extra item with icon button */
|
|
6
|
+
export declare const LayoutHeaderNavigationTrigger: FC<HeaderNavigationTriggerProps>;
|
|
7
|
+
//# sourceMappingURL=layout-header-links.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout-header-links.d.ts","sourceRoot":"","sources":["../../../src/components/titan-layout/layout-header-links.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,EAAE,EAAY,MAAM,OAAO,CAAC;AACrC,OAAO,EACH,yBAAyB,EACzB,4BAA4B,EAC/B,MAAM,+BAA+B,CAAC;AA4CvC,sCAAsC;AACtC,eAAO,MAAM,0BAA0B,EAAE,EAAE,CAAC,yBAAyB,CA+CpE,CAAC;AAEF,6CAA6C;AAC7C,eAAO,MAAM,6BAA6B,EAAE,EAAE,CAAC,4BAA4B,CA0C1E,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { createElement as _createElement } from "react";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Icon } from '@servicetitan/anvil2';
|
|
4
|
+
import classNames from 'classnames';
|
|
5
|
+
import { Fragment } from 'react';
|
|
6
|
+
import { getCounterTag } from '../../utils/side-nav';
|
|
7
|
+
import { CounterTag } from '../counter-tag';
|
|
8
|
+
// use v1 tooltips due to bug with v2 in monolith
|
|
9
|
+
import { withTooltip } from '../header-navigation/with-tooltip';
|
|
10
|
+
import { useTitanLayoutContext } from './layout-context';
|
|
11
|
+
import * as Styles from './layout-header.module.less';
|
|
12
|
+
/** Content for navigation items */
|
|
13
|
+
const HeaderNavigationItemContent = ({ counterClassName, icon, iconActive, label, labelClassName, tag }) => {
|
|
14
|
+
return (_jsxs(Fragment, { children: [!!icon && _jsx(Icon, { svg: icon, className: Styles.navigationIcon }), !!iconActive && (_jsx(Icon, { svg: iconActive, className: classNames(Styles.navigationIcon, Styles.navigationIconActive) })), !!label && (_jsx("span", { className: classNames(Styles.navigationItemLabel, labelClassName), children: label })), !!tag && (_jsx(CounterTag, { data: tag, className: classNames(Styles.navigationItemCounter, counterClassName), longClassName: Styles.navigationItemCounterLong }))] }));
|
|
15
|
+
};
|
|
16
|
+
/** Navigation extra item with link */
|
|
17
|
+
export const LayoutHeaderNavigationLink = ({ id, to, hint, tooltip, className, counter, icon, iconActive, iconClassName, iconComponent, iconName, isActive, label, labelClassName, tag, target, ...rest }) => {
|
|
18
|
+
const { NavigationComponent } = useTitanLayoutContext();
|
|
19
|
+
return withTooltip(_createElement(NavigationComponent, { "data-cy": `navigation-link-${id}`, "data-pendo": `navigation-link-${id}`, ...rest, key: id, to: to, title: hint, className: classNames(Styles.navigationLink, className, {
|
|
20
|
+
[Styles.navigationItemActive]: isActive === true,
|
|
21
|
+
[Styles.navigationItemIconState]: !!icon && !!iconActive,
|
|
22
|
+
}), isActive: typeof isActive === 'function' ? isActive : undefined, activeClassName: Styles.navigationItemActive, target: target },
|
|
23
|
+
_jsx(HeaderNavigationItemContent, { tag: getCounterTag(counter, tag), icon: icon, iconActive: iconActive, label: label, labelClassName: labelClassName })), tooltip);
|
|
24
|
+
};
|
|
25
|
+
/** Navigation extra item with icon button */
|
|
26
|
+
export const LayoutHeaderNavigationTrigger = ({ id, className, counter, icon, iconActive, iconName, isActive, hint, label, labelClassName, tag, tooltip, title, titleClassName, ...rest }) => {
|
|
27
|
+
return withTooltip(_jsx("div", { "data-cy": `navigation-trigger-${id}`, "data-pendo": `navigation-trigger-${id}`, ...rest, title: hint, className: classNames(Styles.navigationLink, {
|
|
28
|
+
[Styles.navigationItemActive]: isActive === true,
|
|
29
|
+
[Styles.navigationItemIconState]: !!icon && !!iconActive,
|
|
30
|
+
}, 'cursor-pointer', className), children: _jsx(HeaderNavigationItemContent, { tag: getCounterTag(counter, tag), icon: isActive && iconActive ? iconActive : icon, label: label, labelClassName: labelClassName }) }), tooltip);
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=layout-header-links.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout-header-links.js","sourceRoot":"","sources":["../../../src/components/titan-layout/layout-header-links.tsx"],"names":[],"mappings":";;AAAA,OAAO,EAAE,IAAI,EAAa,MAAM,sBAAsB,CAAC;AACvD,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAM,QAAQ,EAAE,MAAM,OAAO,CAAC;AAKrC,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAmB,MAAM,gBAAgB,CAAC;AAC7D,iDAAiD;AACjD,OAAO,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MAAM,CAAC,oBAAoB,CAAC,EAAE,QAAQ,KAAK,IAAI;YAChD,CAAC,MAAM,CAAC,uBAAuB,CAAC,EAAE,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,UAAU;SAC3D,EACD,gBAAgB,EAChB,SAAS,CACZ,YAED,KAAC,2BAA2B,IACxB,GAAG,EAAE,aAAa,CAAC,OAAO,EAAE,GAAG,CAAC,EAChC,IAAI,EAAE,QAAQ,IAAI,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,EAChD,KAAK,EAAE,KAAK,EACZ,cAAc,EAAE,cAAc,GAChC,GACA,EACN,OAAO,CACV,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef, FC, ReactElement, ReactNode } from 'react';
|
|
2
|
+
import { TitanLayoutLogoProps } from './layout-logo';
|
|
3
|
+
export interface TitanLayoutHeaderLogoProps {
|
|
4
|
+
title?: true | string;
|
|
5
|
+
mantleFill?: string;
|
|
6
|
+
to?: string;
|
|
7
|
+
}
|
|
8
|
+
export type LayoutHeaderProps = Omit<ComponentPropsWithoutRef<'div'>, 'children'> & {
|
|
9
|
+
right?: ReactNode;
|
|
10
|
+
rightText?: string;
|
|
11
|
+
rightClassName?: string;
|
|
12
|
+
id?: string;
|
|
13
|
+
center?: ReactElement;
|
|
14
|
+
centerClassName?: string;
|
|
15
|
+
logo: ReactElement<TitanLayoutLogoProps>;
|
|
16
|
+
profile?: ReactElement;
|
|
17
|
+
onBurgerClick?: (e: MouseEvent) => void;
|
|
18
|
+
};
|
|
19
|
+
export declare const LayoutHeader: FC<LayoutHeaderProps>;
|
|
20
|
+
//# sourceMappingURL=layout-header.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout-header.d.ts","sourceRoot":"","sources":["../../../src/components/titan-layout/layout-header.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,wBAAwB,EAAE,EAAE,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAI9E,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAErD,MAAM,WAAW,0BAA0B;IACvC,KAAK,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,EAAE,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,GAAG;IAChF,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB,IAAI,EAAE,YAAY,CAAC,oBAAoB,CAAC,CAAC;IACzC,OAAO,CAAC,EAAE,YAAY,CAAC;IAEvB,aAAa,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;CAC3C,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CA2D9C,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import SvgBurgerMenu from '@servicetitan/anvil2/assets/icons/material/round/menu.svg';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import { LayoutPlacementContext, useTitanLayoutContext } from './layout-context';
|
|
5
|
+
import { LayoutHeaderNavigationTrigger } from './layout-header-links';
|
|
6
|
+
import * as Styles from './layout-header.module.less';
|
|
7
|
+
export const LayoutHeader = ({ className, right, rightText, rightClassName, center, centerClassName, logo, profile, onBurgerClick, ...rest }) => {
|
|
8
|
+
const { breakpoint } = useTitanLayoutContext();
|
|
9
|
+
return (_jsx(LayoutPlacementContext.Provider, { value: "top", children: _jsxs("div", { className: classNames(Styles.header, className), ...rest, "data-cy": "header-navigation", children: [_jsxs("div", { className: classNames(Styles.heTopLeft), "data-cy": "navigation-left", children: [breakpoint.isMobile && (_jsx(LayoutHeaderNavigationTrigger, { id: "burger", title: "", icon: SvgBurgerMenu, iconActive: SvgBurgerMenu, className: "m-r-1", onClick: onBurgerClick })), logo] }), _jsx("div", { className: classNames(Styles.heTopCenter, 'd-f align-items-center justify-content-center', centerClassName), "data-cy": "navigation-center", children: center }), _jsxs("div", { className: classNames('d-f flex-row justify-content-end align-items-center', Styles.heTopRight, rightClassName), "data-cy": "navigation-right", children: [!!rightText && _jsx("div", { className: Styles.heTopRightText, children: rightText }), right, profile] })] }) }));
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=layout-header.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout-header.js","sourceRoot":"","sources":["../../../src/components/titan-layout/layout-header.tsx"],"names":[],"mappings":";AAAA,OAAO,aAAa,MAAM,2DAA2D,CAAC;AACtF,OAAO,UAAU,MAAM,YAAY,CAAC;AAEpC,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AACjF,OAAO,EAAE,6BAA6B,EAAE,MAAM,uBAAuB,CAAC;AACtE,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AAyBtD,MAAM,CAAC,MAAM,YAAY,GAA0B,CAAC,EAChD,SAAS,EACT,KAAK,EACL,SAAS,EACT,cAAc,EACd,MAAM,EACN,eAAe,EACf,IAAI,EACJ,OAAO,EACP,aAAa,EACb,GAAG,IAAI,EACV,EAAE,EAAE;IACD,MAAM,EAAE,UAAU,EAAE,GAAG,qBAAqB,EAAE,CAAC;IAE/C,OAAO,CACH,KAAC,sBAAsB,CAAC,QAAQ,IAAC,KAAK,EAAC,KAAK,YACxC,eACI,SAAS,EAAE,UAAU,CAAC,MAAM,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