@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.d.cts
CHANGED
|
@@ -6872,6 +6872,8 @@ interface RadioGroupFieldProps<K extends string> extends Pick<PresentationFieldP
|
|
|
6872
6872
|
helperText?: string | ReactNode;
|
|
6873
6873
|
onBlur?: () => void;
|
|
6874
6874
|
onFocus?: () => void;
|
|
6875
|
+
/** The group name for the radio group. Only for legacy pages with custom layouts - avoid using this. */
|
|
6876
|
+
unsupportedNameHack?: string;
|
|
6875
6877
|
}
|
|
6876
6878
|
/**
|
|
6877
6879
|
* Provides a radio group with label.
|
package/dist/index.d.ts
CHANGED
|
@@ -6872,6 +6872,8 @@ interface RadioGroupFieldProps<K extends string> extends Pick<PresentationFieldP
|
|
|
6872
6872
|
helperText?: string | ReactNode;
|
|
6873
6873
|
onBlur?: () => void;
|
|
6874
6874
|
onFocus?: () => void;
|
|
6875
|
+
/** The group name for the radio group. Only for legacy pages with custom layouts - avoid using this. */
|
|
6876
|
+
unsupportedNameHack?: string;
|
|
6875
6877
|
}
|
|
6876
6878
|
/**
|
|
6877
6879
|
* Provides a radio group with label.
|
package/dist/index.js
CHANGED
|
@@ -11458,17 +11458,28 @@ import { useRadioGroupState } from "react-stately";
|
|
|
11458
11458
|
import { jsx as jsx68, jsxs as jsxs38 } from "@emotion/react/jsx-runtime";
|
|
11459
11459
|
var nextNameId = 0;
|
|
11460
11460
|
function RadioGroupField(props) {
|
|
11461
|
-
const {
|
|
11462
|
-
|
|
11461
|
+
const {
|
|
11462
|
+
label,
|
|
11463
|
+
labelStyle,
|
|
11464
|
+
value,
|
|
11465
|
+
onChange,
|
|
11466
|
+
options,
|
|
11467
|
+
disabled = false,
|
|
11468
|
+
errorMsg,
|
|
11469
|
+
helperText,
|
|
11470
|
+
unsupportedNameHack,
|
|
11471
|
+
...otherProps
|
|
11472
|
+
} = props;
|
|
11473
|
+
const groupName = useMemo18(() => unsupportedNameHack ?? `radio-group-${++nextNameId}`, [unsupportedNameHack]);
|
|
11463
11474
|
const state = useRadioGroupState({
|
|
11464
|
-
name,
|
|
11475
|
+
name: groupName,
|
|
11465
11476
|
value,
|
|
11466
11477
|
onChange: (value2) => onChange(value2),
|
|
11467
11478
|
isDisabled: disabled,
|
|
11468
11479
|
isReadOnly: false
|
|
11469
11480
|
});
|
|
11470
11481
|
const tid = useTestIds(props, defaultTestId(label));
|
|
11471
|
-
const { labelProps, radioGroupProps } = useRadioGroup({ label, isDisabled: disabled }, state);
|
|
11482
|
+
const { labelProps, radioGroupProps } = useRadioGroup({ label, isDisabled: disabled, name: groupName }, state);
|
|
11472
11483
|
return (
|
|
11473
11484
|
// default styling to position `<Label />` above.
|
|
11474
11485
|
/* @__PURE__ */ jsxs38("div", { css: Css.df.fdc.gap1.aifs.if(labelStyle === "left").fdr.gap2.jcsb.$, children: [
|
|
@@ -11482,7 +11493,7 @@ function RadioGroupField(props) {
|
|
|
11482
11493
|
children: /* @__PURE__ */ jsx68(
|
|
11483
11494
|
Radio,
|
|
11484
11495
|
{
|
|
11485
|
-
parentId:
|
|
11496
|
+
parentId: groupName,
|
|
11486
11497
|
option,
|
|
11487
11498
|
state: { ...state, isDisabled },
|
|
11488
11499
|
...otherProps,
|
|
@@ -11530,6 +11541,7 @@ function Radio(props) {
|
|
|
11530
11541
|
disabled,
|
|
11531
11542
|
"aria-labelledby": labelId,
|
|
11532
11543
|
...inputProps,
|
|
11544
|
+
name: parentId,
|
|
11533
11545
|
...focusProps,
|
|
11534
11546
|
...others
|
|
11535
11547
|
}
|