@react-types/shared 3.9.0 → 3.10.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-types/shared",
3
- "version": "3.9.0",
3
+ "version": "3.10.0",
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": "eb6c352a42ca230774b923cc0bde692d206e0999"
17
+ "gitHead": "896eabe5521a0349a675c4773ed7629addd4b8c4"
18
18
  }
package/src/dom.d.ts CHANGED
@@ -10,7 +10,12 @@
10
10
  * governing permissions and limitations under the License.
11
11
  */
12
12
 
13
- import {ClipboardEventHandler, CompositionEventHandler, FormEventHandler, ReactEventHandler} from 'react';
13
+ import {
14
+ ClipboardEventHandler,
15
+ CompositionEventHandler,
16
+ FormEventHandler,
17
+ ReactEventHandler
18
+ } from 'react';
14
19
 
15
20
  export interface AriaLabelingProps {
16
21
  /**
@@ -125,7 +130,7 @@ export interface TextInputDOMProps extends DOMProps {
125
130
  * Handler that is called when a text composition system starts a new text composition session. See [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Element/compositionstart_event).
126
131
  */
127
132
  onCompositionStart?: CompositionEventHandler<HTMLInputElement>,
128
-
133
+
129
134
  /**
130
135
  * Handler that is called when a text composition system completes or cancels the current text composition session. See [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Element/compositionend_event).
131
136
  */
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',
@@ -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';