@geomak/ui 5.7.0 → 5.7.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 CHANGED
@@ -3817,29 +3817,35 @@ function RadioGroup({
3817
3817
  children: /* @__PURE__ */ jsx(RadioGroupPrimitive.Indicator, { className: "flex h-full w-full items-center justify-center", children: /* @__PURE__ */ jsx("span", { className: "block h-1/2 w-1/2 rounded-full bg-accent" }) })
3818
3818
  }
3819
3819
  );
3820
- const labelEl = /* @__PURE__ */ jsxs(
3820
+ const labelClass = [
3821
+ "block select-none",
3822
+ opt.disabled ? "cursor-not-allowed opacity-50" : "cursor-pointer"
3823
+ ].join(" ");
3824
+ const labelTextEl = /* @__PURE__ */ jsx("label", { htmlFor: itemId, className: labelClass, children: /* @__PURE__ */ jsx("span", { className: `block ${TEXT_SIZE[size]} text-foreground`, children: opt.label }) });
3825
+ const descriptionEl = opt.description ? /* @__PURE__ */ jsx(
3821
3826
  "label",
3822
3827
  {
3823
3828
  htmlFor: itemId,
3824
- className: [
3825
- "select-none",
3826
- opt.disabled ? "cursor-not-allowed opacity-50" : "cursor-pointer",
3827
- labelFirst ? "text-right" : ""
3828
- ].filter(Boolean).join(" "),
3829
- children: [
3830
- /* @__PURE__ */ jsx("span", { className: `block ${TEXT_SIZE[size]} text-foreground`, children: opt.label }),
3831
- opt.description && /* @__PURE__ */ jsx("span", { className: "block text-xs text-foreground-secondary mt-0.5", children: opt.description })
3832
- ]
3829
+ className: `block text-xs text-foreground-secondary mt-0.5 ${opt.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"}`,
3830
+ children: opt.description
3833
3831
  }
3834
- );
3835
- const rowClass = labelFirst && layout === "vertical" ? "grid grid-cols-[1fr_auto] items-start gap-2.5" : "flex items-start gap-2.5";
3836
- return /* @__PURE__ */ jsx("div", { className: rowClass, children: labelFirst ? /* @__PURE__ */ jsxs(Fragment, { children: [
3837
- labelEl,
3838
- dot
3839
- ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
3832
+ ) : null;
3833
+ if (labelFirst) {
3834
+ return /* @__PURE__ */ jsxs("div", { className: "flex flex-col", children: [
3835
+ /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-2.5", children: [
3836
+ labelTextEl,
3837
+ dot
3838
+ ] }),
3839
+ descriptionEl
3840
+ ] }, opt.value);
3841
+ }
3842
+ return /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-2.5", children: [
3840
3843
  dot,
3841
- labelEl
3842
- ] }) }, opt.value);
3844
+ /* @__PURE__ */ jsxs("span", { className: "flex flex-col", children: [
3845
+ labelTextEl,
3846
+ descriptionEl
3847
+ ] })
3848
+ ] }, opt.value);
3843
3849
  })
3844
3850
  }
3845
3851
  )