Skip to content

Commit a149f00

Browse files
authored
New React Aria Landing Page (#5596)
1 parent 1193073 commit a149f00

File tree

129 files changed

+6873
-470
lines changed

Some content is hidden

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

129 files changed

+6873
-470
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ A React implementation of Spectrum, Adobe’s design system. Spectrum provides a
1010

1111
### React Aria
1212

13-
A library of React Hooks that provides accessible UI primitives for your design system.
13+
A library of unstyled React components and hooks that helps you build accessible, high quality UI components for your application or design system.
1414

1515
[Learn more about React Aria](https://react-spectrum.adobe.com/react-aria/index.html)
1616

@@ -38,7 +38,7 @@ A collection of framework-agnostic internationalization libraries for the web.
3838
React Spectrum includes several libraries, which you can choose depending on your usecase.
3939

4040
* [React Spectrum](https://react-spectrum.adobe.com/react-spectrum/getting-started.html) is an implementation of Adobe's design system. If you’re integrating with Adobe software or would like a complete component library to use in your project, look no further!
41-
* [React Aria](https://react-spectrum.adobe.com/react-aria/getting-started.html) is a collection of React Hooks that provides accessible UI primitives for use in your own design system. If you're building a component library for the web from scratch with your own styling, start here.
41+
* [React Aria](https://react-spectrum.adobe.com/react-aria/getting-started.html) is a collection of unstyled React components and hooks that helps you build accessible, high quality UI components for your own application or design system. If you're building a component library for the web from scratch with your own styling, start here.
4242
* [React Stately](https://react-spectrum.adobe.com/react-stately/getting-started.html) is a library of state management hooks for use in your component library. If you're using React Aria, you'll likely also use React Stately, but it can also be used independently (e.g. on other platforms like React Native).
4343

4444
[Read more about our architecture](https://react-spectrum.adobe.com/architecture.html).

package.json

+6-1
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@
143143
"jest-matchmedia-mock": "^1.1.0",
144144
"lerna": "^3.13.2",
145145
"lfcdn": "^0.4.2",
146+
"lucide-react": "^0.294.0",
146147
"md5": "^2.2.1",
147148
"npm-cli-login": "^1.0.0",
148149
"nyc": "^10.2.0",
@@ -166,6 +167,7 @@
166167
"sharp": "^0.31.2",
167168
"sinon": "^7.3.1",
168169
"storybook-dark-mode": "^1.1.1-canary.120.3843.0",
170+
"tailwind-variants": "^0.1.18",
169171
"tailwindcss": "^3.2.2",
170172
"tailwindcss-animate": "^1.0.7",
171173
"tempy": "^0.5.0",
@@ -189,7 +191,10 @@
189191
"@parcel/transformer-css": {
190192
"cssModules": {
191193
"global": true,
192-
"exclude": ["**/*.global.css", "packages/@react-aria/example-theme/**"]
194+
"exclude": [
195+
"**/*.global.css",
196+
"packages/@react-aria/example-theme/**"
197+
]
193198
},
194199
"drafts": {
195200
"nesting": true

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

+5-2
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,11 @@ export class NumberFormatter implements Intl.NumberFormat {
145145

146146
function getCachedNumberFormatter(locale: string, options: NumberFormatOptions = {}): Intl.NumberFormat {
147147
let {numberingSystem} = options;
148-
if (numberingSystem && locale.indexOf('-u-nu-') === -1) {
149-
locale = `${locale}-u-nu-${numberingSystem}`;
148+
if (numberingSystem && locale.includes('-nu-')) {
149+
if (!locale.includes('-u-')) {
150+
locale += '-u-';
151+
}
152+
locale += `-nu-${numberingSystem}`;
150153
}
151154

152155
if (options.style === 'unit' && !supportsUnit) {

packages/@react-aria/dnd/src/useAutoScroll.ts

+11-2
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,14 @@ const AUTOSCROLL_AREA_SIZE = 20;
1717

1818
export function useAutoScroll(ref: RefObject<Element>) {
1919
let scrollableRef = useRef<Element>(null);
20+
let scrollableX = useRef(true);
21+
let scrollableY = useRef(true);
2022
useEffect(() => {
2123
if (ref.current) {
2224
scrollableRef.current = isScrollable(ref.current) ? ref.current : getScrollParent(ref.current);
25+
let style = window.getComputedStyle(scrollableRef.current);
26+
scrollableX.current = /(auto|scroll)/.test(style.overflowX);
27+
scrollableY.current = /(auto|scroll)/.test(style.overflowY);
2328
}
2429
}, [ref]);
2530

@@ -40,8 +45,12 @@ export function useAutoScroll(ref: RefObject<Element>) {
4045
}, [state]);
4146

4247
let scroll = useCallback(() => {
43-
scrollableRef.current.scrollLeft += state.dx;
44-
scrollableRef.current.scrollTop += state.dy;
48+
if (scrollableX.current) {
49+
scrollableRef.current.scrollLeft += state.dx;
50+
}
51+
if (scrollableY.current) {
52+
scrollableRef.current.scrollTop += state.dy;
53+
}
4554

4655
if (state.timer) {
4756
state.timer = requestAnimationFrame(scroll);

packages/@react-aria/dnd/test/useDroppableCollection.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ describe('useDroppableCollection', () => {
216216
}
217217
let tree = render(<>
218218
<Draggable />
219-
<DroppableGridExample style={{overflow: 'scroll'}} items={items} onDropEnter={onDropEnter} onDropExit={onDragExit} onDrop={onDrop} />
219+
<DroppableGridExample style={{overflowY: 'scroll'}} items={items} onDropEnter={onDropEnter} onDropExit={onDragExit} onDrop={onDrop} />
220220
</>);
221221

222222
let draggable = tree.getByText('Drag me');

packages/dev/docs/package.json

+3
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,8 @@
3434
"react": "^18.0.0",
3535
"react-dom": "^18.0.0",
3636
"react-lowlight": "^2.0.0"
37+
},
38+
"alias": {
39+
"tailwind-starter": "../../../starters/tailwind/src"
3740
}
3841
}
Binary file not shown.
Binary file not shown.
12.3 KB
Binary file not shown.

packages/dev/docs/pages/index.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ A collection of libraries and tools that help you build adaptive, accessible, an
5858
},
5959
{
6060
title: 'React Aria',
61-
description: 'A library of React Hooks that provides accessible UI primitives for your design system.',
61+
description: 'A library of unstyled React components and hooks that helps you build accessible, high quality UI components for your application or design system.',
6262
url: './react-aria/index.html',
6363
urlText: <>Learn more<VisuallyHidden elementType="span"> about React Aria</VisuallyHidden></>
6464
},
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"plugins": {
3+
"tailwindcss": {}
4+
}
5+
}

0 commit comments

Comments
 (0)