@react-types/textfield 3.2.1 → 3.3.1

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.
Files changed (2) hide show
  1. package/package.json +3 -3
  2. package/src/index.d.ts +6 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-types/textfield",
3
- "version": "3.2.1",
3
+ "version": "3.3.1",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "types": "src/index.d.ts",
@@ -9,7 +9,7 @@
9
9
  "url": "https://github.com/adobe/react-spectrum"
10
10
  },
11
11
  "dependencies": {
12
- "@react-types/shared": "^3.2.1"
12
+ "@react-types/shared": "^3.11.0"
13
13
  },
14
14
  "peerDependencies": {
15
15
  "react": "^16.8.0 || ^17.0.0-rc.1"
@@ -17,5 +17,5 @@
17
17
  "publishConfig": {
18
18
  "access": "public"
19
19
  },
20
- "gitHead": "0778f71a3c13e1e24388a23b6d525e3b9f5b98f1"
20
+ "gitHead": "54c2366c4f31bd4bf619126131cd583c12972acc"
21
21
  }
package/src/index.d.ts CHANGED
@@ -16,6 +16,7 @@ import {
16
16
  FocusableDOMProps,
17
17
  FocusableProps,
18
18
  FocusableRefValue,
19
+ HelpTextProps,
19
20
  InputBase,
20
21
  LabelableProps,
21
22
  SpectrumLabelableProps,
@@ -27,7 +28,7 @@ import {
27
28
  } from '@react-types/shared';
28
29
  import {ReactElement} from 'react';
29
30
 
30
- export interface TextFieldProps extends InputBase, Validation, FocusableProps, TextInputBase, ValueBase<string>, LabelableProps {}
31
+ export interface TextFieldProps extends InputBase, Validation, HelpTextProps, FocusableProps, TextInputBase, ValueBase<string>, LabelableProps {}
31
32
 
32
33
  export interface AriaTextFieldProps extends TextFieldProps, AriaLabelingProps, FocusableDOMProps, TextInputDOMProps, AriaValidationProps {
33
34
  // https://www.w3.org/TR/wai-aria-1.2/#textbox
@@ -43,13 +44,13 @@ export interface AriaTextFieldProps extends TextFieldProps, AriaLabelingProps, F
43
44
  }
44
45
 
45
46
  export interface SpectrumTextFieldProps extends AriaTextFieldProps, SpectrumLabelableProps, StyleProps {
46
- /** An icon to display at the start of the textfield. */
47
+ /** An icon to display at the start of the input. */
47
48
  icon?: ReactElement,
48
- /** Whether the textfield should be displayed with a quiet style. */
49
+ /** Whether the input should be displayed with a quiet style. */
49
50
  isQuiet?: boolean
50
51
  }
51
52
 
52
- export interface TextFieldRef extends FocusableRefValue<HTMLInputElement & HTMLTextAreaElement, HTMLDivElement> {
53
+ export interface TextFieldRef extends FocusableRefValue<HTMLInputElement | HTMLTextAreaElement, HTMLDivElement> {
53
54
  select(): void,
54
- getInputElement(): HTMLInputElement & HTMLTextAreaElement
55
+ getInputElement(): HTMLInputElement | HTMLTextAreaElement
55
56
  }