@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.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
|
|
913
|
-
error: "rh-border-danger focus-within:rh-ring-2 focus-within:rh-ring-danger
|
|
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
|
-
|
|
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
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
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",
|