@servicetitan/navigation 4.1.0 → 6.0.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/counter-tag.js +1 -1
- package/dist/components/counter-tag.js.map +1 -1
- 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 +4 -4
- package/dist/components/header-navigation/header-navigation-extra.stories.d.ts.map +1 -1
- package/dist/components/header-navigation/header-navigation-extra.stories.js +18 -10
- package/dist/components/header-navigation/header-navigation-extra.stories.js.map +1 -1
- package/dist/components/header-navigation/header-navigation-links.d.ts.map +1 -1
- package/dist/components/header-navigation/header-navigation-links.js +8 -24
- package/dist/components/header-navigation/header-navigation-links.js.map +1 -1
- package/dist/components/header-navigation/header-navigation-stacked.stories.d.ts +3 -3
- package/dist/components/header-navigation/header-navigation-stacked.stories.js +4 -4
- package/dist/components/header-navigation/header-navigation-stacked.stories.js.map +1 -1
- package/dist/components/header-navigation/header-navigation.js +3 -3
- package/dist/components/header-navigation/header-navigation.js.map +1 -1
- package/dist/components/header-navigation/header-navigation.stories.d.ts +3 -3
- package/dist/components/header-navigation/header-navigation.stories.js +4 -4
- package/dist/components/header-navigation/header-navigation.stories.js.map +1 -1
- package/dist/components/layout.stories.js +1 -1
- package/dist/components/layout.stories.js.map +1 -1
- 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 +2 -0
- package/dist/components/left-navigation/header-navigation-tiny-links.d.ts.map +1 -1
- package/dist/components/left-navigation/header-navigation-tiny-links.js +9 -22
- package/dist/components/left-navigation/header-navigation-tiny-links.js.map +1 -1
- package/dist/components/left-navigation/header-navigation-tiny.module.less +8 -0
- package/dist/components/left-navigation/header-navigation-tiny.stories.d.ts.map +1 -1
- package/dist/components/left-navigation/header-navigation-tiny.stories.js +1 -1
- package/dist/components/left-navigation/header-navigation-tiny.stories.js.map +1 -1
- package/dist/components/left-navigation/side-navigation.js +1 -1
- package/dist/components/left-navigation/side-navigation.js.map +1 -1
- package/dist/components/left-navigation/side-navigation.stories.d.ts +0 -1
- package/dist/components/left-navigation/side-navigation.stories.d.ts.map +1 -1
- package/dist/components/left-navigation/side-navigation.stories.js +1 -1
- package/dist/components/left-navigation/side-navigation.stories.js.map +1 -1
- package/dist/components/links.js +2 -2
- package/dist/components/links.js.map +1 -1
- package/dist/components/logo/logo-titan.js +1 -1
- package/dist/components/logo/logo-titan.js.map +1 -1
- package/dist/components/logo/logo.stories.d.ts +6 -6
- package/dist/components/logo/logo.stories.d.ts.map +1 -1
- package/dist/components/logo/logo.stories.js +6 -6
- package/dist/components/logo/logo.stories.js.map +1 -1
- package/dist/components/profile-dropdown/profile-dropdown-stacked.stories.d.ts +1 -1
- package/dist/components/profile-dropdown/profile-dropdown-stacked.stories.d.ts.map +1 -1
- package/dist/components/profile-dropdown/profile-dropdown-stacked.stories.js +3 -3
- package/dist/components/profile-dropdown/profile-dropdown-stacked.stories.js.map +1 -1
- package/dist/components/profile-dropdown/profile-dropdown-tiny.stories.d.ts +1 -1
- package/dist/components/profile-dropdown/profile-dropdown-tiny.stories.d.ts.map +1 -1
- package/dist/components/profile-dropdown/profile-dropdown-tiny.stories.js +3 -3
- package/dist/components/profile-dropdown/profile-dropdown-tiny.stories.js.map +1 -1
- package/dist/components/profile-dropdown/profile-dropdown.js +6 -19
- package/dist/components/profile-dropdown/profile-dropdown.js.map +1 -1
- package/dist/components/profile-dropdown/profile-dropdown.module.less +9 -0
- package/dist/components/profile-dropdown/profile-dropdown.stories.js +2 -2
- package/dist/components/profile-dropdown/profile-dropdown.stories.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/test/{data.stories.d.ts → data.d.ts} +1 -2
- package/dist/test/data.d.ts.map +1 -0
- package/dist/test/{data.stories.js → data.js} +13 -17
- package/dist/test/data.js.map +1 -0
- package/dist/utils/navigation-context.js +1 -15
- package/dist/utils/navigation-context.js.map +1 -1
- package/dist/utils/navigation.d.ts +4 -0
- package/dist/utils/navigation.d.ts.map +1 -1
- package/dist/utils/with-tooltip.d.ts +1 -1
- package/package.json +3 -3
- package/src/components/header-navigation/header-navigation-extra-stacked.stories.tsx +19 -0
- package/src/components/header-navigation/header-navigation-extra.stories.tsx +83 -39
- package/src/components/header-navigation/header-navigation-links.tsx +8 -0
- package/src/components/header-navigation/header-navigation-stacked.stories.tsx +4 -4
- package/src/components/header-navigation/header-navigation.stories.tsx +4 -4
- package/src/components/layout.stories.tsx +1 -1
- package/src/components/left-navigation/header-navigation-extra-tiny.stories.tsx +21 -0
- package/src/components/left-navigation/header-navigation-tiny-links.tsx +27 -3
- package/src/components/left-navigation/header-navigation-tiny.module.less +8 -0
- package/src/components/left-navigation/header-navigation-tiny.module.less.d.ts +1 -0
- package/src/components/left-navigation/header-navigation-tiny.stories.tsx +1 -6
- package/src/components/left-navigation/side-navigation.stories.tsx +1 -1
- package/src/components/logo/logo.stories.tsx +6 -6
- package/src/components/profile-dropdown/profile-dropdown-stacked.stories.tsx +13 -3
- package/src/components/profile-dropdown/profile-dropdown-tiny.stories.tsx +13 -3
- package/src/components/profile-dropdown/profile-dropdown.module.less +9 -0
- package/src/components/profile-dropdown/profile-dropdown.module.less.d.ts +1 -0
- package/src/components/profile-dropdown/profile-dropdown.stories.tsx +2 -2
- package/src/components/profile-dropdown/profile-dropdown.tsx +1 -1
- package/src/index.ts +1 -0
- package/src/utils/navigation.ts +4 -0
- package/dist/test/data.stories.d.ts.map +0 -1
- package/dist/test/data.stories.js.map +0 -1
- /package/src/test/{data.stories.tsx → data.tsx} +0 -0
|
@@ -6,7 +6,7 @@ import SvgRocketActive from '@servicetitan/anvil2/assets/icons/st/gnav_titan_adv
|
|
|
6
6
|
import SvgRocket from '@servicetitan/anvil2/assets/icons/st/gnav_titan_advisor_inactive.svg';
|
|
7
7
|
import { Input, Stack } from '@servicetitan/design-system';
|
|
8
8
|
import { Fragment } from 'react';
|
|
9
|
-
import { CallsNavigationTrigger, SearchIcon, withAnvil, withMemoryRouter
|
|
9
|
+
import { CallsNavigationTrigger, SearchIcon, withAnvil, withMemoryRouter } from '../../test/data';
|
|
10
10
|
import * as Styles from '../header-navigation/header-navigation-stories.module.less';
|
|
11
11
|
import { LogoCompanyTitle } from '../logo/logo-company-title';
|
|
12
12
|
import { LogoTitan, LogoTitanTitle } from '../logo/logo-titan-text';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"header-navigation-tiny.stories.js","sourceRoot":"","sources":["../../../src/components/left-navigation/header-navigation-tiny.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,6DAA6D,CAAC;AACpF,OAAO,iBAAiB,MAAM,+DAA+D,CAAC;AAC9F,OAAO,WAAW,MAAM,iEAAiE,CAAC;AAC1F,OAAO,eAAe,MAAM,oEAAoE,CAAC;AACjG,OAAO,SAAS,MAAM,sEAAsE,CAAC;AAE7F,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAM,QAAQ,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,
|
|
1
|
+
{"version":3,"file":"header-navigation-tiny.stories.js","sourceRoot":"","sources":["../../../src/components/left-navigation/header-navigation-tiny.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,SAAS,MAAM,6DAA6D,CAAC;AACpF,O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U,EACf,IAAI,EAAE,WAAW,EACjB,UAAU,EAAE,iBAAiB,GAC/B,EAEF,MAAC,eAAe,eACZ,KAAC,eAAe,CAAC,IAAI,IAAC,EAAE,EAAC,OAAO,EAAC,EAAE,EAAC,qBAAqB,EAAC,OAAO,EAAE,EAAE,gCAE9C,EACvB,KAAC,eAAe,CAAC,OAAO,KAAG,EAC3B,MAAC,eAAe,CAAC,IAAI,IAAC,EAAE,EAAC,UAAU,EAAC,EAAE,EAAC,qBAAqB,yBAC/C,GAAG,EACZ,eAAM,SAAS,EAAC,mCAAmC,2BAAkB,IAClD,EACvB,KAAC,eAAe,CAAC,OAAO,IAAC,EAAE,EAAC,QAAQ,EAAC,SAAS,EAAC,oBAAoB,6BAEzC,IACZ,IACX,EAEf,MAAM,EAAE,KAAC,KAAK,IAAC,WAAW,EAAC,aAAa,EAAC,IAAI,EAAC,QAAQ,EAAC,SAAS,EAAC,OAAO,GAAG,EAC3E,eAAe,EAAC,wBAAwB,GAC1C,CACL,CAAC"}
|
|
@@ -9,7 +9,7 @@ import { withTooltip } from '../../utils/with-tooltip';
|
|
|
9
9
|
import { CounterTag } from '../counter-tag';
|
|
10
10
|
import * as Styles from './side-navigation.module.less';
|
|
11
11
|
export const SideNavigation = ({ className, expanded, id, items, itemsTop, navigationComponent = DefaultNavLinkComponent, onExpandedChange, }) => {
|
|
12
|
-
return (_jsxs("div", { className: classNames(Styles.sideNav, expanded ? Styles.sideNavExpanded : Styles.sideNavSlim, className), id: id, "data-cy": "side-navigation", children: [!!(itemsTop === null || itemsTop === void 0 ? void 0 : itemsTop.length) && (_jsxs(Fragment, { children: [_jsx("div", { className: Styles.sideNavTop, "data-cy": "navigation-items-top", children: itemsTop.map(item => (_jsx(SideNavigationItem,
|
|
12
|
+
return (_jsxs("div", { className: classNames(Styles.sideNav, expanded ? Styles.sideNavExpanded : Styles.sideNavSlim, className), id: id, "data-cy": "side-navigation", children: [!!(itemsTop === null || itemsTop === void 0 ? void 0 : itemsTop.length) && (_jsxs(Fragment, { children: [_jsx("div", { className: Styles.sideNavTop, "data-cy": "navigation-items-top", children: itemsTop.map(item => (_jsx(SideNavigationItem, { expanded: expanded, navigationComponent: navigationComponent, ...item }, item.id))) }), _jsx("div", { className: Styles.divider })] })), _jsx("div", { className: Styles.sideNavContent, "data-cy": "navigation-items", children: items === null || items === void 0 ? void 0 : items.map(item => (_jsx(SideNavigationItem, { expanded: expanded, navigationComponent: navigationComponent, ...item }, item.id))) }), _jsx("div", { className: Styles.sideNavBottom, children: _jsx(SideNavigationOptionsToggle, { expanded: expanded, onExpandedChange: onExpandedChange }) })] }));
|
|
13
13
|
};
|
|
14
14
|
/** Side Navigation menu item */
|
|
15
15
|
const SideNavigationItem = ({ id, to, title, hint, counter, className, iconClassName, iconComponent: IconComponent, icon, iconActive, isActive, navigationComponent: NavigationComponent, expanded, }) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"side-navigation.js","sourceRoot":"","sources":["../../../src/components/left-navigation/side-navigation.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,WAAW,MAAM,6DAA6D,CAAC;AACtF,OAAO,SAAS,MAAM,2DAA2D,CAAC;AAClF,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAM,QAAQ,EAAE,MAAM,OAAO,CAAC;AAErC,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,KAAK,MAAM,MAAM,+BAA+B,CAAC;AAmBxD,MAAM,CAAC,MAAM,cAAc,GAA4B,CAAC,EACpD,SAAS,EACT,QAAQ,EACR,EAAE,EACF,KAAK,EACL,QAAQ,EACR,mBAAmB,GAAG,uBAAuB,EAC7C,gBAAgB,GACnB,EAAE,EAAE;IACD,OAAO,CACH,eACI,SAAS,EAAE,UAAU,CACjB,MAAM,CAAC,OAAO,EACd,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,CAAC,MAAM,CAAC,WAAW,EACtD,SAAS,CACZ,EACD,EAAE,EAAE,EAAE,aACE,iBAAiB,aAExB,CAAC,CAAC,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,MAAM,CAAA,IAAI,CACnB,MAAC,QAAQ,eACL,cAAK,SAAS,EAAE,MAAM,CAAC,UAAU,aAAU,sBAAsB,YAC5D,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAClB,KAAC,kBAAkB,
|
|
1
|
+
{"version":3,"file":"side-navigation.js","sourceRoot":"","sources":["../../../src/components/left-navigation/side-navigation.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,WAAW,MAAM,6DAA6D,CAAC;AACtF,OAAO,SAAS,MAAM,2DAA2D,CAAC;AAClF,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAM,QAAQ,EAAE,MAAM,OAAO,CAAC;AAErC,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,KAAK,MAAM,MAAM,+BAA+B,CAAC;AAmBxD,MAAM,CAAC,MAAM,cAAc,GAA4B,CAAC,EACpD,SAAS,EACT,QAAQ,EACR,EAAE,EACF,KAAK,EACL,QAAQ,EACR,mBAAmB,GAAG,uBAAuB,EAC7C,gBAAgB,GACnB,EAAE,EAAE;IACD,OAAO,CACH,eACI,SAAS,EAAE,UAAU,CACjB,MAAM,CAAC,OAAO,EACd,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,CAAC,MA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rC,MAAM,CAAC,MAAM,2BAA2B,GAGnC,CAAC,EAAE,QAAQ,EAAE,gBAAgB,EAAE,EAAE,EAAE,CACpC,WAAW,CACP,0BACY,yBAAyB,gBACtB,yBAAyB,EACpC,SAAS,EAAE,UAAU,CAAC,MAAM,CAAC,WAAW,CAAC,EACzC,OAAO,EAAE,GAAG,EAAE,CAAC,gBAAgB,CAAC,CAAC,QAAQ,CAAC,aAE1C,cAAK,SAAS,EAAE,MAAM,CAAC,kBAAkB,YACrC,KAAC,IAAI,IAAC,SAAS,EAAE,MAAM,CAAC,WAAW,EAAE,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,GAAI,GAC9E,EAEL,CAAC,CAAC,QAAQ,IAAI,eAAM,SAAS,EAAE,MAAM,CAAC,eAAe,8BAAsB,IAC1E,EACN,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,aAAa,EACpC,OAAO,CACV,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"side-navigation.stories.d.ts","sourceRoot":"","sources":["../../../src/components/left-navigation/side-navigation.stories.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"side-navigation.stories.d.ts","sourceRoot":"","sources":["../../../src/components/left-navigation/side-navigation.stories.tsx"],"names":[],"mappings":";;;;;;AAYA,wBAKE;AAEF,eAAO,MAAM,qBAAqB,+CA0BjC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useState } from 'react';
|
|
3
|
-
import { NavLinkMock, items, withAnvil, withMemoryRouter } from '../../test/data
|
|
3
|
+
import { NavLinkMock, items, withAnvil, withMemoryRouter } from '../../test/data';
|
|
4
4
|
import { SideNavigation } from './';
|
|
5
5
|
const layout = (Story) => {
|
|
6
6
|
return (_jsxs("div", { className: "d-f border", style: { height: '800px' }, children: [_jsx(Story, {}), _jsx("div", { className: "flex-grow-1 flex-basis-0" })] }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"side-navigation.stories.js","sourceRoot":"","sources":["../../../src/components/left-navigation/side-navigation.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAiB,QAAQ,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"side-navigation.stories.js","sourceRoot":"","sources":["../../../src/components/left-navigation/side-navigation.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAiB,QAAQ,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAClF,OAAO,EAAE,cAAc,EAAE,MAAM,IAAI,CAAC;AAEpC,MAAM,MAAM,GAAG,CAAC,KAAoB,EAAE,EAAE;IACpC,OAAO,CACH,eAAK,SAAS,EAAC,YAAY,EAAC,KAAK,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,aAClD,KAAC,KAAK,KAAG,EACT,cAAK,SAAS,EAAC,0BAA0B,GAAG,IAC1C,CACT,CAAC;AACN,CAAC,CAAC;AACF,eAAe;IACX,KAAK,EAAE,2BAA2B;IAClC,SAAS,EAAE,cAAc;IACzB,UAAU,EAAE,CAAC,MAAM,EAAE,gBAAgB,EAAE,SAAS,CAAC;IACjD,UAAU,EAAE,EAAE;CACjB,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,EAAE;IACtC,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAChD,OAAO,CACH,KAAC,cAAc,IACX,mBAAmB,EAAE,WAAW,EAChC,QAAQ,EAAE,QAAQ,EAClB,gBAAgB,EAAE,WAAW,EAC7B,KAAK,EAAE;YACH,KAAK,CAAC,SAAS;YACf,KAAK,CAAC,QAAQ;YACd,KAAK,CAAC,KAAK;YACX,KAAK,CAAC,UAAU;YAChB,KAAK,CAAC,QAAQ;YAEd,KAAK,CAAC,KAAK;YACX,KAAK,CAAC,SAAS;YACf,KAAK,CAAC,SAAS;YAEf,KAAK,CAAC,SAAS;YACf,KAAK,CAAC,SAAS;YACf,KAAK,CAAC,WAAW;YACjB,KAAK,CAAC,OAAO;SAChB,EACD,QAAQ,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,GACzB,CACL,CAAC;AACN,CAAC,CAAC"}
|
package/dist/components/links.js
CHANGED
|
@@ -5,10 +5,10 @@ import { HeaderNavigationLink as HeaderNavigationLinkLegacy, HeaderNavigationTri
|
|
|
5
5
|
import { HeaderNavigationLink as HeaderNavigationLinkModern, HeaderNavigationTrigger as HeaderNavigationTriggerModern, } from './left-navigation/header-navigation-tiny-links';
|
|
6
6
|
export const HeaderNavigationLink = props => {
|
|
7
7
|
const isLegacy = useContext(NavigationLegacyContext);
|
|
8
|
-
return isLegacy ? (_jsx(HeaderNavigationLinkLegacy,
|
|
8
|
+
return isLegacy ? (_jsx(HeaderNavigationLinkLegacy, { ...props })) : (_jsx(HeaderNavigationLinkModern, { ...props }));
|
|
9
9
|
};
|
|
10
10
|
export const HeaderNavigationTrigger = props => {
|
|
11
11
|
const isLegacy = useContext(NavigationLegacyContext);
|
|
12
|
-
return isLegacy ? (_jsx(HeaderNavigationTriggerLegacy,
|
|
12
|
+
return isLegacy ? (_jsx(HeaderNavigationTriggerLegacy, { ...props })) : (_jsx(HeaderNavigationTriggerModern, { ...props }));
|
|
13
13
|
};
|
|
14
14
|
//# sourceMappingURL=links.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"links.js","sourceRoot":"","sources":["../../src/components/links.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAM,UAAU,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,uBAAuB,EA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CAC/C,CAAC,CAAC,CAAC,CACA,KAAC,6BAA6B,OAAK,KAAK,GAAI,CAC/C,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -8,6 +8,6 @@ export const LogoTitanSvg = props => {
|
|
|
8
8
|
};
|
|
9
9
|
const fill = (_c = props.fill) !== null && _c !== void 0 ? _c : '#3A3A3A';
|
|
10
10
|
const mantleFill = (_d = props.mantleFill) !== null && _d !== void 0 ? _d : fill;
|
|
11
|
-
return (_jsxs("svg",
|
|
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" }), _jsxs("g", { transform: "translate(0 66)", children: [_jsx("mask", { 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
12
|
};
|
|
13
13
|
//# sourceMappingURL=logo-titan.js.map
|
|
@@ -1 +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,
|
|
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,aAAG,SAAS,EAAC,iBAAiB,aAC1B,eAAM,EAAE,EAAC,GAAG,EAAC,IAAI,EAAC,MAAM,YACpB,cAAK,SAAS,EAAC,IAAI,GAAG,GACnB,EACP,eACI,IAAI,EAAE,UAAU,EAChB,CAAC,EAAC,wQAAwQ,EAC1Q,IAAI,EAAC,SAAS,GAChB,IACF,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"}
|
|
@@ -5,10 +5,10 @@ declare const _default: {
|
|
|
5
5
|
parameters: {};
|
|
6
6
|
};
|
|
7
7
|
export default _default;
|
|
8
|
-
export declare const
|
|
9
|
-
export declare const
|
|
10
|
-
export declare const
|
|
11
|
-
export declare const
|
|
12
|
-
export declare const
|
|
13
|
-
export declare const
|
|
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
14
|
//# sourceMappingURL=logo.stories.d.ts.map
|
|
@@ -1 +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,
|
|
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"}
|
|
@@ -8,13 +8,13 @@ export default {
|
|
|
8
8
|
component: LogoTitan,
|
|
9
9
|
parameters: {},
|
|
10
10
|
};
|
|
11
|
-
export const
|
|
12
|
-
export const
|
|
13
|
-
export const
|
|
14
|
-
export const
|
|
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
15
|
const NavLinkMock = ({ className, children }) => (_jsx("a", { href: "/", onClick: e => {
|
|
16
16
|
e.preventDefault();
|
|
17
17
|
}, className: className, children: children }));
|
|
18
|
-
export const
|
|
19
|
-
export const
|
|
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
20
|
//# sourceMappingURL=logo.stories.js.map
|
|
@@ -1 +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,MAA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C,UAAU,EAAC,SAAS,EACpB,KAAK,EAAC,YAAY,EAClB,WAAW,EAAC,oCAAoC,EAChD,WAAW,EAAE,WAAW,GAC1B,CACL,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,EAAE,CAAC,CAC/B,MAAC,KAAK,IAAC,SAAS,EAAC,uBAAuB,EAAC,UAAU,EAAC,QAAQ,aACxD,KAAC,SAAS,IAAC,SAAS,EAAC,mBAAmB,EAAC,UAAU,EAAC,SAAS,GAAG,EAChE,KAAC,cAAc,IAAC,SAAS,EAAC,wBAAwB,+BAAgC,EAClF,KAAC,GAAG,IAAC,KAAK,EAAC,MAAM,oBAAU,IACvB,CACX,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export * from './profile-dropdown.stories';
|
|
2
1
|
declare const _default: {
|
|
3
2
|
title: string;
|
|
4
3
|
component: import("./profile-dropdown").ProfileDropdownType;
|
|
@@ -6,4 +5,5 @@ declare const _default: {
|
|
|
6
5
|
decorators: ((Story: any) => import("react/jsx-runtime").JSX.Element)[];
|
|
7
6
|
};
|
|
8
7
|
export default _default;
|
|
8
|
+
export { ProfileDropdownDefault, ProfileDropdownWithBothBadges, ProfileDropdownWithCounter, ProfileDropdownWithErrorLogo, ProfileDropdownWithInfo, ProfileDropdownWithHintAndInfoPopup, ProfileDropdownWithHintPopup, ProfileDropdownWithLogo, } from './profile-dropdown.stories';
|
|
9
9
|
//# sourceMappingURL=profile-dropdown-stacked.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profile-dropdown-stacked.stories.d.ts","sourceRoot":"","sources":["../../../src/components/profile-dropdown/profile-dropdown-stacked.stories.tsx"],"names":[],"mappings":"
|
|
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"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { withAnvil, withMemoryRouter } from '../../test/data
|
|
2
|
+
import { withAnvil, withMemoryRouter } from '../../test/data';
|
|
3
3
|
import { HeaderNavigationStacked } from '../header-navigation';
|
|
4
|
-
export * from './profile-dropdown.stories';
|
|
5
4
|
import { ProfileDropdown } from './profile-dropdown';
|
|
6
5
|
const withHeaderNavigationStacked = (Story) => _jsx(HeaderNavigationStacked, { right: _jsx(Story, {}) });
|
|
7
6
|
export default {
|
|
8
|
-
title: 'Navigation/
|
|
7
|
+
title: 'Navigation/ProfileDropdown/Stacked',
|
|
9
8
|
component: ProfileDropdown,
|
|
10
9
|
parameters: {},
|
|
11
10
|
decorators: [withMemoryRouter, withAnvil, withHeaderNavigationStacked],
|
|
12
11
|
};
|
|
12
|
+
export { ProfileDropdownDefault, ProfileDropdownWithBothBadges, ProfileDropdownWithCounter, ProfileDropdownWithErrorLogo, ProfileDropdownWithInfo, ProfileDropdownWithHintAndInfoPopup, ProfileDropdownWithHintPopup, ProfileDropdownWithLogo, } from './profile-dropdown.stories';
|
|
13
13
|
//# sourceMappingURL=profile-dropdown-stacked.stories.js.map
|
|
@@ -1 +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,
|
|
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"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export * from './profile-dropdown.stories';
|
|
2
1
|
declare const _default: {
|
|
3
2
|
title: string;
|
|
4
3
|
component: import("./profile-dropdown").ProfileDropdownType;
|
|
@@ -6,4 +5,5 @@ declare const _default: {
|
|
|
6
5
|
decorators: ((Story: any) => import("react/jsx-runtime").JSX.Element)[];
|
|
7
6
|
};
|
|
8
7
|
export default _default;
|
|
8
|
+
export { ProfileDropdownDefault, ProfileDropdownWithBothBadges, ProfileDropdownWithCounter, ProfileDropdownWithErrorLogo, ProfileDropdownWithInfo, ProfileDropdownWithHintAndInfoPopup, ProfileDropdownWithHintPopup, ProfileDropdownWithLogo, } from './profile-dropdown.stories';
|
|
9
9
|
//# sourceMappingURL=profile-dropdown-tiny.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profile-dropdown-tiny.stories.d.ts","sourceRoot":"","sources":["../../../src/components/profile-dropdown/profile-dropdown-tiny.stories.tsx"],"names":[],"mappings":"
|
|
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"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { withAnvil, withMemoryRouter } from '../../test/data
|
|
2
|
+
import { withAnvil, withMemoryRouter } from '../../test/data';
|
|
3
3
|
import { HeaderNavigationTiny } from '../left-navigation';
|
|
4
|
-
export * from './profile-dropdown.stories';
|
|
5
4
|
import { ProfileDropdown } from './profile-dropdown';
|
|
6
5
|
const withHeaderNavigationTiny = (Story) => (_jsx(HeaderNavigationTiny, { className: "border", right: _jsx(Story, {}) }));
|
|
7
6
|
export default {
|
|
8
|
-
title: 'Navigation/
|
|
7
|
+
title: 'Navigation/ProfileDropdown/Tiny',
|
|
9
8
|
component: ProfileDropdown,
|
|
10
9
|
parameters: {},
|
|
11
10
|
decorators: [withMemoryRouter, withAnvil, withHeaderNavigationTiny],
|
|
12
11
|
};
|
|
12
|
+
export { ProfileDropdownDefault, ProfileDropdownWithBothBadges, ProfileDropdownWithCounter, ProfileDropdownWithErrorLogo, ProfileDropdownWithInfo, ProfileDropdownWithHintAndInfoPopup, ProfileDropdownWithHintPopup, ProfileDropdownWithLogo, } from './profile-dropdown.stories';
|
|
13
13
|
//# sourceMappingURL=profile-dropdown-tiny.stories.js.map
|
|
@@ -1 +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,
|
|
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"}
|
|
@@ -1,14 +1,3 @@
|
|
|
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
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
2
|
import { Icon } from '@servicetitan/anvil2';
|
|
14
3
|
import SvgExpandLess from '@servicetitan/anvil2/assets/icons/material/round/expand_less.svg';
|
|
@@ -40,10 +29,9 @@ const ProfileDropdownTrigger = ({ avatarBadge, badge, className, hintArrow, imag
|
|
|
40
29
|
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, {
|
|
41
30
|
[Styles.triggerContainerHintArrow]: hintArrow,
|
|
42
31
|
[Styles.triggerContainerLegacy]: isLegacy,
|
|
43
|
-
}, 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(
|
|
32
|
+
}, 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 }))] }));
|
|
44
33
|
};
|
|
45
|
-
export const ProfileDropdownSection = (
|
|
46
|
-
var { children, className, id, onClick } = _a, rest = __rest(_a, ["children", "className", "id", "onClick"]);
|
|
34
|
+
export const ProfileDropdownSection = ({ children, className, id, onClick, ...rest }) => {
|
|
47
35
|
const clickHandler = e => {
|
|
48
36
|
if (onClick) {
|
|
49
37
|
onClick(e);
|
|
@@ -52,11 +40,10 @@ export const ProfileDropdownSection = (_a) => {
|
|
|
52
40
|
e.stopPropagation();
|
|
53
41
|
}
|
|
54
42
|
};
|
|
55
|
-
return (_jsx("div",
|
|
43
|
+
return (_jsx("div", { className: classNames(Styles.dropdownSection, className), onClick: clickHandler, "data-cy": `profile-dropdown-section-${id}`, "data-pendo": `profile-dropdown-section-${id}`, ...rest, children: children }));
|
|
56
44
|
};
|
|
57
45
|
export const ProfileDropdownDivider = Popover.Divider;
|
|
58
|
-
export const ProfileDropdownLink = (
|
|
59
|
-
var { children, className, counter, external, id, target, to, onClick } = _a, rest = __rest(_a, ["children", "className", "counter", "external", "id", "target", "to", "onClick"]);
|
|
46
|
+
export const ProfileDropdownLink = ({ children, className, counter, external, id, target, to, onClick, ...rest }) => {
|
|
60
47
|
const NavigationComponent = useContext(NavigationComponentContext);
|
|
61
48
|
const clickHandler = (e) => {
|
|
62
49
|
e.preventDefault();
|
|
@@ -64,7 +51,7 @@ export const ProfileDropdownLink = (_a) => {
|
|
|
64
51
|
};
|
|
65
52
|
const isExternalLink = external !== null && external !== void 0 ? external : to === null || to === void 0 ? void 0 : to.startsWith('http');
|
|
66
53
|
const counterElement = useMemo(() => _jsx(CounterTag, { data: counter, className: Styles.counter }), [counter]);
|
|
67
|
-
return isExternalLink ? (_jsxs("a",
|
|
54
|
+
return isExternalLink ? (_jsxs("a", { className: classNames(Styles.dropdownSection, Styles.dropdownLink, className), href: to, target: target, "data-cy": `profile-dropdown-link-${id}`, "data-pendo": `profile-dropdown-link-${id}`, ...rest, children: [children, counterElement] })) : to ? (_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, counterElement] })) : (_jsxs("a", { className: classNames(Styles.dropdownSection, Styles.dropdownLink, className), onClick: clickHandler, "data-cy": `profile-dropdown-link-${id}`, "data-pendo": `profile-dropdown-link-${id}`, ...rest, children: [children, counterElement] }));
|
|
68
55
|
};
|
|
69
56
|
export const ProfileDropdown = (({ children, className, direction, hintPopup, onClose, onOpen, portal, trigger, width, }) => {
|
|
70
57
|
var _a;
|
|
@@ -89,7 +76,7 @@ export const ProfileDropdown = (({ children, className, direction, hintPopup, on
|
|
|
89
76
|
}, [open, onOpen, onClose]);
|
|
90
77
|
const hintShown = !!hintPopup && !open;
|
|
91
78
|
const HintComponent = hintPopup === null || hintPopup === void 0 ? void 0 : hintPopup.content;
|
|
92
|
-
const triggerElement = (_jsx(ProfileDropdownTrigger,
|
|
79
|
+
const triggerElement = (_jsx(ProfileDropdownTrigger, { ...trigger, onClick: children ? onTriggerClick : undefined, hintArrow: hintShown, open: open }));
|
|
93
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 }) })) }));
|
|
94
81
|
});
|
|
95
82
|
ProfileDropdown.Divider = ProfileDropdownDivider;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profile-dropdown.js","sourceRoot":"","sources":["../../../src/components/profile-dropdown/profile-dropdown.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"profile-dropdown.js","sourceRoot":"","sources":["../../../src/components/profile-dropdown/profile-dropdown.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,aAAa,MAAM,kEAAkE,CAAC;AAC7F,OAAO,aAAa,MAAM,kEAAkE,CAAC;AAC7F,OAAO,gBAAgB,MAAM,8DAA8D,CAAC;AAC5F,OAAO,kBAAkB,MAAM,gEAAgE,CAAC;AAChG,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAsB,MAAM,6BAA6B,CAAC;AACpF,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAMH,WAAW,EACX,UAAU,EACV,SAAS,EACT,OAAO,EACP,QAAQ,GACX,MAAM,OAAO,CAAC;AAEf,OAAO,EACH,0BAA0B,EAC1B,uBAAuB,GAC1B,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,UAAU,EAAuB,MAAM,gBAAgB,CAAC;AACjE,OAAO,KAAK,MAAM,MAAM,gCAAgC,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAg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58
|
+
|
|
53
59
|
&.trigger-container-legacy {
|
|
54
60
|
.avatar-badge {
|
|
55
61
|
left: 0;
|
|
56
62
|
}
|
|
63
|
+
.badge {
|
|
64
|
+
right: 12px;
|
|
65
|
+
}
|
|
57
66
|
}
|
|
58
67
|
|
|
59
68
|
&.trigger-container-hint-arrow:first-child:before {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Button } from '@servicetitan/design-system';
|
|
3
|
-
import { withAnvil, withMemoryRouter } from '../../test/data
|
|
3
|
+
import { withAnvil, withMemoryRouter } from '../../test/data';
|
|
4
4
|
import { HeaderNavigation } from '../header-navigation';
|
|
5
5
|
import { ProfileDropdown } from './profile-dropdown';
|
|
6
6
|
const withHeaderNavigation = (Story) => (_jsx(HeaderNavigation, { children: _jsx(Story, {}) }));
|
|
7
7
|
export default {
|
|
8
|
-
title: 'Navigation/ProfileDropdown',
|
|
8
|
+
title: 'Navigation/ProfileDropdown/Legacy',
|
|
9
9
|
component: ProfileDropdown,
|
|
10
10
|
parameters: {},
|
|
11
11
|
decorators: [withMemoryRouter, withAnvil, withHeaderNavigation],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profile-dropdown.stories.js","sourceRoot":"","sources":["../../../src/components/profile-dropdown/profile-dropdown.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"profile-dropdown.stories.js","sourceRoot":"","sources":["../../../src/components/profile-dropdown/profile-dropdown.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MA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;QACP,SAAS,EAAE,uBAAuB;QAClC,OAAO,EAAE,CAAC,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC,CAC1B,mCACU,GAAG,EACT,KAAC,MAAM,IAAC,OAAO,EAAE,WAAW,EAAE,IAAI,EAAC,QAAQ,wBAElC,IACP,CACT;QACD,KAAK,EAAE,GAAG;QACV,OAAO,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,6BAA6B,CAAC;KACpD,EACD,MAAM,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,uBAAuB,CAAC,EAC1C,OAAO,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,wBAAwB,CAAC,aAE5C,KAAC,eAAe,CAAC,IAAI,IAAC,EAAE,EAAC,OAAO,EAAC,EAAE,EAAC,oBAAoB,2BAEjC,EACvB,KAAC,eAAe,CAAC,OAAO,KAAG,EAC3B,KAAC,eAAe,CAAC,OAAO,IAAC,EAAE,EAAC,QAAQ,4BAAsC,IAC5D,CACrB,CAAC;AAEF,MAAM,CAAC,MAAM,mCAAmC,GAAG,GAAG,EAAE,CAAC,CACrD,KAAC,eAAe,IACZ,OAAO,EAAE;QACL,WAAW,EAAE,YAAY;QACzB,KAAK,EAAE,EAAE,SAAS,EAAE,YAAY,EAAE;QAClC,IAAI,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,IAAI,EAAE;KAC3C,EACD,SAAS,EAAE;QACP,OAAO,EAAE,GAAG,EAAE,CAAC,kCAAgB;KAClC,GACH,CACL,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -7,5 +7,6 @@ export * from './components/counter-tag';
|
|
|
7
7
|
export * from './components/left-navigation';
|
|
8
8
|
export * from './components/links';
|
|
9
9
|
export * from './utils/navigation';
|
|
10
|
+
export { NavigationComponentContext } from './utils/navigation-context';
|
|
10
11
|
export * from './utils/with-tooltip';
|
|
11
12
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gDAAgD,CAAC;AAC/D,cAAc,sCAAsC,CAAC;AACrD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,mCAAmC,CAAC;AAClD,cAAc,0BAA0B,CAAC;AACzC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gDAAgD,CAAC;AAC/D,cAAc,sCAAsC,CAAC;AACrD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,mCAAmC,CAAC;AAClD,cAAc,0BAA0B,CAAC;AACzC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,OAAO,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;AACxE,cAAc,sBAAsB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -7,5 +7,6 @@ export * from './components/counter-tag';
|
|
|
7
7
|
export * from './components/left-navigation';
|
|
8
8
|
export * from './components/links';
|
|
9
9
|
export * from './utils/navigation';
|
|
10
|
+
export { NavigationComponentContext } from './utils/navigation-context';
|
|
10
11
|
export * from './utils/with-tooltip';
|
|
11
12
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gDAAgD,CAAC;AAC/D,cAAc,sCAAsC,CAAC;AACrD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,mCAAmC,CAAC;AAClD,cAAc,0BAA0B,CAAC;AACzC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gDAAgD,CAAC;AAC/D,cAAc,sCAAsC,CAAC;AACrD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,mCAAmC,CAAC;AAClD,cAAc,0BAA0B,CAAC;AACzC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,OAAO,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;AACxE,cAAc,sBAAsB,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { HeaderNavigationItemData, NavLinkComponentProps } from '../utils/navigation';
|
|
3
2
|
export declare const NavLinkMock: import("react").ForwardRefExoticComponent<Omit<NavLinkComponentProps, "ref"> & import("react").RefAttributes<any>>;
|
|
4
3
|
export declare const withMemoryRouter: (Story: any) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -23,4 +22,4 @@ export declare const items: {
|
|
|
23
22
|
tasks: HeaderNavigationItemData;
|
|
24
23
|
};
|
|
25
24
|
export declare const CallsNavigationTrigger: () => import("react/jsx-runtime").JSX.Element;
|
|
26
|
-
//# sourceMappingURL=data.
|
|
25
|
+
//# sourceMappingURL=data.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../src/test/data.tsx"],"names":[],"mappings":"AAwCA,OAAO,EAAE,wBAAwB,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAItF,eAAO,MAAM,WAAW,oHAwBvB,CAAC;AAEF,eAAO,MAAM,gBAAgB,UAAW,GAAG,4CAM1C,CAAC;AAEF,eAAO,MAAM,SAAS,UAAW,GAAG,4CAInC,CAAC;AAEF,eAAO,MAAM,aAAa,+CAKzB,CAAC;AAEF,eAAO,MAAM,UAAU,+CAetB,CAAC;AAeF,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;CA4EjB,CAAC;AAEF,eAAO,MAAM,sBAAsB,+CAuBlC,CAAC"}
|
|
@@ -1,14 +1,3 @@
|
|
|
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
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
2
|
import { AnvilProvider } from '@servicetitan/anvil2';
|
|
14
3
|
import SvgPhone from '@servicetitan/anvil2/assets/icons/material/round/phone_disabled.svg';
|
|
@@ -50,23 +39,30 @@ import { MemoryRouter, useHistory, useLocation } from 'react-router-dom';
|
|
|
50
39
|
import { HeaderNavigationTrigger } from '../components/links';
|
|
51
40
|
import { NavigationComponentContext } from '../utils/navigation-context';
|
|
52
41
|
import * as Styles from './data-stories.module.less';
|
|
53
|
-
export const NavLinkMock = forwardRef((
|
|
54
|
-
var { to, children, activeClassName, className, isActive } = _a, rest = __rest(_a, ["to", "children", "activeClassName", "className", "isActive"]);
|
|
42
|
+
export const NavLinkMock = forwardRef(({ to, children, activeClassName, className, isActive, ...rest }, ref) => {
|
|
55
43
|
const history = useHistory();
|
|
56
44
|
const location = useLocation();
|
|
57
45
|
const linkActive = location.pathname.replace('/', '') === to;
|
|
58
|
-
return (_jsx("a",
|
|
46
|
+
return (_jsx("a", { ...rest, className: classNames(className, linkActive ? activeClassName : ''), href: to, onClick: e => {
|
|
59
47
|
e.preventDefault();
|
|
60
48
|
if (!to.startsWith('http')) {
|
|
61
49
|
history.push(to);
|
|
62
50
|
}
|
|
63
|
-
}, ref: ref, children: children }))
|
|
51
|
+
}, ref: ref, children: children }));
|
|
64
52
|
});
|
|
65
53
|
export const withMemoryRouter = (Story) => (_jsx(MemoryRouter, { children: _jsx(NavigationComponentContext.Provider, { value: NavLinkMock, children: _jsx(Story, {}) }) }));
|
|
66
54
|
export const withAnvil = (Story) => (_jsx(AnvilProvider, { className: Styles.fixIcons, children: _jsx(Story, {}) }));
|
|
67
55
|
export const InventoryIcon = () => (_jsxs("svg", { width: "20", xmlns: "http://www.w3.org/2000/svg", viewBox: "-293 385 24 24", fill: "currentColor", children: [_jsx("polyline", { points: "-288,400.9 -282,404.3 -282,397.6 -288,394.2 -288,400.9 " }), _jsx("path", { d: "M-272,401.5c0,0.4-0.2,0.7-0.5,0.9l-7.9,4.4c-0.2,0.1-0.4,0.2-0.6,0.2s-0.4-0.1-0.6-0.2l-7.9-4.4c-0.3-0.2-0.5-0.5-0.5-0.9v-9c0-0.4,0.2-0.7,0.5-0.9l7.9-4.4c0.2-0.1,0.4-0.2,0.6-0.2s0.4,0.1,0.6,0.2l7.9,4.4c0.3,0.2,0.5,0.5,0.5,0.9V401.5 M-287,392.5 l6,3.4l5.9-3.3l-5.9-3.4L-287,392.5 M-274,400.9v-6.7l-6,3.4v6.7L-274,400.9z" })] }));
|
|
68
56
|
export const SearchIcon = () => (_jsx("svg", { width: "1em", height: "1em", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: _jsx("g", { transform: "translate(0,4)", children: _jsx("path", { d: "M0 15.7992V13.9992H12V15.7992H0ZM0 9.49922V7.69922H6V9.49922H0ZM0 3.19922V1.39922H6V3.19922H0ZM22.74 15.7992L17.94 10.9992C17.42 11.3992 16.86 11.6992 16.26 11.8992C15.66 12.0992 15.04 12.1992 14.4 12.1992C12.74 12.1992 11.325 11.6142 10.155 10.4442C8.985 9.27422 8.4 7.85922 8.4 6.19922C8.4 4.53922 8.985 3.12422 10.155 1.95422C11.325 0.784219 12.74 0.199219 14.4 0.199219C16.06 0.199219 17.475 0.784219 18.645 1.95422C19.815 3.12422 20.4 4.53922 20.4 6.19922C20.4 6.83922 20.3 7.45922 20.1 8.05922C19.9 8.65922 19.6 9.21922 19.2 9.73922L24 14.5392L22.74 15.7992ZM14.393 10.3992C15.5577 10.3992 16.55 9.99157 17.37 9.17627C18.19 8.36099 18.6 7.37099 18.6 6.20627C18.6 5.04157 18.1923 4.04922 17.377 3.22922C16.5618 2.40922 15.5718 1.99922 14.407 1.99922C13.2423 1.99922 12.25 2.40687 11.43 3.22217C10.61 4.03745 10.2 5.02745 10.2 6.19217C10.2 7.35687 10.6077 8.34922 11.423 9.16922C12.2382 9.98922 13.2282 10.3992 14.393 10.3992Z", fill: "white" }) }) }));
|
|
69
|
-
const getItem = (id, data) => (
|
|
57
|
+
const getItem = (id, data) => ({
|
|
58
|
+
id,
|
|
59
|
+
to: id,
|
|
60
|
+
title: id[0].toUpperCase() + id.substring(1),
|
|
61
|
+
hint: id,
|
|
62
|
+
icon: undefined,
|
|
63
|
+
iconActive: undefined,
|
|
64
|
+
...(data !== null && data !== void 0 ? data : {}),
|
|
65
|
+
});
|
|
70
66
|
export const items = {
|
|
71
67
|
calendar: getItem('calendar', {
|
|
72
68
|
iconName: 'event',
|
|
@@ -148,4 +144,4 @@ export const CallsNavigationTrigger = () => {
|
|
|
148
144
|
const [open, setOpen] = useState(false);
|
|
149
145
|
return (_jsx(Popover, { open: open, onClickOutside: () => setOpen(false), direction: "bl", trigger: _jsx(HeaderNavigationTrigger, { id: "dialpad", iconName: "phone", counter: 2, icon: SvgPhone, iconActive: SvgPhoneActive, onClick: () => setOpen(!open), isActive: open }), children: "calls content" }));
|
|
150
146
|
};
|
|
151
|
-
//# sourceMappingURL=data.
|
|
147
|
+
//# sourceMappingURL=data.js.map
|