File tree Expand file tree Collapse file tree 3 files changed +18
-21
lines changed Expand file tree Collapse file tree 3 files changed +18
-21
lines changed Original file line number Diff line number Diff line change 13
13
import { AriaTextFieldProps } from '@react-types/textfield' ;
14
14
import {
15
15
ChangeEvent ,
16
+ DOMFactory ,
16
17
HTMLAttributes ,
17
18
LabelHTMLAttributes ,
19
+ ReactDOM ,
18
20
RefObject
19
21
} from 'react' ;
20
22
import { filterDOMProps , mergeProps } from '@react-aria/utils' ;
21
- import { IntrinsicHTMLAttributes , IntrinsicHTMLElements } from '@react-types/shared' ;
22
23
import { useField } from '@react-aria/label' ;
23
24
import { useFocusable } from '@react-aria/focus' ;
24
25
26
+ /**
27
+ * A map of HTML element names and their interface types.
28
+ * For example `'a'` -> `HTMLAnchorElement`.
29
+ */
30
+ type IntrinsicHTMLElements = {
31
+ [ K in keyof IntrinsicHTMLAttributes ] : IntrinsicHTMLAttributes [ K ] extends HTMLAttributes < infer T > ? T : never
32
+ } ;
33
+
34
+ /**
35
+ * A map of HTML element names and their attribute interface types.
36
+ * For example `'a'` -> `AnchorHTMLAttributes<HTMLAnchorElement>`.
37
+ */
38
+ type IntrinsicHTMLAttributes = {
39
+ [ K in keyof ReactDOM ] : ReactDOM [ K ] extends DOMFactory < infer T , any > ? T : never
40
+ } ;
41
+
25
42
type DefaultElementType = 'input' ;
26
43
27
44
/**
Original file line number Diff line number Diff line change 19
19
"dependencies" : {
20
20
"@babel/runtime" : " ^7.6.2" ,
21
21
"@react-aria/i18n" : " ^3.3.2" ,
22
- "@react-aria/interactions" : " ^3.6.0" ,
23
22
"@react-aria/utils" : " ^3.8.2" ,
24
23
"@react-stately/virtualizer" : " ^3.1.5" ,
25
24
"@react-types/shared" : " ^3.8.0"
Original file line number Diff line number Diff line change 13
13
import {
14
14
ClipboardEventHandler ,
15
15
CompositionEventHandler ,
16
- DOMFactory ,
17
16
FormEventHandler ,
18
- HTMLAttributes ,
19
- ReactDOM ,
20
17
ReactEventHandler
21
18
} from 'react' ;
22
19
@@ -160,19 +157,3 @@ export interface TextInputDOMProps extends DOMProps {
160
157
*/
161
158
onInput ?: FormEventHandler < HTMLInputElement >
162
159
}
163
-
164
- /**
165
- * A map of HTML element names and their interface types.
166
- * For example `'a'` -> `HTMLAnchorElement`.
167
- */
168
- export type IntrinsicHTMLElements = {
169
- [ K in keyof IntrinsicHTMLAttributes ] : IntrinsicHTMLAttributes [ K ] extends HTMLAttributes < infer T > ? T : never
170
- } ;
171
-
172
- /**
173
- * A map of HTML element names and their attribute interface types.
174
- * For example `'a'` -> `AnchorHTMLAttributes<HTMLAnchorElement>`.
175
- */
176
- export type IntrinsicHTMLAttributes = {
177
- [ K in keyof ReactDOM ] : ReactDOM [ K ] extends DOMFactory < infer T , any > ? T : never
178
- } ;
You can’t perform that action at this time.
0 commit comments