@servicetitan/navigation 0.1.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.
Files changed (47) hide show
  1. package/dist/components/header-navigation/header-navigation.d.ts +15 -0
  2. package/dist/components/header-navigation/header-navigation.d.ts.map +1 -0
  3. package/dist/components/header-navigation/header-navigation.js +72 -0
  4. package/dist/components/header-navigation/header-navigation.js.map +1 -0
  5. package/dist/components/header-navigation/header-navigation.module.less +116 -0
  6. package/dist/components/header-navigation/header-navigation.stories.d.ts +10 -0
  7. package/dist/components/header-navigation/header-navigation.stories.d.ts.map +1 -0
  8. package/dist/components/header-navigation/header-navigation.stories.js +38 -0
  9. package/dist/components/header-navigation/header-navigation.stories.js.map +1 -0
  10. package/dist/components/logo/logo-company-title.d.ts +6 -0
  11. package/dist/components/logo/logo-company-title.d.ts.map +1 -0
  12. package/dist/components/logo/logo-company-title.js +6 -0
  13. package/dist/components/logo/logo-company-title.js.map +1 -0
  14. package/dist/components/logo/logo-titan-text.d.ts +9 -0
  15. package/dist/components/logo/logo-titan-text.d.ts.map +1 -0
  16. package/dist/components/logo/logo-titan-text.js +6 -0
  17. package/dist/components/logo/logo-titan-text.js.map +1 -0
  18. package/dist/components/logo/logo-titan-text.module.less +25 -0
  19. package/dist/components/logo/logo-titan.d.ts +9 -0
  20. package/dist/components/logo/logo-titan.d.ts.map +1 -0
  21. package/dist/components/logo/logo-titan.js +13 -0
  22. package/dist/components/logo/logo-titan.js.map +1 -0
  23. package/dist/components/logo/logo.stories.d.ts +12 -0
  24. package/dist/components/logo/logo.stories.d.ts.map +1 -0
  25. package/dist/components/logo/logo.stories.js +14 -0
  26. package/dist/components/logo/logo.stories.js.map +1 -0
  27. package/dist/index.d.ts +2 -0
  28. package/dist/index.d.ts.map +1 -0
  29. package/dist/index.js +2 -0
  30. package/dist/index.js.map +1 -0
  31. package/dist/utils/navigation.d.ts +38 -0
  32. package/dist/utils/navigation.d.ts.map +1 -0
  33. package/dist/utils/navigation.js +2 -0
  34. package/dist/utils/navigation.js.map +1 -0
  35. package/package.json +47 -0
  36. package/src/components/header-navigation/header-navigation.module.less +116 -0
  37. package/src/components/header-navigation/header-navigation.module.less.d.ts +9 -0
  38. package/src/components/header-navigation/header-navigation.stories.tsx +80 -0
  39. package/src/components/header-navigation/header-navigation.tsx +204 -0
  40. package/src/components/logo/logo-company-title.tsx +25 -0
  41. package/src/components/logo/logo-titan-text.module.less +25 -0
  42. package/src/components/logo/logo-titan-text.module.less.d.ts +6 -0
  43. package/src/components/logo/logo-titan-text.tsx +35 -0
  44. package/src/components/logo/logo-titan.tsx +59 -0
  45. package/src/components/logo/logo.stories.tsx +21 -0
  46. package/src/index.ts +1 -0
  47. package/src/utils/navigation.ts +50 -0
