@react-types/form 3.5.5-nightly.4228 → 3.5.5-nightly.4242
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 +3 -3
- package/src/index.d.ts +13 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-types/form",
|
|
3
|
-
"version": "3.5.5-nightly.
|
|
3
|
+
"version": "3.5.5-nightly.4242+068ecd12e",
|
|
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.0.0-nightly.
|
|
12
|
+
"@react-types/shared": "3.0.0-nightly.2531+068ecd12e"
|
|
13
13
|
},
|
|
14
14
|
"peerDependencies": {
|
|
15
15
|
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0"
|
|
@@ -17,5 +17,5 @@
|
|
|
17
17
|
"publishConfig": {
|
|
18
18
|
"access": "public"
|
|
19
19
|
},
|
|
20
|
-
"gitHead": "
|
|
20
|
+
"gitHead": "068ecd12e8a8c61546dfda691b04ca87cbdae687"
|
|
21
21
|
}
|
package/src/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
import {AriaLabelingProps, DOMProps, SpectrumLabelableProps, StyleProps, ValidationState} from '@react-types/shared';
|
|
13
|
+
import {AriaLabelingProps, DOMProps, SpectrumLabelableProps, StyleProps, ValidationErrors, ValidationState} from '@react-types/shared';
|
|
14
14
|
import {FormEventHandler, ReactElement} from 'react';
|
|
15
15
|
|
|
16
16
|
export interface SpectrumFormProps extends DOMProps, AriaLabelingProps, StyleProps, Omit<SpectrumLabelableProps, 'contextualHelp' | 'label'> {
|
|
@@ -31,6 +31,18 @@ export interface SpectrumFormProps extends DOMProps, AriaLabelingProps, StylePro
|
|
|
31
31
|
* @default 'valid'
|
|
32
32
|
*/
|
|
33
33
|
validationState?: ValidationState,
|
|
34
|
+
/**
|
|
35
|
+
* Whether to use native HTML form validation to prevent form submission
|
|
36
|
+
* when a field value is missing or invalid, or mark the field as required
|
|
37
|
+
* or invalid via ARIA.
|
|
38
|
+
* @default 'aria'
|
|
39
|
+
*/
|
|
40
|
+
validationBehavior?: 'aria' | 'native',
|
|
41
|
+
/**
|
|
42
|
+
* Validation errors for the form, typically returned by a server.
|
|
43
|
+
* This should be set to an object mapping from input names to errors.
|
|
44
|
+
*/
|
|
45
|
+
validationErrors?: ValidationErrors,
|
|
34
46
|
/**
|
|
35
47
|
* Where to send the form-data when the form is submitted.
|
|
36
48
|
*/
|