@octanejs/aria 0.0.48 → 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 (154) hide show
  1. package/package.json +4 -4
  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/collections/CollectionBuilder.ts +7 -7
  12. package/src/collections/Hidden.ts +1 -1
  13. package/src/color/useColorArea.tsx +5 -5
  14. package/src/color/useColorAreaGradient.tsx +3 -3
  15. package/src/color/useColorChannelField.tsx +3 -3
  16. package/src/color/useColorField.tsx +5 -5
  17. package/src/color/useColorSlider.tsx +3 -3
  18. package/src/color/useColorSwatch.tsx +3 -3
  19. package/src/color/useColorWheel.tsx +8 -3
  20. package/src/combobox/useComboBox.tsx +7 -7
  21. package/src/components/Breadcrumbs.ts +2 -2
  22. package/src/components/Button.ts +1 -1
  23. package/src/components/Calendar.tsx +27 -29
  24. package/src/components/Checkbox.ts +1 -1
  25. package/src/components/ColorArea.tsx +8 -8
  26. package/src/components/ColorField.tsx +14 -14
  27. package/src/components/ColorPicker.tsx +7 -7
  28. package/src/components/ColorSlider.tsx +9 -9
  29. package/src/components/ColorSwatch.tsx +8 -8
  30. package/src/components/ColorSwatchPicker.tsx +16 -11
  31. package/src/components/ColorThumb.tsx +6 -6
  32. package/src/components/ColorWheel.tsx +13 -10
  33. package/src/components/ComboBox.ts +1 -1
  34. package/src/components/DateField.tsx +19 -19
  35. package/src/components/DatePicker.tsx +17 -14
  36. package/src/components/Disclosure.ts +1 -1
  37. package/src/components/DropZone.tsx +7 -7
  38. package/src/components/FileTrigger.tsx +2 -2
  39. package/src/components/Form.ts +2 -2
  40. package/src/components/GridLayout.tsx +2 -2
  41. package/src/components/HiddenDateInput.tsx +3 -3
  42. package/src/components/ListBox.ts +1 -1
  43. package/src/components/Meter.ts +1 -1
  44. package/src/components/Popover.ts +3 -3
  45. package/src/components/PreviewTrigger.tsx +4 -4
  46. package/src/components/ProgressBar.ts +1 -1
  47. package/src/components/RadioGroup.ts +1 -1
  48. package/src/components/Select.ts +1 -1
  49. package/src/components/SharedElementTransition.ts +1 -1
  50. package/src/components/Table.ts +3 -3
  51. package/src/components/TableLayout.tsx +2 -2
  52. package/src/components/Tabs.ts +2 -2
  53. package/src/components/TagGroup.ts +1 -1
  54. package/src/components/Toast.tsx +17 -17
  55. package/src/components/ToggleButton.ts +1 -1
  56. package/src/components/ToggleButtonGroup.ts +1 -1
  57. package/src/components/TokenField.tsx +13 -13
  58. package/src/components/Tooltip.ts +1 -1
  59. package/src/components/Tree.ts +1 -1
  60. package/src/components/Virtualizer.tsx +18 -12
  61. package/src/components/useDragAndDrop.tsx +16 -16
  62. package/src/components/utils.ts +2 -2
  63. package/src/datepicker/useDateField.tsx +5 -5
  64. package/src/datepicker/useDatePicker.tsx +5 -5
  65. package/src/datepicker/useDatePickerGroup.tsx +4 -4
  66. package/src/datepicker/useDateRangePicker.tsx +6 -6
  67. package/src/datepicker/useDateSegment.tsx +6 -3
  68. package/src/dnd/DragManager.tsx +2 -2
  69. package/src/dnd/DragPreview.tsx +3 -3
  70. package/src/dnd/DropTargetKeyboardNavigation.tsx +1 -1
  71. package/src/dnd/ListDropTargetDelegate.tsx +1 -1
  72. package/src/dnd/constants.tsx +1 -1
  73. package/src/dnd/useAutoScroll.tsx +1 -1
  74. package/src/dnd/useClipboard.tsx +1 -1
  75. package/src/dnd/useDrag.tsx +7 -7
  76. package/src/dnd/useDraggableCollection.tsx +2 -2
  77. package/src/dnd/useDraggableItem.tsx +4 -4
  78. package/src/dnd/useDrop.tsx +3 -3
  79. package/src/dnd/useDropIndicator.tsx +3 -3
  80. package/src/dnd/useDroppableCollection.tsx +3 -3
  81. package/src/dnd/useDroppableItem.tsx +3 -3
  82. package/src/dnd/useVirtualDrop.tsx +2 -2
  83. package/src/dnd/utils.tsx +2 -2
  84. package/src/focus/FocusScope.ts +1 -1
  85. package/src/grid/useGridCell.tsx +4 -4
  86. package/src/gridlist/useGridListItem.tsx +13 -3
  87. package/src/i18n/I18nProvider.ts +2 -2
  88. package/src/interactions/PressResponder.ts +2 -2
  89. package/src/interactions/context.ts +1 -1
  90. package/src/interactions/useContextMenu.tsx +1 -1
  91. package/src/interactions/useFocusable.ts +1 -1
  92. package/src/landmark/useLandmark.tsx +6 -1
  93. package/src/menu/useMenuTrigger.tsx +5 -5
  94. package/src/menu/useSubmenuTrigger.tsx +9 -3
  95. package/src/numberfield/useNumberField.tsx +6 -6
  96. package/src/overlays/Overlay.ts +2 -2
  97. package/src/overlays/PortalProvider.ts +1 -1
  98. package/src/overlays/useModal.ts +1 -1
  99. package/src/overlays/useOverlay.tsx +1 -1
  100. package/src/radio/useRadioGroup.tsx +2 -2
  101. package/src/searchfield/useSearchField.tsx +5 -5
  102. package/src/selection/useSelectableCollection.tsx +3 -3
  103. package/src/slider/useSliderThumb.tsx +5 -5
  104. package/src/spinbutton/useSpinButton.tsx +2 -2
  105. package/src/stately/calendar/types.tsx +3 -3
  106. package/src/stately/calendar/useCalendarState.tsx +5 -5
  107. package/src/stately/calendar/useRangeCalendarState.tsx +5 -5
  108. package/src/stately/calendar/utils.tsx +2 -2
  109. package/src/stately/color/Color.tsx +1 -1
  110. package/src/stately/color/useColor.tsx +1 -1
  111. package/src/stately/color/useColorAreaState.tsx +2 -2
  112. package/src/stately/color/useColorChannelFieldState.tsx +3 -3
  113. package/src/stately/color/useColorFieldState.tsx +3 -3
  114. package/src/stately/color/useColorPickerState.tsx +2 -2
  115. package/src/stately/color/useColorSliderState.tsx +2 -2
  116. package/src/stately/color/useColorWheelState.tsx +2 -2
  117. package/src/stately/data/useAsyncList.tsx +2 -2
  118. package/src/stately/data/useListData.tsx +1 -1
  119. package/src/stately/data/useTreeData.tsx +1 -1
  120. package/src/stately/datepicker/IncompleteDate.tsx +8 -3
  121. package/src/stately/datepicker/types.tsx +3 -3
  122. package/src/stately/datepicker/useDateFieldState.tsx +7 -7
  123. package/src/stately/datepicker/useDatePickerState.tsx +9 -6
  124. package/src/stately/datepicker/useDateRangePickerState.tsx +9 -6
  125. package/src/stately/datepicker/useTimeFieldState.tsx +2 -2
  126. package/src/stately/datepicker/utils.tsx +3 -3
  127. package/src/stately/dnd/useDraggableCollectionState.tsx +2 -2
  128. package/src/stately/dnd/useDroppableCollectionState.tsx +2 -2
  129. package/src/stately/layout/GridLayout.tsx +8 -2
  130. package/src/stately/layout/ListLayout.tsx +2 -2
  131. package/src/stately/layout/TableLayout.tsx +5 -5
  132. package/src/stately/layout/WaterfallLayout.tsx +8 -2
  133. package/src/stately/tokenfield/useTokenFieldState.tsx +1 -1
  134. package/src/stately/virtualizer/Layout.tsx +2 -2
  135. package/src/stately/virtualizer/LayoutInfo.tsx +1 -1
  136. package/src/stately/virtualizer/ReusableView.tsx +1 -1
  137. package/src/stately/virtualizer/ScrollAnchor.tsx +2 -2
  138. package/src/stately/virtualizer/Virtualizer.tsx +3 -3
  139. package/src/stately/virtualizer/types.tsx +1 -1
  140. package/src/stately/virtualizer/useVirtualizerState.tsx +2 -2
  141. package/src/table/useTableColumnResize.tsx +5 -5
  142. package/src/toast/useToast.tsx +8 -3
  143. package/src/toast/useToastRegion.tsx +7 -2
  144. package/src/tokenfield/useToken.tsx +1 -1
  145. package/src/tokenfield/useTokenField.tsx +8 -8
  146. package/src/tooltip/usePreviewTrigger.tsx +3 -3
  147. package/src/tooltip/useSafeArea.tsx +1 -1
  148. package/src/utils/openLink.ts +1 -1
  149. package/src/utils/useLoadMore.tsx +1 -1
  150. package/src/virtualizer/ScrollView.tsx +5 -5
  151. package/src/virtualizer/Virtualizer.tsx +5 -5
  152. package/src/virtualizer/VirtualizerItem.tsx +3 -3
  153. package/src/virtualizer/useVirtualizerItem.tsx +1 -1
  154. package/src/virtualizer/utils.tsx +1 -1
