@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 +97 -109
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +97 -109
- package/dist/index.mjs.map +1 -1
- package/dist/native.js.map +1 -1
- package/dist/native.mjs.map +1 -1
- package/dist/styles.css +3 -3
- package/package.json +1 -1
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
|
|
907
|
-
error: "rh-border-danger focus-within:rh-ring-2 focus-within:rh-ring-danger
|
|
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
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
]
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
"
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
"
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
"
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
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",
|