@react-types/shared 3.0.0-nightly.1658 → 3.0.0-nightly.1663

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.0.0-nightly.1658+a5a9d95db",
3
+ "version": "3.0.0-nightly.1663+2a6c48eb0",
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": "a5a9d95db94da277dca6267cca8bbe55dd6ccc69"
17
+ "gitHead": "2a6c48eb0099671cf9b530ec3d75882c549e9cb5"
18
18
  }
package/src/dom.d.ts CHANGED
@@ -11,9 +11,13 @@
11
11
  */
12
12
 
13
13
  import {
14
+ AriaAttributes,
15
+ AriaRole,
14
16
  ClipboardEventHandler,
15
17
  CompositionEventHandler,
18
+ CSSProperties,
16
19
  FormEventHandler,
20
+ DOMAttributes as ReactDOMAttributes,
17
21
  ReactEventHandler
18
22
  } from 'react';
19
23
 
@@ -160,3 +164,14 @@ export interface TextInputDOMProps extends DOMProps, TextInputDOMEvents {
160
164
  */
161
165
  inputMode?: 'none' | 'text' | 'tel' | 'url' | 'email' | 'numeric' | 'decimal' | 'search'
162
166
  }
167
+
168
+ /** Any focusable element, including both HTML and SVG elements. */
169
+ export interface FocusableElement extends Element, HTMLOrSVGElement {}
170
+
171
+ /** All DOM attributes supported across both HTML and SVG elements. */
172
+ export interface DOMAttributes<T = FocusableElement> extends AriaAttributes, ReactDOMAttributes<T> {
173
+ id?: string | undefined,
174
+ role?: AriaRole | undefined,
175
+ tabIndex?: number | undefined,
176
+ style?: CSSProperties | undefined
177
+ }
package/src/events.d.ts CHANGED
@@ -34,7 +34,7 @@ export interface PressEvent {
34
34
  /** The pointer type that triggered the press event. */
35
35
  pointerType: PointerType,
36
36
  /** The target element of the press event. */
37
- target: HTMLElement,
37
+ target: Element,
38
38
  /** Whether the shift keyboard modifier was held during the press event. */
39
39
  shiftKey: boolean,
40
40
  /** Whether the ctrl keyboard modifier was held during the press event. */