@rehagro/ui 1.0.6 → 1.0.7

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.js CHANGED
@@ -909,8 +909,8 @@ var IconButton = React8.forwardRef(function IconButton2({
909
909
  );
910
910
  });
911
911
  var statusClasses = {
912
- default: "rh-border-border focus-within:rh-ring-2 focus-within:rh-ring-ring focus-within:rh-ring-offset-2",
913
- error: "rh-border-danger focus-within:rh-ring-2 focus-within:rh-ring-danger focus-within:rh-ring-offset-2"
912
+ default: "rh-border-border focus-within:rh-ring-2 focus-within:rh-ring-ring",
913
+ error: "rh-border-danger focus-within:rh-ring-2 focus-within:rh-ring-danger"
914
914
  };
915
915
  var sizeClasses3 = {
916
916
  sm: "rh-h-input-sm rh-text-sm rh-px-input-x-sm",
@@ -936,113 +936,101 @@ var helperStatusClasses = {
936
936
  default: "rh-text-text-muted",
937
937
  error: "rh-text-danger"
938
938
  };
939
- var TextInput = React8.forwardRef(
940
- function TextInput2({
941
- label,
942
- subtitle,
943
- status = "default",
944
- size = "md",
945
- radius = "xs",
946
- leftIcon,
947
- rightIcon,
948
- helperText,
949
- disabled,
950
- className = "",
951
- wrapperClassName = "",
952
- id,
953
- ...rest
954
- }, ref) {
955
- const inputId = id || React8__default.default.useId();
956
- return /* @__PURE__ */ jsxRuntime.jsxs(
957
- "div",
958
- {
959
- className: [
960
- "rh-flex rh-flex-col rh-gap-1 rh-font-sans",
961
- wrapperClassName
962
- ].filter(Boolean).join(" "),
963
- children: [
964
- label && /* @__PURE__ */ jsxRuntime.jsxs(
965
- "label",
966
- {
967
- htmlFor: inputId,
968
- className: "rh-flex rh-items-baseline rh-gap-1",
969
- children: [
970
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "rh-text-sm rh-font-medium rh-text-text", children: label }),
971
- subtitle && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "rh-text-sm rh-text-text-muted", children: subtitle })
972
- ]
973
- }
974
- ),
975
- /* @__PURE__ */ jsxRuntime.jsxs(
976
- "div",
977
- {
978
- className: [
979
- "rh-flex rh-items-center rh-gap-2",
980
- "rh-border rh-bg-surface rh-font-sans",
981
- "rh-transition-colors rh-duration-150",
982
- statusClasses[status],
983
- radiusClasses3[radius],
984
- sizeClasses3[size],
985
- disabled ? "rh-opacity-50 rh-cursor-not-allowed rh-bg-background" : "",
986
- className
987
- ].filter(Boolean).join(" "),
988
- children: [
989
- leftIcon && /* @__PURE__ */ jsxRuntime.jsx(
990
- "span",
991
- {
992
- className: [
993
- "rh-inline-flex rh-shrink-0 rh-text-text-muted",
994
- iconSizeClasses[size]
995
- ].join(" "),
996
- "aria-hidden": "true",
997
- children: leftIcon
998
- }
999
- ),
1000
- /* @__PURE__ */ jsxRuntime.jsx(
1001
- "input",
1002
- {
1003
- ref,
1004
- id: inputId,
1005
- disabled,
1006
- "aria-invalid": status === "error" || void 0,
1007
- "aria-describedby": helperText ? `${inputId}-helper` : void 0,
1008
- className: [
1009
- "rh-flex-1 rh-bg-transparent rh-outline-none",
1010
- "rh-text-text placeholder:rh-text-text-muted",
1011
- disabled ? "rh-cursor-not-allowed" : ""
1012
- ].filter(Boolean).join(" "),
1013
- ...rest
1014
- }
1015
- ),
1016
- rightIcon && /* @__PURE__ */ jsxRuntime.jsx(
1017
- "span",
1018
- {
1019
- className: [
1020
- "rh-inline-flex rh-shrink-0 rh-text-text-muted",
1021
- iconSizeClasses[size]
1022
- ].join(" "),
1023
- "aria-hidden": "true",
1024
- children: rightIcon
1025
- }
1026
- )
1027
- ]
1028
- }
1029
- ),
1030
- helperText && /* @__PURE__ */ jsxRuntime.jsx(
1031
- "span",
1032
- {
1033
- id: `${inputId}-helper`,
1034
- className: [
1035
- "rh-flex rh-items-center rh-gap-1 rh-text-xs",
1036
- helperStatusClasses[status]
1037
- ].join(" "),
1038
- children: helperText
1039
- }
1040
- )
1041
- ]
1042
- }
1043
- );
1044
- }
1045
- );
939
+ var TextInput = React8.forwardRef(function TextInput2({
940
+ label,
941
+ subtitle,
942
+ status = "default",
943
+ size = "md",
944
+ radius = "xs",
945
+ leftIcon,
946
+ rightIcon,
947
+ helperText,
948
+ disabled,
949
+ className = "",
950
+ wrapperClassName = "",
951
+ id,
952
+ ...rest
953
+ }, ref) {
954
+ const inputId = id || React8__default.default.useId();
955
+ return /* @__PURE__ */ jsxRuntime.jsxs(
956
+ "div",
957
+ {
958
+ className: ["rh-flex rh-flex-col rh-gap-[0.5rem] rh-font-sans", wrapperClassName].filter(Boolean).join(" "),
959
+ children: [
960
+ label && /* @__PURE__ */ jsxRuntime.jsxs("label", { htmlFor: inputId, className: "rh-flex rh-items-baseline rh-gap-1", children: [
961
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "rh-text-sm rh-font-medium rh-text-text", children: label }),
962
+ subtitle && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "rh-text-sm rh-text-text-muted", children: subtitle })
963
+ ] }),
964
+ /* @__PURE__ */ jsxRuntime.jsxs(
965
+ "div",
966
+ {
967
+ className: [
968
+ "rh-flex rh-items-center rh-gap-2",
969
+ "rh-border rh-bg-surface rh-font-sans",
970
+ "rh-transition-colors rh-duration-150",
971
+ statusClasses[status],
972
+ radiusClasses3[radius],
973
+ sizeClasses3[size],
974
+ disabled ? "rh-opacity-50 rh-cursor-not-allowed rh-bg-background" : "",
975
+ className
976
+ ].filter(Boolean).join(" "),
977
+ children: [
978
+ leftIcon && /* @__PURE__ */ jsxRuntime.jsx(
979
+ "span",
980
+ {
981
+ className: [
982
+ "rh-inline-flex rh-shrink-0 rh-text-text-muted",
983
+ iconSizeClasses[size]
984
+ ].join(" "),
985
+ "aria-hidden": "true",
986
+ children: leftIcon
987
+ }
988
+ ),
989
+ /* @__PURE__ */ jsxRuntime.jsx(
990
+ "input",
991
+ {
992
+ ref,
993
+ id: inputId,
994
+ disabled,
995
+ "aria-invalid": status === "error" || void 0,
996
+ "aria-describedby": helperText ? `${inputId}-helper` : void 0,
997
+ className: [
998
+ "rh-flex-1 rh-bg-transparent rh-outline-none",
999
+ "rh-text-text placeholder:rh-text-text-muted",
1000
+ disabled ? "rh-cursor-not-allowed" : ""
1001
+ ].filter(Boolean).join(" "),
1002
+ ...rest
1003
+ }
1004
+ ),
1005
+ rightIcon && /* @__PURE__ */ jsxRuntime.jsx(
1006
+ "span",
1007
+ {
1008
+ className: [
1009
+ "rh-inline-flex rh-shrink-0 rh-text-text-muted",
1010
+ iconSizeClasses[size]
1011
+ ].join(" "),
1012
+ "aria-hidden": "true",
1013
+ children: rightIcon
1014
+ }
1015
+ )
1016
+ ]
1017
+ }
1018
+ ),
1019
+ helperText && /* @__PURE__ */ jsxRuntime.jsx(
1020
+ "span",
1021
+ {
1022
+ id: `${inputId}-helper`,
1023
+ className: [
1024
+ "rh-flex rh-items-center rh-gap-1 rh-text-xs",
1025
+ helperStatusClasses[status]
1026
+ ].join(" "),
1027
+ children: helperText
1028
+ }
1029
+ )
1030
+ ]
1031
+ }
1032
+ );
1033
+ });
1046
1034
  var sizeClasses4 = {
1047
1035
  sm: "rh-h-4 rh-w-4",
1048
1036
  md: "rh-h-5 rh-w-5",