@octanejs/aria 0.0.49 → 0.0.50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- 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
|
@@ -16,8 +16,8 @@ type DOMAttributes = Record<string, any>;
|
|
|
16
16
|
import { announce, clearAnnouncer } from '../live-announcer/LiveAnnouncer';
|
|
17
17
|
import { withSlot } from 'octane';
|
|
18
18
|
|
|
19
|
-
import { AriaButtonProps } from '../button/useButton';
|
|
20
|
-
import { InputBase, RangeInputBase, Validation, ValueBase } from '@react-types/shared';
|
|
19
|
+
import type { AriaButtonProps } from '../button/useButton';
|
|
20
|
+
import type { InputBase, RangeInputBase, Validation, ValueBase } from '@react-types/shared';
|
|
21
21
|
import intlMessages from '../intl/spinbutton/index';
|
|
22
22
|
import { useCallback, useEffect, useRef, useState } from '../compat/react';
|
|
23
23
|
import { useEffectEvent } from '../utils/useEffectEvent';
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
import {
|
|
16
16
|
CalendarDate,
|
|
17
17
|
CalendarDateTime,
|
|
18
|
-
DateDuration,
|
|
18
|
+
type DateDuration,
|
|
19
19
|
ZonedDateTime,
|
|
20
20
|
} from '@internationalized/date';
|
|
21
|
-
import { RangeValue, ValidationState } from '@react-types/shared';
|
|
22
|
-
import { ReactNode } from '../../compat/react';
|
|
21
|
+
import type { RangeValue, ValidationState } from '@react-types/shared';
|
|
22
|
+
import type { ReactNode } from '../../compat/react';
|
|
23
23
|
|
|
24
24
|
export type DateValue = CalendarDate | CalendarDateTime | ZonedDateTime;
|
|
25
25
|
export type MappedDateValue<T> = T extends ZonedDateTime
|
|
@@ -23,10 +23,10 @@ import {
|
|
|
23
23
|
previousAvailableDate,
|
|
24
24
|
} from './utils';
|
|
25
25
|
import {
|
|
26
|
-
Calendar,
|
|
26
|
+
type Calendar,
|
|
27
27
|
CalendarDate,
|
|
28
|
-
CalendarIdentifier,
|
|
29
|
-
DateDuration,
|
|
28
|
+
type CalendarIdentifier,
|
|
29
|
+
type DateDuration,
|
|
30
30
|
DateFormatter,
|
|
31
31
|
endOfMonth,
|
|
32
32
|
endOfWeek,
|
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
toCalendarDate,
|
|
42
42
|
today,
|
|
43
43
|
} from '@internationalized/date';
|
|
44
|
-
import {
|
|
44
|
+
import type {
|
|
45
45
|
CalendarPropsBase,
|
|
46
46
|
CalendarSelectionMode,
|
|
47
47
|
CalendarState,
|
|
@@ -51,7 +51,7 @@ import {
|
|
|
51
51
|
} from './types';
|
|
52
52
|
import { useControlledState } from '../utils/useControlledState';
|
|
53
53
|
import { useMemo, useState } from '../../compat/react';
|
|
54
|
-
import { ValidationState, ValueBase } from '@react-types/shared';
|
|
54
|
+
import type { ValidationState, ValueBase } from '@react-types/shared';
|
|
55
55
|
|
|
56
56
|
export interface CalendarProps<T extends DateValue, M extends CalendarSelectionMode = 'single'>
|
|
57
57
|
extends
|
|
@@ -14,18 +14,18 @@
|
|
|
14
14
|
|
|
15
15
|
import { alignCenter, constrainValue, isInvalid, previousAvailableDate } from './utils';
|
|
16
16
|
import {
|
|
17
|
-
Calendar,
|
|
17
|
+
type Calendar,
|
|
18
18
|
CalendarDate,
|
|
19
|
-
CalendarIdentifier,
|
|
20
|
-
DateDuration,
|
|
19
|
+
type CalendarIdentifier,
|
|
20
|
+
type DateDuration,
|
|
21
21
|
GregorianCalendar,
|
|
22
22
|
maxDate,
|
|
23
23
|
minDate,
|
|
24
24
|
toCalendar,
|
|
25
25
|
toCalendarDate,
|
|
26
26
|
} from '@internationalized/date';
|
|
27
|
-
import { CalendarPropsBase, DateValue, MappedDateValue, RangeCalendarState } from './types';
|
|
28
|
-
import { RangeValue, ValidationState, ValueBase } from '@react-types/shared';
|
|
27
|
+
import type { CalendarPropsBase, DateValue, MappedDateValue, RangeCalendarState } from './types';
|
|
28
|
+
import type { RangeValue, ValidationState, ValueBase } from '@react-types/shared';
|
|
29
29
|
import { useCalendarState } from './useCalendarState';
|
|
30
30
|
import { useCallback, useMemo, useState } from '../../compat/react';
|
|
31
31
|
import { useControlledState } from '../utils/useControlledState';
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
*/
|
|
14
14
|
import {
|
|
15
15
|
CalendarDate,
|
|
16
|
-
DateDuration,
|
|
16
|
+
type DateDuration,
|
|
17
17
|
maxDate,
|
|
18
18
|
minDate,
|
|
19
19
|
startOfMonth,
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
startOfYear,
|
|
22
22
|
toCalendarDate,
|
|
23
23
|
} from '@internationalized/date';
|
|
24
|
-
import { DateValue } from './types';
|
|
24
|
+
import type { DateValue } from './types';
|
|
25
25
|
|
|
26
26
|
export function isInvalid(
|
|
27
27
|
date: DateValue,
|
|
@@ -14,11 +14,11 @@
|
|
|
14
14
|
|
|
15
15
|
import { clamp, snapValueToStep } from '../utils/number';
|
|
16
16
|
|
|
17
|
-
import { Color, ColorChannel, ColorSpace } from './types';
|
|
17
|
+
import type { Color, ColorChannel, ColorSpace } from './types';
|
|
18
18
|
import { normalizeColor, parseColor } from './Color';
|
|
19
19
|
import { useControlledState } from '../utils/useControlledState';
|
|
20
20
|
import { useMemo, useRef, useState } from '../../compat/react';
|
|
21
|
-
import { ValueBase } from '@react-types/shared';
|
|
21
|
+
import type { ValueBase } from '@react-types/shared';
|
|
22
22
|
|
|
23
23
|
export interface ColorAreaProps extends Omit<ValueBase<string | Color>, 'onChange'> {
|
|
24
24
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/** @jsxImportSource octane */
|
|
2
2
|
// Ported from adobe/react-spectrum@1c84a49a1faf50b571c84e00bcf9c60b22ddd03e (packages/react-stately/src/color/useColorChannelFieldState.ts).
|
|
3
|
-
import { Color, ColorChannel, ColorSpace } from './types';
|
|
4
|
-
import { ColorFieldProps } from './useColorFieldState';
|
|
5
|
-
import { NumberFieldState, useNumberFieldState } from '../numberfield/useNumberFieldState';
|
|
3
|
+
import type { Color, ColorChannel, ColorSpace } from './types';
|
|
4
|
+
import type { ColorFieldProps } from './useColorFieldState';
|
|
5
|
+
import { type NumberFieldState, useNumberFieldState } from '../numberfield/useNumberFieldState';
|
|
6
6
|
import { useColor } from './useColor';
|
|
7
7
|
import { useControlledState } from '../utils/useControlledState';
|
|
8
8
|
import { useMemo, useState } from '../../compat/react';
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
* governing permissions and limitations under the License.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import { Color } from './types';
|
|
16
|
-
import {
|
|
15
|
+
import type { Color } from './types';
|
|
16
|
+
import type {
|
|
17
17
|
FocusableProps,
|
|
18
18
|
HelpTextProps,
|
|
19
19
|
InputBase,
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
Validation,
|
|
23
23
|
ValueBase,
|
|
24
24
|
} from '@react-types/shared';
|
|
25
|
-
import { FormValidationState, useFormValidationState } from '../form/useFormValidationState';
|
|
25
|
+
import { type FormValidationState, useFormValidationState } from '../form/useFormValidationState';
|
|
26
26
|
import { parseColor } from './Color';
|
|
27
27
|
import { useColor } from './useColor';
|
|
28
28
|
import { useControlledState } from '../utils/useControlledState';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/** @jsxImportSource octane */
|
|
2
2
|
// Ported from adobe/react-spectrum@1c84a49a1faf50b571c84e00bcf9c60b22ddd03e (packages/react-stately/src/color/useColorPickerState.ts).
|
|
3
|
-
import { Color } from './types';
|
|
3
|
+
import type { Color } from './types';
|
|
4
4
|
import { parseColor } from './Color';
|
|
5
5
|
import { useColor } from './useColor';
|
|
6
6
|
import { useControlledState } from '../utils/useControlledState';
|
|
7
|
-
import { ValueBase } from '@react-types/shared';
|
|
7
|
+
import type { ValueBase } from '@react-types/shared';
|
|
8
8
|
|
|
9
9
|
export interface ColorPickerProps extends ValueBase<string | Color, Color> {}
|
|
10
10
|
|
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
* governing permissions and limitations under the License.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import { Color, ColorChannel, ColorSpace } from './types';
|
|
15
|
+
import type { Color, ColorChannel, ColorSpace } from './types';
|
|
16
16
|
import { normalizeColor, parseColor } from './Color';
|
|
17
|
-
import { SliderProps, SliderState, useSliderState } from '../slider/useSliderState';
|
|
17
|
+
import { type SliderProps, type SliderState, useSliderState } from '../slider/useSliderState';
|
|
18
18
|
import { useControlledState } from '../utils/useControlledState';
|
|
19
19
|
import { useMemo, useState } from '../../compat/react';
|
|
20
20
|
|
|
@@ -12,11 +12,11 @@
|
|
|
12
12
|
* governing permissions and limitations under the License.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import { Color } from './types';
|
|
15
|
+
import type { Color } from './types';
|
|
16
16
|
import { normalizeColor, parseColor } from './Color';
|
|
17
17
|
import { useControlledState } from '../utils/useControlledState';
|
|
18
18
|
import { useMemo, useRef, useState } from '../../compat/react';
|
|
19
|
-
import { ValueBase } from '@react-types/shared';
|
|
19
|
+
import type { ValueBase } from '@react-types/shared';
|
|
20
20
|
|
|
21
21
|
export interface ColorWheelProps extends Omit<ValueBase<string | Color>, 'onChange'> {
|
|
22
22
|
/** Whether the ColorWheel is disabled. */
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
* governing permissions and limitations under the License.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import { createListActions, ListData, ListState } from './useListData';
|
|
16
|
-
import { Key, LoadingState, Selection, SortDescriptor } from '@react-types/shared';
|
|
15
|
+
import { createListActions, type ListData, type ListState } from './useListData';
|
|
16
|
+
import type { Key, LoadingState, Selection, SortDescriptor } from '@react-types/shared';
|
|
17
17
|
import { useEffect, useReducer, useRef } from '../../compat/react';
|
|
18
18
|
|
|
19
19
|
export interface AsyncListOptions<T, C> {
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* governing permissions and limitations under the License.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import { Key, Selection } from '@react-types/shared';
|
|
15
|
+
import type { Key, Selection } from '@react-types/shared';
|
|
16
16
|
import { useMemo, useState } from '../../compat/react';
|
|
17
17
|
|
|
18
18
|
export interface ListOptions<T> {
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* governing permissions and limitations under the License.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import { Key } from '@react-types/shared';
|
|
15
|
+
import type { Key } from '@react-types/shared';
|
|
16
16
|
import { useState } from '../../compat/react';
|
|
17
17
|
|
|
18
18
|
export interface TreeOptions<T extends object> {
|
|
@@ -12,9 +12,14 @@
|
|
|
12
12
|
* governing permissions and limitations under the License.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import {
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
import {
|
|
16
|
+
type AnyDateTime,
|
|
17
|
+
type Calendar,
|
|
18
|
+
CalendarDate,
|
|
19
|
+
ZonedDateTime,
|
|
20
|
+
} from '@internationalized/date';
|
|
21
|
+
import type { DateSegmentType } from './useDateFieldState';
|
|
22
|
+
import type { DateValue } from './types';
|
|
18
23
|
|
|
19
24
|
type HourCycle = 'h12' | 'h11' | 'h23' | 'h24';
|
|
20
25
|
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { CalendarDate, CalendarDateTime, Time, ZonedDateTime } from '@internationalized/date';
|
|
16
|
-
import {
|
|
16
|
+
import type {
|
|
17
17
|
FocusableProps,
|
|
18
18
|
HelpTextProps,
|
|
19
19
|
InputBase,
|
|
@@ -22,8 +22,8 @@ import {
|
|
|
22
22
|
Validation,
|
|
23
23
|
ValueBase,
|
|
24
24
|
} from '@react-types/shared';
|
|
25
|
-
import { OverlayTriggerProps } from '../overlays/useOverlayTriggerState';
|
|
26
|
-
import { PageBehavior } from '../calendar/types';
|
|
25
|
+
import type { OverlayTriggerProps } from '../overlays/useOverlayTriggerState';
|
|
26
|
+
import type { PageBehavior } from '../calendar/types';
|
|
27
27
|
|
|
28
28
|
export type DateValue = CalendarDate | CalendarDateTime | ZonedDateTime;
|
|
29
29
|
export type DateRange = RangeValue<DateValue>;
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import {
|
|
16
|
-
Calendar,
|
|
17
|
-
CalendarIdentifier,
|
|
16
|
+
type Calendar,
|
|
17
|
+
type CalendarIdentifier,
|
|
18
18
|
DateFormatter,
|
|
19
19
|
GregorianCalendar,
|
|
20
20
|
isEqualCalendar,
|
|
@@ -23,20 +23,20 @@ import {
|
|
|
23
23
|
import {
|
|
24
24
|
convertValue,
|
|
25
25
|
createPlaceholderDate,
|
|
26
|
-
FieldOptions,
|
|
27
|
-
FormatterOptions,
|
|
26
|
+
type FieldOptions,
|
|
27
|
+
type FormatterOptions,
|
|
28
28
|
getFormatOptions,
|
|
29
29
|
getValidationResult,
|
|
30
30
|
useDefaultProps,
|
|
31
31
|
} from './utils';
|
|
32
|
-
import { DatePickerProps, DateValue, Granularity, MappedDateValue } from './types';
|
|
33
|
-
import { FormValidationState, useFormValidationState } from '../form/useFormValidationState';
|
|
32
|
+
import type { DatePickerProps, DateValue, Granularity, MappedDateValue } from './types';
|
|
33
|
+
import { type FormValidationState, useFormValidationState } from '../form/useFormValidationState';
|
|
34
34
|
import { getPlaceholder } from './placeholders';
|
|
35
35
|
import { IncompleteDate } from './IncompleteDate';
|
|
36
36
|
import { NumberFormatter } from '@internationalized/number';
|
|
37
37
|
import { useControlledState } from '../utils/useControlledState';
|
|
38
38
|
import { useMemo, useState } from '../../compat/react';
|
|
39
|
-
import { ValidationState } from '@react-types/shared';
|
|
39
|
+
import type { ValidationState } from '@react-types/shared';
|
|
40
40
|
|
|
41
41
|
export type DateSegmentType =
|
|
42
42
|
| 'era'
|
|
@@ -18,20 +18,23 @@ import {
|
|
|
18
18
|
toCalendarDate,
|
|
19
19
|
toCalendarDateTime,
|
|
20
20
|
} from '@internationalized/date';
|
|
21
|
-
import { DatePickerProps, DateValue, Granularity, MappedDateValue, TimeValue } from './types';
|
|
21
|
+
import type { DatePickerProps, DateValue, Granularity, MappedDateValue, TimeValue } from './types';
|
|
22
22
|
import {
|
|
23
|
-
FieldOptions,
|
|
24
|
-
FormatterOptions,
|
|
23
|
+
type FieldOptions,
|
|
24
|
+
type FormatterOptions,
|
|
25
25
|
getFormatOptions,
|
|
26
26
|
getPlaceholderTime,
|
|
27
27
|
getValidationResult,
|
|
28
28
|
useDefaultProps,
|
|
29
29
|
} from './utils';
|
|
30
|
-
import { FormValidationState, useFormValidationState } from '../form/useFormValidationState';
|
|
31
|
-
import {
|
|
30
|
+
import { type FormValidationState, useFormValidationState } from '../form/useFormValidationState';
|
|
31
|
+
import {
|
|
32
|
+
type OverlayTriggerState,
|
|
33
|
+
useOverlayTriggerState,
|
|
34
|
+
} from '../overlays/useOverlayTriggerState';
|
|
32
35
|
import { useControlledState } from '../utils/useControlledState';
|
|
33
36
|
import { useMemo, useState } from '../../compat/react';
|
|
34
|
-
import { ValidationState } from '@react-types/shared';
|
|
37
|
+
import type { ValidationState } from '@react-types/shared';
|
|
35
38
|
|
|
36
39
|
export interface DatePickerStateOptions<T extends DateValue> extends DatePickerProps<T> {
|
|
37
40
|
/**
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { DateFormatter, toCalendarDate, toCalendarDateTime } from '@internationalized/date';
|
|
16
|
-
import {
|
|
16
|
+
import type {
|
|
17
17
|
DateRange,
|
|
18
18
|
DateRangePickerProps,
|
|
19
19
|
DateValue,
|
|
@@ -22,16 +22,19 @@ import {
|
|
|
22
22
|
TimeValue,
|
|
23
23
|
} from './types';
|
|
24
24
|
import {
|
|
25
|
-
FieldOptions,
|
|
26
|
-
FormatterOptions,
|
|
25
|
+
type FieldOptions,
|
|
26
|
+
type FormatterOptions,
|
|
27
27
|
getFormatOptions,
|
|
28
28
|
getPlaceholderTime,
|
|
29
29
|
getRangeValidationResult,
|
|
30
30
|
useDefaultProps,
|
|
31
31
|
} from './utils';
|
|
32
|
-
import { FormValidationState, useFormValidationState } from '../form/useFormValidationState';
|
|
33
|
-
import {
|
|
34
|
-
|
|
32
|
+
import { type FormValidationState, useFormValidationState } from '../form/useFormValidationState';
|
|
33
|
+
import {
|
|
34
|
+
type OverlayTriggerState,
|
|
35
|
+
useOverlayTriggerState,
|
|
36
|
+
} from '../overlays/useOverlayTriggerState';
|
|
37
|
+
import type { RangeValue, ValidationState } from '@react-types/shared';
|
|
35
38
|
import { useControlledState } from '../utils/useControlledState';
|
|
36
39
|
import { useMemo, useState } from '../../compat/react';
|
|
37
40
|
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
* governing permissions and limitations under the License.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import { DateFieldState, useDateFieldState } from './useDateFieldState';
|
|
16
|
-
import { DateValue, MappedTimeValue, TimePickerProps, TimeValue } from './types';
|
|
15
|
+
import { type DateFieldState, useDateFieldState } from './useDateFieldState';
|
|
16
|
+
import type { DateValue, MappedTimeValue, TimePickerProps, TimeValue } from './types';
|
|
17
17
|
import {
|
|
18
18
|
getLocalTimeZone,
|
|
19
19
|
GregorianCalendar,
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import {
|
|
16
|
-
Calendar,
|
|
16
|
+
type Calendar,
|
|
17
17
|
DateFormatter,
|
|
18
18
|
getLocalTimeZone,
|
|
19
19
|
now,
|
|
@@ -22,11 +22,11 @@ import {
|
|
|
22
22
|
toCalendarDate,
|
|
23
23
|
toCalendarDateTime,
|
|
24
24
|
} from '@internationalized/date';
|
|
25
|
-
import { DatePickerProps, DateValue, Granularity, TimeValue } from './types';
|
|
25
|
+
import type { DatePickerProps, DateValue, Granularity, TimeValue } from './types';
|
|
26
26
|
import i18nMessages from '../../intl/datepicker/index';
|
|
27
27
|
import { LocalizedStringDictionary, LocalizedStringFormatter } from '@internationalized/string';
|
|
28
28
|
import { mergeValidation, VALID_VALIDITY_STATE } from '../form/useFormValidationState';
|
|
29
|
-
import { RangeValue, ValidationResult } from '@react-types/shared';
|
|
29
|
+
import type { RangeValue, ValidationResult } from '@react-types/shared';
|
|
30
30
|
import { useState } from '../../compat/react';
|
|
31
31
|
|
|
32
32
|
const dictionary = new LocalizedStringDictionary(i18nMessages);
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* governing permissions and limitations under the License.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import {
|
|
15
|
+
import type {
|
|
16
16
|
Collection,
|
|
17
17
|
DraggableCollectionEndEvent,
|
|
18
18
|
DraggableCollectionProps,
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
Node,
|
|
26
26
|
RefObject,
|
|
27
27
|
} from '@react-types/shared';
|
|
28
|
-
import { MultipleSelectionManager } from '../selection/types';
|
|
28
|
+
import type { MultipleSelectionManager } from '../selection/types';
|
|
29
29
|
import { useRef, useState } from '../../compat/react';
|
|
30
30
|
|
|
31
31
|
export interface DraggableCollectionStateOptions<T = object> extends DraggableCollectionProps<T> {
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* governing permissions and limitations under the License.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import {
|
|
15
|
+
import type {
|
|
16
16
|
Collection,
|
|
17
17
|
DragTypes,
|
|
18
18
|
DropOperation,
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
Key,
|
|
23
23
|
Node,
|
|
24
24
|
} from '@react-types/shared';
|
|
25
|
-
import { MultipleSelectionManager } from '../selection/types';
|
|
25
|
+
import type { MultipleSelectionManager } from '../selection/types';
|
|
26
26
|
import { useCallback, useRef, useState } from '../../compat/react';
|
|
27
27
|
|
|
28
28
|
interface DropOperationEvent {
|
|
@@ -12,8 +12,14 @@
|
|
|
12
12
|
* governing permissions and limitations under the License.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import {
|
|
16
|
-
|
|
15
|
+
import type {
|
|
16
|
+
DropTarget,
|
|
17
|
+
DropTargetDelegate,
|
|
18
|
+
ItemDropTarget,
|
|
19
|
+
Key,
|
|
20
|
+
Node,
|
|
21
|
+
} from '@react-types/shared';
|
|
22
|
+
import type { InvalidationContext } from '../virtualizer/types';
|
|
17
23
|
import { Layout } from '../virtualizer/Layout';
|
|
18
24
|
import { LayoutInfo } from '../virtualizer/LayoutInfo';
|
|
19
25
|
import { Rect } from '../virtualizer/Rect';
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* governing permissions and limitations under the License.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import {
|
|
15
|
+
import type {
|
|
16
16
|
Collection,
|
|
17
17
|
DropTarget,
|
|
18
18
|
DropTargetDelegate,
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
Orientation,
|
|
23
23
|
} from '@react-types/shared';
|
|
24
24
|
import { getChildNodes } from '../collections/getChildNodes';
|
|
25
|
-
import { InvalidationContext } from '../virtualizer/types';
|
|
25
|
+
import type { InvalidationContext } from '../virtualizer/types';
|
|
26
26
|
import { Layout } from '../virtualizer/Layout';
|
|
27
27
|
import { LayoutInfo } from '../virtualizer/LayoutInfo';
|
|
28
28
|
import { Rect } from '../virtualizer/Rect';
|
|
@@ -12,16 +12,16 @@
|
|
|
12
12
|
* governing permissions and limitations under the License.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import { DropTarget, ItemDropTarget, Key } from '@react-types/shared';
|
|
15
|
+
import type { DropTarget, ItemDropTarget, Key } from '@react-types/shared';
|
|
16
16
|
import { getChildNodes } from '../collections/getChildNodes';
|
|
17
|
-
import { GridNode } from '../grid/GridCollection';
|
|
18
|
-
import { InvalidationContext } from '../virtualizer/types';
|
|
17
|
+
import type { GridNode } from '../grid/GridCollection';
|
|
18
|
+
import type { InvalidationContext } from '../virtualizer/types';
|
|
19
19
|
import { LayoutInfo } from '../virtualizer/LayoutInfo';
|
|
20
|
-
import { LayoutNode, ListLayout, ListLayoutOptions } from './ListLayout';
|
|
20
|
+
import { type LayoutNode, ListLayout, type ListLayoutOptions } from './ListLayout';
|
|
21
21
|
import { Point } from '../virtualizer/Point';
|
|
22
22
|
import { Rect } from '../virtualizer/Rect';
|
|
23
23
|
import { Size } from '../virtualizer/Size';
|
|
24
|
-
import { ITableCollection as TableCollection } from '../table/TableCollection';
|
|
24
|
+
import type { ITableCollection as TableCollection } from '../table/TableCollection';
|
|
25
25
|
import { TableColumnLayout } from '../table/TableColumnLayout';
|
|
26
26
|
|
|
27
27
|
export interface TableLayoutProps extends Omit<
|
|
@@ -12,8 +12,14 @@
|
|
|
12
12
|
* governing permissions and limitations under the License.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import {
|
|
16
|
-
|
|
15
|
+
import type {
|
|
16
|
+
DropTarget,
|
|
17
|
+
DropTargetDelegate,
|
|
18
|
+
Key,
|
|
19
|
+
LayoutDelegate,
|
|
20
|
+
Node,
|
|
21
|
+
} from '@react-types/shared';
|
|
22
|
+
import type { InvalidationContext } from '../virtualizer/types';
|
|
17
23
|
import { Layout } from '../virtualizer/Layout';
|
|
18
24
|
import { LayoutInfo } from '../virtualizer/LayoutInfo';
|
|
19
25
|
import { Point } from '../virtualizer/Point';
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
import { TokenFieldValue } from './TokenFieldValue';
|
|
16
16
|
import { useControlledState } from '../utils/useControlledState';
|
|
17
17
|
import { useState } from '../../compat/react';
|
|
18
|
-
import { ValueBase } from '@react-types/shared';
|
|
18
|
+
import type { ValueBase } from '@react-types/shared';
|
|
19
19
|
|
|
20
20
|
export interface TokenFieldProps<
|
|
21
21
|
T extends TokenFieldValue = TokenFieldValue,
|
|
@@ -13,8 +13,8 @@ import type { ScrollAnchorInfo } from './ScrollAnchor';
|
|
|
13
13
|
* governing permissions and limitations under the License.
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
-
import { InvalidationContext } from './types';
|
|
17
|
-
import { ItemDropTarget, Key, LayoutDelegate, Node } from '@react-types/shared';
|
|
16
|
+
import type { InvalidationContext } from './types';
|
|
17
|
+
import type { ItemDropTarget, Key, LayoutDelegate, Node } from '@react-types/shared';
|
|
18
18
|
import { LayoutInfo } from './LayoutInfo';
|
|
19
19
|
import { Rect } from './Rect';
|
|
20
20
|
import { Size } from './Size';
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* governing permissions and limitations under the License.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import { Key } from '@react-types/shared';
|
|
15
|
+
import type { Key } from '@react-types/shared';
|
|
16
16
|
import { LayoutInfo } from './LayoutInfo';
|
|
17
17
|
import { Virtualizer } from './Virtualizer';
|
|
18
18
|
|
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
* governing permissions and limitations under the License.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import { Key } from '@react-types/shared';
|
|
15
|
+
import type { Key } from '@react-types/shared';
|
|
16
16
|
import { LayoutInfo } from './LayoutInfo';
|
|
17
|
-
import { Rect, RectCorner } from './Rect';
|
|
17
|
+
import { Rect, type RectCorner } from './Rect';
|
|
18
18
|
import { Size } from './Size';
|
|
19
19
|
|
|
20
20
|
export type ScrollAnchorAxis = 'x' | 'y';
|
|
@@ -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';
|