pesona-ui 1.0.12 → 1.0.13

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.js CHANGED
@@ -8497,12 +8497,14 @@ const Radio = React.forwardRef(({ name, label, options, error, ...rest }, ref) =
8497
8497
  });
8498
8498
 
8499
8499
  const RadioButtonGroup = React.forwardRef(({ name, label, size = 'md', options, selectedValue, error, required, ...rest }, ref) => {
8500
+ // Convert selectedValue to string if it's a boolean or number
8501
+ const stringselectedValue = typeof selectedValue === 'boolean' ? (selectedValue ? 'true' : 'false') : selectedValue;
8500
8502
  return (React.createElement(React.Fragment, null,
8501
8503
  label && (React.createElement("label", { htmlFor: name },
8502
8504
  label,
8503
8505
  " ",
8504
8506
  required && React.createElement("span", { className: "text-danger" }, "*"))),
8505
- React.createElement("div", { className: "btn-group", "data-toggle": "buttons" }, options.map((option) => (React.createElement("label", { key: option.value, className: `btn auto btn-default btn-${size} ${option.value === selectedValue ? 'active' : ''}` },
8507
+ React.createElement("div", { className: "btn-group", "data-toggle": "buttons" }, options.map((option) => (React.createElement("label", { key: option.value, className: `btn auto btn-default btn-${size} ${option.value === stringselectedValue ? 'active' : ''}` },
8506
8508
  React.createElement("input", { type: "radio", id: option.value.toString(), name: name, value: option.value, ref: ref, ...rest }),
8507
8509
  React.createElement("span", null, option.label))))),
8508
8510
  error !== undefined && React.createElement("small", { className: "form-message" }, error)));