@homebound/beam 2.399.1 → 2.400.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/index.cjs +17 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +17 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -11821,17 +11821,28 @@ var import_react_stately14 = require("react-stately");
|
|
|
11821
11821
|
var import_jsx_runtime68 = require("@emotion/react/jsx-runtime");
|
|
11822
11822
|
var nextNameId = 0;
|
|
11823
11823
|
function RadioGroupField(props) {
|
|
11824
|
-
const {
|
|
11825
|
-
|
|
11824
|
+
const {
|
|
11825
|
+
label,
|
|
11826
|
+
labelStyle,
|
|
11827
|
+
value,
|
|
11828
|
+
onChange,
|
|
11829
|
+
options,
|
|
11830
|
+
disabled = false,
|
|
11831
|
+
errorMsg,
|
|
11832
|
+
helperText,
|
|
11833
|
+
unsupportedNameHack,
|
|
11834
|
+
...otherProps
|
|
11835
|
+
} = props;
|
|
11836
|
+
const groupName = (0, import_react55.useMemo)(() => unsupportedNameHack ?? `radio-group-${++nextNameId}`, [unsupportedNameHack]);
|
|
11826
11837
|
const state = (0, import_react_stately14.useRadioGroupState)({
|
|
11827
|
-
name,
|
|
11838
|
+
name: groupName,
|
|
11828
11839
|
value,
|
|
11829
11840
|
onChange: (value2) => onChange(value2),
|
|
11830
11841
|
isDisabled: disabled,
|
|
11831
11842
|
isReadOnly: false
|
|
11832
11843
|
});
|
|
11833
11844
|
const tid = useTestIds(props, defaultTestId(label));
|
|
11834
|
-
const { labelProps, radioGroupProps } = (0, import_react_aria34.useRadioGroup)({ label, isDisabled: disabled }, state);
|
|
11845
|
+
const { labelProps, radioGroupProps } = (0, import_react_aria34.useRadioGroup)({ label, isDisabled: disabled, name: groupName }, state);
|
|
11835
11846
|
return (
|
|
11836
11847
|
// default styling to position `<Label />` above.
|
|
11837
11848
|
/* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { css: Css.df.fdc.gap1.aifs.if(labelStyle === "left").fdr.gap2.jcsb.$, children: [
|
|
@@ -11845,7 +11856,7 @@ function RadioGroupField(props) {
|
|
|
11845
11856
|
children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
11846
11857
|
Radio,
|
|
11847
11858
|
{
|
|
11848
|
-
parentId:
|
|
11859
|
+
parentId: groupName,
|
|
11849
11860
|
option,
|
|
11850
11861
|
state: { ...state, isDisabled },
|
|
11851
11862
|
...otherProps,
|
|
@@ -11893,6 +11904,7 @@ function Radio(props) {
|
|
|
11893
11904
|
disabled,
|
|
11894
11905
|
"aria-labelledby": labelId,
|
|
11895
11906
|
...inputProps,
|
|
11907
|
+
name: parentId,
|
|
11896
11908
|
...focusProps,
|
|
11897
11909
|
...others
|
|
11898
11910
|
}
|