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