@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.cjs CHANGED
@@ -3852,29 +3852,35 @@ function RadioGroup({
3852
3852
  children: /* @__PURE__ */ jsxRuntime.jsx(RadioGroupPrimitive__namespace.Indicator, { className: "flex h-full w-full items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "block h-1/2 w-1/2 rounded-full bg-accent" }) })
3853
3853
  }
3854
3854
  );
3855
- const labelEl = /* @__PURE__ */ jsxRuntime.jsxs(
3855
+ const labelClass = [
3856
+ "block select-none",
3857
+ opt.disabled ? "cursor-not-allowed opacity-50" : "cursor-pointer"
3858
+ ].join(" ");
3859
+ const labelTextEl = /* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: itemId, className: labelClass, children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: `block ${TEXT_SIZE[size]} text-foreground`, children: opt.label }) });
3860
+ const descriptionEl = opt.description ? /* @__PURE__ */ jsxRuntime.jsx(
3856
3861
  "label",
3857
3862
  {
3858
3863
  htmlFor: itemId,
3859
- className: [
3860
- "select-none",
3861
- opt.disabled ? "cursor-not-allowed opacity-50" : "cursor-pointer",
3862
- labelFirst ? "text-right" : ""
3863
- ].filter(Boolean).join(" "),
3864
- children: [
3865
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: `block ${TEXT_SIZE[size]} text-foreground`, children: opt.label }),
3866
- opt.description && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "block text-xs text-foreground-secondary mt-0.5", children: opt.description })
3867
- ]
3864
+ className: `block text-xs text-foreground-secondary mt-0.5 ${opt.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"}`,
3865
+ children: opt.description
3868
3866
  }
3869
- );
3870
- const rowClass = labelFirst && layout === "vertical" ? "grid grid-cols-[1fr_auto] items-start gap-2.5" : "flex items-start gap-2.5";
3871
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: rowClass, children: labelFirst ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3872
- labelEl,
3873
- dot
3874
- ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3867
+ ) : null;
3868
+ if (labelFirst) {
3869
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col", children: [
3870
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-2.5", children: [
3871
+ labelTextEl,
3872
+ dot
3873
+ ] }),
3874
+ descriptionEl
3875
+ ] }, opt.value);
3876
+ }
3877
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-2.5", children: [
3875
3878
  dot,
3876
- labelEl
3877
- ] }) }, opt.value);
3879
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex flex-col", children: [
3880
+ labelTextEl,
3881
+ descriptionEl
3882
+ ] })
3883
+ ] }, opt.value);
3878
3884
  })
3879
3885
  }
3880
3886
  )