Skip to content

Commit f336300

Browse files
authored
refactor: Rename @react-aria/* to @react-aria-nutrient/* (#2)
* Rename packages * chore: update @react-aria-nutrient/aria-modal-polyfill version to 3.7.13 in package.json * chore: update @react-aria-nutrient/aria-modal-polyfill version in yarn.lock to 3.7.13 * chore: update @react-aria-nutrient/aria-modal-polyfill version to ^3.7.13 in package.json * chore: replace @react-aria-nutrient/aria-modal-polyfill with @react-aria/aria-modal-polyfill in package.json and yarn.lock * chore: update dependencies to use @react-aria/interactions and @react-aria/visually-hidden in package.json and yarn.lock * chore: remove 'docs' job from CircleCI workflow and update dependencies for comment job * chore: remove 'docs' and 'v-docs' jobs from CircleCI configuration to streamline workflow * fixes * fix: update import paths from @react-aria-nutrient to @react-aria for numberfield and dnd components * fix: update Makefile to correct package paths by replacing @react-aria-nutrient with @react-aria * fix: update linting script to replace @react-aria-nutrient/example-theme with @react-aria/example-theme * chore: rename react-aria to "@react-aria-nutrient/*" (#5) * Rename react-aria to "@react-aria-nutrient/*" * chore: update dependencies to include @react-aria-nutrient/react-aria version ^3.38.1 in package.json and yarn.lock * fix: update path for react-aria components to remove namespace prefix * fix: update test to reflect new namespace for react-aria components * fix: update documentation paths to include aria-nutrient namespace in package.json * fixes
1 parent c25404e commit f336300

File tree

961 files changed

+4950
-4953
lines changed

Some content is hidden

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

961 files changed

+4950
-4953
lines changed

.circleci/config.yml

-60
Original file line numberDiff line numberDiff line change
@@ -179,36 +179,6 @@ jobs:
179179
paths:
180180
- '*/storybook-s2/'
181181

182-
docs:
183-
executor: rsp
184-
steps:
185-
- restore_cache:
186-
key: react-spectrum-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }}
187-
188-
- run:
189-
name: build docs
190-
command: make website
191-
192-
- persist_to_workspace:
193-
root: dist
194-
paths:
195-
- '*/docs/'
196-
197-
docs-production:
198-
executor: rsp
199-
steps:
200-
- restore_cache:
201-
key: react-spectrum-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }}
202-
203-
- run:
204-
name: build docs
205-
command: make website-production
206-
207-
- persist_to_workspace:
208-
root: dist
209-
paths:
210-
- '*/docs/'
211-
212182
verdaccio:
213183
executor: rsp
214184
steps:
@@ -231,28 +201,6 @@ jobs:
231201
paths:
232202
- storage
233203

234-
v-docs:
235-
executor: rsp
236-
steps:
237-
- restore_cache:
238-
key: react-spectrum-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }}
239-
240-
- attach_workspace:
241-
at: /tmp/verdaccio-workspace
242-
243-
- run:
244-
name: build docs off verdaccio
245-
command: |
246-
./scripts/verdaccio-ci.sh
247-
./scripts/verdaccio-build.sh
248-
environment:
249-
VERDACCIO_STORAGE_PATH: /tmp/verdaccio-workspace/storage
250-
251-
- persist_to_workspace:
252-
root: verdaccio_dist
253-
paths:
254-
- '*/verdaccio/docs'
255-
256204
v-rsp-cra-18:
257205
executor: rsp
258206
steps:
@@ -522,18 +470,12 @@ workflows:
522470
- typecheck-docs:
523471
requires:
524472
- install
525-
- docs:
526-
requires:
527-
- install
528473
- verdaccio:
529474
filters:
530475
branches:
531476
only: main
532477
requires:
533478
- install
534-
- v-docs:
535-
requires:
536-
- verdaccio
537479
- v-rsp-cra-18:
538480
requires:
539481
- verdaccio
@@ -574,11 +516,9 @@ workflows:
574516
- lint
575517
- test
576518
- test-esm
577-
- docs
578519
- comment:
579520
name: comment-verdaccio
580521
requires:
581-
- v-docs
582522
- v-rsp-cra-18
583523
- v-webpack-4
584524
- v-nextjs

