@react-types/shared 3.0.0-nightly-9c6057f3f-250708 → 3.0.0-nightly-e67726023-250710
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 +1 -1
- package/src/dom.d.ts +112 -1
package/package.json
CHANGED
package/src/dom.d.ts
CHANGED
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
import {
|
|
14
|
+
AnimationEventHandler,
|
|
14
15
|
AriaAttributes,
|
|
15
16
|
AriaRole,
|
|
16
17
|
ClipboardEventHandler,
|
|
@@ -19,8 +20,14 @@ import {
|
|
|
19
20
|
FormEventHandler,
|
|
20
21
|
HTMLAttributeAnchorTarget,
|
|
21
22
|
HTMLAttributeReferrerPolicy,
|
|
23
|
+
MouseEventHandler,
|
|
24
|
+
PointerEventHandler,
|
|
22
25
|
DOMAttributes as ReactDOMAttributes,
|
|
23
|
-
ReactEventHandler
|
|
26
|
+
ReactEventHandler,
|
|
27
|
+
TouchEventHandler,
|
|
28
|
+
TransitionEventHandler,
|
|
29
|
+
UIEventHandler,
|
|
30
|
+
WheelEventHandler
|
|
24
31
|
} from 'react';
|
|
25
32
|
|
|
26
33
|
export interface AriaLabelingProps {
|
|
@@ -229,3 +236,107 @@ export interface DOMAttributes<T = FocusableElement> extends AriaAttributes, Rea
|
|
|
229
236
|
export interface GroupDOMAttributes extends Omit<DOMAttributes<HTMLElement>, 'role'> {
|
|
230
237
|
role?: 'group' | 'region' | 'presentation'
|
|
231
238
|
}
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* Global attributes that can be applied to any DOM element.
|
|
242
|
+
* @private
|
|
243
|
+
*/
|
|
244
|
+
// NOTE: id is handled elsewhere (DOMProps).
|
|
245
|
+
export interface GlobalDOMAttributes<T = Element> extends GlobalDOMEvents<T> {
|
|
246
|
+
dir?: string | undefined,
|
|
247
|
+
lang?: string | undefined,
|
|
248
|
+
hidden?: boolean | undefined,
|
|
249
|
+
inert?: boolean | undefined,
|
|
250
|
+
translate?: 'yes' | 'no' | undefined
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* Global DOM events that are supported on all DOM elements.
|
|
255
|
+
* @private
|
|
256
|
+
*/
|
|
257
|
+
// NOTES:
|
|
258
|
+
// - Drag and drop events are omitted for now.
|
|
259
|
+
// - Keyboard and focus events are supported directly on focusable elements (FocusableProps).
|
|
260
|
+
// - Text input events (e.g. onInput, onCompositionStart, onCopy) are
|
|
261
|
+
// supported only directly on input elements (TextInputDOMProps).
|
|
262
|
+
// We don't support contentEditable on our components.
|
|
263
|
+
// - Media events should be handled directly on the <video>/<audio><img> element.
|
|
264
|
+
export interface GlobalDOMEvents<T = Element> {
|
|
265
|
+
// MouseEvents
|
|
266
|
+
onClick?: MouseEventHandler<T> | undefined,
|
|
267
|
+
onClickCapture?: MouseEventHandler<T> | undefined,
|
|
268
|
+
onAuxClick?: MouseEventHandler<T> | undefined,
|
|
269
|
+
onAuxClickCapture?: MouseEventHandler<T> | undefined,
|
|
270
|
+
onContextMenu?: MouseEventHandler<T> | undefined,
|
|
271
|
+
onContextMenuCapture?: MouseEventHandler<T> | undefined,
|
|
272
|
+
onDoubleClick?: MouseEventHandler<T> | undefined,
|
|
273
|
+
onDoubleClickCapture?: MouseEventHandler<T> | undefined,
|
|
274
|
+
onMouseDown?: MouseEventHandler<T> | undefined,
|
|
275
|
+
onMouseDownCapture?: MouseEventHandler<T> | undefined,
|
|
276
|
+
onMouseEnter?: MouseEventHandler<T> | undefined,
|
|
277
|
+
onMouseLeave?: MouseEventHandler<T> | undefined,
|
|
278
|
+
onMouseMove?: MouseEventHandler<T> | undefined,
|
|
279
|
+
onMouseMoveCapture?: MouseEventHandler<T> | undefined,
|
|
280
|
+
onMouseOut?: MouseEventHandler<T> | undefined,
|
|
281
|
+
onMouseOutCapture?: MouseEventHandler<T> | undefined,
|
|
282
|
+
onMouseOver?: MouseEventHandler<T> | undefined,
|
|
283
|
+
onMouseOverCapture?: MouseEventHandler<T> | undefined,
|
|
284
|
+
onMouseUp?: MouseEventHandler<T> | undefined,
|
|
285
|
+
onMouseUpCapture?: MouseEventHandler<T> | undefined,
|
|
286
|
+
|
|
287
|
+
// Touch Events
|
|
288
|
+
onTouchCancel?: TouchEventHandler<T> | undefined,
|
|
289
|
+
onTouchCancelCapture?: TouchEventHandler<T> | undefined,
|
|
290
|
+
onTouchEnd?: TouchEventHandler<T> | undefined,
|
|
291
|
+
onTouchEndCapture?: TouchEventHandler<T> | undefined,
|
|
292
|
+
onTouchMove?: TouchEventHandler<T> | undefined,
|
|
293
|
+
onTouchMoveCapture?: TouchEventHandler<T> | undefined,
|
|
294
|
+
onTouchStart?: TouchEventHandler<T> | undefined,
|
|
295
|
+
onTouchStartCapture?: TouchEventHandler<T> | undefined,
|
|
296
|
+
|
|
297
|
+
// Pointer Events
|
|
298
|
+
onPointerDown?: PointerEventHandler<T> | undefined,
|
|
299
|
+
onPointerDownCapture?: PointerEventHandler<T> | undefined,
|
|
300
|
+
onPointerMove?: PointerEventHandler<T> | undefined,
|
|
301
|
+
onPointerMoveCapture?: PointerEventHandler<T> | undefined,
|
|
302
|
+
onPointerUp?: PointerEventHandler<T> | undefined,
|
|
303
|
+
onPointerUpCapture?: PointerEventHandler<T> | undefined,
|
|
304
|
+
onPointerCancel?: PointerEventHandler<T> | undefined,
|
|
305
|
+
onPointerCancelCapture?: PointerEventHandler<T> | undefined,
|
|
306
|
+
onPointerEnter?: PointerEventHandler<T> | undefined,
|
|
307
|
+
onPointerLeave?: PointerEventHandler<T> | undefined,
|
|
308
|
+
onPointerOver?: PointerEventHandler<T> | undefined,
|
|
309
|
+
onPointerOverCapture?: PointerEventHandler<T> | undefined,
|
|
310
|
+
onPointerOut?: PointerEventHandler<T> | undefined,
|
|
311
|
+
onPointerOutCapture?: PointerEventHandler<T> | undefined,
|
|
312
|
+
onGotPointerCapture?: PointerEventHandler<T> | undefined,
|
|
313
|
+
onGotPointerCaptureCapture?: PointerEventHandler<T> | undefined,
|
|
314
|
+
onLostPointerCapture?: PointerEventHandler<T> | undefined,
|
|
315
|
+
onLostPointerCaptureCapture?: PointerEventHandler<T> | undefined,
|
|
316
|
+
|
|
317
|
+
// UI Events
|
|
318
|
+
onScroll?: UIEventHandler<T> | undefined,
|
|
319
|
+
onScrollCapture?: UIEventHandler<T> | undefined,
|
|
320
|
+
|
|
321
|
+
// Wheel Events
|
|
322
|
+
onWheel?: WheelEventHandler<T> | undefined,
|
|
323
|
+
onWheelCapture?: WheelEventHandler<T> | undefined,
|
|
324
|
+
|
|
325
|
+
// Animation Events
|
|
326
|
+
onAnimationStart?: AnimationEventHandler<T> | undefined,
|
|
327
|
+
onAnimationStartCapture?: AnimationEventHandler<T> | undefined,
|
|
328
|
+
onAnimationEnd?: AnimationEventHandler<T> | undefined,
|
|
329
|
+
onAnimationEndCapture?: AnimationEventHandler<T> | undefined,
|
|
330
|
+
onAnimationIteration?: AnimationEventHandler<T> | undefined,
|
|
331
|
+
onAnimationIterationCapture?: AnimationEventHandler<T> | undefined,
|
|
332
|
+
|
|
333
|
+
// Transition Events
|
|
334
|
+
onTransitionCancel?: TransitionEventHandler<T> | undefined,
|
|
335
|
+
onTransitionCancelCapture?: TransitionEventHandler<T> | undefined,
|
|
336
|
+
onTransitionEnd?: TransitionEventHandler<T> | undefined,
|
|
337
|
+
onTransitionEndCapture?: TransitionEventHandler<T> | undefined,
|
|
338
|
+
onTransitionRun?: TransitionEventHandler<T> | undefined,
|
|
339
|
+
onTransitionRunCapture?: TransitionEventHandler<T> | undefined,
|
|
340
|
+
onTransitionStart?: TransitionEventHandler<T> | undefined,
|
|
341
|
+
onTransitionStartCapture?: TransitionEventHandler<T> | undefined
|
|
342
|
+
}
|