Skip to content

Commit cda530d

Browse files
authored
Release audit (#2589)
1 parent 42f7bad commit cda530d

File tree

3 files changed

+18
-21
lines changed

3 files changed

+18
-21
lines changed

packages/@react-aria/textfield/src/useTextField.ts

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,32 @@
1313
import {AriaTextFieldProps} from '@react-types/textfield';
1414
import {
1515
ChangeEvent,
16+
DOMFactory,
1617
HTMLAttributes,
1718
LabelHTMLAttributes,
19+
ReactDOM,
1820
RefObject
1921
} from 'react';
2022
import {filterDOMProps, mergeProps} from '@react-aria/utils';
21-
import {IntrinsicHTMLAttributes, IntrinsicHTMLElements} from '@react-types/shared';
2223
import {useField} from '@react-aria/label';
2324
import {useFocusable} from '@react-aria/focus';
2425

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+
2542
type DefaultElementType = 'input';
2643

2744
/**

packages/@react-aria/virtualizer/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
"dependencies": {
2020
"@babel/runtime": "^7.6.2",
2121
"@react-aria/i18n": "^3.3.2",
22-
"@react-aria/interactions": "^3.6.0",
2322
"@react-aria/utils": "^3.8.2",
2423
"@react-stately/virtualizer": "^3.1.5",
2524
"@react-types/shared": "^3.8.0"

packages/@react-types/shared/src/dom.d.ts

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,7 @@
1313
import {
1414
ClipboardEventHandler,
1515
CompositionEventHandler,
16-
DOMFactory,
1716
FormEventHandler,
18-
HTMLAttributes,
19-
ReactDOM,
2017
ReactEventHandler
2118
} from 'react';
2219

@@ -160,19 +157,3 @@ export interface TextInputDOMProps extends DOMProps {
160157
*/
161158
onInput?: FormEventHandler<HTMLInputElement>
162159
}
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-
};

0 commit comments

Comments
 (0)