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