@octanejs/aria 0.0.56 → 0.0.57
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/collections/BaseCollection.ts +1 -1
- package/src/collections/CollectionBuilder.ts +2 -2
- package/src/collections/Document.ts +1 -1
- package/src/collections/Hidden.ts +1 -1
- package/src/color/useColorWheel.tsx +1 -6
- package/src/compat/react.ts +4 -4
- package/src/components/Calendar.tsx +0 -1
- package/src/components/ColorArea.tsx +1 -1
- package/src/components/ColorField.tsx +1 -1
- package/src/components/ColorPicker.tsx +1 -1
- package/src/components/ColorSlider.tsx +1 -1
- package/src/components/ColorSwatch.tsx +1 -1
- package/src/components/ColorSwatchPicker.tsx +1 -1
- package/src/components/ColorThumb.tsx +1 -1
- package/src/components/ColorWheel.tsx +1 -1
- package/src/components/DateField.tsx +2 -2
- package/src/components/DatePicker.tsx +2 -2
- package/src/components/DragAndDrop.ts +1 -1
- package/src/components/DropZone.tsx +1 -1
- package/src/components/HiddenDateInput.tsx +0 -1
- package/src/components/Modal.ts +1 -1
- package/src/components/PreviewTrigger.tsx +1 -1
- package/src/components/Toast.tsx +2 -2
- package/src/components/TokenField.tsx +1 -1
- package/src/components/Virtualizer.tsx +1 -1
- package/src/components/utils.ts +3 -3
- package/src/dnd/useDraggableCollection.tsx +1 -1
- package/src/dnd/useDroppableCollection.tsx +1 -1
- package/src/interactions/useFocus.ts +2 -2
- package/src/interactions/useHover.ts +1 -1
- package/src/overlays/calculatePosition.ts +4 -4
- package/src/radio/useRadio.ts +1 -11
- package/src/slider/useSliderThumb.tsx +0 -1
- package/src/stately/collections/CollectionBuilder.ts +2 -2
- package/src/stately/collections/Item.ts +1 -1
- package/src/stately/collections/Section.ts +1 -1
- package/src/stately/layout/TableLayout.tsx +1 -1
- package/src/stately/table/Cell.ts +1 -1
- package/src/stately/table/Column.ts +2 -2
- package/src/stately/table/Row.ts +2 -2
- package/src/stately/table/TableBody.ts +1 -1
- package/src/stately/table/TableCollection.ts +1 -1
- package/src/stately/table/TableHeader.ts +1 -1
- package/src/stately/table/useTableState.ts +1 -1
- package/src/stately/virtualizer/Layout.tsx +1 -1
- package/src/toast/useToast.tsx +1 -1
- package/src/utils/openLink.ts +1 -1
- package/src/virtualizer/VirtualizerItem.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.57",
|
|
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.9.
|
|
68
|
+
"octane": "0.9.1"
|
|
69
69
|
},
|
|
70
70
|
"scripts": {
|
|
71
71
|
"exports:check": "node scripts/check-react-aria-components-exports.mjs",
|
|
@@ -65,7 +65,7 @@ export class CollectionNode<T> implements Node<T> {
|
|
|
65
65
|
collection: BaseCollection<T>,
|
|
66
66
|
newCollection: BaseCollection<T>,
|
|
67
67
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
68
|
-
|
|
68
|
+
_filterFn: FilterFn<T>,
|
|
69
69
|
): CollectionNode<T> | null {
|
|
70
70
|
let clone = this.clone();
|
|
71
71
|
newCollection.addDescendants(clone, collection);
|
|
@@ -215,7 +215,7 @@ function useSSRCollectionNode<T extends Element>(
|
|
|
215
215
|
return createElement(NodeClass.type, { ref: itemRef, children });
|
|
216
216
|
}
|
|
217
217
|
|
|
218
|
-
export function createLeafComponent<T, P extends object,
|
|
218
|
+
export function createLeafComponent<T, P extends object, _E extends Element>(
|
|
219
219
|
CollectionNodeClass: CollectionNodeClass<any> | string,
|
|
220
220
|
render: (props: P, ref: any, node?: Node<T>) => any,
|
|
221
221
|
): (props: P & { ref?: any }) => any {
|
|
@@ -250,7 +250,7 @@ export function createLeafComponent<T, P extends object, E extends Element>(
|
|
|
250
250
|
return Result;
|
|
251
251
|
}
|
|
252
252
|
|
|
253
|
-
export function createBranchComponent<T, P extends { children?: any },
|
|
253
|
+
export function createBranchComponent<T, P extends { children?: any }, _E extends Element>(
|
|
254
254
|
CollectionNodeClass: CollectionNodeClass<any> | string,
|
|
255
255
|
render: (props: P, ref: any, node: Node<T>) => any,
|
|
256
256
|
useChildren: (props: P, slot?: symbol) => any = useCollectionChildren,
|
|
@@ -62,7 +62,7 @@ export function Hidden(props: { children: any; target?: Element | null }): any {
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
/** Creates a component that returns null if it is in a hidden subtree. */
|
|
65
|
-
export function createHideableComponent<
|
|
65
|
+
export function createHideableComponent<_T, P = {}>(
|
|
66
66
|
fn: (props: P, ref: any) => any,
|
|
67
67
|
): (props: P & { ref?: any }) => any {
|
|
68
68
|
// octane adaptation: no forwardRef — the ref arrives as a normal prop and is
|
|
@@ -26,12 +26,7 @@ import type {
|
|
|
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, {
|
|
30
|
-
type ChangeEvent,
|
|
31
|
-
type InputHTMLAttributes,
|
|
32
|
-
useCallback,
|
|
33
|
-
useRef,
|
|
34
|
-
} from '../compat/react';
|
|
29
|
+
import React, { type InputHTMLAttributes, useCallback, useRef } from '../compat/react';
|
|
35
30
|
import { useFormReset } from '../utils/useFormReset';
|
|
36
31
|
import { useGlobalListeners } from '../utils/useGlobalListeners';
|
|
37
32
|
import { useKeyboard } from '../interactions/useKeyboard';
|
package/src/compat/react.ts
CHANGED
|
@@ -29,10 +29,10 @@ export type MouseEvent<T = Element> = Omit<globalThis.MouseEvent, 'currentTarget
|
|
|
29
29
|
target: EventTarget & T;
|
|
30
30
|
nativeEvent: globalThis.MouseEvent;
|
|
31
31
|
};
|
|
32
|
-
export type HTMLAttributes<
|
|
33
|
-
export type InputHTMLAttributes<
|
|
34
|
-
export type LabelHTMLAttributes<
|
|
35
|
-
export type DOMAttributes<
|
|
32
|
+
export type HTMLAttributes<_T = HTMLElement> = Record<string, any>;
|
|
33
|
+
export type InputHTMLAttributes<_T = HTMLInputElement> = Record<string, any>;
|
|
34
|
+
export type LabelHTMLAttributes<_T = HTMLLabelElement> = Record<string, any>;
|
|
35
|
+
export type DOMAttributes<_T = Element> = Record<string, any>;
|
|
36
36
|
export type MutableRefObject<T> = { current: T };
|
|
37
37
|
export type RefObject<T> = { current: T };
|
|
38
38
|
export type Ref<T> = ForwardedRef<T>;
|
|
@@ -19,7 +19,7 @@ import { filterDOMProps } from '../upstream-exports/react-aria/filterDOMProps';
|
|
|
19
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
|
|
22
|
+
import { createContext, type ForwardedRef, forwardRef, useRef } from '../compat/react';
|
|
23
23
|
|
|
24
24
|
export interface ColorAreaRenderProps {
|
|
25
25
|
/**
|
|
@@ -43,7 +43,7 @@ import type { GlobalDOMAttributes, InputDOMProps, ValidationResult } from '@reac
|
|
|
43
43
|
import { GroupContext } from './Group';
|
|
44
44
|
import { InputContext } from './Input';
|
|
45
45
|
import { LabelContext } from './Label';
|
|
46
|
-
import
|
|
46
|
+
import {
|
|
47
47
|
createContext,
|
|
48
48
|
type ForwardedRef,
|
|
49
49
|
forwardRef,
|
|
@@ -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
|
|
38
|
+
import { createContext, type JSX } from '../compat/react';
|
|
39
39
|
|
|
40
40
|
export interface ColorPickerRenderProps {
|
|
41
41
|
/** The currently selected color. */
|
|
@@ -25,7 +25,7 @@ import type { GlobalDOMAttributes } from '@react-types/shared';
|
|
|
25
25
|
import { InternalColorThumbContext } from './ColorThumb';
|
|
26
26
|
import { LabelContext } from './Label';
|
|
27
27
|
import type { Orientation } from '@react-types/shared';
|
|
28
|
-
import
|
|
28
|
+
import { 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
|
|
|
@@ -17,7 +17,7 @@ import type { Color } from '../upstream-exports/react-stately/Color';
|
|
|
17
17
|
import { filterDOMProps } from '../upstream-exports/react-aria/filterDOMProps';
|
|
18
18
|
import type { GlobalDOMAttributes } from '@react-types/shared';
|
|
19
19
|
import { mergeProps } from '../upstream-exports/react-aria/mergeProps';
|
|
20
|
-
import
|
|
20
|
+
import { createContext, type ForwardedRef, forwardRef } from '../compat/react';
|
|
21
21
|
|
|
22
22
|
export interface ColorSwatchRenderProps {
|
|
23
23
|
/** The color of the swatch. */
|
|
@@ -5,7 +5,7 @@ import type { Color } from '../upstream-exports/react-stately/Color';
|
|
|
5
5
|
import { filterDOMProps } from '../upstream-exports/react-aria/filterDOMProps';
|
|
6
6
|
import type { GlobalDOMAttributes, HoverEvents, RefObject } from '@react-types/shared';
|
|
7
7
|
import { mergeProps } from '../upstream-exports/react-aria/mergeProps';
|
|
8
|
-
import
|
|
8
|
+
import {
|
|
9
9
|
createContext,
|
|
10
10
|
type ForwardedRef,
|
|
11
11
|
forwardRef,
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
import { filterDOMProps } from '../upstream-exports/react-aria/filterDOMProps';
|
|
23
23
|
import type { GlobalDOMAttributes } from '@react-types/shared';
|
|
24
24
|
import { InternalColorThumbContext } from './ColorThumb';
|
|
25
|
-
import
|
|
25
|
+
import {
|
|
26
26
|
createContext,
|
|
27
27
|
type ForwardedRef,
|
|
28
28
|
forwardRef,
|
|
@@ -43,14 +43,14 @@ import {
|
|
|
43
43
|
import { FieldErrorContext } from './FieldError';
|
|
44
44
|
import { filterDOMProps } from '../upstream-exports/react-aria/filterDOMProps';
|
|
45
45
|
import { FormContext } from './Form';
|
|
46
|
-
import type {
|
|
46
|
+
import type { GlobalDOMAttributes } from '@react-types/shared';
|
|
47
47
|
import { Group, GroupContext } from './Group';
|
|
48
48
|
import { HiddenDateInput } from './HiddenDateInput';
|
|
49
49
|
import type { HoverEvents } from '@react-types/shared';
|
|
50
50
|
import { Input, InputContext } from './Input';
|
|
51
51
|
import { LabelContext } from './Label';
|
|
52
52
|
import { mergeProps } from '../upstream-exports/react-aria/mergeProps';
|
|
53
|
-
import
|
|
53
|
+
import {
|
|
54
54
|
cloneElement,
|
|
55
55
|
createContext,
|
|
56
56
|
type ForwardedRef,
|
|
@@ -51,13 +51,13 @@ import { DialogContext, OverlayTriggerStateContext } from './Dialog';
|
|
|
51
51
|
import { FieldErrorContext } from './FieldError';
|
|
52
52
|
import { filterDOMProps } from '../upstream-exports/react-aria/filterDOMProps';
|
|
53
53
|
import { FormContext } from './Form';
|
|
54
|
-
import type {
|
|
54
|
+
import type { GlobalDOMAttributes } from '@react-types/shared';
|
|
55
55
|
import { GroupContext } from './Group';
|
|
56
56
|
import { HiddenDateInput } from './HiddenDateInput';
|
|
57
57
|
import { LabelContext } from './Label';
|
|
58
58
|
import { mergeProps } from '../upstream-exports/react-aria/mergeProps';
|
|
59
59
|
import { PopoverContext } from './Popover';
|
|
60
|
-
import
|
|
60
|
+
import { createContext, type ForwardedRef, forwardRef, useRef } from '../compat/react';
|
|
61
61
|
import { TextContext } from './Text';
|
|
62
62
|
import { useFocusRing } from '../upstream-exports/react-aria/useFocusRing';
|
|
63
63
|
|
|
@@ -25,7 +25,7 @@ import { S, splitSlot, subSlot } from '../internal';
|
|
|
25
25
|
|
|
26
26
|
// octane adaptations: structural aliases for the React types upstream drags along.
|
|
27
27
|
type ReactNode = any;
|
|
28
|
-
type ForwardedRef<
|
|
28
|
+
type ForwardedRef<_T> = any;
|
|
29
29
|
|
|
30
30
|
export interface DragAndDropContextValue {
|
|
31
31
|
dragAndDropHooks?: DragAndDropHooks;
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
import intlMessages from '../intl/react-aria-components/index';
|
|
34
34
|
import { isFocusable } from '../upstream-exports/react-aria/private/utils/isFocusable';
|
|
35
35
|
import { mergeProps } from '../upstream-exports/react-aria/mergeProps';
|
|
36
|
-
import
|
|
36
|
+
import { createContext, type ForwardedRef, forwardRef, useRef } from '../compat/react';
|
|
37
37
|
import { TextContext } from './Text';
|
|
38
38
|
import { useButton } from '../upstream-exports/react-aria/useButton';
|
|
39
39
|
import { useClipboard } from '../upstream-exports/react-aria/useClipboard';
|
|
@@ -26,7 +26,6 @@ import type {
|
|
|
26
26
|
DateSegmentType,
|
|
27
27
|
} from '../upstream-exports/react-stately/useDateFieldState';
|
|
28
28
|
import type { DatePickerState } from '../upstream-exports/react-stately/useDatePickerState';
|
|
29
|
-
import { getEventTarget } from '../upstream-exports/react-aria/private/utils/shadowdom/DOMFunctions';
|
|
30
29
|
import React, { type ReactNode } from '../compat/react';
|
|
31
30
|
import { useVisuallyHidden } from '../upstream-exports/react-aria/VisuallyHidden';
|
|
32
31
|
|
package/src/components/Modal.ts
CHANGED
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
type GlobalDOMAttributes = Record<string, any>;
|
|
42
42
|
type DOMAttributes = Record<string, any>;
|
|
43
43
|
type RefObject<T> = SharedRefObject<T>;
|
|
44
|
-
type ForwardedRef<
|
|
44
|
+
type ForwardedRef<_T> = any;
|
|
45
45
|
|
|
46
46
|
export interface ModalOverlayProps
|
|
47
47
|
extends
|
|
@@ -23,7 +23,7 @@ import type { OverlayTriggerState } from '../upstream-exports/react-stately/useO
|
|
|
23
23
|
import { OverlayTriggerStateContext } from './Dialog';
|
|
24
24
|
import { PopoverContext } from './Popover';
|
|
25
25
|
import { Provider } from './utils';
|
|
26
|
-
import
|
|
26
|
+
import { type JSX, useMemo, useRef } from '../compat/react';
|
|
27
27
|
import { useTooltipTriggerState } from '../upstream-exports/react-stately/useTooltipTriggerState';
|
|
28
28
|
|
|
29
29
|
export interface PreviewTriggerProps extends AriaPreviewTriggerProps {
|
package/src/components/Toast.tsx
CHANGED
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
} from './utils';
|
|
35
35
|
import { createPortal, isChildrenBlock } from 'octane';
|
|
36
36
|
import { filterDOMProps } from '../upstream-exports/react-aria/filterDOMProps';
|
|
37
|
-
import type {
|
|
37
|
+
import type { GlobalDOMAttributes } from '@react-types/shared';
|
|
38
38
|
import { mergeProps } from '../upstream-exports/react-aria/mergeProps';
|
|
39
39
|
import {
|
|
40
40
|
type QueuedToast,
|
|
@@ -42,7 +42,7 @@ import {
|
|
|
42
42
|
type ToastState,
|
|
43
43
|
useToastQueue,
|
|
44
44
|
} from '../upstream-exports/react-stately/useToastState';
|
|
45
|
-
import
|
|
45
|
+
import {
|
|
46
46
|
createContext,
|
|
47
47
|
type ForwardedRef,
|
|
48
48
|
forwardRef,
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
import { createHideableComponent } from '../collections/Hidden';
|
|
31
31
|
import { FieldInputContext } from './Autocomplete';
|
|
32
32
|
import { filterDOMProps } from '../upstream-exports/react-aria/filterDOMProps';
|
|
33
|
-
import type {
|
|
33
|
+
import type { GlobalDOMAttributes } from '@react-types/shared';
|
|
34
34
|
import { type HoverProps, useHover } from '../upstream-exports/react-aria/useHover';
|
|
35
35
|
import { LabelContext } from './Label';
|
|
36
36
|
import { mergeProps } from '../upstream-exports/react-aria/mergeProps';
|
package/src/components/utils.ts
CHANGED
|
@@ -351,7 +351,7 @@ export interface RACValidation {
|
|
|
351
351
|
validationBehavior?: 'native' | 'aria';
|
|
352
352
|
}
|
|
353
353
|
|
|
354
|
-
export type DOMRenderFunction<
|
|
354
|
+
export type DOMRenderFunction<_E extends string, T> = (
|
|
355
355
|
props: ElementProps,
|
|
356
356
|
renderProps: T,
|
|
357
357
|
) => ReactElement;
|
|
@@ -373,7 +373,7 @@ export interface DOMRenderProps<E extends string, T> {
|
|
|
373
373
|
}
|
|
374
374
|
|
|
375
375
|
// Same as DOMRenderProps but specific for the case where the element could be a 'a' or 'div' element.
|
|
376
|
-
export interface PossibleLinkDOMRenderProps<
|
|
376
|
+
export interface PossibleLinkDOMRenderProps<_Fallback extends string, T> {
|
|
377
377
|
/**
|
|
378
378
|
* Overrides the default DOM element with a custom render function.
|
|
379
379
|
* This allows rendering existing components with built-in styles and behaviors
|
|
@@ -438,7 +438,7 @@ const domComponentCache: Record<string, any> = {};
|
|
|
438
438
|
export const dom = new Proxy(
|
|
439
439
|
{},
|
|
440
440
|
{
|
|
441
|
-
get(
|
|
441
|
+
get(_target, elementType) {
|
|
442
442
|
if (typeof elementType !== 'string') {
|
|
443
443
|
return undefined;
|
|
444
444
|
}
|
|
@@ -23,7 +23,7 @@ export interface DraggableCollectionOptions {}
|
|
|
23
23
|
* touch based drag and drop, in addition to full parity for keyboard and screen reader users.
|
|
24
24
|
*/
|
|
25
25
|
export function useDraggableCollection(
|
|
26
|
-
|
|
26
|
+
_props: DraggableCollectionOptions,
|
|
27
27
|
state: DraggableCollectionState,
|
|
28
28
|
ref: RefObject<HTMLElement | null>,
|
|
29
29
|
): void {
|
|
@@ -500,7 +500,7 @@ export function useDroppableCollection(
|
|
|
500
500
|
let target = nextValidTarget(null, types, allowedOperations, getNextTarget);
|
|
501
501
|
return target ? 'move' : 'cancel';
|
|
502
502
|
},
|
|
503
|
-
onDropEnter(
|
|
503
|
+
onDropEnter(_e, drag) {
|
|
504
504
|
let types = getTypes(drag.items);
|
|
505
505
|
let selectionManager = localState.state.selectionManager;
|
|
506
506
|
let target: DropTarget | null = null;
|
|
@@ -20,7 +20,7 @@ import { useSyntheticBlurEvent } from './utils';
|
|
|
20
20
|
|
|
21
21
|
// octane adaptation: native-event handler props (upstream: FocusEvents<Target> from
|
|
22
22
|
// '@react-types/shared'). The Target parameter is kept for signature parity.
|
|
23
|
-
export interface FocusEvents<
|
|
23
|
+
export interface FocusEvents<_Target = FocusableElement> {
|
|
24
24
|
/** Handler that is called when the element receives focus. */
|
|
25
25
|
onFocus?: (e: FocusEvent) => void;
|
|
26
26
|
/** Handler that is called when the element loses focus. */
|
|
@@ -30,7 +30,7 @@ export interface FocusEvents<Target = FocusableElement> {
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
// octane adaptation: minimal structural DOMAttributes (upstream's drags React attribute types).
|
|
33
|
-
export type DOMAttributes<
|
|
33
|
+
export type DOMAttributes<_T = FocusableElement> = Record<string, any>;
|
|
34
34
|
|
|
35
35
|
export interface FocusProps<Target = FocusableElement> extends FocusEvents<Target> {
|
|
36
36
|
/** Whether the focus events should be disabled. */
|
|
@@ -167,7 +167,7 @@ export function useHover(...args: any[]): HoverResult {
|
|
|
167
167
|
setHovered(true);
|
|
168
168
|
};
|
|
169
169
|
|
|
170
|
-
let triggerHoverEnd = (
|
|
170
|
+
let triggerHoverEnd = (_event: any, pointerType: any) => {
|
|
171
171
|
let target = state.target;
|
|
172
172
|
state.pointerType = '';
|
|
173
173
|
state.target = null;
|
|
@@ -271,12 +271,12 @@ function parsePlacement(input: Placement): ParsedPlacement {
|
|
|
271
271
|
|
|
272
272
|
function computePosition(
|
|
273
273
|
childOffset: Offset,
|
|
274
|
-
|
|
274
|
+
_boundaryDimensions: Dimensions,
|
|
275
275
|
overlaySize: Offset,
|
|
276
276
|
placementInfo: ParsedPlacement,
|
|
277
277
|
offset: number,
|
|
278
278
|
crossOffset: number,
|
|
279
|
-
|
|
279
|
+
_containerOffsetWithBoundary: Offset,
|
|
280
280
|
isContainerPositioned: boolean,
|
|
281
281
|
arrowSize: number,
|
|
282
282
|
arrowBoundaryOffset: number,
|
|
@@ -329,7 +329,7 @@ function getMaxHeight(
|
|
|
329
329
|
position: Position,
|
|
330
330
|
boundaryDimensions: Dimensions,
|
|
331
331
|
containerOffsetWithBoundary: Offset,
|
|
332
|
-
|
|
332
|
+
_isContainerPositioned: boolean,
|
|
333
333
|
margins: Position,
|
|
334
334
|
padding: number,
|
|
335
335
|
overlayHeight: number,
|
|
@@ -425,7 +425,7 @@ export function calculatePositionInternal(
|
|
|
425
425
|
placementInput: Placement,
|
|
426
426
|
childOffset: Offset,
|
|
427
427
|
overlaySize: Offset,
|
|
428
|
-
|
|
428
|
+
_scrollSize: Offset,
|
|
429
429
|
margins: Position,
|
|
430
430
|
padding: number,
|
|
431
431
|
flip: boolean,
|
package/src/radio/useRadio.ts
CHANGED
|
@@ -82,17 +82,7 @@ export function useRadio(...args: any[]): RadioAria {
|
|
|
82
82
|
const state = user[1] as RadioGroupState;
|
|
83
83
|
const ref = user[2] as RefObject<HTMLInputElement | null>;
|
|
84
84
|
|
|
85
|
-
let {
|
|
86
|
-
value,
|
|
87
|
-
'aria-label': ariaLabel,
|
|
88
|
-
'aria-labelledby': ariaLabelledby,
|
|
89
|
-
onPressStart,
|
|
90
|
-
onPressEnd,
|
|
91
|
-
onPressChange,
|
|
92
|
-
onPress,
|
|
93
|
-
onPressUp,
|
|
94
|
-
onClick,
|
|
95
|
-
} = props;
|
|
85
|
+
let { value, onPressStart, onPressEnd, onPressChange, onPress, onPressUp, onClick } = props;
|
|
96
86
|
const isDisabled = props.isDisabled || state.isDisabled;
|
|
97
87
|
|
|
98
88
|
let checked = state.selectedValue === value;
|
|
@@ -12,7 +12,7 @@ import type { CollectionBase, Key, Node } from '@react-types/shared';
|
|
|
12
12
|
import { Children, Fragment, isChildrenBlock, isValidElement } from 'octane';
|
|
13
13
|
import type { PartialNode } from './types';
|
|
14
14
|
|
|
15
|
-
type CollectionElement<
|
|
15
|
+
type CollectionElement<_T> = any;
|
|
16
16
|
|
|
17
17
|
interface CollectionBuilderState {
|
|
18
18
|
renderer?: (value: any) => any;
|
|
@@ -89,7 +89,7 @@ export class CollectionBuilder<T extends object> {
|
|
|
89
89
|
private getKey(
|
|
90
90
|
item: NonNullable<CollectionElement<T>>,
|
|
91
91
|
partialNode: PartialNode<T>,
|
|
92
|
-
|
|
92
|
+
_state: CollectionBuilderState,
|
|
93
93
|
parentKey?: Key | null,
|
|
94
94
|
): Key {
|
|
95
95
|
if (item.key != null) {
|
|
@@ -5,7 +5,7 @@ import type { SectionProps } from '@react-types/shared';
|
|
|
5
5
|
import { Children } from 'octane';
|
|
6
6
|
import type { PartialNode } from './types';
|
|
7
7
|
|
|
8
|
-
function Section<T>(
|
|
8
|
+
function Section<T>(_props: SectionProps<T>): any {
|
|
9
9
|
return null;
|
|
10
10
|
}
|
|
11
11
|
|
|
@@ -372,7 +372,7 @@ export class TableLayout<T, O extends TableLayoutProps = TableLayoutProps> exten
|
|
|
372
372
|
|
|
373
373
|
// For subclasses.
|
|
374
374
|
// eslint-disable-next-line
|
|
375
|
-
protected isStickyColumn(
|
|
375
|
+
protected isStickyColumn(_node: GridNode<T>) {
|
|
376
376
|
return false;
|
|
377
377
|
}
|
|
378
378
|
|
|
@@ -18,7 +18,7 @@ export type ColumnDynamicSize = `${number}fr`; // match regex: /^(\d+)(?=fr$)/
|
|
|
18
18
|
/** All possible sizes a column can be assigned. */
|
|
19
19
|
export type ColumnSize = ColumnStaticSize | ColumnDynamicSize;
|
|
20
20
|
|
|
21
|
-
export type ColumnElement<
|
|
21
|
+
export type ColumnElement<_T> = any;
|
|
22
22
|
export type ColumnRenderer<T> = (item: T) => ColumnElement<T>;
|
|
23
23
|
export interface ColumnProps<T> {
|
|
24
24
|
/** Rendered contents of the column if `children` contains child columns. */
|
|
@@ -48,7 +48,7 @@ export interface ColumnProps<T> {
|
|
|
48
48
|
textValue?: string;
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
function Column<T>(
|
|
51
|
+
function Column<T>(_props: ColumnProps<T>): any {
|
|
52
52
|
return null;
|
|
53
53
|
}
|
|
54
54
|
|
package/src/stately/table/Row.ts
CHANGED
|
@@ -10,7 +10,7 @@ import type { CellElement, CellRenderer } from './Cell';
|
|
|
10
10
|
import type { CollectionBuilderContext } from './useTableState';
|
|
11
11
|
import type { PartialNode } from '../collections/types';
|
|
12
12
|
|
|
13
|
-
export type RowElement<
|
|
13
|
+
export type RowElement<_T> = any;
|
|
14
14
|
export interface RowProps<T> extends LinkDOMProps {
|
|
15
15
|
/**
|
|
16
16
|
* A list of child item objects used when dynamically rendering row children. Requires the feature
|
|
@@ -30,7 +30,7 @@ export interface RowProps<T> extends LinkDOMProps {
|
|
|
30
30
|
textValue?: string; // ???
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
function Row<T>(
|
|
33
|
+
function Row<T>(_props: RowProps<T>): any {
|
|
34
34
|
return null;
|
|
35
35
|
}
|
|
36
36
|
|
|
@@ -197,7 +197,7 @@ export class TableCollection<T> extends GridCollection<T> implements ITableColle
|
|
|
197
197
|
|
|
198
198
|
constructor(
|
|
199
199
|
nodes: Iterable<GridNode<T>>,
|
|
200
|
-
|
|
200
|
+
_prev?: ITableCollection<T> | null,
|
|
201
201
|
opts?: GridCollectionOptions,
|
|
202
202
|
) {
|
|
203
203
|
let rowHeaderColumnKeys: Set<Key> = new Set();
|
|
@@ -17,7 +17,7 @@ export interface TableHeaderProps<T> {
|
|
|
17
17
|
children: ColumnElement<T> | ColumnElement<T>[] | ColumnRenderer<T>;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
function TableHeader<T>(
|
|
20
|
+
function TableHeader<T>(_props: TableHeaderProps<T>): any {
|
|
21
21
|
return null;
|
|
22
22
|
}
|
|
23
23
|
|
|
@@ -23,7 +23,7 @@ import type { MultipleSelectionStateProps } from '../selection/useMultipleSelect
|
|
|
23
23
|
import { useCollection } from '../collections/useCollection';
|
|
24
24
|
import { useControlledState } from '../utils/useControlledState';
|
|
25
25
|
|
|
26
|
-
export interface TableProps<
|
|
26
|
+
export interface TableProps<_T> extends MultipleSelection, Sortable, Expandable {
|
|
27
27
|
/** The elements that make up the table. Includes the TableHeader, TableBody, Columns, and Rows. */
|
|
28
28
|
children: [any, any];
|
|
29
29
|
/** A list of row keys to disable. */
|
|
@@ -83,7 +83,7 @@ export abstract class Layout<T extends object = Node<any>, O = any> implements L
|
|
|
83
83
|
* Called by the virtualizer before `getVisibleLayoutInfos`
|
|
84
84
|
* or `getLayoutInfo` are called.
|
|
85
85
|
*/
|
|
86
|
-
update(
|
|
86
|
+
update(_invalidationContext: InvalidationContext<O>): void {} // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
87
87
|
|
|
88
88
|
/**
|
|
89
89
|
* Updates the size of the given item.
|
package/src/toast/useToast.tsx
CHANGED
|
@@ -53,7 +53,7 @@ export function useToast<T>(
|
|
|
53
53
|
props: AriaToastProps<T>,
|
|
54
54
|
state: ToastState<T>,
|
|
55
55
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
56
|
-
|
|
56
|
+
_ref: RefObject<FocusableElement | null>,
|
|
57
57
|
): ToastAria {
|
|
58
58
|
let { key, timer, timeout } = props.toast;
|
|
59
59
|
|
package/src/utils/openLink.ts
CHANGED
|
@@ -10,7 +10,7 @@ import { S, splitSlot } from '../internal';
|
|
|
10
10
|
import { focusWithoutScrolling } from './focusWithoutScrolling';
|
|
11
11
|
import { isFirefox, isIPad, isMac, isWebKit } from './platform';
|
|
12
12
|
|
|
13
|
-
type DOMAttributes<
|
|
13
|
+
type DOMAttributes<_T = Element> = Record<string, any>;
|
|
14
14
|
|
|
15
15
|
interface Router {
|
|
16
16
|
isNative: boolean;
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
import type { Direction } from '@react-types/shared';
|
|
16
16
|
import { LayoutInfo } from '../upstream-exports/react-stately/useVirtualizerState';
|
|
17
|
-
import
|
|
17
|
+
import { type CSSProperties, type JSX, type ReactNode, useRef } from '../compat/react';
|
|
18
18
|
import { useLocale } from '../i18n/I18nProvider';
|
|
19
19
|
import { useVirtualizerItem, type VirtualizerItemOptions } from './useVirtualizerItem';
|
|
20
20
|
|