@react-spectrum/radio 3.7.4 → 3.7.6
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/Radio.main.js +83 -0
- package/dist/Radio.main.js.map +1 -0
- package/dist/Radio.mjs +78 -0
- package/dist/Radio.module.js +78 -0
- package/dist/Radio.module.js.map +1 -0
- package/dist/RadioGroup.main.js +72 -0
- package/dist/RadioGroup.main.js.map +1 -0
- package/dist/RadioGroup.mjs +67 -0
- package/dist/RadioGroup.module.js +67 -0
- package/dist/RadioGroup.module.js.map +1 -0
- package/dist/context.main.js +31 -0
- package/dist/context.main.js.map +1 -0
- package/dist/context.mjs +21 -0
- package/dist/context.module.js +21 -0
- package/dist/context.module.js.map +1 -0
- package/dist/fieldgroup_vars_css.main.js +32 -0
- package/dist/fieldgroup_vars_css.main.js.map +1 -0
- package/dist/fieldgroup_vars_css.mjs +34 -0
- package/dist/fieldgroup_vars_css.module.js +34 -0
- package/dist/fieldgroup_vars_css.module.js.map +1 -0
- package/dist/import.mjs +2 -214
- package/dist/main.js +4 -212
- package/dist/main.js.map +1 -1
- package/dist/module.js +2 -214
- package/dist/module.js.map +1 -1
- package/dist/radio_vars_css.main.js +47 -0
- package/dist/radio_vars_css.main.js.map +1 -0
- package/dist/radio_vars_css.mjs +49 -0
- package/dist/radio_vars_css.module.js +49 -0
- package/dist/radio_vars_css.module.js.map +1 -0
- package/dist/types.d.ts +3 -2
- package/dist/types.d.ts.map +1 -1
- package/dist/vars.083bf957.css +94 -0
- package/dist/vars.083bf957.css.map +1 -0
- package/dist/{main.css → vars.cb27d9e2.css} +19 -133
- package/dist/vars.cb27d9e2.css.map +1 -0
- package/package.json +11 -11
- package/dist/main.css.map +0 -1
@@ -0,0 +1,34 @@
|
|
1
|
+
|
2
|
+
function $parcel$export(e, n, v, s) {
|
3
|
+
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
4
|
+
}
|
5
|
+
var $4cb2b26710154c56$exports = {};
|
6
|
+
|
7
|
+
$parcel$export($4cb2b26710154c56$exports, "focus-ring", () => $4cb2b26710154c56$export$f39a09f249340e2a, (v) => $4cb2b26710154c56$export$f39a09f249340e2a = v);
|
8
|
+
$parcel$export($4cb2b26710154c56$exports, "i18nFontFamily", () => $4cb2b26710154c56$export$8c4ee2c50c22c514, (v) => $4cb2b26710154c56$export$8c4ee2c50c22c514 = v);
|
9
|
+
$parcel$export($4cb2b26710154c56$exports, "spectrum-FieldGroup", () => $4cb2b26710154c56$export$75eb16cbfc18279c, (v) => $4cb2b26710154c56$export$75eb16cbfc18279c = v);
|
10
|
+
$parcel$export($4cb2b26710154c56$exports, "spectrum-FieldGroup-group", () => $4cb2b26710154c56$export$984c7bbbfc7ddffc, (v) => $4cb2b26710154c56$export$984c7bbbfc7ddffc = v);
|
11
|
+
$parcel$export($4cb2b26710154c56$exports, "spectrum-FieldGroup-group--horizontal", () => $4cb2b26710154c56$export$1ad8646bcba21c0e, (v) => $4cb2b26710154c56$export$1ad8646bcba21c0e = v);
|
12
|
+
$parcel$export($4cb2b26710154c56$exports, "spectrum-FocusRing-ring", () => $4cb2b26710154c56$export$4109102f950813a6, (v) => $4cb2b26710154c56$export$4109102f950813a6 = v);
|
13
|
+
$parcel$export($4cb2b26710154c56$exports, "spectrum-FocusRing", () => $4cb2b26710154c56$export$24c7f46a6e3605dd, (v) => $4cb2b26710154c56$export$24c7f46a6e3605dd = v);
|
14
|
+
$parcel$export($4cb2b26710154c56$exports, "spectrum-FocusRing--quiet", () => $4cb2b26710154c56$export$2927016961429360, (v) => $4cb2b26710154c56$export$2927016961429360 = v);
|
15
|
+
var $4cb2b26710154c56$export$f39a09f249340e2a;
|
16
|
+
var $4cb2b26710154c56$export$8c4ee2c50c22c514;
|
17
|
+
var $4cb2b26710154c56$export$75eb16cbfc18279c;
|
18
|
+
var $4cb2b26710154c56$export$984c7bbbfc7ddffc;
|
19
|
+
var $4cb2b26710154c56$export$1ad8646bcba21c0e;
|
20
|
+
var $4cb2b26710154c56$export$4109102f950813a6;
|
21
|
+
var $4cb2b26710154c56$export$24c7f46a6e3605dd;
|
22
|
+
var $4cb2b26710154c56$export$2927016961429360;
|
23
|
+
$4cb2b26710154c56$export$f39a09f249340e2a = `hyn22G_focus-ring`;
|
24
|
+
$4cb2b26710154c56$export$8c4ee2c50c22c514 = `hyn22G_i18nFontFamily`;
|
25
|
+
$4cb2b26710154c56$export$75eb16cbfc18279c = `hyn22G_spectrum-FieldGroup`;
|
26
|
+
$4cb2b26710154c56$export$984c7bbbfc7ddffc = `hyn22G_spectrum-FieldGroup-group`;
|
27
|
+
$4cb2b26710154c56$export$1ad8646bcba21c0e = `hyn22G_spectrum-FieldGroup-group--horizontal`;
|
28
|
+
$4cb2b26710154c56$export$4109102f950813a6 = `hyn22G_spectrum-FocusRing-ring`;
|
29
|
+
$4cb2b26710154c56$export$24c7f46a6e3605dd = `hyn22G_spectrum-FocusRing ${$4cb2b26710154c56$export$4109102f950813a6}`;
|
30
|
+
$4cb2b26710154c56$export$2927016961429360 = `hyn22G_spectrum-FocusRing--quiet`;
|
31
|
+
|
32
|
+
|
33
|
+
export {$4cb2b26710154c56$exports as default};
|
34
|
+
//# sourceMappingURL=fieldgroup_vars_css.module.js.map
|
@@ -0,0 +1,34 @@
|
|
1
|
+
|
2
|
+
function $parcel$export(e, n, v, s) {
|
3
|
+
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
4
|
+
}
|
5
|
+
var $4cb2b26710154c56$exports = {};
|
6
|
+
|
7
|
+
$parcel$export($4cb2b26710154c56$exports, "focus-ring", () => $4cb2b26710154c56$export$f39a09f249340e2a, (v) => $4cb2b26710154c56$export$f39a09f249340e2a = v);
|
8
|
+
$parcel$export($4cb2b26710154c56$exports, "i18nFontFamily", () => $4cb2b26710154c56$export$8c4ee2c50c22c514, (v) => $4cb2b26710154c56$export$8c4ee2c50c22c514 = v);
|
9
|
+
$parcel$export($4cb2b26710154c56$exports, "spectrum-FieldGroup", () => $4cb2b26710154c56$export$75eb16cbfc18279c, (v) => $4cb2b26710154c56$export$75eb16cbfc18279c = v);
|
10
|
+
$parcel$export($4cb2b26710154c56$exports, "spectrum-FieldGroup-group", () => $4cb2b26710154c56$export$984c7bbbfc7ddffc, (v) => $4cb2b26710154c56$export$984c7bbbfc7ddffc = v);
|
11
|
+
$parcel$export($4cb2b26710154c56$exports, "spectrum-FieldGroup-group--horizontal", () => $4cb2b26710154c56$export$1ad8646bcba21c0e, (v) => $4cb2b26710154c56$export$1ad8646bcba21c0e = v);
|
12
|
+
$parcel$export($4cb2b26710154c56$exports, "spectrum-FocusRing-ring", () => $4cb2b26710154c56$export$4109102f950813a6, (v) => $4cb2b26710154c56$export$4109102f950813a6 = v);
|
13
|
+
$parcel$export($4cb2b26710154c56$exports, "spectrum-FocusRing", () => $4cb2b26710154c56$export$24c7f46a6e3605dd, (v) => $4cb2b26710154c56$export$24c7f46a6e3605dd = v);
|
14
|
+
$parcel$export($4cb2b26710154c56$exports, "spectrum-FocusRing--quiet", () => $4cb2b26710154c56$export$2927016961429360, (v) => $4cb2b26710154c56$export$2927016961429360 = v);
|
15
|
+
var $4cb2b26710154c56$export$f39a09f249340e2a;
|
16
|
+
var $4cb2b26710154c56$export$8c4ee2c50c22c514;
|
17
|
+
var $4cb2b26710154c56$export$75eb16cbfc18279c;
|
18
|
+
var $4cb2b26710154c56$export$984c7bbbfc7ddffc;
|
19
|
+
var $4cb2b26710154c56$export$1ad8646bcba21c0e;
|
20
|
+
var $4cb2b26710154c56$export$4109102f950813a6;
|
21
|
+
var $4cb2b26710154c56$export$24c7f46a6e3605dd;
|
22
|
+
var $4cb2b26710154c56$export$2927016961429360;
|
23
|
+
$4cb2b26710154c56$export$f39a09f249340e2a = `hyn22G_focus-ring`;
|
24
|
+
$4cb2b26710154c56$export$8c4ee2c50c22c514 = `hyn22G_i18nFontFamily`;
|
25
|
+
$4cb2b26710154c56$export$75eb16cbfc18279c = `hyn22G_spectrum-FieldGroup`;
|
26
|
+
$4cb2b26710154c56$export$984c7bbbfc7ddffc = `hyn22G_spectrum-FieldGroup-group`;
|
27
|
+
$4cb2b26710154c56$export$1ad8646bcba21c0e = `hyn22G_spectrum-FieldGroup-group--horizontal`;
|
28
|
+
$4cb2b26710154c56$export$4109102f950813a6 = `hyn22G_spectrum-FocusRing-ring`;
|
29
|
+
$4cb2b26710154c56$export$24c7f46a6e3605dd = `hyn22G_spectrum-FocusRing ${$4cb2b26710154c56$export$4109102f950813a6}`;
|
30
|
+
$4cb2b26710154c56$export$2927016961429360 = `hyn22G_spectrum-FocusRing--quiet`;
|
31
|
+
|
32
|
+
|
33
|
+
export {$4cb2b26710154c56$exports as default};
|
34
|
+
//# sourceMappingURL=fieldgroup_vars_css.module.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;AAAA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AAPA,4CAA+B,CAAC,iBAAiB,CAAC;AAClD,4CAAmC,CAAC,qBAAqB,CAAC;AAC1D,4CAAwC,CAAC,0BAA0B,CAAC;AACpE,4CAA8C,CAAC,gCAAgC,CAAC;AAChF,4CAA0D,CAAC,4CAA4C,CAAC;AACxG,4CAA4C,CAAC,8BAA8B,CAAC;AAC5E,4CAAuC,CAAC,0BAA0B,EAAE,0CAA0C,CAAC;AAC/G,4CAA8C,CAAC,gCAAgC,CAAC","sources":["packages/@adobe/spectrum-css-temp/components/fieldgroup/vars.css"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n"],"names":[],"version":3,"file":"fieldgroup_vars_css.module.js.map"}
|
package/dist/import.mjs
CHANGED
@@ -1,22 +1,6 @@
|
|
1
|
-
import "./
|
2
|
-
import {
|
3
|
-
import {FocusRing as $4hD9r$FocusRing} from "@react-aria/focus";
|
4
|
-
import $4hD9r$react, {useRef as $4hD9r$useRef, forwardRef as $4hD9r$forwardRef, useContext as $4hD9r$useContext} from "react";
|
5
|
-
import {useHover as $4hD9r$useHover} from "@react-aria/interactions";
|
6
|
-
import {useRadio as $4hD9r$useRadio, useRadioGroup as $4hD9r$useRadioGroup} from "@react-aria/radio";
|
7
|
-
import {Field as $4hD9r$Field} from "@react-spectrum/label";
|
8
|
-
import {useFormProps as $4hD9r$useFormProps} from "@react-spectrum/form";
|
9
|
-
import {useProviderProps as $4hD9r$useProviderProps} from "@react-spectrum/provider";
|
10
|
-
import {useRadioGroupState as $4hD9r$useRadioGroupState} from "@react-stately/radio";
|
1
|
+
import {Radio as $337c5cb580c4e6ba$export$d7b12c4107be0d61} from "./Radio.mjs";
|
2
|
+
import {RadioGroup as $ac9b96486fc4badf$export$a98f0dcb43a68a25} from "./RadioGroup.mjs";
|
11
3
|
|
12
|
-
|
13
|
-
function $parcel$interopDefault(a) {
|
14
|
-
return a && a.__esModule ? a.default : a;
|
15
|
-
}
|
16
|
-
|
17
|
-
function $parcel$export(e, n, v, s) {
|
18
|
-
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
19
|
-
}
|
20
4
|
/*
|
21
5
|
* Copyright 2020 Adobe. All rights reserved.
|
22
6
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
@@ -28,202 +12,6 @@ function $parcel$export(e, n, v, s) {
|
|
28
12
|
* OF ANY KIND, either express or implied. See the License for the specific language
|
29
13
|
* governing permissions and limitations under the License.
|
30
14
|
*/ /// <reference types="css-module-types" />
|
31
|
-
/*
|
32
|
-
* Copyright 2020 Adobe. All rights reserved.
|
33
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
34
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
35
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
36
|
-
*
|
37
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
38
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
39
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
40
|
-
* governing permissions and limitations under the License.
|
41
|
-
*/
|
42
|
-
|
43
|
-
|
44
|
-
var $d1246d70e6c52742$exports = {};
|
45
|
-
|
46
|
-
$parcel$export($d1246d70e6c52742$exports, "focus-ring", () => $d1246d70e6c52742$export$f39a09f249340e2a, (v) => $d1246d70e6c52742$export$f39a09f249340e2a = v);
|
47
|
-
$parcel$export($d1246d70e6c52742$exports, "i18nFontFamily", () => $d1246d70e6c52742$export$8c4ee2c50c22c514, (v) => $d1246d70e6c52742$export$8c4ee2c50c22c514 = v);
|
48
|
-
$parcel$export($d1246d70e6c52742$exports, "is-hovered", () => $d1246d70e6c52742$export$b8813cd5d7824ce7, (v) => $d1246d70e6c52742$export$b8813cd5d7824ce7 = v);
|
49
|
-
$parcel$export($d1246d70e6c52742$exports, "is-invalid", () => $d1246d70e6c52742$export$14a30de2866685fa, (v) => $d1246d70e6c52742$export$14a30de2866685fa = v);
|
50
|
-
$parcel$export($d1246d70e6c52742$exports, "spectrum-FocusRing-ring", () => $d1246d70e6c52742$export$4109102f950813a6, (v) => $d1246d70e6c52742$export$4109102f950813a6 = v);
|
51
|
-
$parcel$export($d1246d70e6c52742$exports, "spectrum-FocusRing", () => $d1246d70e6c52742$export$24c7f46a6e3605dd, (v) => $d1246d70e6c52742$export$24c7f46a6e3605dd = v);
|
52
|
-
$parcel$export($d1246d70e6c52742$exports, "spectrum-FocusRing--quiet", () => $d1246d70e6c52742$export$2927016961429360, (v) => $d1246d70e6c52742$export$2927016961429360 = v);
|
53
|
-
$parcel$export($d1246d70e6c52742$exports, "spectrum-Radio", () => $d1246d70e6c52742$export$26ebd4dbfef068c5, (v) => $d1246d70e6c52742$export$26ebd4dbfef068c5 = v);
|
54
|
-
$parcel$export($d1246d70e6c52742$exports, "spectrum-Radio--labelBelow", () => $d1246d70e6c52742$export$9443e7082698950d, (v) => $d1246d70e6c52742$export$9443e7082698950d = v);
|
55
|
-
$parcel$export($d1246d70e6c52742$exports, "spectrum-Radio--quiet", () => $d1246d70e6c52742$export$6db66b55a897f36d, (v) => $d1246d70e6c52742$export$6db66b55a897f36d = v);
|
56
|
-
$parcel$export($d1246d70e6c52742$exports, "spectrum-Radio-button", () => $d1246d70e6c52742$export$bf9d5e902c33bf05, (v) => $d1246d70e6c52742$export$bf9d5e902c33bf05 = v);
|
57
|
-
$parcel$export($d1246d70e6c52742$exports, "spectrum-Radio-input", () => $d1246d70e6c52742$export$c0ce6f9a6a2de1cc, (v) => $d1246d70e6c52742$export$c0ce6f9a6a2de1cc = v);
|
58
|
-
$parcel$export($d1246d70e6c52742$exports, "spectrum-Radio-label", () => $d1246d70e6c52742$export$b0f8395a9667922d, (v) => $d1246d70e6c52742$export$b0f8395a9667922d = v);
|
59
|
-
var $d1246d70e6c52742$export$f39a09f249340e2a;
|
60
|
-
var $d1246d70e6c52742$export$8c4ee2c50c22c514;
|
61
|
-
var $d1246d70e6c52742$export$b8813cd5d7824ce7;
|
62
|
-
var $d1246d70e6c52742$export$14a30de2866685fa;
|
63
|
-
var $d1246d70e6c52742$export$4109102f950813a6;
|
64
|
-
var $d1246d70e6c52742$export$24c7f46a6e3605dd;
|
65
|
-
var $d1246d70e6c52742$export$2927016961429360;
|
66
|
-
var $d1246d70e6c52742$export$26ebd4dbfef068c5;
|
67
|
-
var $d1246d70e6c52742$export$9443e7082698950d;
|
68
|
-
var $d1246d70e6c52742$export$6db66b55a897f36d;
|
69
|
-
var $d1246d70e6c52742$export$bf9d5e902c33bf05;
|
70
|
-
var $d1246d70e6c52742$export$c0ce6f9a6a2de1cc;
|
71
|
-
var $d1246d70e6c52742$export$b0f8395a9667922d;
|
72
|
-
$d1246d70e6c52742$export$f39a09f249340e2a = `V2HKpq_focus-ring`;
|
73
|
-
$d1246d70e6c52742$export$8c4ee2c50c22c514 = `V2HKpq_i18nFontFamily`;
|
74
|
-
$d1246d70e6c52742$export$b8813cd5d7824ce7 = `V2HKpq_is-hovered`;
|
75
|
-
$d1246d70e6c52742$export$14a30de2866685fa = `V2HKpq_is-invalid`;
|
76
|
-
$d1246d70e6c52742$export$4109102f950813a6 = `V2HKpq_spectrum-FocusRing-ring`;
|
77
|
-
$d1246d70e6c52742$export$24c7f46a6e3605dd = `V2HKpq_spectrum-FocusRing ${$d1246d70e6c52742$export$4109102f950813a6}`;
|
78
|
-
$d1246d70e6c52742$export$2927016961429360 = `V2HKpq_spectrum-FocusRing--quiet`;
|
79
|
-
$d1246d70e6c52742$export$26ebd4dbfef068c5 = `V2HKpq_spectrum-Radio`;
|
80
|
-
$d1246d70e6c52742$export$9443e7082698950d = `V2HKpq_spectrum-Radio--labelBelow`;
|
81
|
-
$d1246d70e6c52742$export$6db66b55a897f36d = `V2HKpq_spectrum-Radio--quiet`;
|
82
|
-
$d1246d70e6c52742$export$bf9d5e902c33bf05 = `V2HKpq_spectrum-Radio-button`;
|
83
|
-
$d1246d70e6c52742$export$c0ce6f9a6a2de1cc = `V2HKpq_spectrum-Radio-input`;
|
84
|
-
$d1246d70e6c52742$export$b0f8395a9667922d = `V2HKpq_spectrum-Radio-label`;
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
/*
|
90
|
-
* Copyright 2020 Adobe. All rights reserved.
|
91
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
92
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
93
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
94
|
-
*
|
95
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
96
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
97
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
98
|
-
* governing permissions and limitations under the License.
|
99
|
-
*/
|
100
|
-
const $f394bff9e10389a0$export$b118023277d4a5c3 = (0, $4hD9r$react).createContext(null);
|
101
|
-
function $f394bff9e10389a0$export$b054eba74077a826() {
|
102
|
-
return (0, $4hD9r$useContext)($f394bff9e10389a0$export$b118023277d4a5c3) || {};
|
103
|
-
}
|
104
|
-
|
105
|
-
|
106
|
-
function $337c5cb580c4e6ba$var$Radio(props, ref) {
|
107
|
-
let { isDisabled: isDisabled, children: children, autoFocus: autoFocus, ...otherProps } = props;
|
108
|
-
let { styleProps: styleProps } = (0, $4hD9r$useStyleProps)(otherProps);
|
109
|
-
let { hoverProps: hoverProps, isHovered: isHovered } = (0, $4hD9r$useHover)({
|
110
|
-
isDisabled: isDisabled
|
111
|
-
});
|
112
|
-
let inputRef = (0, $4hD9r$useRef)(null);
|
113
|
-
let domRef = (0, $4hD9r$useFocusableRef)(ref, inputRef);
|
114
|
-
let radioGroupProps = (0, $f394bff9e10389a0$export$b054eba74077a826)();
|
115
|
-
let { isEmphasized: isEmphasized, state: state } = radioGroupProps;
|
116
|
-
let { inputProps: inputProps } = (0, $4hD9r$useRadio)({
|
117
|
-
...props,
|
118
|
-
...radioGroupProps,
|
119
|
-
isDisabled: isDisabled
|
120
|
-
}, state, inputRef);
|
121
|
-
return /*#__PURE__*/ (0, $4hD9r$react).createElement("label", {
|
122
|
-
...styleProps,
|
123
|
-
...hoverProps,
|
124
|
-
ref: domRef,
|
125
|
-
className: (0, $4hD9r$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($d1246d70e6c52742$exports))), "spectrum-Radio", {
|
126
|
-
// Removing. Pending design feedback.
|
127
|
-
// 'spectrum-Radio--labelBelow': labelPosition === 'bottom',
|
128
|
-
"spectrum-Radio--quiet": !isEmphasized,
|
129
|
-
"is-disabled": isDisabled,
|
130
|
-
"is-invalid": state.isInvalid,
|
131
|
-
"is-hovered": isHovered
|
132
|
-
}, styleProps.className)
|
133
|
-
}, /*#__PURE__*/ (0, $4hD9r$react).createElement((0, $4hD9r$FocusRing), {
|
134
|
-
focusRingClass: (0, $4hD9r$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($d1246d70e6c52742$exports))), "focus-ring"),
|
135
|
-
autoFocus: autoFocus
|
136
|
-
}, /*#__PURE__*/ (0, $4hD9r$react).createElement("input", {
|
137
|
-
...inputProps,
|
138
|
-
ref: inputRef,
|
139
|
-
className: (0, $4hD9r$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($d1246d70e6c52742$exports))), "spectrum-Radio-input")
|
140
|
-
})), /*#__PURE__*/ (0, $4hD9r$react).createElement("span", {
|
141
|
-
className: (0, $4hD9r$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($d1246d70e6c52742$exports))), "spectrum-Radio-button")
|
142
|
-
}), children && /*#__PURE__*/ (0, $4hD9r$react).createElement("span", {
|
143
|
-
className: (0, $4hD9r$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($d1246d70e6c52742$exports))), "spectrum-Radio-label")
|
144
|
-
}, children));
|
145
|
-
}
|
146
|
-
/**
|
147
|
-
* Radio buttons allow users to select a single option from a list of mutually exclusive options.
|
148
|
-
* All possible options are exposed up front for users to compare.
|
149
|
-
*/ const $337c5cb580c4e6ba$export$d7b12c4107be0d61 = /*#__PURE__*/ (0, $4hD9r$forwardRef)($337c5cb580c4e6ba$var$Radio);
|
150
|
-
|
151
|
-
|
152
|
-
/*
|
153
|
-
* Copyright 2020 Adobe. All rights reserved.
|
154
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
155
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
156
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
157
|
-
*
|
158
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
159
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
160
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
161
|
-
* governing permissions and limitations under the License.
|
162
|
-
*/
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
var $4cb2b26710154c56$exports = {};
|
167
|
-
|
168
|
-
$parcel$export($4cb2b26710154c56$exports, "focus-ring", () => $4cb2b26710154c56$export$f39a09f249340e2a, (v) => $4cb2b26710154c56$export$f39a09f249340e2a = v);
|
169
|
-
$parcel$export($4cb2b26710154c56$exports, "i18nFontFamily", () => $4cb2b26710154c56$export$8c4ee2c50c22c514, (v) => $4cb2b26710154c56$export$8c4ee2c50c22c514 = v);
|
170
|
-
$parcel$export($4cb2b26710154c56$exports, "spectrum-FieldGroup", () => $4cb2b26710154c56$export$75eb16cbfc18279c, (v) => $4cb2b26710154c56$export$75eb16cbfc18279c = v);
|
171
|
-
$parcel$export($4cb2b26710154c56$exports, "spectrum-FieldGroup-group", () => $4cb2b26710154c56$export$984c7bbbfc7ddffc, (v) => $4cb2b26710154c56$export$984c7bbbfc7ddffc = v);
|
172
|
-
$parcel$export($4cb2b26710154c56$exports, "spectrum-FieldGroup-group--horizontal", () => $4cb2b26710154c56$export$1ad8646bcba21c0e, (v) => $4cb2b26710154c56$export$1ad8646bcba21c0e = v);
|
173
|
-
$parcel$export($4cb2b26710154c56$exports, "spectrum-FocusRing-ring", () => $4cb2b26710154c56$export$4109102f950813a6, (v) => $4cb2b26710154c56$export$4109102f950813a6 = v);
|
174
|
-
$parcel$export($4cb2b26710154c56$exports, "spectrum-FocusRing", () => $4cb2b26710154c56$export$24c7f46a6e3605dd, (v) => $4cb2b26710154c56$export$24c7f46a6e3605dd = v);
|
175
|
-
$parcel$export($4cb2b26710154c56$exports, "spectrum-FocusRing--quiet", () => $4cb2b26710154c56$export$2927016961429360, (v) => $4cb2b26710154c56$export$2927016961429360 = v);
|
176
|
-
var $4cb2b26710154c56$export$f39a09f249340e2a;
|
177
|
-
var $4cb2b26710154c56$export$8c4ee2c50c22c514;
|
178
|
-
var $4cb2b26710154c56$export$75eb16cbfc18279c;
|
179
|
-
var $4cb2b26710154c56$export$984c7bbbfc7ddffc;
|
180
|
-
var $4cb2b26710154c56$export$1ad8646bcba21c0e;
|
181
|
-
var $4cb2b26710154c56$export$4109102f950813a6;
|
182
|
-
var $4cb2b26710154c56$export$24c7f46a6e3605dd;
|
183
|
-
var $4cb2b26710154c56$export$2927016961429360;
|
184
|
-
$4cb2b26710154c56$export$f39a09f249340e2a = `hyn22G_focus-ring`;
|
185
|
-
$4cb2b26710154c56$export$8c4ee2c50c22c514 = `hyn22G_i18nFontFamily`;
|
186
|
-
$4cb2b26710154c56$export$75eb16cbfc18279c = `hyn22G_spectrum-FieldGroup`;
|
187
|
-
$4cb2b26710154c56$export$984c7bbbfc7ddffc = `hyn22G_spectrum-FieldGroup-group`;
|
188
|
-
$4cb2b26710154c56$export$1ad8646bcba21c0e = `hyn22G_spectrum-FieldGroup-group--horizontal`;
|
189
|
-
$4cb2b26710154c56$export$4109102f950813a6 = `hyn22G_spectrum-FocusRing-ring`;
|
190
|
-
$4cb2b26710154c56$export$24c7f46a6e3605dd = `hyn22G_spectrum-FocusRing ${$4cb2b26710154c56$export$4109102f950813a6}`;
|
191
|
-
$4cb2b26710154c56$export$2927016961429360 = `hyn22G_spectrum-FocusRing--quiet`;
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
function $ac9b96486fc4badf$var$RadioGroup(props, ref) {
|
199
|
-
props = (0, $4hD9r$useProviderProps)(props);
|
200
|
-
props = (0, $4hD9r$useFormProps)(props);
|
201
|
-
let { isEmphasized: isEmphasized, children: children, orientation: orientation = "vertical" } = props;
|
202
|
-
let domRef = (0, $4hD9r$useDOMRef)(ref);
|
203
|
-
let state = (0, $4hD9r$useRadioGroupState)(props);
|
204
|
-
let { radioGroupProps: radioGroupProps, ...otherProps } = (0, $4hD9r$useRadioGroup)(props, state);
|
205
|
-
return /*#__PURE__*/ (0, $4hD9r$react).createElement((0, $4hD9r$Field), {
|
206
|
-
...props,
|
207
|
-
...otherProps,
|
208
|
-
ref: domRef,
|
209
|
-
wrapperClassName: (0, $4hD9r$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($4cb2b26710154c56$exports))), "spectrum-FieldGroup"),
|
210
|
-
elementType: "span"
|
211
|
-
}, /*#__PURE__*/ (0, $4hD9r$react).createElement("div", {
|
212
|
-
...radioGroupProps,
|
213
|
-
className: (0, $4hD9r$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($4cb2b26710154c56$exports))), "spectrum-FieldGroup-group", {
|
214
|
-
"spectrum-FieldGroup-group--horizontal": orientation === "horizontal"
|
215
|
-
})
|
216
|
-
}, /*#__PURE__*/ (0, $4hD9r$react).createElement((0, $f394bff9e10389a0$export$b118023277d4a5c3).Provider, {
|
217
|
-
value: {
|
218
|
-
isEmphasized: isEmphasized,
|
219
|
-
state: state
|
220
|
-
}
|
221
|
-
}, children)));
|
222
|
-
}
|
223
|
-
/**
|
224
|
-
* Radio groups allow users to select a single option from a list of mutually exclusive options.
|
225
|
-
* All possible options are exposed up front for users to compare.
|
226
|
-
*/ const $ac9b96486fc4badf$export$a98f0dcb43a68a25 = /*#__PURE__*/ (0, $4hD9r$react).forwardRef($ac9b96486fc4badf$var$RadioGroup);
|
227
15
|
|
228
16
|
|
229
17
|
|
package/dist/main.js
CHANGED
@@ -1,25 +1,13 @@
|
|
1
|
-
require("./main.
|
2
|
-
var $
|
3
|
-
var $ltKMc$reactariafocus = require("@react-aria/focus");
|
4
|
-
var $ltKMc$react = require("react");
|
5
|
-
var $ltKMc$reactariainteractions = require("@react-aria/interactions");
|
6
|
-
var $ltKMc$reactariaradio = require("@react-aria/radio");
|
7
|
-
var $ltKMc$reactspectrumlabel = require("@react-spectrum/label");
|
8
|
-
var $ltKMc$reactspectrumform = require("@react-spectrum/form");
|
9
|
-
var $ltKMc$reactspectrumprovider = require("@react-spectrum/provider");
|
10
|
-
var $ltKMc$reactstatelyradio = require("@react-stately/radio");
|
1
|
+
var $e8d5518f9c1aca76$exports = require("./Radio.main.js");
|
2
|
+
var $aa5529d97b69d048$exports = require("./RadioGroup.main.js");
|
11
3
|
|
12
4
|
|
13
5
|
function $parcel$export(e, n, v, s) {
|
14
6
|
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
15
7
|
}
|
16
8
|
|
17
|
-
|
18
|
-
|
19
|
-
}
|
20
|
-
|
21
|
-
$parcel$export(module.exports, "Radio", () => $e8d5518f9c1aca76$export$d7b12c4107be0d61);
|
22
|
-
$parcel$export(module.exports, "RadioGroup", () => $aa5529d97b69d048$export$a98f0dcb43a68a25);
|
9
|
+
$parcel$export(module.exports, "Radio", () => $e8d5518f9c1aca76$exports.Radio);
|
10
|
+
$parcel$export(module.exports, "RadioGroup", () => $aa5529d97b69d048$exports.RadioGroup);
|
23
11
|
/*
|
24
12
|
* Copyright 2020 Adobe. All rights reserved.
|
25
13
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
@@ -31,202 +19,6 @@ $parcel$export(module.exports, "RadioGroup", () => $aa5529d97b69d048$export$a98f
|
|
31
19
|
* OF ANY KIND, either express or implied. See the License for the specific language
|
32
20
|
* governing permissions and limitations under the License.
|
33
21
|
*/ /// <reference types="css-module-types" />
|
34
|
-
/*
|
35
|
-
* Copyright 2020 Adobe. All rights reserved.
|
36
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
37
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
38
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
39
|
-
*
|
40
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
41
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
42
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
43
|
-
* governing permissions and limitations under the License.
|
44
|
-
*/
|
45
|
-
|
46
|
-
|
47
|
-
var $a8fbff4889c18df2$exports = {};
|
48
|
-
|
49
|
-
$parcel$export($a8fbff4889c18df2$exports, "focus-ring", () => $a8fbff4889c18df2$export$f39a09f249340e2a, (v) => $a8fbff4889c18df2$export$f39a09f249340e2a = v);
|
50
|
-
$parcel$export($a8fbff4889c18df2$exports, "i18nFontFamily", () => $a8fbff4889c18df2$export$8c4ee2c50c22c514, (v) => $a8fbff4889c18df2$export$8c4ee2c50c22c514 = v);
|
51
|
-
$parcel$export($a8fbff4889c18df2$exports, "is-hovered", () => $a8fbff4889c18df2$export$b8813cd5d7824ce7, (v) => $a8fbff4889c18df2$export$b8813cd5d7824ce7 = v);
|
52
|
-
$parcel$export($a8fbff4889c18df2$exports, "is-invalid", () => $a8fbff4889c18df2$export$14a30de2866685fa, (v) => $a8fbff4889c18df2$export$14a30de2866685fa = v);
|
53
|
-
$parcel$export($a8fbff4889c18df2$exports, "spectrum-FocusRing-ring", () => $a8fbff4889c18df2$export$4109102f950813a6, (v) => $a8fbff4889c18df2$export$4109102f950813a6 = v);
|
54
|
-
$parcel$export($a8fbff4889c18df2$exports, "spectrum-FocusRing", () => $a8fbff4889c18df2$export$24c7f46a6e3605dd, (v) => $a8fbff4889c18df2$export$24c7f46a6e3605dd = v);
|
55
|
-
$parcel$export($a8fbff4889c18df2$exports, "spectrum-FocusRing--quiet", () => $a8fbff4889c18df2$export$2927016961429360, (v) => $a8fbff4889c18df2$export$2927016961429360 = v);
|
56
|
-
$parcel$export($a8fbff4889c18df2$exports, "spectrum-Radio", () => $a8fbff4889c18df2$export$26ebd4dbfef068c5, (v) => $a8fbff4889c18df2$export$26ebd4dbfef068c5 = v);
|
57
|
-
$parcel$export($a8fbff4889c18df2$exports, "spectrum-Radio--labelBelow", () => $a8fbff4889c18df2$export$9443e7082698950d, (v) => $a8fbff4889c18df2$export$9443e7082698950d = v);
|
58
|
-
$parcel$export($a8fbff4889c18df2$exports, "spectrum-Radio--quiet", () => $a8fbff4889c18df2$export$6db66b55a897f36d, (v) => $a8fbff4889c18df2$export$6db66b55a897f36d = v);
|
59
|
-
$parcel$export($a8fbff4889c18df2$exports, "spectrum-Radio-button", () => $a8fbff4889c18df2$export$bf9d5e902c33bf05, (v) => $a8fbff4889c18df2$export$bf9d5e902c33bf05 = v);
|
60
|
-
$parcel$export($a8fbff4889c18df2$exports, "spectrum-Radio-input", () => $a8fbff4889c18df2$export$c0ce6f9a6a2de1cc, (v) => $a8fbff4889c18df2$export$c0ce6f9a6a2de1cc = v);
|
61
|
-
$parcel$export($a8fbff4889c18df2$exports, "spectrum-Radio-label", () => $a8fbff4889c18df2$export$b0f8395a9667922d, (v) => $a8fbff4889c18df2$export$b0f8395a9667922d = v);
|
62
|
-
var $a8fbff4889c18df2$export$f39a09f249340e2a;
|
63
|
-
var $a8fbff4889c18df2$export$8c4ee2c50c22c514;
|
64
|
-
var $a8fbff4889c18df2$export$b8813cd5d7824ce7;
|
65
|
-
var $a8fbff4889c18df2$export$14a30de2866685fa;
|
66
|
-
var $a8fbff4889c18df2$export$4109102f950813a6;
|
67
|
-
var $a8fbff4889c18df2$export$24c7f46a6e3605dd;
|
68
|
-
var $a8fbff4889c18df2$export$2927016961429360;
|
69
|
-
var $a8fbff4889c18df2$export$26ebd4dbfef068c5;
|
70
|
-
var $a8fbff4889c18df2$export$9443e7082698950d;
|
71
|
-
var $a8fbff4889c18df2$export$6db66b55a897f36d;
|
72
|
-
var $a8fbff4889c18df2$export$bf9d5e902c33bf05;
|
73
|
-
var $a8fbff4889c18df2$export$c0ce6f9a6a2de1cc;
|
74
|
-
var $a8fbff4889c18df2$export$b0f8395a9667922d;
|
75
|
-
$a8fbff4889c18df2$export$f39a09f249340e2a = `V2HKpq_focus-ring`;
|
76
|
-
$a8fbff4889c18df2$export$8c4ee2c50c22c514 = `V2HKpq_i18nFontFamily`;
|
77
|
-
$a8fbff4889c18df2$export$b8813cd5d7824ce7 = `V2HKpq_is-hovered`;
|
78
|
-
$a8fbff4889c18df2$export$14a30de2866685fa = `V2HKpq_is-invalid`;
|
79
|
-
$a8fbff4889c18df2$export$4109102f950813a6 = `V2HKpq_spectrum-FocusRing-ring`;
|
80
|
-
$a8fbff4889c18df2$export$24c7f46a6e3605dd = `V2HKpq_spectrum-FocusRing ${$a8fbff4889c18df2$export$4109102f950813a6}`;
|
81
|
-
$a8fbff4889c18df2$export$2927016961429360 = `V2HKpq_spectrum-FocusRing--quiet`;
|
82
|
-
$a8fbff4889c18df2$export$26ebd4dbfef068c5 = `V2HKpq_spectrum-Radio`;
|
83
|
-
$a8fbff4889c18df2$export$9443e7082698950d = `V2HKpq_spectrum-Radio--labelBelow`;
|
84
|
-
$a8fbff4889c18df2$export$6db66b55a897f36d = `V2HKpq_spectrum-Radio--quiet`;
|
85
|
-
$a8fbff4889c18df2$export$bf9d5e902c33bf05 = `V2HKpq_spectrum-Radio-button`;
|
86
|
-
$a8fbff4889c18df2$export$c0ce6f9a6a2de1cc = `V2HKpq_spectrum-Radio-input`;
|
87
|
-
$a8fbff4889c18df2$export$b0f8395a9667922d = `V2HKpq_spectrum-Radio-label`;
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
/*
|
93
|
-
* Copyright 2020 Adobe. All rights reserved.
|
94
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
95
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
96
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
97
|
-
*
|
98
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
99
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
100
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
101
|
-
* governing permissions and limitations under the License.
|
102
|
-
*/
|
103
|
-
const $f5a8721b9af05d97$export$b118023277d4a5c3 = (0, ($parcel$interopDefault($ltKMc$react))).createContext(null);
|
104
|
-
function $f5a8721b9af05d97$export$b054eba74077a826() {
|
105
|
-
return (0, $ltKMc$react.useContext)($f5a8721b9af05d97$export$b118023277d4a5c3) || {};
|
106
|
-
}
|
107
|
-
|
108
|
-
|
109
|
-
function $e8d5518f9c1aca76$var$Radio(props, ref) {
|
110
|
-
let { isDisabled: isDisabled, children: children, autoFocus: autoFocus, ...otherProps } = props;
|
111
|
-
let { styleProps: styleProps } = (0, $ltKMc$reactspectrumutils.useStyleProps)(otherProps);
|
112
|
-
let { hoverProps: hoverProps, isHovered: isHovered } = (0, $ltKMc$reactariainteractions.useHover)({
|
113
|
-
isDisabled: isDisabled
|
114
|
-
});
|
115
|
-
let inputRef = (0, $ltKMc$react.useRef)(null);
|
116
|
-
let domRef = (0, $ltKMc$reactspectrumutils.useFocusableRef)(ref, inputRef);
|
117
|
-
let radioGroupProps = (0, $f5a8721b9af05d97$export$b054eba74077a826)();
|
118
|
-
let { isEmphasized: isEmphasized, state: state } = radioGroupProps;
|
119
|
-
let { inputProps: inputProps } = (0, $ltKMc$reactariaradio.useRadio)({
|
120
|
-
...props,
|
121
|
-
...radioGroupProps,
|
122
|
-
isDisabled: isDisabled
|
123
|
-
}, state, inputRef);
|
124
|
-
return /*#__PURE__*/ (0, ($parcel$interopDefault($ltKMc$react))).createElement("label", {
|
125
|
-
...styleProps,
|
126
|
-
...hoverProps,
|
127
|
-
ref: domRef,
|
128
|
-
className: (0, $ltKMc$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($a8fbff4889c18df2$exports))), "spectrum-Radio", {
|
129
|
-
// Removing. Pending design feedback.
|
130
|
-
// 'spectrum-Radio--labelBelow': labelPosition === 'bottom',
|
131
|
-
"spectrum-Radio--quiet": !isEmphasized,
|
132
|
-
"is-disabled": isDisabled,
|
133
|
-
"is-invalid": state.isInvalid,
|
134
|
-
"is-hovered": isHovered
|
135
|
-
}, styleProps.className)
|
136
|
-
}, /*#__PURE__*/ (0, ($parcel$interopDefault($ltKMc$react))).createElement((0, $ltKMc$reactariafocus.FocusRing), {
|
137
|
-
focusRingClass: (0, $ltKMc$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($a8fbff4889c18df2$exports))), "focus-ring"),
|
138
|
-
autoFocus: autoFocus
|
139
|
-
}, /*#__PURE__*/ (0, ($parcel$interopDefault($ltKMc$react))).createElement("input", {
|
140
|
-
...inputProps,
|
141
|
-
ref: inputRef,
|
142
|
-
className: (0, $ltKMc$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($a8fbff4889c18df2$exports))), "spectrum-Radio-input")
|
143
|
-
})), /*#__PURE__*/ (0, ($parcel$interopDefault($ltKMc$react))).createElement("span", {
|
144
|
-
className: (0, $ltKMc$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($a8fbff4889c18df2$exports))), "spectrum-Radio-button")
|
145
|
-
}), children && /*#__PURE__*/ (0, ($parcel$interopDefault($ltKMc$react))).createElement("span", {
|
146
|
-
className: (0, $ltKMc$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($a8fbff4889c18df2$exports))), "spectrum-Radio-label")
|
147
|
-
}, children));
|
148
|
-
}
|
149
|
-
/**
|
150
|
-
* Radio buttons allow users to select a single option from a list of mutually exclusive options.
|
151
|
-
* All possible options are exposed up front for users to compare.
|
152
|
-
*/ const $e8d5518f9c1aca76$export$d7b12c4107be0d61 = /*#__PURE__*/ (0, $ltKMc$react.forwardRef)($e8d5518f9c1aca76$var$Radio);
|
153
|
-
|
154
|
-
|
155
|
-
/*
|
156
|
-
* Copyright 2020 Adobe. All rights reserved.
|
157
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
158
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
159
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
160
|
-
*
|
161
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
162
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
163
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
164
|
-
* governing permissions and limitations under the License.
|
165
|
-
*/
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
var $53124a3a0fd56fca$exports = {};
|
170
|
-
|
171
|
-
$parcel$export($53124a3a0fd56fca$exports, "focus-ring", () => $53124a3a0fd56fca$export$f39a09f249340e2a, (v) => $53124a3a0fd56fca$export$f39a09f249340e2a = v);
|
172
|
-
$parcel$export($53124a3a0fd56fca$exports, "i18nFontFamily", () => $53124a3a0fd56fca$export$8c4ee2c50c22c514, (v) => $53124a3a0fd56fca$export$8c4ee2c50c22c514 = v);
|
173
|
-
$parcel$export($53124a3a0fd56fca$exports, "spectrum-FieldGroup", () => $53124a3a0fd56fca$export$75eb16cbfc18279c, (v) => $53124a3a0fd56fca$export$75eb16cbfc18279c = v);
|
174
|
-
$parcel$export($53124a3a0fd56fca$exports, "spectrum-FieldGroup-group", () => $53124a3a0fd56fca$export$984c7bbbfc7ddffc, (v) => $53124a3a0fd56fca$export$984c7bbbfc7ddffc = v);
|
175
|
-
$parcel$export($53124a3a0fd56fca$exports, "spectrum-FieldGroup-group--horizontal", () => $53124a3a0fd56fca$export$1ad8646bcba21c0e, (v) => $53124a3a0fd56fca$export$1ad8646bcba21c0e = v);
|
176
|
-
$parcel$export($53124a3a0fd56fca$exports, "spectrum-FocusRing-ring", () => $53124a3a0fd56fca$export$4109102f950813a6, (v) => $53124a3a0fd56fca$export$4109102f950813a6 = v);
|
177
|
-
$parcel$export($53124a3a0fd56fca$exports, "spectrum-FocusRing", () => $53124a3a0fd56fca$export$24c7f46a6e3605dd, (v) => $53124a3a0fd56fca$export$24c7f46a6e3605dd = v);
|
178
|
-
$parcel$export($53124a3a0fd56fca$exports, "spectrum-FocusRing--quiet", () => $53124a3a0fd56fca$export$2927016961429360, (v) => $53124a3a0fd56fca$export$2927016961429360 = v);
|
179
|
-
var $53124a3a0fd56fca$export$f39a09f249340e2a;
|
180
|
-
var $53124a3a0fd56fca$export$8c4ee2c50c22c514;
|
181
|
-
var $53124a3a0fd56fca$export$75eb16cbfc18279c;
|
182
|
-
var $53124a3a0fd56fca$export$984c7bbbfc7ddffc;
|
183
|
-
var $53124a3a0fd56fca$export$1ad8646bcba21c0e;
|
184
|
-
var $53124a3a0fd56fca$export$4109102f950813a6;
|
185
|
-
var $53124a3a0fd56fca$export$24c7f46a6e3605dd;
|
186
|
-
var $53124a3a0fd56fca$export$2927016961429360;
|
187
|
-
$53124a3a0fd56fca$export$f39a09f249340e2a = `hyn22G_focus-ring`;
|
188
|
-
$53124a3a0fd56fca$export$8c4ee2c50c22c514 = `hyn22G_i18nFontFamily`;
|
189
|
-
$53124a3a0fd56fca$export$75eb16cbfc18279c = `hyn22G_spectrum-FieldGroup`;
|
190
|
-
$53124a3a0fd56fca$export$984c7bbbfc7ddffc = `hyn22G_spectrum-FieldGroup-group`;
|
191
|
-
$53124a3a0fd56fca$export$1ad8646bcba21c0e = `hyn22G_spectrum-FieldGroup-group--horizontal`;
|
192
|
-
$53124a3a0fd56fca$export$4109102f950813a6 = `hyn22G_spectrum-FocusRing-ring`;
|
193
|
-
$53124a3a0fd56fca$export$24c7f46a6e3605dd = `hyn22G_spectrum-FocusRing ${$53124a3a0fd56fca$export$4109102f950813a6}`;
|
194
|
-
$53124a3a0fd56fca$export$2927016961429360 = `hyn22G_spectrum-FocusRing--quiet`;
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
function $aa5529d97b69d048$var$RadioGroup(props, ref) {
|
202
|
-
props = (0, $ltKMc$reactspectrumprovider.useProviderProps)(props);
|
203
|
-
props = (0, $ltKMc$reactspectrumform.useFormProps)(props);
|
204
|
-
let { isEmphasized: isEmphasized, children: children, orientation: orientation = "vertical" } = props;
|
205
|
-
let domRef = (0, $ltKMc$reactspectrumutils.useDOMRef)(ref);
|
206
|
-
let state = (0, $ltKMc$reactstatelyradio.useRadioGroupState)(props);
|
207
|
-
let { radioGroupProps: radioGroupProps, ...otherProps } = (0, $ltKMc$reactariaradio.useRadioGroup)(props, state);
|
208
|
-
return /*#__PURE__*/ (0, ($parcel$interopDefault($ltKMc$react))).createElement((0, $ltKMc$reactspectrumlabel.Field), {
|
209
|
-
...props,
|
210
|
-
...otherProps,
|
211
|
-
ref: domRef,
|
212
|
-
wrapperClassName: (0, $ltKMc$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($53124a3a0fd56fca$exports))), "spectrum-FieldGroup"),
|
213
|
-
elementType: "span"
|
214
|
-
}, /*#__PURE__*/ (0, ($parcel$interopDefault($ltKMc$react))).createElement("div", {
|
215
|
-
...radioGroupProps,
|
216
|
-
className: (0, $ltKMc$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($53124a3a0fd56fca$exports))), "spectrum-FieldGroup-group", {
|
217
|
-
"spectrum-FieldGroup-group--horizontal": orientation === "horizontal"
|
218
|
-
})
|
219
|
-
}, /*#__PURE__*/ (0, ($parcel$interopDefault($ltKMc$react))).createElement((0, $f5a8721b9af05d97$export$b118023277d4a5c3).Provider, {
|
220
|
-
value: {
|
221
|
-
isEmphasized: isEmphasized,
|
222
|
-
state: state
|
223
|
-
}
|
224
|
-
}, children)));
|
225
|
-
}
|
226
|
-
/**
|
227
|
-
* Radio groups allow users to select a single option from a list of mutually exclusive options.
|
228
|
-
* All possible options are exposed up front for users to compare.
|
229
|
-
*/ const $aa5529d97b69d048$export$a98f0dcb43a68a25 = /*#__PURE__*/ (0, ($parcel$interopDefault($ltKMc$react))).forwardRef($aa5529d97b69d048$var$RadioGroup);
|
230
22
|
|
231
23
|
|
232
24
|
|
package/dist/main.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"mappings":"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","sources":["packages/@react-spectrum/radio/src/index.ts","packages/@react-spectrum/radio/src/Radio.tsx","packages/@adobe/spectrum-css-temp/components/radio/vars.css","packages/@react-spectrum/radio/src/context.ts","packages/@react-spectrum/radio/src/RadioGroup.tsx","packages/@adobe/spectrum-css-temp/components/fieldgroup/vars.css"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/// <reference types=\"css-module-types\" />\n\nexport {Radio} from './Radio';\nexport {RadioGroup} from './RadioGroup';\nexport type {SpectrumRadioProps} from '@react-types/radio';\nexport type {SpectrumRadioGroupProps} from '@react-types/radio';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {classNames, useFocusableRef, useStyleProps} from '@react-spectrum/utils';\nimport {FocusableRef} from '@react-types/shared';\nimport {FocusRing} from '@react-aria/focus';\nimport React, {forwardRef, useRef} from 'react';\nimport {SpectrumRadioProps} from '@react-types/radio';\nimport styles from '@adobe/spectrum-css-temp/components/radio/vars.css';\nimport {useHover} from '@react-aria/interactions';\nimport {useRadio} from '@react-aria/radio';\nimport {useRadioProvider} from './context';\n\nfunction Radio(props: SpectrumRadioProps, ref: FocusableRef<HTMLLabelElement>) {\n let {\n isDisabled,\n children,\n autoFocus,\n ...otherProps\n } = props;\n let {styleProps} = useStyleProps(otherProps);\n let {hoverProps, isHovered} = useHover({isDisabled});\n\n let inputRef = useRef<HTMLInputElement>(null);\n let domRef = useFocusableRef(ref, inputRef);\n\n let radioGroupProps = useRadioProvider();\n let {\n isEmphasized,\n state\n } = radioGroupProps;\n\n let {inputProps} = useRadio({\n ...props,\n ...radioGroupProps,\n isDisabled\n }, state, inputRef);\n\n return (\n <label\n {...styleProps}\n {...hoverProps}\n ref={domRef}\n className={\n classNames(\n styles,\n 'spectrum-Radio',\n {\n // Removing. Pending design feedback.\n // 'spectrum-Radio--labelBelow': labelPosition === 'bottom',\n 'spectrum-Radio--quiet': !isEmphasized,\n 'is-disabled': isDisabled,\n 'is-invalid': state.isInvalid,\n 'is-hovered': isHovered\n },\n styleProps.className\n )\n }>\n <FocusRing focusRingClass={classNames(styles, 'focus-ring')} autoFocus={autoFocus}>\n <input\n {...inputProps}\n ref={inputRef}\n className={classNames(styles, 'spectrum-Radio-input')} />\n </FocusRing>\n <span className={classNames(styles, 'spectrum-Radio-button')} />\n {children && (\n <span className={classNames(styles, 'spectrum-Radio-label')}>\n {children}\n </span>\n )}\n </label>\n );\n}\n\n/**\n * Radio buttons allow users to select a single option from a list of mutually exclusive options.\n * All possible options are exposed up front for users to compare.\n */\nconst _Radio = forwardRef(Radio);\nexport {_Radio as Radio};\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {RadioGroupState} from '@react-stately/radio';\nimport React, {useContext} from 'react';\n\ninterface RadioGroupContext {\n isEmphasized?: boolean,\n name?: string,\n state: RadioGroupState\n}\n\nexport const RadioContext = React.createContext<RadioGroupContext | null>(null);\n\nexport function useRadioProvider(): RadioGroupContext {\n return useContext(RadioContext) || {} as RadioGroupContext;\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {classNames, useDOMRef} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport {Field} from '@react-spectrum/label';\nimport {RadioContext} from './context';\nimport React from 'react';\nimport {SpectrumRadioGroupProps} from '@react-types/radio';\nimport styles from '@adobe/spectrum-css-temp/components/fieldgroup/vars.css';\nimport {useFormProps} from '@react-spectrum/form';\nimport {useProviderProps} from '@react-spectrum/provider';\nimport {useRadioGroup} from '@react-aria/radio';\nimport {useRadioGroupState} from '@react-stately/radio';\n\nfunction RadioGroup(props: SpectrumRadioGroupProps, ref: DOMRef<HTMLElement>) {\n props = useProviderProps(props);\n props = useFormProps(props);\n let {\n isEmphasized,\n children,\n orientation = 'vertical'\n } = props;\n\n let domRef = useDOMRef(ref);\n let state = useRadioGroupState(props);\n let {radioGroupProps, ...otherProps} = useRadioGroup(props, state);\n\n return (\n <Field\n {...props}\n {...otherProps}\n ref={domRef}\n wrapperClassName={classNames(styles, 'spectrum-FieldGroup')}\n elementType=\"span\">\n <div\n {...radioGroupProps}\n className={\n classNames(\n styles,\n 'spectrum-FieldGroup-group',\n {\n 'spectrum-FieldGroup-group--horizontal': orientation === 'horizontal'\n }\n )\n }>\n <RadioContext.Provider\n value={{\n isEmphasized,\n state\n }}>\n {children}\n </RadioContext.Provider>\n </div>\n </Field>\n );\n}\n\n/**\n * Radio groups allow users to select a single option from a list of mutually exclusive options.\n * All possible options are exposed up front for users to compare.\n */\nconst _RadioGroup = React.forwardRef(RadioGroup);\nexport {_RadioGroup as RadioGroup};\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n"],"names":[],"version":3,"file":"main.js.map"}
|
1
|
+
{"mappings":";;;;;;;;;;AAAA;;;;;;;;;;CAUC,GAED,0CAA0C","sources":["packages/@react-spectrum/radio/src/index.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/// <reference types=\"css-module-types\" />\n\nexport {Radio} from './Radio';\nexport {RadioGroup} from './RadioGroup';\nexport type {SpectrumRadioProps} from '@react-types/radio';\nexport type {SpectrumRadioGroupProps} from '@react-types/radio';\n"],"names":[],"version":3,"file":"main.js.map"}
|