react-aria-components 0.0.4 → 1.0.0-alpha.2

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.
Files changed (91) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +12 -29
  3. package/dist/import.mjs +5223 -0
  4. package/dist/main.js +5345 -0
  5. package/dist/main.js.map +1 -0
  6. package/dist/module.js +5223 -0
  7. package/dist/module.js.map +1 -0
  8. package/dist/types.d.ts +1481 -0
  9. package/dist/types.d.ts.map +1 -0
  10. package/package.json +36 -44
  11. package/src/Breadcrumbs.tsx +90 -0
  12. package/src/Button.tsx +79 -0
  13. package/src/Calendar.tsx +471 -0
  14. package/src/Checkbox.tsx +240 -0
  15. package/src/Collection.tsx +787 -0
  16. package/src/ComboBox.tsx +129 -0
  17. package/src/DateField.tsx +244 -0
  18. package/src/DatePicker.tsx +178 -0
  19. package/src/Dialog.tsx +95 -0
  20. package/src/GridList.tsx +411 -0
  21. package/src/Group.tsx +69 -0
  22. package/src/Header.tsx +34 -0
  23. package/src/Heading.tsx +35 -0
  24. package/src/Input.tsx +73 -0
  25. package/src/Keyboard.tsx +24 -0
  26. package/src/Label.tsx +30 -0
  27. package/src/Link.tsx +98 -0
  28. package/src/ListBox.tsx +406 -0
  29. package/src/Menu.tsx +227 -0
  30. package/src/Meter.tsx +73 -0
  31. package/src/Modal.tsx +192 -0
  32. package/src/NumberField.tsx +79 -0
  33. package/src/OverlayArrow.tsx +70 -0
  34. package/src/Popover.tsx +125 -0
  35. package/src/ProgressBar.tsx +81 -0
  36. package/src/RadioGroup.tsx +219 -0
  37. package/src/SearchField.tsx +78 -0
  38. package/src/Select.tsx +180 -0
  39. package/src/Separator.tsx +53 -0
  40. package/src/Slider.tsx +217 -0
  41. package/src/Switch.tsx +127 -0
  42. package/src/Table.tsx +917 -0
  43. package/src/Tabs.tsx +282 -0
  44. package/src/Text.tsx +30 -0
  45. package/src/TextField.tsx +62 -0
  46. package/src/ToggleButton.tsx +59 -0
  47. package/src/Tooltip.tsx +135 -0
  48. package/src/index.ts +94 -0
  49. package/src/useDragAndDrop.tsx +172 -0
  50. package/src/utils.tsx +235 -0
  51. package/.babelrc +0 -17
  52. package/.eslintrc +0 -12
  53. package/src/accordion/accordion.css +0 -4
  54. package/src/accordion/accordion.js +0 -20
  55. package/src/accordion/index.js +0 -2
  56. package/src/accordion/section.css +0 -21
  57. package/src/accordion/section.js +0 -85
  58. package/src/examples/accordion-example.js +0 -73
  59. package/src/examples/example.js +0 -21
  60. package/src/examples/grid-cells/fancy-input-grid-cell.js +0 -206
  61. package/src/examples/grid-cells/input-grid-cell.js +0 -44
  62. package/src/examples/grid-example.css +0 -23
  63. package/src/examples/grid-example.js +0 -231
  64. package/src/examples/index.html +0 -10
  65. package/src/examples/index.js +0 -53
  66. package/src/examples/tabs-example.js +0 -52
  67. package/src/grid/column-header.css +0 -4
  68. package/src/grid/column-header.js +0 -29
  69. package/src/grid/grid-cell.css +0 -16
  70. package/src/grid/grid-cell.js +0 -104
  71. package/src/grid/grid-context.js +0 -3
  72. package/src/grid/grid.css +0 -4
  73. package/src/grid/grid.js +0 -110
  74. package/src/grid/index.js +0 -6
  75. package/src/grid/interactive-grid-cell.js +0 -96
  76. package/src/grid/row-headers.css +0 -6
  77. package/src/grid/row-headers.js +0 -22
  78. package/src/grid/row.css +0 -5
  79. package/src/grid/row.js +0 -21
  80. package/src/prop-types/ref.js +0 -3
  81. package/src/tabs/index.js +0 -4
  82. package/src/tabs/tab-list.css +0 -6
  83. package/src/tabs/tab-list.js +0 -103
  84. package/src/tabs/tab-panels.js +0 -35
  85. package/src/tabs/tab.css +0 -10
  86. package/src/tabs/tab.js +0 -45
  87. package/src/tabs/tabs.js +0 -52
  88. package/src/utils/debounce.js +0 -12
  89. package/src/utils/event-handlers-factory.js +0 -42
  90. package/src/utils/unique-id.js +0 -6
  91. package/webpack.config.js +0 -43
