Skip to content

Commit 1885fd7

Browse files
committed
Merge branch 'ritesh/rename-packages' of https://github.com/PSPDFKit-labs/react-spectrum into ritesh/react-aria-renaming
2 parents 1f511d3 + 4199db4 commit 1885fd7

File tree

17 files changed

+140
-140
lines changed

17 files changed

+140
-140
lines changed

.parcelrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"bundle-text:*.svg": ["@parcel/transformer-svg", "@parcel/transformer-inline-string"],
1111
"*.{md,mdx}": ["parcel-transformer-mdx-docs"],
1212
"*.svg": ["@parcel/transformer-svg-react"],
13-
"packages/@react-aria-nutrient/example-theme/**/*.css": ["@parcel/transformer-css"],
13+
"packages/@react-aria/example-theme/**/*.css": ["@parcel/transformer-css"],
1414
"*.css": ["...", "parcel-transformer-css-env"],
1515
"*.{js,mjs,jsm,jsx,es6,cjs,ts,tsx}": [
1616
"@parcel/transformer-js",

.storybook/main.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
module.exports = {
33
stories: [
4-
'../packages/@{react-aria-nutrient,react-stately,spectrum-icons}/*/stories/*.stories.{js,jsx,ts,tsx}',
4+
'../packages/@{react-aria,react-stately,spectrum-icons}/*/stories/*.stories.{js,jsx,ts,tsx}',
55
'../packages/@react-spectrum/!(s2)/stories/*.stories.{js,jsx,ts,tsx}',
66
'../packages/react-aria-components/stories/*.stories.{js,jsx,ts,tsx}'
77
],

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ It's likely that you are using a different version of Node.js. Please use Node.j
209209
For example:
210210

211211
```
212-
@parcel/core: packages/@react-aria-nutrient/virtualizer/src/index.ts does not export 'useVirtualizer'
212+
@parcel/core: packages/@react-aria/virtualizer/src/index.ts does not export 'useVirtualizer'
213213
```
214214

215215
You may have run `yarn build` before. Please run `make clean_all && yarn` to clean up the build artifacts.

Makefile

+3-3
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ clean_dist:
3434
rm -rf packages/{react-aria,react-aria-components,react-stately}/dist
3535
rm -rf packages/{react-aria,react-aria-components,react-stately}/i18n
3636
rm -rf packages/@adobe/react-spectrum/i18n
37-
rm -rf packages/@react-aria-nutrient/i18n/server
37+
rm -rf packages/@react-aria/i18n/server
3838
rm -rf packages/@react-spectrum/s2/style/dist packages/@react-spectrum/s2/page.css packages/@react-spectrum/s2/icons packages/@react-spectrum/s2/illustrations
3939

4040
clean_parcel:
@@ -102,9 +102,9 @@ publish-nightly: build
102102
yarn publish:nightly
103103

104104
build:
105-
parcel build packages/@react-{spectrum,aria-nutrient,stately}/*/ packages/@internationalized/{message,string,date,number}/ packages/react-aria-components --no-optimize --config .parcelrc-build
105+
parcel build packages/@react-{spectrum,aria,stately}/*/ packages/@internationalized/{message,string,date,number}/ packages/react-aria-components --no-optimize --config .parcelrc-build
106106
yarn workspaces foreach --all -pt run prepublishOnly
107-
for pkg in packages/@react-{spectrum,aria-nutrient,stately}/*/ packages/@internationalized/{message,string,date,number}/ packages/@adobe/react-spectrum/ packages/react-aria/ packages/react-stately/ packages/react-aria-components/; \
107+
for pkg in packages/@react-{spectrum,aria,stately}/*/ packages/@internationalized/{message,string,date,number}/ packages/@adobe/react-spectrum/ packages/react-aria/ packages/react-stately/ packages/react-aria-components/; \
108108
do node scripts/buildEsm.js $$pkg; \
109109
done
110110
node scripts/buildI18n.js

eslint.config.mjs

+5-5
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const ERROR = 2;
3434

3535
export default [{
3636
ignores: [
37-
"packages/@react-aria-nutrient/i18n/server",
37+
"packages/@react-aria/i18n/server",
3838
"packages/@spectrum-icons/color/**/*",
3939
"packages/@spectrum-icons/ui/**/*",
4040
"packages/@spectrum-icons/workflow/**/*",
@@ -462,8 +462,8 @@ export default [{
462462
},
463463
}, {
464464
files: [
465-
"packages/@react-aria-nutrient/focus/src/**/*.ts",
466-
"packages/@react-aria-nutrient/focus/src/**/*.tsx",
465+
"packages/@react-aria/focus/src/**/*.ts",
466+
"packages/@react-aria/focus/src/**/*.tsx",
467467
],
468468

469469
rules: {
@@ -477,8 +477,8 @@ export default [{
477477
},
478478
}, {
479479
files: [
480-
"packages/@react-aria-nutrient/interactions/src/**/*.ts",
481-
"packages/@react-aria-nutrient/interactions/src/**/*.tsx",
480+
"packages/@react-aria/interactions/src/**/*.ts",
481+
"packages/@react-aria/interactions/src/**/*.tsx",
482482
],
483483

484484
rules: {

packages/@internationalized/number/test/NumberParser.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*/
1212

1313
import fc from 'fast-check';
14-
import messages from '../../../@react-aria-nutrient/numberfield/intl/*.json';
14+
import messages from '../../../@react-aria/numberfield/intl/*.json';
1515
import {NumberParser} from '../src/NumberParser';
1616

1717
// for some reason hu-HU isn't supported in jsdom/node

packages/@react-spectrum/dnd/docs/dnd.mdx

+6-6
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ import docs from 'docs:@react-spectrum/dnd';
1515
import dndDocs from 'docs:@react-types/shared/src/dnd.d.ts';
1616
import {FunctionAPI, PageDescription, TypeContext, InterfaceType} from '@react-spectrum/docs';
1717
import {Keyboard} from '@react-spectrum/text';
18-
import DragPreview from '../../../@react-aria-nutrient/dnd/docs/DragPreview.svg';
19-
import BetweenDropPosition from '../../../@react-aria-nutrient/dnd/docs/BetweenDropPosition.svg';
20-
import OnDropPosition from '../../../@react-aria-nutrient/dnd/docs/OnDropPosition.svg';
21-
import RootDropPosition from '../../../@react-aria-nutrient/dnd/docs/RootDropPosition.svg';
22-
import DragAffordance from '../../../@react-aria-nutrient/dnd/docs/DragAffordance.svg';
23-
import Anatomy from '../../../@react-aria-nutrient/dnd/docs/Anatomy.svg';
18+
import DragPreview from '../../../@react-aria/dnd/docs/DragPreview.svg';
19+
import BetweenDropPosition from '../../../@react-aria/dnd/docs/BetweenDropPosition.svg';
20+
import OnDropPosition from '../../../@react-aria/dnd/docs/OnDropPosition.svg';
21+
import RootDropPosition from '../../../@react-aria/dnd/docs/RootDropPosition.svg';
22+
import DragAffordance from '../../../@react-aria/dnd/docs/DragAffordance.svg';
23+
import Anatomy from '../../../@react-aria/dnd/docs/Anatomy.svg';
2424

2525
---
2626
category: Concepts

packages/@react-spectrum/numberfield/test/NumberField.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import {announce} from '@react-aria-nutrient/live-announcer';
1616
import {Button} from '@react-spectrum/button';
1717
import {chain} from '@react-aria-nutrient/utils';
1818
import {Form} from '@react-spectrum/form';
19-
import messages from '../../../@react-aria-nutrient/numberfield/intl/*.json';
19+
import messages from '../../../@react-aria/numberfield/intl/*.json';
2020
import {NumberField} from '../';
2121
import {Provider} from '@react-spectrum/provider';
2222
import React, {useState} from 'react';

packages/@react-spectrum/table/stories/TableDnD.stories.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import {ComponentMeta} from '@storybook/react';
1515
import defaultConfig, {TableStory} from './Table.stories';
1616
import {Divider} from '@react-spectrum/divider';
1717
import {DragBetweenTablesExample, DragBetweenTablesRootOnlyExample, DragExample, DragOntoRowExample, DragWithoutRowHeaderExample, items, ReorderExample} from './TableDnDExamples';
18-
import {Droppable} from '../../../@react-aria-nutrient/dnd/stories/dnd.stories';
18+
import {Droppable} from '../../../@react-aria/dnd/stories/dnd.stories';
1919
import {Flex} from '@react-spectrum/layout';
2020
import React from 'react';
2121
import {TableView} from '../';

packages/@react-spectrum/table/stories/TableDnDUtil.stories.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {action} from '@storybook/addon-actions';
1414
import {ComponentMeta} from '@storybook/react';
1515
import defaultConfig, {TableStory} from './Table.stories';
1616
import {DragBetweenTablesComplex, DragBetweenTablesOverride, DragExampleUtilHandlers, FinderDropUtilHandlers, InsertExampleUtilHandlers, ItemDropExampleUtilHandlers, ReorderExampleUtilHandlers, RootDropExampleUtilHandlers} from './TableDnDUtilExamples';
17-
import {Droppable} from '../../../@react-aria-nutrient/dnd/stories/dnd.stories';
17+
import {Droppable} from '../../../@react-aria/dnd/stories/dnd.stories';
1818
import {Flex} from '@react-spectrum/layout';
1919
import React from 'react';
2020
import {TableView} from '..';

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

+4-4
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ space for the tray.
6363

6464
Luckily for us, iOS 13 added support for the [VisualViewport](https://developer.mozilla.org/en-US/docs/Web/API/VisualViewport) API. By querying `window.visualViewport.height` we could get a reliable measurement of how much vertical space was available on screen. Furthermore, we could track
6565
when the onscreen keyboard was opened or dismissed by listening to the VisualViewport's `resize` event. Leveraging these two allowed us to create a tray that properly adjusts to the presence of iOS onscreen keyboard. Check out the video below
66-
to see how the ComboBox tray worked before and after we switched to the VisualViewport API. If you'd like to track the visual viewport size in your own app, you can use the [useViewportSize](https://github.com/adobe/react-spectrum/blob/main/packages/@react-aria-nutrient/utils/src/useViewportSize.ts) hook available in the `@react-aria-nutrient/utils` package.
66+
to see how the ComboBox tray worked before and after we switched to the VisualViewport API. If you'd like to track the visual viewport size in your own app, you can use the [useViewportSize](https://github.com/adobe/react-spectrum/blob/main/packages/@react-aria/utils/src/useViewportSize.ts) hook available in the `@react-aria-nutrient/utils` package.
6767

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

@@ -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-nutrient/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/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-nutrient/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/overlays/src/ariaHideOutside.ts) function in `@react-aria-nutrient/overlays` if you'd like to learn more.
9898

9999
### Mobile implementation divergence
100100

@@ -133,7 +133,7 @@ Special care was taken such that the messages themselves only contained relevant
133133
When the user then moves to a different option in the same section, only the newly focused item name is announced. Similarly, the total option count is only announced when number of options available in the listbox changes. Since many of these messages were added to fill in gaps in VoiceOver's announcement,
134134
we only trigger the `LiveAnnouncer` on Apple devices to avoid announcement overlap on other screen readers.
135135

136-
If you are interested in using this `LiveAnnouncer` yourself, check out [LiveAnnouncer](https://github.com/adobe/react-spectrum/blob/main/packages/@react-aria-nutrient/live-announcer/src/LiveAnnouncer.tsx) in `@react-aria-nutrient/live-announcer`. Otherwise, the [useComboBox](../react-aria/useComboBox.html) hook provides you with all of the custom messaging out of the box. See the video below for a sneak peek!
136+
If you are interested in using this `LiveAnnouncer` yourself, check out [LiveAnnouncer](https://github.com/adobe/react-spectrum/blob/main/packages/@react-aria/live-announcer/src/LiveAnnouncer.tsx) in `@react-aria-nutrient/live-announcer`. Otherwise, the [useComboBox](../react-aria/useComboBox.html) hook provides you with all of the custom messaging out of the box. See the video below for a sneak peek!
137137

138138
<Video src={comboboxAccessibilityUrl} alt="Demo of VoiceOver announcement in ComboBox" style={{maxWidth: 'min(100%, 700px)', display: 'block', margin: '20px auto'}} controls />
139139

scripts/extractStarter.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ function MyTreeItemContent`);
109109
}
110110
}
111111

112-
let theme = fs.readFileSync('packages/@react-aria-nutrient/example-theme/src/index.css', 'utf8');
112+
let theme = fs.readFileSync('packages/@react-aria/example-theme/src/index.css', 'utf8');
113113
theme = `/* Base styles */
114114
:root {
115115
font-family: system-ui;

scripts/lint-packages.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ for (let pkgPath of packagePaths) {
7373
for (let pkg of packagePaths) {
7474
let json = packages[pkg];
7575

76-
if (!pkg.includes('@react-types') && !pkg.includes('@spectrum-icons') && !pkg.includes('@react-aria-nutrient/example-theme') && !pkg.includes('@react-spectrum/style-macro-s1') && json.rsp?.type !== 'cli') {
76+
if (!pkg.includes('@react-types') && !pkg.includes('@spectrum-icons') && !pkg.includes('@react-aria/example-theme') && !pkg.includes('@react-spectrum/style-macro-s1') && json.rsp?.type !== 'cli') {
7777
let topIndexExists = fs.existsSync(path.join(pkg, '..', 'index.ts'));
7878
if (topIndexExists) {
7979
let contents = fs.readFileSync(path.join(pkg, '..', 'index.ts'));

scripts/plopfile.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ module.exports = function (plop) {
7878
type: 'addMany',
7979
templateFiles: '../plop-templates/@react-aria-nutrient/**',
8080
base: '../plop-templates/@react-aria-nutrient/',
81-
destination: `../packages/@react-aria-nutrient/${packageName}`,
81+
destination: `../packages/@react-aria/${packageName}`,
8282
data: {componentName, scopes}
8383
});
8484
}

scripts/react-16-install-prep.mjs

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ try {
1313
}
1414

1515
try {
16-
let content = fs.readFileSync('./packages/@react-aria-nutrient/test-utils/package.json', 'utf8');
16+
let content = fs.readFileSync('./packages/@react-aria/test-utils/package.json', 'utf8');
1717
let pkg = JSON.parse(content);
1818
pkg.peerDependencies['@testing-library/react'] = '^12';
19-
fs.writeFileSync('./packages/@react-aria-nutrient/test-utils/package.json', JSON.stringify(pkg, null, 2));
19+
fs.writeFileSync('./packages/@react-aria/test-utils/package.json', JSON.stringify(pkg, null, 2));
2020
} catch (e) {
2121
console.error('Error:', e);
2222
}

scripts/react-17-install-prep.mjs

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ try {
1313
}
1414

1515
try {
16-
let content = fs.readFileSync('./packages/@react-aria-nutrient/test-utils/package.json', 'utf8');
16+
let content = fs.readFileSync('./packages/@react-aria/test-utils/package.json', 'utf8');
1717
let pkg = JSON.parse(content);
1818
pkg.peerDependencies['@testing-library/react'] = '^12';
19-
fs.writeFileSync('./packages/@react-aria-nutrient/test-utils/package.json', JSON.stringify(pkg, null, 2));
19+
fs.writeFileSync('./packages/@react-aria/test-utils/package.json', JSON.stringify(pkg, null, 2));
2020
} catch (e) {
2121
console.error('Error:', e);
2222
}

0 commit comments

Comments
 (0)