react-aria-components 1.0.0-rc.0 → 1.0.0
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/README.md +8 -13
- package/dist/ar-AE.main.js +8 -0
- package/dist/ar-AE.main.js.map +1 -0
- package/dist/ar-AE.mjs +10 -0
- package/dist/ar-AE.module.js +10 -0
- package/dist/ar-AE.module.js.map +1 -0
- package/dist/bg-BG.main.js +8 -0
- package/dist/bg-BG.main.js.map +1 -0
- package/dist/bg-BG.mjs +10 -0
- package/dist/bg-BG.module.js +10 -0
- package/dist/bg-BG.module.js.map +1 -0
- package/dist/cs-CZ.main.js +8 -0
- package/dist/cs-CZ.main.js.map +1 -0
- package/dist/cs-CZ.mjs +10 -0
- package/dist/cs-CZ.module.js +10 -0
- package/dist/cs-CZ.module.js.map +1 -0
- package/dist/da-DK.main.js +8 -0
- package/dist/da-DK.main.js.map +1 -0
- package/dist/da-DK.mjs +10 -0
- package/dist/da-DK.module.js +10 -0
- package/dist/da-DK.module.js.map +1 -0
- package/dist/de-DE.main.js +8 -0
- package/dist/de-DE.main.js.map +1 -0
- package/dist/de-DE.mjs +10 -0
- package/dist/de-DE.module.js +10 -0
- package/dist/de-DE.module.js.map +1 -0
- package/dist/el-GR.main.js +8 -0
- package/dist/el-GR.main.js.map +1 -0
- package/dist/el-GR.mjs +10 -0
- package/dist/el-GR.module.js +10 -0
- package/dist/el-GR.module.js.map +1 -0
- package/dist/en-US.main.js +8 -0
- package/dist/en-US.main.js.map +1 -0
- package/dist/en-US.mjs +10 -0
- package/dist/en-US.module.js +10 -0
- package/dist/en-US.module.js.map +1 -0
- package/dist/es-ES.main.js +8 -0
- package/dist/es-ES.main.js.map +1 -0
- package/dist/es-ES.mjs +10 -0
- package/dist/es-ES.module.js +10 -0
- package/dist/es-ES.module.js.map +1 -0
- package/dist/et-EE.main.js +8 -0
- package/dist/et-EE.main.js.map +1 -0
- package/dist/et-EE.mjs +10 -0
- package/dist/et-EE.module.js +10 -0
- package/dist/et-EE.module.js.map +1 -0
- package/dist/fi-FI.main.js +8 -0
- package/dist/fi-FI.main.js.map +1 -0
- package/dist/fi-FI.mjs +10 -0
- package/dist/fi-FI.module.js +10 -0
- package/dist/fi-FI.module.js.map +1 -0
- package/dist/fr-FR.main.js +8 -0
- package/dist/fr-FR.main.js.map +1 -0
- package/dist/fr-FR.mjs +10 -0
- package/dist/fr-FR.module.js +10 -0
- package/dist/fr-FR.module.js.map +1 -0
- package/dist/he-IL.main.js +8 -0
- package/dist/he-IL.main.js.map +1 -0
- package/dist/he-IL.mjs +10 -0
- package/dist/he-IL.module.js +10 -0
- package/dist/he-IL.module.js.map +1 -0
- package/dist/hr-HR.main.js +8 -0
- package/dist/hr-HR.main.js.map +1 -0
- package/dist/hr-HR.mjs +10 -0
- package/dist/hr-HR.module.js +10 -0
- package/dist/hr-HR.module.js.map +1 -0
- package/dist/hu-HU.main.js +8 -0
- package/dist/hu-HU.main.js.map +1 -0
- package/dist/hu-HU.mjs +10 -0
- package/dist/hu-HU.module.js +10 -0
- package/dist/hu-HU.module.js.map +1 -0
- package/dist/import.mjs +277 -309
- package/dist/it-IT.main.js +8 -0
- package/dist/it-IT.main.js.map +1 -0
- package/dist/it-IT.mjs +10 -0
- package/dist/it-IT.module.js +10 -0
- package/dist/it-IT.module.js.map +1 -0
- package/dist/ja-JP.main.js +8 -0
- package/dist/ja-JP.main.js.map +1 -0
- package/dist/ja-JP.mjs +10 -0
- package/dist/ja-JP.module.js +10 -0
- package/dist/ja-JP.module.js.map +1 -0
- package/dist/ko-KR.main.js +8 -0
- package/dist/ko-KR.main.js.map +1 -0
- package/dist/ko-KR.mjs +10 -0
- package/dist/ko-KR.module.js +10 -0
- package/dist/ko-KR.module.js.map +1 -0
- package/dist/lt-LT.main.js +8 -0
- package/dist/lt-LT.main.js.map +1 -0
- package/dist/lt-LT.mjs +10 -0
- package/dist/lt-LT.module.js +10 -0
- package/dist/lt-LT.module.js.map +1 -0
- package/dist/lv-LV.main.js +8 -0
- package/dist/lv-LV.main.js.map +1 -0
- package/dist/lv-LV.mjs +10 -0
- package/dist/lv-LV.module.js +10 -0
- package/dist/lv-LV.module.js.map +1 -0
- package/dist/main.js +271 -301
- package/dist/main.js.map +1 -1
- package/dist/module.js +277 -309
- package/dist/module.js.map +1 -1
- package/dist/nb-NO.main.js +8 -0
- package/dist/nb-NO.main.js.map +1 -0
- package/dist/nb-NO.mjs +10 -0
- package/dist/nb-NO.module.js +10 -0
- package/dist/nb-NO.module.js.map +1 -0
- package/dist/nl-NL.main.js +8 -0
- package/dist/nl-NL.main.js.map +1 -0
- package/dist/nl-NL.mjs +10 -0
- package/dist/nl-NL.module.js +10 -0
- package/dist/nl-NL.module.js.map +1 -0
- package/dist/pl-PL.main.js +8 -0
- package/dist/pl-PL.main.js.map +1 -0
- package/dist/pl-PL.mjs +10 -0
- package/dist/pl-PL.module.js +10 -0
- package/dist/pl-PL.module.js.map +1 -0
- package/dist/pt-BR.main.js +8 -0
- package/dist/pt-BR.main.js.map +1 -0
- package/dist/pt-BR.mjs +10 -0
- package/dist/pt-BR.module.js +10 -0
- package/dist/pt-BR.module.js.map +1 -0
- package/dist/pt-PT.main.js +8 -0
- package/dist/pt-PT.main.js.map +1 -0
- package/dist/pt-PT.mjs +10 -0
- package/dist/pt-PT.module.js +10 -0
- package/dist/pt-PT.module.js.map +1 -0
- package/dist/ro-RO.main.js +8 -0
- package/dist/ro-RO.main.js.map +1 -0
- package/dist/ro-RO.mjs +10 -0
- package/dist/ro-RO.module.js +10 -0
- package/dist/ro-RO.module.js.map +1 -0
- package/dist/ru-RU.main.js +8 -0
- package/dist/ru-RU.main.js.map +1 -0
- package/dist/ru-RU.mjs +10 -0
- package/dist/ru-RU.module.js +10 -0
- package/dist/ru-RU.module.js.map +1 -0
- package/dist/sk-SK.main.js +8 -0
- package/dist/sk-SK.main.js.map +1 -0
- package/dist/sk-SK.mjs +10 -0
- package/dist/sk-SK.module.js +10 -0
- package/dist/sk-SK.module.js.map +1 -0
- package/dist/sl-SI.main.js +8 -0
- package/dist/sl-SI.main.js.map +1 -0
- package/dist/sl-SI.mjs +10 -0
- package/dist/sl-SI.module.js +10 -0
- package/dist/sl-SI.module.js.map +1 -0
- package/dist/sr-SP.main.js +8 -0
- package/dist/sr-SP.main.js.map +1 -0
- package/dist/sr-SP.mjs +10 -0
- package/dist/sr-SP.module.js +10 -0
- package/dist/sr-SP.module.js.map +1 -0
- package/dist/sv-SE.main.js +8 -0
- package/dist/sv-SE.main.js.map +1 -0
- package/dist/sv-SE.mjs +10 -0
- package/dist/sv-SE.module.js +10 -0
- package/dist/sv-SE.module.js.map +1 -0
- package/dist/tr-TR.main.js +8 -0
- package/dist/tr-TR.main.js.map +1 -0
- package/dist/tr-TR.mjs +10 -0
- package/dist/tr-TR.module.js +10 -0
- package/dist/tr-TR.module.js.map +1 -0
- package/dist/types.d.ts +126 -79
- package/dist/types.d.ts.map +1 -1
- package/dist/uk-UA.main.js +8 -0
- package/dist/uk-UA.main.js.map +1 -0
- package/dist/uk-UA.mjs +10 -0
- package/dist/uk-UA.module.js +10 -0
- package/dist/uk-UA.module.js.map +1 -0
- package/dist/zh-CN.main.js +8 -0
- package/dist/zh-CN.main.js.map +1 -0
- package/dist/zh-CN.mjs +10 -0
- package/dist/zh-CN.module.js +10 -0
- package/dist/zh-CN.module.js.map +1 -0
- package/dist/zh-TW.main.js +8 -0
- package/dist/zh-TW.main.js.map +1 -0
- package/dist/zh-TW.mjs +10 -0
- package/dist/zh-TW.module.js +10 -0
- package/dist/zh-TW.module.js.map +1 -0
- package/i18n/ar-AE.js +1 -0
- package/i18n/ar-AE.mjs +1 -0
- package/i18n/bg-BG.js +1 -0
- package/i18n/bg-BG.mjs +1 -0
- package/i18n/cs-CZ.js +1 -0
- package/i18n/cs-CZ.mjs +1 -0
- package/i18n/da-DK.js +1 -0
- package/i18n/da-DK.mjs +1 -0
- package/i18n/de-DE.js +1 -0
- package/i18n/de-DE.mjs +1 -0
- package/i18n/el-GR.js +1 -0
- package/i18n/el-GR.mjs +1 -0
- package/i18n/en-US.js +1 -0
- package/i18n/en-US.mjs +1 -0
- package/i18n/es-ES.js +1 -0
- package/i18n/es-ES.mjs +1 -0
- package/i18n/et-EE.js +1 -0
- package/i18n/et-EE.mjs +1 -0
- package/i18n/fi-FI.js +1 -0
- package/i18n/fi-FI.mjs +1 -0
- package/i18n/fr-FR.js +1 -0
- package/i18n/fr-FR.mjs +1 -0
- package/i18n/he-IL.js +1 -0
- package/i18n/he-IL.mjs +1 -0
- package/i18n/hr-HR.js +1 -0
- package/i18n/hr-HR.mjs +1 -0
- package/i18n/hu-HU.js +1 -0
- package/i18n/hu-HU.mjs +1 -0
- package/i18n/index.d.ts +12 -0
- package/i18n/index.js +118 -0
- package/i18n/index.mjs +115 -0
- package/i18n/it-IT.js +1 -0
- package/i18n/it-IT.mjs +1 -0
- package/i18n/ja-JP.js +1 -0
- package/i18n/ja-JP.mjs +1 -0
- package/i18n/ko-KR.js +1 -0
- package/i18n/ko-KR.mjs +1 -0
- package/i18n/lang.d.ts +7 -0
- package/i18n/lt-LT.js +1 -0
- package/i18n/lt-LT.mjs +1 -0
- package/i18n/lv-LV.js +1 -0
- package/i18n/lv-LV.mjs +1 -0
- package/i18n/nb-NO.js +1 -0
- package/i18n/nb-NO.mjs +1 -0
- package/i18n/nl-NL.js +1 -0
- package/i18n/nl-NL.mjs +1 -0
- package/i18n/pl-PL.js +1 -0
- package/i18n/pl-PL.mjs +1 -0
- package/i18n/pt-BR.js +1 -0
- package/i18n/pt-BR.mjs +1 -0
- package/i18n/pt-PT.js +1 -0
- package/i18n/pt-PT.mjs +1 -0
- package/i18n/ro-RO.js +1 -0
- package/i18n/ro-RO.mjs +1 -0
- package/i18n/ru-RU.js +1 -0
- package/i18n/ru-RU.mjs +1 -0
- package/i18n/sk-SK.js +1 -0
- package/i18n/sk-SK.mjs +1 -0
- package/i18n/sl-SI.js +1 -0
- package/i18n/sl-SI.mjs +1 -0
- package/i18n/sr-SP.js +1 -0
- package/i18n/sr-SP.mjs +1 -0
- package/i18n/sv-SE.js +1 -0
- package/i18n/sv-SE.mjs +1 -0
- package/i18n/tr-TR.js +1 -0
- package/i18n/tr-TR.mjs +1 -0
- package/i18n/uk-UA.js +1 -0
- package/i18n/uk-UA.mjs +1 -0
- package/i18n/zh-CN.js +1 -0
- package/i18n/zh-CN.mjs +1 -0
- package/i18n/zh-TW.js +1 -0
- package/i18n/zh-TW.mjs +1 -0
- package/package.json +30 -16
- package/src/Breadcrumbs.tsx +3 -2
- package/src/Calendar.tsx +7 -7
- package/src/Checkbox.tsx +14 -31
- package/src/Collection.tsx +40 -27
- package/src/ComboBox.tsx +3 -0
- package/src/DateField.tsx +5 -5
- package/src/DatePicker.tsx +5 -5
- package/src/Dialog.tsx +1 -1
- package/src/DropZone.tsx +1 -1
- package/src/FileTrigger.tsx +10 -4
- package/src/GridList.tsx +6 -4
- package/src/Heading.tsx +1 -1
- package/src/ListBox.tsx +8 -13
- package/src/Menu.tsx +23 -5
- package/src/Modal.tsx +11 -4
- package/src/OverlayArrow.tsx +7 -2
- package/src/Popover.tsx +26 -5
- package/src/RadioGroup.tsx +13 -31
- package/src/SearchField.tsx +2 -0
- package/src/Select.tsx +2 -1
- package/src/Slider.tsx +1 -1
- package/src/Switch.tsx +12 -29
- package/src/Table.tsx +34 -37
- package/src/Tabs.tsx +4 -3
- package/src/TagGroup.tsx +2 -2
- package/src/Tooltip.tsx +9 -4
- package/src/index.ts +2 -2
- package/src/useDragAndDrop.tsx +6 -6
- package/src/utils.tsx +20 -3
package/dist/types.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React, { Context, CSSProperties, ForwardedRef, ReactNode, RefObject, ReactElement, HTMLAttributes, LabelHTMLAttributes, InputHTMLAttributes, OutputHTMLAttributes, TextareaHTMLAttributes } from "react";
|
|
2
|
-
import { CollectionBase, Key, HoverEvents as _HoverEvents1, ValidationResult,
|
|
1
|
+
import React, { Context, CSSProperties, ForwardedRef, JSX, ReactNode, RefObject, UIEvent, ReactElement, HTMLAttributes, LabelHTMLAttributes, InputHTMLAttributes, OutputHTMLAttributes, TextareaHTMLAttributes } from "react";
|
|
2
|
+
import { CollectionBase, Key, HoverEvents as _HoverEvents1, ValidationResult, AriaLabelingProps, DOMProps as _DOMProps1, DraggableCollectionProps, DroppableCollectionProps, LinkDOMProps, InputDOMProps, Orientation as _Orientation2 } from "@react-types/shared";
|
|
3
3
|
import { SelectionBehavior, SelectionMode, SectionProps as _SectionProps1, CalendarState, RangeCalendarState, CheckboxGroupState, DraggableCollectionState, DraggableCollectionStateOptions, DroppableCollectionState, DroppableCollectionStateOptions, ListState, Orientation, OverlayTriggerProps, OverlayTriggerState, ComboBoxState, DateFieldState, DateSegmentType, DateSegment as _DateSegment1, TimeFieldState, DatePickerState, DatePickerStateOptions, DateRangePickerState, DateRangePickerStateOptions, MenuTriggerProps as _MenuTriggerProps1, TreeState, NumberFieldState, RadioGroupState, SearchFieldState, SelectState, SliderState, ToggleState, DisabledBehavior, SortDirection, TableState, TabListState, TooltipTriggerProps, TooltipTriggerState } from "react-stately";
|
|
4
|
-
import { AriaLinkOptions, HoverEvents, AriaBreadcrumbsProps, AriaButtonProps, CalendarProps as _CalendarProps1, RangeCalendarProps as _RangeCalendarProps1, DateValue, AriaCheckboxGroupProps, AriaCheckboxProps, DropIndicatorProps as _DropIndicatorProps1, DraggableCollectionOptions, DraggableItemProps, DraggableItemResult, DragItem, DragPreview, DropIndicatorAria, DroppableCollectionOptions, DroppableCollectionResult, DroppableItemOptions, DroppableItemResult, DropTarget, DropTargetDelegate, ListDropTargetDelegate, SeparatorProps as _SeparatorProps1, AriaListBoxProps, PlacementAxis, AriaPopoverProps, PositionProps, AriaDialogProps, AriaComboBoxProps,
|
|
4
|
+
import { AriaLinkOptions, HoverEvents, AriaBreadcrumbsProps, AriaButtonProps, CalendarProps as _CalendarProps1, RangeCalendarProps as _RangeCalendarProps1, DateValue, AriaCheckboxGroupProps, AriaCheckboxProps, HoverProps, DropIndicatorProps as _DropIndicatorProps1, DraggableCollectionOptions, DraggableItemProps, DraggableItemResult, DragItem, DragPreview, DropIndicatorAria, DroppableCollectionOptions, DroppableCollectionResult, DroppableItemOptions, DroppableItemResult, DropTarget, DropTargetDelegate, ListDropTargetDelegate, SeparatorProps as _SeparatorProps1, AriaListBoxProps, PlacementAxis, AriaPopoverProps, PositionProps, AriaDialogProps, AriaComboBoxProps, AriaDateFieldProps, AriaTimeFieldProps, TimeValue, AriaDatePickerProps, AriaDateRangePickerProps, DropOptions, AriaGridListProps, AriaMenuProps, AriaMeterProps, AriaModalOverlayProps, AriaNumberFieldProps, AriaProgressBarProps, AriaRadioGroupProps, AriaRadioProps, Orientation as _Orientation1, AriaSearchFieldProps, AriaSelectProps, AriaSliderProps, AriaSliderThumbProps, AriaSwitchProps, AriaTabListProps, AriaTabPanelProps, AriaTagGroupProps, AriaTextFieldProps, AriaToggleButtonProps } from "react-aria";
|
|
5
5
|
import { CalendarDate, DateDuration } from "@internationalized/date";
|
|
6
6
|
import { FormProps as _FormProps1 } from "@react-types/form";
|
|
7
7
|
import { TableColumnResizeState } from "@react-stately/table";
|
|
@@ -20,7 +20,7 @@ interface ProviderProps<A, B, C, D, E, F, G, H, I, J, K> {
|
|
|
20
20
|
values: ProviderValues<A, B, C, D, E, F, G, H, I, J, K>;
|
|
21
21
|
children: ReactNode;
|
|
22
22
|
}
|
|
23
|
-
export function Provider<A, B, C, D, E, F, G, H, I, J, K>({ values, children }: ProviderProps<A, B, C, D, E, F, G, H, I, J, K>):
|
|
23
|
+
export function Provider<A, B, C, D, E, F, G, H, I, J, K>({ values, children }: ProviderProps<A, B, C, D, E, F, G, H, I, J, K>): JSX.Element;
|
|
24
24
|
interface StyleProps {
|
|
25
25
|
/** The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. */
|
|
26
26
|
className?: string;
|
|
@@ -31,6 +31,10 @@ interface DOMProps extends StyleProps {
|
|
|
31
31
|
/** The children of the component. */
|
|
32
32
|
children?: ReactNode;
|
|
33
33
|
}
|
|
34
|
+
interface ScrollableProps<T extends Element> {
|
|
35
|
+
/** Handler that is called when a user scrolls. See [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Element/scroll_event). */
|
|
36
|
+
onScroll?: (e: UIEvent<T>) => void;
|
|
37
|
+
}
|
|
34
38
|
interface StyleRenderProps<T> {
|
|
35
39
|
/** The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state. */
|
|
36
40
|
className?: string | ((values: T) => string);
|
|
@@ -41,6 +45,11 @@ interface RenderProps<T> extends StyleRenderProps<T> {
|
|
|
41
45
|
/** The children of the component. A function may be provided to alter the children based on component state. */
|
|
42
46
|
children?: ReactNode | ((values: T) => ReactNode);
|
|
43
47
|
}
|
|
48
|
+
/**
|
|
49
|
+
* A helper function that accepts a user-provided render prop value (either a static value or a function),
|
|
50
|
+
* and combines it with another value to create a final result.
|
|
51
|
+
*/
|
|
52
|
+
export function composeRenderProps<T, U, V extends T>(value: T extends any ? (T | ((renderProps: U) => V)) : never, wrap: (prevValue: T, renderProps: U) => V): (renderProps: U) => V;
|
|
44
53
|
type WithRef<T, E> = T & {
|
|
45
54
|
ref?: ForwardedRef<E>;
|
|
46
55
|
};
|
|
@@ -65,6 +74,8 @@ interface RACValidation {
|
|
|
65
74
|
interface CollectionProps<T> extends Omit<CollectionBase<T>, 'children'> {
|
|
66
75
|
/** The contents of the collection. */
|
|
67
76
|
children?: ReactNode | ((item: T) => ReactNode);
|
|
77
|
+
/** Values that should invalidate the item cache when using dynamic collections. */
|
|
78
|
+
dependencies?: any[];
|
|
68
79
|
}
|
|
69
80
|
interface ItemRenderProps {
|
|
70
81
|
/**
|
|
@@ -131,10 +142,12 @@ export interface SectionProps<T> extends Omit<_SectionProps1<T>, 'children' | 't
|
|
|
131
142
|
value?: T;
|
|
132
143
|
/** Static child items or a function to render children. */
|
|
133
144
|
children?: ReactNode | ((item: T) => ReactElement);
|
|
145
|
+
/** Values that should invalidate the item cache when using dynamic collections. */
|
|
146
|
+
dependencies?: any[];
|
|
134
147
|
}
|
|
135
148
|
export const Section: <T extends object>(props: SectionProps<T> & React.RefAttributes<HTMLElement>) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
136
149
|
/** A Collection renders a list of items, automatically managing caching and keys. */
|
|
137
|
-
export function Collection<T extends object>(props: CollectionProps<T>):
|
|
150
|
+
export function Collection<T extends object>(props: CollectionProps<T>): JSX.Element;
|
|
138
151
|
export interface LinkProps extends Omit<AriaLinkOptions, 'elementType'>, HoverEvents, RenderProps<LinkRenderProps>, SlotProps {
|
|
139
152
|
}
|
|
140
153
|
export interface LinkRenderProps {
|
|
@@ -442,7 +455,7 @@ export interface CalendarCellProps extends RenderProps<CalendarCellRenderProps>,
|
|
|
442
455
|
/**
|
|
443
456
|
* A calendar cell displays a date cell within a calendar grid which can be selected by the user.
|
|
444
457
|
*/
|
|
445
|
-
export const CalendarCell: (props: CalendarCellProps & React.RefAttributes<
|
|
458
|
+
export const CalendarCell: (props: CalendarCellProps & React.RefAttributes<HTMLTableCellElement>) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
446
459
|
export interface FieldErrorRenderProps extends ValidationResult {
|
|
447
460
|
}
|
|
448
461
|
export interface FieldErrorProps extends RenderProps<FieldErrorRenderProps> {
|
|
@@ -458,7 +471,7 @@ export const LabelContext: React.Context<ContextValue<LabelProps, HTMLLabelEleme
|
|
|
458
471
|
export const Label: (props: LabelProps & React.RefAttributes<HTMLLabelElement>) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
459
472
|
export interface CheckboxGroupProps extends Omit<AriaCheckboxGroupProps, 'children' | 'label' | 'description' | 'errorMessage' | 'validationState' | 'validationBehavior'>, RACValidation, RenderProps<CheckboxGroupRenderProps>, SlotProps {
|
|
460
473
|
}
|
|
461
|
-
export interface CheckboxProps extends Omit<AriaCheckboxProps, 'children' | 'validationState'>, HoverEvents, RACValidation, RenderProps<CheckboxRenderProps>, SlotProps {
|
|
474
|
+
export interface CheckboxProps extends Omit<AriaCheckboxProps, 'children' | 'validationState' | 'validationBehavior'>, HoverEvents, RACValidation, RenderProps<CheckboxRenderProps>, SlotProps {
|
|
462
475
|
}
|
|
463
476
|
export interface CheckboxGroupRenderProps {
|
|
464
477
|
/**
|
|
@@ -540,16 +553,62 @@ export interface CheckboxRenderProps {
|
|
|
540
553
|
}
|
|
541
554
|
export const CheckboxGroupContext: React.Context<ContextValue<CheckboxGroupProps, HTMLDivElement>>;
|
|
542
555
|
export const CheckboxGroupStateContext: React.Context<CheckboxGroupState>;
|
|
543
|
-
export const CheckboxContext: React.Context<ContextValue<CheckboxProps,
|
|
556
|
+
export const CheckboxContext: React.Context<ContextValue<CheckboxProps, HTMLLabelElement>>;
|
|
544
557
|
/**
|
|
545
558
|
* A checkbox allows a user to select multiple items from a list of individual items, or
|
|
546
559
|
* to mark one individual item as selected.
|
|
547
560
|
*/
|
|
548
|
-
export const Checkbox: (props: CheckboxProps & React.RefAttributes<
|
|
561
|
+
export const Checkbox: (props: CheckboxProps & React.RefAttributes<HTMLLabelElement>) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
549
562
|
/**
|
|
550
563
|
* A checkbox group allows a user to select multiple items from a list of options.
|
|
551
564
|
*/
|
|
552
565
|
export const CheckboxGroup: (props: CheckboxGroupProps & React.RefAttributes<HTMLDivElement>) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
566
|
+
export interface GroupRenderProps {
|
|
567
|
+
/**
|
|
568
|
+
* Whether the group is currently hovered with a mouse.
|
|
569
|
+
* @selector [data-hovered]
|
|
570
|
+
*/
|
|
571
|
+
isHovered: boolean;
|
|
572
|
+
/**
|
|
573
|
+
* Whether an element within the group is focused, either via a mouse or keyboard.
|
|
574
|
+
* @selector [data-focus-within]
|
|
575
|
+
*/
|
|
576
|
+
isFocusWithin: boolean;
|
|
577
|
+
/**
|
|
578
|
+
* Whether an element within the group is keyboard focused.
|
|
579
|
+
* @selector [data-focus-visible]
|
|
580
|
+
*/
|
|
581
|
+
isFocusVisible: boolean;
|
|
582
|
+
/**
|
|
583
|
+
* Whether the group is disabled.
|
|
584
|
+
* @selector [data-disabled]
|
|
585
|
+
*/
|
|
586
|
+
isDisabled: boolean;
|
|
587
|
+
/**
|
|
588
|
+
* Whether the group is invalid.
|
|
589
|
+
* @selector [data-invalid]
|
|
590
|
+
*/
|
|
591
|
+
isInvalid: boolean;
|
|
592
|
+
}
|
|
593
|
+
export interface GroupProps extends AriaLabelingProps, Omit<HTMLAttributes<HTMLElement>, 'children' | 'className' | 'style' | 'role' | 'slot'>, _DOMProps1, HoverProps, RenderProps<GroupRenderProps>, SlotProps {
|
|
594
|
+
/** Whether the group is disabled. */
|
|
595
|
+
isDisabled?: boolean;
|
|
596
|
+
/** Whether the group is invalid. */
|
|
597
|
+
isInvalid?: boolean;
|
|
598
|
+
/**
|
|
599
|
+
* An accessibility role for the group. By default, this is set to `'group'`.
|
|
600
|
+
* Use `'region'` when the contents of the group is important enough to be
|
|
601
|
+
* included in the page table of contents. Use `'presentation'` if the group
|
|
602
|
+
* is visual only and does not represent a semantic grouping of controls.
|
|
603
|
+
* @default 'group'
|
|
604
|
+
*/
|
|
605
|
+
role?: 'group' | 'region' | 'presentation';
|
|
606
|
+
}
|
|
607
|
+
export const GroupContext: React.Context<ContextValue<GroupProps, HTMLDivElement>>;
|
|
608
|
+
/**
|
|
609
|
+
* A group represents a set of related UI controls, and supports interactive states for styling.
|
|
610
|
+
*/
|
|
611
|
+
export const Group: (props: GroupProps & React.RefAttributes<HTMLDivElement>) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
553
612
|
export interface InputRenderProps {
|
|
554
613
|
/**
|
|
555
614
|
* Whether the input is currently hovered with a mouse.
|
|
@@ -591,14 +650,14 @@ interface DragHooks {
|
|
|
591
650
|
useDraggableCollection?: (props: DraggableCollectionOptions, state: DraggableCollectionState, ref: RefObject<HTMLElement>) => void;
|
|
592
651
|
useDraggableItem?: (props: DraggableItemProps, state: DraggableCollectionState) => DraggableItemResult;
|
|
593
652
|
DragPreview?: typeof DragPreview;
|
|
594
|
-
renderDragPreview?: (items: DragItem[]) =>
|
|
653
|
+
renderDragPreview?: (items: DragItem[]) => JSX.Element;
|
|
595
654
|
}
|
|
596
655
|
interface DropHooks {
|
|
597
656
|
useDroppableCollectionState?: (props: DroppableCollectionStateOptions) => DroppableCollectionState;
|
|
598
657
|
useDroppableCollection?: (props: DroppableCollectionOptions, state: DroppableCollectionState, ref: RefObject<HTMLElement>) => DroppableCollectionResult;
|
|
599
658
|
useDroppableItem?: (options: DroppableItemOptions, state: DroppableCollectionState, ref: RefObject<HTMLElement>) => DroppableItemResult;
|
|
600
659
|
useDropIndicator?: (props: _DropIndicatorProps1, state: DroppableCollectionState, ref: RefObject<HTMLElement>) => DropIndicatorAria;
|
|
601
|
-
renderDropIndicator?: (target: DropTarget) =>
|
|
660
|
+
renderDropIndicator?: (target: DropTarget) => JSX.Element;
|
|
602
661
|
dropTargetDelegate?: DropTargetDelegate;
|
|
603
662
|
ListDropTargetDelegate: typeof ListDropTargetDelegate;
|
|
604
663
|
}
|
|
@@ -617,13 +676,13 @@ export interface DragAndDropOptions extends Omit<DraggableCollectionProps, 'prev
|
|
|
617
676
|
* A function that renders a drag preview, which is shown under the user's cursor while dragging.
|
|
618
677
|
* By default, a copy of the dragged element is rendered.
|
|
619
678
|
*/
|
|
620
|
-
renderDragPreview?: (items: DragItem[]) =>
|
|
679
|
+
renderDragPreview?: (items: DragItem[]) => JSX.Element;
|
|
621
680
|
/**
|
|
622
681
|
* A function that renders a drop indicator element between two items in a collection.
|
|
623
682
|
* This should render a `<DropIndicator>` element. If this function is not provided, a
|
|
624
683
|
* default DropIndicator is provided.
|
|
625
684
|
*/
|
|
626
|
-
renderDropIndicator?: (target: DropTarget) =>
|
|
685
|
+
renderDropIndicator?: (target: DropTarget) => JSX.Element;
|
|
627
686
|
/** A custom delegate object that provides drop targets for pointer coordinates within the collection. */
|
|
628
687
|
dropTargetDelegate?: DropTargetDelegate;
|
|
629
688
|
}
|
|
@@ -691,7 +750,7 @@ export interface ListBoxRenderProps {
|
|
|
691
750
|
*/
|
|
692
751
|
state: ListState<unknown>;
|
|
693
752
|
}
|
|
694
|
-
export interface ListBoxProps<T> extends Omit<AriaListBoxProps<T>, 'children' | 'label'>, CollectionProps<T>, StyleRenderProps<ListBoxRenderProps>, SlotProps {
|
|
753
|
+
export interface ListBoxProps<T> extends Omit<AriaListBoxProps<T>, 'children' | 'label'>, CollectionProps<T>, StyleRenderProps<ListBoxRenderProps>, SlotProps, ScrollableProps<HTMLDivElement> {
|
|
695
754
|
/** How multiple selection should behave in the collection. */
|
|
696
755
|
selectionBehavior?: SelectionBehavior;
|
|
697
756
|
/** The drag and drop hooks returned by `useDragAndDrop` used to enable drag and drop behavior for the ListBox. */
|
|
@@ -747,6 +806,12 @@ export interface OverlayArrowRenderProps {
|
|
|
747
806
|
*/
|
|
748
807
|
export const OverlayArrow: (props: OverlayArrowProps & React.RefAttributes<HTMLDivElement>) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
749
808
|
export interface PopoverProps extends Omit<PositionProps, 'isOpen'>, Omit<AriaPopoverProps, 'popoverRef' | 'triggerRef'>, OverlayTriggerProps, RenderProps<PopoverRenderProps>, SlotProps {
|
|
809
|
+
/**
|
|
810
|
+
* The name of the component that triggered the popover. This is reflected on the element
|
|
811
|
+
* as the `data-trigger` attribute, and can be used to provide specific
|
|
812
|
+
* styles for the popover depending on which element triggered it.
|
|
813
|
+
*/
|
|
814
|
+
trigger?: string;
|
|
750
815
|
/**
|
|
751
816
|
* The ref for the element which the popover positions itself with respect to.
|
|
752
817
|
*
|
|
@@ -762,8 +827,18 @@ export interface PopoverProps extends Omit<PositionProps, 'isOpen'>, Omit<AriaPo
|
|
|
762
827
|
* Whether the popover is currently performing an exit animation.
|
|
763
828
|
*/
|
|
764
829
|
isExiting?: boolean;
|
|
830
|
+
/**
|
|
831
|
+
* The container element in which the overlay portal will be placed. This may have unknown behavior depending on where it is portalled to.
|
|
832
|
+
* @default document.body
|
|
833
|
+
*/
|
|
834
|
+
UNSTABLE_portalContainer?: Element;
|
|
765
835
|
}
|
|
766
836
|
export interface PopoverRenderProps {
|
|
837
|
+
/**
|
|
838
|
+
* The name of the component that triggered the popover, e.g. "DialogTrigger" or "ComboBox".
|
|
839
|
+
* @selector [data-trigger="..."]
|
|
840
|
+
*/
|
|
841
|
+
trigger: string | null;
|
|
767
842
|
/**
|
|
768
843
|
* The placement of the popover relative to the trigger.
|
|
769
844
|
* @selector [data-placement="left | right | top | bottom"]
|
|
@@ -843,52 +918,6 @@ export const ComboBoxStateContext: React.Context<ComboBoxState<any>>;
|
|
|
843
918
|
* A combo box combines a text input with a listbox, allowing users to filter a list of options to items matching a query.
|
|
844
919
|
*/
|
|
845
920
|
export const ComboBox: <T extends object>(props: ComboBoxProps<T> & React.RefAttributes<HTMLDivElement>) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
846
|
-
export interface GroupRenderProps {
|
|
847
|
-
/**
|
|
848
|
-
* Whether the group is currently hovered with a mouse.
|
|
849
|
-
* @selector [data-hovered]
|
|
850
|
-
*/
|
|
851
|
-
isHovered: boolean;
|
|
852
|
-
/**
|
|
853
|
-
* Whether an element within the group is focused, either via a mouse or keyboard.
|
|
854
|
-
* @selector [data-focus-within]
|
|
855
|
-
*/
|
|
856
|
-
isFocusWithin: boolean;
|
|
857
|
-
/**
|
|
858
|
-
* Whether an element within the group is keyboard focused.
|
|
859
|
-
* @selector [data-focus-visible]
|
|
860
|
-
*/
|
|
861
|
-
isFocusVisible: boolean;
|
|
862
|
-
/**
|
|
863
|
-
* Whether the group is disabled.
|
|
864
|
-
* @selector [data-disabled]
|
|
865
|
-
*/
|
|
866
|
-
isDisabled: boolean;
|
|
867
|
-
/**
|
|
868
|
-
* Whether the group is invalid.
|
|
869
|
-
* @selector [data-invalid]
|
|
870
|
-
*/
|
|
871
|
-
isInvalid: boolean;
|
|
872
|
-
}
|
|
873
|
-
export interface GroupProps extends AriaLabelingProps, Omit<HTMLAttributes<HTMLElement>, 'children' | 'className' | 'style' | 'role' | 'slot'>, _DOMProps1, HoverProps, RenderProps<GroupRenderProps>, SlotProps {
|
|
874
|
-
/** Whether the group is disabled. */
|
|
875
|
-
isDisabled?: boolean;
|
|
876
|
-
/** Whether the group is invalid. */
|
|
877
|
-
isInvalid?: boolean;
|
|
878
|
-
/**
|
|
879
|
-
* An accessibility role for the group. By default, this is set to `'group'`.
|
|
880
|
-
* Use `'region'` when the contents of the group is important enough to be
|
|
881
|
-
* included in the page table of contents. Use `'presentation'` if the group
|
|
882
|
-
* is visual only and does not represent a semantic grouping of controls.
|
|
883
|
-
* @default 'group'
|
|
884
|
-
*/
|
|
885
|
-
role?: 'group' | 'region' | 'presentation';
|
|
886
|
-
}
|
|
887
|
-
export const GroupContext: React.Context<ContextValue<GroupProps, HTMLDivElement>>;
|
|
888
|
-
/**
|
|
889
|
-
* A group represents a set of related UI controls, and supports interactive states for styling.
|
|
890
|
-
*/
|
|
891
|
-
export const Group: (props: GroupProps & React.RefAttributes<HTMLDivElement>) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
892
921
|
export interface DateFieldRenderProps {
|
|
893
922
|
/**
|
|
894
923
|
* State of the date field.
|
|
@@ -1034,7 +1063,7 @@ export interface DateRangePickerRenderProps extends Omit<DatePickerRenderProps,
|
|
|
1034
1063
|
*/
|
|
1035
1064
|
state: DateRangePickerState;
|
|
1036
1065
|
}
|
|
1037
|
-
export interface DatePickerProps<T extends DateValue> extends Omit<AriaDatePickerProps<T>, 'label' | 'description' | 'errorMessage' | 'validationState'>, Pick<DatePickerStateOptions<T>, 'shouldCloseOnSelect'>, RACValidation, RenderProps<DatePickerRenderProps>, SlotProps {
|
|
1066
|
+
export interface DatePickerProps<T extends DateValue> extends Omit<AriaDatePickerProps<T>, 'label' | 'description' | 'errorMessage' | 'validationState' | 'validationBehavior'>, Pick<DatePickerStateOptions<T>, 'shouldCloseOnSelect'>, RACValidation, RenderProps<DatePickerRenderProps>, SlotProps {
|
|
1038
1067
|
}
|
|
1039
1068
|
export interface DateRangePickerProps<T extends DateValue> extends Omit<AriaDateRangePickerProps<T>, 'label' | 'description' | 'errorMessage' | 'validationState' | 'validationBehavior'>, Pick<DateRangePickerStateOptions<T>, 'shouldCloseOnSelect'>, RACValidation, RenderProps<DateRangePickerRenderProps>, SlotProps {
|
|
1040
1069
|
}
|
|
@@ -1101,6 +1130,10 @@ export interface FileTriggerProps {
|
|
|
1101
1130
|
* The children of the component.
|
|
1102
1131
|
*/
|
|
1103
1132
|
children?: ReactNode;
|
|
1133
|
+
/**
|
|
1134
|
+
* Enables the selection of directories instead of individual files.
|
|
1135
|
+
*/
|
|
1136
|
+
acceptDirectory?: boolean;
|
|
1104
1137
|
}
|
|
1105
1138
|
/**
|
|
1106
1139
|
* A FileTrigger allows a user to access the file system with any pressable React Aria or React Spectrum component, or custom components built with usePress.
|
|
@@ -1139,7 +1172,7 @@ export interface GridListRenderProps {
|
|
|
1139
1172
|
*/
|
|
1140
1173
|
state: ListState<unknown>;
|
|
1141
1174
|
}
|
|
1142
|
-
export interface GridListProps<T> extends Omit<AriaGridListProps<T>, 'children'>, CollectionProps<T>, StyleRenderProps<GridListRenderProps>, SlotProps {
|
|
1175
|
+
export interface GridListProps<T> extends Omit<AriaGridListProps<T>, 'children'>, CollectionProps<T>, StyleRenderProps<GridListRenderProps>, SlotProps, ScrollableProps<HTMLDivElement> {
|
|
1143
1176
|
/** How multiple selection should behave in the collection. */
|
|
1144
1177
|
selectionBehavior?: SelectionBehavior;
|
|
1145
1178
|
/** The drag and drop hooks returned by `useDragAndDrop` used to enable drag and drop behavior for the GridList. */
|
|
@@ -1177,7 +1210,7 @@ export interface MenuTriggerProps extends _MenuTriggerProps1 {
|
|
|
1177
1210
|
children?: ReactNode;
|
|
1178
1211
|
}
|
|
1179
1212
|
export function MenuTrigger(props: MenuTriggerProps): React.JSX.Element;
|
|
1180
|
-
export interface MenuProps<T> extends Omit<AriaMenuProps<T>, 'children'>, CollectionProps<T>, StyleProps, SlotProps {
|
|
1213
|
+
export interface MenuProps<T> extends Omit<AriaMenuProps<T>, 'children'>, CollectionProps<T>, StyleProps, SlotProps, ScrollableProps<HTMLDivElement> {
|
|
1181
1214
|
}
|
|
1182
1215
|
/**
|
|
1183
1216
|
* A menu displays a list of actions or options that a user can choose.
|
|
@@ -1226,6 +1259,11 @@ export interface ModalOverlayProps extends AriaModalOverlayProps, OverlayTrigger
|
|
|
1226
1259
|
* Whether the modal is currently performing an exit animation.
|
|
1227
1260
|
*/
|
|
1228
1261
|
isExiting?: boolean;
|
|
1262
|
+
/**
|
|
1263
|
+
* The container element in which the overlay portal will be placed. This may have unknown behavior depending on where it is portalled to.
|
|
1264
|
+
* @default document.body
|
|
1265
|
+
*/
|
|
1266
|
+
UNSTABLE_portalContainer?: Element;
|
|
1229
1267
|
}
|
|
1230
1268
|
export const ModalContext: React.Context<ContextValue<ModalOverlayProps, HTMLDivElement>>;
|
|
1231
1269
|
export interface ModalRenderProps {
|
|
@@ -1383,7 +1421,7 @@ export interface RadioRenderProps {
|
|
|
1383
1421
|
isRequired: boolean;
|
|
1384
1422
|
}
|
|
1385
1423
|
export const RadioGroupContext: React.Context<ContextValue<RadioGroupProps, HTMLDivElement>>;
|
|
1386
|
-
export const RadioContext: React.Context<ContextValue<Partial<RadioProps>,
|
|
1424
|
+
export const RadioContext: React.Context<ContextValue<Partial<RadioProps>, HTMLLabelElement>>;
|
|
1387
1425
|
export const RadioGroupStateContext: React.Context<RadioGroupState>;
|
|
1388
1426
|
/**
|
|
1389
1427
|
* A radio group allows a user to select a single item from a list of mutually exclusive options.
|
|
@@ -1392,7 +1430,7 @@ export const RadioGroup: (props: RadioGroupProps & React.RefAttributes<HTMLDivEl
|
|
|
1392
1430
|
/**
|
|
1393
1431
|
* A radio represents an individual option within a radio group.
|
|
1394
1432
|
*/
|
|
1395
|
-
export const Radio: (props: RadioProps & React.RefAttributes<
|
|
1433
|
+
export const Radio: (props: RadioProps & React.RefAttributes<HTMLLabelElement>) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
1396
1434
|
export interface SearchFieldRenderProps {
|
|
1397
1435
|
/**
|
|
1398
1436
|
* Whether the search field is empty.
|
|
@@ -1564,7 +1602,7 @@ export interface SliderThumbRenderProps {
|
|
|
1564
1602
|
*/
|
|
1565
1603
|
isDisabled: boolean;
|
|
1566
1604
|
}
|
|
1567
|
-
export interface SliderThumbProps extends Omit<AriaSliderThumbProps, 'validationState'>, HoverEvents, RenderProps<SliderThumbRenderProps> {
|
|
1605
|
+
export interface SliderThumbProps extends Omit<AriaSliderThumbProps, 'label' | 'validationState'>, HoverEvents, RenderProps<SliderThumbRenderProps> {
|
|
1568
1606
|
}
|
|
1569
1607
|
/**
|
|
1570
1608
|
* A slider thumb represents an individual value that the user can adjust within a slider track.
|
|
@@ -1613,12 +1651,12 @@ export interface SwitchRenderProps {
|
|
|
1613
1651
|
*/
|
|
1614
1652
|
state: ToggleState;
|
|
1615
1653
|
}
|
|
1616
|
-
export const SwitchContext: React.Context<ContextValue<SwitchProps,
|
|
1654
|
+
export const SwitchContext: React.Context<ContextValue<SwitchProps, HTMLLabelElement>>;
|
|
1617
1655
|
/**
|
|
1618
1656
|
* A switch allows a user to turn a setting on or off.
|
|
1619
1657
|
*/
|
|
1620
|
-
export const Switch: (props: SwitchProps & React.RefAttributes<
|
|
1621
|
-
export interface ResizableTableContainerProps extends DOMProps {
|
|
1658
|
+
export const Switch: (props: SwitchProps & React.RefAttributes<HTMLLabelElement>) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
1659
|
+
export interface ResizableTableContainerProps extends DOMProps, ScrollableProps<HTMLDivElement> {
|
|
1622
1660
|
/**
|
|
1623
1661
|
* Handler that is called when a user starts a column resize.
|
|
1624
1662
|
*/
|
|
@@ -1660,7 +1698,7 @@ export interface TableRenderProps {
|
|
|
1660
1698
|
*/
|
|
1661
1699
|
state: TableState<unknown>;
|
|
1662
1700
|
}
|
|
1663
|
-
export interface TableProps extends Omit<_TableProps1<any>, 'children'>, StyleRenderProps<TableRenderProps>, SlotProps, AriaLabelingProps {
|
|
1701
|
+
export interface TableProps extends Omit<_TableProps1<any>, 'children'>, StyleRenderProps<TableRenderProps>, SlotProps, AriaLabelingProps, ScrollableProps<HTMLTableElement> {
|
|
1664
1702
|
/** The elements that make up the table. Includes the TableHeader, TableBody, Columns, and Rows. */
|
|
1665
1703
|
children?: ReactNode;
|
|
1666
1704
|
/**
|
|
@@ -1675,8 +1713,6 @@ export interface TableProps extends Omit<_TableProps1<any>, 'children'>, StyleRe
|
|
|
1675
1713
|
disabledBehavior?: DisabledBehavior;
|
|
1676
1714
|
/** Handler that is called when a user performs an action on the row. */
|
|
1677
1715
|
onRowAction?: (key: Key) => void;
|
|
1678
|
-
/** Handler that is called when a user performs an action on the cell. */
|
|
1679
|
-
onCellAction?: (key: Key) => void;
|
|
1680
1716
|
/** The drag and drop hooks returned by `useDragAndDrop` used to enable drag and drop behavior for the Table. */
|
|
1681
1717
|
dragAndDropHooks?: DragAndDropHooks;
|
|
1682
1718
|
}
|
|
@@ -1704,6 +1740,8 @@ export interface TableHeaderProps<T> extends StyleProps {
|
|
|
1704
1740
|
columns?: T[];
|
|
1705
1741
|
/** A list of `Column(s)` or a function. If the latter, a list of columns must be provided using the `columns` prop. */
|
|
1706
1742
|
children?: ReactNode | ((item: T) => ReactElement);
|
|
1743
|
+
/** Values that should invalidate the column cache when using dynamic collections. */
|
|
1744
|
+
dependencies?: any[];
|
|
1707
1745
|
}
|
|
1708
1746
|
/**
|
|
1709
1747
|
* A header within a `<Table>`, containing the table columns.
|
|
@@ -1749,12 +1787,9 @@ export interface ColumnRenderProps {
|
|
|
1749
1787
|
*/
|
|
1750
1788
|
startResize(): void;
|
|
1751
1789
|
}
|
|
1752
|
-
export interface ColumnProps
|
|
1790
|
+
export interface ColumnProps extends RenderProps<ColumnRenderProps> {
|
|
1791
|
+
/** The unique id of the column. */
|
|
1753
1792
|
id?: Key;
|
|
1754
|
-
/** Rendered contents of the column if `children` contains child columns. */
|
|
1755
|
-
title?: ReactNode;
|
|
1756
|
-
/** A list of child columns used when dynamically rendering nested child columns. */
|
|
1757
|
-
childColumns?: Iterable<T>;
|
|
1758
1793
|
/** Whether the column allows sorting. */
|
|
1759
1794
|
allowsSorting?: boolean;
|
|
1760
1795
|
/** Whether a column is a [row header](https://www.w3.org/TR/wai-aria-1.1/#rowheader) and should be announced by assistive technology during row navigation. */
|
|
@@ -1773,7 +1808,7 @@ export interface ColumnProps<T = object> extends RenderProps<ColumnRenderProps>
|
|
|
1773
1808
|
/**
|
|
1774
1809
|
* A column within a `<Table>`.
|
|
1775
1810
|
*/
|
|
1776
|
-
export const Column:
|
|
1811
|
+
export const Column: (props: ColumnProps & React.RefAttributes<HTMLTableCellElement>) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
1777
1812
|
export interface TableBodyRenderProps {
|
|
1778
1813
|
/**
|
|
1779
1814
|
* Whether the table body has no rows and should display its empty state.
|
|
@@ -1797,11 +1832,16 @@ export const TableBody: <T extends object>(props: TableBodyProps<T> & React.RefA
|
|
|
1797
1832
|
export interface RowRenderProps extends ItemRenderProps {
|
|
1798
1833
|
}
|
|
1799
1834
|
export interface RowProps<T> extends StyleRenderProps<RowRenderProps>, LinkDOMProps {
|
|
1835
|
+
/** The unique id of the row. */
|
|
1800
1836
|
id?: Key;
|
|
1801
1837
|
/** A list of columns used when dynamically rendering cells. */
|
|
1802
1838
|
columns?: Iterable<T>;
|
|
1803
1839
|
/** The cells within the row. Supports static items or a function for dynamic rendering. */
|
|
1804
1840
|
children?: ReactNode | ((item: T) => ReactElement);
|
|
1841
|
+
/** The object value that this row represents. When using dynamic collections, this is set automatically. */
|
|
1842
|
+
value?: T;
|
|
1843
|
+
/** Values that should invalidate the cell cache when using dynamic collections. */
|
|
1844
|
+
dependencies?: any[];
|
|
1805
1845
|
/** A string representation of the row's contents, used for features like typeahead. */
|
|
1806
1846
|
textValue?: string;
|
|
1807
1847
|
}
|
|
@@ -1832,6 +1872,7 @@ export interface CellRenderProps {
|
|
|
1832
1872
|
isHovered: boolean;
|
|
1833
1873
|
}
|
|
1834
1874
|
export interface CellProps extends RenderProps<CellRenderProps> {
|
|
1875
|
+
/** The unique id of the cell. */
|
|
1835
1876
|
id?: Key;
|
|
1836
1877
|
/** A string representation of the cell's contents, used for features like typeahead. */
|
|
1837
1878
|
textValue?: string;
|
|
@@ -1895,6 +1936,7 @@ export interface TabListRenderProps {
|
|
|
1895
1936
|
state: TabListState<unknown>;
|
|
1896
1937
|
}
|
|
1897
1938
|
export interface TabProps extends RenderProps<TabRenderProps>, AriaLabelingProps, LinkDOMProps {
|
|
1939
|
+
/** The unique id of the tab. */
|
|
1898
1940
|
id?: Key;
|
|
1899
1941
|
}
|
|
1900
1942
|
export interface TabRenderProps {
|
|
@@ -2114,6 +2156,11 @@ export interface TooltipProps extends PositionProps, OverlayTriggerProps, AriaLa
|
|
|
2114
2156
|
* Whether the tooltip is currently performing an exit animation.
|
|
2115
2157
|
*/
|
|
2116
2158
|
isExiting?: boolean;
|
|
2159
|
+
/**
|
|
2160
|
+
* The container element in which the overlay portal will be placed. This may have unknown behavior depending on where it is portalled to.
|
|
2161
|
+
* @default document.body
|
|
2162
|
+
*/
|
|
2163
|
+
UNSTABLE_portalContainer?: Element;
|
|
2117
2164
|
}
|
|
2118
2165
|
export interface TooltipRenderProps {
|
|
2119
2166
|
/**
|
|
@@ -2148,7 +2195,7 @@ export function TooltipTrigger(props: TooltipTriggerComponentProps): React.JSX.E
|
|
|
2148
2195
|
* A tooltip displays a description of an element on hover or focus.
|
|
2149
2196
|
*/
|
|
2150
2197
|
export const Tooltip: (props: TooltipProps & React.RefAttributes<HTMLDivElement>) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
2151
|
-
export { DIRECTORY_DRAG_TYPE, isDirectoryDropItem, isFileDropItem, isTextDropItem, SSRProvider, RouterProvider, I18nProvider } from 'react-aria';
|
|
2198
|
+
export { DIRECTORY_DRAG_TYPE, isDirectoryDropItem, isFileDropItem, isTextDropItem, SSRProvider, RouterProvider, I18nProvider, useLocale } from 'react-aria';
|
|
2152
2199
|
export { FormValidationContext } from 'react-stately';
|
|
2153
2200
|
export type { DateValue, DateRange, TimeValue } from 'react-aria';
|
|
2154
2201
|
export type { DirectoryDropItem, DraggableCollectionEndEvent, DraggableCollectionMoveEvent, DraggableCollectionStartEvent, DragPreviewRenderer, DragTypes, DropItem, DropOperation, DroppableCollectionDropEvent, DroppableCollectionEnterEvent, DroppableCollectionExitEvent, DroppableCollectionInsertDropEvent, DroppableCollectionMoveEvent, DroppableCollectionOnItemDropEvent, DroppableCollectionReorderEvent, DroppableCollectionRootDropEvent, DropPosition, DropTarget, FileDropItem, ItemDropTarget, RootDropTarget, TextDropItem, PressEvent } from 'react-aria';
|