@rehagro/ui 1.0.41 → 1.0.43
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 +23 -1
- package/dist/index.d.ts +23 -1
- package/dist/index.js +18 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +18 -8
- package/dist/index.mjs.map +1 -1
- package/dist/native.d.mts +15 -1
- package/dist/native.d.ts +15 -1
- package/dist/native.js +25 -6
- package/dist/native.js.map +1 -1
- package/dist/native.mjs +25 -6
- package/dist/native.mjs.map +1 -1
- package/dist/styles.css +3 -3
- package/package.json +1 -1
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 */
|
|
@@ -235,7 +239,7 @@ declare const IconButton: React__default.ForwardRefExoticComponent<React__defaul
|
|
|
235
239
|
} & React__default.RefAttributes<HTMLButtonElement>>;
|
|
236
240
|
|
|
237
241
|
type TextInputStatus = "default" | "error";
|
|
238
|
-
type TextInputSize = "sm" | "md" | "lg";
|
|
242
|
+
type TextInputSize = "sm" | "md" | "lg" | "xl";
|
|
239
243
|
type TextInputRadius = "none" | "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "full";
|
|
240
244
|
type TextInputLabelWeight = "normal" | "medium" | "semibold" | "bold";
|
|
241
245
|
type TextInputProps = Omit<React__default.InputHTMLAttributes<HTMLInputElement>, "size"> & {
|
|
@@ -259,6 +263,15 @@ type TextInputProps = Omit<React__default.InputHTMLAttributes<HTMLInputElement>,
|
|
|
259
263
|
helperText?: React__default.ReactNode;
|
|
260
264
|
/** Custom class for the outermost wrapper */
|
|
261
265
|
wrapperClassName?: string;
|
|
266
|
+
/**
|
|
267
|
+
* Custom border color for the input container. Accepts any valid
|
|
268
|
+
* CSS color value (hex, rgb, CSS variable, etc). When provided,
|
|
269
|
+
* overrides the border color from the current `status`. Useful
|
|
270
|
+
* for highlighting cells/rows in tables, marking fields with
|
|
271
|
+
* non-error states, or theming. Does NOT change focus/ring
|
|
272
|
+
* colors — those still come from `statusClasses`.
|
|
273
|
+
*/
|
|
274
|
+
borderColor?: string;
|
|
262
275
|
};
|
|
263
276
|
declare const TextInput: React__default.ForwardRefExoticComponent<Omit<React__default.InputHTMLAttributes<HTMLInputElement>, "size"> & {
|
|
264
277
|
/** Label text displayed above the input */
|
|
@@ -281,6 +294,15 @@ declare const TextInput: React__default.ForwardRefExoticComponent<Omit<React__de
|
|
|
281
294
|
helperText?: React__default.ReactNode;
|
|
282
295
|
/** Custom class for the outermost wrapper */
|
|
283
296
|
wrapperClassName?: string;
|
|
297
|
+
/**
|
|
298
|
+
* Custom border color for the input container. Accepts any valid
|
|
299
|
+
* CSS color value (hex, rgb, CSS variable, etc). When provided,
|
|
300
|
+
* overrides the border color from the current `status`. Useful
|
|
301
|
+
* for highlighting cells/rows in tables, marking fields with
|
|
302
|
+
* non-error states, or theming. Does NOT change focus/ring
|
|
303
|
+
* colors — those still come from `statusClasses`.
|
|
304
|
+
*/
|
|
305
|
+
borderColor?: string;
|
|
284
306
|
} & React__default.RefAttributes<HTMLInputElement>>;
|
|
285
307
|
|
|
286
308
|
type CheckboxSize = "sm" | "md" | "lg";
|
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 */
|
|
@@ -235,7 +239,7 @@ declare const IconButton: React__default.ForwardRefExoticComponent<React__defaul
|
|
|
235
239
|
} & React__default.RefAttributes<HTMLButtonElement>>;
|
|
236
240
|
|
|
237
241
|
type TextInputStatus = "default" | "error";
|
|
238
|
-
type TextInputSize = "sm" | "md" | "lg";
|
|
242
|
+
type TextInputSize = "sm" | "md" | "lg" | "xl";
|
|
239
243
|
type TextInputRadius = "none" | "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "full";
|
|
240
244
|
type TextInputLabelWeight = "normal" | "medium" | "semibold" | "bold";
|
|
241
245
|
type TextInputProps = Omit<React__default.InputHTMLAttributes<HTMLInputElement>, "size"> & {
|
|
@@ -259,6 +263,15 @@ type TextInputProps = Omit<React__default.InputHTMLAttributes<HTMLInputElement>,
|
|
|
259
263
|
helperText?: React__default.ReactNode;
|
|
260
264
|
/** Custom class for the outermost wrapper */
|
|
261
265
|
wrapperClassName?: string;
|
|
266
|
+
/**
|
|
267
|
+
* Custom border color for the input container. Accepts any valid
|
|
268
|
+
* CSS color value (hex, rgb, CSS variable, etc). When provided,
|
|
269
|
+
* overrides the border color from the current `status`. Useful
|
|
270
|
+
* for highlighting cells/rows in tables, marking fields with
|
|
271
|
+
* non-error states, or theming. Does NOT change focus/ring
|
|
272
|
+
* colors — those still come from `statusClasses`.
|
|
273
|
+
*/
|
|
274
|
+
borderColor?: string;
|
|
262
275
|
};
|
|
263
276
|
declare const TextInput: React__default.ForwardRefExoticComponent<Omit<React__default.InputHTMLAttributes<HTMLInputElement>, "size"> & {
|
|
264
277
|
/** Label text displayed above the input */
|
|
@@ -281,6 +294,15 @@ declare const TextInput: React__default.ForwardRefExoticComponent<Omit<React__de
|
|
|
281
294
|
helperText?: React__default.ReactNode;
|
|
282
295
|
/** Custom class for the outermost wrapper */
|
|
283
296
|
wrapperClassName?: string;
|
|
297
|
+
/**
|
|
298
|
+
* Custom border color for the input container. Accepts any valid
|
|
299
|
+
* CSS color value (hex, rgb, CSS variable, etc). When provided,
|
|
300
|
+
* overrides the border color from the current `status`. Useful
|
|
301
|
+
* for highlighting cells/rows in tables, marking fields with
|
|
302
|
+
* non-error states, or theming. Does NOT change focus/ring
|
|
303
|
+
* colors — those still come from `statusClasses`.
|
|
304
|
+
*/
|
|
305
|
+
borderColor?: string;
|
|
284
306
|
} & React__default.RefAttributes<HTMLInputElement>>;
|
|
285
307
|
|
|
286
308
|
type CheckboxSize = "sm" | "md" | "lg";
|
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
|
-
|
|
863
|
-
|
|
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",
|
|
@@ -1062,7 +1064,8 @@ var statusClasses = {
|
|
|
1062
1064
|
var sizeClasses3 = {
|
|
1063
1065
|
sm: "rh-h-input-sm rh-text-sm rh-px-input-x-sm",
|
|
1064
1066
|
md: "rh-h-input-md rh-text-sm rh-px-input-x-md",
|
|
1065
|
-
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"
|
|
1066
1069
|
};
|
|
1067
1070
|
var radiusClasses3 = {
|
|
1068
1071
|
none: "rh-rounded-none",
|
|
@@ -1077,7 +1080,8 @@ var radiusClasses3 = {
|
|
|
1077
1080
|
var iconSizeClasses = {
|
|
1078
1081
|
sm: "rh-w-4 rh-h-4",
|
|
1079
1082
|
md: "rh-w-5 rh-h-5",
|
|
1080
|
-
lg: "rh-w-5 rh-h-5"
|
|
1083
|
+
lg: "rh-w-5 rh-h-5",
|
|
1084
|
+
xl: "rh-w-5 rh-h-5"
|
|
1081
1085
|
};
|
|
1082
1086
|
var helperStatusClasses = {
|
|
1083
1087
|
default: "rh-text-text-muted",
|
|
@@ -1089,6 +1093,7 @@ var labelWeightClasses = {
|
|
|
1089
1093
|
semibold: "rh-font-semibold",
|
|
1090
1094
|
bold: "rh-font-bold"
|
|
1091
1095
|
};
|
|
1096
|
+
var getSubtitleClassName = (subtitle) => subtitle.trim() === "*" ? "rh-text-danger" : "rh-text-text-muted";
|
|
1092
1097
|
var TextInput = React9.forwardRef(function TextInput2({
|
|
1093
1098
|
label,
|
|
1094
1099
|
labelWeight = "medium",
|
|
@@ -1102,10 +1107,12 @@ var TextInput = React9.forwardRef(function TextInput2({
|
|
|
1102
1107
|
disabled,
|
|
1103
1108
|
className = "",
|
|
1104
1109
|
wrapperClassName = "",
|
|
1110
|
+
borderColor,
|
|
1105
1111
|
id,
|
|
1106
1112
|
...rest
|
|
1107
1113
|
}, ref) {
|
|
1108
|
-
const
|
|
1114
|
+
const generatedId = React9__default.default.useId();
|
|
1115
|
+
const inputId = id || generatedId;
|
|
1109
1116
|
const [isHelperDismissed, setIsHelperDismissed] = React9__default.default.useState(false);
|
|
1110
1117
|
const { onChange, ...inputProps } = rest;
|
|
1111
1118
|
const visualStatus = helperText && isHelperDismissed ? "default" : status;
|
|
@@ -1116,11 +1123,12 @@ var TextInput = React9.forwardRef(function TextInput2({
|
|
|
1116
1123
|
children: [
|
|
1117
1124
|
label && /* @__PURE__ */ jsxRuntime.jsxs("label", { htmlFor: inputId, className: "rh-flex rh-items-baseline rh-gap-1", children: [
|
|
1118
1125
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: `rh-text-sm ${labelWeightClasses[labelWeight]} rh-text-text`, children: label }),
|
|
1119
|
-
subtitle && /* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
1126
|
+
subtitle && /* @__PURE__ */ jsxRuntime.jsx("span", { className: `rh-text-sm ${getSubtitleClassName(subtitle)}`, children: subtitle })
|
|
1120
1127
|
] }),
|
|
1121
1128
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1122
1129
|
"div",
|
|
1123
1130
|
{
|
|
1131
|
+
style: borderColor ? { borderColor } : void 0,
|
|
1124
1132
|
className: [
|
|
1125
1133
|
"rh-flex rh-items-center rh-gap-2",
|
|
1126
1134
|
"rh-border rh-bg-surface rh-font-body",
|
|
@@ -1514,6 +1522,7 @@ var optionSizeClasses = {
|
|
|
1514
1522
|
md: "rh-px-input-x-md rh-py-2 rh-text-sm",
|
|
1515
1523
|
lg: "rh-px-input-x-lg rh-py-2.5 rh-text-base"
|
|
1516
1524
|
};
|
|
1525
|
+
var getSubtitleClassName2 = (subtitle) => subtitle.trim() === "*" ? "rh-text-danger" : "rh-text-text-muted";
|
|
1517
1526
|
var ChevronIcon = ({ className }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1518
1527
|
"svg",
|
|
1519
1528
|
{
|
|
@@ -1725,7 +1734,7 @@ var Select = React9.forwardRef(function Select2(props, ref) {
|
|
|
1725
1734
|
children: [
|
|
1726
1735
|
label && /* @__PURE__ */ jsxRuntime.jsxs("label", { id: `${triggerId}-label`, className: "rh-flex rh-items-baseline rh-gap-1", children: [
|
|
1727
1736
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "rh-text-sm rh-font-medium rh-text-text", children: label }),
|
|
1728
|
-
subtitle && /* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
1737
|
+
subtitle && /* @__PURE__ */ jsxRuntime.jsx("span", { className: `rh-text-sm ${getSubtitleClassName2(subtitle)}`, children: subtitle })
|
|
1729
1738
|
] }),
|
|
1730
1739
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1731
1740
|
"button",
|
|
@@ -2306,6 +2315,7 @@ var addButtonSizeClasses = {
|
|
|
2306
2315
|
md: "rh-w-5 rh-h-5",
|
|
2307
2316
|
lg: "rh-w-5 rh-h-5"
|
|
2308
2317
|
};
|
|
2318
|
+
var getSubtitleClassName3 = (subtitle) => subtitle.trim() === "*" ? "rh-text-danger" : "rh-text-text-muted";
|
|
2309
2319
|
var TagInput = React9.forwardRef(function TagInput2({
|
|
2310
2320
|
label,
|
|
2311
2321
|
subtitle,
|
|
@@ -2362,7 +2372,7 @@ var TagInput = React9.forwardRef(function TagInput2({
|
|
|
2362
2372
|
children: [
|
|
2363
2373
|
label && /* @__PURE__ */ jsxRuntime.jsxs("label", { htmlFor: inputId, className: "rh-flex rh-items-baseline rh-gap-1", children: [
|
|
2364
2374
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "rh-text-sm rh-font-semibold rh-text-text", children: label }),
|
|
2365
|
-
subtitle && /* @__PURE__ */ jsxRuntime.jsx("span", { className:
|
|
2375
|
+
subtitle && /* @__PURE__ */ jsxRuntime.jsx("span", { className: `rh-text-sm ${getSubtitleClassName3(subtitle)}`, children: subtitle })
|
|
2366
2376
|
] }),
|
|
2367
2377
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2368
2378
|
"div",
|