@rehagro/ui 1.0.40 → 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 */
@@ -578,14 +582,17 @@ type TagInputProps = {
578
582
  };
579
583
  declare const TagInput: React__default.ForwardRefExoticComponent<TagInputProps & React__default.RefAttributes<HTMLDivElement>>;
580
584
 
581
- type ProgressBarSize = "sm" | "lg";
585
+ type ProgressBarVariant = "inline" | "stacked";
586
+ type ProgressBarThickness = "xs" | "sm" | "md" | "lg" | "xl";
582
587
  type ProgressBarProps = {
583
588
  /** Progress value from 0 to 100 */
584
589
  value: number;
585
- /** Label text (only shown in lg size) */
590
+ /** Label text (only shown in stacked variant) */
586
591
  label?: string;
587
- /** Size variant */
588
- size?: ProgressBarSize;
592
+ /** Layout variant */
593
+ variant?: ProgressBarVariant;
594
+ /** Bar thickness — preset token or custom value in px */
595
+ thickness?: ProgressBarThickness | number;
589
596
  /** Whether to show percentage text */
590
597
  showPercentage?: boolean;
591
598
  /** Custom bar color */
@@ -894,4 +901,4 @@ declare function CaretLeftIcon({ className, ...props }: IconProps): react_jsx_ru
894
901
 
895
902
  declare function CaretRightIcon({ className, ...props }: IconProps): react_jsx_runtime.JSX.Element;
896
903
 
897
- export { Avatar, type AvatarProps, type AvatarSize, type AvatarVariant, Button, ButtonColor, type ButtonProps, type ButtonRadius, type ButtonSize, type ButtonVariant, Card, CardContent, type CardContentProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardPadding, type CardProps, type CardRadius, type CardVariant, CaretLeftIcon, CaretRightIcon, Checkbox, type CheckboxProps, type CheckboxSize, CloseIcon, Container, type ContainerProps, DeleteIcon, EditIcon, ErrorIcon, GridContainer, type GridContainerProps, GridItem, type GridItemProps, type GridSpan, IconButton, type IconButtonColor, type IconButtonProps, type IconButtonRadius, type IconButtonSize, type IconButtonVariant, type IconProps, InfoIcon, type MobileSpan, NeutralIcon, Pagination, type PaginationProps, PlusIcon, ProgressBar, type ProgressBarProps, type ProgressBarSize, Radio, RadioGroup, type RadioGroupProps, RadioOption, type RadioOptionProps, type RadioOrientation, type RadioProps, type RadioSize, RehagroProvider, type RehagroProviderProps, type RehagroTheme, SearchIcon, Select, type SelectMultipleProps, type SelectOption, type SelectProps, type SelectRadius, type SelectSingleProps, type SelectSize, type SelectStatus, type SortDirection, Spinner, type SpinnerProps, type SpinnerSize, SuccessIcon, Table, type TableColumn, type TableProps, type TableSize, type TableSort, type TableVariant, Tag, TagInput, type TagInputOption, type TagInputProps, type TagInputRadius, type TagInputSize, type TagInputStatus, type TagProps, type TagSize, TextInput, type TextInputProps, type TextInputRadius, type TextInputSize, type TextInputStatus, Toast, type ToastAppearance, ToastContainer, type ToastFn, type ToastItem, type ToastLink, type ToastOptions, type ToastPosition, type ToastProps, ToastProvider, type ToastProviderProps, type ToastVariant, ToggleGroup, type ToggleGroupOption, type ToggleGroupProps, type ToggleGroupRadius, type ToggleGroupSize, Tooltip, type TooltipPlacement, type TooltipProps, type TooltipSize, type TooltipVariant, Typography, type TypographyColor, type TypographyProps, type TypographyVariant, WarningIcon, useToast };
904
+ export { Avatar, type AvatarProps, type AvatarSize, type AvatarVariant, Button, ButtonColor, type ButtonProps, type ButtonRadius, type ButtonSize, type ButtonVariant, Card, CardContent, type CardContentProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardPadding, type CardProps, type CardRadius, type CardVariant, CaretLeftIcon, CaretRightIcon, Checkbox, type CheckboxProps, type CheckboxSize, CloseIcon, Container, type ContainerProps, DeleteIcon, EditIcon, ErrorIcon, GridContainer, type GridContainerProps, GridItem, type GridItemProps, type GridSpan, IconButton, type IconButtonColor, type IconButtonProps, type IconButtonRadius, type IconButtonSize, type IconButtonVariant, type IconProps, InfoIcon, type MobileSpan, NeutralIcon, Pagination, type PaginationProps, PlusIcon, ProgressBar, type ProgressBarProps, type ProgressBarThickness, type ProgressBarVariant, Radio, RadioGroup, type RadioGroupProps, RadioOption, type RadioOptionProps, type RadioOrientation, type RadioProps, type RadioSize, RehagroProvider, type RehagroProviderProps, type RehagroTheme, SearchIcon, Select, type SelectMultipleProps, type SelectOption, type SelectProps, type SelectRadius, type SelectSingleProps, type SelectSize, type SelectStatus, type SortDirection, Spinner, type SpinnerProps, type SpinnerSize, SuccessIcon, Table, type TableColumn, type TableProps, type TableSize, type TableSort, type TableVariant, Tag, TagInput, type TagInputOption, type TagInputProps, type TagInputRadius, type TagInputSize, type TagInputStatus, type TagProps, type TagSize, TextInput, type TextInputProps, type TextInputRadius, type TextInputSize, type TextInputStatus, Toast, type ToastAppearance, ToastContainer, type ToastFn, type ToastItem, type ToastLink, type ToastOptions, type ToastPosition, type ToastProps, ToastProvider, type ToastProviderProps, type ToastVariant, ToggleGroup, type ToggleGroupOption, type ToggleGroupProps, type ToggleGroupRadius, type ToggleGroupSize, Tooltip, type TooltipPlacement, type TooltipProps, type TooltipSize, type TooltipVariant, Typography, type TypographyColor, type TypographyProps, type TypographyVariant, WarningIcon, useToast };
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 */
@@ -578,14 +582,17 @@ type TagInputProps = {
578
582
  };
579
583
  declare const TagInput: React__default.ForwardRefExoticComponent<TagInputProps & React__default.RefAttributes<HTMLDivElement>>;
580
584
 
581
- type ProgressBarSize = "sm" | "lg";
585
+ type ProgressBarVariant = "inline" | "stacked";
586
+ type ProgressBarThickness = "xs" | "sm" | "md" | "lg" | "xl";
582
587
  type ProgressBarProps = {
583
588
  /** Progress value from 0 to 100 */
584
589
  value: number;
585
- /** Label text (only shown in lg size) */
590
+ /** Label text (only shown in stacked variant) */
586
591
  label?: string;
587
- /** Size variant */
588
- size?: ProgressBarSize;
592
+ /** Layout variant */
593
+ variant?: ProgressBarVariant;
594
+ /** Bar thickness — preset token or custom value in px */
595
+ thickness?: ProgressBarThickness | number;
589
596
  /** Whether to show percentage text */
590
597
  showPercentage?: boolean;
591
598
  /** Custom bar color */
@@ -894,4 +901,4 @@ declare function CaretLeftIcon({ className, ...props }: IconProps): react_jsx_ru
894
901
 
895
902
  declare function CaretRightIcon({ className, ...props }: IconProps): react_jsx_runtime.JSX.Element;
896
903
 
897
- export { Avatar, type AvatarProps, type AvatarSize, type AvatarVariant, Button, ButtonColor, type ButtonProps, type ButtonRadius, type ButtonSize, type ButtonVariant, Card, CardContent, type CardContentProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardPadding, type CardProps, type CardRadius, type CardVariant, CaretLeftIcon, CaretRightIcon, Checkbox, type CheckboxProps, type CheckboxSize, CloseIcon, Container, type ContainerProps, DeleteIcon, EditIcon, ErrorIcon, GridContainer, type GridContainerProps, GridItem, type GridItemProps, type GridSpan, IconButton, type IconButtonColor, type IconButtonProps, type IconButtonRadius, type IconButtonSize, type IconButtonVariant, type IconProps, InfoIcon, type MobileSpan, NeutralIcon, Pagination, type PaginationProps, PlusIcon, ProgressBar, type ProgressBarProps, type ProgressBarSize, Radio, RadioGroup, type RadioGroupProps, RadioOption, type RadioOptionProps, type RadioOrientation, type RadioProps, type RadioSize, RehagroProvider, type RehagroProviderProps, type RehagroTheme, SearchIcon, Select, type SelectMultipleProps, type SelectOption, type SelectProps, type SelectRadius, type SelectSingleProps, type SelectSize, type SelectStatus, type SortDirection, Spinner, type SpinnerProps, type SpinnerSize, SuccessIcon, Table, type TableColumn, type TableProps, type TableSize, type TableSort, type TableVariant, Tag, TagInput, type TagInputOption, type TagInputProps, type TagInputRadius, type TagInputSize, type TagInputStatus, type TagProps, type TagSize, TextInput, type TextInputProps, type TextInputRadius, type TextInputSize, type TextInputStatus, Toast, type ToastAppearance, ToastContainer, type ToastFn, type ToastItem, type ToastLink, type ToastOptions, type ToastPosition, type ToastProps, ToastProvider, type ToastProviderProps, type ToastVariant, ToggleGroup, type ToggleGroupOption, type ToggleGroupProps, type ToggleGroupRadius, type ToggleGroupSize, Tooltip, type TooltipPlacement, type TooltipProps, type TooltipSize, type TooltipVariant, Typography, type TypographyColor, type TypographyProps, type TypographyVariant, WarningIcon, useToast };
904
+ export { Avatar, type AvatarProps, type AvatarSize, type AvatarVariant, Button, ButtonColor, type ButtonProps, type ButtonRadius, type ButtonSize, type ButtonVariant, Card, CardContent, type CardContentProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardPadding, type CardProps, type CardRadius, type CardVariant, CaretLeftIcon, CaretRightIcon, Checkbox, type CheckboxProps, type CheckboxSize, CloseIcon, Container, type ContainerProps, DeleteIcon, EditIcon, ErrorIcon, GridContainer, type GridContainerProps, GridItem, type GridItemProps, type GridSpan, IconButton, type IconButtonColor, type IconButtonProps, type IconButtonRadius, type IconButtonSize, type IconButtonVariant, type IconProps, InfoIcon, type MobileSpan, NeutralIcon, Pagination, type PaginationProps, PlusIcon, ProgressBar, type ProgressBarProps, type ProgressBarThickness, type ProgressBarVariant, Radio, RadioGroup, type RadioGroupProps, RadioOption, type RadioOptionProps, type RadioOrientation, type RadioProps, type RadioSize, RehagroProvider, type RehagroProviderProps, type RehagroTheme, SearchIcon, Select, type SelectMultipleProps, type SelectOption, type SelectProps, type SelectRadius, type SelectSingleProps, type SelectSize, type SelectStatus, type SortDirection, Spinner, type SpinnerProps, type SpinnerSize, SuccessIcon, Table, type TableColumn, type TableProps, type TableSize, type TableSort, type TableVariant, Tag, TagInput, type TagInputOption, type TagInputProps, type TagInputRadius, type TagInputSize, type TagInputStatus, type TagProps, type TagSize, TextInput, type TextInputProps, type TextInputRadius, type TextInputSize, type TextInputStatus, Toast, type ToastAppearance, ToastContainer, type ToastFn, type ToastItem, type ToastLink, type ToastOptions, type ToastPosition, type ToastProps, ToastProvider, type ToastProviderProps, type ToastVariant, ToggleGroup, type ToggleGroupOption, type ToggleGroupProps, type ToggleGroupRadius, type ToggleGroupSize, Tooltip, type TooltipPlacement, type TooltipProps, type TooltipSize, type TooltipVariant, Typography, type TypographyColor, type TypographyProps, type TypographyVariant, WarningIcon, useToast };
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",
@@ -2546,9 +2551,30 @@ var TagInput = React9.forwardRef(function TagInput2({
2546
2551
  }
2547
2552
  );
2548
2553
  });
2549
- var ProgressBar = React9.forwardRef(function ProgressBar2({ value, label, size = "sm", showPercentage = true, barColor, bgColor, className = "" }, ref) {
2554
+ var THICKNESS_MAP = {
2555
+ xs: 2,
2556
+ sm: 4,
2557
+ md: 8,
2558
+ lg: 12,
2559
+ xl: 16
2560
+ };
2561
+ function resolveThickness(thickness) {
2562
+ if (typeof thickness === "number") return thickness;
2563
+ return THICKNESS_MAP[thickness];
2564
+ }
2565
+ var ProgressBar = React9.forwardRef(function ProgressBar2({
2566
+ value,
2567
+ label,
2568
+ variant = "inline",
2569
+ thickness = "sm",
2570
+ showPercentage = true,
2571
+ barColor,
2572
+ bgColor,
2573
+ className = ""
2574
+ }, ref) {
2550
2575
  const clampedValue = Math.min(100, Math.max(0, value));
2551
- if (size === "lg") {
2576
+ const heightPx = resolveThickness(thickness);
2577
+ if (variant === "stacked") {
2552
2578
  return /* @__PURE__ */ jsxRuntime.jsxs(
2553
2579
  "div",
2554
2580
  {
@@ -2565,8 +2591,8 @@ var ProgressBar = React9.forwardRef(function ProgressBar2({ value, label, size =
2565
2591
  /* @__PURE__ */ jsxRuntime.jsx(
2566
2592
  "div",
2567
2593
  {
2568
- className: "rh-w-full rh-h-1 rh-rounded-[40px] rh-overflow-hidden",
2569
- style: { backgroundColor: bgColor || "#E5E7EB" },
2594
+ className: "rh-w-full rh-rounded-[40px] rh-overflow-hidden",
2595
+ style: { backgroundColor: bgColor || "#E5E7EB", height: heightPx },
2570
2596
  children: /* @__PURE__ */ jsxRuntime.jsx(
2571
2597
  "div",
2572
2598
  {
@@ -2592,8 +2618,8 @@ var ProgressBar = React9.forwardRef(function ProgressBar2({ value, label, size =
2592
2618
  /* @__PURE__ */ jsxRuntime.jsx(
2593
2619
  "div",
2594
2620
  {
2595
- className: "rh-flex-1 rh-h-1 rh-rounded-[40px] rh-overflow-hidden",
2596
- style: { backgroundColor: bgColor || "#E5E7EB" },
2621
+ className: "rh-flex-1 rh-rounded-[40px] rh-overflow-hidden",
2622
+ style: { backgroundColor: bgColor || "#E5E7EB", height: heightPx },
2597
2623
  children: /* @__PURE__ */ jsxRuntime.jsx(
2598
2624
  "div",
2599
2625
  {