@react-aria/radio 3.1.8 → 3.1.9

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,8 +1,8 @@
1
- var $jfuDl$reactariautils = require("@react-aria/utils");
2
- var $jfuDl$reactariafocus = require("@react-aria/focus");
3
- var $jfuDl$reactariainteractions = require("@react-aria/interactions");
4
- var $jfuDl$reactarialabel = require("@react-aria/label");
5
- var $jfuDl$reactariai18n = require("@react-aria/i18n");
1
+ var $fMEGB$reactariautils = require("@react-aria/utils");
2
+ var $fMEGB$reactariafocus = require("@react-aria/focus");
3
+ var $fMEGB$reactariainteractions = require("@react-aria/interactions");
4
+ var $fMEGB$reactarialabel = require("@react-aria/label");
5
+ var $fMEGB$reactariai18n = require("@react-aria/i18n");
6
6
 
7
7
  function $parcel$exportWildcard(dest, source) {
8
8
  Object.keys(source).forEach(function(key) {
@@ -23,16 +23,16 @@ function $parcel$exportWildcard(dest, source) {
23
23
  function $parcel$export(e, n, v, s) {
24
24
  Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
25
25
  }
26
- var $338761e45a036ef1$exports = {};
26
+ var $e184702b1b7f1863$exports = {};
27
27
 
28
- $parcel$export($338761e45a036ef1$exports, "useRadio", () => $338761e45a036ef1$export$37b0961d2f4751e2);
28
+ $parcel$export($e184702b1b7f1863$exports, "useRadio", () => $e184702b1b7f1863$export$37b0961d2f4751e2);
29
29
 
30
- const $a1e0bad4e707cb8d$export$3b7b268d09480394 = new WeakMap();
30
+ const $eeb149278aae5c67$export$3b7b268d09480394 = new WeakMap();
31
31
 
32
32
 
33
33
 
34
34
 
35
- function $338761e45a036ef1$export$37b0961d2f4751e2(props, state, ref) {
35
+ function $e184702b1b7f1863$export$37b0961d2f4751e2(props, state, ref) {
36
36
  let { value: value , children: children , 'aria-label': ariaLabel , 'aria-labelledby': ariaLabelledby } = props;
37
37
  const isDisabled = props.isDisabled || state.isDisabled;
38
38
  let hasChildren = children != null;
@@ -43,23 +43,23 @@ function $338761e45a036ef1$export$37b0961d2f4751e2(props, state, ref) {
43
43
  e.stopPropagation();
44
44
  state.setSelectedValue(value);
45
45
  };
46
- let { pressProps: pressProps } = $jfuDl$reactariainteractions.usePress({
46
+ let { pressProps: pressProps } = $fMEGB$reactariainteractions.usePress({
47
47
  isDisabled: isDisabled
48
48
  });
49
- let { focusableProps: focusableProps } = $jfuDl$reactariafocus.useFocusable($jfuDl$reactariautils.mergeProps(props, {
49
+ let { focusableProps: focusableProps } = $fMEGB$reactariafocus.useFocusable($fMEGB$reactariautils.mergeProps(props, {
50
50
  onFocus: ()=>state.setLastFocusedValue(value)
51
51
  }), ref);
52
- let interactions = $jfuDl$reactariautils.mergeProps(pressProps, focusableProps);
53
- let domProps = $jfuDl$reactariautils.filterDOMProps(props, {
52
+ let interactions = $fMEGB$reactariautils.mergeProps(pressProps, focusableProps);
53
+ let domProps = $fMEGB$reactariautils.filterDOMProps(props, {
54
54
  labelable: true
55
55
  });
56
56
  let tabIndex = state.lastFocusedValue === value || state.lastFocusedValue == null ? 0 : -1;
57
57
  if (isDisabled) tabIndex = undefined;
58
58
  return {
59
- inputProps: $jfuDl$reactariautils.mergeProps(domProps, {
59
+ inputProps: $fMEGB$reactariautils.mergeProps(domProps, {
60
60
  ...interactions,
61
61
  type: 'radio',
62
- name: $a1e0bad4e707cb8d$export$3b7b268d09480394.get(state),
62
+ name: $eeb149278aae5c67$export$3b7b268d09480394.get(state),
63
63
  tabIndex: tabIndex,
64
64
  disabled: isDisabled,
65
65
  checked: checked,
@@ -70,31 +70,31 @@ function $338761e45a036ef1$export$37b0961d2f4751e2(props, state, ref) {
70
70
  }
71
71
 
72
72
 
73
- var $dab8d6446eaa2014$exports = {};
73
+ var $dfcade00a56a6317$exports = {};
74
74
 
75
- $parcel$export($dab8d6446eaa2014$exports, "useRadioGroup", () => $dab8d6446eaa2014$export$62b9571f283ff5c2);
75
+ $parcel$export($dfcade00a56a6317$exports, "useRadioGroup", () => $dfcade00a56a6317$export$62b9571f283ff5c2);
76
76
 
77
77
 
78
78
 
79
79
 
80
80
 
81
81
 
82
- function $dab8d6446eaa2014$export$62b9571f283ff5c2(props, state) {
82
+ function $dfcade00a56a6317$export$62b9571f283ff5c2(props, state) {
83
83
  let { name: name , validationState: validationState , isReadOnly: isReadOnly , isRequired: isRequired , isDisabled: isDisabled , orientation: orientation = 'vertical' } = props;
84
- let { direction: direction } = $jfuDl$reactariai18n.useLocale();
85
- let { labelProps: labelProps , fieldProps: fieldProps } = $jfuDl$reactarialabel.useLabel({
84
+ let { direction: direction } = $fMEGB$reactariai18n.useLocale();
85
+ let { labelProps: labelProps , fieldProps: fieldProps } = $fMEGB$reactarialabel.useLabel({
86
86
  ...props,
87
87
  // Radio group is not an HTML input element so it
88
88
  // shouldn't be labeled by a <label> element.
89
89
  labelElementType: 'span'
90
90
  });
91
- let domProps = $jfuDl$reactariautils.filterDOMProps(props, {
91
+ let domProps = $fMEGB$reactariautils.filterDOMProps(props, {
92
92
  labelable: true
93
93
  });
94
94
  // When the radio group loses focus, reset the focusable radio to null if
95
95
  // there is no selection. This allows tabbing into the group from either
96
96
  // direction to go to the first or last radio.
97
- let { focusWithinProps: focusWithinProps } = $jfuDl$reactariainteractions.useFocusWithin({
97
+ let { focusWithinProps: focusWithinProps } = $fMEGB$reactariainteractions.useFocusWithin({
98
98
  onBlurWithin () {
99
99
  if (!state.selectedValue) state.setLastFocusedValue(null);
100
100
  }
@@ -120,7 +120,7 @@ function $dab8d6446eaa2014$export$62b9571f283ff5c2(props, state) {
120
120
  return;
121
121
  }
122
122
  e.preventDefault();
123
- let walker = $jfuDl$reactariafocus.getFocusableTreeWalker(e.currentTarget, {
123
+ let walker = $fMEGB$reactariafocus.getFocusableTreeWalker(e.currentTarget, {
124
124
  from: e.target
125
125
  });
126
126
  let nextElem;
@@ -143,10 +143,10 @@ function $dab8d6446eaa2014$export$62b9571f283ff5c2(props, state) {
143
143
  state.setSelectedValue(nextElem.value);
144
144
  }
145
145
  };
146
- let groupName = $jfuDl$reactariautils.useId(name);
147
- $a1e0bad4e707cb8d$export$3b7b268d09480394.set(state, groupName);
146
+ let groupName = $fMEGB$reactariautils.useId(name);
147
+ $eeb149278aae5c67$export$3b7b268d09480394.set(state, groupName);
148
148
  return {
149
- radioGroupProps: $jfuDl$reactariautils.mergeProps(domProps, {
149
+ radioGroupProps: $fMEGB$reactariautils.mergeProps(domProps, {
150
150
  // https://www.w3.org/TR/wai-aria-1.2/#radiogroup
151
151
  role: 'radiogroup',
152
152
  onKeyDown: onKeyDown,
@@ -164,8 +164,8 @@ function $dab8d6446eaa2014$export$62b9571f283ff5c2(props, state) {
164
164
  }
165
165
 
166
166
 
167
- $parcel$exportWildcard(module.exports, $338761e45a036ef1$exports);
168
- $parcel$exportWildcard(module.exports, $dab8d6446eaa2014$exports);
167
+ $parcel$exportWildcard(module.exports, $e184702b1b7f1863$exports);
168
+ $parcel$exportWildcard(module.exports, $dfcade00a56a6317$exports);
169
169
 
170
170
 
171
171
  //# sourceMappingURL=main.js.map
package/dist/module.js CHANGED
@@ -1,22 +1,22 @@
1
- import {mergeProps as $2aKPr$mergeProps, filterDOMProps as $2aKPr$filterDOMProps, useId as $2aKPr$useId} from "@react-aria/utils";
2
- import {useFocusable as $2aKPr$useFocusable, getFocusableTreeWalker as $2aKPr$getFocusableTreeWalker} from "@react-aria/focus";
3
- import {usePress as $2aKPr$usePress, useFocusWithin as $2aKPr$useFocusWithin} from "@react-aria/interactions";
4
- import {useLabel as $2aKPr$useLabel} from "@react-aria/label";
5
- import {useLocale as $2aKPr$useLocale} from "@react-aria/i18n";
1
+ import {mergeProps as $4vDl6$mergeProps, filterDOMProps as $4vDl6$filterDOMProps, useId as $4vDl6$useId} from "@react-aria/utils";
2
+ import {useFocusable as $4vDl6$useFocusable, getFocusableTreeWalker as $4vDl6$getFocusableTreeWalker} from "@react-aria/focus";
3
+ import {usePress as $4vDl6$usePress, useFocusWithin as $4vDl6$useFocusWithin} from "@react-aria/interactions";
4
+ import {useLabel as $4vDl6$useLabel} from "@react-aria/label";
5
+ import {useLocale as $4vDl6$useLocale} from "@react-aria/i18n";
6
6
 
7
7
  function $parcel$export(e, n, v, s) {
8
8
  Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
9
9
  }
10
- var $2cd2cc131ce1e951$exports = {};
10
+ var $0d5c49892c1215da$exports = {};
11
11
 
12
- $parcel$export($2cd2cc131ce1e951$exports, "useRadio", () => $2cd2cc131ce1e951$export$37b0961d2f4751e2);
12
+ $parcel$export($0d5c49892c1215da$exports, "useRadio", () => $0d5c49892c1215da$export$37b0961d2f4751e2);
13
13
 
14
- const $a249568f27a21ba9$export$3b7b268d09480394 = new WeakMap();
14
+ const $884aeceb3d67f00f$export$3b7b268d09480394 = new WeakMap();
15
15
 
16
16
 
17
17
 
18
18
 
19
- function $2cd2cc131ce1e951$export$37b0961d2f4751e2(props, state, ref) {
19
+ function $0d5c49892c1215da$export$37b0961d2f4751e2(props, state, ref) {
20
20
  let { value: value , children: children , 'aria-label': ariaLabel , 'aria-labelledby': ariaLabelledby } = props;
21
21
  const isDisabled = props.isDisabled || state.isDisabled;
22
22
  let hasChildren = children != null;
@@ -27,23 +27,23 @@ function $2cd2cc131ce1e951$export$37b0961d2f4751e2(props, state, ref) {
27
27
  e.stopPropagation();
28
28
  state.setSelectedValue(value);
29
29
  };
30
- let { pressProps: pressProps } = $2aKPr$usePress({
30
+ let { pressProps: pressProps } = $4vDl6$usePress({
31
31
  isDisabled: isDisabled
32
32
  });
33
- let { focusableProps: focusableProps } = $2aKPr$useFocusable($2aKPr$mergeProps(props, {
33
+ let { focusableProps: focusableProps } = $4vDl6$useFocusable($4vDl6$mergeProps(props, {
34
34
  onFocus: ()=>state.setLastFocusedValue(value)
35
35
  }), ref);
36
- let interactions = $2aKPr$mergeProps(pressProps, focusableProps);
37
- let domProps = $2aKPr$filterDOMProps(props, {
36
+ let interactions = $4vDl6$mergeProps(pressProps, focusableProps);
37
+ let domProps = $4vDl6$filterDOMProps(props, {
38
38
  labelable: true
39
39
  });
40
40
  let tabIndex = state.lastFocusedValue === value || state.lastFocusedValue == null ? 0 : -1;
41
41
  if (isDisabled) tabIndex = undefined;
42
42
  return {
43
- inputProps: $2aKPr$mergeProps(domProps, {
43
+ inputProps: $4vDl6$mergeProps(domProps, {
44
44
  ...interactions,
45
45
  type: 'radio',
46
- name: $a249568f27a21ba9$export$3b7b268d09480394.get(state),
46
+ name: $884aeceb3d67f00f$export$3b7b268d09480394.get(state),
47
47
  tabIndex: tabIndex,
48
48
  disabled: isDisabled,
49
49
  checked: checked,
@@ -54,31 +54,31 @@ function $2cd2cc131ce1e951$export$37b0961d2f4751e2(props, state, ref) {
54
54
  }
55
55
 
56
56
 
57
- var $b5bb90da5b40a472$exports = {};
57
+ var $430f30ed08ec25fa$exports = {};
58
58
 
59
- $parcel$export($b5bb90da5b40a472$exports, "useRadioGroup", () => $b5bb90da5b40a472$export$62b9571f283ff5c2);
59
+ $parcel$export($430f30ed08ec25fa$exports, "useRadioGroup", () => $430f30ed08ec25fa$export$62b9571f283ff5c2);
60
60
 
61
61
 
62
62
 
63
63
 
64
64
 
65
65
 
66
- function $b5bb90da5b40a472$export$62b9571f283ff5c2(props, state) {
66
+ function $430f30ed08ec25fa$export$62b9571f283ff5c2(props, state) {
67
67
  let { name: name , validationState: validationState , isReadOnly: isReadOnly , isRequired: isRequired , isDisabled: isDisabled , orientation: orientation = 'vertical' } = props;
68
- let { direction: direction } = $2aKPr$useLocale();
69
- let { labelProps: labelProps , fieldProps: fieldProps } = $2aKPr$useLabel({
68
+ let { direction: direction } = $4vDl6$useLocale();
69
+ let { labelProps: labelProps , fieldProps: fieldProps } = $4vDl6$useLabel({
70
70
  ...props,
71
71
  // Radio group is not an HTML input element so it
72
72
  // shouldn't be labeled by a <label> element.
73
73
  labelElementType: 'span'
74
74
  });
75
- let domProps = $2aKPr$filterDOMProps(props, {
75
+ let domProps = $4vDl6$filterDOMProps(props, {
76
76
  labelable: true
77
77
  });
78
78
  // When the radio group loses focus, reset the focusable radio to null if
79
79
  // there is no selection. This allows tabbing into the group from either
80
80
  // direction to go to the first or last radio.
81
- let { focusWithinProps: focusWithinProps } = $2aKPr$useFocusWithin({
81
+ let { focusWithinProps: focusWithinProps } = $4vDl6$useFocusWithin({
82
82
  onBlurWithin () {
83
83
  if (!state.selectedValue) state.setLastFocusedValue(null);
84
84
  }
@@ -104,7 +104,7 @@ function $b5bb90da5b40a472$export$62b9571f283ff5c2(props, state) {
104
104
  return;
105
105
  }
106
106
  e.preventDefault();
107
- let walker = $2aKPr$getFocusableTreeWalker(e.currentTarget, {
107
+ let walker = $4vDl6$getFocusableTreeWalker(e.currentTarget, {
108
108
  from: e.target
109
109
  });
110
110
  let nextElem;
@@ -127,10 +127,10 @@ function $b5bb90da5b40a472$export$62b9571f283ff5c2(props, state) {
127
127
  state.setSelectedValue(nextElem.value);
128
128
  }
129
129
  };
130
- let groupName = $2aKPr$useId(name);
131
- $a249568f27a21ba9$export$3b7b268d09480394.set(state, groupName);
130
+ let groupName = $4vDl6$useId(name);
131
+ $884aeceb3d67f00f$export$3b7b268d09480394.set(state, groupName);
132
132
  return {
133
- radioGroupProps: $2aKPr$mergeProps(domProps, {
133
+ radioGroupProps: $4vDl6$mergeProps(domProps, {
134
134
  // https://www.w3.org/TR/wai-aria-1.2/#radiogroup
135
135
  role: 'radiogroup',
136
136
  onKeyDown: onKeyDown,
@@ -150,5 +150,5 @@ function $b5bb90da5b40a472$export$62b9571f283ff5c2(props, state) {
150
150
 
151
151
 
152
152
 
153
- export {$2cd2cc131ce1e951$export$37b0961d2f4751e2 as useRadio, $b5bb90da5b40a472$export$62b9571f283ff5c2 as useRadioGroup};
153
+ export {$0d5c49892c1215da$export$37b0961d2f4751e2 as useRadio, $430f30ed08ec25fa$export$62b9571f283ff5c2 as useRadioGroup};
154
154
  //# sourceMappingURL=module.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-aria/radio",
3
- "version": "3.1.8",
3
+ "version": "3.1.9",
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.2",
22
- "@react-aria/i18n": "^3.3.6",
23
- "@react-aria/interactions": "^3.8.1",
24
- "@react-aria/label": "^3.2.3",
25
- "@react-aria/utils": "^3.11.2",
26
- "@react-stately/radio": "^3.3.4",
27
- "@react-types/radio": "^3.1.4"
21
+ "@react-aria/focus": "^3.5.3",
22
+ "@react-aria/i18n": "^3.3.7",
23
+ "@react-aria/interactions": "^3.8.2",
24
+ "@react-aria/label": "^3.2.4",
25
+ "@react-aria/utils": "^3.11.3",
26
+ "@react-stately/radio": "^3.3.5",
27
+ "@react-types/radio": "^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": "404d41859b7d6f56201d7fc01bd9f22ae3512937"
35
+ "gitHead": "ed8d8d984c2f7f2c31e8b18795b97858a95e4729"
36
36
  }