eai-frontend-components 2.0.78 → 2.0.79

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.js CHANGED
@@ -9606,7 +9606,7 @@ const FormInputPhone = ({ control, name, label, subLabel, helpText, placeholder,
9606
9606
 
9607
9607
  const FormRadioGroup = ({ control, name, value, label, subLabel, helpText, className, classNameOptions, disabled, required, size = 'md', options, onChange, }) => {
9608
9608
  const { FormField, FormItem, FormLabel, FormControl, FormMessage } = FormComponents;
9609
- return (jsxRuntime.jsx(FormField, { control: control, name: name, render: ({ field, formState }) => (jsxRuntime.jsxs(FormItem, { children: [jsxRuntime.jsxs("div", { className: cn('flex items-center space-x-1.5 mb-2', className), children: [label && formLabelAndSubLabel(FormLabel, label, subLabel, required), helpText && formHelpText(helpText)] }), jsxRuntime.jsx(FormControl, { children: jsxRuntime.jsx(RadioGroup, { onValueChange: (value) => {
9609
+ return (jsxRuntime.jsx(FormField, { control: control, name: name, render: ({ field, formState }) => (jsxRuntime.jsxs(FormItem, { children: [label && (jsxRuntime.jsxs("div", { className: cn('flex items-center space-x-1.5 mb-2', className), children: [formLabelAndSubLabel(FormLabel, label, subLabel, required), helpText && formHelpText(helpText)] })), jsxRuntime.jsx(FormControl, { children: jsxRuntime.jsx(RadioGroup, { onValueChange: (value) => {
9610
9610
  field?.onChange?.(value);
9611
9611
  onChange?.(value);
9612
9612
  }, defaultValue: field.value, disabled: disabled || formState.isSubmitting, className: `${className}`, children: jsxRuntime.jsx("div", { className: cn('flex flex-grow gap-6 font-medium text-sm', classNameOptions), children: options?.map((option) => (jsxRuntime.jsx("label", { htmlFor: `r${option.value}`, className: cn(option.disabled ? 'cursor-not-allowed' : 'cursor-pointer', 'block'), children: jsxRuntime.jsxs("div", { className: 'flex flex-col', children: [jsxRuntime.jsxs("div", { className: 'flex items-center space-x-2', children: [jsxRuntime.jsx(RadioGroupItem, { value: option.value, id: `r${option.value}`, checked: field.value === option.value, disabled: option.disabled, size: size }), jsxRuntime.jsx("div", { className: option.disabled ? 'opacity-50' : '', children: option.label })] }), option.description && (jsxRuntime.jsx("div", { className: cn('pl-6 text-zinc-500', { 'opacity-50': option.disabled }), children: option.description }))] }) }, `radio-${name}-${option.value}`))) }) }) }), formMessage(FormMessage)] })) }, value));