@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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@octanejs/aria",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.50",
|
|
4
4
|
"license": "MIT AND Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": [
|
|
@@ -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.3.
|
|
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
|
|
package/src/calendar/utils.tsx
CHANGED
|
@@ -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';
|
|
@@ -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, {
|
|
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,
|
|
@@ -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';
|
|
@@ -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
|
/**
|
|
@@ -13,44 +13,44 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import {
|
|
16
|
-
AriaColorFieldProps,
|
|
16
|
+
type AriaColorFieldProps,
|
|
17
17
|
useColorChannelField,
|
|
18
18
|
useColorField,
|
|
19
19
|
} from '../upstream-exports/react-aria/useColorField';
|
|
20
20
|
|
|
21
21
|
import {
|
|
22
|
-
ClassNameOrFunction,
|
|
23
|
-
ContextValue,
|
|
22
|
+
type ClassNameOrFunction,
|
|
23
|
+
type ContextValue,
|
|
24
24
|
dom,
|
|
25
25
|
Provider,
|
|
26
|
-
RACValidation,
|
|
26
|
+
type RACValidation,
|
|
27
27
|
removeDataAttributes,
|
|
28
|
-
RenderProps,
|
|
29
|
-
SlotProps,
|
|
28
|
+
type RenderProps,
|
|
29
|
+
type SlotProps,
|
|
30
30
|
useContextProps,
|
|
31
31
|
useRenderProps,
|
|
32
32
|
useSlot,
|
|
33
33
|
} from './utils';
|
|
34
|
-
import { ColorChannel, ColorSpace } from '../upstream-exports/react-stately/Color';
|
|
34
|
+
import type { ColorChannel, ColorSpace } from '../upstream-exports/react-stately/Color';
|
|
35
35
|
import {
|
|
36
|
-
ColorFieldState,
|
|
36
|
+
type ColorFieldState,
|
|
37
37
|
useColorChannelFieldState,
|
|
38
38
|
useColorFieldState,
|
|
39
39
|
} from '../upstream-exports/react-stately/useColorFieldState';
|
|
40
40
|
import { FieldErrorContext } from './FieldError';
|
|
41
41
|
import { filterDOMProps } from '../upstream-exports/react-aria/filterDOMProps';
|
|
42
|
-
import { GlobalDOMAttributes, InputDOMProps, ValidationResult } from '@react-types/shared';
|
|
42
|
+
import type { GlobalDOMAttributes, InputDOMProps, ValidationResult } from '@react-types/shared';
|
|
43
43
|
import { GroupContext } from './Group';
|
|
44
44
|
import { InputContext } from './Input';
|
|
45
45
|
import { LabelContext } from './Label';
|
|
46
46
|
import React, {
|
|
47
47
|
createContext,
|
|
48
|
-
ForwardedRef,
|
|
48
|
+
type ForwardedRef,
|
|
49
49
|
forwardRef,
|
|
50
|
-
HTMLAttributes,
|
|
51
|
-
InputHTMLAttributes,
|
|
52
|
-
LabelHTMLAttributes,
|
|
53
|
-
Ref,
|
|
50
|
+
type HTMLAttributes,
|
|
51
|
+
type InputHTMLAttributes,
|
|
52
|
+
type LabelHTMLAttributes,
|
|
53
|
+
type Ref,
|
|
54
54
|
useRef,
|
|
55
55
|
} from '../compat/react';
|
|
56
56
|
import { TextContext } from './Text';
|
|
@@ -13,21 +13,21 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import {
|
|
16
|
-
ChildrenOrFunction,
|
|
16
|
+
type ChildrenOrFunction,
|
|
17
17
|
Provider,
|
|
18
|
-
SlotProps,
|
|
19
|
-
SlottedContextValue,
|
|
18
|
+
type SlotProps,
|
|
19
|
+
type SlottedContextValue,
|
|
20
20
|
useRenderProps,
|
|
21
21
|
useSlottedContext,
|
|
22
22
|
} from './utils';
|
|
23
|
-
import { Color } from '../upstream-exports/react-stately/Color';
|
|
23
|
+
import type { Color } from '../upstream-exports/react-stately/Color';
|
|
24
24
|
|
|
25
25
|
import { ColorAreaContext } from './ColorArea';
|
|
26
26
|
|
|
27
27
|
import { ColorFieldContext } from './ColorField';
|
|
28
28
|
import {
|
|
29
|
-
ColorPickerState,
|
|
30
|
-
ColorPickerProps as StatelyColorPickerProps,
|
|
29
|
+
type ColorPickerState,
|
|
30
|
+
type ColorPickerProps as StatelyColorPickerProps,
|
|
31
31
|
useColorPickerState,
|
|
32
32
|
} from '../upstream-exports/react-stately/useColorPickerState';
|
|
33
33
|
import { ColorSliderContext } from './ColorSlider';
|
|
@@ -35,7 +35,7 @@ import { ColorSwatchContext } from './ColorSwatch';
|
|
|
35
35
|
import { ColorSwatchPickerContext } from './ColorSwatchPicker';
|
|
36
36
|
import { ColorWheelContext } from './ColorWheel';
|
|
37
37
|
import { mergeProps } from '../upstream-exports/react-aria/mergeProps';
|
|
38
|
-
import React, { createContext, JSX } from '../compat/react';
|
|
38
|
+
import React, { createContext, type JSX } from '../compat/react';
|
|
39
39
|
|
|
40
40
|
export interface ColorPickerRenderProps {
|
|
41
41
|
/** The currently selected color. */
|
|
@@ -2,30 +2,30 @@
|
|
|
2
2
|
// Ported from adobe/react-spectrum@1c84a49a1faf50b571c84e00bcf9c60b22ddd03e (packages/react-aria-components/src/ColorSlider.tsx).
|
|
3
3
|
import { useRef } from 'octane';
|
|
4
4
|
import {
|
|
5
|
-
AriaColorSliderProps,
|
|
5
|
+
type AriaColorSliderProps,
|
|
6
6
|
useColorSlider,
|
|
7
7
|
} from '../upstream-exports/react-aria/useColorSlider';
|
|
8
8
|
import {
|
|
9
|
-
ClassNameOrFunction,
|
|
10
|
-
ContextValue,
|
|
9
|
+
type ClassNameOrFunction,
|
|
10
|
+
type ContextValue,
|
|
11
11
|
dom,
|
|
12
12
|
Provider,
|
|
13
|
-
RenderProps,
|
|
14
|
-
SlotProps,
|
|
13
|
+
type RenderProps,
|
|
14
|
+
type SlotProps,
|
|
15
15
|
useContextProps,
|
|
16
16
|
useRenderProps,
|
|
17
17
|
useSlot,
|
|
18
18
|
} from './utils';
|
|
19
19
|
import {
|
|
20
|
-
ColorSliderState,
|
|
20
|
+
type ColorSliderState,
|
|
21
21
|
useColorSliderState,
|
|
22
22
|
} from '../upstream-exports/react-stately/useColorSliderState';
|
|
23
23
|
import { filterDOMProps } from '../upstream-exports/react-aria/filterDOMProps';
|
|
24
|
-
import { GlobalDOMAttributes } from '@react-types/shared';
|
|
24
|
+
import type { GlobalDOMAttributes } from '@react-types/shared';
|
|
25
25
|
import { InternalColorThumbContext } from './ColorThumb';
|
|
26
26
|
import { LabelContext } from './Label';
|
|
27
|
-
import { Orientation } from '@react-types/shared';
|
|
28
|
-
import React, { createContext, ForwardedRef, forwardRef } from '../compat/react';
|
|
27
|
+
import type { Orientation } from '@react-types/shared';
|
|
28
|
+
import React, { createContext, type ForwardedRef, forwardRef } from '../compat/react';
|
|
29
29
|
import { SliderOutputContext, SliderStateContext, SliderTrackContext } from './Slider';
|
|
30
30
|
import { useLocale } from '../upstream-exports/react-aria/I18nProvider';
|
|
31
31
|
|