@react-aria/form 3.0.5-nightly.4624 → 3.0.6-nightly.4629

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.
@@ -25,12 +25,12 @@ function $9da8e3f192aba981$export$b8473d3665f3a75a(props, state, ref) {
25
25
  let { validationBehavior: validationBehavior, focus: focus } = props;
26
26
  // This is a useLayoutEffect so that it runs before the useEffect in useFormValidationState, which commits the validation change.
27
27
  (0, $j3sn1$reactariautils.useLayoutEffect)(()=>{
28
- if (validationBehavior === "native" && (ref === null || ref === void 0 ? void 0 : ref.current)) {
29
- let errorMessage = state.realtimeValidation.isInvalid ? state.realtimeValidation.validationErrors.join(" ") || "Invalid value." : "";
28
+ if (validationBehavior === 'native' && (ref === null || ref === void 0 ? void 0 : ref.current)) {
29
+ let errorMessage = state.realtimeValidation.isInvalid ? state.realtimeValidation.validationErrors.join(' ') || 'Invalid value.' : '';
30
30
  ref.current.setCustomValidity(errorMessage);
31
31
  // Prevent default tooltip for validation message.
32
32
  // https://bugzilla.mozilla.org/show_bug.cgi?id=605277
33
- if (!ref.current.hasAttribute("title")) ref.current.title = "";
33
+ if (!ref.current.hasAttribute('title')) ref.current.title = '';
34
34
  if (!state.realtimeValidation.isInvalid) state.updateValidation($9da8e3f192aba981$var$getNativeValidity(ref.current));
35
35
  }
36
36
  });
@@ -49,7 +49,7 @@ function $9da8e3f192aba981$export$b8473d3665f3a75a(props, state, ref) {
49
49
  if (focus) focus();
50
50
  else (_ref_current1 = ref.current) === null || _ref_current1 === void 0 ? void 0 : _ref_current1.focus();
51
51
  // Always show focus ring.
52
- (0, $j3sn1$reactariainteractions.setInteractionModality)("keyboard");
52
+ (0, $j3sn1$reactariainteractions.setInteractionModality)('keyboard');
53
53
  }
54
54
  // Prevent default browser error UI from appearing.
55
55
  e.preventDefault();
@@ -61,13 +61,13 @@ function $9da8e3f192aba981$export$b8473d3665f3a75a(props, state, ref) {
61
61
  let input = ref === null || ref === void 0 ? void 0 : ref.current;
62
62
  if (!input) return;
63
63
  let form = input.form;
64
- input.addEventListener("invalid", onInvalid);
65
- input.addEventListener("change", onChange);
66
- form === null || form === void 0 ? void 0 : form.addEventListener("reset", onReset);
64
+ input.addEventListener('invalid', onInvalid);
65
+ input.addEventListener('change', onChange);
66
+ form === null || form === void 0 ? void 0 : form.addEventListener('reset', onReset);
67
67
  return ()=>{
68
- input.removeEventListener("invalid", onInvalid);
69
- input.removeEventListener("change", onChange);
70
- form === null || form === void 0 ? void 0 : form.removeEventListener("reset", onReset);
68
+ input.removeEventListener('invalid', onInvalid);
69
+ input.removeEventListener('change', onChange);
70
+ form === null || form === void 0 ? void 0 : form.removeEventListener('reset', onReset);
71
71
  };
72
72
  }, [
73
73
  ref,
@@ -19,12 +19,12 @@ function $e93e671b31057976$export$b8473d3665f3a75a(props, state, ref) {
19
19
  let { validationBehavior: validationBehavior, focus: focus } = props;
20
20
  // This is a useLayoutEffect so that it runs before the useEffect in useFormValidationState, which commits the validation change.
21
21
  (0, $9Gacy$useLayoutEffect)(()=>{
22
- if (validationBehavior === "native" && (ref === null || ref === void 0 ? void 0 : ref.current)) {
23
- let errorMessage = state.realtimeValidation.isInvalid ? state.realtimeValidation.validationErrors.join(" ") || "Invalid value." : "";
22
+ if (validationBehavior === 'native' && (ref === null || ref === void 0 ? void 0 : ref.current)) {
23
+ let errorMessage = state.realtimeValidation.isInvalid ? state.realtimeValidation.validationErrors.join(' ') || 'Invalid value.' : '';
24
24
  ref.current.setCustomValidity(errorMessage);
25
25
  // Prevent default tooltip for validation message.
26
26
  // https://bugzilla.mozilla.org/show_bug.cgi?id=605277
27
- if (!ref.current.hasAttribute("title")) ref.current.title = "";
27
+ if (!ref.current.hasAttribute('title')) ref.current.title = '';
28
28
  if (!state.realtimeValidation.isInvalid) state.updateValidation($e93e671b31057976$var$getNativeValidity(ref.current));
29
29
  }
30
30
  });
@@ -43,7 +43,7 @@ function $e93e671b31057976$export$b8473d3665f3a75a(props, state, ref) {
43
43
  if (focus) focus();
44
44
  else (_ref_current1 = ref.current) === null || _ref_current1 === void 0 ? void 0 : _ref_current1.focus();
45
45
  // Always show focus ring.
46
- (0, $9Gacy$setInteractionModality)("keyboard");
46
+ (0, $9Gacy$setInteractionModality)('keyboard');
47
47
  }
48
48
  // Prevent default browser error UI from appearing.
49
49
  e.preventDefault();
@@ -55,13 +55,13 @@ function $e93e671b31057976$export$b8473d3665f3a75a(props, state, ref) {
55
55
  let input = ref === null || ref === void 0 ? void 0 : ref.current;
56
56
  if (!input) return;
57
57
  let form = input.form;
58
- input.addEventListener("invalid", onInvalid);
59
- input.addEventListener("change", onChange);
60
- form === null || form === void 0 ? void 0 : form.addEventListener("reset", onReset);
58
+ input.addEventListener('invalid', onInvalid);
59
+ input.addEventListener('change', onChange);
60
+ form === null || form === void 0 ? void 0 : form.addEventListener('reset', onReset);
61
61
  return ()=>{
62
- input.removeEventListener("invalid", onInvalid);
63
- input.removeEventListener("change", onChange);
64
- form === null || form === void 0 ? void 0 : form.removeEventListener("reset", onReset);
62
+ input.removeEventListener('invalid', onInvalid);
63
+ input.removeEventListener('change', onChange);
64
+ form === null || form === void 0 ? void 0 : form.removeEventListener('reset', onReset);
65
65
  };
66
66
  }, [
67
67
  ref,
@@ -19,12 +19,12 @@ function $e93e671b31057976$export$b8473d3665f3a75a(props, state, ref) {
19
19
  let { validationBehavior: validationBehavior, focus: focus } = props;
20
20
  // This is a useLayoutEffect so that it runs before the useEffect in useFormValidationState, which commits the validation change.
21
21
  (0, $9Gacy$useLayoutEffect)(()=>{
22
- if (validationBehavior === "native" && (ref === null || ref === void 0 ? void 0 : ref.current)) {
23
- let errorMessage = state.realtimeValidation.isInvalid ? state.realtimeValidation.validationErrors.join(" ") || "Invalid value." : "";
22
+ if (validationBehavior === 'native' && (ref === null || ref === void 0 ? void 0 : ref.current)) {
23
+ let errorMessage = state.realtimeValidation.isInvalid ? state.realtimeValidation.validationErrors.join(' ') || 'Invalid value.' : '';
24
24
  ref.current.setCustomValidity(errorMessage);
25
25
  // Prevent default tooltip for validation message.
26
26
  // https://bugzilla.mozilla.org/show_bug.cgi?id=605277
27
- if (!ref.current.hasAttribute("title")) ref.current.title = "";
27
+ if (!ref.current.hasAttribute('title')) ref.current.title = '';
28
28
  if (!state.realtimeValidation.isInvalid) state.updateValidation($e93e671b31057976$var$getNativeValidity(ref.current));
29
29
  }
30
30
  });
@@ -43,7 +43,7 @@ function $e93e671b31057976$export$b8473d3665f3a75a(props, state, ref) {
43
43
  if (focus) focus();
44
44
  else (_ref_current1 = ref.current) === null || _ref_current1 === void 0 ? void 0 : _ref_current1.focus();
45
45
  // Always show focus ring.
46
- (0, $9Gacy$setInteractionModality)("keyboard");
46
+ (0, $9Gacy$setInteractionModality)('keyboard');
47
47
  }
48
48
  // Prevent default browser error UI from appearing.
49
49
  e.preventDefault();
@@ -55,13 +55,13 @@ function $e93e671b31057976$export$b8473d3665f3a75a(props, state, ref) {
55
55
  let input = ref === null || ref === void 0 ? void 0 : ref.current;
56
56
  if (!input) return;
57
57
  let form = input.form;
58
- input.addEventListener("invalid", onInvalid);
59
- input.addEventListener("change", onChange);
60
- form === null || form === void 0 ? void 0 : form.addEventListener("reset", onReset);
58
+ input.addEventListener('invalid', onInvalid);
59
+ input.addEventListener('change', onChange);
60
+ form === null || form === void 0 ? void 0 : form.addEventListener('reset', onReset);
61
61
  return ()=>{
62
- input.removeEventListener("invalid", onInvalid);
63
- input.removeEventListener("change", onChange);
64
- form === null || form === void 0 ? void 0 : form.removeEventListener("reset", onReset);
62
+ input.removeEventListener('invalid', onInvalid);
63
+ input.removeEventListener('change', onChange);
64
+ form === null || form === void 0 ? void 0 : form.removeEventListener('reset', onReset);
65
65
  };
66
66
  }, [
67
67
  ref,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-aria/form",
3
- "version": "3.0.5-nightly.4624+d80999e89",
3
+ "version": "3.0.6-nightly.4629+c34886769",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/main.js",
@@ -22,10 +22,10 @@
22
22
  "url": "https://github.com/adobe/react-spectrum"
23
23
  },
24
24
  "dependencies": {
25
- "@react-aria/interactions": "3.0.0-nightly.2912+d80999e89",
26
- "@react-aria/utils": "3.0.0-nightly.2912+d80999e89",
27
- "@react-stately/form": "3.0.3-nightly.4624+d80999e89",
28
- "@react-types/shared": "3.0.0-nightly.2912+d80999e89",
25
+ "@react-aria/interactions": "3.0.0-nightly.2917+c34886769",
26
+ "@react-aria/utils": "3.0.0-nightly.2917+c34886769",
27
+ "@react-stately/form": "3.0.4-nightly.4629+c34886769",
28
+ "@react-types/shared": "3.0.0-nightly.2917+c34886769",
29
29
  "@swc/helpers": "^0.5.0"
30
30
  },
31
31
  "peerDependencies": {
@@ -34,5 +34,5 @@
34
34
  "publishConfig": {
35
35
  "access": "public"
36
36
  },
37
- "gitHead": "d80999e897b4d4db9fcfb4e9b8fcdc9fdd700882"
37
+ "gitHead": "c34886769d3e69bb56553a02eead6a0fd877e754"
38
38
  }