myrentokil-components-library 1.0.39 → 1.0.42

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.
@@ -4,11 +4,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const react_1 = __importDefault(require("react"));
7
- const spinner = require('../../../assets/images/svg/spinner.svg');
7
+ // const spinner = require('../../../assets/images/svg/spinner.svg') as string;
8
8
  const styled_components_1 = __importDefault(require("styled-components"));
9
9
  const LoadingSpinner = ({ show = false }) => {
10
10
  return show ? (react_1.default.createElement(LoadingSpinnerWrapper, null,
11
- react_1.default.createElement("img", { src: spinner, alt: "spinner" }))) : null;
11
+ react_1.default.createElement("div", null, "spinner"))) : null;
12
12
  };
13
13
  const LoadingSpinnerWrapper = styled_components_1.default.div `
14
14
  align-items: center;
@@ -1 +1 @@
1
- {"version":3,"file":"LoadingSpinner.js","sourceRoot":"","sources":["../../../../../src/components/atoms/LoadingSpinner/LoadingSpinner.tsx"],"names":[],"mappings":";;;;;AAAA,kDAA0B;AAC1B,MAAM,OAAO,GAAG,OAAO,CAAC,wCAAwC,CAAW,CAAC;AAC5E,0EAAuC;AASvC,MAAM,cAAc,GAAG,CAAC,EAAE,IAAI,GAAG,KAAK,EAAuB,EAAE,EAAE;IAC7D,OAAO,IAAI,CAAC,CAAC,CAAC,CACV,8BAAC,qBAAqB;QAClB,uCAAK,GAAG,EAAE,OAAO,EAAE,GAAG,EAAC,SAAS,GAAG,CACf,CAC3B,CAAC,CAAC,CAAC,IAAI,CAAC;AACb,CAAC,CAAC;AAEF,MAAM,qBAAqB,GAAG,2BAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;CAYvC,CAAC;AAEF,kBAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"LoadingSpinner.js","sourceRoot":"","sources":["../../../../../src/components/atoms/LoadingSpinner/LoadingSpinner.tsx"],"names":[],"mappings":";;;;;AAAA,kDAA0B;AAC1B,+EAA+E;AAC/E,0EAAuC;AASvC,MAAM,cAAc,GAAG,CAAC,EAAE,IAAI,GAAG,KAAK,EAAuB,EAAE,EAAE;IAC7D,OAAO,IAAI,CAAC,CAAC,CAAC,CACV,8BAAC,qBAAqB;QAElB,qDAAkB,CACE,CAC3B,CAAC,CAAC,CAAC,IAAI,CAAC;AACb,CAAC,CAAC;AAEF,MAAM,qBAAqB,GAAG,2BAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;CAYvC,CAAC;AAEF,kBAAe,cAAc,CAAC"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const react_1 = __importDefault(require("react"));
7
+ const react_2 = require("@testing-library/react");
8
+ const LoadingSpinner_1 = __importDefault(require("./LoadingSpinner"));
9
+ describe('LoadingSpinner', () => {
10
+ it('renders the loading component', () => {
11
+ (0, react_2.render)(react_1.default.createElement(LoadingSpinner_1.default, null));
12
+ });
13
+ });
14
+ //# sourceMappingURL=LoadingSpinner.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LoadingSpinner.test.js","sourceRoot":"","sources":["../../../../../src/components/atoms/LoadingSpinner/LoadingSpinner.test.tsx"],"names":[],"mappings":";;;;;AAAA,kDAA0B;AAC1B,kDAAgD;AAChD,sEAA8C;AAE9C,QAAQ,CAAC,gBAAgB,EAAE,GAAG,EAAE;IAC5B,EAAE,CAAC,+BAA+B,EAAE,GAAG,EAAE;QACrC,IAAA,cAAM,EAAC,8BAAC,wBAAc,OAAG,CAAC,CAAC;IAC/B,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
@@ -1,11 +1,16 @@
1
- import React from 'react';
2
- const spinner = require('../../../assets/images/svg/spinner.svg');
3
- import styled from 'styled-components';
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const react_1 = __importDefault(require("react"));
7
+ // const spinner = require('../../../assets/images/svg/spinner.svg') as string;
8
+ const styled_components_1 = __importDefault(require("styled-components"));
4
9
  const LoadingSpinner = ({ show = false }) => {
5
- return show ? (React.createElement(LoadingSpinnerWrapper, null,
6
- React.createElement("img", { src: spinner, alt: "spinner" }))) : null;
10
+ return show ? (react_1.default.createElement(LoadingSpinnerWrapper, null,
11
+ react_1.default.createElement("div", null, "spinner"))) : null;
7
12
  };
8
- const LoadingSpinnerWrapper = styled.div `
13
+ const LoadingSpinnerWrapper = styled_components_1.default.div `
9
14
  align-items: center;
10
15
  bottom: 0;
11
16
  display: flex;
@@ -18,5 +23,5 @@ const LoadingSpinnerWrapper = styled.div `
18
23
  width: 100%;
