@react-types/textfield 3.12.8 → 3.13.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.
Files changed (2) hide show
  1. package/package.json +7 -4
  2. package/src/index.d.ts +2 -55
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-types/textfield",
3
- "version": "3.12.8",
3
+ "version": "3.13.0",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "types": "src/index.d.ts",
@@ -9,13 +9,16 @@
9
9
  "url": "https://github.com/adobe/react-spectrum"
10
10
  },
11
11
  "dependencies": {
12
- "@react-types/shared": "^3.33.1"
12
+ "@react-aria/textfield": "^3.19.0",
13
+ "@react-spectrum/textfield": "^3.15.0"
13
14
  },
14
15
  "peerDependencies": {
15
- "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1"
16
+ "@react-spectrum/provider": "^3.0.0",
17
+ "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1",
18
+ "react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1"
16
19
  },
17
20
  "publishConfig": {
18
21
  "access": "public"
19
22
  },
20
- "gitHead": "8df187370053aa35f553cb388ad670f65e1ab371"
23
+ "gitHead": "a6999bdf494a2e9c0381a5881908328bdd22ddae"
21
24
  }
package/src/index.d.ts CHANGED
@@ -10,58 +10,5 @@
10
10
  * governing permissions and limitations under the License.
11
11
  */
12
12
 
13
- import {
14
- AriaLabelingProps,
15
- AriaValidationProps,
16
- FocusableDOMProps,
17
- FocusableProps,
18
- FocusableRefValue,
19
- HelpTextProps,
20
- InputBase,
21
- LabelableProps,
22
- SpectrumFieldValidation,
23
- SpectrumLabelableProps,
24
- SpectrumTextInputBase,
25
- StyleProps,
26
- TextInputBase,
27
- TextInputDOMProps,
28
- Validation,
29
- ValueBase
30
- } from '@react-types/shared';
31
- import {ReactElement} from 'react';
32
-
33
- export interface TextFieldProps<T = HTMLInputElement> extends InputBase, Validation<string>, HelpTextProps, FocusableProps<T>, TextInputBase, ValueBase<string>, LabelableProps {}
34
-
35
- export interface AriaTextFieldProps<T = HTMLInputElement> extends TextFieldProps<T>, AriaLabelingProps, FocusableDOMProps, TextInputDOMProps, AriaValidationProps {
36
- // https://www.w3.org/TR/wai-aria-1.2/#textbox
37
- /** Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application. */
38
- 'aria-activedescendant'?: string,
39
- /**
40
- * 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
41
- * presented if they are made.
42
- */
43
- 'aria-autocomplete'?: 'none' | 'inline' | 'list' | 'both',
44
- /** Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element. */
45
- 'aria-haspopup'?: boolean | 'false' | 'true' | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog',
46
- /** Identifies the element (or elements) whose contents or presence are controlled by the current element. */
47
- 'aria-controls'?: string,
48
- /**
49
- * An enumerated attribute that defines what action label or icon to preset for the enter key on virtual keyboards. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/enterkeyhint).
50
- */
51
- enterKeyHint?: 'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send'
52
- }
53
-
54
- interface SpectrumTextFieldBaseProps {
55
- /** An icon to display at the start of the input. */
56
- icon?: ReactElement | null,
57
- /** Whether the input should be displayed with a quiet style. */
58
- isQuiet?: boolean
59
- }
60
-
61
- export interface SpectrumTextFieldProps extends SpectrumTextFieldBaseProps, SpectrumTextInputBase, Omit<AriaTextFieldProps, 'isInvalid' | 'validationState'>, SpectrumFieldValidation<string>, SpectrumLabelableProps, StyleProps {}
62
- export interface SpectrumTextAreaProps extends SpectrumTextFieldBaseProps, SpectrumTextInputBase, Omit<AriaTextFieldProps<HTMLTextAreaElement>, 'isInvalid' | 'validationState' | 'type' | 'pattern'>, SpectrumFieldValidation<string>, SpectrumLabelableProps, StyleProps {}
63
-
64
- export interface TextFieldRef<T extends HTMLInputElement | HTMLTextAreaElement = HTMLInputElement> extends FocusableRefValue<T, HTMLDivElement> {
65
- select(): void,
66
- getInputElement(): T | null
67
- }
13
+ export {TextFieldProps, AriaTextFieldProps} from '@react-aria/textfield';
14
+ export {SpectrumTextFieldProps, SpectrumTextAreaProps, TextFieldRef} from '@react-spectrum/textfield';