@rehagro/ui 1.0.64 → 1.0.65
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 +94 -1
- package/dist/index.d.ts +94 -1
- package/dist/index.js +358 -214
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +245 -102
- package/dist/index.mjs.map +1 -1
- package/dist/native.d.mts +54 -1
- package/dist/native.d.ts +54 -1
- package/dist/native.js +115 -2
- package/dist/native.js.map +1 -1
- package/dist/native.mjs +114 -2
- package/dist/native.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import
|
|
2
|
+
import React10, { forwardRef, createContext, useState, useMemo, useRef, useEffect, useCallback, useContext } from 'react';
|
|
3
3
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
4
4
|
import { createPortal } from 'react-dom';
|
|
5
5
|
|
|
@@ -846,9 +846,9 @@ var Button = forwardRef(function Button2({
|
|
|
846
846
|
children,
|
|
847
847
|
...rest
|
|
848
848
|
}, ref) {
|
|
849
|
-
const isDisabled =
|
|
849
|
+
const isDisabled = React10.useMemo(() => disabled || loading, [disabled, loading]);
|
|
850
850
|
const preset = isPresetColor(color);
|
|
851
|
-
const computedStyle =
|
|
851
|
+
const computedStyle = React10.useMemo(() => {
|
|
852
852
|
const baseStyle = preset ? hoverColor ? { [`--rh-${color}-hover`]: toRgbTriplet2(hoverColor) ?? hoverColor } : {} : getArbitraryColorStyle(variant, color);
|
|
853
853
|
const hoverVars = hoverStyle ? {
|
|
854
854
|
"--btn-hover-bg": hoverStyle.backgroundColor,
|
|
@@ -998,7 +998,7 @@ var IconButton = forwardRef(function IconButton2({
|
|
|
998
998
|
}, ref) {
|
|
999
999
|
const isDisabled = disabled || loading;
|
|
1000
1000
|
const preset = isPresetColor2(color);
|
|
1001
|
-
const computedStyle =
|
|
1001
|
+
const computedStyle = React10.useMemo(
|
|
1002
1002
|
() => preset ? style ?? {} : { ...style, ...getArbitraryColorStyle2(variant, color) },
|
|
1003
1003
|
[preset, color, variant, style]
|
|
1004
1004
|
);
|
|
@@ -1117,9 +1117,9 @@ var TextInput = forwardRef(function TextInput2({
|
|
|
1117
1117
|
id,
|
|
1118
1118
|
...rest
|
|
1119
1119
|
}, ref) {
|
|
1120
|
-
const generatedId =
|
|
1120
|
+
const generatedId = React10.useId();
|
|
1121
1121
|
const inputId = id || generatedId;
|
|
1122
|
-
const [isHelperDismissed, setIsHelperDismissed] =
|
|
1122
|
+
const [isHelperDismissed, setIsHelperDismissed] = React10.useState(false);
|
|
1123
1123
|
const { onChange, ...inputProps } = rest;
|
|
1124
1124
|
const visualStatus = helperText && isHelperDismissed ? "default" : status;
|
|
1125
1125
|
const containerStyle = {
|
|
@@ -1223,7 +1223,150 @@ var TextInput = forwardRef(function TextInput2({
|
|
|
1223
1223
|
}
|
|
1224
1224
|
);
|
|
1225
1225
|
});
|
|
1226
|
+
var statusClasses2 = {
|
|
1227
|
+
default: "rh-border-border focus-within:rh-border-primary focus-within:rh-ring-2 focus-within:rh-ring-gray-200",
|
|
1228
|
+
error: "rh-border-danger focus-within:rh-border-danger focus-within:rh-ring-2 focus-within:rh-ring-red-100"
|
|
1229
|
+
};
|
|
1226
1230
|
var sizeClasses4 = {
|
|
1231
|
+
sm: "rh-text-sm rh-px-input-x-sm rh-py-2",
|
|
1232
|
+
md: "rh-text-sm rh-px-input-x-md rh-py-2",
|
|
1233
|
+
lg: "rh-text-base rh-px-input-x-lg rh-py-3"
|
|
1234
|
+
};
|
|
1235
|
+
var radiusClasses4 = {
|
|
1236
|
+
none: "rh-rounded-none",
|
|
1237
|
+
xxs: "rh-rounded-xxs",
|
|
1238
|
+
xs: "rh-rounded-xs",
|
|
1239
|
+
sm: "rh-rounded-sm",
|
|
1240
|
+
md: "rh-rounded-md",
|
|
1241
|
+
lg: "rh-rounded-lg",
|
|
1242
|
+
xl: "rh-rounded-xl",
|
|
1243
|
+
full: "rh-rounded-full"
|
|
1244
|
+
};
|
|
1245
|
+
var borderWidthClasses2 = {
|
|
1246
|
+
sm: "rh-border-sm",
|
|
1247
|
+
md: "rh-border-md",
|
|
1248
|
+
lg: "rh-border-lg"
|
|
1249
|
+
};
|
|
1250
|
+
var resizeClasses = {
|
|
1251
|
+
none: "rh-resize-none",
|
|
1252
|
+
vertical: "rh-resize-y",
|
|
1253
|
+
horizontal: "rh-resize-x",
|
|
1254
|
+
both: "rh-resize"
|
|
1255
|
+
};
|
|
1256
|
+
var helperStatusClasses2 = {
|
|
1257
|
+
default: "rh-text-text-muted",
|
|
1258
|
+
error: "rh-text-danger"
|
|
1259
|
+
};
|
|
1260
|
+
var labelWeightClasses2 = {
|
|
1261
|
+
normal: "rh-font-normal",
|
|
1262
|
+
medium: "rh-font-medium",
|
|
1263
|
+
semibold: "rh-font-semibold",
|
|
1264
|
+
bold: "rh-font-bold"
|
|
1265
|
+
};
|
|
1266
|
+
var getSubtitleClassName2 = (subtitle) => subtitle.trim() === "*" ? "rh-text-danger" : "rh-text-text-muted";
|
|
1267
|
+
var TextArea = forwardRef(function TextArea2({
|
|
1268
|
+
label,
|
|
1269
|
+
labelWeight = "medium",
|
|
1270
|
+
labelColor = "#080B12",
|
|
1271
|
+
subtitle,
|
|
1272
|
+
status = "default",
|
|
1273
|
+
size = "md",
|
|
1274
|
+
radius = "xs",
|
|
1275
|
+
helperText,
|
|
1276
|
+
rows = 3,
|
|
1277
|
+
resize = "vertical",
|
|
1278
|
+
disabled,
|
|
1279
|
+
className = "",
|
|
1280
|
+
wrapperClassName = "",
|
|
1281
|
+
borderColor,
|
|
1282
|
+
backgroundColor,
|
|
1283
|
+
borderWidth = "sm",
|
|
1284
|
+
id,
|
|
1285
|
+
...rest
|
|
1286
|
+
}, ref) {
|
|
1287
|
+
const generatedId = React10.useId();
|
|
1288
|
+
const textareaId = id || generatedId;
|
|
1289
|
+
const [isHelperDismissed, setIsHelperDismissed] = React10.useState(false);
|
|
1290
|
+
const { onChange, ...textareaProps } = rest;
|
|
1291
|
+
const visualStatus = helperText && isHelperDismissed ? "default" : status;
|
|
1292
|
+
const containerStyle = {
|
|
1293
|
+
...borderColor ? { borderColor } : {},
|
|
1294
|
+
...!disabled && backgroundColor ? { backgroundColor } : {}
|
|
1295
|
+
};
|
|
1296
|
+
return /* @__PURE__ */ jsxs(
|
|
1297
|
+
"div",
|
|
1298
|
+
{
|
|
1299
|
+
className: ["rh-flex rh-flex-col rh-gap-[0.5rem] rh-font-body", wrapperClassName].filter(Boolean).join(" "),
|
|
1300
|
+
children: [
|
|
1301
|
+
label && /* @__PURE__ */ jsxs("label", { htmlFor: textareaId, className: "rh-flex rh-items-baseline rh-gap-1", children: [
|
|
1302
|
+
/* @__PURE__ */ jsx(
|
|
1303
|
+
"span",
|
|
1304
|
+
{
|
|
1305
|
+
className: `rh-text-sm ${labelWeightClasses2[labelWeight]}`,
|
|
1306
|
+
style: { color: labelColor },
|
|
1307
|
+
children: label
|
|
1308
|
+
}
|
|
1309
|
+
),
|
|
1310
|
+
subtitle && /* @__PURE__ */ jsx("span", { className: `rh-text-sm ${getSubtitleClassName2(subtitle)}`, children: subtitle })
|
|
1311
|
+
] }),
|
|
1312
|
+
/* @__PURE__ */ jsx(
|
|
1313
|
+
"div",
|
|
1314
|
+
{
|
|
1315
|
+
style: containerStyle,
|
|
1316
|
+
className: [
|
|
1317
|
+
"rh-flex",
|
|
1318
|
+
"rh-bg-surface rh-font-body",
|
|
1319
|
+
borderWidthClasses2[borderWidth],
|
|
1320
|
+
"rh-transition-colors rh-duration-150",
|
|
1321
|
+
statusClasses2[visualStatus],
|
|
1322
|
+
radiusClasses4[radius],
|
|
1323
|
+
sizeClasses4[size],
|
|
1324
|
+
disabled ? "rh-opacity-50 rh-cursor-not-allowed rh-bg-background" : "",
|
|
1325
|
+
className
|
|
1326
|
+
].filter(Boolean).join(" "),
|
|
1327
|
+
children: /* @__PURE__ */ jsx(
|
|
1328
|
+
"textarea",
|
|
1329
|
+
{
|
|
1330
|
+
ref,
|
|
1331
|
+
id: textareaId,
|
|
1332
|
+
rows,
|
|
1333
|
+
disabled,
|
|
1334
|
+
"aria-invalid": visualStatus === "error" || void 0,
|
|
1335
|
+
"aria-describedby": helperText ? `${textareaId}-helper` : void 0,
|
|
1336
|
+
className: [
|
|
1337
|
+
"rh-flex-1 rh-min-w-0 rh-w-full rh-bg-transparent rh-outline-none",
|
|
1338
|
+
"rh-text-text placeholder:rh-text-text-muted hover:placeholder:rh-text-text",
|
|
1339
|
+
resizeClasses[resize],
|
|
1340
|
+
disabled ? "rh-cursor-not-allowed" : ""
|
|
1341
|
+
].filter(Boolean).join(" "),
|
|
1342
|
+
onChange: (e) => {
|
|
1343
|
+
if (helperText) setIsHelperDismissed(true);
|
|
1344
|
+
onChange?.(e);
|
|
1345
|
+
},
|
|
1346
|
+
...textareaProps
|
|
1347
|
+
}
|
|
1348
|
+
)
|
|
1349
|
+
}
|
|
1350
|
+
),
|
|
1351
|
+
helperText && !isHelperDismissed && /* @__PURE__ */ jsxs(
|
|
1352
|
+
"span",
|
|
1353
|
+
{
|
|
1354
|
+
id: `${textareaId}-helper`,
|
|
1355
|
+
className: [
|
|
1356
|
+
"rh-flex rh-items-center rh-gap-1 rh-text-xs",
|
|
1357
|
+
helperStatusClasses2[visualStatus]
|
|
1358
|
+
].join(" "),
|
|
1359
|
+
children: [
|
|
1360
|
+
/* @__PURE__ */ jsx(WarningCircleIcon, {}),
|
|
1361
|
+
helperText
|
|
1362
|
+
]
|
|
1363
|
+
}
|
|
1364
|
+
)
|
|
1365
|
+
]
|
|
1366
|
+
}
|
|
1367
|
+
);
|
|
1368
|
+
});
|
|
1369
|
+
var sizeClasses5 = {
|
|
1227
1370
|
sm: "rh-h-4 rh-w-4",
|
|
1228
1371
|
md: "rh-h-5 rh-w-5",
|
|
1229
1372
|
lg: "rh-h-6 rh-w-6"
|
|
@@ -1281,10 +1424,10 @@ var Checkbox = forwardRef(function Checkbox2({
|
|
|
1281
1424
|
onChange,
|
|
1282
1425
|
...rest
|
|
1283
1426
|
}, ref) {
|
|
1284
|
-
const innerRef =
|
|
1285
|
-
const inputId = id ||
|
|
1286
|
-
|
|
1287
|
-
|
|
1427
|
+
const innerRef = React10.useRef(null);
|
|
1428
|
+
const inputId = id || React10.useId();
|
|
1429
|
+
React10.useImperativeHandle(ref, () => innerRef.current);
|
|
1430
|
+
React10.useEffect(() => {
|
|
1288
1431
|
if (innerRef.current) {
|
|
1289
1432
|
innerRef.current.indeterminate = indeterminate;
|
|
1290
1433
|
}
|
|
@@ -1324,7 +1467,7 @@ var Checkbox = forwardRef(function Checkbox2({
|
|
|
1324
1467
|
"rh-inline-flex rh-items-center rh-justify-center",
|
|
1325
1468
|
"rh-border rh-border-border rh-rounded-xxs",
|
|
1326
1469
|
"rh-transition-colors rh-duration-150",
|
|
1327
|
-
|
|
1470
|
+
sizeClasses5[size],
|
|
1328
1471
|
isActive ? "rh-bg-primary rh-border-primary rh-text-surface" : "rh-bg-surface rh-text-transparent",
|
|
1329
1472
|
!disabled && !isActive ? "hover:rh-border-primary" : "",
|
|
1330
1473
|
"peer-focus-visible:rh-ring-2 peer-focus-visible:rh-ring-ring peer-focus-visible:rh-ring-offset-2"
|
|
@@ -1385,7 +1528,7 @@ var Radio = forwardRef(function Radio2({
|
|
|
1385
1528
|
onChange,
|
|
1386
1529
|
...rest
|
|
1387
1530
|
}, ref) {
|
|
1388
|
-
const inputId = id ||
|
|
1531
|
+
const inputId = id || React10.useId();
|
|
1389
1532
|
const getAccentColor = () => {
|
|
1390
1533
|
if (isPresetColor3(color)) {
|
|
1391
1534
|
return `rgb(var(--rh-${color}))`;
|
|
@@ -1467,8 +1610,8 @@ var RadioGroup = forwardRef(function RadioGroup2({
|
|
|
1467
1610
|
className = "",
|
|
1468
1611
|
...rest
|
|
1469
1612
|
}, ref) {
|
|
1470
|
-
const [internalValue, setInternalValue] =
|
|
1471
|
-
const groupName = name ||
|
|
1613
|
+
const [internalValue, setInternalValue] = React10.useState(defaultValue);
|
|
1614
|
+
const groupName = name || React10.useId();
|
|
1472
1615
|
const currentValue = value ?? internalValue;
|
|
1473
1616
|
const handleChange = (newValue) => {
|
|
1474
1617
|
setInternalValue(newValue);
|
|
@@ -1503,16 +1646,16 @@ var RadioGroup = forwardRef(function RadioGroup2({
|
|
|
1503
1646
|
}
|
|
1504
1647
|
);
|
|
1505
1648
|
});
|
|
1506
|
-
var
|
|
1649
|
+
var statusClasses3 = {
|
|
1507
1650
|
default: "rh-border-border focus-within:rh-border-primary focus-within:rh-ring-2 focus-within:rh-ring-gray-200 ",
|
|
1508
1651
|
error: "rh-border-danger focus-within:rh-border-danger focus-within:rh-ring-2 focus-within:rh-ring-red-100 "
|
|
1509
1652
|
};
|
|
1510
|
-
var
|
|
1653
|
+
var sizeClasses6 = {
|
|
1511
1654
|
sm: "rh-min-h-[32px] rh-text-sm rh-px-input-x-sm",
|
|
1512
1655
|
md: "rh-min-h-[40px] rh-text-sm rh-px-input-x-md",
|
|
1513
1656
|
lg: "rh-min-h-[48px] rh-text-base rh-px-input-x-lg"
|
|
1514
1657
|
};
|
|
1515
|
-
var
|
|
1658
|
+
var radiusClasses5 = {
|
|
1516
1659
|
none: "rh-rounded-none",
|
|
1517
1660
|
xxs: "rh-rounded-xxs",
|
|
1518
1661
|
xs: "rh-rounded-xs",
|
|
@@ -1532,7 +1675,7 @@ var dropdownRadiusClasses = {
|
|
|
1532
1675
|
xl: "rh-rounded-xs",
|
|
1533
1676
|
full: "rh-rounded-xs"
|
|
1534
1677
|
};
|
|
1535
|
-
var
|
|
1678
|
+
var helperStatusClasses3 = {
|
|
1536
1679
|
default: "rh-text-text-muted",
|
|
1537
1680
|
error: "rh-text-danger"
|
|
1538
1681
|
};
|
|
@@ -1541,7 +1684,7 @@ var optionSizeClasses = {
|
|
|
1541
1684
|
md: "rh-px-input-x-md rh-py-2 rh-text-sm",
|
|
1542
1685
|
lg: "rh-px-input-x-lg rh-py-2.5 rh-text-base"
|
|
1543
1686
|
};
|
|
1544
|
-
var
|
|
1687
|
+
var getSubtitleClassName3 = (subtitle) => subtitle.trim() === "*" ? "rh-text-danger" : "rh-text-text-muted";
|
|
1545
1688
|
var ChevronIcon = ({ className }) => /* @__PURE__ */ jsx(
|
|
1546
1689
|
"svg",
|
|
1547
1690
|
{
|
|
@@ -1614,18 +1757,18 @@ var Select = forwardRef(function Select2(props, ref) {
|
|
|
1614
1757
|
multiple = false,
|
|
1615
1758
|
backgroundColor
|
|
1616
1759
|
} = props;
|
|
1617
|
-
const triggerId =
|
|
1618
|
-
const listboxId =
|
|
1619
|
-
const helperId =
|
|
1620
|
-
const [isOpen, setIsOpen] =
|
|
1621
|
-
const [activeIndex, setActiveIndex] =
|
|
1622
|
-
const [isHelperDismissed, setIsHelperDismissed] =
|
|
1623
|
-
|
|
1624
|
-
const wrapperRef =
|
|
1625
|
-
const innerRef =
|
|
1626
|
-
const listboxRef =
|
|
1627
|
-
|
|
1628
|
-
const [internalValue, setInternalValue] =
|
|
1760
|
+
const triggerId = React10.useId();
|
|
1761
|
+
const listboxId = React10.useId();
|
|
1762
|
+
const helperId = React10.useId();
|
|
1763
|
+
const [isOpen, setIsOpen] = React10.useState(false);
|
|
1764
|
+
const [activeIndex, setActiveIndex] = React10.useState(-1);
|
|
1765
|
+
const [isHelperDismissed, setIsHelperDismissed] = React10.useState(false);
|
|
1766
|
+
React10.useRef({ query: "", lastAt: 0 });
|
|
1767
|
+
const wrapperRef = React10.useRef(null);
|
|
1768
|
+
const innerRef = React10.useRef(null);
|
|
1769
|
+
const listboxRef = React10.useRef(null);
|
|
1770
|
+
React10.useImperativeHandle(ref, () => innerRef.current);
|
|
1771
|
+
const [internalValue, setInternalValue] = React10.useState(() => {
|
|
1629
1772
|
if (props.defaultValue !== void 0) {
|
|
1630
1773
|
return Array.isArray(props.defaultValue) ? props.defaultValue : [props.defaultValue];
|
|
1631
1774
|
}
|
|
@@ -1649,7 +1792,7 @@ var Select = forwardRef(function Select2(props, ref) {
|
|
|
1649
1792
|
innerRef.current?.focus();
|
|
1650
1793
|
}
|
|
1651
1794
|
};
|
|
1652
|
-
const displayText =
|
|
1795
|
+
const displayText = React10.useMemo(() => {
|
|
1653
1796
|
if (selectedValues.length === 0) return null;
|
|
1654
1797
|
if (!multiple) {
|
|
1655
1798
|
return options.find((o) => o.value === selectedValues[0])?.label ?? null;
|
|
@@ -1659,7 +1802,7 @@ var Select = forwardRef(function Select2(props, ref) {
|
|
|
1659
1802
|
if (selectedLabels.length === 1) return selectedLabels[0];
|
|
1660
1803
|
return `${selectedLabels.length} selected`;
|
|
1661
1804
|
}, [selectedValues, options, multiple]);
|
|
1662
|
-
|
|
1805
|
+
React10.useEffect(() => {
|
|
1663
1806
|
if (!isOpen) return;
|
|
1664
1807
|
const handleClickOutside = (e) => {
|
|
1665
1808
|
if (wrapperRef.current && !wrapperRef.current.contains(e.target)) {
|
|
@@ -1669,7 +1812,7 @@ var Select = forwardRef(function Select2(props, ref) {
|
|
|
1669
1812
|
document.addEventListener("mousedown", handleClickOutside);
|
|
1670
1813
|
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
1671
1814
|
}, [isOpen]);
|
|
1672
|
-
|
|
1815
|
+
React10.useEffect(() => {
|
|
1673
1816
|
if (!isOpen) return;
|
|
1674
1817
|
const handleEscape = (e) => {
|
|
1675
1818
|
if (e.key === "Escape") {
|
|
@@ -1680,7 +1823,7 @@ var Select = forwardRef(function Select2(props, ref) {
|
|
|
1680
1823
|
document.addEventListener("keydown", handleEscape);
|
|
1681
1824
|
return () => document.removeEventListener("keydown", handleEscape);
|
|
1682
1825
|
}, [isOpen]);
|
|
1683
|
-
|
|
1826
|
+
React10.useEffect(() => {
|
|
1684
1827
|
if (!isOpen || activeIndex < 0) return;
|
|
1685
1828
|
const listbox = listboxRef.current;
|
|
1686
1829
|
if (!listbox) return;
|
|
@@ -1689,7 +1832,7 @@ var Select = forwardRef(function Select2(props, ref) {
|
|
|
1689
1832
|
activeEl.scrollIntoView({ block: "nearest" });
|
|
1690
1833
|
}
|
|
1691
1834
|
}, [activeIndex, isOpen]);
|
|
1692
|
-
|
|
1835
|
+
React10.useEffect(() => {
|
|
1693
1836
|
if (isOpen) {
|
|
1694
1837
|
const firstSelectedIdx = options.findIndex(
|
|
1695
1838
|
(o) => !o.disabled && selectedValues.includes(o.value)
|
|
@@ -1772,7 +1915,7 @@ var Select = forwardRef(function Select2(props, ref) {
|
|
|
1772
1915
|
children: [
|
|
1773
1916
|
label && /* @__PURE__ */ jsxs("label", { id: `${triggerId}-label`, className: "rh-flex rh-items-baseline rh-gap-1", children: [
|
|
1774
1917
|
/* @__PURE__ */ jsx("span", { className: "rh-text-sm rh-font-medium rh-text-text", children: label }),
|
|
1775
|
-
subtitle && /* @__PURE__ */ jsx("span", { className: `rh-text-sm ${
|
|
1918
|
+
subtitle && /* @__PURE__ */ jsx("span", { className: `rh-text-sm ${getSubtitleClassName3(subtitle)}`, children: subtitle })
|
|
1776
1919
|
] }),
|
|
1777
1920
|
/* @__PURE__ */ jsxs(
|
|
1778
1921
|
"button",
|
|
@@ -1798,9 +1941,9 @@ var Select = forwardRef(function Select2(props, ref) {
|
|
|
1798
1941
|
!backgroundColor && "rh-bg-surface",
|
|
1799
1942
|
"rh-transition-colors rh-duration-150",
|
|
1800
1943
|
"rh-text-left rh-w-full",
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1944
|
+
statusClasses3[visualStatus],
|
|
1945
|
+
radiusClasses5[radius],
|
|
1946
|
+
sizeClasses6[size],
|
|
1804
1947
|
disabled ? "rh-opacity-50 rh-cursor-not-allowed rh-bg-background" : "rh-cursor-pointer",
|
|
1805
1948
|
className
|
|
1806
1949
|
].filter(Boolean).join(" "),
|
|
@@ -1897,7 +2040,7 @@ var Select = forwardRef(function Select2(props, ref) {
|
|
|
1897
2040
|
id: helperId,
|
|
1898
2041
|
className: [
|
|
1899
2042
|
"rh-flex rh-items-center rh-gap-1 rh-text-xs",
|
|
1900
|
-
|
|
2043
|
+
helperStatusClasses3[visualStatus]
|
|
1901
2044
|
].join(" "),
|
|
1902
2045
|
children: [
|
|
1903
2046
|
/* @__PURE__ */ jsx(WarningCircleIcon, {}),
|
|
@@ -1943,16 +2086,16 @@ var MODE_OPTIONS = [
|
|
|
1943
2086
|
{ value: "month", label: "M\xEAs" },
|
|
1944
2087
|
{ value: "year", label: "Ano" }
|
|
1945
2088
|
];
|
|
1946
|
-
var
|
|
2089
|
+
var statusClasses4 = {
|
|
1947
2090
|
default: "rh-border-border focus-within:rh-border-primary focus-within:rh-ring-2 focus-within:rh-ring-gray-200",
|
|
1948
2091
|
error: "rh-border-danger focus-within:rh-border-danger focus-within:rh-ring-2 focus-within:rh-ring-red-100"
|
|
1949
2092
|
};
|
|
1950
|
-
var
|
|
2093
|
+
var sizeClasses7 = {
|
|
1951
2094
|
sm: "rh-min-h-[32px] rh-text-sm rh-px-input-x-sm",
|
|
1952
2095
|
md: "rh-min-h-[40px] rh-text-sm rh-px-input-x-md",
|
|
1953
2096
|
lg: "rh-min-h-[48px] rh-text-base rh-px-input-x-lg"
|
|
1954
2097
|
};
|
|
1955
|
-
var
|
|
2098
|
+
var radiusClasses6 = {
|
|
1956
2099
|
none: "rh-rounded-none",
|
|
1957
2100
|
xxs: "rh-rounded-xxs",
|
|
1958
2101
|
xs: "rh-rounded-xs",
|
|
@@ -1972,11 +2115,11 @@ var dropdownRadiusClasses2 = {
|
|
|
1972
2115
|
xl: "rh-rounded-xs",
|
|
1973
2116
|
full: "rh-rounded-xs"
|
|
1974
2117
|
};
|
|
1975
|
-
var
|
|
2118
|
+
var helperStatusClasses4 = {
|
|
1976
2119
|
default: "rh-text-text-muted",
|
|
1977
2120
|
error: "rh-text-danger"
|
|
1978
2121
|
};
|
|
1979
|
-
var
|
|
2122
|
+
var getSubtitleClassName4 = (subtitle) => subtitle.trim() === "*" ? "rh-text-danger" : "rh-text-text-muted";
|
|
1980
2123
|
var ChevronIcon2 = ({ className }) => /* @__PURE__ */ jsx(
|
|
1981
2124
|
"svg",
|
|
1982
2125
|
{
|
|
@@ -2056,8 +2199,8 @@ var DateSelect = forwardRef(
|
|
|
2056
2199
|
backgroundColor,
|
|
2057
2200
|
modes
|
|
2058
2201
|
} = props;
|
|
2059
|
-
const triggerId =
|
|
2060
|
-
const helperId =
|
|
2202
|
+
const triggerId = React10.useId();
|
|
2203
|
+
const helperId = React10.useId();
|
|
2061
2204
|
const [isOpen, setIsOpen] = useState(false);
|
|
2062
2205
|
const [isHelperDismissed, setIsHelperDismissed] = useState(false);
|
|
2063
2206
|
const [dropdownAlign, setDropdownAlign] = useState("left");
|
|
@@ -2087,7 +2230,7 @@ var DateSelect = forwardRef(
|
|
|
2087
2230
|
const wrapperRef = useRef(null);
|
|
2088
2231
|
const innerRef = useRef(null);
|
|
2089
2232
|
const dropdownRef = useRef(null);
|
|
2090
|
-
|
|
2233
|
+
React10.useImperativeHandle(ref, () => innerRef.current);
|
|
2091
2234
|
const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
|
|
2092
2235
|
const yearStart = startYear ?? currentYear - 10;
|
|
2093
2236
|
const yearEnd = endYear ?? currentYear + 10;
|
|
@@ -2661,7 +2804,7 @@ var DateSelect = forwardRef(
|
|
|
2661
2804
|
children: [
|
|
2662
2805
|
label && /* @__PURE__ */ jsxs("label", { id: `${triggerId}-label`, className: "rh-flex rh-items-baseline rh-gap-1", children: [
|
|
2663
2806
|
/* @__PURE__ */ jsx("span", { className: "rh-text-sm rh-font-medium rh-text-text", children: label }),
|
|
2664
|
-
subtitle && /* @__PURE__ */ jsx("span", { className: `rh-text-sm ${
|
|
2807
|
+
subtitle && /* @__PURE__ */ jsx("span", { className: `rh-text-sm ${getSubtitleClassName4(subtitle)}`, children: subtitle })
|
|
2665
2808
|
] }),
|
|
2666
2809
|
/* @__PURE__ */ jsxs(
|
|
2667
2810
|
"button",
|
|
@@ -2685,9 +2828,9 @@ var DateSelect = forwardRef(
|
|
|
2685
2828
|
!backgroundColor && "rh-bg-surface",
|
|
2686
2829
|
"rh-transition-colors rh-duration-150",
|
|
2687
2830
|
"rh-text-left rh-w-full",
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2831
|
+
statusClasses4[visualStatus],
|
|
2832
|
+
radiusClasses6[radius],
|
|
2833
|
+
sizeClasses7[size],
|
|
2691
2834
|
disabled ? "rh-opacity-50 rh-cursor-not-allowed rh-bg-background" : "rh-cursor-pointer",
|
|
2692
2835
|
className
|
|
2693
2836
|
].filter(Boolean).join(" "),
|
|
@@ -2741,7 +2884,7 @@ var DateSelect = forwardRef(
|
|
|
2741
2884
|
id: helperId,
|
|
2742
2885
|
className: [
|
|
2743
2886
|
"rh-flex rh-items-center rh-gap-1 rh-text-xs",
|
|
2744
|
-
|
|
2887
|
+
helperStatusClasses4[visualStatus]
|
|
2745
2888
|
].join(" "),
|
|
2746
2889
|
children: [
|
|
2747
2890
|
/* @__PURE__ */ jsx(WarningCircleIcon, {}),
|
|
@@ -2762,16 +2905,16 @@ var CLOCK_HOURS_INNER = [0, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23];
|
|
|
2762
2905
|
var CLOCK_MINUTES = Array.from({ length: 12 }, (_, index) => index * 5);
|
|
2763
2906
|
var pad = (n) => String(n).padStart(2, "0");
|
|
2764
2907
|
var clampClockPart = (value, max) => Math.min(max, Math.max(0, value));
|
|
2765
|
-
var
|
|
2908
|
+
var statusClasses5 = {
|
|
2766
2909
|
default: "rh-border-border focus-within:rh-border-primary focus-within:rh-ring-2 focus-within:rh-ring-gray-200",
|
|
2767
2910
|
error: "rh-border-danger focus-within:rh-border-danger focus-within:rh-ring-2 focus-within:rh-ring-red-100"
|
|
2768
2911
|
};
|
|
2769
|
-
var
|
|
2912
|
+
var sizeClasses8 = {
|
|
2770
2913
|
sm: "rh-min-h-[32px] rh-text-sm rh-px-input-x-sm",
|
|
2771
2914
|
md: "rh-min-h-[40px] rh-text-sm rh-px-input-x-md",
|
|
2772
2915
|
lg: "rh-min-h-[48px] rh-text-base rh-px-input-x-lg"
|
|
2773
2916
|
};
|
|
2774
|
-
var
|
|
2917
|
+
var radiusClasses7 = {
|
|
2775
2918
|
none: "rh-rounded-none",
|
|
2776
2919
|
xxs: "rh-rounded-xxs",
|
|
2777
2920
|
xs: "rh-rounded-xs",
|
|
@@ -2781,11 +2924,11 @@ var radiusClasses6 = {
|
|
|
2781
2924
|
xl: "rh-rounded-xl",
|
|
2782
2925
|
full: "rh-rounded-full"
|
|
2783
2926
|
};
|
|
2784
|
-
var
|
|
2927
|
+
var helperStatusClasses5 = {
|
|
2785
2928
|
default: "rh-text-text-muted",
|
|
2786
2929
|
error: "rh-text-danger"
|
|
2787
2930
|
};
|
|
2788
|
-
var
|
|
2931
|
+
var getSubtitleClassName5 = (subtitle) => subtitle.trim() === "*" ? "rh-text-danger" : "rh-text-text-muted";
|
|
2789
2932
|
var ClockIcon = () => /* @__PURE__ */ jsxs(
|
|
2790
2933
|
"svg",
|
|
2791
2934
|
{
|
|
@@ -2869,8 +3012,8 @@ var TimePicker = forwardRef(
|
|
|
2869
3012
|
backgroundColor,
|
|
2870
3013
|
presentation = "dropdown"
|
|
2871
3014
|
} = props;
|
|
2872
|
-
const triggerId =
|
|
2873
|
-
const helperId =
|
|
3015
|
+
const triggerId = React10.useId();
|
|
3016
|
+
const helperId = React10.useId();
|
|
2874
3017
|
const isControlled = props.value !== void 0;
|
|
2875
3018
|
const [internalValue, setInternalValue] = useState(
|
|
2876
3019
|
props.defaultValue ?? null
|
|
@@ -2889,7 +3032,7 @@ var TimePicker = forwardRef(
|
|
|
2889
3032
|
const dropdownRef = useRef(null);
|
|
2890
3033
|
const hourColRef = useRef(null);
|
|
2891
3034
|
const minuteColRef = useRef(null);
|
|
2892
|
-
|
|
3035
|
+
React10.useImperativeHandle(ref, () => innerRef.current);
|
|
2893
3036
|
const visualStatus = helperText && isHelperDismissed ? "default" : status;
|
|
2894
3037
|
useEffect(() => {
|
|
2895
3038
|
if (!isOpen) return;
|
|
@@ -3022,7 +3165,7 @@ var TimePicker = forwardRef(
|
|
|
3022
3165
|
children: [
|
|
3023
3166
|
label && /* @__PURE__ */ jsxs("label", { id: `${triggerId}-label`, className: "rh-flex rh-items-baseline rh-gap-1", children: [
|
|
3024
3167
|
/* @__PURE__ */ jsx("span", { className: "rh-text-sm rh-font-medium rh-text-text", children: label }),
|
|
3025
|
-
subtitle && /* @__PURE__ */ jsx("span", { className: `rh-text-sm ${
|
|
3168
|
+
subtitle && /* @__PURE__ */ jsx("span", { className: `rh-text-sm ${getSubtitleClassName5(subtitle)}`, children: subtitle })
|
|
3026
3169
|
] }),
|
|
3027
3170
|
/* @__PURE__ */ jsxs(
|
|
3028
3171
|
"button",
|
|
@@ -3046,9 +3189,9 @@ var TimePicker = forwardRef(
|
|
|
3046
3189
|
!backgroundColor && "rh-bg-surface",
|
|
3047
3190
|
"rh-transition-colors rh-duration-150",
|
|
3048
3191
|
"rh-text-left rh-w-full",
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
|
|
3192
|
+
statusClasses5[visualStatus],
|
|
3193
|
+
radiusClasses7[radius],
|
|
3194
|
+
sizeClasses8[size],
|
|
3052
3195
|
disabled ? "rh-opacity-50 rh-cursor-not-allowed rh-bg-background" : "rh-cursor-pointer",
|
|
3053
3196
|
className
|
|
3054
3197
|
].filter(Boolean).join(" "),
|
|
@@ -3298,7 +3441,7 @@ var TimePicker = forwardRef(
|
|
|
3298
3441
|
id: helperId,
|
|
3299
3442
|
className: [
|
|
3300
3443
|
"rh-flex rh-items-center rh-gap-1 rh-text-xs",
|
|
3301
|
-
|
|
3444
|
+
helperStatusClasses5[visualStatus]
|
|
3302
3445
|
].join(" "),
|
|
3303
3446
|
children: [
|
|
3304
3447
|
/* @__PURE__ */ jsx(WarningCircleIcon, {}),
|
|
@@ -3321,7 +3464,7 @@ var arrowVariantClasses = {
|
|
|
3321
3464
|
default: "rh-border-primary/20 rh-bg-primary/10",
|
|
3322
3465
|
dark: "rh-bg-primary"
|
|
3323
3466
|
};
|
|
3324
|
-
var
|
|
3467
|
+
var sizeClasses9 = {
|
|
3325
3468
|
sm: "rh-px-3 rh-py-1.5 rh-text-xs",
|
|
3326
3469
|
md: "rh-px-4 rh-py-3 rh-text-sm"
|
|
3327
3470
|
};
|
|
@@ -3412,8 +3555,8 @@ var Tooltip = forwardRef(
|
|
|
3412
3555
|
useEffect(() => {
|
|
3413
3556
|
return () => clearTimers();
|
|
3414
3557
|
}, [clearTimers]);
|
|
3415
|
-
const triggerChild =
|
|
3416
|
-
const triggerElement =
|
|
3558
|
+
const triggerChild = React10.Children.only(children);
|
|
3559
|
+
const triggerElement = React10.cloneElement(triggerChild, {
|
|
3417
3560
|
onMouseEnter: (e) => {
|
|
3418
3561
|
handleEnter();
|
|
3419
3562
|
triggerChild.props.onMouseEnter?.(e);
|
|
@@ -3452,7 +3595,7 @@ var Tooltip = forwardRef(
|
|
|
3452
3595
|
"rh-absolute rh-z-50 rh-w-max rh-max-w-xs rh-rounded-xs",
|
|
3453
3596
|
tooltipPlacementClasses[placement],
|
|
3454
3597
|
variantClasses[variant],
|
|
3455
|
-
|
|
3598
|
+
sizeClasses9[size],
|
|
3456
3599
|
className
|
|
3457
3600
|
].filter(Boolean).join(" "),
|
|
3458
3601
|
children: [
|
|
@@ -3553,7 +3696,7 @@ function getAvatarColors(name) {
|
|
|
3553
3696
|
const index = hash % AVATAR_COLORS.length;
|
|
3554
3697
|
return AVATAR_COLORS[index];
|
|
3555
3698
|
}
|
|
3556
|
-
var
|
|
3699
|
+
var sizeClasses10 = {
|
|
3557
3700
|
sm: "rh-w-8 rh-h-8 rh-text-xs",
|
|
3558
3701
|
md: "rh-w-10 rh-h-10 rh-text-sm",
|
|
3559
3702
|
lg: "rh-w-12 rh-h-12 rh-text-base",
|
|
@@ -3588,7 +3731,7 @@ var Avatar = forwardRef(function Avatar2({ src, alt = "", initials, size = "md",
|
|
|
3588
3731
|
"rh-inline-flex rh-items-center rh-justify-center rh-shrink-0 rh-overflow-hidden",
|
|
3589
3732
|
avatarColors ? "" : "rh-bg-primary rh-text-surface",
|
|
3590
3733
|
"rh-font-display rh-font-medium rh-select-none",
|
|
3591
|
-
|
|
3734
|
+
sizeClasses10[size],
|
|
3592
3735
|
variantClasses2[variant],
|
|
3593
3736
|
className
|
|
3594
3737
|
].filter(Boolean).join(" "),
|
|
@@ -3655,7 +3798,7 @@ var hoverInactivePresetClasses = {
|
|
|
3655
3798
|
info: "hover:rh-bg-info/20 hover:rh-border-info/50",
|
|
3656
3799
|
neutral: "hover:rh-bg-neutral/20 hover:rh-border-neutral/50"
|
|
3657
3800
|
};
|
|
3658
|
-
var
|
|
3801
|
+
var sizeClasses11 = {
|
|
3659
3802
|
sm: "rh-text-xs rh-px-2 rh-py-0.5 rh-gap-1",
|
|
3660
3803
|
md: "rh-text-sm rh-px-2.5 rh-py-1 rh-gap-1.5",
|
|
3661
3804
|
lg: "rh-text-sm rh-px-3 rh-py-1.5 rh-gap-1.5"
|
|
@@ -3702,7 +3845,7 @@ var Tag = forwardRef(function Tag2({
|
|
|
3702
3845
|
"rh-transition-colors rh-duration-150",
|
|
3703
3846
|
"rh-cursor-pointer",
|
|
3704
3847
|
clickable ? "rh-cursor-pointer" : "",
|
|
3705
|
-
|
|
3848
|
+
sizeClasses11[size],
|
|
3706
3849
|
colorClasses3,
|
|
3707
3850
|
hoverClasses,
|
|
3708
3851
|
disabled ? "rh-opacity-50 rh-cursor-not-allowed rh-pointer-events-none" : "",
|
|
@@ -3719,16 +3862,16 @@ var Tag = forwardRef(function Tag2({
|
|
|
3719
3862
|
}
|
|
3720
3863
|
);
|
|
3721
3864
|
});
|
|
3722
|
-
var
|
|
3865
|
+
var statusClasses6 = {
|
|
3723
3866
|
default: "rh-border-border focus-within:rh-ring-2 focus-within:rh-ring-ring focus-within:rh-ring-offset-2",
|
|
3724
3867
|
error: "rh-border-danger focus-within:rh-ring-2 focus-within:rh-ring-danger focus-within:rh-ring-offset-2"
|
|
3725
3868
|
};
|
|
3726
|
-
var
|
|
3869
|
+
var sizeClasses12 = {
|
|
3727
3870
|
sm: "rh-min-h-[36px] rh-text-sm rh-px-2 rh-py-1",
|
|
3728
3871
|
md: "rh-h-[44px] rh-text-sm rh-px-2 rh-py-[6px]",
|
|
3729
3872
|
lg: "rh-min-h-[52px] rh-text-base rh-px-3 rh-py-2"
|
|
3730
3873
|
};
|
|
3731
|
-
var
|
|
3874
|
+
var radiusClasses8 = {
|
|
3732
3875
|
none: "rh-rounded-none",
|
|
3733
3876
|
xxs: "rh-rounded-xxs",
|
|
3734
3877
|
xs: "rh-rounded-xs",
|
|
@@ -3738,7 +3881,7 @@ var radiusClasses7 = {
|
|
|
3738
3881
|
xl: "rh-rounded-xl",
|
|
3739
3882
|
full: "rh-rounded-full"
|
|
3740
3883
|
};
|
|
3741
|
-
var
|
|
3884
|
+
var helperStatusClasses6 = {
|
|
3742
3885
|
default: "rh-text-text-muted",
|
|
3743
3886
|
error: "rh-text-danger"
|
|
3744
3887
|
};
|
|
@@ -3757,7 +3900,7 @@ var addButtonSizeClasses = {
|
|
|
3757
3900
|
md: "rh-w-5 rh-h-5",
|
|
3758
3901
|
lg: "rh-w-5 rh-h-5"
|
|
3759
3902
|
};
|
|
3760
|
-
var
|
|
3903
|
+
var getSubtitleClassName6 = (subtitle) => subtitle.trim() === "*" ? "rh-text-danger" : "rh-text-text-muted";
|
|
3761
3904
|
var TagInput = forwardRef(function TagInput2({
|
|
3762
3905
|
label,
|
|
3763
3906
|
subtitle,
|
|
@@ -3773,7 +3916,7 @@ var TagInput = forwardRef(function TagInput2({
|
|
|
3773
3916
|
className = "",
|
|
3774
3917
|
wrapperClassName = ""
|
|
3775
3918
|
}, ref) {
|
|
3776
|
-
const inputId =
|
|
3919
|
+
const inputId = React10.useId();
|
|
3777
3920
|
const [isOpen, setIsOpen] = useState(false);
|
|
3778
3921
|
const containerRef = useRef(null);
|
|
3779
3922
|
useEffect(() => {
|
|
@@ -3814,7 +3957,7 @@ var TagInput = forwardRef(function TagInput2({
|
|
|
3814
3957
|
children: [
|
|
3815
3958
|
label && /* @__PURE__ */ jsxs("label", { htmlFor: inputId, className: "rh-flex rh-items-baseline rh-gap-1", children: [
|
|
3816
3959
|
/* @__PURE__ */ jsx("span", { className: "rh-text-sm rh-font-semibold rh-text-text", children: label }),
|
|
3817
|
-
subtitle && /* @__PURE__ */ jsx("span", { className: `rh-text-sm ${
|
|
3960
|
+
subtitle && /* @__PURE__ */ jsx("span", { className: `rh-text-sm ${getSubtitleClassName6(subtitle)}`, children: subtitle })
|
|
3818
3961
|
] }),
|
|
3819
3962
|
/* @__PURE__ */ jsxs(
|
|
3820
3963
|
"div",
|
|
@@ -3824,9 +3967,9 @@ var TagInput = forwardRef(function TagInput2({
|
|
|
3824
3967
|
"rh-flex rh-flex-row rh-items-center rh-justify-between rh-gap-2",
|
|
3825
3968
|
"rh-border rh-bg-surface rh-font-body",
|
|
3826
3969
|
"rh-transition-colors rh-duration-150",
|
|
3827
|
-
|
|
3828
|
-
|
|
3829
|
-
|
|
3970
|
+
statusClasses6[status],
|
|
3971
|
+
radiusClasses8[radius],
|
|
3972
|
+
sizeClasses12[size],
|
|
3830
3973
|
disabled ? "rh-opacity-50 rh-cursor-not-allowed rh-bg-background" : "rh-cursor-pointer",
|
|
3831
3974
|
className
|
|
3832
3975
|
].filter(Boolean).join(" "),
|
|
@@ -3989,7 +4132,7 @@ var TagInput = forwardRef(function TagInput2({
|
|
|
3989
4132
|
id: `${inputId}-helper`,
|
|
3990
4133
|
className: [
|
|
3991
4134
|
"rh-flex rh-items-center rh-gap-1 rh-text-xs",
|
|
3992
|
-
|
|
4135
|
+
helperStatusClasses6[status]
|
|
3993
4136
|
].join(" "),
|
|
3994
4137
|
children: helperText
|
|
3995
4138
|
}
|
|
@@ -4096,12 +4239,12 @@ var PRESET_COLORS5 = /* @__PURE__ */ new Set([
|
|
|
4096
4239
|
"info"
|
|
4097
4240
|
]);
|
|
4098
4241
|
var isPresetColor5 = (color) => PRESET_COLORS5.has(color);
|
|
4099
|
-
var
|
|
4242
|
+
var sizeClasses13 = {
|
|
4100
4243
|
sm: { container: "rh-h-8", button: "rh-px-2 rh-text-xs" },
|
|
4101
4244
|
md: { container: "rh-h-9", button: "rh-px-3 rh-text-sm" },
|
|
4102
4245
|
lg: { container: "rh-h-10", button: "rh-px-4 rh-text-sm" }
|
|
4103
4246
|
};
|
|
4104
|
-
var
|
|
4247
|
+
var radiusClasses9 = {
|
|
4105
4248
|
none: "rh-rounded-none",
|
|
4106
4249
|
xs: "rh-rounded-xs",
|
|
4107
4250
|
sm: "rh-rounded-sm",
|
|
@@ -4134,8 +4277,8 @@ function ToggleGroupInner({
|
|
|
4134
4277
|
className: [
|
|
4135
4278
|
"rh-inline-flex rh-items-center rh-bg-muted rh-overflow-hidden",
|
|
4136
4279
|
"rh-p-1 rh-gap-0.5",
|
|
4137
|
-
|
|
4138
|
-
|
|
4280
|
+
radiusClasses9[radius],
|
|
4281
|
+
sizeClasses13[size].container,
|
|
4139
4282
|
disabled ? "rh-opacity-50 rh-cursor-not-allowed" : "",
|
|
4140
4283
|
className
|
|
4141
4284
|
].filter(Boolean).join(" "),
|
|
@@ -4157,8 +4300,8 @@ function ToggleGroupInner({
|
|
|
4157
4300
|
"rh-border-0 rh-font-display rh-font-medium",
|
|
4158
4301
|
"rh-transition-all rh-duration-150",
|
|
4159
4302
|
"focus-visible:rh-outline-none focus-visible:rh-ring-2 focus-visible:rh-ring-ring",
|
|
4160
|
-
|
|
4161
|
-
|
|
4303
|
+
radiusClasses9[radius],
|
|
4304
|
+
sizeClasses13[size].button,
|
|
4162
4305
|
isActive ? "rh-bg-surface rh-text-text rh-shadow-sm" : "rh-bg-transparent rh-text-text-muted",
|
|
4163
4306
|
!isActive && !isDisabled ? "hover:rh-bg-surface/50" : "",
|
|
4164
4307
|
isDisabled ? "rh-cursor-not-allowed rh-pointer-events-none" : "rh-cursor-pointer"
|
|
@@ -4181,7 +4324,7 @@ var variantClasses3 = {
|
|
|
4181
4324
|
outlined: "rh-bg-surface rh-border rh-border-border rh-shadow-none",
|
|
4182
4325
|
filled: "rh-bg-background rh-border-0 rh-shadow-none"
|
|
4183
4326
|
};
|
|
4184
|
-
var
|
|
4327
|
+
var radiusClasses10 = {
|
|
4185
4328
|
none: "rh-rounded-none",
|
|
4186
4329
|
xs: "rh-rounded-xs",
|
|
4187
4330
|
sm: "rh-rounded-sm",
|
|
@@ -4216,7 +4359,7 @@ var CardRoot = forwardRef(function Card({
|
|
|
4216
4359
|
className: [
|
|
4217
4360
|
"rh-font-body rh-transition-all rh-duration-150",
|
|
4218
4361
|
variantClasses3[variant],
|
|
4219
|
-
|
|
4362
|
+
radiusClasses10[radius],
|
|
4220
4363
|
paddingClasses[padding],
|
|
4221
4364
|
isInteractive ? "rh-cursor-pointer hover:rh-shadow-lg hover:rh-scale-[1.01] active:rh-scale-[0.99]" : "",
|
|
4222
4365
|
disabled ? "rh-opacity-50 rh-cursor-not-allowed rh-pointer-events-none" : "",
|
|
@@ -4269,7 +4412,7 @@ var PRESET_COLORS6 = /* @__PURE__ */ new Set([
|
|
|
4269
4412
|
"info"
|
|
4270
4413
|
]);
|
|
4271
4414
|
var isPresetColor6 = (color) => PRESET_COLORS6.has(color);
|
|
4272
|
-
var
|
|
4415
|
+
var sizeClasses14 = {
|
|
4273
4416
|
xs: "rh-w-3 rh-h-3",
|
|
4274
4417
|
sm: "rh-w-4 rh-h-4",
|
|
4275
4418
|
md: "rh-w-6 rh-h-6",
|
|
@@ -4297,7 +4440,7 @@ var Spinner = forwardRef(function Spinner2({ size = "md", color = "primary", lab
|
|
|
4297
4440
|
"aria-label": label,
|
|
4298
4441
|
className: [
|
|
4299
4442
|
"rh-inline-flex rh-items-center rh-justify-center",
|
|
4300
|
-
|
|
4443
|
+
sizeClasses14[size],
|
|
4301
4444
|
colorClass,
|
|
4302
4445
|
className
|
|
4303
4446
|
].filter(Boolean).join(" "),
|
|
@@ -4581,7 +4724,7 @@ var CustomSelect = ({
|
|
|
4581
4724
|
const [dropdownStyle, setDropdownStyle] = useState({});
|
|
4582
4725
|
const containerRef = useRef(null);
|
|
4583
4726
|
const textAreaRef = useRef(null);
|
|
4584
|
-
const resizeTextArea =
|
|
4727
|
+
const resizeTextArea = React10.useCallback(() => {
|
|
4585
4728
|
if (type !== "textInput" || !textAreaRef.current) return;
|
|
4586
4729
|
const textarea = textAreaRef.current;
|
|
4587
4730
|
textarea.style.height = "auto";
|
|
@@ -4757,7 +4900,7 @@ var CustomSelect = ({
|
|
|
4757
4900
|
)
|
|
4758
4901
|
] });
|
|
4759
4902
|
};
|
|
4760
|
-
var
|
|
4903
|
+
var sizeClasses15 = {
|
|
4761
4904
|
sm: { cell: "rh-px-2 rh-py-2 rh-text-xs", header: "rh-px-2 rh-py-2 rh-text-xs" },
|
|
4762
4905
|
md: { cell: "rh-px-3 rh-py-3 rh-text-sm", header: "rh-px-3 rh-py-3 rh-text-xs" },
|
|
4763
4906
|
lg: { cell: "rh-px-4 rh-py-4 rh-text-sm", header: "rh-px-4 rh-py-3 rh-text-sm" }
|
|
@@ -4914,7 +5057,7 @@ function TableInner({
|
|
|
4914
5057
|
...rowPaddingStyle
|
|
4915
5058
|
},
|
|
4916
5059
|
className: [
|
|
4917
|
-
rowPadding ? "" :
|
|
5060
|
+
rowPadding ? "" : sizeClasses15[size].header,
|
|
4918
5061
|
alignClasses[column.align || "left"],
|
|
4919
5062
|
`rh-font-semibold rh-whitespace-nowrap ${headerTextClassName || "rh-text-text-muted"}`,
|
|
4920
5063
|
stickyHeader ? "rh-sticky rh-top-0 rh-bg-surface rh-z-10" : "",
|
|
@@ -4995,7 +5138,7 @@ function TableInner({
|
|
|
4995
5138
|
{
|
|
4996
5139
|
style: { width: column.width, maxWidth: column.maxWidth, ...rowPaddingStyle },
|
|
4997
5140
|
className: [
|
|
4998
|
-
rowPadding ? "" :
|
|
5141
|
+
rowPadding ? "" : sizeClasses15[size].cell,
|
|
4999
5142
|
alignClasses[column.align || "left"],
|
|
5000
5143
|
"rh-text-text"
|
|
5001
5144
|
].filter(Boolean).join(" "),
|
|
@@ -5153,7 +5296,7 @@ var Typography = forwardRef(function Typography2({
|
|
|
5153
5296
|
}, ref) {
|
|
5154
5297
|
const element = as ?? defaultElements[variant];
|
|
5155
5298
|
const weightClass = bold ? "rh-font-bold" : semibold ? "rh-font-semibold" : medium ? "rh-font-medium" : "";
|
|
5156
|
-
return
|
|
5299
|
+
return React10.createElement(
|
|
5157
5300
|
element,
|
|
5158
5301
|
{
|
|
5159
5302
|
ref,
|
|
@@ -5490,6 +5633,6 @@ var GridItem = forwardRef(
|
|
|
5490
5633
|
}
|
|
5491
5634
|
);
|
|
5492
5635
|
|
|
5493
|
-
export { Avatar, Button, Card2 as Card, CardContent, CardFooter, CardHeader, CaretLeftIcon, CaretRightIcon, Checkbox, CloseIcon, Container, DateSelect, DeleteIcon, EditIcon, ErrorIcon, GridContainer, GridItem, IconButton, InfoIcon, NeutralIcon, Pagination, PlusIcon, ProgressBar, Radio, RadioGroup, RadioOption, RehagroProvider, SearchIcon, Select, Spinner, SuccessIcon, Table, Tag, TagInput, TextInput, TimePicker, Toast, ToastContainer, ToastProvider, ToggleGroup, Tooltip, Typography, WarningIcon, useToast };
|
|
5636
|
+
export { Avatar, Button, Card2 as Card, CardContent, CardFooter, CardHeader, CaretLeftIcon, CaretRightIcon, Checkbox, CloseIcon, Container, DateSelect, DeleteIcon, EditIcon, ErrorIcon, GridContainer, GridItem, IconButton, InfoIcon, NeutralIcon, Pagination, PlusIcon, ProgressBar, Radio, RadioGroup, RadioOption, RehagroProvider, SearchIcon, Select, Spinner, SuccessIcon, Table, Tag, TagInput, TextArea, TextInput, TimePicker, Toast, ToastContainer, ToastProvider, ToggleGroup, Tooltip, Typography, WarningIcon, useToast };
|
|
5494
5637
|
//# sourceMappingURL=index.mjs.map
|
|
5495
5638
|
//# sourceMappingURL=index.mjs.map
|