From f75223a04382fd410636d615cfb859fd2452098e Mon Sep 17 00:00:00 2001 From: Daniel Lu Date: Thu, 3 Apr 2025 13:06:25 -0700 Subject: [PATCH 1/3] chore: Fix generated code sample for S2 TooltipTrigger docs (#8000) * Fix generated code sample for S2 TooltipTrigger docs * review * inlining --- .../s2/stories/Tooltip.stories.tsx | 59 +++++++++++++++++-- 1 file changed, 55 insertions(+), 4 deletions(-) diff --git a/packages/@react-spectrum/s2/stories/Tooltip.stories.tsx b/packages/@react-spectrum/s2/stories/Tooltip.stories.tsx index e1a59705fc0..a13c5862846 100644 --- a/packages/@react-spectrum/s2/stories/Tooltip.stories.tsx +++ b/packages/@react-spectrum/s2/stories/Tooltip.stories.tsx @@ -14,7 +14,7 @@ import {ActionButton, Button, Provider, Tooltip, TooltipTrigger} from '../src'; import {CombinedTooltip} from '../src/Tooltip'; import Crop from '../s2wf-icons/S2_Icon_Crop_20_N.svg'; import LassoSelect from '../s2wf-icons/S2_Icon_LassoSelect_20_N.svg'; -import type {Meta} from '@storybook/react'; +import type {Meta, StoryObj} from '@storybook/react'; import {style} from '../style' with {type: 'macro'}; const meta: Meta = { @@ -80,13 +80,32 @@ const ExampleRender = (args: any) => { ); }; -export const Example = { +type Story = StoryObj; + +export const Example: Story = { render: (args) => , argTypes: { isOpen: { control: 'select', options: [true, false, undefined] } + }, + parameters: { + docs: { + source: { + transform: () => { + return ` + + + Crop + + + + Lasso +`; + } + } + } } }; @@ -126,17 +145,30 @@ const LongLabelRender = (args: any) => { ); }; -export const LongLabel = { +export const LongLabel: Story = { render: (args) => , argTypes: { isOpen: { control: 'select', options: [true, false, undefined] } + }, + parameters: { + docs: { + source: { + transform: () => { + return ` + + + Checkbox with very long label so we can see wrapping +`; + } + } + } } }; -export const ColorScheme = { +export const ColorScheme: Story = { render: (args: any) => ( @@ -147,5 +179,24 @@ export const ColorScheme = { control: 'select', options: [true, false, undefined] } + }, + parameters: { + docs: { + source: { + transform: () => { + return ` + + + + Crop + + + + Lasso + +`; + } + } + } } }; From 148fcf175e22df3fff9cda45e9194bf245bbc0d0 Mon Sep 17 00:00:00 2001 From: Trevor Howell <25328178+ToyWalrus@users.noreply.github.com> Date: Fri, 4 Apr 2025 08:28:28 -0600 Subject: [PATCH 2/3] fix: export SortDescriptor type from S2 (#8030) --- packages/@react-spectrum/s2/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/@react-spectrum/s2/src/index.ts b/packages/@react-spectrum/s2/src/index.ts index 69f8619dcbe..adc682d6ac1 100644 --- a/packages/@react-spectrum/s2/src/index.ts +++ b/packages/@react-spectrum/s2/src/index.ts @@ -148,4 +148,4 @@ export type {ToggleButtonProps} from './ToggleButton'; export type {ToggleButtonGroupProps} from './ToggleButtonGroup'; export type {TooltipProps} from './Tooltip'; export type {TreeViewProps, TreeViewItemProps, TreeViewItemContentProps} from './TreeView'; -export type {FileTriggerProps, TooltipTriggerComponentProps as TooltipTriggerProps} from 'react-aria-components'; +export type {FileTriggerProps, TooltipTriggerComponentProps as TooltipTriggerProps, SortDescriptor} from 'react-aria-components'; From dfd3048ff1e1a2f32fdac91ca5ef835e8d4aac0c Mon Sep 17 00:00:00 2001 From: Ritesh Kumar Date: Thu, 10 Apr 2025 19:41:30 +0530 Subject: [PATCH 3/3] Conflict resolution --- .circleci/config.yml | 494 +- .storybook-s2/docs/typography.js | 2 +- bin/useLayoutEffectRule.js | 4 +- eslint.config.mjs | 8 +- examples/next-app-csp/next.config.js | 2 +- examples/next-app/next.config.js | 2 +- examples/rac-tailwind/.parcelrc | 2 +- examples/rac-tailwind/package.json | 2 +- examples/remix/vite.config.ts | 2 +- examples/rsp-cra-18/package.json | 2 +- .../src/sections/DragAndDropExamples.tsx | 2 +- examples/rsp-next-ts/next.config.mjs | 2 +- examples/rsp-next-ts/package.json | 2 +- lib/yarn-plugin-rsp-duplicates.js | 2 +- package.json | 4 +- packages/@adobe/react-spectrum/package.json | 10 +- packages/@adobe/react-spectrum/src/index.ts | 14 +- .../date/docs/CalendarDate.mdx | 4 +- .../number/src/NumberFormatter.ts | 2 +- packages/@react-aria/actiongroup/README.md | 2 +- packages/@react-aria/actiongroup/package.json | 10 +- .../actiongroup/src/useActionGroup.ts | 6 +- .../actiongroup/src/useActionGroupItem.ts | 4 +- .../@react-aria/aria-modal-polyfill/README.md | 4 +- .../aria-modal-polyfill/package.json | 2 +- packages/@react-aria/autocomplete/README.md | 2 +- .../autocomplete/docs/useAutocomplete.mdx | 4 +- .../docs/useSearchAutocomplete.mdx | 20 +- .../@react-aria/autocomplete/package.json | 18 +- .../autocomplete/src/useAutocomplete.ts | 12 +- .../autocomplete/src/useSearchAutocomplete.ts | 8 +- packages/@react-aria/breadcrumbs/README.md | 2 +- .../breadcrumbs/docs/useBreadcrumbs.mdx | 6 +- packages/@react-aria/breadcrumbs/package.json | 8 +- .../breadcrumbs/src/useBreadcrumbItem.ts | 2 +- .../breadcrumbs/src/useBreadcrumbs.ts | 6 +- packages/@react-aria/button/README.md | 2 +- .../@react-aria/button/docs/useButton.mdx | 6 +- .../button/docs/useToggleButton.mdx | 6 +- .../button/docs/useToggleButtonGroup.mdx | 8 +- packages/@react-aria/button/package.json | 8 +- packages/@react-aria/button/src/useButton.ts | 4 +- .../@react-aria/button/src/useToggleButton.ts | 2 +- .../button/src/useToggleButtonGroup.ts | 2 +- packages/@react-aria/calendar/README.md | 2 +- .../@react-aria/calendar/docs/useCalendar.mdx | 22 +- .../calendar/docs/useRangeCalendar.mdx | 20 +- packages/@react-aria/calendar/package.json | 10 +- .../calendar/src/useCalendarBase.ts | 8 +- .../calendar/src/useCalendarCell.ts | 8 +- .../calendar/src/useCalendarGrid.ts | 4 +- .../calendar/src/useRangeCalendar.ts | 2 +- packages/@react-aria/calendar/src/utils.ts | 6 +- .../@react-aria/calendar/stories/Example.tsx | 2 +- .../calendar/test/useCalendar.test.js | 2 +- packages/@react-aria/checkbox/README.md | 2 +- .../@react-aria/checkbox/docs/useCheckbox.mdx | 20 +- .../checkbox/docs/useCheckboxGroup.mdx | 10 +- packages/@react-aria/checkbox/package.json | 12 +- .../@react-aria/checkbox/src/useCheckbox.ts | 8 +- .../checkbox/src/useCheckboxGroup.ts | 6 +- packages/@react-aria/collections/README.md | 2 +- packages/@react-aria/collections/package.json | 8 +- .../collections/src/CollectionBuilder.tsx | 6 +- .../@react-aria/collections/src/Document.ts | 10 +- packages/@react-aria/color/README.md | 2 +- .../@react-aria/color/docs/useColorArea.mdx | 18 +- .../@react-aria/color/docs/useColorField.mdx | 6 +- .../@react-aria/color/docs/useColorSlider.mdx | 10 +- .../@react-aria/color/docs/useColorSwatch.mdx | 6 +- .../@react-aria/color/docs/useColorWheel.mdx | 8 +- packages/@react-aria/color/package.json | 18 +- .../@react-aria/color/src/useColorArea.ts | 10 +- .../color/src/useColorChannelField.ts | 4 +- .../@react-aria/color/src/useColorField.ts | 8 +- .../@react-aria/color/src/useColorSlider.ts | 8 +- .../@react-aria/color/src/useColorSwatch.ts | 6 +- .../@react-aria/color/src/useColorWheel.ts | 8 +- packages/@react-aria/combobox/README.md | 2 +- .../@react-aria/combobox/docs/useComboBox.mdx | 24 +- packages/@react-aria/combobox/package.json | 20 +- .../@react-aria/combobox/src/useComboBox.ts | 20 +- .../@react-aria/combobox/stories/example.tsx | 12 +- packages/@react-aria/datepicker/README.md | 2 +- .../datepicker/docs/useDateField.mdx | 14 +- .../datepicker/docs/useDatePicker.mdx | 28 +- .../datepicker/docs/useDateRangePicker.mdx | 26 +- .../datepicker/docs/useTimeField.mdx | 10 +- packages/@react-aria/datepicker/package.json | 16 +- .../datepicker/src/useDateField.ts | 14 +- .../datepicker/src/useDatePicker.ts | 12 +- .../datepicker/src/useDatePickerGroup.ts | 8 +- .../datepicker/src/useDateRangePicker.ts | 12 +- .../datepicker/src/useDateSegment.ts | 6 +- .../datepicker/src/useDisplayNames.ts | 4 +- packages/@react-aria/dialog/README.md | 2 +- .../@react-aria/dialog/docs/useDialog.mdx | 16 +- packages/@react-aria/dialog/package.json | 8 +- packages/@react-aria/dialog/src/useDialog.ts | 6 +- packages/@react-aria/disclosure/README.md | 2 +- .../disclosure/docs/useDisclosure.mdx | 16 +- packages/@react-aria/disclosure/package.json | 6 +- .../disclosure/src/useDisclosure.ts | 4 +- packages/@react-aria/dnd/README.md | 2 +- .../@react-aria/dnd/docs/useClipboard.mdx | 16 +- packages/@react-aria/dnd/docs/useDrag.mdx | 16 +- .../dnd/docs/useDraggableCollection.mdx | 26 +- packages/@react-aria/dnd/docs/useDrop.mdx | 18 +- .../dnd/docs/useDroppableCollection.mdx | 32 +- packages/@react-aria/dnd/package.json | 12 +- packages/@react-aria/dnd/src/DragManager.ts | 6 +- packages/@react-aria/dnd/src/useAutoScroll.ts | 2 +- packages/@react-aria/dnd/src/useClipboard.ts | 4 +- packages/@react-aria/dnd/src/useDrag.ts | 6 +- .../@react-aria/dnd/src/useDraggableItem.ts | 6 +- packages/@react-aria/dnd/src/useDrop.ts | 2 +- .../@react-aria/dnd/src/useDropIndicator.ts | 6 +- .../dnd/src/useDroppableCollection.ts | 6 +- .../@react-aria/dnd/src/useVirtualDrop.ts | 6 +- packages/@react-aria/dnd/src/utils.ts | 2 +- .../dnd/stories/DraggableCollection.tsx | 8 +- .../dnd/stories/DraggableListBox.tsx | 8 +- .../@react-aria/dnd/stories/DroppableGrid.tsx | 12 +- .../dnd/stories/DroppableListBox.tsx | 12 +- .../@react-aria/dnd/stories/Reorderable.tsx | 14 +- .../dnd/stories/VirtualizedListBox.tsx | 12 +- .../@react-aria/dnd/stories/dnd.stories.tsx | 10 +- packages/@react-aria/dnd/test/dnd.test.js | 4 +- packages/@react-aria/dnd/test/examples.js | 4 +- packages/@react-aria/example-theme/README.md | 2 +- .../@react-aria/example-theme/package.json | 2 +- packages/@react-aria/focus/README.md | 2 +- packages/@react-aria/focus/docs/FocusRing.mdx | 6 +- .../@react-aria/focus/docs/FocusScope.mdx | 8 +- .../@react-aria/focus/docs/useFocusRing.mdx | 6 +- packages/@react-aria/focus/package.json | 6 +- packages/@react-aria/focus/src/FocusRing.tsx | 2 +- packages/@react-aria/focus/src/FocusScope.tsx | 4 +- packages/@react-aria/focus/src/index.ts | 6 +- .../@react-aria/focus/src/isElementVisible.ts | 2 +- .../@react-aria/focus/src/useFocusRing.ts | 2 +- .../focus/src/useHasTabbableChild.ts | 2 +- .../@react-aria/focus/src/virtualFocus.ts | 2 +- .../@react-aria/focus/test/FocusScope.test.js | 2 +- packages/@react-aria/form/README.md | 2 +- packages/@react-aria/form/package.json | 6 +- .../@react-aria/form/src/useFormValidation.ts | 4 +- packages/@react-aria/grid/README.md | 2 +- packages/@react-aria/grid/package.json | 14 +- .../grid/src/GridKeyboardDelegate.ts | 2 +- packages/@react-aria/grid/src/useGrid.ts | 25 +- packages/@react-aria/grid/src/useGridCell.ts | 10 +- packages/@react-aria/grid/src/useGridRow.ts | 4 +- .../grid/src/useGridSelectionAnnouncement.ts | 8 +- .../grid/src/useGridSelectionCheckbox.ts | 6 +- .../src/useHighlightSelectionDescription.ts | 8 +- packages/@react-aria/grid/stories/example.tsx | 4 +- packages/@react-aria/gridlist/README.md | 2 +- .../@react-aria/gridlist/docs/useGridList.mdx | 22 +- packages/@react-aria/gridlist/package.json | 14 +- packages/@react-aria/gridlist/src/index.ts | 2 +- .../@react-aria/gridlist/src/useGridList.ts | 25 +- .../gridlist/src/useGridListItem.ts | 12 +- .../src/useGridListSelectionCheckbox.ts | 2 +- packages/@react-aria/i18n/README.md | 2 +- .../@react-aria/i18n/docs/I18nProvider.mdx | 6 +- .../i18n/docs/internationalization.mdx | 24 +- .../@react-aria/i18n/docs/useCollator.mdx | 6 +- .../i18n/docs/useDateFormatter.mdx | 6 +- packages/@react-aria/i18n/docs/useFilter.mdx | 6 +- packages/@react-aria/i18n/docs/useLocale.mdx | 6 +- .../i18n/docs/useNumberFormatter.mdx | 6 +- packages/@react-aria/i18n/package.json | 6 +- .../@react-aria/i18n/src/useDateFormatter.ts | 2 +- .../@react-aria/i18n/src/useDefaultLocale.ts | 2 +- packages/@react-aria/i18n/test/server.test.js | 6 +- packages/@react-aria/interactions/README.md | 2 +- .../interactions/docs/useFocus.mdx | 6 +- .../interactions/docs/useFocusVisible.mdx | 6 +- .../interactions/docs/useFocusWithin.mdx | 6 +- .../interactions/docs/useHover.mdx | 6 +- .../interactions/docs/useKeyboard.mdx | 6 +- .../interactions/docs/useLongPress.mdx | 8 +- .../@react-aria/interactions/docs/useMove.mdx | 6 +- .../interactions/docs/usePress.mdx | 6 +- .../@react-aria/interactions/package.json | 6 +- .../interactions/src/PressResponder.tsx | 2 +- .../interactions/src/Pressable.tsx | 2 +- .../interactions/src/focusSafely.ts | 2 +- .../interactions/src/textSelection.ts | 2 +- .../@react-aria/interactions/src/useFocus.ts | 2 +- .../interactions/src/useFocusVisible.ts | 4 +- .../interactions/src/useFocusWithin.ts | 2 +- .../interactions/src/useFocusable.tsx | 4 +- .../@react-aria/interactions/src/useHover.ts | 2 +- .../interactions/src/useInteractOutside.ts | 2 +- .../interactions/src/useLongPress.ts | 2 +- .../@react-aria/interactions/src/useMove.ts | 6 +- .../@react-aria/interactions/src/usePress.ts | 22 +- .../interactions/src/useScrollWheel.ts | 2 +- .../@react-aria/interactions/src/utils.ts | 2 +- .../stories/useFocusRing.stories.tsx | 6 +- .../interactions/stories/useHover.stories.tsx | 4 +- .../interactions/stories/useMove.stories.tsx | 2 +- .../interactions/stories/usePress.stories.tsx | 71 +- .../interactions/test/focusSafely.test.js | 8 +- .../interactions/test/useFocusVisible.test.js | 6 +- .../interactions/test/useLongPress.test.js | 2 +- packages/@react-aria/label/README.md | 2 +- packages/@react-aria/label/docs/useField.mdx | 6 +- packages/@react-aria/label/docs/useLabel.mdx | 6 +- packages/@react-aria/label/package.json | 4 +- packages/@react-aria/label/src/useField.ts | 2 +- packages/@react-aria/label/src/useLabel.ts | 2 +- packages/@react-aria/landmark/README.md | 2 +- .../@react-aria/landmark/docs/useLandmark.mdx | 6 +- packages/@react-aria/landmark/package.json | 4 +- .../@react-aria/landmark/src/useLandmark.ts | 2 +- packages/@react-aria/link/README.md | 2 +- packages/@react-aria/link/docs/useLink.mdx | 6 +- packages/@react-aria/link/package.json | 6 +- packages/@react-aria/link/src/useLink.ts | 4 +- packages/@react-aria/listbox/README.md | 2 +- .../@react-aria/listbox/docs/useListBox.mdx | 16 +- packages/@react-aria/listbox/package.json | 10 +- .../@react-aria/listbox/src/useListBox.ts | 8 +- .../listbox/src/useListBoxSection.ts | 2 +- packages/@react-aria/listbox/src/useOption.ts | 6 +- packages/@react-aria/live-announcer/README.md | 2 +- .../@react-aria/live-announcer/package.json | 2 +- packages/@react-aria/menu/README.md | 2 +- packages/@react-aria/menu/docs/useMenu.mdx | 32 +- packages/@react-aria/menu/package.json | 14 +- packages/@react-aria/menu/src/useMenu.ts | 4 +- packages/@react-aria/menu/src/useMenuItem.ts | 6 +- .../@react-aria/menu/src/useMenuSection.ts | 2 +- .../@react-aria/menu/src/useMenuTrigger.ts | 10 +- .../menu/src/useSafelyMouseToSubmenu.ts | 4 +- .../@react-aria/menu/src/useSubmenuTrigger.ts | 6 +- .../menu/stories/useMenu.stories.tsx | 12 +- packages/@react-aria/meter/README.md | 2 +- packages/@react-aria/meter/docs/useMeter.mdx | 6 +- packages/@react-aria/meter/package.json | 4 +- packages/@react-aria/meter/src/useMeter.ts | 2 +- packages/@react-aria/numberfield/README.md | 2 +- .../numberfield/docs/useNumberField.mdx | 10 +- packages/@react-aria/numberfield/package.json | 12 +- .../numberfield/src/useNumberField.ts | 12 +- .../numberfield/test/useNumberField.test.ts | 2 +- packages/@react-aria/overlays/README.md | 2 +- .../overlays/docs/PortalProvider.mdx | 138 + .../overlays/docs/useModalOverlay.mdx | 18 +- .../@react-aria/overlays/docs/usePopover.mdx | 20 +- packages/@react-aria/overlays/package.json | 13 +- .../overlays/src/DismissButton.tsx | 8 +- packages/@react-aria/overlays/src/Overlay.tsx | 14 +- .../overlays/src/PortalProvider.tsx | 19 +- .../overlays/src/calculatePosition.ts | 2 +- packages/@react-aria/overlays/src/index.ts | 3 +- .../@react-aria/overlays/src/useModal.tsx | 8 +- .../overlays/src/useModalOverlay.ts | 2 +- .../@react-aria/overlays/src/useOverlay.ts | 4 +- .../overlays/src/useOverlayPosition.ts | 4 +- .../overlays/src/useOverlayTrigger.ts | 2 +- .../@react-aria/overlays/src/usePopover.ts | 2 +- .../overlays/src/usePreventScroll.ts | 2 +- .../stories/UseOverlayPosition.stories.tsx | 2 +- .../overlays/test/useModalOverlay.test.js | 2 +- .../overlays/test/useOverlay.test.js | 2 +- packages/@react-aria/progress/README.md | 2 +- .../progress/docs/useProgressBar.mdx | 6 +- packages/@react-aria/progress/package.json | 8 +- .../progress/src/useProgressBar.ts | 6 +- packages/@react-aria/radio/README.md | 2 +- .../@react-aria/radio/docs/useRadioGroup.mdx | 18 +- packages/@react-aria/radio/package.json | 14 +- packages/@react-aria/radio/src/useRadio.ts | 6 +- .../@react-aria/radio/src/useRadioGroup.ts | 10 +- packages/@react-aria/searchfield/README.md | 2 +- .../searchfield/docs/useSearchField.mdx | 10 +- packages/@react-aria/searchfield/package.json | 8 +- .../searchfield/src/useSearchField.ts | 8 +- packages/@react-aria/select/README.md | 2 +- .../@react-aria/select/docs/useSelect.mdx | 20 +- packages/@react-aria/select/package.json | 20 +- .../@react-aria/select/src/HiddenSelect.tsx | 6 +- packages/@react-aria/select/src/useSelect.ts | 14 +- .../@react-aria/select/stories/example.tsx | 10 +- packages/@react-aria/selection/README.md | 2 +- packages/@react-aria/selection/package.json | 10 +- .../selection/src/ListKeyboardDelegate.ts | 2 +- .../selection/src/useSelectableCollection.ts | 16 +- .../selection/src/useSelectableItem.ts | 8 +- .../selection/src/useSelectableList.ts | 2 +- packages/@react-aria/selection/src/utils.ts | 2 +- .../@react-aria/selection/stories/List.tsx | 2 +- packages/@react-aria/separator/README.md | 2 +- .../separator/docs/useSeparator.mdx | 6 +- packages/@react-aria/separator/package.json | 4 +- .../@react-aria/separator/src/useSeparator.ts | 2 +- packages/@react-aria/slider/README.md | 2 +- .../@react-aria/slider/docs/useSlider.mdx | 16 +- packages/@react-aria/slider/package.json | 10 +- packages/@react-aria/slider/src/useSlider.ts | 8 +- .../@react-aria/slider/src/useSliderThumb.ts | 8 +- .../slider/stories/StoryMultiSlider.tsx | 8 +- .../slider/stories/StoryRangeSlider.tsx | 8 +- .../slider/stories/StorySlider.tsx | 8 +- packages/@react-aria/spinbutton/README.md | 2 +- packages/@react-aria/spinbutton/package.json | 8 +- .../spinbutton/src/useSpinButton.ts | 8 +- .../spinbutton/test/useSpinButton.test.js | 4 +- packages/@react-aria/ssr/README.md | 2 +- packages/@react-aria/ssr/docs/SSRProvider.mdx | 6 +- packages/@react-aria/ssr/docs/useIsSSR.mdx | 6 +- packages/@react-aria/ssr/package.json | 2 +- packages/@react-aria/ssr/src/SSRProvider.tsx | 6 +- .../@react-aria/ssr/test/SSRProvider.test.js | 6 +- packages/@react-aria/steplist/README.md | 2 +- .../@react-aria/steplist/docs/useStepList.mdx | 6 +- packages/@react-aria/steplist/package.json | 8 +- .../@react-aria/steplist/src/useStepList.ts | 8 +- .../steplist/src/useStepListItem.ts | 2 +- packages/@react-aria/switch/README.md | 2 +- .../@react-aria/switch/docs/useSwitch.mdx | 18 +- packages/@react-aria/switch/package.json | 4 +- packages/@react-aria/switch/src/useSwitch.ts | 2 +- packages/@react-aria/table/README.md | 2 +- packages/@react-aria/table/docs/useTable.mdx | 38 +- packages/@react-aria/table/intl/es-ES.json | 8 +- packages/@react-aria/table/package.json | 16 +- .../table/src/TableKeyboardDelegate.ts | 2 +- packages/@react-aria/table/src/index.ts | 6 +- packages/@react-aria/table/src/useTable.ts | 10 +- .../@react-aria/table/src/useTableCell.ts | 2 +- .../table/src/useTableColumnHeader.ts | 10 +- .../table/src/useTableColumnResize.ts | 10 +- .../table/src/useTableHeaderRow.ts | 2 +- packages/@react-aria/table/src/useTableRow.ts | 6 +- .../table/src/useTableSelectionCheckbox.ts | 6 +- .../stories/example-backwards-compat.tsx | 8 +- .../table/stories/example-docs.tsx | 8 +- .../table/stories/example-resizing.tsx | 10 +- .../@react-aria/table/stories/example.tsx | 10 +- .../table/test/ariaTableResizing.test.tsx | 2 +- .../@react-aria/table/test/useTable.test.tsx | 4 +- .../test/useTableBackwardCompat.test.tsx | 4 +- packages/@react-aria/tabs/README.md | 2 +- packages/@react-aria/tabs/docs/useTabList.mdx | 10 +- packages/@react-aria/tabs/package.json | 10 +- packages/@react-aria/tabs/src/useTab.ts | 6 +- packages/@react-aria/tabs/src/useTabList.ts | 6 +- packages/@react-aria/tabs/src/useTabPanel.ts | 4 +- packages/@react-aria/tabs/stories/example.tsx | 2 +- packages/@react-aria/tag/README.md | 2 +- packages/@react-aria/tag/docs/useTagGroup.mdx | 14 +- packages/@react-aria/tag/package.json | 14 +- packages/@react-aria/tag/src/useTag.ts | 12 +- packages/@react-aria/tag/src/useTagGroup.ts | 12 +- .../@react-aria/tag/test/useTagGroup.test.js | 2 +- packages/@react-aria/test-utils/README.md | 2 +- packages/@react-aria/test-utils/package.json | 7 +- packages/@react-aria/test-utils/src/events.ts | 2 +- .../@react-aria/test-utils/src/gridlist.ts | 9 +- .../@react-aria/test-utils/src/listbox.ts | 14 +- packages/@react-aria/test-utils/src/menu.ts | 70 +- packages/@react-aria/test-utils/src/tree.ts | 9 +- packages/@react-aria/test-utils/src/types.ts | 12 +- packages/@react-aria/test-utils/src/user.ts | 2 +- packages/@react-aria/textfield/README.md | 2 +- .../textfield/docs/useTextField.mdx | 12 +- packages/@react-aria/textfield/package.json | 10 +- .../textfield/src/useFormattedTextField.ts | 2 +- .../@react-aria/textfield/src/useTextField.ts | 8 +- packages/@react-aria/toast/README.md | 2 +- packages/@react-aria/toast/docs/useToast.mdx | 16 +- packages/@react-aria/toast/package.json | 10 +- packages/@react-aria/toast/src/useToast.ts | 6 +- .../@react-aria/toast/src/useToastRegion.ts | 10 +- .../@react-aria/toast/stories/Example.tsx | 2 +- packages/@react-aria/toggle/README.md | 2 +- packages/@react-aria/toggle/package.json | 6 +- packages/@react-aria/toggle/src/useToggle.ts | 4 +- packages/@react-aria/toolbar/README.md | 2 +- .../@react-aria/toolbar/docs/useToolbar.mdx | 8 +- packages/@react-aria/toolbar/package.json | 8 +- .../@react-aria/toolbar/src/useToolbar.ts | 6 +- packages/@react-aria/tooltip/README.md | 2 +- .../tooltip/docs/useTooltipTrigger.mdx | 8 +- packages/@react-aria/tooltip/package.json | 6 +- .../@react-aria/tooltip/src/useTooltip.ts | 4 +- .../tooltip/src/useTooltipTrigger.ts | 4 +- .../tooltip/test/useTooltip.test.js | 2 +- packages/@react-aria/tree/README.md | 2 +- packages/@react-aria/tree/package.json | 10 +- packages/@react-aria/tree/src/useTree.ts | 2 +- packages/@react-aria/tree/src/useTreeItem.ts | 8 +- packages/@react-aria/utils/README.md | 2 +- .../@react-aria/utils/docs/mergeProps.mdx | 6 +- packages/@react-aria/utils/docs/useId.mdx | 6 +- .../@react-aria/utils/docs/useObjectRef.mdx | 8 +- packages/@react-aria/utils/package.json | 4 +- packages/@react-aria/utils/src/useId.ts | 2 +- .../@react-aria/utils/src/useViewportSize.ts | 2 +- packages/@react-aria/virtualizer/README.md | 2 +- packages/@react-aria/virtualizer/package.json | 8 +- .../virtualizer/src/ScrollView.tsx | 4 +- .../virtualizer/src/Virtualizer.tsx | 2 +- .../virtualizer/src/VirtualizerItem.tsx | 2 +- .../virtualizer/src/useVirtualizerItem.ts | 2 +- .../@react-aria/visually-hidden/README.md | 2 +- .../visually-hidden/docs/VisuallyHidden.mdx | 6 +- .../@react-aria/visually-hidden/package.json | 6 +- .../visually-hidden/src/VisuallyHidden.tsx | 4 +- .../@react-spectrum/accordion/package.json | 2 +- .../accordion/src/Accordion.tsx | 2 +- .../@react-spectrum/actionbar/package.json | 10 +- .../actionbar/src/ActionBar.tsx | 10 +- .../actionbar/src/ActionBarContainer.tsx | 2 +- .../actionbar/stories/ActionBar.stories.tsx | 2 +- .../actionbar/stories/Example.tsx | 2 +- .../actionbar/test/ActionBar.test.js | 6 +- .../@react-spectrum/actiongroup/package.json | 8 +- .../actiongroup/src/ActionGroup.tsx | 8 +- .../autocomplete/docs/SearchAutocomplete.mdx | 2 +- .../@react-spectrum/autocomplete/package.json | 20 +- .../src/MobileSearchAutocomplete.tsx | 20 +- .../autocomplete/src/SearchAutocomplete.tsx | 10 +- .../stories/SearchAutocomplete.stories.tsx | 2 +- .../test/SearchAutocomplete.test.js | 6 +- packages/@react-spectrum/avatar/package.json | 2 +- .../@react-spectrum/avatar/src/Avatar.tsx | 2 +- packages/@react-spectrum/badge/package.json | 2 +- packages/@react-spectrum/badge/src/Badge.tsx | 2 +- .../@react-spectrum/breadcrumbs/package.json | 10 +- .../breadcrumbs/src/BreadcrumbItem.tsx | 10 +- .../breadcrumbs/src/Breadcrumbs.tsx | 4 +- packages/@react-spectrum/button/package.json | 10 +- .../button/src/ActionButton.tsx | 8 +- .../@react-spectrum/button/src/Button.tsx | 10 +- .../button/src/ClearButton.tsx | 8 +- .../button/src/FieldButton.tsx | 8 +- .../button/src/LogicButton.tsx | 8 +- .../button/src/ToggleButton.tsx | 8 +- .../@react-spectrum/buttongroup/package.json | 2 +- .../buttongroup/src/ButtonGroup.tsx | 2 +- .../chromatic/RangeCalendar.stories.tsx | 2 +- .../@react-spectrum/calendar/package.json | 12 +- .../@react-spectrum/calendar/src/Calendar.tsx | 4 +- .../calendar/src/CalendarBase.tsx | 4 +- .../calendar/src/CalendarCell.tsx | 10 +- .../calendar/src/CalendarMonth.tsx | 2 +- .../calendar/src/RangeCalendar.tsx | 4 +- .../calendar/stories/Calendar.stories.tsx | 2 +- .../stories/RangeCalendar.stories.tsx | 2 +- .../calendar/test/Calendar.test.js | 6 +- .../calendar/test/RangeCalendar.test.js | 6 +- .../card/chromatic/CardView.stories.tsx | 2 +- packages/@react-spectrum/card/package.json | 12 +- .../@react-spectrum/card/src/CardBase.tsx | 6 +- .../@react-spectrum/card/src/CardView.tsx | 8 +- .../card/stories/Card.stories.tsx | 2 +- .../card/stories/GalleryCardView.stories.tsx | 2 +- .../card/stories/GridCardView.stories.tsx | 2 +- .../stories/WaterfallCardView.stories.tsx | 2 +- .../card/test/CardView.test.js | 6 +- .../@react-spectrum/checkbox/package.json | 6 +- .../@react-spectrum/checkbox/src/Checkbox.tsx | 6 +- .../checkbox/src/CheckboxGroup.tsx | 2 +- packages/@react-spectrum/color/package.json | 10 +- .../@react-spectrum/color/src/ColorArea.tsx | 6 +- .../@react-spectrum/color/src/ColorEditor.tsx | 2 +- .../@react-spectrum/color/src/ColorField.tsx | 4 +- .../@react-spectrum/color/src/ColorPicker.tsx | 2 +- .../@react-spectrum/color/src/ColorSlider.tsx | 6 +- .../@react-spectrum/color/src/ColorSwatch.tsx | 2 +- .../@react-spectrum/color/src/ColorThumb.tsx | 2 +- .../@react-spectrum/color/src/ColorWheel.tsx | 6 +- .../color/stories/ColorField.stories.tsx | 4 +- .../color/stories/ColorSlider.stories.tsx | 2 +- .../color/test/ColorField.test.js | 2 +- .../combobox/docs/ComboBox.mdx | 6 +- .../@react-spectrum/combobox/package.json | 20 +- .../@react-spectrum/combobox/src/ComboBox.tsx | 10 +- .../combobox/src/MobileComboBox.tsx | 20 +- .../combobox/stories/ComboBox.stories.tsx | 4 +- .../combobox/test/ComboBox.test.js | 14 +- .../contextualhelp/package.json | 4 +- .../contextualhelp/src/ContextualHelp.tsx | 4 +- .../@react-spectrum/datepicker/package.json | 10 +- .../datepicker/src/DateField.tsx | 4 +- .../datepicker/src/DatePicker.tsx | 10 +- .../datepicker/src/DatePickerField.tsx | 4 +- .../datepicker/src/DatePickerSegment.tsx | 2 +- .../datepicker/src/DateRangePicker.tsx | 10 +- .../@react-spectrum/datepicker/src/Input.tsx | 4 +- .../datepicker/src/TimeField.tsx | 4 +- .../@react-spectrum/datepicker/src/utils.tsx | 8 +- .../datepicker/stories/DateField.stories.tsx | 2 +- .../datepicker/stories/DatePicker.stories.tsx | 4 +- .../stories/DateRangePicker.stories.tsx | 4 +- .../chromatic/DialogLanguages.stories.tsx | 2 +- packages/@react-spectrum/dialog/package.json | 10 +- .../dialog/src/AlertDialog.tsx | 4 +- .../@react-spectrum/dialog/src/Dialog.tsx | 6 +- .../dialog/src/DialogTrigger.tsx | 4 +- .../dialog/stories/DialogTrigger.stories.tsx | 2 +- .../dialog/test/Dialog.test.js | 2 +- .../dialog/test/DialogContainer.test.js | 6 +- .../dialog/test/DialogTrigger.test.js | 6 +- packages/@react-spectrum/divider/package.json | 2 +- .../@react-spectrum/divider/src/Divider.tsx | 2 +- packages/@react-spectrum/dnd/package.json | 2 +- packages/@react-spectrum/dnd/src/index.ts | 2 +- .../@react-spectrum/dnd/src/useDragAndDrop.ts | 2 +- .../dropzone/docs/DropZone.mdx | 2 +- .../@react-spectrum/dropzone/package.json | 4 +- .../@react-spectrum/dropzone/src/DropZone.tsx | 4 +- .../dropzone/stories/DropZone.stories.tsx | 4 +- .../dropzone/test/DropZone.test.js | 4 +- .../form/chromatic/FormLanguages.stories.tsx | 2 +- packages/@react-spectrum/form/package.json | 2 +- packages/@react-spectrum/form/src/Form.tsx | 2 +- .../form/stories/Form.stories.tsx | 2 +- packages/@react-spectrum/icon/package.json | 2 +- packages/@react-spectrum/icon/src/Icon.tsx | 2 +- .../@react-spectrum/icon/src/Illustration.tsx | 2 +- packages/@react-spectrum/icon/src/UIIcon.tsx | 2 +- .../illustratedmessage/package.json | 2 +- .../src/IllustratedMessage.tsx | 2 +- packages/@react-spectrum/image/package.json | 2 +- packages/@react-spectrum/image/src/Image.tsx | 2 +- .../@react-spectrum/inlinealert/package.json | 6 +- .../inlinealert/src/InlineAlert.tsx | 6 +- packages/@react-spectrum/label/package.json | 4 +- packages/@react-spectrum/label/src/Field.tsx | 2 +- packages/@react-spectrum/label/src/Label.tsx | 4 +- .../@react-spectrum/label/test/Field.test.js | 2 +- .../@react-spectrum/labeledvalue/package.json | 4 +- .../labeledvalue/src/LabeledValue.tsx | 4 +- packages/@react-spectrum/layout/package.json | 2 +- packages/@react-spectrum/layout/src/Flex.tsx | 2 +- packages/@react-spectrum/layout/src/Grid.tsx | 2 +- packages/@react-spectrum/link/package.json | 8 +- packages/@react-spectrum/link/src/Link.tsx | 8 +- .../@react-spectrum/list/docs/ListView.mdx | 4 +- packages/@react-spectrum/list/package.json | 20 +- .../list/src/InsertionIndicator.tsx | 2 +- .../@react-spectrum/list/src/ListView.tsx | 14 +- .../@react-spectrum/list/src/ListViewItem.tsx | 16 +- .../list/src/RootDropIndicator.tsx | 2 +- .../list/stories/ListView.stories.tsx | 2 +- .../list/stories/ListViewDnD.stories.tsx | 2 +- .../list/stories/ListViewDnDExamples.tsx | 2 +- .../list/stories/ListViewDnDUtil.stories.tsx | 2 +- .../list/stories/ListViewDnDUtilExamples.tsx | 2 +- .../stories/ListViewSelection.stories.tsx | 2 +- .../list/test/ListView.test.js | 28 +- .../list/test/ListViewDnd.test.js | 12 +- .../chromatic/ListBoxLanguages.stories.tsx | 2 +- .../@react-spectrum/listbox/docs/ListBox.mdx | 4 +- packages/@react-spectrum/listbox/package.json | 12 +- .../listbox/src/ListBoxBase.tsx | 10 +- .../listbox/src/ListBoxOption.tsx | 8 +- .../listbox/src/ListBoxSection.tsx | 6 +- .../listbox/stories/ListBox.stories.tsx | 2 +- .../listbox/test/ListBox.test.js | 26 +- .../MenuTriggerLanguages.stories.tsx | 2 +- .../@react-spectrum/menu/docs/MenuTrigger.mdx | 4 +- packages/@react-spectrum/menu/package.json | 14 +- .../@react-spectrum/menu/src/ActionMenu.tsx | 4 +- .../menu/src/ContextualHelpTrigger.tsx | 6 +- packages/@react-spectrum/menu/src/Menu.tsx | 8 +- .../@react-spectrum/menu/src/MenuItem.tsx | 8 +- .../@react-spectrum/menu/src/MenuSection.tsx | 4 +- .../@react-spectrum/menu/src/MenuTrigger.tsx | 4 +- .../menu/src/SubmenuTrigger.tsx | 6 +- .../menu/test/MenuTrigger.test.js | 32 +- packages/@react-spectrum/meter/package.json | 2 +- packages/@react-spectrum/meter/src/Meter.tsx | 2 +- .../chromatic/NumberField.stories.tsx | 2 +- .../@react-spectrum/numberfield/package.json | 12 +- .../numberfield/src/NumberField.tsx | 10 +- .../numberfield/src/StepButton.tsx | 8 +- .../stories/NumberField.stories.tsx | 2 +- .../numberfield/test/NumberField.test.js | 6 +- .../@react-spectrum/overlays/package.json | 6 +- .../@react-spectrum/overlays/src/Modal.tsx | 4 +- .../@react-spectrum/overlays/src/Overlay.tsx | 2 +- .../@react-spectrum/overlays/src/Popover.tsx | 6 +- .../@react-spectrum/overlays/src/Tray.tsx | 4 +- .../@react-spectrum/picker/docs/Picker.mdx | 4 +- packages/@react-spectrum/picker/package.json | 8 +- .../@react-spectrum/picker/src/Picker.tsx | 8 +- .../picker/test/Picker.test.js | 6 +- .../picker/test/TempUtilTest.test.js | 2 +- .../@react-spectrum/progress/package.json | 4 +- .../progress/src/ProgressBar.tsx | 2 +- .../progress/src/ProgressBarBase.tsx | 2 +- .../progress/src/ProgressCircle.tsx | 4 +- .../@react-spectrum/provider/package.json | 6 +- .../@react-spectrum/provider/src/Provider.tsx | 6 +- .../provider/test/Provider.test.tsx | 2 +- packages/@react-spectrum/radio/package.json | 6 +- packages/@react-spectrum/radio/src/Radio.tsx | 6 +- .../@react-spectrum/radio/src/RadioGroup.tsx | 2 +- .../s2/chromatic/DropZone.stories.tsx | 2 +- packages/@react-spectrum/s2/intl/ar-AE.json | 8 +- packages/@react-spectrum/s2/intl/bg-BG.json | 8 +- packages/@react-spectrum/s2/intl/cs-CZ.json | 10 +- packages/@react-spectrum/s2/intl/da-DK.json | 12 +- packages/@react-spectrum/s2/intl/de-DE.json | 10 +- packages/@react-spectrum/s2/intl/el-GR.json | 8 +- packages/@react-spectrum/s2/intl/es-ES.json | 16 +- packages/@react-spectrum/s2/intl/et-EE.json | 8 +- packages/@react-spectrum/s2/intl/fi-FI.json | 10 +- packages/@react-spectrum/s2/intl/fr-FR.json | 10 +- packages/@react-spectrum/s2/intl/he-IL.json | 10 +- packages/@react-spectrum/s2/intl/hr-HR.json | 12 +- packages/@react-spectrum/s2/intl/hu-HU.json | 8 +- packages/@react-spectrum/s2/intl/it-IT.json | 10 +- packages/@react-spectrum/s2/intl/ja-JP.json | 10 +- packages/@react-spectrum/s2/intl/ko-KR.json | 12 +- packages/@react-spectrum/s2/intl/lt-LT.json | 12 +- packages/@react-spectrum/s2/intl/lv-LV.json | 12 +- packages/@react-spectrum/s2/intl/nb-NO.json | 14 +- packages/@react-spectrum/s2/intl/nl-NL.json | 8 +- packages/@react-spectrum/s2/intl/pl-PL.json | 12 +- packages/@react-spectrum/s2/intl/pt-BR.json | 8 +- packages/@react-spectrum/s2/intl/pt-PT.json | 8 +- packages/@react-spectrum/s2/intl/ro-RO.json | 14 +- packages/@react-spectrum/s2/intl/ru-RU.json | 12 +- packages/@react-spectrum/s2/intl/sk-SK.json | 10 +- packages/@react-spectrum/s2/intl/sl-SI.json | 12 +- packages/@react-spectrum/s2/intl/sr-SP.json | 10 +- packages/@react-spectrum/s2/intl/sv-SE.json | 10 +- packages/@react-spectrum/s2/intl/tr-TR.json | 10 +- packages/@react-spectrum/s2/intl/uk-UA.json | 10 +- packages/@react-spectrum/s2/intl/zh-CN.json | 8 +- packages/@react-spectrum/s2/intl/zh-TW.json | 8 +- packages/@react-spectrum/s2/package.json | 18 +- packages/@react-spectrum/s2/src/ActionBar.tsx | 8 +- .../@react-spectrum/s2/src/ActionButton.tsx | 1 + .../@react-spectrum/s2/src/ActionMenu.tsx | 4 +- .../@react-spectrum/s2/src/AlertDialog.tsx | 4 +- packages/@react-spectrum/s2/src/Avatar.tsx | 2 +- .../@react-spectrum/s2/src/AvatarGroup.tsx | 4 +- packages/@react-spectrum/s2/src/Badge.tsx | 2 +- .../@react-spectrum/s2/src/Breadcrumbs.tsx | 6 +- packages/@react-spectrum/s2/src/Button.tsx | 2 +- .../@react-spectrum/s2/src/ButtonGroup.tsx | 2 +- packages/@react-spectrum/s2/src/Card.tsx | 2 +- packages/@react-spectrum/s2/src/CardView.tsx | 2 +- .../@react-spectrum/s2/src/CloseButton.tsx | 2 +- .../@react-spectrum/s2/src/ColorHandle.tsx | 2 +- packages/@react-spectrum/s2/src/ComboBox.tsx | 4 +- packages/@react-spectrum/s2/src/Content.tsx | 2 +- .../@react-spectrum/s2/src/ContextualHelp.tsx | 4 +- .../@react-spectrum/s2/src/DialogTrigger.tsx | 2 +- .../@react-spectrum/s2/src/Disclosure.tsx | 44 +- packages/@react-spectrum/s2/src/Divider.tsx | 2 + packages/@react-spectrum/s2/src/DropZone.tsx | 2 +- packages/@react-spectrum/s2/src/Field.tsx | 4 +- .../s2/src/IllustratedMessage.tsx | 2 +- packages/@react-spectrum/s2/src/Image.tsx | 2 +- .../@react-spectrum/s2/src/InlineAlert.tsx | 6 +- packages/@react-spectrum/s2/src/Link.tsx | 2 +- packages/@react-spectrum/s2/src/Menu.tsx | 6 +- .../s2/src/NotificationBadge.tsx | 14 +- .../@react-spectrum/s2/src/NumberField.tsx | 4 +- packages/@react-spectrum/s2/src/Picker.tsx | 8 +- .../@react-spectrum/s2/src/ProgressBar.tsx | 2 +- .../@react-spectrum/s2/src/RangeSlider.tsx | 2 +- .../s2/src/SegmentedControl.tsx | 2 +- packages/@react-spectrum/s2/src/Skeleton.tsx | 2 +- .../s2/src/SkeletonCollection.tsx | 2 +- packages/@react-spectrum/s2/src/Slider.tsx | 4 +- .../@react-spectrum/s2/src/StatusLight.tsx | 2 +- packages/@react-spectrum/s2/src/TableView.tsx | 6 +- packages/@react-spectrum/s2/src/Tabs.tsx | 8 +- .../@react-spectrum/s2/src/TabsPicker.tsx | 2 +- packages/@react-spectrum/s2/src/TagGroup.tsx | 6 +- packages/@react-spectrum/s2/src/TextField.tsx | 2 +- packages/@react-spectrum/s2/src/TreeView.tsx | 4 +- packages/@react-spectrum/s2/src/index.ts | 3 +- .../s2/src/useSpectrumContextProps.ts | 4 +- .../s2/stories/Accordion.stories.tsx | 2 +- .../s2/stories/ActionButton.stories.tsx | 2 +- .../s2/stories/Breadcrumbs.stories.tsx | 2 +- .../s2/stories/DropZone.stories.tsx | 2 +- .../@react-spectrum/searchfield/package.json | 2 +- .../searchfield/src/SearchField.tsx | 2 +- .../@react-spectrum/searchwithin/package.json | 8 +- .../searchwithin/src/SearchWithin.tsx | 8 +- packages/@react-spectrum/slider/package.json | 12 +- .../slider/src/RangeSlider.tsx | 2 +- .../@react-spectrum/slider/src/Slider.tsx | 4 +- .../@react-spectrum/slider/src/SliderBase.tsx | 4 +- .../slider/src/SliderThumb.tsx | 10 +- .../@react-spectrum/statuslight/package.json | 2 +- .../statuslight/src/StatusLight.tsx | 2 +- .../@react-spectrum/steplist/package.json | 12 +- .../@react-spectrum/steplist/src/StepList.tsx | 2 +- .../steplist/src/StepListItem.tsx | 12 +- .../@react-spectrum/story-utils/package.json | 2 +- .../story-utils/src/GeneratePowerset.tsx | 2 +- packages/@react-spectrum/switch/package.json | 6 +- .../@react-spectrum/switch/src/Switch.tsx | 6 +- .../switch/stories/Switch.stories.tsx | 2 +- .../@react-spectrum/table/docs/TableView.mdx | 4 +- .../@react-spectrum/table/intl/es-ES.json | 4 +- packages/@react-spectrum/table/package.json | 22 +- .../table/src/InsertionIndicator.tsx | 2 +- .../@react-spectrum/table/src/Resizer.tsx | 14 +- .../table/src/RootDropIndicator.tsx | 2 +- .../table/src/TableViewBase.tsx | 21 +- .../table/stories/Table.stories.tsx | 2 +- .../table/stories/TableDnDExamples.tsx | 2 +- .../table/stories/TreeGridTable.stories.tsx | 28 +- .../@react-spectrum/table/test/Table.test.js | 5035 +--------------- .../table/test/TableDnd.test.js | 20 +- .../table/test/TableNestedRows.test.js | 6 +- .../table/test/TableSizing.test.tsx | 12 +- .../@react-spectrum/table/test/TableTests.js | 5070 +++++++++++++++++ ...eUtils.test.js => TestTableUtils.test.tsx} | 64 +- .../table/test/TreeGridTable.test.tsx | 83 +- packages/@react-spectrum/tabs/docs/Tabs.mdx | 6 +- packages/@react-spectrum/tabs/package.json | 10 +- packages/@react-spectrum/tabs/src/Tabs.tsx | 10 +- .../tabs/stories/Tabs.stories.tsx | 2 +- .../@react-spectrum/tabs/test/Tabs.test.js | 2 +- packages/@react-spectrum/tag/package.json | 12 +- packages/@react-spectrum/tag/src/Tag.tsx | 8 +- packages/@react-spectrum/tag/src/TagGroup.tsx | 10 +- .../@react-spectrum/tag/test/TagGroup.test.js | 2 +- .../@react-spectrum/test-utils/package.json | 7 +- .../@react-spectrum/test-utils/src/index.ts | 2 +- packages/@react-spectrum/text/package.json | 2 +- packages/@react-spectrum/text/src/Heading.tsx | 2 +- .../@react-spectrum/text/src/Keyboard.tsx | 2 +- packages/@react-spectrum/text/src/Text.tsx | 2 +- .../@react-spectrum/textfield/package.json | 8 +- .../textfield/src/TextArea.tsx | 4 +- .../textfield/src/TextField.tsx | 2 +- .../textfield/src/TextFieldBase.tsx | 6 +- packages/@react-spectrum/toast/package.json | 10 +- packages/@react-spectrum/toast/src/Toast.tsx | 8 +- .../toast/src/ToastContainer.tsx | 4 +- .../@react-spectrum/toast/src/Toaster.tsx | 10 +- .../toast/stories/Toast.stories.tsx | 8 +- packages/@react-spectrum/tooltip/package.json | 8 +- .../@react-spectrum/tooltip/src/Tooltip.tsx | 4 +- .../tooltip/src/TooltipTrigger.tsx | 8 +- .../tooltip/test/TooltipTrigger.test.js | 14 +- .../@react-spectrum/tree/docs/TreeView.mdx | 4 +- packages/@react-spectrum/tree/package.json | 8 +- .../@react-spectrum/tree/src/TreeView.tsx | 8 +- .../tree/test/TreeView.test.tsx | 23 +- packages/@react-spectrum/utils/package.json | 6 +- .../utils/src/BreakpointProvider.tsx | 2 +- packages/@react-spectrum/utils/src/Slots.tsx | 2 +- packages/@react-spectrum/utils/src/index.ts | 4 +- .../@react-spectrum/utils/src/styleProps.ts | 2 +- .../@react-spectrum/utils/src/useHasChild.ts | 2 +- .../utils/src/useIsMobileDevice.ts | 2 +- .../utils/src/useMediaQuery.ts | 2 +- .../@react-spectrum/utils/test/Slots.test.js | 4 +- packages/@react-spectrum/view/package.json | 2 +- packages/@react-spectrum/view/src/Content.tsx | 2 +- packages/@react-spectrum/view/src/Footer.tsx | 2 +- packages/@react-spectrum/view/src/Header.tsx | 2 +- packages/@react-spectrum/view/src/View.tsx | 2 +- packages/@react-spectrum/well/package.json | 2 +- packages/@react-spectrum/well/src/Well.tsx | 2 +- .../collections/docs/Collection.mdx | 4 +- .../combobox/test/useComboBoxState.test.js | 2 +- .../@react-stately/layout/src/GridLayout.ts | 4 +- .../selection/docs/SelectionManager.mdx | 2 +- .../test/useTooltipTriggerState.test.js | 2 +- .../tree/stories/useTreeState.stories.tsx | 4 +- .../@react-stately/virtualizer/package.json | 2 +- .../virtualizer/src/useVirtualizerState.ts | 2 +- packages/@react-types/list/package.json | 2 +- packages/@react-types/list/src/index.d.ts | 2 +- packages/@react-types/listbox/src/index.d.ts | 12 +- packages/@react-types/menu/src/index.d.ts | 12 +- packages/@react-types/table/src/index.d.ts | 11 +- .../illustrations/package.json | 2 +- .../codemods/src/use-monopackages/README.md | 2 +- .../src/use-monopackages/src/codemod.ts | 2 +- packages/dev/docs/package.json | 2 +- .../dev/docs/pages/blog/SubmenuAnimation.tsx | 2 +- .../docs/pages/blog/building-a-combobox.mdx | 8 +- .../dev/docs/pages/blog/drag-and-drop.mdx | 8 +- .../pages/blog/introducing-react-spectrum.mdx | 6 +- packages/dev/docs/pages/index.mdx | 2 +- packages/dev/docs/pages/react-aria/forms.mdx | 2 +- .../docs/pages/react-aria/getting-started.mdx | 2 +- .../dev/docs/pages/react-aria/home/A11y.tsx | 2 +- .../docs/pages/react-aria/home/ExampleApp.tsx | 2 +- packages/dev/docs/pages/react-aria/hooks.mdx | 10 +- packages/dev/docs/pages/react-aria/index.mdx | 2 +- packages/dev/docs/pages/react-aria/ssr.mdx | 18 +- .../dev/docs/pages/react-aria/testing.mdx | 24 +- .../dev/docs/pages/react-spectrum/ssr.mdx | 12 +- .../dev/docs/pages/react-spectrum/testing.mdx | 4 +- .../dev/docs/pages/releases/2020-07-23.mdx | 56 +- .../dev/docs/pages/releases/2020-08-18.mdx | 48 +- .../dev/docs/pages/releases/2020-09-02.mdx | 26 +- .../dev/docs/pages/releases/2020-10-01.mdx | 66 +- .../dev/docs/pages/releases/2020-10-29.mdx | 24 +- .../dev/docs/pages/releases/2020-11-30.mdx | 32 +- .../dev/docs/pages/releases/2020-12-22.mdx | 8 +- .../dev/docs/pages/releases/2021-02-17.mdx | 36 +- .../dev/docs/pages/releases/2021-03-24.mdx | 44 +- .../dev/docs/pages/releases/2021-05-05.mdx | 82 +- .../dev/docs/pages/releases/2021-06-15.mdx | 26 +- .../dev/docs/pages/releases/2021-07-12.mdx | 14 +- .../dev/docs/pages/releases/2021-08-04.mdx | 80 +- .../dev/docs/pages/releases/2021-09-13.mdx | 34 +- .../dev/docs/pages/releases/2021-11-24.mdx | 52 +- .../dev/docs/pages/releases/2021-12-16.mdx | 16 +- .../dev/docs/pages/releases/2022-02-15.mdx | 88 +- .../dev/docs/pages/releases/2022-03-07.mdx | 82 +- .../dev/docs/pages/releases/2022-03-21.mdx | 76 +- .../dev/docs/pages/releases/2022-05-03.mdx | 84 +- .../dev/docs/pages/releases/2022-05-27.mdx | 90 +- .../dev/docs/pages/releases/2022-06-15.mdx | 86 +- .../dev/docs/pages/releases/2022-07-09.mdx | 94 +- .../dev/docs/pages/releases/2022-08-26.mdx | 90 +- .../dev/docs/pages/releases/2022-10-04.mdx | 88 +- .../dev/docs/pages/releases/2022-11-15.mdx | 90 +- .../dev/docs/pages/releases/2022-12-16.mdx | 92 +- .../dev/docs/pages/releases/2023-02-23.mdx | 94 +- .../dev/docs/pages/releases/2023-04-05.mdx | 94 +- .../dev/docs/pages/releases/2023-05-24.mdx | 92 +- .../dev/docs/pages/releases/2023-06-27.mdx | 94 +- .../dev/docs/pages/releases/2023-08-09.mdx | 94 +- .../dev/docs/pages/releases/2023-09-07.mdx | 92 +- .../dev/docs/pages/releases/2023-10-02.mdx | 90 +- .../dev/docs/pages/releases/2023-11-8.mdx | 98 +- .../dev/docs/pages/releases/2023-12-20.mdx | 102 +- .../dev/docs/pages/releases/2024-02-13.mdx | 94 +- .../dev/docs/pages/releases/2024-05-01.mdx | 112 +- .../dev/docs/pages/releases/2024-07-22.mdx | 102 +- .../dev/docs/pages/releases/2024-09-30.mdx | 116 +- .../dev/docs/pages/releases/2024-11-20.mdx | 116 +- .../dev/docs/pages/releases/2025-01-15.mdx | 108 +- .../dev/docs/pages/releases/2025-03-05.mdx | 100 +- packages/dev/docs/src/DocSearch.js | 2 +- packages/dev/docs/src/ExampleCard.js | 2 +- packages/dev/docs/src/HeaderInfo.js | 2 +- packages/dev/docs/src/Layout.js | 4 +- packages/dev/docs/src/docs.js | 6 +- .../dev/optimize-locales-plugin/README.md | 14 +- .../dev/optimize-locales-plugin/package.json | 2 +- .../README.md | 4 +- .../package.json | 6 +- .../parcel-transformer-s2-icon/package.json | 2 +- packages/dev/test-utils/package.json | 4 +- packages/dev/test-utils/src/ssrWorker.js | 2 +- packages/dev/test-utils/src/testSSR.js | 2 +- .../docs/Autocomplete.mdx | 2 +- .../docs/Breadcrumbs.mdx | 4 +- .../react-aria-components/docs/Button.mdx | 6 +- .../react-aria-components/docs/Calendar.mdx | 20 +- .../react-aria-components/docs/Checkbox.mdx | 8 +- .../docs/CheckboxGroup.mdx | 6 +- .../react-aria-components/docs/ColorArea.mdx | 4 +- .../react-aria-components/docs/ColorField.mdx | 4 +- .../docs/ColorPicker.mdx | 2 +- .../docs/ColorSlider.mdx | 4 +- .../docs/ColorSwatchPicker.mdx | 2 +- .../react-aria-components/docs/ColorWheel.mdx | 4 +- .../react-aria-components/docs/ComboBox.mdx | 10 +- .../react-aria-components/docs/DateField.mdx | 14 +- .../react-aria-components/docs/DatePicker.mdx | 14 +- .../docs/DateRangePicker.mdx | 12 +- .../react-aria-components/docs/Dialog.mdx | 4 +- .../react-aria-components/docs/Disclosure.mdx | 2 +- .../docs/DisclosureGroup.mdx | 2 +- .../react-aria-components/docs/DropZone.mdx | 10 +- .../docs/FileTrigger.mdx | 4 +- packages/react-aria-components/docs/Form.mdx | 4 +- .../react-aria-components/docs/GridList.mdx | 10 +- packages/react-aria-components/docs/Group.mdx | 4 +- packages/react-aria-components/docs/Link.mdx | 4 +- .../react-aria-components/docs/ListBox.mdx | 8 +- packages/react-aria-components/docs/Menu.mdx | 10 +- packages/react-aria-components/docs/Meter.mdx | 4 +- packages/react-aria-components/docs/Modal.mdx | 4 +- .../docs/NumberField.mdx | 4 +- .../react-aria-components/docs/Popover.mdx | 4 +- .../docs/ProgressBar.mdx | 4 +- .../react-aria-components/docs/RadioGroup.mdx | 6 +- .../docs/RangeCalendar.mdx | 14 +- .../docs/SearchField.mdx | 4 +- .../react-aria-components/docs/Select.mdx | 8 +- .../react-aria-components/docs/Slider.mdx | 6 +- .../react-aria-components/docs/Switch.mdx | 6 +- packages/react-aria-components/docs/Table.mdx | 10 +- packages/react-aria-components/docs/Tabs.mdx | 10 +- .../react-aria-components/docs/TagGroup.mdx | 4 +- .../react-aria-components/docs/TextField.mdx | 6 +- .../react-aria-components/docs/TimeField.mdx | 10 +- packages/react-aria-components/docs/Toast.mdx | 4 +- .../docs/ToggleButton.mdx | 6 +- .../docs/ToggleButtonGroup.mdx | 4 +- .../react-aria-components/docs/Toolbar.mdx | 4 +- .../react-aria-components/docs/Tooltip.mdx | 4 +- packages/react-aria-components/docs/Tree.mdx | 10 +- .../docs/Virtualizer.mdx | 4 +- .../react-aria-components/docs/advanced.mdx | 6 +- packages/react-aria-components/package.json | 21 +- .../src/Autocomplete.tsx | 4 +- .../react-aria-components/src/Breadcrumbs.tsx | 6 +- packages/react-aria-components/src/Button.tsx | 8 +- .../react-aria-components/src/Calendar.tsx | 4 +- .../react-aria-components/src/Checkbox.tsx | 4 +- .../react-aria-components/src/Collection.tsx | 2 +- .../react-aria-components/src/ColorArea.tsx | 4 +- .../react-aria-components/src/ColorField.tsx | 4 +- .../react-aria-components/src/ColorPicker.tsx | 2 +- .../react-aria-components/src/ColorSlider.tsx | 4 +- .../react-aria-components/src/ColorSwatch.tsx | 2 +- .../src/ColorSwatchPicker.tsx | 4 +- .../react-aria-components/src/ColorThumb.tsx | 4 +- .../react-aria-components/src/ColorWheel.tsx | 12 +- .../react-aria-components/src/ComboBox.tsx | 6 +- .../react-aria-components/src/DateField.tsx | 4 +- .../react-aria-components/src/DatePicker.tsx | 4 +- packages/react-aria-components/src/Dialog.tsx | 6 +- .../react-aria-components/src/Disclosure.tsx | 4 +- .../react-aria-components/src/DragAndDrop.tsx | 2 +- .../react-aria-components/src/DropZone.tsx | 4 +- .../react-aria-components/src/FieldError.tsx | 2 +- .../react-aria-components/src/FileTrigger.tsx | 4 +- .../react-aria-components/src/GridList.tsx | 6 +- packages/react-aria-components/src/Group.tsx | 2 +- packages/react-aria-components/src/Header.tsx | 2 +- packages/react-aria-components/src/Input.tsx | 4 +- packages/react-aria-components/src/Label.tsx | 2 +- packages/react-aria-components/src/Link.tsx | 2 +- .../react-aria-components/src/ListBox.tsx | 6 +- packages/react-aria-components/src/Menu.tsx | 8 +- packages/react-aria-components/src/Meter.tsx | 2 +- packages/react-aria-components/src/Modal.tsx | 5 +- .../react-aria-components/src/NumberField.tsx | 4 +- .../src/OverlayArrow.tsx | 4 +- .../react-aria-components/src/Popover.tsx | 11 +- .../react-aria-components/src/ProgressBar.tsx | 2 +- .../react-aria-components/src/RadioGroup.tsx | 4 +- .../react-aria-components/src/SearchField.tsx | 6 +- packages/react-aria-components/src/Select.tsx | 6 +- .../react-aria-components/src/Separator.tsx | 6 +- packages/react-aria-components/src/Slider.tsx | 4 +- packages/react-aria-components/src/Switch.tsx | 4 +- packages/react-aria-components/src/Table.tsx | 6 +- packages/react-aria-components/src/Tabs.tsx | 6 +- .../react-aria-components/src/TagGroup.tsx | 6 +- .../react-aria-components/src/TextArea.tsx | 2 +- .../react-aria-components/src/TextField.tsx | 6 +- packages/react-aria-components/src/Toast.tsx | 23 +- .../src/ToggleButton.tsx | 2 +- .../src/ToggleButtonGroup.tsx | 2 +- .../react-aria-components/src/Toolbar.tsx | 4 +- .../react-aria-components/src/Tooltip.tsx | 7 +- packages/react-aria-components/src/Tree.tsx | 6 +- .../react-aria-components/src/Virtualizer.tsx | 2 +- packages/react-aria-components/src/index.ts | 8 +- .../src/useDragAndDrop.tsx | 4 +- packages/react-aria-components/src/utils.tsx | 2 +- .../stories/Autocomplete.stories.tsx | 156 +- .../stories/Button.stories.tsx | 2 +- .../stories/Dropzone.stories.tsx | 2 +- .../stories/GridList.stories.tsx | 11 +- .../stories/ListBox.stories.tsx | 11 +- .../stories/Table.stories.tsx | 37 +- .../stories/Tabs.stories.tsx | 2 +- .../stories/Tree.stories.tsx | 3 +- .../stories/combobox-reproductions.css | 2 +- .../test/AriaMenu.test-util.tsx | 7 +- .../test/AriaTree.test-util.tsx | 2 +- .../test/Autocomplete.test.tsx | 82 +- .../test/ComboBox.ssr.test.js | 2 +- .../test/ComboBox.test.js | 2 +- .../react-aria-components/test/Dialog.test.js | 45 +- .../test/DropZone.test.js | 4 +- .../test/GridList.test.js | 19 +- .../test/ListBox.test.js | 65 +- .../react-aria-components/test/Menu.test.tsx | 23 +- .../test/Popover.test.js | 43 +- .../react-aria-components/test/Select.test.js | 2 +- .../react-aria-components/test/Table.test.js | 32 +- .../react-aria-components/test/Tabs.test.js | 2 +- .../react-aria-components/test/Toast.test.js | 21 +- .../test/Toolbar.test.tsx | 2 +- .../test/Tooltip.test.js | 46 +- .../react-aria-components/test/Tree.test.tsx | 18 + packages/react-aria/README.md | 2 +- packages/react-aria/package.json | 82 +- packages/react-aria/src/index.ts | 156 +- plop-templates/@react-aria/README.md.hbs | 2 +- .../docs/use{{ componentName }}.mdx.hbs | 6 +- plop-templates/@react-aria/package.json.hbs | 2 +- .../@react-spectrum/package.json.hbs | 4 +- .../src/{{ componentName }}.tsx.hbs | 4 +- rfcs/2019-v3-architecture.md | 4 +- rfcs/2023-correct-window-and-document.md | 6 +- rfcs/2023-react-aria-components.md | 6 +- rfcs/2023-rsp-testing-utils.md | 4 +- scripts/buildPublishedAPI.js | 2 +- scripts/buildWebsite.js | 4 +- scripts/bumpVersions.js | 2 +- scripts/esm-support/testESM.mjs | 2 +- scripts/extractStarter.mjs | 2 +- scripts/lint-packages.js | 2 +- scripts/migrateIntl.mjs | 2 +- scripts/plopfile.js | 4 +- specs/api/Link.md | 2 +- specs/api/Pagination.md | 2 +- specs/api/Radio.md | 2 +- starters/tailwind/src/AlertDialog.tsx | 2 +- yarn.config.cjs | 12 +- yarn.lock | 1329 +++-- 1025 files changed, 11489 insertions(+), 10827 deletions(-) create mode 100644 packages/@react-aria/overlays/docs/PortalProvider.mdx create mode 100644 packages/@react-spectrum/table/test/TableTests.js rename packages/@react-spectrum/table/test/{TestTableUtils.test.js => TestTableUtils.test.tsx} (75%) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9e182eb8fb8..8ba98699d13 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -24,25 +24,9 @@ executors: CACHE_VERSION: v1 working_directory: ~/react-spectrum - rsp-large: - docker: - - image: cimg/node:18.20.3 - resource_class: large - environment: - CACHE_VERSION: v1 - working_directory: ~/react-spectrum - - rsp-xlarge: - docker: - - image: cimg/node:18.20.3 - resource_class: xlarge - environment: - CACHE_VERSION: v1 - working_directory: ~/react-spectrum - jobs: install: - executor: rsp-large + executor: rsp steps: - checkout @@ -63,85 +47,9 @@ jobs: - ~/react-spectrum key: react-spectrum-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }} - install-16: - executor: rsp-large - steps: - - checkout - - - run: - name: Write npmrc - command: | - if [ $NPM_PASSWORD ]; then - cp .circleci/.npmrc .npmrc - fi - - - run: - name: build - command: | - yarn install --immutable && yarn install-16 - - - save_cache: - paths: - - ~/react-spectrum - key: react-spectrum16-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }} - - install-17: - executor: rsp-large - steps: - - checkout - - - run: - name: Write npmrc - command: | - if [ $NPM_PASSWORD ]; then - cp .circleci/.npmrc .npmrc - fi - - - run: - name: build - command: | - yarn install --immutable && yarn install-17 - - - save_cache: - paths: - - ~/react-spectrum - key: react-spectrum17-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }} - - install-19: - executor: rsp-large - steps: - - checkout - - - run: - name: Write npmrc - command: | - if [ $NPM_PASSWORD ]; then - cp .circleci/.npmrc .npmrc - fi - - - run: - name: build - command: | - yarn install --immutable && yarn install-19 - - - save_cache: - paths: - - ~/react-spectrum - key: react-spectrum-19-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }} - - test-ssr: - executor: rsp-xlarge - steps: - - restore_cache: - key: react-spectrum-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }} - - - run: - name: test ssr - command: yarn test:ssr - test: + executor: rsp parallelism: 3 - executor: rsp-xlarge steps: - restore_cache: key: react-spectrum-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }} @@ -165,113 +73,8 @@ jobs: - store_artifacts: path: ~/junit - test-ssr-16: - executor: rsp-xlarge - steps: - - restore_cache: - key: react-spectrum16-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }} - - - run: - name: test ssr - command: | - yarn test:ssr - - test-ssr-17: - executor: rsp-xlarge - steps: - - restore_cache: - key: react-spectrum17-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }} - - - run: - name: test ssr - command: | - yarn test:ssr - - test-ssr-19: - executor: rsp-xlarge - steps: - - restore_cache: - key: react-spectrum-19-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }} - - - run: - name: test ssr - command: | - yarn test:ssr - - test-16: - parallelism: 3 - executor: rsp-xlarge - steps: - - restore_cache: - key: react-spectrum16-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }} - - - run: mkdir ~/junit - - - run: - name: test - command: | - shopt -s globstar - TESTFILES=$(circleci tests glob "packages/**/*.test.[tj]{s,sx}" | circleci tests split --split-by=timings) - JEST_JUNIT_OUTPUT_NAME="junit-16.xml" yarn test ${TESTFILES} - - - run: - command: cp junit-16.xml ~/junit/ - when: always - - store_test_results: - path: ~/junit - - store_artifacts: - path: ~/junit - - test-17: - parallelism: 3 - executor: rsp-xlarge - steps: - - restore_cache: - key: react-spectrum17-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }} - - - run: mkdir ~/junit - - - run: - name: test - command: | - shopt -s globstar - TESTFILES=$(circleci tests glob "packages/**/*.test.[tj]{s,sx}" | circleci tests split --split-by=timings) - JEST_JUNIT_OUTPUT_NAME="junit-17.xml" yarn test ${TESTFILES} - - - run: - command: cp junit-17.xml ~/junit/ - when: always - - store_test_results: - path: ~/junit - - store_artifacts: - path: ~/junit - - test-19: - parallelism: 3 - executor: rsp-xlarge - steps: - - restore_cache: - key: react-spectrum-19-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }} - - - run: mkdir ~/junit - - - run: - name: test - command: | - shopt -s globstar - TESTFILES=$(circleci tests glob "packages/**/*.test.[tj]{s,sx}" | circleci tests split --split-by=timings) - JEST_JUNIT_OUTPUT_NAME="junit-19.xml" yarn test ${TESTFILES} - - - run: - command: cp junit-19.xml ~/junit/ - when: always - - store_test_results: - path: ~/junit - - store_artifacts: - path: ~/junit - test-esm: - executor: rsp-xlarge + executor: rsp steps: - restore_cache: key: react-spectrum-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }} @@ -283,7 +86,7 @@ jobs: node --loader ./scripts/esm-support/loader.mjs ./scripts/esm-support/testESM.mjs lint: - executor: rsp-xlarge + executor: rsp steps: - restore_cache: key: react-spectrum-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }} @@ -295,7 +98,7 @@ jobs: yarn lint ts-build-branch: - executor: rsp-large + executor: rsp steps: - restore_cache: key: react-spectrum-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }} @@ -310,7 +113,7 @@ jobs: - 'branch-api/' ts-build-fork-point: - executor: rsp-large + executor: rsp steps: - restore_cache: key: react-spectrum-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }} @@ -326,7 +129,7 @@ jobs: - 'base-api/' ts-diff: - executor: rsp-large + executor: rsp steps: - restore_cache: key: react-spectrum-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }} @@ -346,18 +149,8 @@ jobs: paths: - 'ts-diff.txt' - typecheck-docs: - executor: rsp-large - steps: - - restore_cache: - key: react-spectrum-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }} - - - run: - name: check-examples - command: make check-examples - storybook: - executor: rsp-large + executor: rsp steps: - restore_cache: key: react-spectrum-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }} @@ -371,53 +164,8 @@ jobs: paths: - '*/storybook/' - storybook-16: - executor: rsp-large - steps: - - restore_cache: - key: react-spectrum16-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }} - - - run: - name: build storybook-16 - command: make storybook-16 - - - persist_to_workspace: - root: dist - paths: - - '*/storybook-16/' - - storybook-17: - executor: rsp-large - steps: - - restore_cache: - key: react-spectrum17-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }} - - - run: - name: build storybook-17 - command: make storybook-17 - - - persist_to_workspace: - root: dist - paths: - - '*/storybook-17/' - - storybook-19: - executor: rsp-large - steps: - - restore_cache: - key: react-spectrum-19-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }} - - - run: - name: build storybook-19 - command: make storybook-19 - - - persist_to_workspace: - root: dist - paths: - - '*/storybook-19/' - storybook-s2: - executor: rsp-large + executor: rsp steps: - restore_cache: key: react-spectrum-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }} @@ -431,38 +179,8 @@ jobs: paths: - '*/storybook-s2/' - docs: - executor: rsp-xlarge - steps: - - restore_cache: - key: react-spectrum-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }} - - - run: - name: build docs - command: make website - - - persist_to_workspace: - root: dist - paths: - - '*/docs/' - - docs-production: - executor: rsp-xlarge - steps: - - restore_cache: - key: react-spectrum-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }} - - - run: - name: build docs - command: make website-production - - - persist_to_workspace: - root: dist - paths: - - '*/docs/' - verdaccio: - executor: rsp-xlarge + executor: rsp steps: - restore_cache: key: react-spectrum-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }} @@ -483,30 +201,8 @@ jobs: paths: - storage - v-docs: - executor: rsp-xlarge - steps: - - restore_cache: - key: react-spectrum-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }} - - - attach_workspace: - at: /tmp/verdaccio-workspace - - - run: - name: build docs off verdaccio - command: | - ./scripts/verdaccio-ci.sh - ./scripts/verdaccio-build.sh - environment: - VERDACCIO_STORAGE_PATH: /tmp/verdaccio-workspace/storage - - - persist_to_workspace: - root: verdaccio_dist - paths: - - '*/verdaccio/docs' - v-rsp-cra-18: - executor: rsp-xlarge + executor: rsp steps: - restore_cache: key: react-spectrum-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }} @@ -528,7 +224,7 @@ jobs: - '*/verdaccio/rsp-cra-18' v-webpack-4: - executor: rsp-xlarge + executor: rsp steps: - restore_cache: key: react-spectrum-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }} @@ -550,7 +246,7 @@ jobs: - '*/verdaccio/webpack-4' v-nextjs: - executor: rsp-xlarge + executor: rsp steps: - restore_cache: key: react-spectrum-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }} @@ -572,7 +268,7 @@ jobs: - '*/verdaccio/next' v-rac-tailwind: - executor: rsp-xlarge + executor: rsp steps: - restore_cache: key: react-spectrum-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }} @@ -594,7 +290,7 @@ jobs: - '*/verdaccio/rac-tailwind' v-rac-rsp-tailwind: - executor: rsp-xlarge + executor: rsp steps: - restore_cache: key: react-spectrum-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }} @@ -616,7 +312,7 @@ jobs: - '*/verdaccio/rac-spectrum-tailwind' v-s2-parcel: - executor: rsp-xlarge + executor: rsp steps: - restore_cache: key: react-spectrum-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }} @@ -638,7 +334,7 @@ jobs: - '*/verdaccio/s2-parcel-example' v-s2-webpack: - executor: rsp-xlarge + executor: rsp steps: - restore_cache: key: react-spectrum-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }} @@ -660,7 +356,7 @@ jobs: - '*/verdaccio/s2-webpack-5-example' v-icon-builder: - executor: rsp-xlarge + executor: rsp steps: - restore_cache: key: react-spectrum-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }} @@ -695,63 +391,6 @@ jobs: paths: - '*/verdaccio/publish-stats' - deploy: - docker: - - image: mcr.microsoft.com/azure-cli:2.63.0 - steps: - - attach_workspace: - at: /tmp/dist - - run: - name: Install AzCopy - command: | - wget -O azcopy.tar.gz https://aka.ms/downloadazcopy-v10-linux - tar -xf azcopy.tar.gz - mv ./azcopy_linux_amd64_*/azcopy /usr/local/bin/ - - run: - name: deploy - command: | - if [ $AZURE_STORAGE_SAS_TOKEN ]; then - azcopy copy "/tmp/dist/*" "https://reactspectrum.blob.core.windows.net/reactspectrum${AZURE_STORAGE_SAS_TOKEN}" --recursive - fi - - # Separate deploy workflow for the test docs built w/ verdaccio packages so it doesn't hold up the other deploy workflows - deploy-verdaccio: - docker: - - image: mcr.microsoft.com/azure-cli:2.63.0 - steps: - - attach_workspace: - at: /tmp/verdaccio_dist - - run: - name: Install AzCopy - command: | - wget -O azcopy.tar.gz https://aka.ms/downloadazcopy-v10-linux - tar -xf azcopy.tar.gz - mv ./azcopy_linux_amd64_*/azcopy /usr/local/bin/ - - run: - name: deploy - command: | - if [ $AZURE_STORAGE_SAS_TOKEN ]; then - for dir in /tmp/verdaccio_dist/*/verdaccio; do - azcopy copy "$dir/*" "https://reactspectrum.blob.core.windows.net/reactspectrum/$CIRCLE_SHA1/verdaccio${AZURE_STORAGE_SAS_TOKEN}" --recursive - done - fi - - deploy-production: - docker: - - image: mcr.microsoft.com/azure-cli:2.63.0 - steps: - - attach_workspace: - at: /tmp/dist - - run: - name: Install AzCopy - command: | - wget -O azcopy.tar.gz https://aka.ms/downloadazcopy-v10-linux - tar -xf azcopy.tar.gz - mv ./azcopy_linux_amd64_*/azcopy /usr/local/bin/ - - run: - name: deploy - command: azcopy copy "/tmp/dist/production/docs/*" "https://reactspectrum.blob.core.windows.net/\$web${AZURE_STORAGE_SAS_TOKEN}" --recursive - comment: executor: rsp steps: @@ -771,7 +410,7 @@ jobs: fi publish-nightly: - executor: rsp-xlarge + executor: rsp steps: - restore_cache: key: react-spectrum-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }} @@ -785,38 +424,24 @@ jobs: name: Publish command: make publish-nightly + typecheck-docs: + executor: rsp + steps: + - restore_cache: + key: react-spectrum-{{ .Environment.CACHE_VERSION }}-{{ .Environment.CIRCLE_SHA1 }} + + - run: + name: check-examples + command: make check-examples + workflows: version: 2 commit: jobs: - install - - install-16 - - install-17 - - install-19 - - test-ssr: - requires: - - install - test: requires: - install - - test-ssr-16: - requires: - - install-16 - - test-16: - requires: - - install-16 - - test-ssr-17: - requires: - - install-17 - - test-17: - requires: - - install-17 - - test-19: - requires: - - install-19 - - test-ssr-19: - requires: - - install-19 - test-esm: requires: - install @@ -845,33 +470,12 @@ workflows: - typecheck-docs: requires: - install - - storybook: - requires: - - install - - storybook-16: - requires: - - install-16 - - storybook-17: - requires: - - install-17 - - storybook-19: - requires: - - install-19 - - storybook-s2: - requires: - - install - - docs: - requires: - - install - verdaccio: filters: branches: only: main requires: - install - - v-docs: - requires: - - verdaccio - v-rsp-cra-18: requires: - verdaccio @@ -902,25 +506,19 @@ workflows: - v-webpack-4 - v-nextjs - v-rsp-cra-18 - - deploy: + - comment: + name: comment-pr + filters: + branches: + ignore: main requires: + - ts-diff - lint - - test-ssr - test - - test-ssr-16 - - test-16 - - test-ssr-17 - - test-17 - test-esm - - storybook - - storybook-16 - - storybook-17 - - storybook-19 - - storybook-s2 - - docs - - deploy-verdaccio: + - comment: + name: comment-verdaccio requires: - - v-docs - v-rsp-cra-18 - v-webpack-4 - v-nextjs @@ -930,18 +528,6 @@ workflows: - v-s2-webpack - v-icon-builder - v-publish-stats - - comment: - name: comment-pr - filters: - branches: - ignore: main - requires: - - ts-diff - - deploy - - comment: - name: comment-verdaccio - requires: - - deploy-verdaccio prod-docs: when: @@ -958,12 +544,6 @@ workflows: only: main requires: - install - - deploy-production: - filters: - branches: - only: main - requires: - - docs-production nightly: triggers: diff --git a/.storybook-s2/docs/typography.js b/.storybook-s2/docs/typography.js index ddb37b14e2c..84b709b59db 100644 --- a/.storybook-s2/docs/typography.js +++ b/.storybook-s2/docs/typography.js @@ -1,6 +1,6 @@ import { style } from '../../packages/@react-spectrum/s2/style/spectrum-theme' with {type: 'macro'}; import {Link as S2Link} from '@react-spectrum/s2'; -import {useFocusRing, useHover} from 'react-aria'; +import {useFocusRing, useHover} from '@react-aria-nutrient/react-aria'; function AnchorLink({id, isHovered}) { let { isFocusVisible, focusProps } = useFocusRing({within: true}); diff --git a/bin/useLayoutEffectRule.js b/bin/useLayoutEffectRule.js index fe2b47b04fe..c48a23183f6 100644 --- a/bin/useLayoutEffectRule.js +++ b/bin/useLayoutEffectRule.js @@ -15,7 +15,7 @@ module.exports = { return { ImportDeclaration(node) { const source = node.source.value; - if (source === '@react-aria/utils' || source === './useLayoutEffect' || source === './') { + if (source === '@react-aria-nutrient/utils' || source === './useLayoutEffect' || source === './') { return; } const importSpecifiers = node.specifiers.filter(specifier => specifier.type === 'ImportSpecifier'); @@ -24,7 +24,7 @@ module.exports = { (item) => { let itemName = getName(item); if (itemName === 'useLayoutEffect') { - context.report(node, 'Please use useLayoutEffect from @react-aria/utils instead.'); + context.report(node, 'Please use useLayoutEffect from @react-aria-nutrient/utils instead.'); } } ); diff --git a/eslint.config.mjs b/eslint.config.mjs index 7e48b91477f..0fc03bf8777 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -469,10 +469,10 @@ export default [{ rules: { "no-restricted-globals": [ERROR, { name: "window", - message: "Use getOwnerWindow from @react-aria/utils instead.", + message: "Use getOwnerWindow from @react-aria-nutrient/utils instead.", }, { name: "document", - message: "Use getOwnerDocument from @react-aria/utils instead.", + message: "Use getOwnerDocument from @react-aria-nutrient/utils instead.", }], }, }, { @@ -484,10 +484,10 @@ export default [{ rules: { "no-restricted-globals": [WARN, { name: "window", - message: "Use getOwnerWindow from @react-aria/utils instead.", + message: "Use getOwnerWindow from @react-aria-nutrient/utils instead.", }, { name: "document", - message: "Use getOwnerDocument from @react-aria/utils instead.", + message: "Use getOwnerDocument from @react-aria-nutrient/utils instead.", }], }, }, { diff --git a/examples/next-app-csp/next.config.js b/examples/next-app-csp/next.config.js index 98c0d8f2b42..9ae45bb85e3 100644 --- a/examples/next-app-csp/next.config.js +++ b/examples/next-app-csp/next.config.js @@ -1,4 +1,4 @@ -const localesPlugin = require('@react-aria/optimize-locales-plugin'); +const localesPlugin = require('@react-aria-nutrient/optimize-locales-plugin'); const glob = require('glob'); /** @type {import('next').NextConfig} */ diff --git a/examples/next-app/next.config.js b/examples/next-app/next.config.js index 98c0d8f2b42..9ae45bb85e3 100644 --- a/examples/next-app/next.config.js +++ b/examples/next-app/next.config.js @@ -1,4 +1,4 @@ -const localesPlugin = require('@react-aria/optimize-locales-plugin'); +const localesPlugin = require('@react-aria-nutrient/optimize-locales-plugin'); const glob = require('glob'); /** @type {import('next').NextConfig} */ diff --git a/examples/rac-tailwind/.parcelrc b/examples/rac-tailwind/.parcelrc index 97e450d81a4..1d1d194b965 100644 --- a/examples/rac-tailwind/.parcelrc +++ b/examples/rac-tailwind/.parcelrc @@ -1,6 +1,6 @@ { "extends": "@parcel/config-default", - "resolvers": ["@react-aria/parcel-resolver-optimize-locales", "@parcel/resolver-glob", "..."], + "resolvers": ["@react-aria-nutrient/parcel-resolver-optimize-locales", "@parcel/resolver-glob", "..."], "transformers": { "**/intl/*.json": ["parcel-transformer-intl"] } diff --git a/examples/rac-tailwind/package.json b/examples/rac-tailwind/package.json index e963681d038..33263e70c4d 100644 --- a/examples/rac-tailwind/package.json +++ b/examples/rac-tailwind/package.json @@ -9,7 +9,7 @@ }, "dependencies": { "@heroicons/react": "^2.0.16", - "@react-aria/parcel-resolver-optimize-locales": "^1.0.0", + "@react-aria-nutrient/parcel-resolver-optimize-locales": "^1.0.0", "@tailwindcss/postcss": "^4.0.0", "framer-motion": "^10.12.16", "parcel": "^2.13.0", diff --git a/examples/remix/vite.config.ts b/examples/remix/vite.config.ts index 17286fa3b70..16068227443 100644 --- a/examples/remix/vite.config.ts +++ b/examples/remix/vite.config.ts @@ -1,7 +1,7 @@ import { unstable_vitePlugin as remix } from "@remix-run/dev"; import { defineConfig } from "vite"; import tsconfigPaths from "vite-tsconfig-paths"; -import optimizeLocales from '@react-aria/optimize-locales-plugin'; +import optimizeLocales from '@react-aria-nutrient/optimize-locales-plugin'; export default defineConfig({ plugins: [ diff --git a/examples/rsp-cra-18/package.json b/examples/rsp-cra-18/package.json index 8dbb6f7cdb4..0234fb3f285 100644 --- a/examples/rsp-cra-18/package.json +++ b/examples/rsp-cra-18/package.json @@ -8,7 +8,7 @@ "@adobe/react-spectrum": "latest", "@babel/plugin-proposal-private-property-in-object": "^7.16.7", "@babel/preset-react": "^7.24.1", - "@react-aria/dnd": "^3.6.1", + "@react-aria-nutrient/dnd": "^3.6.1", "@react-spectrum/provider": "^3.9.7", "@react-spectrum/toast": "^3.0.0-beta.16", "@spectrum-icons/illustrations": "^3.6.8", diff --git a/examples/rsp-cra-18/src/sections/DragAndDropExamples.tsx b/examples/rsp-cra-18/src/sections/DragAndDropExamples.tsx index 4379434fe6d..1c1148edeb4 100644 --- a/examples/rsp-cra-18/src/sections/DragAndDropExamples.tsx +++ b/examples/rsp-cra-18/src/sections/DragAndDropExamples.tsx @@ -1,7 +1,7 @@ import {DropZone, Flex, Divider, IllustratedMessage, Heading} from '@adobe/react-spectrum'; import React from 'react'; import Upload from '@spectrum-icons/illustrations/Upload'; -import {useDrag} from '@react-aria/dnd'; +import {useDrag} from '@react-aria-nutrient/dnd'; export default function DragAndDropExamples() { let [isFilled, setIsFilled] = React.useState(false); diff --git a/examples/rsp-next-ts/next.config.mjs b/examples/rsp-next-ts/next.config.mjs index 143f791d364..21161ab8858 100644 --- a/examples/rsp-next-ts/next.config.mjs +++ b/examples/rsp-next-ts/next.config.mjs @@ -1,4 +1,4 @@ -import localesPlugin from '@react-aria/optimize-locales-plugin'; +import localesPlugin from '@react-aria-nutrient/optimize-locales-plugin'; import {glob} from 'glob'; export default { diff --git a/examples/rsp-next-ts/package.json b/examples/rsp-next-ts/package.json index a9b9552f17b..bae650a67d3 100644 --- a/examples/rsp-next-ts/package.json +++ b/examples/rsp-next-ts/package.json @@ -14,7 +14,7 @@ }, "dependencies": { "@adobe/react-spectrum": "^3.35.0", - "@react-aria/optimize-locales-plugin": "^1.1.0", + "@react-aria-nutrient/optimize-locales-plugin": "^1.1.0", "@react-spectrum/provider": "^3.9.7", "@react-spectrum/toast": "^3.0.0-beta.16", "@spectrum-icons/illustrations": "^3.6.12", diff --git a/lib/yarn-plugin-rsp-duplicates.js b/lib/yarn-plugin-rsp-duplicates.js index 1ca268edbd1..e58386a225f 100644 --- a/lib/yarn-plugin-rsp-duplicates.js +++ b/lib/yarn-plugin-rsp-duplicates.js @@ -24,7 +24,7 @@ module.exports = { let packages = new Map(); let hasRSP = false; for (const pkg of project.storedPackages.values()) { - if (!structUtils.isVirtualLocator(pkg) && (pkg.scope === 'react-aria' || pkg.scope === 'react-spectrum' || pkg.scope === 'react-stately')) { + if (!structUtils.isVirtualLocator(pkg) && (pkg.scope === '@react-aria-nutrient/react-aria' || pkg.scope === 'react-spectrum' || pkg.scope === 'react-stately')) { let key = `@${pkg.scope}/${pkg.name}`; if (!packages.has(key)) { packages.set(key, new Set([pkg.version])); diff --git a/package.json b/package.json index c93c72dbd67..b1bbf008fb7 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "build:s2-docs": "NODE_ENV=storybook storybook build -c .storybook-s2 --docs", "start:docs": "DOCS_ENV=dev parcel 'packages/@react-{spectrum,aria,stately}/*/docs/*.mdx' 'packages/react-aria-components/docs/**/*.mdx' 'packages/@internationalized/*/docs/*.mdx' 'packages/dev/docs/pages/**/*.mdx'", "build:docs": "DOCS_ENV=staging parcel build 'packages/@react-{spectrum,aria,stately}/*/docs/*.mdx' 'packages/react-aria-components/docs/**/*.mdx' 'packages/@internationalized/*/docs/*.mdx' 'packages/dev/docs/pages/**/*.mdx'", - "test": "cross-env STRICT_MODE=1 yarn jest", + "test": "cross-env STRICT_MODE=1 yarn jest --runInBand", "test:lint": "node packages/**/*.test-lint.js", "test-loose": "cross-env VIRT_ON=1 yarn jest", "test-storybook": "test-storybook --url http://localhost:9003 --browsers chromium --no-cache", @@ -125,7 +125,7 @@ "@tailwindcss/postcss": "^4.0.0", "@testing-library/dom": "^10.1.0", "@testing-library/jest-dom": "^5.16.5", - "@testing-library/react": "^15.0.7", + "@testing-library/react": "^16.0.0", "@testing-library/user-event": "patch:@testing-library/user-event@npm%3A14.6.1#~/.yarn/patches/@testing-library-user-event-npm-14.6.1-5da7e1d4e2.patch", "@types/react": "npm:types-react@19.0.0-rc.0", "@types/react-dom": "npm:types-react-dom@19.0.0-rc.0", diff --git a/packages/@adobe/react-spectrum/package.json b/packages/@adobe/react-spectrum/package.json index 1094ead77f0..60481d68012 100644 --- a/packages/@adobe/react-spectrum/package.json +++ b/packages/@adobe/react-spectrum/package.json @@ -38,11 +38,11 @@ }, "dependencies": { "@internationalized/string": "^3.2.5", - "@react-aria/collections": "3.0.0-beta.1", - "@react-aria/i18n": "^3.12.7", - "@react-aria/ssr": "^3.9.7", - "@react-aria/utils": "^3.28.1", - "@react-aria/visually-hidden": "^3.8.21", + "@react-aria-nutrient/collections": "3.0.0-beta.1", + "@react-aria-nutrient/i18n": "^3.12.7", + "@react-aria-nutrient/ssr": "^3.9.7", + "@react-aria-nutrient/utils": "^3.28.1", + "@react-aria-nutrient/visually-hidden": "^3.8.21", "@react-spectrum/accordion": "^3.0.4", "@react-spectrum/actionbar": "^3.6.5", "@react-spectrum/actiongroup": "^3.10.13", diff --git a/packages/@adobe/react-spectrum/src/index.ts b/packages/@adobe/react-spectrum/src/index.ts index c9085766e5d..c88c97e5a30 100644 --- a/packages/@adobe/react-spectrum/src/index.ts +++ b/packages/@adobe/react-spectrum/src/index.ts @@ -68,11 +68,11 @@ export {Content, Footer, Header, View} from '@react-spectrum/view'; export {Well} from '@react-spectrum/well'; export {Item, Section} from '@react-stately/collections'; export {useAsyncList, useListData, useTreeData} from '@react-stately/data'; -export {VisuallyHidden} from '@react-aria/visually-hidden'; -export {useCollator, useDateFormatter, useFilter, useLocale, useLocalizedStringFormatter, useMessageFormatter, useNumberFormatter} from '@react-aria/i18n'; -export {SSRProvider} from '@react-aria/ssr'; +export {VisuallyHidden} from '@react-aria-nutrient/visually-hidden'; +export {useCollator, useDateFormatter, useFilter, useLocale, useLocalizedStringFormatter, useMessageFormatter, useNumberFormatter} from '@react-aria-nutrient/i18n'; +export {SSRProvider} from '@react-aria-nutrient/ssr'; export {useDragAndDrop, DIRECTORY_DRAG_TYPE} from '@react-spectrum/dnd'; -export {Collection} from '@react-aria/collections'; +export {Collection} from '@react-aria-nutrient/collections'; export type {SpectrumActionBarContainerProps, SpectrumActionBarProps} from '@react-spectrum/actionbar'; export type {SpectrumActionGroupProps} from '@react-spectrum/actiongroup'; @@ -123,9 +123,9 @@ export type {SpectrumTreeViewProps, SpectrumTreeViewItemProps, SpectrumTreeViewI export type {ContentProps, FooterProps, HeaderProps, ViewProps} from '@react-spectrum/view'; export type {SpectrumWellProps} from '@react-spectrum/well'; export type {AsyncListData, AsyncListOptions, ListData, ListOptions, TreeData, TreeOptions} from '@react-stately/data'; -export type {VisuallyHiddenAria, VisuallyHiddenProps} from '@react-aria/visually-hidden'; -export type {DateFormatter, DateFormatterOptions, Filter, FormatMessage, Locale, LocalizedStrings} from '@react-aria/i18n'; -export type {SSRProviderProps} from '@react-aria/ssr'; +export type {VisuallyHiddenAria, VisuallyHiddenProps} from '@react-aria-nutrient/visually-hidden'; +export type {DateFormatter, DateFormatterOptions, Filter, FormatMessage, Locale, LocalizedStrings} from '@react-aria-nutrient/i18n'; +export type {SSRProviderProps} from '@react-aria-nutrient/ssr'; export type {DirectoryDropItem, DragAndDropHooks, DragAndDropOptions, DraggableCollectionEndEvent, DraggableCollectionMoveEvent, DraggableCollectionStartEvent, DragPreviewRenderer, DragTypes, DropItem, DropOperation, DroppableCollectionDropEvent, DroppableCollectionEnterEvent, DroppableCollectionExitEvent, DroppableCollectionInsertDropEvent, DroppableCollectionMoveEvent, DroppableCollectionOnItemDropEvent, DroppableCollectionReorderEvent, DroppableCollectionRootDropEvent, DropPosition, DropTarget, FileDropItem, ItemDropTarget, RootDropTarget, TextDropItem} from '@react-spectrum/dnd'; export type {Key, Selection, ItemProps, SectionProps, RouterConfig} from '@react-types/shared'; export type {SpectrumAccordionProps, SpectrumDisclosureProps, SpectrumDisclosurePanelProps, SpectrumDisclosureTitleProps} from '@react-spectrum/accordion'; diff --git a/packages/@internationalized/date/docs/CalendarDate.mdx b/packages/@internationalized/date/docs/CalendarDate.mdx index ab51b533a97..a14440ba735 100644 --- a/packages/@internationalized/date/docs/CalendarDate.mdx +++ b/packages/@internationalized/date/docs/CalendarDate.mdx @@ -72,7 +72,7 @@ date.toString(); // '2022-02-03' By default, `CalendarDate` uses the Gregorian calendar system, but many other calendar systems that are used around the world are supported, such as Hebrew, Indian, Islamic, Buddhist, Ethiopic, and more. A instance can be passed to the `CalendarDate` constructor to represent dates in that calendar system. -This example creates a date in the Buddhist calendar system, which is equivalent to April 4th, 2020 in the Gregorian calendar. +This example creates a date in the Buddhist calendar system, which is equivalent to April 30th, 2020 in the Gregorian calendar. ```tsx import {BuddhistCalendar} from '@internationalized/date'; @@ -86,7 +86,7 @@ See the [Calendar](Calendar.html#implementations) docs for details about the sup Many calendar systems have only one era, or a modern era and a pre-modern era (e.g. AD and BC in the Gregorian calendar). However, other calendar systems may have many eras. For example, the Japanese calendar has eras for the reign of each Emperor. `CalendarDate` represents eras using string identifiers, which can be passed as an additional parameter to the constructor before the year. When eras are present, years are numbered starting from 1 within the era. -This example creates a date in the Japanese calendar system, which is equivalent to April 4th, 2020 in the Gregorian calendar. +This example creates a date in the Japanese calendar system, which is equivalent to April 30th, 2019 in the Gregorian calendar. ```tsx import {JapaneseCalendar} from '@internationalized/date'; diff --git a/packages/@internationalized/number/src/NumberFormatter.ts b/packages/@internationalized/number/src/NumberFormatter.ts index f0968629aab..abb743ab83a 100644 --- a/packages/@internationalized/number/src/NumberFormatter.ts +++ b/packages/@internationalized/number/src/NumberFormatter.ts @@ -190,7 +190,7 @@ export function numberFormatSignDisplayPolyfill(numberFormat: Intl.NumberFormat, // ignore RTL/LTR marker character let minus = negative.replace(noSign, '').replace(/\u200e|\u061C/, ''); if ([...minus].length !== 1) { - console.warn('@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case'); + console.warn('@react-aria-nutrient/i18n polyfill for NumberFormat signDisplay: Unsupported case'); } let positive = negative.replace(noSign, '!!!').replace(minus, '+').replace('!!!', noSign); return positive; diff --git a/packages/@react-aria/actiongroup/README.md b/packages/@react-aria/actiongroup/README.md index 224011fccad..5b7d66222c5 100644 --- a/packages/@react-aria/actiongroup/README.md +++ b/packages/@react-aria/actiongroup/README.md @@ -1,3 +1,3 @@ -# @react-aria/actiongroup +# @react-aria-nutrient/actiongroup This package is part of [react-spectrum](https://github.com/adobe/react-spectrum). See the repo for more details. \ No newline at end of file diff --git a/packages/@react-aria/actiongroup/package.json b/packages/@react-aria/actiongroup/package.json index 32c1a26036a..33e7032fbbb 100644 --- a/packages/@react-aria/actiongroup/package.json +++ b/packages/@react-aria/actiongroup/package.json @@ -1,5 +1,5 @@ { - "name": "@react-aria/actiongroup", + "name": "@react-aria-nutrient/actiongroup", "version": "3.7.14", "description": "Spectrum UI components in React", "license": "Apache-2.0", @@ -22,10 +22,10 @@ "url": "https://github.com/adobe/react-spectrum" }, "dependencies": { - "@react-aria/focus": "^3.20.1", - "@react-aria/i18n": "^3.12.7", - "@react-aria/interactions": "^3.24.1", - "@react-aria/utils": "^3.28.1", + "@react-aria-nutrient/focus": "^3.20.1", + "@react-aria-nutrient/i18n": "^3.12.7", + "@react-aria-nutrient/interactions": "^3.24.1", + "@react-aria-nutrient/utils": "^3.28.1", "@react-stately/list": "^3.12.0", "@react-types/actiongroup": "^3.4.15", "@react-types/shared": "^3.28.0", diff --git a/packages/@react-aria/actiongroup/src/useActionGroup.ts b/packages/@react-aria/actiongroup/src/useActionGroup.ts index 336e32ac79d..bbd3f959fea 100644 --- a/packages/@react-aria/actiongroup/src/useActionGroup.ts +++ b/packages/@react-aria/actiongroup/src/useActionGroup.ts @@ -11,11 +11,11 @@ */ import {AriaActionGroupProps} from '@react-types/actiongroup'; -import {createFocusManager} from '@react-aria/focus'; +import {createFocusManager} from '@react-aria-nutrient/focus'; import {DOMAttributes, FocusableElement, Orientation, RefObject} from '@react-types/shared'; -import {filterDOMProps, useLayoutEffect} from '@react-aria/utils'; +import {filterDOMProps, useLayoutEffect} from '@react-aria-nutrient/utils'; import {ListState} from '@react-stately/list'; -import {useLocale} from '@react-aria/i18n'; +import {useLocale} from '@react-aria-nutrient/i18n'; import {useState} from 'react'; const BUTTON_GROUP_ROLES = { diff --git a/packages/@react-aria/actiongroup/src/useActionGroupItem.ts b/packages/@react-aria/actiongroup/src/useActionGroupItem.ts index 9f33010a1eb..9f773027f5d 100644 --- a/packages/@react-aria/actiongroup/src/useActionGroupItem.ts +++ b/packages/@react-aria/actiongroup/src/useActionGroupItem.ts @@ -12,8 +12,8 @@ import {DOMAttributes, FocusableElement, Key, RefObject} from '@react-types/shared'; import {ListState} from '@react-stately/list'; -import {mergeProps, useEffectEvent} from '@react-aria/utils'; -import {PressProps} from '@react-aria/interactions'; +import {mergeProps, useEffectEvent} from '@react-aria-nutrient/utils'; +import {PressProps} from '@react-aria-nutrient/interactions'; import {useEffect} from 'react'; export interface AriaActionGroupItemProps { diff --git a/packages/@react-aria/aria-modal-polyfill/README.md b/packages/@react-aria/aria-modal-polyfill/README.md index af11a807516..a8fae075935 100644 --- a/packages/@react-aria/aria-modal-polyfill/README.md +++ b/packages/@react-aria/aria-modal-polyfill/README.md @@ -1,4 +1,4 @@ -# @react-aria/aria-modal-polyfill +# @react-aria-nutrient/aria-modal-polyfill This package is part of [react-spectrum](https://github.com/adobe/react-spectrum). Certain browser + screen reader combinations do not implement aria-modal correctly, allowing users to navigate outside of the modal. @@ -7,7 +7,7 @@ This package watches a container for aria-modal nodes and hides the rest of the ## How to use Include this once in your application at the top level before modals are rendered. ``` -import {watchModals} from '@react-aria/aria-modal-polyfill'; +import {watchModals} from '@react-aria-nutrient/aria-modal-polyfill'; watchModals(); ``` diff --git a/packages/@react-aria/aria-modal-polyfill/package.json b/packages/@react-aria/aria-modal-polyfill/package.json index 8b72f957c4a..b4fc129f695 100644 --- a/packages/@react-aria/aria-modal-polyfill/package.json +++ b/packages/@react-aria/aria-modal-polyfill/package.json @@ -1,5 +1,5 @@ { - "name": "@react-aria/aria-modal-polyfill", + "name": "@react-aria-nutrient/aria-modal-polyfill", "version": "3.7.13", "description": "Spectrum UI components in React", "license": "Apache-2.0", diff --git a/packages/@react-aria/autocomplete/README.md b/packages/@react-aria/autocomplete/README.md index 4ce2856cfc5..9122ec9d64b 100644 --- a/packages/@react-aria/autocomplete/README.md +++ b/packages/@react-aria/autocomplete/README.md @@ -1,3 +1,3 @@ -# @react-aria/autocomplete +# @react-aria-nutrient/autocomplete This package is part of [react-spectrum](https://github.com/adobe/react-spectrum). See the repo for more details. diff --git a/packages/@react-aria/autocomplete/docs/useAutocomplete.mdx b/packages/@react-aria/autocomplete/docs/useAutocomplete.mdx index 35c4f8f9d60..b718cdfe0d2 100644 --- a/packages/@react-aria/autocomplete/docs/useAutocomplete.mdx +++ b/packages/@react-aria/autocomplete/docs/useAutocomplete.mdx @@ -10,9 +10,9 @@ governing permissions and limitations under the License. */} import {Layout} from '@react-spectrum/docs'; export default Layout; -import docs from 'docs:@react-aria/autocomplete'; +import docs from 'docs:@react-aria-nutrient/autocomplete'; import {FunctionAPI, HeaderInfo, InterfaceType, TypeContext, TypeLink, PageDescription} from '@react-spectrum/docs'; -import packageData from '@react-aria/autocomplete/package.json'; +import packageData from '@react-aria-nutrient/autocomplete/package.json'; import statelyDocs from 'docs:@react-stately/autocomplete'; import {InlineAlert, Content, Heading} from '@adobe/react-spectrum'; diff --git a/packages/@react-aria/autocomplete/docs/useSearchAutocomplete.mdx b/packages/@react-aria/autocomplete/docs/useSearchAutocomplete.mdx index 335733047b7..68f14efc354 100644 --- a/packages/@react-aria/autocomplete/docs/useSearchAutocomplete.mdx +++ b/packages/@react-aria/autocomplete/docs/useSearchAutocomplete.mdx @@ -10,12 +10,12 @@ governing permissions and limitations under the License. */} import {Layout} from '@react-spectrum/docs'; export default Layout; -import docs from 'docs:@react-aria/autocomplete'; +import docs from 'docs:@react-aria-nutrient/autocomplete'; import collectionsDocs from 'docs:@react-types/shared/src/collections.d.ts'; import {FunctionAPI, HeaderInfo, InterfaceType, TypeContext, TypeLink, PageDescription} from '@react-spectrum/docs'; -import i18nDocs from 'docs:@react-aria/i18n'; -import overlaysDocs from 'docs:@react-aria/overlays'; -import packageData from '@react-aria/autocomplete/package.json'; +import i18nDocs from 'docs:@react-aria-nutrient/i18n'; +import overlaysDocs from 'docs:@react-aria-nutrient/overlays'; +import packageData from '@react-aria-nutrient/autocomplete/package.json'; import selectionDocs from 'docs:@react-stately/selection'; import statelyDocs from 'docs:@react-stately/combobox'; import Anatomy from './anatomy.svg'; @@ -123,10 +123,10 @@ options. ```tsx example export=true import {Item} from '@react-stately/collections'; -import {useButton} from '@react-aria/button'; +import {useButton} from '@react-aria-nutrient/button'; import {useComboBoxState} from '@react-stately/combobox' -import {useSearchAutocomplete} from '@react-aria/autocomplete'; -import {useFilter} from '@react-aria/i18n'; +import {useSearchAutocomplete} from '@react-aria-nutrient/autocomplete'; +import {useFilter} from '@react-aria-nutrient/i18n'; // Reuse the ListBox and Popover from your component library. See below for details. import {ListBox, Popover} from 'your-component-library'; @@ -204,9 +204,9 @@ See [usePopover](usePopover.html) for more examples of popovers. Show code ```tsx example export=true render=false -import type {AriaPopoverProps} from 'react-aria'; +import type {AriaPopoverProps} from '@react-aria-nutrient/react-aria'; import type {OverlayTriggerState} from 'react-stately'; -import {usePopover, Overlay, DismissButton} from '@react-aria/overlays'; +import {usePopover, Overlay, DismissButton} from '@react-aria-nutrient/overlays'; interface PopoverProps extends AriaPopoverProps { children: React.ReactNode, @@ -246,7 +246,7 @@ user types in the SearchAutocomplete. They can also be shared with other compone Show code ```tsx example export=true render=false -import {useListBox, useOption} from '@react-aria/listbox'; +import {useListBox, useOption} from '@react-aria-nutrient/listbox'; function ListBox(props) { let ref = React.useRef(null); diff --git a/packages/@react-aria/autocomplete/package.json b/packages/@react-aria/autocomplete/package.json index 53256782860..1d9be5b03eb 100644 --- a/packages/@react-aria/autocomplete/package.json +++ b/packages/@react-aria/autocomplete/package.json @@ -1,5 +1,5 @@ { - "name": "@react-aria/autocomplete", + "name": "@react-aria-nutrient/autocomplete", "version": "3.0.0-beta.1", "description": "Spectrum UI components in React", "license": "Apache-2.0", @@ -22,14 +22,14 @@ "url": "https://github.com/adobe/react-spectrum" }, "dependencies": { - "@react-aria/combobox": "^3.12.1", - "@react-aria/focus": "^3.20.1", - "@react-aria/i18n": "^3.12.7", - "@react-aria/interactions": "^3.24.1", - "@react-aria/listbox": "^3.14.2", - "@react-aria/searchfield": "^3.8.2", - "@react-aria/textfield": "^3.17.1", - "@react-aria/utils": "^3.28.1", + "@react-aria-nutrient/combobox": "^3.12.1", + "@react-aria-nutrient/focus": "^3.20.1", + "@react-aria-nutrient/i18n": "^3.12.7", + "@react-aria-nutrient/interactions": "^3.24.1", + "@react-aria-nutrient/listbox": "^3.14.2", + "@react-aria-nutrient/searchfield": "^3.8.2", + "@react-aria-nutrient/textfield": "^3.17.1", + "@react-aria-nutrient/utils": "^3.28.1", "@react-stately/autocomplete": "3.0.0-beta.0", "@react-stately/combobox": "^3.10.3", "@react-types/autocomplete": "3.0.0-alpha.29", diff --git a/packages/@react-aria/autocomplete/src/useAutocomplete.ts b/packages/@react-aria/autocomplete/src/useAutocomplete.ts index 6f700db89f3..81599038d11 100644 --- a/packages/@react-aria/autocomplete/src/useAutocomplete.ts +++ b/packages/@react-aria/autocomplete/src/useAutocomplete.ts @@ -11,15 +11,15 @@ */ import {AriaLabelingProps, BaseEvent, DOMProps, RefObject} from '@react-types/shared'; -import {AriaTextFieldProps} from '@react-aria/textfield'; +import {AriaTextFieldProps} from '@react-aria-nutrient/textfield'; import {AutocompleteProps, AutocompleteState} from '@react-stately/autocomplete'; -import {CLEAR_FOCUS_EVENT, FOCUS_EVENT, getActiveElement, getOwnerDocument, isCtrlKeyPressed, mergeProps, mergeRefs, useEffectEvent, useId, useLabels, useObjectRef} from '@react-aria/utils'; -import {dispatchVirtualBlur, dispatchVirtualFocus, moveVirtualFocus} from '@react-aria/focus'; -import {getInteractionModality} from '@react-aria/interactions'; +import {CLEAR_FOCUS_EVENT, FOCUS_EVENT, getActiveElement, getOwnerDocument, isCtrlKeyPressed, mergeProps, mergeRefs, useEffectEvent, useId, useLabels, useObjectRef} from '@react-aria-nutrient/utils'; +import {dispatchVirtualBlur, dispatchVirtualFocus, moveVirtualFocus} from '@react-aria-nutrient/focus'; +import {getInteractionModality} from '@react-aria-nutrient/interactions'; // @ts-ignore import intlMessages from '../intl/*.json'; import {FocusEvent as ReactFocusEvent, KeyboardEvent as ReactKeyboardEvent, useCallback, useEffect, useMemo, useRef} from 'react'; -import {useLocalizedStringFormatter} from '@react-aria/i18n'; +import {useLocalizedStringFormatter} from '@react-aria-nutrient/i18n'; export interface CollectionOptions extends DOMProps, AriaLabelingProps { /** Whether the collection items should use virtual focus instead of being focused directly. */ @@ -293,7 +293,7 @@ export function useAutocomplete(props: AriaAutocompleteOptions, state: Autocompl }; }, [onKeyUpCapture]); - let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-aria/autocomplete'); + let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-aria-nutrient/autocomplete'); let collectionProps = useLabels({ id: collectionId, 'aria-label': stringFormatter.format('collectionLabel') diff --git a/packages/@react-aria/autocomplete/src/useSearchAutocomplete.ts b/packages/@react-aria/autocomplete/src/useSearchAutocomplete.ts index 4eb891f3664..9f5f2ba96bf 100644 --- a/packages/@react-aria/autocomplete/src/useSearchAutocomplete.ts +++ b/packages/@react-aria/autocomplete/src/useSearchAutocomplete.ts @@ -11,14 +11,14 @@ */ import {AriaButtonProps} from '@react-types/button'; -import {AriaListBoxOptions} from '@react-aria/listbox'; +import {AriaListBoxOptions} from '@react-aria-nutrient/listbox'; import {AriaSearchAutocompleteProps} from '@react-types/autocomplete'; import {ComboBoxState} from '@react-stately/combobox'; import {DOMAttributes, KeyboardDelegate, LayoutDelegate, RefObject, ValidationResult} from '@react-types/shared'; import {InputHTMLAttributes} from 'react'; -import {mergeProps} from '@react-aria/utils'; -import {useComboBox} from '@react-aria/combobox'; -import {useSearchField} from '@react-aria/searchfield'; +import {mergeProps} from '@react-aria-nutrient/utils'; +import {useComboBox} from '@react-aria-nutrient/combobox'; +import {useSearchField} from '@react-aria-nutrient/searchfield'; export interface SearchAutocompleteAria extends ValidationResult { /** Props for the label element. */ diff --git a/packages/@react-aria/breadcrumbs/README.md b/packages/@react-aria/breadcrumbs/README.md index 078c1d7346b..ac9175b7957 100644 --- a/packages/@react-aria/breadcrumbs/README.md +++ b/packages/@react-aria/breadcrumbs/README.md @@ -1,3 +1,3 @@ -# @react-aria/breadcrumbs +# @react-aria-nutrient/breadcrumbs This package is part of [react-spectrum](https://github.com/adobe/react-spectrum). See the repo for more details. diff --git a/packages/@react-aria/breadcrumbs/docs/useBreadcrumbs.mdx b/packages/@react-aria/breadcrumbs/docs/useBreadcrumbs.mdx index d5251d2ad77..fab3239333b 100644 --- a/packages/@react-aria/breadcrumbs/docs/useBreadcrumbs.mdx +++ b/packages/@react-aria/breadcrumbs/docs/useBreadcrumbs.mdx @@ -10,10 +10,10 @@ governing permissions and limitations under the License. */} import {Layout} from '@react-spectrum/docs'; export default Layout; -import docs from 'docs:@react-aria/breadcrumbs'; +import docs from 'docs:@react-aria-nutrient/breadcrumbs'; import {HeaderInfo, FunctionAPI, TypeContext, InterfaceType, PageDescription} from '@react-spectrum/docs'; import {Keyboard} from '@react-spectrum/text'; -import packageData from '@react-aria/breadcrumbs/package.json'; +import packageData from '@react-aria-nutrient/breadcrumbs/package.json'; import Anatomy from './anatomy.svg'; --- @@ -86,7 +86,7 @@ passed to the last breadcrumb item by cloning the element and adding the `isCurr prop. ```tsx example -import {useBreadcrumbs, useBreadcrumbItem} from '@react-aria/breadcrumbs'; +import {useBreadcrumbs, useBreadcrumbItem} from '@react-aria-nutrient/breadcrumbs'; function Breadcrumbs(props) { let {navProps} = useBreadcrumbs(props); diff --git a/packages/@react-aria/breadcrumbs/package.json b/packages/@react-aria/breadcrumbs/package.json index 363019f1a32..9b646b51cee 100644 --- a/packages/@react-aria/breadcrumbs/package.json +++ b/packages/@react-aria/breadcrumbs/package.json @@ -1,5 +1,5 @@ { - "name": "@react-aria/breadcrumbs", + "name": "@react-aria-nutrient/breadcrumbs", "version": "3.5.22", "description": "Spectrum UI components in React", "license": "Apache-2.0", @@ -22,9 +22,9 @@ "url": "https://github.com/adobe/react-spectrum" }, "dependencies": { - "@react-aria/i18n": "^3.12.7", - "@react-aria/link": "^3.7.10", - "@react-aria/utils": "^3.28.1", + "@react-aria-nutrient/i18n": "^3.12.7", + "@react-aria-nutrient/link": "^3.7.10", + "@react-aria-nutrient/utils": "^3.28.1", "@react-types/breadcrumbs": "^3.7.11", "@react-types/shared": "^3.28.0", "@swc/helpers": "^0.5.0" diff --git a/packages/@react-aria/breadcrumbs/src/useBreadcrumbItem.ts b/packages/@react-aria/breadcrumbs/src/useBreadcrumbItem.ts index fc791dd1dd3..99dd6341f3e 100644 --- a/packages/@react-aria/breadcrumbs/src/useBreadcrumbItem.ts +++ b/packages/@react-aria/breadcrumbs/src/useBreadcrumbItem.ts @@ -12,7 +12,7 @@ import {AriaBreadcrumbItemProps} from '@react-types/breadcrumbs'; import {DOMAttributes, FocusableElement, RefObject} from '@react-types/shared'; -import {useLink} from '@react-aria/link'; +import {useLink} from '@react-aria-nutrient/link'; export interface BreadcrumbItemAria { /** Props for the breadcrumb item link element. */ diff --git a/packages/@react-aria/breadcrumbs/src/useBreadcrumbs.ts b/packages/@react-aria/breadcrumbs/src/useBreadcrumbs.ts index dfc4d5dbdfd..b30fd5d1c22 100644 --- a/packages/@react-aria/breadcrumbs/src/useBreadcrumbs.ts +++ b/packages/@react-aria/breadcrumbs/src/useBreadcrumbs.ts @@ -12,10 +12,10 @@ import {AriaBreadcrumbsProps} from '@react-types/breadcrumbs'; import {DOMAttributes} from '@react-types/shared'; -import {filterDOMProps} from '@react-aria/utils'; +import {filterDOMProps} from '@react-aria-nutrient/utils'; // @ts-ignore import intlMessages from '../intl/*.json'; -import {useLocalizedStringFormatter} from '@react-aria/i18n'; +import {useLocalizedStringFormatter} from '@react-aria-nutrient/i18n'; export interface BreadcrumbsAria { /** Props for the breadcrumbs navigation element. */ @@ -32,7 +32,7 @@ export function useBreadcrumbs(props: AriaBreadcrumbsProps): BreadcrumbsAria { ...otherProps } = props; - let strings = useLocalizedStringFormatter(intlMessages, '@react-aria/breadcrumbs'); + let strings = useLocalizedStringFormatter(intlMessages, '@react-aria-nutrient/breadcrumbs'); return { navProps: { ...filterDOMProps(otherProps, {labelable: true}), diff --git a/packages/@react-aria/button/README.md b/packages/@react-aria/button/README.md index 7e6eef0f345..cb8303d4596 100644 --- a/packages/@react-aria/button/README.md +++ b/packages/@react-aria/button/README.md @@ -1,3 +1,3 @@ -# @react-aria/button +# @react-aria-nutrient/button This package is part of [react-spectrum](https://github.com/adobe/react-spectrum). See the repo for more details. diff --git a/packages/@react-aria/button/docs/useButton.mdx b/packages/@react-aria/button/docs/useButton.mdx index d22f8dcb6c7..0a72d27dfc2 100644 --- a/packages/@react-aria/button/docs/useButton.mdx +++ b/packages/@react-aria/button/docs/useButton.mdx @@ -10,11 +10,11 @@ governing permissions and limitations under the License. */} import {Layout} from '@react-spectrum/docs'; export default Layout; -import docs from 'docs:@react-aria/button'; +import docs from 'docs:@react-aria-nutrient/button'; import typesDocs from 'docs:@react-types/shared/src/events.d.ts'; import {HeaderInfo, FunctionAPI, TypeLink, PageDescription} from '@react-spectrum/docs'; import {Keyboard} from '@react-spectrum/text'; -import packageData from '@react-aria/button/package.json'; +import packageData from '@react-aria-nutrient/button/package.json'; --- category: Buttons @@ -64,7 +64,7 @@ If a visual label is not provided (e.g. an icon only button), then an `aria-labe By default, `useButton` assumes that you are using it with a native ` diff --git a/packages/@react-aria/focus/docs/FocusScope.mdx b/packages/@react-aria/focus/docs/FocusScope.mdx index 94827c80d79..2fd5778f390 100644 --- a/packages/@react-aria/focus/docs/FocusScope.mdx +++ b/packages/@react-aria/focus/docs/FocusScope.mdx @@ -10,10 +10,10 @@ governing permissions and limitations under the License. */} import {Layout} from '@react-spectrum/docs'; export default Layout; -import docs from 'docs:@react-aria/focus'; +import docs from 'docs:@react-aria-nutrient/focus'; import {HeaderInfo, PropTable, FunctionAPI, TypeLink, ClassAPI, PageDescription} from '@react-spectrum/docs'; import {Keyboard} from '@react-spectrum/text'; -import packageData from '@react-aria/focus/package.json'; +import packageData from '@react-aria-nutrient/focus/package.json'; --- category: Focus @@ -64,7 +64,7 @@ button unmounts the focus scope, which restores focus back to the button. For a full example of building a modal dialog, see [useDialog](useDialog.html). ```tsx example -import {FocusScope} from '@react-aria/focus'; +import {FocusScope} from '@react-aria-nutrient/focus'; function Example() { let [isOpen, setOpen] = React.useState(false); @@ -93,7 +93,7 @@ right arrow keys to move focus to the previous and next buttons. The `wrap` opti used to make focus wrap around when it reaches the first or last button. ```tsx example -import {useFocusManager} from '@react-aria/focus'; +import {useFocusManager} from '@react-aria-nutrient/focus'; function Toolbar(props) { return ( diff --git a/packages/@react-aria/focus/docs/useFocusRing.mdx b/packages/@react-aria/focus/docs/useFocusRing.mdx index 7aa14e0d4c5..f19f14a7eaa 100644 --- a/packages/@react-aria/focus/docs/useFocusRing.mdx +++ b/packages/@react-aria/focus/docs/useFocusRing.mdx @@ -10,9 +10,9 @@ governing permissions and limitations under the License. */} import {Layout} from '@react-spectrum/docs'; export default Layout; -import docs from 'docs:@react-aria/focus'; +import docs from 'docs:@react-aria-nutrient/focus'; import {HeaderInfo, FunctionAPI, TypeContext, InterfaceType, PageDescription} from '@react-spectrum/docs'; -import packageData from '@react-aria/focus/package.json'; +import packageData from '@react-aria-nutrient/focus/package.json'; --- category: Focus @@ -62,7 +62,7 @@ See [useCheckbox](useCheckbox.html#styling), [useRadioGroup](useRadioGroup.html# techniques. ```tsx example -import {useFocusRing} from '@react-aria/focus'; +import {useFocusRing} from '@react-aria-nutrient/focus'; function Example() { let {isFocusVisible, focusProps} = useFocusRing(); diff --git a/packages/@react-aria/focus/package.json b/packages/@react-aria/focus/package.json index a7cf5e3c310..bccb6ac981d 100644 --- a/packages/@react-aria/focus/package.json +++ b/packages/@react-aria/focus/package.json @@ -1,5 +1,5 @@ { - "name": "@react-aria/focus", + "name": "@react-aria-nutrient/focus", "version": "3.20.1", "description": "Spectrum UI components in React", "license": "Apache-2.0", @@ -22,8 +22,8 @@ "url": "https://github.com/adobe/react-spectrum" }, "dependencies": { - "@react-aria/interactions": "^3.24.1", - "@react-aria/utils": "^3.28.1", + "@react-aria-nutrient/interactions": "^3.24.1", + "@react-aria-nutrient/utils": "^3.28.1", "@react-types/shared": "^3.28.0", "@swc/helpers": "^0.5.0", "clsx": "^2.0.0" diff --git a/packages/@react-aria/focus/src/FocusRing.tsx b/packages/@react-aria/focus/src/FocusRing.tsx index 8f10d6fcb8f..1c14d9a9ff7 100644 --- a/packages/@react-aria/focus/src/FocusRing.tsx +++ b/packages/@react-aria/focus/src/FocusRing.tsx @@ -11,7 +11,7 @@ */ import clsx from 'clsx'; -import {mergeProps} from '@react-aria/utils'; +import {mergeProps} from '@react-aria-nutrient/utils'; import React, {ReactElement, ReactNode} from 'react'; import {useFocusRing} from './useFocusRing'; diff --git a/packages/@react-aria/focus/src/FocusScope.tsx b/packages/@react-aria/focus/src/FocusScope.tsx index 9f21f8a56f6..0e4b3daa9ff 100644 --- a/packages/@react-aria/focus/src/FocusScope.tsx +++ b/packages/@react-aria/focus/src/FocusScope.tsx @@ -21,9 +21,9 @@ import { isTabbable, ShadowTreeWalker, useLayoutEffect -} from '@react-aria/utils'; +} from '@react-aria-nutrient/utils'; import {FocusableElement, RefObject} from '@react-types/shared'; -import {focusSafely, getInteractionModality} from '@react-aria/interactions'; +import {focusSafely, getInteractionModality} from '@react-aria-nutrient/interactions'; import {isElementVisible} from './isElementVisible'; import React, {ReactNode, useContext, useEffect, useMemo, useRef} from 'react'; diff --git a/packages/@react-aria/focus/src/index.ts b/packages/@react-aria/focus/src/index.ts index 2d4aa6ffd6f..604e1371755 100644 --- a/packages/@react-aria/focus/src/index.ts +++ b/packages/@react-aria/focus/src/index.ts @@ -16,10 +16,10 @@ export {useFocusRing} from './useFocusRing'; export {useHasTabbableChild} from './useHasTabbableChild'; export {moveVirtualFocus, dispatchVirtualBlur, dispatchVirtualFocus, getVirtuallyFocusedElement} from './virtualFocus'; // For backward compatibility. -export {isFocusable} from '@react-aria/utils'; -export {FocusableProvider, Focusable, useFocusable, focusSafely} from '@react-aria/interactions'; +export {isFocusable} from '@react-aria-nutrient/utils'; +export {FocusableProvider, Focusable, useFocusable, focusSafely} from '@react-aria-nutrient/interactions'; export type {FocusScopeProps, FocusManager, FocusManagerOptions} from './FocusScope'; export type {FocusRingProps} from './FocusRing'; -export type {FocusableAria, FocusableOptions, FocusableProviderProps} from '@react-aria/interactions'; +export type {FocusableAria, FocusableOptions, FocusableProviderProps} from '@react-aria-nutrient/interactions'; export type {AriaFocusRingProps, FocusRingAria} from './useFocusRing'; diff --git a/packages/@react-aria/focus/src/isElementVisible.ts b/packages/@react-aria/focus/src/isElementVisible.ts index b931d9bf6f5..0586a1aee50 100644 --- a/packages/@react-aria/focus/src/isElementVisible.ts +++ b/packages/@react-aria/focus/src/isElementVisible.ts @@ -10,7 +10,7 @@ * governing permissions and limitations under the License. */ -import {getOwnerWindow} from '@react-aria/utils'; +import {getOwnerWindow} from '@react-aria-nutrient/utils'; function isStyleVisible(element: Element) { const windowObject = getOwnerWindow(element); diff --git a/packages/@react-aria/focus/src/useFocusRing.ts b/packages/@react-aria/focus/src/useFocusRing.ts index 50cf8258115..fb561a55391 100644 --- a/packages/@react-aria/focus/src/useFocusRing.ts +++ b/packages/@react-aria/focus/src/useFocusRing.ts @@ -1,5 +1,5 @@ import {DOMAttributes} from '@react-types/shared'; -import {isFocusVisible, useFocus, useFocusVisibleListener, useFocusWithin} from '@react-aria/interactions'; +import {isFocusVisible, useFocus, useFocusVisibleListener, useFocusWithin} from '@react-aria-nutrient/interactions'; import {useCallback, useRef, useState} from 'react'; export interface AriaFocusRingProps { diff --git a/packages/@react-aria/focus/src/useHasTabbableChild.ts b/packages/@react-aria/focus/src/useHasTabbableChild.ts index 250b077636b..069a02ec855 100644 --- a/packages/@react-aria/focus/src/useHasTabbableChild.ts +++ b/packages/@react-aria/focus/src/useHasTabbableChild.ts @@ -12,7 +12,7 @@ import {getFocusableTreeWalker} from './FocusScope'; import {RefObject} from '@react-types/shared'; -import {useLayoutEffect} from '@react-aria/utils'; +import {useLayoutEffect} from '@react-aria-nutrient/utils'; import {useState} from 'react'; interface AriaHasTabbableChildOptions { diff --git a/packages/@react-aria/focus/src/virtualFocus.ts b/packages/@react-aria/focus/src/virtualFocus.ts index 3679f71ea31..8dbed7c1598 100644 --- a/packages/@react-aria/focus/src/virtualFocus.ts +++ b/packages/@react-aria/focus/src/virtualFocus.ts @@ -1,4 +1,4 @@ -import {getActiveElement, getOwnerDocument} from '@react-aria/utils'; +import {getActiveElement, getOwnerDocument} from '@react-aria-nutrient/utils'; export function moveVirtualFocus(to: Element | null): void { let from = getVirtuallyFocusedElement(getOwnerDocument(to)); diff --git a/packages/@react-aria/focus/test/FocusScope.test.js b/packages/@react-aria/focus/test/FocusScope.test.js index b9a53f4d20f..a5ffd22aa9f 100644 --- a/packages/@react-aria/focus/test/FocusScope.test.js +++ b/packages/@react-aria/focus/test/FocusScope.test.js @@ -20,7 +20,7 @@ import {Provider} from '@react-spectrum/provider'; import React, {useEffect, useState} from 'react'; import ReactDOM from 'react-dom'; import {Example as StorybookExample} from '../stories/FocusScope.stories'; -import {useEvent} from '@react-aria/utils'; +import {useEvent} from '@react-aria-nutrient/utils'; import userEvent from '@testing-library/user-event'; describe('FocusScope', function () { diff --git a/packages/@react-aria/form/README.md b/packages/@react-aria/form/README.md index 4774dc19e61..906de169293 100644 --- a/packages/@react-aria/form/README.md +++ b/packages/@react-aria/form/README.md @@ -1,3 +1,3 @@ -# @react-aria/form +# @react-aria-nutrient/form This package is part of [react-spectrum](https://github.com/adobe/react-spectrum). See the repo for more details. diff --git a/packages/@react-aria/form/package.json b/packages/@react-aria/form/package.json index 3fd1e40508f..1c9415fbc02 100644 --- a/packages/@react-aria/form/package.json +++ b/packages/@react-aria/form/package.json @@ -1,5 +1,5 @@ { - "name": "@react-aria/form", + "name": "@react-aria-nutrient/form", "version": "3.0.14", "description": "Spectrum UI components in React", "license": "Apache-2.0", @@ -22,8 +22,8 @@ "url": "https://github.com/adobe/react-spectrum" }, "dependencies": { - "@react-aria/interactions": "^3.24.1", - "@react-aria/utils": "^3.28.1", + "@react-aria-nutrient/interactions": "^3.24.1", + "@react-aria-nutrient/utils": "^3.28.1", "@react-stately/form": "^3.1.2", "@react-types/shared": "^3.28.0", "@swc/helpers": "^0.5.0" diff --git a/packages/@react-aria/form/src/useFormValidation.ts b/packages/@react-aria/form/src/useFormValidation.ts index e876ca66173..896c5d8f5a0 100644 --- a/packages/@react-aria/form/src/useFormValidation.ts +++ b/packages/@react-aria/form/src/useFormValidation.ts @@ -12,9 +12,9 @@ import {FormValidationState} from '@react-stately/form'; import {RefObject, Validation, ValidationResult} from '@react-types/shared'; -import {setInteractionModality} from '@react-aria/interactions'; +import {setInteractionModality} from '@react-aria-nutrient/interactions'; import {useEffect} from 'react'; -import {useEffectEvent, useLayoutEffect} from '@react-aria/utils'; +import {useEffectEvent, useLayoutEffect} from '@react-aria-nutrient/utils'; type ValidatableElement = HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement; diff --git a/packages/@react-aria/grid/README.md b/packages/@react-aria/grid/README.md index ef6f60ebfd4..9116221e529 100644 --- a/packages/@react-aria/grid/README.md +++ b/packages/@react-aria/grid/README.md @@ -1,3 +1,3 @@ -# @react-aria/grid +# @react-aria-nutrient/grid This package is part of [react-spectrum](https://github.com/adobe/react-spectrum). See the repo for more details. diff --git a/packages/@react-aria/grid/package.json b/packages/@react-aria/grid/package.json index b60ba563362..91682ca7b7d 100644 --- a/packages/@react-aria/grid/package.json +++ b/packages/@react-aria/grid/package.json @@ -1,5 +1,5 @@ { - "name": "@react-aria/grid", + "name": "@react-aria-nutrient/grid", "version": "3.12.1", "description": "Spectrum UI components in React", "license": "Apache-2.0", @@ -22,12 +22,12 @@ "url": "https://github.com/adobe/react-spectrum" }, "dependencies": { - "@react-aria/focus": "^3.20.1", - "@react-aria/i18n": "^3.12.7", - "@react-aria/interactions": "^3.24.1", - "@react-aria/live-announcer": "^3.4.1", - "@react-aria/selection": "^3.23.1", - "@react-aria/utils": "^3.28.1", + "@react-aria-nutrient/focus": "^3.20.1", + "@react-aria-nutrient/i18n": "^3.12.7", + "@react-aria-nutrient/interactions": "^3.24.1", + "@react-aria-nutrient/live-announcer": "^3.4.1", + "@react-aria-nutrient/selection": "^3.23.1", + "@react-aria-nutrient/utils": "^3.28.1", "@react-stately/collections": "^3.12.2", "@react-stately/grid": "^3.11.0", "@react-stately/selection": "^3.20.0", diff --git a/packages/@react-aria/grid/src/GridKeyboardDelegate.ts b/packages/@react-aria/grid/src/GridKeyboardDelegate.ts index 34ac7155392..67bb1bfe65c 100644 --- a/packages/@react-aria/grid/src/GridKeyboardDelegate.ts +++ b/packages/@react-aria/grid/src/GridKeyboardDelegate.ts @@ -11,7 +11,7 @@ */ import {Direction, DisabledBehavior, Key, KeyboardDelegate, LayoutDelegate, Node, Rect, RefObject, Size} from '@react-types/shared'; -import {DOMLayoutDelegate} from '@react-aria/selection'; +import {DOMLayoutDelegate} from '@react-aria-nutrient/selection'; import {getChildNodes, getFirstItem, getLastItem, getNthItem} from '@react-stately/collections'; import {GridCollection, GridNode} from '@react-types/grid'; diff --git a/packages/@react-aria/grid/src/useGrid.ts b/packages/@react-aria/grid/src/useGrid.ts index 0ebab0ecab7..50b0ad96c79 100644 --- a/packages/@react-aria/grid/src/useGrid.ts +++ b/packages/@react-aria/grid/src/useGrid.ts @@ -11,17 +11,17 @@ */ import {AriaLabelingProps, DOMAttributes, DOMProps, Key, KeyboardDelegate, RefObject} from '@react-types/shared'; -import {filterDOMProps, mergeProps, useId} from '@react-aria/utils'; +import {filterDOMProps, mergeProps, useId} from '@react-aria-nutrient/utils'; import {GridCollection} from '@react-types/grid'; import {GridKeyboardDelegate} from './GridKeyboardDelegate'; import {gridMap} from './utils'; import {GridState} from '@react-stately/grid'; import {useCallback, useMemo} from 'react'; -import {useCollator, useLocale} from '@react-aria/i18n'; +import {useCollator, useLocale} from '@react-aria-nutrient/i18n'; import {useGridSelectionAnnouncement} from './useGridSelectionAnnouncement'; -import {useHasTabbableChild} from '@react-aria/focus'; +import {useHasTabbableChild} from '@react-aria-nutrient/focus'; import {useHighlightSelectionDescription} from './useHighlightSelectionDescription'; -import {useSelectableCollection} from '@react-aria/selection'; +import {useSelectableCollection} from '@react-aria-nutrient/selection'; export interface GridProps extends DOMProps, AriaLabelingProps { /** Whether the grid uses virtual scrolling. */ @@ -53,7 +53,16 @@ export interface GridProps extends DOMProps, AriaLabelingProps { /** Handler that is called when a user performs an action on the row. */ onRowAction?: (key: Key) => void, /** Handler that is called when a user performs an action on the cell. */ - onCellAction?: (key: Key) => void + onCellAction?: (key: Key) => void, + /** + * Whether pressing the escape key should clear selection in the grid or not. + * + * Most experiences should not modify this option as it eliminates a keyboard user's ability to + * easily clear selection. Only use if the escape key is being handled externally or should not + * trigger selection clearing contextually. + * @default 'clearSelection' + */ + escapeKeyBehavior?: 'clearSelection' | 'none' } export interface GridAria { @@ -77,7 +86,8 @@ export function useGrid(props: GridProps, state: GridState(props: GridProps, state: GridState { /** An object representing the grid row. Contains all the relevant information that makes up the grid row. */ diff --git a/packages/@react-aria/grid/src/useGridSelectionAnnouncement.ts b/packages/@react-aria/grid/src/useGridSelectionAnnouncement.ts index 122aa695a6b..4fb1ce7795f 100644 --- a/packages/@react-aria/grid/src/useGridSelectionAnnouncement.ts +++ b/packages/@react-aria/grid/src/useGridSelectionAnnouncement.ts @@ -10,13 +10,13 @@ * governing permissions and limitations under the License. */ -import {announce} from '@react-aria/live-announcer'; +import {announce} from '@react-aria-nutrient/live-announcer'; import {Collection, Key, Node, Selection} from '@react-types/shared'; // @ts-ignore import intlMessages from '../intl/*.json'; import {SelectionManager} from '@react-stately/selection'; -import {useEffectEvent, useUpdateEffect} from '@react-aria/utils'; -import {useLocalizedStringFormatter} from '@react-aria/i18n'; +import {useEffectEvent, useUpdateEffect} from '@react-aria-nutrient/utils'; +import {useLocalizedStringFormatter} from '@react-aria-nutrient/i18n'; import {useRef} from 'react'; export interface GridSelectionAnnouncementProps { @@ -40,7 +40,7 @@ export function useGridSelectionAnnouncement(props: GridSelectionAnnouncement let { getRowText = (key) => state.collection.getTextValue?.(key) ?? state.collection.getItem(key)?.textValue } = props; - let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-aria/grid'); + let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-aria-nutrient/grid'); // Many screen readers do not announce when items in a grid are selected/deselected. // We do this using an ARIA live region. diff --git a/packages/@react-aria/grid/src/useGridSelectionCheckbox.ts b/packages/@react-aria/grid/src/useGridSelectionCheckbox.ts index 7326146fb57..4e7e430371b 100644 --- a/packages/@react-aria/grid/src/useGridSelectionCheckbox.ts +++ b/packages/@react-aria/grid/src/useGridSelectionCheckbox.ts @@ -4,8 +4,8 @@ import {GridState} from '@react-stately/grid'; // @ts-ignore import intlMessages from '../intl/*.json'; import {Key} from '@react-types/shared'; -import {useId} from '@react-aria/utils'; -import {useLocalizedStringFormatter} from '@react-aria/i18n'; +import {useId} from '@react-aria-nutrient/utils'; +import {useLocalizedStringFormatter} from '@react-aria-nutrient/i18n'; export interface AriaGridSelectionCheckboxProps { /** A unique key for the checkbox. */ @@ -34,7 +34,7 @@ export function useGridSelectionCheckbox>(props: // Checkbox should always toggle selection, regardless of selectionBehavior. let onChange = () => manager.toggleSelection(key); - const stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-aria/grid'); + const stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-aria-nutrient/grid'); return { checkboxProps: { diff --git a/packages/@react-aria/grid/src/useHighlightSelectionDescription.ts b/packages/@react-aria/grid/src/useHighlightSelectionDescription.ts index 1d13c402ea9..688eab4b79a 100644 --- a/packages/@react-aria/grid/src/useHighlightSelectionDescription.ts +++ b/packages/@react-aria/grid/src/useHighlightSelectionDescription.ts @@ -14,9 +14,9 @@ import {AriaLabelingProps} from '@react-types/shared'; // @ts-ignore import intlMessages from '../intl/*.json'; import {MultipleSelectionManager} from '@react-stately/selection'; -import {useDescription} from '@react-aria/utils'; -import {useInteractionModality} from '@react-aria/interactions'; -import {useLocalizedStringFormatter} from '@react-aria/i18n'; +import {useDescription} from '@react-aria-nutrient/utils'; +import {useInteractionModality} from '@react-aria-nutrient/interactions'; +import {useLocalizedStringFormatter} from '@react-aria-nutrient/i18n'; import {useMemo} from 'react'; export interface HighlightSelectionDescriptionProps { @@ -29,7 +29,7 @@ export interface HighlightSelectionDescriptionProps { * @param props */ export function useHighlightSelectionDescription(props: HighlightSelectionDescriptionProps): AriaLabelingProps { - let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-aria/grid'); + let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-aria-nutrient/grid'); let modality = useInteractionModality(); // null is the default if the user hasn't interacted with the table at all yet or the rest of the page let shouldLongPress = (modality === 'pointer' || modality === 'virtual' || modality == null) diff --git a/packages/@react-aria/grid/stories/example.tsx b/packages/@react-aria/grid/stories/example.tsx index 46c2aa44e47..a5680628e21 100644 --- a/packages/@react-aria/grid/stories/example.tsx +++ b/packages/@react-aria/grid/stories/example.tsx @@ -11,9 +11,9 @@ */ import {GridCollection, useGridState} from '@react-stately/grid'; -import {mergeProps} from '@react-aria/utils'; +import {mergeProps} from '@react-aria-nutrient/utils'; import React from 'react'; -import {useFocus} from '@react-aria/interactions'; +import {useFocus} from '@react-aria-nutrient/interactions'; import {useGrid, useGridCell, useGridRow} from '../'; import {useListState} from '@react-stately/list'; diff --git a/packages/@react-aria/gridlist/README.md b/packages/@react-aria/gridlist/README.md index a1a6da698da..5360d352191 100644 --- a/packages/@react-aria/gridlist/README.md +++ b/packages/@react-aria/gridlist/README.md @@ -1,3 +1,3 @@ -# @react-aria/gridlist +# @react-aria-nutrient/gridlist This package is part of [react-spectrum](https://github.com/adobe/react-spectrum). See the repo for more details. diff --git a/packages/@react-aria/gridlist/docs/useGridList.mdx b/packages/@react-aria/gridlist/docs/useGridList.mdx index 92fe5bde2ad..c8766e86138 100644 --- a/packages/@react-aria/gridlist/docs/useGridList.mdx +++ b/packages/@react-aria/gridlist/docs/useGridList.mdx @@ -10,17 +10,17 @@ governing permissions and limitations under the License. */} import {Layout} from '@react-spectrum/docs'; export default Layout; -import docs from 'docs:@react-aria/gridlist'; +import docs from 'docs:@react-aria-nutrient/gridlist'; import ChevronRight from '@spectrum-icons/workflow/ChevronRight'; import collectionsDocs from 'docs:@react-types/shared/src/collections.d.ts'; import selectionDocs from 'docs:@react-stately/selection'; import statelyDocs from 'docs:@react-stately/list'; -import focusDocs from 'docs:@react-aria/focus'; -import checkboxDocs from 'docs:@react-aria/checkbox'; -import utilsDocs from 'docs:@react-aria/utils'; +import focusDocs from 'docs:@react-aria-nutrient/focus'; +import checkboxDocs from 'docs:@react-aria-nutrient/checkbox'; +import utilsDocs from 'docs:@react-aria-nutrient/utils'; import {HeaderInfo, FunctionAPI, TypeContext, InterfaceType, TypeLink, PageDescription} from '@react-spectrum/docs'; import {Keyboard} from '@react-spectrum/text'; -import packageData from '@react-aria/gridlist/package.json'; +import packageData from '@react-aria-nutrient/gridlist/package.json'; import Anatomy from './anatomy.svg'; --- @@ -125,10 +125,10 @@ You may notice the extra `
` with `gridCellProps` in our example. This is ne ```tsx example export=true render=false import {useListState} from '@react-stately/list'; -import {mergeProps} from '@react-aria/utils'; +import {mergeProps} from '@react-aria-nutrient/utils'; import {useRef} from 'react'; -import {useFocusRing} from '@react-aria/focus'; -import {useGridList, useGridListItem} from '@react-aria/gridlist'; +import {useFocusRing} from '@react-aria-nutrient/focus'; +import {useGridList, useGridListItem} from '@react-aria-nutrient/gridlist'; function List(props) { let state = useListState(props); @@ -274,7 +274,7 @@ checks or unchecks the checkbox, the row will be added or removed from the List' The `Checkbox` component used in this example is independent and can be used separately from `useGridList`. The code is available below. ```tsx example export=true render=false -import {useGridListSelectionCheckbox} from '@react-aria/gridlist'; +import {useGridListSelectionCheckbox} from '@react-aria-nutrient/gridlist'; // Reuse the Checkbox from your component library. See below for details. import {Checkbox} from 'your-component-library'; @@ -320,7 +320,7 @@ The `Checkbox` component is used in the above example for row selection. It is b Show code ```tsx example export=true render=false -import {useCheckbox} from '@react-aria/checkbox'; +import {useCheckbox} from '@react-aria-nutrient/checkbox'; import {useToggleState} from '@react-stately/toggle'; function Checkbox(props) { @@ -344,7 +344,7 @@ The `Button` component is used in the above example to show how rows can contain Show code ```tsx example export=true render=false -import {useButton} from '@react-aria/button'; +import {useButton} from '@react-aria-nutrient/button'; function Button(props) { let ref = React.useRef(null); diff --git a/packages/@react-aria/gridlist/package.json b/packages/@react-aria/gridlist/package.json index 6b45c540c95..f57ba881082 100644 --- a/packages/@react-aria/gridlist/package.json +++ b/packages/@react-aria/gridlist/package.json @@ -1,5 +1,5 @@ { - "name": "@react-aria/gridlist", + "name": "@react-aria-nutrient/gridlist", "version": "3.11.1", "description": "Spectrum UI components in React", "license": "Apache-2.0", @@ -22,12 +22,12 @@ "url": "https://github.com/adobe/react-spectrum" }, "dependencies": { - "@react-aria/focus": "^3.20.1", - "@react-aria/grid": "^3.12.1", - "@react-aria/i18n": "^3.12.7", - "@react-aria/interactions": "^3.24.1", - "@react-aria/selection": "^3.23.1", - "@react-aria/utils": "^3.28.1", + "@react-aria-nutrient/focus": "^3.20.1", + "@react-aria-nutrient/grid": "^3.12.1", + "@react-aria-nutrient/i18n": "^3.12.7", + "@react-aria-nutrient/interactions": "^3.24.1", + "@react-aria-nutrient/selection": "^3.23.1", + "@react-aria-nutrient/utils": "^3.28.1", "@react-stately/collections": "^3.12.2", "@react-stately/list": "^3.12.0", "@react-stately/tree": "^3.8.8", diff --git a/packages/@react-aria/gridlist/src/index.ts b/packages/@react-aria/gridlist/src/index.ts index 740ca23b200..316200b1f19 100644 --- a/packages/@react-aria/gridlist/src/index.ts +++ b/packages/@react-aria/gridlist/src/index.ts @@ -16,4 +16,4 @@ export {useGridListSelectionCheckbox} from './useGridListSelectionCheckbox'; export type {AriaGridListOptions, AriaGridListProps, GridListAria, GridListProps} from './useGridList'; export type {AriaGridListItemOptions, GridListItemAria} from './useGridListItem'; -export type {AriaGridSelectionCheckboxProps, GridSelectionCheckboxAria} from '@react-aria/grid'; +export type {AriaGridSelectionCheckboxProps, GridSelectionCheckboxAria} from '@react-aria-nutrient/grid'; diff --git a/packages/@react-aria/gridlist/src/useGridList.ts b/packages/@react-aria/gridlist/src/useGridList.ts index bae0b872949..c5be7917225 100644 --- a/packages/@react-aria/gridlist/src/useGridList.ts +++ b/packages/@react-aria/gridlist/src/useGridList.ts @@ -23,12 +23,12 @@ import { MultipleSelection, RefObject } from '@react-types/shared'; -import {filterDOMProps, mergeProps, useId} from '@react-aria/utils'; +import {filterDOMProps, mergeProps, useId} from '@react-aria-nutrient/utils'; import {listMap} from './utils'; import {ListState} from '@react-stately/list'; -import {useGridSelectionAnnouncement, useHighlightSelectionDescription} from '@react-aria/grid'; -import {useHasTabbableChild} from '@react-aria/focus'; -import {useSelectableList} from '@react-aria/selection'; +import {useGridSelectionAnnouncement, useHighlightSelectionDescription} from '@react-aria-nutrient/grid'; +import {useHasTabbableChild} from '@react-aria-nutrient/focus'; +import {useSelectableList} from '@react-aria-nutrient/selection'; export interface GridListProps extends CollectionBase, MultipleSelection { /** Whether to auto focus the gridlist or an option. */ @@ -48,7 +48,16 @@ export interface AriaGridListProps extends GridListProps, DOMProps, AriaLa * via the left/right arrow keys or the tab key. * @default 'arrow' */ - keyboardNavigationBehavior?: 'arrow' | 'tab' + keyboardNavigationBehavior?: 'arrow' | 'tab', + /** + * Whether pressing the escape key should clear selection in the grid list or not. + * + * Most experiences should not modify this option as it eliminates a keyboard user's ability to + * easily clear selection. Only use if the escape key is being handled externally or should not + * trigger selection clearing contextually. + * @default 'clearSelection' + */ + escapeKeyBehavior?: 'clearSelection' | 'none' } export interface AriaGridListOptions extends Omit, 'children'> { @@ -105,7 +114,8 @@ export function useGridList(props: AriaGridListOptions, state: ListState(props: AriaGridListOptions, state: ListState(props: AriaGridListItemOptions, state: ListSt shouldSelectOnPressUp } = props; - // let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-aria/gridlist'); + // let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-aria-nutrient/gridlist'); let {direction} = useLocale(); let {onAction, linkBehavior, keyboardNavigationBehavior} = listMap.get(state)!; let descriptionId = useSlotId(); diff --git a/packages/@react-aria/gridlist/src/useGridListSelectionCheckbox.ts b/packages/@react-aria/gridlist/src/useGridListSelectionCheckbox.ts index 5e6cb874eba..6fdc91d0edb 100644 --- a/packages/@react-aria/gridlist/src/useGridListSelectionCheckbox.ts +++ b/packages/@react-aria/gridlist/src/useGridListSelectionCheckbox.ts @@ -10,7 +10,7 @@ * governing permissions and limitations under the License. */ -import {AriaGridSelectionCheckboxProps, GridSelectionCheckboxAria, useGridSelectionCheckbox} from '@react-aria/grid'; +import {AriaGridSelectionCheckboxProps, GridSelectionCheckboxAria, useGridSelectionCheckbox} from '@react-aria-nutrient/grid'; import {getRowId} from './utils'; import type {ListState} from '@react-stately/list'; diff --git a/packages/@react-aria/i18n/README.md b/packages/@react-aria/i18n/README.md index beb54298353..47cb684dd8b 100644 --- a/packages/@react-aria/i18n/README.md +++ b/packages/@react-aria/i18n/README.md @@ -1,3 +1,3 @@ -# @react-aria/i18n +# @react-aria-nutrient/i18n This package is part of [react-spectrum](https://github.com/adobe/react-spectrum). See the repo for more details. diff --git a/packages/@react-aria/i18n/docs/I18nProvider.mdx b/packages/@react-aria/i18n/docs/I18nProvider.mdx index 15572f2f390..68f54077956 100644 --- a/packages/@react-aria/i18n/docs/I18nProvider.mdx +++ b/packages/@react-aria/i18n/docs/I18nProvider.mdx @@ -10,9 +10,9 @@ governing permissions and limitations under the License. */} import {Layout} from '@react-spectrum/docs'; export default Layout; -import docs from 'docs:@react-aria/i18n'; +import docs from 'docs:@react-aria-nutrient/i18n'; import {HeaderInfo, TypeContext, PropTable, TypeLink, PageDescription} from '@react-spectrum/docs'; -import packageData from '@react-aria/i18n/package.json'; +import packageData from '@react-aria-nutrient/i18n/package.json'; --- category: Internationalization @@ -41,7 +41,7 @@ information via [useLocale](useLocale.html). ## Example ```tsx -import {I18nProvider} from '@react-aria/i18n'; +import {I18nProvider} from '@react-aria-nutrient/i18n'; diff --git a/packages/@react-aria/i18n/docs/internationalization.mdx b/packages/@react-aria/i18n/docs/internationalization.mdx index 7a8f0968077..9a0603b5232 100644 --- a/packages/@react-aria/i18n/docs/internationalization.mdx +++ b/packages/@react-aria/i18n/docs/internationalization.mdx @@ -158,11 +158,11 @@ By default, React Aria includes translations for all of the languages listed abo ### webpack -First, install `@react-aria/optimize-locales-plugin` with your package manager. Then, add the following to your `webpack.config.js` and change the `locales` setting accordingly: +First, install `@react-aria-nutrient/optimize-locales-plugin` with your package manager. Then, add the following to your `webpack.config.js` and change the `locales` setting accordingly: ```ts // webpack.config.js -const optimizeLocales = require('@react-aria/optimize-locales-plugin'); +const optimizeLocales = require('@react-aria-nutrient/optimize-locales-plugin'); module.exports = { // ... @@ -176,11 +176,11 @@ module.exports = { ### Next.js -First, install `@react-aria/optimize-locales-plugin` with your package manager. Then, add the following to your `next.config.js` and change the `locales` setting accordingly: +First, install `@react-aria-nutrient/optimize-locales-plugin` with your package manager. Then, add the following to your `next.config.js` and change the `locales` setting accordingly: ```ts // next.config.js -const optimizeLocales = require('@react-aria/optimize-locales-plugin'); +const optimizeLocales = require('@react-aria-nutrient/optimize-locales-plugin'); module.exports = { webpack(config) { @@ -196,11 +196,11 @@ module.exports = { ### Vite -First, install `@react-aria/optimize-locales-plugin` with your package manager. Then, add the following to your `vite.config.js` and change the `locales` setting accordingly: +First, install `@react-aria-nutrient/optimize-locales-plugin` with your package manager. Then, add the following to your `vite.config.js` and change the `locales` setting accordingly: ```ts // vite.config.js -import optimizeLocales from '@react-aria/optimize-locales-plugin'; +import optimizeLocales from '@react-aria-nutrient/optimize-locales-plugin'; export default { plugins: [ @@ -216,11 +216,11 @@ export default { ### Rollup -First, install `@react-aria/optimize-locales-plugin` with your package manager. Then, add the following to your `rollup.config.js` and change the `locales` setting accordingly: +First, install `@react-aria-nutrient/optimize-locales-plugin` with your package manager. Then, add the following to your `rollup.config.js` and change the `locales` setting accordingly: ```ts // rollup.config.js -import optimizeLocales from '@react-aria/optimize-locales-plugin'; +import optimizeLocales from '@react-aria-nutrient/optimize-locales-plugin'; export default { plugins: [ @@ -233,11 +233,11 @@ export default { ### Esbuild -First, install `@react-aria/optimize-locales-plugin` with your package manager. Then, add the following to your esbuild script and change the `locales` setting accordingly: +First, install `@react-aria-nutrient/optimize-locales-plugin` with your package manager. Then, add the following to your esbuild script and change the `locales` setting accordingly: ```ts import {build} from 'esbuild'; -import optimizeLocales from '@react-aria/optimize-locales-plugin'; +import optimizeLocales from '@react-aria-nutrient/optimize-locales-plugin'; build({ plugins: [ @@ -250,12 +250,12 @@ build({ ### Parcel -First, install `@react-aria/parcel-resolver-optimize-locales` with your package manager. Then, add the following to your `.parcelrc`: +First, install `@react-aria-nutrient/parcel-resolver-optimize-locales` with your package manager. Then, add the following to your `.parcelrc`: ```json { "extends": "@parcel/config-default", - "resolvers": ["@react-aria/parcel-resolver-optimize-locales", "..."] + "resolvers": ["@react-aria-nutrient/parcel-resolver-optimize-locales", "..."] } ``` diff --git a/packages/@react-aria/i18n/docs/useCollator.mdx b/packages/@react-aria/i18n/docs/useCollator.mdx index 84f452c3beb..190a73d7749 100644 --- a/packages/@react-aria/i18n/docs/useCollator.mdx +++ b/packages/@react-aria/i18n/docs/useCollator.mdx @@ -10,9 +10,9 @@ governing permissions and limitations under the License. */} import {Layout} from '@react-spectrum/docs'; export default Layout; -import docs from 'docs:@react-aria/i18n'; +import docs from 'docs:@react-aria-nutrient/i18n'; import {ClassAPI, HeaderInfo, TypeContext, FunctionAPI, TypeLink, PageDescription} from '@react-spectrum/docs'; -import packageData from '@react-aria/i18n/package.json'; +import packageData from '@react-aria-nutrient/i18n/package.json'; --- category: Internationalization @@ -44,7 +44,7 @@ information. This example includes two textfields and compares the values of the two fields using a collator according to the current locale. ```tsx example -import {useCollator} from '@react-aria/i18n'; +import {useCollator} from '@react-aria-nutrient/i18n'; function Example() { let [first, setFirst] = React.useState(''); diff --git a/packages/@react-aria/i18n/docs/useDateFormatter.mdx b/packages/@react-aria/i18n/docs/useDateFormatter.mdx index 8e9162cac5a..91af9dd11d9 100644 --- a/packages/@react-aria/i18n/docs/useDateFormatter.mdx +++ b/packages/@react-aria/i18n/docs/useDateFormatter.mdx @@ -10,9 +10,9 @@ governing permissions and limitations under the License. */} import {Layout} from '@react-spectrum/docs'; export default Layout; -import docs from 'docs:@react-aria/i18n'; +import docs from 'docs:@react-aria-nutrient/i18n'; import {ClassAPI, HeaderInfo, TypeContext, FunctionAPI, TypeLink, PageDescription} from '@react-spectrum/docs'; -import packageData from '@react-aria/i18n/package.json'; +import packageData from '@react-aria-nutrient/i18n/package.json'; --- category: Internationalization @@ -45,7 +45,7 @@ This example displays the current date for two locales: USA, and Russia. Two ins using the [I18nProvider](I18nProvider.html) to specify the locale to display. ```tsx example -import {I18nProvider, useDateFormatter} from '@react-aria/i18n'; +import {I18nProvider, useDateFormatter} from '@react-aria-nutrient/i18n'; function CurrentDate() { let formatter = useDateFormatter(); diff --git a/packages/@react-aria/i18n/docs/useFilter.mdx b/packages/@react-aria/i18n/docs/useFilter.mdx index 8e427d57df9..cf4bbb96eae 100644 --- a/packages/@react-aria/i18n/docs/useFilter.mdx +++ b/packages/@react-aria/i18n/docs/useFilter.mdx @@ -10,9 +10,9 @@ governing permissions and limitations under the License. */} import {Layout} from '@react-spectrum/docs'; export default Layout; -import docs from 'docs:@react-aria/i18n'; +import docs from 'docs:@react-aria-nutrient/i18n'; import {ClassAPI, HeaderInfo, TypeContext, FunctionAPI, TypeLink, PageDescription} from '@react-spectrum/docs'; -import packageData from '@react-aria/i18n/package.json'; +import packageData from '@react-aria-nutrient/i18n/package.json'; --- category: Internationalization @@ -49,7 +49,7 @@ The following example implements a filterable list using a `contains` matching s and diacritics. ```tsx example -import {useFilter} from '@react-aria/i18n'; +import {useFilter} from '@react-aria-nutrient/i18n'; function Example() { const composers = [ diff --git a/packages/@react-aria/i18n/docs/useLocale.mdx b/packages/@react-aria/i18n/docs/useLocale.mdx index 61e90c08e30..8d8b1c56253 100644 --- a/packages/@react-aria/i18n/docs/useLocale.mdx +++ b/packages/@react-aria/i18n/docs/useLocale.mdx @@ -10,9 +10,9 @@ governing permissions and limitations under the License. */} import {Layout} from '@react-spectrum/docs'; export default Layout; -import docs from 'docs:@react-aria/i18n'; +import docs from 'docs:@react-aria-nutrient/i18n'; import {ClassAPI, HeaderInfo, TypeContext, FunctionAPI, TypeLink, PageDescription} from '@react-spectrum/docs'; -import packageData from '@react-aria/i18n/package.json'; +import packageData from '@react-aria-nutrient/i18n/package.json'; --- category: Internationalization @@ -49,7 +49,7 @@ so that the browser knows which language and direction the user interface should ## Example ```tsx -import {useLocale} from '@react-aria/i18n'; +import {useLocale} from '@react-aria-nutrient/i18n'; function YourApp() { let {locale, direction} = useLocale(); diff --git a/packages/@react-aria/i18n/docs/useNumberFormatter.mdx b/packages/@react-aria/i18n/docs/useNumberFormatter.mdx index 1a8dcb3c559..a2c909aa94d 100644 --- a/packages/@react-aria/i18n/docs/useNumberFormatter.mdx +++ b/packages/@react-aria/i18n/docs/useNumberFormatter.mdx @@ -10,9 +10,9 @@ governing permissions and limitations under the License. */} import {Layout} from '@react-spectrum/docs'; export default Layout; -import docs from 'docs:@react-aria/i18n'; +import docs from 'docs:@react-aria-nutrient/i18n'; import {ClassAPI, HeaderInfo, TypeContext, FunctionAPI, TypeLink, PageDescription} from '@react-spectrum/docs'; -import packageData from '@react-aria/i18n/package.json'; +import packageData from '@react-aria-nutrient/i18n/package.json'; --- category: Internationalization @@ -45,7 +45,7 @@ This example displays a currency value for two locales: USA, and Germany. Two in using the [I18nProvider](I18nProvider.html) to specify the locale to display. ```tsx example -import {I18nProvider, useNumberFormatter} from '@react-aria/i18n'; +import {I18nProvider, useNumberFormatter} from '@react-aria-nutrient/i18n'; function Currency({value, currency}) { let formatter = useNumberFormatter({ diff --git a/packages/@react-aria/i18n/package.json b/packages/@react-aria/i18n/package.json index f0f6eace1b1..6f419ef9238 100644 --- a/packages/@react-aria/i18n/package.json +++ b/packages/@react-aria/i18n/package.json @@ -1,5 +1,5 @@ { - "name": "@react-aria/i18n", + "name": "@react-aria-nutrient/i18n", "version": "3.12.7", "description": "Spectrum UI components in React", "license": "Apache-2.0", @@ -51,8 +51,8 @@ "@internationalized/message": "^3.1.6", "@internationalized/number": "^3.6.0", "@internationalized/string": "^3.2.5", - "@react-aria/ssr": "^3.9.7", - "@react-aria/utils": "^3.28.1", + "@react-aria-nutrient/ssr": "^3.9.7", + "@react-aria-nutrient/utils": "^3.28.1", "@react-types/shared": "^3.28.0", "@swc/helpers": "^0.5.0" }, diff --git a/packages/@react-aria/i18n/src/useDateFormatter.ts b/packages/@react-aria/i18n/src/useDateFormatter.ts index 482ea626dbc..a152a19cb16 100644 --- a/packages/@react-aria/i18n/src/useDateFormatter.ts +++ b/packages/@react-aria/i18n/src/useDateFormatter.ts @@ -11,7 +11,7 @@ */ import {DateFormatter} from '@internationalized/date'; -import {useDeepMemo} from '@react-aria/utils'; +import {useDeepMemo} from '@react-aria-nutrient/utils'; import {useLocale} from './context'; import {useMemo} from 'react'; diff --git a/packages/@react-aria/i18n/src/useDefaultLocale.ts b/packages/@react-aria/i18n/src/useDefaultLocale.ts index 456f68764c7..1930fbb05dd 100644 --- a/packages/@react-aria/i18n/src/useDefaultLocale.ts +++ b/packages/@react-aria/i18n/src/useDefaultLocale.ts @@ -13,7 +13,7 @@ import {Direction} from '@react-types/shared'; import {isRTL} from './utils'; import {useEffect, useState} from 'react'; -import {useIsSSR} from '@react-aria/ssr'; +import {useIsSSR} from '@react-aria-nutrient/ssr'; export interface Locale { /** The [BCP47](https://www.ietf.org/rfc/bcp/bcp47.txt) language code for the locale. */ diff --git a/packages/@react-aria/i18n/test/server.test.js b/packages/@react-aria/i18n/test/server.test.js index ce8c58515b0..a52d52dc017 100644 --- a/packages/@react-aria/i18n/test/server.test.js +++ b/packages/@react-aria/i18n/test/server.test.js @@ -14,14 +14,14 @@ import {getPackageLocalizationScript} from '../src/server'; describe('i18n server', () => { it('should generate a script with localized strings', () => { let res = getPackageLocalizationScript('en-US', { - '@react-aria/button': { + '@react-aria-nutrient/button': { test: 'foo' }, - '@react-aria/checkbox': { + '@react-aria-nutrient/checkbox': { test: 'foo' } }); - expect(res).toBe("window[Symbol.for('react-aria.i18n.locale')]=\"en-US\";{let A=\"foo\";window[Symbol.for('react-aria.i18n.strings')]={'@react-aria/button':{test:A},'@react-aria/checkbox':{test:A}};}"); + expect(res).toBe("window[Symbol.for('react-aria.i18n.locale')]=\"en-US\";{let A=\"foo\";window[Symbol.for('react-aria.i18n.strings')]={'@react-aria-nutrient/button':{test:A},'@react-aria-nutrient/checkbox':{test:A}};}"); }); }); diff --git a/packages/@react-aria/interactions/README.md b/packages/@react-aria/interactions/README.md index 9e96a6135af..e4083732fa2 100644 --- a/packages/@react-aria/interactions/README.md +++ b/packages/@react-aria/interactions/README.md @@ -1,3 +1,3 @@ -# @react-aria/interactions +# @react-aria-nutrient/interactions This package is part of [react-spectrum](https://github.com/adobe/react-spectrum). See the repo for more details. diff --git a/packages/@react-aria/interactions/docs/useFocus.mdx b/packages/@react-aria/interactions/docs/useFocus.mdx index 6894325dd76..835647f9e11 100644 --- a/packages/@react-aria/interactions/docs/useFocus.mdx +++ b/packages/@react-aria/interactions/docs/useFocus.mdx @@ -10,10 +10,10 @@ governing permissions and limitations under the License. */} import {Layout} from '@react-spectrum/docs'; export default Layout; -import docs from 'docs:@react-aria/interactions'; +import docs from 'docs:@react-aria-nutrient/interactions'; import typesDocs from 'docs:@react-types/shared/src/events.d.ts'; import {HeaderInfo, FunctionAPI, TypeContext, InterfaceType, TypeLink, PageDescription} from '@react-spectrum/docs'; -import packageData from '@react-aria/interactions/package.json'; +import packageData from '@react-aria-nutrient/interactions/package.json'; --- category: Interactions @@ -63,7 +63,7 @@ This example shows a simple input element that handles focus events with `useFoc **NOTE: for more advanced text field functionality, see [useTextField](useTextField.html).** ```tsx example -import {useFocus} from '@react-aria/interactions'; +import {useFocus} from '@react-aria-nutrient/interactions'; function Example() { let [events, setEvents] = React.useState([]); diff --git a/packages/@react-aria/interactions/docs/useFocusVisible.mdx b/packages/@react-aria/interactions/docs/useFocusVisible.mdx index 3973ea4dda2..d81facf7fcf 100644 --- a/packages/@react-aria/interactions/docs/useFocusVisible.mdx +++ b/packages/@react-aria/interactions/docs/useFocusVisible.mdx @@ -10,10 +10,10 @@ governing permissions and limitations under the License. */} import {Layout} from '@react-spectrum/docs'; export default Layout; -import docs from 'docs:@react-aria/interactions'; +import docs from 'docs:@react-aria-nutrient/interactions'; import typesDocs from 'docs:@react-types/shared/src/events.d.ts'; import {HeaderInfo, FunctionAPI, TypeContext, InterfaceType, TypeLink, PageDescription} from '@react-spectrum/docs'; -import packageData from '@react-aria/interactions/package.json'; +import packageData from '@react-aria-nutrient/interactions/package.json'; --- category: Interactions @@ -56,7 +56,7 @@ cause focus visible state to appear. This prevents focus visible state from appe typing text in a text field. ```tsx example -import {useFocusVisible} from '@react-aria/interactions'; +import {useFocusVisible} from '@react-aria-nutrient/interactions'; function Example() { let {isFocusVisible} = useFocusVisible({isTextInput: true}); diff --git a/packages/@react-aria/interactions/docs/useFocusWithin.mdx b/packages/@react-aria/interactions/docs/useFocusWithin.mdx index c56f248404c..b933d244579 100644 --- a/packages/@react-aria/interactions/docs/useFocusWithin.mdx +++ b/packages/@react-aria/interactions/docs/useFocusWithin.mdx @@ -10,10 +10,10 @@ governing permissions and limitations under the License. */} import {Layout} from '@react-spectrum/docs'; export default Layout; -import docs from 'docs:@react-aria/interactions'; +import docs from 'docs:@react-aria-nutrient/interactions'; import typesDocs from 'docs:@react-types/shared/src/events.d.ts'; import {HeaderInfo, FunctionAPI, TypeContext, InterfaceType, TypeLink, PageDescription} from '@react-spectrum/docs'; -import packageData from '@react-aria/interactions/package.json'; +import packageData from '@react-aria-nutrient/interactions/package.json'; --- category: Interactions @@ -68,7 +68,7 @@ fired when the wrapper gains and loses focus, not when focus moves within the gr **NOTE: for more advanced text field functionality, see [useTextField](useTextField.html).** ```tsx example -import {useFocusWithin} from '@react-aria/interactions'; +import {useFocusWithin} from '@react-aria-nutrient/interactions'; function Example() { let [events, setEvents] = React.useState([]); diff --git a/packages/@react-aria/interactions/docs/useHover.mdx b/packages/@react-aria/interactions/docs/useHover.mdx index 94d78dc120a..e6cf6af4afb 100644 --- a/packages/@react-aria/interactions/docs/useHover.mdx +++ b/packages/@react-aria/interactions/docs/useHover.mdx @@ -10,10 +10,10 @@ governing permissions and limitations under the License. */} import {Layout} from '@react-spectrum/docs'; export default Layout; -import docs from 'docs:@react-aria/interactions'; +import docs from 'docs:@react-aria-nutrient/interactions'; import typesDocs from 'docs:@react-types/shared/src/events.d.ts'; import {HeaderInfo, FunctionAPI, TypeContext, InterfaceType, TypeLink, PageDescription} from '@react-spectrum/docs'; -import packageData from '@react-aria/interactions/package.json'; +import packageData from '@react-aria-nutrient/interactions/package.json'; --- category: Interactions @@ -85,7 +85,7 @@ list below. It also uses the `isHovered` state to adjust the background color when the target is hovered. ```tsx example -import {useHover} from '@react-aria/interactions'; +import {useHover} from '@react-aria-nutrient/interactions'; function Example() { let [events, setEvents] = React.useState([]); diff --git a/packages/@react-aria/interactions/docs/useKeyboard.mdx b/packages/@react-aria/interactions/docs/useKeyboard.mdx index 364d36b311c..002bf25d566 100644 --- a/packages/@react-aria/interactions/docs/useKeyboard.mdx +++ b/packages/@react-aria/interactions/docs/useKeyboard.mdx @@ -10,10 +10,10 @@ governing permissions and limitations under the License. */} import {Layout} from '@react-spectrum/docs'; export default Layout; -import docs from 'docs:@react-aria/interactions'; +import docs from 'docs:@react-aria-nutrient/interactions'; import typesDocs from 'docs:@react-types/shared/src/events.d.ts'; import {HeaderInfo, FunctionAPI, TypeContext, InterfaceType, TypeLink, PageDescription} from '@react-spectrum/docs'; -import packageData from '@react-aria/interactions/package.json'; +import packageData from '@react-aria-nutrient/interactions/package.json'; --- category: Interactions @@ -61,7 +61,7 @@ This example shows a simple input element that handles keyboard events with `use **NOTE: for more advanced text field functionality, see [useTextField](useTextField.html).** ```tsx example -import {useKeyboard} from '@react-aria/interactions'; +import {useKeyboard} from '@react-aria-nutrient/interactions'; function Example() { let [events, setEvents] = React.useState([]); diff --git a/packages/@react-aria/interactions/docs/useLongPress.mdx b/packages/@react-aria/interactions/docs/useLongPress.mdx index d1e3fa45a4c..33da0e1e84c 100644 --- a/packages/@react-aria/interactions/docs/useLongPress.mdx +++ b/packages/@react-aria/interactions/docs/useLongPress.mdx @@ -10,10 +10,10 @@ governing permissions and limitations under the License. */} import {Layout} from '@react-spectrum/docs'; export default Layout; -import docs from 'docs:@react-aria/interactions'; +import docs from 'docs:@react-aria-nutrient/interactions'; import typesDocs from 'docs:@react-types/shared/src/events.d.ts'; import {HeaderInfo, FunctionAPI, TypeContext, InterfaceType, TypeLink, PageDescription} from '@react-spectrum/docs'; -import packageData from '@react-aria/interactions/package.json'; +import packageData from '@react-aria-nutrient/interactions/package.json'; --- category: Interactions @@ -80,8 +80,8 @@ this action will differ depending on the component, it is outside the scope of ` friendly alternative to all long press interactions if you are using this hook directly. ```tsx example -import {mergeProps} from '@react-aria/utils'; -import {useLongPress, usePress} from '@react-aria/interactions'; +import {mergeProps} from '@react-aria-nutrient/utils'; +import {useLongPress, usePress} from '@react-aria-nutrient/interactions'; function Example() { let [events, setEvents] = React.useState([]); diff --git a/packages/@react-aria/interactions/docs/useMove.mdx b/packages/@react-aria/interactions/docs/useMove.mdx index 1e9a0ac1150..9013dd41f61 100644 --- a/packages/@react-aria/interactions/docs/useMove.mdx +++ b/packages/@react-aria/interactions/docs/useMove.mdx @@ -10,10 +10,10 @@ governing permissions and limitations under the License. */} import {Layout} from '@react-spectrum/docs'; export default Layout; -import docs from 'docs:@react-aria/interactions'; +import docs from 'docs:@react-aria-nutrient/interactions'; import typesDocs from 'docs:@react-types/shared/src/events.d.ts'; import {HeaderInfo, FunctionAPI, TypeContext, InterfaceType, TypeLink, PageDescription} from '@react-spectrum/docs'; -import packageData from '@react-aria/interactions/package.json'; +import packageData from '@react-aria-nutrient/interactions/package.json'; --- category: Interactions @@ -74,7 +74,7 @@ the arrow keys on your keyboard. The movement is clamped so that the ball cannot In addition, all of the move events are logged below so that you can inspect what is going on. ```tsx example -import {useMove} from '@react-aria/interactions'; +import {useMove} from '@react-aria-nutrient/interactions'; function Example() { const CONTAINER_SIZE = 200; diff --git a/packages/@react-aria/interactions/docs/usePress.mdx b/packages/@react-aria/interactions/docs/usePress.mdx index 548df8e6ecb..13b5cfa55c5 100644 --- a/packages/@react-aria/interactions/docs/usePress.mdx +++ b/packages/@react-aria/interactions/docs/usePress.mdx @@ -10,11 +10,11 @@ governing permissions and limitations under the License. */} import {Layout} from '@react-spectrum/docs'; export default Layout; -import docs from 'docs:@react-aria/interactions'; +import docs from 'docs:@react-aria-nutrient/interactions'; import typesDocs from 'docs:@react-types/shared/src/events.d.ts'; import {HeaderInfo, FunctionAPI, TypeContext, InterfaceType, TypeLink, PageDescription} from '@react-spectrum/docs'; import {Keyboard} from '@react-spectrum/text'; -import packageData from '@react-aria/interactions/package.json'; +import packageData from '@react-aria-nutrient/interactions/package.json'; --- category: Interactions @@ -82,7 +82,7 @@ the target with a keyboard and pressing the Enter or extends FocusEvents { diff --git a/packages/@react-aria/interactions/src/useFocusVisible.ts b/packages/@react-aria/interactions/src/useFocusVisible.ts index 65766a15ac1..0bf0feb396e 100644 --- a/packages/@react-aria/interactions/src/useFocusVisible.ts +++ b/packages/@react-aria/interactions/src/useFocusVisible.ts @@ -15,10 +15,10 @@ // NOTICE file in the root directory of this source tree. // See https://github.com/facebook/react/tree/cc7c1aece46a6b69b41958d731e0fd27c94bfc6c/packages/react-interactions -import {getOwnerDocument, getOwnerWindow, isMac, isVirtualClick} from '@react-aria/utils'; +import {getOwnerDocument, getOwnerWindow, isMac, isVirtualClick} from '@react-aria-nutrient/utils'; import {ignoreFocusEvent} from './utils'; import {useEffect, useState} from 'react'; -import {useIsSSR} from '@react-aria/ssr'; +import {useIsSSR} from '@react-aria-nutrient/ssr'; export type Modality = 'keyboard' | 'pointer' | 'virtual'; type HandlerEvent = PointerEvent | MouseEvent | KeyboardEvent | FocusEvent | null; diff --git a/packages/@react-aria/interactions/src/useFocusWithin.ts b/packages/@react-aria/interactions/src/useFocusWithin.ts index 9e1c839b612..eabccb3d0c5 100644 --- a/packages/@react-aria/interactions/src/useFocusWithin.ts +++ b/packages/@react-aria/interactions/src/useFocusWithin.ts @@ -18,7 +18,7 @@ import {createSyntheticEvent, setEventTarget, useSyntheticBlurEvent} from './utils'; import {DOMAttributes} from '@react-types/shared'; import {FocusEvent, useCallback, useRef} from 'react'; -import {getActiveElement, getEventTarget, getOwnerDocument, nodeContains, useGlobalListeners} from '@react-aria/utils'; +import {getActiveElement, getEventTarget, getOwnerDocument, nodeContains, useGlobalListeners} from '@react-aria-nutrient/utils'; export interface FocusWithinProps { /** Whether the focus within events should be disabled. */ diff --git a/packages/@react-aria/interactions/src/useFocusable.tsx b/packages/@react-aria/interactions/src/useFocusable.tsx index 7b9e141e67e..49960ef89e9 100644 --- a/packages/@react-aria/interactions/src/useFocusable.tsx +++ b/packages/@react-aria/interactions/src/useFocusable.tsx @@ -12,7 +12,7 @@ import {DOMAttributes, FocusableDOMProps, FocusableElement, FocusableProps, RefObject} from '@react-types/shared'; import {focusSafely} from './'; -import {getOwnerWindow, isFocusable, mergeProps, mergeRefs, useObjectRef, useSyncRef} from '@react-aria/utils'; +import {getOwnerWindow, isFocusable, mergeProps, mergeRefs, useObjectRef, useSyncRef} from '@react-aria-nutrient/utils'; import React, {ForwardedRef, forwardRef, MutableRefObject, ReactElement, ReactNode, useContext, useEffect, useRef} from 'react'; import {useFocus} from './useFocus'; import {useKeyboard} from './useKeyboard'; @@ -31,7 +31,7 @@ interface FocusableContextValue extends FocusableProviderProps { ref?: MutableRefObject } -// Exported for @react-aria/collections, which forwards this context. +// Exported for @react-aria-nutrient/collections, which forwards this context. /** @private */ export let FocusableContext = React.createContext(null); diff --git a/packages/@react-aria/interactions/src/useHover.ts b/packages/@react-aria/interactions/src/useHover.ts index c53282faf90..47463449e52 100644 --- a/packages/@react-aria/interactions/src/useHover.ts +++ b/packages/@react-aria/interactions/src/useHover.ts @@ -16,7 +16,7 @@ // See https://github.com/facebook/react/tree/cc7c1aece46a6b69b41958d731e0fd27c94bfc6c/packages/react-interactions import {DOMAttributes, HoverEvents} from '@react-types/shared'; -import {getOwnerDocument, nodeContains, useGlobalListeners} from '@react-aria/utils'; +import {getOwnerDocument, nodeContains, useGlobalListeners} from '@react-aria-nutrient/utils'; import {useEffect, useMemo, useRef, useState} from 'react'; export interface HoverProps extends HoverEvents { diff --git a/packages/@react-aria/interactions/src/useInteractOutside.ts b/packages/@react-aria/interactions/src/useInteractOutside.ts index c3e49617a13..b251953f8b1 100644 --- a/packages/@react-aria/interactions/src/useInteractOutside.ts +++ b/packages/@react-aria/interactions/src/useInteractOutside.ts @@ -15,7 +15,7 @@ // NOTICE file in the root directory of this source tree. // See https://github.com/facebook/react/tree/cc7c1aece46a6b69b41958d731e0fd27c94bfc6c/packages/react-interactions -import {getOwnerDocument, useEffectEvent} from '@react-aria/utils'; +import {getOwnerDocument, useEffectEvent} from '@react-aria-nutrient/utils'; import {RefObject} from '@react-types/shared'; import {useEffect, useRef} from 'react'; diff --git a/packages/@react-aria/interactions/src/useLongPress.ts b/packages/@react-aria/interactions/src/useLongPress.ts index 1f910e487f5..12a69998cbf 100644 --- a/packages/@react-aria/interactions/src/useLongPress.ts +++ b/packages/@react-aria/interactions/src/useLongPress.ts @@ -11,7 +11,7 @@ */ import {DOMAttributes, FocusableElement, LongPressEvent} from '@react-types/shared'; -import {focusWithoutScrolling, getOwnerDocument, mergeProps, useDescription, useGlobalListeners} from '@react-aria/utils'; +import {focusWithoutScrolling, getOwnerDocument, mergeProps, useDescription, useGlobalListeners} from '@react-aria-nutrient/utils'; import {usePress} from './usePress'; import {useRef} from 'react'; diff --git a/packages/@react-aria/interactions/src/useMove.ts b/packages/@react-aria/interactions/src/useMove.ts index afda9607f56..48d9c67e2ef 100644 --- a/packages/@react-aria/interactions/src/useMove.ts +++ b/packages/@react-aria/interactions/src/useMove.ts @@ -13,7 +13,7 @@ import {disableTextSelection, restoreTextSelection} from './textSelection'; import {DOMAttributes, MoveEvents, PointerType} from '@react-types/shared'; import React, {useMemo, useRef} from 'react'; -import {useEffectEvent, useGlobalListeners} from '@react-aria/utils'; +import {useEffectEvent, useGlobalListeners} from '@react-aria-nutrient/utils'; export interface MoveResult { /** Props to spread on the target element. */ @@ -93,7 +93,7 @@ export function useMove(props: MoveEvents): MoveResult { state.current.didMove = false; }; - if (typeof PointerEvent === 'undefined') { + if (typeof PointerEvent === 'undefined' && process.env.NODE_ENV === 'test') { let onMouseMove = (e: MouseEvent) => { if (e.button === 0) { move(e, 'mouse', e.pageX - (state.current.lastPosition?.pageX ?? 0), e.pageY - (state.current.lastPosition?.pageY ?? 0)); @@ -151,7 +151,7 @@ export function useMove(props: MoveEvents): MoveResult { addGlobalListener(window, 'touchend', onTouchEnd, false); addGlobalListener(window, 'touchcancel', onTouchEnd, false); }; - } else if (process.env.NODE_ENV === 'test') { + } else { let onPointerMove = (e: PointerEvent) => { if (e.pointerId === state.current.id) { let pointerType = (e.pointerType || 'mouse') as PointerType; diff --git a/packages/@react-aria/interactions/src/usePress.ts b/packages/@react-aria/interactions/src/usePress.ts index 5a9edad1fcb..96093946a69 100644 --- a/packages/@react-aria/interactions/src/usePress.ts +++ b/packages/@react-aria/interactions/src/usePress.ts @@ -30,7 +30,7 @@ import { useEffectEvent, useGlobalListeners, useSyncRef -} from '@react-aria/utils'; +} from '@react-aria-nutrient/utils'; import {createSyntheticEvent, preventFocus, setEventTarget} from './utils'; import {disableTextSelection, restoreTextSelection} from './textSelection'; import {DOMAttributes, FocusableElement, PressEvent as IPressEvent, PointerType, PressEvents, RefObject} from '@react-types/shared'; @@ -176,8 +176,7 @@ export function usePress(props: PressHookProps): PressResult { preventFocusOnPress, shouldCancelOnPointerExit, allowTextSelectionOnPress, - // eslint-disable-next-line @typescript-eslint/no-unused-vars - ref: _, // Removing `ref` from `domProps` because TypeScript is dumb + ref: domRef, ...domProps } = usePressResponderContext(props); @@ -814,13 +813,26 @@ export function usePress(props: PressHookProps): PressResult { triggerSyntheticClick ]); - // Remove user-select: none in case component unmounts immediately after pressStart + // Avoid onClick delay for double tap to zoom by default. + useEffect(() => { + let element = domRef?.current; + if (element && (element instanceof getOwnerWindow(element).Element)) { + // Only apply touch-action if not already set by another CSS rule. + let style = getOwnerWindow(element).getComputedStyle(element); + if (style.touchAction === 'auto') { + // touchAction: 'manipulation' is supposed to be equivalent, but in + // Safari it causes onPointerCancel not to fire on scroll. + // https://bugs.webkit.org/show_bug.cgi?id=240917 + (element as HTMLElement).style.touchAction = 'pan-x pan-y pinch-zoom'; + } + } + }, [domRef]); + // Remove user-select: none in case component unmounts immediately after pressStart useEffect(() => { let state = ref.current; return () => { if (!allowTextSelectionOnPress) { - restoreTextSelection(state.target ?? undefined); } for (let dispose of state.disposables) { diff --git a/packages/@react-aria/interactions/src/useScrollWheel.ts b/packages/@react-aria/interactions/src/useScrollWheel.ts index ccfbacad91b..9a343d786d8 100644 --- a/packages/@react-aria/interactions/src/useScrollWheel.ts +++ b/packages/@react-aria/interactions/src/useScrollWheel.ts @@ -12,7 +12,7 @@ import {RefObject, ScrollEvents} from '@react-types/shared'; import {useCallback} from 'react'; -import {useEvent} from '@react-aria/utils'; +import {useEvent} from '@react-aria-nutrient/utils'; export interface ScrollWheelProps extends ScrollEvents { /** Whether the scroll listener should be disabled. */ diff --git a/packages/@react-aria/interactions/src/utils.ts b/packages/@react-aria/interactions/src/utils.ts index f31da638bc9..e5b964a7a2f 100644 --- a/packages/@react-aria/interactions/src/utils.ts +++ b/packages/@react-aria/interactions/src/utils.ts @@ -11,7 +11,7 @@ */ import {FocusableElement} from '@react-types/shared'; -import {focusWithoutScrolling, getOwnerWindow, isFocusable, useEffectEvent, useLayoutEffect} from '@react-aria/utils'; +import {focusWithoutScrolling, getOwnerWindow, isFocusable, useEffectEvent, useLayoutEffect} from '@react-aria-nutrient/utils'; import {FocusEvent as ReactFocusEvent, SyntheticEvent, useCallback, useRef} from 'react'; // Turn a native event into a React synthetic event. diff --git a/packages/@react-aria/interactions/stories/useFocusRing.stories.tsx b/packages/@react-aria/interactions/stories/useFocusRing.stories.tsx index 0762b862870..371577d379a 100644 --- a/packages/@react-aria/interactions/stories/useFocusRing.stories.tsx +++ b/packages/@react-aria/interactions/stories/useFocusRing.stories.tsx @@ -14,11 +14,11 @@ import {addWindowFocusTracking} from '../src'; import {Cell, Column, Row, TableBody, TableHeader, TableView} from '@react-spectrum/table'; import Frame from 'react-frame-component'; import {Key} from '@react-types/shared'; -import {mergeProps} from '@react-aria/utils'; +import {mergeProps} from '@react-aria-nutrient/utils'; import React, {useEffect, useRef, useState} from 'react'; import {SearchField} from '@react-spectrum/searchfield'; -import {useButton} from '@react-aria/button'; -import {useFocusRing} from '@react-aria/focus'; +import {useButton} from '@react-aria-nutrient/button'; +import {useFocusRing} from '@react-aria-nutrient/focus'; interface IColumn { name: string, diff --git a/packages/@react-aria/interactions/stories/useHover.stories.tsx b/packages/@react-aria/interactions/stories/useHover.stories.tsx index 671aa41a934..b59c6d938a8 100644 --- a/packages/@react-aria/interactions/stories/useHover.stories.tsx +++ b/packages/@react-aria/interactions/stories/useHover.stories.tsx @@ -11,9 +11,9 @@ */ import {AriaButtonProps} from '@react-types/button'; import {classNames} from '@react-spectrum/utils'; -import {mergeProps} from '@react-aria/utils'; +import {mergeProps} from '@react-aria-nutrient/utils'; import React, {useRef, useState} from 'react'; -import {useButton} from '@react-aria/button'; +import {useButton} from '@react-aria-nutrient/button'; import {useHover} from '../'; export default { diff --git a/packages/@react-aria/interactions/stories/useMove.stories.tsx b/packages/@react-aria/interactions/stories/useMove.stories.tsx index 08efd0dcf82..94586f30933 100644 --- a/packages/@react-aria/interactions/stories/useMove.stories.tsx +++ b/packages/@react-aria/interactions/stories/useMove.stories.tsx @@ -13,7 +13,7 @@ /* eslint-disable jsx-a11y/no-noninteractive-tabindex */ import {action} from '@storybook/addon-actions'; -import {clamp} from '@react-aria/utils'; +import {clamp} from '@react-aria-nutrient/utils'; import {Flex} from '@react-spectrum/layout'; import React, {useRef, useState} from 'react'; import {useMove} from '../'; diff --git a/packages/@react-aria/interactions/stories/usePress.stories.tsx b/packages/@react-aria/interactions/stories/usePress.stories.tsx index ac982394ce3..bfdd44324f2 100644 --- a/packages/@react-aria/interactions/stories/usePress.stories.tsx +++ b/packages/@react-aria/interactions/stories/usePress.stories.tsx @@ -19,9 +19,9 @@ import { Modal, ModalOverlay } from 'react-aria-components'; -import React from 'react'; +import React, {useState} from 'react'; import styles from './usePress-stories.css'; -import {usePress} from '@react-aria/interactions'; +import {usePress} from '@react-aria-nutrient/interactions'; export default { title: 'usePress' @@ -234,3 +234,70 @@ export function SoftwareKeyboardIssue() {
); } + +export function AndroidUnmountIssue() { + let [showButton, setShowButton] = useState(true); + + return ( +
+

This story tests an Android issue where tapping a button that unmounts causes the element behind it to receive onClick.

+
+ + {showButton && ( + + )} +
+
+ ); +} + +export function IOSScrollIssue() { + return ( +
+

This story tests an iOS Safari issue that causes onPointerCancel not to be fired with touch-action: manipulation. Scrolling the list should not trigger onPress.

+
+ {Array.from({length: 10}).map((_, i) => ( + + ))} +
+
+ ); +} + +function Card() { + return ( + + ); +} diff --git a/packages/@react-aria/interactions/test/focusSafely.test.js b/packages/@react-aria/interactions/test/focusSafely.test.js index c07fd86a265..7423fee2ff1 100644 --- a/packages/@react-aria/interactions/test/focusSafely.test.js +++ b/packages/@react-aria/interactions/test/focusSafely.test.js @@ -14,12 +14,12 @@ import {act, createShadowRoot, render} from '@react-spectrum/test-utils-internal'; import {focusSafely} from '../'; import React from 'react'; -import * as ReactAriaUtils from '@react-aria/utils'; +import * as ReactAriaUtils from '@react-aria-nutrient/utils'; import ReactDOM from 'react-dom'; -import {setInteractionModality} from '@react-aria/interactions'; +import {setInteractionModality} from '@react-aria-nutrient/interactions'; -jest.mock('@react-aria/utils', () => { - let original = jest.requireActual('@react-aria/utils'); +jest.mock('@react-aria-nutrient/utils', () => { + let original = jest.requireActual('@react-aria-nutrient/utils'); return { ...original, focusWithoutScrolling: jest.fn() diff --git a/packages/@react-aria/interactions/test/useFocusVisible.test.js b/packages/@react-aria/interactions/test/useFocusVisible.test.js index 8cb554b70d1..ab02bf19969 100644 --- a/packages/@react-aria/interactions/test/useFocusVisible.test.js +++ b/packages/@react-aria/interactions/test/useFocusVisible.test.js @@ -12,10 +12,10 @@ import {act, fireEvent, pointerMap, render, renderHook, screen, waitFor} from '@react-spectrum/test-utils-internal'; import {addWindowFocusTracking, useFocusVisible, useFocusVisibleListener} from '../'; import {hasSetupGlobalListeners} from '../src/useFocusVisible'; -import {mergeProps} from '@react-aria/utils'; +import {mergeProps} from '@react-aria-nutrient/utils'; import React from 'react'; -import {useButton} from '@react-aria/button'; -import {useFocusRing} from '@react-aria/focus'; +import {useButton} from '@react-aria-nutrient/button'; +import {useFocusRing} from '@react-aria-nutrient/focus'; import userEvent from '@testing-library/user-event'; function Example(props) { diff --git a/packages/@react-aria/interactions/test/useLongPress.test.js b/packages/@react-aria/interactions/test/useLongPress.test.js index ecb775cae82..9b9e2e1f53a 100644 --- a/packages/@react-aria/interactions/test/useLongPress.test.js +++ b/packages/@react-aria/interactions/test/useLongPress.test.js @@ -11,7 +11,7 @@ */ import {act, fireEvent, installPointerEvent, render} from '@react-spectrum/test-utils-internal'; -import {mergeProps} from '@react-aria/utils'; +import {mergeProps} from '@react-aria-nutrient/utils'; import React from 'react'; import {useLongPress, usePress} from '../'; diff --git a/packages/@react-aria/label/README.md b/packages/@react-aria/label/README.md index c175ad8882c..30be9423132 100644 --- a/packages/@react-aria/label/README.md +++ b/packages/@react-aria/label/README.md @@ -1,3 +1,3 @@ -# @react-aria/label +# @react-aria-nutrient/label This package is part of [react-spectrum](https://github.com/adobe/react-spectrum). See the repo for more details. diff --git a/packages/@react-aria/label/docs/useField.mdx b/packages/@react-aria/label/docs/useField.mdx index 5e65fc4eb81..d5bddd718ac 100644 --- a/packages/@react-aria/label/docs/useField.mdx +++ b/packages/@react-aria/label/docs/useField.mdx @@ -10,9 +10,9 @@ governing permissions and limitations under the License. */} import {Layout} from '@react-spectrum/docs'; export default Layout; -import docs from 'docs:@react-aria/label'; +import docs from 'docs:@react-aria-nutrient/label'; import {FunctionAPI, HeaderInfo, PageDescription} from '@react-spectrum/docs'; -import packageData from '@react-aria/label/package.json'; +import packageData from '@react-aria-nutrient/label/package.json'; --- category: Utilities @@ -41,7 +41,7 @@ By default, `useField` assumes that the label is a native HTML `