Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: adobe/react-spectrum
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: @react-aria/calendar@3.5.6
Choose a base ref
...
head repository: adobe/react-spectrum
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: @react-aria/calendar@3.5.7
Choose a head ref

Commits on Feb 14, 2024

  1. [RAC] Fix <Switch> focus events (#5830)

    * fix switch focus events
    
    * add additional test assertions to checkbox/checkboxgroup focus events test
    
    ---------
    
    Co-authored-by: Robert Snow <rsnow@adobe.com>
    Co-authored-by: Reid Barber <reid@reidbarber.com>
    3 people authored Feb 14, 2024
    1
    Copy the full SHA
    370314e View commit details
  2. Copy the full SHA
    5b9e89e View commit details
  3. [RAC] Rename and export defaultSlot and remove slotCallbackSymbol

    … from RAC (#5850)
    
    * Removed slotCallbackSymbol as it is not used anymore.
    
    * Rename defaultSlot to DEFAULT_SLOT and export it from react-aria-components
    
    * Add default slot documentation
    
    * Remove unused import
    
    * Updated DEFAULT_SLOT documentation to use ButtonContext instead of a fake IconContext
    
    * Update advanced.mdx
    
    Co-authored-by: Daniel Lu <danilu@adobe.com>
    
    ---------
    
    Co-authored-by: Daniel Lu <dl1644@gmail.com>
    Co-authored-by: Daniel Lu <danilu@adobe.com>
    Co-authored-by: Robert Snow <rsnow@adobe.com>
    Co-authored-by: Reid Barber <reid@reidbarber.com>
    5 people authored Feb 14, 2024
    1
    Copy the full SHA
    5afad49 View commit details
  4. Turn off virtualizer when running in test env (#5192)

    * rough progress on making virtualized components non-reliant on clientHeight/Width mocks
    
    * Update virtualizer to get proper mocked rect in test env
    
    * update the remaining failing tests
    
    * use mocks if provided
    
    * fix clientwidth mock check
    
    * skip problematic tests and show examples how we dont need the mocks
    
    * ugh, figured out the react 16/17 crash
    
    too many rows being rendered... not anything with the extra render cycles or broken virtualizer logic
    
    * getting rid of todos and reseting tests
    
    * adding a extra process env to make sure we always run with virtualizer enabled in CI
    
    * vscode auto updates...
    LFDanLu authored Feb 14, 2024
    1
    Copy the full SHA
    e845c30 View commit details
  5. Updating testing documentation and exposing some testing utils (#5508)

    * progress on updating the testing docs
    
    * setup and testing of new util packages
    
    * move test utils to react-spectrum and add provider wrapper
    
    * restoring StrictModeWrapper
    
    * add desktop and mobile mock util setup
    
    * starting to remove triggerPress in favor of user event library click
    
    * remove triggerPress
    
    * fix SSR tests and react 16/17 tests
    
    * work around weird react16/17 test failure for now
    
    * get rid of triggerTouch and typeText
    
    * move stuff to aria/test-utils package
    
    * fix menutrigger tests
    
    * replacing fireEvent with userEvent equivalents in hooks tests pt1
    
    * wrapping up hooks tests fireEvent replacements
    
    couldnt get the pointer/mouseMoves replaces, will revisit
    
    * fix some lint issues
    
    * first batch of spectrum test fireEvent ->  userEvent replacement
    
    * fix tests in 16/17 again
    
    missing asyncs
    
    * updating testing docs and linking to it from various components
    
    * temporarily restore old test util package and move ssr stuff there
    
    * make react-spectrum/test-util-internal to limit what is exposed from test util package
    
    was running into build/docs issues with re-exporting @testing-library/react, this feels like it makes more sense anyways, dont think we wanna expose our render wrapper yet
    
    * adding docs for installmouseevent
    
    * add peer deps
    
    * fix combobox test
    
    * try to fix tsfork
    
    * fix ts fork pt 2
    
    * test lower version requirements
    
    * fix tests
    
    * missed one test update
    
    * review updates
    
    * removing todo
    
    * messed up a copy paste
    LFDanLu authored Feb 14, 2024
    Copy the full SHA
    3db98d2 View commit details

Commits on Feb 15, 2024

  1. Get rid of dev/utils from website prod build (#5879)

    * Get rid of dev/utils from website prod build so it doesnt complain about test util package
    
    * make package public as well
    
    * forgot to update aria test util
    LFDanLu authored Feb 15, 2024
    Copy the full SHA
    5d9d23f View commit details
  2. 1
    Copy the full SHA
    36db9c7 View commit details
  3. 1
    Copy the full SHA
    32faadd View commit details

Commits on Feb 16, 2024

  1. Publish (#5892)

    devongovett authored Feb 16, 2024
    1
    Copy the full SHA
    2b09060 View commit details
  2. fix(#5745): Allow typing in Accordion (#5888)

    * Allow typing in Accordion
    
    * Remove empty line
    
    ---------
    
    Co-authored-by: Reid Barber <reid@reidbarber.com>
    FosterSamuel and reidbarber authored Feb 16, 2024
    1
    Copy the full SHA
    c673f9f View commit details
  3. Add support for hover events in ListBox Option component (#5777)

    * Add support for hover events in ListBox Option component
    
    * add newline
    
    * fix: modified to original logic
    
    * fix: add action to listbox story
    
    ---------
    
    Co-authored-by: Daniel Lu <dl1644@gmail.com>
    ryo-manba and LFDanLu authored Feb 16, 2024
    1
    Copy the full SHA
    f1cd495 View commit details
  4. [Typescript] Combobox: Fix onSelectionChange type declaration (#5852)

    onSelectionChange can be invoked with a null key if the user
    clears the input.
    
    packages/@react-stately/combobox/src/useComboBoxState.ts line 225-229
    
    Co-authored-by: Reid Barber <reid@reidbarber.com>
    acr92 and reidbarber authored Feb 16, 2024
    1
    Copy the full SHA
    aa83c12 View commit details

Commits on Feb 17, 2024

  1. Add hrefLang attribute to Link (#5894)

    Co-authored-by: Yihui Liao <44729383+yihuiliao@users.noreply.github.com>
    ryo-manba and yihuiliao authored Feb 17, 2024
    1
    Copy the full SHA
    8b7fb3e View commit details

Commits on Feb 20, 2024

  1. Add --trigger-width support for DatePicker & DateRangePicker (#5895)

    * add --trigger-width support for DatePicker & DateRangePicker
    
    * fix comment typos
    
    * simplify width calculations
    
    * Also apply it to the range picker
    
    ---------
    
    Co-authored-by: Daniel Lu <dl1644@gmail.com>
    Co-authored-by: Robert Snow <rsnow@adobe.com>
    3 people authored Feb 20, 2024
    Copy the full SHA
    acb7352 View commit details
  2. Fix focus going to the DropZone after closing FileTrigger (#5867)

    * Fix focus going to the DropZone after closing FileTrigger
    
    * check event target
    
    * ensure that you can actually click anywhere to paste
    
    ---------
    
    Co-authored-by: Daniel Lu <dl1644@gmail.com>
    yihuiliao and LFDanLu authored Feb 20, 2024
    1
    Copy the full SHA
    b5f4f6d View commit details
  3. Add null type to Radiogroup value prop. (#5896)

    * add null type to RadioGroup.props.value
    
    * add a controlled RadioGroup story
    
    ---------
    
    Co-authored-by: Reid Barber <reid@reidbarber.com>
    Co-authored-by: Yihui Liao <44729383+yihuiliao@users.noreply.github.com>
    3 people authored Feb 20, 2024
    1
    Copy the full SHA
    bf7071f View commit details
  4. Fix backspace to shift focus to previous element in useDateSegment (#…

    …5715)
    
    * Fix focus shift on clearing minute fields
    ryo-manba authored Feb 20, 2024
    1
    Copy the full SHA
    fd3f09c View commit details

Commits on Feb 22, 2024

  1. fix: enhance FocusScope to support tab completion for IMEs (#5909)

    * fix: Improve tab completion for IMEs
    ryo-manba authored Feb 22, 2024
    1
    Copy the full SHA
    fa3862e View commit details

Commits on Feb 23, 2024

  1. Fix escape key to close IME in useOverlay (#5923)

    Co-authored-by: Daniel Lu <dl1644@gmail.com>
    ryo-manba and LFDanLu authored Feb 23, 2024
    1
    Copy the full SHA
    98477ac View commit details
  2. add allowsEmptyCollection property to interface (#5842)

    Co-authored-by: John Svensson <john.svensson@btwentyfour.com>
    Co-authored-by: Daniel Lu <dl1644@gmail.com>
    Co-authored-by: Reid Barber <reid@reidbarber.com>
    4 people authored Feb 23, 2024
    1
    Copy the full SHA
    a0f0604 View commit details

Commits on Feb 27, 2024

  1. Add RAC submenu to homepage and tailwind starter (#5919)

    * add RAC submenu to homepage and tailwind example
    
    * revert auto formatting
    
    ---------
    
    Co-authored-by: Robert Snow <rsnow@adobe.com>
    reidbarber and snowystinger authored Feb 27, 2024
    1
    Copy the full SHA
    4161265 View commit details

Commits on Feb 28, 2024

  1. Additional aria utils getOwnerDocument tests (#5573)

    * Additional aria utils getOwnerDocument tests
    
    * redoing ref.current test to be within an iframe
    
    * lint fixes
    
    * fix test
    
    ---------
    
    Co-authored-by: Robert Snow <rsnow@adobe.com>
    ktabors and snowystinger authored Feb 28, 2024
    1
    Copy the full SHA
    39b68eb View commit details
  2. 1
    Copy the full SHA
    07c1c6b View commit details
  3. Fix trigger onSubmit on enter for NumberField (#5951)

    * Fix trigger onSubmit on enter for NumberField
    tomekancu authored Feb 28, 2024
    Copy the full SHA
    1452655 View commit details
  4. Show all toasts (#5933)

    * Show all toasts
    
    * update Toast docs priority to show all and add bottom message
    ktabors authored Feb 28, 2024
    1
    Copy the full SHA
    707d26e View commit details
  5. 1
    Copy the full SHA
    bc50898 View commit details

Commits on Feb 29, 2024

  1. Add support for DropZone isDisabled prop (#5958)

    * Add support for DropZone isDisabled prop
    ryo-manba authored Feb 29, 2024
    1
    Copy the full SHA
    3492443 View commit details

Commits on Mar 1, 2024

  1. fix useTreeData root move map (#5950)

    Co-authored-by: Reid Barber <reid@reidbarber.com>
    Co-authored-by: Robert Snow <rsnow@adobe.com>
    3 people authored Mar 1, 2024
    1
    Copy the full SHA
    53284ab View commit details
  2. fix: css properties with undefined custom property values (#5941)

    Co-authored-by: Yihui Liao <44729383+yihuiliao@users.noreply.github.com>
    jdawber and yihuiliao authored Mar 1, 2024
    Copy the full SHA
    a9399fe View commit details
  3. Fix focus tracking for dynamic iframe content (#5922)

    * Fix focus tracking for dynamic iframe content
    
    * fix lint error
    
    * fix lint error
    
    * fix lint error
    
    * fix lint error
    
    * Delete .tool-versions
    
    * add unit tests
    
    * fixes
    
    * fix test
    
    * fix lint
    
    ---------
    
    Co-authored-by: Rob Snow <rsnow@adobe.com>
    Co-authored-by: Yihui Liao <44729383+yihuiliao@users.noreply.github.com>
    3 people authored Mar 1, 2024
    1
    Copy the full SHA
    95180bd View commit details
  4. RAC Tree (#5756)

    * start scaffolding
    
    * some planning
    
    * got the nested rendering to work
    
    * saving progress
    
    * more musings
    
    * finally got static and dynamic working
    
    * tentative modifications to useTreeState and fix cases with static renderProps functions
    
    * updating so Content has renderProps instead
    
    * Fix dynamic case
    
    * clean up
    
    * add treegridlist hooks and convert list stuff to use it
    
    * fix expanding and collapsing
    
    * update the collection processing so that node index info ignores existence of content nodes
    
    * fix flattened row array
    
    now that we are iterating over every tree item, we need to check if a rows parent is in the expanded key AND is also in the flattened row list. This is essentially checking if every parent above it is expanded as well since that is the only way its immediate parent would be in the flattened row list
    
    * move code for expanding/collapsing and other treegrid stuff into useGridListItem
    
    this is because we need to stop the grid list keyboard navigation if we are going to perform an expand or collapse but cant do so since it is a capturing listener. An alternative is to copy all the code from useGridListItem as is to useTreeGridListItem but that can be discussed.
    
    * adding renderProps for expanded,level,etc and supporting empty state
    
    * some cleanup
    
    * fix TS strict
    
    * add a checkbox to story and get rid of row double labelling
    
    * update styles
    
    * fix some styling and lint
    
    * forgot to make the tree package not private
    
    * updating story as per testing review
    
    * add support for row expansion when clicking the row, onAction, and linkaction
    
    * first batch of tests, basic interactions common to gridlist
    
    * Add ability to set disabledBehavior and default it to selection
    
    * Add empty state test
    
    * making data-expanded only appear on rows that are actually expandable
    
    * update note from chevron focus skipping exploration and save progress
    
    * add keyboard interaction tests
    
    * clean up some todos
    
    * fix defaultSlot
    
    * fixing tests and some final cleanup
    
    * Update packages/react-aria-components/src/Tree.tsx
    
    Co-authored-by: Reid Barber <reid@reidbarber.com>
    
    * addressing some review comments
    
    added test util and updating some tests for consistency
    
    * forgot one review comment
    
    * make test file tsx
    
    ---------
    
    Co-authored-by: Reid Barber <reid@reidbarber.com>
    LFDanLu and reidbarber authored Mar 1, 2024
    Copy the full SHA
    57ff24d View commit details
  5. Add data-focused to Tabs (#5978)

    * Add data-focused to Tabs
    
    * add test
    
    ---------
    
    Co-authored-by: Daniel Lu <dl1644@gmail.com>
    snowystinger and LFDanLu authored Mar 1, 2024
    Copy the full SHA
    d66cf4d View commit details

Commits on Mar 4, 2024

  1. Copy the full SHA
    01c394e View commit details
  2. Update cursor style to default for Tabs in docs (#5982)

    Co-authored-by: Daniel Lu <dl1644@gmail.com>
    Co-authored-by: Reid Barber <reid@reidbarber.com>
    3 people authored Mar 4, 2024
    Copy the full SHA
    1c6c4ad View commit details
  3. Temporarily fix verdaccio docs build (#5985)

    Co-authored-by: Reid Barber <reid@reidbarber.com>
    LFDanLu and reidbarber authored Mar 4, 2024
    1
    Copy the full SHA
    361d470 View commit details

Commits on Mar 5, 2024

  1. 1
    Copy the full SHA
    a1415bd View commit details

Commits on Mar 6, 2024

  1. S1 style macro (#6009)

    devongovett authored Mar 6, 2024
    1
    Copy the full SHA
    58872ae View commit details
  2. Fix fork point on main build (#6017)

    * Fix ts diff
    snowystinger authored Mar 6, 2024
    1
    Copy the full SHA
    dd55d69 View commit details
  3. Image: add support for onerror callback (#5945)

    * Image - add support for onerror callback
    
    * Image - add support for onerror callback
    
    * chore: add test case and update image stories
    
    * chore: fix build
    
    * chore: fix lint
    
    * chore: fix lint
    
    * Update packages/@react-types/image/src/index.d.ts
    
    Co-authored-by: Reid Barber <reid@reidbarber.com>
    
    * chore: fix types
    
    * chore: doc updated
    
    * chore: fix doc examples
    
    * chore: add support for onLoad callback
    
    * chore: add support for onLoad callback
    
    * chore: add support for onLoad callback
    
    * chore: add support for onLoad callback
    
    * chore: add support for onLoad callback
    
    * Update packages/@react-types/image/src/index.d.ts
    
    Co-authored-by: Robert Snow <snowystinger@gmail.com>
    
    * Update packages/@react-types/image/src/index.d.ts
    
    Co-authored-by: Robert Snow <snowystinger@gmail.com>
    
    * chore: resolve comment- update docs
    
    * small updates
    
    * fix lint
    
    ---------
    
    Co-authored-by: Reid Barber <reid@reidbarber.com>
    Co-authored-by: Robert Snow <rsnow@adobe.com>
    Co-authored-by: Robert Snow <snowystinger@gmail.com>
    4 people authored Mar 6, 2024
    1
    Copy the full SHA
    716b6ba View commit details
  4. Allow passing of inputRef to RAC Checkbox/Switch (#5967)

    * Allow passing of inputRef to RAC Checkbox/Switch
    
    * make optional, add tests
    
    * merge refs
    
    * fix ts?
    
    * fix/update tests
    
    * move declaration of inputRef
    
    * add doc comments
    
    * remove defaultInputRef
    
    ---------
    
    Co-authored-by: Devon Govett <devongovett@gmail.com>
    yihuiliao and devongovett authored Mar 6, 2024
    1
    Copy the full SHA
    a8ec966 View commit details

Commits on Mar 8, 2024

  1. fix onBlur in ComboBox when no Button provided (#6008)

    * fix onBlur in Combobox when no Button
    
    * fix after review
    
    * fix undefined ref value
    
    * Update packages/@react-aria/combobox/test/useComboBox.test.js
    
    ---------
    
    Co-authored-by: Robert Snow <snowystinger@gmail.com>
    tomekancu and snowystinger authored Mar 8, 2024
    1
    Copy the full SHA
    caa4a40 View commit details
  2. Add ContextualHelp example for disabled button to Tooltip docs (#6018)

    * add ContextualHelp example for disabled button to Tooltip
    
    * Update Tooltip.mdx
    
    Co-authored-by: Robert Snow <rsnow@adobe.com>
    
    * Update Tooltip.mdx
    
    Co-authored-by: Robert Snow <rsnow@adobe.com>
    
    ---------
    
    Co-authored-by: Robert Snow <rsnow@adobe.com>
    Co-authored-by: Daniel Lu <dl1644@gmail.com>
    3 people authored Mar 8, 2024
    1
    Copy the full SHA
    c921b13 View commit details

Commits on Mar 9, 2024

  1. Expose 'shouldCloseOnInteractOutside' on Modal / ModalOverlay (#5986)

    Co-authored-by: Daniel Lu <dl1644@gmail.com>
    sookmax and LFDanLu authored Mar 9, 2024
    1
    Copy the full SHA
    89fa370 View commit details

Commits on Mar 11, 2024

  1. Copy the full SHA
    7fb682f View commit details
  2. Change useMenuTrigger onPressStart to state.open (#6024)

    * Change useMenuTrigger onPressStart to state.open
    
    * add test
    
    ---------
    
    Co-authored-by: Robert Snow <rsnow@adobe.com>
    Co-authored-by: Reid Barber <reid@reidbarber.com>
    3 people authored Mar 11, 2024
    1
    Copy the full SHA
    b1cf605 View commit details
  3. escape <form> in ButtonProps (#6041)

    escape <form> in ButtonProps for jsdocs (#6041)
    sookmax authored Mar 11, 2024
    1
    Copy the full SHA
    0b9f807 View commit details
  4. add HoverEvents type to ToggleButtonProp type (#6042)

    add HoverEvents type to ToggleButtonProp type
    sookmax authored Mar 11, 2024
    Copy the full SHA
    4608dc5 View commit details

Commits on Mar 12, 2024

  1. export LocalizedStringFormatter type in React-Aria (#6014)

    Co-authored-by: Reid Barber <reid@reidbarber.com>
    alexasselin008 and reidbarber authored Mar 12, 2024
    1
    Copy the full SHA
    9390151 View commit details

Commits on Mar 14, 2024

  1. 1
    Copy the full SHA
    d8cda75 View commit details
  2. 1
    Copy the full SHA
    df1cf46 View commit details
Showing 1,069 changed files with 29,062 additions and 9,262 deletions.
9 changes: 0 additions & 9 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -551,12 +551,6 @@ workflows:
- test-17:
requires:
- install-17
- test-ssr-canary:
requires:
- install-canary
- test-canary:
requires:
- install-canary
- test-esm:
requires:
- install
@@ -612,9 +606,6 @@ workflows:
- test-16
- test-ssr-17
- test-17
- test-ssr-canary
- test-canary
- test-ssr-canary
- test-esm
- storybook
- storybook-16
19 changes: 8 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
.DS_Store
coverage
node_modules
npm-debug.log
build-storybook.log
test-reports.xml
junit.xml
.nyc_output
dist
.cache
.idea
.nyc_output
.package-lock.json
.cache
.parcel-cache

build-storybook.log
coverage
dist
junit.xml
node_modules
npm-debug.log
public
storybook-static
junit.xml
test-reports.xml
1 change: 1 addition & 0 deletions .parcelrc
Original file line number Diff line number Diff line change
@@ -5,6 +5,7 @@
"apiCheck:*.{js,ts,tsx,json}": ["parcel-transformer-docs"],
"docs:*.{js,ts,tsx,json}": ["parcel-transformer-docs", "@parcel/transformer-inline"],
"docs-json:*.{js,ts,tsx,json}": ["parcel-transformer-docs"],
"extract:*.mdx": ["parcel-transformer-mdx-extract"],
"packages/*/*/intl/*.json": ["parcel-transformer-intl"],
"bundle-text:*.svg": ["@parcel/transformer-svg", "@parcel/transformer-inline-string"],
"*.{md,mdx}": ["parcel-transformer-mdx-docs"],
15 changes: 15 additions & 0 deletions .parcelrc-build
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"extends": "@parcel/config-default",
"resolvers": ["@parcel/resolver-glob", "parcel-resolver-build", "..."],
"bundler": "@parcel/bundler-library",
"transformers": {
"packages/**/intl/*.json": ["parcel-transformer-intl"],
"bundle-text:*.svg": ["@parcel/transformer-svg", "@parcel/transformer-inline-string"],
"*.svg": ["@parcel/transformer-svg-react"],
"*.{js,mjs,jsm,jsx,es6,cjs,ts,tsx}": [
"@parcel/transformer-js",
"@parcel/transformer-react-refresh-wrap"
]
},
"namers": ["parcel-namer-intl", "..."]
}
10 changes: 1 addition & 9 deletions Makefile
Original file line number Diff line number Diff line change
@@ -92,19 +92,11 @@ publish-nightly: build
yarn publish:nightly

build:
parcel build packages/@react-{spectrum,aria,stately}/*/ packages/@internationalized/{message,string,date,number}/ packages/react-aria-components --no-optimize
parcel build packages/@react-{spectrum,aria,stately}/*/ packages/@internationalized/{message,string,date,number}/ packages/react-aria-components --no-optimize --config .parcelrc-build
yarn lerna run prepublishOnly
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/; \
do node scripts/buildEsm.js $$pkg; \
done
sed -i.bak s/\.js/\.mjs/ packages/@react-aria/i18n/dist/import.mjs
sed -i.bak 's/@react-aria\/i18n/.\/real-main.js/' packages/@react-aria/i18n/dist/useMessageFormatter.js
sed -i.bak 's/@react-aria\/i18n/.\/real-module.js/' packages/@react-aria/i18n/dist/useMessageFormatter.module.js
sed -i.bak 's/@react-aria\/i18n/.\/real-module.mjs/' packages/@react-aria/i18n/dist/useMessageFormatter.module.mjs
rm packages/@react-aria/i18n/dist/import.mjs.bak
rm packages/@react-aria/i18n/dist/useMessageFormatter.js.bak
rm packages/@react-aria/i18n/dist/useMessageFormatter.module.js.bak
rm packages/@react-aria/i18n/dist/useMessageFormatter.module.mjs.bak
node scripts/buildI18n.js

website:
7 changes: 6 additions & 1 deletion bin/imports.js
Original file line number Diff line number Diff line change
@@ -16,6 +16,11 @@ const fs = require('fs');
const Module = require('module');
const substrings = ['-', '+'];

const devDependencies = new Set([
'@adobe/spectrum-css-temp',
'@react-spectrum/style-macro-s1'
]);

module.exports = {
meta: {
fixable: 'code'
@@ -45,7 +50,7 @@ module.exports = {
let pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8'));

// The only dev dependency should be spectrum-css.
if (exists(pkg.devDependencies, pkgName) && pkgName === '@adobe/spectrum-css-temp') {
if (exists(pkg.devDependencies, pkgName) && devDependencies.has(pkgName)) {
return;
}

10 changes: 9 additions & 1 deletion examples/next-app/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
"use client";

import {Provider, defaultTheme, DatePicker} from '@adobe/react-spectrum';
import {useRouter} from 'next/navigation';

declare module '@adobe/react-spectrum' {
interface RouterConfig {
routerOptions: NonNullable<Parameters<ReturnType<typeof useRouter>['push']>[1]>
}
}

export default function Home() {
let router = useRouter();
return (
<Provider theme={defaultTheme} locale="en">
<Provider theme={defaultTheme} locale="en" router={{navigate: router.push}}>
<DatePicker label="Date" />
</Provider>
)
61 changes: 6 additions & 55 deletions examples/next-app/next.config.js
Original file line number Diff line number Diff line change
@@ -1,69 +1,20 @@
const localesPlugin = require('@react-aria/optimize-locales-plugin');
const glob = require('glob');

/** @type {import('next').NextConfig} */
const nextConfig = {
webpack(config, {isServer}) {
webpack(config, { isServer }) {
if (!isServer) {
// Don't include any locale strings in the client JS bundle.
config.plugins.push(localesPlugin.webpack({locales: []}));
config.plugins.push(localesPlugin.webpack({ locales: [] }));
}
return config;
},
transpilePackages: [
'@adobe/react-spectrum',
'@react-spectrum/actionbar',
'@react-spectrum/actiongroup',
'@react-spectrum/avatar',
'@react-spectrum/badge',
'@react-spectrum/breadcrumbs',
'@react-spectrum/button',
'@react-spectrum/buttongroup',
'@react-spectrum/calendar',
'@react-spectrum/checkbox',
'@react-spectrum/combobox',
'@react-spectrum/contextualhelp',
'@react-spectrum/datepicker',
'@react-spectrum/dialog',
'@react-spectrum/divider',
'@react-spectrum/dnd',
'@react-spectrum/form',
'@react-spectrum/icon',
'@react-spectrum/illustratedmessage',
'@react-spectrum/inlinealert',
'@react-spectrum/image',
'@react-spectrum/label',
'@react-spectrum/labeledvalue',
'@react-spectrum/layout',
'@react-spectrum/link',
'@react-spectrum/list',
'@react-spectrum/listbox',
'@react-spectrum/menu',
'@react-spectrum/meter',
'@react-spectrum/numberfield',
'@react-spectrum/overlays',
'@react-spectrum/picker',
'@react-spectrum/progress',
'@react-spectrum/provider',
'@react-spectrum/radio',
'@react-spectrum/slider',
'@react-spectrum/searchfield',
'@react-spectrum/statuslight',
'@react-spectrum/switch',
'@react-spectrum/table',
'@react-spectrum/tabs',
'@react-spectrum/tag',
'@react-spectrum/text',
'@react-spectrum/textfield',
'@react-spectrum/theme-dark',
'@react-spectrum/theme-default',
'@react-spectrum/theme-light',
'@react-spectrum/tooltip',
'@react-spectrum/view',
'@react-spectrum/well',
'@spectrum-icons/illustrations',
'@spectrum-icons/ui',
'@spectrum-icons/workflow'
]
'@react-spectrum/*',
'@spectrum-icons/*',
].flatMap(spec => glob.sync(`${spec}`, { cwd: 'node_modules/' })),
}

module.exports = nextConfig
3 changes: 2 additions & 1 deletion examples/next-app/package.json
Original file line number Diff line number Diff line change
@@ -17,7 +17,8 @@
"typescript": "^5",
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18"
"@types/react-dom": "^18",
"glob": "^10.3.12"
},
"workspaces": [
"../../packages/react-aria-components",
2 changes: 1 addition & 1 deletion examples/rac-spectrum-tailwind/package.json
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@
"@adobe/react-spectrum": "^3.28.0",
"@spectrum-icons/illustrations": "^3.6.3",
"@spectrum-icons/workflow": "^4.2.2",
"parcel": "^2.10.2",
"parcel": "2.0.0-canary.1563",
"postcss": "^8.2.1",
"react": "^18.2.0",
"react-aria-components": "^1.0.0-alpha.4",
2 changes: 1 addition & 1 deletion examples/rac-tailwind/package.json
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@
"@heroicons/react": "^2.0.16",
"@react-aria/parcel-resolver-optimize-locales": "^1.0.0",
"framer-motion": "^10.12.16",
"parcel": "^2.10.2",
"parcel": "2.0.0-canary.1563",
"postcss": "^8.4.21",
"react": "^18.2.0",
"react-aria-components": "^1.0.0-alpha.4",
18 changes: 17 additions & 1 deletion examples/remix/app/root.tsx
Original file line number Diff line number Diff line change
@@ -5,10 +5,20 @@ import {
Outlet,
Scripts,
ScrollRestoration,
useNavigate,
useHref
} from '@remix-run/react';
import type {NavigateOptions} from 'react-router-dom';
import {Provider, defaultTheme} from '@adobe/react-spectrum';

declare module '@adobe/react-spectrum' {
interface RouterConfig {
routerOptions: NavigateOptions
}
}

export default function App() {
let navigate = useNavigate();
return (
<html lang="en">
<head>
@@ -18,7 +28,13 @@ export default function App() {
<Links />
</head>
<body>
<Provider theme={defaultTheme} locale="en">
<Provider
theme={defaultTheme}
locale="en"
router={{
navigate,
useHref
}}>
<Outlet />
</Provider>
<ScrollRestoration />
5 changes: 4 additions & 1 deletion examples/remix/app/routes/_index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { MetaFunction } from "@remix-run/node";
import {DatePicker} from '@adobe/react-spectrum';
import {ActionMenu, DatePicker, Item} from '@adobe/react-spectrum';

export const meta: MetaFunction = () => {
return [
@@ -13,6 +13,9 @@ export default function Index() {
<div style={{ fontFamily: "system-ui, sans-serif", lineHeight: "1.8" }}>
<h1>Welcome to Remix</h1>
<DatePicker label="Date" />
<ActionMenu>
<Item href="/foo" routerOptions={{replace: true}}>Link to foo</Item>
</ActionMenu>
</div>
);
}
3 changes: 3 additions & 0 deletions examples/remix/app/routes/foo.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default function Foo() {
return <h1>Foo</h1>
}
61 changes: 5 additions & 56 deletions examples/rsp-next-ts-17/next.config.js
Original file line number Diff line number Diff line change
@@ -1,61 +1,10 @@
const glob = require('glob');

const withTM = require("next-transpile-modules")([
'@adobe/react-spectrum',
'@react-spectrum/actionbar',
'@react-spectrum/actiongroup',
'@react-spectrum/avatar',
'@react-spectrum/badge',
'@react-spectrum/breadcrumbs',
'@react-spectrum/button',
'@react-spectrum/buttongroup',
'@react-spectrum/calendar',
'@react-spectrum/checkbox',
'@react-spectrum/color',
'@react-spectrum/combobox',
'@react-spectrum/contextualhelp',
'@react-spectrum/datepicker',
'@react-spectrum/dialog',
'@react-spectrum/divider',
'@react-spectrum/dnd',
'@react-spectrum/form',
'@react-spectrum/icon',
'@react-spectrum/illustratedmessage',
'@react-spectrum/image',
'@react-spectrum/inlinealert',
'@react-spectrum/label',
'@react-spectrum/labeledvalue',
'@react-spectrum/layout',
'@react-spectrum/link',
'@react-spectrum/list',
'@react-spectrum/listbox',
'@react-spectrum/menu',
'@react-spectrum/meter',
'@react-spectrum/numberfield',
'@react-spectrum/overlays',
'@react-spectrum/picker',
'@react-spectrum/progress',
'@react-spectrum/provider',
'@react-spectrum/radio',
'@react-spectrum/slider',
'@react-spectrum/searchfield',
'@react-spectrum/statuslight',
'@react-spectrum/switch',
'@react-spectrum/table',
'@react-spectrum/tabs',
'@react-spectrum/tag',
'@react-spectrum/text',
'@react-spectrum/textfield',
'@react-spectrum/theme-dark',
'@react-spectrum/theme-default',
'@react-spectrum/theme-light',
'@react-spectrum/tooltip',
'@react-spectrum/toast',
'@react-spectrum/view',
'@react-spectrum/well',
'@spectrum-icons/illustrations',
'@spectrum-icons/ui',
'@spectrum-icons/workflow',
'@spectrum-icons/express'
]);
'@react-spectrum/*',
'@spectrum-icons/*',
].flatMap(spec => glob.sync(`${spec}`, { cwd: 'node_modules/' })));

module.exports = withTM({
basePath:
4 changes: 4 additions & 0 deletions examples/rsp-next-ts-17/package.json
Original file line number Diff line number Diff line change
@@ -17,6 +17,7 @@
"@react-spectrum/toast": "^3.0.0-alpha.0",
"@spectrum-icons/illustrations": "^3.5.0",
"@spectrum-icons/workflow": "^4.0.3",
"glob": "^10.3.12",
"next": "^12",
"next-transpile-modules": "^10.0.0",
"react": "^17",
@@ -28,5 +29,8 @@
"eslint": "^8.24.0",
"eslint-config-next": "^13.4.1",
"typescript": "^5.1.3"
},
"resolutions": {
"next/@swc/helpers": "0.4.36"
}
}
Loading