@rehagro/ui 1.0.10 → 1.0.12
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 +7 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +74 -91
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +74 -91
- package/dist/index.mjs.map +1 -1
- package/dist/native.d.mts +7 -1
- package/dist/native.d.ts +7 -1
- package/dist/native.js +9 -3
- package/dist/native.js.map +1 -1
- package/dist/native.mjs +9 -3
- package/dist/native.mjs.map +1 -1
- package/dist/styles.css +3 -3
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -116,6 +116,9 @@ type RehagroTheme = {
|
|
|
116
116
|
inputPxSm?: string;
|
|
117
117
|
inputPxMd?: string;
|
|
118
118
|
inputPxLg?: string;
|
|
119
|
+
/** Typography — Inter for body/labels, Sora for headings/display */
|
|
120
|
+
fontFamilyBody?: string;
|
|
121
|
+
fontFamilyDisplay?: string;
|
|
119
122
|
};
|
|
120
123
|
type RehagroProviderProps = {
|
|
121
124
|
/** Theme overrides — any token not provided keeps the default value */
|
|
@@ -265,6 +268,8 @@ type CheckboxProps = Omit<React$1.InputHTMLAttributes<HTMLInputElement>, "type"
|
|
|
265
268
|
label?: string;
|
|
266
269
|
/** Indeterminate state (partially checked) */
|
|
267
270
|
indeterminate?: boolean;
|
|
271
|
+
checked?: boolean;
|
|
272
|
+
defaultChecked?: boolean;
|
|
268
273
|
};
|
|
269
274
|
declare const Checkbox: React$1.ForwardRefExoticComponent<Omit<React$1.InputHTMLAttributes<HTMLInputElement>, "type" | "size"> & {
|
|
270
275
|
/** Checkbox size */
|
|
@@ -273,6 +278,8 @@ declare const Checkbox: React$1.ForwardRefExoticComponent<Omit<React$1.InputHTML
|
|
|
273
278
|
label?: string;
|
|
274
279
|
/** Indeterminate state (partially checked) */
|
|
275
280
|
indeterminate?: boolean;
|
|
281
|
+
checked?: boolean;
|
|
282
|
+
defaultChecked?: boolean;
|
|
276
283
|
} & React$1.RefAttributes<HTMLInputElement>>;
|
|
277
284
|
|
|
278
285
|
type SelectSize = "sm" | "md" | "lg";
|
package/dist/index.d.ts
CHANGED
|
@@ -116,6 +116,9 @@ type RehagroTheme = {
|
|
|
116
116
|
inputPxSm?: string;
|
|
117
117
|
inputPxMd?: string;
|
|
118
118
|
inputPxLg?: string;
|
|
119
|
+
/** Typography — Inter for body/labels, Sora for headings/display */
|
|
120
|
+
fontFamilyBody?: string;
|
|
121
|
+
fontFamilyDisplay?: string;
|
|
119
122
|
};
|
|
120
123
|
type RehagroProviderProps = {
|
|
121
124
|
/** Theme overrides — any token not provided keeps the default value */
|
|
@@ -265,6 +268,8 @@ type CheckboxProps = Omit<React$1.InputHTMLAttributes<HTMLInputElement>, "type"
|
|
|
265
268
|
label?: string;
|
|
266
269
|
/** Indeterminate state (partially checked) */
|
|
267
270
|
indeterminate?: boolean;
|
|
271
|
+
checked?: boolean;
|
|
272
|
+
defaultChecked?: boolean;
|
|
268
273
|
};
|
|
269
274
|
declare const Checkbox: React$1.ForwardRefExoticComponent<Omit<React$1.InputHTMLAttributes<HTMLInputElement>, "type" | "size"> & {
|
|
270
275
|
/** Checkbox size */
|
|
@@ -273,6 +278,8 @@ declare const Checkbox: React$1.ForwardRefExoticComponent<Omit<React$1.InputHTML
|
|
|
273
278
|
label?: string;
|
|
274
279
|
/** Indeterminate state (partially checked) */
|
|
275
280
|
indeterminate?: boolean;
|
|
281
|
+
checked?: boolean;
|
|
282
|
+
defaultChecked?: boolean;
|
|
276
283
|
} & React$1.RefAttributes<HTMLInputElement>>;
|
|
277
284
|
|
|
278
285
|
type SelectSize = "sm" | "md" | "lg";
|
package/dist/index.js
CHANGED
|
@@ -44,7 +44,9 @@ var TOKEN_MAP = {
|
|
|
44
44
|
inputHeightLg: { var: "--rh-input-height-lg", isColor: false },
|
|
45
45
|
inputPxSm: { var: "--rh-input-px-sm", isColor: false },
|
|
46
46
|
inputPxMd: { var: "--rh-input-px-md", isColor: false },
|
|
47
|
-
inputPxLg: { var: "--rh-input-px-lg", isColor: false }
|
|
47
|
+
inputPxLg: { var: "--rh-input-px-lg", isColor: false },
|
|
48
|
+
fontFamilyBody: { var: "--rh-font-family", isColor: false },
|
|
49
|
+
fontFamilyDisplay: { var: "--rh-font-family-display", isColor: false }
|
|
48
50
|
};
|
|
49
51
|
var DeleteIcon = (props) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
50
52
|
"svg",
|
|
@@ -735,7 +737,7 @@ var Button = React8.forwardRef(function Button2({
|
|
|
735
737
|
style: computedStyle,
|
|
736
738
|
className: [
|
|
737
739
|
"rh-inline-flex rh-items-center rh-justify-center rh-gap-2",
|
|
738
|
-
"rh-border rh-font-
|
|
740
|
+
"rh-border rh-font-display rh-font-medium",
|
|
739
741
|
"rh-transition-colors rh-duration-150",
|
|
740
742
|
"focus-visible:rh-outline-none focus-visible:rh-ring-2 focus-visible:rh-ring-ring focus-visible:rh-ring-offset-2",
|
|
741
743
|
preset && !hasCustomHover ? variantColorClasses[variant][color] : "",
|
|
@@ -868,7 +870,7 @@ var IconButton = React8.forwardRef(function IconButton2({
|
|
|
868
870
|
style: computedStyle,
|
|
869
871
|
className: [
|
|
870
872
|
"rh-inline-flex rh-items-center rh-justify-center",
|
|
871
|
-
"rh-border rh-font-
|
|
873
|
+
"rh-border rh-font-display",
|
|
872
874
|
"rh-transition-colors rh-duration-150",
|
|
873
875
|
"focus-visible:rh-outline-none focus-visible:rh-ring-2 focus-visible:rh-ring-ring focus-visible:rh-ring-offset-2",
|
|
874
876
|
preset ? variantColorClasses2[variant][color] : "hover:rh-brightness-90",
|
|
@@ -1085,98 +1087,79 @@ var MinusIcon = ({ className }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
|
1085
1087
|
fill: "none",
|
|
1086
1088
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1087
1089
|
"aria-hidden": "true",
|
|
1088
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1089
|
-
"path",
|
|
1090
|
-
{
|
|
1091
|
-
d: "M1 1H9",
|
|
1092
|
-
stroke: "currentColor",
|
|
1093
|
-
strokeWidth: "2",
|
|
1094
|
-
strokeLinecap: "round"
|
|
1095
|
-
}
|
|
1096
|
-
)
|
|
1090
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M1 1H9", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" })
|
|
1097
1091
|
}
|
|
1098
1092
|
);
|
|
1099
|
-
var Checkbox = React8.forwardRef(
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
children: [
|
|
1132
|
-
/* @__PURE__ */ jsxRuntime.
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1149
|
-
"span",
|
|
1150
|
-
{
|
|
1151
|
-
className: [
|
|
1152
|
-
"rh-inline-flex rh-items-center rh-justify-center",
|
|
1153
|
-
"rh-border rh-border-border rh-rounded-xxs",
|
|
1154
|
-
"rh-transition-colors rh-duration-150",
|
|
1155
|
-
sizeClasses4[size],
|
|
1156
|
-
isActive ? "rh-bg-primary rh-border-primary rh-text-surface" : "rh-bg-surface rh-text-transparent",
|
|
1157
|
-
!disabled && !isActive ? "hover:rh-border-primary" : "",
|
|
1158
|
-
"peer-focus-visible:rh-ring-2 peer-focus-visible:rh-ring-ring peer-focus-visible:rh-ring-offset-2"
|
|
1159
|
-
].filter(Boolean).join(" "),
|
|
1160
|
-
"aria-hidden": "true",
|
|
1161
|
-
children: indeterminate ? /* @__PURE__ */ jsxRuntime.jsx(MinusIcon, { className: iconSizeClasses2[size] }) : isChecked ? /* @__PURE__ */ jsxRuntime.jsx(CheckIcon, { className: iconSizeClasses2[size] }) : null
|
|
1162
|
-
}
|
|
1163
|
-
)
|
|
1164
|
-
] }),
|
|
1165
|
-
label && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1093
|
+
var Checkbox = React8.forwardRef(function Checkbox2({
|
|
1094
|
+
size = "md",
|
|
1095
|
+
label,
|
|
1096
|
+
indeterminate = false,
|
|
1097
|
+
disabled,
|
|
1098
|
+
checked,
|
|
1099
|
+
defaultChecked,
|
|
1100
|
+
className = "",
|
|
1101
|
+
id,
|
|
1102
|
+
onChange,
|
|
1103
|
+
...rest
|
|
1104
|
+
}, ref) {
|
|
1105
|
+
const innerRef = React8__default.default.useRef(null);
|
|
1106
|
+
const inputId = id || React8__default.default.useId();
|
|
1107
|
+
React8__default.default.useImperativeHandle(ref, () => innerRef.current);
|
|
1108
|
+
React8__default.default.useEffect(() => {
|
|
1109
|
+
if (innerRef.current) {
|
|
1110
|
+
innerRef.current.indeterminate = indeterminate;
|
|
1111
|
+
}
|
|
1112
|
+
}, [indeterminate]);
|
|
1113
|
+
const isChecked = checked ?? innerRef.current?.checked ?? defaultChecked ?? false;
|
|
1114
|
+
const isActive = isChecked || indeterminate;
|
|
1115
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1116
|
+
"label",
|
|
1117
|
+
{
|
|
1118
|
+
htmlFor: inputId,
|
|
1119
|
+
className: [
|
|
1120
|
+
"rh-inline-flex rh-items-center rh-gap-2 rh-font-display rh-select-none",
|
|
1121
|
+
disabled ? "rh-cursor-not-allowed rh-opacity-50" : "rh-cursor-pointer",
|
|
1122
|
+
className
|
|
1123
|
+
].filter(Boolean).join(" "),
|
|
1124
|
+
children: [
|
|
1125
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "rh-relative rh-inline-flex rh-items-center rh-justify-center", children: [
|
|
1126
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1127
|
+
"input",
|
|
1128
|
+
{
|
|
1129
|
+
ref: innerRef,
|
|
1130
|
+
id: inputId,
|
|
1131
|
+
type: "checkbox",
|
|
1132
|
+
disabled,
|
|
1133
|
+
checked,
|
|
1134
|
+
defaultChecked,
|
|
1135
|
+
"aria-checked": indeterminate ? "mixed" : void 0,
|
|
1136
|
+
onChange,
|
|
1137
|
+
className: "rh-peer rh-sr-only",
|
|
1138
|
+
...rest
|
|
1139
|
+
}
|
|
1140
|
+
),
|
|
1141
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1166
1142
|
"span",
|
|
1167
1143
|
{
|
|
1168
1144
|
className: [
|
|
1169
|
-
"rh-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1145
|
+
"rh-inline-flex rh-items-center rh-justify-center",
|
|
1146
|
+
"rh-border rh-border-border rh-rounded-xxs",
|
|
1147
|
+
"rh-transition-colors rh-duration-150",
|
|
1148
|
+
sizeClasses4[size],
|
|
1149
|
+
isActive ? "rh-bg-primary rh-border-primary rh-text-surface" : "rh-bg-surface rh-text-transparent",
|
|
1150
|
+
!disabled && !isActive ? "hover:rh-border-primary" : "",
|
|
1151
|
+
"peer-focus-visible:rh-ring-2 peer-focus-visible:rh-ring-ring peer-focus-visible:rh-ring-offset-2"
|
|
1152
|
+
].filter(Boolean).join(" "),
|
|
1153
|
+
"aria-hidden": "true",
|
|
1154
|
+
children: indeterminate ? /* @__PURE__ */ jsxRuntime.jsx(MinusIcon, { className: iconSizeClasses2[size] }) : isChecked ? /* @__PURE__ */ jsxRuntime.jsx(CheckIcon, { className: iconSizeClasses2[size] }) : null
|
|
1173
1155
|
}
|
|
1174
1156
|
)
|
|
1175
|
-
]
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
);
|
|
1157
|
+
] }),
|
|
1158
|
+
label && /* @__PURE__ */ jsxRuntime.jsx("span", { className: ["rh-text-text", labelSizeClasses[size]].join(" "), children: label })
|
|
1159
|
+
]
|
|
1160
|
+
}
|
|
1161
|
+
);
|
|
1162
|
+
});
|
|
1180
1163
|
var statusClasses2 = {
|
|
1181
1164
|
default: "rh-border-border focus-within:rh-ring-2 focus-within:rh-ring-ring focus-within:rh-ring-offset-2",
|
|
1182
1165
|
error: "rh-border-danger focus-within:rh-ring-2 focus-within:rh-ring-danger focus-within:rh-ring-offset-2"
|
|
@@ -1842,7 +1825,7 @@ var Avatar = React8.forwardRef(function Avatar2({ src, alt = "", initials, size
|
|
|
1842
1825
|
className: [
|
|
1843
1826
|
"rh-inline-flex rh-items-center rh-justify-center rh-shrink-0 rh-overflow-hidden",
|
|
1844
1827
|
avatarColors ? "" : "rh-bg-primary rh-text-surface",
|
|
1845
|
-
"rh-font-
|
|
1828
|
+
"rh-font-display rh-font-medium rh-select-none",
|
|
1846
1829
|
sizeClasses7[size],
|
|
1847
1830
|
variantClasses2[variant],
|
|
1848
1831
|
className
|
|
@@ -1947,7 +1930,7 @@ var Tag = React8.forwardRef(function Tag2({
|
|
|
1947
1930
|
"aria-pressed": clickable ? active : void 0,
|
|
1948
1931
|
"aria-disabled": disabled || void 0,
|
|
1949
1932
|
className: [
|
|
1950
|
-
"rh-inline-flex rh-items-center rh-font-
|
|
1933
|
+
"rh-inline-flex rh-items-center rh-font-display rh-font-medium rh-rounded-full",
|
|
1951
1934
|
"rh-border rh-whitespace-nowrap rh-select-none",
|
|
1952
1935
|
"rh-transition-colors rh-duration-150",
|
|
1953
1936
|
"rh-cursor-pointer",
|
|
@@ -2428,7 +2411,7 @@ function ToggleGroupInner({
|
|
|
2428
2411
|
onClick: () => !isDisabled && onChange(option.value),
|
|
2429
2412
|
className: [
|
|
2430
2413
|
"rh-flex rh-items-center rh-justify-center rh-h-full",
|
|
2431
|
-
"rh-border-0 rh-font-
|
|
2414
|
+
"rh-border-0 rh-font-display rh-font-medium",
|
|
2432
2415
|
"rh-transition-all rh-duration-150",
|
|
2433
2416
|
"focus-visible:rh-outline-none focus-visible:rh-ring-2 focus-visible:rh-ring-ring",
|
|
2434
2417
|
radiusClasses6[radius],
|