@facter/ds-core 1.5.0 → 1.5.1

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.mjs CHANGED
@@ -3468,25 +3468,21 @@ function FormRadioGroup({
3468
3468
  const color = option.color || "default";
3469
3469
  const styles = colorStyles[color];
3470
3470
  return /* @__PURE__ */ jsxs(
3471
- "div",
3471
+ "label",
3472
3472
  {
3473
+ htmlFor: optionId,
3473
3474
  className: cn(
3474
3475
  "flex items-center gap-3 border-2 py-2 px-4 rounded-lg transition-colors cursor-pointer",
3475
3476
  isSelected ? cn(styles.border, styles.bg) : "border-border hover:border-muted-foreground/50",
3476
- option.disabled && "opacity-50 cursor-not-allowed"
3477
+ (option.disabled || disabled) && "opacity-50 cursor-not-allowed"
3477
3478
  ),
3478
- onClick: () => {
3479
- if (!option.disabled && !disabled) {
3480
- field.onChange(option.value);
3481
- }
3482
- },
3483
3479
  children: [
3484
3480
  /* @__PURE__ */ jsx(
3485
3481
  RadioGroupPrimitive.Item,
3486
3482
  {
3487
3483
  id: optionId,
3488
3484
  value: option.value,
3489
- disabled: option.disabled,
3485
+ disabled: option.disabled || disabled,
3490
3486
  className: cn(
3491
3487
  "aspect-square h-4 w-4 rounded-full border",
3492
3488
  isSelected ? styles.radio : "border-border text-muted-foreground",
@@ -3498,18 +3494,16 @@ function FormRadioGroup({
3498
3494
  ),
3499
3495
  /* @__PURE__ */ jsxs("div", { className: "grid gap-0.5 leading-none", children: [
3500
3496
  /* @__PURE__ */ jsx(
3501
- "label",
3497
+ "span",
3502
3498
  {
3503
- htmlFor: optionId,
3504
3499
  className: cn(
3505
- "text-sm font-medium leading-none cursor-pointer",
3506
- isSelected && styles.text,
3507
- option.disabled && "cursor-not-allowed"
3500
+ "text-sm font-medium leading-none",
3501
+ isSelected && styles.text
3508
3502
  ),
3509
3503
  children: option.label
3510
3504
  }
3511
3505
  ),
3512
- option.description && /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: option.description })
3506
+ option.description && /* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: option.description })
3513
3507
  ] })
3514
3508
  ]
3515
3509
  },