@@ -13,44 +13,44 @@
13
13
  */
14
14
 
15
15
  import {
16
- AriaColorFieldProps,
16
+ type AriaColorFieldProps,
17
17
  useColorChannelField,
18
18
  useColorField,
19
19
  } from '../upstream-exports/react-aria/useColorField';
20
20
 
21
21
  import {
22
- ClassNameOrFunction,
23
- ContextValue,
22
+ type ClassNameOrFunction,
23
+ type ContextValue,
24
24
  dom,
25
25
  Provider,
26
- RACValidation,
26
+ type RACValidation,
27
27
  removeDataAttributes,
28
- RenderProps,
29
- SlotProps,
28
+ type RenderProps,
29
+ type SlotProps,
30
30
  useContextProps,
31
31
  useRenderProps,
32
32
  useSlot,
33
33
  } from './utils';
34
- import { ColorChannel, ColorSpace } from '../upstream-exports/react-stately/Color';
34
+ import type { ColorChannel, ColorSpace } from '../upstream-exports/react-stately/Color';
35
35
  import {
36
- ColorFieldState,
36
+ type ColorFieldState,
37
37
  useColorChannelFieldState,
38
38
  useColorFieldState,
39
39
  } from '../upstream-exports/react-stately/useColorFieldState';
40
40
  import { FieldErrorContext } from './FieldError';
