fix: patch @react-aria/overlays to support scroll gutter
This commit is contained in:
parent
9f5ac6a9ef
commit
ee42016a67
@ -6,9 +6,4 @@
|
|||||||
html {
|
html {
|
||||||
scrollbar-gutter: stable
|
scrollbar-gutter: stable
|
||||||
}
|
}
|
||||||
|
|
||||||
html body {
|
|
||||||
margin-right: 0!important;
|
|
||||||
--removed-body-scroll-bar-size: 0 !important
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -55,5 +55,10 @@
|
|||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=18.0.0"
|
"node": ">=18.0.0"
|
||||||
|
},
|
||||||
|
"pnpm": {
|
||||||
|
"patchedDependencies": {
|
||||||
|
"@react-aria/overlays@3.22.0": "patches/@react-aria__overlays@3.22.0.patch"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
22
patches/@react-aria__overlays@3.22.0.patch
Normal file
22
patches/@react-aria__overlays@3.22.0.patch
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
diff --git a/dist/usePreventScroll.mjs b/dist/usePreventScroll.mjs
|
||||||
|
index 532a72f9e9ba985d036b7eba0f950ff6552898d9..7c9263667c2463c8e84fd07064076132fe53284c 100644
|
||||||
|
--- a/dist/usePreventScroll.mjs
|
||||||
|
+++ b/dist/usePreventScroll.mjs
|
||||||
|
@@ -48,7 +48,7 @@ function $49c51c25361d4cd2$export$ee0f7cc6afcd1c18(options = {}) {
|
||||||
|
// For most browsers, all we need to do is set `overflow: hidden` on the root element, and
|
||||||
|
// add some padding to prevent the page from shifting when the scrollbar is hidden.
|
||||||
|
function $49c51c25361d4cd2$var$preventScrollStandard() {
|
||||||
|
- return (0, $7mMvr$chain)($49c51c25361d4cd2$var$setStyle(document.documentElement, "paddingRight", `${window.innerWidth - document.documentElement.clientWidth}px`), $49c51c25361d4cd2$var$setStyle(document.documentElement, "overflow", "hidden"));
|
||||||
|
+ return (0, $7mMvr$chain)($49c51c25361d4cd2$var$setStyle(document.documentElement, "overflow", "hidden"));
|
||||||
|
}
|
||||||
|
// Mobile Safari is a whole different beast. Even with overflow: hidden,
|
||||||
|
// it still scrolls the page in many situations:
|
||||||
|
@@ -161,7 +161,7 @@ function $49c51c25361d4cd2$var$preventScrollMobileSafari() {
|
||||||
|
// enable us to scroll the window to the top, which is required for the rest of this to work.
|
||||||
|
let scrollX = window.pageXOffset;
|
||||||
|
let scrollY = window.pageYOffset;
|
||||||
|
- restoreStyles = (0, $7mMvr$chain)($49c51c25361d4cd2$var$addEvent(window, "scroll", onWindowScroll), $49c51c25361d4cd2$var$setStyle(document.documentElement, "paddingRight", `${window.innerWidth - document.documentElement.clientWidth}px`), $49c51c25361d4cd2$var$setStyle(document.documentElement, "overflow", "hidden"), $49c51c25361d4cd2$var$setStyle(document.body, "marginTop", `-${scrollY}px`), ()=>{
|
||||||
|
+ restoreStyles = (0, $7mMvr$chain)($49c51c25361d4cd2$var$addEvent(window, "scroll", onWindowScroll), $49c51c25361d4cd2$var$setStyle(document.documentElement, "overflow", "hidden"), $49c51c25361d4cd2$var$setStyle(document.body, "marginTop", `-${scrollY}px`), ()=>{
|
||||||
|
window.scrollTo(scrollX, scrollY);
|
||||||
|
});
|
||||||
|
// Scroll to the top. The negative margin on the body will make this appear the same.
|
||||||
@ -4,6 +4,11 @@ settings:
|
|||||||
autoInstallPeers: true
|
autoInstallPeers: true
|
||||||
excludeLinksFromLockfile: false
|
excludeLinksFromLockfile: false
|
||||||
|
|
||||||
|
patchedDependencies:
|
||||||
|
'@react-aria/overlays@3.22.0':
|
||||||
|
hash: mwvr7ecwabovde3onruwb2ke4i
|
||||||
|
path: patches/@react-aria__overlays@3.22.0.patch
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
'@codemirror/lang-json':
|
'@codemirror/lang-json':
|
||||||
specifier: ^6.0.1
|
specifier: ^6.0.1
|
||||||
@ -1442,7 +1447,7 @@ packages:
|
|||||||
'@react-aria/listbox': 3.12.0(react-dom@18.3.1)(react@18.3.1)
|
'@react-aria/listbox': 3.12.0(react-dom@18.3.1)(react@18.3.1)
|
||||||
'@react-aria/live-announcer': 3.3.3
|
'@react-aria/live-announcer': 3.3.3
|
||||||
'@react-aria/menu': 3.14.0(react-dom@18.3.1)(react@18.3.1)
|
'@react-aria/menu': 3.14.0(react-dom@18.3.1)(react@18.3.1)
|
||||||
'@react-aria/overlays': 3.22.0(react-dom@18.3.1)(react@18.3.1)
|
'@react-aria/overlays': 3.22.0(patch_hash=mwvr7ecwabovde3onruwb2ke4i)(react-dom@18.3.1)(react@18.3.1)
|
||||||
'@react-aria/selection': 3.18.0(react-dom@18.3.1)(react@18.3.1)
|
'@react-aria/selection': 3.18.0(react-dom@18.3.1)(react@18.3.1)
|
||||||
'@react-aria/textfield': 3.14.4(react@18.3.1)
|
'@react-aria/textfield': 3.14.4(react@18.3.1)
|
||||||
'@react-aria/utils': 3.24.0(react@18.3.1)
|
'@react-aria/utils': 3.24.0(react@18.3.1)
|
||||||
@ -1492,7 +1497,7 @@ packages:
|
|||||||
react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0
|
react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0
|
||||||
dependencies:
|
dependencies:
|
||||||
'@react-aria/focus': 3.17.0(react@18.3.1)
|
'@react-aria/focus': 3.17.0(react@18.3.1)
|
||||||
'@react-aria/overlays': 3.22.0(react-dom@18.3.1)(react@18.3.1)
|
'@react-aria/overlays': 3.22.0(patch_hash=mwvr7ecwabovde3onruwb2ke4i)(react-dom@18.3.1)(react@18.3.1)
|
||||||
'@react-aria/utils': 3.24.0(react@18.3.1)
|
'@react-aria/utils': 3.24.0(react@18.3.1)
|
||||||
'@react-types/dialog': 3.5.9(react@18.3.1)
|
'@react-types/dialog': 3.5.9(react@18.3.1)
|
||||||
'@react-types/shared': 3.23.0(react@18.3.1)
|
'@react-types/shared': 3.23.0(react@18.3.1)
|
||||||
@ -1511,7 +1516,7 @@ packages:
|
|||||||
'@react-aria/i18n': 3.11.0(react@18.3.1)
|
'@react-aria/i18n': 3.11.0(react@18.3.1)
|
||||||
'@react-aria/interactions': 3.21.2(react@18.3.1)
|
'@react-aria/interactions': 3.21.2(react@18.3.1)
|
||||||
'@react-aria/live-announcer': 3.3.3
|
'@react-aria/live-announcer': 3.3.3
|
||||||
'@react-aria/overlays': 3.22.0(react-dom@18.3.1)(react@18.3.1)
|
'@react-aria/overlays': 3.22.0(patch_hash=mwvr7ecwabovde3onruwb2ke4i)(react-dom@18.3.1)(react@18.3.1)
|
||||||
'@react-aria/utils': 3.24.0(react@18.3.1)
|
'@react-aria/utils': 3.24.0(react@18.3.1)
|
||||||
'@react-stately/dnd': 3.3.0(react@18.3.1)
|
'@react-stately/dnd': 3.3.0(react@18.3.1)
|
||||||
'@react-types/button': 3.9.3(react@18.3.1)
|
'@react-types/button': 3.9.3(react@18.3.1)
|
||||||
@ -1691,7 +1696,7 @@ packages:
|
|||||||
'@react-aria/focus': 3.17.0(react@18.3.1)
|
'@react-aria/focus': 3.17.0(react@18.3.1)
|
||||||
'@react-aria/i18n': 3.11.0(react@18.3.1)
|
'@react-aria/i18n': 3.11.0(react@18.3.1)
|
||||||
'@react-aria/interactions': 3.21.2(react@18.3.1)
|
'@react-aria/interactions': 3.21.2(react@18.3.1)
|
||||||
'@react-aria/overlays': 3.22.0(react-dom@18.3.1)(react@18.3.1)
|
'@react-aria/overlays': 3.22.0(patch_hash=mwvr7ecwabovde3onruwb2ke4i)(react-dom@18.3.1)(react@18.3.1)
|
||||||
'@react-aria/selection': 3.18.0(react-dom@18.3.1)(react@18.3.1)
|
'@react-aria/selection': 3.18.0(react-dom@18.3.1)(react@18.3.1)
|
||||||
'@react-aria/utils': 3.24.0(react@18.3.1)
|
'@react-aria/utils': 3.24.0(react@18.3.1)
|
||||||
'@react-stately/collections': 3.10.6(react@18.3.1)
|
'@react-stately/collections': 3.10.6(react@18.3.1)
|
||||||
@ -1738,7 +1743,7 @@ packages:
|
|||||||
react-dom: 18.3.1(react@18.3.1)
|
react-dom: 18.3.1(react@18.3.1)
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@react-aria/overlays@3.22.0(react-dom@18.3.1)(react@18.3.1):
|
/@react-aria/overlays@3.22.0(patch_hash=mwvr7ecwabovde3onruwb2ke4i)(react-dom@18.3.1)(react@18.3.1):
|
||||||
resolution: {integrity: sha512-M3Iayc2Hf9vJ4JJ8K/zh+Ct6aymDLmBbo686ChV3AtGOc254RyyzqnVSNuMs3j5QVBsDUKihHZQfl4E9RCwd+w==}
|
resolution: {integrity: sha512-M3Iayc2Hf9vJ4JJ8K/zh+Ct6aymDLmBbo686ChV3AtGOc254RyyzqnVSNuMs3j5QVBsDUKihHZQfl4E9RCwd+w==}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0
|
react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0
|
||||||
@ -1758,6 +1763,7 @@ packages:
|
|||||||
react: 18.3.1
|
react: 18.3.1
|
||||||
react-dom: 18.3.1(react@18.3.1)
|
react-dom: 18.3.1(react@18.3.1)
|
||||||
dev: false
|
dev: false
|
||||||
|
patched: true
|
||||||
|
|
||||||
/@react-aria/progress@3.4.12(react@18.3.1):
|
/@react-aria/progress@3.4.12(react@18.3.1):
|
||||||
resolution: {integrity: sha512-Wlz7VNFEzcLSawhZwWTKgJPM/IUKFiKJJG7KGcsT2biIlu6Yp60xj08hDZkCrLq3XsLLCRmweHlVfLFjG3AK9w==}
|
resolution: {integrity: sha512-Wlz7VNFEzcLSawhZwWTKgJPM/IUKFiKJJG7KGcsT2biIlu6Yp60xj08hDZkCrLq3XsLLCRmweHlVfLFjG3AK9w==}
|
||||||
@ -7012,7 +7018,7 @@ packages:
|
|||||||
'@react-aria/menu': 3.14.0(react-dom@18.3.1)(react@18.3.1)
|
'@react-aria/menu': 3.14.0(react-dom@18.3.1)(react@18.3.1)
|
||||||
'@react-aria/meter': 3.4.12(react@18.3.1)
|
'@react-aria/meter': 3.4.12(react@18.3.1)
|
||||||
'@react-aria/numberfield': 3.11.2(react-dom@18.3.1)(react@18.3.1)
|
'@react-aria/numberfield': 3.11.2(react-dom@18.3.1)(react@18.3.1)
|
||||||
'@react-aria/overlays': 3.22.0(react-dom@18.3.1)(react@18.3.1)
|
'@react-aria/overlays': 3.22.0(patch_hash=mwvr7ecwabovde3onruwb2ke4i)(react-dom@18.3.1)(react@18.3.1)
|
||||||
'@react-aria/progress': 3.4.12(react@18.3.1)
|
'@react-aria/progress': 3.4.12(react@18.3.1)
|
||||||
'@react-aria/radio': 3.10.3(react@18.3.1)
|
'@react-aria/radio': 3.10.3(react@18.3.1)
|
||||||
'@react-aria/searchfield': 3.7.4(react@18.3.1)
|
'@react-aria/searchfield': 3.7.4(react@18.3.1)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user