@servicetitan/navigation 11.0.0-canary.237.c90556e.0 → 11.0.0-canary.237.f92c882.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 +12 -0
- package/dist/components/badge-tag.d.ts.map +1 -0
- package/dist/components/badge-tag.js +8 -0
- package/dist/components/badge-tag.js.map +1 -0
- package/dist/components/counter-tag.d.ts +12 -0
- package/dist/components/counter-tag.d.ts.map +1 -0
- package/dist/components/counter-tag.js +8 -0
- package/dist/components/counter-tag.js.map +1 -0
- package/dist/components/header-navigation/header-navigation-content.d.ts +30 -0
- package/dist/components/header-navigation/header-navigation-content.d.ts.map +1 -0
- package/dist/components/header-navigation/header-navigation-content.js +22 -0
- package/dist/components/header-navigation/header-navigation-content.js.map +1 -0
- package/dist/components/header-navigation/header-navigation-extra-stacked.stories.d.ts +9 -0
- package/dist/components/header-navigation/header-navigation-extra-stacked.stories.d.ts.map +1 -0
- package/dist/components/header-navigation/header-navigation-extra-stacked.stories.js +13 -0
- package/dist/components/header-navigation/header-navigation-extra-stacked.stories.js.map +1 -0
- package/dist/components/header-navigation/header-navigation-extra.stories.d.ts +12 -0
- package/dist/components/header-navigation/header-navigation-extra.stories.d.ts.map +1 -0
- package/dist/components/header-navigation/header-navigation-extra.stories.js +29 -0
- package/dist/components/header-navigation/header-navigation-extra.stories.js.map +1 -0
- package/dist/components/header-navigation/header-navigation-links.d.ts +11 -0
- package/dist/components/header-navigation/header-navigation-links.d.ts.map +1 -0
- package/dist/components/header-navigation/header-navigation-links.js +26 -0
- package/dist/components/header-navigation/header-navigation-links.js.map +1 -0
- package/dist/components/header-navigation/header-navigation-stacked.stories.d.ts +12 -0
- package/dist/components/header-navigation/header-navigation-stacked.stories.d.ts.map +1 -0
- package/dist/components/header-navigation/header-navigation-stacked.stories.js +50 -0
- package/dist/components/header-navigation/header-navigation-stacked.stories.js.map +1 -0
- package/dist/components/header-navigation/header-navigation-stories.module.less +6 -0
- package/dist/components/header-navigation/header-navigation.d.ts +59 -0
- package/dist/components/header-navigation/header-navigation.d.ts.map +1 -0
- package/dist/components/header-navigation/header-navigation.js +96 -0
- package/dist/components/header-navigation/header-navigation.js.map +1 -0
- package/dist/components/header-navigation/header-navigation.module.less +260 -0
- package/dist/components/header-navigation/header-navigation.stories.d.ts +12 -0
- package/dist/components/header-navigation/header-navigation.stories.d.ts.map +1 -0
- package/dist/components/header-navigation/header-navigation.stories.js +54 -0
- package/dist/components/header-navigation/header-navigation.stories.js.map +1 -0
- package/dist/components/header-navigation/index.d.ts +2 -0
- package/dist/components/header-navigation/index.d.ts.map +1 -0
- package/dist/components/header-navigation/index.js +2 -0
- package/dist/components/header-navigation/index.js.map +1 -0
- package/dist/components/header-navigation/with-tooltip.d.ts +4 -0
- package/dist/components/header-navigation/with-tooltip.d.ts.map +1 -0
- package/dist/components/header-navigation/with-tooltip.js +4 -0
- package/dist/components/header-navigation/with-tooltip.js.map +1 -0
- package/dist/components/layout.stories.d.ts +13 -0
- package/dist/components/layout.stories.d.ts.map +1 -0
- package/dist/components/layout.stories.js +29 -0
- package/dist/components/layout.stories.js.map +1 -0
- package/dist/components/left-navigation/header-navigation-extra-tiny.stories.d.ts +9 -0
- package/dist/components/left-navigation/header-navigation-extra-tiny.stories.d.ts.map +1 -0
- package/dist/components/left-navigation/header-navigation-extra-tiny.stories.js +13 -0
- package/dist/components/left-navigation/header-navigation-extra-tiny.stories.js.map +1 -0
- package/dist/components/left-navigation/header-navigation-tiny-links.d.ts +18 -0
- package/dist/components/left-navigation/header-navigation-tiny-links.d.ts.map +1 -0
- package/dist/components/left-navigation/header-navigation-tiny-links.js +32 -0
- package/dist/components/left-navigation/header-navigation-tiny-links.js.map +1 -0
- package/dist/components/left-navigation/header-navigation-tiny.d.ts +23 -0
- package/dist/components/left-navigation/header-navigation-tiny.d.ts.map +1 -0
- package/dist/components/left-navigation/header-navigation-tiny.js +7 -0
- package/dist/components/left-navigation/header-navigation-tiny.js.map +1 -0
- package/dist/components/left-navigation/header-navigation-tiny.module.less +117 -0
- package/dist/components/left-navigation/header-navigation-tiny.stories.d.ts +12 -0
- package/dist/components/left-navigation/header-navigation-tiny.stories.d.ts.map +1 -0
- package/dist/components/left-navigation/header-navigation-tiny.stories.js +30 -0
- package/dist/components/left-navigation/header-navigation-tiny.stories.js.map +1 -0
- package/dist/components/left-navigation/index.d.ts +5 -0
- package/dist/components/left-navigation/index.d.ts.map +1 -0
- package/dist/components/left-navigation/index.js +5 -0
- package/dist/components/left-navigation/index.js.map +1 -0
- package/dist/components/left-navigation/interface-internal.d.ts +10 -0
- package/dist/components/left-navigation/interface-internal.d.ts.map +1 -0
- package/dist/components/left-navigation/interface-internal.js +2 -0
- package/dist/components/left-navigation/interface-internal.js.map +1 -0
- package/dist/components/left-navigation/interface.d.ts +20 -0
- package/dist/components/left-navigation/interface.d.ts.map +1 -0
- package/dist/components/left-navigation/interface.js +2 -0
- package/dist/components/left-navigation/interface.js.map +1 -0
- package/dist/components/left-navigation/side-navigation-context.d.ts +8 -0
- package/dist/components/left-navigation/side-navigation-context.d.ts.map +1 -0
- package/dist/components/left-navigation/side-navigation-context.js +7 -0
- package/dist/components/left-navigation/side-navigation-context.js.map +1 -0
- package/dist/components/left-navigation/side-navigation-links-internal.d.ts +28 -0
- package/dist/components/left-navigation/side-navigation-links-internal.d.ts.map +1 -0
- package/dist/components/left-navigation/side-navigation-links-internal.js +29 -0
- package/dist/components/left-navigation/side-navigation-links-internal.js.map +1 -0
- package/dist/components/left-navigation/side-navigation-links.d.ts +6 -0
- package/dist/components/left-navigation/side-navigation-links.d.ts.map +1 -0
- package/dist/components/left-navigation/side-navigation-links.js +27 -0
- package/dist/components/left-navigation/side-navigation-links.js.map +1 -0
- package/dist/components/left-navigation/side-navigation.d.ts +29 -0
- package/dist/components/left-navigation/side-navigation.d.ts.map +1 -0
- package/dist/components/left-navigation/side-navigation.js +182 -0
- package/dist/components/left-navigation/side-navigation.js.map +1 -0
- package/dist/components/left-navigation/side-navigation.module.less +530 -0
- package/dist/components/left-navigation/side-navigation.stories.d.ts +17 -0
- package/dist/components/left-navigation/side-navigation.stories.d.ts.map +1 -0
- package/dist/components/left-navigation/side-navigation.stories.js +115 -0
- package/dist/components/left-navigation/side-navigation.stories.js.map +1 -0
- package/dist/components/left-navigation/with-tooltip.d.ts +4 -0
- package/dist/components/left-navigation/with-tooltip.d.ts.map +1 -0
- package/dist/components/left-navigation/with-tooltip.js +4 -0
- package/dist/components/left-navigation/with-tooltip.js.map +1 -0
- package/dist/components/links.d.ts +5 -0
- package/dist/components/links.d.ts.map +1 -0
- package/dist/components/links.js +14 -0
- package/dist/components/links.js.map +1 -0
- package/dist/components/logo/logo-company-title.d.ts +8 -0
- package/dist/components/logo/logo-company-title.d.ts.map +1 -0
- package/dist/components/logo/logo-company-title.js +6 -0
- package/dist/components/logo/logo-company-title.js.map +1 -0
- package/dist/components/logo/logo-titan-text.d.ts +29 -0
- package/dist/components/logo/logo-titan-text.d.ts.map +1 -0
- package/dist/components/logo/logo-titan-text.js +13 -0
- package/dist/components/logo/logo-titan-text.js.map +1 -0
- package/dist/components/logo/logo-titan-text.module.less +31 -0
- package/dist/components/logo/logo-titan.d.ts +9 -0
- package/dist/components/logo/logo-titan.d.ts.map +1 -0
- package/dist/components/logo/logo-titan.js +13 -0
- package/dist/components/logo/logo-titan.js.map +1 -0
- package/dist/components/logo/logo.stories.d.ts +14 -0
- package/dist/components/logo/logo.stories.d.ts.map +1 -0
- package/dist/components/logo/logo.stories.js +20 -0
- package/dist/components/logo/logo.stories.js.map +1 -0
- package/dist/components/profile-dropdown/profile-dropdown-stacked.stories.d.ts +9 -0
- package/dist/components/profile-dropdown/profile-dropdown-stacked.stories.d.ts.map +1 -0
- package/dist/components/profile-dropdown/profile-dropdown-stacked.stories.js +13 -0
- package/dist/components/profile-dropdown/profile-dropdown-stacked.stories.js.map +1 -0
- package/dist/components/profile-dropdown/profile-dropdown-tiny.stories.d.ts +9 -0
- package/dist/components/profile-dropdown/profile-dropdown-tiny.stories.d.ts.map +1 -0
- package/dist/components/profile-dropdown/profile-dropdown-tiny.stories.js +13 -0
- package/dist/components/profile-dropdown/profile-dropdown-tiny.stories.js.map +1 -0
- package/dist/components/profile-dropdown/profile-dropdown.d.ts +80 -0
- package/dist/components/profile-dropdown/profile-dropdown.d.ts.map +1 -0
- package/dist/components/profile-dropdown/profile-dropdown.js +85 -0
- package/dist/components/profile-dropdown/profile-dropdown.js.map +1 -0
- package/dist/components/profile-dropdown/profile-dropdown.module.less +171 -0
- package/dist/components/profile-dropdown/profile-dropdown.stories.d.ts +16 -0
- package/dist/components/profile-dropdown/profile-dropdown.stories.d.ts.map +1 -0
- package/dist/components/profile-dropdown/profile-dropdown.stories.js +51 -0
- package/dist/components/profile-dropdown/profile-dropdown.stories.js.map +1 -0
- package/dist/components/profile-dropdown/profile-icon.d.ts +3 -0
- package/dist/components/profile-dropdown/profile-icon.d.ts.map +1 -0
- package/dist/components/profile-dropdown/profile-icon.js +5 -0
- package/dist/components/profile-dropdown/profile-icon.js.map +1 -0
- 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 +22 -0
- package/dist/components/titan-layout/layout-header.d.ts.map +1 -0
- package/dist/components/titan-layout/layout-header.js +10 -0
- package/dist/components/titan-layout/layout-header.js.map +1 -0
- package/dist/components/titan-layout/layout-header.module.less +196 -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 +68 -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 +28 -0
- package/dist/components/titan-layout/layout-sidebar-links.js.map +1 -0
- package/dist/components/titan-layout/layout-sidebar.d.ts +19 -0
- package/dist/components/titan-layout/layout-sidebar.d.ts.map +1 -0
- package/dist/components/titan-layout/layout-sidebar.js +67 -0
- package/dist/components/titan-layout/layout-sidebar.js.map +1 -0
- package/dist/components/titan-layout/layout-sidebar.module.less +529 -0
- 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 +38 -0
- package/dist/components/titan-layout/titan-layout.d.ts.map +1 -0
- package/dist/components/titan-layout/titan-layout.js +139 -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 +21 -0
- package/dist/components/titan-layout/titan-layout.stories.d.ts.map +1 -0
- package/dist/components/titan-layout/titan-layout.stories.js +82 -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 +13 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +13 -0
- package/dist/index.js.map +1 -0
- package/dist/test/data-stories.module.less +8 -0
- package/dist/test/data.d.ts +35 -0
- package/dist/test/data.d.ts.map +1 -0
- package/dist/test/data.js +243 -0
- package/dist/test/data.js.map +1 -0
- package/dist/utils/counter-tag.d.ts +5 -0
- package/dist/utils/counter-tag.d.ts.map +1 -0
- package/dist/utils/counter-tag.js +2 -0
- package/dist/utils/counter-tag.js.map +1 -0
- package/dist/utils/navigation-context.d.ts +27 -0
- package/dist/utils/navigation-context.d.ts.map +1 -0
- package/dist/utils/navigation-context.js +10 -0
- package/dist/utils/navigation-context.js.map +1 -0
- package/dist/utils/navigation-legacy.d.ts +88 -0
- package/dist/utils/navigation-legacy.d.ts.map +1 -0
- package/dist/utils/navigation-legacy.js +2 -0
- package/dist/utils/navigation-legacy.js.map +1 -0
- package/dist/utils/navigation.d.ts +48 -0
- package/dist/utils/navigation.d.ts.map +1 -0
- package/dist/utils/navigation.js +2 -0
- package/dist/utils/navigation.js.map +1 -0
- package/dist/utils/side-nav.d.ts +6 -0
- package/dist/utils/side-nav.d.ts.map +1 -0
- package/dist/utils/side-nav.js +28 -0
- package/dist/utils/side-nav.js.map +1 -0
- 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 +3 -4
- 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.module.less.d.ts +3 -0
- package/src/components/header-navigation/header-navigation.module.less.d.ts +22 -0
- package/src/components/header-navigation/header-navigation.stories.tsx +1 -1
- package/src/components/left-navigation/header-navigation-tiny.module.less.d.ts +15 -0
- package/src/components/left-navigation/header-navigation-tiny.stories.tsx +2 -2
- package/src/components/left-navigation/side-navigation-links.tsx +1 -1
- package/src/components/left-navigation/side-navigation.module.less.d.ts +48 -0
- package/src/components/logo/logo-titan-text.module.less.d.ts +6 -0
- package/src/components/profile-dropdown/profile-dropdown.module.less.d.ts +21 -0
- package/src/components/profile-dropdown/profile-dropdown.tsx +13 -6
- package/src/components/titan-layout/layout-header.module.less +58 -15
- package/src/components/titan-layout/layout-header.module.less.d.ts +16 -0
- package/src/components/titan-layout/layout-header.tsx +12 -5
- 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 +17 -5
- package/src/components/titan-layout/layout-sidebar.module.less +20 -19
- package/src/components/titan-layout/layout-sidebar.module.less.d.ts +49 -0
- package/src/components/titan-layout/layout-sidebar.tsx +15 -9
- package/src/components/titan-layout/notifications-context.tsx +44 -0
- package/src/components/titan-layout/titan-layout.module.less +66 -16
- package/src/components/titan-layout/titan-layout.module.less.d.ts +15 -0
- package/src/components/titan-layout/titan-layout.stories.tsx +161 -18
- package/src/components/titan-layout/titan-layout.tsx +146 -58
- package/src/test/data-stories.module.less.d.ts +3 -0
- package/src/test/data.tsx +2 -3
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { HeaderNavigationLink as HeaderNavigationLinkLegacy, HeaderNavigationTrigger as HeaderNavigationTriggerLegacy, } from './header-navigation/header-navigation-links';
|
|
3
|
+
import { useTitanLayoutPlacementContext } from './titan-layout';
|
|
4
|
+
import { LayoutHeaderNavigationLink, LayoutHeaderNavigationTrigger, } from './titan-layout/layout-header-links';
|
|
5
|
+
import { TitanLayoutSidebarLink, TitanLayoutSidebarTrigger, } from './titan-layout/layout-sidebar-links';
|
|
6
|
+
export const HeaderNavigationLink = props => {
|
|
7
|
+
const placement = useTitanLayoutPlacementContext();
|
|
8
|
+
return placement === 'top' ? (_jsx(LayoutHeaderNavigationLink, { ...props })) : placement === 'side' ? (_jsx(TitanLayoutSidebarLink, { id: props.id, icon: props.icon, iconActive: props.iconActive, to: props.to, title: props.title, counter: props.counter })) : (_jsx(HeaderNavigationLinkLegacy, { ...props }));
|
|
9
|
+
};
|
|
10
|
+
export const HeaderNavigationTrigger = props => {
|
|
11
|
+
const placement = useTitanLayoutPlacementContext();
|
|
12
|
+
return placement === 'top' ? (_jsx(LayoutHeaderNavigationTrigger, { ...props })) : placement === 'side' ? (_jsx(TitanLayoutSidebarTrigger, { id: props.id, title: props.title, icon: props.icon, iconActive: props.iconActive })) : (_jsx(HeaderNavigationTriggerLegacy, { ...props }));
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=links.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"links.js","sourceRoot":"","sources":["../../src/components/links.tsx"],"names":[],"mappings":";AAKA,OAAO,EACH,oBAAoB,IAAI,0BAA0B,EAClD,uBAAuB,IAAI,6BAA6B,GAC3D,MAAM,6CAA6C,CAAC;AACrD,OAAO,EAAE,8BAA8B,EAAE,MAAM,gBAAgB,CAAC;AAChE,OAAO,EACH,0BAA0B,EAC1B,6BAA6B,GAChC,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACH,sBAAsB,EACtB,yBAAyB,GAC5B,MAAM,qCAAqC,CAAC;AAE7C,MAAM,CAAC,MAAM,oBAAoB,GAAkC,KAAK,CAAC,EAAE;IACvE,MAAM,SAAS,GAAG,8BAA8B,EAAE,CAAC;IAEnD,OAAO,SAAS,KAAK,KAAK,CAAC,CAAC,CAAC,CACzB,KAAC,0BAA0B,OAAK,KAAK,GAAI,CAC5C,CAAC,CAAC,CAAC,SAAS,KAAK,MAAM,CAAC,CAAC,CAAC,CACvB,KAAC,sBAAsB,IACnB,EAAE,EAAE,KAAK,CAAC,EAAE,EACZ,IAAI,EAAE,KAAK,CAAC,IAAI,EAChB,UAAU,EAAE,KAAK,CAAC,UAAU,EAC5B,EAAE,EAAE,KAAK,CAAC,EAAE,EACZ,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,OAAO,EAAE,KAAK,CAAC,OAAO,GACxB,CACL,CAAC,CAAC,CAAC,CACA,KAAC,0BAA0B,OAAK,KAAK,GAAI,CAC5C,CAAC;AACN,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,uBAAuB,GAAqC,KAAK,CAAC,EAAE;IAC7E,MAAM,SAAS,GAAG,8BAA8B,EAAE,CAAC;IAEnD,OAAO,SAAS,KAAK,KAAK,CAAC,CAAC,CAAC,CACzB,KAAC,6BAA6B,OAAK,KAAK,GAAI,CAC/C,CAAC,CAAC,CAAC,SAAS,KAAK,MAAM,CAAC,CAAC,CAAC,CACvB,KAAC,yBAAyB,IACtB,EAAE,EAAE,KAAK,CAAC,EAAE,EACZ,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,IAAI,EAAE,KAAK,CAAC,IAAI,EAChB,UAAU,EAAE,KAAK,CAAC,UAAU,GAC9B,CACL,CAAC,CAAC,CAAC,CACA,KAAC,6BAA6B,OAAK,KAAK,GAAI,CAC/C,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logo-company-title.d.ts","sourceRoot":"","sources":["../../../src/components/logo/logo-company-title.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAG3B,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC5B,CAmBA,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/* tslint:disable: max-line-length */
|
|
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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-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"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { CSSProperties, FC, ReactNode } from 'react';
|
|
2
|
+
export type WrapperProps = FC<{
|
|
3
|
+
className: string;
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
style?: CSSProperties;
|
|
6
|
+
}>;
|
|
7
|
+
export interface LogoTitanProps {
|
|
8
|
+
mantleFill?: string;
|
|
9
|
+
className?: string;
|
|
10
|
+
logoWrapper?: WrapperProps;
|
|
11
|
+
size?: number;
|
|
12
|
+
innerSize?: number;
|
|
13
|
+
}
|
|
14
|
+
export interface LogoTitanTextProps {
|
|
15
|
+
mantleFill?: string;
|
|
16
|
+
className?: string;
|
|
17
|
+
title: string;
|
|
18
|
+
description: string;
|
|
19
|
+
logoWrapper?: WrapperProps;
|
|
20
|
+
}
|
|
21
|
+
export interface LogoTitanTitleProps {
|
|
22
|
+
className?: string;
|
|
23
|
+
children: ReactNode;
|
|
24
|
+
}
|
|
25
|
+
export declare const LogoTitan: FC<LogoTitanProps>;
|
|
26
|
+
export declare const LogoTitanTitle: FC<LogoTitanTitleProps>;
|
|
27
|
+
export declare const LogoTitanDescription: FC<LogoTitanTitleProps>;
|
|
28
|
+
export declare const LogoTitanText: FC<LogoTitanTextProps>;
|
|
29
|
+
//# sourceMappingURL=logo-titan-text.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logo-titan-text.d.ts","sourceRoot":"","sources":["../../../src/components/logo/logo-titan-text.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIrD,MAAM,MAAM,YAAY,GAAG,EAAE,CAAC;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,SAAS,CAAC;IAAC,KAAK,CAAC,EAAE,aAAa,CAAA;CAAE,CAAC,CAAC;AAEjG,MAAM,WAAW,cAAc;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,YAAY,CAAC;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,kBAAkB;IAC/B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,YAAY,CAAC;CAC9B;AAED,MAAM,WAAW,mBAAmB;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,SAAS,CAAC;CACvB;AAQD,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC,cAAc,CAoBxC,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CAElD,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,EAAE,CAAC,mBAAmB,CAIxD,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,CAkBhD,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import classNames from 'classnames';
|
|
3
|
+
import { LogoTitanSvg } from './logo-titan';
|
|
4
|
+
import * as Styles from './logo-titan-text.module.less';
|
|
5
|
+
const DefaultLogoWrapper = ({ className, children, style }) => (_jsx("div", { className: className, style: style, children: children }));
|
|
6
|
+
export const LogoTitan = ({ className, logoWrapper: LogoWrapper = DefaultLogoWrapper, mantleFill, size = 56, innerSize, }) => {
|
|
7
|
+
const is = innerSize ? Math.min(innerSize, size) : Math.round(size * 0.7);
|
|
8
|
+
return (_jsx(LogoWrapper, { className: classNames('bg-white d-if justify-content-center align-items-center', className), style: { height: `${size}px`, width: `${size}px` }, children: _jsx(LogoTitanSvg, { width: is, height: is, mantleFill: mantleFill }) }));
|
|
9
|
+
};
|
|
10
|
+
export const LogoTitanTitle = ({ className, children }) => (_jsx("div", { className: classNames(Styles.logoTextTitle, 'ff-display', className), children: children }));
|
|
11
|
+
export const LogoTitanDescription = ({ className, children }) => (_jsx("div", { className: classNames(Styles.logoTextDescription, 'ff-default', className), children: children }));
|
|
12
|
+
export const LogoTitanText = ({ className, description, logoWrapper, mantleFill, title, }) => (_jsxs("div", { className: classNames('d-f', Styles.container, className), children: [_jsx(LogoTitan, { className: Styles.logoWrapper, logoWrapper: logoWrapper, mantleFill: mantleFill }), _jsxs("div", { className: "d-if p-l-1 c-white flex-column justify-content-center align-items-start", children: [_jsx(LogoTitanTitle, { className: "t-truncate p-b-half", children: title }), _jsx(LogoTitanDescription, { className: "t-truncate", children: description })] })] }));
|
|
13
|
+
//# sourceMappingURL=logo-titan-text.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logo-titan-text.js","sourceRoot":"","sources":["../../../src/components/logo/logo-titan-text.tsx"],"names":[],"mappings":";AAAA,OAAO,UAAU,MAAM,YAAY,CAA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SAAS,EAAE,UAAU,CAAC,MAAM,CAAC,mBAAmB,EAAE,YAAY,EAAE,SAAS,CAAC,YAC1E,QAAQ,GACP,CACT,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAA2B,CAAC,EAClD,SAAS,EACT,WAAW,EACX,WAAW,EACX,UAAU,EACV,KAAK,GACR,EAAE,EAAE,CAAC,CACF,eAAK,SAAS,EAAE,UAAU,CAAC,KAAK,EAAE,MAAM,CAAC,SAAS,EAAE,SAAS,CAAC,aAC1D,KAAC,SAAS,IACN,SAAS,EAAE,MAAM,CAAC,WAAW,EAC7B,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,UAAU,GACxB,EACF,eAAK,SAAS,EAAC,yEAAyE,aACpF,KAAC,cAAc,IAAC,SAAS,EAAC,qBAAqB,YAAE,KAAK,GAAkB,EACxE,KAAC,oBAAoB,IAAC,SAAS,EAAC,YAAY,YAAE,WAAW,GAAwB,IAC/E,IACJ,CACT,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
@import (reference) '@servicetitan/tokens/core/tokens.less';
|
|
2
|
+
|
|
3
|
+
.logo-text-title {
|
|
4
|
+
font-weight: @font-weight-semibold;
|
|
5
|
+
font-size: 21px;
|
|
6
|
+
line-height: 24px;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.logo-text-description {
|
|
10
|
+
font-size: @typescale-1;
|
|
11
|
+
line-height: 16px;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.container {
|
|
15
|
+
height: 56px;
|
|
16
|
+
max-width: 200px;
|
|
17
|
+
|
|
18
|
+
.logo-wrapper {
|
|
19
|
+
height: 56px;
|
|
20
|
+
width: 56px;
|
|
21
|
+
|
|
22
|
+
svg {
|
|
23
|
+
fill: @color-black;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.logo-text-title,
|
|
28
|
+
.logo-text-description {
|
|
29
|
+
max-width: 140px;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logo-titan.d.ts","sourceRoot":"","sources":["../../../src/components/logo/logo-titan.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAE3B,MAAM,WAAW,iBAAiB;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB;AAGD,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CA4C9C,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/* tslint:disable: max-line-length */
|
|
3
|
+
export const LogoTitanSvg = props => {
|
|
4
|
+
var _a, _b, _c, _d;
|
|
5
|
+
const dimensions = {
|
|
6
|
+
width: (_a = props.width) !== null && _a !== void 0 ? _a : 116,
|
|
7
|
+
height: (_b = props.height) !== null && _b !== void 0 ? _b : 106,
|
|
8
|
+
};
|
|
9
|
+
const fill = (_c = props.fill) !== null && _c !== void 0 ? _c : '#3A3A3A';
|
|
10
|
+
const mantleFill = (_d = props.mantleFill) !== null && _d !== void 0 ? _d : fill;
|
|
11
|
+
return (_jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", xmlnsXlink: "http://www.w3.org/1999/xlink", ...dimensions, viewBox: "0 0 116 106", children: [_jsx("defs", { children: _jsx("path", { id: "a", d: "M0 .12h63.625V40H0z" }) }), _jsxs("g", { fill: "none", fillRule: "evenodd", children: [_jsx("path", { fill: mantleFill, d: "M10.33 96S17 98.545 17 101.089c0 0-.403 1.911-2.671 1.911C12.066 103 9 99.581 9 97.908 9 96.236 10.33 96 10.33 96" }), _jsx("g", { transform: "translate(0 66)", children: _jsx("path", { fill: mantleFill, d: "M3.733.453A.416.416 0 0 0 3.51.167a.403.403 0 0 0-.36-.01C1.968.677 0 2.1 0 5.058 0 15.962 29.34 17.19 45.224 36.706a8.92 8.92 0 0 0 7.085 3.293c3.607-.068 7.2-.258 10.388-.773a1.1 1.1 0 0 0 .84-.663c.15-.352.105-.757-.112-1.07C44.077 9.88 7.247 16.268 3.733.453" }) }), _jsx("path", { fill: fill, d: "M45 32.862c-1.712-1.879-6.568-.445-9.176 1.978-2.68 2.49-1.615 4.16-1.615 4.16 2.177-3.367 5.588-4.741 7.514-5.01 2.36-.328 3.277-1.128 3.277-1.128" }), _jsx("path", { fill: fill, d: "M105.301 37.812s-3.795.958-7.721-3.088c0 0 1.52.174 1.913-2.045 0 0 2.14 4.393 5.808 5.133m-1.397 18.16s-.596 4.407-6.07 4.407c-5.473 0-10.251-7.73-12.135-25.417 1.354 2.102 2.738 4.128 3.767 6.507.003-2.493 1.17-6.633-4.396-10.887 0 0 14.727 3.053 15.077 18.144 0 2.603-1.53 5.282-2.512 6.262 0 0-.674.577-.256 1.424.415.842 1.441.641 2.828-.29 1.389-.933 3.697-2.53 3.697-.15M83.19 64.374s-3.986 7.51-9.403 7.51c-2.21 0-3.79-1.577-3.79-3.756 0-2.182 2.681-9.984 14.331-9.984 2.783 0 4.963.508 4.963 2.184 0 1.677-2.644 4.559-6.1 4.046m0-37.55s-1.54-.301-1.045-2.59c.241-.777.415-.764.415-1.948s.311-2.563 1.255-2.969c0 0 1.618.003 1.618 4.222 0 1.83-2.244 3.286-2.244 3.286m-5.027 0c-2.25-.238-.649-3.865-2.267-4.086-.62-.086-.77 4.103-1.503 3.464-1.449-1.27-.378-3.862-.226-5.07.151-1.214.743-2.727-.567-1.816-1.31.911-2.008 2.83-2.455 4.467-.445 1.634.447 2.412 1.056 4.303.609 1.895-.522 1.243-.522 1.243-6.098-3.642-1.704-11.315-1.704-11.315 2.644-4.504 6.597-3.16 6.597-3.16.77.275.962.723.962 1.68s.259 1.262 1.394 1.53c1.136.27 1.673 1.658 1.673 3.91 0 2.252-1.434 4.956-2.438 4.85m9.368-.414l10.035 3.026s1.842 3.414-1.869 2.414c-3.712-1.003-7.336-2.134-7.336-2.134s-1.965-1-.83-3.306M38.182 41.47c-7.117 1.26-9.637-.916-9.637-2.753 0-5.601 16.175-9.942 20.728-10.011.917 1.382-.696 1.144-1.357 3.229-.658 2.082-2.269 2.743-4.622 3.028-2.356.285-4.826 1.5-6.38 2.924-1.44 1.322 0 1.93 2.938 1.087 2.873-.824 3.223.406 4.399-.03 1.173-.435.129-1.844.628-2.104.756-.394 2.327.673 2.327.673l4.092 2.595s-4.597 2.328-4.92 2.506c-.323.178-.872.483-.872 1.11 0 .99 2.547.628 3.42.628.874 0 1.008 1.424 1.008 1.424-1.337 1.538-4.818 1.55-4.818 1.55.775 1.637 5.156 1.372 6.043 1.401.882.033.974 1.273 1.422 3.296.45 2.028 3.287 2.89 3.287 2.89.92 3-2.706 3.872-5.106 3.872-14.063 0-12.58-17.315-12.58-17.315m1.6-22.275a.437.437 0 0 1-.385-.373C38.64 13.21 41.11 6.368 41.11 6.368s-5.997 4.821-5.763 12.524c-5.09-.126-12.575.424-16.988 4.182-6.188 5.265-7.204 15.201-7.366 17.81a.419.419 0 0 1-.631.33c-1.459-.876-4.898-3.776-2.425-10.632C11.023 22.032 20.546 4.298 39.539 3.1c0 0 5.813-.243 9.737 1.835a.432.432 0 0 1 .23.341.438.438 0 0 1-.163.38c-1.628 1.29-6.688 5.803-8.502 13.28a.44.44 0 0 1-.48.33c-.15-.022-.345-.044-.578-.072m14.12 23.535s1.754 7.649 5.283 10.355c0 0-.132.773-1.245.773-1.11 0-3.208-1.773-4.038-5.906-.83-4.135 0-5.222 0-5.222m5.283-19.013c-4.453 0-6.419-3.771-6.419-3.771s5.107 4.816 12.204.896c0 0-1.33 2.875-5.785 2.875m54.718 6.38c-1.125-2.282-2.882-4.117-6.24-4.94-3.265-.801-6.145-.39-8.12 1.328l-6.541-2.214c-.741-1.6-1.357-3.06-1.8-4.32a4.647 4.647 0 0 0-2.1-2.509c-4.279-2.431-15.872-8.208-20.362-2.305 0 0-.236.263-.554.733l-1.402-.475c-.725-2.514-3.116-4.442-6.431-5.255-2.04-.5-4.048-.373-5.713.238-1.21.446-1.268 1.857-.05 2.283l5.216 1.822a2.261 2.261 0 0 1 1.394 2.885l-.007.017a2.273 2.273 0 0 1-2.895 1.39s-3.323-.981-5.651-1.672c-1.233-.366-2.359.78-1.988 2.003.748 2.491 3.208 4.697 6.496 5.502 2.79.681 5.524.196 7.4-1.104l1.228.413c.092 2.83 2.284 6.21 4.336 7.426 3.144 1.86 6.026.206 9.3-1.387 0 0 8.195 6.527 4.395 25.033-10.492 1.1-14.289 4.86-18.096 8.657-2.386-.944-9.597-1.407-13.437-.523 1.089-1.084 2.893-2.364 5.107-3.219a2.601 2.601 0 0 0 1.668-2.424s4.803-1.53 4.803-3.29c0-1.758-5.931-1.578-8.37-14.22-.394-1.469-.842-2.7-3.108-3.757 0 0-.631-1.324.283-2.773.917-1.448 1.588-2.12 1.345-3.268-.241-1.15-1.939-2.095-1.939-2.095v-1.924s-4.856-3.526-4.856-8.572c0-5.046 6.583-11.11 8.378-12.868a.452.452 0 0 0 .134-.394.492.492 0 0 0-.241-.339C53.17 2.545 48.577 0 41.515 0 13.618 0 7.089 24.934 1.11 37.047c-.131.27-.154.582-.02.85C7.06 49.753 16.697 48.79 17.223 58.734c.423 7.955-1.443 8.131-3.302 7.963-1.22-.112-3.007-1.196-4.093-1.932a.423.423 0 0 0-.492.013c-.144.109-.201.297-.144.468.728 2.169 2.877 6.638 9.04 6.638 3.134 0 4.13-2.833 4.13-5.442v-8.99c0-.887-.293-1.727-.969-2.304-2.12-1.817-6.637-6.182-6.637-10.057 0-1.654 1.106-2.514 2.395-2.514 2.426 0 4.77 3.628 6.59 8.204.423 1.07 1.032 1.827 1.589 2.196a.26.26 0 0 0 .288-.005.25.25 0 0 0 .094-.268c-.75-2.659-.999-5.432-1.078-6.799a1.997 1.997 0 0 0-.696-1.394c-1.8-1.53-6.667-6.339-6.667-13.524 0-9.681 15.469-8.872 18.59-8.607.927 3.226 2.866 4.625 4.158 5.215-4.677 1.718-15.241 5.17-15.241 11.127 0 6.388 10.586 5.923 10.586 5.923s-1.68 12.754 10.244 16.6c0 0-1.864 1.876-8.268 1.876-5.977 0-8.894-2.659-10.316-5.796a.36.36 0 0 0-.664.015c-.325.812-.583 2.285.548 4.127 1.757 2.855 4.023 4.494 4.023 8.124 0 2.684-2.416 4.368-3.407 4.945a.178.178 0 0 0-.09.183.18.18 0 0 0 .14.151c2.345.567 13.031 3.241 20.225 6.641.058.03.125.025.18-.007.805-.506 7.027-4.556 7.382-9.897 0 0 .473-3.492-4.76-4.123 0 0 2.263-.871 6.36-.871 4.084 0 8.542 3.3.515 19.744a.183.183 0 0 0 .065.235c1.232.775 10.367 6.579 16.21 12.227a.645.645 0 0 0 .964-.077c.755-.993 2.214-3.657 3.29-10.216a1.59 1.59 0 0 1 1.13-1.268c3.487-1.003 15.433-4.86 20.662-12.029 6.16-8.44 8.295-9.35 8.295-9.35s4.03-2.248 2.326-8.198c-.892-3.105-5.584-11.253-10.201-19.593a10.952 10.952 0 0 0 3.757 1.704c2.808.686 5.557.255 7.527-.968a1.323 1.323 0 1 0-.263-2.372l-5.196-1.815a2.394 2.394 0 0 1-1.474-3.053l.007-.02a2.407 2.407 0 0 1 3.064-1.468l4.638 1.621c.462.161.979.045 1.327-.302.345-.346.517-.879.3-1.32" }), _jsx("path", { fill: mantleFill, d: "M44.151 45s-2.766.605-2.025 3.75C42.868 51.914 46 52 46 52c-2.723-2.607-1.849-7-1.849-7M8.875 84.576c7.098 4.115 22.77 8.899 26.046 17.51 0 0 1.12 1.914-5.066 1.914-4.685 0-5.949-1.166-9.277-5.101C15.69 93.119 6 89.753 6 85.29c0 0 .064-2.343 2.875-.714" })] })] }));
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=logo-titan.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logo-titan.js","sourceRoot":"","sources":["../../../src/components/logo/logo-titan.tsx"],"names":[],"mappings":";AASA,qCAAqC;AACrC,MAAM,CAAC,MAAM,YAAY,GAA0B,KAAK,CAAC,EAAE;;IACvD,MAAM,UAAU,GAAG;QACf,KAAK,EAAE,MAAA,KAAK,CAAC,KAAK,mCAAI,GAAG;QACzB,MAAM,EAAE,MAAA,KAAK,CAAC,MAAM,mCAAI,GAAG;KAC9B,CAAC;IACF,MAAM,IAAI,GAAG,MAAA,KAAK,CAAC,IAAI,mCAAI,SAAS,CAAC;IACrC,MAAM,UAAU,GAAG,MAAA,KAAK,CAAC,UAAU,mCAAI,IAAI,CAAC;IAE5C,OAAO,CACH,eACI,KAAK,EAAC,4BAA4B,EAClC,UAAU,EAAC,8BAA8B,KACrC,UAAU,EACd,OAAO,EAAC,aAAa,aAErB,yBACI,eAAM,EAAE,EAAC,GAAG,EAAC,CAAC,EAAC,qBAAqB,GAAG,GACpC,EACP,aAAG,IAAI,EAAC,MAAM,EAAC,QAAQ,EAAC,SAAS,aAC7B,eACI,IAAI,EAAE,UAAU,EAChB,CAAC,EAAC,mHAAmH,GACvH,EACF,YAAG,SAAS,EAAC,iBAAiB,YAC1B,eACI,IAAI,EAAE,UAAU,EAChB,CAAC,EAAC,wQAAwQ,GAC5Q,GACF,EACJ,eACI,IAAI,EAAE,IAAI,EACV,CAAC,EAAC,qJAAqJ,GACzJ,EACF,eACI,IAAI,EAAE,IAAI,EACV,CAAC,EAAC,klKAAklK,GACtlK,EACF,eACI,IAAI,EAAE,UAAU,EAChB,CAAC,EAAC,8PAA8P,GAClQ,IACF,IACF,CACT,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: FC<import("./logo-titan-text").LogoTitanProps>;
|
|
5
|
+
parameters: {};
|
|
6
|
+
};
|
|
7
|
+
export default _default;
|
|
8
|
+
export declare const Titan: () => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare const TitanBlueMantle: () => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare const CompanyTitle: () => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare const TitanText: () => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare const TitanTextWithLink: () => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare const TitanWithText: () => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
//# sourceMappingURL=logo.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logo.stories.d.ts","sourceRoot":"","sources":["../../../src/components/logo/logo.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAa,MAAM,OAAO,CAAC;;;;;;AAKtC,wBAIE;AAEF,eAAO,MAAM,KAAK,+CAAyB,CAAC;AAC5C,eAAO,MAAM,eAAe,+CAA8C,CAAC;AAC3E,eAAO,MAAM,YAAY,+CAA6B,CAAC;AACvD,eAAO,MAAM,SAAS,+CAOrB,CAAC;AAcF,eAAO,MAAM,iBAAiB,+CAQ7B,CAAC;AAEF,eAAO,MAAM,aAAa,+CAMzB,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Stack, Tag } from '@servicetitan/design-system';
|
|
3
|
+
import { LogoCompanyTitle } from './logo-company-title';
|
|
4
|
+
import { LogoTitanSvg } from './logo-titan';
|
|
5
|
+
import { LogoTitan, LogoTitanText, LogoTitanTitle } from './logo-titan-text';
|
|
6
|
+
export default {
|
|
7
|
+
title: 'Navigation/Logo',
|
|
8
|
+
component: LogoTitan,
|
|
9
|
+
parameters: {},
|
|
10
|
+
};
|
|
11
|
+
export const Titan = () => _jsx(LogoTitanSvg, {});
|
|
12
|
+
export const TitanBlueMantle = () => _jsx(LogoTitanSvg, { mantleFill: "#2270EE" });
|
|
13
|
+
export const CompanyTitle = () => _jsx(LogoCompanyTitle, {});
|
|
14
|
+
export const TitanText = () => (_jsx(LogoTitanText, { className: "bg-neutral-300 border", mantleFill: "#2270EE", title: "Widgets", description: "tenant tenant tenant tenant tenant" }));
|
|
15
|
+
const NavLinkMock = ({ className, children }) => (_jsx("a", { href: "/", onClick: e => {
|
|
16
|
+
e.preventDefault();
|
|
17
|
+
}, className: className, children: children }));
|
|
18
|
+
export const TitanTextWithLink = () => (_jsx(LogoTitanText, { className: "bg-neutral-300 border", mantleFill: "#2270EE", title: "Commercial", description: "tenant tenant tenant tenant tenant", logoWrapper: NavLinkMock }));
|
|
19
|
+
export const TitanWithText = () => (_jsxs(Stack, { className: "border bg-neutral-300", alignItems: "center", children: [_jsx(LogoTitan, { className: "border-left m-r-1", mantleFill: "#2270EE" }), _jsx(LogoTitanTitle, { className: "m-x-1 p-b-half c-white", children: "Contact Center" }), _jsx(Tag, { color: "info", children: "pro" })] }));
|
|
20
|
+
//# sourceMappingURL=logo.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logo.stories.js","sourceRoot":"","sources":["../../../src/components/logo/logo.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,6BAA6B,CAAC;AAEzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAE7E,eAAe;IACX,KAAK,EAAE,iBAAiB;IACxB,SAAS,EAAE,SAAS;IACpB,UAAU,EAAE,EAAE;CACjB,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG,GAAG,EAAE,CAAC,KAAC,YAAY,KAAG,CAAC;AAC5C,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,EAAE,CAA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|
|
5
|
+
decorators: ((Story: any) => import("react/jsx-runtime").JSX.Element)[];
|
|
6
|
+
};
|
|
7
|
+
export default _default;
|
|
8
|
+
export { ProfileDropdownDefault, ProfileDropdownWithBothBadges, ProfileDropdownWithCounter, ProfileDropdownWithErrorLogo, ProfileDropdownWithInfo, ProfileDropdownWithHintAndInfoPopup, ProfileDropdownWithHintPopup, ProfileDropdownWithLogo, } from './profile-dropdown.stories';
|
|
9
|
+
//# sourceMappingURL=profile-dropdown-stacked.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profile-dropdown-stacked.stories.d.ts","sourceRoot":"","sources":["../../../src/components/profile-dropdown/profile-dropdown-stacked.stories.tsx"],"names":[],"mappings":";;;;;;AAMA,wBAKE;AAEF,OAAO,EACH,sBAAsB,EACtB,6BAA6B,EAC7B,0BAA0B,EAC1B,4BAA4B,EAC5B,uBAAuB,EACvB,mCAAmC,EACnC,4BAA4B,EAC5B,uBAAuB,GAC1B,MAAM,4BAA4B,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { withAnvil, withMemoryRouter } from '../../test/data';
|
|
3
|
+
import { HeaderNavigationStacked } from '../header-navigation';
|
|
4
|
+
import { ProfileDropdown } from './profile-dropdown';
|
|
5
|
+
const withHeaderNavigationStacked = (Story) => _jsx(HeaderNavigationStacked, { right: _jsx(Story, {}) });
|
|
6
|
+
export default {
|
|
7
|
+
title: 'Navigation/ProfileDropdown/Stacked',
|
|
8
|
+
component: ProfileDropdown,
|
|
9
|
+
parameters: {},
|
|
10
|
+
decorators: [withMemoryRouter, withAnvil, withHeaderNavigationStacked],
|
|
11
|
+
};
|
|
12
|
+
export { ProfileDropdownDefault, ProfileDropdownWithBothBadges, ProfileDropdownWithCounter, ProfileDropdownWithErrorLogo, ProfileDropdownWithInfo, ProfileDropdownWithHintAndInfoPopup, ProfileDropdownWithHintPopup, ProfileDropdownWithLogo, } from './profile-dropdown.stories';
|
|
13
|
+
//# sourceMappingURL=profile-dropdown-stacked.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profile-dropdown-stacked.stories.js","sourceRoot":"","sources":["../../../src/components/profile-dropdown/profile-dropdown-stacked.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,MAAM,2BAA2B,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,KAAC,uBAAuB,IAAC,KAAK,EAAE,KAAC,KAAK,KAAG,GAAI,CAAC;AAElG,eAAe;IACX,KAAK,EAAE,oCAAoC;IAC3C,SAAS,EAAE,eAAe;IAC1B,UAAU,EAAE,EAAE;IACd,UAAU,EAAE,CAAC,gBAAgB,EAAE,SAAS,EAAE,2BAA2B,CAAC;CACzE,CAAC;AAEF,OAAO,EACH,sBAAsB,EACtB,6BAA6B,EAC7B,0BAA0B,EAC1B,4BAA4B,EAC5B,uBAAuB,EACvB,mCAAmC,EACnC,4BAA4B,EAC5B,uBAAuB,GAC1B,MAAM,4BAA4B,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
title: string;
|
|
3
|
+
component: import("./profile-dropdown").ProfileDropdownType;
|
|
4
|
+
parameters: {};
|
|
5
|
+
decorators: ((Story: any) => import("react/jsx-runtime").JSX.Element)[];
|
|
6
|
+
};
|
|
7
|
+
export default _default;
|
|
8
|
+
export { ProfileDropdownDefault, ProfileDropdownWithBothBadges, ProfileDropdownWithCounter, ProfileDropdownWithErrorLogo, ProfileDropdownWithInfo, ProfileDropdownWithHintAndInfoPopup, ProfileDropdownWithHintPopup, ProfileDropdownWithLogo, } from './profile-dropdown.stories';
|
|
9
|
+
//# sourceMappingURL=profile-dropdown-tiny.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profile-dropdown-tiny.stories.d.ts","sourceRoot":"","sources":["../../../src/components/profile-dropdown/profile-dropdown-tiny.stories.tsx"],"names":[],"mappings":";;;;;;AAQA,wBAKE;AAEF,OAAO,EACH,sBAAsB,EACtB,6BAA6B,EAC7B,0BAA0B,EAC1B,4BAA4B,EAC5B,uBAAuB,EACvB,mCAAmC,EACnC,4BAA4B,EAC5B,uBAAuB,GAC1B,MAAM,4BAA4B,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { withAnvil, withMemoryRouter } from '../../test/data';
|
|
3
|
+
import { HeaderNavigationTiny } from '../left-navigation';
|
|
4
|
+
import { ProfileDropdown } from './profile-dropdown';
|
|
5
|
+
const withHeaderNavigationTiny = (Story) => (_jsx(HeaderNavigationTiny, { className: "border", right: _jsx(Story, {}) }));
|
|
6
|
+
export default {
|
|
7
|
+
title: 'Navigation/ProfileDropdown/Tiny',
|
|
8
|
+
component: ProfileDropdown,
|
|
9
|
+
parameters: {},
|
|
10
|
+
decorators: [withMemoryRouter, withAnvil, withHeaderNavigationTiny],
|
|
11
|
+
};
|
|
12
|
+
export { ProfileDropdownDefault, ProfileDropdownWithBothBadges, ProfileDropdownWithCounter, ProfileDropdownWithErrorLogo, ProfileDropdownWithInfo, ProfileDropdownWithHintAndInfoPopup, ProfileDropdownWithHintPopup, ProfileDropdownWithLogo, } from './profile-dropdown.stories';
|
|
13
|
+
//# sourceMappingURL=profile-dropdown-tiny.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profile-dropdown-tiny.stories.js","sourceRoot":"","sources":["../../../src/components/profile-dropdown/profile-dropdown-tiny.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAC9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,MAAM,wBAAwB,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,CAC7C,KAAC,oBAAoB,IAAC,SAAS,EAAC,QAAQ,EAAC,KAAK,EAAE,KAAC,KAAK,KAAG,GAAI,CAChE,CAAC;AAEF,eAAe;IACX,KAAK,EAAE,iCAAiC;IACxC,SAAS,EAAE,eAAe;IAC1B,UAAU,EAAE,EAAE;IACd,UAAU,EAAE,CAAC,gBAAgB,EAAE,SAAS,EAAE,wBAAwB,CAAC;CACtE,CAAC;AAEF,OAAO,EACH,sBAAsB,EACtB,6BAA6B,EAC7B,0BAA0B,EAC1B,4BAA4B,EAC5B,uBAAuB,EACvB,mCAAmC,EACnC,4BAA4B,EAC5B,uBAAuB,GAC1B,MAAM,4BAA4B,CAAC"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { PopoverPropsStrict } from '@servicetitan/design-system';
|
|
2
|
+
import { ComponentPropsWithoutRef, FC, HTMLAttributeAnchorTarget, MouseEvent, ReactNode } from 'react';
|
|
3
|
+
import { CounterTagData, CounterTagValue } from '../../utils/counter-tag';
|
|
4
|
+
export interface ProfileDropdownTriggerProps {
|
|
5
|
+
className?: string;
|
|
6
|
+
info?: {
|
|
7
|
+
title: string;
|
|
8
|
+
text: string;
|
|
9
|
+
};
|
|
10
|
+
imageSrc?: string | null;
|
|
11
|
+
avatarBadge?: boolean | string;
|
|
12
|
+
badge?: {
|
|
13
|
+
content?: number | string;
|
|
14
|
+
className: string;
|
|
15
|
+
};
|
|
16
|
+
hintArrow?: boolean;
|
|
17
|
+
open: boolean;
|
|
18
|
+
onClick?(e: MouseEvent): void;
|
|
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
|
+
};
|
|
28
|
+
export interface ProfileDropdownSectionPropsStrict {
|
|
29
|
+
children: ReactNode;
|
|
30
|
+
id: string;
|
|
31
|
+
tooltip?: string;
|
|
32
|
+
className?: string;
|
|
33
|
+
onClick?(e: MouseEvent): void;
|
|
34
|
+
}
|
|
35
|
+
export type ProfileDropdownSectionProps = Omit<ComponentPropsWithoutRef<'div'>, 'children'> & ProfileDropdownSectionPropsStrict & ProfileItemContent;
|
|
36
|
+
export declare const ProfileDropdownSection: FC<ProfileDropdownSectionProps>;
|
|
37
|
+
export declare const ProfileDropdownDivider: FC;
|
|
38
|
+
export interface ProfileDropdownLinkPropsStrict {
|
|
39
|
+
id: string;
|
|
40
|
+
children: ReactNode;
|
|
41
|
+
className?: string;
|
|
42
|
+
external?: boolean;
|
|
43
|
+
target?: HTMLAttributeAnchorTarget;
|
|
44
|
+
tooltip?: string;
|
|
45
|
+
to: string;
|
|
46
|
+
tag?: CounterTagData;
|
|
47
|
+
counter?: CounterTagValue;
|
|
48
|
+
}
|
|
49
|
+
export type ProfileDropdownLinkProps = Omit<ComponentPropsWithoutRef<'a'>, 'children'> & ProfileDropdownLinkPropsStrict & ProfileItemContent;
|
|
50
|
+
export declare const ProfileDropdownLink: FC<ProfileDropdownLinkProps>;
|
|
51
|
+
export interface ProfileDropdownPropsStrict {
|
|
52
|
+
children?: ReactNode;
|
|
53
|
+
className?: string;
|
|
54
|
+
direction?: PopoverPropsStrict['direction'];
|
|
55
|
+
trigger?: Omit<ProfileDropdownTriggerProps, 'onClick' | 'open' | 'hintArrow'>;
|
|
56
|
+
hintPopup?: {
|
|
57
|
+
className?: string;
|
|
58
|
+
content: FC<{
|
|
59
|
+
openProfile(): void;
|
|
60
|
+
}>;
|
|
61
|
+
width?: PopoverPropsStrict['width'];
|
|
62
|
+
onClose?: () => void;
|
|
63
|
+
};
|
|
64
|
+
portal?: boolean;
|
|
65
|
+
width?: PopoverPropsStrict['width'];
|
|
66
|
+
onClose?(): void;
|
|
67
|
+
onOpen?(): void;
|
|
68
|
+
}
|
|
69
|
+
export interface ProfileDropdownProps extends ProfileDropdownPropsStrict {
|
|
70
|
+
[key: string]: any;
|
|
71
|
+
}
|
|
72
|
+
export interface ProfileDropdownType extends FC<ProfileDropdownProps> {
|
|
73
|
+
Divider: typeof ProfileDropdownDivider;
|
|
74
|
+
Link: typeof ProfileDropdownLink;
|
|
75
|
+
Trigger: typeof ProfileDropdownTrigger;
|
|
76
|
+
Section: typeof ProfileDropdownSection;
|
|
77
|
+
}
|
|
78
|
+
export declare const ProfileDropdown: ProfileDropdownType;
|
|
79
|
+
export {};
|
|
80
|
+
//# sourceMappingURL=profile-dropdown.d.ts.map
|
|
@@ -0,0 +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,wBAAwB,EACxB,EAAE,EACF,yBAAyB,EACzB,UAAU,EAEV,SAAS,EAMZ,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAW1E,MAAM,WAAW,2BAA2B;IACxC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IACvC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,WAAW,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC/B,KAAK,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE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x as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Icon } from '@servicetitan/anvil2';
|
|
3
|
+
import SvgExpandLess from '@servicetitan/anvil2/assets/icons/material/round/expand_less.svg';
|
|
4
|
+
import SvgExpandMore from '@servicetitan/anvil2/assets/icons/material/round/expand_more.svg';
|
|
5
|
+
import SvgAccountActive from '@servicetitan/anvil2/assets/icons/st/gnav_account_active.svg';
|
|
6
|
+
import SvgAccountInactive from '@servicetitan/anvil2/assets/icons/st/gnav_account_inactive.svg';
|
|
7
|
+
import { BodyText, Popover } from '@servicetitan/design-system';
|
|
8
|
+
import classNames from 'classnames';
|
|
9
|
+
import { useCallback, useContext, useEffect, useMemo, useState, } from 'react';
|
|
10
|
+
import { NavigationComponentContext, NavigationLegacyContext, } from '../../utils/navigation-context';
|
|
11
|
+
import { getCounterTag } from '../../utils/side-nav';
|
|
12
|
+
import { CounterTag } from '../counter-tag';
|
|
13
|
+
import { withTooltip } from '../titan-layout/with-tooltip';
|
|
14
|
+
import * as Styles from './profile-dropdown.module.less';
|
|
15
|
+
import { ProfileLogo } from './profile-icon';
|
|
16
|
+
const ProfileDropdownTrigger = ({ avatarBadge, badge, className, hintArrow, imageSrc, info, onClick, open, }) => {
|
|
17
|
+
const [avatarSource, setAvatarSource] = useState(imageSrc !== null && imageSrc !== void 0 ? imageSrc : '');
|
|
18
|
+
const [avatarSourceError, setAvatarSourceError] = useState(false);
|
|
19
|
+
const isLegacy = useContext(NavigationLegacyContext);
|
|
20
|
+
useEffect(() => {
|
|
21
|
+
const src = imageSrc !== null && imageSrc !== void 0 ? imageSrc : '';
|
|
22
|
+
if (src === avatarSource) {
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
setAvatarSource(src);
|
|
26
|
+
setAvatarSourceError(false);
|
|
27
|
+
}, [imageSrc, avatarSource]);
|
|
28
|
+
const onAvatarError = useCallback(() => {
|
|
29
|
+
setAvatarSourceError(true);
|
|
30
|
+
}, []);
|
|
31
|
+
return (_jsxs("div", { className: classNames('d-f align-items-center cursor-pointer position-relative p-x-1 p-y-half', 'profile-dropdown-trigger', Styles.triggerContainer, {
|
|
32
|
+
[Styles.triggerContainerHintArrow]: hintArrow,
|
|
33
|
+
[Styles.triggerContainerLegacy]: isLegacy,
|
|
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 }))] }));
|
|
35
|
+
};
|
|
36
|
+
export const ProfileDropdownSection = ({ children, className, id, text, tooltip, onClick, ...rest }) => {
|
|
37
|
+
const clickHandler = e => {
|
|
38
|
+
if (onClick) {
|
|
39
|
+
onClick(e);
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
e.stopPropagation();
|
|
43
|
+
}
|
|
44
|
+
};
|
|
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');
|
|
48
|
+
};
|
|
49
|
+
export const ProfileDropdownDivider = Popover.Divider;
|
|
50
|
+
export const ProfileDropdownLink = ({ children, className, external, id, counter, tag, target, text, to, tooltip, onClick, ...rest }) => {
|
|
51
|
+
const NavigationComponent = useContext(NavigationComponentContext);
|
|
52
|
+
const isExternalLink = external !== null && external !== void 0 ? external : to === null || to === void 0 ? void 0 : to.startsWith('http');
|
|
53
|
+
const tagElement = useMemo(() => _jsx(CounterTag, { data: getCounterTag(counter, tag), className: Styles.counter }), [counter, tag]);
|
|
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');
|
|
55
|
+
};
|
|
56
|
+
export const ProfileDropdown = (({ children, className, direction, hintPopup, onClose, onOpen, portal, trigger, width, }) => {
|
|
57
|
+
var _a;
|
|
58
|
+
const [open, setOpen] = useState(false);
|
|
59
|
+
const handleClose = useCallback(() => {
|
|
60
|
+
setOpen(false);
|
|
61
|
+
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
62
|
+
}, [onClose]);
|
|
63
|
+
const handleOpen = useCallback(() => {
|
|
64
|
+
setOpen(true);
|
|
65
|
+
onOpen === null || onOpen === void 0 ? void 0 : onOpen();
|
|
66
|
+
}, [onOpen]);
|
|
67
|
+
const onTriggerClick = useCallback((e) => {
|
|
68
|
+
e.stopPropagation();
|
|
69
|
+
setOpen(!open);
|
|
70
|
+
if (open) {
|
|
71
|
+
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
onOpen === null || onOpen === void 0 ? void 0 : onOpen();
|
|
75
|
+
}
|
|
76
|
+
}, [open, onOpen, onClose]);
|
|
77
|
+
const hintShown = !!hintPopup && !open;
|
|
78
|
+
const HintComponent = hintPopup === null || hintPopup === void 0 ? void 0 : hintPopup.content;
|
|
79
|
+
const triggerElement = (_jsx(ProfileDropdownTrigger, { ...trigger, onClick: children ? onTriggerClick : undefined, hintArrow: hintShown, open: open }));
|
|
80
|
+
return (_jsx("div", { className: className, "data-cy": "profile-dropdown", children: !!hintPopup && hintShown && HintComponent ? (_jsx(Popover, { direction: direction !== null && direction !== void 0 ? direction : 'bl', width: (_a = hintPopup.width) !== null && _a !== void 0 ? _a : 'xs', trigger: triggerElement, popoverContentClassName: Styles.hint, onClickOutside: hintPopup === null || hintPopup === void 0 ? void 0 : hintPopup.onClose, open: true, children: _jsx("div", { className: classNames(Styles.hintContent, hintPopup.className), children: _jsx(HintComponent, { openProfile: handleOpen }) }) })) : (_jsx(Popover, { direction: direction !== null && direction !== void 0 ? direction : 'bl', width: width !== null && width !== void 0 ? width : 'xs', trigger: triggerElement, open: open, portal: portal, onClickOutside: handleClose, className: Styles.dropdown, popoverContentClassName: classNames(Styles.dropdownContent, Styles.dropdownContentBottomLeft), children: _jsx("div", { className: Styles.dropdownContentWrapper, onClick: handleClose, "data-cy": "profile-dropdown-content", children: children }) })) }));
|
|
81
|
+
});
|
|
82
|
+
ProfileDropdown.Divider = ProfileDropdownDivider;
|
|
83
|
+
ProfileDropdown.Link = ProfileDropdownLink;
|
|
84
|
+
ProfileDropdown.Section = ProfileDropdownSection;
|
|
85
|
+
//# sourceMappingURL=profile-dropdown.js.map
|
|
@@ -0,0 +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,k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