@rehagro/ui 1.0.57 → 1.0.58
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 +40 -1
- package/dist/index.d.ts +40 -1
- package/dist/index.js +576 -30
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +577 -32
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -469,7 +469,7 @@ var Toast = React9.forwardRef(function Toast2({
|
|
|
469
469
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rh-flex-1 rh-min-w-0", children: [
|
|
470
470
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "rh-text-sm rh-font-semibold rh-leading-tight", children: title }),
|
|
471
471
|
description && /* @__PURE__ */ jsxRuntime.jsx(
|
|
472
|
-
"
|
|
472
|
+
"div",
|
|
473
473
|
{
|
|
474
474
|
className: ["rh-mt-1 rh-text-sm rh-leading-normal", descriptionStyles[styleKey]].filter(Boolean).join(" "),
|
|
475
475
|
children: description
|
|
@@ -2756,6 +2756,551 @@ var DateSelect = React9.forwardRef(
|
|
|
2756
2756
|
);
|
|
2757
2757
|
}
|
|
2758
2758
|
);
|
|
2759
|
+
var HOURS = Array.from({ length: 24 }, (_, i) => i);
|
|
2760
|
+
var MINUTES = Array.from({ length: 60 }, (_, i) => i);
|
|
2761
|
+
var ITEM_HEIGHT = 36;
|
|
2762
|
+
var CLOCK_HOURS_OUTER = [12, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11];
|
|
2763
|
+
var CLOCK_HOURS_INNER = [0, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23];
|
|
2764
|
+
var CLOCK_MINUTES = Array.from({ length: 12 }, (_, index) => index * 5);
|
|
2765
|
+
var pad = (n) => String(n).padStart(2, "0");
|
|
2766
|
+
var clampClockPart = (value, max) => Math.min(max, Math.max(0, value));
|
|
2767
|
+
var statusClasses4 = {
|
|
2768
|
+
default: "rh-border-border focus-within:rh-border-primary focus-within:rh-ring-2 focus-within:rh-ring-gray-200",
|
|
2769
|
+
error: "rh-border-danger focus-within:rh-border-danger focus-within:rh-ring-2 focus-within:rh-ring-red-100"
|
|
2770
|
+
};
|
|
2771
|
+
var sizeClasses7 = {
|
|
2772
|
+
sm: "rh-min-h-[32px] rh-text-sm rh-px-input-x-sm",
|
|
2773
|
+
md: "rh-min-h-[40px] rh-text-sm rh-px-input-x-md",
|
|
2774
|
+
lg: "rh-min-h-[48px] rh-text-base rh-px-input-x-lg"
|
|
2775
|
+
};
|
|
2776
|
+
var radiusClasses6 = {
|
|
2777
|
+
none: "rh-rounded-none",
|
|
2778
|
+
xxs: "rh-rounded-xxs",
|
|
2779
|
+
xs: "rh-rounded-xs",
|
|
2780
|
+
sm: "rh-rounded-sm",
|
|
2781
|
+
md: "rh-rounded-md",
|
|
2782
|
+
lg: "rh-rounded-lg",
|
|
2783
|
+
xl: "rh-rounded-xl",
|
|
2784
|
+
full: "rh-rounded-full"
|
|
2785
|
+
};
|
|
2786
|
+
var helperStatusClasses4 = {
|
|
2787
|
+
default: "rh-text-text-muted",
|
|
2788
|
+
error: "rh-text-danger"
|
|
2789
|
+
};
|
|
2790
|
+
var getSubtitleClassName4 = (subtitle) => subtitle.trim() === "*" ? "rh-text-danger" : "rh-text-text-muted";
|
|
2791
|
+
var ClockIcon = () => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2792
|
+
"svg",
|
|
2793
|
+
{
|
|
2794
|
+
width: "16",
|
|
2795
|
+
height: "16",
|
|
2796
|
+
viewBox: "0 0 24 24",
|
|
2797
|
+
fill: "none",
|
|
2798
|
+
stroke: "currentColor",
|
|
2799
|
+
strokeWidth: "2",
|
|
2800
|
+
strokeLinecap: "round",
|
|
2801
|
+
strokeLinejoin: "round",
|
|
2802
|
+
"aria-hidden": "true",
|
|
2803
|
+
children: [
|
|
2804
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "12", cy: "12", r: "10" }),
|
|
2805
|
+
/* @__PURE__ */ jsxRuntime.jsx("polyline", { points: "12 6 12 12 16 14" })
|
|
2806
|
+
]
|
|
2807
|
+
}
|
|
2808
|
+
);
|
|
2809
|
+
var EraserIcon2 = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "15", height: "14", viewBox: "0 0 17 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2810
|
+
"path",
|
|
2811
|
+
{
|
|
2812
|
+
d: "M15.3134 13.7509H9.45406L16.2384 6.96656C16.4416 6.76343 16.6027 6.52227 16.7127 6.25686C16.8226 5.99145 16.8792 5.70697 16.8792 5.41969C16.8792 5.1324 16.8226 4.84793 16.7127 4.58252C16.6027 4.3171 16.4416 4.07594 16.2384 3.87281L13.0033 0.640783C12.8002 0.437631 12.559 0.276481 12.2936 0.166535C12.0282 0.0565888 11.7437 0 11.4564 0C11.1691 0 10.8846 0.0565888 10.6192 0.166535C10.3538 0.276481 10.1127 0.437631 9.90953 0.640783L0.640783 9.90875C0.437631 10.1119 0.276481 10.353 0.166535 10.6185C0.0565888 10.8839 0 11.1683 0 11.4556C0 11.7429 0.0565888 12.0274 0.166535 12.2928C0.276481 12.5582 0.437631 12.7994 0.640783 13.0025L2.98922 15.3517C3.07635 15.4388 3.17977 15.5078 3.29358 15.5548C3.40739 15.6019 3.52935 15.626 3.6525 15.6259H15.3134C15.5621 15.6259 15.8005 15.5272 15.9763 15.3514C16.1522 15.1755 16.2509 14.9371 16.2509 14.6884C16.2509 14.4398 16.1522 14.2013 15.9763 14.0255C15.8005 13.8497 15.5621 13.7509 15.3134 13.7509Z",
|
|
2813
|
+
fill: "currentColor"
|
|
2814
|
+
}
|
|
2815
|
+
) });
|
|
2816
|
+
var PencilIcon = () => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2817
|
+
"svg",
|
|
2818
|
+
{
|
|
2819
|
+
width: "20",
|
|
2820
|
+
height: "20",
|
|
2821
|
+
viewBox: "0 0 24 24",
|
|
2822
|
+
fill: "none",
|
|
2823
|
+
stroke: "currentColor",
|
|
2824
|
+
strokeWidth: "2",
|
|
2825
|
+
strokeLinecap: "round",
|
|
2826
|
+
strokeLinejoin: "round",
|
|
2827
|
+
"aria-hidden": "true",
|
|
2828
|
+
children: [
|
|
2829
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M4 20h4L19 9a2.828 2.828 0 1 0-4-4L4 16v4Z" }),
|
|
2830
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "m13.5 6.5 4 4" })
|
|
2831
|
+
]
|
|
2832
|
+
}
|
|
2833
|
+
);
|
|
2834
|
+
function scrollToSelected(ref, index) {
|
|
2835
|
+
const el = ref.current;
|
|
2836
|
+
if (!el) return;
|
|
2837
|
+
const target = index * ITEM_HEIGHT - el.clientHeight / 2 + ITEM_HEIGHT / 2;
|
|
2838
|
+
el.scrollTop = Math.max(0, target);
|
|
2839
|
+
}
|
|
2840
|
+
function getClockPosition(index, radius) {
|
|
2841
|
+
const angle = index / 12 * Math.PI * 2 - Math.PI / 2;
|
|
2842
|
+
return {
|
|
2843
|
+
left: `calc(50% + ${Math.cos(angle) * radius}px)`,
|
|
2844
|
+
top: `calc(50% + ${Math.sin(angle) * radius}px)`
|
|
2845
|
+
};
|
|
2846
|
+
}
|
|
2847
|
+
var TimePicker = React9.forwardRef(
|
|
2848
|
+
function TimePicker2(props, ref) {
|
|
2849
|
+
const {
|
|
2850
|
+
label,
|
|
2851
|
+
subtitle,
|
|
2852
|
+
placeholder = "Selecione",
|
|
2853
|
+
status = "default",
|
|
2854
|
+
size = "md",
|
|
2855
|
+
radius = "xs",
|
|
2856
|
+
helperText,
|
|
2857
|
+
disabled = false,
|
|
2858
|
+
className = "",
|
|
2859
|
+
wrapperClassName = "",
|
|
2860
|
+
backgroundColor,
|
|
2861
|
+
presentation = "dropdown"
|
|
2862
|
+
} = props;
|
|
2863
|
+
const triggerId = React9__default.default.useId();
|
|
2864
|
+
const helperId = React9__default.default.useId();
|
|
2865
|
+
const isControlled = props.value !== void 0;
|
|
2866
|
+
const [internalValue, setInternalValue] = React9.useState(
|
|
2867
|
+
props.defaultValue ?? null
|
|
2868
|
+
);
|
|
2869
|
+
const committedValue = isControlled ? props.value ?? null : internalValue;
|
|
2870
|
+
const [isOpen, setIsOpen] = React9.useState(false);
|
|
2871
|
+
const [isHelperDismissed, setIsHelperDismissed] = React9.useState(false);
|
|
2872
|
+
const [dropdownAlign, setDropdownAlign] = React9.useState("left");
|
|
2873
|
+
const [clockStep, setClockStep] = React9.useState("hour");
|
|
2874
|
+
const [isManualClockInput, setIsManualClockInput] = React9.useState(false);
|
|
2875
|
+
const [hasPendingValue, setHasPendingValue] = React9.useState(committedValue != null);
|
|
2876
|
+
const [pendingHour, setPendingHour] = React9.useState(committedValue?.hour ?? 0);
|
|
2877
|
+
const [pendingMinute, setPendingMinute] = React9.useState(committedValue?.minute ?? 0);
|
|
2878
|
+
const wrapperRef = React9.useRef(null);
|
|
2879
|
+
const innerRef = React9.useRef(null);
|
|
2880
|
+
const dropdownRef = React9.useRef(null);
|
|
2881
|
+
const hourColRef = React9.useRef(null);
|
|
2882
|
+
const minuteColRef = React9.useRef(null);
|
|
2883
|
+
React9__default.default.useImperativeHandle(ref, () => innerRef.current);
|
|
2884
|
+
const visualStatus = helperText && isHelperDismissed ? "default" : status;
|
|
2885
|
+
React9.useEffect(() => {
|
|
2886
|
+
if (!isOpen) return;
|
|
2887
|
+
const h = committedValue?.hour ?? 0;
|
|
2888
|
+
const m = committedValue?.minute ?? 0;
|
|
2889
|
+
setPendingHour(h);
|
|
2890
|
+
setPendingMinute(m);
|
|
2891
|
+
setClockStep("hour");
|
|
2892
|
+
setIsManualClockInput(false);
|
|
2893
|
+
setHasPendingValue(committedValue != null);
|
|
2894
|
+
if (presentation === "dropdown") {
|
|
2895
|
+
requestAnimationFrame(() => {
|
|
2896
|
+
scrollToSelected(hourColRef, h);
|
|
2897
|
+
scrollToSelected(minuteColRef, m);
|
|
2898
|
+
});
|
|
2899
|
+
}
|
|
2900
|
+
}, [isOpen]);
|
|
2901
|
+
React9.useEffect(() => {
|
|
2902
|
+
if (!isOpen || presentation !== "dropdown" || !innerRef.current) return;
|
|
2903
|
+
const rect = innerRef.current.getBoundingClientRect();
|
|
2904
|
+
const dropdownW = 240;
|
|
2905
|
+
setDropdownAlign(window.innerWidth - rect.right >= dropdownW ? "left" : "right");
|
|
2906
|
+
}, [isOpen, presentation]);
|
|
2907
|
+
React9.useEffect(() => {
|
|
2908
|
+
if (!isOpen || presentation !== "dropdown") return;
|
|
2909
|
+
const handler = (e) => {
|
|
2910
|
+
if (wrapperRef.current && !wrapperRef.current.contains(e.target)) {
|
|
2911
|
+
setIsOpen(false);
|
|
2912
|
+
}
|
|
2913
|
+
};
|
|
2914
|
+
document.addEventListener("mousedown", handler);
|
|
2915
|
+
return () => document.removeEventListener("mousedown", handler);
|
|
2916
|
+
}, [isOpen, presentation]);
|
|
2917
|
+
React9.useEffect(() => {
|
|
2918
|
+
if (!isOpen) return;
|
|
2919
|
+
const handler = (e) => {
|
|
2920
|
+
if (e.key === "Escape") {
|
|
2921
|
+
setIsOpen(false);
|
|
2922
|
+
innerRef.current?.focus();
|
|
2923
|
+
}
|
|
2924
|
+
};
|
|
2925
|
+
document.addEventListener("keydown", handler);
|
|
2926
|
+
return () => document.removeEventListener("keydown", handler);
|
|
2927
|
+
}, [isOpen]);
|
|
2928
|
+
const commit = React9.useCallback(
|
|
2929
|
+
(hour, minute) => {
|
|
2930
|
+
const newValue = { hour, minute };
|
|
2931
|
+
if (helperText) setIsHelperDismissed(true);
|
|
2932
|
+
if (!isControlled) setInternalValue(newValue);
|
|
2933
|
+
props.onChange?.(newValue);
|
|
2934
|
+
setIsOpen(false);
|
|
2935
|
+
},
|
|
2936
|
+
[helperText, isControlled, props]
|
|
2937
|
+
);
|
|
2938
|
+
const handleClear = React9.useCallback(() => {
|
|
2939
|
+
setPendingHour(0);
|
|
2940
|
+
setPendingMinute(0);
|
|
2941
|
+
if (!isControlled) setInternalValue(null);
|
|
2942
|
+
props.onChange?.(void 0);
|
|
2943
|
+
setIsOpen(false);
|
|
2944
|
+
}, [isControlled, props]);
|
|
2945
|
+
const displayText = committedValue != null ? `${pad(committedValue.hour)}:${pad(committedValue.minute)}` : null;
|
|
2946
|
+
const clockDisplayText = hasPendingValue ? `${pad(pendingHour)}:${pad(pendingMinute)}` : "--:--";
|
|
2947
|
+
const closeClockDialog = () => {
|
|
2948
|
+
setIsOpen(false);
|
|
2949
|
+
innerRef.current?.focus();
|
|
2950
|
+
};
|
|
2951
|
+
const handleClockHourChange = (hour) => {
|
|
2952
|
+
setPendingHour(hour);
|
|
2953
|
+
setHasPendingValue(true);
|
|
2954
|
+
setClockStep("minute");
|
|
2955
|
+
};
|
|
2956
|
+
const handleClockMinuteChange = (minute) => {
|
|
2957
|
+
setPendingMinute(minute);
|
|
2958
|
+
setHasPendingValue(true);
|
|
2959
|
+
};
|
|
2960
|
+
const handleManualClockChange = (part, value) => {
|
|
2961
|
+
const numericValue = Number(value.replace(/\D/g, ""));
|
|
2962
|
+
if (Number.isNaN(numericValue)) return;
|
|
2963
|
+
if (part === "hour") {
|
|
2964
|
+
setPendingHour(clampClockPart(numericValue, 23));
|
|
2965
|
+
} else {
|
|
2966
|
+
setPendingMinute(clampClockPart(numericValue, 59));
|
|
2967
|
+
}
|
|
2968
|
+
setHasPendingValue(true);
|
|
2969
|
+
};
|
|
2970
|
+
const clockHourButton = (hour, index, radius2) => {
|
|
2971
|
+
const selected = hasPendingValue && pendingHour === hour;
|
|
2972
|
+
const position = getClockPosition(index, radius2);
|
|
2973
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2974
|
+
"button",
|
|
2975
|
+
{
|
|
2976
|
+
type: "button",
|
|
2977
|
+
"aria-label": `${pad(hour)} horas`,
|
|
2978
|
+
onClick: () => handleClockHourChange(hour),
|
|
2979
|
+
className: [
|
|
2980
|
+
"rh-absolute rh-flex rh-h-8 rh-w-8 -rh-translate-x-1/2 -rh-translate-y-1/2 rh-items-center rh-justify-center rh-rounded-full rh-text-sm rh-transition-colors rh-duration-150",
|
|
2981
|
+
selected ? "rh-bg-primary rh-font-semibold rh-text-surface" : "rh-text-text hover:rh-bg-border/40"
|
|
2982
|
+
].join(" "),
|
|
2983
|
+
style: position,
|
|
2984
|
+
children: pad(hour)
|
|
2985
|
+
},
|
|
2986
|
+
hour
|
|
2987
|
+
);
|
|
2988
|
+
};
|
|
2989
|
+
const clockMinuteButton = (minute, index) => {
|
|
2990
|
+
const selected = hasPendingValue && pendingMinute === minute;
|
|
2991
|
+
const position = getClockPosition(index, 102);
|
|
2992
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2993
|
+
"button",
|
|
2994
|
+
{
|
|
2995
|
+
type: "button",
|
|
2996
|
+
"aria-label": `${pad(minute)} minutos`,
|
|
2997
|
+
onClick: () => handleClockMinuteChange(minute),
|
|
2998
|
+
className: [
|
|
2999
|
+
"rh-absolute rh-flex rh-h-8 rh-w-8 -rh-translate-x-1/2 -rh-translate-y-1/2 rh-items-center rh-justify-center rh-rounded-full rh-text-sm rh-transition-colors rh-duration-150",
|
|
3000
|
+
selected ? "rh-bg-primary rh-font-semibold rh-text-surface" : "rh-text-text hover:rh-bg-border/40"
|
|
3001
|
+
].join(" "),
|
|
3002
|
+
style: position,
|
|
3003
|
+
children: pad(minute)
|
|
3004
|
+
},
|
|
3005
|
+
minute
|
|
3006
|
+
);
|
|
3007
|
+
};
|
|
3008
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3009
|
+
"div",
|
|
3010
|
+
{
|
|
3011
|
+
ref: wrapperRef,
|
|
3012
|
+
className: ["rh-relative rh-flex rh-flex-col rh-gap-1 rh-font-body", wrapperClassName].filter(Boolean).join(" "),
|
|
3013
|
+
children: [
|
|
3014
|
+
label && /* @__PURE__ */ jsxRuntime.jsxs("label", { id: `${triggerId}-label`, className: "rh-flex rh-items-baseline rh-gap-1", children: [
|
|
3015
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "rh-text-sm rh-font-medium rh-text-text", children: label }),
|
|
3016
|
+
subtitle && /* @__PURE__ */ jsxRuntime.jsx("span", { className: `rh-text-sm ${getSubtitleClassName4(subtitle)}`, children: subtitle })
|
|
3017
|
+
] }),
|
|
3018
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
3019
|
+
"button",
|
|
3020
|
+
{
|
|
3021
|
+
ref: innerRef,
|
|
3022
|
+
id: triggerId,
|
|
3023
|
+
type: "button",
|
|
3024
|
+
role: "combobox",
|
|
3025
|
+
"aria-expanded": isOpen,
|
|
3026
|
+
"aria-haspopup": "dialog",
|
|
3027
|
+
"aria-labelledby": label ? `${triggerId}-label` : void 0,
|
|
3028
|
+
"aria-describedby": helperText ? helperId : void 0,
|
|
3029
|
+
"aria-invalid": visualStatus === "error" || void 0,
|
|
3030
|
+
"aria-disabled": disabled || void 0,
|
|
3031
|
+
disabled,
|
|
3032
|
+
onClick: () => !disabled && setIsOpen((o) => !o),
|
|
3033
|
+
style: backgroundColor ? { backgroundColor } : void 0,
|
|
3034
|
+
className: [
|
|
3035
|
+
"rh-group rh-flex rh-items-center rh-justify-between rh-gap-2",
|
|
3036
|
+
"rh-border rh-font-body",
|
|
3037
|
+
!backgroundColor && "rh-bg-surface",
|
|
3038
|
+
"rh-transition-colors rh-duration-150",
|
|
3039
|
+
"rh-text-left rh-w-full",
|
|
3040
|
+
statusClasses4[visualStatus],
|
|
3041
|
+
radiusClasses6[radius],
|
|
3042
|
+
sizeClasses7[size],
|
|
3043
|
+
disabled ? "rh-opacity-50 rh-cursor-not-allowed rh-bg-background" : "rh-cursor-pointer",
|
|
3044
|
+
className
|
|
3045
|
+
].filter(Boolean).join(" "),
|
|
3046
|
+
children: [
|
|
3047
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3048
|
+
"span",
|
|
3049
|
+
{
|
|
3050
|
+
className: [
|
|
3051
|
+
"rh-flex-1 rh-truncate",
|
|
3052
|
+
displayText ? "rh-text-text" : "rh-text-text-muted group-hover:rh-text-text"
|
|
3053
|
+
].join(" "),
|
|
3054
|
+
children: displayText ?? placeholder
|
|
3055
|
+
}
|
|
3056
|
+
),
|
|
3057
|
+
/* @__PURE__ */ jsxRuntime.jsx(ClockIcon, {})
|
|
3058
|
+
]
|
|
3059
|
+
}
|
|
3060
|
+
),
|
|
3061
|
+
isOpen && presentation === "dropdown" && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3062
|
+
"div",
|
|
3063
|
+
{
|
|
3064
|
+
ref: dropdownRef,
|
|
3065
|
+
role: "dialog",
|
|
3066
|
+
"aria-label": "Seletor de hora",
|
|
3067
|
+
className: [
|
|
3068
|
+
"rh-absolute rh-z-50 rh-mt-1",
|
|
3069
|
+
"rh-bg-surface rh-rounded-xs rh-border rh-border-border",
|
|
3070
|
+
"rh-w-[240px]",
|
|
3071
|
+
dropdownAlign === "left" ? "rh-left-0" : "rh-right-0"
|
|
3072
|
+
].filter(Boolean).join(" "),
|
|
3073
|
+
style: {
|
|
3074
|
+
top: "100%",
|
|
3075
|
+
boxShadow: "0 0 9.6px 0 rgba(8, 11, 18, 0.08)"
|
|
3076
|
+
},
|
|
3077
|
+
children: [
|
|
3078
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rh-flex rh-border-b rh-border-border", children: [
|
|
3079
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "rh-flex-1 rh-py-2 rh-text-center rh-text-xs rh-font-semibold rh-text-text-muted rh-uppercase rh-tracking-wide", children: "Hora" }),
|
|
3080
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "rh-w-px rh-bg-border" }),
|
|
3081
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "rh-flex-1 rh-py-2 rh-text-center rh-text-xs rh-font-semibold rh-text-text-muted rh-uppercase rh-tracking-wide", children: "Minuto" })
|
|
3082
|
+
] }),
|
|
3083
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rh-flex", style: { height: 216 }, children: [
|
|
3084
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3085
|
+
"div",
|
|
3086
|
+
{
|
|
3087
|
+
ref: hourColRef,
|
|
3088
|
+
className: "rh-flex-1 rh-overflow-y-auto rh-py-1 rh-scrollbar-thin",
|
|
3089
|
+
style: { scrollbarWidth: "none" },
|
|
3090
|
+
children: HOURS.map((h) => {
|
|
3091
|
+
const selected = h === pendingHour;
|
|
3092
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3093
|
+
"button",
|
|
3094
|
+
{
|
|
3095
|
+
type: "button",
|
|
3096
|
+
onClick: () => setPendingHour(h),
|
|
3097
|
+
style: { height: ITEM_HEIGHT },
|
|
3098
|
+
className: [
|
|
3099
|
+
"rh-w-full rh-flex rh-items-center rh-justify-center rh-text-sm rh-transition-colors rh-duration-100",
|
|
3100
|
+
selected ? "rh-bg-primary rh-text-surface rh-font-semibold" : "rh-text-text hover:rh-bg-background"
|
|
3101
|
+
].join(" "),
|
|
3102
|
+
children: pad(h)
|
|
3103
|
+
},
|
|
3104
|
+
h
|
|
3105
|
+
);
|
|
3106
|
+
})
|
|
3107
|
+
}
|
|
3108
|
+
),
|
|
3109
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "rh-w-px rh-bg-border rh-self-stretch" }),
|
|
3110
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3111
|
+
"div",
|
|
3112
|
+
{
|
|
3113
|
+
ref: minuteColRef,
|
|
3114
|
+
className: "rh-flex-1 rh-overflow-y-auto rh-py-1",
|
|
3115
|
+
style: { scrollbarWidth: "none" },
|
|
3116
|
+
children: MINUTES.map((m) => {
|
|
3117
|
+
const selected = m === pendingMinute;
|
|
3118
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3119
|
+
"button",
|
|
3120
|
+
{
|
|
3121
|
+
type: "button",
|
|
3122
|
+
onClick: () => setPendingMinute(m),
|
|
3123
|
+
style: { height: ITEM_HEIGHT },
|
|
3124
|
+
className: [
|
|
3125
|
+
"rh-w-full rh-flex rh-items-center rh-justify-center rh-text-sm rh-transition-colors rh-duration-100",
|
|
3126
|
+
selected ? "rh-bg-primary rh-text-surface rh-font-semibold" : "rh-text-text hover:rh-bg-background"
|
|
3127
|
+
].join(" "),
|
|
3128
|
+
children: pad(m)
|
|
3129
|
+
},
|
|
3130
|
+
m
|
|
3131
|
+
);
|
|
3132
|
+
})
|
|
3133
|
+
}
|
|
3134
|
+
)
|
|
3135
|
+
] }),
|
|
3136
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rh-flex rh-items-center rh-justify-between rh-px-3 rh-py-2 rh-border-t rh-border-border", children: [
|
|
3137
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
3138
|
+
"button",
|
|
3139
|
+
{
|
|
3140
|
+
type: "button",
|
|
3141
|
+
onClick: handleClear,
|
|
3142
|
+
className: "rh-flex rh-items-center rh-gap-1.5 rh-text-sm rh-text-text rh-font-medium rh-px-2 rh-py-1.5 rh-rounded-sm hover:rh-bg-background rh-transition-colors rh-duration-150",
|
|
3143
|
+
children: [
|
|
3144
|
+
/* @__PURE__ */ jsxRuntime.jsx(EraserIcon2, {}),
|
|
3145
|
+
"Limpar"
|
|
3146
|
+
]
|
|
3147
|
+
}
|
|
3148
|
+
),
|
|
3149
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3150
|
+
"button",
|
|
3151
|
+
{
|
|
3152
|
+
type: "button",
|
|
3153
|
+
onClick: () => commit(pendingHour, pendingMinute),
|
|
3154
|
+
className: "rh-text-sm rh-font-medium rh-px-4 rh-py-1.5 rh-rounded-lg rh-bg-primary rh-text-surface hover:rh-opacity-90 rh-transition-opacity rh-duration-150",
|
|
3155
|
+
children: "Aplicar"
|
|
3156
|
+
}
|
|
3157
|
+
)
|
|
3158
|
+
] })
|
|
3159
|
+
]
|
|
3160
|
+
}
|
|
3161
|
+
),
|
|
3162
|
+
isOpen && presentation === "clock" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3163
|
+
"div",
|
|
3164
|
+
{
|
|
3165
|
+
role: "presentation",
|
|
3166
|
+
className: "rh-fixed rh-inset-0 rh-z-50 rh-flex rh-items-center rh-justify-center rh-bg-text/50 rh-p-4",
|
|
3167
|
+
onMouseDown: (event) => {
|
|
3168
|
+
if (event.target === event.currentTarget) closeClockDialog();
|
|
3169
|
+
},
|
|
3170
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3171
|
+
"div",
|
|
3172
|
+
{
|
|
3173
|
+
ref: dropdownRef,
|
|
3174
|
+
role: "dialog",
|
|
3175
|
+
"aria-modal": "true",
|
|
3176
|
+
"aria-label": "Seletor de hora",
|
|
3177
|
+
className: "rh-flex rh-w-full rh-max-w-[360px] rh-flex-col rh-rounded-sm rh-bg-surface rh-p-6 rh-text-text",
|
|
3178
|
+
style: { boxShadow: "0 24px 48px rgb(8 11 18 / 0.24)" },
|
|
3179
|
+
children: [
|
|
3180
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "rh-text-sm rh-font-normal rh-uppercase rh-text-text-muted", children: "Selecione a hora" }),
|
|
3181
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rh-mt-6 rh-flex rh-items-center rh-justify-between", children: [
|
|
3182
|
+
isManualClockInput ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rh-flex rh-items-center rh-gap-2", children: [
|
|
3183
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3184
|
+
"input",
|
|
3185
|
+
{
|
|
3186
|
+
"aria-label": "Hora",
|
|
3187
|
+
inputMode: "numeric",
|
|
3188
|
+
maxLength: 2,
|
|
3189
|
+
value: pad(pendingHour),
|
|
3190
|
+
onChange: (event) => handleManualClockChange("hour", event.target.value),
|
|
3191
|
+
className: "rh-h-12 rh-w-14 rh-rounded-xs rh-border rh-border-border rh-bg-surface rh-text-center rh-text-2xl rh-font-semibold rh-text-text rh-outline-none focus:rh-border-primary focus:rh-ring-2 focus:rh-ring-gray-200"
|
|
3192
|
+
}
|
|
3193
|
+
),
|
|
3194
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "rh-text-3xl rh-font-semibold rh-text-text-muted", children: ":" }),
|
|
3195
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3196
|
+
"input",
|
|
3197
|
+
{
|
|
3198
|
+
"aria-label": "Minuto",
|
|
3199
|
+
inputMode: "numeric",
|
|
3200
|
+
maxLength: 2,
|
|
3201
|
+
value: pad(pendingMinute),
|
|
3202
|
+
onChange: (event) => handleManualClockChange("minute", event.target.value),
|
|
3203
|
+
className: "rh-h-12 rh-w-14 rh-rounded-xs rh-border rh-border-border rh-bg-surface rh-text-center rh-text-2xl rh-font-semibold rh-text-text rh-outline-none focus:rh-border-primary focus:rh-ring-2 focus:rh-ring-gray-200"
|
|
3204
|
+
}
|
|
3205
|
+
)
|
|
3206
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rh-flex rh-items-center rh-gap-1 rh-text-3xl rh-font-semibold", children: [
|
|
3207
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3208
|
+
"button",
|
|
3209
|
+
{
|
|
3210
|
+
type: "button",
|
|
3211
|
+
onClick: () => setClockStep("hour"),
|
|
3212
|
+
className: [
|
|
3213
|
+
"rh-rounded-xs rh-px-1 rh-transition-colors rh-duration-150",
|
|
3214
|
+
clockStep === "hour" ? "rh-text-text" : "rh-text-text-muted hover:rh-bg-background"
|
|
3215
|
+
].join(" "),
|
|
3216
|
+
children: clockDisplayText.slice(0, 2)
|
|
3217
|
+
}
|
|
3218
|
+
),
|
|
3219
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "rh-text-text-muted", children: ":" }),
|
|
3220
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3221
|
+
"button",
|
|
3222
|
+
{
|
|
3223
|
+
type: "button",
|
|
3224
|
+
onClick: () => setClockStep("minute"),
|
|
3225
|
+
className: [
|
|
3226
|
+
"rh-rounded-xs rh-px-1 rh-transition-colors rh-duration-150",
|
|
3227
|
+
clockStep === "minute" ? "rh-text-text" : "rh-text-text-muted hover:rh-bg-background"
|
|
3228
|
+
].join(" "),
|
|
3229
|
+
children: clockDisplayText.slice(3, 5)
|
|
3230
|
+
}
|
|
3231
|
+
)
|
|
3232
|
+
] }),
|
|
3233
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3234
|
+
"button",
|
|
3235
|
+
{
|
|
3236
|
+
type: "button",
|
|
3237
|
+
"aria-label": isManualClockInput ? "Voltar ao rel\xF3gio" : "Digitar hor\xE1rio manualmente",
|
|
3238
|
+
onClick: () => setIsManualClockInput((current) => !current),
|
|
3239
|
+
className: "rh-rounded-full rh-p-2 rh-text-text hover:rh-bg-background",
|
|
3240
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(PencilIcon, {})
|
|
3241
|
+
}
|
|
3242
|
+
)
|
|
3243
|
+
] }),
|
|
3244
|
+
!isManualClockInput && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rh-mx-auto rh-mt-8 rh-flex rh-h-[256px] rh-w-[256px] rh-items-center rh-justify-center rh-rounded-full rh-bg-background", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rh-relative rh-h-full rh-w-full", children: [
|
|
3245
|
+
clockStep === "hour" ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
3246
|
+
CLOCK_HOURS_OUTER.map(
|
|
3247
|
+
(hour, index) => clockHourButton(hour, index, 102)
|
|
3248
|
+
),
|
|
3249
|
+
CLOCK_HOURS_INNER.map(
|
|
3250
|
+
(hour, index) => clockHourButton(hour, index, 68)
|
|
3251
|
+
)
|
|
3252
|
+
] }) : CLOCK_MINUTES.map(
|
|
3253
|
+
(minute, index) => clockMinuteButton(minute, index)
|
|
3254
|
+
),
|
|
3255
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "rh-absolute rh-left-1/2 rh-top-1/2 rh-h-2 rh-w-2 -rh-translate-x-1/2 -rh-translate-y-1/2 rh-rounded-full rh-bg-primary" })
|
|
3256
|
+
] }) }),
|
|
3257
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rh-mt-8 rh-flex rh-justify-end rh-gap-6", children: [
|
|
3258
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3259
|
+
"button",
|
|
3260
|
+
{
|
|
3261
|
+
type: "button",
|
|
3262
|
+
onClick: closeClockDialog,
|
|
3263
|
+
className: "rh-text-base rh-font-medium rh-uppercase rh-text-primary hover:rh-opacity-80",
|
|
3264
|
+
children: "Cancelar"
|
|
3265
|
+
}
|
|
3266
|
+
),
|
|
3267
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3268
|
+
"button",
|
|
3269
|
+
{
|
|
3270
|
+
type: "button",
|
|
3271
|
+
onClick: () => {
|
|
3272
|
+
if (hasPendingValue) commit(pendingHour, pendingMinute);
|
|
3273
|
+
else closeClockDialog();
|
|
3274
|
+
},
|
|
3275
|
+
className: "rh-text-base rh-font-medium rh-uppercase rh-text-primary hover:rh-opacity-80",
|
|
3276
|
+
children: "OK"
|
|
3277
|
+
}
|
|
3278
|
+
)
|
|
3279
|
+
] })
|
|
3280
|
+
]
|
|
3281
|
+
}
|
|
3282
|
+
)
|
|
3283
|
+
}
|
|
3284
|
+
),
|
|
3285
|
+
helperText && !isHelperDismissed && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3286
|
+
"span",
|
|
3287
|
+
{
|
|
3288
|
+
id: helperId,
|
|
3289
|
+
className: [
|
|
3290
|
+
"rh-flex rh-items-center rh-gap-1 rh-text-xs",
|
|
3291
|
+
helperStatusClasses4[visualStatus]
|
|
3292
|
+
].join(" "),
|
|
3293
|
+
children: [
|
|
3294
|
+
/* @__PURE__ */ jsxRuntime.jsx(WarningCircleIcon, {}),
|
|
3295
|
+
helperText
|
|
3296
|
+
]
|
|
3297
|
+
}
|
|
3298
|
+
)
|
|
3299
|
+
]
|
|
3300
|
+
}
|
|
3301
|
+
);
|
|
3302
|
+
}
|
|
3303
|
+
);
|
|
2759
3304
|
var variantClasses = {
|
|
2760
3305
|
light: "rh-bg-surface rh-text-text rh-border rh-border-border rh-shadow-md",
|
|
2761
3306
|
default: "rh-bg-primary/10 rh-text-text rh-border rh-border-primary/20 rh-shadow-md",
|
|
@@ -2766,7 +3311,7 @@ var arrowVariantClasses = {
|
|
|
2766
3311
|
default: "rh-border-primary/20 rh-bg-primary/10",
|
|
2767
3312
|
dark: "rh-bg-primary"
|
|
2768
3313
|
};
|
|
2769
|
-
var
|
|
3314
|
+
var sizeClasses8 = {
|
|
2770
3315
|
sm: "rh-px-3 rh-py-1.5 rh-text-xs",
|
|
2771
3316
|
md: "rh-px-4 rh-py-3 rh-text-sm"
|
|
2772
3317
|
};
|
|
@@ -2897,7 +3442,7 @@ var Tooltip = React9.forwardRef(
|
|
|
2897
3442
|
"rh-absolute rh-z-50 rh-w-max rh-max-w-xs rh-rounded-xs",
|
|
2898
3443
|
tooltipPlacementClasses[placement],
|
|
2899
3444
|
variantClasses[variant],
|
|
2900
|
-
|
|
3445
|
+
sizeClasses8[size],
|
|
2901
3446
|
className
|
|
2902
3447
|
].filter(Boolean).join(" "),
|
|
2903
3448
|
children: [
|
|
@@ -2998,7 +3543,7 @@ function getAvatarColors(name) {
|
|
|
2998
3543
|
const index = hash % AVATAR_COLORS.length;
|
|
2999
3544
|
return AVATAR_COLORS[index];
|
|
3000
3545
|
}
|
|
3001
|
-
var
|
|
3546
|
+
var sizeClasses9 = {
|
|
3002
3547
|
sm: "rh-w-8 rh-h-8 rh-text-xs",
|
|
3003
3548
|
md: "rh-w-10 rh-h-10 rh-text-sm",
|
|
3004
3549
|
lg: "rh-w-12 rh-h-12 rh-text-base",
|
|
@@ -3033,7 +3578,7 @@ var Avatar = React9.forwardRef(function Avatar2({ src, alt = "", initials, size
|
|
|
3033
3578
|
"rh-inline-flex rh-items-center rh-justify-center rh-shrink-0 rh-overflow-hidden",
|
|
3034
3579
|
avatarColors ? "" : "rh-bg-primary rh-text-surface",
|
|
3035
3580
|
"rh-font-display rh-font-medium rh-select-none",
|
|
3036
|
-
|
|
3581
|
+
sizeClasses9[size],
|
|
3037
3582
|
variantClasses2[variant],
|
|
3038
3583
|
className
|
|
3039
3584
|
].filter(Boolean).join(" "),
|
|
@@ -3100,7 +3645,7 @@ var hoverInactivePresetClasses = {
|
|
|
3100
3645
|
info: "hover:rh-bg-info/20 hover:rh-border-info/50",
|
|
3101
3646
|
neutral: "hover:rh-bg-neutral/20 hover:rh-border-neutral/50"
|
|
3102
3647
|
};
|
|
3103
|
-
var
|
|
3648
|
+
var sizeClasses10 = {
|
|
3104
3649
|
sm: "rh-text-xs rh-px-2 rh-py-0.5 rh-gap-1",
|
|
3105
3650
|
md: "rh-text-sm rh-px-2.5 rh-py-1 rh-gap-1.5",
|
|
3106
3651
|
lg: "rh-text-sm rh-px-3 rh-py-1.5 rh-gap-1.5"
|
|
@@ -3147,7 +3692,7 @@ var Tag = React9.forwardRef(function Tag2({
|
|
|
3147
3692
|
"rh-transition-colors rh-duration-150",
|
|
3148
3693
|
"rh-cursor-pointer",
|
|
3149
3694
|
clickable ? "rh-cursor-pointer" : "",
|
|
3150
|
-
|
|
3695
|
+
sizeClasses10[size],
|
|
3151
3696
|
colorClasses3,
|
|
3152
3697
|
hoverClasses,
|
|
3153
3698
|
disabled ? "rh-opacity-50 rh-cursor-not-allowed rh-pointer-events-none" : "",
|
|
@@ -3164,16 +3709,16 @@ var Tag = React9.forwardRef(function Tag2({
|
|
|
3164
3709
|
}
|
|
3165
3710
|
);
|
|
3166
3711
|
});
|
|
3167
|
-
var
|
|
3712
|
+
var statusClasses5 = {
|
|
3168
3713
|
default: "rh-border-border focus-within:rh-ring-2 focus-within:rh-ring-ring focus-within:rh-ring-offset-2",
|
|
3169
3714
|
error: "rh-border-danger focus-within:rh-ring-2 focus-within:rh-ring-danger focus-within:rh-ring-offset-2"
|
|
3170
3715
|
};
|
|
3171
|
-
var
|
|
3716
|
+
var sizeClasses11 = {
|
|
3172
3717
|
sm: "rh-min-h-[36px] rh-text-sm rh-px-2 rh-py-1",
|
|
3173
3718
|
md: "rh-h-[44px] rh-text-sm rh-px-2 rh-py-[6px]",
|
|
3174
3719
|
lg: "rh-min-h-[52px] rh-text-base rh-px-3 rh-py-2"
|
|
3175
3720
|
};
|
|
3176
|
-
var
|
|
3721
|
+
var radiusClasses7 = {
|
|
3177
3722
|
none: "rh-rounded-none",
|
|
3178
3723
|
xxs: "rh-rounded-xxs",
|
|
3179
3724
|
xs: "rh-rounded-xs",
|
|
@@ -3183,7 +3728,7 @@ var radiusClasses6 = {
|
|
|
3183
3728
|
xl: "rh-rounded-xl",
|
|
3184
3729
|
full: "rh-rounded-full"
|
|
3185
3730
|
};
|
|
3186
|
-
var
|
|
3731
|
+
var helperStatusClasses5 = {
|
|
3187
3732
|
default: "rh-text-text-muted",
|
|
3188
3733
|
error: "rh-text-danger"
|
|
3189
3734
|
};
|
|
@@ -3202,7 +3747,7 @@ var addButtonSizeClasses = {
|
|
|
3202
3747
|
md: "rh-w-5 rh-h-5",
|
|
3203
3748
|
lg: "rh-w-5 rh-h-5"
|
|
3204
3749
|
};
|
|
3205
|
-
var
|
|
3750
|
+
var getSubtitleClassName5 = (subtitle) => subtitle.trim() === "*" ? "rh-text-danger" : "rh-text-text-muted";
|
|
3206
3751
|
var TagInput = React9.forwardRef(function TagInput2({
|
|
3207
3752
|
label,
|
|
3208
3753
|
subtitle,
|
|
@@ -3259,7 +3804,7 @@ var TagInput = React9.forwardRef(function TagInput2({
|
|
|
3259
3804
|
children: [
|
|
3260
3805
|
label && /* @__PURE__ */ jsxRuntime.jsxs("label", { htmlFor: inputId, className: "rh-flex rh-items-baseline rh-gap-1", children: [
|
|
3261
3806
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "rh-text-sm rh-font-semibold rh-text-text", children: label }),
|
|
3262
|
-
subtitle && /* @__PURE__ */ jsxRuntime.jsx("span", { className: `rh-text-sm ${
|
|
3807
|
+
subtitle && /* @__PURE__ */ jsxRuntime.jsx("span", { className: `rh-text-sm ${getSubtitleClassName5(subtitle)}`, children: subtitle })
|
|
3263
3808
|
] }),
|
|
3264
3809
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
3265
3810
|
"div",
|
|
@@ -3269,9 +3814,9 @@ var TagInput = React9.forwardRef(function TagInput2({
|
|
|
3269
3814
|
"rh-flex rh-flex-row rh-items-center rh-justify-between rh-gap-2",
|
|
3270
3815
|
"rh-border rh-bg-surface rh-font-body",
|
|
3271
3816
|
"rh-transition-colors rh-duration-150",
|
|
3272
|
-
|
|
3273
|
-
|
|
3274
|
-
|
|
3817
|
+
statusClasses5[status],
|
|
3818
|
+
radiusClasses7[radius],
|
|
3819
|
+
sizeClasses11[size],
|
|
3275
3820
|
disabled ? "rh-opacity-50 rh-cursor-not-allowed rh-bg-background" : "rh-cursor-pointer",
|
|
3276
3821
|
className
|
|
3277
3822
|
].filter(Boolean).join(" "),
|
|
@@ -3434,7 +3979,7 @@ var TagInput = React9.forwardRef(function TagInput2({
|
|
|
3434
3979
|
id: `${inputId}-helper`,
|
|
3435
3980
|
className: [
|
|
3436
3981
|
"rh-flex rh-items-center rh-gap-1 rh-text-xs",
|
|
3437
|
-
|
|
3982
|
+
helperStatusClasses5[status]
|
|
3438
3983
|
].join(" "),
|
|
3439
3984
|
children: helperText
|
|
3440
3985
|
}
|
|
@@ -3541,12 +4086,12 @@ var PRESET_COLORS5 = /* @__PURE__ */ new Set([
|
|
|
3541
4086
|
"info"
|
|
3542
4087
|
]);
|
|
3543
4088
|
var isPresetColor5 = (color) => PRESET_COLORS5.has(color);
|
|
3544
|
-
var
|
|
4089
|
+
var sizeClasses12 = {
|
|
3545
4090
|
sm: { container: "rh-h-8", button: "rh-px-2 rh-text-xs" },
|
|
3546
4091
|
md: { container: "rh-h-9", button: "rh-px-3 rh-text-sm" },
|
|
3547
4092
|
lg: { container: "rh-h-10", button: "rh-px-4 rh-text-sm" }
|
|
3548
4093
|
};
|
|
3549
|
-
var
|
|
4094
|
+
var radiusClasses8 = {
|
|
3550
4095
|
none: "rh-rounded-none",
|
|
3551
4096
|
xs: "rh-rounded-xs",
|
|
3552
4097
|
sm: "rh-rounded-sm",
|
|
@@ -3579,8 +4124,8 @@ function ToggleGroupInner({
|
|
|
3579
4124
|
className: [
|
|
3580
4125
|
"rh-inline-flex rh-items-center rh-bg-muted rh-overflow-hidden",
|
|
3581
4126
|
"rh-p-1 rh-gap-0.5",
|
|
3582
|
-
|
|
3583
|
-
|
|
4127
|
+
radiusClasses8[radius],
|
|
4128
|
+
sizeClasses12[size].container,
|
|
3584
4129
|
disabled ? "rh-opacity-50 rh-cursor-not-allowed" : "",
|
|
3585
4130
|
className
|
|
3586
4131
|
].filter(Boolean).join(" "),
|
|
@@ -3602,8 +4147,8 @@ function ToggleGroupInner({
|
|
|
3602
4147
|
"rh-border-0 rh-font-display rh-font-medium",
|
|
3603
4148
|
"rh-transition-all rh-duration-150",
|
|
3604
4149
|
"focus-visible:rh-outline-none focus-visible:rh-ring-2 focus-visible:rh-ring-ring",
|
|
3605
|
-
|
|
3606
|
-
|
|
4150
|
+
radiusClasses8[radius],
|
|
4151
|
+
sizeClasses12[size].button,
|
|
3607
4152
|
isActive ? "rh-bg-surface rh-text-text rh-shadow-sm" : "rh-bg-transparent rh-text-text-muted",
|
|
3608
4153
|
!isActive && !isDisabled ? "hover:rh-bg-surface/50" : "",
|
|
3609
4154
|
isDisabled ? "rh-cursor-not-allowed rh-pointer-events-none" : "rh-cursor-pointer"
|
|
@@ -3626,7 +4171,7 @@ var variantClasses3 = {
|
|
|
3626
4171
|
outlined: "rh-bg-surface rh-border rh-border-border rh-shadow-none",
|
|
3627
4172
|
filled: "rh-bg-background rh-border-0 rh-shadow-none"
|
|
3628
4173
|
};
|
|
3629
|
-
var
|
|
4174
|
+
var radiusClasses9 = {
|
|
3630
4175
|
none: "rh-rounded-none",
|
|
3631
4176
|
xs: "rh-rounded-xs",
|
|
3632
4177
|
sm: "rh-rounded-sm",
|
|
@@ -3661,7 +4206,7 @@ var CardRoot = React9.forwardRef(function Card({
|
|
|
3661
4206
|
className: [
|
|
3662
4207
|
"rh-font-body rh-transition-all rh-duration-150",
|
|
3663
4208
|
variantClasses3[variant],
|
|
3664
|
-
|
|
4209
|
+
radiusClasses9[radius],
|
|
3665
4210
|
paddingClasses[padding],
|
|
3666
4211
|
isInteractive ? "rh-cursor-pointer hover:rh-shadow-lg hover:rh-scale-[1.01] active:rh-scale-[0.99]" : "",
|
|
3667
4212
|
disabled ? "rh-opacity-50 rh-cursor-not-allowed rh-pointer-events-none" : "",
|
|
@@ -3714,7 +4259,7 @@ var PRESET_COLORS6 = /* @__PURE__ */ new Set([
|
|
|
3714
4259
|
"info"
|
|
3715
4260
|
]);
|
|
3716
4261
|
var isPresetColor6 = (color) => PRESET_COLORS6.has(color);
|
|
3717
|
-
var
|
|
4262
|
+
var sizeClasses13 = {
|
|
3718
4263
|
xs: "rh-w-3 rh-h-3",
|
|
3719
4264
|
sm: "rh-w-4 rh-h-4",
|
|
3720
4265
|
md: "rh-w-6 rh-h-6",
|
|
@@ -3742,7 +4287,7 @@ var Spinner = React9.forwardRef(function Spinner2({ size = "md", color = "primar
|
|
|
3742
4287
|
"aria-label": label,
|
|
3743
4288
|
className: [
|
|
3744
4289
|
"rh-inline-flex rh-items-center rh-justify-center",
|
|
3745
|
-
|
|
4290
|
+
sizeClasses13[size],
|
|
3746
4291
|
colorClass,
|
|
3747
4292
|
className
|
|
3748
4293
|
].filter(Boolean).join(" "),
|
|
@@ -4195,7 +4740,7 @@ var CustomSelect = ({
|
|
|
4195
4740
|
)
|
|
4196
4741
|
] });
|
|
4197
4742
|
};
|
|
4198
|
-
var
|
|
4743
|
+
var sizeClasses14 = {
|
|
4199
4744
|
sm: { cell: "rh-px-2 rh-py-2 rh-text-xs", header: "rh-px-2 rh-py-2 rh-text-xs" },
|
|
4200
4745
|
md: { cell: "rh-px-3 rh-py-3 rh-text-sm", header: "rh-px-3 rh-py-3 rh-text-xs" },
|
|
4201
4746
|
lg: { cell: "rh-px-4 rh-py-4 rh-text-sm", header: "rh-px-4 rh-py-3 rh-text-sm" }
|
|
@@ -4350,7 +4895,7 @@ function TableInner({
|
|
|
4350
4895
|
...rowPaddingStyle
|
|
4351
4896
|
},
|
|
4352
4897
|
className: [
|
|
4353
|
-
rowPadding ? "" :
|
|
4898
|
+
rowPadding ? "" : sizeClasses14[size].header,
|
|
4354
4899
|
alignClasses[column.align || "left"],
|
|
4355
4900
|
`rh-font-semibold rh-whitespace-nowrap ${headerTextClassName || "rh-text-text-muted"}`,
|
|
4356
4901
|
stickyHeader ? "rh-sticky rh-top-0 rh-bg-surface rh-z-10" : "",
|
|
@@ -4431,7 +4976,7 @@ function TableInner({
|
|
|
4431
4976
|
{
|
|
4432
4977
|
style: { width: column.width, maxWidth: column.maxWidth, ...rowPaddingStyle },
|
|
4433
4978
|
className: [
|
|
4434
|
-
rowPadding ? "" :
|
|
4979
|
+
rowPadding ? "" : sizeClasses14[size].cell,
|
|
4435
4980
|
alignClasses[column.align || "left"],
|
|
4436
4981
|
"rh-text-text"
|
|
4437
4982
|
].filter(Boolean).join(" "),
|
|
@@ -4960,6 +5505,7 @@ exports.Table = Table;
|
|
|
4960
5505
|
exports.Tag = Tag;
|
|
4961
5506
|
exports.TagInput = TagInput;
|
|
4962
5507
|
exports.TextInput = TextInput;
|
|
5508
|
+
exports.TimePicker = TimePicker;
|
|
4963
5509
|
exports.Toast = Toast;
|
|
4964
5510
|
exports.ToastContainer = ToastContainer;
|
|
4965
5511
|
exports.ToastProvider = ToastProvider;
|