@octanejs/aria 0.0.49 → 0.0.50

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (122) hide show
  1. package/package.json +2 -2
  2. package/src/calendar/useCalendar.tsx +3 -3
  3. package/src/calendar/useCalendarBase.tsx +4 -4
  4. package/src/calendar/useCalendarCell.tsx +3 -3
  5. package/src/calendar/useCalendarGrid.tsx +3 -3
  6. package/src/calendar/useCalendarHeading.tsx +3 -3
  7. package/src/calendar/useCalendarMonthPicker.tsx +3 -3
  8. package/src/calendar/useCalendarYearPicker.tsx +3 -3
  9. package/src/calendar/useRangeCalendar.tsx +4 -4
  10. package/src/calendar/utils.tsx +2 -2
  11. package/src/color/useColorArea.tsx +5 -5
  12. package/src/color/useColorAreaGradient.tsx +3 -3
  13. package/src/color/useColorChannelField.tsx +3 -3
  14. package/src/color/useColorField.tsx +5 -5
  15. package/src/color/useColorSlider.tsx +3 -3
  16. package/src/color/useColorSwatch.tsx +3 -3
  17. package/src/color/useColorWheel.tsx +8 -3
  18. package/src/combobox/useComboBox.tsx +7 -7
  19. package/src/components/Calendar.tsx +25 -25
  20. package/src/components/ColorArea.tsx +8 -8
  21. package/src/components/ColorField.tsx +14 -14
  22. package/src/components/ColorPicker.tsx +7 -7
  23. package/src/components/ColorSlider.tsx +9 -9
  24. package/src/components/ColorSwatch.tsx +8 -8
  25. package/src/components/ColorSwatchPicker.tsx +14 -9
  26. package/src/components/ColorThumb.tsx +6 -6
  27. package/src/components/ColorWheel.tsx +13 -10
  28. package/src/components/DateField.tsx +19 -19
  29. package/src/components/DatePicker.tsx +17 -14
  30. package/src/components/DropZone.tsx +7 -7
  31. package/src/components/FileTrigger.tsx +2 -2
  32. package/src/components/GridLayout.tsx +2 -2
  33. package/src/components/HiddenDateInput.tsx +3 -3
  34. package/src/components/PreviewTrigger.tsx +4 -4
  35. package/src/components/TableLayout.tsx +2 -2
  36. package/src/components/Toast.tsx +15 -15
  37. package/src/components/TokenField.tsx +13 -13
  38. package/src/components/Virtualizer.tsx +12 -6
  39. package/src/components/useDragAndDrop.tsx +16 -16
  40. package/src/datepicker/useDateField.tsx +5 -5
  41. package/src/datepicker/useDatePicker.tsx +5 -5
  42. package/src/datepicker/useDatePickerGroup.tsx +4 -4
  43. package/src/datepicker/useDateRangePicker.tsx +6 -6
  44. package/src/datepicker/useDateSegment.tsx +6 -3
  45. package/src/dnd/DragManager.tsx +2 -2
  46. package/src/dnd/DragPreview.tsx +3 -3
  47. package/src/dnd/DropTargetKeyboardNavigation.tsx +1 -1
  48. package/src/dnd/ListDropTargetDelegate.tsx +1 -1
  49. package/src/dnd/constants.tsx +1 -1
  50. package/src/dnd/useAutoScroll.tsx +1 -1
  51. package/src/dnd/useClipboard.tsx +1 -1
  52. package/src/dnd/useDrag.tsx +7 -7
  53. package/src/dnd/useDraggableCollection.tsx +2 -2
  54. package/src/dnd/useDraggableItem.tsx +4 -4
  55. package/src/dnd/useDrop.tsx +3 -3
  56. package/src/dnd/useDropIndicator.tsx +3 -3
  57. package/src/dnd/useDroppableCollection.tsx +3 -3
  58. package/src/dnd/useDroppableItem.tsx +3 -3
  59. package/src/dnd/useVirtualDrop.tsx +2 -2
  60. package/src/dnd/utils.tsx +2 -2
  61. package/src/grid/useGridCell.tsx +4 -4
  62. package/src/gridlist/useGridListItem.tsx +13 -3
  63. package/src/interactions/useContextMenu.tsx +1 -1
  64. package/src/landmark/useLandmark.tsx +6 -1
  65. package/src/menu/useMenuTrigger.tsx +5 -5
  66. package/src/menu/useSubmenuTrigger.tsx +9 -3
  67. package/src/numberfield/useNumberField.tsx +6 -6
  68. package/src/overlays/useOverlay.tsx +1 -1
  69. package/src/radio/useRadioGroup.tsx +2 -2
  70. package/src/searchfield/useSearchField.tsx +5 -5
  71. package/src/selection/useSelectableCollection.tsx +3 -3
  72. package/src/slider/useSliderThumb.tsx +5 -5
  73. package/src/spinbutton/useSpinButton.tsx +2 -2
  74. package/src/stately/calendar/types.tsx +3 -3
  75. package/src/stately/calendar/useCalendarState.tsx +5 -5
  76. package/src/stately/calendar/useRangeCalendarState.tsx +5 -5
  77. package/src/stately/calendar/utils.tsx +2 -2
  78. package/src/stately/color/Color.tsx +1 -1
  79. package/src/stately/color/useColor.tsx +1 -1
  80. package/src/stately/color/useColorAreaState.tsx +2 -2
  81. package/src/stately/color/useColorChannelFieldState.tsx +3 -3
  82. package/src/stately/color/useColorFieldState.tsx +3 -3
  83. package/src/stately/color/useColorPickerState.tsx +2 -2
  84. package/src/stately/color/useColorSliderState.tsx +2 -2
  85. package/src/stately/color/useColorWheelState.tsx +2 -2
  86. package/src/stately/data/useAsyncList.tsx +2 -2
  87. package/src/stately/data/useListData.tsx +1 -1
  88. package/src/stately/data/useTreeData.tsx +1 -1
  89. package/src/stately/datepicker/IncompleteDate.tsx +8 -3
  90. package/src/stately/datepicker/types.tsx +3 -3
  91. package/src/stately/datepicker/useDateFieldState.tsx +7 -7
  92. package/src/stately/datepicker/useDatePickerState.tsx +9 -6
  93. package/src/stately/datepicker/useDateRangePickerState.tsx +9 -6
  94. package/src/stately/datepicker/useTimeFieldState.tsx +2 -2
  95. package/src/stately/datepicker/utils.tsx +3 -3
  96. package/src/stately/dnd/useDraggableCollectionState.tsx +2 -2
  97. package/src/stately/dnd/useDroppableCollectionState.tsx +2 -2
  98. package/src/stately/layout/GridLayout.tsx +8 -2
  99. package/src/stately/layout/ListLayout.tsx +2 -2
  100. package/src/stately/layout/TableLayout.tsx +5 -5
  101. package/src/stately/layout/WaterfallLayout.tsx +8 -2
  102. package/src/stately/tokenfield/useTokenFieldState.tsx +1 -1
  103. package/src/stately/virtualizer/Layout.tsx +2 -2
  104. package/src/stately/virtualizer/LayoutInfo.tsx +1 -1
  105. package/src/stately/virtualizer/ReusableView.tsx +1 -1
  106. package/src/stately/virtualizer/ScrollAnchor.tsx +2 -2
  107. package/src/stately/virtualizer/Virtualizer.tsx +3 -3
  108. package/src/stately/virtualizer/types.tsx +1 -1
  109. package/src/stately/virtualizer/useVirtualizerState.tsx +2 -2
  110. package/src/table/useTableColumnResize.tsx +5 -5
  111. package/src/toast/useToast.tsx +8 -3
  112. package/src/toast/useToastRegion.tsx +7 -2
  113. package/src/tokenfield/useToken.tsx +1 -1
  114. package/src/tokenfield/useTokenField.tsx +8 -8
  115. package/src/tooltip/usePreviewTrigger.tsx +3 -3
  116. package/src/tooltip/useSafeArea.tsx +1 -1
  117. package/src/utils/useLoadMore.tsx +1 -1
  118. package/src/virtualizer/ScrollView.tsx +5 -5
  119. package/src/virtualizer/Virtualizer.tsx +5 -5
  120. package/src/virtualizer/VirtualizerItem.tsx +3 -3
  121. package/src/virtualizer/useVirtualizerItem.tsx +1 -1
  122. package/src/virtualizer/utils.tsx +1 -1
