@equinor/eds-core-react 0.42.0 → 0.42.1

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.
@@ -6477,6 +6477,7 @@ const Popover$1 = /*#__PURE__*/react.forwardRef(function Popover({
6477
6477
  refs,
6478
6478
  strategy,
6479
6479
  context,
6480
+ elements,
6480
6481
  middlewareData: {
6481
6482
  arrow: {
6482
6483
  x: arrowX,
@@ -6503,16 +6504,15 @@ const Popover$1 = /*#__PURE__*/react.forwardRef(function Popover({
6503
6504
  getFloatingProps
6504
6505
  } = react$1.useInteractions([react$1.useDismiss(context)]);
6505
6506
  react.useEffect(() => {
6507
+ if (!elements.floating) return;
6506
6508
  if (open) {
6507
- setTimeout(() => {
6508
- if (refs.floating.current?.isConnected) {
6509
- refs.floating.current.showPopover();
6510
- }
6511
- }, 1);
6509
+ if (elements.floating.isConnected) {
6510
+ elements.floating.showPopover();
6511
+ }
6512
6512
  } else {
6513
- refs.floating.current?.hidePopover();
6513
+ elements.floating.hidePopover();
6514
6514
  }
6515
- }, [open, refs.floating]);
6515
+ }, [open, elements.floating]);
6516
6516
  react.useEffect(() => {
6517
6517
  if (arrowRef.current) {
6518
6518
  const staticSide = {
@@ -71,6 +71,7 @@ const Popover = /*#__PURE__*/forwardRef(function Popover({
71
71
  refs,
72
72
  strategy,
73
73
  context,
74
+ elements,
74
75
  middlewareData: {
75
76
  arrow: {
76
77
  x: arrowX,
@@ -97,16 +98,15 @@ const Popover = /*#__PURE__*/forwardRef(function Popover({
97
98
  getFloatingProps
98
99
  } = useInteractions([useDismiss(context)]);
99
100
  useEffect(() => {
101
+ if (!elements.floating) return;
100
102
  if (open) {
101
- setTimeout(() => {
102
- if (refs.floating.current?.isConnected) {
103
- refs.floating.current.showPopover();
104
- }
105
- }, 1);
103
+ if (elements.floating.isConnected) {
104
+ elements.floating.showPopover();
105
+ }
106
106
  } else {
107
- refs.floating.current?.hidePopover();
107
+ elements.floating.hidePopover();
108
108
  }
109
- }, [open, refs.floating]);
109
+ }, [open, elements.floating]);
110
110
  useEffect(() => {
111
111
  if (arrowRef.current) {
112
112
  const staticSide = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@equinor/eds-core-react",
3
- "version": "0.42.0",
3
+ "version": "0.42.1",
4
4
  "description": "The React implementation of the Equinor Design System",
5
5
  "sideEffects": [
6
6
  "**/*.css"
@@ -33,17 +33,17 @@
33
33
  ],
34
34
  "devDependencies": {
35
35
  "@rollup/plugin-babel": "^6.0.4",
36
- "@rollup/plugin-commonjs": "^26.0.1",
37
- "@rollup/plugin-node-resolve": "^15.2.3",
38
- "@storybook/addon-a11y": "^8.2.8",
39
- "@storybook/addon-actions": "^8.2.8",
40
- "@storybook/addon-docs": "^8.2.8",
41
- "@storybook/addon-essentials": "^8.2.8",
42
- "@storybook/addon-links": "^8.2.8",
43
- "@storybook/blocks": "^8.2.8",
44
- "@storybook/preview-api": "^8.2.8",
45
- "@storybook/react": "^8.2.8",
46
- "@storybook/react-vite": "^8.2.8",
36
+ "@rollup/plugin-commonjs": "^27.0.0",
37
+ "@rollup/plugin-node-resolve": "^15.3.0",
38
+ "@storybook/addon-a11y": "^8.3.4",
39
+ "@storybook/addon-actions": "^8.3.4",
40
+ "@storybook/addon-docs": "^8.3.4",
41
+ "@storybook/addon-essentials": "^8.3.4",
42
+ "@storybook/addon-links": "^8.3.4",
43
+ "@storybook/blocks": "^8.3.4",
44
+ "@storybook/preview-api": "^8.3.4",
45
+ "@storybook/react": "^8.3.4",
46
+ "@storybook/react-vite": "^8.3.4",
47
47
  "@testing-library/dom": "^10.4.0",
48
48
  "@testing-library/jest-dom": "^6.4.8",
49
49
  "@testing-library/react": "16.0.0",
@@ -64,10 +64,10 @@
64
64
  "react-dom": "^18.3.1",
65
65
  "react-hook-form": "^7.52.2",
66
66
  "react-router-dom": "^6.26.0",
67
- "rollup": "^4.20.0",
68
- "rollup-plugin-delete": "^2.0.0",
67
+ "rollup": "^4.22.5",
68
+ "rollup-plugin-delete": "^2.1.0",
69
69
  "rollup-plugin-postcss": "^4.0.2",
70
- "storybook": "^8.2.8",
70
+ "storybook": "^8.3.4",
71
71
  "styled-components": "6.1.12",
72
72
  "tsc-watch": "^6.2.0",
73
73
  "typescript": "^5.5.4"
@@ -85,7 +85,7 @@
85
85
  "@react-stately/calendar": "^3.5.3",
86
86
  "@react-stately/datepicker": "^3.10.1",
87
87
  "@react-types/shared": "^3.24.1",
88
- "@tanstack/react-virtual": "3.10.6",
88
+ "@tanstack/react-virtual": "3.10.8",
89
89
  "downshift": "9.0.8",
90
90
  "react-aria": "^3.34.1",
91
91
  "@equinor/eds-icons": "^0.21.0",