@react-spectrum/radio 3.7.23 → 3.8.0
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/import.mjs +2 -4
- package/dist/main.js +3 -5
- package/dist/main.js.map +1 -1
- package/dist/module.js +2 -4
- package/dist/module.js.map +1 -1
- package/dist/types/src/index.d.ts +2 -0
- package/package.json +12 -33
- package/src/index.ts +3 -4
- package/dist/Radio.main.js +0 -79
- package/dist/Radio.main.js.map +0 -1
- package/dist/Radio.mjs +0 -74
- package/dist/Radio.module.js +0 -74
- package/dist/Radio.module.js.map +0 -1
- package/dist/RadioGroup.main.js +0 -68
- package/dist/RadioGroup.main.js.map +0 -1
- package/dist/RadioGroup.mjs +0 -63
- package/dist/RadioGroup.module.js +0 -63
- package/dist/RadioGroup.module.js.map +0 -1
- package/dist/context.main.js +0 -31
- package/dist/context.main.js.map +0 -1
- package/dist/context.mjs +0 -21
- package/dist/context.module.js +0 -21
- package/dist/context.module.js.map +0 -1
- package/dist/fieldgroup_vars_css.main.js +0 -32
- package/dist/fieldgroup_vars_css.main.js.map +0 -1
- package/dist/fieldgroup_vars_css.mjs +0 -34
- package/dist/fieldgroup_vars_css.module.js +0 -34
- package/dist/fieldgroup_vars_css.module.js.map +0 -1
- package/dist/radio.3c5c8b59.css +0 -94
- package/dist/radio.3c5c8b59.css.map +0 -1
- package/dist/radio.85390755.css +0 -370
- package/dist/radio.85390755.css.map +0 -1
- package/dist/radio_vars_css.main.js +0 -47
- package/dist/radio_vars_css.main.js.map +0 -1
- package/dist/radio_vars_css.mjs +0 -49
- package/dist/radio_vars_css.module.js +0 -49
- package/dist/radio_vars_css.module.js.map +0 -1
- package/dist/types.d.ts +0 -17
- package/dist/types.d.ts.map +0 -1
- package/src/Radio.tsx +0 -86
- package/src/RadioGroup.tsx +0 -70
- package/src/context.ts +0 -26
package/dist/import.mjs
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {Radio as $
|
|
2
|
-
import {RadioGroup as $ac9b96486fc4badf$export$a98f0dcb43a68a25} from "./RadioGroup.mjs";
|
|
1
|
+
import {Radio as $99fa5fce7d895c9b$re_export$Radio, RadioGroup as $99fa5fce7d895c9b$re_export$RadioGroup} from "@adobe/react-spectrum/RadioGroup";
|
|
3
2
|
|
|
4
3
|
/*
|
|
5
4
|
* Copyright 2020 Adobe. All rights reserved.
|
|
@@ -15,6 +14,5 @@ import {RadioGroup as $ac9b96486fc4badf$export$a98f0dcb43a68a25} from "./RadioGr
|
|
|
15
14
|
|
|
16
15
|
|
|
17
16
|
|
|
18
|
-
|
|
19
|
-
export {$337c5cb580c4e6ba$export$d7b12c4107be0d61 as Radio, $ac9b96486fc4badf$export$a98f0dcb43a68a25 as RadioGroup};
|
|
17
|
+
export {$99fa5fce7d895c9b$re_export$Radio as Radio, $99fa5fce7d895c9b$re_export$RadioGroup as RadioGroup};
|
|
20
18
|
//# sourceMappingURL=module.js.map
|
package/dist/main.js
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
var $
|
|
2
|
-
var $aa5529d97b69d048$exports = require("./RadioGroup.main.js");
|
|
1
|
+
var $j3cAl$adobereactspectrumRadioGroup = require("@adobe/react-spectrum/RadioGroup");
|
|
3
2
|
|
|
4
3
|
|
|
5
4
|
function $parcel$export(e, n, v, s) {
|
|
6
5
|
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
7
6
|
}
|
|
8
7
|
|
|
9
|
-
$parcel$export(module.exports, "Radio", ()
|
|
10
|
-
$parcel$export(module.exports, "RadioGroup", ()
|
|
8
|
+
$parcel$export(module.exports, "Radio", function () { return $j3cAl$adobereactspectrumRadioGroup.Radio; });
|
|
9
|
+
$parcel$export(module.exports, "RadioGroup", function () { return $j3cAl$adobereactspectrumRadioGroup.RadioGroup; });
|
|
11
10
|
/*
|
|
12
11
|
* Copyright 2020 Adobe. All rights reserved.
|
|
13
12
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
@@ -22,5 +21,4 @@ $parcel$export(module.exports, "RadioGroup", () => $aa5529d97b69d048$exports.Rad
|
|
|
22
21
|
|
|
23
22
|
|
|
24
23
|
|
|
25
|
-
|
|
26
24
|
//# sourceMappingURL=main.js.map
|
package/dist/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"
|
|
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, RadioGroup} from '@adobe/react-spectrum/RadioGroup';\n\nexport type {SpectrumRadioProps, SpectrumRadioGroupProps} from '@adobe/react-spectrum/RadioGroup';\n"],"names":[],"version":3,"file":"main.js.map"}
|
package/dist/module.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {Radio as $
|
|
2
|
-
import {RadioGroup as $ac9b96486fc4badf$export$a98f0dcb43a68a25} from "./RadioGroup.module.js";
|
|
1
|
+
import {Radio as $99fa5fce7d895c9b$re_export$Radio, RadioGroup as $99fa5fce7d895c9b$re_export$RadioGroup} from "@adobe/react-spectrum/RadioGroup";
|
|
3
2
|
|
|
4
3
|
/*
|
|
5
4
|
* Copyright 2020 Adobe. All rights reserved.
|
|
@@ -15,6 +14,5 @@ import {RadioGroup as $ac9b96486fc4badf$export$a98f0dcb43a68a25} from "./RadioGr
|
|
|
15
14
|
|
|
16
15
|
|
|
17
16
|
|
|
18
|
-
|
|
19
|
-
export {$337c5cb580c4e6ba$export$d7b12c4107be0d61 as Radio, $ac9b96486fc4badf$export$a98f0dcb43a68a25 as RadioGroup};
|
|
17
|
+
export {$99fa5fce7d895c9b$re_export$Radio as Radio, $99fa5fce7d895c9b$re_export$RadioGroup as RadioGroup};
|
|
20
18
|
//# sourceMappingURL=module.js.map
|
package/dist/module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"
|
|
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, RadioGroup} from '@adobe/react-spectrum/RadioGroup';\n\nexport type {SpectrumRadioProps, SpectrumRadioGroupProps} from '@adobe/react-spectrum/RadioGroup';\n"],"names":[],"version":3,"file":"module.js.map"}
|
package/package.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-spectrum/radio",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.8.0",
|
|
4
4
|
"description": "Spectrum UI components in React",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/main.js",
|
|
7
7
|
"module": "dist/module.js",
|
|
8
8
|
"exports": {
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
"./dist/types.d.ts",
|
|
12
|
-
"./
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
"
|
|
9
|
+
".": {
|
|
10
|
+
"source": "./src/index.ts",
|
|
11
|
+
"types": "./dist/types/src/index.d.ts",
|
|
12
|
+
"import": "./dist/import.mjs",
|
|
13
|
+
"require": "./dist/main.js"
|
|
14
|
+
},
|
|
15
|
+
"./package.json": "./package.json"
|
|
16
16
|
},
|
|
17
|
-
"types": "dist/types.d.ts",
|
|
17
|
+
"types": "dist/types/src/index.d.ts",
|
|
18
18
|
"source": "src/index.ts",
|
|
19
19
|
"files": [
|
|
20
20
|
"dist",
|
|
@@ -24,43 +24,22 @@
|
|
|
24
24
|
"*.css"
|
|
25
25
|
],
|
|
26
26
|
"targets": {
|
|
27
|
-
"
|
|
28
|
-
"includeNodeModules": [
|
|
29
|
-
"@adobe/spectrum-css-temp"
|
|
30
|
-
]
|
|
31
|
-
},
|
|
32
|
-
"module": {
|
|
33
|
-
"includeNodeModules": [
|
|
34
|
-
"@adobe/spectrum-css-temp"
|
|
35
|
-
]
|
|
36
|
-
}
|
|
27
|
+
"types": false
|
|
37
28
|
},
|
|
38
29
|
"repository": {
|
|
39
30
|
"type": "git",
|
|
40
31
|
"url": "https://github.com/adobe/react-spectrum"
|
|
41
32
|
},
|
|
42
33
|
"dependencies": {
|
|
43
|
-
"@react-
|
|
44
|
-
"@react-aria/interactions": "^3.27.0",
|
|
45
|
-
"@react-aria/radio": "^3.12.4",
|
|
46
|
-
"@react-spectrum/form": "^3.7.21",
|
|
47
|
-
"@react-spectrum/label": "^3.16.21",
|
|
48
|
-
"@react-spectrum/utils": "^3.12.11",
|
|
49
|
-
"@react-stately/radio": "^3.11.4",
|
|
50
|
-
"@react-types/radio": "^3.9.3",
|
|
51
|
-
"@react-types/shared": "^3.33.0",
|
|
34
|
+
"@adobe/react-spectrum": "3.47.0",
|
|
52
35
|
"@swc/helpers": "^0.5.0"
|
|
53
36
|
},
|
|
54
|
-
"devDependencies": {
|
|
55
|
-
"@adobe/spectrum-css-temp": "3.0.0-alpha.1"
|
|
56
|
-
},
|
|
57
37
|
"peerDependencies": {
|
|
58
|
-
"@react-spectrum/provider": "^3.0.0",
|
|
59
38
|
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1",
|
|
60
39
|
"react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1"
|
|
61
40
|
},
|
|
62
41
|
"publishConfig": {
|
|
63
42
|
"access": "public"
|
|
64
43
|
},
|
|
65
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "a6999bdf494a2e9c0381a5881908328bdd22ddae"
|
|
66
45
|
}
|
package/src/index.ts
CHANGED
|
@@ -12,7 +12,6 @@
|
|
|
12
12
|
|
|
13
13
|
/// <reference types="css-module-types" />
|
|
14
14
|
|
|
15
|
-
export {Radio} from '
|
|
16
|
-
|
|
17
|
-
export type {SpectrumRadioProps} from '@react-
|
|
18
|
-
export type {SpectrumRadioGroupProps} from '@react-types/radio';
|
|
15
|
+
export {Radio, RadioGroup} from '@adobe/react-spectrum/RadioGroup';
|
|
16
|
+
|
|
17
|
+
export type {SpectrumRadioProps, SpectrumRadioGroupProps} from '@adobe/react-spectrum/RadioGroup';
|
package/dist/Radio.main.js
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
require("./radio.85390755.css");
|
|
2
|
-
var $a8fbff4889c18df2$exports = require("./radio_vars_css.main.js");
|
|
3
|
-
var $f5a8721b9af05d97$exports = require("./context.main.js");
|
|
4
|
-
var $8lI9m$reactspectrumutils = require("@react-spectrum/utils");
|
|
5
|
-
var $8lI9m$reactariafocus = require("@react-aria/focus");
|
|
6
|
-
var $8lI9m$react = require("react");
|
|
7
|
-
var $8lI9m$reactariainteractions = require("@react-aria/interactions");
|
|
8
|
-
var $8lI9m$reactariaradio = require("@react-aria/radio");
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
function $parcel$interopDefault(a) {
|
|
12
|
-
return a && a.__esModule ? a.default : a;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
function $parcel$export(e, n, v, s) {
|
|
16
|
-
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
$parcel$export(module.exports, "Radio", () => $e8d5518f9c1aca76$export$d7b12c4107be0d61);
|
|
20
|
-
/*
|
|
21
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
22
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
23
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
24
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
25
|
-
*
|
|
26
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
27
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
28
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
29
|
-
* governing permissions and limitations under the License.
|
|
30
|
-
*/
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
const $e8d5518f9c1aca76$export$d7b12c4107be0d61 = /*#__PURE__*/ (0, $8lI9m$react.forwardRef)(function Radio(props, ref) {
|
|
38
|
-
let { isDisabled: isDisabled, children: children, autoFocus: autoFocus, ...otherProps } = props;
|
|
39
|
-
let { styleProps: styleProps } = (0, $8lI9m$reactspectrumutils.useStyleProps)(otherProps);
|
|
40
|
-
let { hoverProps: hoverProps, isHovered: isHovered } = (0, $8lI9m$reactariainteractions.useHover)({
|
|
41
|
-
isDisabled: isDisabled
|
|
42
|
-
});
|
|
43
|
-
let inputRef = (0, $8lI9m$react.useRef)(null);
|
|
44
|
-
let domRef = (0, $8lI9m$reactspectrumutils.useFocusableRef)(ref, inputRef);
|
|
45
|
-
let radioGroupProps = (0, $f5a8721b9af05d97$exports.useRadioProvider)();
|
|
46
|
-
let { isEmphasized: isEmphasized, state: state } = radioGroupProps;
|
|
47
|
-
let { inputProps: inputProps } = (0, $8lI9m$reactariaradio.useRadio)({
|
|
48
|
-
...props,
|
|
49
|
-
...radioGroupProps,
|
|
50
|
-
isDisabled: isDisabled
|
|
51
|
-
}, state, inputRef);
|
|
52
|
-
return /*#__PURE__*/ (0, ($parcel$interopDefault($8lI9m$react))).createElement("label", {
|
|
53
|
-
...styleProps,
|
|
54
|
-
...hoverProps,
|
|
55
|
-
ref: domRef,
|
|
56
|
-
className: (0, $8lI9m$reactspectrumutils.classNames)((0, ($parcel$interopDefault($a8fbff4889c18df2$exports))), 'spectrum-Radio', {
|
|
57
|
-
// Removing. Pending design feedback.
|
|
58
|
-
// 'spectrum-Radio--labelBelow': labelPosition === 'bottom',
|
|
59
|
-
'spectrum-Radio--quiet': !isEmphasized,
|
|
60
|
-
'is-disabled': isDisabled,
|
|
61
|
-
'is-invalid': state.isInvalid,
|
|
62
|
-
'is-hovered': isHovered
|
|
63
|
-
}, styleProps.className)
|
|
64
|
-
}, /*#__PURE__*/ (0, ($parcel$interopDefault($8lI9m$react))).createElement((0, $8lI9m$reactariafocus.FocusRing), {
|
|
65
|
-
focusRingClass: (0, $8lI9m$reactspectrumutils.classNames)((0, ($parcel$interopDefault($a8fbff4889c18df2$exports))), 'focus-ring'),
|
|
66
|
-
autoFocus: autoFocus
|
|
67
|
-
}, /*#__PURE__*/ (0, ($parcel$interopDefault($8lI9m$react))).createElement("input", {
|
|
68
|
-
...inputProps,
|
|
69
|
-
ref: inputRef,
|
|
70
|
-
className: (0, $8lI9m$reactspectrumutils.classNames)((0, ($parcel$interopDefault($a8fbff4889c18df2$exports))), 'spectrum-Radio-input')
|
|
71
|
-
})), /*#__PURE__*/ (0, ($parcel$interopDefault($8lI9m$react))).createElement("span", {
|
|
72
|
-
className: (0, $8lI9m$reactspectrumutils.classNames)((0, ($parcel$interopDefault($a8fbff4889c18df2$exports))), 'spectrum-Radio-button')
|
|
73
|
-
}), children && /*#__PURE__*/ (0, ($parcel$interopDefault($8lI9m$react))).createElement("span", {
|
|
74
|
-
className: (0, $8lI9m$reactspectrumutils.classNames)((0, ($parcel$interopDefault($a8fbff4889c18df2$exports))), 'spectrum-Radio-label')
|
|
75
|
-
}, children));
|
|
76
|
-
});
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
//# sourceMappingURL=Radio.main.js.map
|
package/dist/Radio.main.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;AAgBM,MAAM,0DAAQ,CAAA,GAAA,uBAAS,EAAE,SAAS,MAAM,KAAyB,EAAE,GAAmC;IAC3G,IAAI,cACF,UAAU,YACV,QAAQ,aACR,SAAS,EACT,GAAG,YACJ,GAAG;IACJ,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,uCAAY,EAAE;IACjC,IAAI,cAAC,UAAU,aAAE,SAAS,EAAC,GAAG,CAAA,GAAA,qCAAO,EAAE;oBAAC;IAAU;IAElD,IAAI,WAAW,CAAA,GAAA,mBAAK,EAAoB;IACxC,IAAI,SAAS,CAAA,GAAA,yCAAc,EAAE,KAAK;IAElC,IAAI,kBAAkB,CAAA,GAAA,0CAAe;IACrC,IAAI,gBACF,YAAY,SACZ,KAAK,EACN,GAAG;IAEJ,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,8BAAO,EAAE;QAC1B,GAAG,KAAK;QACR,GAAG,eAAe;oBAClB;IACF,GAAG,OAAO;IAEV,qBACE,0DAAC;QACE,GAAG,UAAU;QACb,GAAG,UAAU;QACd,KAAK;QACL,WACE,CAAA,GAAA,oCAAS,EACP,CAAA,GAAA,mDAAK,GACL,kBACA;YACE,qCAAqC;YACrC,4DAA4D;YAC5D,yBAAyB,CAAC;YAC1B,eAAe;YACf,cAAc,MAAM,SAAS;YAC7B,cAAc;QAChB,GACA,WAAW,SAAS;qBAGxB,0DAAC,CAAA,GAAA,+BAAQ;QAAE,gBAAgB,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;QAAe,WAAW;qBACtE,0DAAC;QACE,GAAG,UAAU;QACd,KAAK;QACL,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;uBAElC,0DAAC;QAAK,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;QACnC,0BACC,0DAAC;QAAK,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;OACjC;AAKX","sources":["packages/@react-spectrum/radio/src/Radio.tsx"],"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\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\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 */\nexport const Radio = forwardRef(function 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"],"names":[],"version":3,"file":"Radio.main.js.map"}
|
package/dist/Radio.mjs
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import "./radio.85390755.css";
|
|
2
|
-
import $1v8IR$radio_vars_cssmodulejs from "./radio_vars_css.mjs";
|
|
3
|
-
import {useRadioProvider as $f394bff9e10389a0$export$b054eba74077a826} from "./context.mjs";
|
|
4
|
-
import {useStyleProps as $1v8IR$useStyleProps, useFocusableRef as $1v8IR$useFocusableRef, classNames as $1v8IR$classNames} from "@react-spectrum/utils";
|
|
5
|
-
import {FocusRing as $1v8IR$FocusRing} from "@react-aria/focus";
|
|
6
|
-
import $1v8IR$react, {forwardRef as $1v8IR$forwardRef, useRef as $1v8IR$useRef} from "react";
|
|
7
|
-
import {useHover as $1v8IR$useHover} from "@react-aria/interactions";
|
|
8
|
-
import {useRadio as $1v8IR$useRadio} from "@react-aria/radio";
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
function $parcel$interopDefault(a) {
|
|
12
|
-
return a && a.__esModule ? a.default : a;
|
|
13
|
-
}
|
|
14
|
-
/*
|
|
15
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
16
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
17
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
18
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
19
|
-
*
|
|
20
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
21
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
22
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
23
|
-
* governing permissions and limitations under the License.
|
|
24
|
-
*/
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
const $337c5cb580c4e6ba$export$d7b12c4107be0d61 = /*#__PURE__*/ (0, $1v8IR$forwardRef)(function Radio(props, ref) {
|
|
32
|
-
let { isDisabled: isDisabled, children: children, autoFocus: autoFocus, ...otherProps } = props;
|
|
33
|
-
let { styleProps: styleProps } = (0, $1v8IR$useStyleProps)(otherProps);
|
|
34
|
-
let { hoverProps: hoverProps, isHovered: isHovered } = (0, $1v8IR$useHover)({
|
|
35
|
-
isDisabled: isDisabled
|
|
36
|
-
});
|
|
37
|
-
let inputRef = (0, $1v8IR$useRef)(null);
|
|
38
|
-
let domRef = (0, $1v8IR$useFocusableRef)(ref, inputRef);
|
|
39
|
-
let radioGroupProps = (0, $f394bff9e10389a0$export$b054eba74077a826)();
|
|
40
|
-
let { isEmphasized: isEmphasized, state: state } = radioGroupProps;
|
|
41
|
-
let { inputProps: inputProps } = (0, $1v8IR$useRadio)({
|
|
42
|
-
...props,
|
|
43
|
-
...radioGroupProps,
|
|
44
|
-
isDisabled: isDisabled
|
|
45
|
-
}, state, inputRef);
|
|
46
|
-
return /*#__PURE__*/ (0, $1v8IR$react).createElement("label", {
|
|
47
|
-
...styleProps,
|
|
48
|
-
...hoverProps,
|
|
49
|
-
ref: domRef,
|
|
50
|
-
className: (0, $1v8IR$classNames)((0, ($parcel$interopDefault($1v8IR$radio_vars_cssmodulejs))), 'spectrum-Radio', {
|
|
51
|
-
// Removing. Pending design feedback.
|
|
52
|
-
// 'spectrum-Radio--labelBelow': labelPosition === 'bottom',
|
|
53
|
-
'spectrum-Radio--quiet': !isEmphasized,
|
|
54
|
-
'is-disabled': isDisabled,
|
|
55
|
-
'is-invalid': state.isInvalid,
|
|
56
|
-
'is-hovered': isHovered
|
|
57
|
-
}, styleProps.className)
|
|
58
|
-
}, /*#__PURE__*/ (0, $1v8IR$react).createElement((0, $1v8IR$FocusRing), {
|
|
59
|
-
focusRingClass: (0, $1v8IR$classNames)((0, ($parcel$interopDefault($1v8IR$radio_vars_cssmodulejs))), 'focus-ring'),
|
|
60
|
-
autoFocus: autoFocus
|
|
61
|
-
}, /*#__PURE__*/ (0, $1v8IR$react).createElement("input", {
|
|
62
|
-
...inputProps,
|
|
63
|
-
ref: inputRef,
|
|
64
|
-
className: (0, $1v8IR$classNames)((0, ($parcel$interopDefault($1v8IR$radio_vars_cssmodulejs))), 'spectrum-Radio-input')
|
|
65
|
-
})), /*#__PURE__*/ (0, $1v8IR$react).createElement("span", {
|
|
66
|
-
className: (0, $1v8IR$classNames)((0, ($parcel$interopDefault($1v8IR$radio_vars_cssmodulejs))), 'spectrum-Radio-button')
|
|
67
|
-
}), children && /*#__PURE__*/ (0, $1v8IR$react).createElement("span", {
|
|
68
|
-
className: (0, $1v8IR$classNames)((0, ($parcel$interopDefault($1v8IR$radio_vars_cssmodulejs))), 'spectrum-Radio-label')
|
|
69
|
-
}, children));
|
|
70
|
-
});
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
export {$337c5cb580c4e6ba$export$d7b12c4107be0d61 as Radio};
|
|
74
|
-
//# sourceMappingURL=Radio.module.js.map
|
package/dist/Radio.module.js
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import "./radio.85390755.css";
|
|
2
|
-
import $1v8IR$radio_vars_cssmodulejs from "./radio_vars_css.module.js";
|
|
3
|
-
import {useRadioProvider as $f394bff9e10389a0$export$b054eba74077a826} from "./context.module.js";
|
|
4
|
-
import {useStyleProps as $1v8IR$useStyleProps, useFocusableRef as $1v8IR$useFocusableRef, classNames as $1v8IR$classNames} from "@react-spectrum/utils";
|
|
5
|
-
import {FocusRing as $1v8IR$FocusRing} from "@react-aria/focus";
|
|
6
|
-
import $1v8IR$react, {forwardRef as $1v8IR$forwardRef, useRef as $1v8IR$useRef} from "react";
|
|
7
|
-
import {useHover as $1v8IR$useHover} from "@react-aria/interactions";
|
|
8
|
-
import {useRadio as $1v8IR$useRadio} from "@react-aria/radio";
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
function $parcel$interopDefault(a) {
|
|
12
|
-
return a && a.__esModule ? a.default : a;
|
|
13
|
-
}
|
|
14
|
-
/*
|
|
15
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
16
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
17
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
18
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
19
|
-
*
|
|
20
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
21
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
22
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
23
|
-
* governing permissions and limitations under the License.
|
|
24
|
-
*/
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
const $337c5cb580c4e6ba$export$d7b12c4107be0d61 = /*#__PURE__*/ (0, $1v8IR$forwardRef)(function Radio(props, ref) {
|
|
32
|
-
let { isDisabled: isDisabled, children: children, autoFocus: autoFocus, ...otherProps } = props;
|
|
33
|
-
let { styleProps: styleProps } = (0, $1v8IR$useStyleProps)(otherProps);
|
|
34
|
-
let { hoverProps: hoverProps, isHovered: isHovered } = (0, $1v8IR$useHover)({
|
|
35
|
-
isDisabled: isDisabled
|
|
36
|
-
});
|
|
37
|
-
let inputRef = (0, $1v8IR$useRef)(null);
|
|
38
|
-
let domRef = (0, $1v8IR$useFocusableRef)(ref, inputRef);
|
|
39
|
-
let radioGroupProps = (0, $f394bff9e10389a0$export$b054eba74077a826)();
|
|
40
|
-
let { isEmphasized: isEmphasized, state: state } = radioGroupProps;
|
|
41
|
-
let { inputProps: inputProps } = (0, $1v8IR$useRadio)({
|
|
42
|
-
...props,
|
|
43
|
-
...radioGroupProps,
|
|
44
|
-
isDisabled: isDisabled
|
|
45
|
-
}, state, inputRef);
|
|
46
|
-
return /*#__PURE__*/ (0, $1v8IR$react).createElement("label", {
|
|
47
|
-
...styleProps,
|
|
48
|
-
...hoverProps,
|
|
49
|
-
ref: domRef,
|
|
50
|
-
className: (0, $1v8IR$classNames)((0, ($parcel$interopDefault($1v8IR$radio_vars_cssmodulejs))), 'spectrum-Radio', {
|
|
51
|
-
// Removing. Pending design feedback.
|
|
52
|
-
// 'spectrum-Radio--labelBelow': labelPosition === 'bottom',
|
|
53
|
-
'spectrum-Radio--quiet': !isEmphasized,
|
|
54
|
-
'is-disabled': isDisabled,
|
|
55
|
-
'is-invalid': state.isInvalid,
|
|
56
|
-
'is-hovered': isHovered
|
|
57
|
-
}, styleProps.className)
|
|
58
|
-
}, /*#__PURE__*/ (0, $1v8IR$react).createElement((0, $1v8IR$FocusRing), {
|
|
59
|
-
focusRingClass: (0, $1v8IR$classNames)((0, ($parcel$interopDefault($1v8IR$radio_vars_cssmodulejs))), 'focus-ring'),
|
|
60
|
-
autoFocus: autoFocus
|
|
61
|
-
}, /*#__PURE__*/ (0, $1v8IR$react).createElement("input", {
|
|
62
|
-
...inputProps,
|
|
63
|
-
ref: inputRef,
|
|
64
|
-
className: (0, $1v8IR$classNames)((0, ($parcel$interopDefault($1v8IR$radio_vars_cssmodulejs))), 'spectrum-Radio-input')
|
|
65
|
-
})), /*#__PURE__*/ (0, $1v8IR$react).createElement("span", {
|
|
66
|
-
className: (0, $1v8IR$classNames)((0, ($parcel$interopDefault($1v8IR$radio_vars_cssmodulejs))), 'spectrum-Radio-button')
|
|
67
|
-
}), children && /*#__PURE__*/ (0, $1v8IR$react).createElement("span", {
|
|
68
|
-
className: (0, $1v8IR$classNames)((0, ($parcel$interopDefault($1v8IR$radio_vars_cssmodulejs))), 'spectrum-Radio-label')
|
|
69
|
-
}, children));
|
|
70
|
-
});
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
export {$337c5cb580c4e6ba$export$d7b12c4107be0d61 as Radio};
|
|
74
|
-
//# sourceMappingURL=Radio.module.js.map
|
package/dist/Radio.module.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;AAgBM,MAAM,0DAAQ,CAAA,GAAA,iBAAS,EAAE,SAAS,MAAM,KAAyB,EAAE,GAAmC;IAC3G,IAAI,cACF,UAAU,YACV,QAAQ,aACR,SAAS,EACT,GAAG,YACJ,GAAG;IACJ,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,oBAAY,EAAE;IACjC,IAAI,cAAC,UAAU,aAAE,SAAS,EAAC,GAAG,CAAA,GAAA,eAAO,EAAE;oBAAC;IAAU;IAElD,IAAI,WAAW,CAAA,GAAA,aAAK,EAAoB;IACxC,IAAI,SAAS,CAAA,GAAA,sBAAc,EAAE,KAAK;IAElC,IAAI,kBAAkB,CAAA,GAAA,yCAAe;IACrC,IAAI,gBACF,YAAY,SACZ,KAAK,EACN,GAAG;IAEJ,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,eAAO,EAAE;QAC1B,GAAG,KAAK;QACR,GAAG,eAAe;oBAClB;IACF,GAAG,OAAO;IAEV,qBACE,gCAAC;QACE,GAAG,UAAU;QACb,GAAG,UAAU;QACd,KAAK;QACL,WACE,CAAA,GAAA,iBAAS,EACP,CAAA,GAAA,uDAAK,GACL,kBACA;YACE,qCAAqC;YACrC,4DAA4D;YAC5D,yBAAyB,CAAC;YAC1B,eAAe;YACf,cAAc,MAAM,SAAS;YAC7B,cAAc;QAChB,GACA,WAAW,SAAS;qBAGxB,gCAAC,CAAA,GAAA,gBAAQ;QAAE,gBAAgB,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,uDAAK,GAAG;QAAe,WAAW;qBACtE,gCAAC;QACE,GAAG,UAAU;QACd,KAAK;QACL,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,uDAAK,GAAG;uBAElC,gCAAC;QAAK,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,uDAAK,GAAG;QACnC,0BACC,gCAAC;QAAK,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,uDAAK,GAAG;OACjC;AAKX","sources":["packages/@react-spectrum/radio/src/Radio.tsx"],"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\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\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 */\nexport const Radio = forwardRef(function 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"],"names":[],"version":3,"file":"Radio.module.js.map"}
|
package/dist/RadioGroup.main.js
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
var $f5a8721b9af05d97$exports = require("./context.main.js");
|
|
2
|
-
require("./radio.3c5c8b59.css");
|
|
3
|
-
var $53124a3a0fd56fca$exports = require("./fieldgroup_vars_css.main.js");
|
|
4
|
-
var $bzUrP$reactspectrumutils = require("@react-spectrum/utils");
|
|
5
|
-
var $bzUrP$reactspectrumlabel = require("@react-spectrum/label");
|
|
6
|
-
var $bzUrP$react = require("react");
|
|
7
|
-
var $bzUrP$reactspectrumform = require("@react-spectrum/form");
|
|
8
|
-
var $bzUrP$reactspectrumprovider = require("@react-spectrum/provider");
|
|
9
|
-
var $bzUrP$reactariaradio = require("@react-aria/radio");
|
|
10
|
-
var $bzUrP$reactstatelyradio = require("@react-stately/radio");
|
|
11
|
-
|
|
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
|
-
|
|
21
|
-
$parcel$export(module.exports, "RadioGroup", () => $aa5529d97b69d048$export$a98f0dcb43a68a25);
|
|
22
|
-
/*
|
|
23
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
24
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
25
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
26
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
27
|
-
*
|
|
28
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
29
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
30
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
31
|
-
* governing permissions and limitations under the License.
|
|
32
|
-
*/
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
const $aa5529d97b69d048$export$a98f0dcb43a68a25 = /*#__PURE__*/ (0, ($parcel$interopDefault($bzUrP$react))).forwardRef(function RadioGroup(props, ref) {
|
|
42
|
-
props = (0, $bzUrP$reactspectrumprovider.useProviderProps)(props);
|
|
43
|
-
props = (0, $bzUrP$reactspectrumform.useFormProps)(props);
|
|
44
|
-
let { isEmphasized: isEmphasized, children: children, orientation: orientation = 'vertical' } = props;
|
|
45
|
-
let domRef = (0, $bzUrP$reactspectrumutils.useDOMRef)(ref);
|
|
46
|
-
let state = (0, $bzUrP$reactstatelyradio.useRadioGroupState)(props);
|
|
47
|
-
let { radioGroupProps: radioGroupProps, ...otherProps } = (0, $bzUrP$reactariaradio.useRadioGroup)(props, state);
|
|
48
|
-
return /*#__PURE__*/ (0, ($parcel$interopDefault($bzUrP$react))).createElement((0, $bzUrP$reactspectrumlabel.Field), {
|
|
49
|
-
...props,
|
|
50
|
-
...otherProps,
|
|
51
|
-
ref: domRef,
|
|
52
|
-
wrapperClassName: (0, $bzUrP$reactspectrumutils.classNames)((0, ($parcel$interopDefault($53124a3a0fd56fca$exports))), 'spectrum-FieldGroup'),
|
|
53
|
-
elementType: "span"
|
|
54
|
-
}, /*#__PURE__*/ (0, ($parcel$interopDefault($bzUrP$react))).createElement("div", {
|
|
55
|
-
...radioGroupProps,
|
|
56
|
-
className: (0, $bzUrP$reactspectrumutils.classNames)((0, ($parcel$interopDefault($53124a3a0fd56fca$exports))), 'spectrum-FieldGroup-group', {
|
|
57
|
-
'spectrum-FieldGroup-group--horizontal': orientation === 'horizontal'
|
|
58
|
-
})
|
|
59
|
-
}, /*#__PURE__*/ (0, ($parcel$interopDefault($bzUrP$react))).createElement((0, $f5a8721b9af05d97$exports.RadioContext).Provider, {
|
|
60
|
-
value: {
|
|
61
|
-
isEmphasized: isEmphasized,
|
|
62
|
-
state: state
|
|
63
|
-
}
|
|
64
|
-
}, children)));
|
|
65
|
-
});
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
//# sourceMappingURL=RadioGroup.main.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;AAkBM,MAAM,0DAAa,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC,SAAS,WAAW,KAA8B,EAAE,GAAwB;IACrH,QAAQ,CAAA,GAAA,6CAAe,EAAE;IACzB,QAAQ,CAAA,GAAA,qCAAW,EAAE;IACrB,IAAI,gBACF,YAAY,YACZ,QAAQ,eACR,cAAc,YACf,GAAG;IAEJ,IAAI,SAAS,CAAA,GAAA,mCAAQ,EAAE;IACvB,IAAI,QAAQ,CAAA,GAAA,2CAAiB,EAAE;IAC/B,IAAI,mBAAC,eAAe,EAAE,GAAG,YAAW,GAAG,CAAA,GAAA,mCAAY,EAAE,OAAO;IAE5D,qBACE,0DAAC,CAAA,GAAA,+BAAI;QACF,GAAG,KAAK;QACR,GAAG,UAAU;QACd,KAAK;QACL,kBAAkB,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;QACrC,aAAY;qBACZ,0DAAC;QACE,GAAG,eAAe;QACnB,WACE,CAAA,GAAA,oCAAS,EACP,CAAA,GAAA,mDAAK,GACL,6BACA;YACE,yCAAyC,gBAAgB;QAC3D;qBAGJ,0DAAC,CAAA,GAAA,sCAAW,EAAE,QAAQ;QACpB,OAAO;0BACL;mBACA;QACF;OACC;AAKX","sources":["packages/@react-spectrum/radio/src/RadioGroup.tsx"],"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\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\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 */\nexport const RadioGroup = React.forwardRef(function 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"],"names":[],"version":3,"file":"RadioGroup.main.js.map"}
|
package/dist/RadioGroup.mjs
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import {RadioContext as $f394bff9e10389a0$export$b118023277d4a5c3} from "./context.mjs";
|
|
2
|
-
import "./radio.3c5c8b59.css";
|
|
3
|
-
import $ah3ae$fieldgroup_vars_cssmodulejs from "./fieldgroup_vars_css.mjs";
|
|
4
|
-
import {useDOMRef as $ah3ae$useDOMRef, classNames as $ah3ae$classNames} from "@react-spectrum/utils";
|
|
5
|
-
import {Field as $ah3ae$Field} from "@react-spectrum/label";
|
|
6
|
-
import $ah3ae$react from "react";
|
|
7
|
-
import {useFormProps as $ah3ae$useFormProps} from "@react-spectrum/form";
|
|
8
|
-
import {useProviderProps as $ah3ae$useProviderProps} from "@react-spectrum/provider";
|
|
9
|
-
import {useRadioGroup as $ah3ae$useRadioGroup} from "@react-aria/radio";
|
|
10
|
-
import {useRadioGroupState as $ah3ae$useRadioGroupState} from "@react-stately/radio";
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
function $parcel$interopDefault(a) {
|
|
14
|
-
return a && a.__esModule ? a.default : a;
|
|
15
|
-
}
|
|
16
|
-
/*
|
|
17
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
18
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
19
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
20
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
21
|
-
*
|
|
22
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
23
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
24
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
25
|
-
* governing permissions and limitations under the License.
|
|
26
|
-
*/
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
const $ac9b96486fc4badf$export$a98f0dcb43a68a25 = /*#__PURE__*/ (0, $ah3ae$react).forwardRef(function RadioGroup(props, ref) {
|
|
36
|
-
props = (0, $ah3ae$useProviderProps)(props);
|
|
37
|
-
props = (0, $ah3ae$useFormProps)(props);
|
|
38
|
-
let { isEmphasized: isEmphasized, children: children, orientation: orientation = 'vertical' } = props;
|
|
39
|
-
let domRef = (0, $ah3ae$useDOMRef)(ref);
|
|
40
|
-
let state = (0, $ah3ae$useRadioGroupState)(props);
|
|
41
|
-
let { radioGroupProps: radioGroupProps, ...otherProps } = (0, $ah3ae$useRadioGroup)(props, state);
|
|
42
|
-
return /*#__PURE__*/ (0, $ah3ae$react).createElement((0, $ah3ae$Field), {
|
|
43
|
-
...props,
|
|
44
|
-
...otherProps,
|
|
45
|
-
ref: domRef,
|
|
46
|
-
wrapperClassName: (0, $ah3ae$classNames)((0, ($parcel$interopDefault($ah3ae$fieldgroup_vars_cssmodulejs))), 'spectrum-FieldGroup'),
|
|
47
|
-
elementType: "span"
|
|
48
|
-
}, /*#__PURE__*/ (0, $ah3ae$react).createElement("div", {
|
|
49
|
-
...radioGroupProps,
|
|
50
|
-
className: (0, $ah3ae$classNames)((0, ($parcel$interopDefault($ah3ae$fieldgroup_vars_cssmodulejs))), 'spectrum-FieldGroup-group', {
|
|
51
|
-
'spectrum-FieldGroup-group--horizontal': orientation === 'horizontal'
|
|
52
|
-
})
|
|
53
|
-
}, /*#__PURE__*/ (0, $ah3ae$react).createElement((0, $f394bff9e10389a0$export$b118023277d4a5c3).Provider, {
|
|
54
|
-
value: {
|
|
55
|
-
isEmphasized: isEmphasized,
|
|
56
|
-
state: state
|
|
57
|
-
}
|
|
58
|
-
}, children)));
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
export {$ac9b96486fc4badf$export$a98f0dcb43a68a25 as RadioGroup};
|
|
63
|
-
//# sourceMappingURL=RadioGroup.module.js.map
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import {RadioContext as $f394bff9e10389a0$export$b118023277d4a5c3} from "./context.module.js";
|
|
2
|
-
import "./radio.3c5c8b59.css";
|
|
3
|
-
import $ah3ae$fieldgroup_vars_cssmodulejs from "./fieldgroup_vars_css.module.js";
|
|
4
|
-
import {useDOMRef as $ah3ae$useDOMRef, classNames as $ah3ae$classNames} from "@react-spectrum/utils";
|
|
5
|
-
import {Field as $ah3ae$Field} from "@react-spectrum/label";
|
|
6
|
-
import $ah3ae$react from "react";
|
|
7
|
-
import {useFormProps as $ah3ae$useFormProps} from "@react-spectrum/form";
|
|
8
|
-
import {useProviderProps as $ah3ae$useProviderProps} from "@react-spectrum/provider";
|
|
9
|
-
import {useRadioGroup as $ah3ae$useRadioGroup} from "@react-aria/radio";
|
|
10
|
-
import {useRadioGroupState as $ah3ae$useRadioGroupState} from "@react-stately/radio";
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
function $parcel$interopDefault(a) {
|
|
14
|
-
return a && a.__esModule ? a.default : a;
|
|
15
|
-
}
|
|
16
|
-
/*
|
|
17
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
18
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
19
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
20
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
21
|
-
*
|
|
22
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
23
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
24
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
25
|
-
* governing permissions and limitations under the License.
|
|
26
|
-
*/
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
const $ac9b96486fc4badf$export$a98f0dcb43a68a25 = /*#__PURE__*/ (0, $ah3ae$react).forwardRef(function RadioGroup(props, ref) {
|
|
36
|
-
props = (0, $ah3ae$useProviderProps)(props);
|
|
37
|
-
props = (0, $ah3ae$useFormProps)(props);
|
|
38
|
-
let { isEmphasized: isEmphasized, children: children, orientation: orientation = 'vertical' } = props;
|
|
39
|
-
let domRef = (0, $ah3ae$useDOMRef)(ref);
|
|
40
|
-
let state = (0, $ah3ae$useRadioGroupState)(props);
|
|
41
|
-
let { radioGroupProps: radioGroupProps, ...otherProps } = (0, $ah3ae$useRadioGroup)(props, state);
|
|
42
|
-
return /*#__PURE__*/ (0, $ah3ae$react).createElement((0, $ah3ae$Field), {
|
|
43
|
-
...props,
|
|
44
|
-
...otherProps,
|
|
45
|
-
ref: domRef,
|
|
46
|
-
wrapperClassName: (0, $ah3ae$classNames)((0, ($parcel$interopDefault($ah3ae$fieldgroup_vars_cssmodulejs))), 'spectrum-FieldGroup'),
|
|
47
|
-
elementType: "span"
|
|
48
|
-
}, /*#__PURE__*/ (0, $ah3ae$react).createElement("div", {
|
|
49
|
-
...radioGroupProps,
|
|
50
|
-
className: (0, $ah3ae$classNames)((0, ($parcel$interopDefault($ah3ae$fieldgroup_vars_cssmodulejs))), 'spectrum-FieldGroup-group', {
|
|
51
|
-
'spectrum-FieldGroup-group--horizontal': orientation === 'horizontal'
|
|
52
|
-
})
|
|
53
|
-
}, /*#__PURE__*/ (0, $ah3ae$react).createElement((0, $f394bff9e10389a0$export$b118023277d4a5c3).Provider, {
|
|
54
|
-
value: {
|
|
55
|
-
isEmphasized: isEmphasized,
|
|
56
|
-
state: state
|
|
57
|
-
}
|
|
58
|
-
}, children)));
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
export {$ac9b96486fc4badf$export$a98f0dcb43a68a25 as RadioGroup};
|
|
63
|
-
//# sourceMappingURL=RadioGroup.module.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;AAkBM,MAAM,0DAAa,CAAA,GAAA,YAAI,EAAE,UAAU,CAAC,SAAS,WAAW,KAA8B,EAAE,GAAwB;IACrH,QAAQ,CAAA,GAAA,uBAAe,EAAE;IACzB,QAAQ,CAAA,GAAA,mBAAW,EAAE;IACrB,IAAI,gBACF,YAAY,YACZ,QAAQ,eACR,cAAc,YACf,GAAG;IAEJ,IAAI,SAAS,CAAA,GAAA,gBAAQ,EAAE;IACvB,IAAI,QAAQ,CAAA,GAAA,yBAAiB,EAAE;IAC/B,IAAI,mBAAC,eAAe,EAAE,GAAG,YAAW,GAAG,CAAA,GAAA,oBAAY,EAAE,OAAO;IAE5D,qBACE,gCAAC,CAAA,GAAA,YAAI;QACF,GAAG,KAAK;QACR,GAAG,UAAU;QACd,KAAK;QACL,kBAAkB,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,4DAAK,GAAG;QACrC,aAAY;qBACZ,gCAAC;QACE,GAAG,eAAe;QACnB,WACE,CAAA,GAAA,iBAAS,EACP,CAAA,GAAA,4DAAK,GACL,6BACA;YACE,yCAAyC,gBAAgB;QAC3D;qBAGJ,gCAAC,CAAA,GAAA,yCAAW,EAAE,QAAQ;QACpB,OAAO;0BACL;mBACA;QACF;OACC;AAKX","sources":["packages/@react-spectrum/radio/src/RadioGroup.tsx"],"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\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\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 */\nexport const RadioGroup = React.forwardRef(function 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"],"names":[],"version":3,"file":"RadioGroup.module.js.map"}
|