@rehagro/ui 1.0.11 → 1.0.13
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 +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +553 -620
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +553 -620
- 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 +23 -4
- package/dist/native.js.map +1 -1
- package/dist/native.mjs +23 -4
- package/dist/native.mjs.map +1 -1
- package/dist/styles.css +2 -2
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -38,7 +38,9 @@ var TOKEN_MAP = {
|
|
|
38
38
|
inputHeightLg: { var: "--rh-input-height-lg", isColor: false },
|
|
39
39
|
inputPxSm: { var: "--rh-input-px-sm", isColor: false },
|
|
40
40
|
inputPxMd: { var: "--rh-input-px-md", isColor: false },
|
|
41
|
-
inputPxLg: { var: "--rh-input-px-lg", isColor: false }
|
|
41
|
+
inputPxLg: { var: "--rh-input-px-lg", isColor: false },
|
|
42
|
+
fontFamilyBody: { var: "--rh-font-family", isColor: false },
|
|
43
|
+
fontFamilyDisplay: { var: "--rh-font-family-display", isColor: false }
|
|
42
44
|
};
|
|
43
45
|
var DeleteIcon = (props) => /* @__PURE__ */ jsxs(
|
|
44
46
|
"svg",
|
|
@@ -345,27 +347,19 @@ var Toast = forwardRef(function Toast2({
|
|
|
345
347
|
className: [
|
|
346
348
|
"rh-flex rh-items-start rh-gap-3",
|
|
347
349
|
"rh-w-80 rh-rounded-sm rh-border rh-p-4",
|
|
348
|
-
"rh-shadow-md rh-font-
|
|
350
|
+
"rh-shadow-md rh-font-body",
|
|
349
351
|
containerStyles[styleKey],
|
|
350
352
|
className
|
|
351
353
|
].filter(Boolean).join(" "),
|
|
352
354
|
...rest,
|
|
353
355
|
children: [
|
|
354
|
-
/* @__PURE__ */ jsx("span", { className: "rh-flex-shrink-0 rh-mt-0.5", "aria-hidden": "true", children: /* @__PURE__ */ jsx(
|
|
355
|
-
Icon,
|
|
356
|
-
{
|
|
357
|
-
className: ["rh-w-5 rh-h-5", iconStyles[styleKey]].filter(Boolean).join(" ")
|
|
358
|
-
}
|
|
359
|
-
) }),
|
|
356
|
+
/* @__PURE__ */ jsx("span", { className: "rh-flex-shrink-0 rh-mt-0.5", "aria-hidden": "true", children: /* @__PURE__ */ jsx(Icon, { className: ["rh-w-5 rh-h-5", iconStyles[styleKey]].filter(Boolean).join(" ") }) }),
|
|
360
357
|
/* @__PURE__ */ jsxs("div", { className: "rh-flex-1 rh-min-w-0", children: [
|
|
361
358
|
/* @__PURE__ */ jsx("p", { className: "rh-text-sm rh-font-semibold rh-leading-tight", children: title }),
|
|
362
359
|
description && /* @__PURE__ */ jsx(
|
|
363
360
|
"p",
|
|
364
361
|
{
|
|
365
|
-
className: [
|
|
366
|
-
"rh-mt-1 rh-text-sm rh-leading-normal",
|
|
367
|
-
descriptionStyles[styleKey]
|
|
368
|
-
].filter(Boolean).join(" "),
|
|
362
|
+
className: ["rh-mt-1 rh-text-sm rh-leading-normal", descriptionStyles[styleKey]].filter(Boolean).join(" "),
|
|
369
363
|
children: description
|
|
370
364
|
}
|
|
371
365
|
),
|
|
@@ -729,7 +723,7 @@ var Button = forwardRef(function Button2({
|
|
|
729
723
|
style: computedStyle,
|
|
730
724
|
className: [
|
|
731
725
|
"rh-inline-flex rh-items-center rh-justify-center rh-gap-2",
|
|
732
|
-
"rh-border rh-font-
|
|
726
|
+
"rh-border rh-font-display rh-font-medium",
|
|
733
727
|
"rh-transition-colors rh-duration-150",
|
|
734
728
|
"focus-visible:rh-outline-none focus-visible:rh-ring-2 focus-visible:rh-ring-ring focus-visible:rh-ring-offset-2",
|
|
735
729
|
preset && !hasCustomHover ? variantColorClasses[variant][color] : "",
|
|
@@ -862,7 +856,7 @@ var IconButton = forwardRef(function IconButton2({
|
|
|
862
856
|
style: computedStyle,
|
|
863
857
|
className: [
|
|
864
858
|
"rh-inline-flex rh-items-center rh-justify-center",
|
|
865
|
-
"rh-border rh-font-
|
|
859
|
+
"rh-border rh-font-display",
|
|
866
860
|
"rh-transition-colors rh-duration-150",
|
|
867
861
|
"focus-visible:rh-outline-none focus-visible:rh-ring-2 focus-visible:rh-ring-ring focus-visible:rh-ring-offset-2",
|
|
868
862
|
preset ? variantColorClasses2[variant][color] : "hover:rh-brightness-90",
|
|
@@ -960,7 +954,7 @@ var TextInput = forwardRef(function TextInput2({
|
|
|
960
954
|
return /* @__PURE__ */ jsxs(
|
|
961
955
|
"div",
|
|
962
956
|
{
|
|
963
|
-
className: ["rh-flex rh-flex-col rh-gap-[0.5rem] rh-font-
|
|
957
|
+
className: ["rh-flex rh-flex-col rh-gap-[0.5rem] rh-font-body", wrapperClassName].filter(Boolean).join(" "),
|
|
964
958
|
children: [
|
|
965
959
|
label && /* @__PURE__ */ jsxs("label", { htmlFor: inputId, className: "rh-flex rh-items-baseline rh-gap-1", children: [
|
|
966
960
|
/* @__PURE__ */ jsx("span", { className: `rh-text-sm ${labelWeightClasses[labelWeight]} rh-text-text`, children: label }),
|
|
@@ -971,7 +965,7 @@ var TextInput = forwardRef(function TextInput2({
|
|
|
971
965
|
{
|
|
972
966
|
className: [
|
|
973
967
|
"rh-flex rh-items-center rh-gap-2",
|
|
974
|
-
"rh-border rh-bg-surface rh-font-
|
|
968
|
+
"rh-border rh-bg-surface rh-font-body",
|
|
975
969
|
"rh-transition-colors rh-duration-150",
|
|
976
970
|
statusClasses[status],
|
|
977
971
|
radiusClasses3[radius],
|
|
@@ -1109,7 +1103,7 @@ var Checkbox = forwardRef(function Checkbox2({
|
|
|
1109
1103
|
{
|
|
1110
1104
|
htmlFor: inputId,
|
|
1111
1105
|
className: [
|
|
1112
|
-
"rh-inline-flex rh-items-center rh-gap-2 rh-font-
|
|
1106
|
+
"rh-inline-flex rh-items-center rh-gap-2 rh-font-body rh-select-none",
|
|
1113
1107
|
disabled ? "rh-cursor-not-allowed rh-opacity-50" : "rh-cursor-pointer",
|
|
1114
1108
|
className
|
|
1115
1109
|
].filter(Boolean).join(" "),
|
|
@@ -1228,319 +1222,307 @@ var CheckIcon2 = ({ className }) => /* @__PURE__ */ jsx(
|
|
|
1228
1222
|
)
|
|
1229
1223
|
}
|
|
1230
1224
|
);
|
|
1231
|
-
var Select = forwardRef(
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1225
|
+
var Select = forwardRef(function Select2(props, ref) {
|
|
1226
|
+
const {
|
|
1227
|
+
options,
|
|
1228
|
+
label,
|
|
1229
|
+
subtitle,
|
|
1230
|
+
placeholder = "Select",
|
|
1231
|
+
status = "default",
|
|
1232
|
+
size = "md",
|
|
1233
|
+
radius = "xs",
|
|
1234
|
+
helperText,
|
|
1235
|
+
disabled = false,
|
|
1236
|
+
className = "",
|
|
1237
|
+
wrapperClassName = "",
|
|
1238
|
+
multiple = false
|
|
1239
|
+
} = props;
|
|
1240
|
+
const triggerId = React8.useId();
|
|
1241
|
+
const listboxId = React8.useId();
|
|
1242
|
+
const helperId = React8.useId();
|
|
1243
|
+
const [isOpen, setIsOpen] = React8.useState(false);
|
|
1244
|
+
const [activeIndex, setActiveIndex] = React8.useState(-1);
|
|
1245
|
+
const wrapperRef = React8.useRef(null);
|
|
1246
|
+
const innerRef = React8.useRef(null);
|
|
1247
|
+
const listboxRef = React8.useRef(null);
|
|
1248
|
+
React8.useImperativeHandle(ref, () => innerRef.current);
|
|
1249
|
+
const [internalValue, setInternalValue] = React8.useState(() => {
|
|
1250
|
+
if (props.defaultValue !== void 0) {
|
|
1251
|
+
return Array.isArray(props.defaultValue) ? props.defaultValue : [props.defaultValue];
|
|
1252
|
+
}
|
|
1253
|
+
return [];
|
|
1254
|
+
});
|
|
1255
|
+
const isControlled = props.value !== void 0;
|
|
1256
|
+
const selectedValues = isControlled ? Array.isArray(props.value) ? props.value : props.value !== void 0 ? [props.value] : [] : internalValue;
|
|
1257
|
+
const enabledOptions = options.filter((o) => !o.disabled);
|
|
1258
|
+
const handleSelect = (optionValue) => {
|
|
1259
|
+
if (multiple) {
|
|
1260
|
+
const next = selectedValues.includes(optionValue) ? selectedValues.filter((v) => v !== optionValue) : [...selectedValues, optionValue];
|
|
1261
|
+
if (!isControlled) setInternalValue(next);
|
|
1262
|
+
props.onChange?.(next);
|
|
1263
|
+
} else {
|
|
1264
|
+
const next = [optionValue];
|
|
1265
|
+
if (!isControlled) setInternalValue(next);
|
|
1266
|
+
props.onChange?.(optionValue);
|
|
1267
|
+
setIsOpen(false);
|
|
1268
|
+
innerRef.current?.focus();
|
|
1269
|
+
}
|
|
1270
|
+
};
|
|
1271
|
+
const displayText = React8.useMemo(() => {
|
|
1272
|
+
if (selectedValues.length === 0) return null;
|
|
1273
|
+
if (!multiple) {
|
|
1274
|
+
return options.find((o) => o.value === selectedValues[0])?.label ?? null;
|
|
1275
|
+
}
|
|
1276
|
+
const selectedLabels = selectedValues.map((v) => options.find((o) => o.value === v)?.label).filter(Boolean);
|
|
1277
|
+
if (selectedLabels.length === 0) return null;
|
|
1278
|
+
if (selectedLabels.length === 1) return selectedLabels[0];
|
|
1279
|
+
return `${selectedLabels.length} selected`;
|
|
1280
|
+
}, [selectedValues, options, multiple]);
|
|
1281
|
+
React8.useEffect(() => {
|
|
1282
|
+
if (!isOpen) return;
|
|
1283
|
+
const handleClickOutside = (e) => {
|
|
1284
|
+
if (wrapperRef.current && !wrapperRef.current.contains(e.target)) {
|
|
1285
|
+
setIsOpen(false);
|
|
1259
1286
|
}
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
if (!isControlled) setInternalValue(next);
|
|
1269
|
-
props.onChange?.(next);
|
|
1270
|
-
} else {
|
|
1271
|
-
const next = [optionValue];
|
|
1272
|
-
if (!isControlled) setInternalValue(next);
|
|
1273
|
-
props.onChange?.(optionValue);
|
|
1287
|
+
};
|
|
1288
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
1289
|
+
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
1290
|
+
}, [isOpen]);
|
|
1291
|
+
React8.useEffect(() => {
|
|
1292
|
+
if (!isOpen) return;
|
|
1293
|
+
const handleEscape = (e) => {
|
|
1294
|
+
if (e.key === "Escape") {
|
|
1274
1295
|
setIsOpen(false);
|
|
1275
1296
|
innerRef.current?.focus();
|
|
1276
1297
|
}
|
|
1277
1298
|
};
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
React8.useEffect(() => {
|
|
1310
|
-
if (!isOpen || activeIndex < 0) return;
|
|
1311
|
-
const listbox = listboxRef.current;
|
|
1312
|
-
if (!listbox) return;
|
|
1313
|
-
const activeEl = listbox.children[activeIndex];
|
|
1314
|
-
if (typeof activeEl?.scrollIntoView === "function") {
|
|
1315
|
-
activeEl.scrollIntoView({ block: "nearest" });
|
|
1316
|
-
}
|
|
1317
|
-
}, [activeIndex, isOpen]);
|
|
1318
|
-
React8.useEffect(() => {
|
|
1319
|
-
if (isOpen) {
|
|
1320
|
-
const firstSelectedIdx = options.findIndex(
|
|
1321
|
-
(o) => !o.disabled && selectedValues.includes(o.value)
|
|
1322
|
-
);
|
|
1323
|
-
setActiveIndex(firstSelectedIdx >= 0 ? firstSelectedIdx : 0);
|
|
1324
|
-
} else {
|
|
1325
|
-
setActiveIndex(-1);
|
|
1326
|
-
}
|
|
1327
|
-
}, [isOpen]);
|
|
1328
|
-
const handleKeyDown = (e) => {
|
|
1329
|
-
if (disabled) return;
|
|
1330
|
-
switch (e.key) {
|
|
1331
|
-
case "ArrowDown":
|
|
1332
|
-
case "Down": {
|
|
1333
|
-
e.preventDefault();
|
|
1334
|
-
if (!isOpen) {
|
|
1335
|
-
setIsOpen(true);
|
|
1336
|
-
return;
|
|
1337
|
-
}
|
|
1338
|
-
setActiveIndex((prev) => {
|
|
1339
|
-
for (let i = prev + 1; i < options.length; i++) {
|
|
1340
|
-
if (!options[i].disabled) return i;
|
|
1341
|
-
}
|
|
1342
|
-
return prev;
|
|
1343
|
-
});
|
|
1344
|
-
break;
|
|
1345
|
-
}
|
|
1346
|
-
case "ArrowUp":
|
|
1347
|
-
case "Up": {
|
|
1348
|
-
e.preventDefault();
|
|
1349
|
-
if (!isOpen) {
|
|
1350
|
-
setIsOpen(true);
|
|
1351
|
-
return;
|
|
1352
|
-
}
|
|
1353
|
-
setActiveIndex((prev) => {
|
|
1354
|
-
for (let i = prev - 1; i >= 0; i--) {
|
|
1355
|
-
if (!options[i].disabled) return i;
|
|
1356
|
-
}
|
|
1357
|
-
return prev;
|
|
1358
|
-
});
|
|
1359
|
-
break;
|
|
1299
|
+
document.addEventListener("keydown", handleEscape);
|
|
1300
|
+
return () => document.removeEventListener("keydown", handleEscape);
|
|
1301
|
+
}, [isOpen]);
|
|
1302
|
+
React8.useEffect(() => {
|
|
1303
|
+
if (!isOpen || activeIndex < 0) return;
|
|
1304
|
+
const listbox = listboxRef.current;
|
|
1305
|
+
if (!listbox) return;
|
|
1306
|
+
const activeEl = listbox.children[activeIndex];
|
|
1307
|
+
if (typeof activeEl?.scrollIntoView === "function") {
|
|
1308
|
+
activeEl.scrollIntoView({ block: "nearest" });
|
|
1309
|
+
}
|
|
1310
|
+
}, [activeIndex, isOpen]);
|
|
1311
|
+
React8.useEffect(() => {
|
|
1312
|
+
if (isOpen) {
|
|
1313
|
+
const firstSelectedIdx = options.findIndex(
|
|
1314
|
+
(o) => !o.disabled && selectedValues.includes(o.value)
|
|
1315
|
+
);
|
|
1316
|
+
setActiveIndex(firstSelectedIdx >= 0 ? firstSelectedIdx : 0);
|
|
1317
|
+
} else {
|
|
1318
|
+
setActiveIndex(-1);
|
|
1319
|
+
}
|
|
1320
|
+
}, [isOpen]);
|
|
1321
|
+
const handleKeyDown = (e) => {
|
|
1322
|
+
if (disabled) return;
|
|
1323
|
+
switch (e.key) {
|
|
1324
|
+
case "ArrowDown":
|
|
1325
|
+
case "Down": {
|
|
1326
|
+
e.preventDefault();
|
|
1327
|
+
if (!isOpen) {
|
|
1328
|
+
setIsOpen(true);
|
|
1329
|
+
return;
|
|
1360
1330
|
}
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
if (!isOpen) {
|
|
1365
|
-
setIsOpen(true);
|
|
1366
|
-
} else if (activeIndex >= 0 && !options[activeIndex].disabled) {
|
|
1367
|
-
handleSelect(options[activeIndex].value);
|
|
1331
|
+
setActiveIndex((prev) => {
|
|
1332
|
+
for (let i = prev + 1; i < options.length; i++) {
|
|
1333
|
+
if (!options[i].disabled) return i;
|
|
1368
1334
|
}
|
|
1369
|
-
|
|
1335
|
+
return prev;
|
|
1336
|
+
});
|
|
1337
|
+
break;
|
|
1338
|
+
}
|
|
1339
|
+
case "ArrowUp":
|
|
1340
|
+
case "Up": {
|
|
1341
|
+
e.preventDefault();
|
|
1342
|
+
if (!isOpen) {
|
|
1343
|
+
setIsOpen(true);
|
|
1344
|
+
return;
|
|
1370
1345
|
}
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
const idx = enabledOptions.length > 0 ? options.indexOf(enabledOptions[0]) : 0;
|
|
1375
|
-
setActiveIndex(idx);
|
|
1346
|
+
setActiveIndex((prev) => {
|
|
1347
|
+
for (let i = prev - 1; i >= 0; i--) {
|
|
1348
|
+
if (!options[i].disabled) return i;
|
|
1376
1349
|
}
|
|
1377
|
-
|
|
1350
|
+
return prev;
|
|
1351
|
+
});
|
|
1352
|
+
break;
|
|
1353
|
+
}
|
|
1354
|
+
case "Enter":
|
|
1355
|
+
case " ": {
|
|
1356
|
+
e.preventDefault();
|
|
1357
|
+
if (!isOpen) {
|
|
1358
|
+
setIsOpen(true);
|
|
1359
|
+
} else if (activeIndex >= 0 && !options[activeIndex].disabled) {
|
|
1360
|
+
handleSelect(options[activeIndex].value);
|
|
1378
1361
|
}
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1362
|
+
break;
|
|
1363
|
+
}
|
|
1364
|
+
case "Home": {
|
|
1365
|
+
e.preventDefault();
|
|
1366
|
+
if (isOpen) {
|
|
1367
|
+
const idx = enabledOptions.length > 0 ? options.indexOf(enabledOptions[0]) : 0;
|
|
1368
|
+
setActiveIndex(idx);
|
|
1386
1369
|
}
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1370
|
+
break;
|
|
1371
|
+
}
|
|
1372
|
+
case "End": {
|
|
1373
|
+
e.preventDefault();
|
|
1374
|
+
if (isOpen) {
|
|
1375
|
+
const idx = enabledOptions.length > 0 ? options.indexOf(enabledOptions[enabledOptions.length - 1]) : options.length - 1;
|
|
1376
|
+
setActiveIndex(idx);
|
|
1390
1377
|
}
|
|
1378
|
+
break;
|
|
1391
1379
|
}
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
{
|
|
1396
|
-
ref: wrapperRef,
|
|
1397
|
-
className: [
|
|
1398
|
-
"rh-relative rh-flex rh-flex-col rh-gap-1 rh-font-sans",
|
|
1399
|
-
wrapperClassName
|
|
1400
|
-
].filter(Boolean).join(" "),
|
|
1401
|
-
children: [
|
|
1402
|
-
label && /* @__PURE__ */ jsxs(
|
|
1403
|
-
"label",
|
|
1404
|
-
{
|
|
1405
|
-
id: `${triggerId}-label`,
|
|
1406
|
-
className: "rh-flex rh-items-baseline rh-gap-1",
|
|
1407
|
-
children: [
|
|
1408
|
-
/* @__PURE__ */ jsx("span", { className: "rh-text-sm rh-font-medium rh-text-text", children: label }),
|
|
1409
|
-
subtitle && /* @__PURE__ */ jsx("span", { className: "rh-text-sm rh-text-text-muted", children: subtitle })
|
|
1410
|
-
]
|
|
1411
|
-
}
|
|
1412
|
-
),
|
|
1413
|
-
/* @__PURE__ */ jsxs(
|
|
1414
|
-
"button",
|
|
1415
|
-
{
|
|
1416
|
-
ref: innerRef,
|
|
1417
|
-
id: triggerId,
|
|
1418
|
-
type: "button",
|
|
1419
|
-
role: "combobox",
|
|
1420
|
-
"aria-expanded": isOpen,
|
|
1421
|
-
"aria-haspopup": "listbox",
|
|
1422
|
-
"aria-controls": listboxId,
|
|
1423
|
-
"aria-labelledby": label ? `${triggerId}-label` : void 0,
|
|
1424
|
-
"aria-describedby": helperText ? helperId : void 0,
|
|
1425
|
-
"aria-invalid": status === "error" || void 0,
|
|
1426
|
-
"aria-disabled": disabled || void 0,
|
|
1427
|
-
disabled,
|
|
1428
|
-
onClick: () => !disabled && setIsOpen((o) => !o),
|
|
1429
|
-
onKeyDown: handleKeyDown,
|
|
1430
|
-
className: [
|
|
1431
|
-
"rh-flex rh-items-center rh-justify-between rh-gap-2",
|
|
1432
|
-
"rh-border rh-bg-surface rh-font-sans",
|
|
1433
|
-
"rh-transition-colors rh-duration-150",
|
|
1434
|
-
"rh-text-left rh-w-full",
|
|
1435
|
-
statusClasses2[status],
|
|
1436
|
-
radiusClasses4[radius],
|
|
1437
|
-
sizeClasses5[size],
|
|
1438
|
-
disabled ? "rh-opacity-50 rh-cursor-not-allowed rh-bg-background" : "rh-cursor-pointer",
|
|
1439
|
-
className
|
|
1440
|
-
].filter(Boolean).join(" "),
|
|
1441
|
-
children: [
|
|
1442
|
-
/* @__PURE__ */ jsx(
|
|
1443
|
-
"span",
|
|
1444
|
-
{
|
|
1445
|
-
className: [
|
|
1446
|
-
"rh-flex-1 rh-truncate",
|
|
1447
|
-
displayText ? "rh-text-text" : "rh-text-text-muted"
|
|
1448
|
-
].join(" "),
|
|
1449
|
-
children: displayText ?? placeholder
|
|
1450
|
-
}
|
|
1451
|
-
),
|
|
1452
|
-
/* @__PURE__ */ jsx(
|
|
1453
|
-
ChevronIcon,
|
|
1454
|
-
{
|
|
1455
|
-
className: [
|
|
1456
|
-
"rh-w-5 rh-h-5 rh-shrink-0 rh-text-text-muted rh-transition-transform rh-duration-150",
|
|
1457
|
-
isOpen ? "rh-rotate-180" : ""
|
|
1458
|
-
].filter(Boolean).join(" ")
|
|
1459
|
-
}
|
|
1460
|
-
)
|
|
1461
|
-
]
|
|
1462
|
-
}
|
|
1463
|
-
),
|
|
1464
|
-
isOpen && /* @__PURE__ */ jsx(
|
|
1465
|
-
"ul",
|
|
1466
|
-
{
|
|
1467
|
-
ref: listboxRef,
|
|
1468
|
-
id: listboxId,
|
|
1469
|
-
role: "listbox",
|
|
1470
|
-
"aria-labelledby": label ? `${triggerId}-label` : triggerId,
|
|
1471
|
-
"aria-multiselectable": multiple || void 0,
|
|
1472
|
-
tabIndex: -1,
|
|
1473
|
-
className: [
|
|
1474
|
-
"rh-absolute rh-z-50 rh-w-full rh-mt-1",
|
|
1475
|
-
"rh-border rh-border-border rh-bg-surface",
|
|
1476
|
-
"rh-shadow-md rh-overflow-auto rh-max-h-60",
|
|
1477
|
-
"rh-py-1",
|
|
1478
|
-
dropdownRadiusClasses[radius]
|
|
1479
|
-
].filter(Boolean).join(" "),
|
|
1480
|
-
style: { top: "100%" },
|
|
1481
|
-
children: options.map((option, index) => {
|
|
1482
|
-
const isSelected = selectedValues.includes(option.value);
|
|
1483
|
-
const isActive = index === activeIndex;
|
|
1484
|
-
const isDisabled = option.disabled;
|
|
1485
|
-
return /* @__PURE__ */ jsxs(
|
|
1486
|
-
"li",
|
|
1487
|
-
{
|
|
1488
|
-
id: `${listboxId}-option-${index}`,
|
|
1489
|
-
role: "option",
|
|
1490
|
-
"aria-selected": isSelected,
|
|
1491
|
-
"aria-disabled": isDisabled || void 0,
|
|
1492
|
-
onClick: () => {
|
|
1493
|
-
if (!isDisabled) handleSelect(option.value);
|
|
1494
|
-
},
|
|
1495
|
-
onMouseEnter: () => {
|
|
1496
|
-
if (!isDisabled) setActiveIndex(index);
|
|
1497
|
-
},
|
|
1498
|
-
className: [
|
|
1499
|
-
"rh-flex rh-items-center rh-justify-between rh-gap-2",
|
|
1500
|
-
"rh-transition-colors rh-duration-150",
|
|
1501
|
-
optionSizeClasses[size],
|
|
1502
|
-
isDisabled ? "rh-opacity-50 rh-cursor-not-allowed" : "rh-cursor-pointer",
|
|
1503
|
-
isActive && !isDisabled ? "rh-bg-background" : "",
|
|
1504
|
-
isSelected && !isActive ? "rh-bg-primary/5" : ""
|
|
1505
|
-
].filter(Boolean).join(" "),
|
|
1506
|
-
children: [
|
|
1507
|
-
/* @__PURE__ */ jsx("span", { className: "rh-flex-1 rh-truncate rh-text-text", children: option.label }),
|
|
1508
|
-
multiple ? /* @__PURE__ */ jsx(
|
|
1509
|
-
"span",
|
|
1510
|
-
{
|
|
1511
|
-
className: [
|
|
1512
|
-
"rh-inline-flex rh-items-center rh-justify-center",
|
|
1513
|
-
"rh-w-5 rh-h-5 rh-shrink-0",
|
|
1514
|
-
"rh-border rh-rounded-xxs rh-transition-colors rh-duration-150",
|
|
1515
|
-
isSelected ? "rh-bg-primary rh-border-primary rh-text-surface" : "rh-border-border rh-bg-surface"
|
|
1516
|
-
].filter(Boolean).join(" "),
|
|
1517
|
-
"aria-hidden": "true",
|
|
1518
|
-
children: isSelected && /* @__PURE__ */ jsx(CheckIcon2, { className: "rh-w-3 rh-h-3" })
|
|
1519
|
-
}
|
|
1520
|
-
) : isSelected && /* @__PURE__ */ jsx(CheckIcon2, { className: "rh-w-3.5 rh-h-3.5 rh-shrink-0 rh-text-primary" })
|
|
1521
|
-
]
|
|
1522
|
-
},
|
|
1523
|
-
option.value
|
|
1524
|
-
);
|
|
1525
|
-
})
|
|
1526
|
-
}
|
|
1527
|
-
),
|
|
1528
|
-
helperText && /* @__PURE__ */ jsx(
|
|
1529
|
-
"span",
|
|
1530
|
-
{
|
|
1531
|
-
id: helperId,
|
|
1532
|
-
className: [
|
|
1533
|
-
"rh-flex rh-items-center rh-gap-1 rh-text-xs",
|
|
1534
|
-
helperStatusClasses2[status]
|
|
1535
|
-
].join(" "),
|
|
1536
|
-
children: helperText
|
|
1537
|
-
}
|
|
1538
|
-
)
|
|
1539
|
-
]
|
|
1380
|
+
case "Tab": {
|
|
1381
|
+
if (isOpen) setIsOpen(false);
|
|
1382
|
+
break;
|
|
1540
1383
|
}
|
|
1541
|
-
|
|
1542
|
-
}
|
|
1543
|
-
|
|
1384
|
+
}
|
|
1385
|
+
};
|
|
1386
|
+
return /* @__PURE__ */ jsxs(
|
|
1387
|
+
"div",
|
|
1388
|
+
{
|
|
1389
|
+
ref: wrapperRef,
|
|
1390
|
+
className: ["rh-relative rh-flex rh-flex-col rh-gap-1 rh-font-body", wrapperClassName].filter(Boolean).join(" "),
|
|
1391
|
+
children: [
|
|
1392
|
+
label && /* @__PURE__ */ jsxs("label", { id: `${triggerId}-label`, className: "rh-flex rh-items-baseline rh-gap-1", children: [
|
|
1393
|
+
/* @__PURE__ */ jsx("span", { className: "rh-text-sm rh-font-medium rh-text-text", children: label }),
|
|
1394
|
+
subtitle && /* @__PURE__ */ jsx("span", { className: "rh-text-sm rh-text-text-muted", children: subtitle })
|
|
1395
|
+
] }),
|
|
1396
|
+
/* @__PURE__ */ jsxs(
|
|
1397
|
+
"button",
|
|
1398
|
+
{
|
|
1399
|
+
ref: innerRef,
|
|
1400
|
+
id: triggerId,
|
|
1401
|
+
type: "button",
|
|
1402
|
+
role: "combobox",
|
|
1403
|
+
"aria-expanded": isOpen,
|
|
1404
|
+
"aria-haspopup": "listbox",
|
|
1405
|
+
"aria-controls": listboxId,
|
|
1406
|
+
"aria-labelledby": label ? `${triggerId}-label` : void 0,
|
|
1407
|
+
"aria-describedby": helperText ? helperId : void 0,
|
|
1408
|
+
"aria-invalid": status === "error" || void 0,
|
|
1409
|
+
"aria-disabled": disabled || void 0,
|
|
1410
|
+
disabled,
|
|
1411
|
+
onClick: () => !disabled && setIsOpen((o) => !o),
|
|
1412
|
+
onKeyDown: handleKeyDown,
|
|
1413
|
+
className: [
|
|
1414
|
+
"rh-flex rh-items-center rh-justify-between rh-gap-2",
|
|
1415
|
+
"rh-border rh-bg-surface rh-font-body",
|
|
1416
|
+
"rh-transition-colors rh-duration-150",
|
|
1417
|
+
"rh-text-left rh-w-full",
|
|
1418
|
+
statusClasses2[status],
|
|
1419
|
+
radiusClasses4[radius],
|
|
1420
|
+
sizeClasses5[size],
|
|
1421
|
+
disabled ? "rh-opacity-50 rh-cursor-not-allowed rh-bg-background" : "rh-cursor-pointer",
|
|
1422
|
+
className
|
|
1423
|
+
].filter(Boolean).join(" "),
|
|
1424
|
+
children: [
|
|
1425
|
+
/* @__PURE__ */ jsx(
|
|
1426
|
+
"span",
|
|
1427
|
+
{
|
|
1428
|
+
className: [
|
|
1429
|
+
"rh-flex-1 rh-truncate",
|
|
1430
|
+
displayText ? "rh-text-text" : "rh-text-text-muted"
|
|
1431
|
+
].join(" "),
|
|
1432
|
+
children: displayText ?? placeholder
|
|
1433
|
+
}
|
|
1434
|
+
),
|
|
1435
|
+
/* @__PURE__ */ jsx(
|
|
1436
|
+
ChevronIcon,
|
|
1437
|
+
{
|
|
1438
|
+
className: [
|
|
1439
|
+
"rh-w-5 rh-h-5 rh-shrink-0 rh-text-text-muted rh-transition-transform rh-duration-150",
|
|
1440
|
+
isOpen ? "rh-rotate-180" : ""
|
|
1441
|
+
].filter(Boolean).join(" ")
|
|
1442
|
+
}
|
|
1443
|
+
)
|
|
1444
|
+
]
|
|
1445
|
+
}
|
|
1446
|
+
),
|
|
1447
|
+
isOpen && /* @__PURE__ */ jsx(
|
|
1448
|
+
"ul",
|
|
1449
|
+
{
|
|
1450
|
+
ref: listboxRef,
|
|
1451
|
+
id: listboxId,
|
|
1452
|
+
role: "listbox",
|
|
1453
|
+
"aria-labelledby": label ? `${triggerId}-label` : triggerId,
|
|
1454
|
+
"aria-multiselectable": multiple || void 0,
|
|
1455
|
+
tabIndex: -1,
|
|
1456
|
+
className: [
|
|
1457
|
+
"rh-absolute rh-z-50 rh-w-full rh-mt-1",
|
|
1458
|
+
"rh-border rh-border-border rh-bg-surface",
|
|
1459
|
+
"rh-shadow-md rh-overflow-auto rh-max-h-60",
|
|
1460
|
+
"rh-py-1",
|
|
1461
|
+
dropdownRadiusClasses[radius]
|
|
1462
|
+
].filter(Boolean).join(" "),
|
|
1463
|
+
style: { top: "100%" },
|
|
1464
|
+
children: options.map((option, index) => {
|
|
1465
|
+
const isSelected = selectedValues.includes(option.value);
|
|
1466
|
+
const isActive = index === activeIndex;
|
|
1467
|
+
const isDisabled = option.disabled;
|
|
1468
|
+
return /* @__PURE__ */ jsxs(
|
|
1469
|
+
"li",
|
|
1470
|
+
{
|
|
1471
|
+
id: `${listboxId}-option-${index}`,
|
|
1472
|
+
role: "option",
|
|
1473
|
+
"aria-selected": isSelected,
|
|
1474
|
+
"aria-disabled": isDisabled || void 0,
|
|
1475
|
+
onClick: () => {
|
|
1476
|
+
if (!isDisabled) handleSelect(option.value);
|
|
1477
|
+
},
|
|
1478
|
+
onMouseEnter: () => {
|
|
1479
|
+
if (!isDisabled) setActiveIndex(index);
|
|
1480
|
+
},
|
|
1481
|
+
className: [
|
|
1482
|
+
"rh-flex rh-items-center rh-justify-between rh-gap-2",
|
|
1483
|
+
"rh-transition-colors rh-duration-150",
|
|
1484
|
+
optionSizeClasses[size],
|
|
1485
|
+
isDisabled ? "rh-opacity-50 rh-cursor-not-allowed" : "rh-cursor-pointer",
|
|
1486
|
+
isActive && !isDisabled ? "rh-bg-background" : "",
|
|
1487
|
+
isSelected && !isActive ? "rh-bg-primary/5" : ""
|
|
1488
|
+
].filter(Boolean).join(" "),
|
|
1489
|
+
children: [
|
|
1490
|
+
/* @__PURE__ */ jsx("span", { className: "rh-flex-1 rh-truncate rh-text-text", children: option.label }),
|
|
1491
|
+
multiple ? /* @__PURE__ */ jsx(
|
|
1492
|
+
"span",
|
|
1493
|
+
{
|
|
1494
|
+
className: [
|
|
1495
|
+
"rh-inline-flex rh-items-center rh-justify-center",
|
|
1496
|
+
"rh-w-5 rh-h-5 rh-shrink-0",
|
|
1497
|
+
"rh-border rh-rounded-xxs rh-transition-colors rh-duration-150",
|
|
1498
|
+
isSelected ? "rh-bg-primary rh-border-primary rh-text-surface" : "rh-border-border rh-bg-surface"
|
|
1499
|
+
].filter(Boolean).join(" "),
|
|
1500
|
+
"aria-hidden": "true",
|
|
1501
|
+
children: isSelected && /* @__PURE__ */ jsx(CheckIcon2, { className: "rh-w-3 rh-h-3" })
|
|
1502
|
+
}
|
|
1503
|
+
) : isSelected && /* @__PURE__ */ jsx(CheckIcon2, { className: "rh-w-3.5 rh-h-3.5 rh-shrink-0 rh-text-primary" })
|
|
1504
|
+
]
|
|
1505
|
+
},
|
|
1506
|
+
option.value
|
|
1507
|
+
);
|
|
1508
|
+
})
|
|
1509
|
+
}
|
|
1510
|
+
),
|
|
1511
|
+
helperText && /* @__PURE__ */ jsx(
|
|
1512
|
+
"span",
|
|
1513
|
+
{
|
|
1514
|
+
id: helperId,
|
|
1515
|
+
className: [
|
|
1516
|
+
"rh-flex rh-items-center rh-gap-1 rh-text-xs",
|
|
1517
|
+
helperStatusClasses2[status]
|
|
1518
|
+
].join(" "),
|
|
1519
|
+
children: helperText
|
|
1520
|
+
}
|
|
1521
|
+
)
|
|
1522
|
+
]
|
|
1523
|
+
}
|
|
1524
|
+
);
|
|
1525
|
+
});
|
|
1544
1526
|
var variantClasses = {
|
|
1545
1527
|
light: "rh-bg-surface rh-text-text rh-border rh-border-border rh-shadow-md",
|
|
1546
1528
|
default: "rh-bg-primary/10 rh-text-text rh-border rh-border-primary/20 rh-shadow-md",
|
|
@@ -1817,7 +1799,7 @@ var Avatar = forwardRef(function Avatar2({ src, alt = "", initials, size = "md",
|
|
|
1817
1799
|
className: [
|
|
1818
1800
|
"rh-inline-flex rh-items-center rh-justify-center rh-shrink-0 rh-overflow-hidden",
|
|
1819
1801
|
avatarColors ? "" : "rh-bg-primary rh-text-surface",
|
|
1820
|
-
"rh-font-
|
|
1802
|
+
"rh-font-display rh-font-medium rh-select-none",
|
|
1821
1803
|
sizeClasses7[size],
|
|
1822
1804
|
variantClasses2[variant],
|
|
1823
1805
|
className
|
|
@@ -1922,7 +1904,7 @@ var Tag = forwardRef(function Tag2({
|
|
|
1922
1904
|
"aria-pressed": clickable ? active : void 0,
|
|
1923
1905
|
"aria-disabled": disabled || void 0,
|
|
1924
1906
|
className: [
|
|
1925
|
-
"rh-inline-flex rh-items-center rh-font-
|
|
1907
|
+
"rh-inline-flex rh-items-center rh-font-display rh-font-medium rh-rounded-full",
|
|
1926
1908
|
"rh-border rh-whitespace-nowrap rh-select-none",
|
|
1927
1909
|
"rh-transition-colors rh-duration-150",
|
|
1928
1910
|
"rh-cursor-pointer",
|
|
@@ -1982,228 +1964,121 @@ var addButtonSizeClasses = {
|
|
|
1982
1964
|
md: "rh-w-5 rh-h-5",
|
|
1983
1965
|
lg: "rh-w-5 rh-h-5"
|
|
1984
1966
|
};
|
|
1985
|
-
var TagInput = forwardRef(
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
setIsOpen(false);
|
|
2008
|
-
}
|
|
2009
|
-
};
|
|
2010
|
-
document.addEventListener("mousedown", handleClickOutside);
|
|
2011
|
-
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
2012
|
-
}, []);
|
|
2013
|
-
const handleRemoveTag = (tagValue) => {
|
|
2014
|
-
if (disabled) return;
|
|
2015
|
-
onChange(value.filter((tag) => tag.value !== tagValue));
|
|
2016
|
-
};
|
|
2017
|
-
const handleToggleOption = (option) => {
|
|
2018
|
-
if (disabled) return;
|
|
2019
|
-
const isSelected = value.some((v) => v.value === option.value);
|
|
2020
|
-
if (isSelected) {
|
|
2021
|
-
onChange(value.filter((v) => v.value !== option.value));
|
|
2022
|
-
} else {
|
|
2023
|
-
onChange([...value, option]);
|
|
1967
|
+
var TagInput = forwardRef(function TagInput2({
|
|
1968
|
+
label,
|
|
1969
|
+
subtitle,
|
|
1970
|
+
options = [],
|
|
1971
|
+
value = [],
|
|
1972
|
+
onChange,
|
|
1973
|
+
placeholder,
|
|
1974
|
+
status = "default",
|
|
1975
|
+
size = "md",
|
|
1976
|
+
radius = "md",
|
|
1977
|
+
helperText,
|
|
1978
|
+
disabled,
|
|
1979
|
+
className = "",
|
|
1980
|
+
wrapperClassName = ""
|
|
1981
|
+
}, ref) {
|
|
1982
|
+
const inputId = React8.useId();
|
|
1983
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
1984
|
+
const containerRef = useRef(null);
|
|
1985
|
+
useEffect(() => {
|
|
1986
|
+
const handleClickOutside = (event) => {
|
|
1987
|
+
if (containerRef.current && !containerRef.current.contains(event.target)) {
|
|
1988
|
+
setIsOpen(false);
|
|
2024
1989
|
}
|
|
2025
1990
|
};
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
children: [
|
|
2080
|
-
/* @__PURE__ */ jsx("span", { className: "rh-font-semibold rh-text-gray-700", children: tag.label }),
|
|
2081
|
-
/* @__PURE__ */ jsx(
|
|
2082
|
-
"button",
|
|
2083
|
-
{
|
|
2084
|
-
type: "button",
|
|
2085
|
-
onClick: (e) => {
|
|
2086
|
-
e.stopPropagation();
|
|
2087
|
-
handleRemoveTag(tag.value);
|
|
2088
|
-
},
|
|
2089
|
-
disabled,
|
|
2090
|
-
className: [
|
|
2091
|
-
"rh-flex rh-items-center rh-justify-center",
|
|
2092
|
-
"rh-bg-white rh-rounded-full",
|
|
2093
|
-
"rh-cursor-pointer hover:rh-bg-gray-100",
|
|
2094
|
-
"disabled:rh-cursor-not-allowed disabled:rh-opacity-50",
|
|
2095
|
-
deleteButtonSizeClasses[size]
|
|
2096
|
-
].join(" "),
|
|
2097
|
-
"aria-label": `Remover ${tag.label}`,
|
|
2098
|
-
children: /* @__PURE__ */ jsx(
|
|
2099
|
-
"svg",
|
|
2100
|
-
{
|
|
2101
|
-
viewBox: "0 0 8 8",
|
|
2102
|
-
fill: "none",
|
|
2103
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
2104
|
-
className: "rh-w-[8px] rh-h-[8px]",
|
|
2105
|
-
children: /* @__PURE__ */ jsx(
|
|
2106
|
-
"path",
|
|
2107
|
-
{
|
|
2108
|
-
d: "M6 2L2 6M2 2L6 6",
|
|
2109
|
-
stroke: "#374151",
|
|
2110
|
-
strokeWidth: "1.5",
|
|
2111
|
-
strokeLinecap: "round",
|
|
2112
|
-
strokeLinejoin: "round"
|
|
2113
|
-
}
|
|
2114
|
-
)
|
|
2115
|
-
}
|
|
2116
|
-
)
|
|
2117
|
-
}
|
|
2118
|
-
)
|
|
2119
|
-
]
|
|
2120
|
-
},
|
|
2121
|
-
tag.value
|
|
2122
|
-
))
|
|
2123
|
-
] }),
|
|
2124
|
-
/* @__PURE__ */ jsx(
|
|
2125
|
-
"button",
|
|
2126
|
-
{
|
|
2127
|
-
type: "button",
|
|
2128
|
-
onClick: handleAddClick,
|
|
2129
|
-
disabled,
|
|
2130
|
-
className: [
|
|
2131
|
-
"rh-flex rh-items-center rh-justify-center rh-shrink-0",
|
|
2132
|
-
"rh-text-text-muted hover:rh-text-text",
|
|
2133
|
-
"rh-cursor-pointer",
|
|
2134
|
-
"disabled:rh-cursor-not-allowed disabled:rh-opacity-50",
|
|
2135
|
-
addButtonSizeClasses[size]
|
|
2136
|
-
].join(" "),
|
|
2137
|
-
"aria-label": "Adicionar",
|
|
2138
|
-
"aria-expanded": isOpen,
|
|
2139
|
-
children: /* @__PURE__ */ jsx(
|
|
2140
|
-
"svg",
|
|
2141
|
-
{
|
|
2142
|
-
viewBox: "0 0 20 20",
|
|
2143
|
-
fill: "none",
|
|
2144
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
2145
|
-
className: "rh-w-full rh-h-full",
|
|
2146
|
-
children: /* @__PURE__ */ jsx(
|
|
2147
|
-
"path",
|
|
2148
|
-
{
|
|
2149
|
-
d: "M10 4V16M4 10H16",
|
|
2150
|
-
stroke: "currentColor",
|
|
2151
|
-
strokeWidth: "2",
|
|
2152
|
-
strokeLinecap: "round",
|
|
2153
|
-
strokeLinejoin: "round"
|
|
2154
|
-
}
|
|
2155
|
-
)
|
|
2156
|
-
}
|
|
2157
|
-
)
|
|
2158
|
-
}
|
|
2159
|
-
)
|
|
2160
|
-
]
|
|
2161
|
-
}
|
|
2162
|
-
),
|
|
2163
|
-
isOpen && options.length > 0 && /* @__PURE__ */ jsx(
|
|
2164
|
-
"div",
|
|
2165
|
-
{
|
|
2166
|
-
className: [
|
|
2167
|
-
"rh-absolute rh-top-full rh-left-0 rh-right-0 rh-z-50",
|
|
2168
|
-
"rh-mt-1 rh-bg-surface rh-border rh-border-border",
|
|
2169
|
-
"rh-rounded-[8px] rh-shadow-lg rh-overflow-hidden"
|
|
2170
|
-
].join(" "),
|
|
2171
|
-
children: /* @__PURE__ */ jsx("ul", { className: "rh-max-h-[200px] rh-overflow-y-auto", children: options.map((option) => {
|
|
2172
|
-
const isSelected = value.some((v) => v.value === option.value);
|
|
2173
|
-
return /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs(
|
|
2174
|
-
"button",
|
|
1991
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
1992
|
+
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
1993
|
+
}, []);
|
|
1994
|
+
const handleRemoveTag = (tagValue) => {
|
|
1995
|
+
if (disabled) return;
|
|
1996
|
+
onChange(value.filter((tag) => tag.value !== tagValue));
|
|
1997
|
+
};
|
|
1998
|
+
const handleToggleOption = (option) => {
|
|
1999
|
+
if (disabled) return;
|
|
2000
|
+
const isSelected = value.some((v) => v.value === option.value);
|
|
2001
|
+
if (isSelected) {
|
|
2002
|
+
onChange(value.filter((v) => v.value !== option.value));
|
|
2003
|
+
} else {
|
|
2004
|
+
onChange([...value, option]);
|
|
2005
|
+
}
|
|
2006
|
+
};
|
|
2007
|
+
const handleAddClick = () => {
|
|
2008
|
+
if (disabled) return;
|
|
2009
|
+
setIsOpen(!isOpen);
|
|
2010
|
+
};
|
|
2011
|
+
return /* @__PURE__ */ jsxs(
|
|
2012
|
+
"div",
|
|
2013
|
+
{
|
|
2014
|
+
ref: (node) => {
|
|
2015
|
+
if (typeof ref === "function") ref(node);
|
|
2016
|
+
else if (ref) ref.current = node;
|
|
2017
|
+
containerRef.current = node;
|
|
2018
|
+
},
|
|
2019
|
+
className: ["rh-flex rh-flex-col rh-gap-2 rh-font-body rh-relative", wrapperClassName].filter(Boolean).join(" "),
|
|
2020
|
+
children: [
|
|
2021
|
+
label && /* @__PURE__ */ jsxs("label", { htmlFor: inputId, className: "rh-flex rh-items-baseline rh-gap-1", children: [
|
|
2022
|
+
/* @__PURE__ */ jsx("span", { className: "rh-text-sm rh-font-semibold rh-text-text", children: label }),
|
|
2023
|
+
subtitle && /* @__PURE__ */ jsx("span", { className: "rh-text-sm rh-text-text-muted", children: subtitle })
|
|
2024
|
+
] }),
|
|
2025
|
+
/* @__PURE__ */ jsxs(
|
|
2026
|
+
"div",
|
|
2027
|
+
{
|
|
2028
|
+
onClick: disabled ? void 0 : handleAddClick,
|
|
2029
|
+
className: [
|
|
2030
|
+
"rh-flex rh-flex-row rh-items-center rh-justify-between rh-gap-2",
|
|
2031
|
+
"rh-border rh-bg-surface rh-font-body",
|
|
2032
|
+
"rh-transition-colors rh-duration-150",
|
|
2033
|
+
statusClasses3[status],
|
|
2034
|
+
radiusClasses5[radius],
|
|
2035
|
+
sizeClasses9[size],
|
|
2036
|
+
disabled ? "rh-opacity-50 rh-cursor-not-allowed rh-bg-background" : "rh-cursor-pointer",
|
|
2037
|
+
className
|
|
2038
|
+
].filter(Boolean).join(" "),
|
|
2039
|
+
children: [
|
|
2040
|
+
/* @__PURE__ */ jsxs("div", { className: "rh-flex rh-flex-row rh-flex-wrap rh-items-center rh-gap-2 rh-flex-1", children: [
|
|
2041
|
+
value.length === 0 && placeholder && /* @__PURE__ */ jsx("span", { className: "rh-text-text-muted", children: placeholder }),
|
|
2042
|
+
value.map((tag) => /* @__PURE__ */ jsxs(
|
|
2043
|
+
"div",
|
|
2175
2044
|
{
|
|
2176
|
-
type: "button",
|
|
2177
|
-
onClick: () => handleToggleOption(option),
|
|
2178
2045
|
className: [
|
|
2179
|
-
"rh-
|
|
2180
|
-
"rh-
|
|
2181
|
-
|
|
2182
|
-
"hover:rh-bg-gray-50 rh-transition-colors",
|
|
2183
|
-
isSelected ? "rh-text-text" : "rh-text-text-muted"
|
|
2046
|
+
"rh-inline-flex rh-items-center rh-justify-center rh-gap-1",
|
|
2047
|
+
"rh-bg-gray-200 rh-border rh-border-gray-200 rh-rounded-[4px]",
|
|
2048
|
+
tagSizeClasses[size]
|
|
2184
2049
|
].join(" "),
|
|
2185
2050
|
children: [
|
|
2186
|
-
/* @__PURE__ */ jsx("span", { className: "rh-
|
|
2051
|
+
/* @__PURE__ */ jsx("span", { className: "rh-font-semibold rh-text-gray-700", children: tag.label }),
|
|
2187
2052
|
/* @__PURE__ */ jsx(
|
|
2188
|
-
"
|
|
2053
|
+
"button",
|
|
2189
2054
|
{
|
|
2055
|
+
type: "button",
|
|
2056
|
+
onClick: (e) => {
|
|
2057
|
+
e.stopPropagation();
|
|
2058
|
+
handleRemoveTag(tag.value);
|
|
2059
|
+
},
|
|
2060
|
+
disabled,
|
|
2190
2061
|
className: [
|
|
2191
|
-
"rh-
|
|
2192
|
-
|
|
2062
|
+
"rh-flex rh-items-center rh-justify-center",
|
|
2063
|
+
"rh-bg-white rh-rounded-full",
|
|
2064
|
+
"rh-cursor-pointer hover:rh-bg-gray-100",
|
|
2065
|
+
"disabled:rh-cursor-not-allowed disabled:rh-opacity-50",
|
|
2066
|
+
deleteButtonSizeClasses[size]
|
|
2193
2067
|
].join(" "),
|
|
2194
|
-
|
|
2068
|
+
"aria-label": `Remover ${tag.label}`,
|
|
2069
|
+
children: /* @__PURE__ */ jsx(
|
|
2195
2070
|
"svg",
|
|
2196
2071
|
{
|
|
2197
|
-
viewBox: "0 0
|
|
2072
|
+
viewBox: "0 0 8 8",
|
|
2198
2073
|
fill: "none",
|
|
2199
2074
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2200
|
-
className: "rh-w-
|
|
2075
|
+
className: "rh-w-[8px] rh-h-[8px]",
|
|
2201
2076
|
children: /* @__PURE__ */ jsx(
|
|
2202
2077
|
"path",
|
|
2203
2078
|
{
|
|
2204
|
-
d: "
|
|
2205
|
-
stroke: "
|
|
2206
|
-
strokeWidth: "
|
|
2079
|
+
d: "M6 2L2 6M2 2L6 6",
|
|
2080
|
+
stroke: "#374151",
|
|
2081
|
+
strokeWidth: "1.5",
|
|
2207
2082
|
strokeLinecap: "round",
|
|
2208
2083
|
strokeLinejoin: "round"
|
|
2209
2084
|
}
|
|
@@ -2213,101 +2088,142 @@ var TagInput = forwardRef(
|
|
|
2213
2088
|
}
|
|
2214
2089
|
)
|
|
2215
2090
|
]
|
|
2216
|
-
}
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
"span",
|
|
2223
|
-
{
|
|
2224
|
-
id: `${inputId}-helper`,
|
|
2225
|
-
className: [
|
|
2226
|
-
"rh-flex rh-items-center rh-gap-1 rh-text-xs",
|
|
2227
|
-
helperStatusClasses3[status]
|
|
2228
|
-
].join(" "),
|
|
2229
|
-
children: helperText
|
|
2230
|
-
}
|
|
2231
|
-
)
|
|
2232
|
-
]
|
|
2233
|
-
}
|
|
2234
|
-
);
|
|
2235
|
-
}
|
|
2236
|
-
);
|
|
2237
|
-
var ProgressBar = forwardRef(
|
|
2238
|
-
function ProgressBar2({
|
|
2239
|
-
value,
|
|
2240
|
-
label,
|
|
2241
|
-
size = "sm",
|
|
2242
|
-
showPercentage = true,
|
|
2243
|
-
barColor,
|
|
2244
|
-
bgColor,
|
|
2245
|
-
className = ""
|
|
2246
|
-
}, ref) {
|
|
2247
|
-
const clampedValue = Math.min(100, Math.max(0, value));
|
|
2248
|
-
if (size === "lg") {
|
|
2249
|
-
return /* @__PURE__ */ jsxs(
|
|
2250
|
-
"div",
|
|
2251
|
-
{
|
|
2252
|
-
ref,
|
|
2253
|
-
className: [
|
|
2254
|
-
"rh-flex rh-flex-col rh-items-start rh-gap-2 rh-font-sans",
|
|
2255
|
-
className
|
|
2256
|
-
].filter(Boolean).join(" "),
|
|
2257
|
-
children: [
|
|
2258
|
-
/* @__PURE__ */ jsxs("div", { className: "rh-flex rh-flex-row rh-justify-between rh-items-start rh-w-full", children: [
|
|
2259
|
-
label && /* @__PURE__ */ jsx(
|
|
2260
|
-
"span",
|
|
2091
|
+
},
|
|
2092
|
+
tag.value
|
|
2093
|
+
))
|
|
2094
|
+
] }),
|
|
2095
|
+
/* @__PURE__ */ jsx(
|
|
2096
|
+
"button",
|
|
2261
2097
|
{
|
|
2262
|
-
|
|
2263
|
-
|
|
2098
|
+
type: "button",
|
|
2099
|
+
onClick: handleAddClick,
|
|
2100
|
+
disabled,
|
|
2101
|
+
className: [
|
|
2102
|
+
"rh-flex rh-items-center rh-justify-center rh-shrink-0",
|
|
2103
|
+
"rh-text-text-muted hover:rh-text-text",
|
|
2104
|
+
"rh-cursor-pointer",
|
|
2105
|
+
"disabled:rh-cursor-not-allowed disabled:rh-opacity-50",
|
|
2106
|
+
addButtonSizeClasses[size]
|
|
2107
|
+
].join(" "),
|
|
2108
|
+
"aria-label": "Adicionar",
|
|
2109
|
+
"aria-expanded": isOpen,
|
|
2110
|
+
children: /* @__PURE__ */ jsx(
|
|
2111
|
+
"svg",
|
|
2112
|
+
{
|
|
2113
|
+
viewBox: "0 0 20 20",
|
|
2114
|
+
fill: "none",
|
|
2115
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2116
|
+
className: "rh-w-full rh-h-full",
|
|
2117
|
+
children: /* @__PURE__ */ jsx(
|
|
2118
|
+
"path",
|
|
2119
|
+
{
|
|
2120
|
+
d: "M10 4V16M4 10H16",
|
|
2121
|
+
stroke: "currentColor",
|
|
2122
|
+
strokeWidth: "2",
|
|
2123
|
+
strokeLinecap: "round",
|
|
2124
|
+
strokeLinejoin: "round"
|
|
2125
|
+
}
|
|
2126
|
+
)
|
|
2127
|
+
}
|
|
2128
|
+
)
|
|
2264
2129
|
}
|
|
2265
|
-
)
|
|
2266
|
-
|
|
2267
|
-
|
|
2130
|
+
)
|
|
2131
|
+
]
|
|
2132
|
+
}
|
|
2133
|
+
),
|
|
2134
|
+
isOpen && options.length > 0 && /* @__PURE__ */ jsx(
|
|
2135
|
+
"div",
|
|
2136
|
+
{
|
|
2137
|
+
className: [
|
|
2138
|
+
"rh-absolute rh-top-full rh-left-0 rh-right-0 rh-z-50",
|
|
2139
|
+
"rh-mt-1 rh-bg-surface rh-border rh-border-border",
|
|
2140
|
+
"rh-rounded-[8px] rh-shadow-lg rh-overflow-hidden"
|
|
2141
|
+
].join(" "),
|
|
2142
|
+
children: /* @__PURE__ */ jsx("ul", { className: "rh-max-h-[200px] rh-overflow-y-auto", children: options.map((option) => {
|
|
2143
|
+
const isSelected = value.some((v) => v.value === option.value);
|
|
2144
|
+
return /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs(
|
|
2145
|
+
"button",
|
|
2268
2146
|
{
|
|
2269
|
-
|
|
2147
|
+
type: "button",
|
|
2148
|
+
onClick: () => handleToggleOption(option),
|
|
2149
|
+
className: [
|
|
2150
|
+
"rh-w-full rh-flex rh-items-center rh-justify-between",
|
|
2151
|
+
"rh-px-3 rh-py-3 rh-text-left",
|
|
2152
|
+
"rh-border-b rh-border-border/50 last:rh-border-b-0",
|
|
2153
|
+
"hover:rh-bg-gray-50 rh-transition-colors",
|
|
2154
|
+
isSelected ? "rh-text-text" : "rh-text-text-muted"
|
|
2155
|
+
].join(" "),
|
|
2270
2156
|
children: [
|
|
2271
|
-
|
|
2272
|
-
|
|
2157
|
+
/* @__PURE__ */ jsx("span", { className: "rh-text-sm rh-font-normal", children: option.label }),
|
|
2158
|
+
/* @__PURE__ */ jsx(
|
|
2159
|
+
"span",
|
|
2160
|
+
{
|
|
2161
|
+
className: [
|
|
2162
|
+
"rh-w-5 rh-h-5 rh-rounded rh-border-2 rh-flex rh-items-center rh-justify-center",
|
|
2163
|
+
isSelected ? "rh-bg-primary rh-border-primary" : "rh-bg-white rh-border-gray-300"
|
|
2164
|
+
].join(" "),
|
|
2165
|
+
children: isSelected && /* @__PURE__ */ jsx(
|
|
2166
|
+
"svg",
|
|
2167
|
+
{
|
|
2168
|
+
viewBox: "0 0 12 12",
|
|
2169
|
+
fill: "none",
|
|
2170
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2171
|
+
className: "rh-w-3 rh-h-3",
|
|
2172
|
+
children: /* @__PURE__ */ jsx(
|
|
2173
|
+
"path",
|
|
2174
|
+
{
|
|
2175
|
+
d: "M2 6L5 9L10 3",
|
|
2176
|
+
stroke: "white",
|
|
2177
|
+
strokeWidth: "2",
|
|
2178
|
+
strokeLinecap: "round",
|
|
2179
|
+
strokeLinejoin: "round"
|
|
2180
|
+
}
|
|
2181
|
+
)
|
|
2182
|
+
}
|
|
2183
|
+
)
|
|
2184
|
+
}
|
|
2185
|
+
)
|
|
2273
2186
|
]
|
|
2274
2187
|
}
|
|
2275
|
-
)
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
)
|
|
2292
|
-
}
|
|
2293
|
-
)
|
|
2294
|
-
]
|
|
2295
|
-
}
|
|
2296
|
-
);
|
|
2188
|
+
) }, option.value);
|
|
2189
|
+
}) })
|
|
2190
|
+
}
|
|
2191
|
+
),
|
|
2192
|
+
helperText && /* @__PURE__ */ jsx(
|
|
2193
|
+
"span",
|
|
2194
|
+
{
|
|
2195
|
+
id: `${inputId}-helper`,
|
|
2196
|
+
className: [
|
|
2197
|
+
"rh-flex rh-items-center rh-gap-1 rh-text-xs",
|
|
2198
|
+
helperStatusClasses3[status]
|
|
2199
|
+
].join(" "),
|
|
2200
|
+
children: helperText
|
|
2201
|
+
}
|
|
2202
|
+
)
|
|
2203
|
+
]
|
|
2297
2204
|
}
|
|
2205
|
+
);
|
|
2206
|
+
});
|
|
2207
|
+
var ProgressBar = forwardRef(function ProgressBar2({ value, label, size = "sm", showPercentage = true, barColor, bgColor, className = "" }, ref) {
|
|
2208
|
+
const clampedValue = Math.min(100, Math.max(0, value));
|
|
2209
|
+
if (size === "lg") {
|
|
2298
2210
|
return /* @__PURE__ */ jsxs(
|
|
2299
2211
|
"div",
|
|
2300
2212
|
{
|
|
2301
2213
|
ref,
|
|
2302
|
-
className: [
|
|
2303
|
-
"rh-flex rh-flex-row rh-items-center rh-gap-2 rh-font-sans",
|
|
2304
|
-
className
|
|
2305
|
-
].filter(Boolean).join(" "),
|
|
2214
|
+
className: ["rh-flex rh-flex-col rh-items-start rh-gap-2 rh-font-body", className].filter(Boolean).join(" "),
|
|
2306
2215
|
children: [
|
|
2216
|
+
/* @__PURE__ */ jsxs("div", { className: "rh-flex rh-flex-row rh-justify-between rh-items-start rh-w-full", children: [
|
|
2217
|
+
label && /* @__PURE__ */ jsx("span", { className: "rh-font-sora rh-font-bold rh-text-base rh-leading-6 rh-text-[#374151] rh-flex-1", children: label }),
|
|
2218
|
+
showPercentage && /* @__PURE__ */ jsxs("span", { className: "rh-font-inter rh-font-normal rh-text-sm rh-leading-5 rh-text-[#9CA3AF] rh-tracking-[0.025em] rh-text-right", children: [
|
|
2219
|
+
clampedValue,
|
|
2220
|
+
"%"
|
|
2221
|
+
] })
|
|
2222
|
+
] }),
|
|
2307
2223
|
/* @__PURE__ */ jsx(
|
|
2308
2224
|
"div",
|
|
2309
2225
|
{
|
|
2310
|
-
className: "rh-
|
|
2226
|
+
className: "rh-w-full rh-h-1 rh-rounded-[40px] rh-overflow-hidden",
|
|
2311
2227
|
style: { backgroundColor: bgColor || "#E5E7EB" },
|
|
2312
2228
|
children: /* @__PURE__ */ jsx(
|
|
2313
2229
|
"div",
|
|
@@ -2320,22 +2236,42 @@ var ProgressBar = forwardRef(
|
|
|
2320
2236
|
}
|
|
2321
2237
|
)
|
|
2322
2238
|
}
|
|
2323
|
-
),
|
|
2324
|
-
showPercentage && /* @__PURE__ */ jsxs(
|
|
2325
|
-
"span",
|
|
2326
|
-
{
|
|
2327
|
-
className: "rh-font-inter rh-font-normal rh-text-sm rh-leading-5 rh-text-[#9CA3AF] rh-tracking-[0.025em] rh-text-right rh-min-w-[40px]",
|
|
2328
|
-
children: [
|
|
2329
|
-
clampedValue,
|
|
2330
|
-
"%"
|
|
2331
|
-
]
|
|
2332
|
-
}
|
|
2333
2239
|
)
|
|
2334
2240
|
]
|
|
2335
2241
|
}
|
|
2336
2242
|
);
|
|
2337
2243
|
}
|
|
2338
|
-
|
|
2244
|
+
return /* @__PURE__ */ jsxs(
|
|
2245
|
+
"div",
|
|
2246
|
+
{
|
|
2247
|
+
ref,
|
|
2248
|
+
className: ["rh-flex rh-flex-row rh-items-center rh-gap-2 rh-font-body", className].filter(Boolean).join(" "),
|
|
2249
|
+
children: [
|
|
2250
|
+
/* @__PURE__ */ jsx(
|
|
2251
|
+
"div",
|
|
2252
|
+
{
|
|
2253
|
+
className: "rh-flex-1 rh-h-1 rh-rounded-[40px] rh-overflow-hidden",
|
|
2254
|
+
style: { backgroundColor: bgColor || "#E5E7EB" },
|
|
2255
|
+
children: /* @__PURE__ */ jsx(
|
|
2256
|
+
"div",
|
|
2257
|
+
{
|
|
2258
|
+
className: "rh-h-full rh-rounded-[40px] rh-transition-all rh-duration-300",
|
|
2259
|
+
style: {
|
|
2260
|
+
width: `${clampedValue}%`,
|
|
2261
|
+
backgroundColor: barColor || "#538CC6"
|
|
2262
|
+
}
|
|
2263
|
+
}
|
|
2264
|
+
)
|
|
2265
|
+
}
|
|
2266
|
+
),
|
|
2267
|
+
showPercentage && /* @__PURE__ */ jsxs("span", { className: "rh-font-inter rh-font-normal rh-text-sm rh-leading-5 rh-text-[#9CA3AF] rh-tracking-[0.025em] rh-text-right rh-min-w-[40px]", children: [
|
|
2268
|
+
clampedValue,
|
|
2269
|
+
"%"
|
|
2270
|
+
] })
|
|
2271
|
+
]
|
|
2272
|
+
}
|
|
2273
|
+
);
|
|
2274
|
+
});
|
|
2339
2275
|
var PRESET_COLORS4 = /* @__PURE__ */ new Set([
|
|
2340
2276
|
"primary",
|
|
2341
2277
|
"secondary",
|
|
@@ -2403,7 +2339,7 @@ function ToggleGroupInner({
|
|
|
2403
2339
|
onClick: () => !isDisabled && onChange(option.value),
|
|
2404
2340
|
className: [
|
|
2405
2341
|
"rh-flex rh-items-center rh-justify-center rh-h-full",
|
|
2406
|
-
"rh-border-0 rh-font-
|
|
2342
|
+
"rh-border-0 rh-font-display rh-font-medium",
|
|
2407
2343
|
"rh-transition-all rh-duration-150",
|
|
2408
2344
|
"focus-visible:rh-outline-none focus-visible:rh-ring-2 focus-visible:rh-ring-ring",
|
|
2409
2345
|
radiusClasses6[radius],
|
|
@@ -2463,7 +2399,7 @@ var Card = forwardRef(function Card2({
|
|
|
2463
2399
|
tabIndex: isInteractive ? 0 : void 0,
|
|
2464
2400
|
"aria-disabled": disabled || void 0,
|
|
2465
2401
|
className: [
|
|
2466
|
-
"rh-font-
|
|
2402
|
+
"rh-font-body rh-transition-all rh-duration-150",
|
|
2467
2403
|
variantClasses3[variant],
|
|
2468
2404
|
radiusClasses7[radius],
|
|
2469
2405
|
paddingClasses[padding],
|
|
@@ -2652,10 +2588,7 @@ function TableInner({
|
|
|
2652
2588
|
"table",
|
|
2653
2589
|
{
|
|
2654
2590
|
ref,
|
|
2655
|
-
className: [
|
|
2656
|
-
"rh-w-full rh-border-collapse rh-font-sans",
|
|
2657
|
-
className
|
|
2658
|
-
].filter(Boolean).join(" "),
|
|
2591
|
+
className: ["rh-w-full rh-border-collapse rh-font-body", className].filter(Boolean).join(" "),
|
|
2659
2592
|
...rest,
|
|
2660
2593
|
children: [
|
|
2661
2594
|
/* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsx("tr", { className: "rh-border-b rh-border-border", style: headerStyle, children: columns.map((column) => /* @__PURE__ */ jsx(
|