@rehagro/ui 1.0.44 → 1.0.46
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.d.mts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +21 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +21 -9
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -248,6 +248,8 @@ type TextInputProps = Omit<React__default.InputHTMLAttributes<HTMLInputElement>,
|
|
|
248
248
|
label?: string;
|
|
249
249
|
/** Label font weight */
|
|
250
250
|
labelWeight?: TextInputLabelWeight;
|
|
251
|
+
/** Label text color. Defaults to the Rehsult input label color. */
|
|
252
|
+
labelColor?: string;
|
|
251
253
|
/** Subtitle displayed next to the label */
|
|
252
254
|
subtitle?: string;
|
|
253
255
|
/** Validation status */
|
|
@@ -287,6 +289,8 @@ declare const TextInput: React__default.ForwardRefExoticComponent<Omit<React__de
|
|
|
287
289
|
label?: string;
|
|
288
290
|
/** Label font weight */
|
|
289
291
|
labelWeight?: TextInputLabelWeight;
|
|
292
|
+
/** Label text color. Defaults to the Rehsult input label color. */
|
|
293
|
+
labelColor?: string;
|
|
290
294
|
/** Subtitle displayed next to the label */
|
|
291
295
|
subtitle?: string;
|
|
292
296
|
/** Validation status */
|
package/dist/index.d.ts
CHANGED
|
@@ -248,6 +248,8 @@ type TextInputProps = Omit<React__default.InputHTMLAttributes<HTMLInputElement>,
|
|
|
248
248
|
label?: string;
|
|
249
249
|
/** Label font weight */
|
|
250
250
|
labelWeight?: TextInputLabelWeight;
|
|
251
|
+
/** Label text color. Defaults to the Rehsult input label color. */
|
|
252
|
+
labelColor?: string;
|
|
251
253
|
/** Subtitle displayed next to the label */
|
|
252
254
|
subtitle?: string;
|
|
253
255
|
/** Validation status */
|
|
@@ -287,6 +289,8 @@ declare const TextInput: React__default.ForwardRefExoticComponent<Omit<React__de
|
|
|
287
289
|
label?: string;
|
|
288
290
|
/** Label font weight */
|
|
289
291
|
labelWeight?: TextInputLabelWeight;
|
|
292
|
+
/** Label text color. Defaults to the Rehsult input label color. */
|
|
293
|
+
labelColor?: string;
|
|
290
294
|
/** Subtitle displayed next to the label */
|
|
291
295
|
subtitle?: string;
|
|
292
296
|
/** Validation status */
|
package/dist/index.js
CHANGED
|
@@ -978,12 +978,15 @@ var sizeClasses2 = {
|
|
|
978
978
|
};
|
|
979
979
|
var radiusClasses2 = {
|
|
980
980
|
none: "rh-rounded-none",
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
981
|
+
// IconButton is a square control, so it uses the same compact radius
|
|
982
|
+
// scale as the native implementation. The global web radius tokens are
|
|
983
|
+
// larger (md = 16px), which makes a 32px icon button look circular.
|
|
984
|
+
xxs: "rh-rounded-[2px]",
|
|
985
|
+
xs: "rh-rounded-[4px]",
|
|
986
|
+
sm: "rh-rounded-[8px]",
|
|
987
|
+
md: "rh-rounded-[12px]",
|
|
988
|
+
lg: "rh-rounded-[16px]",
|
|
989
|
+
xl: "rh-rounded-[24px]",
|
|
987
990
|
full: "rh-rounded-full"
|
|
988
991
|
};
|
|
989
992
|
var IconButton = React9.forwardRef(function IconButton2({
|
|
@@ -1102,6 +1105,7 @@ var getSubtitleClassName = (subtitle) => subtitle.trim() === "*" ? "rh-text-dang
|
|
|
1102
1105
|
var TextInput = React9.forwardRef(function TextInput2({
|
|
1103
1106
|
label,
|
|
1104
1107
|
labelWeight = "medium",
|
|
1108
|
+
labelColor = "#080B12",
|
|
1105
1109
|
subtitle,
|
|
1106
1110
|
status = "default",
|
|
1107
1111
|
size = "md",
|
|
@@ -1128,7 +1132,14 @@ var TextInput = React9.forwardRef(function TextInput2({
|
|
|
1128
1132
|
className: ["rh-flex rh-flex-col rh-gap-[0.5rem] rh-font-body", wrapperClassName].filter(Boolean).join(" "),
|
|
1129
1133
|
children: [
|
|
1130
1134
|
label && /* @__PURE__ */ jsxRuntime.jsxs("label", { htmlFor: inputId, className: "rh-flex rh-items-baseline rh-gap-1", children: [
|
|
1131
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1135
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1136
|
+
"span",
|
|
1137
|
+
{
|
|
1138
|
+
className: `rh-text-sm ${labelWeightClasses[labelWeight]}`,
|
|
1139
|
+
style: { color: labelColor },
|
|
1140
|
+
children: label
|
|
1141
|
+
}
|
|
1142
|
+
),
|
|
1132
1143
|
subtitle && /* @__PURE__ */ jsxRuntime.jsx("span", { className: `rh-text-sm ${getSubtitleClassName(subtitle)}`, children: subtitle })
|
|
1133
1144
|
] }),
|
|
1134
1145
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -1183,8 +1194,9 @@ var TextInput = React9.forwardRef(function TextInput2({
|
|
|
1183
1194
|
"span",
|
|
1184
1195
|
{
|
|
1185
1196
|
className: [
|
|
1186
|
-
"rh-inline-flex rh-shrink-0 rh-text-text-muted",
|
|
1187
|
-
iconSizeClasses[size]
|
|
1197
|
+
"rh-inline-flex rh-shrink-0 rh-items-center rh-justify-center rh-whitespace-nowrap rh-text-text-muted",
|
|
1198
|
+
iconSizeClasses[size],
|
|
1199
|
+
"rh-w-auto rh-min-w-fit"
|
|
1188
1200
|
].join(" "),
|
|
1189
1201
|
"aria-hidden": "true",
|
|
1190
1202
|
children: rightIcon
|