@servicetitan/link-item 19.3.0 → 20.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.
package/dist/index.js CHANGED
@@ -1,15 +1,3 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
- }) : (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- o[k2] = m[k];
8
- }));
9
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
- };
12
- Object.defineProperty(exports, "__esModule", { value: true });
13
- __exportStar(require("./sidenav-link-item"), exports);
14
- __exportStar(require("./tab-link-item"), exports);
1
+ export * from './sidenav-link-item';
2
+ export * from './tab-link-item';
15
3
  //# 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,sDAAoC;AACpC,kDAAgC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC"}
@@ -1,16 +1,13 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SideNavLinkItem = void 0;
4
- const jsx_runtime_1 = require("react/jsx-runtime");
5
- const react_1 = require("react");
6
- const react_router_dom_1 = require("react-router-dom");
7
- const design_system_1 = require("@servicetitan/design-system");
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useMemo, useCallback } from 'react';
3
+ import { withRouter, matchPath } from 'react-router-dom';
4
+ import { SideNav } from '@servicetitan/design-system';
8
5
  const SideNavLinkItemUnwrapped = ({ exact, pathname, className, children, history, }) => {
9
- const href = (0, react_1.useMemo)(() => history.createHref({ pathname }), [history, pathname]);
10
- const handleClick = (0, react_1.useCallback)(() => {
6
+ const href = useMemo(() => history.createHref({ pathname }), [history, pathname]);
7
+ const handleClick = useCallback(() => {
11
8
  history.push(pathname);
12
9
  }, [history, pathname]);
13
- return ((0, jsx_runtime_1.jsx)(design_system_1.SideNav.Item, Object.assign({ href: href, active: !!(0, react_router_dom_1.matchPath)(history.location.pathname, { exact, path: pathname }), onClick: handleClick, className: className }, { children: children }), void 0));
10
+ return (_jsx(SideNav.Item, Object.assign({ href: href, active: !!matchPath(history.location.pathname, { exact, path: pathname }), onClick: handleClick, className: className }, { children: children }), void 0));
14
11
  };
15
- exports.SideNavLinkItem = (0, react_router_dom_1.withRouter)(SideNavLinkItemUnwrapped);
12
+ export const SideNavLinkItem = withRouter(SideNavLinkItemUnwrapped);
16
13
  //# sourceMappingURL=sidenav-link-item.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"sidenav-link-item.js","sourceRoot":"","sources":["../src/sidenav-link-item.tsx"],"names":[],"mappings":";;;;AAAA,iCAAiD;AACjD,uDAA8E;AAE9E,+DAAsD;AAQtD,MAAM,wBAAwB,GAAmD,CAAC,EAC9E,KAAK,EACL,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,OAAO,GACV,EAAE,EAAE;IACD,MAAM,IAAI,GAAG,IAAA,eAAO,EAAC,GAAG,EAAE,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC;IAElF,MAAM,WAAW,GAAG,IAAA,mBAAW,EAAC,GAAG,EAAE;QACjC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC3B,CAAC,EAAE,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC;IAExB,OAAO,CACH,uBAAC,uBAAO,CAAC,IAAI,kBACT,IAAI,EAAE,I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QAAQ,YACE,CAClB,CAAC;AACN,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG,UAAU,CAAC,wBAAwB,CAAC,CAAC"}
@@ -1,16 +1,13 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TabLinkItem = void 0;
4
- const jsx_runtime_1 = require("react/jsx-runtime");
5
- const react_1 = require("react");
6
- const react_router_dom_1 = require("react-router-dom");
7
- const design_system_1 = require("@servicetitan/design-system");
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useMemo, useCallback } from 'react';
3
+ import { withRouter, matchPath } from 'react-router-dom';
4
+ import { Tab } from '@servicetitan/design-system';
8
5
  const TabLinkItemUnwrapped = ({ exact, pathname, className, children, history, }) => {
9
- const href = (0, react_1.useMemo)(() => history.createHref({ pathname }), [history, pathname]);
10
- const handleClick = (0, react_1.useCallback)(() => {
6
+ const href = useMemo(() => history.createHref({ pathname }), [history, pathname]);
7
+ const handleClick = useCallback(() => {
11
8
  history.push(pathname);
12
9
  }, [history, pathname]);
13
- return ((0, jsx_runtime_1.jsx)(design_system_1.Tab, Object.assign({ href: href, active: !!(0, react_router_dom_1.matchPath)(history.location.pathname, { exact, path: pathname }), onClick: handleClick, className: className }, { children: children }), void 0));
10
+ return (_jsx(Tab, Object.assign({ href: href, active: !!matchPath(history.location.pathname, { exact, path: pathname }), onClick: handleClick, className: className }, { children: children }), void 0));
14
11
  };
15
- exports.TabLinkItem = (0, react_router_dom_1.withRouter)(TabLinkItemUnwrapped);
12
+ export const TabLinkItem = withRouter(TabLinkItemUnwrapped);
16
13
  //# sourceMappingURL=tab-link-item.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tab-link-item.js","sourceRoot":"","sources":["../src/tab-link-item.tsx"],"names":[],"mappings":";;;;AAAA,iCAAiD;AACjD,uDAA8E;AAE9E,+DAAkD;AAQlD,MAAM,oBAAoB,GAA+C,CAAC,EACtE,KAAK,EACL,QAAQ,EACR,SAAS,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ElF,MAAM,WAAW,GAAG,WAAW,CAAC,GAAG,EAAE;QACjC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC3B,CAAC,EAAE,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC;IAExB,OAAO,CACH,KAAC,GAAG,kBACA,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,QAAQ,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,EACzE,OAAO,EAAE,WAAW,EACpB,SAAS,EAAE,SAAS,gBAEnB,QAAQ,YACP,CACT,CAAC;AACN,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,UAAU,CAAC,oBAAoB,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@servicetitan/link-item",
3
- "version": "19.3.0",
3
+ "version": "20.1.0",
4
4
  "description": "",
5
5
  "homepage": "https://docs.st.dev/docs/frontend/link-item",
6
6
  "repository": {
@@ -10,20 +10,21 @@
10
10
  },
11
11
  "main": "./dist/index.js",
12
12
  "typings": "./dist/index.d.ts",
13
+ "sideEffects": false,
13
14
  "files": [
14
15
  "dist",
15
16
  "src"
16
17
  ],
17
18
  "devDependencies": {
18
- "@servicetitan/design-system": "~10.6.0",
19
- "@types/history": "~4.7.9",
20
- "@types/react": "~17.0.37",
19
+ "@servicetitan/design-system": "~11.2.0",
20
+ "@types/history": "~4.7.10",
21
+ "@types/react": "~17.0.38",
21
22
  "@types/react-router": "~5.1.17",
22
23
  "react": "~17.0.2",
23
24
  "react-router-dom": "~5.3.0"
24
25
  },
25
26
  "peerDependencies": {
26
- "@servicetitan/design-system": "~10.6.0",
27
+ "@servicetitan/design-system": "~11.2.0",
27
28
  "react": "~17.0.2",
28
29
  "react-router-dom": "~5.3.0"
29
30
  },
@@ -33,5 +34,5 @@
33
34
  "cli": {
34
35
  "webpack": false
35
36
  },
36
- "gitHead": "c2541cf4d4dc01064f7d327370a90f7b4d107a0e"
37
+ "gitHead": "aec207a72396ff91bb8aee9693ba2c13f9480f83"
37
38
  }