@react-types/form 3.7.18 → 3.8.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.
- package/package.json +7 -4
- package/src/index.d.ts +2 -83
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-types/form",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.8.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-
|
|
12
|
+
"@react-spectrum/form": "^3.8.0",
|
|
13
|
+
"@react-types/shared": "^3.34.0"
|
|
13
14
|
},
|
|
14
15
|
"peerDependencies": {
|
|
15
|
-
"react": "^
|
|
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": "
|
|
23
|
+
"gitHead": "a6999bdf494a2e9c0381a5881908328bdd22ddae"
|
|
21
24
|
}
|
package/src/index.d.ts
CHANGED
|
@@ -10,86 +10,5 @@
|
|
|
10
10
|
* governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
export interface FormProps extends AriaLabelingProps {
|
|
17
|
-
/**
|
|
18
|
-
* Validation errors for the form, typically returned by a server.
|
|
19
|
-
* This should be set to an object mapping from input names to errors.
|
|
20
|
-
*/
|
|
21
|
-
validationErrors?: ValidationErrors,
|
|
22
|
-
/**
|
|
23
|
-
* Where to send the form-data when the form is submitted.
|
|
24
|
-
* See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form#action).
|
|
25
|
-
*/
|
|
26
|
-
action?: string | FormHTMLAttributes<HTMLFormElement>['action'],
|
|
27
|
-
/**
|
|
28
|
-
* The enctype attribute specifies how the form-data should be encoded when submitting it to the server.
|
|
29
|
-
* See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form#enctype).
|
|
30
|
-
*/
|
|
31
|
-
encType?: 'application/x-www-form-urlencoded' | 'multipart/form-data' | 'text/plain',
|
|
32
|
-
/**
|
|
33
|
-
* The HTTP method to submit the form with.
|
|
34
|
-
* See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form#method).
|
|
35
|
-
*/
|
|
36
|
-
method?: 'get' | 'post' | 'dialog',
|
|
37
|
-
/**
|
|
38
|
-
* The target attribute specifies a name or a keyword that indicates where to display the response that is received after submitting the form.
|
|
39
|
-
* See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form#target).
|
|
40
|
-
*/
|
|
41
|
-
target?: '_blank' | '_self' | '_parent' | '_top',
|
|
42
|
-
/**
|
|
43
|
-
* Triggered when a user submits the form.
|
|
44
|
-
*/
|
|
45
|
-
onSubmit?: (event: FormEvent<HTMLFormElement>) => void,
|
|
46
|
-
/**
|
|
47
|
-
* Triggered when a user resets the form.
|
|
48
|
-
*/
|
|
49
|
-
onReset?: (event: FormEvent<HTMLFormElement>) => void,
|
|
50
|
-
/**
|
|
51
|
-
* Triggered for each invalid field when a user submits the form.
|
|
52
|
-
*/
|
|
53
|
-
onInvalid?: (event: FormEvent<HTMLFormElement>) => void,
|
|
54
|
-
/**
|
|
55
|
-
* Indicates whether input elements can by default have their values automatically completed by the browser.
|
|
56
|
-
* See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form#autocomplete).
|
|
57
|
-
*/
|
|
58
|
-
autoComplete?: 'off' | 'on',
|
|
59
|
-
/**
|
|
60
|
-
* Controls whether inputted text is automatically capitalized and, if so, in what manner.
|
|
61
|
-
* See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autocapitalize).
|
|
62
|
-
*/
|
|
63
|
-
autoCapitalize?: 'off' | 'none' | 'on' | 'sentences' | 'words' | 'characters',
|
|
64
|
-
/**
|
|
65
|
-
* An ARIA role override to apply to the form element.
|
|
66
|
-
*/
|
|
67
|
-
role?: 'search' | 'presentation'
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
export interface SpectrumFormProps extends FormProps, DOMProps, StyleProps, Omit<SpectrumLabelableProps, 'contextualHelp' | 'label'> {
|
|
71
|
-
/** The contents of the Form. */
|
|
72
|
-
children: ReactElement<SpectrumLabelableProps> | ReactElement<SpectrumLabelableProps>[],
|
|
73
|
-
/** Whether the Form elements are displayed with their quiet style. */
|
|
74
|
-
isQuiet?: boolean,
|
|
75
|
-
/** Whether the Form elements are rendered with their emphasized style. */
|
|
76
|
-
isEmphasized?: boolean,
|
|
77
|
-
/** Whether the Form elements are disabled. */
|
|
78
|
-
isDisabled?: boolean,
|
|
79
|
-
/** Whether user input is required on each of the Form elements before Form submission. */
|
|
80
|
-
isRequired?: boolean,
|
|
81
|
-
/** Whether the Form elements can be selected but not changed by the user. */
|
|
82
|
-
isReadOnly?: boolean,
|
|
83
|
-
/**
|
|
84
|
-
* Whether the Form elements should display their "valid" or "invalid" visual styling.
|
|
85
|
-
* @default 'valid'
|
|
86
|
-
*/
|
|
87
|
-
validationState?: ValidationState,
|
|
88
|
-
/**
|
|
89
|
-
* Whether to use native HTML form validation to prevent form submission
|
|
90
|
-
* when a field value is missing or invalid, or mark fields as required
|
|
91
|
-
* or invalid via ARIA.
|
|
92
|
-
* @default 'aria'
|
|
93
|
-
*/
|
|
94
|
-
validationBehavior?: 'aria' | 'native'
|
|
95
|
-
}
|
|
13
|
+
export {FormProps} from '@react-types/shared';
|
|
14
|
+
export {SpectrumFormProps} from '@react-spectrum/form';
|