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@3.30.0
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@3.31.0
Choose a head ref

Commits on Nov 9, 2023

  1. 1
    Copy the full SHA
    bc5a38a View commit details
  2. Nov 2023 release notes (#5391)

    * nov 2023 release
    dannify authored Nov 9, 2023
    1
    Copy the full SHA
    9ce2f67 View commit details
  3. Additional TS StrictMode support (#5305)

    * ts strict for react-types l
    
    * react aria tabs
    
    * react aria meter
    
    * react aria radio
    
    * react aria separator
    
    * react aria sidenav
    
    * react aria toggle
    
    * tabs
    
    react types tabs
    
    * yarn lock
    
    * fix ref in sidenav
    
    * layout required
    
    * updates after devon's pr
    
    * remove stale lock file change
    
    ---------
    
    Co-authored-by: Robert Snow <rsnow@adobe.com>
    yihuiliao and snowystinger authored Nov 9, 2023
    1
    Copy the full SHA
    afe9c35 View commit details
  4. 2
    Copy the full SHA
    2bfb2a1 View commit details

Commits on Nov 11, 2023

  1. Tableview crash bug (#5380)

    * tableview crash bug
    
    * clean up
    
    * lint
    
    * subtract border width from body width
    
    * Use percentage width when elements are full width of their parents
    
    * remove old code
    
    * Fix headers not scrolling
    
    * Revert "Fix headers not scrolling"
    
    This reverts commit b4104f8.
    
    * Add inner div to headers
    
    * try setting overflow-x: hidden instead
    
    ---------
    
    Co-authored-by: Devon Govett <devongovett@gmail.com>
    Co-authored-by: Rob Snow <rsnow@adobe.com>
    3 people authored Nov 11, 2023
    1
    Copy the full SHA
    dad13d5 View commit details
  2. 1
    Copy the full SHA
    2b9a821 View commit details
  3. Fixing date components light theme placeholder color contrast (#5396)

    * Fixing date components light theme placeholder color contrast
    
    * removing the css variable and useing the gray variable directly
    ktabors authored Nov 11, 2023
    1
    Copy the full SHA
    0da1486 View commit details

Commits on Nov 13, 2023

  1. [RAC] fix: Propagate isDisabled prop from DatePicker to popover Button (

    #5411)
    
    * fix: Propagate isDisabled prop from DatePicker to popover Button
    
    * Update packages/@react-aria/datepicker/src/useDatePicker.ts
    
    Co-authored-by: Robert Snow <snowystinger@gmail.com>
    
    * remove: unnecessary props
    
    * fix: lint
    
    ---------
    
    Co-authored-by: Robert Snow <snowystinger@gmail.com>
    Co-authored-by: Reid Barber <reid@reidbarber.com>
    3 people authored Nov 13, 2023
    1
    Copy the full SHA
    10d3395 View commit details
  2. 1
    Copy the full SHA
    9e6513b View commit details
  3. fix: labelable option to Tab props for aria-label support (#5408)

    * fix: labelable option to Tab props for aria-label support
    
    * Add test for RSP component as well
    
    ---------
    
    Co-authored-by: Robert Snow <rsnow@adobe.com>
    Co-authored-by: Yihui Liao <44729383+yihuiliao@users.noreply.github.com>
    3 people authored Nov 13, 2023
    1
    Copy the full SHA
    3bc83a2 View commit details
  4. Fix selected checkbox fill color when checkbox group is disabled (#5407)

    * Fix selected checkbox fill color when checkbox group is disabled
    
    * get isDisable from checkbox group state
    yihuiliao authored Nov 13, 2023
    1
    Copy the full SHA
    3efd6c0 View commit details

Commits on Nov 14, 2023

  1. Fix CRA app build (#5414)

    LFDanLu authored Nov 14, 2023
    1
    Copy the full SHA
    f600fdf View commit details

Commits on Nov 15, 2023

  1. 1
    Copy the full SHA
    3688f07 View commit details

Commits on Nov 16, 2023

  1. Copy the full SHA
    5dac45c View commit details

Commits on Nov 17, 2023

  1. Steplist css improvements / HCM (#5339)

    * Steplist css improvements, HCM
    snowystinger authored Nov 17, 2023
    Copy the full SHA
    714c8f6 View commit details
  2. Copy the full SHA
    684e596 View commit details
  3. Copy the full SHA
    22aa113 View commit details
  4. Copy the full SHA
    0a2d5b7 View commit details

Commits on Nov 18, 2023

  1. Copy the full SHA
    8088fe7 View commit details
  2. Copy the full SHA
    fa2d591 View commit details

Commits on Nov 20, 2023

  1. Copy the full SHA
    658423e View commit details
  2. 1
    Copy the full SHA
    efaf9ed View commit details

Commits on Nov 21, 2023

  1. Add directory support for FileTrigger (#5444)

    * Add directory support for FileTrigger
    
    * docs: Added description of UNSAFE_directory prop
    
    * refac: Remove unsafe prefix
    
    * Add story
    
    * Update FileTrigger.mdx
    
    Updated section title to match formatting of others
    
    ---------
    
    Co-authored-by: Yihui Liao <44729383+yihuiliao@users.noreply.github.com>
    Co-authored-by: Rob Snow <rsnow@adobe.com>
    Co-authored-by: Reid Barber <reid@reidbarber.com>
    4 people authored Nov 21, 2023
    1
    Copy the full SHA
    a3d77ab View commit details
  2. Copy the full SHA
    b249a56 View commit details

Commits on Nov 22, 2023

  1. Fix TableView resize observer loop limit (#5432)

    * Fix resize observer loop limit
    snowystinger authored Nov 22, 2023
    Copy the full SHA
    75417bb View commit details
  2. Fix extra char read by AT (#5451)

    * Fix Steplist extra hidden char
    snowystinger authored Nov 22, 2023
    Copy the full SHA
    a2d54a8 View commit details
  3. Docs for useLandmark (#5418)

    * add docs for useLandmark
    
    * lint
    
    * add iframe example
    
    * fix docs types
    
    * remove iframe example
    
    * fix lint
    
    * link to useToastRegion
    
    * Update packages/@react-aria/landmark/docs/useLandmark.mdx
    
    * update category to Utilities
    
    ---------
    
    Co-authored-by: Kyle Taborski <ktabors@yahoo.com>
    reidbarber and ktabors authored Nov 22, 2023
    Copy the full SHA
    ef33efe View commit details
  4. Add menuWidth & expose align props in ComboBox and SearchAutocomplete (

    …#5446)
    
    * Add menuWidth & expose align props in ComboBox and SearchAutocomplete
    sookmax authored Nov 22, 2023
    Copy the full SHA
    dd8b226 View commit details

Commits on Nov 23, 2023

  1. Provide access to portalContainer of react-aria-components popover el…

    …ement (#5381)
    
    * Expose portalContainer prop for modal, popover, and tooltip
    BenBeattieHood authored Nov 23, 2023
    Copy the full SHA
    7afd118 View commit details
  2. Append "pending" to button label and copy to isPending spinner aria-l…

    …abel (#5245)
    
    Announce pending to screen readers.
    iamwillpowell authored Nov 23, 2023
    Copy the full SHA
    9d8c74a View commit details

Commits on Nov 27, 2023

  1. Fix the top margin of a button in a form (#5461)

    * remove where
    
    * add example to cra
    
    * update example in cra
    yihuiliao authored Nov 27, 2023
    Copy the full SHA
    d59875a View commit details
  2. Updating support page copy for process when asking questions (#5466)

    * Updating support page copy for process when asking questions
    
    * less repetitive copy
    LFDanLu authored Nov 27, 2023
    Copy the full SHA
    963e75f View commit details
  3. Copy the full SHA
    48f29e1 View commit details
  4. 1
    Copy the full SHA
    78a49f5 View commit details

Commits on Nov 28, 2023

  1. Menu button and popover can have same width (#5465)

    * Adding --trigger-width support to Menu
    
    * removing example
    ktabors authored Nov 28, 2023
    1
    Copy the full SHA
    5e4dfb0 View commit details
  2. 1
    Copy the full SHA
    fa00e0d View commit details
  3. Support for Avatar in ListBox, Picker, ComboBox, and SearchAutocomple…

    …te (#5431)
    
    * support Avatar in ListBox, Picker, and ComboBox
    
    * address review comments
    
    * update docs
    
    * lint
    
    * update stories
    
    * fix listbox chromatic
    
    * reference accessibility secion in docs
    reidbarber authored Nov 28, 2023
    1
    Copy the full SHA
    1c1fbe5 View commit details
  4. TS Strict for react-aria Checkbox (#5467)

    * TS Strict Checkbox
    ryo-manba authored Nov 28, 2023
    Copy the full SHA
    5e48753 View commit details

Commits on Nov 30, 2023

  1. Add capitalization settings support for useTextField (#5472)

    * Add captchralization settings support for useTextField
    
    * fix: link
    
    * Update useTextField.stories.tsx
    
    add auto capitalization story to useTextField
    
    ---------
    
    Co-authored-by: Yihui Liao <44729383+yihuiliao@users.noreply.github.com>
    Co-authored-by: Robert Snow <rsnow@adobe.com>
    3 people authored Nov 30, 2023
    1
    Copy the full SHA
    1cba01d View commit details
  2. 1
    Copy the full SHA
    ce963f7 View commit details
  3. Submenu support (#4976)

    * adding stories and chevron
    
    * planning
    
    * fix sections in items
    
    * scuffed experimentation with getting sub menu to render
    
    using existing ContextualHelpTrigger and ListBox to see what is needed for the sub menu
    
    * notes from api review
    
    * reset state of some files and add tentative SubMenuTrigger implementation
    
    SubMenuTrigger hasnt been tested, just grabs stuff from MenuTrigger and ContextualHelpTrigger that I deemed suitable
    
    * update static story and dynamic story for testing
    
    * fix dynamic story
    
    * update sub menu interactions
    
    add support for opening submenu via Enter/Space/ArrowRight and closing submenu via ArrowLeft. Also adds the proper autoFocus behavior based on the interaction that opened the submenu
    
    * fix onOpen undef and test onBlurWithin
    
    misc cleanup as well
    
    * use useMenuTrigger to get proper submenutrigger id and aria-labelledby for submenu
    
    * add onAction inheritence between submenus and test aria-controls
    
    * fix crash
    
    * explored alt dynamic render function, update rest of the existing stories
    
    * making all menus close on menu action trigger
    
    * making sub menu item ArrowLeft not close all menus
    
    * fix user provided onClose not firing and ContextualHelpTrigger isUnavailable=false
    
    user provided onClose wasnt firing because we were always sourcing it from the MenuTriggers context onClose. ContextualHelpTrigger also needed additional logic to not render a sub menu if isUnavailable is false
    
    * add complex and align/placement stories
    
    * fix lint and circular dependency
    
    * add onSubMenuClose instead of having a isSubMenu bool and passing the whole trigger state to useMenu
    
    this makes the api a bit nicer
    
    * add first batch of tests
    
    * prevent SubMenuTrigger items from being selected
    
    current approach has the SubMenuTrigger adding a prop to the Item let selectionManager know that it should be non-selectable. Other approaches would involve additional changes to useSelectableItem to disable press props but keep keyboard navigation
    
    * make Escape close all menus without triggering user provided onClose
    
    * Add stories + tests for user provided handlers and make onCloseAllMenus a private prop
    
    dont really feel like users will need to pass in something for onCloseAllMenus so made it a hidden prop. Also moved it into useMenu so it doesnt matter if the user is focused on the menu or a menu item when hitting Esc
    
    * Adding selection and onOpenChange tests
    
    also made onSubMenuClose a private prop
    
    * fixng tests and lint
    
    * fix last failing tests
    
    * fix mutated submenu trigger keys
    
    * fix tests
    
    * use menuProps from useMenuTrigger for submenu props and restore new useMenu props
    
    * tentative workaround to close all menus when clicking outside
    
    * fix tests
    
    didnt actually need to let propagation continue
    
    * add onAction to stories and test for aria-controls
    
    * Removing several MenuTrigger props from SubMenu as per discussion
    
    we decided that things like isOpen/positioning/etc can be added later if need be
    
    * make submenu trigger use menuitem role and adding additional tests
    
    submenu triggers cant be checked so they shouldnt have a menuitemcheckbox or menuitemradio role
    
    * finally fix sub menu width
    
    the div in the menu that we portal the next submenu to needs to be wide enough that the submenu items can render as wide as they can be. Technically the width applied should be (submenu max width + parent menu width)
    
    * fix infinite repositioning loop
    
    the portal container div for submenus needed to fit exactly within the screen width in both directions so the sub menu size would resolve properly in the case where we need to flip the positioning
    
    * rough refactor progress
    
    * fix ArrowRight closing too many menus and preventing close when focusing submenutrigger
    
    still closes too many submenus if you hover a submenu trigger and then hit arrow right...
    
    * fix aria attribute propagation to submenu trigger
    
    * save state
    
    * move stuff into hooks
    
    * stopgap lint and test fixes
    
    * attempting to close submenu whenever focus moves out of its active scope
    
    * fixing submenu close behavior when moving focus from trigger or into lower menu
    
    * adding/fixing tests for new submenu hover behavior
    
    focus now doesnt move to menu if opened via hover
    
    * Update ContextualHelpTrigger to work with useSubMenuTrigger
    
    * fix tabbing in ContextualHelpTrigger refactor
    
    * fixing tabbing behavior between submenu/trigger and retaining menu item focus on hover
    
    fixes break in behavior where tabbing from level 3 submenu was closing all submenus. Also fixes it so that a user hovering a level 1 submenutrigger keeps focus on the trigger even after all the remaining submenus close
    
    * updating tests for userEvent library upgrade
    
    * clearing expandedKeyStack when user clicks underlay and comment cleanup
    
    * adding test for tab/shift tabbing
    
    * updating menu tree state expanded keys on submenu open/close
    
    needed a way for a menu to know that it has a open submenu so that it can set aria-hidden on itself, otherwise Safari VO had a hard time shifting focus to the newly focused submenu item. Also helpful for knowing when to set contain on a menu. Alternative would be having useMenu accept menuTreeState and initialize a level and look up in the expandedKeysStack if it owns a open submenu, open to discussion if that is the way we wanna go
    
    * fix test
    
    test was failing because it mimick run flow in browser. We needed to have useSelectableCollections focus call trigger the blur on the submenutrigger and update expandedKeys to modify the containment of the submenu before the keydown makes it to the keydown handlers of FocusScope
    
    * inital progress with Tray submenu
    
    * adding rough styling and removing popover specific logic from tray
    
    * fix lint
    
    * update context name and fix ContextualHelpTrigger behavior when focus is moved to the subdialog trigger
    
    * adding tray tests and fixing submenu overflow
    
    * Fix tray autofocus behavior with touch and add remaining tests
    
    * replacing submenu aria-labelledby with aria-label due to parent menu being aria-hidden
    
    follows the approach shown in https://www.w3.org/WAI/ARIA/apg/patterns/menubar/examples/menubar-navigation/. Aria-hidden on the parent menu is needed to force Safari VO to move to newly opened submenus
    
    * move submenu styles to css files
    
    * fixing submenu cross offset
    
    * fix tests
    
    * fix ContextualHelpTrigger dialog offset and hover behavior when entered via a open submenu
    
    this unfortunately breaks another interaction case but to handle later
    
    * update labeling so it uses hook
    
    * fix tests
    
    * partial cleanup and fix build
    
    * Revert "update labeling so it uses hook"
    
    This reverts commit 66ce969.
    
    * Revert "fix tests"
    
    This reverts commit 2c6921a.
    
    * converting hooks to UNSTABLE and other cleanup
    
    * adding sample chromatic test with interactions
    
    * add tray tests
    
    * fix chromatic tray interactions
    
    * Making ContextualHelpTrigger tray modal a tray instead
    
    * Make SubMenu Tray a dialog with heading
    
    * partial fix for stacking drop shadow issue
    
    * Adding useKeyboard to useMenu and updating tests
    
    * Expanding useMenuItem types and fixing Esc and keyup behavior
    
    * merge useMenuState into useMenuTriggerState
    
    * Stop updating tree state expanded keys in favor of returning level from submenu state and looking up key in expandedKeyStack
    
    from discussion, we wanted to get rid of the reliance on tree state
    
    * Making it so a menu trigger that is set as the selectedKey doesnt actually get autofocused
    
    IMO we should only be moving focus to truely selectable options in useSelectableCollection, previously was autofocusing lvl 2 Item 3 in https://reactspectrum.blob.core.windows.net/reactspectrum/82c23dbc122a23d05f2ba3e3968d45d36d82fc2b/storybook/index.html?path=/story/menutrigger-submenu--sub-menu-selection&providerSwitcher-express=false
    
    * forgot to remove the state combination
    
    * fix styles for ContextualHelpTrigger tray experience
    
    * reaname SubMenu -> Submenu
    
    * fix git casing
    
    * Submenus: prevent pointer events on menu if moving towards submenu (#5082)
    
    * initial conversion
    
    * initialize safe area submenu hook
    
    * lint
    
    * lint peerDeps
    
    * disable if submenu isn't open
    
    * add comment for angle calculation
    
    * cleanup direction check
    
    * remove menuRef
    
    * update lastProcessedTime
    
    * fix style props merge
    
    * early return for touch and pen pointerType
    
    * add timeout
    
    * fire pointerenter
    
    * add padding to top/bottom angles
    
    * allow 2 invalid movements
    
    * add padding as const
    
    * use pointerover to trigger underlying item
    
    * up the timeout to 1s
    
    * cleanup from merge
    
    * store direction as ref and rename
    
    * type
    
    * bail early when pointer reaches submenu
    
    * clear timeout if bailing early
    
    * move up cleartimeout
    
    * fix test
    
    * add skip
    
    * fix ts strict
    
    * add interaction modality check
    
    * remove skip
    
    * revert mock
    
    * attempt to fix contextualhelp
    
    * fix ref
    
    * make submenu ref optional
    
    * fix logic and allow disabling
    
    * attempt to fix refs for unavailable menu item
    
    * fix from merge conflict
    
    * conditionally render overlay to avoid dup refs
    
    * add missing textValue
    
    * merge
    
    * fix from merge
    
    * fix safe pointer movement for submenus
    
    ---------
    
    Co-authored-by: Daniel Lu <dl1644@gmail.com>
    
    * rename subMenu -> submenu
    
    * fix types
    
    * update useSafelyMouseToSubmenu to set menu style
    
    * remove dup style
    
    * fix tests
    
    * lint
    
    * fix ts
    
    * code review
    
    * fixing submenu tray header positioning and getting rid of non-issue todos
    
    * improve submenu safe area experience
    
    * add story with many items
    
    * fix dup key
    
    * partial progress on getting rid of onExit
    
    has changes that makes tab close all submenus and move focus to prev/next element. Still need to get tabbing working in contextualhelp dialog, ideally have it contain focus but still allow user to freely hover another menu item without FocusScope highjacking focus back to the subdialog trigger
    
    * sharing TrayHeaderWrapper with SubMenu and ContextualHelpTrigger
    
    also made an attempt to have the ContextualHelpTrigger contain focus, but that breaks the case where the user hovers the sub menu item in the root menu aka focus gets moved back to the subdialog trigger instead of the menu item the user hovered
    
    * don't measure for safe area when outside of menu
    
    * typo
    
    * removing contains on ContextualHelpDialog
    
    the contains interfered with the hover focus that a user could perform on the root menu items when the subdialog was open so we are omitting for now
    
    * clean up more todos
    
    * fix menu overflow behavior and rendering for an available ContextualHelpTrigger
    
    * initial docs
    
    * add dynamic example to docs
    
    * adding prop table for SubmenuTrigger and additional copy
    
    * fix mobile w/ keyboard focus behavior when closing submenu
    
    * fixing tray experience on desktop with small screens
    
    when emulating a small screen with desktop mode active in dev tools, hovering a unavailable  menu item was opening it and clicking on a submenu trigger didnt open it
    
    * review comments
    
    * addressing review comments
    
    makes submenu level 0th indexed and getting rid of rafs by just moving hidden trays out of view
    
    * getting rid of weird double border
    
    * Fix SubMenu tray scrolling if there are many items
    
    * get rid of erroneous border and background color and fix tray height
    
    * restore drop shadow
    
    * make contextual help dialog full width
    
    * fixing tests
    
    * fix scrollbars appearing when closing all submenus
    
    comment for posterity: the popover container needs to be as wide as the viewport and offset to be flush with the viewport so that the popover positioning w/ flipping works. Also required to allow the menu width to grow to fit its contents but still be constrained by the max height. We remove the div when the root menu is closed so that scroll bars dont flash on to the screen because the leftOffset calculation isnt perfect due to a transform applied on left/right aligned menus that throws off the getBoundingClientRect calc
    
    * forgot to save
    
    * fix tests
    
    * fix focus being lost to body when using hidden dismiss button in Safari
    
    manually moves focus to the parent menu when MacOS Safari Voiceover user triggers the hidden dismiss button. to discuss with team if this belongs in aria
    
    * remove transition from submenu and rename onDismiss for clarity
    
    brings submenu appearance more inline with native submenus and rename onDismiss prop so people know it is specifically for the dismiss button interaction
    
    * fix keyboard scrolling for long menus and tabindex
    
    keep it so disabled menu items dont have a tabindex still
    
    * merge overlay and popover props
    
    * unwrap ref in ContextualHelpTrigger
    
    * fix event propagation when in contextual help or on submenutrigger
    
    fixes case where arrowLeft was propagating through contextualhelp dialogs which we only want to have be closed via ESC. Also fixes event propagation for default cases for submenu triggers so that we can call it in useMenuItem useKeyboard. Now we still properly close only the submenu trigger menu when focus is on the trigger and the submenu is open
    
    * forgot to remove comment
    
    * fixes from test session
    
    updates propName to type as per review, fixes VO dismiss button with contextual help and reintroduces the transitions back to submenu since there were some weird transforms that cause visible jerks in position when closing the submenus without the visibility transition.
    
    * remove extraneous flush sync now that we completely leave the menu on Tab
    
    * omit selectableitem props from submenutrigger items
    
    instead of informing selection manager directly that the submenu item is a non selectable item, opt for change in useMenuItem instead since it feels a bit too specific to include in selection manager. Still need onFocus though so we still update the tracked key when user clicks on a submenu trigger in a Tray
    
    * update submenu unmount animation
    
    removed the transform for submenus and replaced it with a offset calculated for Popover instead so that we dont get the weird jerk animation when the submenu unmounts
    
    * fix case where submenus dont properly open/close when rapidly opening/closing the menu with keyboard
    
    if the user presses left/right rapidly enough, the submenu doesnt actually unmount due to being in the middle of a transition animation, meaning focus wasnt being handled by useSelectableCollection focus useEffect which only run on mount. This fixes that by running focus and openSubmenu in those cases
    
    * fix tests
    
    * fix alignment
    
    * clearing timeout and adding comment for offset
    
    * clear autoclose timeout if user moves mouse before it fires
    
    ---------
    
    Co-authored-by: Reid Barber <reid@reidbarber.com>
    LFDanLu and reidbarber authored Nov 30, 2023
    1
    Copy the full SHA
    a2146aa View commit details

Commits on Dec 1, 2023

  1. Change RAC style merge order (#5506)

    * Change style merge order for RAC
    snowystinger authored Dec 1, 2023
    1
    Copy the full SHA
    378f3ee View commit details

Commits on Dec 2, 2023

  1. 1
    Copy the full SHA
    fc0e6b6 View commit details
  2. 1
    Copy the full SHA
    ee403ec View commit details

Commits on Dec 5, 2023

  1. Fix style merging for overlay arrow (#5511)

    * Fix style merging for overlay arrow
    snowystinger authored Dec 5, 2023
    1
    Copy the full SHA
    e090bf8 View commit details
  2. 1
    Copy the full SHA
    daf929f View commit details

Commits on Dec 6, 2023

  1. 1
    Copy the full SHA
    dd348f1 View commit details
  2. Close popover on scroll (#5453)

    * close popover onscroll
    boutahlilsoufiane authored Dec 6, 2023
    1
    Copy the full SHA
    d2049a5 View commit details
  3. 1
    Copy the full SHA
    e8f2ef4 View commit details

Commits on Dec 7, 2023

  1. 1
    Copy the full SHA
    c465f95 View commit details
Showing 733 changed files with 19,349 additions and 6,853 deletions.
3 changes: 2 additions & 1 deletion .circleci/comment.js
Original file line number Diff line number Diff line change
@@ -57,7 +57,8 @@ async function run() {
[Publish stats](https://reactspectrum.blob.core.windows.net/reactspectrum/${process.env.CIRCLE_SHA1}/verdaccio/publish-stats/publish.json)
[Size diff since last release](https://reactspectrum.blob.core.windows.net/reactspectrum/${process.env.CIRCLE_SHA1}/verdaccio/publish-stats/size-diff.txt)
[Docs](https://reactspectrum.blob.core.windows.net/reactspectrum/${process.env.CIRCLE_SHA1}/verdaccio/docs/index.html)
[Storybook](https://reactspectrum.blob.core.windows.net/reactspectrum/${process.env.CIRCLE_SHA1}/storybook/index.html)`
[Storybook](https://reactspectrum.blob.core.windows.net/reactspectrum/${process.env.CIRCLE_SHA1}/storybook/index.html)
[RAC Starter Storybook](https://reactspectrum.blob.core.windows.net/reactspectrum/${process.env.CIRCLE_SHA1}/verdaccio/starter-storybook/index.html)`
});
}
} catch (error) {
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -9,4 +9,6 @@ packages/react-aria/dist
packages/react-aria-components/dist
packages/react-stately/dist
packages/dev/storybook-builder-parcel/preview.js
packages/dev/optimize-locales-plugin/LocalesPlugin.d.ts
examples/**
starters/**
18 changes: 17 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -67,7 +67,23 @@ module.exports = {
'jsdoc/require-description': OFF
}
}, {
files: ['packages/@react-aria/interactions/**/*.ts', 'packages/@react-aria/interactions/**/*.tsx'],
files: ['packages/@react-aria/focus/src/**/*.ts', 'packages/@react-aria/focus/src/**/*.tsx'],
rules: {
'no-restricted-globals': [
ERROR,
{
'name': 'window',
'message': 'Use getOwnerWindow from @react-aria/utils instead.'
},
{
'name': 'document',
'message': 'Use getOwnerDocument from @react-aria/utils instead.'
}
]
}
},
{
files: ['packages/@react-aria/interactions/src/**/*.ts', 'packages/@react-aria/interactions/src/**/*.tsx'],
rules: {
'no-restricted-globals': [
WARN,
2 changes: 1 addition & 1 deletion .parcelrc
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@
"bundle-text:*.svg": ["@parcel/transformer-svg", "@parcel/transformer-inline-string"],
"*.{md,mdx}": ["parcel-transformer-mdx-docs"],
"*.svg": ["@parcel/transformer-svg-react"],
"*.global.css": ["parcel-transformer-css-global", "..."],
"packages/@react-aria/example-theme/**/*.css": ["@parcel/transformer-css"],
"*.css": ["...", "parcel-transformer-css-env"],
"*.{js,mjs,jsm,jsx,es6,cjs,ts,tsx}": [
"@parcel/transformer-js",
17 changes: 17 additions & 0 deletions .parcelrc-build
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"extends": "@parcel/config-default",
"resolvers": ["@parcel/resolver-glob", "parcel-resolver-build", "..."],
"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", "..."],
"optimizers": {
"{main,module}.js": ["...", "parcel-optimizer-react-client"]
}
}
14 changes: 11 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -92,10 +92,10 @@ 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 cp $$pkg/dist/module.js $$pkg/dist/import.mjs; \
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
@@ -105,14 +105,22 @@ build:
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:
yarn build:docs --public-url /reactspectrum/$$(git rev-parse HEAD)/docs --dist-dir dist/$$(git rev-parse HEAD)/docs

website-production:
node scripts/buildWebsite.js
node scripts/buildWebsite.js $$PUBLIC_URL
cp packages/dev/docs/pages/robots.txt dist/production/docs/robots.txt
$(MAKE) starter
cd starters/docs && zip -r react-aria-starter.zip . -x .gitignore .DS_Store "node_modules/*" "storybook-static/*"
mv starters/docs/react-aria-starter.zip dist/production/docs/react-aria-starter.$$(git rev-parse --short HEAD).zip

check-examples:
node scripts/extractExamples.mjs
yarn tsc --project dist/docs-examples/tsconfig.json

starter:
node scripts/extractStarter.mjs
cd starters/docs && yarn && yarn tsc
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ A React implementation of Spectrum, Adobe’s design system. Spectrum provides a

### React Aria

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

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

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

* [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!
* [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.
* [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.
* [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).

[Read more about our architecture](https://react-spectrum.adobe.com/architecture.html).
36 changes: 36 additions & 0 deletions examples/next-app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js
.yarn/install-state.gz

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# local env files
.env*.local

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts
36 changes: 36 additions & 0 deletions examples/next-app/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).

## Getting Started

First, run the development server:

```bash
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.

This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.

## Learn More

To learn more about Next.js, take a look at the following resources:

- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.

You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!

## Deploy on Vercel

The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.

Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
24 changes: 24 additions & 0 deletions examples/next-app/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import type { Metadata } from 'next'
import {LocalizedStringProvider, createLocalizedStringDictionary} from '@adobe/react-spectrum/i18n';

const dictionary = createLocalizedStringDictionary(['@react-spectrum/datepicker']);

export const metadata: Metadata = {
title: 'Create Next App',
description: 'Generated by create next app',
}

export default function RootLayout({
children,
}: {
children: React.ReactNode
}) {
return (
<html lang="en">
<body>
<LocalizedStringProvider locale="en" dictionary={dictionary} />
{children}
</body>
</html>
)
}
11 changes: 11 additions & 0 deletions examples/next-app/app/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
"use client";

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

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

/** @type {import('next').NextConfig} */
const nextConfig = {
webpack(config, {isServer}) {
if (!isServer) {
// Don't include any locale strings in the client JS bundle.
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'
]
}

module.exports = nextConfig
32 changes: 32 additions & 0 deletions examples/next-app/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"name": "next-app",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
"react": "^18",
"react-dom": "^18",
"next": "14.0.3"
},
"devDependencies": {
"typescript": "^5",
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18"
},
"workspaces": [
"../../packages/react-aria-components",
"../../packages/react-aria",
"../../packages/react-stately",
"../../packages/*/*"
],
"resolutions": {
"react": "link:../../node_modules/react",
"react-dom": "link:../../node_modules/react-dom"
}
}
3 changes: 3 additions & 0 deletions examples/next-app/postcss.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"plugins": []
}
27 changes: 27 additions & 0 deletions examples/next-app/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"compilerOptions": {
"target": "es5",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true,
"plugins": [
{
"name": "next"
}
],
"paths": {
"@/*": ["./*"]
}
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"exclude": ["node_modules"]
}
4 changes: 2 additions & 2 deletions examples/rac-tailwind/.parcelrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"extends": "@parcel/config-default",
"resolvers": ["@parcel/resolver-glob", "..."],
"resolvers": ["@react-aria/parcel-resolver-optimize-locales", "@parcel/resolver-glob", "..."],
"transformers": {
"../../packages/*/*/intl/*.json": ["parcel-transformer-intl"]
"**/intl/*.json": ["parcel-transformer-intl"]
}
}
4 changes: 3 additions & 1 deletion examples/rac-tailwind/package.json
Original file line number Diff line number Diff line change
@@ -8,6 +8,7 @@
},
"dependencies": {
"@heroicons/react": "^2.0.16",
"@react-aria/parcel-resolver-optimize-locales": "^1.0.0",
"framer-motion": "^10.12.16",
"parcel": "^2.10.2",
"postcss": "^8.4.21",
@@ -20,5 +21,6 @@
},
"devDependencies": {
"process": "^0.11.10"
}
},
"locales": ["en"]
}
Loading