@react-types/shared 3.10.1 → 3.11.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-types/shared",
3
- "version": "3.10.1",
3
+ "version": "3.11.2",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "types": "src/index.d.ts",
@@ -14,5 +14,5 @@
14
14
  "publishConfig": {
15
15
  "access": "public"
16
16
  },
17
- "gitHead": "45e63a00c00486cf57b457371da6f8749cd9bca4"
17
+ "gitHead": "ed8d8d984c2f7f2c31e8b18795b97858a95e4729"
18
18
  }
package/src/dnd.d.ts CHANGED
@@ -145,5 +145,6 @@ export interface DraggableCollectionProps {
145
145
  onDragEnd?: (e: DraggableCollectionEndEvent) => void,
146
146
  getItems: (keys: Set<Key>) => DragItem[],
147
147
  renderPreview?: (selectedKeys: Set<Key>, draggedKey: Key) => JSX.Element,
148
- getAllowedDropOperations?: () => DropOperation[]
148
+ getAllowedDropOperations?: () => DropOperation[],
149
+ allowsDraggingItem?: (key: Key) => boolean
149
150
  }
package/src/events.d.ts CHANGED
@@ -110,7 +110,15 @@ export interface FocusableProps extends FocusEvents, KeyboardEvents {
110
110
 
111
111
  interface BaseMoveEvent {
112
112
  /** The pointer type that triggered the move event. */
113
- pointerType: PointerType
113
+ pointerType: PointerType,
114
+ /** Whether the shift keyboard modifier was held during the move event. */
115
+ shiftKey: boolean,
116
+ /** Whether the ctrl keyboard modifier was held during the move event. */
117
+ ctrlKey: boolean,
118
+ /** Whether the meta keyboard modifier was held during the move event. */
119
+ metaKey: boolean,
120
+ /** Whether the alt keyboard modifier was held during the move event. */
121
+ altKey: boolean
114
122
  }
115
123
 
116
124
  export interface MoveStartEvent extends BaseMoveEvent {
@@ -125,6 +133,7 @@ export interface MoveMoveEvent extends BaseMoveEvent {
125
133
  deltaX: number,
126
134
  /** The amount moved in the Y direction since the last event. */
127
135
  deltaY: number
136
+
128
137
  }
129
138
 
130
139
  export interface MoveEndEvent extends BaseMoveEvent {
@@ -16,7 +16,7 @@ export interface SingleSelection {
16
16
  /** Whether the collection allows empty selection. */
17
17
  disallowEmptySelection?: boolean,
18
18
  /** The currently selected key in the collection (controlled). */
19
- selectedKey?: Key,
19
+ selectedKey?: Key | null,
20
20
  /** The initial selected key in the collection (uncontrolled). */
21
21
  defaultSelectedKey?: Key,
22
22
  /** Handler that is called when the selection changes. */