Skip to content

Commit 39b6e9c

Browse files
committed
Rename react-aria to react-aria-nutrient
1 parent cfe79d3 commit 39b6e9c

File tree

2,027 files changed

+68303
-46442
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,027 files changed

+68303
-46442
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/example-theme/**/*.css": ["@parcel/transformer-css"],
13+
"packages/@react-aria-nutrient/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-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
21
module.exports = {
32
stories: [
4-
'../packages/@{react-aria,react-stately,spectrum-icons}/*/stories/*.stories.{js,jsx,ts,tsx}',
3+
'../packages/@{react-aria-nutrient,react-stately,spectrum-icons}/*/stories/*.stories.{js,jsx,ts,tsx}',
54
'../packages/@react-spectrum/!(s2)/stories/*.stories.{js,jsx,ts,tsx}',
65
'../packages/react-aria-components/stories/*.stories.{js,jsx,ts,tsx}'
76
],

CONTRIBUTING.md

+47-8
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,33 @@
33
Thanks for choosing to contribute! We look forward to improving web applications together. Here you will find information on how to propose bug fixes, suggest improvements, and develop locally.
44

55
## Better together
6+
67
We believe that the best way to build a better web is together as a community. The React Spectrum project aims to make it easier to build design systems and component libraries with high quality interactions and accessibility for all. The core team and all external contributors follow the same process in order maintain a high quality codebase.
78

89
## Code of conduct
10+
911
We adhere to the Adobe [code of conduct](https://github.com/adobe/react-spectrum/blob/main/CODE_OF_CONDUCT.md) and by participating, you are expected to uphold this code. Please report unacceptable behavior to [email protected].
1012

1113
## Reporting issues
14+
1215
### Bugs
16+
1317
We use [GitHub issues](https://github.com/adobe/react-spectrum/issues) to track work and log bugs. Please check existing issues before filing anything new. We do our best to respond to issues within a few days. If you would like to contribute a fix, please let us know by leaving a comment on the issue.
1418

1519
The best way to reduce back and forth on a bug is provide a small code example exhibiting the issue along with steps to reproduce it. If you would like to work on a bugfix yourself, make sure an issue exists first.
1620

1721
Please follow the issue templates when filing new ones and add as much information as possible.
1822

1923
### Feature requests
24+
2025
Our components can always be improved upon. If you have a feature request, you can use our Feature Request issue template. For larger scopes of work, it is a good idea to open a Request For Comments (RFC) first to gather feedback from the team. Please follow our RFC [template](https://github.com/adobe/react-spectrum/blob/main/rfcs/template.md). Make a PR to add your RFC to the [rfcs folder](https://github.com/adobe/react-spectrum/tree/main/rfcs) to give the team and the community a chance to discuss the proposal.
2126

2227
### Security issues
28+
2329
Security issues shouldn't be reported on this issue tracker. Instead, please follow the directions [here](https://helpx.adobe.com/security/alertus.html) to contact our security team.
2430

2531
## Pull Requests
32+
2633
For significant changes, it is recommended that you first propose your solution in [an RFC](#feature-requests) and gather feedback.
2734

2835
A few things to keep in mind before submitting a pull request:
@@ -36,6 +43,7 @@ A few things to keep in mind before submitting a pull request:
3643
- Remember that all submissions require review, please be patient.
3744

3845
The team will review all pull requests and do one of the following:
46+
3947
- request changes to it (most common)
4048
- merge it
4149
- close it with an explanation.
@@ -45,71 +53,87 @@ Read [GitHub's pull request documentation](https://help.github.com/articles/abou
4553
Lastly, please follow the pull request template when submitting a pull request!
4654

4755
### Contributor License Agreement
56+
4857
All third-party contributions to this project must be accompanied by a signed contributor license agreement. This gives Adobe permission to redistribute your contributions as part of the project. [Sign our CLA](https://opensource.adobe.com/cla.html). You only need to submit an Adobe CLA one time, so if you have submitted one previously, you are good to go!
4958

5059
## Where to start
60+
5161
There are many places to dive into react-spectrum to help out. Before you take on a feature or issue, make sure you become familiar with [our architecture](https://react-spectrum.adobe.com/architecture.html).
5262

5363
If you are looking for place to start, consider the following options:
64+
5465
- Look for issues tagged with help wanted and/or good first issue.
5566
- Help triage existing issues by investigating problems and following up on missing information.
5667
- Update missing or fix existing documentation
5768
- Review and test open pull requests
5869

5970
## Developing
71+
6072
When you are ready to start developing you can clone the repo and start storybook.
6173
Make sure you have the following requirements installed: [node](https://nodejs.org/) (v14.15.0+) and [yarn](https://yarnpkg.com/en/) (v1.22.0+)
6274

6375
Fork the repo first using [this guide](https://help.github.com/articles/fork-a-repo), then clone it locally.
76+
6477
```
6578
git clone https://github.com/YOUR-USERNAME/react-spectrum
6679
cd react-spectrum
6780
yarn install
6881
```
6982

7083
You can then run the storybook and browse to [http://localhost:9003](http://localhost:9003) with:
84+
7185
```bash
7286
yarn start
7387
```
7488

7589
Or run the documentation and browse to [http://localhost:1234/](http://localhost:1234/) with:
90+
7691
```bash
7792
yarn start:docs
7893
```
7994

8095
### Component/Hook scaffolding
96+
8197
If you are looking to contribute a brand new component or Hook in a package that does not exist yet, please run the following command.
98+
8299
```bash
83100
yarn plop
84101
```
102+
85103
This will start a series of cli prompts to determine what template files and folders should be generated to help quick start your contribution.
86104
The prompts are as follows:
87105

88106
1. What type of project are you setting up?
89-
- Select "React Spectrum v3"
107+
108+
- Select "React Spectrum v3"
90109

91110
2. Scope name(s)
92-
- Select the package scopes that make sense for your contribution (e.g. react-spectrum if you are contributing a component, react-aria for an aria Hook, etc)
111+
112+
- Select the package scopes that make sense for your contribution (e.g. react-spectrum if you are contributing a component, react-aria for an aria Hook, etc)
93113

94114
3. Package name, all lowercase (e.g. textfield)
95115

96116
4. Component name, please use appropriate uppercase (e.g. TextField)
97-
- If you are contributing a non-component Hook, just enter the name of your Hook.
117+
118+
- If you are contributing a non-component Hook, just enter the name of your Hook.
98119

99120
5. Component css module name, blank if N/A. If unsure, check @adobe/spectrum-css-temp/components for a module containing the desired css (e.g. textfield)
100-
- If you cannot find the component CSS module name in @adobe/spectrum-css-temp/components, feel free to reach out to a team member via GitHub Issues or Discussions.
121+
- If you cannot find the component CSS module name in @adobe/spectrum-css-temp/components, feel free to reach out to a team member via GitHub Issues or Discussions.
101122

102123
Upon answering all the prompts, the appropriate package(s) should be generated and ready for modification.
103124

104125
**Note:** With regards to the generated docs files, please feel free to remove them if you won't be contributing docs. If you are contributing docs for a new component or Hook, please submit them in a separate pull request so that we can decide when to deploy them to our docs site.
105126

106127
### Tests
128+
107129
We use [jest](https://jestjs.io/) for unit tests and [react-testing-library](https://testing-library.com/docs/react-testing-library/intro) for rendering and writing assertions. Please make sure you include tests with your pull requests. Our CI will run the tests on PRs as well as the linter and type checker. You can see on each PR whether you have passed all our checks. We split the tests into 2 groups.
108130

109-
*Visual tests*
131+
_Visual tests_
132+
110133
- A Storybook story should be written for each visual state that a component can be in (based on props).
111134

112-
*Unit tests*
135+
_Unit tests_
136+
113137
- (Props) Anything that should be changed by a prop should be tested via react-testing-library.
114138
- (Events) Anything that should trigger an event should be tested via react-testing-library.
115139

@@ -126,50 +150,65 @@ yarn jest --coverage
126150
```
127151

128152
### Linting
153+
129154
The code is linted with [eslint](https://eslint.org/). The linter runs whenever you run the tests, but you can also run it with
155+
130156
```bash
131157
yarn lint
132158
```
133159

134160
### TypeScript
161+
135162
The code for React Spectrum is written in [TypeScript](https://www.typescriptlang.org/). The type checker will usually run in your editor, but also runs when you run
163+
136164
```bash
137165
yarn lint
138166
```
139167

140168
### Storybook
169+
141170
We use [Storybook](https://storybooks.js.org) for local development. Run the following command to start it:
171+
142172
```bash
143173
yarn start
144174
```
175+
145176
Then, open [http://localhost:9003](http://localhost:9003) in your browser to play around with the components and test your changes.
146177

147178
### Documentation
179+
148180
Our documentation should always remain up to date. When making changes to components, make sure the appropriate documentation has been updated to reflect those changes. Documentation for each component can be found in the docs folder within a component's package. Other documentation pages can be found in the [packages/dev/docs](https://github.com/adobe/react-spectrum/tree/main/packages/dev/docs) folder in the codebase.
149181

150182
Documentation can be run locally by using
183+
151184
```bash
152185
yarn start:docs
153186
```
187+
154188
Then, open [http://localhost:1234](http://localhost:1234) in your browser.
155189

156190
### Verdaccio
157-
We use [Verdaccio](https://verdaccio.org/) to set up a private registry for our packages to test our components in our example apps.
191+
192+
We use [Verdaccio](https://verdaccio.org/) to set up a private registry for our packages to test our components in our example apps.
158193

159194
To run verdaccio, first ensure that your `git status` is clean. If your computer has an Intel chip, add the line `shopt -s globstar extglob` in the `verdaccio.sh` file after line 21. Save and commit these changes under a clear message like "Do not push". If you have an Apple silicon chip, you may skip this step.
160195

161196
Then, run the following command:
197+
162198
```bash
163199
./scripts/verdaccio.sh
164200
```
165201

166202
Once that is finished, open up a new terminal and change your directory to the example app you would like to test. You may test it by first running the command:
203+
167204
```bash
168205
yarn install
169206
```
207+
170208
And then the appropriate command to run the development server. Check the project's `package.json` for the correct command.
171209

172210
If you are running into issues with `yarn install` at this step, you may need to clear your yarn cache. To do this, run this following command:
211+
173212
```
174213
rm -r ~/.yarn/berry/metadata/npm
175214
yarn cache clean --all
@@ -209,7 +248,7 @@ It's likely that you are using a different version of Node.js. Please use Node.j
209248
For example:
210249

211250
```
212-
@parcel/core: packages/@react-aria/virtualizer/src/index.ts does not export 'useVirtualizer'
251+
@parcel/core: packages/@react-aria-nutrient/virtualizer/src/index.ts does not export 'useVirtualizer'
213252
```
214253

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

Makefile

+1-1
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/i18n/server
37+
rm -rf packages/@react-aria-nutrient/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:

bin/useLayoutEffectRule.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ module.exports = {
1515
return {
1616
ImportDeclaration(node) {
1717
const source = node.source.value;
18-
if (source === '@react-aria/utils' || source === './useLayoutEffect' || source === './') {
18+
if (source === '@react-aria-nutrient/utils' || source === './useLayoutEffect' || source === './') {
1919
return;
2020
}
2121
const importSpecifiers = node.specifiers.filter(specifier => specifier.type === 'ImportSpecifier');
@@ -24,7 +24,7 @@ module.exports = {
2424
(item) => {
2525
let itemName = getName(item);
2626
if (itemName === 'useLayoutEffect') {
27-
context.report(node, 'Please use useLayoutEffect from @react-aria/utils instead.');
27+
context.report(node, 'Please use useLayoutEffect from @react-aria-nutrient/utils instead.');
2828
}
2929
}
3030
);

eslint.config.mjs

+9-9
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/i18n/server",
37+
"packages/@react-aria-nutrient/i18n/server",
3838
"packages/@spectrum-icons/color/**/*",
3939
"packages/@spectrum-icons/ui/**/*",
4040
"packages/@spectrum-icons/workflow/**/*",
@@ -462,32 +462,32 @@ export default [{
462462
},
463463
}, {
464464
files: [
465-
"packages/@react-aria/focus/src/**/*.ts",
466-
"packages/@react-aria/focus/src/**/*.tsx",
465+
"packages/@react-aria-nutrient/focus/src/**/*.ts",
466+
"packages/@react-aria-nutrient/focus/src/**/*.tsx",
467467
],
468468

469469
rules: {
470470
"no-restricted-globals": [ERROR, {
471471
name: "window",
472-
message: "Use getOwnerWindow from @react-aria/utils instead.",
472+
message: "Use getOwnerWindow from @react-aria-nutrient/utils instead.",
473473
}, {
474474
name: "document",
475-
message: "Use getOwnerDocument from @react-aria/utils instead.",
475+
message: "Use getOwnerDocument from @react-aria-nutrient/utils instead.",
476476
}],
477477
},
478478
}, {
479479
files: [
480-
"packages/@react-aria/interactions/src/**/*.ts",
481-
"packages/@react-aria/interactions/src/**/*.tsx",
480+
"packages/@react-aria-nutrient/interactions/src/**/*.ts",
481+
"packages/@react-aria-nutrient/interactions/src/**/*.tsx",
482482
],
483483

484484
rules: {
485485
"no-restricted-globals": [WARN, {
486486
name: "window",
487-
message: "Use getOwnerWindow from @react-aria/utils instead.",
487+
message: "Use getOwnerWindow from @react-aria-nutrient/utils instead.",
488488
}, {
489489
name: "document",
490-
message: "Use getOwnerDocument from @react-aria/utils instead.",
490+
message: "Use getOwnerDocument from @react-aria-nutrient/utils instead.",
491491
}],
492492
},
493493
}, {

examples/next-app-csp/next.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const localesPlugin = require('@react-aria/optimize-locales-plugin');
1+
const localesPlugin = require('@react-aria-nutrient/optimize-locales-plugin');
22
const glob = require('glob');
33

44
/** @type {import('next').NextConfig} */

examples/next-app/next.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const localesPlugin = require('@react-aria/optimize-locales-plugin');
1+
const localesPlugin = require('@react-aria-nutrient/optimize-locales-plugin');
22
const glob = require('glob');
33

44
/** @type {import('next').NextConfig} */

examples/rac-tailwind/.parcelrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"extends": "@parcel/config-default",
3-
"resolvers": ["@react-aria/parcel-resolver-optimize-locales", "@parcel/resolver-glob", "..."],
3+
"resolvers": ["@react-aria-nutrient/parcel-resolver-optimize-locales", "@parcel/resolver-glob", "..."],
44
"transformers": {
55
"**/intl/*.json": ["parcel-transformer-intl"]
66
}

examples/rac-tailwind/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
},
1010
"dependencies": {
1111
"@heroicons/react": "^2.0.16",
12-
"@react-aria/parcel-resolver-optimize-locales": "^1.0.0",
12+
"@react-aria-nutrient/parcel-resolver-optimize-locales": "^1.0.0",
1313
"@tailwindcss/postcss": "^4.0.0",
1414
"framer-motion": "^10.12.16",
1515
"parcel": "^2.13.0",

examples/remix/vite.config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { unstable_vitePlugin as remix } from "@remix-run/dev";
22
import { defineConfig } from "vite";
33
import tsconfigPaths from "vite-tsconfig-paths";
4-
import optimizeLocales from '@react-aria/optimize-locales-plugin';
4+
import optimizeLocales from '@react-aria-nutrient/optimize-locales-plugin';
55

66
export default defineConfig({
77
plugins: [

examples/rsp-cra-18/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"@adobe/react-spectrum": "latest",
99
"@babel/plugin-proposal-private-property-in-object": "^7.16.7",
1010
"@babel/preset-react": "^7.24.1",
11-
"@react-aria/dnd": "^3.6.1",
11+
"@react-aria-nutrient/dnd": "^3.6.1",
1212
"@react-spectrum/provider": "^3.9.7",
1313
"@react-spectrum/toast": "^3.0.0-beta.16",
1414
"@spectrum-icons/illustrations": "^3.6.8",

0 commit comments

Comments
 (0)