@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
@@ -12,13 +12,13 @@
12
12
  * governing permissions and limitations under the License.
13
13
  */
14
14
 
15
- import {
15
+ import type {
16
16
  KeyboardEvent as AriaKeyboardEvent,
17
17
  DOMAttributes,
18
18
  FocusableElement,
19
19
  RefObject,
20
20
  } from '@react-types/shared';
21
- import { AriaPopoverProps } from '../overlays/usePopover';
21
+ import type { AriaPopoverProps } from '../overlays/usePopover';
22
22
  import { focusWithoutScrolling } from '../utils/focusWithoutScrolling';
23
23
  import { getActiveElement } from '../utils/shadowdom/DOMFunctions';
24
24
  import { getFocusableTreeWalker } from '../focus/FocusScope';
@@ -31,7 +31,7 @@ import { getOwnerDocument } from '../utils/domHelpers';
31
31
  import intlMessages from '../intl/previewtrigger/index';
32
32
  import { mergeProps } from '../utils/mergeProps';
33
33
  import { nodeContains } from '../utils/shadowdom/DOMFunctions';
34
- import {
34
+ import type {
35
35
  TooltipTriggerProps,
36
36
  TooltipTriggerState,
37
37
  } from '../upstream-exports/react-stately/useTooltipTriggerState';
@@ -13,7 +13,7 @@
13
13
  */
14
14
 
15
15
  import { getOwnerDocument, getOwnerWindow } from '../utils/domHelpers';
16
- import { RefObject } from '@react-types/shared';
16
+ import type { RefObject } from '@react-types/shared';
17
17
  import { useEffect } from '../compat/react';
18
18
  import { useEffectEvent } from '../utils/useEffectEvent';
19
19
 
@@ -65,7 +65,7 @@ export function RouterProvider(props: RouterProviderProps): any {
65
65
  S('RouterProvider:ctx'),
66
66
  );
67
67
 
68
- return createElement(RouterContext.Provider, { value: ctx, children });
68
+ return createElement(RouterContext, { value: ctx, children });
69
69
  }
70
70
 
71
71
  export function useRouter(): Router {
@@ -12,7 +12,7 @@
12
12
  * governing permissions and limitations under the License.
13
13
  */
14
14
 
15
- import { RefObject, useCallback, useRef } from '../compat/react';
15
+ import { type RefObject, useCallback, useRef } from '../compat/react';
16
16
  import { useEvent } from './useEvent';
17
17
 
18
18
  import { useLayoutEffect } from './useLayoutEffect';
@@ -23,11 +23,11 @@ import {
23
23
  import { getScrollLeft } from './utils';
24
24
  import { Point, Rect, Size } from '../upstream-exports/react-stately/useVirtualizerState';
25
25
  import React, {
26
- CSSProperties,
27
- ForwardedRef,
28
- HTMLAttributes,
29
- ReactNode,
30
- RefObject,
26
+ type CSSProperties,
27
+ type ForwardedRef,
28
+ type HTMLAttributes,
29
+ type ReactNode,
30
+ type RefObject,
31
31
  useCallback,
32
32
  useEffect,
33
33
  useRef,
@@ -12,7 +12,7 @@
12
12
  * governing permissions and limitations under the License.
13
13
  */
14
14
 
15
- import { Collection, Key, RefObject } from '@react-types/shared';
15
+ import type { Collection, Key, RefObject } from '@react-types/shared';
16
16
  import {
17
17
  Layout,
18
18
  Rect,
@@ -21,10 +21,10 @@ import {
21
21
  } from '../upstream-exports/react-stately/useVirtualizerState';
22
22
  import { mergeProps } from '../utils/mergeProps';
23
23
  import React, {
24
- ForwardedRef,
25
- HTMLAttributes,
26
- ReactElement,
27
- ReactNode,
24
+ type ForwardedRef,
25
+ type HTMLAttributes,
26
+ type ReactElement,
27
+ type ReactNode,
28
28
  useCallback,
29
29
  } from '../compat/react';
30
30
  import { ScrollView } from './ScrollView';
@@ -12,11 +12,11 @@
12
12
  * governing permissions and limitations under the License.
13
13
  */
14
14
 
15
- import { Direction } from '@react-types/shared';
15
+ import type { Direction } from '@react-types/shared';
16
16
  import { LayoutInfo } from '../upstream-exports/react-stately/useVirtualizerState';
17
- import React, { CSSProperties, JSX, ReactNode, useRef } from '../compat/react';
17
+ import React, { type CSSProperties, type JSX, type ReactNode, useRef } from '../compat/react';
18
18
  import { useLocale } from '../i18n/I18nProvider';
19
- import { useVirtualizerItem, VirtualizerItemOptions } from './useVirtualizerItem';
19
+ import { useVirtualizerItem, type VirtualizerItemOptions } from './useVirtualizerItem';
20
20
 
21
21
  interface VirtualizerItemProps extends Omit<VirtualizerItemOptions, 'ref'> {
22
22
  layoutInfo: LayoutInfo;
@@ -14,7 +14,7 @@ import { useEffectEvent } from '../utils/useEffectEvent';
14
14
  * governing permissions and limitations under the License.
15
15
  */
16
16
 
17
- import { Key, RefObject } from '@react-types/shared';
17
+ import type { Key, RefObject } from '@react-types/shared';
18
18
  import { LayoutInfo, Size } from '../upstream-exports/react-stately/useVirtualizerState';
19
19
  import { useCallback, useEffect } from '../compat/react';
20
20
  import { useLayoutEffect } from '../utils/useLayoutEffect';
@@ -12,7 +12,7 @@
12
12
  * governing permissions and limitations under the License.
13
13
  */
14
14
 
15
- import { Direction } from '@react-types/shared';
15
+ import type { Direction } from '@react-types/shared';
16
16
 
17
17
  export type RTLOffsetType = 'negative' | 'positive-descending' | 'positive-ascending';
18
18