@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.d.mts CHANGED
@@ -211,9 +211,12 @@ declare const IconButton: React$1.ForwardRefExoticComponent<React$1.ButtonHTMLAt
211
211
  type TextInputStatus = "default" | "error";
212
212
  type TextInputSize = "sm" | "md" | "lg";
213
213
  type TextInputRadius = "none" | "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "full";
214
+ type TextInputLabelWeight = "normal" | "medium" | "semibold" | "bold";
214
215
  type TextInputProps = Omit<React$1.InputHTMLAttributes<HTMLInputElement>, "size"> & {
215
216
  /** Label text displayed above the input */
216
217
  label?: string;
218
+ /** Label font weight */
219
+ labelWeight?: TextInputLabelWeight;
217
220
  /** Subtitle displayed next to the label */
218
221
  subtitle?: string;
219
222
  /** Validation status */
@@ -234,6 +237,8 @@ type TextInputProps = Omit<React$1.InputHTMLAttributes<HTMLInputElement>, "size"
234
237
  declare const TextInput: React$1.ForwardRefExoticComponent<Omit<React$1.InputHTMLAttributes<HTMLInputElement>, "size"> & {
235
238
  /** Label text displayed above the input */
236
239
  label?: string;
240
+ /** Label font weight */
241
+ labelWeight?: TextInputLabelWeight;
237
242
  /** Subtitle displayed next to the label */
238
243
  subtitle?: string;
239
244
  /** Validation status */
@@ -614,6 +619,8 @@ type TableProps<T> = Omit<React$1.HTMLAttributes<HTMLTableElement>, "children">
614
619
  stickyHeader?: boolean;
615
620
  /** Custom header row style */
616
621
  headerStyle?: React$1.CSSProperties;
622
+ /** Custom header text class (overrides default rh-text-text-muted) */
623
+ headerTextClassName?: string;
617
624
  };
618
625
  declare const Table: <T>(props: TableProps<T> & {
619
626
  ref?: React$1.ForwardedRef<HTMLTableElement>;
package/dist/index.d.ts CHANGED
@@ -211,9 +211,12 @@ declare const IconButton: React$1.ForwardRefExoticComponent<React$1.ButtonHTMLAt
211
211
  type TextInputStatus = "default" | "error";
212
212
  type TextInputSize = "sm" | "md" | "lg";
213
213
  type TextInputRadius = "none" | "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "full";
214
+ type TextInputLabelWeight = "normal" | "medium" | "semibold" | "bold";
214
215
  type TextInputProps = Omit<React$1.InputHTMLAttributes<HTMLInputElement>, "size"> & {
215
216
  /** Label text displayed above the input */
216
217
  label?: string;
218
+ /** Label font weight */
219
+ labelWeight?: TextInputLabelWeight;
217
220
  /** Subtitle displayed next to the label */
218
221
  subtitle?: string;
219
222
  /** Validation status */
@@ -234,6 +237,8 @@ type TextInputProps = Omit<React$1.InputHTMLAttributes<HTMLInputElement>, "size"
234
237
  declare const TextInput: React$1.ForwardRefExoticComponent<Omit<React$1.InputHTMLAttributes<HTMLInputElement>, "size"> & {
235
238
  /** Label text displayed above the input */
236
239
  label?: string;
240
+ /** Label font weight */
241
+ labelWeight?: TextInputLabelWeight;
237
242
  /** Subtitle displayed next to the label */
238
243
  subtitle?: string;
239
244
  /** Validation status */
@@ -614,6 +619,8 @@ type TableProps<T> = Omit<React$1.HTMLAttributes<HTMLTableElement>, "children">
614
619
  stickyHeader?: boolean;
615
620
  /** Custom header row style */
616
621
  headerStyle?: React$1.CSSProperties;
622
+ /** Custom header text class (overrides default rh-text-text-muted) */
623
+ headerTextClassName?: string;
617
624
  };
618
625
  declare const Table: <T>(props: TableProps<T> & {
619
626
  ref?: React$1.ForwardedRef<HTMLTableElement>;
package/dist/index.js CHANGED
@@ -940,8 +940,15 @@ var helperStatusClasses = {
940
940
  default: "rh-text-text-muted",
941
941
  error: "rh-text-danger"
942
942
  };
943
+ var labelWeightClasses = {
944
+ normal: "rh-font-normal",
945
+ medium: "rh-font-medium",
946
+ semibold: "rh-font-semibold",
947
+ bold: "rh-font-bold"
948
+ };
943
949
  var TextInput = React8.forwardRef(function TextInput2({
944
950
  label,
951
+ labelWeight = "medium",
945
952
  subtitle,
946
953
  status = "default",
947
954
  size = "md",
@@ -962,7 +969,7 @@ var TextInput = React8.forwardRef(function TextInput2({
962
969
  className: ["rh-flex rh-flex-col rh-gap-[0.5rem] rh-font-sans", wrapperClassName].filter(Boolean).join(" "),
963
970
  children: [
964
971
  label && /* @__PURE__ */ jsxRuntime.jsxs("label", { htmlFor: inputId, className: "rh-flex rh-items-baseline rh-gap-1", children: [
965
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "rh-text-sm rh-font-medium rh-text-text", children: label }),
972
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: `rh-text-sm ${labelWeightClasses[labelWeight]} rh-text-text`, children: label }),
966
973
  subtitle && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "rh-text-sm rh-text-text-muted", children: subtitle })
967
974
  ] }),
968
975
  /* @__PURE__ */ jsxRuntime.jsxs(
@@ -2072,6 +2079,7 @@ var TagInput = React8.forwardRef(
2072
2079
  /* @__PURE__ */ jsxRuntime.jsxs(
2073
2080
  "div",
2074
2081
  {
2082
+ onClick: disabled ? void 0 : handleAddClick,
2075
2083
  className: [
2076
2084
  "rh-flex rh-flex-row rh-items-center rh-justify-between rh-gap-2",
2077
2085
  "rh-border rh-bg-surface rh-font-sans",
@@ -2079,7 +2087,7 @@ var TagInput = React8.forwardRef(
2079
2087
  statusClasses3[status],
2080
2088
  radiusClasses5[radius],
2081
2089
  sizeClasses9[size],
2082
- disabled ? "rh-opacity-50 rh-cursor-not-allowed rh-bg-background" : "",
2090
+ disabled ? "rh-opacity-50 rh-cursor-not-allowed rh-bg-background" : "rh-cursor-pointer",
2083
2091
  className
2084
2092
  ].filter(Boolean).join(" "),
2085
2093
  children: [
@@ -2099,7 +2107,10 @@ var TagInput = React8.forwardRef(
2099
2107
  "button",
2100
2108
  {
2101
2109
  type: "button",
2102
- onClick: () => handleRemoveTag(tag.value),
2110
+ onClick: (e) => {
2111
+ e.stopPropagation();
2112
+ handleRemoveTag(tag.value);
2113
+ },
2103
2114
  disabled,
2104
2115
  className: [
2105
2116
  "rh-flex rh-items-center rh-justify-center",
@@ -2620,6 +2631,7 @@ function TableInner({
2620
2631
  loadingContent,
2621
2632
  stickyHeader = false,
2622
2633
  headerStyle,
2634
+ headerTextClassName,
2623
2635
  className = "",
2624
2636
  ...rest
2625
2637
  }, ref) {
@@ -2679,7 +2691,7 @@ function TableInner({
2679
2691
  className: [
2680
2692
  sizeClasses12[size].header,
2681
2693
  alignClasses[column.align || "left"],
2682
- "rh-font-semibold rh-text-text-muted rh-whitespace-nowrap",
2694
+ `rh-font-semibold rh-whitespace-nowrap ${headerTextClassName || "rh-text-text-muted"}`,
2683
2695
  stickyHeader ? "rh-sticky rh-top-0 rh-bg-surface rh-z-10" : "",
2684
2696
  column.sortable ? "rh-cursor-pointer rh-select-none hover:rh-text-text" : ""
2685
2697
  ].filter(Boolean).join(" "),