@@ -12,9 +12,9 @@
12
12
  * governing permissions and limitations under the License.
13
13
  */
14
14
 
15
- import { AriaButtonProps } from '../button/useButton';
16
- import { AriaDialogProps } from '../dialog/useDialog';
17
- import {
15
+ import type { AriaButtonProps } from '../button/useButton';
16
+ import type { AriaDialogProps } from '../dialog/useDialog';
17
+ import type {
18
18
  AriaLabelingProps,
19
19
  DOMAttributes,
20
20
  DOMProps,
@@ -24,9 +24,9 @@ import {
24
24
  RefObject,
25
25
  ValidationResult,
26
26
  } from '@react-types/shared';
27
- import { CalendarProps } from '../upstream-exports/react-stately/useCalendarState';
27
+ import type { CalendarProps } from '../upstream-exports/react-stately/useCalendarState';
28
28
  import { createFocusManager } from '../focus/FocusScope';
29
- import {
29
+ import type {
30
30
  DatePickerProps,
31
31
  DatePickerState,
32
32
  DateValue,
@@ -1,10 +1,10 @@
1
1
  /** @jsxImportSource octane */
2
2
  // Ported from adobe/react-spectrum@5ecb3333001313e83898cd07644227897e3bae1f (packages/react-aria/src/datepicker/useDatePickerGroup.ts).
3
3
  import { createFocusManager, getFocusableTreeWalker } from '../focus/FocusScope';
4
- import { DateFieldState } from '../upstream-exports/react-stately/useDateFieldState';
5
- import { DatePickerState } from '../upstream-exports/react-stately/useDatePickerState';
6
- import { DateRangePickerState } from '../upstream-exports/react-stately/useDateRangePickerState';
7
- import { DOMAttributes, FocusableElement, RefObject } from '@react-types/shared';
4
+ import type { DateFieldState } from '../upstream-exports/react-stately/useDateFieldState';
5
+ import type { DatePickerState } from '../upstream-exports/react-stately/useDatePickerState';
6
+ import type { DateRangePickerState } from '../upstream-exports/react-stately/useDateRangePickerState';
7
+ import type { DOMAttributes, FocusableElement, RefObject } from '@react-types/shared';
8
8
  import { getEventTarget } from '../utils/shadowdom/DOMFunctions';
9
9
  import { mergeProps } from '../utils/mergeProps';
10
10
  import { useKeyboard } from '../interactions/useKeyboard';
@@ -12,10 +12,10 @@
12
12
  * governing permissions and limitations under the License.
13
13
  */
14
14
 
15
- import { AriaButtonProps } from '../button/useButton';
16
- import { AriaDatePickerProps } from './useDatePicker';
17
- import { AriaDialogProps } from '../dialog/useDialog';
18
- import {
15
+ import type { AriaButtonProps } from '../button/useButton';
16
+ import type { AriaDatePickerProps } from './useDatePicker';
17
+ import type { AriaDialogProps } from '../dialog/useDialog';
18
+ import type {
19
19
  AriaLabelingProps,
20
20
  DOMAttributes,
21
21
  DOMProps,
@@ -26,7 +26,7 @@ import {
26
26
  ValidationResult,
27
27
  } from '@react-types/shared';
28
28
  import { createFocusManager } from '../focus/FocusScope';
29
- import {
29
+ import type {
30
30
  DateRange,
31
31
  DateRangePickerProps,
32
32
  DateRangePickerState,
@@ -42,7 +42,7 @@ import { focusManagerSymbol, roleSymbol } from './useDateField';
42
42
  import intlMessages from '../intl/datepicker/index';
43
43
  import { mergeProps } from '../utils/mergeProps';
44
44
  import { nodeContains } from '../utils/shadowdom/DOMFunctions';
45
- import { RangeCalendarProps } from '../upstream-exports/react-stately/useRangeCalendarState';
45
+ import type { RangeCalendarProps } from '../upstream-exports/react-stately/useRangeCalendarState';
46
46
  import { useDatePickerGroup } from './useDatePickerGroup';
47
47
  import { useDescription } from '../utils/useDescription';
48
48
  import { useField } from '../label/useField';
@@ -13,15 +13,18 @@
13
13
  */
14
14
 
15
15
  import { CalendarDate, toCalendar } from '@internationalized/date';
16
- import { DateFieldState, DateSegment } from '../upstream-exports/react-stately/useDateFieldState';
16
+ import type {
17
+ DateFieldState,
18
+ DateSegment,
19
+ } from '../upstream-exports/react-stately/useDateFieldState';
17
20
  import { getActiveElement, nodeContains } from '../utils/shadowdom/DOMFunctions';
18
21
  import { getScrollParent } from '../utils/getScrollParent';
19
22
  import { hookData } from './useDateField';
20
23
  import { isIOS } from '../utils/platform';
21
24
  import { mergeProps } from '../utils/mergeProps';
22
25
  import { NumberParser } from '@internationalized/number';
23
- import React, { CSSProperties, useMemo, useRef } from '../compat/react';
24
- import { RefObject } from '@react-types/shared';
26
+ import React, { type CSSProperties, useMemo, useRef } from '../compat/react';
27
+ import type { RefObject } from '@react-types/shared';
25
28
  import { scrollIntoViewport } from '../utils/scrollIntoView';
26
29
  import { useDateFormatter } from '../i18n/useDateFormatter';
27
30
  import { useDisplayNames } from './useDisplayNames';
@@ -15,7 +15,7 @@
15
15
  import { announce } from '../live-announcer/LiveAnnouncer';
16
16
 
17
17
  import { ariaHideOutside } from '../overlays/ariaHideOutside';
18
- import {
18
+ import type {
19
19
  DragEndEvent,
20
20
  DragItem,
21
21
  DropActivateEvent,
@@ -31,7 +31,7 @@ import { getActiveElement, getEventTarget, nodeContains } from '../utils/shadowd
31
31
  import { getDragModality, getTypes } from './utils';
32
32
  import { isVirtualClick, isVirtualPointerEvent } from '../utils/isVirtualEvent';
33
33
  import type { LocalizedStringFormatter } from '@internationalized/string';
34
- import { RefObject, useEffect, useState } from '../compat/react';
34
+ import { type RefObject, useEffect, useState } from '../compat/react';
35
35
 
36
36
  let dropTargets = new Map<Element, DropTarget>();
37
37
  let dropItems = new Map<Element, DroppableItem>();
@@ -12,11 +12,11 @@
12
12
  * governing permissions and limitations under the License.
13
13
  */
14
14
 
15
- import { DragItem, DragPreviewRenderer } from '@react-types/shared';
15
+ import type { DragItem, DragPreviewRenderer } from '@react-types/shared';
16
16
  import { flushSync } from 'octane';
17
17
  import React, {
18
- ForwardedRef,
19
- JSX,
18
+ type ForwardedRef,
19
+ type JSX,
20
20
  useEffect,
21
21
  useImperativeHandle,
22
22
  useRef,
@@ -1,6 +1,6 @@
1
1
  /** @jsxImportSource octane */
2
2
  // Ported from adobe/react-spectrum@1c84a49a1faf50b571c84e00bcf9c60b22ddd03e (packages/react-aria/src/dnd/DropTargetKeyboardNavigation.ts).
3
- import { Collection, DropTarget, Key, KeyboardDelegate, Node } from '@react-types/shared';
3
+ import type { Collection, DropTarget, Key, KeyboardDelegate, Node } from '@react-types/shared';
4
4
 
5
5
  export function navigate(
6
6
  keyboardDelegate: KeyboardDelegate,
@@ -1,6 +1,6 @@
1
1
  /** @jsxImportSource octane */
2
2
  // Ported from adobe/react-spectrum@1c84a49a1faf50b571c84e00bcf9c60b22ddd03e (packages/react-aria/src/dnd/ListDropTargetDelegate.ts).
3
- import {
3
+ import type {
4
4
  Direction,
5
5
  DropTarget,
6
6
  DropTargetDelegate,
@@ -12,7 +12,7 @@
12
12
  * governing permissions and limitations under the License.
13
13
  */
14
14
 
15
- import { DropOperation } from '@react-types/shared';
15
+ import type { DropOperation } from '@react-types/shared';
16
16
 
17
17
  export interface IDropOperation {
18
18
  readonly none: 0;
@@ -16,7 +16,7 @@ import { getScrollParent } from '../utils/getScrollParent';
16
16
 
17
17
  import { isIOS, isWebKit } from '../utils/platform';
18
18
  import { isScrollable } from '../utils/isScrollable';
19
- import { RefObject } from '@react-types/shared';
19
+ import type { RefObject } from '@react-types/shared';
20
20
  import { useCallback, useEffect, useRef } from '../compat/react';
21
21
 
22
22
  const AUTOSCROLL_AREA_SIZE = 20;
@@ -14,7 +14,7 @@
14
14
 
15
15
  import { chain } from '../utils/chain';
16
16
 
17
- import { DOMAttributes, DragItem, DropItem } from '@react-types/shared';
17
+ import type { DOMAttributes, DragItem, DropItem } from '@react-types/shared';
18
18
  import { readFromDataTransfer, writeToDataTransfer } from './utils';
19
19
  import { useEffect, useRef } from '../compat/react';
20
20
  import { useEffectEvent } from '../utils/useEffectEvent';
@@ -13,8 +13,8 @@ import { isIOS, isWebKit } from '../utils/platform';
13
13
  * governing permissions and limitations under the License.
14
14
  */
15
15
 
16
- import { AriaButtonProps } from '../button/useButton';
17
- import {
16
+ import type { AriaButtonProps } from '../button/useButton';
17
+ import type {
18
18
  DragEndEvent,
19
19
  DragItem,
20
20
  DragMoveEvent,
@@ -25,11 +25,11 @@ import {
25
25
  RefObject,
26
26
  } from '@react-types/shared';
27
27
  import {
28
- DragEvent,
29
- HTMLAttributes,
30
- KeyboardEvent,
31
- MouseEvent,
32
- PointerEvent,
28
+ type DragEvent,
29
+ type HTMLAttributes,
30
+ type KeyboardEvent,
31
+ type MouseEvent,
32
+ type PointerEvent,
33
33
  useEffect,
34
34
  useRef,
35
35
  useState,
@@ -12,9 +12,9 @@
12
12
  * governing permissions and limitations under the License.
13
13
  */
14
14
 
15
- import { DraggableCollectionState } from '../upstream-exports/react-stately/useDraggableCollectionState';
15
+ import type { DraggableCollectionState } from '../upstream-exports/react-stately/useDraggableCollectionState';
16
16
  import { globalDndState, setDraggingCollectionRef } from './utils';
17
- import { RefObject } from '@react-types/shared';
17
+ import type { RefObject } from '@react-types/shared';
18
18
 
19
19
  export interface DraggableCollectionOptions {}
20
20
 
@@ -12,17 +12,17 @@
12
12
  * governing permissions and limitations under the License.
13
13
  */
14
14
 
15
- import { AriaButtonProps } from '../button/useButton';
15
+ import type { AriaButtonProps } from '../button/useButton';
16
16
  import {
17
17
  clearGlobalDnDState,
18
18
  isInternalDropOperation,
19
19
  setDraggingKeys,
20
20
  useDragModality,
21
21
  } from './utils';
22
- import { DraggableCollectionState } from '../upstream-exports/react-stately/useDraggableCollectionState';
23
- import { HTMLAttributes, KeyboardEvent } from '../compat/react';
22
+ import type { DraggableCollectionState } from '../upstream-exports/react-stately/useDraggableCollectionState';
23
+ import type { HTMLAttributes, KeyboardEvent } from '../compat/react';
24
24
  import intlMessages from '../intl/dnd/index';
25
- import { Key } from '@react-types/shared';
25
+ import type { Key } from '@react-types/shared';
26
26
  import { useDescription } from '../utils/useDescription';
27
27
  import { useDrag } from './useDrag';
28
28
  import { useLocalizedStringFormatter } from '../i18n/useLocalizedStringFormatter';
@@ -12,9 +12,9 @@
12
12
  * governing permissions and limitations under the License.
13
13
  */
14
14
 
15
- import { AriaButtonProps } from '../button/useButton';
15
+ import type { AriaButtonProps } from '../button/useButton';
16
16
 
17
- import {
17
+ import type {
18
18
  DOMAttributes,
19
19
  DropActivateEvent,
20
20
  DropEnterEvent,
@@ -26,7 +26,7 @@ import {
26
26
  DragTypes as IDragTypes,
27
27
  RefObject,
28
28
  } from '@react-types/shared';
29
- import { DragEvent, useRef, useState } from '../compat/react';
29
+ import { type DragEvent, useRef, useState } from '../compat/react';
30
30
  import * as DragManager from './DragManager';
31
31
  import {
32
32
  DragTypes,
@@ -13,10 +13,10 @@
13
13
  */
14
14
 
15
15
  import * as DragManager from './DragManager';
16
- import { DroppableCollectionState } from '../upstream-exports/react-stately/useDroppableCollectionState';
17
- import { DropTarget, FocusableElement, Key, RefObject } from '@react-types/shared';
16
+ import type { DroppableCollectionState } from '../upstream-exports/react-stately/useDroppableCollectionState';
17
+ import type { DropTarget, FocusableElement, Key, RefObject } from '@react-types/shared';
18
18
  import { getDroppableCollectionId } from './utils';
19
- import { HTMLAttributes } from '../compat/react';
19
+ import type { HTMLAttributes } from '../compat/react';
20
20
  import intlMessages from '../intl/dnd/index';
21
21
  import { useDroppableItem } from './useDroppableItem';
22
22
  import { useId } from '../utils/useId';
@@ -21,7 +21,7 @@ import {
21
21
  isInternalDropOperation,
22
22
  setDropCollectionRef,
23
23
  } from './utils';
24
- import {
24
+ import type {
25
25
  Collection,
26
26
  DropEvent,
27
27
  DropOperation,
@@ -36,8 +36,8 @@ import {
36
36
  RefObject,
37
37
  } from '@react-types/shared';
38
38
  import * as DragManager from './DragManager';
39
- import { DroppableCollectionState } from '../upstream-exports/react-stately/useDroppableCollectionState';
40
- import { HTMLAttributes, useCallback, useEffect, useRef } from '../compat/react';
39
+ import type { DroppableCollectionState } from '../upstream-exports/react-stately/useDroppableCollectionState';
40
+ import { type HTMLAttributes, useCallback, useEffect, useRef } from '../compat/react';
41
41
  import { mergeProps } from '../utils/mergeProps';
42
42
  import { navigate } from './DropTargetKeyboardNavigation';
43
43
  import { setInteractionModality } from '../interactions/useFocusVisible';
@@ -13,15 +13,15 @@
13
13
  */
14
14
 
15
15
  import * as DragManager from './DragManager';
16
- import { DroppableCollectionState } from '../upstream-exports/react-stately/useDroppableCollectionState';
17
- import { DropTarget, FocusableElement, RefObject } from '@react-types/shared';
16
+ import type { DroppableCollectionState } from '../upstream-exports/react-stately/useDroppableCollectionState';
17
+ import type { DropTarget, FocusableElement, RefObject } from '@react-types/shared';
18
18
  import {
19
19
  getDroppableCollectionRef,
20
20
  getTypes,
21
21
  globalDndState,
22
22
  isInternalDropOperation,
23
23
  } from './utils';
24
- import { HTMLAttributes, useEffect } from '../compat/react';
24
+ import { type HTMLAttributes, useEffect } from '../compat/react';
25
25
  import { useVirtualDrop } from './useVirtualDrop';
26
26
 
27
27
  export interface DroppableItemOptions {
@@ -12,8 +12,8 @@
12
12
  * governing permissions and limitations under the License.
13
13
  */
14
14
 
15
- import { AriaButtonProps } from '../button/useButton';
16
- import { DOMAttributes } from '../compat/react';
15
+ import type { AriaButtonProps } from '../button/useButton';
16
+ import type { DOMAttributes } from '../compat/react';
17
17
  import * as DragManager from './DragManager';
18
18
  import intlMessages from '../intl/dnd/index';
19
19
  import { useDescription } from '../utils/useDescription';
package/src/dnd/utils.tsx CHANGED
@@ -13,7 +13,7 @@
13
13
  */
14
14
 
15
15
  import { CUSTOM_DRAG_TYPE, DROP_OPERATION, GENERIC_TYPE, NATIVE_DRAG_TYPES } from './constants';
16
- import {
16
+ import type {
17
17
  DirectoryDropItem,
18
18
  DragItem,
19
19
  DragType,
@@ -24,7 +24,7 @@ import {
24
24
  RefObject,
25
25
  TextDropItem,
26
26
  } from '@react-types/shared';
27
- import { DroppableCollectionState } from '../upstream-exports/react-stately/useDroppableCollectionState';
27
+ import type { DroppableCollectionState } from '../upstream-exports/react-stately/useDroppableCollectionState';
28
28
  import { getInteractionModality, useInteractionModality } from '../interactions/useFocusVisible';
29
29
 
30
30
  interface DroppableCollectionMap {
@@ -13,7 +13,7 @@ type DOMAttributes = Record<string, any>;
13
13
  * governing permissions and limitations under the License.
14
14
  */
15
15
 
16
- import { FocusableElement, Key, RefObject } from '@react-types/shared';
16
+ import type { FocusableElement, Key, RefObject } from '@react-types/shared';
17
17
  import { withSlot } from 'octane';
18
18
  import { focusSafely } from '../interactions/focusSafely';
19
19
  import {
@@ -25,15 +25,15 @@ import {
25
25
  import { getFocusableTreeWalker } from '../focus/FocusScope';
26
26
  import { getOwnerDocument } from '../utils/domHelpers';
27
27
  import { getScrollParent } from '../utils/getScrollParent';
28
- import {
28
+ import type {
29
29
  IGridCollection as GridCollection,
30
30
  GridNode,
31
31
  } from '../upstream-exports/react-stately/private/grid/GridCollection';
32
32
  import { gridMap } from './utils';
33
- import { GridState } from '../upstream-exports/react-stately/private/grid/useGridState';
33
+ import type { GridState } from '../upstream-exports/react-stately/private/grid/useGridState';
34
34
  import { isFocusVisible } from '../interactions/useFocusVisible';
35
35
  import { mergeProps } from '../utils/mergeProps';
36
- import { KeyboardEvent as ReactKeyboardEvent, useRef } from '../compat/react';
36
+ import { type KeyboardEvent as ReactKeyboardEvent, useRef } from '../compat/react';
37
37
  import { scrollIntoViewport } from '../utils/scrollIntoView';
38
38
  import { useLocale } from '../i18n/I18nProvider';
39
39
  import { useSelectableItem } from '../selection/useSelectableItem';
@@ -14,7 +14,13 @@ type DOMAttributes = Record<string, any>;
14
14
  */
15
15
 
16
16
  import { chain } from '../utils/chain';
17
- import { Collection, FocusableElement, Key, RefObject, Node as RSNode } from '@react-types/shared';
17
+ import type {
18
+ Collection,
19
+ FocusableElement,
20
+ Key,
21
+ RefObject,
22
+ Node as RSNode,
23
+ } from '@react-types/shared';
18
24
  import { focusSafely } from '../interactions/focusSafely';
19
25
  import {
20
26
  getActiveElement,
@@ -26,13 +32,17 @@ import { getFocusableTreeWalker } from '../focus/FocusScope';
26
32
  import { getOwnerDocument } from '../utils/domHelpers';
27
33
  import { getRowId, listMap } from './utils';
28
34
  import { getScrollParent } from '../utils/getScrollParent';
29
- import { HTMLAttributes, KeyboardEvent as ReactKeyboardEvent, useRef } from '../compat/react';
35
+ import {
36
+ type HTMLAttributes,
37
+ type KeyboardEvent as ReactKeyboardEvent,
38
+ useRef,
39
+ } from '../compat/react';
30
40
  import { withSlot } from 'octane';
31
41
  import { isFocusVisible } from '../interactions/useFocusVisible';
32
42
  import type { ListState } from '../upstream-exports/react-stately/useListState';
33
43
  import { mergeProps } from '../utils/mergeProps';
34
44
  import { scrollIntoViewport } from '../utils/scrollIntoView';
35
- import { SelectableItemStates, useSelectableItem } from '../selection/useSelectableItem';
45
+ import { type SelectableItemStates, useSelectableItem } from '../selection/useSelectableItem';
36
46
  import type { TreeState } from '../upstream-exports/react-stately/useTreeState';
37
47
  import { useLocale } from '../i18n/I18nProvider';
38
48
  import { useSlotId } from '../utils/useId';
@@ -12,7 +12,7 @@
12
12
  * governing permissions and limitations under the License.
13
13
  */
14
14
 
15
- import { HTMLAttributes, useRef } from '../compat/react';
15
+ import { type HTMLAttributes, useRef } from '../compat/react';
16
16
  import { isIOS, isMac } from '../utils/platform';
17
17
  import { mergeProps } from '../utils/mergeProps';
18
18
  import { useLongPress } from './useLongPress';
@@ -12,7 +12,12 @@
12
12
  * governing permissions and limitations under the License.
13
13
  */
14
14
 
15
- import { AriaLabelingProps, DOMAttributes, FocusableElement, RefObject } from '@react-types/shared';
15
+ import type {
16
+ AriaLabelingProps,
17
+ DOMAttributes,
18
+ FocusableElement,
19
+ RefObject,
20
+ } from '@react-types/shared';
16
21
  import { getEventTarget, nodeContains } from '../utils/shadowdom/DOMFunctions';
17
22
  import { useCallback, useEffect, useState } from '../compat/react';
18
23
  import { useLayoutEffect } from '../utils/useLayoutEffect';
@@ -14,18 +14,18 @@ type KeyboardEvent = BaseEvent<globalThis.KeyboardEvent>;
14
14
  * governing permissions and limitations under the License.
15
15
  */
16
16
 
17
- import { AriaButtonProps } from '../button/useButton';
17
+ import type { AriaButtonProps } from '../button/useButton';
18
18
  import { withSlot } from 'octane';
19
- import { AriaMenuOptions } from './useMenu';
20
- import { FocusableElement, FocusStrategy, RefObject } from '@react-types/shared';
19
+ import type { AriaMenuOptions } from './useMenu';
20
+ import type { FocusableElement, FocusStrategy, RefObject } from '@react-types/shared';
21
21
  import { focusWithoutScrolling } from '../utils/focusWithoutScrolling';
22
22
  import { getEventTarget } from '../utils/shadowdom/DOMFunctions';
23
23
  import intlMessages from '../intl/menu/index';
24
- import {
24
+ import type {
25
25
  MenuTriggerState,
26
26
  MenuTriggerType,
27
27
  } from '../upstream-exports/react-stately/useMenuTriggerState';
28
- import { PressProps } from '../interactions/usePress';
28
+ import type { PressProps } from '../interactions/usePress';
29
29
  import { useContextMenu } from '../interactions/useContextMenu';
30
30
  import { useEffect } from '../compat/react';
31
31
  import { useId } from '../utils/useId';
@@ -12,11 +12,17 @@
12
12
  * governing permissions and limitations under the License.
13
13
  */
14
14
 
15
- import { AriaMenuItemProps } from './useMenuItem';
15
+ import type { AriaMenuItemProps } from './useMenuItem';
16
16
  import { withSlot } from 'octane';
17
- import { AriaMenuOptions } from './useMenu';
17
+ import type { AriaMenuOptions } from './useMenu';
18
18
  import type { AriaPopoverProps } from '../overlays/usePopover';
19
- import { FocusableElement, FocusStrategy, Node, PressEvent, RefObject } from '@react-types/shared';
19
+ import type {
20
+ FocusableElement,
21
+ FocusStrategy,
22
+ Node,
23
+ PressEvent,
24
+ RefObject,
25
+ } from '@react-types/shared';
20
26
  import { focusWithoutScrolling } from '../utils/focusWithoutScrolling';
21
27
  import {
22
28
  getActiveElement,
@@ -25,8 +25,8 @@ type DOMAttributes = Record<string, any>;
25
25
  */
26
26
 
27
27
  import { announce } from '../live-announcer/LiveAnnouncer';
28
- import { AriaButtonProps } from '../button/useButton';
29
- import {
28
+ import type { AriaButtonProps } from '../button/useButton';
29
+ import type {
30
30
  AriaLabelingProps,
31
31
  DOMProps,
32
32
  GroupDOMAttributes,
@@ -34,9 +34,9 @@ import {
34
34
  ValidationResult,
35
35
  } from '@react-types/shared';
36
36
  import {
37
- InputHTMLAttributes,
38
- LabelHTMLAttributes,
39
- RefObject,
37
+ type InputHTMLAttributes,
38
+ type LabelHTMLAttributes,
39
+ type RefObject,
40
40
  useCallback,
41
41
  useMemo,
42
42
  useState,
@@ -47,7 +47,7 @@ import { getActiveElement, getEventTarget } from '../utils/shadowdom/DOMFunction
47
47
  import intlMessages from '../intl/numberfield/index';
48
48
  import { isAndroid, isIOS, isIPhone } from '../utils/platform';
49
49
  import { mergeProps } from '../utils/mergeProps';
50
- import {
50
+ import type {
51
51
  NumberFieldProps,
52
52
  NumberFieldState,
53
53
  } from '../upstream-exports/react-stately/useNumberFieldState';
@@ -13,7 +13,7 @@ type DOMAttributes = Record<string, any>;
13
13
  * governing permissions and limitations under the License.
14
14
  */
15
15
 
16
- import { RefObject } from '@react-types/shared';
16
+ import type { RefObject } from '@react-types/shared';
17
17
  import { withSlot } from 'octane';
18
18
  import { getEventTarget } from '../utils/shadowdom/DOMFunctions';
19
19
  import { isElementInChildOfActiveScope } from '../focus/FocusScope';
@@ -13,7 +13,7 @@ type DOMAttributes = Record<string, any>;
13
13
  * governing permissions and limitations under the License.
14
14
  */
15
15
 
16
- import {
16
+ import type {
17
17
  AriaLabelingProps,
18
18
  AriaValidationProps,
19
19
  DOMProps,
@@ -27,7 +27,7 @@ import { getFocusableTreeWalker } from '../focus/FocusScope';
27
27
  import { getOwnerWindow } from '../utils/domHelpers';
28
28
  import { mergeProps } from '../utils/mergeProps';
29
29
  import { radioGroupData } from './utils';
30
- import {
30
+ import type {
31
31
  RadioGroupProps,
32
32
  RadioGroupState,
33
33
  } from '../upstream-exports/react-stately/useRadioGroupState';
@@ -13,15 +13,15 @@ type DOMAttributes = Record<string, any>;
13
13
  * governing permissions and limitations under the License.
14
14
  */
15
15
 
16
- import { AriaButtonProps } from '../button/useButton';
16
+ import type { AriaButtonProps } from '../button/useButton';
17
17
  import { withSlot } from 'octane';
18
- import { AriaTextFieldProps, useTextField } from '../textfield/useTextField';
19
- import { RefObject, ValidationResult } from '@react-types/shared';
20
- import { InputHTMLAttributes, LabelHTMLAttributes } from '../compat/react';
18
+ import { type AriaTextFieldProps, useTextField } from '../textfield/useTextField';
19
+ import type { RefObject, ValidationResult } from '@react-types/shared';
20
+ import type { InputHTMLAttributes, LabelHTMLAttributes } from '../compat/react';
21
21
  import intlMessages from '../intl/searchfield/index';
22
22
  // @ts-ignore
23
23
  import { mergeProps } from '../utils/mergeProps';
24
- import {
24
+ import type {
25
25
  SearchFieldProps,
26
26
  SearchFieldState,
27
27
  } from '../upstream-exports/react-stately/useSearchFieldState';
@@ -18,7 +18,7 @@ type DOMAttributes = Record<string, any>;
18
18
  import { CLEAR_FOCUS_EVENT, FOCUS_EVENT } from '../utils/constants';
19
19
 
20
20
  import { dispatchVirtualFocus, moveVirtualFocus } from '../focus/virtualFocus';
21
- import {
21
+ import type {
22
22
  FocusableElement,
23
23
  FocusStrategy,
24
24
  Key,
@@ -26,7 +26,7 @@ import {
26
26
  RefObject,
27
27
  } from '@react-types/shared';
28
28
  import { flushSync, withSlot } from 'octane';
29
- import { FocusEvent, useEffect, useRef } from '../compat/react';
29
+ import { type FocusEvent, useEffect, useRef } from '../compat/react';
30
30
  import { focusSafely } from '../interactions/focusSafely';
31
31
  import { focusWithoutScrolling } from '../utils/focusWithoutScrolling';
32
32
  import {
@@ -42,7 +42,7 @@ import { isCtrlKeyPressed } from '../utils/keyboard';
42
42
  import { isMac } from '../utils/platform';
43
43
  import { isTabbable } from '../utils/isFocusable';
44
44
  import { mergeProps } from '../utils/mergeProps';
45
- import { MultipleSelectionManager } from '../upstream-exports/react-stately/useMultipleSelectionState';
45
+ import type { MultipleSelectionManager } from '../upstream-exports/react-stately/useMultipleSelectionState';
46
46
  import { scrollIntoView, scrollIntoViewport } from '../utils/scrollIntoView';
47
47
  import { useEvent } from '../utils/useEvent';
48
48
  import { useKeyboard } from '../interactions/useKeyboard';
@@ -1,7 +1,7 @@
1
1
  /** @jsxImportSource octane */
2
2
  type DOMAttributes = Record<string, any>;
3
3
  // Ported from adobe/react-spectrum@5ecb3333001313e83898cd07644227897e3bae1f (packages/react-aria/src/slider/useSliderThumb.ts).
4
- import {
4
+ import type {
5
5
  AriaLabelingProps,
6
6
  AriaValidationProps,
7
7
  DOMProps,
@@ -20,14 +20,14 @@ import { getSliderThumbId, sliderData } from './utils';
20
20
  import { mergeProps } from '../utils/mergeProps';
21
21
  import { withSlot } from 'octane';
22
22
  import React, {
23
- ChangeEvent,
24
- InputHTMLAttributes,
25
- LabelHTMLAttributes,
23
+ type ChangeEvent,
24
+ type InputHTMLAttributes,
25
+ type LabelHTMLAttributes,
26
26
  useCallback,
27
27
  useEffect,
28
28
  useRef,
29
29
  } from '../compat/react';
30
- import { SliderState } from '../upstream-exports/react-stately/useSliderState';
30
+ import type { SliderState } from '../upstream-exports/react-stately/useSliderState';
31
31
  import { useFocusable } from '../interactions/useFocusable';
32
32
  import { useFormReset } from '../utils/useFormReset';
33
33
  import { useGlobalListeners } from '../utils/useGlobalListeners';