@react-types/shared 3.0.0-nightly.1256 → 3.0.0-nightly.1274
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/src/events.d.ts +5 -0
- package/src/selection.d.ts +6 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-types/shared",
|
|
3
|
-
"version": "3.0.0-nightly.
|
|
3
|
+
"version": "3.0.0-nightly.1274+e3e6db065",
|
|
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": "
|
|
17
|
+
"gitHead": "e3e6db06554d632e6edef831002fa3fda0cef1c2"
|
|
18
18
|
}
|
package/src/events.d.ts
CHANGED
|
@@ -45,6 +45,11 @@ export interface PressEvent {
|
|
|
45
45
|
altKey: boolean
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
+
export interface LongPressEvent extends Omit<PressEvent, 'type'> {
|
|
49
|
+
/** The type of long press event being fired. */
|
|
50
|
+
type: 'longpressstart' | 'longpressend' | 'longpress'
|
|
51
|
+
}
|
|
52
|
+
|
|
48
53
|
export interface HoverEvent {
|
|
49
54
|
/** The type of hover event being fired. */
|
|
50
55
|
type: 'hoverstart' | 'hoverend',
|
package/src/selection.d.ts
CHANGED
|
@@ -24,6 +24,7 @@ export interface SingleSelection {
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
export type SelectionMode = 'none' | 'single' | 'multiple';
|
|
27
|
+
export type SelectionBehavior = 'toggle' | 'replace';
|
|
27
28
|
export type Selection = 'all' | Set<Key>;
|
|
28
29
|
export interface MultipleSelection {
|
|
29
30
|
/** The type of selection that is allowed in the collection. */
|
|
@@ -40,4 +41,9 @@ export interface MultipleSelection {
|
|
|
40
41
|
disabledKeys?: Iterable<Key>
|
|
41
42
|
}
|
|
42
43
|
|
|
44
|
+
export interface SpectrumSelectionProps {
|
|
45
|
+
/** How selection should be displayed. */
|
|
46
|
+
selectionStyle?: 'checkbox' | 'highlight'
|
|
47
|
+
}
|
|
48
|
+
|
|
43
49
|
export type FocusStrategy = 'first' | 'last';
|