@equinor/eds-core-react 0.41.4 → 0.41.5
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/eds-core-react.cjs
CHANGED
|
@@ -4743,6 +4743,7 @@ const Scrim = /*#__PURE__*/react.forwardRef(function Scrim({
|
|
|
4743
4743
|
...rest
|
|
4744
4744
|
}, ref) {
|
|
4745
4745
|
const scrimRef = react.useRef(null);
|
|
4746
|
+
edsUtils.useHideBodyScroll(open);
|
|
4746
4747
|
const combinedScrimRef = react.useMemo(() => edsUtils.mergeRefs(scrimRef, ref), [scrimRef, ref]);
|
|
4747
4748
|
edsUtils.useGlobalKeyPress('Escape', () => {
|
|
4748
4749
|
if (isDismissable && onClose && open) {
|
|
@@ -4760,7 +4761,6 @@ const Scrim = /*#__PURE__*/react.forwardRef(function Scrim({
|
|
|
4760
4761
|
return null;
|
|
4761
4762
|
}
|
|
4762
4763
|
return /*#__PURE__*/jsxRuntime.jsx(StyledScrim, {
|
|
4763
|
-
lockScroll: true,
|
|
4764
4764
|
onMouseDown: handleMouseClose,
|
|
4765
4765
|
ref: combinedScrimRef,
|
|
4766
4766
|
...rest,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { forwardRef, useRef, useMemo } from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
import { scrim } from './Scrim.tokens.js';
|
|
4
|
-
import { mergeRefs, useGlobalKeyPress } from '@equinor/eds-utils';
|
|
4
|
+
import { useHideBodyScroll, mergeRefs, useGlobalKeyPress } from '@equinor/eds-utils';
|
|
5
5
|
import { FloatingOverlay } from '@floating-ui/react';
|
|
6
6
|
import { jsx } from 'react/jsx-runtime';
|
|
7
7
|
|
|
@@ -24,6 +24,7 @@ const Scrim = /*#__PURE__*/forwardRef(function Scrim({
|
|
|
24
24
|
...rest
|
|
25
25
|
}, ref) {
|
|
26
26
|
const scrimRef = useRef(null);
|
|
27
|
+
useHideBodyScroll(open);
|
|
27
28
|
const combinedScrimRef = useMemo(() => mergeRefs(scrimRef, ref), [scrimRef, ref]);
|
|
28
29
|
useGlobalKeyPress('Escape', () => {
|
|
29
30
|
if (isDismissable && onClose && open) {
|
|
@@ -41,7 +42,6 @@ const Scrim = /*#__PURE__*/forwardRef(function Scrim({
|
|
|
41
42
|
return null;
|
|
42
43
|
}
|
|
43
44
|
return /*#__PURE__*/jsx(StyledScrim, {
|
|
44
|
-
lockScroll: true,
|
|
45
45
|
onMouseDown: handleMouseClose,
|
|
46
46
|
ref: combinedScrimRef,
|
|
47
47
|
...rest,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equinor/eds-core-react",
|
|
3
|
-
"version": "0.41.
|
|
3
|
+
"version": "0.41.5",
|
|
4
4
|
"description": "The React implementation of the Equinor Design System",
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"**/*.css"
|
|
@@ -88,9 +88,9 @@
|
|
|
88
88
|
"@tanstack/react-virtual": "3.10.6",
|
|
89
89
|
"downshift": "9.0.8",
|
|
90
90
|
"react-aria": "^3.34.1",
|
|
91
|
-
"@equinor/eds-icons": "^0.21.0",
|
|
92
91
|
"@equinor/eds-utils": "0.8.5",
|
|
93
|
-
"@equinor/eds-tokens": "0.9.2"
|
|
92
|
+
"@equinor/eds-tokens": "0.9.2",
|
|
93
|
+
"@equinor/eds-icons": "^0.21.0"
|
|
94
94
|
},
|
|
95
95
|
"scripts": {
|
|
96
96
|
"build": "rollup -c --bundleConfigAsCjs && tsc -p tsconfig.build.json",
|