@types/react 17.0.16 → 17.0.20
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.
- react/README.md +1 -1
- react/index.d.ts +48 -13
- react/package.json +3 -3
react/README.md
CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for React (http://facebook.github.io/reac
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react.
|
9
9
|
|
10
10
|
### Additional Details
|
11
|
-
* Last updated:
|
11
|
+
* Last updated: Sun, 05 Sep 2021 10:01:23 GMT
|
12
12
|
* Dependencies: [@types/csstype](https://npmjs.com/package/@types/csstype), [@types/prop-types](https://npmjs.com/package/@types/prop-types), [@types/scheduler](https://npmjs.com/package/@types/scheduler)
|
13
13
|
* Global values: `React`
|
14
14
|
|
react/index.d.ts
CHANGED
@@ -840,6 +840,14 @@ declare namespace React {
|
|
840
840
|
type ComponentPropsWithoutRef<T extends ElementType> =
|
841
841
|
PropsWithoutRef<ComponentProps<T>>;
|
842
842
|
|
843
|
+
type ComponentRef<T extends ElementType> = T extends NamedExoticComponent<
|
844
|
+
ComponentPropsWithoutRef<T> & RefAttributes<infer Method>
|
845
|
+
>
|
846
|
+
? Method
|
847
|
+
: ComponentPropsWithRef<T> extends RefAttributes<infer Method>
|
848
|
+
? Method
|
849
|
+
: never;
|
850
|
+
|
843
851
|
// will show `Memo(${Component.displayName || Component.name})` in devtools by default,
|
844
852
|
// but can be given its own specific name
|
845
853
|
type MemoExoticComponent<T extends ComponentType<any>> = NamedExoticComponent<ComponentPropsWithRef<T>> & {
|
@@ -1555,14 +1563,14 @@ declare namespace React {
|
|
1555
1563
|
/** Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application. */
|
1556
1564
|
'aria-activedescendant'?: string | undefined;
|
1557
1565
|
/** Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute. */
|
1558
|
-
'aria-atomic'?:
|
1566
|
+
'aria-atomic'?: Booleanish | undefined;
|
1559
1567
|
/**
|
1560
1568
|
* Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be
|
1561
1569
|
* presented if they are made.
|
1562
1570
|
*/
|
1563
1571
|
'aria-autocomplete'?: 'none' | 'inline' | 'list' | 'both' | undefined;
|
1564
1572
|
/** Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user. */
|
1565
|
-
'aria-busy'?:
|
1573
|
+
'aria-busy'?: Booleanish | undefined;
|
1566
1574
|
/**
|
1567
1575
|
* Indicates the current "checked" state of checkboxes, radio buttons, and other widgets.
|
1568
1576
|
* @see aria-pressed @see aria-selected.
|
@@ -1604,7 +1612,7 @@ declare namespace React {
|
|
1604
1612
|
* Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.
|
1605
1613
|
* @see aria-hidden @see aria-readonly.
|
1606
1614
|
*/
|
1607
|
-
'aria-disabled'?:
|
1615
|
+
'aria-disabled'?: Booleanish | undefined;
|
1608
1616
|
/**
|
1609
1617
|
* Indicates what functions can be performed when a dragged object is released on the drop target.
|
1610
1618
|
* @deprecated in ARIA 1.1
|
@@ -1616,7 +1624,7 @@ declare namespace React {
|
|
1616
1624
|
*/
|
1617
1625
|
'aria-errormessage'?: string | undefined;
|
1618
1626
|
/** Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed. */
|
1619
|
-
'aria-expanded'?:
|
1627
|
+
'aria-expanded'?: Booleanish | undefined;
|
1620
1628
|
/**
|
1621
1629
|
* Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion,
|
1622
1630
|
* allows assistive technology to override the general default of reading in document source order.
|
@@ -1626,14 +1634,14 @@ declare namespace React {
|
|
1626
1634
|
* Indicates an element's "grabbed" state in a drag-and-drop operation.
|
1627
1635
|
* @deprecated in ARIA 1.1
|
1628
1636
|
*/
|
1629
|
-
'aria-grabbed'?:
|
1637
|
+
'aria-grabbed'?: Booleanish | undefined;
|
1630
1638
|
/** Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element. */
|
1631
1639
|
'aria-haspopup'?: boolean | 'false' | 'true' | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog' | undefined;
|
1632
1640
|
/**
|
1633
1641
|
* Indicates whether the element is exposed to an accessibility API.
|
1634
1642
|
* @see aria-disabled.
|
1635
1643
|
*/
|
1636
|
-
'aria-hidden'?:
|
1644
|
+
'aria-hidden'?: Booleanish | undefined;
|
1637
1645
|
/**
|
1638
1646
|
* Indicates the entered value does not conform to the format expected by the application.
|
1639
1647
|
* @see aria-errormessage.
|
@@ -1656,11 +1664,11 @@ declare namespace React {
|
|
1656
1664
|
/** Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region. */
|
1657
1665
|
'aria-live'?: 'off' | 'assertive' | 'polite' | undefined;
|
1658
1666
|
/** Indicates whether an element is modal when displayed. */
|
1659
|
-
'aria-modal'?:
|
1667
|
+
'aria-modal'?: Booleanish | undefined;
|
1660
1668
|
/** Indicates whether a text box accepts multiple lines of input or only a single line. */
|
1661
|
-
'aria-multiline'?:
|
1669
|
+
'aria-multiline'?: Booleanish | undefined;
|
1662
1670
|
/** Indicates that the user may select more than one item from the current selectable descendants. */
|
1663
|
-
'aria-multiselectable'?:
|
1671
|
+
'aria-multiselectable'?: Booleanish | undefined;
|
1664
1672
|
/** Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous. */
|
1665
1673
|
'aria-orientation'?: 'horizontal' | 'vertical' | undefined;
|
1666
1674
|
/**
|
@@ -1688,14 +1696,14 @@ declare namespace React {
|
|
1688
1696
|
* Indicates that the element is not editable, but is otherwise operable.
|
1689
1697
|
* @see aria-disabled.
|
1690
1698
|
*/
|
1691
|
-
'aria-readonly'?:
|
1699
|
+
'aria-readonly'?: Booleanish | undefined;
|
1692
1700
|
/**
|
1693
1701
|
* Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified.
|
1694
1702
|
* @see aria-atomic.
|
1695
1703
|
*/
|
1696
1704
|
'aria-relevant'?: 'additions' | 'additions removals' | 'additions text' | 'all' | 'removals' | 'removals additions' | 'removals text' | 'text' | 'text additions' | 'text removals' | undefined;
|
1697
1705
|
/** Indicates that user input is required on the element before a form may be submitted. */
|
1698
|
-
'aria-required'?:
|
1706
|
+
'aria-required'?: Booleanish | undefined;
|
1699
1707
|
/** Defines a human-readable, author-localized description for the role of an element. */
|
1700
1708
|
'aria-roledescription'?: string | undefined;
|
1701
1709
|
/**
|
@@ -1717,7 +1725,7 @@ declare namespace React {
|
|
1717
1725
|
* Indicates the current "selected" state of various widgets.
|
1718
1726
|
* @see aria-checked @see aria-pressed.
|
1719
1727
|
*/
|
1720
|
-
'aria-selected'?:
|
1728
|
+
'aria-selected'?: Booleanish | undefined;
|
1721
1729
|
/**
|
1722
1730
|
* Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.
|
1723
1731
|
* @see aria-posinset.
|
@@ -2159,6 +2167,31 @@ declare namespace React {
|
|
2159
2167
|
dateTime?: string | undefined;
|
2160
2168
|
}
|
2161
2169
|
|
2170
|
+
type HTMLInputTypeAttribute =
|
2171
|
+
| 'button'
|
2172
|
+
| 'checkbox'
|
2173
|
+
| 'color'
|
2174
|
+
| 'date'
|
2175
|
+
| 'datetime-local'
|
2176
|
+
| 'email'
|
2177
|
+
| 'file'
|
2178
|
+
| 'hidden'
|
2179
|
+
| 'image'
|
2180
|
+
| 'month'
|
2181
|
+
| 'number'
|
2182
|
+
| 'password'
|
2183
|
+
| 'radio'
|
2184
|
+
| 'range'
|
2185
|
+
| 'reset'
|
2186
|
+
| 'search'
|
2187
|
+
| 'submit'
|
2188
|
+
| 'tel'
|
2189
|
+
| 'text'
|
2190
|
+
| 'time'
|
2191
|
+
| 'url'
|
2192
|
+
| 'week'
|
2193
|
+
| (string & {});
|
2194
|
+
|
2162
2195
|
interface InputHTMLAttributes<T> extends HTMLAttributes<T> {
|
2163
2196
|
accept?: string | undefined;
|
2164
2197
|
alt?: string | undefined;
|
@@ -2190,7 +2223,7 @@ declare namespace React {
|
|
2190
2223
|
size?: number | undefined;
|
2191
2224
|
src?: string | undefined;
|
2192
2225
|
step?: number | string | undefined;
|
2193
|
-
type?:
|
2226
|
+
type?: HTMLInputTypeAttribute | undefined;
|
2194
2227
|
value?: string | ReadonlyArray<string> | number | undefined;
|
2195
2228
|
width?: number | string | undefined;
|
2196
2229
|
|
@@ -2351,11 +2384,13 @@ declare namespace React {
|
|
2351
2384
|
}
|
2352
2385
|
|
2353
2386
|
interface SourceHTMLAttributes<T> extends HTMLAttributes<T> {
|
2387
|
+
height?: number | string | undefined;
|
2354
2388
|
media?: string | undefined;
|
2355
2389
|
sizes?: string | undefined;
|
2356
2390
|
src?: string | undefined;
|
2357
2391
|
srcSet?: string | undefined;
|
2358
2392
|
type?: string | undefined;
|
2393
|
+
width?: number | string | undefined;
|
2359
2394
|
}
|
2360
2395
|
|
2361
2396
|
interface StyleHTMLAttributes<T> extends HTMLAttributes<T> {
|
react/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@types/react",
|
3
|
-
"version": "17.0.
|
3
|
+
"version": "17.0.20",
|
4
4
|
"description": "TypeScript definitions for React",
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react",
|
6
6
|
"license": "MIT",
|
@@ -146,6 +146,6 @@
|
|
146
146
|
"@types/scheduler": "*",
|
147
147
|
"csstype": "^3.0.2"
|
148
148
|
},
|
149
|
-
"typesPublisherContentHash": "
|
150
|
-
"typeScriptVersion": "3.
|
149
|
+
"typesPublisherContentHash": "b98539428aeb48bb4b954672f744bccb907e1934aa7ce9a24589803ca068a20f",
|
150
|
+
"typeScriptVersion": "3.7"
|
151
151
|
}
|