19
24
  z-index: 9999;
20
25
  `;
21
- export default LoadingSpinner;
26
+ exports.default = LoadingSpinner;
22
27
  //# sourceMappingURL=LoadingSpinner.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"LoadingSpinner.js","sourceRoot":"","sources":["../../../../../src/components/atoms/LoadingSpinner/LoadingSpinner.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,MAAM,OAAO,GAAG,OAAO,CAAC,wCAAwC,CAAW,CAAC;AAC5E,OAAO,MAAM,MAAM,mBAAmB,CAAC;AASvC,MAAM,cAAc,GAAG,CAAC,EAAE,IAAI,GAAG,KAAK,EAAuB,EAAE,EAAE;IAC7D,OAAO,IAAI,CAAC,CAAC,CAAC,CACV,oBAAC,qBAAqB;QAClB,6BAAK,GAAG,EAAE,OAAO,EAAE,GAAG,EAAC,SAAS,GAAG,CACf,CAC3B,CAAC,CAAC,CAAC,IAAI,CAAC;AACb,CAAC,CAAC;AAEF,MAAM,qBAAqB,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;CAYvC,CAAC;AAEF,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"LoadingSpinner.js","sourceRoot":"","sources":["../../../../../src/components/atoms/LoadingSpinner/LoadingSpinner.tsx"],"names":[],"mappings":";;;;;AAAA,kDAA0B;AAC1B,+EAA+E;AAC/E,0EAAuC;AASvC,MAAM,cAAc,GAAG,CAAC,EAAE,IAAI,GAAG,KAAK,EAAuB,EAAE,EAAE;IAC7D,OAAO,IAAI,CAAC,CAAC,CAAC,CACV,8BAAC,qBAAqB;QAElB,qDAAkB,CACE,CAC3B,CAAC,CAAC,CAAC,IAAI,CAAC;AACb,CAAC,CAAC;AAEF,MAAM,qBAAqB,GAAG,2BAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;CAYvC,CAAC;AAEF,kBAAe,cAAc,CAAC"}
@@ -1,11 +1,17 @@
1
- import LoadingSpinner from './LoadingSpinner';
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.PrimaryLoadingSpinner = void 0;
7
+ const LoadingSpinner_1 = __importDefault(require("./LoadingSpinner"));
2
8
  const meta = {
3
9
  title: 'ReactComponentsLibrary/LoadingSpinner',
4
- component: LoadingSpinner,
10
+ component: LoadingSpinner_1.default,
5
11
  tags: ['autodocs']
6
12
  };
7
- export default meta;
8
- export const PrimaryLoadingSpinner = {
13
+ exports.default = meta;
14
+ exports.PrimaryLoadingSpinner = {
9
15
  args: {
10
16
  show: true
11
17
  }
@@ -1 +1 @@
1
- {"version":3,"file":"LoadingSpinner.stories.js","sourceRoot":"","sources":["../../../../../src/components/atoms/LoadingSpinner/LoadingSpinner.stories.ts"],"names":[],"mappings":"AAEA,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAE9C,MAAM,IAAI,GAAgC;IACtC,KAAK,EAAE,uCAAuC;IAC9C,SAAS,EAAE,cAAc;IACzB,IAAI,EAAE,CAAC,UAAU,CAAC;CACrB,CAAC;AAEF,eAAe,IAAI,CAAC;AAGpB,MAAM,CAAC,MAAM,qBAAqB,GAAU;IACxC,IAAI,EAAE;QACF,IAAI,EAAE,IAAI;KACb;CACJ,CAAC"}
1
+ {"version":3,"file":"LoadingSpinner.stories.js","sourceRoot":"","sources":["../../../../../src/components/atoms/LoadingSpinner/LoadingSpinner.stories.ts"],"names":[],"mappings":";;;;;;AAEA,sEAA8C;AAE9C,MAAM,IAAI,GAAgC;IACtC,KAAK,EAAE,uCAAuC;IAC9C,SAAS,EAAE,wBAAc;IACzB,IAAI,EAAE,CAAC,UAAU,CAAC;CACrB,CAAC;AAEF,kBAAe,IAAI,CAAC;AAGP,QAAA,qBAAqB,GAAU;IACxC,IAAI,EAAE;QACF,IAAI,EAAE,IAAI;KACb;CACJ,CAAC"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const react_1 = __importDefault(require("react"));
7
+ const react_2 = require("@testing-library/react");
8
+ const LoadingSpinner_1 = __importDefault(require("./LoadingSpinner"));
9
+ describe('LoadingSpinner', () => {
10
+ it('renders the loading component', () => {
11
+ (0, react_2.render)(react_1.default.createElement(LoadingSpinner_1.default, null));
12
+ });
13
+ });
14
+ //# sourceMappingURL=LoadingSpinner.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LoadingSpinner.test.js","sourceRoot":"","sources":["../../../../../src/components/atoms/LoadingSpinner/LoadingSpinner.test.tsx"],"names":[],"mappings":";;;;;AAAA,kDAA0B;AAC1B,kDAAgD;AAChD,sEAA8C;AAE9C,QAAQ,CAAC,gBAAgB,EAAE,GAAG,EAAE;IAC5B,EAAE,CAAC,+BAA+B,EAAE,GAAG,EAAE;QACrC,IAAA,cAAM,EAAC,8BAAC,wBAAc,OAAG,CAAC,CAAC;IAC/B,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
@@ -1,2 +1,9 @@
1
- export { default as LoadingSpinner } from './LoadingSpinner/LoadingSpinner';
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.LoadingSpinner = void 0;
7
+ var LoadingSpinner_1 = require("./LoadingSpinner/LoadingSpinner");
8
+ Object.defineProperty(exports, "LoadingSpinner", { enumerable: true, get: function () { return __importDefault(LoadingSpinner_1).default; } });
2
9
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/atoms/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,iCAAiC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/atoms/index.ts"],"names":[],"mappings":";;;;;;AAAA,kEAA4E;AAAnE,iIAAA,OAAO,OAAkB"}
@@ -1,4 +1,20 @@
1
- export * from './atoms';
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./atoms"), exports);
2
18
  // export * from './molecules';
3
19
  // export * from './organisms';
4
20
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,+BAA+B;AAC/B,+BAA+B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,+BAA+B;AAC/B,+BAA+B"}
package/dist/esm/index.js CHANGED
@@ -1,2 +1,18 @@
1
- export * from './components';
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./components"), exports);
2
18
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "myrentokil-components-library",
3
- "version": "1.0.39",
3
+ "version": "1.0.42",
4
4
  "description": "myRentokil shared components library",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -15,7 +15,7 @@
15
15
  "scripts": {
16
16
  "rollup": "rollup -c",
17
17
  "build": "rm -rf dist/ && prettier --write src/ && npm run build:esm && npm run build:cjs && storybook build",
18
- "build:esm": "tsc",
18
+ "build:esm": "tsc --module CommonJS --outDir dist/esm",
19
19
  "build:cjs": "tsc --module CommonJS --outDir dist/cjs",
20
20
  "storybook": "storybook dev -p 6006",
21
21
  "build-storybook": "storybook build",
@@ -40,8 +40,8 @@
40
40
  "@testing-library/react": "^14.0.0",
41
41
  "@types/jest": "^29.5.2",
42
42
  "@types/node": "^20.3.2",
43
- "@types/react": "^18.2.14",
44
- "@types/react-dom": "^18.2.6",
43
+ "@types/react": "^18.0.0",
44
+ "@types/react-dom": "^18.0.0",
45
45
  "@types/styled-components": "^5.1.26",
46
46
  "jest": "^29.5.0",
47
47
  "jest-environment-jsdom": "^29.5.0",