.storybook-s2/docs/typography.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { style } from '../../packages/@react-spectrum/s2/style/spectrum-theme' with {type: 'macro'};
22
import {Link as S2Link} from '@react-spectrum/s2';
3-
import {useFocusRing, useHover} from 'react-aria';
3+
import {useFocusRing, useHover} from '@react-aria-nutrient/react-aria';
44

55
function AnchorLink({id, isHovered}) {
66
let { isFocusVisible, focusProps } = useFocusRing({within: true});

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

+4-4
Original file line numberDiff line numberDiff line change
@@ -469,10 +469,10 @@ export default [{
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
}, {
@@ -484,10 +484,10 @@ export default [{
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",

examples/rsp-cra-18/src/sections/DragAndDropExamples.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {DropZone, Flex, Divider, IllustratedMessage, Heading} from '@adobe/react-spectrum';
22
import React from 'react';
33
import Upload from '@spectrum-icons/illustrations/Upload';
4-
import {useDrag} from '@react-aria/dnd';
4+
import {useDrag} from '@react-aria-nutrient/dnd';
55

66
export default function DragAndDropExamples() {
77
let [isFilled, setIsFilled] = React.useState(false);

examples/rsp-next-ts/next.config.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import localesPlugin from '@react-aria/optimize-locales-plugin';
1+
import localesPlugin from '@react-aria-nutrient/optimize-locales-plugin';
22
import {glob} from 'glob';
33

44
export default {

examples/rsp-next-ts/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
},
1515
"dependencies": {
1616
"@adobe/react-spectrum": "^3.35.0",
17-
"@react-aria/optimize-locales-plugin": "^1.1.0",
17+
"@react-aria-nutrient/optimize-locales-plugin": "^1.1.0",
1818
"@react-spectrum/provider": "^3.9.7",
1919
"@react-spectrum/toast": "^3.0.0-beta.16",
2020
"@spectrum-icons/illustrations": "^3.6.12",

lib/yarn-plugin-rsp-duplicates.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ module.exports = {
2424
let packages = new Map();
2525
let hasRSP = false;
2626
for (const pkg of project.storedPackages.values()) {
27-
if (!structUtils.isVirtualLocator(pkg) && (pkg.scope === 'react-aria' || pkg.scope === 'react-spectrum' || pkg.scope === 'react-stately')) {
27+
if (!structUtils.isVirtualLocator(pkg) && (pkg.scope === '@react-aria-nutrient/react-aria' || pkg.scope === 'react-spectrum' || pkg.scope === 'react-stately')) {
2828
let key = `@${pkg.scope}/${pkg.name}`;
2929
if (!packages.has(key)) {
3030
packages.set(key, new Set([pkg.version]));

packages/@adobe/react-spectrum/package.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@
3838
},
3939
"dependencies": {
4040
"@internationalized/string": "^3.2.5",
41-
"@react-aria/collections": "3.0.0-beta.1",
42-
"@react-aria/i18n": "^3.12.7",
43-
"@react-aria/ssr": "^3.9.7",
44-
"@react-aria/utils": "^3.28.1",
45-
"@react-aria/visually-hidden": "^3.8.21",
41+
"@react-aria-nutrient/collections": "3.0.0-beta.1",
42+
"@react-aria-nutrient/i18n": "^3.12.7",
43+
"@react-aria-nutrient/ssr": "^3.9.7",
44+
"@react-aria-nutrient/utils": "^3.28.1",
45+
"@react-aria-nutrient/visually-hidden": "^3.8.21",
4646
"@react-spectrum/accordion": "^3.0.4",
4747
"@react-spectrum/actionbar": "^3.6.5",
4848
"@react-spectrum/actiongroup": "^3.10.13",

packages/@adobe/react-spectrum/src/index.ts

+7-7
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,11 @@ export {Content, Footer, Header, View} from '@react-spectrum/view';
6868
export {Well} from '@react-spectrum/well';
6969
export {Item, Section} from '@react-stately/collections';
7070
export {useAsyncList, useListData, useTreeData} from '@react-stately/data';
71-
export {VisuallyHidden} from '@react-aria/visually-hidden';
72-
export {useCollator, useDateFormatter, useFilter, useLocale, useLocalizedStringFormatter, useMessageFormatter, useNumberFormatter} from '@react-aria/i18n';
73-
export {SSRProvider} from '@react-aria/ssr';
71+
export {VisuallyHidden} from '@react-aria-nutrient/visually-hidden';
72+
export {useCollator, useDateFormatter, useFilter, useLocale, useLocalizedStringFormatter, useMessageFormatter, useNumberFormatter} from '@react-aria-nutrient/i18n';
73+
export {SSRProvider} from '@react-aria-nutrient/ssr';
7474
export {useDragAndDrop, DIRECTORY_DRAG_TYPE} from '@react-spectrum/dnd';
75-
export {Collection} from '@react-aria/collections';
75+
export {Collection} from '@react-aria-nutrient/collections';
7676

7777
export type {SpectrumActionBarContainerProps, SpectrumActionBarProps} from '@react-spectrum/actionbar';
7878
export type {SpectrumActionGroupProps} from '@react-spectrum/actiongroup';
@@ -123,9 +123,9 @@ export type {SpectrumTreeViewProps, SpectrumTreeViewItemProps, SpectrumTreeViewI
123123
export type {ContentProps, FooterProps, HeaderProps, ViewProps} from '@react-spectrum/view';
124124
export type {SpectrumWellProps} from '@react-spectrum/well';
125125
export type {AsyncListData, AsyncListOptions, ListData, ListOptions, TreeData, TreeOptions} from '@react-stately/data';
126-
export type {VisuallyHiddenAria, VisuallyHiddenProps} from '@react-aria/visually-hidden';
127-
export type {DateFormatter, DateFormatterOptions, Filter, FormatMessage, Locale, LocalizedStrings} from '@react-aria/i18n';
128-
export type {SSRProviderProps} from '@react-aria/ssr';
126+
export type {VisuallyHiddenAria, VisuallyHiddenProps} from '@react-aria-nutrient/visually-hidden';
127+
export type {DateFormatter, DateFormatterOptions, Filter, FormatMessage, Locale, LocalizedStrings} from '@react-aria-nutrient/i18n';
128+
export type {SSRProviderProps} from '@react-aria-nutrient/ssr';
129129
export type {DirectoryDropItem, DragAndDropHooks, DragAndDropOptions, DraggableCollectionEndEvent, DraggableCollectionMoveEvent, DraggableCollectionStartEvent, DragPreviewRenderer, DragTypes, DropItem, DropOperation, DroppableCollectionDropEvent, DroppableCollectionEnterEvent, DroppableCollectionExitEvent, DroppableCollectionInsertDropEvent, DroppableCollectionMoveEvent, DroppableCollectionOnItemDropEvent, DroppableCollectionReorderEvent, DroppableCollectionRootDropEvent, DropPosition, DropTarget, FileDropItem, ItemDropTarget, RootDropTarget, TextDropItem} from '@react-spectrum/dnd';
130130
export type {Key, Selection, ItemProps, SectionProps, RouterConfig} from '@react-types/shared';
131131
export type {SpectrumAccordionProps, SpectrumDisclosureProps, SpectrumDisclosurePanelProps, SpectrumDisclosureTitleProps} from '@react-spectrum/accordion';

packages/@internationalized/number/src/NumberFormatter.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ export function numberFormatSignDisplayPolyfill(numberFormat: Intl.NumberFormat,
190190
// ignore RTL/LTR marker character
191191
let minus = negative.replace(noSign, '').replace(/\u200e|\u061C/, '');
192192
if ([...minus].length !== 1) {
193-
console.warn('@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case');
193+
console.warn('@react-aria-nutrient/i18n polyfill for NumberFormat signDisplay: Unsupported case');
194194
}
195195
let positive = negative.replace(noSign, '!!!').replace(minus, '+').replace('!!!', noSign);
196196
return positive;
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
# @react-aria/actiongroup
1+
# @react-aria-nutrient/actiongroup
22

33
This package is part of [react-spectrum](https://github.com/adobe/react-spectrum). See the repo for more details.

packages/@react-aria/actiongroup/package.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "@react-aria/actiongroup",
2+
"name": "@react-aria-nutrient/actiongroup",
33
"version": "3.7.14",
44
"description": "Spectrum UI components in React",
55
"license": "Apache-2.0",
@@ -22,10 +22,10 @@
2222
"url": "https://github.com/adobe/react-spectrum"
2323
},
2424
"dependencies": {
25-
"@react-aria/focus": "^3.20.1",
26-
"@react-aria/i18n": "^3.12.7",
27-
"@react-aria/interactions": "^3.24.1",
28-
"@react-aria/utils": "^3.28.1",
25+
"@react-aria-nutrient/focus": "^3.20.1",
26+
"@react-aria-nutrient/i18n": "^3.12.7",
27+
"@react-aria-nutrient/interactions": "^3.24.1",
28+
"@react-aria-nutrient/utils": "^3.28.1",
2929
"@react-stately/list": "^3.12.0",
3030
"@react-types/actiongroup": "^3.4.15",
3131
"@react-types/shared": "^3.28.0",

packages/@react-aria/actiongroup/src/useActionGroup.ts

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

1313
import {AriaActionGroupProps} from '@react-types/actiongroup';
14-
import {createFocusManager} from '@react-aria/focus';
14+
import {createFocusManager} from '@react-aria-nutrient/focus';
1515
import {DOMAttributes, FocusableElement, Orientation, RefObject} from '@react-types/shared';
16-
import {filterDOMProps, useLayoutEffect} from '@react-aria/utils';
16+
import {filterDOMProps, useLayoutEffect} from '@react-aria-nutrient/utils';
1717
import {ListState} from '@react-stately/list';
18-
import {useLocale} from '@react-aria/i18n';
18+
import {useLocale} from '@react-aria-nutrient/i18n';
1919
import {useState} from 'react';
2020

2121
const BUTTON_GROUP_ROLES = {

packages/@react-aria/actiongroup/src/useActionGroupItem.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212

1313
import {DOMAttributes, FocusableElement, Key, RefObject} from '@react-types/shared';
1414
import {ListState} from '@react-stately/list';
15-
import {mergeProps, useEffectEvent} from '@react-aria/utils';
16-
import {PressProps} from '@react-aria/interactions';
15+
import {mergeProps, useEffectEvent} from '@react-aria-nutrient/utils';
16+
import {PressProps} from '@react-aria-nutrient/interactions';
1717
import {useEffect} from 'react';
1818

1919
export interface AriaActionGroupItemProps {

packages/@react-aria/aria-modal-polyfill/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# @react-aria/aria-modal-polyfill
1+
# @react-aria-nutrient/aria-modal-polyfill
22

33
This package is part of [react-spectrum](https://github.com/adobe/react-spectrum).
44
Certain browser + screen reader combinations do not implement aria-modal correctly, allowing users to navigate outside of the modal.
@@ -7,7 +7,7 @@ This package watches a container for aria-modal nodes and hides the rest of the
77
## How to use
88
Include this once in your application at the top level before modals are rendered.
99
```
10-
import {watchModals} from '@react-aria/aria-modal-polyfill';
10+
import {watchModals} from '@react-aria-nutrient/aria-modal-polyfill';
1111
watchModals();
1212
```
1313

packages/@react-aria/aria-modal-polyfill/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "@react-aria/aria-modal-polyfill",
2+
"name": "@react-aria-nutrient/aria-modal-polyfill",
33
"version": "3.7.13",
44
"description": "Spectrum UI components in React",
55
"license": "Apache-2.0",
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
# @react-aria/autocomplete
1+
# @react-aria-nutrient/autocomplete
22

33
This package is part of [react-spectrum](https://github.com/adobe/react-spectrum). See the repo for more details.

packages/@react-aria/autocomplete/docs/useAutocomplete.mdx

+2-2
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/autocomplete';
13+
import docs from 'docs:@react-aria-nutrient/autocomplete';
1414
import {FunctionAPI, HeaderInfo, InterfaceType, TypeContext, TypeLink, PageDescription} from '@react-spectrum/docs';
15-
import packageData from '@react-aria/autocomplete/package.json';
15+
import packageData from '@react-aria-nutrient/autocomplete/package.json';
1616
import statelyDocs from 'docs:@react-stately/autocomplete';
1717
import {InlineAlert, Content, Heading} from '@adobe/react-spectrum';
1818

0 commit comments

Comments
 (0)