diff --git a/eslint.config.mjs b/eslint.config.mjs index 8caaa872e68..ccfc8ed30c5 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -504,4 +504,19 @@ export default [{ rules: { "react/react-in-jsx-scope": OFF, }, -}]; \ No newline at end of file +}, { + files: ["packages/react-aria-components/src/**"], + + rules: { + "no-restricted-imports": [ERROR, { + "name": "react-aria", + "message": "Use individual packages from @react-aria scope instead." + }, { + "name": "react-stately", + "message": "Use individual packages from @react-stately scope instead" + }, { + "name": "react-spectrum", + "message": "Use individual packages from @react-spectrum scope instead." + }] + }, +}]; diff --git a/packages/react-aria-components/package.json b/packages/react-aria-components/package.json index c986fbd2af3..daeea9ac8c5 100644 --- a/packages/react-aria-components/package.json +++ b/packages/react-aria-components/package.json @@ -44,26 +44,97 @@ "@internationalized/date": "^3.8.2", "@internationalized/string": "^3.2.7", "@react-aria/autocomplete": "3.0.0-beta.6", + "@react-aria/breadcrumbs": "^3.5.27", + "@react-aria/button": "^3.14.0", + "@react-aria/calendar": "^3.9.0", + "@react-aria/checkbox": "^3.16.0", "@react-aria/collections": "3.0.0-rc.4", + "@react-aria/color": "^3.1.0", + "@react-aria/combobox": "^3.13.0", + "@react-aria/datepicker": "^3.15.0", + "@react-aria/dialog": "^3.5.28", + "@react-aria/disclosure": "^3.0.7", "@react-aria/dnd": "^3.11.0", "@react-aria/focus": "^3.21.0", + "@react-aria/gridlist": "^3.13.3", + "@react-aria/i18n": "^3.12.11", "@react-aria/interactions": "^3.25.4", + "@react-aria/link": "^3.8.4", + "@react-aria/listbox": "^3.14.7", "@react-aria/live-announcer": "^3.4.4", + "@react-aria/menu": "^3.19.0", + "@react-aria/meter": "^3.4.25", + "@react-aria/numberfield": "^3.12.0", "@react-aria/overlays": "^3.28.0", + "@react-aria/progress": "^3.4.25", + "@react-aria/radio": "^3.12.0", + "@react-aria/searchfield": "^3.8.7", + "@react-aria/select": "^3.16.0", + "@react-aria/selection": "^3.25.0", + "@react-aria/separator": "^3.4.11", + "@react-aria/slider": "^3.8.0", "@react-aria/ssr": "^3.9.10", + "@react-aria/switch": "^3.7.6", + "@react-aria/table": "^3.17.6", + "@react-aria/tabs": "^3.10.6", + "@react-aria/tag": "^3.7.0", + "@react-aria/textfield": "^3.18.0", + "@react-aria/toast": "^3.0.6", "@react-aria/toolbar": "3.0.0-beta.19", + "@react-aria/tooltip": "^3.8.6", + "@react-aria/tree": "^3.1.2", "@react-aria/utils": "^3.30.0", "@react-aria/virtualizer": "^4.1.8", + "@react-aria/visually-hidden": "^3.8.26", "@react-stately/autocomplete": "3.0.0-beta.3", + "@react-stately/calendar": "^3.8.3", + "@react-stately/checkbox": "^3.7.0", + "@react-stately/collections": "^3.12.6", + "@react-stately/color": "^3.9.0", + "@react-stately/combobox": "^3.11.0", + "@react-stately/datepicker": "^3.15.0", + "@react-stately/disclosure": "^3.0.6", + "@react-stately/dnd": "^3.6.1", + "@react-stately/form": "^3.2.0", "@react-stately/layout": "^4.4.0", + "@react-stately/list": "^3.12.4", + "@react-stately/menu": "^3.9.6", + "@react-stately/numberfield": "^3.10.0", + "@react-stately/overlays": "^3.6.18", + "@react-stately/radio": "^3.11.0", + "@react-stately/searchfield": "^3.5.14", + "@react-stately/select": "^3.7.0", "@react-stately/selection": "^3.20.4", + "@react-stately/slider": "^3.7.0", "@react-stately/table": "^3.14.4", + "@react-stately/tabs": "^3.8.4", + "@react-stately/toast": "^3.1.2", + "@react-stately/toggle": "^3.9.0", + "@react-stately/tooltip": "^3.5.6", + "@react-stately/tree": "^3.9.1", "@react-stately/utils": "^3.10.8", "@react-stately/virtualizer": "^4.4.2", + "@react-types/button": "^3.13.0", + "@react-types/checkbox": "^3.10.0", + "@react-types/color": "^3.1.0", + "@react-types/combobox": "^3.13.7", + "@react-types/datepicker": "^3.13.0", + "@react-types/dialog": "^3.5.20", "@react-types/form": "^3.7.14", "@react-types/grid": "^3.3.4", + "@react-types/listbox": "^3.7.2", + "@react-types/numberfield": "^3.8.13", + "@react-types/overlays": "^3.9.0", + "@react-types/radio": "^3.9.0", + "@react-types/searchfield": "^3.6.4", + "@react-types/select": "^3.10.0", "@react-types/shared": "^3.31.0", + "@react-types/slider": "^3.8.0", + "@react-types/switch": "^3.5.13", "@react-types/table": "^3.13.2", + "@react-types/tabs": "^3.3.17", + "@react-types/textfield": "^3.12.4", + "@react-types/tooltip": "^3.4.19", "@swc/helpers": "^0.5.0", "client-only": "^0.0.1", "react-aria": "^3.42.0", diff --git a/packages/react-aria-components/src/Breadcrumbs.tsx b/packages/react-aria-components/src/Breadcrumbs.tsx index 832a5121158..53e2616501e 100644 --- a/packages/react-aria-components/src/Breadcrumbs.tsx +++ b/packages/react-aria-components/src/Breadcrumbs.tsx @@ -9,14 +9,13 @@ * OF ANY KIND, either express or implied. See the License for the specific language * governing permissions and limitations under the License. */ -import {AriaBreadcrumbsProps, useBreadcrumbs} from 'react-aria'; +import {AriaBreadcrumbsProps, useBreadcrumbs} from '@react-aria/breadcrumbs'; import {Collection, CollectionBuilder, createLeafComponent} from '@react-aria/collections'; import {CollectionProps, CollectionRendererContext} from './Collection'; import {ContextValue, RenderProps, SlotProps, StyleProps, useContextProps, useRenderProps, useSlottedContext} from './utils'; import {filterDOMProps, mergeProps} from '@react-aria/utils'; -import {forwardRefType, GlobalDOMAttributes, Key} from '@react-types/shared'; +import {forwardRefType, GlobalDOMAttributes, Key, Node} from '@react-types/shared'; import {LinkContext} from './Link'; -import {Node} from 'react-stately'; import React, {createContext, ForwardedRef, forwardRef, useContext} from 'react'; export interface BreadcrumbsProps extends Omit, 'disabledKeys'>, AriaBreadcrumbsProps, StyleProps, SlotProps, GlobalDOMAttributes { diff --git a/packages/react-aria-components/src/Button.tsx b/packages/react-aria-components/src/Button.tsx index cbe771d9730..242e21f3dec 100644 --- a/packages/react-aria-components/src/Button.tsx +++ b/packages/react-aria-components/src/Button.tsx @@ -11,15 +11,7 @@ */ import {announce} from '@react-aria/live-announcer'; -import { - AriaButtonProps, - HoverEvents, - mergeProps, - useButton, - useFocusRing, - useHover, - useId -} from 'react-aria'; +import {AriaButtonProps, useButton} from '@react-aria/button'; import { ContextValue, RenderProps, @@ -28,10 +20,12 @@ import { useRenderProps } from './utils'; import {createHideableComponent} from '@react-aria/collections'; -import {filterDOMProps} from '@react-aria/utils'; +import {filterDOMProps, mergeProps, useId} from '@react-aria/utils'; import {GlobalDOMAttributes} from '@react-types/shared'; +import {HoverEvents, useHover} from '@react-aria/interactions'; import {ProgressBarContext} from './ProgressBar'; import React, {createContext, ForwardedRef, useEffect, useRef} from 'react'; +import {useFocusRing} from '@react-aria/focus'; export interface ButtonRenderProps { /** diff --git a/packages/react-aria-components/src/Calendar.tsx b/packages/react-aria-components/src/Calendar.tsx index 4867ae9ce80..c969ee51459 100644 --- a/packages/react-aria-components/src/Calendar.tsx +++ b/packages/react-aria-components/src/Calendar.tsx @@ -11,27 +11,25 @@ */ import { AriaCalendarProps, - AriaRangeCalendarProps, - DateValue, - mergeProps, + AriaRangeCalendarProps, DateValue, useCalendar, useCalendarCell, useCalendarGrid, - useFocusRing, - useHover, - useLocale, - useRangeCalendar, - VisuallyHidden -} from 'react-aria'; + useRangeCalendar +} from '@react-aria/calendar'; import {ButtonContext} from './Button'; import {CalendarDate, CalendarIdentifier, createCalendar, DateDuration, endOfMonth, Calendar as ICalendar, isSameDay, isSameMonth, isToday} from '@internationalized/date'; -import {CalendarState, RangeCalendarState, useCalendarState, useRangeCalendarState} from 'react-stately'; +import {CalendarState, RangeCalendarState, useCalendarState, useRangeCalendarState} from '@react-stately/calendar'; import {ContextValue, DOMProps, Provider, RenderProps, SlotProps, StyleProps, useContextProps, useRenderProps, useSlottedContext} from './utils'; import {DOMAttributes, FocusableElement, forwardRefType, GlobalDOMAttributes, HoverEvents} from '@react-types/shared'; -import {filterDOMProps} from '@react-aria/utils'; +import {filterDOMProps, mergeProps} from '@react-aria/utils'; import {HeadingContext} from './RSPContexts'; import React, {createContext, ForwardedRef, forwardRef, ReactElement, useContext, useRef} from 'react'; import {TextContext} from './Text'; +import {useFocusRing} from '@react-aria/focus'; +import {useHover} from '@react-aria/interactions'; +import {useLocale} from '@react-aria/i18n'; +import {VisuallyHidden} from '@react-aria/visually-hidden'; export interface CalendarRenderProps { /** diff --git a/packages/react-aria-components/src/Checkbox.tsx b/packages/react-aria-components/src/Checkbox.tsx index 678584e2fb5..315840d521a 100644 --- a/packages/react-aria-components/src/Checkbox.tsx +++ b/packages/react-aria-components/src/Checkbox.tsx @@ -9,17 +9,22 @@ * OF ANY KIND, either express or implied. See the License for the specific language * governing permissions and limitations under the License. */ -import {AriaCheckboxGroupProps, AriaCheckboxProps, HoverEvents, mergeProps, useCheckbox, useCheckboxGroup, useCheckboxGroupItem, useFocusRing, useHover, VisuallyHidden} from 'react-aria'; +import {AriaCheckboxGroupProps, AriaCheckboxProps} from '@react-types/checkbox'; import {CheckboxContext} from './RSPContexts'; -import {CheckboxGroupState, useCheckboxGroupState, useToggleState} from 'react-stately'; +import {CheckboxGroupState, useCheckboxGroupState} from '@react-stately/checkbox'; import {ContextValue, Provider, RACValidation, removeDataAttributes, RenderProps, SlotProps, useContextProps, useRenderProps, useSlot, useSlottedContext} from './utils'; import {FieldErrorContext} from './FieldError'; -import {filterDOMProps, mergeRefs, useObjectRef} from '@react-aria/utils'; +import {filterDOMProps, mergeProps, mergeRefs, useObjectRef} from '@react-aria/utils'; import {FormContext} from './Form'; -import {forwardRefType, GlobalDOMAttributes, RefObject} from '@react-types/shared'; +import {forwardRefType, GlobalDOMAttributes, HoverEvents, RefObject} from '@react-types/shared'; import {LabelContext} from './Label'; import React, {createContext, ForwardedRef, forwardRef, useContext, useMemo} from 'react'; import {TextContext} from './Text'; +import {useCheckbox, useCheckboxGroup, useCheckboxGroupItem} from '@react-aria/checkbox'; +import {useFocusRing} from '@react-aria/focus'; +import {useHover} from '@react-aria/interactions'; +import {useToggleState} from '@react-stately/toggle'; +import {VisuallyHidden} from '@react-aria/visually-hidden'; export interface CheckboxGroupProps extends Omit, RACValidation, RenderProps, SlotProps, GlobalDOMAttributes {} export interface CheckboxProps extends Omit, HoverEvents, RACValidation, RenderProps, SlotProps, Omit, 'onClick'> { diff --git a/packages/react-aria-components/src/Collection.tsx b/packages/react-aria-components/src/Collection.tsx index ed1bc25174b..06b228528a6 100644 --- a/packages/react-aria-components/src/Collection.tsx +++ b/packages/react-aria-components/src/Collection.tsx @@ -9,9 +9,8 @@ * OF ANY KIND, either express or implied. See the License for the specific language * governing permissions and limitations under the License. */ -import {CollectionBase, DropTargetDelegate, GlobalDOMAttributes, ItemDropTarget, Key, LayoutDelegate, RefObject} from '@react-types/shared'; +import {CollectionBase, DropTargetDelegate, GlobalDOMAttributes, Collection as ICollection, ItemDropTarget, Key, LayoutDelegate, Node, RefObject, SelectionBehavior, SelectionMode, SectionProps as SharedSectionProps} from '@react-types/shared'; import {createBranchComponent, useCachedChildren} from '@react-aria/collections'; -import {Collection as ICollection, Node, SelectionBehavior, SelectionMode, SectionProps as SharedSectionProps} from 'react-stately'; import React, {cloneElement, createContext, ForwardedRef, HTMLAttributes, isValidElement, JSX, ReactElement, ReactNode, useContext, useMemo} from 'react'; import {StyleProps} from './utils'; diff --git a/packages/react-aria-components/src/ColorArea.tsx b/packages/react-aria-components/src/ColorArea.tsx index 5a9af7fc5b8..05bd457a799 100644 --- a/packages/react-aria-components/src/ColorArea.tsx +++ b/packages/react-aria-components/src/ColorArea.tsx @@ -1,6 +1,6 @@ -import {AriaColorAreaProps, useColorArea} from 'react-aria'; +import {AriaColorAreaProps, useColorArea} from '@react-aria/color'; import {ColorAreaContext} from './RSPContexts'; -import {ColorAreaState, useColorAreaState} from 'react-stately'; +import {ColorAreaState, useColorAreaState} from '@react-stately/color'; import {filterDOMProps, mergeProps} from '@react-aria/utils'; import {GlobalDOMAttributes} from '@react-types/shared'; import {InternalColorThumbContext} from './ColorThumb'; diff --git a/packages/react-aria-components/src/ColorField.tsx b/packages/react-aria-components/src/ColorField.tsx index f820e8a2b4d..6b35f4a24fc 100644 --- a/packages/react-aria-components/src/ColorField.tsx +++ b/packages/react-aria-components/src/ColorField.tsx @@ -10,9 +10,9 @@ * governing permissions and limitations under the License. */ -import {AriaColorFieldProps, useColorChannelField, useColorField, useLocale} from 'react-aria'; -import {ColorChannel, ColorFieldState, ColorSpace, useColorChannelFieldState, useColorFieldState} from 'react-stately'; +import {AriaColorFieldProps, ColorChannel, ColorSpace} from '@react-types/color'; import {ColorFieldContext} from './RSPContexts'; +import {ColorFieldState, useColorChannelFieldState, useColorFieldState} from '@react-stately/color'; import {FieldErrorContext} from './FieldError'; import {filterDOMProps} from '@react-aria/utils'; import {GlobalDOMAttributes, InputDOMProps, ValidationResult} from '@react-types/shared'; @@ -22,6 +22,8 @@ import {LabelContext} from './Label'; import {Provider, RACValidation, removeDataAttributes, RenderProps, SlotProps, useContextProps, useRenderProps, useSlot} from './utils'; import React, {createContext, ForwardedRef, forwardRef, HTMLAttributes, InputHTMLAttributes, LabelHTMLAttributes, Ref, useRef} from 'react'; import {TextContext} from './Text'; +import {useColorChannelField, useColorField} from '@react-aria/color'; +import {useLocale} from '@react-aria/i18n'; export interface ColorFieldRenderProps { /** @@ -47,7 +49,7 @@ export interface ColorFieldRenderProps { export interface ColorFieldProps extends Omit, RACValidation, InputDOMProps, RenderProps, SlotProps, GlobalDOMAttributes { /** - * The color channel that this field edits. If not provided, + * The color channel that this field edits. If not provided, * the color is edited as a hex value. */ channel?: ColorChannel, diff --git a/packages/react-aria-components/src/ColorPicker.tsx b/packages/react-aria-components/src/ColorPicker.tsx index 68a187c6427..69bae98e1be 100644 --- a/packages/react-aria-components/src/ColorPicker.tsx +++ b/packages/react-aria-components/src/ColorPicker.tsx @@ -10,11 +10,16 @@ * governing permissions and limitations under the License. */ -import {Color, ColorPickerState, ColorPickerProps as StatelyColorPickerProps, useColorPickerState} from 'react-stately'; +import { + Color, + ColorPickerState, + ColorPickerProps as StatelyColorPickerProps, + useColorPickerState +} from '@react-stately/color'; import {ColorAreaContext, ColorFieldContext, ColorSliderContext, ColorWheelContext} from './RSPContexts'; import {ColorSwatchContext} from './ColorSwatch'; import {ColorSwatchPickerContext} from './ColorSwatchPicker'; -import {mergeProps} from 'react-aria'; +import {mergeProps} from '@react-aria/utils'; import {Provider, RenderProps, SlotProps, SlottedContextValue, useRenderProps, useSlottedContext} from './utils'; import React, {createContext, JSX} from 'react'; diff --git a/packages/react-aria-components/src/ColorSlider.tsx b/packages/react-aria-components/src/ColorSlider.tsx index d545a55680a..891db784546 100644 --- a/packages/react-aria-components/src/ColorSlider.tsx +++ b/packages/react-aria-components/src/ColorSlider.tsx @@ -1,13 +1,15 @@ -import {AriaColorSliderProps, Orientation, useColorSlider, useLocale} from 'react-aria'; +import {AriaColorSliderProps} from '@react-types/color'; import {ColorSliderContext} from './RSPContexts'; -import {ColorSliderState, useColorSliderState} from 'react-stately'; +import {ColorSliderState, useColorSliderState} from '@react-stately/color'; import {filterDOMProps} from '@react-aria/utils'; -import {GlobalDOMAttributes} from '@react-types/shared'; +import {GlobalDOMAttributes, Orientation} from '@react-types/shared'; import {InternalColorThumbContext} from './ColorThumb'; import {LabelContext} from './Label'; import {Provider, RenderProps, SlotProps, useContextProps, useRenderProps, useSlot} from './utils'; import React, {createContext, ForwardedRef, forwardRef} from 'react'; import {SliderOutputContext, SliderStateContext, SliderTrackContext} from './Slider'; +import {useColorSlider} from '@react-aria/color'; +import {useLocale} from '@react-aria/i18n'; export interface ColorSliderRenderProps { /** diff --git a/packages/react-aria-components/src/ColorSwatch.tsx b/packages/react-aria-components/src/ColorSwatch.tsx index e27204c86ed..8bd233b8d06 100644 --- a/packages/react-aria-components/src/ColorSwatch.tsx +++ b/packages/react-aria-components/src/ColorSwatch.tsx @@ -1,5 +1,5 @@ -import {AriaColorSwatchProps, useColorSwatch} from 'react-aria'; -import {Color} from 'react-stately'; +import {AriaColorSwatchProps, useColorSwatch} from '@react-aria/color'; +import {Color} from '@react-types/color'; import {ContextValue, SlotProps, StyleRenderProps, useContextProps, useRenderProps} from './utils'; import {filterDOMProps, mergeProps} from '@react-aria/utils'; import {GlobalDOMAttributes} from '@react-types/shared'; @@ -30,7 +30,7 @@ export const ColorSwatch = forwardRef(function ColorSwatch(props: ColorSwatchPro }); let DOMProps = filterDOMProps(props, {global: true}); - + return (
{} export interface ColorSwatchPickerProps extends ValueBase, AriaLabelingProps, StyleRenderProps, GlobalDOMAttributes { diff --git a/packages/react-aria-components/src/ColorThumb.tsx b/packages/react-aria-components/src/ColorThumb.tsx index 41fa7b8f4e3..1c3f2096939 100644 --- a/packages/react-aria-components/src/ColorThumb.tsx +++ b/packages/react-aria-components/src/ColorThumb.tsx @@ -1,9 +1,10 @@ -import {Color} from 'react-stately'; -import {filterDOMProps} from '@react-aria/utils'; +import {Color} from '@react-types/color'; +import {filterDOMProps, mergeProps} from '@react-aria/utils'; import {GlobalDOMAttributes, HoverEvents, RefObject} from '@react-types/shared'; -import {mergeProps, useFocusRing, useHover} from 'react-aria'; import React, {createContext, ForwardedRef, forwardRef, HTMLAttributes, InputHTMLAttributes, useContext} from 'react'; import {RenderProps, useRenderProps} from './utils'; +import {useFocusRing} from '@react-aria/focus'; +import {useHover} from '@react-aria/interactions'; interface ColorState { getDisplayColor(): Color, diff --git a/packages/react-aria-components/src/ColorWheel.tsx b/packages/react-aria-components/src/ColorWheel.tsx index 991a865b9b8..210802e3752 100644 --- a/packages/react-aria-components/src/ColorWheel.tsx +++ b/packages/react-aria-components/src/ColorWheel.tsx @@ -1,6 +1,6 @@ -import {AriaColorWheelOptions, useColorWheel} from 'react-aria'; +import {AriaColorWheelOptions, useColorWheel} from '@react-aria/color'; import {ColorWheelContext} from './RSPContexts'; -import {ColorWheelState, useColorWheelState} from 'react-stately'; +import {ColorWheelState, useColorWheelState} from '@react-stately/color'; import {ContextValue, Provider, RenderProps, SlotProps, StyleRenderProps, useContextProps, useRenderProps} from './utils'; import {filterDOMProps} from '@react-aria/utils'; import {GlobalDOMAttributes} from '@react-types/shared'; diff --git a/packages/react-aria-components/src/ComboBox.tsx b/packages/react-aria-components/src/ComboBox.tsx index f21145a2b8b..268c9d41a36 100644 --- a/packages/react-aria-components/src/ComboBox.tsx +++ b/packages/react-aria-components/src/ComboBox.tsx @@ -9,15 +9,15 @@ * OF ANY KIND, either express or implied. See the License for the specific language * governing permissions and limitations under the License. */ -import {AriaComboBoxProps, useComboBox, useFilter} from 'react-aria'; +import {AriaComboBoxProps} from '@react-types/combobox'; import {ButtonContext} from './Button'; -import {Collection, ComboBoxState, Node, useComboBoxState} from 'react-stately'; +import {Collection, forwardRefType, GlobalDOMAttributes, Node, RefObject} from '@react-types/shared'; import {CollectionBuilder} from '@react-aria/collections'; +import {ComboBoxState, useComboBoxState} from '@react-stately/combobox'; import {ContextValue, Provider, RACValidation, removeDataAttributes, RenderProps, SlotProps, useContextProps, useRenderProps, useSlot, useSlottedContext} from './utils'; import {FieldErrorContext} from './FieldError'; import {filterDOMProps, useResizeObserver} from '@react-aria/utils'; import {FormContext} from './Form'; -import {forwardRefType, GlobalDOMAttributes, RefObject} from '@react-types/shared'; import {GroupContext} from './Group'; import {InputContext} from './Input'; import {LabelContext} from './Label'; @@ -26,6 +26,8 @@ import {OverlayTriggerStateContext} from './Dialog'; import {PopoverContext} from './Popover'; import React, {createContext, ForwardedRef, forwardRef, useCallback, useMemo, useRef, useState} from 'react'; import {TextContext} from './Text'; +import {useComboBox} from '@react-aria/combobox'; +import {useFilter} from '@react-aria/i18n'; export interface ComboBoxRenderProps { /** diff --git a/packages/react-aria-components/src/DateField.tsx b/packages/react-aria-components/src/DateField.tsx index 1a590f9831f..49baa7b2834 100644 --- a/packages/react-aria-components/src/DateField.tsx +++ b/packages/react-aria-components/src/DateField.tsx @@ -9,20 +9,24 @@ * OF ANY KIND, either express or implied. See the License for the specific language * governing permissions and limitations under the License. */ -import {AriaDateFieldProps, AriaTimeFieldProps, DateValue, HoverEvents, mergeProps, TimeValue, useDateField, useDateSegment, useFocusRing, useHover, useLocale, useTimeField} from 'react-aria'; +import {AriaDateFieldProps, AriaTimeFieldProps, DateValue, TimeValue} from '@react-types/datepicker'; import {ContextValue, Provider, RACValidation, removeDataAttributes, RenderProps, SlotProps, StyleRenderProps, useContextProps, useRenderProps, useSlot, useSlottedContext} from './utils'; import {createCalendar} from '@internationalized/date'; -import {DateFieldState, DateSegmentType, DateSegment as IDateSegment, TimeFieldState, useDateFieldState, useTimeFieldState} from 'react-stately'; +import {DateFieldState, SegmentType as DateSegmentType, DateSegment as IDateSegment, TimeFieldState, useDateFieldState, useTimeFieldState} from '@react-stately/datepicker'; import {FieldErrorContext} from './FieldError'; -import {filterDOMProps, useObjectRef} from '@react-aria/utils'; +import {filterDOMProps, mergeProps, useObjectRef} from '@react-aria/utils'; import {FormContext} from './Form'; -import {forwardRefType, GlobalDOMAttributes} from '@react-types/shared'; +import {forwardRefType, GlobalDOMAttributes, HoverEvents} from '@react-types/shared'; import {Group, GroupContext} from './Group'; import {HiddenDateInput} from './HiddenDateInput'; import {Input, InputContext} from './Input'; import {LabelContext} from './Label'; import React, {cloneElement, createContext, ForwardedRef, forwardRef, JSX, ReactElement, useContext, useRef} from 'react'; import {TextContext} from './Text'; +import {useDateField, useDateSegment, useTimeField} from '@react-aria/datepicker'; +import {useFocusRing} from '@react-aria/focus'; +import {useHover} from '@react-aria/interactions'; +import {useLocale} from '@react-aria/i18n'; export interface DateFieldRenderProps { /** @@ -111,11 +115,11 @@ export const DateField = /*#__PURE__*/ (forwardRef as forwardRefType)(function D slot={props.slot || undefined} data-invalid={state.isInvalid || undefined} data-disabled={state.isDisabled || undefined} /> - + state={state} /> ); }); @@ -180,7 +184,7 @@ export const TimeField = /*#__PURE__*/ (forwardRef as forwardRefType)(function T {...renderProps} ref={ref} slot={props.slot || undefined} - data-invalid={state.isInvalid || undefined} + data-invalid={state.isInvalid || undefined} data-disabled={state.isDisabled || undefined} /> ); diff --git a/packages/react-aria-components/src/DatePicker.tsx b/packages/react-aria-components/src/DatePicker.tsx index 436321e0a60..b89516b543f 100644 --- a/packages/react-aria-components/src/DatePicker.tsx +++ b/packages/react-aria-components/src/DatePicker.tsx @@ -9,12 +9,17 @@ * OF ANY KIND, either express or implied. See the License for the specific language * governing permissions and limitations under the License. */ -import {AriaDatePickerProps, AriaDateRangePickerProps, DateValue, useDatePicker, useDateRangePicker, useFocusRing} from 'react-aria'; +import {AriaDatePickerProps, AriaDateRangePickerProps, DateValue} from '@react-types/datepicker'; import {ButtonContext} from './Button'; import {CalendarContext, RangeCalendarContext} from './Calendar'; import {ContextValue, Provider, RACValidation, removeDataAttributes, RenderProps, SlotProps, useContextProps, useRenderProps, useSlot, useSlottedContext} from './utils'; import {DateFieldContext} from './DateField'; -import {DatePickerState, DatePickerStateOptions, DateRangePickerState, DateRangePickerStateOptions, useDatePickerState, useDateRangePickerState} from 'react-stately'; +import { + DatePickerState, + DatePickerStateOptions, + DateRangePickerState, + DateRangePickerStateOptions, useDatePickerState, useDateRangePickerState +} from '@react-stately/datepicker'; import {DialogContext, OverlayTriggerStateContext} from './Dialog'; import {FieldErrorContext} from './FieldError'; import {filterDOMProps, mergeProps, useResizeObserver} from '@react-aria/utils'; @@ -26,6 +31,8 @@ import {LabelContext} from './Label'; import {PopoverContext} from './Popover'; import React, {createContext, ForwardedRef, forwardRef, useCallback, useRef, useState} from 'react'; import {TextContext} from './Text'; +import {useDatePicker, useDateRangePicker} from '@react-aria/datepicker'; +import {useFocusRing} from '@react-aria/focus'; export interface DatePickerRenderProps { /** diff --git a/packages/react-aria-components/src/Dialog.tsx b/packages/react-aria-components/src/Dialog.tsx index f1881c8940e..9edc98bbd3d 100644 --- a/packages/react-aria-components/src/Dialog.tsx +++ b/packages/react-aria-components/src/Dialog.tsx @@ -9,17 +9,21 @@ * OF ANY KIND, either express or implied. See the License for the specific language * governing permissions and limitations under the License. */ -import {AriaDialogProps, useDialog, useId, useOverlayTrigger} from 'react-aria'; +import {AriaDialogProps} from '@react-types/dialog'; import {ButtonContext} from './Button'; import {ContextValue, DEFAULT_SLOT, Provider, SlotProps, StyleProps, useContextProps, useRenderProps} from './utils'; -import {filterDOMProps, mergeProps, useResizeObserver} from '@react-aria/utils'; +import {filterDOMProps, mergeProps, useId, useResizeObserver} from '@react-aria/utils'; import {forwardRefType, GlobalDOMAttributes} from '@react-types/shared'; import {HeadingContext} from './RSPContexts'; -import {OverlayTriggerProps, OverlayTriggerState, useMenuTriggerState} from 'react-stately'; +import {OverlayTriggerProps} from '@react-types/overlays'; +import {OverlayTriggerState} from '@react-stately/overlays'; import {PopoverContext} from './Popover'; import {PressResponder} from '@react-aria/interactions'; import React, {createContext, ForwardedRef, forwardRef, JSX, ReactNode, useCallback, useContext, useRef, useState} from 'react'; import {RootMenuTriggerStateContext} from './Menu'; +import {useDialog} from '@react-aria/dialog'; +import {useMenuTriggerState} from '@react-stately/menu'; +import {useOverlayTrigger} from '@react-aria/overlays'; export interface DialogTriggerProps extends OverlayTriggerProps { children: ReactNode diff --git a/packages/react-aria-components/src/Disclosure.tsx b/packages/react-aria-components/src/Disclosure.tsx index 060340338d6..68ce8b6345e 100644 --- a/packages/react-aria-components/src/Disclosure.tsx +++ b/packages/react-aria-components/src/Disclosure.tsx @@ -10,13 +10,18 @@ * governing permissions and limitations under the License. */ -import {AriaDisclosureProps, useDisclosure, useFocusRing} from 'react-aria'; +import {AriaDisclosureProps, useDisclosure} from '@react-aria/disclosure'; import {ButtonContext} from './Button'; import {ContextValue, DEFAULT_SLOT, Provider, RenderProps, SlotProps, useContextProps, useRenderProps} from './utils'; -import {DisclosureGroupState, DisclosureState, DisclosureGroupProps as StatelyDisclosureGroupProps, useDisclosureGroupState, useDisclosureState} from 'react-stately'; +import { + DisclosureGroupState, + DisclosureState, + DisclosureGroupProps as StatelyDisclosureGroupProps, useDisclosureGroupState, useDisclosureState +} from '@react-stately/disclosure'; import {DOMProps, forwardRefType, GlobalDOMAttributes, Key} from '@react-types/shared'; import {filterDOMProps, mergeProps, mergeRefs, useId} from '@react-aria/utils'; import React, {createContext, DOMAttributes, ForwardedRef, forwardRef, ReactNode, useContext} from 'react'; +import {useFocusRing} from '@react-aria/focus'; export interface DisclosureGroupProps extends StatelyDisclosureGroupProps, RenderProps, DOMProps, GlobalDOMAttributes {} diff --git a/packages/react-aria-components/src/DragAndDrop.tsx b/packages/react-aria-components/src/DragAndDrop.tsx index 2e1e0beadad..1fe6bc25099 100644 --- a/packages/react-aria-components/src/DragAndDrop.tsx +++ b/packages/react-aria-components/src/DragAndDrop.tsx @@ -9,9 +9,11 @@ * OF ANY KIND, either express or implied. See the License for the specific language * governing permissions and limitations under the License. */ -import type {DropIndicatorProps as AriaDropIndicatorProps, ItemDropTarget, Key} from 'react-aria'; +import type {DropIndicatorProps as AriaDropIndicatorProps, ItemDropTarget} from '@react-aria/dnd'; import type {DragAndDropHooks} from './useDragAndDrop'; -import type {DraggableCollectionState, DroppableCollectionState, MultipleSelectionManager} from 'react-stately'; +import type {DraggableCollectionState, DroppableCollectionState} from '@react-stately/dnd'; +import type {Key} from '@react-types/shared'; +import type {MultipleSelectionManager} from '@react-stately/selection'; import React, {createContext, ForwardedRef, forwardRef, JSX, ReactNode, useCallback, useContext, useMemo} from 'react'; import type {RenderProps} from './utils'; @@ -92,7 +94,7 @@ export function useDndPersistedKeys(selectionManager: MultipleSelectionManager, if ((node.level ?? 0) <= targetLevel) { break; } - + lastDescendantKey = nextKey; nextKey = dropState.collection.getKeyAfter(nextKey); } diff --git a/packages/react-aria-components/src/DropZone.tsx b/packages/react-aria-components/src/DropZone.tsx index ebb32507584..441698cf9ed 100644 --- a/packages/react-aria-components/src/DropZone.tsx +++ b/packages/react-aria-components/src/DropZone.tsx @@ -12,12 +12,17 @@ import {AriaLabelingProps, GlobalDOMAttributes, HoverEvents} from '@react-types/shared'; import {ContextValue, Provider, RenderProps, SlotProps, useContextProps, useRenderProps} from './utils'; -import {DropOptions, mergeProps, useButton, useClipboard, useDrop, useFocusRing, useHover, useLocalizedStringFormatter, VisuallyHidden} from 'react-aria'; -import {filterDOMProps, isFocusable, useLabels, useObjectRef, useSlotId} from '@react-aria/utils'; +import {DropOptions, useClipboard, useDrop} from '@react-aria/dnd'; +import {filterDOMProps, isFocusable, mergeProps, useLabels, useObjectRef, useSlotId} from '@react-aria/utils'; // @ts-ignore import intlMessages from '../intl/*.json'; import React, {createContext, ForwardedRef, forwardRef, useRef} from 'react'; import {TextContext} from './Text'; +import {useButton} from '@react-aria/button'; +import {useFocusRing} from '@react-aria/focus'; +import {useHover} from '@react-aria/interactions'; +import {useLocalizedStringFormatter} from '@react-aria/i18n'; +import {VisuallyHidden} from '@react-aria/visually-hidden'; export interface DropZoneRenderProps { /** diff --git a/packages/react-aria-components/src/Form.tsx b/packages/react-aria-components/src/Form.tsx index f255ea382ae..21e0b7ef73f 100644 --- a/packages/react-aria-components/src/Form.tsx +++ b/packages/react-aria-components/src/Form.tsx @@ -11,7 +11,7 @@ */ import {ContextValue, DOMProps, useContextProps} from './utils'; -import {FormValidationContext} from 'react-stately'; +import {FormValidationContext} from '@react-stately/form'; import {GlobalDOMAttributes} from '@react-types/shared'; import React, {createContext, ForwardedRef, forwardRef} from 'react'; import {FormProps as SharedFormProps} from '@react-types/form'; diff --git a/packages/react-aria-components/src/GridList.tsx b/packages/react-aria-components/src/GridList.tsx index 9cb34f49795..601e7b7026c 100644 --- a/packages/react-aria-components/src/GridList.tsx +++ b/packages/react-aria-components/src/GridList.tsx @@ -9,7 +9,7 @@ * OF ANY KIND, either express or implied. See the License for the specific language * governing permissions and limitations under the License. */ -import {AriaGridListProps, DraggableItemResult, DragPreviewRenderer, DropIndicatorAria, DroppableCollectionResult, FocusScope, ListKeyboardDelegate, mergeProps, useCollator, useFocusRing, useGridList, useGridListItem, useGridListSelectionCheckbox, useHover, useLocale, useVisuallyHidden} from 'react-aria'; +import {AriaGridListProps, useGridList, useGridListItem, useGridListSelectionCheckbox} from '@react-aria/gridlist'; import {ButtonContext} from './Button'; import {CheckboxContext} from './RSPContexts'; import {Collection, CollectionBuilder, createLeafComponent} from '@react-aria/collections'; @@ -17,12 +17,38 @@ import {CollectionProps, CollectionRendererContext, DefaultCollectionRenderer, I import {ContextValue, DEFAULT_SLOT, Provider, RenderProps, SlotProps, StyleProps, StyleRenderProps, useContextProps, useRenderProps} from './utils'; import {DragAndDropContext, DropIndicatorContext, DropIndicatorProps, useDndPersistedKeys, useRenderDropIndicator} from './DragAndDrop'; import {DragAndDropHooks} from './useDragAndDrop'; -import {DraggableCollectionState, DroppableCollectionState, Collection as ICollection, ListState, Node, SelectionBehavior, useListState} from 'react-stately'; -import {filterDOMProps, inertValue, LoadMoreSentinelProps, useLoadMoreSentinel, useObjectRef} from '@react-aria/utils'; -import {forwardRefType, GlobalDOMAttributes, HoverEvents, Key, LinkDOMProps, PressEvents, RefObject} from '@react-types/shared'; +import {DraggableCollectionState, DroppableCollectionState} from '@react-stately/dnd'; +import {DraggableItemResult, DropIndicatorAria, DroppableCollectionResult} from '@react-aria/dnd'; +import { + DragPreviewRenderer, + forwardRefType, + GlobalDOMAttributes, + HoverEvents, + Collection as ICollection, + Key, + LinkDOMProps, + Node, + PressEvents, + RefObject, + SelectionBehavior +} from '@react-types/shared'; +import { + filterDOMProps, + inertValue, + LoadMoreSentinelProps, + mergeProps, + useLoadMoreSentinel, + useObjectRef +} from '@react-aria/utils'; +import {FocusScope, useFocusRing} from '@react-aria/focus'; +import {ListKeyboardDelegate} from '@react-aria/selection'; +import {ListState, useListState} from '@react-stately/list'; import {ListStateContext} from './ListBox'; import React, {createContext, ForwardedRef, forwardRef, HTMLAttributes, JSX, ReactNode, useContext, useEffect, useMemo, useRef} from 'react'; import {TextContext} from './Text'; +import {useCollator, useLocale} from '@react-aria/i18n'; +import {useHover} from '@react-aria/interactions'; +import {useVisuallyHidden} from '@react-aria/visually-hidden'; export interface GridListRenderProps { /** diff --git a/packages/react-aria-components/src/Group.tsx b/packages/react-aria-components/src/Group.tsx index 222ca6a0037..5fda38d8120 100644 --- a/packages/react-aria-components/src/Group.tsx +++ b/packages/react-aria-components/src/Group.tsx @@ -12,8 +12,10 @@ import {AriaLabelingProps, DOMProps, forwardRefType} from '@react-types/shared'; import {ContextValue, RenderProps, SlotProps, useContextProps, useRenderProps} from './utils'; -import {HoverProps, mergeProps, useFocusRing, useHover} from 'react-aria'; +import {HoverProps, useHover} from '@react-aria/interactions'; +import {mergeProps} from '@react-aria/utils'; import React, {createContext, ForwardedRef, forwardRef, HTMLAttributes} from 'react'; +import {useFocusRing} from '@react-aria/focus'; export interface GroupRenderProps { /** diff --git a/packages/react-aria-components/src/HiddenDateInput.tsx b/packages/react-aria-components/src/HiddenDateInput.tsx index f0ce4b971b7..debd3e74298 100644 --- a/packages/react-aria-components/src/HiddenDateInput.tsx +++ b/packages/react-aria-components/src/HiddenDateInput.tsx @@ -12,9 +12,9 @@ import {CalendarDate, CalendarDateTime, parseDate, parseDateTime} from '@internationalized/date'; -import {DateFieldState, DatePickerState, DateSegmentType} from 'react-stately'; +import {DateFieldState, DatePickerState, SegmentType as DateSegmentType} from '@react-stately/datepicker'; import React, {ReactNode} from 'react'; -import {useVisuallyHidden} from 'react-aria'; +import {useVisuallyHidden} from '@react-aria/visually-hidden'; interface AriaHiddenDateInputProps { /** @@ -63,7 +63,7 @@ export function useHiddenDateInput(props: HiddenDateInputProps, state: DateField if (state.granularity === 'second') { inputStep = 1; } else if (state.granularity === 'hour') { - inputStep = 3600; + inputStep = 3600; } let dateValue = state.value == null ? '' : state.value.toString(); @@ -107,9 +107,9 @@ export function useHiddenDateInput(props: HiddenDateInputProps, state: DateField } // We check to to see if setSegment exists in the state since it only exists in DateFieldState and not DatePickerState. // The setValue method has different behavior depending on if it's coming from DateFieldState or DatePickerState. - // In DateFieldState, setValue firsts checks to make sure that each segment is filled before committing the newValue - // which is why in the code below we first set each segment to validate it before committing the new value. - // However, in DatePickerState, since we have to be able to commit values from the Calendar popover, we are also able to + // In DateFieldState, setValue firsts checks to make sure that each segment is filled before committing the newValue + // which is why in the code below we first set each segment to validate it before committing the new value. + // However, in DatePickerState, since we have to be able to commit values from the Calendar popover, we are also able to // set a new value when the field itself is empty. if ('setSegment' in state) { for (let type in targetValue) { diff --git a/packages/react-aria-components/src/Input.tsx b/packages/react-aria-components/src/Input.tsx index 9cd46c17feb..3174fb1084a 100644 --- a/packages/react-aria-components/src/Input.tsx +++ b/packages/react-aria-components/src/Input.tsx @@ -12,8 +12,11 @@ import {ContextValue, StyleRenderProps, useContextProps, useRenderProps} from './utils'; import {createHideableComponent} from '@react-aria/collections'; -import {HoverEvents, mergeProps, useFocusRing, useHover} from 'react-aria'; +import {HoverEvents} from '@react-types/shared'; +import {mergeProps} from '@react-aria/utils'; import React, {createContext, ForwardedRef, InputHTMLAttributes} from 'react'; +import {useFocusRing} from '@react-aria/focus'; +import {useHover} from '@react-aria/interactions'; export interface InputRenderProps { /** diff --git a/packages/react-aria-components/src/Link.tsx b/packages/react-aria-components/src/Link.tsx index e91b170700c..3068f84dba6 100644 --- a/packages/react-aria-components/src/Link.tsx +++ b/packages/react-aria-components/src/Link.tsx @@ -10,11 +10,13 @@ * governing permissions and limitations under the License. */ -import {AriaLinkOptions, HoverEvents, mergeProps, useFocusRing, useHover, useLink} from 'react-aria'; +import {AriaLinkOptions, useLink} from '@react-aria/link'; import {ContextValue, RenderProps, SlotProps, useContextProps, useRenderProps} from './utils'; -import {filterDOMProps} from '@react-aria/utils'; -import {forwardRefType, GlobalDOMAttributes} from '@react-types/shared'; +import {filterDOMProps, mergeProps} from '@react-aria/utils'; +import {forwardRefType, GlobalDOMAttributes, HoverEvents} from '@react-types/shared'; import React, {createContext, ElementType, ForwardedRef, forwardRef} from 'react'; +import {useFocusRing} from '@react-aria/focus'; +import {useHover} from '@react-aria/interactions'; export interface LinkProps extends Omit, HoverEvents, RenderProps, SlotProps, Omit, 'onClick'> {} diff --git a/packages/react-aria-components/src/ListBox.tsx b/packages/react-aria-components/src/ListBox.tsx index 01a9862f1c0..9624c737fdf 100644 --- a/packages/react-aria-components/src/ListBox.tsx +++ b/packages/react-aria-components/src/ListBox.tsx @@ -10,20 +10,45 @@ * governing permissions and limitations under the License. */ -import {AriaListBoxOptions, AriaListBoxProps, DraggableItemResult, DragPreviewRenderer, DroppableCollectionResult, DroppableItemResult, FocusScope, ListKeyboardDelegate, mergeProps, useCollator, useFocusRing, useHover, useListBox, useListBoxSection, useLocale, useOption} from 'react-aria'; +import {AriaListBoxOptions, useListBox, useListBoxSection, useOption} from '@react-aria/listbox'; +import {AriaListBoxProps} from '@react-types/listbox'; import {Collection, CollectionBuilder, createBranchComponent, createLeafComponent} from '@react-aria/collections'; import {CollectionProps, CollectionRendererContext, ItemRenderProps, SectionContext, SectionProps} from './Collection'; import {ContextValue, DEFAULT_SLOT, Provider, RenderProps, SlotProps, StyleProps, StyleRenderProps, useContextProps, useRenderProps, useSlot} from './utils'; import {DragAndDropContext, DropIndicatorContext, DropIndicatorProps, useDndPersistedKeys, useRenderDropIndicator} from './DragAndDrop'; import {DragAndDropHooks} from './useDragAndDrop'; -import {DraggableCollectionState, DroppableCollectionState, ListState, Node, Orientation, SelectionBehavior, UNSTABLE_useFilteredListState, useListState} from 'react-stately'; -import {filterDOMProps, inertValue, LoadMoreSentinelProps, mergeRefs, useLoadMoreSentinel, useObjectRef} from '@react-aria/utils'; -import {forwardRefType, GlobalDOMAttributes, HoverEvents, Key, LinkDOMProps, PressEvents, RefObject} from '@react-types/shared'; +import {DraggableCollectionState, DroppableCollectionState} from '@react-stately/dnd'; +import {DraggableItemResult, DroppableCollectionResult, DroppableItemResult} from '@react-aria/dnd'; +import { + DragPreviewRenderer, forwardRefType, GlobalDOMAttributes, + HoverEvents, + Key, + LinkDOMProps, + Node, + Orientation, + PressEvents, + RefObject, + SelectionBehavior +} from '@react-types/shared'; +import { + filterDOMProps, + inertValue, + LoadMoreSentinelProps, + mergeProps, + mergeRefs, + useLoadMoreSentinel, + useObjectRef +} from '@react-aria/utils'; +import {FocusScope, useFocusRing} from '@react-aria/focus'; import {HeaderContext} from './Header'; +import {ListKeyboardDelegate} from '@react-aria/selection'; +import {ListState, UNSTABLE_useFilteredListState, useListState} from '@react-stately/list'; import React, {createContext, ForwardedRef, forwardRef, JSX, ReactNode, useContext, useEffect, useMemo, useRef} from 'react'; import {SeparatorContext} from './Separator'; import {TextContext} from './Text'; import {UNSTABLE_InternalAutocompleteContext} from './Autocomplete'; +import {useCollator, useLocale} from '@react-aria/i18n'; +import {useHover} from '@react-aria/interactions'; export interface ListBoxRenderProps { /** diff --git a/packages/react-aria-components/src/Menu.tsx b/packages/react-aria-components/src/Menu.tsx index d180bb19d51..db4ff94f5ab 100644 --- a/packages/react-aria-components/src/Menu.tsx +++ b/packages/react-aria-components/src/Menu.tsx @@ -10,19 +10,25 @@ * governing permissions and limitations under the License. */ -import {AriaMenuProps, FocusScope, mergeProps, useHover, useMenu, useMenuItem, useMenuSection, useMenuTrigger, useSubmenuTrigger} from 'react-aria'; +import {AriaMenuProps, useMenu, useMenuItem, useMenuSection, useMenuTrigger, useSubmenuTrigger} from '@react-aria/menu'; import {BaseCollection, Collection, CollectionBuilder, createBranchComponent, createLeafComponent} from '@react-aria/collections'; -import {MenuTriggerProps as BaseMenuTriggerProps, Collection as ICollection, Node, RootMenuTriggerState, TreeState, useMenuTriggerState, useSubmenuTriggerState, useTreeState} from 'react-stately'; +import { + MenuTriggerProps as BaseMenuTriggerProps, + RootMenuTriggerState, + useMenuTriggerState, + useSubmenuTriggerState +} from '@react-stately/menu'; import {CollectionProps, CollectionRendererContext, ItemRenderProps, SectionContext, SectionProps, usePersistedKeys} from './Collection'; import {ContextValue, DEFAULT_SLOT, Provider, RenderProps, SlotProps, StyleRenderProps, useContextProps, useRenderProps, useSlot, useSlottedContext} from './utils'; -import {filterDOMProps, mergeRefs, useObjectRef, useResizeObserver} from '@react-aria/utils'; -import {FocusStrategy, forwardRefType, GlobalDOMAttributes, HoverEvents, Key, LinkDOMProps, MultipleSelection, PressEvents} from '@react-types/shared'; +import {filterDOMProps, mergeProps, mergeRefs, useObjectRef, useResizeObserver} from '@react-aria/utils'; +import {FocusScope} from '@react-aria/focus'; +import {FocusStrategy, forwardRefType, GlobalDOMAttributes, HoverEvents, Collection as ICollection, Key, LinkDOMProps, MultipleSelection, Node, PressEvents} from '@react-types/shared'; import {HeaderContext} from './Header'; import {KeyboardContext} from './Keyboard'; import {MultipleSelectionState, SelectionManager, useMultipleSelectionState} from '@react-stately/selection'; import {OverlayTriggerStateContext} from './Dialog'; import {PopoverContext} from './Popover'; -import {PressResponder} from '@react-aria/interactions'; +import {PressResponder, useHover} from '@react-aria/interactions'; import React, { createContext, ForwardedRef, @@ -39,6 +45,7 @@ import React, { } from 'react'; import {SeparatorContext} from './Separator'; import {TextContext} from './Text'; +import {TreeState, useTreeState} from '@react-stately/tree'; import {UNSTABLE_InternalAutocompleteContext} from './Autocomplete'; export const MenuContext = createContext, HTMLDivElement>>(null); diff --git a/packages/react-aria-components/src/Meter.tsx b/packages/react-aria-components/src/Meter.tsx index bf33dc43a60..32cf3ca9d56 100644 --- a/packages/react-aria-components/src/Meter.tsx +++ b/packages/react-aria-components/src/Meter.tsx @@ -10,7 +10,7 @@ * governing permissions and limitations under the License. */ -import {AriaMeterProps, useMeter} from 'react-aria'; +import {AriaMeterProps, useMeter} from '@react-aria/meter'; import {clamp} from '@react-stately/utils'; import {ContextValue, RenderProps, SlotProps, useContextProps, useRenderProps, useSlot} from './utils'; import {filterDOMProps, mergeProps} from '@react-aria/utils'; diff --git a/packages/react-aria-components/src/Modal.tsx b/packages/react-aria-components/src/Modal.tsx index b53a1b1bb8f..42b06d64ab1 100644 --- a/packages/react-aria-components/src/Modal.tsx +++ b/packages/react-aria-components/src/Modal.tsx @@ -10,13 +10,14 @@ * governing permissions and limitations under the License. */ -import {AriaModalOverlayProps, DismissButton, Overlay, useIsSSR, useModalOverlay} from 'react-aria'; +import {AriaModalOverlayProps, DismissButton, Overlay, useModalOverlay} from '@react-aria/overlays'; import {ContextValue, Provider, RenderProps, SlotProps, useContextProps, useRenderProps} from './utils'; import {DOMAttributes, forwardRefType, GlobalDOMAttributes, RefObject} from '@react-types/shared'; import {filterDOMProps, mergeProps, mergeRefs, useEnterAnimation, useExitAnimation, useObjectRef, useViewportSize} from '@react-aria/utils'; -import {OverlayTriggerProps, OverlayTriggerState, useOverlayTriggerState} from 'react-stately'; +import {OverlayTriggerProps, OverlayTriggerState, useOverlayTriggerState} from '@react-stately/overlays'; import {OverlayTriggerStateContext} from './Dialog'; import React, {createContext, ForwardedRef, forwardRef, useContext, useMemo, useRef} from 'react'; +import {useIsSSR} from '@react-aria/ssr'; export interface ModalOverlayProps extends AriaModalOverlayProps, OverlayTriggerProps, RenderProps, SlotProps, GlobalDOMAttributes { /** diff --git a/packages/react-aria-components/src/NumberField.tsx b/packages/react-aria-components/src/NumberField.tsx index b8d79d2bf5a..93d7ba191b5 100644 --- a/packages/react-aria-components/src/NumberField.tsx +++ b/packages/react-aria-components/src/NumberField.tsx @@ -10,7 +10,7 @@ * governing permissions and limitations under the License. */ -import {AriaNumberFieldProps, useLocale, useNumberField} from 'react-aria'; +import {AriaNumberFieldProps} from '@react-types/numberfield'; import {ButtonContext} from './Button'; import {ContextValue, Provider, RACValidation, removeDataAttributes, RenderProps, SlotProps, useContextProps, useRenderProps, useSlot, useSlottedContext} from './utils'; import {FieldErrorContext} from './FieldError'; @@ -20,9 +20,11 @@ import {forwardRefType, GlobalDOMAttributes, InputDOMProps} from '@react-types/s import {GroupContext} from './Group'; import {InputContext} from './Input'; import {LabelContext} from './Label'; -import {NumberFieldState, useNumberFieldState} from 'react-stately'; +import {NumberFieldState, useNumberFieldState} from '@react-stately/numberfield'; import React, {createContext, ForwardedRef, forwardRef, useRef} from 'react'; import {TextContext} from './Text'; +import {useLocale} from '@react-aria/i18n'; +import {useNumberField} from '@react-aria/numberfield'; export interface NumberFieldRenderProps { /** diff --git a/packages/react-aria-components/src/OverlayArrow.tsx b/packages/react-aria-components/src/OverlayArrow.tsx index a99c5c446a5..f436b67a6c5 100644 --- a/packages/react-aria-components/src/OverlayArrow.tsx +++ b/packages/react-aria-components/src/OverlayArrow.tsx @@ -13,7 +13,7 @@ import {ContextValue, RenderProps, useContextProps, useRenderProps} from './utils'; import {DOMProps, forwardRefType} from '@react-types/shared'; import {filterDOMProps} from '@react-aria/utils'; -import {PlacementAxis} from 'react-aria'; +import {PlacementAxis} from '@react-types/overlays'; import React, {createContext, CSSProperties, ForwardedRef, forwardRef, HTMLAttributes} from 'react'; interface OverlayArrowContextValue extends OverlayArrowProps { diff --git a/packages/react-aria-components/src/Popover.tsx b/packages/react-aria-components/src/Popover.tsx index 13ae55ab81b..566fad7b07d 100644 --- a/packages/react-aria-components/src/Popover.tsx +++ b/packages/react-aria-components/src/Popover.tsx @@ -11,15 +11,16 @@ */ import {AriaLabelingProps, forwardRefType, GlobalDOMAttributes, RefObject} from '@react-types/shared'; -import {AriaPopoverProps, DismissButton, Overlay, PlacementAxis, PositionProps, useLocale, usePopover} from 'react-aria'; +import {AriaPopoverProps, DismissButton, Overlay, PlacementAxis, PositionProps, usePopover} from '@react-aria/overlays'; import {ContextValue, RenderProps, SlotProps, useContextProps, useRenderProps} from './utils'; import {filterDOMProps, mergeProps, useEnterAnimation, useExitAnimation, useLayoutEffect} from '@react-aria/utils'; import {focusSafely} from '@react-aria/interactions'; import {OverlayArrowContext} from './OverlayArrow'; -import {OverlayTriggerProps, OverlayTriggerState, useOverlayTriggerState} from 'react-stately'; +import {OverlayTriggerProps, OverlayTriggerState, useOverlayTriggerState} from '@react-stately/overlays'; import {OverlayTriggerStateContext} from './Dialog'; import React, {Context, createContext, ForwardedRef, forwardRef, useContext, useEffect, useMemo, useRef, useState} from 'react'; import {useIsHidden} from '@react-aria/collections'; +import {useLocale} from '@react-aria/i18n'; export interface PopoverProps extends Omit, Omit, OverlayTriggerProps, RenderProps, SlotProps, AriaLabelingProps, GlobalDOMAttributes { /** diff --git a/packages/react-aria-components/src/ProgressBar.tsx b/packages/react-aria-components/src/ProgressBar.tsx index 58e073fc1ea..ad2a372ffaa 100644 --- a/packages/react-aria-components/src/ProgressBar.tsx +++ b/packages/react-aria-components/src/ProgressBar.tsx @@ -10,7 +10,7 @@ * governing permissions and limitations under the License. */ -import {AriaProgressBarProps, useProgressBar} from 'react-aria'; +import {AriaProgressBarProps, useProgressBar} from '@react-aria/progress'; import {clamp} from '@react-stately/utils'; import {ContextValue, RenderProps, SlotProps, useContextProps, useRenderProps, useSlot} from './utils'; import {filterDOMProps, mergeProps} from '@react-aria/utils'; diff --git a/packages/react-aria-components/src/RadioGroup.tsx b/packages/react-aria-components/src/RadioGroup.tsx index e89910ba2d7..8507a583094 100644 --- a/packages/react-aria-components/src/RadioGroup.tsx +++ b/packages/react-aria-components/src/RadioGroup.tsx @@ -10,16 +10,20 @@ * governing permissions and limitations under the License. */ -import {AriaRadioGroupProps, AriaRadioProps, HoverEvents, Orientation, useFocusRing, useHover, useRadio, useRadioGroup, VisuallyHidden} from 'react-aria'; +import {AriaRadioGroupProps, AriaRadioProps} from '@react-types/radio'; import {ContextValue, Provider, RACValidation, removeDataAttributes, RenderProps, SlotProps, useContextProps, useRenderProps, useSlot, useSlottedContext} from './utils'; import {FieldErrorContext} from './FieldError'; import {filterDOMProps, mergeProps, mergeRefs, useObjectRef} from '@react-aria/utils'; import {FormContext} from './Form'; -import {forwardRefType, GlobalDOMAttributes, RefObject} from '@react-types/shared'; +import {forwardRefType, GlobalDOMAttributes, HoverEvents, Orientation, RefObject} from '@react-types/shared'; import {LabelContext} from './Label'; -import {RadioGroupState, useRadioGroupState} from 'react-stately'; +import {RadioGroupState, useRadioGroupState} from '@react-stately/radio'; import React, {createContext, ForwardedRef, forwardRef, useMemo} from 'react'; import {TextContext} from './Text'; +import {useFocusRing} from '@react-aria/focus'; +import {useHover} from '@react-aria/interactions'; +import {useRadio, useRadioGroup} from '@react-aria/radio'; +import {VisuallyHidden} from '@react-aria/visually-hidden'; export interface RadioGroupProps extends Omit, RACValidation, RenderProps, SlotProps, GlobalDOMAttributes {} export interface RadioProps extends Omit, HoverEvents, RenderProps, SlotProps, Omit, 'onClick'> { diff --git a/packages/react-aria-components/src/SearchField.tsx b/packages/react-aria-components/src/SearchField.tsx index 3695385688d..f6e3d15f86f 100644 --- a/packages/react-aria-components/src/SearchField.tsx +++ b/packages/react-aria-components/src/SearchField.tsx @@ -10,7 +10,7 @@ * governing permissions and limitations under the License. */ -import {AriaSearchFieldProps, useSearchField} from 'react-aria'; +import {AriaSearchFieldProps} from '@react-types/searchfield'; import {ButtonContext} from './Button'; import {ContextValue, Provider, RACValidation, removeDataAttributes, RenderProps, SlotProps, useContextProps, useRenderProps, useSlot, useSlottedContext} from './utils'; import {createHideableComponent} from '@react-aria/collections'; @@ -22,8 +22,9 @@ import {GroupContext} from './Group'; import {InputContext} from './Input'; import {LabelContext} from './Label'; import React, {createContext, ForwardedRef, useRef} from 'react'; -import {SearchFieldState, useSearchFieldState} from 'react-stately'; +import {SearchFieldState, useSearchFieldState} from '@react-stately/searchfield'; import {TextContext} from './Text'; +import {useSearchField} from '@react-aria/searchfield'; export interface SearchFieldRenderProps { /** diff --git a/packages/react-aria-components/src/Select.tsx b/packages/react-aria-components/src/Select.tsx index 2248f429380..199191ac52c 100644 --- a/packages/react-aria-components/src/Select.tsx +++ b/packages/react-aria-components/src/Select.tsx @@ -10,15 +10,15 @@ * governing permissions and limitations under the License. */ -import {AriaSelectProps, HiddenSelect, useFocusRing, useLocalizedStringFormatter, useSelect} from 'react-aria'; +import {AriaSelectProps} from '@react-types/select'; import {ButtonContext} from './Button'; -import {Collection, Node, SelectState, useSelectState} from 'react-stately'; +import {Collection, forwardRefType, GlobalDOMAttributes, Node} from '@react-types/shared'; import {CollectionBuilder} from '@react-aria/collections'; import {ContextValue, Provider, RACValidation, removeDataAttributes, RenderProps, SlotProps, useContextProps, useRenderProps, useSlot, useSlottedContext} from './utils'; import {FieldErrorContext} from './FieldError'; import {filterDOMProps, mergeProps, useResizeObserver} from '@react-aria/utils'; import {FormContext} from './Form'; -import {forwardRefType, GlobalDOMAttributes} from '@react-types/shared'; +import {HiddenSelect, useSelect} from '@react-aria/select'; // @ts-ignore import intlMessages from '../intl/*.json'; import {ItemRenderProps} from './Collection'; @@ -27,7 +27,10 @@ import {ListBoxContext, ListStateContext} from './ListBox'; import {OverlayTriggerStateContext} from './Dialog'; import {PopoverContext} from './Popover'; import React, {createContext, ForwardedRef, forwardRef, HTMLAttributes, ReactNode, useCallback, useContext, useMemo, useRef, useState} from 'react'; +import {SelectState, useSelectState} from '@react-stately/select'; import {TextContext} from './Text'; +import {useFocusRing} from '@react-aria/focus'; +import {useLocalizedStringFormatter} from '@react-aria/i18n'; export interface SelectRenderProps { /** diff --git a/packages/react-aria-components/src/Separator.tsx b/packages/react-aria-components/src/Separator.tsx index f3b9e7b24f1..5b8d359e049 100644 --- a/packages/react-aria-components/src/Separator.tsx +++ b/packages/react-aria-components/src/Separator.tsx @@ -10,7 +10,7 @@ * governing permissions and limitations under the License. */ -import {SeparatorProps as AriaSeparatorProps, useSeparator} from 'react-aria'; +import {SeparatorProps as AriaSeparatorProps, useSeparator} from '@react-aria/separator'; import {ContextValue, SlotProps, StyleProps, useContextProps} from './utils'; import {createLeafComponent} from '@react-aria/collections'; import {filterDOMProps, mergeProps} from '@react-aria/utils'; diff --git a/packages/react-aria-components/src/Slider.tsx b/packages/react-aria-components/src/Slider.tsx index c982f5b12f8..ac6a5fe376e 100644 --- a/packages/react-aria-components/src/Slider.tsx +++ b/packages/react-aria-components/src/Slider.tsx @@ -10,13 +10,18 @@ * governing permissions and limitations under the License. */ -import {AriaSliderProps, AriaSliderThumbProps, HoverEvents, mergeProps, Orientation, useFocusRing, useHover, useNumberFormatter, useSlider, useSliderThumb, VisuallyHidden} from 'react-aria'; +import {AriaSliderProps, AriaSliderThumbProps} from '@react-types/slider'; import {ContextValue, Provider, RenderProps, SlotProps, useContextProps, useRenderProps, useSlot, useSlottedContext} from './utils'; -import {filterDOMProps} from '@react-aria/utils'; -import {forwardRefType, GlobalDOMAttributes, RefObject} from '@react-types/shared'; +import {filterDOMProps, mergeProps} from '@react-aria/utils'; +import {forwardRefType, GlobalDOMAttributes, HoverEvents, Orientation, RefObject} from '@react-types/shared'; import {LabelContext} from './Label'; import React, {createContext, ForwardedRef, forwardRef, HTMLAttributes, OutputHTMLAttributes, useContext, useRef} from 'react'; -import {SliderState, useSliderState} from 'react-stately'; +import {SliderState, useSliderState} from '@react-stately/slider'; +import {useFocusRing} from '@react-aria/focus'; +import {useHover} from '@react-aria/interactions'; +import {useNumberFormatter} from '@react-aria/i18n'; +import {useSlider, useSliderThumb} from '@react-aria/slider'; +import {VisuallyHidden} from '@react-aria/visually-hidden'; export interface SliderProps extends Omit, 'label'>, RenderProps, SlotProps, GlobalDOMAttributes { /** diff --git a/packages/react-aria-components/src/Switch.tsx b/packages/react-aria-components/src/Switch.tsx index cb844929efa..5171abd20d5 100644 --- a/packages/react-aria-components/src/Switch.tsx +++ b/packages/react-aria-components/src/Switch.tsx @@ -10,12 +10,16 @@ * governing permissions and limitations under the License. */ -import {AriaSwitchProps, HoverEvents, mergeProps, useFocusRing, useHover, useSwitch, VisuallyHidden} from 'react-aria'; +import {AriaSwitchProps} from '@react-types/switch'; import {ContextValue, removeDataAttributes, RenderProps, SlotProps, useContextProps, useRenderProps} from './utils'; -import {filterDOMProps, mergeRefs, useObjectRef} from '@react-aria/utils'; -import {forwardRefType, GlobalDOMAttributes, RefObject} from '@react-types/shared'; +import {filterDOMProps, mergeProps, mergeRefs, useObjectRef} from '@react-aria/utils'; +import {forwardRefType, GlobalDOMAttributes, HoverEvents, RefObject} from '@react-types/shared'; import React, {createContext, ForwardedRef, forwardRef} from 'react'; -import {ToggleState, useToggleState} from 'react-stately'; +import {ToggleState, useToggleState} from '@react-stately/toggle'; +import {useFocusRing} from '@react-aria/focus'; +import {useHover} from '@react-aria/interactions'; +import {useSwitch} from '@react-aria/switch'; +import {VisuallyHidden} from '@react-aria/visually-hidden'; export interface SwitchProps extends Omit, HoverEvents, RenderProps, SlotProps, Omit, 'onClick'> { /** diff --git a/packages/react-aria-components/src/Table.tsx b/packages/react-aria-components/src/Table.tsx index 18d838e4efc..65ae06a793f 100644 --- a/packages/react-aria-components/src/Table.tsx +++ b/packages/react-aria-components/src/Table.tsx @@ -1,21 +1,47 @@ -import {AriaLabelingProps, GlobalDOMAttributes, HoverEvents, Key, LinkDOMProps, PressEvents, RefObject} from '@react-types/shared'; +import { + AriaLabelingProps, + DisabledBehavior, DragPreviewRenderer, GlobalDOMAttributes, HoverEvents, + Key, LinkDOMProps, Node, PressEvents, RefObject, SelectionBehavior, SelectionMode, SortDirection +} from '@react-types/shared'; import {BaseCollection, Collection, CollectionBuilder, CollectionNode, createBranchComponent, createLeafComponent, useCachedChildren} from '@react-aria/collections'; -import {buildHeaderRows, TableColumnResizeState} from '@react-stately/table'; +import { + buildHeaderRows, + TableColumnResizeState, + TableState, + useTableColumnResizeState, + useTableState +} from '@react-stately/table'; import {ButtonContext} from './Button'; import {CheckboxContext} from './RSPContexts'; import {CollectionProps, CollectionRendererContext, DefaultCollectionRenderer, ItemRenderProps} from './Collection'; import {ColumnSize, ColumnStaticSize, TableCollection as ITableCollection, TableProps as SharedTableProps} from '@react-types/table'; import {ContextValue, DEFAULT_SLOT, DOMProps, Provider, RenderProps, SlotProps, StyleProps, StyleRenderProps, useContextProps, useRenderProps} from './utils'; -import {DisabledBehavior, DraggableCollectionState, DroppableCollectionState, MultipleSelectionState, Node, SelectionBehavior, SelectionMode, SortDirection, TableState, useMultipleSelectionState, useTableColumnResizeState, useTableState} from 'react-stately'; import {DragAndDropContext, DropIndicatorContext, DropIndicatorProps, useDndPersistedKeys, useRenderDropIndicator} from './DragAndDrop'; import {DragAndDropHooks} from './useDragAndDrop'; -import {DraggableItemResult, DragPreviewRenderer, DropIndicatorAria, DroppableCollectionResult, FocusScope, ListKeyboardDelegate, mergeProps, useFocusRing, useHover, useLocale, useLocalizedStringFormatter, useTable, useTableCell, useTableColumnHeader, useTableColumnResize, useTableHeaderRow, useTableRow, useTableRowGroup, useTableSelectAllCheckbox, useTableSelectionCheckbox, useVisuallyHidden} from 'react-aria'; -import {filterDOMProps, inertValue, isScrollable, LoadMoreSentinelProps, mergeRefs, useLayoutEffect, useLoadMoreSentinel, useObjectRef, useResizeObserver} from '@react-aria/utils'; +import {DraggableCollectionState, DroppableCollectionState} from '@react-stately/dnd'; +import {DraggableItemResult, DropIndicatorAria, DroppableCollectionResult} from '@react-aria/dnd'; +import { + filterDOMProps, inertValue, isScrollable, LoadMoreSentinelProps, + mergeProps, mergeRefs, useLayoutEffect, useLoadMoreSentinel, useObjectRef, useResizeObserver +} from '@react-aria/utils'; +import {FocusScope, useFocusRing} from '@react-aria/focus'; import {GridNode} from '@react-types/grid'; // @ts-ignore import intlMessages from '../intl/*.json'; +import {ListKeyboardDelegate} from '@react-aria/selection'; +import {MultipleSelectionState, useMultipleSelectionState} from '@react-stately/selection'; import React, {createContext, ForwardedRef, forwardRef, JSX, ReactElement, ReactNode, useCallback, useContext, useEffect, useMemo, useRef, useState} from 'react'; import ReactDOM from 'react-dom'; +import {useHover} from '@react-aria/interactions'; +import {useLocale, useLocalizedStringFormatter} from '@react-aria/i18n'; +import { + useTable, useTableCell, + useTableColumnHeader, useTableColumnResize, + useTableHeaderRow, useTableRow, + useTableRowGroup, + useTableSelectAllCheckbox, useTableSelectionCheckbox +} from '@react-aria/table'; +import {useVisuallyHidden} from '@react-aria/visually-hidden'; class TableCollection extends BaseCollection implements ITableCollection { headerRows: GridNode[] = []; diff --git a/packages/react-aria-components/src/Tabs.tsx b/packages/react-aria-components/src/Tabs.tsx index 907c336dbd1..36bf2b86395 100644 --- a/packages/react-aria-components/src/Tabs.tsx +++ b/packages/react-aria-components/src/Tabs.tsx @@ -10,14 +10,22 @@ * governing permissions and limitations under the License. */ -import {AriaLabelingProps, forwardRefType, GlobalDOMAttributes, HoverEvents, Key, LinkDOMProps, PressEvents, RefObject} from '@react-types/shared'; -import {AriaTabListProps, AriaTabPanelProps, mergeProps, Orientation, useFocusRing, useHover, useTab, useTabList, useTabPanel} from 'react-aria'; +import { + AriaLabelingProps, + forwardRefType, GlobalDOMAttributes, + HoverEvents, Collection as ICollection, Key, LinkDOMProps, Node, + Orientation, PressEvents, RefObject +} from '@react-types/shared'; +import {AriaTabListProps, AriaTabPanelProps} from '@react-types/tabs'; import {Collection, CollectionBuilder, createHideableComponent, createLeafComponent} from '@react-aria/collections'; import {CollectionProps, CollectionRendererContext, DefaultCollectionRenderer, usePersistedKeys} from './Collection'; import {ContextValue, Provider, RenderProps, SlotProps, StyleRenderProps, useContextProps, useRenderProps, useSlottedContext} from './utils'; -import {filterDOMProps, inertValue, useObjectRef} from '@react-aria/utils'; -import {Collection as ICollection, Node, TabListState, useTabListState} from 'react-stately'; +import {filterDOMProps, inertValue, mergeProps, useObjectRef} from '@react-aria/utils'; import React, {createContext, ForwardedRef, forwardRef, JSX, useContext, useMemo} from 'react'; +import {TabListState, useTabListState} from '@react-stately/tabs'; +import {useFocusRing} from '@react-aria/focus'; +import {useHover} from '@react-aria/interactions'; +import {useTab, useTabList, useTabPanel} from '@react-aria/tabs'; export interface TabsProps extends Omit, 'items' | 'children'>, RenderProps, SlotProps, GlobalDOMAttributes {} diff --git a/packages/react-aria-components/src/TagGroup.tsx b/packages/react-aria-components/src/TagGroup.tsx index c23d711296b..4a34e8753a4 100644 --- a/packages/react-aria-components/src/TagGroup.tsx +++ b/packages/react-aria-components/src/TagGroup.tsx @@ -10,18 +10,20 @@ * governing permissions and limitations under the License. */ -import {AriaTagGroupProps, useFocusRing, useHover, useTag, useTagGroup} from 'react-aria'; +import {AriaTagGroupProps, useTag, useTagGroup} from '@react-aria/tag'; import {ButtonContext} from './Button'; import {Collection, CollectionBuilder, createLeafComponent} from '@react-aria/collections'; import {CollectionProps, CollectionRendererContext, DefaultCollectionRenderer, ItemRenderProps, usePersistedKeys} from './Collection'; import {ContextValue, DOMProps, Provider, RenderProps, SlotProps, StyleRenderProps, useContextProps, useRenderProps, useSlot} from './utils'; import {filterDOMProps, mergeProps, useObjectRef} from '@react-aria/utils'; -import {forwardRefType, GlobalDOMAttributes, HoverEvents, Key, LinkDOMProps, PressEvents} from '@react-types/shared'; +import {forwardRefType, GlobalDOMAttributes, HoverEvents, Key, LinkDOMProps, Node, PressEvents} from '@react-types/shared'; import {LabelContext} from './Label'; -import {ListState, Node, useListState} from 'react-stately'; +import {ListState, useListState} from '@react-stately/list'; import {ListStateContext} from './ListBox'; import React, {createContext, ForwardedRef, forwardRef, JSX, ReactNode, useContext, useEffect, useRef} from 'react'; import {TextContext} from './Text'; +import {useFocusRing} from '@react-aria/focus'; +import {useHover} from '@react-aria/interactions'; export interface TagGroupProps extends Omit, 'children' | 'items' | 'label' | 'description' | 'errorMessage' | 'keyboardDelegate'>, DOMProps, SlotProps, GlobalDOMAttributes {} diff --git a/packages/react-aria-components/src/TextArea.tsx b/packages/react-aria-components/src/TextArea.tsx index ae811bf7954..71533702c82 100644 --- a/packages/react-aria-components/src/TextArea.tsx +++ b/packages/react-aria-components/src/TextArea.tsx @@ -1,7 +1,9 @@ import {ContextValue, StyleRenderProps, useContextProps, useRenderProps} from './utils'; -import {HoverEvents, mergeProps, useFocusRing, useHover} from 'react-aria'; +import {HoverEvents, useHover} from '@react-aria/interactions'; import {InputRenderProps} from './Input'; +import {mergeProps} from '@react-aria/utils'; import React, {createContext, ForwardedRef, forwardRef, TextareaHTMLAttributes} from 'react'; +import {useFocusRing} from '@react-aria/focus'; export interface TextAreaProps extends Omit, 'className' | 'style'>, HoverEvents, StyleRenderProps {} diff --git a/packages/react-aria-components/src/TextField.tsx b/packages/react-aria-components/src/TextField.tsx index 1f80249ca5a..47f9ff5c9c7 100644 --- a/packages/react-aria-components/src/TextField.tsx +++ b/packages/react-aria-components/src/TextField.tsx @@ -10,7 +10,7 @@ * governing permissions and limitations under the License. */ -import {AriaTextFieldProps, useTextField} from 'react-aria'; +import {AriaTextFieldProps} from '@react-types/textfield'; import {ContextValue, DOMProps, Provider, RACValidation, removeDataAttributes, RenderProps, SlotProps, useContextProps, useRenderProps, useSlot, useSlottedContext} from './utils'; import {createHideableComponent} from '@react-aria/collections'; import {FieldErrorContext} from './FieldError'; @@ -23,6 +23,7 @@ import {LabelContext} from './Label'; import React, {createContext, ForwardedRef, useCallback, useRef, useState} from 'react'; import {TextAreaContext} from './TextArea'; import {TextContext} from './Text'; +import {useTextField} from '@react-aria/textfield'; export interface TextFieldRenderProps { /** diff --git a/packages/react-aria-components/src/Toast.tsx b/packages/react-aria-components/src/Toast.tsx index d738af57396..a997a5ca266 100644 --- a/packages/react-aria-components/src/Toast.tsx +++ b/packages/react-aria-components/src/Toast.tsx @@ -10,16 +10,19 @@ * governing permissions and limitations under the License. */ -import {AriaToastProps, AriaToastRegionProps, mergeProps, useFocusRing, useHover, useLocale, useToast, useToastRegion} from 'react-aria'; +import {AriaToastProps, AriaToastRegionProps, useToast, useToastRegion} from '@react-aria/toast'; import {ButtonContext} from './Button'; import {ContextValue, DEFAULT_SLOT, Provider, RenderProps, StyleRenderProps, useContextProps, useRenderProps} from './utils'; import {createPortal} from 'react-dom'; -import {filterDOMProps, useObjectRef} from '@react-aria/utils'; +import {filterDOMProps, mergeProps, useObjectRef} from '@react-aria/utils'; import {forwardRefType, GlobalDOMAttributes} from '@react-types/shared'; -import {QueuedToast, ToastQueue, ToastState, useToastQueue} from 'react-stately'; +import {QueuedToast, ToastQueue, ToastState, useToastQueue} from '@react-stately/toast'; import React, {createContext, ForwardedRef, forwardRef, HTMLAttributes, JSX, ReactElement, ReactNode, useContext} from 'react'; import {TextContext} from './Text'; +import {useFocusRing} from '@react-aria/focus'; +import {useHover} from '@react-aria/interactions'; import {useIsSSR} from '@react-aria/ssr'; +import {useLocale} from '@react-aria/i18n'; import {useUNSAFE_PortalContext} from '@react-aria/overlays'; export const ToastStateContext = createContext | null>(null); diff --git a/packages/react-aria-components/src/ToggleButton.tsx b/packages/react-aria-components/src/ToggleButton.tsx index c42b7f6881d..85e9e187e20 100644 --- a/packages/react-aria-components/src/ToggleButton.tsx +++ b/packages/react-aria-components/src/ToggleButton.tsx @@ -10,14 +10,17 @@ * governing permissions and limitations under the License. */ -import {AriaToggleButtonProps, HoverEvents, mergeProps, useFocusRing, useHover, useToggleButton, useToggleButtonGroupItem} from 'react-aria'; +import {AriaToggleButtonProps} from '@react-types/button'; import {ButtonRenderProps} from './Button'; import {ContextValue, RenderProps, SlotProps, useContextProps, useRenderProps} from './utils'; -import {filterDOMProps} from '@react-aria/utils'; -import {forwardRefType, GlobalDOMAttributes, Key} from '@react-types/shared'; +import {filterDOMProps, mergeProps} from '@react-aria/utils'; +import {forwardRefType, GlobalDOMAttributes, HoverEvents, Key} from '@react-types/shared'; import React, {createContext, ForwardedRef, forwardRef, useContext} from 'react'; import {ToggleGroupStateContext} from './ToggleButtonGroup'; -import {ToggleState, useToggleState} from 'react-stately'; +import {ToggleState, useToggleState} from '@react-stately/toggle'; +import {useFocusRing} from '@react-aria/focus'; +import {useHover} from '@react-aria/interactions'; +import {useToggleButton, useToggleButtonGroupItem} from '@react-aria/button'; export interface ToggleButtonRenderProps extends Omit { /** diff --git a/packages/react-aria-components/src/ToggleButtonGroup.tsx b/packages/react-aria-components/src/ToggleButtonGroup.tsx index e22ab95d300..6cf937f8c74 100644 --- a/packages/react-aria-components/src/ToggleButtonGroup.tsx +++ b/packages/react-aria-components/src/ToggleButtonGroup.tsx @@ -9,12 +9,12 @@ * OF ANY KIND, either express or implied. See the License for the specific language * governing permissions and limitations under the License. */ -import {AriaToggleButtonGroupProps, useToggleButtonGroup} from 'react-aria'; +import {AriaToggleButtonGroupProps, useToggleButtonGroup} from '@react-aria/button'; import {ContextValue, RenderProps, SlotProps, useContextProps, useRenderProps} from './utils'; import {filterDOMProps, mergeProps} from '@react-aria/utils'; import {forwardRefType, GlobalDOMAttributes} from '@react-types/shared'; import React, {createContext, ForwardedRef, forwardRef} from 'react'; -import {ToggleGroupState, useToggleGroupState} from 'react-stately'; +import {ToggleGroupState, useToggleGroupState} from '@react-stately/toggle'; export interface ToggleButtonGroupRenderProps { /** diff --git a/packages/react-aria-components/src/Tooltip.tsx b/packages/react-aria-components/src/Tooltip.tsx index f0f68cfe611..7c8d6e027dc 100644 --- a/packages/react-aria-components/src/Tooltip.tsx +++ b/packages/react-aria-components/src/Tooltip.tsx @@ -11,13 +11,16 @@ */ import {AriaLabelingProps, FocusableElement, forwardRefType, GlobalDOMAttributes, RefObject} from '@react-types/shared'; -import {AriaPositionProps, mergeProps, OverlayContainer, Placement, PlacementAxis, PositionProps, useOverlayPosition, useTooltip, useTooltipTrigger} from 'react-aria'; +import {AriaPositionProps, OverlayContainer, useOverlayPosition} from '@react-aria/overlays'; import {ContextValue, Provider, RenderProps, useContextProps, useRenderProps} from './utils'; -import {filterDOMProps, useEnterAnimation, useExitAnimation} from '@react-aria/utils'; +import {filterDOMProps, mergeProps, useEnterAnimation, useExitAnimation} from '@react-aria/utils'; import {FocusableProvider} from '@react-aria/focus'; import {OverlayArrowContext} from './OverlayArrow'; -import {OverlayTriggerProps, TooltipTriggerProps, TooltipTriggerState, useTooltipTriggerState} from 'react-stately'; +import {OverlayTriggerProps, Placement, PlacementAxis, PositionProps} from '@react-types/overlays'; import React, {createContext, CSSProperties, ForwardedRef, forwardRef, JSX, ReactNode, useContext, useRef} from 'react'; +import {TooltipTriggerProps} from '@react-types/tooltip'; +import {TooltipTriggerState, useTooltipTriggerState} from '@react-stately/tooltip'; +import {useTooltip, useTooltipTrigger} from '@react-aria/tooltip'; export interface TooltipTriggerComponentProps extends TooltipTriggerProps { children: ReactNode diff --git a/packages/react-aria-components/src/Tree.tsx b/packages/react-aria-components/src/Tree.tsx index 1deea65fc38..3a82f81b789 100644 --- a/packages/react-aria-components/src/Tree.tsx +++ b/packages/react-aria-components/src/Tree.tsx @@ -10,20 +10,35 @@ * governing permissions and limitations under the License. */ -import {AriaTreeItemOptions, AriaTreeProps, DraggableItemResult, DropIndicatorAria, DropIndicatorProps, DroppableCollectionResult, FocusScope, ListKeyboardDelegate, mergeProps, useCollator, useFocusRing, useGridListSelectionCheckbox, useHover, useId, useLocale, useTree, useTreeItem, useVisuallyHidden} from 'react-aria'; +import {AriaTreeItemOptions, AriaTreeProps, useTree, useTreeItem} from '@react-aria/tree'; import {ButtonContext} from './Button'; import {CheckboxContext} from './RSPContexts'; import {Collection, CollectionBuilder, CollectionNode, createBranchComponent, createLeafComponent, useCachedChildren} from '@react-aria/collections'; import {CollectionProps, CollectionRendererContext, DefaultCollectionRenderer, ItemRenderProps} from './Collection'; import {ContextValue, DEFAULT_SLOT, Provider, RenderProps, SlotProps, StyleRenderProps, useContextProps, useRenderProps} from './utils'; -import {DisabledBehavior, DragPreviewRenderer, Expandable, forwardRefType, GlobalDOMAttributes, HoverEvents, Key, LinkDOMProps, MultipleSelection, PressEvents, RefObject, SelectionMode} from '@react-types/shared'; +import {DisabledBehavior, DragPreviewRenderer, Expandable, forwardRefType, GlobalDOMAttributes, HoverEvents, Collection as ICollection, Key, LinkDOMProps, MultipleSelection, Node, PressEvents, RefObject, SelectionBehavior, SelectionMode} from '@react-types/shared'; import {DragAndDropContext, DropIndicatorContext, useDndPersistedKeys, useRenderDropIndicator} from './DragAndDrop'; import {DragAndDropHooks} from './useDragAndDrop'; -import {DraggableCollectionState, DroppableCollectionState, Collection as ICollection, Node, SelectionBehavior, TreeState, useTreeState} from 'react-stately'; -import {filterDOMProps, inertValue, LoadMoreSentinelProps, useLoadMoreSentinel, useObjectRef} from '@react-aria/utils'; +import {DraggableCollectionState, DroppableCollectionState} from '@react-stately/dnd'; +import {DraggableItemResult, DropIndicatorAria, DropIndicatorProps, DroppableCollectionResult} from '@react-aria/dnd'; +import { + filterDOMProps, + inertValue, + LoadMoreSentinelProps, + mergeProps, useId, + useLoadMoreSentinel, + useObjectRef +} from '@react-aria/utils'; +import {FocusScope, useFocusRing} from '@react-aria/focus'; +import {ListKeyboardDelegate} from '@react-aria/selection'; import React, {createContext, ForwardedRef, forwardRef, JSX, ReactNode, useContext, useEffect, useMemo, useRef, useState} from 'react'; import {TreeDropTargetDelegate} from './TreeDropTargetDelegate'; +import {TreeState, useTreeState} from '@react-stately/tree'; +import {useCollator, useLocale} from '@react-aria/i18n'; import {useControlledState} from '@react-stately/utils'; +import {useGridListSelectionCheckbox} from '@react-aria/gridlist'; +import {useHover} from '@react-aria/interactions'; +import {useVisuallyHidden} from '@react-aria/visually-hidden'; class TreeCollection implements ICollection> { private flattenedRows: Node[]; diff --git a/packages/react-aria-components/src/index.ts b/packages/react-aria-components/src/index.ts index 56eeeee7bb4..f7c716dbb82 100644 --- a/packages/react-aria-components/src/index.ts +++ b/packages/react-aria-components/src/index.ts @@ -79,8 +79,15 @@ export {TreeLoadMoreItem, Tree, TreeItem, TreeContext, TreeItemContent, TreeStat export {useDragAndDrop} from './useDragAndDrop'; export {DropIndicator, DropIndicatorContext, DragAndDropContext} from './DragAndDrop'; export {Virtualizer} from './Virtualizer'; -export {DIRECTORY_DRAG_TYPE, isDirectoryDropItem, isFileDropItem, isTextDropItem, SSRProvider, RouterProvider, I18nProvider, useLocale, useFilter, Pressable, Focusable, VisuallyHidden} from 'react-aria'; -export {FormValidationContext, parseColor, getColorChannels, ToastQueue as UNSTABLE_ToastQueue} from 'react-stately'; +export {DIRECTORY_DRAG_TYPE, isDirectoryDropItem, isFileDropItem, isTextDropItem} from '@react-aria/dnd'; +export {SSRProvider} from '@react-aria/ssr'; +export {RouterProvider} from '@react-aria/utils'; +export {I18nProvider, useFilter, useLocale} from '@react-aria/i18n'; +export {Focusable, Pressable} from '@react-aria/interactions'; +export {VisuallyHidden} from '@react-aria/visually-hidden'; +export {FormValidationContext} from '@react-stately/form'; +export {parseColor, getColorChannels} from '@react-stately/color'; +export {ToastQueue as UNSTABLE_ToastQueue} from '@react-stately/toast'; export {ListLayout, GridLayout, WaterfallLayout} from '@react-stately/layout'; export {Layout, LayoutInfo, Size, Rect, Point} from '@react-stately/virtualizer'; @@ -144,9 +151,30 @@ export type {DropIndicatorProps, DropIndicatorRenderProps} from './DragAndDrop'; export type {ContextValue, RenderProps, SlotProps, StyleRenderProps} from './utils'; export type {VirtualizerProps} from './Virtualizer'; -export type {DateValue, DateRange, TimeValue} from 'react-aria'; -export type {DirectoryDropItem, DraggableCollectionEndEvent, DraggableCollectionMoveEvent, DraggableCollectionStartEvent, DragPreviewRenderer, DragTypes, DropItem, DropOperation, DroppableCollectionDropEvent, DroppableCollectionEnterEvent, DroppableCollectionExitEvent, DroppableCollectionInsertDropEvent, DroppableCollectionMoveEvent, DroppableCollectionOnItemDropEvent, DroppableCollectionReorderEvent, DroppableCollectionRootDropEvent, DropPosition, DropTarget, FileDropItem, ItemDropTarget, RootDropTarget, TextDropItem, PressEvent} from 'react-aria'; -export type {CalendarState, CheckboxGroupState, Color, ColorAreaState, ColorFieldState, ColorFormat, ColorPickerState, ColorSliderState, ColorSpace, ColorWheelState, ComboBoxState, DateFieldState, DatePickerState, DateRangePickerState, DisclosureState, DisclosureGroupState, Key, ListState, NumberFieldState, OverlayTriggerState, QueuedToast, RadioGroupState, RangeCalendarState, RootMenuTriggerState, SearchFieldState, Selection, SelectState, SliderState, SortDescriptor, SortDirection, SelectionMode, TableState, TabListState, TimeFieldState, ToastOptions, ToastState, ToggleGroupState, ToggleState, TooltipTriggerState, TreeState} from 'react-stately'; +export type {DateValue, DateRange, TimeValue} from '@react-aria/datepicker'; +export type {DirectoryDropItem, DraggableCollectionEndEvent, DraggableCollectionMoveEvent, DraggableCollectionStartEvent, DragPreviewRenderer, DragTypes, DropItem, DropOperation, DroppableCollectionDropEvent, DroppableCollectionEnterEvent, DroppableCollectionExitEvent, DroppableCollectionInsertDropEvent, DroppableCollectionMoveEvent, DroppableCollectionOnItemDropEvent, DroppableCollectionReorderEvent, DroppableCollectionRootDropEvent, DropPosition, DropTarget, FileDropItem, ItemDropTarget, RootDropTarget, TextDropItem} from '@react-aria/dnd'; +export type {PressEvent} from '@react-types/shared'; +export type {CalendarState, RangeCalendarState} from '@react-stately/calendar'; +export type {QueuedToast, ToastOptions, ToastState} from '@react-stately/toast'; +export type {TabListState} from '@react-stately/tabs'; +export type {TableState} from '@react-stately/table'; +export type {ListState} from '@react-stately/list'; +export type {Color, ColorAreaState, ColorFieldState, ColorFormat, ColorPickerState, ColorSliderState, ColorSpace, ColorWheelState} from '@react-stately/color'; +export type {DateFieldState, DatePickerState, DateRangePickerState, TimeFieldState} from '@react-stately/datepicker'; +export type {NumberFieldState} from '@react-stately/numberfield'; +export type {DisclosureState, DisclosureGroupState} from '@react-stately/disclosure'; +export type {TreeState} from '@react-stately/tree'; +export type {ComboBoxState} from '@react-stately/combobox'; +export type {Key, Selection, SelectionMode, SortDescriptor, SortDirection} from '@react-types/shared'; +export type {CheckboxGroupState} from '@react-stately/checkbox'; +export type {OverlayTriggerState} from '@react-stately/overlays'; +export type {RadioGroupState} from '@react-stately/radio'; +export type {RootMenuTriggerState} from '@react-stately/menu'; +export type {SearchFieldState} from '@react-stately/searchfield'; +export type {SelectState} from '@react-stately/select'; +export type {SliderState} from '@react-stately/slider'; +export type {ToggleGroupState, ToggleState} from '@react-stately/toggle'; +export type {TooltipTriggerState} from '@react-stately/tooltip'; export type {AutocompleteState} from '@react-stately/autocomplete'; export type {ListLayoutOptions, GridLayoutOptions, WaterfallLayoutOptions} from '@react-stately/layout'; export type {ValidationResult, RouterConfig} from '@react-types/shared'; diff --git a/packages/react-aria-components/src/useDragAndDrop.tsx b/packages/react-aria-components/src/useDragAndDrop.tsx index a9e286152b0..45dd4112047 100644 --- a/packages/react-aria-components/src/useDragAndDrop.tsx +++ b/packages/react-aria-components/src/useDragAndDrop.tsx @@ -15,32 +15,24 @@ import { DraggableCollectionOptions, DraggableItemProps, DraggableItemResult, - DragItem, DragPreview, - DropIndicatorAria, - DroppableCollectionOptions, - DroppableCollectionResult, - DroppableItemOptions, - DroppableItemResult, - DropTarget, - DropTargetDelegate, - ListDropTargetDelegate, - useDraggableCollection, - useDraggableItem, - useDropIndicator, - useDroppableCollection, - useDroppableItem -} from 'react-aria'; -import {DraggableCollectionProps, DroppableCollectionProps, Key, RefObject} from '@react-types/shared'; + DropIndicatorAria, DroppableCollectionOptions, DroppableCollectionResult, DroppableItemOptions, DroppableItemResult, + isVirtualDragging, ListDropTargetDelegate, + useDraggableCollection, useDraggableItem, useDropIndicator, useDroppableCollection, useDroppableItem +} from '@react-aria/dnd'; +import { + DraggableCollectionProps, + DragItem, + DroppableCollectionProps, + DropTarget, DropTargetDelegate, + Key, + RefObject +} from '@react-types/shared'; import { DraggableCollectionState, - DraggableCollectionStateOptions, - DroppableCollectionState, - DroppableCollectionStateOptions, - useDraggableCollectionState, - useDroppableCollectionState -} from 'react-stately'; -import {isVirtualDragging} from '@react-aria/dnd'; + DraggableCollectionStateOptions, DroppableCollectionState, + DroppableCollectionStateOptions, useDraggableCollectionState, useDroppableCollectionState +} from '@react-stately/dnd'; import {JSX, useMemo} from 'react'; interface DraggableCollectionStateOpts extends Omit {} diff --git a/yarn.lock b/yarn.lock index f812e28692e..7b7b4f7ca65 100644 --- a/yarn.lock +++ b/yarn.lock @@ -26056,26 +26056,97 @@ __metadata: "@internationalized/date": "npm:^3.8.2" "@internationalized/string": "npm:^3.2.7" "@react-aria/autocomplete": "npm:3.0.0-beta.6" + "@react-aria/breadcrumbs": "npm:^3.5.27" + "@react-aria/button": "npm:^3.14.0" + "@react-aria/calendar": "npm:^3.9.0" + "@react-aria/checkbox": "npm:^3.16.0" "@react-aria/collections": "npm:3.0.0-rc.4" + "@react-aria/color": "npm:^3.1.0" + "@react-aria/combobox": "npm:^3.13.0" + "@react-aria/datepicker": "npm:^3.15.0" + "@react-aria/dialog": "npm:^3.5.28" + "@react-aria/disclosure": "npm:^3.0.7" "@react-aria/dnd": "npm:^3.11.0" "@react-aria/focus": "npm:^3.21.0" + "@react-aria/gridlist": "npm:^3.13.3" + "@react-aria/i18n": "npm:^3.12.11" "@react-aria/interactions": "npm:^3.25.4" + "@react-aria/link": "npm:^3.8.4" + "@react-aria/listbox": "npm:^3.14.7" "@react-aria/live-announcer": "npm:^3.4.4" + "@react-aria/menu": "npm:^3.19.0" + "@react-aria/meter": "npm:^3.4.25" + "@react-aria/numberfield": "npm:^3.12.0" "@react-aria/overlays": "npm:^3.28.0" + "@react-aria/progress": "npm:^3.4.25" + "@react-aria/radio": "npm:^3.12.0" + "@react-aria/searchfield": "npm:^3.8.7" + "@react-aria/select": "npm:^3.16.0" + "@react-aria/selection": "npm:^3.25.0" + "@react-aria/separator": "npm:^3.4.11" + "@react-aria/slider": "npm:^3.8.0" "@react-aria/ssr": "npm:^3.9.10" + "@react-aria/switch": "npm:^3.7.6" + "@react-aria/table": "npm:^3.17.6" + "@react-aria/tabs": "npm:^3.10.6" + "@react-aria/tag": "npm:^3.7.0" + "@react-aria/textfield": "npm:^3.18.0" + "@react-aria/toast": "npm:^3.0.6" "@react-aria/toolbar": "npm:3.0.0-beta.19" + "@react-aria/tooltip": "npm:^3.8.6" + "@react-aria/tree": "npm:^3.1.2" "@react-aria/utils": "npm:^3.30.0" "@react-aria/virtualizer": "npm:^4.1.8" + "@react-aria/visually-hidden": "npm:^3.8.26" "@react-stately/autocomplete": "npm:3.0.0-beta.3" + "@react-stately/calendar": "npm:^3.8.3" + "@react-stately/checkbox": "npm:^3.7.0" + "@react-stately/collections": "npm:^3.12.6" + "@react-stately/color": "npm:^3.9.0" + "@react-stately/combobox": "npm:^3.11.0" + "@react-stately/datepicker": "npm:^3.15.0" + "@react-stately/disclosure": "npm:^3.0.6" + "@react-stately/dnd": "npm:^3.6.1" + "@react-stately/form": "npm:^3.2.0" "@react-stately/layout": "npm:^4.4.0" + "@react-stately/list": "npm:^3.12.4" + "@react-stately/menu": "npm:^3.9.6" + "@react-stately/numberfield": "npm:^3.10.0" + "@react-stately/overlays": "npm:^3.6.18" + "@react-stately/radio": "npm:^3.11.0" + "@react-stately/searchfield": "npm:^3.5.14" + "@react-stately/select": "npm:^3.7.0" "@react-stately/selection": "npm:^3.20.4" + "@react-stately/slider": "npm:^3.7.0" "@react-stately/table": "npm:^3.14.4" + "@react-stately/tabs": "npm:^3.8.4" + "@react-stately/toast": "npm:^3.1.2" + "@react-stately/toggle": "npm:^3.9.0" + "@react-stately/tooltip": "npm:^3.5.6" + "@react-stately/tree": "npm:^3.9.1" "@react-stately/utils": "npm:^3.10.8" "@react-stately/virtualizer": "npm:^4.4.2" + "@react-types/button": "npm:^3.13.0" + "@react-types/checkbox": "npm:^3.10.0" + "@react-types/color": "npm:^3.1.0" + "@react-types/combobox": "npm:^3.13.7" + "@react-types/datepicker": "npm:^3.13.0" + "@react-types/dialog": "npm:^3.5.20" "@react-types/form": "npm:^3.7.14" "@react-types/grid": "npm:^3.3.4" + "@react-types/listbox": "npm:^3.7.2" + "@react-types/numberfield": "npm:^3.8.13" + "@react-types/overlays": "npm:^3.9.0" + "@react-types/radio": "npm:^3.9.0" + "@react-types/searchfield": "npm:^3.6.4" + "@react-types/select": "npm:^3.10.0" "@react-types/shared": "npm:^3.31.0" + "@react-types/slider": "npm:^3.8.0" + "@react-types/switch": "npm:^3.5.13" "@react-types/table": "npm:^3.13.2" + "@react-types/tabs": "npm:^3.3.17" + "@react-types/textfield": "npm:^3.12.4" + "@react-types/tooltip": "npm:^3.4.19" "@swc/helpers": "npm:^0.5.0" "@tailwindcss/postcss": "npm:^4.0.0" client-only: "npm:^0.0.1"