@rehagro/ui 1.0.42 → 1.0.44

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
@@ -239,8 +239,9 @@ declare const IconButton: React__default.ForwardRefExoticComponent<React__defaul
239
239
  } & React__default.RefAttributes<HTMLButtonElement>>;
240
240
 
241
241
  type TextInputStatus = "default" | "error";
242
- type TextInputSize = "sm" | "md" | "lg";
242
+ type TextInputSize = "sm" | "md" | "lg" | "xl";
243
243
  type TextInputRadius = "none" | "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "full";
244
+ type TextInputBorderWidth = "sm" | "md" | "lg";
244
245
  type TextInputLabelWeight = "normal" | "medium" | "semibold" | "bold";
245
246
  type TextInputProps = Omit<React__default.InputHTMLAttributes<HTMLInputElement>, "size"> & {
246
247
  /** Label text displayed above the input */
@@ -263,6 +264,23 @@ type TextInputProps = Omit<React__default.InputHTMLAttributes<HTMLInputElement>,
263
264
  helperText?: React__default.ReactNode;
264
265
  /** Custom class for the outermost wrapper */
265
266
  wrapperClassName?: string;
267
+ /**
268
+ * Custom border color for the input container. Accepts any valid
269
+ * CSS color value (hex, rgb, CSS variable, etc). When provided,
270
+ * overrides the border color from the current `status`. Useful
271
+ * for highlighting cells/rows in tables, marking fields with
272
+ * non-error states, or theming. Does NOT change focus/ring
273
+ * colors — those still come from `statusClasses`.
274
+ */
275
+ borderColor?: string;
276
+ /**
277
+ * Border width token for the input container.
278
+ *
279
+ * - `sm`: default 1px border.
280
+ * - `md`: default 2px border.
281
+ * - `lg`: default 3px border.
282
+ */
283
+ borderWidth?: TextInputBorderWidth;
266
284
  };
267
285
  declare const TextInput: React__default.ForwardRefExoticComponent<Omit<React__default.InputHTMLAttributes<HTMLInputElement>, "size"> & {
268
286
  /** Label text displayed above the input */
@@ -285,6 +303,23 @@ declare const TextInput: React__default.ForwardRefExoticComponent<Omit<React__de
285
303
  helperText?: React__default.ReactNode;
286
304
  /** Custom class for the outermost wrapper */
287
305
  wrapperClassName?: string;
306
+ /**
307
+ * Custom border color for the input container. Accepts any valid
308
+ * CSS color value (hex, rgb, CSS variable, etc). When provided,
309
+ * overrides the border color from the current `status`. Useful
310
+ * for highlighting cells/rows in tables, marking fields with
311
+ * non-error states, or theming. Does NOT change focus/ring
312
+ * colors — those still come from `statusClasses`.
313
+ */
314
+ borderColor?: string;
315
+ /**
316
+ * Border width token for the input container.
317
+ *
318
+ * - `sm`: default 1px border.
319
+ * - `md`: default 2px border.
320
+ * - `lg`: default 3px border.
321
+ */
322
+ borderWidth?: TextInputBorderWidth;
288
323
  } & React__default.RefAttributes<HTMLInputElement>>;
289
324
 
290
325
  type CheckboxSize = "sm" | "md" | "lg";
package/dist/index.d.ts CHANGED
@@ -239,8 +239,9 @@ declare const IconButton: React__default.ForwardRefExoticComponent<React__defaul
239
239
  } & React__default.RefAttributes<HTMLButtonElement>>;
240
240
 
241
241
  type TextInputStatus = "default" | "error";
242
- type TextInputSize = "sm" | "md" | "lg";
242
+ type TextInputSize = "sm" | "md" | "lg" | "xl";
243
243
  type TextInputRadius = "none" | "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "full";
244
+ type TextInputBorderWidth = "sm" | "md" | "lg";
244
245
  type TextInputLabelWeight = "normal" | "medium" | "semibold" | "bold";
245
246
  type TextInputProps = Omit<React__default.InputHTMLAttributes<HTMLInputElement>, "size"> & {
246
247
  /** Label text displayed above the input */
@@ -263,6 +264,23 @@ type TextInputProps = Omit<React__default.InputHTMLAttributes<HTMLInputElement>,
263
264
  helperText?: React__default.ReactNode;
264
265
  /** Custom class for the outermost wrapper */
265
266
  wrapperClassName?: string;
267
+ /**
268
+ * Custom border color for the input container. Accepts any valid
269
+ * CSS color value (hex, rgb, CSS variable, etc). When provided,
270
+ * overrides the border color from the current `status`. Useful
271
+ * for highlighting cells/rows in tables, marking fields with
272
+ * non-error states, or theming. Does NOT change focus/ring
273
+ * colors — those still come from `statusClasses`.
274
+ */
275
+ borderColor?: string;
276
+ /**
277
+ * Border width token for the input container.
278
+ *
279
+ * - `sm`: default 1px border.
280
+ * - `md`: default 2px border.
281
+ * - `lg`: default 3px border.
282
+ */
283
+ borderWidth?: TextInputBorderWidth;
266
284
  };
