Skip to content

Commit f926dd5

Browse files
committed
chore: Update import paths and dependencies for @react-aria-nutrient
* Refactored import statements in various components and tests to use @react-aria-nutrient/overlays instead of @react-aria/overlays. * Removed references to @react-aria/overlays from package.json and yarn.lock. * Updated documentation links to reflect the new package structure.
1 parent b453490 commit f926dd5

File tree

8 files changed

+11
-70
lines changed

8 files changed

+11
-70
lines changed

packages/@react-aria/overlays/docs/PortalProvider.mdx

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ governing permissions and limitations under the License. */}
1010
import {Layout} from '@react-spectrum/docs';
1111
export default Layout;
1212

13-
import docs from 'docs:@react-aria/overlays';
13+
import docs from 'docs:@react-aria-nutrient/overlays';
1414
import {HeaderInfo, PropTable, FunctionAPI, PageDescription} from '@react-spectrum/docs';
15-
import packageData from '@react-aria/overlays/package.json';
15+
import packageData from '@react-aria-nutrient/overlays/package.json';
1616

1717
---
1818
category: Utilities
@@ -83,7 +83,7 @@ function MyToastRegion() {
8383
```
8484

8585
```tsx example
86-
import {UNSAFE_PortalProvider} from '@react-aria/overlays';
86+
import {UNSAFE_PortalProvider} from '@react-aria-nutrient/overlays';
8787

8888
// See the above Toast docs link for the ToastRegion implementation
8989
function App() {
@@ -128,7 +128,7 @@ used by custom overlay components to ensure that they are also being consistentl
128128
<FunctionAPI links={docs.links} function={docs.exports.useUNSAFE_PortalContext} />
129129

130130
```tsx
131-
import {useUNSAFE_PortalContext} from '@react-aria/overlays';
131+
import {useUNSAFE_PortalContext} from '@react-aria-nutrient/overlays';
132132

133133
function MyOverlay(props) {
134134
let {children} = props;

packages/dev/docs/pages/blog/building-a-combobox.mdx

+2-2
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ to see how the ComboBox tray worked before and after we switched to the VisualVi
7272
Another issue we encountered had to do with iOS Safari page scrolling behavior. When the onscreen keyboard is visible, iOS Safari makes the page scrollable so that users can still access content that is hidden behind the keyboard. However,
7373
now that our ComboBox tray sizes itself to fit in the visual viewport, users could now scroll the entire tray itself off screen. To stop this from happening, we prevent default on `touchmove` events that happen on the document body
7474
or root element of the document. This preserves the user's ability to scroll through the options in the tray but blocks any attempt to scroll the page itself until the tray is closed. The video below
75-
illustrates the difference in scrolling behavior before and after our fix. If you are building your own overlays and would like to prevent this kind of document scrolling behavior, check out the [usePreventScroll](https://github.com/adobe/react-spectrum/blob/main/packages/@react-aria/overlays/src/usePreventScroll.ts) hook in the `react-aria/overlays` package.
75+
illustrates the difference in scrolling behavior before and after our fix. If you are building your own overlays and would like to prevent this kind of document scrolling behavior, check out the [usePreventScroll](https://github.com/adobe/react-spectrum/blob/main/packages/@react-aria-nutrient/overlays/src/usePreventScroll.ts) hook in the `react-aria/overlays` package.
7676

7777
<Video src={comboboxScrollingUrl} loop autoPlay muted style={{maxWidth: 'min(80%, 350px)', display: 'block', margin: '20px auto'}} />
7878

@@ -94,7 +94,7 @@ set. Therefore, we had to figure out a way to make the input and listbox the onl
9494
The solution that we came up with was to crawl the DOM and apply `aria-hidden` to every element that wasn't the input or listbox. To crawl the DOM we used a [TreeWalker](https://developer.mozilla.org/en-US/docs/Web/API/TreeWalker),
9595
setting up a node filter to determine if a node should be left visible, hidden, or skipped in the case where its parent was already hidden. In addition, we watch for any changes in the DOM while the listbox is open
9696
via a [MutationObserver](https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver), hiding those new elements if need be. When the popover closes, every node that we modified is reverted back to its previous state.
97-
Check out our [ariaHideOutside](https://github.com/adobe/react-spectrum/blob/main/packages/@react-aria/overlays/src/ariaHideOutside.ts) function in `@react-aria-nutrient/overlays` if you'd like to learn more.
97+
Check out our [ariaHideOutside](https://github.com/adobe/react-spectrum/blob/main/packages/@react-aria-nutrient/overlays/src/ariaHideOutside.ts) function in `@react-aria-nutrient/overlays` if you'd like to learn more.
9898

9999
### Mobile implementation divergence
100100

packages/react-aria-components/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@
5151
"@react-aria-nutrient/toolbar": "3.0.0-beta.14",
5252
"@react-aria-nutrient/utils": "^3.28.1",
5353
"@react-aria-nutrient/virtualizer": "^4.1.3",
54-
"@react-aria/overlays": "^3.26.1",
5554
"@react-aria/ssr": "^3.9.7",
5655
"@react-aria/utils": "^3.28.1",
5756
"@react-stately/autocomplete": "3.0.0-beta.0",

packages/react-aria-components/test/Dialog.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import {
2222
} from '../';
2323
import {pointerMap, render, within} from '@react-spectrum/test-utils-internal';
2424
import React, {useRef} from 'react';
25-
import {UNSAFE_PortalProvider} from '@react-aria/overlays';
25+
import {UNSAFE_PortalProvider} from '@react-aria-nutrient/overlays';
2626
import userEvent from '@testing-library/user-event';
2727

2828
describe('Dialog', () => {

packages/react-aria-components/test/Popover.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
import {act, pointerMap, render} from '@react-spectrum/test-utils-internal';
1414
import {Button, Dialog, DialogTrigger, OverlayArrow, Popover, Pressable} from '../';
1515
import React, {useRef} from 'react';
16-
import {UNSAFE_PortalProvider} from '@react-aria/overlays';
16+
import {UNSAFE_PortalProvider} from '@react-aria-nutrient/overlays';
1717
import userEvent from '@testing-library/user-event';
1818

1919
let TestPopover = (props) => (

packages/react-aria-components/test/Toast.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
import {act, installPointerEvent, pointerMap, render, within} from '@react-spectrum/test-utils-internal';
1414
import {Button, Text, UNSTABLE_Toast as Toast, UNSTABLE_ToastContent as ToastContent, UNSTABLE_ToastQueue as ToastQueue, UNSTABLE_ToastRegion as ToastRegion} from 'react-aria-components';
1515
import React, {useRef} from 'react';
16-
import {UNSAFE_PortalProvider} from '@react-aria/overlays';
16+
import {UNSAFE_PortalProvider} from '@react-aria-nutrient/overlays';
1717
import userEvent from '@testing-library/user-event';
1818

1919
function Example(options) {

packages/react-aria-components/test/Tooltip.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
import {act, fireEvent, pointerMap, render} from '@react-spectrum/test-utils-internal';
1414
import {Button, Focusable, OverlayArrow, Pressable, Tooltip, TooltipTrigger} from 'react-aria-components';
1515
import React, {useRef} from 'react';
16-
import {UNSAFE_PortalProvider} from '@react-aria/overlays';
16+
import {UNSAFE_PortalProvider} from '@react-aria-nutrient/overlays';
1717
import userEvent from '@testing-library/user-event';
1818

1919
function TestTooltip(props) {

yarn.lock

+1-59
Original file line numberDiff line numberDiff line change
@@ -6938,41 +6938,6 @@ __metadata:
69386938
languageName: node
69396939
linkType: hard
69406940

6941-
"@react-aria/focus@npm:^3.20.1":
6942-
version: 3.20.1
6943-
resolution: "@react-aria/focus@npm:3.20.1"
6944-
dependencies:
6945-
"@react-aria/interactions": "npm:^3.24.1"
6946-
"@react-aria/utils": "npm:^3.28.1"
6947-
"@react-types/shared": "npm:^3.28.0"
6948-
"@swc/helpers": "npm:^0.5.0"
6949-
clsx: "npm:^2.0.0"
6950-
peerDependencies:
6951-
react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1
6952-
react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1
6953-
checksum: 10c0/be982f6cff4531d12894f35b99c326835315d723bf736e36d044cbbffab3b35307620bdbcbd92454010f94a35d851e5976fa9318b4b38ad8d15b1dee447710d6
6954-
languageName: node
6955-
linkType: hard
6956-
6957-
"@react-aria/i18n@npm:^3.12.7":
6958-
version: 3.12.7
6959-
resolution: "@react-aria/i18n@npm:3.12.7"
6960-
dependencies:
6961-
"@internationalized/date": "npm:^3.7.0"
6962-
"@internationalized/message": "npm:^3.1.6"
6963-
"@internationalized/number": "npm:^3.6.0"
6964-
"@internationalized/string": "npm:^3.2.5"
6965-
"@react-aria/ssr": "npm:^3.9.7"
6966-
"@react-aria/utils": "npm:^3.28.1"
6967-
"@react-types/shared": "npm:^3.28.0"
6968-
"@swc/helpers": "npm:^0.5.0"
6969-
peerDependencies:
6970-
react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1
6971-
react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1
6972-
checksum: 10c0/414f44f1a0377943d7d3a1ced74a340144206b65d83010aee584c80b8cf02a81e8b0b11f338e8a2668f89c77a06e00d49be92536d694ae415b56c9659e22c869
6973-
languageName: node
6974-
linkType: hard
6975-
69766941
"@react-aria/interactions@npm:^3.1.0, @react-aria/interactions@npm:^3.24.1":
69776942
version: 3.24.1
69786943
resolution: "@react-aria/interactions@npm:3.24.1"
@@ -6989,28 +6954,6 @@ __metadata:
69896954
languageName: node
69906955
linkType: hard
69916956

6992-
"@react-aria/overlays@npm:^3.26.1":
6993-
version: 3.26.1
6994-
resolution: "@react-aria/overlays@npm:3.26.1"
6995-
dependencies:
6996-
"@react-aria/focus": "npm:^3.20.1"
6997-
"@react-aria/i18n": "npm:^3.12.7"
6998-
"@react-aria/interactions": "npm:^3.24.1"
6999-
"@react-aria/ssr": "npm:^3.9.7"
7000-
"@react-aria/utils": "npm:^3.28.1"
7001-
"@react-aria/visually-hidden": "npm:^3.8.21"
7002-
"@react-stately/overlays": "npm:^3.6.14"
7003-
"@react-types/button": "npm:^3.11.0"
7004-
"@react-types/overlays": "npm:^3.8.13"
7005-
"@react-types/shared": "npm:^3.28.0"
7006-
"@swc/helpers": "npm:^0.5.0"
7007-
peerDependencies:
7008-
react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1
7009-
react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1
7010-
checksum: 10c0/6dfb5de858643d87103261c9663fbf155f5d988c03d42fa601233906425cc0fa4d09c519b8b02e9addd48a44afb69a8eb1ee666fe2f2ec1a0dcc137f5a2c8bb4
7011-
languageName: node
7012-
linkType: hard
7013-
70146957
"@react-aria/ssr@npm:^3.9.7":
70156958
version: 3.9.7
70166959
resolution: "@react-aria/ssr@npm:3.9.7"
@@ -7039,7 +6982,7 @@ __metadata:
70396982
languageName: node
70406983
linkType: hard
70416984

7042-
"@react-aria/visually-hidden@npm:^3.1.0, @react-aria/visually-hidden@npm:^3.8.21":
6985+
"@react-aria/visually-hidden@npm:^3.1.0":
70436986
version: 3.8.21
70446987
resolution: "@react-aria/visually-hidden@npm:3.8.21"
70456988
dependencies:
@@ -29432,7 +29375,6 @@ __metadata:
2943229375
"@react-aria-nutrient/toolbar": "npm:3.0.0-beta.14"
2943329376
"@react-aria-nutrient/utils": "npm:^3.28.1"
2943429377
"@react-aria-nutrient/virtualizer": "npm:^4.1.3"
29435-
"@react-aria/overlays": "npm:^3.26.1"
2943629378
"@react-aria/ssr": "npm:^3.9.7"
2943729379
"@react-aria/utils": "npm:^3.28.1"
2943829380
"@react-stately/autocomplete": "npm:3.0.0-beta.0"

0 commit comments

Comments
 (0)