@pareto-engineering/design-system 5.4.0 → 5.6.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.
@@ -1,14 +1,17 @@
1
- import { useEffect as r } from "react";
2
- const u = (t, n) => {
3
- r(() => {
1
+ import { useRef as s, useEffect as u } from "react";
2
+ const d = (t, n) => {
3
+ const r = s(n);
4
+ u(() => {
5
+ r.current = n;
6
+ }, [n]), u(() => {
4
7
  const e = (o) => {
5
- t.current && !t.current.contains(o.target) && n();
8
+ !t.current || t.current.contains(o.target) || r.current(o);
6
9
  };
7
10
  return document.addEventListener("mousedown", e), document.addEventListener("touchstart", e), () => {
8
11
  document.removeEventListener("mousedown", e), document.removeEventListener("touchstart", e);
9
12
  };
10
- }, [n]);
13
+ }, [t]);
11
14
  };
12
15
  export {
13
- u as default
16
+ d as default
14
17
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pareto-engineering/design-system",
3
- "version": "5.4.0",
3
+ "version": "5.6.0",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -29,9 +29,9 @@
29
29
  "license": "ISC",
30
30
  "devDependencies": {
31
31
  "@chromatic-com/storybook": "^3.2.6",
32
- "@pareto-engineering/eslint-config": "^5.4.0",
32
+ "@pareto-engineering/eslint-config": "^5.6.0",
33
33
  "@pareto-engineering/stylelint-config": "^5.0.0",
34
- "@pareto-engineering/ts-config": "^5.4.0",
34
+ "@pareto-engineering/ts-config": "^5.6.0",
35
35
  "@storybook/addon-essentials": "^8.6.12",
36
36
  "@storybook/addon-interactions": "^8.6.12",
37
37
  "@storybook/addon-links": "^8.6.12",
@@ -64,9 +64,9 @@
64
64
  "@lexical/selection": "0.12.2",
65
65
  "@lexical/table": "0.12.2",
66
66
  "@lexical/utils": "0.12.2",
67
- "@pareto-engineering/assets": "^5.4.0",
68
- "@pareto-engineering/bem": "^5.4.0",
69
- "@pareto-engineering/styles": "^5.4.0",
67
+ "@pareto-engineering/assets": "^5.6.0",
68
+ "@pareto-engineering/bem": "^5.6.0",
69
+ "@pareto-engineering/styles": "^5.6.0",
70
70
  "@types/node": "^22.14.1",
71
71
  "@vitejs/plugin-react": "^4.3.4",
72
72
  "better-react-mathjax": "^2.0.3",
@@ -96,5 +96,5 @@
96
96
  "vite-plugin-lib-inject-css": "^2.2.2"
97
97
  },
98
98
  "browserslist": "> 2%",
99
- "gitHead": "1e230928c7431a2cc07018dbd3fa0266a89b094e"
99
+ "gitHead": "d01d4269b44079ff33d747234ffd3fc02972186f"
100
100
  }