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