Skip to content

Commit 2ae6027

Browse files
committed
Merge branch 'main' of https://github.com/adobe/react-spectrum into modal-xl
# Conflicts: # packages/@react-spectrum/s2/src/Modal.tsx
2 parents 1aa5db0 + fad8ae9 commit 2ae6027

File tree

928 files changed

+36319
-16887
lines changed

Some content is hidden

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

928 files changed

+36319
-16887
lines changed

.circleci/comment.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
const Octokit = require('@octokit/rest');
2-
const fs = require('fs');
32

43
const octokit = new Octokit({
54
auth: `token ${process.env.GITHUB_TOKEN}`
@@ -36,13 +35,14 @@ async function run() {
3635
repo: 'react-spectrum',
3736
pull_number
3837
});
38+
// eslint-disable-next-line max-depth
3939
if (data && data.head.repo.full_name !== 'adobe/react-spectrum' && data.head.sha === forkHeadCommit) {
4040
pr = pull_number;
4141
break;
4242
}
4343
}
4444
} else if (process.env.CIRCLE_BRANCH === 'main') {
45-
//If it isn't a PR commit, then we are on main. Create a comment for the test app and docs build
45+
// If it isn't a PR commit, then we are on main. Create a comment for the test app and docs build
4646
await octokit.repos.createCommitComment({
4747
owner: 'adobe',
4848
repo: 'react-spectrum',
@@ -54,6 +54,7 @@ async function run() {
5454
[S2 Parcel Example](https://reactspectrum.blob.core.windows.net/reactspectrum/${process.env.CIRCLE_SHA1}/verdaccio/s2-parcel-example/index.html)
5555
[S2 Custom Icons](https://reactspectrum.blob.core.windows.net/reactspectrum/${process.env.CIRCLE_SHA1}/verdaccio/icon-builder-fixture/index.html)
5656
[S2 Webpack Example](https://reactspectrum.blob.core.windows.net/reactspectrum/${process.env.CIRCLE_SHA1}/verdaccio/s2-webpack-5-example/index.html)
57+
[S2 Next.js Example](https://reactspectrum.blob.core.windows.net/reactspectrum/${process.env.CIRCLE_SHA1}/verdaccio/s2-next-macros/index.html)
5758
[CRA Test App Size](https://reactspectrum.blob.core.windows.net/reactspectrum/${process.env.CIRCLE_SHA1}/verdaccio/publish-stats/build-stats.txt)
5859
[NextJS App Size](https://reactspectrum.blob.core.windows.net/reactspectrum/${process.env.CIRCLE_SHA1}/verdaccio/publish-stats/next-build-stats.txt)
5960
[Publish stats](https://reactspectrum.blob.core.windows.net/reactspectrum/${process.env.CIRCLE_SHA1}/verdaccio/publish-stats/publish.json)
@@ -84,7 +85,7 @@ async function run() {
8485
* [View the S2 docs](https://reactspectrum.blob.core.windows.net/reactspectrum/${process.env.CIRCLE_SHA1}/s2-docs/index.html)`
8586
});
8687
} catch (err) {
87-
console.error(err)
88+
console.error(err);
8889
}
8990
}
9091
}

.circleci/config.yml

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -678,6 +678,28 @@ jobs:
678678
paths:
679679
- '*/verdaccio/s2-webpack-5-example'
680680

681+
v-s2-next:
682+
executor: rsp-xlarge
683+
steps:
684+
- restore_cache:
685+
key: react-spectrum-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }}
686+
687+
- attach_workspace:
688+
at: /tmp/verdaccio-workspace
689+
690+
- run:
691+
name: build s2-next off verdaccio
692+
command: |
693+
./scripts/verdaccio-ci.sh
694+
./scripts/verdaccio-build-s2-next.sh
695+
environment:
696+
VERDACCIO_STORAGE_PATH: /tmp/verdaccio-workspace/storage
697+
698+
- persist_to_workspace:
699+
root: verdaccio_dist
700+
paths:
701+
- '*/verdaccio/s2-next-macros'
702+
681703
v-icon-builder:
682704
executor: rsp-xlarge
683705
steps:
@@ -735,7 +757,9 @@ jobs:
735757
name: deploy
736758
command: |
737759
if [ $AZURE_STORAGE_SAS_TOKEN ]; then
738-
azcopy copy "/tmp/dist/*" "https://reactspectrum.blob.core.windows.net/reactspectrum${AZURE_STORAGE_SAS_TOKEN}" --recursive
760+
azcopy copy "/tmp/dist/*" "https://reactspectrum.blob.core.windows.net/reactspectrum${AZURE_STORAGE_SAS_TOKEN}" --recursive --exclude-pattern "*.md;*.txt"
761+
azcopy copy "/tmp/dist/*" "https://reactspectrum.blob.core.windows.net/reactspectrum${AZURE_STORAGE_SAS_TOKEN}" --recursive --include-pattern "*.md" --content-type "text/markdown; charset=utf-8"
762+
azcopy copy "/tmp/dist/*" "https://reactspectrum.blob.core.windows.net/reactspectrum${AZURE_STORAGE_SAS_TOKEN}" --recursive --include-pattern "*.txt" --content-type "text/plain; charset=utf-8"
739763
fi
740764
741765
# Separate deploy workflow for the test docs built w/ verdaccio packages so it doesn't hold up the other deploy workflows
@@ -756,7 +780,9 @@ jobs:
756780
command: |
757781
if [ $AZURE_STORAGE_SAS_TOKEN ]; then
758782
for dir in /tmp/verdaccio_dist/*/verdaccio; do
759-
azcopy copy "$dir/*" "https://reactspectrum.blob.core.windows.net/reactspectrum/$CIRCLE_SHA1/verdaccio${AZURE_STORAGE_SAS_TOKEN}" --recursive
783+
azcopy copy "$dir/*" "https://reactspectrum.blob.core.windows.net/reactspectrum/$CIRCLE_SHA1/verdaccio${AZURE_STORAGE_SAS_TOKEN}" --recursive --exclude-pattern "*.md;*.txt"
784+
azcopy copy "$dir/*" "https://reactspectrum.blob.core.windows.net/reactspectrum/$CIRCLE_SHA1/verdaccio${AZURE_STORAGE_SAS_TOKEN}" --recursive --include-pattern "*.md" --content-type "text/markdown; charset=utf-8"
785+
azcopy copy "$dir/*" "https://reactspectrum.blob.core.windows.net/reactspectrum/$CIRCLE_SHA1/verdaccio${AZURE_STORAGE_SAS_TOKEN}" --recursive --include-pattern "*.txt" --content-type "text/plain; charset=utf-8"
760786
done
761787
fi
762788
@@ -774,7 +800,10 @@ jobs:
774800
mv ./azcopy_linux_amd64_*/azcopy /usr/local/bin/
775801
- run:
776802
name: deploy
777-
command: azcopy copy "/tmp/dist/production/docs/*" "https://reactspectrum.blob.core.windows.net/\$web${AZURE_STORAGE_SAS_TOKEN}" --recursive
803+
command: |
804+
azcopy copy "/tmp/dist/production/docs/*" "https://reactspectrum.blob.core.windows.net/\$web${AZURE_STORAGE_SAS_TOKEN}" --recursive --exclude-pattern "*.md;*.txt"
805+
azcopy copy "/tmp/dist/production/docs/*" "https://reactspectrum.blob.core.windows.net/\$web${AZURE_STORAGE_SAS_TOKEN}" --recursive --include-pattern "*.md" --content-type "text/markdown; charset=utf-8"
806+
azcopy copy "/tmp/dist/production/docs/*" "https://reactspectrum.blob.core.windows.net/\$web${AZURE_STORAGE_SAS_TOKEN}" --recursive --include-pattern "*.txt" --content-type "text/plain; charset=utf-8"
778807
779808
comment:
780809
executor: rsp
@@ -914,6 +943,9 @@ workflows:
914943
- v-s2-webpack:
915944
requires:
916945
- verdaccio
946+
- v-s2-next:
947+
requires:
948+
- verdaccio
917949
- v-icon-builder:
918950
requires:
919951
- verdaccio
@@ -948,6 +980,7 @@ workflows:
948980
- v-rac-rsp-tailwind
949981
- v-s2-parcel
950982
- v-s2-webpack
983+
- v-s2-next
951984
- v-icon-builder
952985
- v-publish-stats
953986
- comment:

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,5 @@ packages/dev/storybook-builder-parcel/iframe.html
1919
packages/dev/storybook-builder-parcel/preview.js
2020
starters/docs/registry
2121
starters/tailwind/registry
22+
starters/docs/yarn.lock
23+
starters/tailwind/yarn.lock

.storybook-s2/docs/Illustrations.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export function Illustrations() {
3535
size="XS"
3636
isQuiet
3737
aria-label="Copy"
38-
onPress={() => navigator.clipboard.writeText(`import ${name} from '@react-spectrum/s2/illustrations/gradient/${gradientStyle}/${icon}';`)}>
38+
onPress={() => navigator.clipboard.writeText(`import ${icon} from '@react-spectrum/s2/illustrations/gradient/${gradientStyle}/${icon}';`)}>
3939
<Paste />
4040
</ActionButton>
4141
</span>

.storybook-s2/docs/Release Notes.mdx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,16 @@ export default MDXLayout;
44

55
# Release Notes
66

7+
## v0.11.0
8+
9+
### New Components
10+
* [SelectBoxGroup](?path=/docs/selectboxgroup-alpha--docs)
11+
12+
### Updates
13+
* [ComboBox](?path=/docs/combobox--docs): Fix empty state rendering when no items match the current query
14+
* [Picker](?path=/docs/picker--docs): Fix erroneous dropdown outline when opening the Picker via click
15+
* [Tabs](?path=/docs/tabs--docs): Support collapse behavior on Tabs when customizing the layout
16+
717
## v0.10.0
818

919
### Font update

.storybook-s2/preview.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ channel.on(DARK_MODE_EVENT_NAME, isDark => document.documentElement.dataset.colo
1616
/** @type { import('@storybook/react').Preview } */
1717
const preview = {
1818
parameters: {
19-
actions: { argTypesRegex: "^on[A-Z].*" },
2019
controls: {
2120
matchers: {},
2221
exclude: ['key', 'ref']

.yarn/patches/@testing-library-user-event-npm-14.6.1-5da7e1d4e2.patch

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,19 @@ index 39a24b8f2ccdc52739d130480ab18975073616cb..0c3f5199401c15b90230c25a02de364e
1111
}
1212
UI.clearInitialValue(el);
1313
}
14+
diff --git a/dist/cjs/event/behavior/keydown.js b/dist/cjs/event/behavior/keydown.js
15+
index 55027cb256f66b808d17280dc01bc55a796a1032..993d5de5a838a711d7ae009344354772a42ed0c1 100644
16+
--- a/dist/cjs/event/behavior/keydown.js
17+
+++ b/dist/cjs/event/behavior/keydown.js
18+
@@ -110,7 +110,7 @@ const keydownBehavior = {
19+
},
20+
Tab: (event, target, instance)=>{
21+
return ()=>{
22+
- const dest = getTabDestination.getTabDestination(target, instance.system.keyboard.modifiers.Shift);
23+
+ const dest = getTabDestination.getTabDestination(document.activeElement, instance.system.keyboard.modifiers.Shift);
24+
focus.focusElement(dest);
25+
if (selection.hasOwnSelection(dest)) {
26+
UI.setUISelection(dest, {
1427
diff --git a/dist/cjs/utils/focus/getActiveElement.js b/dist/cjs/utils/focus/getActiveElement.js
1528
index d25f3a8ef67e856e43614559f73012899c0b53d7..4ed9ee45565ed438ee9284d8d3043c0bd50463eb 100644
1629
--- a/dist/cjs/utils/focus/getActiveElement.js

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,8 @@ s2-api-diff:
143143
node scripts/api-diff.js --skip-same --skip-style-props
144144

145145
s2-docs:
146-
node scripts/extractStarter.mjs
146+
yarn workspace @react-spectrum/s2-docs generate:md
147+
yarn workspace @react-spectrum/s2-docs generate:og
147148
REGISTRY_URL=https://reactspectrum.blob.core.windows.net/reactspectrum/$$(git rev-parse HEAD)/s2-docs/registry node scripts/buildRegistry.mjs
148149
REGISTRY_URL=https://reactspectrum.blob.core.windows.net/reactspectrum/$$(git rev-parse HEAD)/s2-docs/registry yarn build:s2-docs --public-url /reactspectrum/$$(git rev-parse HEAD)/s2-docs/
149150
mkdir -p dist/$$(git rev-parse HEAD)

eslint.config.mjs

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -445,29 +445,6 @@ export default [{
445445
"jsdoc/require-jsdoc": OFF,
446446
"jsdoc/require-description": OFF,
447447
},
448-
}, {
449-
files: [
450-
"packages/**/*.ts",
451-
"packages/**/*.tsx"
452-
],
453-
454-
rules: {
455-
"@typescript-eslint/explicit-module-boundary-types": ERROR,
456-
},
457-
}, {
458-
files: [
459-
"**/dev/**",
460-
"**/test/**",
461-
"**/stories/**",
462-
"**/docs/**",
463-
"**/chromatic/**",
464-
"**/chromatic-fc/**",
465-
"**/__tests__/**"
466-
],
467-
468-
rules: {
469-
"@typescript-eslint/explicit-module-boundary-types": OFF,
470-
},
471448
}, {
472449
files: [
473450
"packages/@react-aria/focus/src/**/*.ts",
@@ -504,4 +481,4 @@ export default [{
504481
rules: {
505482
"react/react-in-jsx-scope": OFF,
506483
},
507-
}];
484+
}];

examples/s2-esbuild-starter-app/src/app.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,19 @@
1313

1414
import "@react-spectrum/s2/page.css";
1515
import { style } from "@react-spectrum/s2/style" with { type: "macro" };
16-
import { Button } from "@react-spectrum/s2";
16+
import { Button, Provider } from "@react-spectrum/s2";
1717

1818
function App() {
1919
return (
20-
<main>
20+
<Provider elementType="main">
2121
<Button
2222
styles={style({
2323
marginStart: 16,
2424
})}
2525
>
2626
Hello Spectrum 2!
2727
</Button>
28-
</main>
28+
</Provider>
2929
);
3030
}
3131

0 commit comments

Comments
 (0)