@react-aria/toggle 3.2.0 → 3.2.3

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/dist/main.js CHANGED
@@ -1,6 +1,6 @@
1
- var $54UbW$reactariautils = require("@react-aria/utils");
2
- var $54UbW$reactariafocus = require("@react-aria/focus");
3
- var $54UbW$reactariainteractions = require("@react-aria/interactions");
1
+ var $7WOm2$reactariautils = require("@react-aria/utils");
2
+ var $7WOm2$reactariafocus = require("@react-aria/focus");
3
+ var $7WOm2$reactariainteractions = require("@react-aria/interactions");
4
4
 
5
5
  function $parcel$exportWildcard(dest, source) {
6
6
  Object.keys(source).forEach(function(key) {
@@ -21,13 +21,13 @@ function $parcel$exportWildcard(dest, source) {
21
21
  function $parcel$export(e, n, v, s) {
22
22
  Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
23
23
  }
24
- var $4baf5759bc539c6b$exports = {};
24
+ var $ee1b638d33c90dcc$exports = {};
25
25
 
26
- $parcel$export($4baf5759bc539c6b$exports, "useToggle", () => $4baf5759bc539c6b$export$cbe85ee05b554577);
26
+ $parcel$export($ee1b638d33c90dcc$exports, "useToggle", () => $ee1b638d33c90dcc$export$cbe85ee05b554577);
27
27
 
28
28
 
29
29
 
30
- function $4baf5759bc539c6b$export$cbe85ee05b554577(props, state, ref) {
30
+ function $ee1b638d33c90dcc$export$cbe85ee05b554577(props, state, ref) {
31
31
  let { isDisabled: isDisabled = false , isRequired: isRequired , isReadOnly: isReadOnly , value: value , name: name , children: children , 'aria-label': ariaLabel , 'aria-labelledby': ariaLabelledby , validationState: validationState = 'valid' } = props;
32
32
  let onChange = (e)=>{
33
33
  // since we spread props on label, onChange will end up there as well as in here.
@@ -39,16 +39,16 @@ function $4baf5759bc539c6b$export$cbe85ee05b554577(props, state, ref) {
39
39
  let hasAriaLabel = ariaLabel != null || ariaLabelledby != null;
40
40
  if (!hasChildren && !hasAriaLabel) console.warn('If you do not provide children, you must specify an aria-label for accessibility');
41
41
  // This handles focusing the input on pointer down, which Safari does not do by default.
42
- let { pressProps: pressProps } = $54UbW$reactariainteractions.usePress({
42
+ let { pressProps: pressProps } = $7WOm2$reactariainteractions.usePress({
43
43
  isDisabled: isDisabled
44
44
  });
45
- let { focusableProps: focusableProps } = $54UbW$reactariafocus.useFocusable(props, ref);
46
- let interactions = $54UbW$reactariautils.mergeProps(pressProps, focusableProps);
47
- let domProps = $54UbW$reactariautils.filterDOMProps(props, {
45
+ let { focusableProps: focusableProps } = $7WOm2$reactariafocus.useFocusable(props, ref);
46
+ let interactions = $7WOm2$reactariautils.mergeProps(pressProps, focusableProps);
47
+ let domProps = $7WOm2$reactariautils.filterDOMProps(props, {
48
48
  labelable: true
49
49
  });
50
50
  return {
51
- inputProps: $54UbW$reactariautils.mergeProps(domProps, {
51
+ inputProps: $7WOm2$reactariautils.mergeProps(domProps, {
52
52
  'aria-invalid': validationState === 'invalid' || undefined,
53
53
  'aria-errormessage': props['aria-errormessage'],
54
54
  'aria-controls': props['aria-controls'],
@@ -65,7 +65,7 @@ function $4baf5759bc539c6b$export$cbe85ee05b554577(props, state, ref) {
65
65
  }
66
66
 
67
67
 
68
- $parcel$exportWildcard(module.exports, $4baf5759bc539c6b$exports);
68
+ $parcel$exportWildcard(module.exports, $ee1b638d33c90dcc$exports);
69
69
 
70
70
 
71
71
  //# sourceMappingURL=main.js.map
package/dist/module.js CHANGED
@@ -1,17 +1,17 @@
1
- import {mergeProps as $aVyw8$mergeProps, filterDOMProps as $aVyw8$filterDOMProps} from "@react-aria/utils";
2
- import {useFocusable as $aVyw8$useFocusable} from "@react-aria/focus";
3
- import {usePress as $aVyw8$usePress} from "@react-aria/interactions";
1
+ import {mergeProps as $7CUUz$mergeProps, filterDOMProps as $7CUUz$filterDOMProps} from "@react-aria/utils";
2
+ import {useFocusable as $7CUUz$useFocusable} from "@react-aria/focus";
3
+ import {usePress as $7CUUz$usePress} from "@react-aria/interactions";
4
4
 
5
5
  function $parcel$export(e, n, v, s) {
6
6
  Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
7
7
  }
8
- var $6f01a055f297c6b8$exports = {};
8
+ var $d2c8e2b0480f3f34$exports = {};
9
9
 
10
- $parcel$export($6f01a055f297c6b8$exports, "useToggle", () => $6f01a055f297c6b8$export$cbe85ee05b554577);
10
+ $parcel$export($d2c8e2b0480f3f34$exports, "useToggle", () => $d2c8e2b0480f3f34$export$cbe85ee05b554577);
11
11
 
12
12
 
13
13
 
14
- function $6f01a055f297c6b8$export$cbe85ee05b554577(props, state, ref) {
14
+ function $d2c8e2b0480f3f34$export$cbe85ee05b554577(props, state, ref) {
15
15
  let { isDisabled: isDisabled = false , isRequired: isRequired , isReadOnly: isReadOnly , value: value , name: name , children: children , 'aria-label': ariaLabel , 'aria-labelledby': ariaLabelledby , validationState: validationState = 'valid' } = props;
16
16
  let onChange = (e)=>{
17
17
  // since we spread props on label, onChange will end up there as well as in here.
@@ -23,16 +23,16 @@ function $6f01a055f297c6b8$export$cbe85ee05b554577(props, state, ref) {
23
23
  let hasAriaLabel = ariaLabel != null || ariaLabelledby != null;
24
24
  if (!hasChildren && !hasAriaLabel) console.warn('If you do not provide children, you must specify an aria-label for accessibility');
25
25
  // This handles focusing the input on pointer down, which Safari does not do by default.
26
- let { pressProps: pressProps } = $aVyw8$usePress({
26
+ let { pressProps: pressProps } = $7CUUz$usePress({
27
27
  isDisabled: isDisabled
28
28
  });
29
- let { focusableProps: focusableProps } = $aVyw8$useFocusable(props, ref);
30
- let interactions = $aVyw8$mergeProps(pressProps, focusableProps);
31
- let domProps = $aVyw8$filterDOMProps(props, {
29
+ let { focusableProps: focusableProps } = $7CUUz$useFocusable(props, ref);
30
+ let interactions = $7CUUz$mergeProps(pressProps, focusableProps);
31
+ let domProps = $7CUUz$filterDOMProps(props, {
32
32
  labelable: true
33
33
  });
34
34
  return {
35
- inputProps: $aVyw8$mergeProps(domProps, {
35
+ inputProps: $7CUUz$mergeProps(domProps, {
36
36
  'aria-invalid': validationState === 'invalid' || undefined,
37
37
  'aria-errormessage': props['aria-errormessage'],
38
38
  'aria-controls': props['aria-controls'],
@@ -51,5 +51,5 @@ function $6f01a055f297c6b8$export$cbe85ee05b554577(props, state, ref) {
51
51
 
52
52
 
53
53
 
54
- export {$6f01a055f297c6b8$export$cbe85ee05b554577 as useToggle};
54
+ export {$d2c8e2b0480f3f34$export$cbe85ee05b554577 as useToggle};
55
55
  //# sourceMappingURL=module.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-aria/toggle",
3
- "version": "3.2.0",
3
+ "version": "3.2.3",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/main.js",
@@ -18,13 +18,13 @@
18
18
  },
19
19
  "dependencies": {
20
20
  "@babel/runtime": "^7.6.2",
21
- "@react-aria/focus": "^3.5.1",
22
- "@react-aria/interactions": "^3.8.0",
23
- "@react-aria/utils": "^3.11.1",
24
- "@react-stately/toggle": "^3.2.4",
25
- "@react-types/checkbox": "^3.2.4",
26
- "@react-types/shared": "^3.11.0",
27
- "@react-types/switch": "^3.1.3"
21
+ "@react-aria/focus": "^3.5.4",
22
+ "@react-aria/interactions": "^3.8.3",
23
+ "@react-aria/utils": "^3.11.3",
24
+ "@react-stately/toggle": "^3.2.6",
25
+ "@react-types/checkbox": "^3.2.6",
26
+ "@react-types/shared": "^3.11.2",
27
+ "@react-types/switch": "^3.1.5"
28
28
  },
29
29
  "peerDependencies": {
30
30
  "react": "^16.8.0 || ^17.0.0-rc.1"
@@ -32,5 +32,5 @@
32
32
  "publishConfig": {
33
33
  "access": "public"
34
34
  },
35
- "gitHead": "54c2366c4f31bd4bf619126131cd583c12972acc"
35
+ "gitHead": "e7708349a637642a30d33a11ca4a75ad5829eaa3"
36
36
  }