@@ -0,0 +1,15 @@
1
+ import { FC, ReactElement, ReactNode } from 'react';
2
+ import { HeaderNavigationComponentProps, HeaderNavigationLinkData } from '../../utils/navigation';
3
+ export interface HeaderNavigationProps {
4
+ children?: ReactNode;
5
+ className?: string;
6
+ contentClassName?: string;
7
+ id?: string;
8
+ left?: ReactElement;
9
+ leftClassName?: string;
10
+ items?: HeaderNavigationLinkData[];
11
+ itemsOverflow?: HeaderNavigationLinkData[];
12
+ navigationComponent?: FC<HeaderNavigationComponentProps>;
13
+ }
14
+ export declare const HeaderNavigation: FC<HeaderNavigationProps>;
15
+ //# sourceMappingURL=header-navigation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"header-navigation.d.ts","sourceRoot":"","sources":["../../../src/components/header-navigation/header-navigation.tsx"],"names":[],"mappings":"AAEA,OAAO,EACH,EAAE,EACF,YAAY,EACZ,SAAS,EAMZ,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,8BAA8B,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AA6FlG,MAAM,WAAW,qBAAqB;IAClC,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE,wBAAwB,EAAE,CAAC;IACnC,aAAa,CAAC,EAAE,wBAAwB,EAAE,CAAC;IAC3C,mBAAmB,CAAC,EAAE,EAAE,CAAC,8BAA8B,CAAC,CAAC;CAC5D;AAED,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,CAqFtD,CAAC"}
@@ -0,0 +1,72 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
12
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
+ import { Icon, Popover, Tag } from '@servicetitan/design-system';
14
+ import classNames from 'classnames';
15
+ import { useCallback, useEffect, useLayoutEffect, useRef, useState, } from 'react';
16
+ import { NavLink } from 'react-router-dom';
17
+ import * as Styles from './header-navigation.module.less';
18
+ function useForceUpdate() {
19
+ const [, setTick] = useState(0);
20
+ return useCallback(() => {
21
+ setTick(tick => tick + 1);
22
+ }, []);
23
+ }
24
+ const DefaultNavigationComponent = props => (_jsx(NavLink, Object.assign({}, props, { isActive: props.isActive && ((_, { pathname }) => props.isActive(pathname)) })));
25
+ const HeaderNavigationLink = (_a) => {
26
+ var _b = _a.item, { iconComponent: IconComponent } = _b, item = __rest(_b, ["iconComponent"]), { navigationComponent: NavigationComponent = DefaultNavigationComponent } = _a;
27
+ return (_jsxs(NavigationComponent, Object.assign({ to: item.to, title: item.hint, className: classNames(Styles.link, item.className, {
28
+ [Styles.active]: item.isActive === true,
29
+ }), isActive: typeof item.isActive === 'function' ? item.isActive : undefined, activeClassName: Styles.active, "data-cy": `nav-item-${item.key}` }, { children: [IconComponent ? (_jsx("i", Object.assign({ className: Styles.icon }, { children: _jsx(IconComponent, {}) }))) : item.iconName ? (_jsx(Icon, { name: item.iconName, size: 20, className: Styles.icon })) : (_jsx("i", { className: classNames(Styles.icon, item.iconClassName) })), _jsx("ins", { children: item.title }), !!item.counter && (_jsx(Tag, Object.assign({ className: Styles.counter, compact: true, badge: true, color: "critical" }, { children: item.counter })))] }), item.key));
30
+ };
31
+ const HeaderNavigationOverflow = ({ items, navigationComponent }) => {
32
+ const [isOpen, setIsOpen] = useState(false);
33
+ return (_jsx(Popover, Object.assign({ open: isOpen, trigger: _jsx(Icon, { name: "more_vert", size: "24px", className: "c-pointer", onClick: () => setIsOpen(true), color: "white" }), direction: "bl", width: "xs", onClickOutside: () => setIsOpen(false), wrapperClassName: "d-if-i align-items-center", popoverContentClassName: Styles.overflowPopover, portal: true }, { children: _jsx("div", Object.assign({ onClick: () => setIsOpen(false) }, { children: items.map(item => (_jsx(HeaderNavigationLink, { item: item, navigationComponent: navigationComponent }, item.key))) })) })));
34
+ };
35
+ export const HeaderNavigation = ({ children, className, contentClassName, id, items, itemsOverflow, left, leftClassName, navigationComponent, }) => {
36
+ const leftRef = useRef(null);
37
+ const rightRef = useRef(null);
38
+ const centerRef = useRef(null);
39
+ const navigationRef = useRef(null);
40
+ const forceUpdate = useForceUpdate();
41
+ const [isMinimized, setIsMinimized] = useState(false);
42
+ useEffect(() => {
43
+ const handleResize = () => {
44
+ setIsMinimized(false);
45
+ forceUpdate();
46
+ };
47
+ window.addEventListener('resize', handleResize);
48
+ return () => window.removeEventListener('resize', handleResize);
49
+ }, [forceUpdate]);
50
+ useLayoutEffect(() => {
51
+ if (leftRef.current && rightRef.current && centerRef.current) {
52
+ const diff = leftRef.current.clientWidth - rightRef.current.clientWidth;
53
+ const margin = 8;
54
+ centerRef.current.style.marginLeft = `${margin + (diff < 0 ? -diff : 0)}px`;
55
+ centerRef.current.style.marginRight = `${margin + (diff > 0 ? diff : 0)}px`;
56
+ }
57
+ }, []);
58
+ const updateIsMinimized = () => {
59
+ if (centerRef.current && navigationRef.current) {
60
+ if (navigationRef.current.clientWidth >= centerRef.current.clientWidth) {
61
+ setIsMinimized(true);
62
+ }
63
+ }
64
+ };
65
+ useEffect(() => {
66
+ updateIsMinimized();
67
+ });
68
+ return (_jsxs("div", Object.assign({ className: classNames(Styles.header, className, {
69
+ [Styles.minimized]: isMinimized,
70
+ }), id: id }, { children: [_jsx("div", Object.assign({ className: leftClassName, ref: leftRef }, { children: left })), _jsx("div", Object.assign({ ref: centerRef, className: "d-if justify-content-center flex-grow-1 flex-basis-0" }, { children: _jsxs("div", Object.assign({ ref: navigationRef, className: "d-if" }, { children: [items === null || items === void 0 ? void 0 : items.map(item => (_jsx(HeaderNavigationLink, { item: item, navigationComponent: navigationComponent }, item.key))), !!(itemsOverflow === null || itemsOverflow === void 0 ? void 0 : itemsOverflow.length) && (_jsx(HeaderNavigationOverflow, { items: itemsOverflow, navigationComponent: navigationComponent }))] })) })), _jsx("div", Object.assign({ className: classNames('d-f flex-row justify-content-end', contentClassName), ref: rightRef }, { children: children }))] })));
71
+ };
72
+ //# sourceMappingURL=header-navigation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"header-navigation.js","sourceRoot":"","sources":["../../../src/components/header-navigation/header-navigation.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAIH,WAAW,EACX,SAAS,EACT,eAAe,EACf,MAAM,EACN,QAAQ,GACX,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,OAAO,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EAAC,MAAM,iBACpC,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAChB,KAAC,oBAAoB,IAEjB,IAAI,EAAE,IAAI,EACV,mBAAmB,EAAE,mBAAmB,IAFnC,IAAI,CAAC,GAAG,CAGf,CACL,CAAC,EACD,CAAC,CAAC,CAAA,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,MAAM,CAAA,IAAI,CACxB,KAAC,wBAAwB,IACrB,KAAK,EAAE,aAAa,EACpB,mBAAmB,EAAE,mBAAmB,GAC1C,CACL,KACC,IACJ,EACN,4BACI,SAAS,EAAE,UAAU,CAAC,kCAAkC,EAAE,gBAAgB,CAAC,EAC3E,GAAG,EAAE,QAAQ,gBAEZ,QAAQ,IACP,KACJ,CACT,CAAC;AACN,CAAC,CAAC"}
@@ -0,0 +1,116 @@
1
+ /* stylelint-disable no-descending-specificity */
2
+ @import (reference) '@servicetitan/tokens/core/tokens.less';
3
+
4
+ .link {
5
+ display: flex;
6
+ align-items: center;
7
+ flex-wrap: nowrap;
8
+
9
+ .icon {
10
+ display: inline-block;
11
+ }
12
+
13
+ & * {
14
+ text-decoration: none;
15
+ white-space: nowrap;
16
+ }
17
+ }
18
+
19
+ .header {
20
+ min-width: 800px;
21
+ height: 56px;
22
+ display: flex;
23
+ flex-direction: row;
24
+ align-items: center;
25
+
26
+ background-color: @color-neutral-300;
27
+ box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.25);
28
+
29
+ .link {
30
+ padding: 18px 12px;
31
+ max-height: 56px;
32
+
33
+ color: @color-white;
34
+ font-family: @base-font-family;
35
+
36
+ position: relative;
37
+
38
+ ins {
39
+ margin-left: @spacing-half;
40
+ }
41
+
42
+ .counter {
43
+ color: @color-white;
44
+ position: absolute;
45
+ top: @spacing-1;
46
+ right: -@spacing-half;
47
+
48
+ font-size: @typescale-0;
49
+ font-weight: @font-weight-semibold;
50
+ }
51
+
52
+ &.active {
53
+ color: @color-blue-300;
54
+ }
55
+
56
+ &:hover:not(.active) {
57
+ color: @color-neutral-60;
58
+ }
59
+ }
60
+
61
+ &.minimized .link {
62
+ ins {
63
+ display: none;
64
+ color: @color-white;
65
+ }
66
+
67
+ &:hover:not(.active) {
68
+ ins {
69
+ display: inline-block;
70
+ margin-left: @spacing-0;
71
+ position: absolute;
72
+ z-index: @z-index-notification;
73
+ background-color: @color-neutral-300;
74
+ bottom: -@spacing-half;
75
+ left: 50%;
76
+ transform: translate3d(-50%, 100%, 0);
77
+ padding: @spacing-1;
78
+ border-radius: @default-border-radius;
79
+ }
80
+ }
81
+ }
82
+ }
83
+
84
+ .overflow-popover {
85
+ padding: @spacing-1 @spacing-0 !important;
86
+
87
+ .link {
88
+ display: block;
89
+ color: @color-black;
90
+ padding: @spacing-1 12px;
91
+ position: relative;
92
+
93
+ &.active {
94
+ color: @color-blue-500;
95
+ }
96
+
97
+ &:hover {
98
+ background-color: @color-blue-500;
99
+ color: @color-white;
100
+ }
101
+
102
+ ins {
103
+ margin-left: @spacing-1;
104
+ }
105
+
106
+ .counter {
107
+ color: @color-white;
108
+ position: absolute;
109
+ top: @spacing-1;
110
+ margin-left: @spacing-half;
111
+
112
+ font-size: @typescale-0;
113
+ font-weight: @font-weight-semibold;
114
+ }
115
+ }
116
+ }
@@ -0,0 +1,10 @@
1
+ import { FC } from 'react';
2
+ declare const _default: {
3
+ title: string;
4
+ component: FC<import("./header-navigation").HeaderNavigationProps>;
5
+ parameters: {};
6
+ };
7
+ export default _default;
8
+ export declare const defaultNavigation: () => JSX.Element;
9
+ export declare const withLogoTextAndOverflow: () => JSX.Element;
10
+ //# sourceMappingURL=header-navigation.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"header-navigation.stories.d.ts","sourceRoot":"","sources":["../../../src/components/header-navigation/header-navigation.stories.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;;;;;;AAG3B,wBAIE;AAkCF,eAAO,MAAM,iBAAiB,mBAa7B,CAAC;AAEF,eAAO,MAAM,uBAAuB,mBAoBnC,CAAC"}
@@ -0,0 +1,38 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { HeaderNavigation } from './header-navigation';
3
+ import { LogoCompanyTitle } from '../logo/logo-company-title';
4
+ import { LogoTitanText } from '../logo/logo-titan-text';
5
+ export default {
6
+ title: 'Navigation/HeaderNavigation',
7
+ component: HeaderNavigation,
8
+ parameters: {},
9
+ };
10
+ const getItem = (key, data) => (Object.assign({ key, to: '/', title: key[0].toUpperCase() + key.substring(1), hint: key }, (data !== null && data !== void 0 ? data : {})));
11
+ const items = {
12
+ dashboard: getItem('dashboard', { iconName: 'dashboard', isActive: true }),
13
+ calendar: getItem('calendar', { iconName: 'schedule' }),
14
+ calls: getItem('calls', { iconName: 'phone', isActive: true, counter: 12 }),
15
+ accounting: getItem('accounting', { iconName: 'assignment' }),
16
+ dispatch: getItem('dispatch', { iconName: 'location_disabled' }),
17
+ fleet: getItem('fleet', { iconName: 'fleet-pro', title: 'Fleet Pro' }),
18
+ };
19
+ const NavLinkMock = props => (_jsx("a", Object.assign({ href: "#", onClick: e => {
20
+ e.preventDefault();
21
+ }, className: props.className }, { children: props.children })));
22
+ export const defaultNavigation = () => (_jsx(HeaderNavigation, { left: _jsx(LogoCompanyTitle, { className: "m-l-1", fill: "#fff" }), items: [
23
+ items.dashboard,
24
+ items.calendar,
25
+ items.calls,
26
+ items.accounting,
27
+ items.dispatch,
28
+ items.fleet,
29
+ ], navigationComponent: NavLinkMock }));
30
+ export const withLogoTextAndOverflow = () => (_jsx(HeaderNavigation, { left: _jsx(LogoTitanText, { mantleFill: "#2270EE", title: "Commercial", description: "tenant tenant tenant tenant tenant" }), items: [
31
+ items.dashboard,
32
+ items.calendar,
33
+ items.calls,
34
+ items.accounting,
35
+ items.dispatch,
36
+ items.fleet,
37
+ ], itemsOverflow: [items.calls, items.accounting, items.dispatch], navigationComponent: NavLinkMock }));
38
+ //# sourceMappingURL=header-navigation.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"header-navigation.stories.js","sourceRoot":"","sources":["../../../src/components/header-navigation/header-navigation.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAE9D,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAExD,eAAe;IACX,KAAK,EAAE,6BAA6B;IACpC,SAAS,EAAE,gBAAgB;IAC3B,UAAU,EAAE,EAAE;CACjB,CAAC;AAEF,MAAM,OAAO,GAAG,CACZ,GAAW,EACX,IAAuC,EACf,EAAE,CAAC,iBAC3B,GAAG,EACH,EAAE,EAAE,GAAG,EACP,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,EAC9C,IAAI,EAAE,GAAG,IACN,CAAC,IAAI,aAAJ,IAAI,cAAJ,IAAI,GAAI,EAAE,CAAC,EACjB,CAAC;AAEH,MAAM,KAAK,GAAG;IACV,SAAS,EAAE,OAAO,CAAC,WAAW,EAAE,EAAE,QAAQ,EAAE,WAAW,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC1E,QAAQ,EAAE,OAAO,CAAC,UAAU,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC;IACvD,KAAK,EAAE,OAAO,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;IAC3E,UAAU,EAAE,OAAO,CAAC,YAAY,EAAE,EAAE,QAAQ,EAAE,YAAY,EAAE,CAAC;IAC7D,QAAQ,EAAE,OAAO,CAAC,UAAU,EAAE,EAAE,QAAQ,EAAE,mBAAmB,EAAE,CAAC;IAChE,KAAK,EAAE,OA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2
+ export declare const LogoCompanyTitle: FC<{
3
+ className?: string;
4
+ fill?: string;
5
+ }>;
6
+ //# sourceMappingURL=logo-company-title.d.ts.map
@@ -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;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAqBtE,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, }) => {
4
+ return (_jsxs("svg", Object.assign({ className: className, width: "162", 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 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-.3.6-.3.6-3.1-1.9-.8-5.8-.8-5.8 1.3-2.3 3.3-1.6 3.3-1.6.4.1.5.4.5.9s.1.7.7.8c.6.1.8.8.8 2 0 1-.7 2.4-1.2 2.4zm2.5 0s-.8-.2-.5-1.3c.1-.4.2-.4.2-1s.2-1.3.6-1.5c0 0 .8 0 .8 2.2 0 .8-1.1 1.6-1.1 1.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
+ };
6
+ //# sourceMappingURL=logo-company-title.js.map
@@ -0,0 +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,GAA8C,CAAC,EACxE,SAAS,EACT,IAAI,GACP,EAAE,EAAE;IACD,OAAO,CACH,6BACI,SAAS,EAAE,SAAS,EACpB,KAAK,EAAC,KAAK,EACX,OAAO,EAAC,YAAY,EACpB,KAAK,EAAC,4BAA4B,iBAElC,eACI,CAAC,EAAC,m3BAAm3B,EACr3B,IAAI,EAAE,IAAI,GACZ,EACF,eACI,CAAC,EAAC,22KAA22K,EAC72K,IAAI,EAAE,IAAI,GACZ,KACA,CACT,CAAC;AACN,CAAC,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { FC } from 'react';
2
+ export interface LogoTitanTextProps {
3
+ mantleFill?: string;
4
+ className?: string;
5
+ title: string;
6
+ description: string;
7
+ }
8
+ export declare const LogoTitanText: FC<LogoTitanTextProps>;
9
+ //# 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,EAAE,EAAE,MAAM,OAAO,CAAC;AAI3B,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;CACvB;AAED,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,CAsBhD,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import classNames from 'classnames';
3
+ import { LogoTitan } from './logo-titan';
4
+ import * as Styles from './logo-titan-text.module.less';
5
+ export const LogoTitanText = ({ className, description, mantleFill, title, }) => (_jsxs("div", Object.assign({ className: classNames('d-f', Styles.container, className) }, { children: [_jsx("div", Object.assign({ className: classNames('bg-white d-if justify-content-center align-items-center', Styles.logoWrapper) }, { children: _jsx(LogoTitan, { width: 40, height: 40, mantleFill: mantleFill }) })), _jsxs("div", Object.assign({ className: "d-if p-l-1 c-white flex-column justify-content-center align-items-start" }, { children: [_jsx("span", Object.assign({ className: classNames(Styles.logoTextTitle, 'ff-display') }, { children: title })), _jsx("span", Object.assign({ className: classNames(Styles.logoTextDescription, 'fs-1 t-truncate m-b-1') }, { children: description }))] }))] })));
6
+ //# 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,CAAC;AAEpC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,KAAK,MAAM,MAAM,+BAA+B,CAAC;AASxD,MAAM,CAAC,MAAM,aAAa,GAA2B,CAAC,EAClD,SAAS,EACT,WAAW,EACX,UAAU,EACV,KAAK,GACR,EAAE,EAAE,CAAC,CACF,6BAAK,SAAS,EAAE,UAAU,CAAC,KAAK,EAAE,MAAM,CAAC,SAAS,EAAE,SAAS,CAAC,iBAC1D,4BACI,SAAS,EAAE,UAAU,CACjB,yDAAyD,EACzD,MAAM,CAAC,WAAW,CACrB,gBAED,KAAC,SAAS,IAAC,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,UAAU,EAAE,UAAU,GAAI,IAC1D,EACN,6BAAK,SAAS,EAAC,yEAAyE,iBACpF,6BAAM,SAAS,EAAE,UAAU,CAAC,MAAM,CAAC,aAAa,EAAE,YAAY,CAAC,gBAAG,KAAK,IAAQ,EAC/E,6BAAM,SAAS,EAAE,UAAU,CAAC,MAAM,CAAC,mBAAmB,EAAE,uBAAuB,CAAC,gBAC3E,WAAW,IACT,KACL,KACJ,CACT,CAAC"}
@@ -0,0 +1,25 @@
1
+ @import (reference) '@servicetitan/tokens/core/tokens.less';
2
+
3
+ .container {
4
+ height: 56px;
5
+ max-width: 200px;
6
+
7
+ .logo-wrapper {
8
+ height: 56px;
9
+ width: 56px;
10
+
11
+ svg {
12
+ fill: @color-black;
13
+ }
14
+ }
15
+
16
+ .logo-text-title {
17
+ font-weight: @font-weight-semibold;
18
+ font-size: 19px;
19
+ max-width: 140px;
20
+ }
21
+
22
+ .logo-text-description {
23
+ max-width: 140px;
24
+ }
25
+ }
@@ -0,0 +1,9 @@
1
+ import { FC } from 'react';
2
+ export interface LogoTitanProps {
3
+ height?: number;
4
+ width?: number;
5
+ fill?: string;
6
+ mantleFill?: string;
7
+ }
8
+ export declare const LogoTitan: FC<LogoTitanProps>;
9
+ //# sourceMappingURL=logo-titan.d.ts.map
@@ -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,cAAc;IAC3B,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,SAAS,EAAE,EAAE,CAAC,cAAc,CAgDxC,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 LogoTitan = (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", Object.assign({ 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", Object.assign({ 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" }), _jsxs("g", Object.assign({ transform: "translate(0 66)" }, { children: [_jsx("mask", Object.assign({ id: "b", fill: "#fff" }, { children: _jsx("use", { xlinkHref: "#a" }) })), _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", mask: "url(#b)" })] })), _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,SAAS,GAAuB,CAAC,KAAqB,EAAE,EAAE;;IACnE,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,6BACI,KAAK,EAAC,4BAA4B,EAClC,UAAU,EAAC,8BAA8B,IACrC,UAAU,IACd,OAAO,EAAC,aAAa,iBAErB,yBACI,eAAM,EAAE,EAAC,GAAG,EAAC,CAAC,EAAC,qBAAqB,GAAG,GACpC,EACP,2BAAG,IAAI,EAAC,MAAM,EAAC,QAAQ,EAAC,SAAS,iBAC7B,eACI,IAAI,EAAE,UAAU,EAChB,CAAC,EAAC,mHAAmH,GACvH,EACF,2BAAG,SAAS,EAAC,iBAAiB,iBAC1B,6BAAM,EAAE,EAAC,GAAG,EAAC,IAAI,EAAC,MAAM,gBACpB,cAAK,SAAS,EAAC,IAAI,GAAG,IACnB,EACP,eACI,IAAI,EAAE,UAAU,EAChB,CAAC,EAAC,wQAAwQ,EAC1Q,IAAI,EAAC,SAAS,GAChB,KACF,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,KACF,KACF,CACT,CAAC;AACN,CAAC,CAAC"}
@@ -0,0 +1,12 @@
1
+ /// <reference types="react" />
2
+ declare const _default: {
3
+ title: string;
4
+ component: import("react").FC<import("./logo-titan").LogoTitanProps>;
5
+ parameters: {};
6
+ };
7
+ export default _default;
8
+ export declare const logoTitan: () => JSX.Element;
9
+ export declare const logoTitanBlueMantle: () => JSX.Element;
10
+ export declare const logoCompanyTitle: () => JSX.Element;
11
+ export declare const logoTitanText: () => JSX.Element;
12
+ //# 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":";;;;;;AAIA,wBAIE;AAEF,eAAO,MAAM,SAAS,mBAAsB,CAAC;AAC7C,eAAO,MAAM,mBAAmB,mBAA2C,CAAC;AAC5E,eAAO,MAAM,gBAAgB,mBAA6B,CAAC;AAC3D,eAAO,MAAM,aAAa,mBAOzB,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { LogoTitan } from './logo-titan';
3
+ import { LogoCompanyTitle } from './logo-company-title';
4
+ import { LogoTitanText } from './logo-titan-text';
5
+ export default {
6
+ title: 'Navigation/Logo',
7
+ component: LogoTitan,
8
+ parameters: {},
9
+ };
10
+ export const logoTitan = () => _jsx(LogoTitan, {});
11
+ export const logoTitanBlueMantle = () => _jsx(LogoTitan, { mantleFill: "#2270EE" });
12
+ export const logoCompanyTitle = () => _jsx(LogoCompanyTitle, {});
13
+ export const logoTitanText = () => (_jsx(LogoTitanText, { className: "bg-neutral-300 border", mantleFill: "#2270EE", title: "Commercial", description: "tenant tenant tenant tenant tenant" }));
14
+ //# 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,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,eAAe;IACX,KAAK,EAAE,iBAAiB;IACxB,SAAS,EAAE,SAAS;IACpB,UAAU,EAAE,EAAE;CACjB,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG,GAAG,EAAE,CAAC,KAAC,SAAS,KAAG,CAAC;AAC7C,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAG,EAAE,CAAC,KAAC,SAAS,IAAC,UAAU,EAAC,SAAS,GAAG,CAAC;AAC5E,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,EAAE,CAAC,KAAC,gBAAgB,KAAG,CAAC;AAC3D,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,EAAE,CAAC,CAC/B,KAAC,aAAa,IACV,SAAS,EAAC,uBAAuB,EACjC,UAAU,EAAC,SAAS,EACpB,KAAK,EAAC,YAAY,EAClB,WAAW,EAAC,oCAAoC,GAClD,CACL,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './components/header-navigation/header-navigation';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kDAAkD,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,2 @@
1
+ export * from './components/header-navigation/header-navigation';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kDAAkD,CAAC"}
@@ -0,0 +1,38 @@
1
+ import { IconPropsStrict } from '@servicetitan/design-system';
2
+ import { FC, ReactNode } from 'react';
3
+ export interface HeaderNavigationLinkData {
4
+ /** link href */
5
+ key: string;
6
+ /** link href */
7
+ to: string;
8
+ /** link title */
9
+ title: string;
10
+ /** link description */
11
+ hint: string;
12
+ /** callback to return active state. By default it compares link href with current pathname */
13
+ isActive?: boolean | ((pathname: string) => boolean);
14
+ /** flag if the link is not shown (based on FG and/or user permissions) */
15
+ isHidden?: boolean;
16
+ /** custom className (can be used for mdi icons) */
17
+ iconClassName?: string;
18
+ /** anvil's icon name of item */
19
+ iconName?: IconPropsStrict['name'];
20
+ /** icon component of item (<svg />) */
21
+ iconComponent?: FC;
22
+ /** item counter (optional). shown if it is set and greater than 0 */
23
+ counter?: number;
24
+ /** class name of link item */
25
+ className?: string;
26
+ }
27
+ export interface HeaderNavigationComponentPropsStrict {
28
+ to: string;
29
+ title: string;
30
+ className?: string;
31
+ activeClassName?: string;
32
+ children: ReactNode;
33
+ isActive?: (pathname: string) => boolean;
34
+ }
35
+ export interface HeaderNavigationComponentProps extends HeaderNavigationComponentPropsStrict {
36
+ [key: string]: any;
37
+ }
38
+ //# sourceMappingURL=navigation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../src/utils/navigation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEtC,MAAM,WAAW,wBAAwB;IACrC,gBAAgB;IAChB,GAAG,EAAE,MAAM,CAAC;IAEZ,gBAAgB;IAChB,EAAE,EAAE,MAAM,CAAC;IAEX,iBAAiB;IACjB,KAAK,EAAE,MAAM,CAAC;IAEd,uBAAuB;IACvB,IAAI,EAAE,MAAM,CAAC;IAEb,8FAA8F;IAC9F,QAAQ,CAAC,EAAE,OAAO,GAAG,CAAC,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC;IAErD,0EAA0E;IAC1E,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,mDAAmD;IACnD,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB,gCAAgC;IAChC,QAAQ,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC;IAEnC,uCAAuC;IACvC,aAAa,CAAC,EAAE,EAAE,CAAC;IAEnB,qEAAqE;IACrE,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,8BAA8B;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,oCAAoC;IACjD,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,SAAS,CAAC;IACpB,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC;CAC5C;AAED,MAAM,WAAW,8BAA+B,SAAQ,oCAAoC;IACxF,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACtB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=navigation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"navigation.js","sourceRoot":"","sources":["../../src/utils/navigation.ts"],"names":[],"mappings":""}
package/package.json ADDED
@@ -0,0 +1,47 @@
1
+ {
2
+ "name": "@servicetitan/navigation",
3
+ "version": "0.1.0",
4
+ "description": "Navigation components",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/servicetitan/anvil-uikit-contrib",
8
+ "directory": "packages/navigation"
9
+ },
10
+ "main": "./dist/index.js",
11
+ "typings": "./dist/index.d.ts",
12
+ "files": [
13
+ "dist",
14
+ "src"
15
+ ],
16
+ "dependencies": {
17
+ "classnames": "~2.3.1"
18
+ },
19
+ "peerDependencies": {
20
+ "@servicetitan/design-system": ">=13.2.1",
21
+ "@servicetitan/react-ioc": "~14.1.1",
22
+ "@servicetitan/tokens": ">=12.2.1",
23
+ "mobx": "~6.3.2",
24
+ "mobx-react": "~7.2.0",
25
+ "react": "~17.0.2",
26
+ "react-router-dom": "~5.3.0"
27
+ },
28
+ "devDependencies": {
29
+ "@servicetitan/design-system": ">=12.4.1",
30
+ "@servicetitan/react-ioc": "~14.1.1",
31
+ "@servicetitan/tokens": ">=12.1.11",
32
+ "@testing-library/react": "^12.0.0",
33
+ "@types/react": "~17.0.15",
34
+ "mobx": "~6.3.2",
35
+ "mobx-react": "~7.2.0",
36
+ "react": "~17.0.2",
37
+ "react-router-dom": "~5.3.0"
38
+ },
39
+ "publishConfig": {
40
+ "access": "public"
41
+ },
42
+ "cli": {
43
+ "less": true,
44
+ "webpack": false
45
+ },
46
+ "gitHead": "d29437d247da3428ed25fd9fc4004c1f3a94cf1e"
47
+ }
@@ -0,0 +1,116 @@
1
+ /* stylelint-disable no-descending-specificity */
2
+ @import (reference) '@servicetitan/tokens/core/tokens.less';
3
+
4
+ .link {
5
+ display: flex;
6
+ align-items: center;
7
+ flex-wrap: nowrap;
8
+
9
+ .icon {
10
+ display: inline-block;
11
+ }
12
+
13
+ & * {
14
+ text-decoration: none;
15
+ white-space: nowrap;
16
+ }
17
+ }
18
+
19
+ .header {
20
+ min-width: 800px;
21
+ height: 56px;
22
+ display: flex;
23
+ flex-direction: row;
24
+ align-items: center;
25
+
26
+ background-color: @color-neutral-300;
27
+ box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.25);
28
+
29
+ .link {
30
+ padding: 18px 12px;
31
+ max-height: 56px;
32
+
33
+ color: @color-white;
34
+ font-family: @base-font-family;
35
+
36
+ position: relative;
37
+
38
+ ins {
39
+ margin-left: @spacing-half;
40
+ }
41
+
42
+ .counter {
43
+ color: @color-white;
44
+ position: absolute;
45
+ top: @spacing-1;
46
+ right: -@spacing-half;
47
+
48
+ font-size: @typescale-0;
49
+ font-weight: @font-weight-semibold;
50
+ }
51
+
52
+ &.active {
53
+ color: @color-blue-300;
54
+ }
55
+
56
+ &:hover:not(.active) {
57
+ color: @color-neutral-60;
58
+ }
59
+ }
60
+
61
+ &.minimized .link {
62
+ ins {
63
+ display: none;
64
+ color: @color-white;
65
+ }
66
+
67
+ &:hover:not(.active) {
68
+ ins {
69
+ display: inline-block;
70
+ margin-left: @spacing-0;
71
+ position: absolute;
72
+ z-index: @z-index-notification;
73
+ background-color: @color-neutral-300;
74
+ bottom: -@spacing-half;
75
+ left: 50%;
76
+ transform: translate3d(-50%, 100%, 0);
77
+ padding: @spacing-1;
78
+ border-radius: @default-border-radius;
79
+ }
80
+ }
81
+ }
82
+ }
83
+
84
+ .overflow-popover {
85
+ padding: @spacing-1 @spacing-0 !important;
86
+
87
+ .link {
88
+ display: block;
89
+ color: @color-black;
90
+ padding: @spacing-1 12px;
91
+ position: relative;
92
+
93
+ &.active {
94
+ color: @color-blue-500;
95
+ }
96
+
97
+ &:hover {
98
+ background-color: @color-blue-500;
99
+ color: @color-white;
100
+ }
101
+
102
+ ins {
103
+ margin-left: @spacing-1;
104
+ }
105
+
106
+ .counter {
107
+ color: @color-white;
108
+ position: absolute;
109
+ top: @spacing-1;
110
+ margin-left: @spacing-half;
111
+
112
+ font-size: @typescale-0;
113
+ font-weight: @font-weight-semibold;
114
+ }
115
+ }
116
+ }
@@ -0,0 +1,9 @@
1
+ export const __esModule: true;
2
+ export const link: string;
3
+ export const icon: string;
4
+ export const header: string;
5
+ export const counter: string;
6
+ export const active: string;
7
+ export const minimized: string;
8
+ export const overflowPopover: string;
9
+
@@ -0,0 +1,80 @@
1
+ import { HeaderNavigation } from './header-navigation';
2
+ import { HeaderNavigationComponentProps, HeaderNavigationLinkData } from '../../utils/navigation';
3
+ import { LogoCompanyTitle } from '../logo/logo-company-title';
4
+ import { FC } from 'react';
5
+ import { LogoTitanText } from '../logo/logo-titan-text';
6
+
7
+ export default {
8
+ title: 'Navigation/HeaderNavigation',
9
+ component: HeaderNavigation,
10
+ parameters: {},
11
+ };
12
+
13
+ const getItem = (
14
+ key: string,
15
+ data: Partial<HeaderNavigationLinkData>
16
+ ): HeaderNavigationLinkData => ({
17
+ key,
18
+ to: '/',
19
+ title: key[0].toUpperCase() + key.substring(1),
20
+ hint: key,
21
+ ...(data ?? {}),
22
+ });
23
+
24
+ const items = {
25
+ dashboard: getItem('dashboard', { iconName: 'dashboard', isActive: true }),
26
+ calendar: getItem('calendar', { iconName: 'schedule' }),
27
+ calls: getItem('calls', { iconName: 'phone', isActive: true, counter: 12 }),
28
+ accounting: getItem('accounting', { iconName: 'assignment' }),
29
+ dispatch: getItem('dispatch', { iconName: 'location_disabled' }),
30
+ fleet: getItem('fleet', { iconName: 'fleet-pro', title: 'Fleet Pro' }),
31
+ };
32
+
33
+ const NavLinkMock: FC<HeaderNavigationComponentProps> = props => (
34
+ <a
35
+ href="#"
36
+ onClick={e => {
37
+ e.preventDefault();
38
+ }}
39
+ className={props.className}
40
+ >
41
+ {props.children}
42
+ </a>
43
+ );
44
+
45
+ export const defaultNavigation = () => (
46
+ <HeaderNavigation
47
+ left={<LogoCompanyTitle className="m-l-1" fill="#fff" />}
48
+ items={[
49
+ items.dashboard,
50
+ items.calendar,
51
+ items.calls,
52
+ items.accounting,
53
+ items.dispatch,
54
+ items.fleet,
55
+ ]}
56
+ navigationComponent={NavLinkMock}
57
+ />
58
+ );
59
+
60
+ export const withLogoTextAndOverflow = () => (
61
+ <HeaderNavigation
62
+ left={
63
+ <LogoTitanText
64
+ mantleFill="#2270EE"
65
+ title="Commercial"
66
+ description="tenant tenant tenant tenant tenant"
67
+ />
68
+ }
69
+ items={[
70
+ items.dashboard,
71
+ items.calendar,
72
+ items.calls,
73
+ items.accounting,
74
+ items.dispatch,
75
+ items.fleet,
76
+ ]}
77
+ itemsOverflow={[items.calls, items.accounting, items.dispatch]}
78
+ navigationComponent={NavLinkMock}
79
+ />
80
+ );
@@ -0,0 +1,204 @@
1
+ import { Icon, Popover, Tag } from '@servicetitan/design-system';
2
+ import classNames from 'classnames';
3
+ import {
4
+ FC,
5
+ ReactElement,
6
+ ReactNode,
7
+ useCallback,
8
+ useEffect,
9
+ useLayoutEffect,
10
+ useRef,
11
+ useState,
12
+ } from 'react';
13
+ import { NavLink } from 'react-router-dom';
14
+ import { HeaderNavigationComponentProps, HeaderNavigationLinkData } from '../../utils/navigation';
15
+
16
+ import * as Styles from './header-navigation.module.less';
17
+
18
+ function useForceUpdate() {
19
+ const [, setTick] = useState(0);
20
+ return useCallback(() => {
21
+ setTick(tick => tick + 1);
22
+ }, []);
23
+ }
24
+
25
+ const DefaultNavigationComponent: FC<HeaderNavigationComponentProps> = props => (
26
+ <NavLink
27
+ {...props}
28
+ isActive={props.isActive && ((_, { pathname }) => props.isActive!(pathname))}
29
+ />
30
+ );
31
+
32
+ const HeaderNavigationLink: FC<{
33
+ item: HeaderNavigationLinkData;
34
+ navigationComponent?: FC<HeaderNavigationComponentProps>;
35
+ }> = ({
36
+ item: { iconComponent: IconComponent, ...item },
37
+ navigationComponent: NavigationComponent = DefaultNavigationComponent,
38
+ }) => (
39
+ <NavigationComponent
40
+ key={item.key}
41
+ to={item.to}
42
+ title={item.hint}
43
+ className={classNames(Styles.link, item.className, {
44
+ [Styles.active]: item.isActive === true,
45
+ })}
46
+ isActive={typeof item.isActive === 'function' ? item.isActive : undefined}
47
+ activeClassName={Styles.active}
48
+ data-cy={`nav-item-${item.key}`}
49
+ >
50
+ {IconComponent ? (
51
+ <i className={Styles.icon}>
52
+ <IconComponent />
53
+ </i>
54
+ ) : item.iconName ? (
55
+ <Icon name={item.iconName} size={20} className={Styles.icon} />
56
+ ) : (
57
+ <i className={classNames(Styles.icon, item.iconClassName)} />
58
+ )}
59
+
60
+ <ins>{item.title}</ins>
61
+ {!!item.counter && (
62
+ <Tag className={Styles.counter} compact badge color="critical">
63
+ {item.counter}
64
+ </Tag>
65
+ )}
66
+ </NavigationComponent>
67
+ );
68
+
69
+ const HeaderNavigationOverflow: FC<{
70
+ items: HeaderNavigationLinkData[];
71
+ navigationComponent?: FC<HeaderNavigationComponentProps>;
72
+ }> = ({ items, navigationComponent }) => {
73
+ const [isOpen, setIsOpen] = useState(false);
74
+
75
+ return (
76
+ <Popover
77
+ open={isOpen}
78
+ trigger={
79
+ <Icon
80
+ name="more_vert"
81
+ size="24px"
82
+ className="c-pointer"
83
+ onClick={() => setIsOpen(true)}
84
+ color="white"
85
+ />
86
+ }
87
+ direction="bl"
88
+ width="xs"
89
+ onClickOutside={() => setIsOpen(false)}
90
+ wrapperClassName="d-if-i align-items-center"
91
+ popoverContentClassName={Styles.overflowPopover}
92
+ portal
93
+ >
94
+ <div onClick={() => setIsOpen(false)}>
95
+ {items.map(item => (
96
+ <HeaderNavigationLink
97
+ key={item.key}
98
+ item={item}
99
+ navigationComponent={navigationComponent}
100
+ />
101
+ ))}
102
+ </div>
103
+ </Popover>
104
+ );
105
+ };
106
+
107
+ export interface HeaderNavigationProps {
108
+ children?: ReactNode;
109
+ className?: string;
110
+ contentClassName?: string;
111
+ id?: string;
112
+ left?: ReactElement;
113
+ leftClassName?: string;
114
+ items?: HeaderNavigationLinkData[];
115
+ itemsOverflow?: HeaderNavigationLinkData[];
116
+ navigationComponent?: FC<HeaderNavigationComponentProps>;
117
+ }
118
+
119
+ export const HeaderNavigation: FC<HeaderNavigationProps> = ({
120
+ children,
121
+ className,
122
+ contentClassName,
123
+ id,
124
+ items,
125
+ itemsOverflow,
126
+ left,
127
+ leftClassName,
128
+ navigationComponent,
129
+ }) => {
130
+ const leftRef = useRef<HTMLDivElement>(null);
131
+ const rightRef = useRef<HTMLDivElement>(null);
132
+ const centerRef = useRef<HTMLDivElement>(null);
133
+ const navigationRef = useRef<HTMLDivElement>(null);
134
+ const forceUpdate = useForceUpdate();
135
+ const [isMinimized, setIsMinimized] = useState(false);
136
+
137
+ useEffect(() => {
138
+ const handleResize = () => {
139
+ setIsMinimized(false);
140
+ forceUpdate();
141
+ };
142
+
143
+ window.addEventListener('resize', handleResize);
144
+ return () => window.removeEventListener('resize', handleResize);
145
+ }, [forceUpdate]);
146
+
147
+ useLayoutEffect(() => {
148
+ if (leftRef.current && rightRef.current && centerRef.current) {
149
+ const diff = leftRef.current.clientWidth - rightRef.current.clientWidth;
150
+ const margin = 8;
151
+
152
+ centerRef.current.style.marginLeft = `${margin + (diff < 0 ? -diff : 0)}px`;
153
+ centerRef.current.style.marginRight = `${margin + (diff > 0 ? diff : 0)}px`;
154
+ }
155
+ }, []);
156
+
157
+ const updateIsMinimized = () => {
158
+ if (centerRef.current && navigationRef.current) {
159
+ if (navigationRef.current.clientWidth >= centerRef.current.clientWidth) {
160
+ setIsMinimized(true);
161
+ }
162
+ }
163
+ };
164
+
165
+ useEffect(() => {
166
+ updateIsMinimized();
167
+ });
168
+
169
+ return (
170
+ <div
171
+ className={classNames(Styles.header, className, {
172
+ [Styles.minimized]: isMinimized,
173
+ })}
174
+ id={id}
175
+ >
176
+ <div className={leftClassName} ref={leftRef}>
177
+ {left}
178
+ </div>
179
+ <div ref={centerRef} className="d-if justify-content-center flex-grow-1 flex-basis-0">
180
+ <div ref={navigationRef} className="d-if">
181
+ {items?.map(item => (
182
+ <HeaderNavigationLink
183
+ key={item.key}
184
+ item={item}
185
+ navigationComponent={navigationComponent}
186
+ />
187
+ ))}
188
+ {!!itemsOverflow?.length && (
189
+ <HeaderNavigationOverflow
190
+ items={itemsOverflow}
191
+ navigationComponent={navigationComponent}
192
+ />
193
+ )}
194
+ </div>
195
+ </div>
196
+ <div
197
+ className={classNames('d-f flex-row justify-content-end', contentClassName)}
198
+ ref={rightRef}
199
+ >
200
+ {children}
201
+ </div>
202
+ </div>
203
+ );
204
+ };
@@ -0,0 +1,25 @@
1
+ import { FC } from 'react';
2
+
3
+ /* tslint:disable: max-line-length */
4
+ export const LogoCompanyTitle: FC<{ className?: string; fill?: string }> = ({
5
+ className,
6
+ fill,
7
+ }) => {
8
+ return (
9
+ <svg
10
+ className={className}
11
+ width="162"
12
+ viewBox="0 0 322 80"
13
+ xmlns="http://www.w3.org/2000/svg"
14
+ >
15
+ <path
16
+ 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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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"
21
+ fill={fill}
22
+ />
23
+ </svg>
24
+ );
25
+ };
@@ -0,0 +1,25 @@
1
+ @import (reference) '@servicetitan/tokens/core/tokens.less';
2
+
3
+ .container {
4
+ height: 56px;
5
+ max-width: 200px;
6
+
7
+ .logo-wrapper {
8
+ height: 56px;
9
+ width: 56px;
10
+
11
+ svg {
12
+ fill: @color-black;
13
+ }
14
+ }
15
+
16
+ .logo-text-title {
17
+ font-weight: @font-weight-semibold;
18
+ font-size: 19px;
19
+ max-width: 140px;
20
+ }
21
+
22
+ .logo-text-description {
23
+ max-width: 140px;
24
+ }
25
+ }
@@ -0,0 +1,6 @@
1
+ export const __esModule: true;
2
+ export const container: string;
3
+ export const logoWrapper: string;
4
+ export const logoTextTitle: string;
5
+ export const logoTextDescription: string;
6
+
@@ -0,0 +1,35 @@
1
+ import classNames from 'classnames';
2
+ import { FC } from 'react';
3
+ import { LogoTitan } from './logo-titan';
4
+ import * as Styles from './logo-titan-text.module.less';
5
+
6
+ export interface LogoTitanTextProps {
7
+ mantleFill?: string;
8
+ className?: string;
9
+ title: string;
10
+ description: string;
11
+ }
12
+
13
+ export const LogoTitanText: FC<LogoTitanTextProps> = ({
14
+ className,
15
+ description,
16
+ mantleFill,
17
+ title,
18
+ }) => (
19
+ <div className={classNames('d-f', Styles.container, className)}>
20
+ <div
21
+ className={classNames(
22
+ 'bg-white d-if justify-content-center align-items-center',
23
+ Styles.logoWrapper
24
+ )}
25
+ >
26
+ <LogoTitan width={40} height={40} mantleFill={mantleFill} />
27
+ </div>
28
+ <div className="d-if p-l-1 c-white flex-column justify-content-center align-items-start">
29
+ <span className={classNames(Styles.logoTextTitle, 'ff-display')}>{title}</span>
30
+ <span className={classNames(Styles.logoTextDescription, 'fs-1 t-truncate m-b-1')}>
31
+ {description}
32
+ </span>
33
+ </div>
34
+ </div>
35
+ );
@@ -0,0 +1,59 @@
1
+ import { FC } from 'react';
2
+
3
+ export interface LogoTitanProps {
4
+ height?: number;
5
+ width?: number;
6
+ fill?: string;
7
+ mantleFill?: string;
8
+ }
9
+
10
+ /* tslint:disable: max-line-length */
11
+ export const LogoTitan: FC<LogoTitanProps> = (props: LogoTitanProps) => {
12
+ const dimensions = {
13
+ width: props.width ?? 116,
14
+ height: props.height ?? 106,
15
+ };
16
+ const fill = props.fill ?? '#3A3A3A';
17
+ const mantleFill = props.mantleFill ?? fill;
18
+
19
+ return (
20
+ <svg
21
+ xmlns="http://www.w3.org/2000/svg"
22
+ xmlnsXlink="http://www.w3.org/1999/xlink"
23
+ {...dimensions}
24
+ viewBox="0 0 116 106"
25
+ >
26
+ <defs>
27
+ <path id="a" d="M0 .12h63.625V40H0z" />
28
+ </defs>
29
+ <g fill="none" fillRule="evenodd">
30
+ <path
31
+ fill={mantleFill}
32
+ 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"
33
+ />
34
+ <g transform="translate(0 66)">
35
+ <mask id="b" fill="#fff">
36
+ <use xlinkHref="#a" />
37
+ </mask>
38
+ <path
39
+ fill={mantleFill}
40
+ 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"
41
+ mask="url(#b)"
42
+ />
43
+ </g>
44
+ <path
45
+ fill={fill}
46
+ 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"
47
+ />
48
+ <path
49
+ fill={fill}
50
+ 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"
51
+ />
52
+ <path
53
+ fill={mantleFill}
54
+ 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"
55
+ />
56
+ </g>
57
+ </svg>
58
+ );
59
+ };
@@ -0,0 +1,21 @@
1
+ import { LogoTitan } from './logo-titan';
2
+ import { LogoCompanyTitle } from './logo-company-title';
3
+ import { LogoTitanText } from './logo-titan-text';
4
+
5
+ export default {
6
+ title: 'Navigation/Logo',
7
+ component: LogoTitan,
8
+ parameters: {},
9
+ };
10
+
11
+ export const logoTitan = () => <LogoTitan />;
12
+ export const logoTitanBlueMantle = () => <LogoTitan mantleFill="#2270EE" />;
13
+ export const logoCompanyTitle = () => <LogoCompanyTitle />;
14
+ export const logoTitanText = () => (
15
+ <LogoTitanText
16
+ className="bg-neutral-300 border"
17
+ mantleFill="#2270EE"
18
+ title="Commercial"
19
+ description="tenant tenant tenant tenant tenant"
20
+ />
21
+ );
package/src/index.ts ADDED
@@ -0,0 +1 @@
1
+ export * from './components/header-navigation/header-navigation';
@@ -0,0 +1,50 @@
1
+ import { IconPropsStrict } from '@servicetitan/design-system';
2
+ import { FC, ReactNode } from 'react';
3
+
4
+ export interface HeaderNavigationLinkData {
5
+ /** link href */
6
+ key: string;
7
+
8
+ /** link href */
9
+ to: string;
10
+
11
+ /** link title */
12
+ title: string;
13
+
14
+ /** link description */
15
+ hint: string;
16
+
17
+ /** callback to return active state. By default it compares link href with current pathname */
18
+ isActive?: boolean | ((pathname: string) => boolean);
19
+
20
+ /** flag if the link is not shown (based on FG and/or user permissions) */
21
+ isHidden?: boolean;
22
+
23
+ /** custom className (can be used for mdi icons) */
24
+ iconClassName?: string;
25
+
26
+ /** anvil's icon name of item */
27
+ iconName?: IconPropsStrict['name'];
28
+
29
+ /** icon component of item (<svg />) */
30
+ iconComponent?: FC;
31
+
32
+ /** item counter (optional). shown if it is set and greater than 0 */
33
+ counter?: number;
34
+
35
+ /** class name of link item */
36
+ className?: string;
37
+ }
38
+
39
+ export interface HeaderNavigationComponentPropsStrict {
40
+ to: string;
41
+ title: string;
42
+ className?: string;
43
+ activeClassName?: string;
44
+ children: ReactNode;
45
+ isActive?: (pathname: string) => boolean;
46
+ }
47
+
48
+ export interface HeaderNavigationComponentProps extends HeaderNavigationComponentPropsStrict {
49
+ [key: string]: any;
50
+ }