41
41
  import { filterDOMProps } from '../upstream-exports/react-aria/filterDOMProps';
42
- import { GlobalDOMAttributes, InputDOMProps, ValidationResult } from '@react-types/shared';
42
+ import type { GlobalDOMAttributes, InputDOMProps, ValidationResult } from '@react-types/shared';
43
43
  import { GroupContext } from './Group';
44
44
  import { InputContext } from './Input';
45
45
  import { LabelContext } from './Label';
46
46
  import React, {
47
47
  createContext,
48
- ForwardedRef,
48
+ type ForwardedRef,
49
49
  forwardRef,
50
- HTMLAttributes,
51
- InputHTMLAttributes,
52
- LabelHTMLAttributes,
53
- Ref,
50
+ type HTMLAttributes,
51
+ type InputHTMLAttributes,
52
+ type LabelHTMLAttributes,
53
+ type Ref,
54
54
  useRef,
55
55
  } from '../compat/react';
56
56
  import { TextContext } from './Text';
@@ -13,21 +13,21 @@
13
13
  */
14
14
 
15
15
  import {
16
- ChildrenOrFunction,
16
+ type ChildrenOrFunction,
17
17
  Provider,
18
- SlotProps,
19
- SlottedContextValue,
18
+ type SlotProps,
19
+ type SlottedContextValue,
20
20
  useRenderProps,
21
21
  useSlottedContext,
22
22
  } from './utils';
23
- import { Color } from '../upstream-exports/react-stately/Color';
23
+ import type { Color } from '../upstream-exports/react-stately/Color';
24
24
 
25
25
  import { ColorAreaContext } from './ColorArea';
26
26
 
27
27
  import { ColorFieldContext } from './ColorField';
28
28
  import {
29
- ColorPickerState,
30
- ColorPickerProps as StatelyColorPickerProps,
29
+ type ColorPickerState,
30
+ type ColorPickerProps as StatelyColorPickerProps,
31
31
  useColorPickerState,
32
32
  } from '../upstream-exports/react-stately/useColorPickerState';
33
33
  import { ColorSliderContext } from './ColorSlider';
@@ -35,7 +35,7 @@ import { ColorSwatchContext } from './ColorSwatch';
35
35
  import { ColorSwatchPickerContext } from './ColorSwatchPicker';
36
36
  import { ColorWheelContext } from './ColorWheel';
37
37
  import { mergeProps } from '../upstream-exports/react-aria/mergeProps';
38
- import React, { createContext, JSX } from '../compat/react';
38
+ import React, { createContext, type JSX } from '../compat/react';
39
39
 
