@react-types/list 3.0.0-nightly.3373 → 3.0.0-rc.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.
Files changed (2) hide show
  1. package/package.json +4 -4
  2. package/src/index.d.ts +9 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-types/list",
3
- "version": "3.0.0-nightly.3373+8defd74c9",
3
+ "version": "3.0.0-rc.0",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "types": "src/index.d.ts",
@@ -9,8 +9,8 @@
9
9
  "url": "https://github.com/adobe/react-spectrum"
10
10
  },
11
11
  "dependencies": {
12
- "@react-spectrum/dnd": "3.0.0-nightly.3373+8defd74c9",
13
- "@react-types/shared": "3.0.0-nightly.1673+8defd74c9"
12
+ "@react-spectrum/dnd": "3.0.0-alpha.5",
13
+ "@react-types/shared": "^3.14.0"
14
14
  },
15
15
  "peerDependencies": {
16
16
  "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0"
@@ -18,5 +18,5 @@
18
18
  "publishConfig": {
19
19
  "access": "public"
20
20
  },
21
- "gitHead": "8defd74c9698b4dda32fd20bcfc579b123cd98e7"
21
+ "gitHead": "cd7c0ec917122c7612f653c22f8ed558f8b66ecd"
22
22
  }
package/src/index.d.ts CHANGED
@@ -23,17 +23,19 @@ import {
23
23
  } from '@react-types/shared';
24
24
  import {DragHooks, DropHooks} from '@react-spectrum/dnd';
25
25
 
26
- export interface ListProps<T> extends CollectionBase<T>, MultipleSelection {
26
+ export interface GridListProps<T> extends CollectionBase<T>, MultipleSelection {
27
27
  /**
28
28
  * Handler that is called when a user performs an action on an item. The exact user event depends on
29
29
  * the collection's `selectionBehavior` prop and the interaction modality.
30
30
  */
31
- onAction?: (key: string) => void
31
+ onAction?: (key: string) => void,
32
+ /** Whether `disabledKeys` applies to all interactions, or only selection. */
33
+ disabledBehavior?: DisabledBehavior
32
34
  }
33
35
 
34
- export interface AriaListProps<T> extends ListProps<T>, DOMProps, AriaLabelingProps {}
36
+ export interface AriaGridListProps<T> extends GridListProps<T>, DOMProps, AriaLabelingProps {}
35
37
 
36
- export interface SpectrumListProps<T> extends AriaListProps<T>, StyleProps, SpectrumSelectionProps, Omit<AsyncLoadable, 'isLoading'> {
38
+ export interface SpectrumListViewProps<T> extends AriaGridListProps<T>, StyleProps, SpectrumSelectionProps, Omit<AsyncLoadable, 'isLoading'> {
37
39
  /**
38
40
  * Sets the amount of vertical padding within each cell.
39
41
  * @default 'regular'
@@ -52,17 +54,17 @@ export interface SpectrumListProps<T> extends AriaListProps<T>, StyleProps, Spec
52
54
  renderEmptyState?: () => JSX.Element,
53
55
  /**
54
56
  * Handler that is called when a user performs an action on an item. The exact user event depends on
55
- * the collection's `selectionBehavior` prop and the interaction modality.
57
+ * the collection's `selectionStyle` prop and the interaction modality.
56
58
  */
57
59
  onAction?: (key: string) => void,
58
- /** Whether `disabledKeys` applies to all interactions, or only selection. */
59
- disabledBehavior?: DisabledBehavior,
60
60
  /**
61
61
  * The drag hooks returned by `useDragHooks` used to enable drag and drop behavior for the ListView.
62
+ * @private
62
63
  */
63
64
  dragHooks?: DragHooks,
64
65
  /**
65
66
  * The drag hooks returned by `useDragHooks` used to enable drag and drop behavior for the ListView.
67
+ * @private
66
68
  */
67
69
  dropHooks?: DropHooks
68
70
  }