@@ -0,0 +1,1481 @@
1
+ import React, { CSSProperties, ReactNode, RefObject, Key, ReactElement, HTMLAttributes, LabelHTMLAttributes, InputHTMLAttributes, ForwardedRef } from "react";
2
+ import { CollectionBase, DraggableCollectionProps, DroppableCollectionProps, AriaLabelingProps } from "@react-types/shared";
3
+ import { SelectionBehavior, SelectionMode, ItemProps as _ItemProps1, SectionProps as _SectionProps1, CalendarState, RangeCalendarState, ValidationState, DraggableCollectionState, DraggableCollectionStateOptions, DroppableCollectionState, DroppableCollectionStateOptions, ListState, OverlayTriggerState, ComboBoxState, DateFieldState, DateSegmentType, DateSegment as _DateSegment1, OverlayTriggerProps, DatePickerState, DateRangePickerState, MenuTriggerProps as _MenuTriggerProps1, NumberFieldState, SearchFieldState, SelectState, SliderState, DisabledBehavior, SortDirection, TooltipTriggerProps } from "react-stately";
4
+ import { AriaLinkOptions, 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, AriaComboBoxProps, AriaDateFieldProps, AriaTimeFieldProps, TimeValue, AriaModalOverlayProps, AriaDialogProps, AriaDatePickerProps, AriaDateRangePickerProps, AriaGridListProps, AriaMenuProps, AriaMeterProps, AriaNumberFieldProps, AriaProgressBarProps, AriaRadioGroupProps, AriaRadioProps, Orientation, AriaSearchFieldProps, AriaSelectProps, AriaSliderProps, AriaSliderThumbProps, AriaSwitchProps, AriaTabListProps, AriaTabPanelProps, AriaTextFieldProps, AriaToggleButtonProps } from "react-aria";
5
+ import { CalendarDate, DateDuration } from "@internationalized/date";
6
+ import { TableProps as _TableProps1 } from "@react-types/table";
7
+ declare const slotCallbackSymbol: unique symbol;
8
+ interface SlottedValue<T> {
9
+ slots?: Record<string | symbol, T>;
10
+ [slotCallbackSymbol]?: (value: T) => void;
11
+ }
12
+ type ContextValue<T extends SlotProps, E extends Element> = SlottedValue<WithRef<T, E>> | WithRef<T, E> | null | undefined;
13
+ type ProviderValue<T> = [React.Context<T>, T];
14
+ type ProviderValues<A, B, C, D, E, F, G, H> = [ProviderValue<A>] | [ProviderValue<A>, ProviderValue<B>] | [ProviderValue<A>, ProviderValue<B>, ProviderValue<C>] | [ProviderValue<A>, ProviderValue<B>, ProviderValue<C>, ProviderValue<D>] | [ProviderValue<A>, ProviderValue<B>, ProviderValue<C>, ProviderValue<D>, ProviderValue<E>] | [ProviderValue<A>, ProviderValue<B>, ProviderValue<C>, ProviderValue<D>, ProviderValue<E>, ProviderValue<F>] | [ProviderValue<A>, ProviderValue<B>, ProviderValue<C>, ProviderValue<D>, ProviderValue<E>, ProviderValue<F>, ProviderValue<G>] | [ProviderValue<A>, ProviderValue<B>, ProviderValue<C>, ProviderValue<D>, ProviderValue<E>, ProviderValue<F>, ProviderValue<G>, ProviderValue<H>];
15
+ interface ProviderProps<A, B, C, D, E, F, G, H> {
16
+ values: ProviderValues<A, B, C, D, E, F, G, H>;
17
+ children: React.ReactNode;
18
+ }
19
+ export function Provider<A, B, C, D, E, F, G, H>({ values, children }: ProviderProps<A, B, C, D, E, F, G, H>): JSX.Element;
20
+ interface StyleProps {
21
+ /** The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. */
22
+ className?: string;
23
+ /** The inline [style](https://developer.mozilla.org/en-US/docs/Web/API/Element/style) for the element. */
24
+ style?: CSSProperties;
25
+ }
26
+ interface DOMProps extends StyleProps {
27
+ /** The children of the component. */
28
+ children?: ReactNode;
29
+ }
30
+ interface StyleRenderProps<T> {
31
+ /** 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. */
32
+ className?: string | ((values: T) => string);
33
+ /** The inline [style](https://developer.mozilla.org/en-US/docs/Web/API/Element/style) for the element. A function may be provided to compute the style based on component state. */
34
+ style?: CSSProperties | ((values: T) => CSSProperties);
35
+ }
36
+ interface RenderProps<T> extends StyleRenderProps<T> {
37
+ /** The children of the component. A function may be provided to alter the children based on component state. */
38
+ children?: ReactNode | ((values: T) => ReactNode);
39
+ }
40
+ type WithRef<T, E> = T & {
41
+ ref?: React.ForwardedRef<E>;
42
+ };
43
+ interface SlotProps {
44
+ /** A slot name for the component. Slots allow the component to receive props from a parent component. */
45
+ slot?: string;
46
+ }
47
+ export function useContextProps<T, U, E extends Element>(props: T & SlotProps, ref: React.ForwardedRef<E>, context: React.Context<ContextValue<U, E>>): [T, React.RefObject<E>];
48
+ interface CollectionProps<T> extends Omit<CollectionBase<T>, 'children'> {
49
+ /** The contents of the collection. */
50
+ children?: ReactNode | ((item: T) => ReactElement);
51
+ }
52
+ export interface ItemRenderProps {
53
+ /**
54
+ * Whether the item is currently hovered with a mouse.
55
+ * @selector [data-hovered]
56
+ */
57
+ isHovered: boolean;
58
+ /**
59
+ * Whether the item is currently in a pressed state.
60
+ * @selector [data-pressed]
61
+ */
62
+ isPressed: boolean;
63
+ /**
64
+ * Whether the item is currently selected.
65
+ * @selector [aria-selected=true]
66
+ */
67
+ isSelected: boolean;
68
+ /**
69
+ * Whether the item is currently focused.
70
+ * @selector [data-focused]
71
+ */
72
+ isFocused: boolean;
73
+ /**
74
+ * Whether the item is currently keyboard focused.
75
+ * @selector [data-focus-visible]
76
+ */
77
+ isFocusVisible: boolean;
78
+ /**
79
+ * Whether the item is non-interactive, i.e. both selection and actions are disabled and the item may
80
+ * not be focused. Dependent on `disabledKeys` and `disabledBehavior`.
81
+ * @selector [aria-disabled]
82
+ */
83
+ isDisabled: boolean;
84
+ /** The type of selection that is allowed in the collection. */
85
+ selectionMode: SelectionMode;
86
+ /** The selection behavior for the collection. */
87
+ selectionBehavior: SelectionBehavior;
88
+ /**
89
+ * Whether the item allows dragging.
90
+ * @note This property is only available in collection components that support drag and drop.
91
+ * @selector [draggable]
92
+ */
93
+ allowsDragging?: boolean;
94
+ /**
95
+ * Whether the item is currently being dragged.
96
+ * @note This property is only available in collection components that support drag and drop.
97
+ * @selector [data-dragging]
98
+ */
99
+ isDragging?: boolean;
100
+ /**
101
+ * Whether the item is currently an active drop target.
102
+ * @note This property is only available in collection components that support drag and drop.
103
+ * @selector [data-drop-target]
104
+ */
105
+ isDropTarget?: boolean;
106
+ }
107
+ export interface ItemProps<T = object> extends Omit<_ItemProps1<T>, 'children'>, RenderProps<ItemRenderProps> {
108
+ /** The unique id of the item. */
109
+ id?: Key;
110
+ /** The object value that this item represents. When using dynamic collections, this is set automatically. */
111
+ value?: T;
112
+ }
113
+ export function Item<T extends object>(props: ItemProps<T>): JSX.Element;
114
+ export interface SectionProps<T> extends Omit<_SectionProps1<T>, 'children' | 'title'>, DOMProps {
115
+ /** The unique id of the section. */
116
+ id?: Key;
117
+ /** The object value that this section represents. When using dynamic collections, this is set automatically. */
118
+ value?: T;
119
+ /** Static child items or a function to render children. */
120
+ children?: ReactNode | ((item: T) => ReactElement);
121
+ }
122
+ export function Section<T extends object>(props: SectionProps<T>): JSX.Element;
123
+ /** A Collection renders a list of items, automatically managing caching and keys. */
124
+ export function Collection<T extends object>(props: CollectionProps<T>): JSX.Element;
125
+ export interface HeadingProps extends HTMLAttributes<HTMLElement> {
126
+ level?: number;
127
+ }
128
+ export const HeadingContext: React.Context<ContextValue<HeadingProps, HTMLHeadingElement>>;
129
+ export const Heading: React.ForwardRefExoticComponent<HeadingProps & React.RefAttributes<HTMLHeadingElement>>;
130
+ export interface LinkProps extends Omit<AriaLinkOptions, 'elementType'>, RenderProps<LinkRenderProps>, SlotProps {
131
+ }
132
+ export interface LinkRenderProps {
133
+ /**
134
+ * Whether the link is the current item within a list.
135
+ * @selector [aria-current]
136
+ */
137
+ isCurrent: boolean;
138
+ /**
139
+ * Whether the link is currently hovered with a mouse.
140
+ * @selector [data-hovered]
141
+ */
142
+ isHovered: boolean;
143
+ /**
144
+ * Whether the link is currently in a pressed state.
145
+ * @selector [data-pressed]
146
+ */
147
+ isPressed: boolean;
148
+ /**
149
+ * Whether the link is focused, either via a mouse or keyboard.
150
+ * @selector :focus
151
+ */
152
+ isFocused: boolean;
153
+ /**
154
+ * Whether the link is keyboard focused.
155
+ * @selector [data-focus-visible]
156
+ */
157
+ isFocusVisible: boolean;
158
+ /**
159
+ * Whether the link is disabled.
160
+ * @selector [aria-disabled]
161
+ */
162
+ isDisabled: boolean;
163
+ }
164
+ export const LinkContext: React.Context<ContextValue<LinkProps, HTMLAnchorElement>>;
165
+ /**
166
+ * A link allows a user to navigate to another page or resource within a web page
167
+ * or application.
168
+ */
169
+ export const Link: React.ForwardRefExoticComponent<LinkProps & React.RefAttributes<HTMLAnchorElement>>;
170
+ export interface BreadcrumbsProps<T> extends Omit<CollectionProps<T>, 'disabledKeys'>, Omit<AriaBreadcrumbsProps, 'children'>, StyleProps, SlotProps {
171
+ /** Whether the breadcrumbs are disabled. */
172
+ isDisabled?: boolean;
173
+ }
174
+ export const BreadcrumbsContext: React.Context<ContextValue<BreadcrumbsProps<any>, HTMLElement>>;
175
+ /**
176
+ * Breadcrumbs display a heirarchy of links to the current page or resource in an application.
177
+ */
178
+ export const Breadcrumbs: <T extends object>(props: BreadcrumbsProps<T> & React.RefAttributes<HTMLElement>) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
179
+ export interface ButtonRenderProps {
180
+ /**
181
+ * Whether the button is currently hovered with a mouse.
182
+ * @selector [data-hovered]
183
+ */
184
+ isHovered: boolean;
185
+ /**
186
+ * Whether the button is currently in a pressed state.
187
+ * @selector [data-pressed]
188
+ */
189
+ isPressed: boolean;
190
+ /**
191
+ * Whether the button is focused, either via a mouse or keyboard.
192
+ * @selector :focus
193
+ */
194
+ isFocused: boolean;
195
+ /**
196
+ * Whether the button is keyboard focused.
197
+ * @selector [data-focus-visible]
198
+ */
199
+ isFocusVisible: boolean;
200
+ /**
201
+ * Whether the button is disabled.
202
+ * @selector :disabled
203
+ */
204
+ isDisabled: boolean;
205
+ }
206
+ export interface ButtonProps extends Omit<AriaButtonProps, 'children' | 'href' | 'target' | 'rel' | 'elementType'>, SlotProps, RenderProps<ButtonRenderProps> {
207
+ }
208
+ interface ButtonContextValue extends ButtonProps {
209
+ isPressed?: boolean;
210
+ }
211
+ export const ButtonContext: React.Context<ContextValue<ButtonContextValue, HTMLButtonElement>>;
212
+ /**
213
+ * A button allows a user to perform an action, with mouse, touch, and keyboard interactions.
214
+ */
215
+ export const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
216
+ export interface TextProps extends HTMLAttributes<HTMLElement> {
217
+ elementType?: string;
218
+ }
219
+ export const TextContext: React.Context<ContextValue<TextProps, HTMLElement>>;
220
+ export const Text: React.ForwardRefExoticComponent<TextProps & React.RefAttributes<HTMLElement>>;
221
+ export interface CalendarProps<T extends DateValue> extends Omit<_CalendarProps1<T>, 'errorMessage'>, RenderProps<CalendarState>, SlotProps {
222
+ /**
223
+ * The amount of days that will be displayed at once. This affects how pagination works.
224
+ * @default {months: 1}
225
+ */
226
+ visibleDuration?: DateDuration;
227
+ }
228
+ export interface RangeCalendarProps<T extends DateValue> extends Omit<_RangeCalendarProps1<T>, 'errorMessage'>, RenderProps<RangeCalendarState>, SlotProps {
229
+ /**
230
+ * The amount of days that will be displayed at once. This affects how pagination works.
231
+ * @default {months: 1}
232
+ */
233
+ visibleDuration?: DateDuration;
234
+ }
235
+ export const CalendarContext: React.Context<ContextValue<CalendarProps<any>, HTMLDivElement>>;
236
+ export const RangeCalendarContext: React.Context<ContextValue<RangeCalendarProps<any>, HTMLDivElement>>;
237
+ /**
238
+ * A calendar displays one or more date grids and allows users to select a single date.
239
+ */
240
+ export const Calendar: <T extends DateValue>(props: CalendarProps<T> & React.RefAttributes<HTMLDivElement>) => ReactElement<any, string | React.JSXElementConstructor<any>>;
241
+ /**
242
+ * A range calendar displays one or more date grids and allows users to select a contiguous range of dates.
243
+ */
244
+ export const RangeCalendar: <T extends DateValue>(props: RangeCalendarProps<T> & React.RefAttributes<HTMLDivElement>) => ReactElement<any, string | React.JSXElementConstructor<any>>;
245
+ export interface CalendarCellRenderProps {
246
+ /** The date that the cell represents. */
247
+ date: CalendarDate;
248
+ /** The day number formatted according to the current locale. */
249
+ formattedDate: string;
250
+ /**
251
+ * Whether the cell is currently hovered with a mouse.
252
+ * @selector [data-hovered]
253
+ */
254
+ isHovered: boolean;
255
+ /**
256
+ * Whether the cell is currently being pressed.
257
+ * @selector [data-pressed]
258
+ */
259
+ isPressed: boolean;
260
+ /**
261
+ * Whether the cell is selected.
262
+ * @selector [data-selected]
263
+ */
264
+ isSelected: boolean;
265
+ /**
266
+ * Whether the cell is the first date in a range selection.
267
+ * @selector [data-selection-start]
268
+ */
269
+ isSelectionStart: boolean;
270
+ /**
271
+ * Whether the cell is the last date in a range selection.
272
+ * @selector [data-selection-end]
273
+ */
274
+ isSelectionEnd: boolean;
275
+ /**
276
+ * Whether the cell is focused.
277
+ * @selector :focus
278
+ */
279
+ isFocused: boolean;
280
+ /**
281
+ * Whether the cell is keyboard focused.
282
+ * @selector [data-focus-visible]
283
+ */
284
+ isFocusVisible: boolean;
285
+ /**
286
+ * Whether the cell is disabled, according to the calendar's `minValue`, `maxValue`, and `isDisabled` props.
287
+ * Disabled dates are not focusable, and cannot be selected by the user. They are typically
288
+ * displayed with a dimmed appearance.
289
+ * @selector [data-disabled]
290
+ */
291
+ isDisabled: boolean;
292
+ /**
293
+ * Whether the cell is outside the visible range of the calendar.
294
+ * For example, dates before the first day of a month in the same week.
295
+ * @selector [data-outside-visible-range]
296
+ */
297
+ isOutsideVisibleRange: boolean;
298
+ /**
299
+ * Whether the cell is outside the current month.
300
+ * @selector [data-outside-month]
301
+ */
302
+ isOutsideMonth: boolean;
303
+ /**
304
+ * Whether the cell is unavailable, according to the calendar's `isDateUnavailable` prop. Unavailable dates remain
305
+ * focusable, but cannot be selected by the user. They should be displayed with a visual affordance to indicate they
306
+ * are unavailable, such as a different color or a strikethrough.
307
+ *
308
+ * Note that because they are focusable, unavailable dates must meet a 4.5:1 color contrast ratio,
309
+ * [as defined by WCAG](https://www.w3.org/WAI/WCAG21/Understanding/contrast-minimum.html).
310
+ *
311
+ * @selector [data-unavailable]
312
+ */
313
+ isUnavailable: boolean;
314
+ /**
315
+ * Whether the cell is part of an invalid selection.
316
+ * @selector [aria-invalid]
317
+ */
318
+ isInvalid: boolean;
319
+ }
320
+ export interface CalendarGridProps extends StyleProps {
321
+ /**
322
+ * Either a function to render calendar cells for each date in the month,
323
+ * or children containing a `<CalendarGridHeader>`` and `<CalendarGridBody>`
324
+ * when additional customization is needed.
325
+ */
326
+ children?: ReactElement | ReactElement[] | ((date: CalendarDate) => ReactElement);
327
+ /**
328
+ * An offset from the beginning of the visible date range that this
329
+ * CalendarGrid should display. Useful when displaying more than one
330
+ * month at a time.
331
+ */
332
+ offset?: DateDuration;
333
+ }
334
+ /**
335
+ * A calendar grid displays a single grid of days within a calendar or range calendar which
336
+ * can be keyboard navigated and selected by the user.
337
+ */
338
+ export const CalendarGrid: React.ForwardRefExoticComponent<CalendarGridProps & React.RefAttributes<HTMLTableElement>>;
339
+ export interface CalendarGridHeaderProps extends StyleProps {
340
+ /** A function to render a `<CalendarHeaderCell>` for a weekday name. */
341
+ children: (day: string) => ReactElement;
342
+ }
343
+ /**
344
+ * A calendar grid header displays a row of week day names at the top of a month.
345
+ */
346
+ export const CalendarGridHeader: React.ForwardRefExoticComponent<CalendarGridHeaderProps & React.RefAttributes<HTMLTableSectionElement>>;
347
+ export interface CalendarHeaderCellProps extends DOMProps {
348
+ }
349
+ /**
350
+ * A calendar header cell displays a week day name at the top of a column within a calendar.
351
+ */
352
+ export const CalendarHeaderCell: React.ForwardRefExoticComponent<CalendarHeaderCellProps & React.RefAttributes<HTMLTableCellElement>>;
353
+ export interface CalendarGridBodyProps extends StyleProps {
354
+ /** A function to render a `<CalendarCell>` for a given date. */
355
+ children: (date: CalendarDate) => ReactElement;
356
+ }
357
+ /**
358
+ * A calendar grid body displays a grid of calendar cells within a month.
359
+ */
360
+ export const CalendarGridBody: React.ForwardRefExoticComponent<CalendarGridBodyProps & React.RefAttributes<HTMLTableSectionElement>>;
361
+ export interface CalendarCellProps extends RenderProps<CalendarCellRenderProps> {
362
+ /** The date to render in the cell. */
363
+ date: CalendarDate;
364
+ }
365
+ /**
366
+ * A calendar cell displays a date cell within a calendar grid which can be selected by the user.
367
+ */
368
+ export const CalendarCell: React.ForwardRefExoticComponent<CalendarCellProps & React.RefAttributes<HTMLDivElement>>;
369
+ export interface LabelProps extends LabelHTMLAttributes<HTMLLabelElement> {
370
+ elementType?: string;
371
+ }
372
+ export const LabelContext: React.Context<ContextValue<LabelProps, HTMLLabelElement>>;
373
+ export const Label: React.ForwardRefExoticComponent<LabelProps & React.RefAttributes<HTMLLabelElement>>;
374
+ export interface CheckboxGroupProps extends Omit<AriaCheckboxGroupProps, 'children' | 'label' | 'description' | 'errorMessage'>, RenderProps<CheckboxGroupRenderProps>, SlotProps {
375
+ }
376
+ export interface CheckboxProps extends Omit<AriaCheckboxProps, 'children'>, RenderProps<CheckboxRenderProps>, SlotProps {
377
+ }
378
+ export interface CheckboxGroupRenderProps {
379
+ /**
380
+ * Whether the checkbox group is disabled.
381
+ * @selector [aria-disabled]
382
+ */
383
+ isDisabled: boolean;
384
+ /**
385
+ * Whether the checkbox group is read only.
386
+ * @selector [data-readonly]
387
+ */
388
+ isReadOnly: boolean;
389
+ /**
390
+ * Whether the checkbox group is required.
391
+ * @selector [data-required]
392
+ */
393
+ isRequired: boolean;
394
+ /**
395
+ * The validation state of the checkbox group.
396
+ * @selector [data-validation-state="invalid" | "valid"]
397
+ */
398
+ validationState: ValidationState;
399
+ }
400
+ export interface CheckboxRenderProps {
401
+ /**
402
+ * Whether the checkbox is selected.
403
+ * @selector [data-selected]
404
+ */
405
+ isSelected: boolean;
406
+ /**
407
+ * Whether the checkbox is selected.
408
+ * @selector [data-indeterminate]
409
+ */
410
+ isIndeterminate: boolean;
411
+ /**
412
+ * Whether the checkbox is currently hovered with a mouse.
413
+ * @selector [data-hovered]
414
+ */
415
+ isHovered: boolean;
416
+ /**
417
+ * Whether the checkbox is currently in a pressed state.
418
+ * @selector [data-pressed]
419
+ */
420
+ isPressed: boolean;
421
+ /**
422
+ * Whether the checkbox is focused, either via a mouse or keyboard.
423
+ * @selector [data-focused]
424
+ */
425
+ isFocused: boolean;
426
+ /**
427
+ * Whether the checkbox is keyboard focused.
428
+ * @selector [data-focus-visible]
429
+ */
430
+ isFocusVisible: boolean;
431
+ /**
432
+ * Whether the checkbox is disabled.
433
+ * @selector [data-disabled]
434
+ */
435
+ isDisabled: boolean;
436
+ /**
437
+ * Whether the checkbox is read only.
438
+ * @selector [data-readonly]
439
+ */
440
+ isReadOnly: boolean;
441
+ /**
442
+ * Whether the checkbox is valid or invalid.
443
+ * @selector [data-validation-state="valid | invalid"]
444
+ */
445
+ validationState?: ValidationState;
446
+ /**
447
+ * Whether the checkbox is required.
448
+ * @selector [data-required]
449
+ */
450
+ isRequired: boolean;
451
+ }
452
+ export const CheckboxGroupContext: React.Context<ContextValue<CheckboxGroupProps, HTMLDivElement>>;
453
+ export const CheckboxContext: React.Context<ContextValue<CheckboxProps, HTMLInputElement>>;
454
+ /**
455
+ * A checkbox allows a user to select multiple items from a list of individual items, or
456
+ * to mark one individual item as selected.
457
+ */
458
+ export const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>>;
459
+ /**
460
+ * A checkbox group allows a user to select multiple items from a list of options.
461
+ */
462
+ export const CheckboxGroup: React.ForwardRefExoticComponent<CheckboxGroupProps & React.RefAttributes<HTMLDivElement>>;
463
+ export interface InputRenderProps {
464
+ /**
465
+ * Whether the input is currently hovered with a mouse.
466
+ * @selector [data-hovered]
467
+ */
468
+ isHovered: boolean;
469
+ /**
470
+ * Whether the input is focused, either via a mouse or keyboard.
471
+ * @selector :focus
472
+ */
473
+ isFocused: boolean;
474
+ /**
475
+ * Whether the input is keyboard focused.
476
+ * @selector [data-focus-visible]
477
+ */
478
+ isFocusVisible: boolean;
479
+ /**
480
+ * Whether the input is disabled.
481
+ * @selector :disabled
482
+ */
483
+ isDisabled: boolean;
484
+ }
485
+ export interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'className' | 'style'>, StyleRenderProps<InputRenderProps> {
486
+ }
487
+ export const InputContext: React.Context<ContextValue<InputProps, HTMLInputElement>>;
488
+ /**
489
+ * An input allows a user to input text.
490
+ */
491
+ export const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
492
+ interface DraggableCollectionStateOpts extends Omit<DraggableCollectionStateOptions, 'getItems'> {
493
+ }
494
+ interface DragHooks {
495
+ useDraggableCollectionState?: (props: DraggableCollectionStateOpts) => DraggableCollectionState;
496
+ useDraggableCollection?: (props: DraggableCollectionOptions, state: DraggableCollectionState, ref: RefObject<HTMLElement>) => void;
497
+ useDraggableItem?: (props: DraggableItemProps, state: DraggableCollectionState) => DraggableItemResult;
498
+ DragPreview?: typeof DragPreview;
499
+ renderDragPreview?: (items: DragItem[]) => JSX.Element;
500
+ }
501
+ interface DropHooks {
502
+ useDroppableCollectionState?: (props: DroppableCollectionStateOptions) => DroppableCollectionState;
503
+ useDroppableCollection?: (props: DroppableCollectionOptions, state: DroppableCollectionState, ref: RefObject<HTMLElement>) => DroppableCollectionResult;
504
+ useDroppableItem?: (options: DroppableItemOptions, state: DroppableCollectionState, ref: RefObject<HTMLElement>) => DroppableItemResult;
505
+ useDropIndicator?: (props: _DropIndicatorProps1, state: DroppableCollectionState, ref: RefObject<HTMLElement>) => DropIndicatorAria;
506
+ renderDropIndicator?: (target: DropTarget) => JSX.Element;
507
+ dropTargetDelegate?: DropTargetDelegate;
508
+ ListDropTargetDelegate: typeof ListDropTargetDelegate;
509
+ }
510
+ export type DragAndDropHooks = DragHooks & DropHooks;
511
+ interface DragAndDrop {
512
+ /** Drag and drop hooks for the collection element. */
513
+ dragAndDropHooks: DragAndDropHooks;
514
+ }
515
+ export interface DragAndDropOptions extends Omit<DraggableCollectionProps, 'preview' | 'getItems'>, DroppableCollectionProps {
516
+ /**
517
+ * A function that returns the items being dragged. If not specified, we assume that the collection is not draggable.
518
+ * @default () => []
519
+ */
520
+ getItems?: (keys: Set<Key>) => DragItem[];
521
+ /**
522
+ * A function that renders a drag preview, which is shown under the user's cursor while dragging.
523
+ * By default, a copy of the dragged element is rendered.
524
+ */
525
+ renderDragPreview?: (items: DragItem[]) => JSX.Element;
526
+ /**
527
+ * A function that renders a drop indicator element between two items in a collection.
528
+ * This should render a `<DropIndicator>` element. If this function is not provided, a
529
+ * default DropIndicator is provided.
530
+ */
531
+ renderDropIndicator?: (target: DropTarget) => JSX.Element;
532
+ /** A custom delegate object that provides drop targets for pointer coordinates within the collection. */
533
+ dropTargetDelegate?: DropTargetDelegate;
534
+ }
535
+ /**
536
+ * Provides the hooks required to enable drag and drop behavior for a drag and drop compatible collection component.
537
+ */
538
+ export function useDragAndDrop(options: DragAndDropOptions): DragAndDrop;
539
+ export const DropIndicatorContext: React.Context<DropIndicatorContextValue>;
540
+ interface DropIndicatorRenderProps {
541
+ /**
542
+ * Whether the drop indicator is currently the active drop target.
543
+ * @selector [data-drop-target]
544
+ */
545
+ isDropTarget: boolean;
546
+ }
547
+ interface DropIndicatorProps extends _DropIndicatorProps1, RenderProps<DropIndicatorRenderProps> {
548
+ }
549
+ interface DropIndicatorContextValue {
550
+ render: (props: DropIndicatorProps, ref: ForwardedRef<HTMLElement>) => ReactNode;
551
+ }
552
+ /**
553
+ * A DropIndicator is rendered between items in a collection to indicate where dropped data will be inserted.
554
+ */
555
+ export const DropIndicator: React.ForwardRefExoticComponent<DropIndicatorProps & React.RefAttributes<HTMLElement>>;
556
+ export const Header: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLElement> & React.RefAttributes<HTMLElement>>;
557
+ export interface SeparatorProps extends _SeparatorProps1, StyleProps, SlotProps {
558
+ }
559
+ export const SeparatorContext: React.Context<ContextValue<SeparatorProps, Element>>;
560
+ export const Separator: React.ForwardRefExoticComponent<SeparatorProps & React.RefAttributes<Element>>;
561
+ export interface ListBoxRenderProps {
562
+ /**
563
+ * Whether the listbox has no items and should display its empty state.
564
+ * @selector [data-empty]
565
+ */
566
+ isEmpty: boolean;
567
+ /**
568
+ * Whether the listbox is currently focused.
569
+ * @selector [data-focused]
570
+ */
571
+ isFocused: boolean;
572
+ /**
573
+ * Whether the listbox is currently keyboard focused.
574
+ * @selector [data-focus-visible]
575
+ */
576
+ isFocusVisible: boolean;
577
+ /**
578
+ * Whether the listbox is currently the active drop target.
579
+ * @selector [data-drop-target]
580
+ */
581
+ isDropTarget: boolean;
582
+ }
583
+ export interface ListBoxProps<T> extends Omit<AriaListBoxProps<T>, 'children'>, CollectionProps<T>, StyleRenderProps<ListBoxRenderProps>, SlotProps {
584
+ /** How multiple selection should behave in the collection. */
585
+ selectionBehavior?: SelectionBehavior;
586
+ /** The drag and drop hooks returned by `useDragAndDrop` used to enable drag and drop behavior for the ListBox. */
587
+ dragAndDropHooks?: DragAndDropHooks;
588
+ /** Provides content to display when there are no items in the list. */
589
+ renderEmptyState?: () => ReactNode;
590
+ }
591
+ interface ListBoxContextValue<T> extends ListBoxProps<T> {
592
+ state?: ListState<T>;
593
+ }
594
+ export const ListBoxContext: React.Context<ContextValue<ListBoxContextValue<any>, HTMLDivElement>>;
595
+ /**
596
+ * A listbox displays a list of options and allows a user to select one or more of them.
597
+ */
598
+ export const ListBox: <T>(props: ListBoxProps<T> & React.RefAttributes<HTMLDivElement>) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
599
+ export interface OverlayArrowProps extends Omit<HTMLAttributes<HTMLDivElement>, 'className' | 'style' | 'children'>, RenderProps<OverlayArrowRenderProps> {
600
+ }
601
+ export interface OverlayArrowRenderProps {
602
+ /**
603
+ * The placement of the overlay relative to the trigger.
604
+ * @selector [data-placement="left | right | top | bottom"]
605
+ */
606
+ placement: PlacementAxis;
607
+ }
608
+ /**
609
+ * An OverlayArrow renders a custom arrow element relative to an overlay element
610
+ * such as a popover or tooltip such that it aligns with a trigger element.
611
+ */
612
+ export const OverlayArrow: React.ForwardRefExoticComponent<OverlayArrowProps & React.RefAttributes<HTMLDivElement>>;
613
+ export interface PopoverProps extends Omit<PositionProps, 'isOpen'>, Omit<AriaPopoverProps, 'popoverRef' | 'triggerRef'>, RenderProps<PopoverRenderProps>, SlotProps {
614
+ /**
615
+ * The ref for the element which the popover positions itself with respect to.
616
+ *
617
+ * When used within a trigger component such as DialogTrigger, MenuTrigger, Select, etc.,
618
+ * this is set automatically. It is only required when used standalone.
619
+ */
620
+ triggerRef?: RefObject<Element>;
621
+ }
622
+ export interface PopoverRenderProps {
623
+ /**
624
+ * The placement of the tooltip relative to the trigger.
625
+ * @selector [data-placement="left | right | top | bottom"]
626
+ */
627
+ placement: PlacementAxis;
628
+ /**
629
+ * Whether the popover is currently entering. Use this to apply animations.
630
+ * @selector [data-entering]
631
+ */
632
+ isEntering: boolean;
633
+ /**
634
+ * Whether the popover is currently exiting. Use this to apply animations.
635
+ * @selector [data-exiting]
636
+ */
637
+ isExiting: boolean;
638
+ }
639
+ interface PopoverContextValue extends PopoverProps {
640
+ state: OverlayTriggerState;
641
+ preserveChildren?: boolean;
642
+ triggerRef: RefObject<Element>;
643
+ }
644
+ export const PopoverContext: React.Context<ContextValue<PopoverContextValue, HTMLElement>>;
645
+ /**
646
+ * A popover is an overlay element positioned relative to a trigger.
647
+ */
648
+ export const Popover: React.ForwardRefExoticComponent<PopoverProps & React.RefAttributes<HTMLElement>>;
649
+ export interface ComboBoxProps<T extends object> extends Omit<AriaComboBoxProps<T>, 'children' | 'placeholder' | 'name' | 'label' | 'description' | 'errorMessage'>, RenderProps<ComboBoxState<T>>, SlotProps {
650
+ /** The filter function used to determine if a option should be included in the combo box list. */
651
+ defaultFilter?: (textValue: string, inputValue: string) => boolean;
652
+ }
653
+ export const ComboBoxContext: React.Context<ContextValue<ComboBoxProps<any>, HTMLDivElement>>;
654
+ /**
655
+ * A combo box combines a text input with a listbox, allowing users to filter a list of options to items matching a query.
656
+ */
657
+ export const ComboBox: <T extends object>(props: ComboBoxProps<T> & React.RefAttributes<HTMLDivElement>) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
658
+ export interface DateFieldProps<T extends DateValue> extends Omit<AriaDateFieldProps<T>, 'label' | 'description' | 'errorMessage'>, RenderProps<DateFieldState>, SlotProps {
659
+ }
660
+ export interface TimeFieldProps<T extends TimeValue> extends Omit<AriaTimeFieldProps<T>, 'label' | 'description' | 'errorMessage'>, RenderProps<DateFieldState>, SlotProps {
661
+ }
662
+ export const DateFieldContext: React.Context<ContextValue<DateFieldProps<any>, HTMLDivElement>>;
663
+ export const TimeFieldContext: React.Context<ContextValue<TimeFieldProps<any>, HTMLDivElement>>;
664
+ /**
665
+ * A date field allows users to enter and edit date and time values using a keyboard.
666
+ * Each part of a date value is displayed in an individually editable segment.
667
+ */
668
+ export const DateField: <T extends DateValue>(props: DateFieldProps<T> & React.RefAttributes<HTMLDivElement>) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
669
+ /**
670
+ * A time field allows users to enter and edit time values using a keyboard.
671
+ * Each part of a time value is displayed in an individually editable segment.
672
+ */
673
+ export const TimeField: <T extends TimeValue>(props: TimeFieldProps<T> & React.RefAttributes<HTMLDivElement>) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
674
+ export interface DateInputRenderProps {
675
+ /**
676
+ * Whether the date input is currently hovered with a mouse.
677
+ * @selector [data-hovered]
678
+ */
679
+ isHovered: boolean;
680
+ /**
681
+ * Whether an element within the date input is focused, either via a mouse or keyboard.
682
+ * @selector :focus-within
683
+ */
684
+ isFocusWithin: boolean;
685
+ /**
686
+ * Whether an element within the date input is keyboard focused.
687
+ * @selector [data-focus-visible]
688
+ */
689
+ isFocusVisible: boolean;
690
+ /**
691
+ * Whether the date input is disabled.
692
+ * @selector [data-disabled]
693
+ */
694
+ isDisabled: boolean;
695
+ }
696
+ export interface DateInputProps extends SlotProps, StyleRenderProps<DateInputRenderProps> {
697
+ children: (segment: _DateSegment1) => ReactElement;
698
+ }
699
+ /**
700
+ * A date input groups the editable date segments within a date field.
701
+ */
702
+ export const DateInput: React.ForwardRefExoticComponent<DateInputProps & React.RefAttributes<HTMLDivElement>>;
703
+ export interface DateSegmentRenderProps extends Omit<_DateSegment1, 'isEditable'> {
704
+ /**
705
+ * Whether the value is a placeholder.
706
+ * @selector [data-placeholder]
707
+ */
708
+ isPlaceholder: boolean;
709
+ /**
710
+ * Whether the segment is read only.
711
+ * @selector [aria-readonly]
712
+ */
713
+ isReadOnly: boolean;
714
+ /**
715
+ * Whether the date field is in an invalid state.
716
+ * @selector [aria-invalid]
717
+ */
718
+ isInvalid: boolean;
719
+ /**
720
+ * The type of segment. Values include `literal`, `year`, `month`, `day`, etc.
721
+ * @selector [data-type="..."]
722
+ */
723
+ type: DateSegmentType;
724
+ }
725
+ export interface DateSegmentProps extends RenderProps<DateSegmentRenderProps> {
726
+ segment: _DateSegment1;
727
+ }
728
+ /**
729
+ * A date segment displays an individual unit of a date and time, and allows users to edit
730
+ * the value by typing or using the arrow keys to increment and decrement.
731
+ */
732
+ export const DateSegment: React.ForwardRefExoticComponent<DateSegmentProps & React.RefAttributes<HTMLDivElement>>;
733
+ export interface ModalOverlayProps extends AriaModalOverlayProps, OverlayTriggerProps, RenderProps<ModalRenderProps> {
734
+ }
735
+ interface ModalContextValue {
736
+ state?: OverlayTriggerState;
737
+ }
738
+ export const ModalContext: React.Context<ModalContextValue>;
739
+ export interface ModalRenderProps {
740
+ /**
741
+ * Whether the modal is currently entering. Use this to apply animations.
742
+ * @selector [data-entering]
743
+ */
744
+ isEntering: boolean;
745
+ /**
746
+ * Whether the modal is currently exiting. Use this to apply animations.
747
+ * @selector [data-exiting]
748
+ */
749
+ isExiting: boolean;
750
+ }
751
+ /**
752
+ * A modal is an overlay element which blocks interaction with elements outside it.
753
+ */
754
+ export const Modal: React.ForwardRefExoticComponent<ModalOverlayProps & React.RefAttributes<HTMLDivElement>>;
755
+ /**
756
+ * A ModalOverlay is a wrapper for a Modal which allows customizing the backdrop element.
757
+ */
758
+ export const ModalOverlay: React.ForwardRefExoticComponent<ModalOverlayProps & React.RefAttributes<HTMLDivElement>>;
759
+ export interface DialogTriggerProps extends OverlayTriggerProps {
760
+ children: ReactNode;
761
+ }
762
+ interface DialogRenderProps {
763
+ close: () => void;
764
+ }
765
+ export interface DialogProps extends AriaDialogProps, DOMProps, SlotProps {
766
+ children?: ReactNode | ((opts: DialogRenderProps) => ReactNode);
767
+ onClose?: () => void;
768
+ }
769
+ export const DialogContext: React.Context<ContextValue<DialogProps, HTMLElement>>;
770
+ /**
771
+ * A DialogTrigger opens a dialog when a trigger element is pressed.
772
+ */
773
+ export function DialogTrigger(props: DialogTriggerProps): JSX.Element;
774
+ /**
775
+ * A dialog is an overlay shown above other content in an application.
776
+ */
777
+ export const Dialog: React.ForwardRefExoticComponent<DialogProps & React.RefAttributes<HTMLElement>>;
778
+ export interface GroupRenderProps {
779
+ /**
780
+ * Whether the group is currently hovered with a mouse.
781
+ * @selector [data-hovered]
782
+ */
783
+ isHovered: boolean;
784
+ /**
785
+ * Whether an element within the group is focused, either via a mouse or keyboard.
786
+ * @selector :focus-within
787
+ */
788
+ isFocusWithin: boolean;
789
+ /**
790
+ * Whether an element within the group is keyboard focused.
791
+ * @selector [data-focus-visible]
792
+ */
793
+ isFocusVisible: boolean;
794
+ }
795
+ export interface GroupProps extends Omit<HTMLAttributes<HTMLElement>, 'className' | 'style'>, StyleRenderProps<GroupRenderProps> {
796
+ }
797
+ export const GroupContext: React.Context<ContextValue<GroupProps, HTMLDivElement>>;
798
+ /**
799
+ * An group represents a set of related UI controls.
800
+ */
801
+ export const Group: React.ForwardRefExoticComponent<GroupProps & React.RefAttributes<HTMLDivElement>>;
802
+ export interface DatePickerProps<T extends DateValue> extends Omit<AriaDatePickerProps<T>, 'label' | 'description' | 'errorMessage'>, RenderProps<DatePickerState>, SlotProps {
803
+ }
804
+ export interface DateRangePickerProps<T extends DateValue> extends Omit<AriaDateRangePickerProps<T>, 'label' | 'description' | 'errorMessage'>, RenderProps<DateRangePickerState>, SlotProps {
805
+ }
806
+ export const DatePickerContext: React.Context<ContextValue<DatePickerProps<any>, HTMLDivElement>>;
807
+ export const DateRangePickerContext: React.Context<ContextValue<DateRangePickerProps<any>, HTMLDivElement>>;
808
+ /**
809
+ * A date picker combines a DateField and a Calendar popover to allow users to enter or select a date and time value.
810
+ */
811
+ export const DatePicker: <T extends DateValue>(props: DatePickerProps<T> & React.RefAttributes<HTMLDivElement>) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
812
+ /**
813
+ * A date range picker combines two DateFields and a RangeCalendar popover to allow
814
+ * users to enter or select a date and time range.
815
+ */
816
+ export const DateRangePicker: <T extends DateValue>(props: DateRangePickerProps<T> & React.RefAttributes<HTMLDivElement>) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
817
+ export interface GridListRenderProps {
818
+ /**
819
+ * Whether the list has no items and should display its empty state.
820
+ * @selector [data-empty]
821
+ */
822
+ isEmpty: boolean;
823
+ /**
824
+ * Whether the grid list is currently focused.
825
+ * @selector [data-focused]
826
+ */
827
+ isFocused: boolean;
828
+ /**
829
+ * Whether the grid list is currently keyboard focused.
830
+ * @selector [data-focus-visible]
831
+ */
832
+ isFocusVisible: boolean;
833
+ /**
834
+ * Whether the grid list is currently the active drop target.
835
+ * @selector [data-drop-target]
836
+ */
837
+ isDropTarget: boolean;
838
+ }
839
+ export interface GridListProps<T> extends Omit<AriaGridListProps<T>, 'children'>, CollectionProps<T>, StyleRenderProps<GridListRenderProps>, SlotProps {
840
+ /** How multiple selection should behave in the collection. */
841
+ selectionBehavior?: SelectionBehavior;
842
+ /** The drag and drop hooks returned by `useDragAndDrop` used to enable drag and drop behavior for the GridList. */
843
+ dragAndDropHooks?: DragAndDropHooks;
844
+ /** Provides content to display when there are no items in the list. */
845
+ renderEmptyState?: () => ReactNode;
846
+ }
847
+ export const GridListContext: React.Context<ContextValue<GridListProps<any>, HTMLDivElement>>;
848
+ /**
849
+ * A grid list displays a list of interactive items, with support for keyboard navigation,
850
+ * single or multiple selection, and row actions.
851
+ */
852
+ export const GridList: <T extends object>(props: GridListProps<T> & React.RefAttributes<HTMLDivElement>) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
853
+ export const KeyboardContext: React.Context<ContextValue<React.HTMLAttributes<HTMLElement>, HTMLElement>>;
854
+ export const Keyboard: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLElement> & React.RefAttributes<HTMLElement>>;
855
+ export const MenuContext: React.Context<ContextValue<MenuProps<any>, HTMLDivElement>>;
856
+ export interface MenuTriggerProps extends _MenuTriggerProps1 {
857
+ children?: ReactNode;
858
+ }
859
+ export function MenuTrigger(props: MenuTriggerProps): JSX.Element;
860
+ export interface MenuProps<T> extends Omit<AriaMenuProps<T>, 'children'>, CollectionProps<T>, StyleProps, SlotProps {
861
+ }
862
+ /**
863
+ * A menu displays a list of actions or options that a user can choose.
864
+ */
865
+ export const Menu: <T extends object>(props: MenuProps<T> & React.RefAttributes<HTMLDivElement>) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
866
+ export interface MenuItemRenderProps extends ItemRenderProps {
867
+ /**
868
+ * Whether the item is currently selected.
869
+ * @selector [aria-checked=true]
870
+ */
871
+ isSelected: boolean;
872
+ }
873
+ export interface MeterProps extends Omit<AriaMeterProps, 'label'>, RenderProps<MeterRenderProps>, SlotProps {
874
+ }
875
+ export interface MeterRenderProps {
876
+ /**
877
+ * The value as a percentage between the minimum and maximum.
878
+ */
879
+ percentage: number;
880
+ /**
881
+ * A formatted version of the value.
882
+ * @selector [aria-valuetext]
883
+ */
884
+ valueText?: string;
885
+ }
886
+ export const MeterContext: React.Context<ContextValue<MeterProps, HTMLDivElement>>;
887
+ /**
888
+ * A meter represents a quantity within a known range, or a fractional value.
889
+ */
890
+ export const Meter: React.ForwardRefExoticComponent<MeterProps & React.RefAttributes<HTMLDivElement>>;
891
+ export interface NumberFieldProps extends Omit<AriaNumberFieldProps, 'label' | 'placeholder' | 'description' | 'errorMessage'>, RenderProps<NumberFieldState>, SlotProps {
892
+ }
893
+ export const NumberFieldContext: React.Context<ContextValue<NumberFieldProps, HTMLDivElement>>;
894
+ /**
895
+ * A number field allows a user to enter a number, and increment or decrement the value using stepper buttons.
896
+ */
897
+ export const NumberField: React.ForwardRefExoticComponent<NumberFieldProps & React.RefAttributes<HTMLDivElement>>;
898
+ export interface ProgressBarProps extends Omit<AriaProgressBarProps, 'label'>, RenderProps<ProgressBarRenderProps>, SlotProps {
899
+ }
900
+ export interface ProgressBarRenderProps {
901
+ /**
902
+ * The value as a percentage between the minimum and maximum.
903
+ */
904
+ percentage?: number;
905
+ /**
906
+ * A formatted version of the value.
907
+ * @selector [aria-valuetext]
908
+ */
909
+ valueText?: string;
910
+ /**
911
+ * Whether the progress bar is indeterminate.
912
+ * @selector :not([aria-valuenow])
913
+ */
914
+ isIndeterminate: boolean;
915
+ }
916
+ export const ProgressBarContext: React.Context<ContextValue<ProgressBarProps, HTMLDivElement>>;
917
+ /**
918
+ * Progress bars show either determinate or indeterminate progress of an operation
919
+ * over time.
920
+ */
921
+ export const ProgressBar: React.ForwardRefExoticComponent<ProgressBarProps & React.RefAttributes<HTMLDivElement>>;
922
+ export interface RadioGroupProps extends Omit<AriaRadioGroupProps, 'children' | 'label' | 'description' | 'errorMessage'>, RenderProps<RadioGroupRenderProps>, SlotProps {
923
+ }
924
+ export interface RadioProps extends Omit<AriaRadioProps, 'children'>, RenderProps<RadioRenderProps> {
925
+ }
926
+ export interface RadioGroupRenderProps {
927
+ /**
928
+ * The orientation of the radio group.
929
+ * @selector [aria-orientation="horizontal | vertical"]
930
+ */
931
+ orientation: Orientation;
932
+ /**
933
+ * Whether the radio group is disabled.
934
+ * @selector [aria-disabled]
935
+ */
936
+ isDisabled: boolean;
937
+ /**
938
+ * Whether the radio group is read only.
939
+ * @selector [aria-readonly]
940
+ */
941
+ isReadOnly: boolean;
942
+ /**
943
+ * Whether the radio group is required.
944
+ * @selector [aria-required]
945
+ */
946
+ isRequired: boolean;
947
+ /**
948
+ * The validation state of the radio group.
949
+ * @selector [aria-invalid]
950
+ */
951
+ validationState: ValidationState | null;
952
+ }
953
+ export interface RadioRenderProps {
954
+ /**
955
+ * Whether the radio is selected.
956
+ * @selector [data-selected]
957
+ */
958
+ isSelected: boolean;
959
+ /**
960
+ * Whether the radio is currently hovered with a mouse.
961
+ * @selector [data-hovered]
962
+ */
963
+ isHovered: boolean;
964
+ /**
965
+ * Whether the radio is currently in a pressed state.
966
+ * @selector [data-pressed]
967
+ */
968
+ isPressed: boolean;
969
+ /**
970
+ * Whether the radio is focused, either via a mouse or keyboard.
971
+ * @selector [data-focused]
972
+ */
973
+ isFocused: boolean;
974
+ /**
975
+ * Whether the radio is keyboard focused.
976
+ * @selector [data-focus-visible]
977
+ */
978
+ isFocusVisible: boolean;
979
+ /**
980
+ * Whether the radio is disabled.
981
+ * @selector [data-disabled]
982
+ */
983
+ isDisabled: boolean;
984
+ /**
985
+ * Whether the radio is read only.
986
+ * @selector [data-readonly]
987
+ */
988
+ isReadOnly: boolean;
989
+ /**
990
+ * Whether the radio is valid or invalid.
991
+ * @selector [data-validation-state="valid | invalid"]
992
+ */
993
+ validationState: ValidationState | null;
994
+ /**
995
+ * Whether the checkbox is required.
996
+ * @selector [data-required]
997
+ */
998
+ isRequired: boolean;
999
+ }
1000
+ export const RadioGroupContext: React.Context<ContextValue<RadioGroupProps, HTMLDivElement>>;
1001
+ /**
1002
+ * A radio group allows a user to select a single item from a list of mutually exclusive options.
1003
+ */
1004
+ export const RadioGroup: React.ForwardRefExoticComponent<RadioGroupProps & React.RefAttributes<HTMLDivElement>>;
1005
+ /**
1006
+ * A radio represents an individual option within a radio group.
1007
+ */
1008
+ export const Radio: React.ForwardRefExoticComponent<RadioProps & React.RefAttributes<HTMLInputElement>>;
1009
+ export interface SearchFieldProps extends Omit<AriaSearchFieldProps, 'label' | 'placeholder' | 'description' | 'errorMessage'>, RenderProps<SearchFieldState>, SlotProps {
1010
+ }
1011
+ export interface SearchFieldRenderProps {
1012
+ /**
1013
+ * Whether the search field is empty.
1014
+ * @selector [data-empty]
1015
+ */
1016
+ isEmpty: boolean;
1017
+ }
1018
+ export const SearchFieldContext: React.Context<ContextValue<SearchFieldProps, HTMLDivElement>>;
1019
+ /**
1020
+ * A search field allows a user to enter and clear a search query.
1021
+ */
1022
+ export const SearchField: React.ForwardRefExoticComponent<SearchFieldProps & React.RefAttributes<HTMLDivElement>>;
1023
+ export interface SelectProps<T extends object> extends Omit<AriaSelectProps<T>, 'children' | 'label' | 'description' | 'errorMessage'>, RenderProps<SelectState<T>>, SlotProps {
1024
+ }
1025
+ export const SelectContext: React.Context<ContextValue<SelectProps<any>, HTMLDivElement>>;
1026
+ /**
1027
+ * A select displays a collapsible list of options and allows a user to select one of them.
1028
+ */
1029
+ export const Select: <T extends object>(props: SelectProps<T> & React.RefAttributes<HTMLDivElement>) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
1030
+ export interface SelectValueRenderProps<T> {
1031
+ /**
1032
+ * Whether the value is a placeholder.
1033
+ * @selector [data-placeholder]
1034
+ */
1035
+ isPlaceholder: boolean;
1036
+ /** The object value of the currently selected item. */
1037
+ selectedItem: T | null;
1038
+ /** The textValue of the currently selected item. */
1039
+ selectedText: string | null;
1040
+ }
1041
+ export interface SelectValueProps<T extends object> extends Omit<HTMLAttributes<HTMLElement>, keyof RenderProps<unknown>>, RenderProps<SelectValueRenderProps<T>> {
1042
+ }
1043
+ /**
1044
+ * SelectValue renders the current value of a Select, or a placeholder if no value is selected.
1045
+ * It is usually placed within the button element.
1046
+ */
1047
+ export const SelectValue: <T extends object>(props: SelectValueProps<T> & React.RefAttributes<HTMLSpanElement>) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
1048
+ export interface SliderProps<T = number | number[]> extends AriaSliderProps<T>, RenderProps<SliderState>, SlotProps {
1049
+ /**
1050
+ * The display format of the value label.
1051
+ */
1052
+ formatOptions?: Intl.NumberFormatOptions;
1053
+ }
1054
+ export const SliderContext: React.Context<ContextValue<SliderProps<number | number[]>, HTMLDivElement>>;
1055
+ export interface SliderRenderProps {
1056
+ /**
1057
+ * The orientation of the slider.
1058
+ * @selector [data-orientation="horizontal | vertical"]
1059
+ */
1060
+ orientation: Orientation;
1061
+ /**
1062
+ * Whether the slider is disabled.
1063
+ * @selector [data-disabled]
1064
+ */
1065
+ isDisabled: boolean;
1066
+ }
1067
+ /**
1068
+ * A slider allows a user to select one or more values within a range.
1069
+ */
1070
+ export const Slider: <T extends number | number[]>(props: SliderProps<T> & React.RefAttributes<HTMLDivElement>) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
1071
+ export interface SliderOutputProps extends RenderProps<SliderState> {
1072
+ }
1073
+ /**
1074
+ * A slider output displays the current value of a slider as text.
1075
+ */
1076
+ export const SliderOutput: React.ForwardRefExoticComponent<SliderOutputProps & React.RefAttributes<HTMLOutputElement>>;
1077
+ export interface SliderTrackProps extends RenderProps<SliderState> {
1078
+ }
1079
+ /**
1080
+ * A slider track is a container for one or more slider thumbs.
1081
+ */
1082
+ export const SliderTrack: React.ForwardRefExoticComponent<SliderTrackProps & React.RefAttributes<HTMLDivElement>>;
1083
+ export interface SliderThumbRenderProps {
1084
+ /** The slider state object. */
1085
+ state: SliderState;
1086
+ /**
1087
+ * Whether this thumb is currently being dragged.
1088
+ * @selector [data-dragging]
1089
+ */
1090
+ isDragging: boolean;
1091
+ /**
1092
+ * Whether the thumb is currently hovered with a mouse.
1093
+ * @selector [data-hovered]
1094
+ */
1095
+ isHovered: boolean;
1096
+ /**
1097
+ * Whether the thumb is currently focused.
1098
+ * @selector [data-focused]
1099
+ */
1100
+ isFocused: boolean;
1101
+ /**
1102
+ * Whether the thumb is keyboard focused.
1103
+ * @selector [data-focus-visible]
1104
+ */
1105
+ isFocusVisible: boolean;
1106
+ /**
1107
+ * Whether the thumb is disabled.
1108
+ * @selector [data-disabled]
1109
+ */
1110
+ isDisabled: boolean;
1111
+ }
1112
+ export interface SliderThumbProps extends AriaSliderThumbProps, RenderProps<SliderThumbRenderProps> {
1113
+ }
1114
+ /**
1115
+ * A slider thumb represents an individual value that the user can adjust within a slider track.
1116
+ */
1117
+ export const SliderThumb: React.ForwardRefExoticComponent<SliderThumbProps & React.RefAttributes<HTMLDivElement>>;
1118
+ export interface SwitchProps extends Omit<AriaSwitchProps, 'children'>, RenderProps<SwitchRenderProps>, SlotProps {
1119
+ }
1120
+ export interface SwitchRenderProps {
1121
+ /**
1122
+ * Whether the switch is selected.
1123
+ * @selector [data-selected]
1124
+ */
1125
+ isSelected: boolean;
1126
+ /**
1127
+ * Whether the switch is currently hovered with a mouse.
1128
+ * @selector [data-hovered]
1129
+ */
1130
+ isHovered: boolean;
1131
+ /**
1132
+ * Whether the switch is currently in a pressed state.
1133
+ * @selector [data-pressed]
1134
+ */
1135
+ isPressed: boolean;
1136
+ /**
1137
+ * Whether the switch is focused, either via a mouse or keyboard.
1138
+ * @selector [data-focused]
1139
+ */
1140
+ isFocused: boolean;
1141
+ /**
1142
+ * Whether the switch is keyboard focused.
1143
+ * @selector [data-focus-visible]
1144
+ */
1145
+ isFocusVisible: boolean;
1146
+ /**
1147
+ * Whether the switch is disabled.
1148
+ * @selector [data-disabled]
1149
+ */
1150
+ isDisabled: boolean;
1151
+ /**
1152
+ * Whether the switch is read only.
1153
+ * @selector [data-readonly]
1154
+ */
1155
+ isReadOnly: boolean;
1156
+ }
1157
+ export const SwitchContext: React.Context<ContextValue<SwitchProps, HTMLInputElement>>;
1158
+ /**
1159
+ * A switch allows a user to turn a setting on or off.
1160
+ */
1161
+ export const Switch: React.ForwardRefExoticComponent<SwitchProps & React.RefAttributes<HTMLInputElement>>;
1162
+ export const TableContext: React.Context<ContextValue<TableProps, HTMLTableElement>>;
1163
+ export interface TableRenderProps {
1164
+ /**
1165
+ * Whether the table is currently focused.
1166
+ * @selector [data-focused]
1167
+ */
1168
+ isFocused: boolean;
1169
+ /**
1170
+ * Whether the table is currently keyboard focused.
1171
+ * @selector [data-focus-visible]
1172
+ */
1173
+ isFocusVisible: boolean;
1174
+ /**
1175
+ * Whether the table is currently the active drop target.
1176
+ * @selector [data-drop-target]
1177
+ */
1178
+ isDropTarget: boolean;
1179
+ }
1180
+ export interface TableProps extends Omit<_TableProps1<any>, 'children'>, StyleRenderProps<TableRenderProps>, SlotProps, AriaLabelingProps {
1181
+ /** The elements that make up the table. Includes the TableHeader, TableBody, Columns, and Rows. */
1182
+ children?: ReactNode;
1183
+ /**
1184
+ * How multiple selection should behave in the collection.
1185
+ * @default "toggle"
1186
+ */
1187
+ selectionBehavior?: SelectionBehavior;
1188
+ /**
1189
+ * Whether `disabledKeys` applies to all interactions, or only selection.
1190
+ * @default "selection"
1191
+ */
1192
+ disabledBehavior?: DisabledBehavior;
1193
+ /** Handler that is called when a user performs an action on the row. */
1194
+ onRowAction?: (key: Key) => void;
1195
+ /** Handler that is called when a user performs an action on the cell. */
1196
+ onCellAction?: (key: Key) => void;
1197
+ /** The drag and drop hooks returned by `useDragAndDrop` used to enable drag and drop behavior for the Table. */
1198
+ dragAndDropHooks?: DragAndDropHooks;
1199
+ }
1200
+ /**
1201
+ * A table displays data in rows and columns and enables a user to navigate its contents via directional navigation keys,
1202
+ * and optionally supports row selection and sorting.
1203
+ */
1204
+ export const Table: React.ForwardRefExoticComponent<TableProps & React.RefAttributes<HTMLTableElement>>;
1205
+ interface TableOptionsContextValue {
1206
+ /** The type of selection that is allowed in the table. */
1207
+ selectionMode: SelectionMode;
1208
+ /** The selection behavior for the table. If selectionMode is `"none"`, this will be `null`. */
1209
+ selectionBehavior: SelectionBehavior | null;
1210
+ /** Whether the table allows empty selection. */
1211
+ disallowEmptySelection: boolean;
1212
+ /** Whether the table allows rows to be dragged. */
1213
+ allowsDragging: boolean;
1214
+ }
1215
+ /**
1216
+ * Returns options from the parent `<Table>` component.
1217
+ */
1218
+ export function useTableOptions(): TableOptionsContextValue;
1219
+ export interface TableHeaderProps<T> {
1220
+ /** A list of table columns. */
1221
+ columns?: T[];
1222
+ /** A list of `Column(s)` or a function. If the latter, a list of columns must be provided using the `columns` prop. */
1223
+ children?: ReactNode | ((item: T) => ReactElement);
1224
+ }
1225
+ /**
1226
+ * A header within a `<Table>`, containing the table columns.
1227
+ */
1228
+ export function TableHeader<T extends object>(props: TableHeaderProps<T>): JSX.Element;
1229
+ export interface ColumnRenderProps {
1230
+ /**
1231
+ * Whether the item is currently focused.
1232
+ * @selector [data-focused]
1233
+ */
1234
+ isFocused: boolean;
1235
+ /**
1236
+ * Whether the item is currently keyboard focused.
1237
+ * @selector [data-focus-visible]
1238
+ */
1239
+ isFocusVisible: boolean;
1240
+ /**
1241
+ * Whether the column allows sorting.
1242
+ * @selector [aria-sort]
1243
+ */
1244
+ allowsSorting: boolean;
1245
+ /**
1246
+ * The current sort direction.
1247
+ * @selector [aria-sort="ascending | descending"]
1248
+ */
1249
+ sortDirection?: SortDirection;
1250
+ }
1251
+ export interface ColumnProps<T = object> extends RenderProps<ColumnRenderProps> {
1252
+ id?: Key;
1253
+ /** Rendered contents of the column if `children` contains child columns. */
1254
+ title?: ReactNode;
1255
+ /** A list of child columns used when dynamically rendering nested child columns. */
1256
+ childColumns?: T[];
1257
+ /** Whether the column allows sorting. */
1258
+ allowsSorting?: boolean;
1259
+ /** 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. */
1260
+ isRowHeader?: boolean;
1261
+ /** A string representation of the column's contents, used for accessibility announcements. */
1262
+ textValue?: string;
1263
+ }
1264
+ /**
1265
+ * A column within a `<Table>`.
1266
+ */
1267
+ export function Column<T extends object>(props: ColumnProps<T>): JSX.Element;
1268
+ interface TableBodyRenderProps {
1269
+ /**
1270
+ * Whether the table body has no rows and should display its empty state.
1271
+ * @selector [data-empty]
1272
+ */
1273
+ isEmpty: boolean;
1274
+ }
1275
+ export interface TableBodyProps<T> extends CollectionProps<T>, StyleRenderProps<TableBodyRenderProps> {
1276
+ /** Provides content to display when there are no rows in the table. */
1277
+ renderEmptyState?: () => ReactNode;
1278
+ }
1279
+ /**
1280
+ * The body of a `<Table>`, containing the table rows.
1281
+ */
1282
+ export function TableBody<T extends object>(props: TableBodyProps<T>): JSX.Element;
1283
+ export interface RowRenderProps extends ItemRenderProps {
1284
+ }
1285
+ export interface RowProps<T> extends RenderProps<RowRenderProps> {
1286
+ id?: Key;
1287
+ /** A list of columns used when dynamically rendering cells. */
1288
+ columns?: Iterable<T>;
1289
+ /** The cells within the row. Supports static items or a function for dynamic rendering. */
1290
+ children?: ReactNode | ((item: T) => ReactElement);
1291
+ /** A string representation of the row's contents, used for features like typeahead. */
1292
+ textValue?: string;
1293
+ }
1294
+ /**
1295
+ * A row within a `<Table>`.
1296
+ */
1297
+ export function Row<T extends object>(props: RowProps<T>): JSX.Element;
1298
+ export interface CellRenderProps {
1299
+ /**
1300
+ * Whether the cell is currently in a pressed state.
1301
+ * @selector [data-pressed]
1302
+ */
1303
+ isPressed: boolean;
1304
+ /**
1305
+ * Whether the cell is currently focused.
1306
+ * @selector [data-focused]
1307
+ */
1308
+ isFocused: boolean;
1309
+ /**
1310
+ * Whether the cell is currently keyboard focused.
1311
+ * @selector [data-focus-visible]
1312
+ */
1313
+ isFocusVisible: boolean;
1314
+ }
1315
+ export interface CellProps extends RenderProps<CellRenderProps> {
1316
+ id?: Key;
1317
+ /** The contents of the cell. */
1318
+ children: ReactNode;
1319
+ /** A string representation of the cell's contents, used for features like typeahead. */
1320
+ textValue?: string;
1321
+ }
1322
+ /**
1323
+ * A cell within a table row.
1324
+ */
1325
+ export function Cell(props: CellProps): JSX.Element;
1326
+ export interface TabsProps extends RenderProps<TabsRenderProps>, SlotProps {
1327
+ /**
1328
+ * The orientation of the tabs.
1329
+ * @default 'horizontal'
1330
+ */
1331
+ orientation?: Orientation;
1332
+ }
1333
+ export interface TabsRenderProps {
1334
+ /**
1335
+ * The orientation of the tabs.
1336
+ * @selector [data-orientation="horizontal | vertical"]
1337
+ */
1338
+ orientation: Orientation;
1339
+ }
1340
+ export interface TabListProps<T> extends Omit<AriaTabListProps<T>, 'children' | 'orientation'>, StyleRenderProps<TabListRenderProps>, AriaLabelingProps, CollectionProps<T> {
1341
+ }
1342
+ export interface TabListRenderProps {
1343
+ /**
1344
+ * The orientation of the tab list.
1345
+ * @selector [aria-orientation="horizontal | vertical"]
1346
+ */
1347
+ orientation: Orientation;
1348
+ }
1349
+ export interface TabProps extends RenderProps<TabRenderProps>, AriaLabelingProps {
1350
+ id?: Key;
1351
+ }
1352
+ export interface TabRenderProps {
1353
+ /**
1354
+ * Whether the tab is currently hovered with a mouse.
1355
+ * @selector [data-hovered]
1356
+ */
1357
+ isHovered: boolean;
1358
+ /**
1359
+ * Whether the tab is currently in a pressed state.
1360
+ * @selector [data-pressed]
1361
+ */
1362
+ isPressed: boolean;
1363
+ /**
1364
+ * Whether the tab is currently selected.
1365
+ * @selector [aria-selected=true]
1366
+ */
1367
+ isSelected: boolean;
1368
+ /**
1369
+ * Whether the tab is currently focused.
1370
+ * @selector :focus
1371
+ */
1372
+ isFocused: boolean;
1373
+ /**
1374
+ * Whether the tab is currently keyboard focused.
1375
+ * @selector [data-focus-visible]
1376
+ */
1377
+ isFocusVisible: boolean;
1378
+ /**
1379
+ * Whether the tab is disabled.
1380
+ * @selector [aria-disabled]
1381
+ */
1382
+ isDisabled: boolean;
1383
+ }
1384
+ export interface TabPanelProps extends AriaTabPanelProps, RenderProps<TabPanelRenderProps> {
1385
+ }
1386
+ export interface TabPanelRenderProps {
1387
+ /**
1388
+ * Whether the tab panel is currently focused.
1389
+ * @selector :focus
1390
+ */
1391
+ isFocused: boolean;
1392
+ /**
1393
+ * Whether the tab panel is currently keyboard focused.
1394
+ * @selector [data-focus-visible]
1395
+ */
1396
+ isFocusVisible: boolean;
1397
+ }
1398
+ export const TabsContext: React.Context<ContextValue<TabsProps, HTMLDivElement>>;
1399
+ /**
1400
+ * Tabs organize content into multiple sections and allow users to navigate between them.
1401
+ */
1402
+ export const Tabs: React.ForwardRefExoticComponent<TabsProps & React.RefAttributes<HTMLDivElement>>;
1403
+ /**
1404
+ * A TabList is used within Tabs to group tabs that a user can switch between.
1405
+ * The ids of the items within the <TabList> must match up with a corresponding item inside the <TabPanels>.
1406
+ */
1407
+ export const TabList: <T extends object>(props: TabListProps<T> & React.RefAttributes<HTMLDivElement>) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
1408
+ /**
1409
+ * A Tab provides a title for an individual item within a TabList.
1410
+ */
1411
+ export function Tab(props: TabProps): JSX.Element;
1412
+ export interface TabPanelsProps<T> extends Omit<CollectionProps<T>, 'disabledKeys'> {
1413
+ }
1414
+ /**
1415
+ * TabPanels is used within Tabs as a container for the content of each tab.
1416
+ * The ids of the items within the <TabPanels> must match up with a corresponding item inside the <TabList>.
1417
+ */
1418
+ export function TabPanels<T extends object>(props: TabPanelsProps<T>): JSX.Element;
1419
+ /**
1420
+ * A TabPanel provides the content for a tab.
1421
+ */
1422
+ export function TabPanel(props: TabPanelProps): JSX.Element;
1423
+ export interface TextFieldProps extends Omit<AriaTextFieldProps, 'label' | 'placeholder' | 'description' | 'errorMessage'>, DOMProps, SlotProps {
1424
+ }
1425
+ export const TextFieldContext: React.Context<ContextValue<TextFieldProps, HTMLDivElement>>;
1426
+ /**
1427
+ * A text field allows a user to enter a plain text value with a keyboard.
1428
+ */
1429
+ export const TextField: React.ForwardRefExoticComponent<TextFieldProps & React.RefAttributes<HTMLDivElement>>;
1430
+ export interface ToggleButtonRenderProps extends ButtonRenderProps {
1431
+ /**
1432
+ * Whether the button is currently selected.
1433
+ * @selector [aria-pressed=true]
1434
+ */
1435
+ isSelected: boolean;
1436
+ }
1437
+ export interface ToggleButtonProps extends Omit<AriaToggleButtonProps, 'children' | 'elementType'>, SlotProps, RenderProps<ToggleButtonRenderProps> {
1438
+ }
1439
+ export const ToggleButtonContext: React.Context<ContextValue<ToggleButtonProps, HTMLButtonElement>>;
1440
+ /**
1441
+ * A toggle button allows a user to toggle a selection on or off, for example switching between two states or modes.
1442
+ */
1443
+ export const ToggleButton: React.ForwardRefExoticComponent<ToggleButtonProps & React.RefAttributes<HTMLButtonElement>>;
1444
+ export interface TooltipTriggerComponentProps extends TooltipTriggerProps {
1445
+ children: ReactNode;
1446
+ }
1447
+ export interface TooltipProps extends PositionProps, AriaLabelingProps, RenderProps<TooltipRenderProps> {
1448
+ }
1449
+ export interface TooltipRenderProps {
1450
+ /**
1451
+ * The placement of the tooltip relative to the trigger.
1452
+ * @selector [data-placement="left | right | top | bottom"]
1453
+ */
1454
+ placement: PlacementAxis;
1455
+ /**
1456
+ * Whether the tooltip is currently entering. Use this to apply animations.
1457
+ * @selector [data-entering]
1458
+ */
1459
+ isEntering: boolean;
1460
+ /**
1461
+ * Whether the tooltip is currently exiting. Use this to apply animations.
1462
+ * @selector [data-exiting]
1463
+ */
1464
+ isExiting: boolean;
1465
+ }
1466
+ /**
1467
+ * TooltipTrigger wraps around a trigger element and a Tooltip. It handles opening and closing
1468
+ * the Tooltip when the user hovers over or focuses the trigger, and positioning the Tooltip
1469
+ * relative to the trigger.
1470
+ */
1471
+ export function TooltipTrigger(props: TooltipTriggerComponentProps): JSX.Element;
1472
+ /**
1473
+ * A tooltip displays a description of an element on hover or focus.
1474
+ */
1475
+ export const Tooltip: React.ForwardRefExoticComponent<TooltipProps & React.RefAttributes<HTMLDivElement>>;
1476
+ export { DIRECTORY_DRAG_TYPE, isDirectoryDropItem, isFileDropItem, isTextDropItem, SSRProvider } from 'react-aria';
1477
+ export type { DateValue, DateRange, TimeValue } from 'react-aria';
1478
+ export type { DirectoryDropItem, DraggableCollectionEndEvent, DraggableCollectionMoveEvent, DraggableCollectionStartEvent, DragPreviewRenderer, DragTypes, DropItem, DropOperation, DroppableCollectionDropEvent, DroppableCollectionEnterEvent, DroppableCollectionExitEvent, DroppableCollectionInsertDropEvent, DroppableCollectionMoveEvent, DroppableCollectionOnItemDropEvent, DroppableCollectionReorderEvent, DroppableCollectionRootDropEvent, DropPosition, DropTarget, FileDropItem, ItemDropTarget, RootDropTarget, TextDropItem } from 'react-aria';
1479
+ export type { Selection } from 'react-stately';
1480
+
1481
+ //# sourceMappingURL=types.d.ts.map