40
40
  export interface ColorPickerRenderProps {
41
41
  /** The currently selected color. */
@@ -2,30 +2,30 @@
2
2
  // Ported from adobe/react-spectrum@1c84a49a1faf50b571c84e00bcf9c60b22ddd03e (packages/react-aria-components/src/ColorSlider.tsx).
3
3
  import { useRef } from 'octane';
4
4
  import {
5
- AriaColorSliderProps,
5
+ type AriaColorSliderProps,
6
6
  useColorSlider,
7
7
  } from '../upstream-exports/react-aria/useColorSlider';
8
8
  import {
9
- ClassNameOrFunction,
10
- ContextValue,
9
+ type ClassNameOrFunction,
10
+ type ContextValue,
11
11
  dom,
12
12
  Provider,
13
- RenderProps,
14
- SlotProps,
13
+ type RenderProps,
14
+ type SlotProps,
15
15
  useContextProps,
16
16
  useRenderProps,
17
17
  useSlot,
18
18
  } from './utils';
19
19
  import {
20
- ColorSliderState,
20
+ type ColorSliderState,
21
21
  useColorSliderState,
22
22
  } from '../upstream-exports/react-stately/useColorSliderState';
23
23
  import { filterDOMProps } from '../upstream-exports/react-aria/filterDOMProps';
24
- import { GlobalDOMAttributes } from '@react-types/shared';
24
+ import type { GlobalDOMAttributes } from '@react-types/shared';
25
25
  import { InternalColorThumbContext } from './ColorThumb';
26
26
  import { LabelContext } from './Label';
27
- import { Orientation } from '@react-types/shared';
28
- import React, { createContext, ForwardedRef, forwardRef } from '../compat/react';
27
+ import type { Orientation } from '@react-types/shared';
28
+ import React, { createContext, type ForwardedRef, forwardRef } from '../compat/react';
29
29
  import { SliderOutputContext, SliderStateContext, SliderTrackContext } from './Slider';
30
30
  import { useLocale } from '../upstream-exports/react-aria/I18nProvider';
31
31
 
@@ -1,23 +1,23 @@
1
1
  /** @jsxImportSource octane */
2
2
  // Ported from adobe/react-spectrum@1c84a49a1faf50b571c84e00bcf9c60b22ddd03e (packages/react-aria-components/src/ColorSwatch.tsx).
3
3
  import {
4
- AriaColorSwatchProps,
4
+ type AriaColorSwatchProps,
5
5
  useColorSwatch,
6
6
  } from '../upstream-exports/react-aria/useColorSwatch';
7
7
  import {
8
- ClassNameOrFunction,
9
- ContextValue,
8
+ type ClassNameOrFunction,
9
+ type ContextValue,
10
10
  dom,
11
- SlotProps,
12
- StyleRenderProps,
11
+ type SlotProps,
12
+ type StyleRenderProps,
13
13
  useContextProps,
14
14
  useRenderProps,
15
15
  } from './utils';
16
- import { Color } from '../upstream-exports/react-stately/Color';
16
+ import type { Color } from '../upstream-exports/react-stately/Color';
17
17
  import { filterDOMProps } from '../upstream-exports/react-aria/filterDOMProps';
18
- import { GlobalDOMAttributes } from '@react-types/shared';
18
+ import type { GlobalDOMAttributes } from '@react-types/shared';
19
19
  import { mergeProps } from '../upstream-exports/react-aria/mergeProps';
20
- import React, { createContext, ForwardedRef, forwardRef } from '../compat/react';
20
+ import React, { createContext, type ForwardedRef, forwardRef } from '../compat/react';
21
21
 
22
22
  export interface ColorSwatchRenderProps {
23
23
  /** The color of the swatch. */
@@ -1,7 +1,7 @@
1
1
  /** @jsxImportSource octane */
2
2
  // Ported from adobe/react-spectrum@1c84a49a1faf50b571c84e00bcf9c60b22ddd03e (packages/react-aria-components/src/ColorSwatchPicker.tsx).
3
3
  import { isChildrenBlock } from 'octane';
4
- import {
4
+ import type {
5
5
  AriaLabelingProps,
6
6
  GlobalDOMAttributes,
7
7
  HoverEvents,
@@ -9,24 +9,29 @@ import {
9
9
  ValueBase,
10
10
  } from '@react-types/shared';
11
11
  import {
12
- ClassNameOrFunction,
12
+ type ClassNameOrFunction,
13
13
  composeRenderProps,
14
- ContextValue,
15
- RenderProps,
16
- StyleRenderProps,
14
+ type ContextValue,
15
+ type RenderProps,
16
+ type StyleRenderProps,
17
17
  useContextProps,
18
18
  } from './utils';
19
- import { Color } from '../upstream-exports/react-stately/Color';
19
+ import type { Color } from '../upstream-exports/react-stately/Color';
20
20
  import { ColorSwatchContext } from './ColorSwatch';
21
21
  import { filterDOMProps } from '../upstream-exports/react-aria/filterDOMProps';
22
22
  import intlMessages from '../intl/react-aria-components/index';
23
- import { ListBox, ListBoxItem, ListBoxItemRenderProps, ListBoxRenderProps } from './ListBox';
23
+ import {
24
+ ListBox,
25
+ ListBoxItem,
26
+ type ListBoxItemRenderProps,
27
+ type ListBoxRenderProps,
28
+ } from './ListBox';
24
29
  import { parseColor } from '../upstream-exports/react-stately/Color';
25
30
  import React, {
26
31
  createContext,
27
- ForwardedRef,
32
+ type ForwardedRef,
28
33
  forwardRef,
29
- ReactNode,
34
+ type ReactNode,
30
35
  useContext,
31
36
  useEffect,
32
37
  useMemo,
@@ -96,7 +101,7 @@ export const ColorSwatchPicker = forwardRef(function ColorSwatchPicker(
96
101
  }}
97
102
  disallowEmptySelection
98
103
  >
99
- <ColorMapContext.Provider value={colorMap}>{props.children}</ColorMapContext.Provider>
104
+ <ColorMapContext value={colorMap}>{props.children}</ColorMapContext>
100
105
  </ListBox>
101
106
  );
102
107
  });
@@ -169,7 +174,7 @@ export const ColorSwatchPickerItem = forwardRef(function ColorSwatchPickerItem(
169
174
  style={wrap(props.style)}
170
175
  >
171
176
  {composeRenderProps(wrap(props.children), (children) => (
172
- <ColorSwatchContext.Provider value={{ color }}>{children}</ColorSwatchContext.Provider>
177
+ <ColorSwatchContext value={{ color }}>{children}</ColorSwatchContext>
173
178
  ))}
174
179
  </ListBoxItem>
175
180
  );
@@ -1,16 +1,16 @@
1
1
  /** @jsxImportSource octane */
2
2
  // Ported from adobe/react-spectrum@1c84a49a1faf50b571c84e00bcf9c60b22ddd03e (packages/react-aria-components/src/ColorThumb.tsx).
3
- import { ClassNameOrFunction, dom, RenderProps, useRenderProps } from './utils';
4
- import { Color } from '../upstream-exports/react-stately/Color';
3
+ import { type ClassNameOrFunction, dom, type RenderProps, useRenderProps } from './utils';
4
+ import type { Color } from '../upstream-exports/react-stately/Color';
5
5
  import { filterDOMProps } from '../upstream-exports/react-aria/filterDOMProps';
6
- import { GlobalDOMAttributes, HoverEvents, RefObject } from '@react-types/shared';
6
+ import type { GlobalDOMAttributes, HoverEvents, RefObject } from '@react-types/shared';
7
7
  import { mergeProps } from '../upstream-exports/react-aria/mergeProps';
8
8
  import React, {
9
9
  createContext,
10
- ForwardedRef,
10
+ type ForwardedRef,
11
11
  forwardRef,
12
- HTMLAttributes,
13
- InputHTMLAttributes,
12
+ type HTMLAttributes,
13
+ type InputHTMLAttributes,
14
14
  useContext,
15
15
  } from '../compat/react';
16
16
  import { useFocusRing } from '../upstream-exports/react-aria/useFocusRing';
@@ -1,29 +1,32 @@
1
1
  /** @jsxImportSource octane */
2
2
  // Ported from adobe/react-spectrum@1c84a49a1faf50b571c84e00bcf9c60b22ddd03e (packages/react-aria-components/src/ColorWheel.tsx).
3
- import { AriaColorWheelOptions, useColorWheel } from '../upstream-exports/react-aria/useColorWheel';
4
3
  import {
5
- ClassNameOrFunction,
6
- ContextValue,
4
+ type AriaColorWheelOptions,
5
+ useColorWheel,
6
+ } from '../upstream-exports/react-aria/useColorWheel';
7
+ import {
8
+ type ClassNameOrFunction,
9
+ type ContextValue,
7
10
  dom,
8
11
  Provider,
9
- RenderProps,
10
- SlotProps,
11
- StyleRenderProps,
12
+ type RenderProps,
13
+ type SlotProps,
14
+ type StyleRenderProps,
12
15
  useContextProps,
13
16
  useRenderProps,
14
17
  } from './utils';
15
18
  import {
16
- ColorWheelState,
19
+ type ColorWheelState,
17
20
  useColorWheelState,
18
21
  } from '../upstream-exports/react-stately/useColorWheelState';
19
22
  import { filterDOMProps } from '../upstream-exports/react-aria/filterDOMProps';
20
- import { GlobalDOMAttributes } from '@react-types/shared';
23
+ import type { GlobalDOMAttributes } from '@react-types/shared';
21
24
  import { InternalColorThumbContext } from './ColorThumb';
22
25
  import React, {
23
26
  createContext,
24
- ForwardedRef,
27
+ type ForwardedRef,
25
28
  forwardRef,
26
- HTMLAttributes,
29
+ type HTMLAttributes,
27
30
  useContext,
28
31
  useRef,
29
32
  } from '../compat/react';
@@ -162,7 +162,7 @@ export const ComboBox: <T, M extends SelectionMode = 'single'>(
162
162
  } = props;
163
163
  let content = useMemo(
164
164
  () =>
165
- createElement(ListBoxContext.Provider, {
165
+ createElement(ListBoxContext, {
166
166
  value: { items: props.items ?? props.defaultItems },
167
167
  children:
168
168
  typeof children === 'function' && !isChildrenBlock(children)
@@ -12,21 +12,21 @@
12
12
  * governing permissions and limitations under the License.
13
13
  */
14
14
  import {
15
- AriaDateFieldProps,
15
+ type AriaDateFieldProps,
16
16
  useDateField,
17
17
  useDateSegment,
18
18
  } from '../upstream-exports/react-aria/useDateField';
19
- import { AriaTimeFieldProps, useTimeField } from '../upstream-exports/react-aria/useTimeField';
19
+ import { type AriaTimeFieldProps, useTimeField } from '../upstream-exports/react-aria/useTimeField';
20
20
  import {
21
- ClassNameOrFunction,
22
- ContextValue,
21
+ type ClassNameOrFunction,
22
+ type ContextValue,
23
23
  dom,
24
24
  Provider,
25
- RACValidation,
25
+ type RACValidation,
26
26
  removeDataAttributes,
27
- RenderProps,
28
- SlotProps,
29
- StyleRenderProps,
27
+ type RenderProps,
28
+ type SlotProps,
29
+ type StyleRenderProps,
30
30
  useContextProps,
31
31
  useRenderProps,
32
32
  useSlot,
@@ -34,38 +34,38 @@ import {
34
34
  } from './utils';
35
35
  import { createCalendar } from '@internationalized/date';
36
36
  import {
37
- DateFieldState,
38
- DateSegmentType,
39
- DateValue,
40
- DateSegment as IDateSegment,
37
+ type DateFieldState,
38
+ type DateSegmentType,
39
+ type DateValue,
40
+ type DateSegment as IDateSegment,
41
41
  useDateFieldState,
42
42
  } from '../upstream-exports/react-stately/useDateFieldState';
43
43
  import { FieldErrorContext } from './FieldError';
44
44
  import { filterDOMProps } from '../upstream-exports/react-aria/filterDOMProps';
45
45
  import { FormContext } from './Form';
46
- import { forwardRefType, GlobalDOMAttributes } from '@react-types/shared';
46
+ import type { forwardRefType, GlobalDOMAttributes } from '@react-types/shared';
47
47
  import { Group, GroupContext } from './Group';
48
48
  import { HiddenDateInput } from './HiddenDateInput';
49
- import { HoverEvents } from '@react-types/shared';
49
+ import type { HoverEvents } from '@react-types/shared';
50
50
  import { Input, InputContext } from './Input';
51
51
  import { LabelContext } from './Label';
52
52
  import { mergeProps } from '../upstream-exports/react-aria/mergeProps';
53
53
  import React, {
54
54
  cloneElement,
55
55
  createContext,
56
- ForwardedRef,
56
+ type ForwardedRef,
57
57
  forwardRef,
58
- JSX,
59
- ReactElement,
58
+ type JSX,
59
+ type ReactElement,
60
60
  useContext,
61
61
  useRef,
62
62
  } from '../compat/react';
63
63
  import { TextContext } from './Text';
64
64
  import {
65
- TimeFieldState,
65
+ type TimeFieldState,
66
66
  useTimeFieldState,
67
67
  } from '../upstream-exports/react-stately/useTimeFieldState';
68
- import { TimeValue } from '../upstream-exports/react-stately/useTimeFieldState';
68
+ import type { TimeValue } from '../upstream-exports/react-stately/useTimeFieldState';
69
69
  import { useFocusRing } from '../upstream-exports/react-aria/useFocusRing';
70
70
  import { useHover } from '../upstream-exports/react-aria/useHover';
71
71
  import { useLocale } from '../upstream-exports/react-aria/I18nProvider';
@@ -11,22 +11,25 @@
11
11
  * OF ANY KIND, either express or implied. See the License for the specific language
12
12
  * governing permissions and limitations under the License.
13
13
  */
14
- import { AriaDatePickerProps, useDatePicker } from '../upstream-exports/react-aria/useDatePicker';
15
14
  import {
16
- AriaDateRangePickerProps,
15
+ type AriaDatePickerProps,
16
+ useDatePicker,
17
+ } from '../upstream-exports/react-aria/useDatePicker';
18
+ import {
19
+ type AriaDateRangePickerProps,
17
20
  useDateRangePicker,
18
21
  } from '../upstream-exports/react-aria/useDateRangePicker';
19
22
  import { ButtonContext } from './Button';
20
23
  import { CalendarContext, RangeCalendarContext } from './Calendar';
21
24
  import {
22
- ClassNameOrFunction,
23
- ContextValue,
25
+ type ClassNameOrFunction,
26
+ type ContextValue,
24
27
  dom,
25
28
  Provider,
26
- RACValidation,
29
+ type RACValidation,
27
30
  removeDataAttributes,
28
- RenderProps,
29
- SlotProps,
31
+ type RenderProps,
32
+ type SlotProps,
30
33
  useContextProps,
31
34
  useRenderProps,
32
35
  useSlot,
@@ -34,27 +37,27 @@ import {
34
37
  } from './utils';
35
38
  import { DateFieldContext } from './DateField';
36
39
  import {
37
- DatePickerState,
38
- DatePickerStateOptions,
39
- DateValue,
40
+ type DatePickerState,
41
+ type DatePickerStateOptions,
42
+ type DateValue,
40
43
  useDatePickerState,
41
44
  } from '../upstream-exports/react-stately/useDatePickerState';
42
45
  import {
43
- DateRangePickerState,
44
- DateRangePickerStateOptions,
46
+ type DateRangePickerState,
47
+ type DateRangePickerStateOptions,
45
48
  useDateRangePickerState,
46
49
  } from '../upstream-exports/react-stately/useDateRangePickerState';
47
50
  import { DialogContext, OverlayTriggerStateContext } from './Dialog';
48
51
  import { FieldErrorContext } from './FieldError';
49
52
  import { filterDOMProps } from '../upstream-exports/react-aria/filterDOMProps';
50
53
  import { FormContext } from './Form';
51
- import { forwardRefType, GlobalDOMAttributes } from '@react-types/shared';
54
+ import type { forwardRefType, GlobalDOMAttributes } from '@react-types/shared';
52
55
  import { GroupContext } from './Group';
53
56
  import { HiddenDateInput } from './HiddenDateInput';
54
57
  import { LabelContext } from './Label';
55
58
  import { mergeProps } from '../upstream-exports/react-aria/mergeProps';
56
59
  import { PopoverContext } from './Popover';
57
- import React, { createContext, ForwardedRef, forwardRef, useRef } from '../compat/react';
60
+ import React, { createContext, type ForwardedRef, forwardRef, useRef } from '../compat/react';
58
61
  import { TextContext } from './Text';
59
62
  import { useFocusRing } from '../upstream-exports/react-aria/useFocusRing';
60
63
 
@@ -99,7 +99,7 @@ export function DisclosureGroup(props: DisclosureGroupProps): any {
99
99
  ...renderProps,
100
100
  ref,
101
101
  'data-disabled': props.isDisabled || undefined,
102
- children: createElement(DisclosureGroupStateContext.Provider, {
102
+ children: createElement(DisclosureGroupStateContext, {
103
103
  value: state,
104
104
  children: renderProps.children,
105
105
  }),
@@ -13,18 +13,18 @@ import { focusWithoutScrolling } from '../utils/focusWithoutScrolling';
13
13
  * governing permissions and limitations under the License.
14
14
  */
15
15
 
16
- import { AriaLabelingProps, GlobalDOMAttributes, HoverEvents } from '@react-types/shared';
16
+ import type { AriaLabelingProps, GlobalDOMAttributes, HoverEvents } from '@react-types/shared';
17
17
  import {
18
- ClassNameOrFunction,
19
- ContextValue,
18
+ type ClassNameOrFunction,
19
+ type ContextValue,
20
20
  dom,
21
21
  Provider,
22
- RenderProps,
23
- SlotProps,
22
+ type RenderProps,
23
+ type SlotProps,
24
24
  useContextProps,
25
25
  useRenderProps,
26
26
  } from './utils';
27
- import { DropOptions, useDrop } from '../upstream-exports/react-aria/useDrop';
27
+ import { type DropOptions, useDrop } from '../upstream-exports/react-aria/useDrop';
28
28
  import { filterDOMProps } from '../upstream-exports/react-aria/filterDOMProps';
29
29
  import {
30
30
  getEventTarget,
@@ -33,7 +33,7 @@ import {
33
33
  import intlMessages from '../intl/react-aria-components/index';
34
34
  import { isFocusable } from '../upstream-exports/react-aria/private/utils/isFocusable';
35
35
  import { mergeProps } from '../upstream-exports/react-aria/mergeProps';
36
- import React, { createContext, ForwardedRef, forwardRef, useRef } from '../compat/react';
36
+ import React, { createContext, type ForwardedRef, forwardRef, useRef } from '../compat/react';
37
37
  import { TextContext } from './Text';
38
38
  import { useButton } from '../upstream-exports/react-aria/useButton';
39
39
  import { useClipboard } from '../upstream-exports/react-aria/useClipboard';
@@ -14,10 +14,10 @@
14
14
 
15
15
  import { filterDOMProps } from '../upstream-exports/react-aria/filterDOMProps';
16
16
 
17
- import { GlobalDOMAttributes } from '@react-types/shared';
17
+ import type { GlobalDOMAttributes } from '@react-types/shared';
18
18
  import { Input } from './Input';
19
19
  import { PressResponder } from '../upstream-exports/react-aria/private/interactions/PressResponder';
20
- import React, { ForwardedRef, forwardRef, ReactNode } from '../compat/react';
20
+ import React, { type ForwardedRef, forwardRef, type ReactNode } from '../compat/react';
21
21
  import { useObjectRef } from '../upstream-exports/react-aria/useObjectRef';
22
22
 
23
23
  export interface FileTriggerProps extends GlobalDOMAttributes<HTMLInputElement> {
@@ -54,9 +54,9 @@ export function Form(props: FormProps): any {
54
54
  ...domProps,
55
55
  ref,
56
56
  className: className || 'react-aria-Form',
57
- children: createElement(FormContext.Provider, {
57
+ children: createElement(FormContext, {
58
58
  value: { ...props, validationBehavior },
59
- children: createElement(FormValidationContext.Provider, {
59
+ children: createElement(FormValidationContext, {
60
60
  value: validationErrors ?? {},
61
61
  children,
62
62
  }),
@@ -14,9 +14,9 @@
14
14
 
15
15
  import {
16
16
  GridLayout as BaseGridLayout,
17
- GridLayoutOptions,
17
+ type GridLayoutOptions,
18
18
  } from '../upstream-exports/react-stately/useVirtualizerState';
19
- import { LayoutOptionsDelegate } from './Virtualizer';
19
+ import type { LayoutOptionsDelegate } from './Virtualizer';
20
20
  import { useLocale } from '../upstream-exports/react-aria/I18nProvider';
21
21
  import { useMemo } from '../compat/react';
22
22
 
@@ -21,13 +21,13 @@ import {
21
21
  toCalendarDateTime,
22
22
  toLocalTimeZone,
23
23
  } from '@internationalized/date';
24
- import {
24
+ import type {
25
25
  DateFieldState,
26
26
  DateSegmentType,
27
27
  } from '../upstream-exports/react-stately/useDateFieldState';
28
- import { DatePickerState } from '../upstream-exports/react-stately/useDatePickerState';
28
+ import type { DatePickerState } from '../upstream-exports/react-stately/useDatePickerState';
29
29
  import { getEventTarget } from '../upstream-exports/react-aria/private/utils/shadowdom/DOMFunctions';
30
- import React, { ReactNode } from '../compat/react';
30
+ import React, { type ReactNode } from '../compat/react';
31
31
  import { useVisuallyHidden } from '../upstream-exports/react-aria/VisuallyHidden';
32
32
 
33
33
  interface AriaHiddenDateInputProps {
@@ -530,7 +530,7 @@ function ListBoxSectionInner<T>(
530
530
  return createElement(dom.section, {
531
531
  ...mergeProps(DOMProps, renderProps, groupProps),
532
532
  ref,
533
- children: createElement(HeaderContext.Provider, {
533
+ children: createElement(HeaderContext, {
534
534
  value: { ...headingProps, ref: headingRef },
535
535
  children: createElement(CollectionBranch, {
536
536
  collection: state.collection,
@@ -94,7 +94,7 @@ export function Meter(props: MeterProps): any {
94
94
  ...mergeProps(DOMProps, renderProps, meterProps),
95
95
  ref,
96
96
  slot: props.slot || undefined,
97
- children: createElement(LabelContext.Provider, {
97
+ children: createElement(LabelContext, {
98
98
  value: { ...labelProps, ref: labelRef, elementType: 'span' },
99
99
  children: renderProps.children,
100
100
  }),
@@ -292,7 +292,7 @@ function PopoverInner(allProps: PopoverInnerProps): any {
292
292
  let children = renderProps.children;
293
293
  if (clearContexts) {
294
294
  for (let Context of clearContexts) {
295
- children = createElement((Context as any).Provider, { value: null, children });
295
+ children = createElement(Context as any, { value: null, children });
296
296
  }
297
297
  }
298
298
  return children;
@@ -353,7 +353,7 @@ function PopoverInner(allProps: PopoverInnerProps): any {
353
353
  'data-exiting': isExiting || undefined,
354
354
  },
355
355
  !props.isNonModal ? createElement(DismissButton, { onDismiss: state.close }) : null,
356
- createElement(OverlayArrowContext.Provider, {
356
+ createElement(OverlayArrowContext, {
357
357
  value: { ...arrowProps, placement, ref: arrowRef } as any,
358
358
  children,
359
359
  }),
@@ -381,7 +381,7 @@ function PopoverInner(allProps: PopoverInnerProps): any {
381
381
  createElement('div', {
382
382
  ref: containerRef,
383
383
  style: { display: 'contents' },
384
- children: createElement(PopoverGroupContext.Provider, {
384
+ children: createElement(PopoverGroupContext, {
385
385
  value: containerRef,
386
386
  children: overlay,
387
387
  }),
@@ -14,16 +14,16 @@ import type { OctaneNode } from 'octane';
14
14
  */
15
15
 
16
16
  import {
17
- AriaPreviewTriggerProps,
17
+ type AriaPreviewTriggerProps,
18
18
  usePreviewTrigger,
19
19
  } from '../upstream-exports/react-aria/usePreviewTrigger';
20
- import { FocusableElement } from '@react-types/shared';
20
+ import type { FocusableElement } from '@react-types/shared';
21
21
  import { FocusableProvider } from '../interactions/useFocusable';
22
- import { OverlayTriggerState } from '../upstream-exports/react-stately/useOverlayTriggerState';
22
+ import type { OverlayTriggerState } from '../upstream-exports/react-stately/useOverlayTriggerState';
23
23
  import { OverlayTriggerStateContext } from './Dialog';
24
24
  import { PopoverContext } from './Popover';
25
25
  import { Provider } from './utils';
26
- import React, { JSX, useMemo, useRef } from '../compat/react';
26
+ import React, { type JSX, useMemo, useRef } from '../compat/react';
27
27
  import { useTooltipTriggerState } from '../upstream-exports/react-stately/useTooltipTriggerState';
28
28
 
29
29
  export interface PreviewTriggerProps extends AriaPreviewTriggerProps {
@@ -112,7 +112,7 @@ export function ProgressBar(props: ProgressBarProps): any {
112
112
  ...mergeProps(DOMProps, renderProps, progressBarProps),
113
113
  ref,
114
114
  slot: props.slot || undefined,
115
- children: createElement(LabelContext.Provider, {
115
+ children: createElement(LabelContext, {
116
116
  value: { ...labelProps, ref: labelRef, elementType: 'span' },
117
117
  children: renderProps.children,
118
118
  }),
@@ -370,7 +370,7 @@ export function Radio(props: RadioProps): any {
370
370
  subSlot(slot, 'radio'),
371
371
  );
372
372
 
373
- return createElement(InternalRadioContext.Provider, {
373
+ return createElement(InternalRadioContext, {
374
374
  value: { ...aria, inputRef, defaultClassName: 'react-aria-Radio' },
375
375
  children: createElement(RadioButton, { ...props, ref } as any),
376
376
  });