@rehagro/ui 1.0.9 → 1.0.10

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
@@ -934,8 +934,15 @@ var helperStatusClasses = {
934
934
  default: "rh-text-text-muted",
935
935
  error: "rh-text-danger"
936
936
  };
937
+ var labelWeightClasses = {
938
+ normal: "rh-font-normal",
939
+ medium: "rh-font-medium",
940
+ semibold: "rh-font-semibold",
941
+ bold: "rh-font-bold"
942
+ };
937
943
  var TextInput = forwardRef(function TextInput2({
938
944
  label,
945
+ labelWeight = "medium",
939
946
  subtitle,
940
947
  status = "default",
941
948
  size = "md",
@@ -956,7 +963,7 @@ var TextInput = forwardRef(function TextInput2({
956
963
  className: ["rh-flex rh-flex-col rh-gap-[0.5rem] rh-font-sans", wrapperClassName].filter(Boolean).join(" "),
957
964
  children: [
958
965
  label && /* @__PURE__ */ jsxs("label", { htmlFor: inputId, className: "rh-flex rh-items-baseline rh-gap-1", children: [
959
- /* @__PURE__ */ jsx("span", { className: "rh-text-sm rh-font-medium rh-text-text", children: label }),
966
+ /* @__PURE__ */ jsx("span", { className: `rh-text-sm ${labelWeightClasses[labelWeight]} rh-text-text`, children: label }),
960
967
  subtitle && /* @__PURE__ */ jsx("span", { className: "rh-text-sm rh-text-text-muted", children: subtitle })
961
968
  ] }),
962
969
  /* @__PURE__ */ jsxs(
@@ -2066,6 +2073,7 @@ var TagInput = forwardRef(
2066
2073
  /* @__PURE__ */ jsxs(
2067
2074
  "div",
2068
2075
  {
2076
+ onClick: disabled ? void 0 : handleAddClick,
2069
2077
  className: [
2070
2078
  "rh-flex rh-flex-row rh-items-center rh-justify-between rh-gap-2",
2071
2079
  "rh-border rh-bg-surface rh-font-sans",
@@ -2073,7 +2081,7 @@ var TagInput = forwardRef(
2073
2081
  statusClasses3[status],
2074
2082
  radiusClasses5[radius],
2075
2083
  sizeClasses9[size],
2076
- disabled ? "rh-opacity-50 rh-cursor-not-allowed rh-bg-background" : "",
2084
+ disabled ? "rh-opacity-50 rh-cursor-not-allowed rh-bg-background" : "rh-cursor-pointer",
2077
2085
  className
2078
2086
  ].filter(Boolean).join(" "),
2079
2087
  children: [
@@ -2093,7 +2101,10 @@ var TagInput = forwardRef(
2093
2101
  "button",
2094
2102
  {
2095
2103
  type: "button",
2096
- onClick: () => handleRemoveTag(tag.value),
2104
+ onClick: (e) => {
2105
+ e.stopPropagation();
2106
+ handleRemoveTag(tag.value);
2107
+ },
2097
2108
  disabled,
2098
2109
  className: [
2099
2110
  "rh-flex rh-items-center rh-justify-center",
@@ -2614,6 +2625,7 @@ function TableInner({
2614
2625
  loadingContent,
2615
2626
  stickyHeader = false,
2616
2627
  headerStyle,
2628
+ headerTextClassName,
2617
2629
  className = "",
2618
2630
  ...rest
2619
2631
  }, ref) {
@@ -2673,7 +2685,7 @@ function TableInner({
2673
2685
  className: [
2674
2686
  sizeClasses12[size].header,
2675
2687
  alignClasses[column.align || "left"],
2676
- "rh-font-semibold rh-text-text-muted rh-whitespace-nowrap",
2688
+ `rh-font-semibold rh-whitespace-nowrap ${headerTextClassName || "rh-text-text-muted"}`,
2677
2689
  stickyHeader ? "rh-sticky rh-top-0 rh-bg-surface rh-z-10" : "",
2678
2690
  column.sortable ? "rh-cursor-pointer rh-select-none hover:rh-text-text" : ""
2679
2691
  ].filter(Boolean).join(" "),