@react-aria/toggle 3.10.3 → 3.10.4

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.
@@ -22,7 +22,7 @@ $parcel$export(module.exports, "useToggle", () => $ee1b638d33c90dcc$export$cbe85
22
22
 
23
23
 
24
24
  function $ee1b638d33c90dcc$export$cbe85ee05b554577(props, state, ref) {
25
- let { isDisabled: isDisabled = false, isReadOnly: isReadOnly = false, value: value, name: name, children: children, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, validationState: validationState = "valid", isInvalid: isInvalid } = props;
25
+ let { isDisabled: isDisabled = false, isReadOnly: isReadOnly = false, value: value, name: name, children: children, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, validationState: validationState = 'valid', isInvalid: isInvalid } = props;
26
26
  let onChange = (e)=>{
27
27
  // since we spread props on label, onChange will end up there as well as in here.
28
28
  // so we have to stop propagation at the lowest level that we care about
@@ -31,7 +31,7 @@ function $ee1b638d33c90dcc$export$cbe85ee05b554577(props, state, ref) {
31
31
  };
32
32
  let hasChildren = children != null;
33
33
  let hasAriaLabel = ariaLabel != null || ariaLabelledby != null;
34
- if (!hasChildren && !hasAriaLabel) console.warn("If you do not provide children, you must specify an aria-label for accessibility");
34
+ if (!hasChildren && !hasAriaLabel) console.warn('If you do not provide children, you must specify an aria-label for accessibility');
35
35
  // This handles focusing the input on pointer down, which Safari does not do by default.
36
36
  let { pressProps: pressProps, isPressed: isPressed } = (0, $2jyrz$reactariainteractions.usePress)({
37
37
  isDisabled: isDisabled
@@ -54,24 +54,24 @@ function $ee1b638d33c90dcc$export$cbe85ee05b554577(props, state, ref) {
54
54
  onClick: (e)=>e.preventDefault()
55
55
  }),
56
56
  inputProps: (0, $2jyrz$reactariautils.mergeProps)(domProps, {
57
- "aria-invalid": isInvalid || validationState === "invalid" || undefined,
58
- "aria-errormessage": props["aria-errormessage"],
59
- "aria-controls": props["aria-controls"],
60
- "aria-readonly": isReadOnly || undefined,
57
+ 'aria-invalid': isInvalid || validationState === 'invalid' || undefined,
58
+ 'aria-errormessage': props['aria-errormessage'],
59
+ 'aria-controls': props['aria-controls'],
60
+ 'aria-readonly': isReadOnly || undefined,
61
61
  onChange: onChange,
62
62
  disabled: isDisabled,
63
63
  ...value == null ? {} : {
64
64
  value: value
65
65
  },
66
66
  name: name,
67
- type: "checkbox",
67
+ type: 'checkbox',
68
68
  ...interactions
69
69
  }),
70
70
  isSelected: state.isSelected,
71
71
  isPressed: isPressed || isLabelPressed,
72
72
  isDisabled: isDisabled,
73
73
  isReadOnly: isReadOnly,
74
- isInvalid: isInvalid || validationState === "invalid"
74
+ isInvalid: isInvalid || validationState === 'invalid'
75
75
  };
76
76
  }
77
77
 
@@ -16,7 +16,7 @@ import {usePress as $bvdLj$usePress} from "@react-aria/interactions";
16
16
 
17
17
 
18
18
  function $d2c8e2b0480f3f34$export$cbe85ee05b554577(props, state, ref) {
19
- let { isDisabled: isDisabled = false, isReadOnly: isReadOnly = false, value: value, name: name, children: children, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, validationState: validationState = "valid", isInvalid: isInvalid } = props;
19
+ let { isDisabled: isDisabled = false, isReadOnly: isReadOnly = false, value: value, name: name, children: children, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, validationState: validationState = 'valid', isInvalid: isInvalid } = props;
20
20
  let onChange = (e)=>{
21
21
  // since we spread props on label, onChange will end up there as well as in here.
22
22
  // so we have to stop propagation at the lowest level that we care about
@@ -25,7 +25,7 @@ function $d2c8e2b0480f3f34$export$cbe85ee05b554577(props, state, ref) {
25
25
  };
26
26
  let hasChildren = children != null;
27
27
  let hasAriaLabel = ariaLabel != null || ariaLabelledby != null;
28
- if (!hasChildren && !hasAriaLabel) console.warn("If you do not provide children, you must specify an aria-label for accessibility");
28
+ if (!hasChildren && !hasAriaLabel) console.warn('If you do not provide children, you must specify an aria-label for accessibility');
29
29
  // This handles focusing the input on pointer down, which Safari does not do by default.
30
30
  let { pressProps: pressProps, isPressed: isPressed } = (0, $bvdLj$usePress)({
31
31
  isDisabled: isDisabled
@@ -48,27 +48,27 @@ function $d2c8e2b0480f3f34$export$cbe85ee05b554577(props, state, ref) {
48
48
  onClick: (e)=>e.preventDefault()
49
49
  }),
50
50
  inputProps: (0, $bvdLj$mergeProps)(domProps, {
51
- "aria-invalid": isInvalid || validationState === "invalid" || undefined,
52
- "aria-errormessage": props["aria-errormessage"],
53
- "aria-controls": props["aria-controls"],
54
- "aria-readonly": isReadOnly || undefined,
51
+ 'aria-invalid': isInvalid || validationState === 'invalid' || undefined,
52
+ 'aria-errormessage': props['aria-errormessage'],
53
+ 'aria-controls': props['aria-controls'],
54
+ 'aria-readonly': isReadOnly || undefined,
55
55
  onChange: onChange,
56
56
  disabled: isDisabled,
57
57
  ...value == null ? {} : {
58
58
  value: value
59
59
  },
60
60
  name: name,
61
- type: "checkbox",
61
+ type: 'checkbox',
62
62
  ...interactions
63
63
  }),
64
64
  isSelected: state.isSelected,
65
65
  isPressed: isPressed || isLabelPressed,
66
66
  isDisabled: isDisabled,
67
67
  isReadOnly: isReadOnly,
68
- isInvalid: isInvalid || validationState === "invalid"
68
+ isInvalid: isInvalid || validationState === 'invalid'
69
69
  };
70
70
  }
71
71
 
72
72
 
73
73
  export {$d2c8e2b0480f3f34$export$cbe85ee05b554577 as useToggle};
74
- //# sourceMappingURL=useToggle.mjs.map
74
+ //# sourceMappingURL=useToggle.module.js.map
@@ -16,7 +16,7 @@ import {usePress as $bvdLj$usePress} from "@react-aria/interactions";
16
16
 
17
17
 
18
18
  function $d2c8e2b0480f3f34$export$cbe85ee05b554577(props, state, ref) {
19
- let { isDisabled: isDisabled = false, isReadOnly: isReadOnly = false, value: value, name: name, children: children, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, validationState: validationState = "valid", isInvalid: isInvalid } = props;
19
+ let { isDisabled: isDisabled = false, isReadOnly: isReadOnly = false, value: value, name: name, children: children, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, validationState: validationState = 'valid', isInvalid: isInvalid } = props;
20
20
  let onChange = (e)=>{
21
21
  // since we spread props on label, onChange will end up there as well as in here.
22
22
  // so we have to stop propagation at the lowest level that we care about
@@ -25,7 +25,7 @@ function $d2c8e2b0480f3f34$export$cbe85ee05b554577(props, state, ref) {
25
25
  };
26
26
  let hasChildren = children != null;
27
27
  let hasAriaLabel = ariaLabel != null || ariaLabelledby != null;
28
- if (!hasChildren && !hasAriaLabel) console.warn("If you do not provide children, you must specify an aria-label for accessibility");
28
+ if (!hasChildren && !hasAriaLabel) console.warn('If you do not provide children, you must specify an aria-label for accessibility');
29
29
  // This handles focusing the input on pointer down, which Safari does not do by default.
30
30
  let { pressProps: pressProps, isPressed: isPressed } = (0, $bvdLj$usePress)({
31
31
  isDisabled: isDisabled
@@ -48,24 +48,24 @@ function $d2c8e2b0480f3f34$export$cbe85ee05b554577(props, state, ref) {
48
48
  onClick: (e)=>e.preventDefault()
49
49
  }),
50
50
  inputProps: (0, $bvdLj$mergeProps)(domProps, {
51
- "aria-invalid": isInvalid || validationState === "invalid" || undefined,
52
- "aria-errormessage": props["aria-errormessage"],
53
- "aria-controls": props["aria-controls"],
54
- "aria-readonly": isReadOnly || undefined,
51
+ 'aria-invalid': isInvalid || validationState === 'invalid' || undefined,
52
+ 'aria-errormessage': props['aria-errormessage'],
53
+ 'aria-controls': props['aria-controls'],
54
+ 'aria-readonly': isReadOnly || undefined,
55
55
  onChange: onChange,
56
56
  disabled: isDisabled,
57
57
  ...value == null ? {} : {
58
58
  value: value
59
59
  },
60
60
  name: name,
61
- type: "checkbox",
61
+ type: 'checkbox',
62
62
  ...interactions
63
63
  }),
64
64
  isSelected: state.isSelected,
65
65
  isPressed: isPressed || isLabelPressed,
66
66
  isDisabled: isDisabled,
67
67
  isReadOnly: isReadOnly,
68
- isInvalid: isInvalid || validationState === "invalid"
68
+ isInvalid: isInvalid || validationState === 'invalid'
69
69
  };
70
70
  }
71
71
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-aria/toggle",
3
- "version": "3.10.3",
3
+ "version": "3.10.4",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/main.js",
@@ -22,11 +22,11 @@
22
22
  "url": "https://github.com/adobe/react-spectrum"
23
23
  },
24
24
  "dependencies": {
25
- "@react-aria/focus": "^3.17.0",
26
- "@react-aria/interactions": "^3.21.2",
27
- "@react-aria/utils": "^3.24.0",
28
- "@react-stately/toggle": "^3.7.3",
29
- "@react-types/checkbox": "^3.8.0",
25
+ "@react-aria/focus": "^3.17.1",
26
+ "@react-aria/interactions": "^3.21.3",
27
+ "@react-aria/utils": "^3.24.1",
28
+ "@react-stately/toggle": "^3.7.4",
29
+ "@react-types/checkbox": "^3.8.1",
30
30
  "@swc/helpers": "^0.5.0"
31
31
  },
32
32
  "peerDependencies": {
@@ -35,5 +35,5 @@
35
35
  "publishConfig": {
36
36
  "access": "public"
37
37
  },
38
- "gitHead": "f645f29edc1322153fd60af4640cbcab1d992dbd"
38
+ "gitHead": "b77d7d594dff4dcfb5359bffbcfd18142b146433"
39
39
  }