@react-types/shared 3.34.0 → 3.36.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 +9 -6
- package/src/collections.d.ts +85 -75
- package/src/dna.d.ts +9 -40
- package/src/dnd.d.ts +106 -84
- package/src/dom.d.ts +240 -188
- package/src/events.d.ts +54 -58
- package/src/inputs.d.ts +32 -27
- package/src/labelable.d.ts +9 -6
- package/src/refs.d.ts +10 -5
- package/src/removable.d.ts +2 -2
- package/src/selection.d.ts +11 -11
- package/src/style.d.ts +504 -180
package/src/dom.d.ts
CHANGED
|
@@ -26,6 +26,7 @@ import {
|
|
|
26
26
|
PointerEventHandler,
|
|
27
27
|
DOMAttributes as ReactDOMAttributes,
|
|
28
28
|
ReactEventHandler,
|
|
29
|
+
RefAttributes,
|
|
29
30
|
TouchEventHandler,
|
|
30
31
|
TransitionEventHandler,
|
|
31
32
|
UIEventHandler,
|
|
@@ -37,22 +38,23 @@ export interface AriaLabelingProps {
|
|
|
37
38
|
/**
|
|
38
39
|
* Defines a string value that labels the current element.
|
|
39
40
|
*/
|
|
40
|
-
'aria-label'?: string
|
|
41
|
+
'aria-label'?: string;
|
|
41
42
|
|
|
42
43
|
/**
|
|
43
44
|
* Identifies the element (or elements) that labels the current element.
|
|
44
45
|
*/
|
|
45
|
-
'aria-labelledby'?: string
|
|
46
|
+
'aria-labelledby'?: string;
|
|
46
47
|
|
|
47
48
|
/**
|
|
48
49
|
* Identifies the element (or elements) that describes the object.
|
|
49
50
|
*/
|
|
50
|
-
'aria-describedby'?: string
|
|
51
|
+
'aria-describedby'?: string;
|
|
51
52
|
|
|
52
53
|
/**
|
|
53
|
-
* Identifies the element (or elements) that provide a detailed, extended description for the
|
|
54
|
+
* Identifies the element (or elements) that provide a detailed, extended description for the
|
|
55
|
+
* object.
|
|
54
56
|
*/
|
|
55
|
-
'aria-details'?: string
|
|
57
|
+
'aria-details'?: string;
|
|
56
58
|
}
|
|
57
59
|
|
|
58
60
|
export interface AriaValidationProps {
|
|
@@ -60,16 +62,17 @@ export interface AriaValidationProps {
|
|
|
60
62
|
/**
|
|
61
63
|
* Identifies the element that provides an error message for the object.
|
|
62
64
|
*/
|
|
63
|
-
'aria-errormessage'?: string
|
|
65
|
+
'aria-errormessage'?: string;
|
|
64
66
|
}
|
|
65
67
|
|
|
66
68
|
// A set of common DOM props that are allowed on any component
|
|
67
69
|
// Ensure this is synced with DOMPropNames in filterDOMProps
|
|
68
70
|
export interface DOMProps {
|
|
69
71
|
/**
|
|
70
|
-
* The element's unique identifier. See
|
|
72
|
+
* The element's unique identifier. See
|
|
73
|
+
* [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id).
|
|
71
74
|
*/
|
|
72
|
-
id?: string
|
|
75
|
+
id?: string;
|
|
73
76
|
}
|
|
74
77
|
|
|
75
78
|
export interface FocusableDOMProps extends DOMProps {
|
|
@@ -79,126 +82,151 @@ export interface FocusableDOMProps extends DOMProps {
|
|
|
79
82
|
* be avoided except in rare scenarios where an alternative means of accessing
|
|
80
83
|
* the element or its functionality via the keyboard is available.
|
|
81
84
|
*/
|
|
82
|
-
excludeFromTabOrder?: boolean
|
|
85
|
+
excludeFromTabOrder?: boolean;
|
|
83
86
|
}
|
|
84
87
|
|
|
85
|
-
|
|
86
|
-
export interface TextInputDOMEvents {
|
|
88
|
+
export interface TextInputDOMEvents<T = HTMLInputElement> {
|
|
87
89
|
// Clipboard events
|
|
88
90
|
/**
|
|
89
|
-
* Handler that is called when the user copies text. See
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
91
|
+
* Handler that is called when the user copies text. See
|
|
92
|
+
* [MDN](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/oncopy).
|
|
93
|
+
*/
|
|
94
|
+
onCopy?: ClipboardEventHandler<T>;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Handler that is called when the user cuts text. See
|
|
98
|
+
* [MDN](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/oncut).
|
|
99
|
+
*/
|
|
100
|
+
onCut?: ClipboardEventHandler<T>;
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Handler that is called when the user pastes text. See
|
|
104
|
+
* [MDN](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/onpaste).
|
|
105
|
+
*/
|
|
106
|
+
onPaste?: ClipboardEventHandler<T>;
|
|
107
|
+
|
|
108
|
+
// Composition events
|
|
109
|
+
/**
|
|
110
|
+
* Handler that is called when a text composition system starts a new text composition session.
|
|
111
|
+
* See [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Element/compositionstart_event).
|
|
112
|
+
*/
|
|
113
|
+
onCompositionStart?: CompositionEventHandler<T>;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Handler that is called when a text composition system completes or cancels the current text
|
|
117
|
+
* composition session. See
|
|
118
|
+
* [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Element/compositionend_event).
|
|
119
|
+
*/
|
|
120
|
+
onCompositionEnd?: CompositionEventHandler<T>;
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Handler that is called when a new character is received in the current text composition
|
|
124
|
+
* session. See
|
|
125
|
+
* [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Element/compositionupdate_event).
|
|
126
|
+
*/
|
|
127
|
+
onCompositionUpdate?: CompositionEventHandler<T>;
|
|
128
|
+
|
|
129
|
+
// Selection events
|
|
130
|
+
/**
|
|
131
|
+
* Handler that is called when text in the input is selected. See
|
|
132
|
+
* [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Element/select_event).
|
|
133
|
+
*/
|
|
134
|
+
onSelect?: ReactEventHandler<T>;
|
|
135
|
+
|
|
136
|
+
// Input events
|
|
137
|
+
/**
|
|
138
|
+
* Handler that is called when the input value is about to be modified. See
|
|
139
|
+
* [MDN](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/beforeinput_event).
|
|
140
|
+
*/
|
|
141
|
+
onBeforeInput?: FormEventHandler<T>;
|
|
142
|
+
/**
|
|
143
|
+
* Handler that is called when the input value is modified. See
|
|
144
|
+
* [MDN](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/input_event).
|
|
145
|
+
*/
|
|
146
|
+
onInput?: FormEventHandler<T>;
|
|
134
147
|
}
|
|
135
148
|
|
|
136
149
|
export interface InputDOMProps {
|
|
137
150
|
/**
|
|
138
|
-
* The name of the input element, used when submitting an HTML form. See
|
|
151
|
+
* The name of the input element, used when submitting an HTML form. See
|
|
152
|
+
* [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefname).
|
|
139
153
|
*/
|
|
140
|
-
name?: string
|
|
154
|
+
name?: string;
|
|
141
155
|
/**
|
|
142
156
|
* The `<form>` element to associate the input with.
|
|
143
157
|
* The value of this attribute must be the id of a `<form>` in the same document.
|
|
144
158
|
* See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#form).
|
|
145
159
|
*/
|
|
146
|
-
form?: string
|
|
160
|
+
form?: string;
|
|
147
161
|
}
|
|
148
162
|
|
|
149
163
|
// DOM props that apply to all text inputs
|
|
150
164
|
// Ensure this is synced with useTextField
|
|
151
|
-
export interface TextInputDOMProps
|
|
165
|
+
export interface TextInputDOMProps<T = HTMLInputElement>
|
|
166
|
+
extends DOMProps, InputDOMProps, TextInputDOMEvents<T> {
|
|
152
167
|
/**
|
|
153
|
-
* Describes the type of autocomplete functionality the input should provide if any. See
|
|
168
|
+
* Describes the type of autocomplete functionality the input should provide if any. See
|
|
169
|
+
* [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefautocomplete).
|
|
154
170
|
*/
|
|
155
|
-
autoComplete?: string
|
|
171
|
+
autoComplete?: string;
|
|
156
172
|
|
|
157
173
|
/**
|
|
158
|
-
* The maximum number of characters supported by the input. See
|
|
174
|
+
* The maximum number of characters supported by the input. See
|
|
175
|
+
* [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefmaxlength).
|
|
159
176
|
*/
|
|
160
|
-
maxLength?: number
|
|
177
|
+
maxLength?: number;
|
|
161
178
|
|
|
162
179
|
/**
|
|
163
|
-
* The minimum number of characters required by the input. See
|
|
180
|
+
* The minimum number of characters required by the input. See
|
|
181
|
+
* [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefminlength).
|
|
164
182
|
*/
|
|
165
|
-
minLength?: number
|
|
183
|
+
minLength?: number;
|
|
166
184
|
|
|
167
185
|
/**
|
|
168
|
-
* Regex pattern that the value of the input must match to be valid. See
|
|
186
|
+
* Regex pattern that the value of the input must match to be valid. See
|
|
187
|
+
* [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefpattern).
|
|
169
188
|
*/
|
|
170
|
-
pattern?: string
|
|
189
|
+
pattern?: string;
|
|
171
190
|
|
|
172
191
|
/**
|
|
173
|
-
* Content that appears in the input when it is empty. See
|
|
192
|
+
* Content that appears in the input when it is empty. See
|
|
193
|
+
* [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefplaceholder).
|
|
174
194
|
*/
|
|
175
|
-
placeholder?: string
|
|
195
|
+
placeholder?: string;
|
|
176
196
|
|
|
177
197
|
/**
|
|
178
|
-
* The type of input to render. See
|
|
198
|
+
* The type of input to render. See
|
|
199
|
+
* [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdeftype).
|
|
200
|
+
*
|
|
179
201
|
* @default 'text'
|
|
180
202
|
*/
|
|
181
|
-
type?: 'text' | 'search' | 'url' | 'tel' | 'email' | 'password' | (string & {})
|
|
203
|
+
type?: 'text' | 'search' | 'url' | 'tel' | 'email' | 'password' | (string & {});
|
|
182
204
|
|
|
183
205
|
/**
|
|
184
|
-
* Hints at the type of data that might be entered by the user while editing the element or its
|
|
206
|
+
* Hints at the type of data that might be entered by the user while editing the element or its
|
|
207
|
+
* contents. See
|
|
208
|
+
* [MDN](https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute).
|
|
185
209
|
*/
|
|
186
|
-
inputMode?: 'none' | 'text' | 'tel' | 'url' | 'email' | 'numeric' | 'decimal' | 'search'
|
|
210
|
+
inputMode?: 'none' | 'text' | 'tel' | 'url' | 'email' | 'numeric' | 'decimal' | 'search';
|
|
187
211
|
|
|
188
212
|
/**
|
|
189
|
-
* An attribute that takes as its value a space-separated string that describes what, if any, type
|
|
213
|
+
* An attribute that takes as its value a space-separated string that describes what, if any, type
|
|
214
|
+
* of autocomplete functionality the input should provide. See
|
|
215
|
+
* [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#autocomplete).
|
|
190
216
|
*/
|
|
191
|
-
autoCorrect?: string
|
|
217
|
+
autoCorrect?: string;
|
|
192
218
|
|
|
193
219
|
/**
|
|
194
|
-
* An enumerated attribute that defines whether the element may be checked for spelling errors.
|
|
220
|
+
* An enumerated attribute that defines whether the element may be checked for spelling errors.
|
|
221
|
+
* See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/spellcheck).
|
|
195
222
|
*/
|
|
196
|
-
spellCheck?: string
|
|
223
|
+
spellCheck?: string;
|
|
197
224
|
}
|
|
198
225
|
|
|
199
226
|
/**
|
|
200
|
-
* This type allows configuring link props with router options and type-safe URLs via TS module
|
|
201
|
-
* By default, this is an empty type. Extend with `href` and `routerOptions`
|
|
227
|
+
* This type allows configuring link props with router options and type-safe URLs via TS module
|
|
228
|
+
* augmentation. By default, this is an empty type. Extend with `href` and `routerOptions`
|
|
229
|
+
* properties to configure your router.
|
|
202
230
|
*/
|
|
203
231
|
export interface RouterConfig {}
|
|
204
232
|
|
|
@@ -208,21 +236,39 @@ export type RouterOptions = RouterConfig extends {routerOptions: infer O} ? O :
|
|
|
208
236
|
// Make sure to update filterDOMProps.ts when updating this.
|
|
209
237
|
export interface LinkDOMProps {
|
|
210
238
|
/** A URL to link to. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#href). */
|
|
211
|
-
href?: Href
|
|
212
|
-
/**
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
/**
|
|
223
|
-
|
|
239
|
+
href?: Href;
|
|
240
|
+
/**
|
|
241
|
+
* Hints at the human language of the linked URL.
|
|
242
|
+
* See[MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#hreflang).
|
|
243
|
+
*/
|
|
244
|
+
hrefLang?: string;
|
|
245
|
+
/**
|
|
246
|
+
* The target window for the link. See
|
|
247
|
+
* [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#target).
|
|
248
|
+
*/
|
|
249
|
+
target?: HTMLAttributeAnchorTarget;
|
|
250
|
+
/**
|
|
251
|
+
* The relationship between the linked resource and the current page. See
|
|
252
|
+
* [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel).
|
|
253
|
+
*/
|
|
254
|
+
rel?: string;
|
|
255
|
+
/**
|
|
256
|
+
* Causes the browser to download the linked URL. A string may be provided to suggest a file name.
|
|
257
|
+
* See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#download).
|
|
258
|
+
*/
|
|
259
|
+
download?: boolean | string;
|
|
260
|
+
/**
|
|
261
|
+
* A space-separated list of URLs to ping when the link is followed. See
|
|
262
|
+
* [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#ping).
|
|
263
|
+
*/
|
|
264
|
+
ping?: string;
|
|
265
|
+
/**
|
|
266
|
+
* How much of the referrer to send when following the link. See
|
|
267
|
+
* [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#referrerpolicy).
|
|
268
|
+
*/
|
|
269
|
+
referrerPolicy?: HTMLAttributeReferrerPolicy;
|
|
224
270
|
/** Options for the configured client side router. */
|
|
225
|
-
routerOptions?: RouterOptions
|
|
271
|
+
routerOptions?: RouterOptions;
|
|
226
272
|
}
|
|
227
273
|
|
|
228
274
|
/** Any focusable element, including both HTML and SVG elements. */
|
|
@@ -230,119 +276,123 @@ export interface FocusableElement extends Element, HTMLOrSVGElement {}
|
|
|
230
276
|
|
|
231
277
|
/** All DOM attributes supported across both HTML and SVG elements. */
|
|
232
278
|
export interface DOMAttributes<T = FocusableElement> extends AriaAttributes, ReactDOMAttributes<T> {
|
|
233
|
-
id?: string | undefined
|
|
234
|
-
role?: AriaRole | undefined
|
|
235
|
-
tabIndex?: number | undefined
|
|
236
|
-
style?: CSSProperties | undefined
|
|
237
|
-
className?: string | undefined
|
|
279
|
+
id?: string | undefined;
|
|
280
|
+
role?: AriaRole | undefined;
|
|
281
|
+
tabIndex?: number | undefined;
|
|
282
|
+
style?: CSSProperties | undefined;
|
|
283
|
+
className?: string | undefined;
|
|
238
284
|
}
|
|
239
285
|
|
|
286
|
+
export interface DOMAttributesWithRef<T = Element> extends DOMAttributes<T>, RefAttributes<T> {}
|
|
287
|
+
|
|
240
288
|
export interface GroupDOMAttributes extends Omit<DOMAttributes<HTMLElement>, 'role'> {
|
|
241
|
-
role?: 'group' | 'region' | 'presentation'
|
|
289
|
+
role?: 'group' | 'region' | 'presentation';
|
|
242
290
|
}
|
|
243
291
|
|
|
244
292
|
/**
|
|
245
293
|
* Global attributes that can be applied to any DOM element.
|
|
294
|
+
*
|
|
246
295
|
* @private
|
|
247
296
|
*/
|
|
248
297
|
// NOTE: id is handled elsewhere (DOMProps).
|
|
249
298
|
export interface GlobalDOMAttributes<T = Element> extends GlobalDOMEvents<T> {
|
|
250
|
-
dir?: string | undefined
|
|
251
|
-
lang?: string | undefined
|
|
252
|
-
hidden?: boolean | undefined
|
|
253
|
-
inert?: boolean | undefined
|
|
254
|
-
translate?: 'yes' | 'no' | undefined
|
|
299
|
+
dir?: string | undefined;
|
|
300
|
+
lang?: string | undefined;
|
|
301
|
+
hidden?: boolean | undefined;
|
|
302
|
+
inert?: boolean | undefined;
|
|
303
|
+
translate?: 'yes' | 'no' | undefined;
|
|
255
304
|
}
|
|
256
305
|
|
|
257
306
|
/**
|
|
258
307
|
* Global DOM events that are supported on all DOM elements.
|
|
308
|
+
*
|
|
259
309
|
* @private
|
|
260
310
|
*/
|
|
261
311
|
// NOTES:
|
|
262
312
|
// - Drag and drop events are omitted for now.
|
|
263
313
|
// - Keyboard and focus events are supported directly on focusable elements (FocusableProps).
|
|
264
|
-
// - Text input events (e.g. onInput, onCompositionStart, onCopy) are
|
|
314
|
+
// - Text input events (e.g. onInput, onCompositionStart, onCopy) are
|
|
265
315
|
// supported only directly on input elements (TextInputDOMProps).
|
|
266
316
|
// We don't support contentEditable on our components.
|
|
267
317
|
// - Media events should be handled directly on the <video>/<audio><img> element.
|
|
268
318
|
export interface GlobalDOMEvents<T = Element> {
|
|
269
319
|
// MouseEvents
|
|
270
|
-
onClick?: MouseEventHandler<T> | undefined
|
|
271
|
-
onClickCapture?: MouseEventHandler<T> | undefined
|
|
272
|
-
onAuxClick?: MouseEventHandler<T> | undefined
|
|
273
|
-
onAuxClickCapture?: MouseEventHandler<T> | undefined
|
|
274
|
-
onContextMenu?: MouseEventHandler<T> | undefined
|
|
275
|
-
onContextMenuCapture?: MouseEventHandler<T> | undefined
|
|
276
|
-
onDoubleClick?: MouseEventHandler<T> | undefined
|
|
277
|
-
onDoubleClickCapture?: MouseEventHandler<T> | undefined
|
|
278
|
-
onMouseDown?: MouseEventHandler<T> | undefined
|
|
279
|
-
onMouseDownCapture?: MouseEventHandler<T> | undefined
|
|
280
|
-
onMouseEnter?: MouseEventHandler<T> | undefined
|
|
281
|
-
onMouseLeave?: MouseEventHandler<T> | undefined
|
|
282
|
-
onMouseMove?: MouseEventHandler<T> | undefined
|
|
283
|
-
onMouseMoveCapture?: MouseEventHandler<T> | undefined
|
|
284
|
-
onMouseOut?: MouseEventHandler<T> | undefined
|
|
285
|
-
onMouseOutCapture?: MouseEventHandler<T> | undefined
|
|
286
|
-
onMouseOver?: MouseEventHandler<T> | undefined
|
|
287
|
-
onMouseOverCapture?: MouseEventHandler<T> | undefined
|
|
288
|
-
onMouseUp?: MouseEventHandler<T> | undefined
|
|
289
|
-
onMouseUpCapture?: MouseEventHandler<T> | undefined
|
|
320
|
+
onClick?: MouseEventHandler<T> | undefined;
|
|
321
|
+
onClickCapture?: MouseEventHandler<T> | undefined;
|
|
322
|
+
onAuxClick?: MouseEventHandler<T> | undefined;
|
|
323
|
+
onAuxClickCapture?: MouseEventHandler<T> | undefined;
|
|
324
|
+
onContextMenu?: MouseEventHandler<T> | undefined;
|
|
325
|
+
onContextMenuCapture?: MouseEventHandler<T> | undefined;
|
|
326
|
+
onDoubleClick?: MouseEventHandler<T> | undefined;
|
|
327
|
+
onDoubleClickCapture?: MouseEventHandler<T> | undefined;
|
|
328
|
+
onMouseDown?: MouseEventHandler<T> | undefined;
|
|
329
|
+
onMouseDownCapture?: MouseEventHandler<T> | undefined;
|
|
330
|
+
onMouseEnter?: MouseEventHandler<T> | undefined;
|
|
331
|
+
onMouseLeave?: MouseEventHandler<T> | undefined;
|
|
332
|
+
onMouseMove?: MouseEventHandler<T> | undefined;
|
|
333
|
+
onMouseMoveCapture?: MouseEventHandler<T> | undefined;
|
|
334
|
+
onMouseOut?: MouseEventHandler<T> | undefined;
|
|
335
|
+
onMouseOutCapture?: MouseEventHandler<T> | undefined;
|
|
336
|
+
onMouseOver?: MouseEventHandler<T> | undefined;
|
|
337
|
+
onMouseOverCapture?: MouseEventHandler<T> | undefined;
|
|
338
|
+
onMouseUp?: MouseEventHandler<T> | undefined;
|
|
339
|
+
onMouseUpCapture?: MouseEventHandler<T> | undefined;
|
|
290
340
|
|
|
291
341
|
// Touch Events
|
|
292
|
-
onTouchCancel?: TouchEventHandler<T> | undefined
|
|
293
|
-
onTouchCancelCapture?: TouchEventHandler<T> | undefined
|
|
294
|
-
onTouchEnd?: TouchEventHandler<T> | undefined
|
|
295
|
-
onTouchEndCapture?: TouchEventHandler<T> | undefined
|
|
296
|
-
onTouchMove?: TouchEventHandler<T> | undefined
|
|
297
|
-
onTouchMoveCapture?: TouchEventHandler<T> | undefined
|
|
298
|
-
onTouchStart?: TouchEventHandler<T> | undefined
|
|
299
|
-
onTouchStartCapture?: TouchEventHandler<T> | undefined
|
|
342
|
+
onTouchCancel?: TouchEventHandler<T> | undefined;
|
|
343
|
+
onTouchCancelCapture?: TouchEventHandler<T> | undefined;
|
|
344
|
+
onTouchEnd?: TouchEventHandler<T> | undefined;
|
|
345
|
+
onTouchEndCapture?: TouchEventHandler<T> | undefined;
|
|
346
|
+
onTouchMove?: TouchEventHandler<T> | undefined;
|
|
347
|
+
onTouchMoveCapture?: TouchEventHandler<T> | undefined;
|
|
348
|
+
onTouchStart?: TouchEventHandler<T> | undefined;
|
|
349
|
+
onTouchStartCapture?: TouchEventHandler<T> | undefined;
|
|
300
350
|
|
|
301
351
|
// Pointer Events
|
|
302
|
-
onPointerDown?: PointerEventHandler<T> | undefined
|
|
303
|
-
onPointerDownCapture?: PointerEventHandler<T> | undefined
|
|
304
|
-
onPointerMove?: PointerEventHandler<T> | undefined
|
|
305
|
-
onPointerMoveCapture?: PointerEventHandler<T> | undefined
|
|
306
|
-
onPointerUp?: PointerEventHandler<T> | undefined
|
|
307
|
-
onPointerUpCapture?: PointerEventHandler<T> | undefined
|
|
308
|
-
onPointerCancel?: PointerEventHandler<T> | undefined
|
|
309
|
-
onPointerCancelCapture?: PointerEventHandler<T> | undefined
|
|
310
|
-
onPointerEnter?: PointerEventHandler<T> | undefined
|
|
311
|
-
onPointerLeave?: PointerEventHandler<T> | undefined
|
|
312
|
-
onPointerOver?: PointerEventHandler<T> | undefined
|
|
313
|
-
onPointerOverCapture?: PointerEventHandler<T> | undefined
|
|
314
|
-
onPointerOut?: PointerEventHandler<T> | undefined
|
|
315
|
-
onPointerOutCapture?: PointerEventHandler<T> | undefined
|
|
316
|
-
onGotPointerCapture?: PointerEventHandler<T> | undefined
|
|
317
|
-
onGotPointerCaptureCapture?: PointerEventHandler<T> | undefined
|
|
318
|
-
onLostPointerCapture?: PointerEventHandler<T> | undefined
|
|
319
|
-
onLostPointerCaptureCapture?: PointerEventHandler<T> | undefined
|
|
352
|
+
onPointerDown?: PointerEventHandler<T> | undefined;
|
|
353
|
+
onPointerDownCapture?: PointerEventHandler<T> | undefined;
|
|
354
|
+
onPointerMove?: PointerEventHandler<T> | undefined;
|
|
355
|
+
onPointerMoveCapture?: PointerEventHandler<T> | undefined;
|
|
356
|
+
onPointerUp?: PointerEventHandler<T> | undefined;
|
|
357
|
+
onPointerUpCapture?: PointerEventHandler<T> | undefined;
|
|
358
|
+
onPointerCancel?: PointerEventHandler<T> | undefined;
|
|
359
|
+
onPointerCancelCapture?: PointerEventHandler<T> | undefined;
|
|
360
|
+
onPointerEnter?: PointerEventHandler<T> | undefined;
|
|
361
|
+
onPointerLeave?: PointerEventHandler<T> | undefined;
|
|
362
|
+
onPointerOver?: PointerEventHandler<T> | undefined;
|
|
363
|
+
onPointerOverCapture?: PointerEventHandler<T> | undefined;
|
|
364
|
+
onPointerOut?: PointerEventHandler<T> | undefined;
|
|
365
|
+
onPointerOutCapture?: PointerEventHandler<T> | undefined;
|
|
366
|
+
onGotPointerCapture?: PointerEventHandler<T> | undefined;
|
|
367
|
+
onGotPointerCaptureCapture?: PointerEventHandler<T> | undefined;
|
|
368
|
+
onLostPointerCapture?: PointerEventHandler<T> | undefined;
|
|
369
|
+
onLostPointerCaptureCapture?: PointerEventHandler<T> | undefined;
|
|
320
370
|
|
|
321
371
|
// UI Events
|
|
322
|
-
onScroll?: UIEventHandler<T> | undefined
|
|
323
|
-
onScrollCapture?: UIEventHandler<T> | undefined
|
|
372
|
+
onScroll?: UIEventHandler<T> | undefined;
|
|
373
|
+
onScrollCapture?: UIEventHandler<T> | undefined;
|
|
324
374
|
|
|
325
375
|
// Wheel Events
|
|
326
|
-
onWheel?: WheelEventHandler<T> | undefined
|
|
327
|
-
onWheelCapture?: WheelEventHandler<T> | undefined
|
|
376
|
+
onWheel?: WheelEventHandler<T> | undefined;
|
|
377
|
+
onWheelCapture?: WheelEventHandler<T> | undefined;
|
|
328
378
|
|
|
329
379
|
// Animation Events
|
|
330
|
-
onAnimationStart?: AnimationEventHandler<T> | undefined
|
|
331
|
-
onAnimationStartCapture?: AnimationEventHandler<T> | undefined
|
|
332
|
-
onAnimationEnd?: AnimationEventHandler<T> | undefined
|
|
333
|
-
onAnimationEndCapture?: AnimationEventHandler<T> | undefined
|
|
334
|
-
onAnimationIteration?: AnimationEventHandler<T> | undefined
|
|
335
|
-
onAnimationIterationCapture?: AnimationEventHandler<T> | undefined
|
|
380
|
+
onAnimationStart?: AnimationEventHandler<T> | undefined;
|
|
381
|
+
onAnimationStartCapture?: AnimationEventHandler<T> | undefined;
|
|
382
|
+
onAnimationEnd?: AnimationEventHandler<T> | undefined;
|
|
383
|
+
onAnimationEndCapture?: AnimationEventHandler<T> | undefined;
|
|
384
|
+
onAnimationIteration?: AnimationEventHandler<T> | undefined;
|
|
385
|
+
onAnimationIterationCapture?: AnimationEventHandler<T> | undefined;
|
|
336
386
|
|
|
337
387
|
// Transition Events
|
|
338
|
-
onTransitionCancel?: TransitionEventHandler<T> | undefined
|
|
339
|
-
onTransitionCancelCapture?: TransitionEventHandler<T> | undefined
|
|
340
|
-
onTransitionEnd?: TransitionEventHandler<T> | undefined
|
|
341
|
-
onTransitionEndCapture?: TransitionEventHandler<T> | undefined
|
|
342
|
-
onTransitionRun?: TransitionEventHandler<T> | undefined
|
|
343
|
-
onTransitionRunCapture?: TransitionEventHandler<T> | undefined
|
|
344
|
-
onTransitionStart?: TransitionEventHandler<T> | undefined
|
|
345
|
-
onTransitionStartCapture?: TransitionEventHandler<T> | undefined
|
|
388
|
+
onTransitionCancel?: TransitionEventHandler<T> | undefined;
|
|
389
|
+
onTransitionCancelCapture?: TransitionEventHandler<T> | undefined;
|
|
390
|
+
onTransitionEnd?: TransitionEventHandler<T> | undefined;
|
|
391
|
+
onTransitionEndCapture?: TransitionEventHandler<T> | undefined;
|
|
392
|
+
onTransitionRun?: TransitionEventHandler<T> | undefined;
|
|
393
|
+
onTransitionRunCapture?: TransitionEventHandler<T> | undefined;
|
|
394
|
+
onTransitionStart?: TransitionEventHandler<T> | undefined;
|
|
395
|
+
onTransitionStartCapture?: TransitionEventHandler<T> | undefined;
|
|
346
396
|
}
|
|
347
397
|
|
|
348
398
|
export interface FormProps extends AriaLabelingProps {
|
|
@@ -350,51 +400,53 @@ export interface FormProps extends AriaLabelingProps {
|
|
|
350
400
|
* Validation errors for the form, typically returned by a server.
|
|
351
401
|
* This should be set to an object mapping from input names to errors.
|
|
352
402
|
*/
|
|
353
|
-
validationErrors?: ValidationErrors
|
|
403
|
+
validationErrors?: ValidationErrors;
|
|
354
404
|
/**
|
|
355
405
|
* Where to send the form-data when the form is submitted.
|
|
356
406
|
* See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form#action).
|
|
357
407
|
*/
|
|
358
|
-
action?: string | FormHTMLAttributes<HTMLFormElement>['action']
|
|
408
|
+
action?: string | FormHTMLAttributes<HTMLFormElement>['action'];
|
|
359
409
|
/**
|
|
360
|
-
* The enctype attribute specifies how the form-data should be encoded when submitting it to the
|
|
361
|
-
* See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form#enctype).
|
|
410
|
+
* The enctype attribute specifies how the form-data should be encoded when submitting it to the
|
|
411
|
+
* server. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form#enctype).
|
|
362
412
|
*/
|
|
363
|
-
encType?: 'application/x-www-form-urlencoded' | 'multipart/form-data' | 'text/plain'
|
|
413
|
+
encType?: 'application/x-www-form-urlencoded' | 'multipart/form-data' | 'text/plain';
|
|
364
414
|
/**
|
|
365
415
|
* The HTTP method to submit the form with.
|
|
366
416
|
* See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form#method).
|
|
367
417
|
*/
|
|
368
|
-
method?: 'get' | 'post' | 'dialog'
|
|
418
|
+
method?: 'get' | 'post' | 'dialog';
|
|
369
419
|
/**
|
|
370
|
-
* The target attribute specifies a name or a keyword that indicates where to display the response
|
|
371
|
-
*
|
|
420
|
+
* The target attribute specifies a name or a keyword that indicates where to display the response
|
|
421
|
+
* that is received after submitting the form. See
|
|
422
|
+
* [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form#target).
|
|
372
423
|
*/
|
|
373
|
-
target?: '_blank' | '_self' | '_parent' | '_top'
|
|
424
|
+
target?: '_blank' | '_self' | '_parent' | '_top';
|
|
374
425
|
/**
|
|
375
426
|
* Triggered when a user submits the form.
|
|
376
427
|
*/
|
|
377
|
-
onSubmit?: (event: FormEvent<HTMLFormElement>) => void
|
|
428
|
+
onSubmit?: (event: FormEvent<HTMLFormElement>) => void;
|
|
378
429
|
/**
|
|
379
430
|
* Triggered when a user resets the form.
|
|
380
431
|
*/
|
|
381
|
-
onReset?:
|
|
432
|
+
onReset?: (event: FormEvent<HTMLFormElement>) => void;
|
|
382
433
|
/**
|
|
383
434
|
* Triggered for each invalid field when a user submits the form.
|
|
384
435
|
*/
|
|
385
|
-
onInvalid?:
|
|
436
|
+
onInvalid?: (event: FormEvent<HTMLFormElement>) => void;
|
|
386
437
|
/**
|
|
387
|
-
* Indicates whether input elements can by default have their values automatically completed by
|
|
388
|
-
*
|
|
438
|
+
* Indicates whether input elements can by default have their values automatically completed by
|
|
439
|
+
* the browser. See
|
|
440
|
+
* [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form#autocomplete).
|
|
389
441
|
*/
|
|
390
|
-
autoComplete?: 'off' | 'on'
|
|
442
|
+
autoComplete?: 'off' | 'on';
|
|
391
443
|
/**
|
|
392
|
-
* Controls whether inputted text is automatically capitalized and, if so, in what manner.
|
|
444
|
+
* Controls whether inputted text is automatically capitalized and, if so, in what manner.
|
|
393
445
|
* See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autocapitalize).
|
|
394
446
|
*/
|
|
395
|
-
autoCapitalize?: 'off' | 'none' | 'on' | 'sentences' | 'words' | 'characters'
|
|
447
|
+
autoCapitalize?: 'off' | 'none' | 'on' | 'sentences' | 'words' | 'characters';
|
|
396
448
|
/**
|
|
397
449
|
* An ARIA role override to apply to the form element.
|
|
398
450
|
*/
|
|
399
|
-
role?: 'search' | 'presentation'
|
|
451
|
+
role?: 'search' | 'presentation';
|
|
400
452
|
}
|