@equinor/cpl-loading-react 0.2.5 → 0.2.7

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
@@ -56,7 +56,7 @@ function LoadingContainer({
56
56
  children: isLoading && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_eds_core_react.CircularProgress, { size: 32 })
57
57
  }
58
58
  ),
59
- isLoading ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BlockInteractionContainer, { children }) : children
59
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BlockInteractionContainer, { $shouldBlock: isLoading, children })
60
60
  ] });
61
61
  }
62
62
  var Wrapper = import_styled_components.default.div`
@@ -64,8 +64,10 @@ var Wrapper = import_styled_components.default.div`
64
64
  z-index: 0;
65
65
  `;
66
66
  var BlockInteractionContainer = import_styled_components.default.div`
67
+ ${({ $shouldBlock }) => $shouldBlock ? `
67
68
  pointer-events: none;
68
69
  user-select: none;
70
+ ` : ""}
69
71
  `;
70
72
  var LoadingOverlay = import_styled_components.default.div`
71
73
  position: absolute;
package/dist/index.mjs CHANGED
@@ -20,7 +20,7 @@ function LoadingContainer({
20
20
  children: isLoading && /* @__PURE__ */ jsx(CircularProgress, { size: 32 })
21
21
  }
22
22
  ),
23
- isLoading ? /* @__PURE__ */ jsx(BlockInteractionContainer, { children }) : children
23
+ /* @__PURE__ */ jsx(BlockInteractionContainer, { $shouldBlock: isLoading, children })
24
24
  ] });
25
25
  }
26
26
  var Wrapper = styled.div`
@@ -28,8 +28,10 @@ var Wrapper = styled.div`
28
28
  z-index: 0;
29
29
  `;
30
30
  var BlockInteractionContainer = styled.div`
31
+ ${({ $shouldBlock }) => $shouldBlock ? `
31
32
  pointer-events: none;
32
33
  user-select: none;
34
+ ` : ""}
33
35
  `;
34
36
  var LoadingOverlay = styled.div`
35
37
  position: absolute;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@equinor/cpl-loading-react",
3
- "version": "0.2.5",
3
+ "version": "0.2.7",
4
4
  "license": "MIT",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -13,8 +13,8 @@
13
13
  },
14
14
  "devDependencies": {
15
15
  "@equinor/eds-core-react": "^0.42.5",
16
- "@storybook/react": "^8.5.2",
17
- "@storybook/test": "^8.5.2",
16
+ "@storybook/react": "^8.6.14",
17
+ "@storybook/test": "^8.6.14",
18
18
  "@types/react": "^18.3.18",
19
19
  "@types/react-dom": "^18.3.5",
20
20
  "@types/styled-components": "^5.1.34",
@@ -23,8 +23,8 @@
23
23
  "react-dom": "^18.2.0",
24
24
  "styled-components": "^6.1.14",
25
25
  "tsup": "^8.3.6",
26
- "eslint-config-custom": "0.0.7",
27
- "tsconfig": "0.0.1"
26
+ "@equinor/cpl-eslint-config": "0.0.8",
27
+ "@equinor/cpl-typescript-config": "0.0.2"
28
28
  },
29
29
  "peerDependencies": {
30
30
  "@equinor/eds-core-react": ">=0.42.1",
@@ -39,6 +39,7 @@
39
39
  "build": "tsup src/index.ts --format esm,cjs --dts --external react",
40
40
  "clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist",
41
41
  "dev": "tsup src/index.ts --format esm,cjs --watch --dts --external react",
42
- "lint": "TIMING=1 eslint . --fix"
42
+ "lint": "TIMING=1 eslint . --fix",
43
+ "typecheck": "tsc --noEmit"
43
44
  }
44
45
  }