@react-aria/button 3.4.0 → 3.4.1

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 $7EMBp$reactariautils = require("@react-aria/utils");
2
- var $7EMBp$reactariafocus = require("@react-aria/focus");
3
- var $7EMBp$reactariainteractions = require("@react-aria/interactions");
1
+ var $daLTP$reactariautils = require("@react-aria/utils");
2
+ var $daLTP$reactariafocus = require("@react-aria/focus");
3
+ var $daLTP$reactariainteractions = require("@react-aria/interactions");
4
4
 
5
5
  function $parcel$exportWildcard(dest, source) {
6
6
  Object.keys(source).forEach(function(key) {
@@ -21,14 +21,14 @@ 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 $cf6d5e8ad7b0b063$exports = {};
24
+ var $2a2d577740169921$exports = {};
25
25
 
26
- $parcel$export($cf6d5e8ad7b0b063$exports, "useButton", () => $cf6d5e8ad7b0b063$export$ea18c227d4417cc3);
26
+ $parcel$export($2a2d577740169921$exports, "useButton", () => $2a2d577740169921$export$ea18c227d4417cc3);
27
27
 
28
28
 
29
29
 
30
30
 
31
- function $cf6d5e8ad7b0b063$export$ea18c227d4417cc3(props, ref) {
31
+ function $2a2d577740169921$export$ea18c227d4417cc3(props, ref) {
32
32
  let { elementType: elementType = 'button' , isDisabled: isDisabled , onPress: onPress , onPressStart: onPressStart , onPressEnd: onPressEnd , onPressChange: onPressChange , preventFocusOnPress: // @ts-ignore - undocumented
33
33
  preventFocusOnPress , allowFocusWhenDisabled: // @ts-ignore - undocumented
34
34
  allowFocusWhenDisabled , // @ts-ignore
@@ -48,7 +48,7 @@ function $cf6d5e8ad7b0b063$export$ea18c227d4417cc3(props, ref) {
48
48
  'aria-disabled': !isDisabled || elementType === 'input' ? undefined : isDisabled,
49
49
  rel: elementType === 'a' ? rel : undefined
50
50
  };
51
- let { pressProps: pressProps , isPressed: isPressed } = $7EMBp$reactariainteractions.usePress({
51
+ let { pressProps: pressProps , isPressed: isPressed } = $daLTP$reactariainteractions.usePress({
52
52
  onPressStart: onPressStart,
53
53
  onPressEnd: onPressEnd,
54
54
  onPressChange: onPressChange,
@@ -57,14 +57,14 @@ function $cf6d5e8ad7b0b063$export$ea18c227d4417cc3(props, ref) {
57
57
  preventFocusOnPress: preventFocusOnPress,
58
58
  ref: ref
59
59
  });
60
- let { focusableProps: focusableProps } = $7EMBp$reactariafocus.useFocusable(props, ref);
60
+ let { focusableProps: focusableProps } = $daLTP$reactariafocus.useFocusable(props, ref);
61
61
  if (allowFocusWhenDisabled) focusableProps.tabIndex = isDisabled ? -1 : focusableProps.tabIndex;
62
- let buttonProps = $7EMBp$reactariautils.mergeProps(focusableProps, pressProps, $7EMBp$reactariautils.filterDOMProps(props, {
62
+ let buttonProps = $daLTP$reactariautils.mergeProps(focusableProps, pressProps, $daLTP$reactariautils.filterDOMProps(props, {
63
63
  labelable: true
64
64
  }));
65
65
  return {
66
66
  isPressed: isPressed,
67
- buttonProps: $7EMBp$reactariautils.mergeProps(additionalProps, buttonProps, {
67
+ buttonProps: $daLTP$reactariautils.mergeProps(additionalProps, buttonProps, {
68
68
  'aria-haspopup': props['aria-haspopup'],
69
69
  'aria-expanded': props['aria-expanded'],
70
70
  'aria-controls': props['aria-controls'],
@@ -80,29 +80,29 @@ function $cf6d5e8ad7b0b063$export$ea18c227d4417cc3(props, ref) {
80
80
  }
81
81
 
82
82
 
83
- var $06fe23040a134b53$exports = {};
83
+ var $cea9daa6ad97012a$exports = {};
84
84
 
85
- $parcel$export($06fe23040a134b53$exports, "useToggleButton", () => $06fe23040a134b53$export$51e84d46ca0bc451);
85
+ $parcel$export($cea9daa6ad97012a$exports, "useToggleButton", () => $cea9daa6ad97012a$export$51e84d46ca0bc451);
86
86
 
87
87
 
88
88
 
89
- function $06fe23040a134b53$export$51e84d46ca0bc451(props, state, ref) {
89
+ function $cea9daa6ad97012a$export$51e84d46ca0bc451(props, state, ref) {
90
90
  const { isSelected: isSelected } = state;
91
- const { isPressed: isPressed , buttonProps: buttonProps } = $cf6d5e8ad7b0b063$export$ea18c227d4417cc3({
91
+ const { isPressed: isPressed , buttonProps: buttonProps } = $2a2d577740169921$export$ea18c227d4417cc3({
92
92
  ...props,
93
- onPress: $7EMBp$reactariautils.chain(state.toggle, props.onPress)
93
+ onPress: $daLTP$reactariautils.chain(state.toggle, props.onPress)
94
94
  }, ref);
95
95
  return {
96
96
  isPressed: isPressed,
97
- buttonProps: $7EMBp$reactariautils.mergeProps(buttonProps, {
97
+ buttonProps: $daLTP$reactariautils.mergeProps(buttonProps, {
98
98
  'aria-pressed': isSelected
99
99
  })
100
100
  };
101
101
  }
102
102
 
103
103
 
104
- $parcel$exportWildcard(module.exports, $cf6d5e8ad7b0b063$exports);
105
- $parcel$exportWildcard(module.exports, $06fe23040a134b53$exports);
104
+ $parcel$exportWildcard(module.exports, $2a2d577740169921$exports);
105
+ $parcel$exportWildcard(module.exports, $cea9daa6ad97012a$exports);
106
106
 
107
107
 
108
108
  //# sourceMappingURL=main.js.map
package/dist/module.js CHANGED
@@ -1,18 +1,18 @@
1
- import {mergeProps as $fXQi9$mergeProps, filterDOMProps as $fXQi9$filterDOMProps, chain as $fXQi9$chain} from "@react-aria/utils";
2
- import {useFocusable as $fXQi9$useFocusable} from "@react-aria/focus";
3
- import {usePress as $fXQi9$usePress} from "@react-aria/interactions";
1
+ import {mergeProps as $8mfbS$mergeProps, filterDOMProps as $8mfbS$filterDOMProps, chain as $8mfbS$chain} from "@react-aria/utils";
2
+ import {useFocusable as $8mfbS$useFocusable} from "@react-aria/focus";
3
+ import {usePress as $8mfbS$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 $406353e93a1b90e2$exports = {};
8
+ var $4e9d283129286548$exports = {};
9
9
 
10
- $parcel$export($406353e93a1b90e2$exports, "useButton", () => $406353e93a1b90e2$export$ea18c227d4417cc3);
10
+ $parcel$export($4e9d283129286548$exports, "useButton", () => $4e9d283129286548$export$ea18c227d4417cc3);
11
11
 
12
12
 
13
13
 
14
14
 
15
- function $406353e93a1b90e2$export$ea18c227d4417cc3(props, ref) {
15
+ function $4e9d283129286548$export$ea18c227d4417cc3(props, ref) {
16
16
  let { elementType: elementType = 'button' , isDisabled: isDisabled , onPress: onPress , onPressStart: onPressStart , onPressEnd: onPressEnd , onPressChange: onPressChange , preventFocusOnPress: // @ts-ignore - undocumented
17
17
  preventFocusOnPress , allowFocusWhenDisabled: // @ts-ignore - undocumented
18
18
  allowFocusWhenDisabled , // @ts-ignore
@@ -32,7 +32,7 @@ function $406353e93a1b90e2$export$ea18c227d4417cc3(props, ref) {
32
32
  'aria-disabled': !isDisabled || elementType === 'input' ? undefined : isDisabled,
33
33
  rel: elementType === 'a' ? rel : undefined
34
34
  };
35
- let { pressProps: pressProps , isPressed: isPressed } = $fXQi9$usePress({
35
+ let { pressProps: pressProps , isPressed: isPressed } = $8mfbS$usePress({
36
36
  onPressStart: onPressStart,
37
37
  onPressEnd: onPressEnd,
38
38
  onPressChange: onPressChange,
@@ -41,14 +41,14 @@ function $406353e93a1b90e2$export$ea18c227d4417cc3(props, ref) {
41
41
  preventFocusOnPress: preventFocusOnPress,
42
42
  ref: ref
43
43
  });
44
- let { focusableProps: focusableProps } = $fXQi9$useFocusable(props, ref);
44
+ let { focusableProps: focusableProps } = $8mfbS$useFocusable(props, ref);
45
45
  if (allowFocusWhenDisabled) focusableProps.tabIndex = isDisabled ? -1 : focusableProps.tabIndex;
46
- let buttonProps = $fXQi9$mergeProps(focusableProps, pressProps, $fXQi9$filterDOMProps(props, {
46
+ let buttonProps = $8mfbS$mergeProps(focusableProps, pressProps, $8mfbS$filterDOMProps(props, {
47
47
  labelable: true
48
48
  }));
49
49
  return {
50
50
  isPressed: isPressed,
51
- buttonProps: $fXQi9$mergeProps(additionalProps, buttonProps, {
51
+ buttonProps: $8mfbS$mergeProps(additionalProps, buttonProps, {
52
52
  'aria-haspopup': props['aria-haspopup'],
53
53
  'aria-expanded': props['aria-expanded'],
54
54
  'aria-controls': props['aria-controls'],
@@ -64,21 +64,21 @@ function $406353e93a1b90e2$export$ea18c227d4417cc3(props, ref) {
64
64
  }
65
65
 
66
66
 
67
- var $02948abd23f2e84a$exports = {};
67
+ var $2f16ea8f6283ecbd$exports = {};
68
68
 
69
- $parcel$export($02948abd23f2e84a$exports, "useToggleButton", () => $02948abd23f2e84a$export$51e84d46ca0bc451);
69
+ $parcel$export($2f16ea8f6283ecbd$exports, "useToggleButton", () => $2f16ea8f6283ecbd$export$51e84d46ca0bc451);
70
70
 
71
71
 
72
72
 
73
- function $02948abd23f2e84a$export$51e84d46ca0bc451(props, state, ref) {
73
+ function $2f16ea8f6283ecbd$export$51e84d46ca0bc451(props, state, ref) {
74
74
  const { isSelected: isSelected } = state;
75
- const { isPressed: isPressed , buttonProps: buttonProps } = $406353e93a1b90e2$export$ea18c227d4417cc3({
75
+ const { isPressed: isPressed , buttonProps: buttonProps } = $4e9d283129286548$export$ea18c227d4417cc3({
76
76
  ...props,
77
- onPress: $fXQi9$chain(state.toggle, props.onPress)
77
+ onPress: $8mfbS$chain(state.toggle, props.onPress)
78
78
  }, ref);
79
79
  return {
80
80
  isPressed: isPressed,
81
- buttonProps: $fXQi9$mergeProps(buttonProps, {
81
+ buttonProps: $8mfbS$mergeProps(buttonProps, {
82
82
  'aria-pressed': isSelected
83
83
  })
84
84
  };
@@ -87,5 +87,5 @@ function $02948abd23f2e84a$export$51e84d46ca0bc451(props, state, ref) {
87
87
 
88
88
 
89
89
 
90
- export {$406353e93a1b90e2$export$ea18c227d4417cc3 as useButton, $02948abd23f2e84a$export$51e84d46ca0bc451 as useToggleButton};
90
+ export {$4e9d283129286548$export$ea18c227d4417cc3 as useButton, $2f16ea8f6283ecbd$export$51e84d46ca0bc451 as useToggleButton};
91
91
  //# sourceMappingURL=module.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-aria/button",
3
- "version": "3.4.0",
3
+ "version": "3.4.1",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/main.js",
@@ -18,11 +18,11 @@
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/button": "^3.4.2"
21
+ "@react-aria/focus": "^3.5.2",
22
+ "@react-aria/interactions": "^3.8.1",
23
+ "@react-aria/utils": "^3.11.2",
24
+ "@react-stately/toggle": "^3.2.5",
25
+ "@react-types/button": "^3.4.3"
26
26
  },
27
27
  "peerDependencies": {
28
28
  "react": "^16.8.0 || ^17.0.0-rc.1"
@@ -30,5 +30,5 @@
30
30
  "publishConfig": {
31
31
  "access": "public"
32
32
  },
33
- "gitHead": "54c2366c4f31bd4bf619126131cd583c12972acc"
33
+ "gitHead": "404d41859b7d6f56201d7fc01bd9f22ae3512937"
34
34
  }