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.37.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.38.0
Choose a head ref

Commits on Jan 15, 2025

  1. chore: Update test util doc examples so they don't error out (#7612)

    * Fixes to test util and docs
    
    * forgot to save a file
    
    * fix docs
    
    * review comments
    LFDanLu authored Jan 15, 2025
    Copy the full SHA
    80f8a2b View commit details
  2. Merge branch 'main' of github.com:adobe/react-spectrum

    devongovett committed Jan 15, 2025
    Copy the full SHA
    09e7f44 View commit details
  3. docs: January 2025 release notes (#7597)

    ktabors authored Jan 15, 2025
    2
    Copy the full SHA
    75b74b1 View commit details
  4. add placement prop to ToastContainer (#7609)

    reidbarber authored Jan 15, 2025
    1
    Copy the full SHA
    78683ee View commit details
  5. fix: React inert prop compatibility (#7519)

    * fix: React inert prop compatibility
    
    * chore: lint
    
    * Check using `React.version`
    
    * Fix type
    
    * fix lint
    
    ---------
    
    Co-authored-by: GitHub <snowystinger@gmail.com>
    Co-authored-by: Robert Snow <rsnow@adobe.com>
    3 people authored Jan 15, 2025
    1

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    55dc352 View commit details
  6. fix(@react-aria/selection): don't mutate non-empty selection upon foc…

    …us (#7513)
    
    * fix(@react-aria/selection): don't mutate non-empty selection upon focus
    
    closes #7512
    
    * add some assertions
    
    ---------
    
    Co-authored-by: GitHub <snowystinger@gmail.com>
    Co-authored-by: Robert Snow <rsnow@adobe.com>
    Co-authored-by: Reid Barber <reid@reidbarber.com>
    4 people authored Jan 15, 2025
    1

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    6806410 View commit details
  7. update toast placement options (#7615)

    reidbarber authored Jan 15, 2025
    1

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    ce54e26 View commit details

Commits on Jan 16, 2025

  1. fix(s2): Remove all: revert-layer to avoid Safari bugs (#7598)

    devongovett authored Jan 16, 2025
    1
    Copy the full SHA
    1286a65 View commit details
  2. Fix broken link in new Autocomplete docs (#7618)

    amitdahan authored Jan 16, 2025
    1
    Copy the full SHA
    2b563a6 View commit details
  3. docs: fix typo in Slider (#7621)

    * Replace comma operator with semicolon for better readability
    
    Closes #5820
    
    * docs: Update Slider.mdx
    
    * fix other typo
    
    ---------
    
    Co-authored-by: Reid Barber <reid@reidbarber.com>
    artola and reidbarber authored Jan 16, 2025
    1
    Copy the full SHA
    1547e25 View commit details
  4. fix: Remove extra class from style macro (#7623)

    devongovett authored Jan 16, 2025
    1
    Copy the full SHA
    df3f1ea View commit details

Commits on Jan 17, 2025

  1. refactor: No longer preventDefault in usePress and allow browser to m…

    …anage focus (#7542)
    
    * working first pass
    
    * Update mouse and touch handlers as well
    
    * Always set a tabIndex on native buttons and inputs so Safari focuses them
    
    * lint
    
    * Update tests
    
    * Make grid selection announcement more resilient to focus order
    
    * Remove focus during virtual clicks
    
    #5940
    
    * Add test story for #7480
    
    * Add story for #6512
    
    * Make sure to cancel press if onClick's propagation is stopped
    
    For #5833
    
    * fix ts
    
    * Use focusWithoutScrolling when restoring focus
    devongovett authored Jan 17, 2025
    1
    Copy the full SHA
    cdba748 View commit details

Commits on Jan 21, 2025

  1. fix: typo in docs (#7647)

    nwidynski authored Jan 21, 2025
    1
    Copy the full SHA
    2a1c28b View commit details

Commits on Jan 22, 2025

  1. fix: add isFocusVisible useMenuItem and fix focusRing when typing in …

    …Autocomplete SearchField (#7625)
    
    * add isFocusVisible support to useMenuItem
    
    * Adding tests and style in storybook
    
    * fix: (WIP) Fix autocomplete searchfield focus ring (#7626)
    
    * for discussion
    
    * fix searchfield focus ring appearing on keypress when wrapped in a autocomplete
    
    * add test
    
    * remove extranous controls
    LFDanLu authored Jan 22, 2025
    1
    Copy the full SHA
    9bb6ed9 View commit details
  2. feat(Button): add support for aria-current prop (#7643)

    TimonVS authored Jan 22, 2025
    1
    Copy the full SHA
    7b7b461 View commit details
  3. chore: update dependencies (#7648)

    snowystinger authored Jan 22, 2025
    1
    Copy the full SHA
    3e1c518 View commit details

Commits on Jan 24, 2025

  1. feat: add overflowMode to S2 Badge (#7653)

    * feat: add overflowMode to S2 Badge
    
    * fix spelling
    
    * fix spelling in api diff
    yihuiliao authored Jan 24, 2025
    1
    Copy the full SHA
    873f6fe View commit details

Commits on Jan 27, 2025

  1. feat: GridList autoFocus (#7640)

    * feat: GridList autoFocus
    
    * Update packages/@react-aria/gridlist/src/useGridList.ts
    
    Co-authored-by: Reid Barber <reid@reidbarber.com>
    
    ---------
    
    Co-authored-by: Reid Barber <reid@reidbarber.com>
    snowystinger and reidbarber authored Jan 27, 2025
    1
    Copy the full SHA
    f6e1bd9 View commit details
  2. fix: tablist auto selection (#7529)

    * Fix tabs auto selection
    
    * fix lint
    
    * see if it passes on CI
    
    * remove forced selection in controlled
    
    * add a little more to the test
    snowystinger authored Jan 27, 2025
    1
    Copy the full SHA
    fd7075c View commit details

Commits on Jan 28, 2025

  1. fix: dayperiod segment no longer resets when hour deleted (#7506)

    * fix: dayperiod segment no longer reset
    
    * undo prettier
    
    * add test
    
    ---------
    
    Co-authored-by: Yihui Liao <44729383+yihuiliao@users.noreply.github.com>
    charlotte-whiting and yihuiliao authored Jan 28, 2025
    1
    Copy the full SHA
    c4bd19d View commit details
  2. fix: Fix focusing radio, checkbox, and switch on press (#7677)

    * Fix iOS delay for click event
    
    * Fix focusing radio, checkbox, and switch on label press
    devongovett authored Jan 28, 2025
    1
    Copy the full SHA
    cbdf710 View commit details

Commits on Jan 29, 2025

  1. fix: correctly format date/time in RTL (#7423)

    * bdo on timefield, reverse segments on timefield in datefield
    
    * fix lint
    
    * make things inline
    
    * use unicode character to wrap segments
    
    * fix test
    
    * append unicode to text in hooks, update rac
    
    * add comment
    
    * skip failing test for now
    
    * update keyboard nav
    
    * update logic of how unicode is applied
    
    * fix spacing
    
    * add comments
    
    * update tests
    
    * undo some previous changes
    
    * wrap time segments in lri, wrap fields in unicode isolate
    
    * fix ssr test
    
    * fix spacing
    
    * fix css logic
    
    * fix lint
    
    * fix keyboard nav in rac datepicker popover
    
    * fix lint
    
    * prevent overflow in date range picker
    
    * move overflow hidden to separate new div to fix weird focus ring around the button
    
    * this time actually fix the overflow and focus ring issue
    
    * update var names to be nicer
    
    * fix japanese placeholder for extra space
    
    * fix css positioning
    
    * fix custom width
    
    * small css changes so that rtl will format properly
    
    * memo ordering of segments for keyboard navigation
    
    * add chromatic tests
    
    * fix lint
    
    * add tests to rsp date components
    
    * add tests to rac
    
    * fix tests
    
    * remove comment
    
    * fix chromatic stories
    
    * add chromatic story
    
    * remove style tests
    
    * fix lint
    
    * update to uselayouteffect and update keyboard nav test
    
    * make date input more consistent with using display inline
    
    * update timefield docs css to use display inline
    
    * fix showFormatHelpText
    
    * small change
    
    * fix lint
    
    * add divs to keyboard navigation so it works with older versions
    
    * fix lint + fix tests
    yihuiliao authored Jan 29, 2025
    1
    Copy the full SHA
    e228ed8 View commit details
  2. feat: Update to Tailwind v4 (#7669)

    * initial upgrade
    
    * Update plugin, homepage, and examples
    
    * fix jest resolver
    
    * Update tailwind starter
    
    * Update rac-tailwind example app
    
    * Update rac-spectrum-tailwind example
    
    * enable verdaccio build
    
    * update tailwind-variants
    
    * patch
    
    * update lockfile
    
    * missing dependency
    
    * copy patches when building website
    
    * dedupe lightningcss
    
    * Update styling page
    
    * Fix TextField focus state
    
    * revert verdaccio
    
    * fix typo
    devongovett authored Jan 29, 2025
    1
    Copy the full SHA
    9efdd3b View commit details
  3. fix(Select): HiddenSelect Component Auto-Completion Issue (#7670)

    * address autofill issue
    
    * lint
    
    * remove unnecessary change
    
    * Update packages/@react-aria/select/src/HiddenSelect.tsx
    
    Co-authored-by: Robert Snow <snowystinger@gmail.com>
    
    * remove unnecessary variable declaration
    
    ---------
    
    Co-authored-by: Robert Snow <snowystinger@gmail.com>
    Co-authored-by: Reid Barber <reid@reidbarber.com>
    3 people authored Jan 29, 2025
    1
    Copy the full SHA
    beb8bd5 View commit details
  4. feat: S2 treeview (#7343)

    * Render a TreeView
    
    * Correct styles
    
    * update styles to better fix s2
    
    * fix install
    
    * fix lint, add preliminary test
    
    * fix lint
    
    * Add tests and test util
    
    * save point
    
    * Add emptyState
    
    * fix lint
    
    * detached styles
    
    * detached styling with actions
    
    * fix disabled, icon placement, and add examples
    
    * fix lint
    
    * update snapshots
    
    * fix lint and tests
    
    * fix imports
    
    * Match row selection to table
    
    * fix lint, again
    
    * feat: S2 treeview virtualized (#7465)
    
    * feature: s2 treeview virtualization
    
    * support both detached and non in the layout
    
    * fix lint
    
    * fix height for docs
    
    * default tree disabled behavior to all to match our other components
    
    * fix tests
    
    * update snapshots
    
    * fix lint
    
    * fix alignment and remove minwidth
    
    * increase gap between detached items
    
    * remove restriction for isDetached and isEmphasized
    
    * fix border radius
    
    * review comments
    
    * fix lint
    snowystinger authored Jan 29, 2025
    1
    Copy the full SHA
    e3ed3c7 View commit details

Commits on Jan 31, 2025

  1. fix: top/left align icon in s2 badge (#7691)

    * fix: top/left align icon in s2 badge
    
    * center icon only badge
    yihuiliao authored Jan 31, 2025
    1
    Copy the full SHA
    b86dc20 View commit details
  2. chore: Refactor S2 tabs to fix accessibility issues (#7600)

    * wip: Refactor S2 tabs to fix accessibility issues
    
    * yarn
    
    * review comments
    
    * fix lint
    
    * fix orientation case
    
    * Fix orientation case not updating overflow
    
    * Add required labelling and other review comments
    
    * fix a few more announcements
    
    * fix lint
    
    * fix chromatic
    
    * remove translations
    
    * fix announcements
    
    * fix lint
    
    ---------
    
    Co-authored-by: GitHub <snowystinger@gmail.com>
    Co-authored-by: Robert Snow <rsnow@adobe.com>
    3 people authored Jan 31, 2025
    Copy the full SHA
    016590a View commit details
  3. [5574] - add moveBefore and moveAfter to useTreeData (#7689)

    * [5574] - add moveBefore and moveAfter to useTreeData
    
    * add docs
    
    * remove onlys
    
    * remove console logs
    rob-clayburn authored Jan 31, 2025
    1
    Copy the full SHA
    1ba8f01 View commit details
  4. chore: follow-up for rtl date/time format (#7685)

    * add comments to explain unicode stuff
    
    * add blurb about the css changes in rac docs
    
    * add spacing to showFormatHelpText
    yihuiliao authored Jan 31, 2025
    1
    Copy the full SHA
    41ef71d View commit details

Commits on Feb 3, 2025

  1. feat: Allow ReactElement in LabeledValue value (#7679)

    * Allow ReactNode as LabeledValue value
    
    * Add useEffect
    
    * Fix linter errors
    
    * Fix error case tests
    
    * fix story
    
    * Remove todo
    
    * Fix error test
    
    * Add docs
    
    * Fix linter
    
    * Remove console.error check
    
    * Fix docs
    
    * Fix lint errors
    
    * Fix lint errors
    
    * Update to use ReactElement
    
    * Update packages/@react-spectrum/labeledvalue/stories/LabeledValue.stories.tsx
    
    * Fix errorMessage test
    
    ---------
    
    Co-authored-by: Sana Malik <sanmalik@adobe.com>
    Co-authored-by: Reid Barber <reid@reidbarber.com>
    Co-authored-by: Robert Snow <snowystinger@gmail.com>
    4 people authored Feb 3, 2025
    1
    Copy the full SHA
    2905848 View commit details
  2. chore: add aria=label to custom popover story in s2 (#7699)

    yihuiliao authored Feb 3, 2025
    1
    Copy the full SHA
    4b641a7 View commit details
  3. fix: save render through optimized useSlot() (#7270)

    * allow for initializing slot with a false state
    
    * save slot render in checkboxgroup
    
    * save slot render in radiogroup
    
    * save slot render in meter
    
    * save render in select
    
    * save render in timefield
    
    * save render in datefield
    
    * save render in hexcolorfield
    
    * save render in colorchannelfield
    
    * save render in progressbar
    
    * saver render in combobox
    
    * save render in searchfield
    
    * save render in numberfield
    
    * save render in taggroup
    
    * save render in textfield
    
    * save render in colorslider
    
    * save render in slider
    
    * save render in datepicker
    
    * Update packages/react-aria-components/src/utils.tsx
    
    ---------
    
    Co-authored-by: Robert Snow <snowystinger@gmail.com>
    nwidynski and snowystinger authored Feb 3, 2025
    1
    Copy the full SHA
    cfcd697 View commit details
  4. feat: improve literal search for member expressions (#7604)

    Co-authored-by: Robert Snow <rsnow@adobe.com>
    nwidynski and snowystinger authored Feb 3, 2025
    1
    Copy the full SHA
    4322a3e View commit details

Commits on Feb 4, 2025

  1. feat: add fetchPriority prop to S2 Image (#7706)

    chirokas authored Feb 4, 2025
    1
    Copy the full SHA
    9d70953 View commit details
  2. fix: infinite re-render on reoccuring ids (#7657)

    * fix: infinite re-render on reoccuring ids
    
    * fix: useId effect cleanup
    
    * fix: react 19 compatibility
    
    * fix: typo
    
    * fix: jest anything matcher
    
    * fix: match optional anything
    
    * fix: react 16 fc & assertion
    
    * chore: remove nvmrc upgrade
    
    ---------
    
    Co-authored-by: Robert Snow <rsnow@adobe.com>
    nwidynski and snowystinger authored Feb 4, 2025
    1
    Copy the full SHA
    a861ca4 View commit details
  3. fix: respect padding and remove cursor in DateRangePicker (#7712)

    yihuiliao authored Feb 4, 2025
    1
    Copy the full SHA
    eae712a View commit details
  4. chore: update chromatic dependency (#7714)

    snowystinger authored Feb 4, 2025
    1
    Copy the full SHA
    939205c View commit details

Commits on Feb 5, 2025

  1. chore: updating the code of conduct to newer version (#7693)

    * updating the code of conduct to newer version
    
    * Update CONTRIBUTING.md
    
    ---------
    
    Co-authored-by: Robert Snow <rsnow@adobe.com>
    Co-authored-by: Danni <darobins@adobe.com>
    3 people authored Feb 5, 2025
    1
    Copy the full SHA
    2788d8a View commit details
  2. fix: S2 Badge context (#7704)

    * fix: S2 Badge context
    
    * fix lint
    snowystinger authored Feb 5, 2025
    1
    Copy the full SHA
    6c4c57d View commit details

Commits on Feb 6, 2025

  1. feat: Focus Management within ShadowDOM (#6046)

    * Add `getRootNode` utility.
    
    * Update `getRootNode` util.
    Update domHelpers.test.js.
    
    * Update `getOwnerWindow` util.
    
    * Add tests for Shadow DOM handling using `getRootNode`.
    
    * Update comment.
    
    * Fix FocusScope.tsx in Shadow DOM.
    Add Tests for FocusScope.test.js.
    New helper util `getRootBody`.
    
    * Add more test for FocusScope.test.js.
    Fix `useRestoreFocus` issue.
    Add new DOM util `getDeepActiveElement`.
    
    * Fix another `useRestoreFocus` issue with restoring focus in `Keyboard navigation example`.
    
    * Add tests for `getDeepActiveElement`
    
    * Add `useFocus` shadow DOM tests.
    update `useFocus` - `useFocusWithin` - `usePress`.
    
    * Update `focusSafely`.
    Test for `focusSafely`.
    
    * Update `useInteractionOutside` for Shadow DOM support.
    
    * Update `useFocusVisible` for Shadow DOM support.
    
    * Add `useInteractOutside` tests.
    
    * Add test for use case mentioned in issue #1472.
    
    * Add tests for `usePress` hook.
    
    * Update the fix for `useInteractOutside` to use simpler one.
    
    * Update `useOverlay` to use composedPath.
    
    * Tests refactor.
    
    * Revert `useOverlay` changes as it works correctly without these changes.
    
    * Fix types.
    
    * Fix types.
    
    * lint.
    
    * lint.
    
    * Fix failing tests.
    
    * Fix failing tests.
    
    * Fix failing tests.
    
    * Test CI
    
    * Test CI
    
    * Fix shadow DOM tests
    
    * Fix shadow DOM tests.
    
    * Fix CI?
    
    * Fix CI?
    
    * Fix CI?
    
    * Re-add commented test.
    
    * Update `getRootNode` to handle iframes as well, and everything that  `getOwnerDocument` used to handle.
    
    * Fix tests.
    
    * Fix tests?
    
    * Fix tests?
    
    * Fix tests.
    
    * Fix tests.?
    
    * Fix tests.?
    
    * Fix tests.?
    
    * Fix tests.?
    
    * Apply suggestions from code review
    
    Co-authored-by: Robert Snow <snowystinger@gmail.com>
    
    * Update packages/@react-aria/interactions/test/usePress.test.js
    
    Co-authored-by: Robert Snow <snowystinger@gmail.com>
    
    * - Update tests to use `createShadowRoot` util.
    - Update `getRootNode` to return null for disconnected nodes.
    - Update `usePress.test.js` shadow DOM test.
    - Test getting rid of reactDomRenderer.
    
    * - Update tests and remove reactCompat.
    
    * - Leftover.
    
    * - Revert changes to getFocusableTreeWalker.
    
    * - Remove casting.
    
    * - return null in case element is disconnected in `getRootNode`.
    
    * - Casting.
    
    * - Update unit test.
    
    * - Handle focus movements between shadow DOMs.
    
    * - TS fixes.
    
    * Update usePress.test.js
    
    * Refactors and TS errors.
    
    * Update fix.
    
    * Remove broken sandbox link.
    
    * Refactor `getRootNode` to improve root node handling.
    
    * Use `getDeepActiveElement` inside focusSafely.ts to get the active element.
    
    * Refactor event listener registration
    
    Introduce `createEventListener` function to streamline event listener registration. This enhances readability and maintainability, ensuring consistency across event handling logic.
    
    * Remove `ownerDocument` fallback in usePress.ts
    
    * Refactor `createEventListener` for type-safe caching.
    
    * - Test out the updated getOwnerWindow to fix iframe focus issues.
    
    * - Test out the updated getOwnerWindow to fix iframe focus issues.
    
    * - Test?
    
    * - Revert Focus scope changes, for testing.
    
    * - Fix tests?
    
    * - Fix tests?
    
    * - Fix tests?
    
    * - Revert the changes to getRootNode.
    
    * - Revert `isElementInScope` as well.
    
    * - Test out if instance check failure across context for iframes is what is causing the issue.
    
    * - Replace the use of `instanceof` with `nodeType` to correctly identify the node type across contexts.
    - Revert changes made for `usePress`.
    
    * - Fix ESlint errors.
    
    * - Update the usages of `instanceof` to use `nodeType` instead.
    
    * Update packages/@react-aria/interactions/src/useFocusVisible.ts
    
    Co-authored-by: Robert Snow <snowystinger@gmail.com>
    
    * - Update the usages of `instanceof` to use `nodeType` instead.
    - Introduce new helpers `isShadowRoot` and `isDocument`.
    
    * - Lint.
    
    * - Lint.
    
    * - Update `getDeepActiveElement` to accept an optional document or shadowRoot.
    - Fix an issue where opening any popover, the focus wasn't restored to the trigger element in shadow DOM.
    
    * - Add extra unit test for `getDeepActiveElement`.
    
    * - Update `getDeepActiveElement` to always rely on `getRootNode`.
    
    * - Update `getDeepActiveElement` to always rely on `getRootNode`.
    
    * refactor usePress to still have global listeners for cleanup across boundaries
    
    * fix lint and test
    
    * restore remaining document level listeners
    
    * fix tests
    
    * fix lint
    
    * simplify
    
    * Update packages/@react-aria/focus/src/FocusScope.tsx
    
    * fix autofocus
    
    * minor test updates to preserve test intent
    
    * review comments
    
    * fix esm test
    
    * fix lint
    
    * check in speed tests
    
    * fix lint
    
    * Add feature flag and fix a couple probable bugs
    
    * Update NOTICE.txt
    
    ---------
    
    Co-authored-by: Ritesh Kumar <ritz078@users.noreply.github.com>
    Co-authored-by: Robert Snow <rsnow@adobe.com>
    Co-authored-by: Robert Snow <snowystinger@gmail.com>
    Co-authored-by: Daniel Lu <dl1644@gmail.com>
    5 people authored Feb 6, 2025
    1
    Copy the full SHA
    c78b248 View commit details
  2. feat: implemented details prop to the getItems function in the useCli…

    …pboard hook (#7727)
    
    * feat: implemented details prop to the getItems function in the useClipboard hook
    
    * fix: linting
    
    * trigger build with correct email
    Nevnet99 authored Feb 6, 2025
    1
    Copy the full SHA
    42cfe68 View commit details
  3. Do not build list of available slots when no error (#7731)

    jorrit authored Feb 6, 2025
    1
    Copy the full SHA
    ac55911 View commit details

Commits on Feb 7, 2025

  1. fix: prevent menu item focus ring from exceeding popover boundaries (#…

    …7672)
    
    * fix: prevent menu item focus ring from exceeding the boundaries of the popover
    
    * try diff css changes...
    yihuiliao authored Feb 7, 2025
    1
    Copy the full SHA
    801ef48 View commit details
  2. Chore: correct Table/Collection array types. Fixes #7656 (#7741)

    lukeapage authored Feb 7, 2025
    1
    Copy the full SHA
    0a3204c View commit details
  3. feat(Toast): use View Transition API for Toast animations (#7631)

    * remove animation code from toast hooks
    
    * add View Transitions
    
    * lint
    
    * fix invalid viewTransitionName
    
    * fix Multiple story
    
    * fix transition when programmatically closing toast
    
    * fix slide in/out
    
    * fix ts-ignore
    
    * update yarn.lock
    
    * memoize placement
    
    * add placement to fullscreen story
    
    * fade out toasts that are centered, and not the last one
    
    * lint
    
    * add wrapUpdate option to ToastQueue
    
    * update where runWithWrapUpdate gets called
    
    * fix function param
    reidbarber authored Feb 7, 2025
    1
    Copy the full SHA
    ff300df View commit details
  4. handle margin/padding shorthands in style props codemod (#7740)

    reidbarber authored Feb 7, 2025
    1
    Copy the full SHA
    cc08a8d View commit details

Commits on Feb 10, 2025

  1. chore: add autofill stories (#7722)

    * chore: add autofill stories
    
    * add more components to form stories
    
    * make autocomplete form more realistic
    
    * rename story
    
    * fix lint
    
    * add picker to s2 form story
    yihuiliao authored Feb 10, 2025
    1
    Copy the full SHA
    fb3b865 View commit details
  2. chore: Update spectrum tokens (#7736)

    * chore: update spectrum tokens
    
    * fix chromatic stories label ordering
    
    * fix remaining stories
    
    * fix flaky story
    
    * update remaining instance of tokens
    
    * Revert chromatic changes and mergeProps order
    
    * fix lint
    
    * stabilize colorswatchpicker again
    snowystinger authored Feb 10, 2025
    1
    Copy the full SHA
    e8de3f8 View commit details
  3. fix: Autocomplete 'tab' key forwarding (#7724)

    * fix: Autocomplete 'tab' key forwarding
    
    * fix react 16 compatibility
    
    * make better story name
    
    * use daniel's fix
    
    * Update packages/react-aria-components/test/Autocomplete.test.tsx
    snowystinger authored Feb 10, 2025
    1
    Copy the full SHA
    4b8b33a View commit details

Commits on Feb 11, 2025

  1. chore(s2): fix S2 children and context types (#7668)

    * fix S2 children and context types
    
    * fix chromatic types?
    
    * missed one
    
    * switch some children types back to optional
    
    * fix types
    
    * fix types
    
    * types
    
    * review comment
    reidbarber authored Feb 11, 2025
    1
    Copy the full SHA
    735b275 View commit details
Showing 907 changed files with 24,494 additions and 9,476 deletions.
2 changes: 1 addition & 1 deletion .storybook-s2/docs/Icons.jsx
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ import {highlight} from './highlight' with {type: 'macro'};

export function Icons() {
return (
<div className={style({marginX: 'auto'})}>
<div className={'sb-unstyled ' + style({marginX: 'auto'})}>
<div className={style({marginX: 48})}>
<h1 className={style({font: 'heading-2xl', marginBottom: 48})}>
Workflow icons
2 changes: 1 addition & 1 deletion .storybook-s2/docs/Illustrations.jsx
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@ import { useState } from 'react';
export function Illustrations() {
let [gradientStyle, setStyle] = useState('generic1');
return (
<div className={style({marginX: 'auto'})}>
<div className={'sb-unstyled ' + style({marginX: 'auto'})}>
<div className={style({marginX: 48})}>
<h1 className={style({font: 'heading-2xl', marginBottom: 48})}>
Illustrations
15 changes: 6 additions & 9 deletions .storybook-s2/docs/Intro.jsx
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@ import {H2, H3, H4, P, Pre, Code, Strong, Link} from './typography';

export function Docs() {
return (
<div className={style({marginX: 'auto', marginY: 48})}>
<div className={'sb-unstyled ' + style({marginX: 'auto', marginY: 48})}>
<header
style={{
backgroundImage: `url(${new URL('wallpaper_collaborative_S2_desktop.webp', import.meta.url).toString()})`,
@@ -202,7 +202,6 @@ import {ActionButton} from '@react-spectrum/s2';
<li><Code>width</Code></li>
<li><Code>minWidth</Code></li>
<li><Code>maxWidth</Code></li>
<li><Code>flex</Code></li>
<li><Code>flexGrow</Code></li>
<li><Code>flexShrink</Code></li>
<li><Code>flexBasis</Code></li>
@@ -228,7 +227,7 @@ import {ActionButton} from '@react-spectrum/s2';
</ul>
<H3>UNSAFE Style Overrides</H3>
<P>We highly discourage overriding the styles of React Spectrum components because it may break at any time when we change our implementation, making it difficult for you to update in the future. Consider using <Link href="https://react-spectrum.adobe.com/react-aria/" target="_blank">React Aria Components</Link> with our <Link href="?path=/docs/style-macro--docs" target="_top">style macro</Link> to build a custom component with Spectrum styles instead.</P>
<P>That said, just like in React Spectrum v3, the <Code>UNSAFE_className</Code> and <Code>UNSAFE_style</Code> props are supported on Spectrum 2 components as last-resort escape hatches. However, unlike in v3, UNSAFE_classNames must be placed in a special <Code>UNSAFE_overrides</Code> <Link href="https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Cascade_layers" target="_blank">CSS cascade layer</Link>. This guarentees that your overrides will always win over other styles on the page, no matter the order or specificity of the selector.</P>
<P>That said, just like in React Spectrum v3, the <Code>UNSAFE_className</Code> and <Code>UNSAFE_style</Code> props are supported on Spectrum 2 components as last-resort escape hatches.</P>
<Pre>{highlight(`/* YourComponent.tsx */
import {Button} from '@react-spectrum/s2';
import './YourComponent.css';
@@ -237,12 +236,10 @@ function YourComponent() {
return <Button UNSAFE_className="your-unsafe-class">Button</Button>;
}`)}</Pre>
<Pre>{highlight(`/* YourComponent.css */
@layer UNSAFE_overrides {
/* Wrap all UNSAFE_className rules in this layer. */
.your-unsafe-class {
background: red;
}
}`, 'CSS')}</Pre>
.your-unsafe-class {
background: red;
}
`, 'CSS')}</Pre>
</main>
</div>
)
2 changes: 1 addition & 1 deletion .storybook-s2/docs/MDXLayout.jsx
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@ const mdxComponents = {

export function MDXLayout({children}) {
return (
<div className={style({marginX: 'auto'})}>
<div className={'sb-unstyled ' + style({marginX: 'auto'})}>
<main className={style({marginX: 48})}>
<MDXProvider components={mdxComponents}>
{children}
13 changes: 12 additions & 1 deletion .storybook-s2/docs/Migrating.jsx
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ import {P, Code, Pre, H3, H2, Link} from './typography';

export function Migrating() {
return (
<div className={style({marginX: 'auto', fontFamily: 'sans'})}>
<div className={'sb-unstyled ' + style({marginX: 'auto', fontFamily: 'sans'})}>
<div className={style({marginX: 48})}>
<h1 className={style({font: 'heading-2xl', marginBottom: 48})}>
Migrating to Spectrum 2
@@ -44,6 +44,17 @@ export function Migrating() {
<li className={style({font: 'body', marginY: 8})}>Add <Code>allowsMultipleExpanded</Code> to allow multiple <Code>Disclosure</Code> components to be expanded at once (previously default behavior)</li>
</ul>

<H3>ActionBar</H3>
<ul className="sb-unstyled">
<li className={style({font: 'body', marginY: 8})}>Remove <Code>ActionBarContainer</Code> and move <Code>ActionBar</Code> to <Code>renderActionBar</Code> prop of <Code>TableView</Code> or <Code>CardView</Code></li>
<li className={style({font: 'body', marginY: 8})}>Update <Code>Item</Code> to <Code>ActionButton</Code></li>
<li className={style({font: 'body', marginY: 8})}>Update root level <Code>onAction</Code> to be called via <Code>onPress</Code> on each <Code>ActionButton</Code></li>
<li className={style({font: 'body', marginY: 8})}>Apply <Code>isDisabled</Code> directly on each <Code>ActionButton</Code> or <Code>ToggleButton</Code> instead of root level <Code>disabledKeys</Code></li>
<li className={style({font: 'body', marginY: 8})}>Update <Code>key</Code> to be <Code>id</Code> (and keep <Code>key</Code> if rendered inside <Code>array.map</Code>)</li>
<li className={style({font: 'body', marginY: 8})}>Convert dynamic collections render function to <Code>items.map</Code></li>
<li className={style({font: 'body', marginY: 8})}>[PENDING] Comment out <Code>buttonLabelBehavior</Code> (it has not been implemented yet)</li>
</ul>

<H3>ActionButton</H3>
<P>No updates needed.</P>

19 changes: 19 additions & 0 deletions .storybook-s2/docs/Release Notes.mdx
Original file line number Diff line number Diff line change
@@ -4,6 +4,25 @@ export default MDXLayout;

# Release Notes

## v0.6.0

### New Components

* [ActionBar](?path=/docs/actionbar--docs)

### Updates

* [Button](?path=/docs/button--docs): Add `genai` and `premium` gradient variants
* [Menu](?path=/docs/menu--docs): Add `hideLinkOutIcon` prop, update alignment of items in different sections, and show checkmark on selected items that are links.
* Added `staticColor="auto"` option to [ActionButton](?path=/docs/actionbutton--docs), [ToggleButton](?path=/docs/togglebutton--docs), [Divider](?path=/docs/divider--docs), [Meter](?path=/docs/meter--docs), [ProgressBar](?path=/docs/progressbar--docs), and [Link](?path=/docs/link--docs)
* [ContextualHelp](?path=/docs/contextualhelp--docs): Fix alignment with field labels
* [InlineAlert](?path=/docs/inlinealert--docs): Remove maximum width
* [CheckboxGroup](?path=/docs/checkboxgroup--docs): Fix `isRequired` within a Form

### Codemods

* Added TableView codemods

## v0.5.0

In this release we have updated our Dialog and DialogTrigger APIs to improve layout flexibility for custom dialogs and popovers. Dialog has been split into four components:
2 changes: 1 addition & 1 deletion .storybook-s2/docs/StyleMacro.jsx
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ import {Colors} from './Colors';

export function StyleMacro() {
return (
<div className={style({marginX: 'auto'})}>
<div className={'sb-unstyled ' + style({marginX: 'auto'})}>
<header
className={style({
paddingX: 48,
5 changes: 5 additions & 0 deletions .storybook-s2/manager.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import {addons} from '@storybook/manager-api';

addons.setConfig({
enableShortcuts: false
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
diff --git a/dist/cjs/document/prepareDocument.js b/dist/cjs/document/prepareDocument.js
index 39a24b8f2ccdc52739d130480ab18975073616cb..0c3f5199401c15b90230c25a02de364eeef3e297 100644
--- a/dist/cjs/document/prepareDocument.js
+++ b/dist/cjs/document/prepareDocument.js
@@ -30,7 +30,7 @@ function prepareDocument(document) {
const initialValue = UI.getInitialValue(el);
if (initialValue !== undefined) {
if (el.value !== initialValue) {
- dispatchEvent.dispatchDOMEvent(el, 'change');
+ el.dispatchEvent(new Event('change'));
}
UI.clearInitialValue(el);
}
diff --git a/dist/cjs/utils/focus/getActiveElement.js b/dist/cjs/utils/focus/getActiveElement.js
index d25f3a8ef67e856e43614559f73012899c0b53d7..4ed9ee45565ed438ee9284d8d3043c0bd50463eb 100644
--- a/dist/cjs/utils/focus/getActiveElement.js
+++ b/dist/cjs/utils/focus/getActiveElement.js
@@ -6,6 +6,8 @@ function getActiveElement(document) {
const activeElement = document.activeElement;
if (activeElement === null || activeElement === undefined ? undefined : activeElement.shadowRoot) {
return getActiveElement(activeElement.shadowRoot);
+ } else if (activeElement && activeElement.tagName === 'IFRAME') {
+ return getActiveElement(activeElement.contentWindow.document);
} else {
// Browser does not yield disabled elements as document.activeElement - jsdom does
if (isDisabled.isDisabled(activeElement)) {
19 changes: 19 additions & 0 deletions .yarn/patches/tailwind-variants-npm-0.3.1-48888516de.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
diff --git a/dist/transformer.d.ts b/dist/transformer.d.ts
index 508be4d8176486bfbbccd0b8cf297465c8efd15a..afbd775c60f09c8a9c35e30c79f286fddc7c7018 100644
--- a/dist/transformer.d.ts
+++ b/dist/transformer.d.ts
@@ -1,10 +1,10 @@
-import type {Config} from "tailwindcss/types/config";
-import type {DefaultTheme} from "tailwindcss/types/generated/default-theme";
+// import type {Config} from "tailwindcss/types/config";
+// import type {DefaultTheme} from "tailwindcss/types/generated/default-theme";

-export type DefaultScreens = keyof DefaultTheme["screens"];
+export type DefaultScreens = any;

export type WithTV = {
- <C extends Config>(tvConfig: C, config?: TVTransformerConfig): C;
+ <C>(tvConfig: C, config?: TVTransformerConfig): C;
};

export declare const withTV: WithTV;
101 changes: 53 additions & 48 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -2,73 +2,78 @@

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of experience,
nationality, personal appearance, race, religion, or sexual identity and
orientation.
We as members, contributors, and leaders pledge to make participation in our project and community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:
Examples of behavior that contribute to a positive environment for our project and community include:

* Using welcoming and inclusive language.
* Being respectful of differing viewpoints and experiences.
* Gracefully accepting constructive criticism.
* Focusing on what is best for the community.
* Showing empathy towards other community members.
* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
* Focusing on what is best, not just for us as individuals but for the overall community

Examples of unacceptable behavior by participants include:
Examples of unacceptable behavior include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances.
* Trolling, insulting/derogatory comments, and personal or political attacks.
* Public or private harassment.
* Publishing others' private information, such as a physical or electronic
address, without explicit permission.
* Other conduct which could reasonably be considered inappropriate in a
professional setting.
* The use of sexualized language or imagery, and sexual attention or advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others’ private information, such as a physical or email address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Project maintainers are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for behaviors that they deem inappropriate, threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.
This Code of Conduct applies when an individual is representing the project or its community both within project spaces and in public spaces. Examples of representing a project or community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at Grp-opensourceoffice@adobe.com. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by first contacting the project team. Oversight of Adobe projects is handled by the Adobe Open Source Office, which has final say in any violations and enforcement of this Code of Conduct and can be reached at Grp-opensourceoffice@adobe.com. All complaints will be reviewed and investigated promptly and fairly.

The project team must respect the privacy and security of the reporter of any incident.

Project maintainers who do not follow or enforce the Code of Conduct may face temporary or permanent repercussions as determined by other members of the project's leadership or the Adobe Open Source Office.

## Enforcement Guidelines

Project maintainers will follow these Community Impact Guidelines in determining the consequences for any action they deem to be in violation of this Code of Conduct:

**1. Correction**

Community Impact: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.

Consequence: A private, written warning from project maintainers describing the violation and why the behavior was unacceptable. A public apology may be requested from the violator before any further involvement in the project by violator.

**2. Warning**

Community Impact: A relatively minor violation through a single incident or series of actions.

Consequence: A written warning from project maintainers that includes stated consequences for continued unacceptable behavior. Violator must refrain from interacting with the people involved for a specified period of time as determined by the project maintainers, including, but not limited to, unsolicited interaction with those enforcing the Code of Conduct through channels such as community spaces and social media. Continued violations may lead to a temporary or permanent ban.

**3. Temporary Ban**

Community Impact: A more serious violation of community standards, including sustained unacceptable behavior.

Consequence: A temporary ban from any interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Failure to comply with the temporary ban may lead to a permanent ban.

**4. Permanent Ban**

Community Impact: Demonstrating a consistent pattern of violation of community standards or an egregious violation of community standards, including, but not limited to, sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.
Consequence: A permanent ban from any interaction with the community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at [https://contributor-covenant.org/version/1/4][version].
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.1,
available at [https://contributor-covenant.org/version/2/1][version]

[homepage]: https://contributor-covenant.org
[version]: https://contributor-covenant.org/version/1/4/
[version]: https://contributor-covenant.org/version/2/1
8 changes: 6 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -216,6 +216,10 @@ You may have run `yarn build` before. Please run `make clean_all && yarn` to cle

It may also just be a stale cache, you can try deleting the `.parcel-cache`

## Contributor to committer
## From Contributor To Committer

We love contributions from our community! If you'd like to go a step beyond contributor and become a committer with full write access and a say in the project, you must be invited. The existing committers employ an internal nomination process that must reach lazy consensus (silence is approval) before invitations are issued. If you feel you are qualified and want to get more deeply involved, feel free to reach out to existing committers to have a conversation.
We love contributions from our community! At this time, we are not accepting new committers. We thank you for your understanding.

## Security Issues

Security issues shouldn't be reported on this issue tracker. Instead, [file an issue to our security experts](https://helpx.adobe.com/security/alertus.html).
Loading