@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.js +8 -14
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -14
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3498,25 +3498,21 @@ function FormRadioGroup({
|
|
|
3498
3498
|
const color = option.color || "default";
|
|
3499
3499
|
const styles = colorStyles[color];
|
|
3500
3500
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3501
|
-
"
|
|
3501
|
+
"label",
|
|
3502
3502
|
{
|
|
3503
|
+
htmlFor: optionId,
|
|
3503
3504
|
className: cn(
|
|
3504
3505
|
"flex items-center gap-3 border-2 py-2 px-4 rounded-lg transition-colors cursor-pointer",
|
|
3505
3506
|
isSelected ? cn(styles.border, styles.bg) : "border-border hover:border-muted-foreground/50",
|
|
3506
|
-
option.disabled && "opacity-50 cursor-not-allowed"
|
|
3507
|
+
(option.disabled || disabled) && "opacity-50 cursor-not-allowed"
|
|
3507
3508
|
),
|
|
3508
|
-
onClick: () => {
|
|
3509
|
-
if (!option.disabled && !disabled) {
|
|
3510
|
-
field.onChange(option.value);
|
|
3511
|
-
}
|
|
3512
|
-
},
|
|
3513
3509
|
children: [
|
|
3514
3510
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3515
3511
|
RadioGroupPrimitive__namespace.Item,
|
|
3516
3512
|
{
|
|
3517
3513
|
id: optionId,
|
|
3518
3514
|
value: option.value,
|
|
3519
|
-
disabled: option.disabled,
|
|
3515
|
+
disabled: option.disabled || disabled,
|
|
3520
3516
|
className: cn(
|
|
3521
3517
|
"aspect-square h-4 w-4 rounded-full border",
|
|
3522
3518
|
isSelected ? styles.radio : "border-border text-muted-foreground",
|
|
@@ -3528,18 +3524,16 @@ function FormRadioGroup({
|
|
|
3528
3524
|
),
|
|
3529
3525
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid gap-0.5 leading-none", children: [
|
|
3530
3526
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3531
|
-
"
|
|
3527
|
+
"span",
|
|
3532
3528
|
{
|
|
3533
|
-
htmlFor: optionId,
|
|
3534
3529
|
className: cn(
|
|
3535
|
-
"text-sm font-medium leading-none
|
|
3536
|
-
isSelected && styles.text
|
|
3537
|
-
option.disabled && "cursor-not-allowed"
|
|
3530
|
+
"text-sm font-medium leading-none",
|
|
3531
|
+
isSelected && styles.text
|
|
3538
3532
|
),
|
|
3539
3533
|
children: option.label
|
|
3540
3534
|
}
|
|
3541
3535
|
),
|
|
3542
|
-
option.description && /* @__PURE__ */ jsxRuntime.jsx("
|
|
3536
|
+
option.description && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-muted-foreground", children: option.description })
|
|
3543
3537
|
] })
|
|
3544
3538
|
]
|
|
3545
3539
|
},
|