@rehagro/ui 1.0.41 → 1.0.42

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
@@ -173,6 +173,8 @@ type ButtonProps = React__default.ButtonHTMLAttributes<HTMLButtonElement> & {
173
173
  radius?: ButtonRadius;
174
174
  /** Color scheme — preset name or any CSS color (e.g., "#c3c3c3", "red", "rgb(...)") */
175
175
  color?: ButtonColor;
176
+ /** Custom text/icon color for the base state. Use hoverStyle.color to customize hover text color. */
177
+ textColor?: string;
176
178
  /** Custom hover color — overrides the token for this button only. Only applies to preset colors. Accepts "#RRGGBB", "r g b", or "rgb(r,g,b)" */
177
179
  hoverColor?: string;
178
180
  /** Custom hover styles - allows full control over hover appearance */
@@ -193,6 +195,8 @@ declare const Button: React__default.ForwardRefExoticComponent<React__default.Bu
193
195
  radius?: ButtonRadius;
194
196
  /** Color scheme — preset name or any CSS color (e.g., "#c3c3c3", "red", "rgb(...)") */
195
197
  color?: ButtonColor;
198
+ /** Custom text/icon color for the base state. Use hoverStyle.color to customize hover text color. */
199
+ textColor?: string;
196
200
  /** Custom hover color — overrides the token for this button only. Only applies to preset colors. Accepts "#RRGGBB", "r g b", or "rgb(r,g,b)" */
197
201
  hoverColor?: string;
198
202
  /** Custom hover styles - allows full control over hover appearance */
package/dist/index.d.ts CHANGED
@@ -173,6 +173,8 @@ type ButtonProps = React__default.ButtonHTMLAttributes<HTMLButtonElement> & {
173
173
  radius?: ButtonRadius;
174
174
  /** Color scheme — preset name or any CSS color (e.g., "#c3c3c3", "red", "rgb(...)") */
175
175
  color?: ButtonColor;
176
+ /** Custom text/icon color for the base state. Use hoverStyle.color to customize hover text color. */
177
+ textColor?: string;
176
178
  /** Custom hover color — overrides the token for this button only. Only applies to preset colors. Accepts "#RRGGBB", "r g b", or "rgb(r,g,b)" */
177
179
  hoverColor?: string;
178
180
  /** Custom hover styles - allows full control over hover appearance */
@@ -193,6 +195,8 @@ declare const Button: React__default.ForwardRefExoticComponent<React__default.Bu
193
195
  radius?: ButtonRadius;
194
196
  /** Color scheme — preset name or any CSS color (e.g., "#c3c3c3", "red", "rgb(...)") */
195
197
  color?: ButtonColor;
198
+ /** Custom text/icon color for the base state. Use hoverStyle.color to customize hover text color. */
199
+ textColor?: string;
196
200
  /** Custom hover color — overrides the token for this button only. Only applies to preset colors. Accepts "#RRGGBB", "r g b", or "rgb(r,g,b)" */
197
201
  hoverColor?: string;
198
202
  /** Custom hover styles - allows full control over hover appearance */
package/dist/index.js CHANGED
@@ -839,6 +839,7 @@ var Button = React9.forwardRef(function Button2({
839
839
  size = "md",
840
840
  radius = "sm",
841
841
  color = "primary",
842
+ textColor,
842
843
  hoverColor,
843
844
  hoverStyle,
844
845
  loading = false,
@@ -859,8 +860,9 @@ var Button = React9.forwardRef(function Button2({
859
860
  "--btn-hover-border": hoverStyle.borderColor,
860
861
  "--btn-hover-color": hoverStyle.color
861
862
  } : {};
862
- return { ...style, ...baseStyle, ...hoverVars };
863
- }, [preset, color, variant, hoverColor, hoverStyle, style]);
863
+ const textStyle = textColor ? { color: textColor } : {};
864
+ return { ...style, ...baseStyle, ...textStyle, ...hoverVars };
865
+ }, [preset, color, variant, hoverColor, hoverStyle, style, textColor]);
864
866
  const hasCustomHover = Boolean(hoverStyle);
865
867
  return /* @__PURE__ */ jsxRuntime.jsxs(
866
868
  "button",
@@ -1089,6 +1091,7 @@ var labelWeightClasses = {
1089
1091
  semibold: "rh-font-semibold",
1090
1092
  bold: "rh-font-bold"
1091
1093
  };
1094
+ var getSubtitleClassName = (subtitle) => subtitle.trim() === "*" ? "rh-text-danger" : "rh-text-text-muted";
1092
1095
  var TextInput = React9.forwardRef(function TextInput2({
1093
1096
  label,
1094
1097
  labelWeight = "medium",
@@ -1105,7 +1108,8 @@ var TextInput = React9.forwardRef(function TextInput2({
1105
1108
  id,
1106
1109
  ...rest
1107
1110
  }, ref) {
1108
- const inputId = id || React9__default.default.useId();
1111
+ const generatedId = React9__default.default.useId();
1112
+ const inputId = id || generatedId;
1109
1113
  const [isHelperDismissed, setIsHelperDismissed] = React9__default.default.useState(false);
1110
1114
  const { onChange, ...inputProps } = rest;
1111
1115
  const visualStatus = helperText && isHelperDismissed ? "default" : status;
@@ -1116,7 +1120,7 @@ var TextInput = React9.forwardRef(function TextInput2({
1116
1120
  children: [
1117
1121
  label && /* @__PURE__ */ jsxRuntime.jsxs("label", { htmlFor: inputId, className: "rh-flex rh-items-baseline rh-gap-1", children: [
1118
1122
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: `rh-text-sm ${labelWeightClasses[labelWeight]} rh-text-text`, children: label }),
1119
- subtitle && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "rh-text-sm rh-text-text-muted", children: subtitle })
1123
+ subtitle && /* @__PURE__ */ jsxRuntime.jsx("span", { className: `rh-text-sm ${getSubtitleClassName(subtitle)}`, children: subtitle })
1120
1124
  ] }),
1121
1125
  /* @__PURE__ */ jsxRuntime.jsxs(
1122
1126
  "div",
@@ -1514,6 +1518,7 @@ var optionSizeClasses = {
1514
1518
  md: "rh-px-input-x-md rh-py-2 rh-text-sm",
1515
1519
  lg: "rh-px-input-x-lg rh-py-2.5 rh-text-base"
1516
1520
  };
1521
+ var getSubtitleClassName2 = (subtitle) => subtitle.trim() === "*" ? "rh-text-danger" : "rh-text-text-muted";
1517
1522
  var ChevronIcon = ({ className }) => /* @__PURE__ */ jsxRuntime.jsx(
1518
1523
  "svg",
1519
1524
  {
@@ -1725,7 +1730,7 @@ var Select = React9.forwardRef(function Select2(props, ref) {
1725
1730
  children: [
1726
1731
  label && /* @__PURE__ */ jsxRuntime.jsxs("label", { id: `${triggerId}-label`, className: "rh-flex rh-items-baseline rh-gap-1", children: [
1727
1732
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "rh-text-sm rh-font-medium rh-text-text", children: label }),
1728
- subtitle && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "rh-text-sm rh-text-text-muted", children: subtitle })
1733
+ subtitle && /* @__PURE__ */ jsxRuntime.jsx("span", { className: `rh-text-sm ${getSubtitleClassName2(subtitle)}`, children: subtitle })
1729
1734
  ] }),
1730
1735
  /* @__PURE__ */ jsxRuntime.jsxs(
1731
1736
  "button",