@octanejs/aria 0.0.49 → 0.0.51
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.
- package/package.json +3 -3
- package/src/calendar/useCalendar.tsx +3 -3
- package/src/calendar/useCalendarBase.tsx +4 -4
- package/src/calendar/useCalendarCell.tsx +3 -3
- package/src/calendar/useCalendarGrid.tsx +3 -3
- package/src/calendar/useCalendarHeading.tsx +3 -3
- package/src/calendar/useCalendarMonthPicker.tsx +3 -3
- package/src/calendar/useCalendarYearPicker.tsx +3 -3
- package/src/calendar/useRangeCalendar.tsx +4 -4
- package/src/calendar/utils.tsx +2 -2
- package/src/color/useColorArea.tsx +5 -5
- package/src/color/useColorAreaGradient.tsx +3 -3
- package/src/color/useColorChannelField.tsx +3 -3
- package/src/color/useColorField.tsx +5 -5
- package/src/color/useColorSlider.tsx +3 -3
- package/src/color/useColorSwatch.tsx +3 -3
- package/src/color/useColorWheel.tsx +8 -3
- package/src/combobox/useComboBox.tsx +7 -7
- package/src/components/Calendar.tsx +25 -25
- package/src/components/ColorArea.tsx +8 -8
- package/src/components/ColorField.tsx +14 -14
- package/src/components/ColorPicker.tsx +7 -7
- package/src/components/ColorSlider.tsx +9 -9
- package/src/components/ColorSwatch.tsx +8 -8
- package/src/components/ColorSwatchPicker.tsx +14 -9
- package/src/components/ColorThumb.tsx +6 -6
- package/src/components/ColorWheel.tsx +13 -10
- package/src/components/DateField.tsx +19 -19
- package/src/components/DatePicker.tsx +17 -14
- package/src/components/DropZone.tsx +7 -7
- package/src/components/FileTrigger.tsx +2 -2
- package/src/components/GridLayout.tsx +2 -2
- package/src/components/HiddenDateInput.tsx +3 -3
- package/src/components/PreviewTrigger.tsx +4 -4
- package/src/components/TableLayout.tsx +2 -2
- package/src/components/Toast.tsx +15 -15
- package/src/components/TokenField.tsx +13 -13
- package/src/components/Virtualizer.tsx +12 -6
- package/src/components/useDragAndDrop.tsx +16 -16
- package/src/datepicker/useDateField.tsx +5 -5
- package/src/datepicker/useDatePicker.tsx +5 -5
- package/src/datepicker/useDatePickerGroup.tsx +4 -4
- package/src/datepicker/useDateRangePicker.tsx +6 -6
- package/src/datepicker/useDateSegment.tsx +6 -3
- package/src/dnd/DragManager.tsx +2 -2
- package/src/dnd/DragPreview.tsx +3 -3
- package/src/dnd/DropTargetKeyboardNavigation.tsx +1 -1
- package/src/dnd/ListDropTargetDelegate.tsx +1 -1
- package/src/dnd/constants.tsx +1 -1
- package/src/dnd/useAutoScroll.tsx +1 -1
- package/src/dnd/useClipboard.tsx +1 -1
- package/src/dnd/useDrag.tsx +7 -7
- package/src/dnd/useDraggableCollection.tsx +2 -2
- package/src/dnd/useDraggableItem.tsx +4 -4
- package/src/dnd/useDrop.tsx +3 -3
- package/src/dnd/useDropIndicator.tsx +3 -3
- package/src/dnd/useDroppableCollection.tsx +3 -3
- package/src/dnd/useDroppableItem.tsx +3 -3
- package/src/dnd/useVirtualDrop.tsx +2 -2
- package/src/dnd/utils.tsx +2 -2
- package/src/grid/useGridCell.tsx +4 -4
- package/src/gridlist/useGridListItem.tsx +13 -3
- package/src/interactions/useContextMenu.tsx +1 -1
- package/src/landmark/useLandmark.tsx +6 -1
- package/src/menu/useMenuTrigger.tsx +5 -5
- package/src/menu/useSubmenuTrigger.tsx +9 -3
- package/src/numberfield/useNumberField.tsx +6 -6
- package/src/overlays/useOverlay.tsx +1 -1
- package/src/radio/useRadioGroup.tsx +2 -2
- package/src/searchfield/useSearchField.tsx +5 -5
- package/src/selection/useSelectableCollection.tsx +3 -3
- package/src/slider/useSliderThumb.tsx +5 -5
- package/src/spinbutton/useSpinButton.tsx +2 -2
- package/src/stately/calendar/types.tsx +3 -3
- package/src/stately/calendar/useCalendarState.tsx +5 -5
- package/src/stately/calendar/useRangeCalendarState.tsx +5 -5
- package/src/stately/calendar/utils.tsx +2 -2
- package/src/stately/color/Color.tsx +1 -1
- package/src/stately/color/useColor.tsx +1 -1
- package/src/stately/color/useColorAreaState.tsx +2 -2
- package/src/stately/color/useColorChannelFieldState.tsx +3 -3
- package/src/stately/color/useColorFieldState.tsx +3 -3
- package/src/stately/color/useColorPickerState.tsx +2 -2
- package/src/stately/color/useColorSliderState.tsx +2 -2
- package/src/stately/color/useColorWheelState.tsx +2 -2
- package/src/stately/data/useAsyncList.tsx +2 -2
- package/src/stately/data/useListData.tsx +1 -1
- package/src/stately/data/useTreeData.tsx +1 -1
- package/src/stately/datepicker/IncompleteDate.tsx +8 -3
- package/src/stately/datepicker/types.tsx +3 -3
- package/src/stately/datepicker/useDateFieldState.tsx +7 -7
- package/src/stately/datepicker/useDatePickerState.tsx +9 -6
- package/src/stately/datepicker/useDateRangePickerState.tsx +9 -6
- package/src/stately/datepicker/useTimeFieldState.tsx +2 -2
- package/src/stately/datepicker/utils.tsx +3 -3
- package/src/stately/dnd/useDraggableCollectionState.tsx +2 -2
- package/src/stately/dnd/useDroppableCollectionState.tsx +2 -2
- package/src/stately/layout/GridLayout.tsx +8 -2
- package/src/stately/layout/ListLayout.tsx +2 -2
- package/src/stately/layout/TableLayout.tsx +5 -5
- package/src/stately/layout/WaterfallLayout.tsx +8 -2
- package/src/stately/tokenfield/useTokenFieldState.tsx +1 -1
- package/src/stately/virtualizer/Layout.tsx +2 -2
- package/src/stately/virtualizer/LayoutInfo.tsx +1 -1
- package/src/stately/virtualizer/ReusableView.tsx +1 -1
- package/src/stately/virtualizer/ScrollAnchor.tsx +2 -2
- package/src/stately/virtualizer/Virtualizer.tsx +3 -3
- package/src/stately/virtualizer/types.tsx +1 -1
- package/src/stately/virtualizer/useVirtualizerState.tsx +2 -2
- package/src/table/useTableColumnResize.tsx +5 -5
- package/src/toast/useToast.tsx +8 -3
- package/src/toast/useToastRegion.tsx +7 -2
- package/src/tokenfield/useToken.tsx +1 -1
- package/src/tokenfield/useTokenField.tsx +8 -8
- package/src/tooltip/usePreviewTrigger.tsx +3 -3
- package/src/tooltip/useSafeArea.tsx +1 -1
- package/src/utils/useLoadMore.tsx +1 -1
- package/src/virtualizer/ScrollView.tsx +5 -5
- package/src/virtualizer/Virtualizer.tsx +5 -5
- package/src/virtualizer/VirtualizerItem.tsx +3 -3
- package/src/virtualizer/useVirtualizerItem.tsx +1 -1
- package/src/virtualizer/utils.tsx +1 -1
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { ChildView, ReusableView, RootView } from './ReusableView';
|
|
16
|
-
import { Collection, Key } from '@react-types/shared';
|
|
17
|
-
import {
|
|
16
|
+
import type { Collection, Key } from '@react-types/shared';
|
|
17
|
+
import type {
|
|
18
18
|
InvalidationContext,
|
|
19
19
|
Mutable,
|
|
20
20
|
VirtualizerDelegate,
|
|
@@ -26,7 +26,7 @@ import { LayoutInfo } from './LayoutInfo';
|
|
|
26
26
|
import { OverscanManager } from './OverscanManager';
|
|
27
27
|
import { Point } from './Point';
|
|
28
28
|
import { Rect } from './Rect';
|
|
29
|
-
import { ScrollAnchor, ScrollAnchorTracker } from './ScrollAnchor';
|
|
29
|
+
import { type ScrollAnchor, ScrollAnchorTracker } from './ScrollAnchor';
|
|
30
30
|
import { Size } from './Size';
|
|
31
31
|
|
|
32
32
|
interface VirtualizerOptions<T extends object, V> {
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* governing permissions and limitations under the License.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import { Collection, Key } from '@react-types/shared';
|
|
15
|
+
import type { Collection, Key } from '@react-types/shared';
|
|
16
16
|
import { Layout } from './Layout';
|
|
17
17
|
import { Rect } from './Rect';
|
|
18
18
|
import { Size } from './Size';
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
* governing permissions and limitations under the License.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import { Collection, Key } from '@react-types/shared';
|
|
16
|
-
import { InvalidationContext } from './types';
|
|
15
|
+
import type { Collection, Key } from '@react-types/shared';
|
|
16
|
+
import type { InvalidationContext } from './types';
|
|
17
17
|
import { Layout } from './Layout';
|
|
18
18
|
import React, { useCallback, useMemo, useRef, useState } from '../../compat/react';
|
|
19
19
|
import { Rect } from './Rect';
|
|
@@ -13,16 +13,16 @@ type DOMAttributes = Record<string, any>;
|
|
|
13
13
|
* governing permissions and limitations under the License.
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
-
import { ChangeEvent, useCallback, useEffect, useRef, useState } from '../compat/react';
|
|
17
|
-
import { ColumnSize } from '../upstream-exports/react-stately/useTableState';
|
|
18
|
-
import { FocusableElement, Key, RefObject } from '@react-types/shared';
|
|
16
|
+
import { type ChangeEvent, useCallback, useEffect, useRef, useState } from '../compat/react';
|
|
17
|
+
import type { ColumnSize } from '../upstream-exports/react-stately/useTableState';
|
|
18
|
+
import type { FocusableElement, Key, RefObject } from '@react-types/shared';
|
|
19
19
|
import { focusSafely } from '../interactions/focusSafely';
|
|
20
20
|
import { getActiveElement, getEventTarget } from '../utils/shadowdom/DOMFunctions';
|
|
21
21
|
import { getColumnHeaderId } from './utils';
|
|
22
|
-
import { GridNode } from '../upstream-exports/react-stately/private/grid/GridCollection';
|
|
22
|
+
import type { GridNode } from '../upstream-exports/react-stately/private/grid/GridCollection';
|
|
23
23
|
import intlMessages from '../intl/table/index';
|
|
24
24
|
import { mergeProps } from '../utils/mergeProps';
|
|
25
|
-
import { TableColumnResizeState } from '../upstream-exports/react-stately/useTableState';
|
|
25
|
+
import type { TableColumnResizeState } from '../upstream-exports/react-stately/useTableState';
|
|
26
26
|
import { withSlot } from 'octane';
|
|
27
27
|
import { useDescription } from '../utils/useDescription';
|
|
28
28
|
import { useEffectEvent } from '../utils/useEffectEvent';
|
package/src/toast/useToast.tsx
CHANGED
|
@@ -12,11 +12,16 @@
|
|
|
12
12
|
* governing permissions and limitations under the License.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import { AriaButtonProps } from '../button/useButton';
|
|
16
|
-
import {
|
|
15
|
+
import type { AriaButtonProps } from '../button/useButton';
|
|
16
|
+
import type {
|
|
17
|
+
AriaLabelingProps,
|
|
18
|
+
DOMAttributes,
|
|
19
|
+
FocusableElement,
|
|
20
|
+
RefObject,
|
|
21
|
+
} from '@react-types/shared';
|
|
17
22
|
import { filterDOMProps } from '../utils/filterDOMProps';
|
|
18
23
|
import intlMessages from '../intl/toast/index';
|
|
19
|
-
import { QueuedToast, ToastState } from '../upstream-exports/react-stately/useToastState';
|
|
24
|
+
import type { QueuedToast, ToastState } from '../upstream-exports/react-stately/useToastState';
|
|
20
25
|
import { useEffect, useState } from '../compat/react';
|
|
21
26
|
import { useId, useSlotId } from '../utils/useId';
|
|
22
27
|
import { useLayoutEffect } from '../utils/useLayoutEffect';
|
|
@@ -12,13 +12,18 @@
|
|
|
12
12
|
* governing permissions and limitations under the License.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import {
|
|
15
|
+
import type {
|
|
16
|
+
AriaLabelingProps,
|
|
17
|
+
DOMAttributes,
|
|
18
|
+
FocusableElement,
|
|
19
|
+
RefObject,
|
|
20
|
+
} from '@react-types/shared';
|
|
16
21
|
import { focusWithoutScrolling } from '../utils/focusWithoutScrolling';
|
|
17
22
|
import { getEventTarget } from '../utils/shadowdom/DOMFunctions';
|
|
18
23
|
import { getInteractionModality } from '../interactions/useFocusVisible';
|
|
19
24
|
import intlMessages from '../intl/toast/index';
|
|
20
25
|
import { mergeProps } from '../utils/mergeProps';
|
|
21
|
-
import { ToastState } from '../upstream-exports/react-stately/useToastState';
|
|
26
|
+
import type { ToastState } from '../upstream-exports/react-stately/useToastState';
|
|
22
27
|
import { useCallback, useEffect, useRef } from '../compat/react';
|
|
23
28
|
import { useFocusWithin } from '../interactions/useFocusWithin';
|
|
24
29
|
import { useHover } from '../interactions/useHover';
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* governing
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import { HTMLAttributes, RefObject, useRef, useState } from '../compat/react';
|
|
15
|
+
import { type HTMLAttributes, type RefObject, useRef, useState } from '../compat/react';
|
|
16
16
|
import { useEvent } from '../utils/useEvent';
|
|
17
17
|
|
|
18
18
|
export interface TokenProps {}
|
|
@@ -14,11 +14,11 @@ import type { FocusableProps } from '../interactions/useFocusable';
|
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
16
|
import { announce } from '../live-announcer/LiveAnnouncer';
|
|
17
|
-
import { AriaLabelingProps, DOMAttributes } from '@react-types/shared';
|
|
17
|
+
import type { AriaLabelingProps, DOMAttributes } from '@react-types/shared';
|
|
18
18
|
import {
|
|
19
|
-
ClipboardEventHandler,
|
|
20
|
-
HTMLAttributes,
|
|
21
|
-
RefObject,
|
|
19
|
+
type ClipboardEventHandler,
|
|
20
|
+
type HTMLAttributes,
|
|
21
|
+
type RefObject,
|
|
22
22
|
useCallback,
|
|
23
23
|
useMemo,
|
|
24
24
|
useRef,
|
|
@@ -28,10 +28,10 @@ import { getOwnerDocument } from '../utils/domHelpers';
|
|
|
28
28
|
import { isMac } from '../utils/platform';
|
|
29
29
|
import { mergeProps } from '../utils/mergeProps';
|
|
30
30
|
import {
|
|
31
|
-
Position,
|
|
32
|
-
TokenFieldProps,
|
|
33
|
-
TokenFieldSegment,
|
|
34
|
-
TokenFieldState,
|
|
31
|
+
type Position,
|
|
32
|
+
type TokenFieldProps,
|
|
33
|
+
type TokenFieldSegment,
|
|
34
|
+
type TokenFieldState,
|
|
35
35
|
TokenFieldValue,
|
|
36
36
|
} from '../upstream-exports/react-stately/useTokenFieldState';
|
|
37
37
|
import { setInteractionModality } from '../interactions/useFocusVisible';
|
|
@@ -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
|
|
|
@@ -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
|
|