267
285
  declare const TextInput: React__default.ForwardRefExoticComponent<Omit<React__default.InputHTMLAttributes<HTMLInputElement>, "size"> & {
268
286
  /** Label text displayed above the input */
@@ -285,6 +303,23 @@ declare const TextInput: React__default.ForwardRefExoticComponent<Omit<React__de
285
303
  helperText?: React__default.ReactNode;
286
304
  /** Custom class for the outermost wrapper */
287
305
  wrapperClassName?: string;
306
+ /**
307
+ * Custom border color for the input container. Accepts any valid
308
+ * CSS color value (hex, rgb, CSS variable, etc). When provided,
309
+ * overrides the border color from the current `status`. Useful
310
+ * for highlighting cells/rows in tables, marking fields with
311
+ * non-error states, or theming. Does NOT change focus/ring
312
+ * colors — those still come from `statusClasses`.
313
+ */
314
+ borderColor?: string;
315
+ /**
316
+ * Border width token for the input container.
317
+ *
318
+ * - `sm`: default 1px border.
319
+ * - `md`: default 2px border.
320
+ * - `lg`: default 3px border.
321
+ */
322
+ borderWidth?: TextInputBorderWidth;
288
323
  } & React__default.RefAttributes<HTMLInputElement>>;
289
324
 
290
325
  type CheckboxSize = "sm" | "md" | "lg";
package/dist/index.js CHANGED
@@ -1064,7 +1064,8 @@ var statusClasses = {
1064
1064
  var sizeClasses3 = {
1065
1065
  sm: "rh-h-input-sm rh-text-sm rh-px-input-x-sm",
1066
1066
  md: "rh-h-input-md rh-text-sm rh-px-input-x-md",
1067
- lg: "rh-h-input-lg rh-text-base rh-px-input-x-lg"
1067
+ lg: "rh-h-input-lg rh-text-base rh-px-input-x-lg",
1068
+ xl: "rh-h-input-xl rh-text-sm rh-px-input-x-md"
1068
1069
  };
1069
1070
  var radiusClasses3 = {
1070
1071
  none: "rh-rounded-none",
@@ -1076,10 +1077,16 @@ var radiusClasses3 = {
1076
1077
  xl: "rh-rounded-xl",
1077
1078
  full: "rh-rounded-full"
1078
1079
  };
1080
+ var borderWidthClasses = {
1081
+ sm: "rh-border-sm",
1082
+ md: "rh-border-md",
1083
+ lg: "rh-border-lg"
1084
+ };
1079
1085
  var iconSizeClasses = {
1080
1086
  sm: "rh-w-4 rh-h-4",
1081
1087
  md: "rh-w-5 rh-h-5",
1082
- lg: "rh-w-5 rh-h-5"
1088
+ lg: "rh-w-5 rh-h-5",
1089
+ xl: "rh-w-5 rh-h-5"
1083
1090
  };
1084
1091
  var helperStatusClasses = {
1085
1092
  default: "rh-text-text-muted",
@@ -1105,6 +1112,8 @@ var TextInput = React9.forwardRef(function TextInput2({
1105
1112
  disabled,
1106
1113
  className = "",
1107
1114
  wrapperClassName = "",
1115
+ borderColor,
1116
+ borderWidth = "sm",
1108
1117
  id,
1109
1118
  ...rest
1110
1119
  }, ref) {
@@ -1125,9 +1134,11 @@ var TextInput = React9.forwardRef(function TextInput2({
1125
1134
  /* @__PURE__ */ jsxRuntime.jsxs(
1126
1135
  "div",
1127
1136
  {
1137
+ style: borderColor ? { borderColor } : void 0,
1128
1138
  className: [
1129
1139
  "rh-flex rh-items-center rh-gap-2",
1130
- "rh-border rh-bg-surface rh-font-body",
1140
+ "rh-bg-surface rh-font-body",
1141
+ borderWidthClasses[borderWidth],
1131
1142
  "rh-transition-colors rh-duration-150",
1132
1143
  "rh-overflow-hidden",
1133
1144
  statusClasses[visualStatus],
@@ -2311,6 +2322,7 @@ var addButtonSizeClasses = {
2311
2322
  md: "rh-w-5 rh-h-5",
2312
2323
  lg: "rh-w-5 rh-h-5"
2313
2324
  };
2325
+ var getSubtitleClassName3 = (subtitle) => subtitle.trim() === "*" ? "rh-text-danger" : "rh-text-text-muted";
2314
2326
  var TagInput = React9.forwardRef(function TagInput2({
2315
2327
  label,
2316
2328
  subtitle,
@@ -2367,7 +2379,7 @@ var TagInput = React9.forwardRef(function TagInput2({
2367
2379
  children: [
2368
2380
  label && /* @__PURE__ */ jsxRuntime.jsxs("label", { htmlFor: inputId, className: "rh-flex rh-items-baseline rh-gap-1", children: [
2369
2381
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "rh-text-sm rh-font-semibold rh-text-text", children: label }),
2370
- subtitle && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "rh-text-sm rh-text-text-muted", children: subtitle })
2382
+ subtitle && /* @__PURE__ */ jsxRuntime.jsx("span", { className: `rh-text-sm ${getSubtitleClassName3(subtitle)}`, children: subtitle })
2371
2383
  ] }),
2372
2384
  /* @__PURE__ */ jsxRuntime.jsxs(
2373
2385
  "div",