@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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@octanejs/aria",
3
- "version": "0.0.48",
3
+ "version": "0.0.50",
4
4
  "license": "MIT AND Apache-2.0",
5
5
  "type": "module",
6
6
  "sideEffects": [
@@ -53,10 +53,10 @@
53
53
  "clsx": "^2.1.1"
54
54
  },
55
55
  "peerDependencies": {
56
- "octane": "^0.1.51 || ^0.2.0"
56
+ "octane": "^0.1.51 || ^0.2.0 || ^0.3.0"
57
57
  },
58
58
  "devDependencies": {
59
- "@tsrx/react": "^0.2.71",
59
+ "@tsrx/react": "^0.3.0",
60
60
  "esbuild": "^0.28.1",
61
61
  "react": "19.2.7",
62
62
  "react-aria": "3.51.0",
@@ -65,7 +65,7 @@
65
65
  "react-stately": "3.49.0",
66
66
  "typescript": "^5.9.3",
67
67
  "vitest": "^4.1.10",
68
- "octane": "0.2.8"
68
+ "octane": "0.3.1"
69
69
  },
70
70
  "scripts": {
71
71
  "exports:check": "node scripts/check-react-aria-components-exports.mjs",
@@ -12,9 +12,9 @@
12
12
  * governing permissions and limitations under the License.
13
13
  */
14
14
 
15
- import { AriaLabelingProps, DOMProps } from '@react-types/shared';
16
- import { CalendarAria, useCalendarBase } from './useCalendarBase';
17
- import {
15
+ import type { AriaLabelingProps, DOMProps } from '@react-types/shared';
16
+ import { type CalendarAria, useCalendarBase } from './useCalendarBase';
17
+ import type {
18
18
  CalendarProps,
19
19
  CalendarSelectionMode,
20
20
  CalendarState,
@@ -13,9 +13,9 @@
13
13
  */
14
14
 
15
15
  import { announce } from '../live-announcer/LiveAnnouncer';
16
- import { AriaButtonProps } from '../button/useButton';
17
- import { AriaLabelingProps, DOMAttributes, DOMProps } from '@react-types/shared';
18
- import {
16
+ import type { AriaButtonProps } from '../button/useButton';
17
+ import type { AriaLabelingProps, DOMAttributes, DOMProps } from '@react-types/shared';
18
+ import type {
19
19
  CalendarPropsBase,
20
20
  CalendarSelectionMode,
21
21
  CalendarState,
@@ -24,7 +24,7 @@ import { filterDOMProps } from '../utils/filterDOMProps';
24
24
  import { hookData, useSelectedDateDescription, useVisibleRangeDescription } from './utils';
25
25
  import intlMessages from '../intl/calendar/index';
26
26
  import { mergeProps } from '../utils/mergeProps';
27
- import { RangeCalendarState } from '../upstream-exports/react-stately/useRangeCalendarState';
27
+ import type { RangeCalendarState } from '../upstream-exports/react-stately/useRangeCalendarState';
28
28
  import { useLabels } from '../utils/useLabels';
29
29
  import { useLocalizedStringFormatter } from '../i18n/useLocalizedStringFormatter';
30
30
  import { useSlotId } from '../utils/useId';
@@ -13,11 +13,11 @@
13
13
  */
14
14
 
15
15
  import { CalendarDate, isEqualDay, isSameDay, isToday } from '@internationalized/date';
16
- import {
16
+ import type {
17
17
  CalendarSelectionMode,
18
18
  CalendarState,
19
19
  } from '../upstream-exports/react-stately/useCalendarState';
20
- import { DOMAttributes, RefObject } from '@react-types/shared';
20
+ import type { DOMAttributes, RefObject } from '@react-types/shared';
21
21
  import { focusWithoutScrolling } from '../utils/focusWithoutScrolling';
22
22
  import { getActiveElement, getEventTarget } from '../utils/shadowdom/DOMFunctions';
23
23
  import { getEraFormat, hookData } from './utils';
@@ -25,7 +25,7 @@ import { getInteractionModality } from '../interactions/useFocusVisible';
25
25
  import { getScrollParent } from '../utils/getScrollParent';
26
26
  import intlMessages from '../intl/calendar/index';
27
27
  import { mergeProps } from '../utils/mergeProps';
28
- import { RangeCalendarState } from '../upstream-exports/react-stately/useRangeCalendarState';
28
+ import type { RangeCalendarState } from '../upstream-exports/react-stately/useRangeCalendarState';
29
29
  import { scrollIntoViewport } from '../utils/scrollIntoView';
30
30
  import { useDateFormatter } from '../i18n/useDateFormatter';
31
31
  import { useDeepMemo } from '../utils/useDeepMemo';
@@ -13,14 +13,14 @@
13
13
  */
14
14
 
15
15
  import { CalendarDate, startOfWeek, today } from '@internationalized/date';
16
- import {
16
+ import type {
17
17
  CalendarSelectionMode,
18
18
  CalendarState,
19
19
  } from '../upstream-exports/react-stately/useCalendarState';
20
- import { DOMAttributes } from '@react-types/shared';
20
+ import type { DOMAttributes } from '@react-types/shared';
21
21
  import { hookData, useVisibleRangeDescription } from './utils';
22
22
  import { mergeProps } from '../utils/mergeProps';
23
- import { RangeCalendarState } from '../upstream-exports/react-stately/useRangeCalendarState';
23
+ import type { RangeCalendarState } from '../upstream-exports/react-stately/useRangeCalendarState';
24
24
  import { useDateFormatter } from '../i18n/useDateFormatter';
25
25
  import { useKeyboard } from '../interactions/useKeyboard';
26
26
  import { useLabels } from '../utils/useLabels';
@@ -12,12 +12,12 @@
12
12
  * governing permissions and limitations under the License.
13
13
  */
14
14
 
15
- import {
15
+ import type {
16
16
  CalendarSelectionMode,
17
17
  CalendarState,
18
18
  } from '../upstream-exports/react-stately/useCalendarState';
19
- import { DateDuration } from '@internationalized/date';
20
- import { RangeCalendarState } from '../upstream-exports/react-stately/useRangeCalendarState';
19
+ import type { DateDuration } from '@internationalized/date';
20
+ import type { RangeCalendarState } from '../upstream-exports/react-stately/useRangeCalendarState';
21
21
  import { useDateFormatter } from '../i18n/useDateFormatter';
22
22
  import { useMemo } from '../compat/react';
23
23
 
@@ -13,12 +13,12 @@
13
13
  */
14
14
 
15
15
  import { CalendarDate } from '@internationalized/date';
16
- import {
16
+ import type {
17
17
  CalendarSelectionMode,
18
18
  CalendarState,
19
19
  } from '../upstream-exports/react-stately/useCalendarState';
20
- import { Key } from '@react-types/shared';
21
- import { RangeCalendarState } from '../upstream-exports/react-stately/useRangeCalendarState';
20
+ import type { Key } from '@react-types/shared';
21
+ import type { RangeCalendarState } from '../upstream-exports/react-stately/useRangeCalendarState';
22
22
  import { useDateFormatter } from '../i18n/useDateFormatter';
23
23
  import { useLocale } from '../i18n/I18nProvider';
24
24
  import { useMemo } from '../compat/react';
@@ -13,12 +13,12 @@
13
13
  */
14
14
 
15
15
  import { CalendarDate, isSameYear, toCalendarDate } from '@internationalized/date';
16
- import {
16
+ import type {
17
17
  CalendarSelectionMode,
18
18
  CalendarState,
19
19
  } from '../upstream-exports/react-stately/useCalendarState';
20
- import { Key } from '@react-types/shared';
21
- import { RangeCalendarState } from '../upstream-exports/react-stately/useRangeCalendarState';
20
+ import type { Key } from '@react-types/shared';
21
+ import type { RangeCalendarState } from '../upstream-exports/react-stately/useRangeCalendarState';
22
22
  import { useDateFormatter } from '../i18n/useDateFormatter';
23
23
  import { useLocale } from '../i18n/I18nProvider';
24
24
  import { useMemo } from '../compat/react';
@@ -12,14 +12,14 @@
12
12
  * governing permissions and limitations under the License.
13
13
  */
14
14
 
15
- import { AriaLabelingProps, DOMProps, FocusableElement, RefObject } from '@react-types/shared';
16
- import { CalendarAria, useCalendarBase } from './useCalendarBase';
17
- import {
15
+ import type { AriaLabelingProps, DOMProps, FocusableElement, RefObject } from '@react-types/shared';
16
+ import { type CalendarAria, useCalendarBase } from './useCalendarBase';
17
+ import type {
18
18
  DateValue,
19
19
  RangeCalendarState,
20
20
  } from '../upstream-exports/react-stately/useRangeCalendarState';
21
21
  import { isFocusWithin, nodeContains } from '../utils/shadowdom/DOMFunctions';
22
- import { RangeCalendarProps } from '../upstream-exports/react-stately/useRangeCalendarState';
22
+ import type { RangeCalendarProps } from '../upstream-exports/react-stately/useRangeCalendarState';
23
23
  import { useEvent } from '../utils/useEvent';
24
24
  import { useRef } from '../compat/react';
25
25
 
@@ -19,13 +19,13 @@ import {
19
19
  isSameDay,
20
20
  startOfMonth,
21
21
  } from '@internationalized/date';
22
- import {
22
+ import type {
23
23
  CalendarSelectionMode,
24
24
  CalendarState,
25
25
  } from '../upstream-exports/react-stately/useCalendarState';
26
26
  import intlMessages from '../intl/calendar/index';
27
27
  import type { LocalizedStringFormatter } from '@internationalized/string';
28
- import { RangeCalendarState } from '../upstream-exports/react-stately/useRangeCalendarState';
28
+ import type { RangeCalendarState } from '../upstream-exports/react-stately/useRangeCalendarState';
29
29
  import { useDateFormatter } from '../i18n/useDateFormatter';
30
30
  import { useLocale } from '../i18n/I18nProvider';
31
31
  import { useLocalizedStringFormatter } from '../i18n/useLocalizedStringFormatter';
@@ -80,7 +80,7 @@ export function CollectionBuilder<C extends BaseCollection<any>>(
80
80
  null,
81
81
  createElement(Hidden, {
82
82
  target: document.getRootElement(),
83
- children: createElement(CollectionDocumentContext.Provider, {
83
+ children: createElement(CollectionDocumentContext, {
84
84
  value: document,
85
85
  children: props.content,
86
86
  }),
@@ -207,7 +207,7 @@ function useSSRCollectionNode<T extends Element>(
207
207
  parentNode.ownerDocument.nodesByProps.set(props, element);
208
208
  }
209
209
 
210
- return children ? createElement(SSRContext.Provider, { value: element, children }) : null;
210
+ return children ? createElement(SSRContext, { value: element, children }) : null;
211
211
  }
212
212
 
213
213
  // The placeholder tag is the node type (`<item>`/`<section>`-style) — a valid
@@ -240,7 +240,7 @@ export function createLeafComponent<T, P extends object, E extends Element>(
240
240
  null,
241
241
  (node) =>
242
242
  // Forward FocusableContext to real DOM tree so tooltips work.
243
- createElement(FocusableContext.Provider, {
243
+ createElement(FocusableContext, {
244
244
  value: focusableProps,
245
245
  children: createElement(Component, { node }),
246
246
  }),
@@ -312,7 +312,7 @@ export function Collection<T>(props: CollectionProps<T>): any {
312
312
  subSlot(slot, 'ctx'),
313
313
  );
314
314
 
315
- return createElement(CollectionContext.Provider, { value: ctx, children });
315
+ return createElement(CollectionContext, { value: ctx, children });
316
316
  }
317
317
 
318
318
  function CollectionRoot(props: { children: any }): any {
@@ -320,9 +320,9 @@ function CollectionRoot(props: { children: any }): any {
320
320
  let doc = useContext(CollectionDocumentContext);
321
321
  let wrappedChildren = useMemo(
322
322
  () =>
323
- createElement(CollectionDocumentContext.Provider, {
323
+ createElement(CollectionDocumentContext, {
324
324
  value: null,
325
- children: createElement(ShallowRenderContext.Provider, {
325
+ children: createElement(ShallowRenderContext, {
326
326
  value: doc,
327
327
  children: props.children,
328
328
  }),
@@ -338,6 +338,6 @@ function CollectionRoot(props: { children: any }): any {
338
338
  // container, so the placeholders land in the walked tree directly.
339
339
  let isSSR = useIsSSR(subSlot(slot, 'ssr'));
340
340
  return isSSR
341
- ? createElement(SSRContext.Provider, { value: doc, children: wrappedChildren })
341
+ ? createElement(SSRContext, { value: doc, children: wrappedChildren })
342
342
  : wrappedChildren;
343
343
  }
@@ -35,7 +35,7 @@ export function Hidden(props: { children: any; target?: Element | null }): any {
35
35
  return props.children;
36
36
  }
37
37
 
38
- let children = createElement(HiddenContext.Provider, {
38
+ let children = createElement(HiddenContext, {
39
39
  value: true,
40
40
  children: props.children,
41
41
  });
@@ -12,19 +12,19 @@
12
12
  * governing permissions and limitations under the License.
13
13
  */
14
14
 
15
- import { AriaLabelingProps, DOMAttributes, DOMProps, RefObject } from '@react-types/shared';
16
- import {
15
+ import type { AriaLabelingProps, DOMAttributes, DOMProps, RefObject } from '@react-types/shared';
16
+ import type {
17
17
  ColorAreaProps,
18
18
  ColorAreaState,
19
19
  } from '../upstream-exports/react-stately/useColorAreaState';
20
- import { ColorChannel } from '../upstream-exports/react-stately/Color';
20
+ import type { ColorChannel } from '../upstream-exports/react-stately/Color';
21
21
  import { focusWithoutScrolling } from '../utils/focusWithoutScrolling';
22
22
  import intlMessages from '../intl/color/index';
23
23
  import { isAndroid, isIOS } from '../utils/platform';
24
24
  import { mergeProps } from '../utils/mergeProps';
25
25
  import React, {
26
- ChangeEvent,
27
- InputHTMLAttributes,
26
+ type ChangeEvent,
27
+ type InputHTMLAttributes,
28
28
  useCallback,
29
29
  useRef,
30
30
  useState,
@@ -12,10 +12,10 @@
12
12
  * governing permissions and limitations under the License.
13
13
  */
14
14
 
15
- import { Color, ColorChannel } from '../upstream-exports/react-stately/Color';
15
+ import type { Color, ColorChannel } from '../upstream-exports/react-stately/Color';
16
16
 
17
- import { ColorAreaState } from '../upstream-exports/react-stately/useColorAreaState';
18
- import { CSSProperties, useMemo } from '../compat/react';
17
+ import type { ColorAreaState } from '../upstream-exports/react-stately/useColorAreaState';
18
+ import { type CSSProperties, useMemo } from '../compat/react';
19
19
  import { parseColor } from '../upstream-exports/react-stately/Color';
20
20
 
21
21
  const hue = (color: Color) =>
@@ -12,12 +12,12 @@
12
12
  * governing permissions and limitations under the License.
13
13
  */
14
14
 
15
- import { AriaLabelingProps, RefObject } from '@react-types/shared';
16
- import {
15
+ import type { AriaLabelingProps, RefObject } from '@react-types/shared';
16
+ import type {
17
17
  ColorChannelFieldProps,
18
18
  ColorChannelFieldState,
19
19
  } from '../upstream-exports/react-stately/useColorFieldState';
20
- import { NumberFieldAria, useNumberField } from '../numberfield/useNumberField';
20
+ import { type NumberFieldAria, useNumberField } from '../numberfield/useNumberField';
21
21
  import { useLocale } from '../i18n/I18nProvider';
22
22
 
23
23
  export interface AriaColorChannelFieldProps extends ColorChannelFieldProps, AriaLabelingProps {}
@@ -12,7 +12,7 @@
12
12
  * governing permissions and limitations under the License.
13
13
  */
14
14
 
15
- import {
15
+ import type {
16
16
  AriaLabelingProps,
17
17
  AriaValidationProps,
18
18
  DOMAttributes,
@@ -21,14 +21,14 @@ import {
21
21
  TextInputDOMProps,
22
22
  ValidationResult,
23
23
  } from '@react-types/shared';
24
- import {
24
+ import type {
25
25
  ColorFieldProps,
26
26
  ColorFieldState,
27
27
  } from '../upstream-exports/react-stately/useColorFieldState';
28
28
  import {
29
- InputHTMLAttributes,
30
- LabelHTMLAttributes,
31
- RefObject,
29
+ type InputHTMLAttributes,
30
+ type LabelHTMLAttributes,
31
+ type RefObject,
32
32
  useCallback,
33
33
  useState,
34
34
  } from '../compat/react';
@@ -12,18 +12,18 @@
12
12
  * governing permissions and limitations under the License.
13
13
  */
14
14
 
15
- import {
15
+ import type {
16
16
  AriaLabelingProps,
17
17
  DOMAttributes,
18
18
  DOMProps,
19
19
  InputDOMProps,
20
20
  RefObject,
21
21
  } from '@react-types/shared';
22
- import {
22
+ import type {
23
23
  ColorSliderProps,
24
24
  ColorSliderState,
25
25
  } from '../upstream-exports/react-stately/useColorSliderState';
26
- import { InputHTMLAttributes } from '../compat/react';
26
+ import type { InputHTMLAttributes } from '../compat/react';
27
27
  import { mergeProps } from '../utils/mergeProps';
28
28
  import { useLocale } from '../i18n/I18nProvider';
29
29
  import { useSlider } from '../slider/useSlider';
@@ -12,10 +12,10 @@
12
12
  * governing permissions and limitations under the License.
13
13
  */
14
14
 
15
- import { AriaLabelingProps, DOMProps } from '@react-types/shared';
16
- import { Color } from '../upstream-exports/react-stately/Color';
15
+ import type { AriaLabelingProps, DOMProps } from '@react-types/shared';
16
+ import type { Color } from '../upstream-exports/react-stately/Color';
17
17
  import { filterDOMProps } from '../utils/filterDOMProps';
18
- import { HTMLAttributes, useMemo } from '../compat/react';
18
+ import { type HTMLAttributes, useMemo } from '../compat/react';
19
19
  import intlMessages from '../intl/color/index';
20
20
  import { parseColor } from '../upstream-exports/react-stately/Color';
21
21
  import { useId } from '../utils/useId';
@@ -12,21 +12,26 @@
12
12
  * governing permissions and limitations under the License.
13
13
  */
14
14
 
15
- import {
15
+ import type {
16
16
  AriaLabelingProps,
17
17
  DOMAttributes,
18
18
  DOMProps,
19
19
  InputDOMProps,
20
20
  RefObject,
21
21
  } from '@react-types/shared';
22
- import {
22
+ import type {
23
23
  ColorWheelProps,
24
24
  ColorWheelState,
25
25
  } from '../upstream-exports/react-stately/useColorWheelState';
26
26
  import { focusWithoutScrolling } from '../utils/focusWithoutScrolling';
27
27
  import { getEventTarget } from '../utils/shadowdom/DOMFunctions';
28
28
  import { mergeProps } from '../utils/mergeProps';
29
- import React, { ChangeEvent, InputHTMLAttributes, useCallback, useRef } from '../compat/react';
29
+ import React, {
30
+ type ChangeEvent,
31
+ type InputHTMLAttributes,
32
+ useCallback,
33
+ useRef,
34
+ } from '../compat/react';
30
35
  import { useFormReset } from '../utils/useFormReset';
31
36
  import { useGlobalListeners } from '../utils/useGlobalListeners';
32
37
  import { useKeyboard } from '../interactions/useKeyboard';
@@ -14,9 +14,9 @@ type DOMAttributes = Record<string, any>;
14
14
  */
15
15
 
16
16
  import { announce } from '../live-announcer/LiveAnnouncer';
17
- import { AriaButtonProps } from '../button/useButton';
17
+ import type { AriaButtonProps } from '../button/useButton';
18
18
  import { ariaHideOutside } from '../overlays/ariaHideOutside';
19
- import {
19
+ import type {
20
20
  AriaLabelingProps,
21
21
  DOMProps,
22
22
  InputDOMProps,
@@ -27,18 +27,18 @@ import {
27
27
  RouterOptions,
28
28
  ValidationResult,
29
29
  } from '@react-types/shared';
30
- import { AriaListBoxOptions } from '../listbox/useListBox';
30
+ import type { AriaListBoxOptions } from '../listbox/useListBox';
31
31
  import { chain } from '../utils/chain';
32
- import {
32
+ import type {
33
33
  ComboBoxProps,
34
34
  ComboBoxState,
35
35
  SelectionMode,
36
36
  } from '../upstream-exports/react-stately/useComboBoxState';
37
37
  import { dispatchVirtualFocus } from '../focus/virtualFocus';
38
38
  import {
39
- ElementType,
40
- InputHTMLAttributes,
41
- TouchEvent,
39
+ type ElementType,
40
+ type InputHTMLAttributes,
41
+ type TouchEvent,
42
42
  useEffect,
43
43
  useMemo,
44
44
  useRef,
@@ -80,7 +80,7 @@ export function Breadcrumbs<T extends object>(props: BreadcrumbsProps<T>): any {
80
80
  slot: props.slot || undefined,
81
81
  style: props.style,
82
82
  className: props.className ?? 'react-aria-Breadcrumbs',
83
- children: createElement(BreadcrumbsContext.Provider, {
83
+ children: createElement(BreadcrumbsContext, {
84
84
  value: props,
85
85
  children: createElement(CollectionRoot, { collection }),
86
86
  }),
@@ -161,7 +161,7 @@ export const Breadcrumb: (props: BreadcrumbProps & { ref?: any }) => any = creat
161
161
  ref,
162
162
  'data-disabled': isDisabled || isCurrent || undefined,
163
163
  'data-current': isCurrent || undefined,
164
- children: createElement(LinkContext.Provider, {
164
+ children: createElement(LinkContext, {
165
165
  value: linkProps as any,
166
166
  children: renderProps.children,
167
167
  }),
@@ -183,7 +183,7 @@ export const Button = /*#__PURE__*/ createHideableComponent(function Button(
183
183
  'data-focused': isFocused || undefined,
184
184
  'data-pending': isPending || undefined,
185
185
  'data-focus-visible': isFocusVisible || undefined,
186
- children: createElement(ProgressBarContext.Provider, {
186
+ children: createElement(ProgressBarContext, {
187
187
  value: { id: progressId },
188
188
  children: renderProps.children,
189
189
  }),
@@ -12,12 +12,12 @@
12
12
  * governing permissions and limitations under the License.
13
13
  */
14
14
  import {
15
- CalendarHeadingProps as AriaCalendarHeadingProps,
16
- CalendarMonthPickerProps as AriaCalendarMonthPickerProps,
17
- AriaCalendarProps,
18
- CalendarYearPickerProps as AriaCalendarYearPickerProps,
19
- CalendarMonthPickerAria,
20
- CalendarYearPickerAria,
15
+ type CalendarHeadingProps as AriaCalendarHeadingProps,
16
+ type CalendarMonthPickerProps as AriaCalendarMonthPickerProps,
17
+ type AriaCalendarProps,
18
+ type CalendarYearPickerProps as AriaCalendarYearPickerProps,
19
+ type CalendarMonthPickerAria,
20
+ type CalendarYearPickerAria,
21
21
  useCalendar,
22
22
  useCalendarCell,
23
23
  useCalendarGrid,
@@ -26,44 +26,44 @@ import {
26
26
  useCalendarYearPicker,
27
27
  } from '../upstream-exports/react-aria/useCalendar';
28
28
  import {
29
- AriaRangeCalendarProps,
29
+ type AriaRangeCalendarProps,
30
30
  useRangeCalendar,
31
31
  } from '../upstream-exports/react-aria/useRangeCalendar';
32
32
  import { ButtonContext } from './Button';
33
33
  import {
34
34
  CalendarDate,
35
- CalendarIdentifier,
35
+ type CalendarIdentifier,
36
36
  createCalendar,
37
- DateDuration,
37
+ type DateDuration,
38
38
  endOfMonth,
39
- Calendar as ICalendar,
39
+ type Calendar as ICalendar,
40
40
  isSameDay,
41
41
  isSameMonth,
42
42
  isToday,
43
43
  } from '@internationalized/date';
44
- import {
44
+ import type {
45
45
  CalendarSelectionMode,
46
46
  CalendarState,
47
47
  } from '../upstream-exports/react-stately/useCalendarState';
48
48
  import {
49
- ClassNameOrFunction,
50
- ContextValue,
49
+ type ClassNameOrFunction,
50
+ type ContextValue,
51
51
  dom,
52
- DOMProps,
53
- DOMRenderProps,
52
+ type DOMProps,
53
+ type DOMRenderProps,
54
54
  Provider,
55
- RenderProps,
56
- SlotProps,
57
- StyleProps,
55
+ type RenderProps,
56
+ type SlotProps,
57
+ type StyleProps,
58
58
  useContextProps,
59
59
  useRenderProps,
60
60
  useSlottedContext,
61
61
  } from './utils';
62
62
  import {
63
- DateValue,
63
+ type DateValue,
64
64
  useRangeCalendarState,
65
65
  } from '../upstream-exports/react-stately/useRangeCalendarState';
66
- import {
66
+ import type {
67
67
  DOMAttributes,
68
68
  FocusableElement,
69
69
  forwardRefType,
@@ -71,15 +71,15 @@ import {
71
71
  HoverEvents,
72
72
  } from '@react-types/shared';
73
73
  import { filterDOMProps } from '../upstream-exports/react-aria/filterDOMProps';
74
- import { Heading, HeadingContext, HeadingProps } from './Heading';
74
+ import { Heading, HeadingContext, type HeadingProps } from './Heading';
75
75
  import { mergeProps } from '../upstream-exports/react-aria/mergeProps';
76
- import { RangeCalendarState } from '../upstream-exports/react-stately/useRangeCalendarState';
76
+ import type { RangeCalendarState } from '../upstream-exports/react-stately/useRangeCalendarState';
77
77
  import React, {
78
78
  createContext,
79
- ForwardedRef,
79
+ type ForwardedRef,
80
80
  forwardRef,
81
- JSX,
82
- ReactElement,
81
+ type JSX,
82
+ type ReactElement,
83
83
  useContext,
84
84
  useRef,
85
85
  } from '../compat/react';
@@ -523,9 +523,7 @@ export const CalendarGrid = /*#__PURE__*/ (forwardRef as any)(function CalendarG
523
523
  let DOMProps = filterDOMProps(props, { global: true });
524
524
 
525
525
  return (
526
- <InternalCalendarGridContext.Provider
527
- value={{ headerProps, weekDays, startDate, weeksInMonth }}
528
- >
526
+ <InternalCalendarGridContext value={{ headerProps, weekDays, startDate, weeksInMonth }}>
529
527
  <dom.table
530
528
  render={props.render}
531
529
  {...mergeProps(DOMProps, gridProps)}
@@ -545,7 +543,7 @@ export const CalendarGrid = /*#__PURE__*/ (forwardRef as any)(function CalendarG
545
543
  </>
546
544
  )}
547
545
  </dom.table>
548
- </InternalCalendarGridContext.Provider>
546
+ </InternalCalendarGridContext>
549
547
  );
550
548
  });
551
549
 
@@ -496,7 +496,7 @@ export function Checkbox(props: CheckboxProps): any {
496
496
  );
497
497
  let [aria, inputRef] = useCheckboxAria(props, userProvidedInputRef, subSlot(slot, 'aria'));
498
498
 
499
- return createElement(InternalCheckboxContext.Provider, {
499
+ return createElement(InternalCheckboxContext, {
500
500
  value: {
501
501
  ...aria,
502
502
  inputRef,
@@ -1,25 +1,25 @@
1
1
  /** @jsxImportSource octane */
2
2
  // Ported from adobe/react-spectrum@1c84a49a1faf50b571c84e00bcf9c60b22ddd03e (packages/react-aria-components/src/ColorArea.tsx).
3
- import { AriaColorAreaProps, useColorArea } from '../upstream-exports/react-aria/useColorArea';
3
+ import { type AriaColorAreaProps, useColorArea } from '../upstream-exports/react-aria/useColorArea';
4
4
  import {
5
- ClassNameOrFunction,
6
- ContextValue,
5
+ type ClassNameOrFunction,
6
+ type ContextValue,
7
7
  dom,
8
8
  Provider,
9
- RenderProps,
10
- SlotProps,
9
+ type RenderProps,
10
+ type SlotProps,
11
11
  useContextProps,
12
12
  useRenderProps,
13
13
  } from './utils';
14
14
  import {
15
- ColorAreaState,
15
+ type ColorAreaState,
16
16
  useColorAreaState,
17
17
  } from '../upstream-exports/react-stately/useColorAreaState';
18
18
  import { filterDOMProps } from '../upstream-exports/react-aria/filterDOMProps';
19
- import { GlobalDOMAttributes } from '@react-types/shared';
19
+ import type { GlobalDOMAttributes } from '@react-types/shared';
20
20
  import { InternalColorThumbContext } from './ColorThumb';
21
21
  import { mergeProps } from '../upstream-exports/react-aria/mergeProps';
22
- import React, { createContext, ForwardedRef, forwardRef, useRef } from '../compat/react';
22
+ import React, { createContext, type ForwardedRef, forwardRef, useRef } from '../compat/react';
23
23
 
24
24
  export interface ColorAreaRenderProps {
25
25
  /**