@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.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import React9, { forwardRef, createContext, useState, useMemo, useRef, useEffect, useCallback, useContext } from 'react';
|
|
3
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
4
4
|
import { createPortal } from 'react-dom';
|
|
5
5
|
|
|
6
6
|
// src/provider/RehagroProvider.tsx
|
|
@@ -463,7 +463,7 @@ var Toast = forwardRef(function Toast2({
|
|
|
463
463
|
/* @__PURE__ */ jsxs("div", { className: "rh-flex-1 rh-min-w-0", children: [
|
|
464
464
|
/* @__PURE__ */ jsx("p", { className: "rh-text-sm rh-font-semibold rh-leading-tight", children: title }),
|
|
465
465
|
description && /* @__PURE__ */ jsx(
|
|
466
|
-
"
|
|
466
|
+
"div",
|
|
467
467
|
{
|
|
468
468
|
className: ["rh-mt-1 rh-text-sm rh-leading-normal", descriptionStyles[styleKey]].filter(Boolean).join(" "),
|
|
469
469
|
children: description
|
|
@@ -2750,6 +2750,551 @@ var DateSelect = forwardRef(
|
|
|
2750
2750
|
);
|
|
2751
2751
|
}
|
|
2752
2752
|
);
|
|
2753
|
+
var HOURS = Array.from({ length: 24 }, (_, i) => i);
|
|
2754
|
+
var MINUTES = Array.from({ length: 60 }, (_, i) => i);
|
|
2755
|
+
var ITEM_HEIGHT = 36;
|
|
2756
|
+
var CLOCK_HOURS_OUTER = [12, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11];
|
|
2757
|
+
var CLOCK_HOURS_INNER = [0, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23];
|
|
2758
|
+
var CLOCK_MINUTES = Array.from({ length: 12 }, (_, index) => index * 5);
|
|
2759
|
+
var pad = (n) => String(n).padStart(2, "0");
|
|
2760
|
+
var clampClockPart = (value, max) => Math.min(max, Math.max(0, value));
|
|
2761
|
+
var statusClasses4 = {
|
|
2762
|
+
default: "rh-border-border focus-within:rh-border-primary focus-within:rh-ring-2 focus-within:rh-ring-gray-200",
|
|
2763
|
+
error: "rh-border-danger focus-within:rh-border-danger focus-within:rh-ring-2 focus-within:rh-ring-red-100"
|
|
2764
|
+
};
|
|
2765
|
+
var sizeClasses7 = {
|
|
2766
|
+
sm: "rh-min-h-[32px] rh-text-sm rh-px-input-x-sm",
|
|
2767
|
+
md: "rh-min-h-[40px] rh-text-sm rh-px-input-x-md",
|
|
2768
|
+
lg: "rh-min-h-[48px] rh-text-base rh-px-input-x-lg"
|
|
2769
|
+
};
|
|
2770
|
+
var radiusClasses6 = {
|
|
2771
|
+
none: "rh-rounded-none",
|
|
2772
|
+
xxs: "rh-rounded-xxs",
|
|
2773
|
+
xs: "rh-rounded-xs",
|
|
2774
|
+
sm: "rh-rounded-sm",
|
|
2775
|
+
md: "rh-rounded-md",
|
|
2776
|
+
lg: "rh-rounded-lg",
|
|
2777
|
+
xl: "rh-rounded-xl",
|
|
2778
|
+
full: "rh-rounded-full"
|
|
2779
|
+
};
|
|
2780
|
+
var helperStatusClasses4 = {
|
|
2781
|
+
default: "rh-text-text-muted",
|
|
2782
|
+
error: "rh-text-danger"
|
|
2783
|
+
};
|
|
2784
|
+
var getSubtitleClassName4 = (subtitle) => subtitle.trim() === "*" ? "rh-text-danger" : "rh-text-text-muted";
|
|
2785
|
+
var ClockIcon = () => /* @__PURE__ */ jsxs(
|
|
2786
|
+
"svg",
|
|
2787
|
+
{
|
|
2788
|
+
width: "16",
|
|
2789
|
+
height: "16",
|
|
2790
|
+
viewBox: "0 0 24 24",
|
|
2791
|
+
fill: "none",
|
|
2792
|
+
stroke: "currentColor",
|
|
2793
|
+
strokeWidth: "2",
|
|
2794
|
+
strokeLinecap: "round",
|
|
2795
|
+
strokeLinejoin: "round",
|
|
2796
|
+
"aria-hidden": "true",
|
|
2797
|
+
children: [
|
|
2798
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "10" }),
|
|
2799
|
+
/* @__PURE__ */ jsx("polyline", { points: "12 6 12 12 16 14" })
|
|
2800
|
+
]
|
|
2801
|
+
}
|
|
2802
|
+
);
|
|
2803
|
+
var EraserIcon2 = () => /* @__PURE__ */ jsx("svg", { width: "15", height: "14", viewBox: "0 0 17 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx(
|
|
2804
|
+
"path",
|
|
2805
|
+
{
|
|
2806
|
+
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",
|
|
2807
|
+
fill: "currentColor"
|
|
2808
|
+
}
|
|
2809
|
+
) });
|
|
2810
|
+
var PencilIcon = () => /* @__PURE__ */ jsxs(
|
|
2811
|
+
"svg",
|
|
2812
|
+
{
|
|
2813
|
+
width: "20",
|
|
2814
|
+
height: "20",
|
|
2815
|
+
viewBox: "0 0 24 24",
|
|
2816
|
+
fill: "none",
|
|
2817
|
+
stroke: "currentColor",
|
|
2818
|
+
strokeWidth: "2",
|
|
2819
|
+
strokeLinecap: "round",
|
|
2820
|
+
strokeLinejoin: "round",
|
|
2821
|
+
"aria-hidden": "true",
|
|
2822
|
+
children: [
|
|
2823
|
+
/* @__PURE__ */ jsx("path", { d: "M4 20h4L19 9a2.828 2.828 0 1 0-4-4L4 16v4Z" }),
|
|
2824
|
+
/* @__PURE__ */ jsx("path", { d: "m13.5 6.5 4 4" })
|
|
2825
|
+
]
|
|
2826
|
+
}
|
|
2827
|
+
);
|
|
2828
|
+
function scrollToSelected(ref, index) {
|
|
2829
|
+
const el = ref.current;
|
|
2830
|
+
if (!el) return;
|
|
2831
|
+
const target = index * ITEM_HEIGHT - el.clientHeight / 2 + ITEM_HEIGHT / 2;
|
|
2832
|
+
el.scrollTop = Math.max(0, target);
|
|
2833
|
+
}
|
|
2834
|
+
function getClockPosition(index, radius) {
|
|
2835
|
+
const angle = index / 12 * Math.PI * 2 - Math.PI / 2;
|
|
2836
|
+
return {
|
|
2837
|
+
left: `calc(50% + ${Math.cos(angle) * radius}px)`,
|
|
2838
|
+
top: `calc(50% + ${Math.sin(angle) * radius}px)`
|
|
2839
|
+
};
|
|
2840
|
+
}
|
|
2841
|
+
var TimePicker = forwardRef(
|
|
2842
|
+
function TimePicker2(props, ref) {
|
|
2843
|
+
const {
|
|
2844
|
+
label,
|
|
2845
|
+
subtitle,
|
|
2846
|
+
placeholder = "Selecione",
|
|
2847
|
+
status = "default",
|
|
2848
|
+
size = "md",
|
|
2849
|
+
radius = "xs",
|
|
2850
|
+
helperText,
|
|
2851
|
+
disabled = false,
|
|
2852
|
+
className = "",
|
|
2853
|
+
wrapperClassName = "",
|
|
2854
|
+
backgroundColor,
|
|
2855
|
+
presentation = "dropdown"
|
|
2856
|
+
} = props;
|
|
2857
|
+
const triggerId = React9.useId();
|
|
2858
|
+
const helperId = React9.useId();
|
|
2859
|
+
const isControlled = props.value !== void 0;
|
|
2860
|
+
const [internalValue, setInternalValue] = useState(
|
|
2861
|
+
props.defaultValue ?? null
|
|
2862
|
+
);
|
|
2863
|
+
const committedValue = isControlled ? props.value ?? null : internalValue;
|
|
2864
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
2865
|
+
const [isHelperDismissed, setIsHelperDismissed] = useState(false);
|
|
2866
|
+
const [dropdownAlign, setDropdownAlign] = useState("left");
|
|
2867
|
+
const [clockStep, setClockStep] = useState("hour");
|
|
2868
|
+
const [isManualClockInput, setIsManualClockInput] = useState(false);
|
|
2869
|
+
const [hasPendingValue, setHasPendingValue] = useState(committedValue != null);
|
|
2870
|
+
const [pendingHour, setPendingHour] = useState(committedValue?.hour ?? 0);
|
|
2871
|
+
const [pendingMinute, setPendingMinute] = useState(committedValue?.minute ?? 0);
|
|
2872
|
+
const wrapperRef = useRef(null);
|
|
2873
|
+
const innerRef = useRef(null);
|
|
2874
|
+
const dropdownRef = useRef(null);
|
|
2875
|
+
const hourColRef = useRef(null);
|
|
2876
|
+
const minuteColRef = useRef(null);
|
|
2877
|
+
React9.useImperativeHandle(ref, () => innerRef.current);
|
|
2878
|
+
const visualStatus = helperText && isHelperDismissed ? "default" : status;
|
|
2879
|
+
useEffect(() => {
|
|
2880
|
+
if (!isOpen) return;
|
|
2881
|
+
const h = committedValue?.hour ?? 0;
|
|
2882
|
+
const m = committedValue?.minute ?? 0;
|
|
2883
|
+
setPendingHour(h);
|
|
2884
|
+
setPendingMinute(m);
|
|
2885
|
+
setClockStep("hour");
|
|
2886
|
+
setIsManualClockInput(false);
|
|
2887
|
+
setHasPendingValue(committedValue != null);
|
|
2888
|
+
if (presentation === "dropdown") {
|
|
2889
|
+
requestAnimationFrame(() => {
|
|
2890
|
+
scrollToSelected(hourColRef, h);
|
|
2891
|
+
scrollToSelected(minuteColRef, m);
|
|
2892
|
+
});
|
|
2893
|
+
}
|
|
2894
|
+
}, [isOpen]);
|
|
2895
|
+
useEffect(() => {
|
|
2896
|
+
if (!isOpen || presentation !== "dropdown" || !innerRef.current) return;
|
|
2897
|
+
const rect = innerRef.current.getBoundingClientRect();
|
|
2898
|
+
const dropdownW = 240;
|
|
2899
|
+
setDropdownAlign(window.innerWidth - rect.right >= dropdownW ? "left" : "right");
|
|
2900
|
+
}, [isOpen, presentation]);
|
|
2901
|
+
useEffect(() => {
|
|
2902
|
+
if (!isOpen || presentation !== "dropdown") return;
|
|
2903
|
+
const handler = (e) => {
|
|
2904
|
+
if (wrapperRef.current && !wrapperRef.current.contains(e.target)) {
|
|
2905
|
+
setIsOpen(false);
|
|
2906
|
+
}
|
|
2907
|
+
};
|
|
2908
|
+
document.addEventListener("mousedown", handler);
|
|
2909
|
+
return () => document.removeEventListener("mousedown", handler);
|
|
2910
|
+
}, [isOpen, presentation]);
|
|
2911
|
+
useEffect(() => {
|
|
2912
|
+
if (!isOpen) return;
|
|
2913
|
+
const handler = (e) => {
|
|
2914
|
+
if (e.key === "Escape") {
|
|
2915
|
+
setIsOpen(false);
|
|
2916
|
+
innerRef.current?.focus();
|
|
2917
|
+
}
|
|
2918
|
+
};
|
|
2919
|
+
document.addEventListener("keydown", handler);
|
|
2920
|
+
return () => document.removeEventListener("keydown", handler);
|
|
2921
|
+
}, [isOpen]);
|
|
2922
|
+
const commit = useCallback(
|
|
2923
|
+
(hour, minute) => {
|
|
2924
|
+
const newValue = { hour, minute };
|
|
2925
|
+
if (helperText) setIsHelperDismissed(true);
|
|
2926
|
+
if (!isControlled) setInternalValue(newValue);
|
|
2927
|
+
props.onChange?.(newValue);
|
|
2928
|
+
setIsOpen(false);
|
|
2929
|
+
},
|
|
2930
|
+
[helperText, isControlled, props]
|
|
2931
|
+
);
|
|
2932
|
+
const handleClear = useCallback(() => {
|
|
2933
|
+
setPendingHour(0);
|
|
2934
|
+
setPendingMinute(0);
|
|
2935
|
+
if (!isControlled) setInternalValue(null);
|
|
2936
|
+
props.onChange?.(void 0);
|
|
2937
|
+
setIsOpen(false);
|
|
2938
|
+
}, [isControlled, props]);
|
|
2939
|
+
const displayText = committedValue != null ? `${pad(committedValue.hour)}:${pad(committedValue.minute)}` : null;
|
|
2940
|
+
const clockDisplayText = hasPendingValue ? `${pad(pendingHour)}:${pad(pendingMinute)}` : "--:--";
|
|
2941
|
+
const closeClockDialog = () => {
|
|
2942
|
+
setIsOpen(false);
|
|
2943
|
+
innerRef.current?.focus();
|
|
2944
|
+
};
|
|
2945
|
+
const handleClockHourChange = (hour) => {
|
|
2946
|
+
setPendingHour(hour);
|
|
2947
|
+
setHasPendingValue(true);
|
|
2948
|
+
setClockStep("minute");
|
|
2949
|
+
};
|
|
2950
|
+
const handleClockMinuteChange = (minute) => {
|
|
2951
|
+
setPendingMinute(minute);
|
|
2952
|
+
setHasPendingValue(true);
|
|
2953
|
+
};
|
|
2954
|
+
const handleManualClockChange = (part, value) => {
|
|
2955
|
+
const numericValue = Number(value.replace(/\D/g, ""));
|
|
2956
|
+
if (Number.isNaN(numericValue)) return;
|
|
2957
|
+
if (part === "hour") {
|
|
2958
|
+
setPendingHour(clampClockPart(numericValue, 23));
|
|
2959
|
+
} else {
|
|
2960
|
+
setPendingMinute(clampClockPart(numericValue, 59));
|
|
2961
|
+
}
|
|
2962
|
+
setHasPendingValue(true);
|
|
2963
|
+
};
|
|
2964
|
+
const clockHourButton = (hour, index, radius2) => {
|
|
2965
|
+
const selected = hasPendingValue && pendingHour === hour;
|
|
2966
|
+
const position = getClockPosition(index, radius2);
|
|
2967
|
+
return /* @__PURE__ */ jsx(
|
|
2968
|
+
"button",
|
|
2969
|
+
{
|
|
2970
|
+
type: "button",
|
|
2971
|
+
"aria-label": `${pad(hour)} horas`,
|
|
2972
|
+
onClick: () => handleClockHourChange(hour),
|
|
2973
|
+
className: [
|
|
2974
|
+
"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",
|
|
2975
|
+
selected ? "rh-bg-primary rh-font-semibold rh-text-surface" : "rh-text-text hover:rh-bg-border/40"
|
|
2976
|
+
].join(" "),
|
|
2977
|
+
style: position,
|
|
2978
|
+
children: pad(hour)
|
|
2979
|
+
},
|
|
2980
|
+
hour
|
|
2981
|
+
);
|
|
2982
|
+
};
|
|
2983
|
+
const clockMinuteButton = (minute, index) => {
|
|
2984
|
+
const selected = hasPendingValue && pendingMinute === minute;
|
|
2985
|
+
const position = getClockPosition(index, 102);
|
|
2986
|
+
return /* @__PURE__ */ jsx(
|
|
2987
|
+
"button",
|
|
2988
|
+
{
|
|
2989
|
+
type: "button",
|
|
2990
|
+
"aria-label": `${pad(minute)} minutos`,
|
|
2991
|
+
onClick: () => handleClockMinuteChange(minute),
|
|
2992
|
+
className: [
|
|
2993
|
+
"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",
|
|
2994
|
+
selected ? "rh-bg-primary rh-font-semibold rh-text-surface" : "rh-text-text hover:rh-bg-border/40"
|
|
2995
|
+
].join(" "),
|
|
2996
|
+
style: position,
|
|
2997
|
+
children: pad(minute)
|
|
2998
|
+
},
|
|
2999
|
+
minute
|
|
3000
|
+
);
|
|
3001
|
+
};
|
|
3002
|
+
return /* @__PURE__ */ jsxs(
|
|
3003
|
+
"div",
|
|
3004
|
+
{
|
|
3005
|
+
ref: wrapperRef,
|
|
3006
|
+
className: ["rh-relative rh-flex rh-flex-col rh-gap-1 rh-font-body", wrapperClassName].filter(Boolean).join(" "),
|
|
3007
|
+
children: [
|
|
3008
|
+
label && /* @__PURE__ */ jsxs("label", { id: `${triggerId}-label`, className: "rh-flex rh-items-baseline rh-gap-1", children: [
|
|
3009
|
+
/* @__PURE__ */ jsx("span", { className: "rh-text-sm rh-font-medium rh-text-text", children: label }),
|
|
3010
|
+
subtitle && /* @__PURE__ */ jsx("span", { className: `rh-text-sm ${getSubtitleClassName4(subtitle)}`, children: subtitle })
|
|
3011
|
+
] }),
|
|
3012
|
+
/* @__PURE__ */ jsxs(
|
|
3013
|
+
"button",
|
|
3014
|
+
{
|
|
3015
|
+
ref: innerRef,
|
|
3016
|
+
id: triggerId,
|
|
3017
|
+
type: "button",
|
|
3018
|
+
role: "combobox",
|
|
3019
|
+
"aria-expanded": isOpen,
|
|
3020
|
+
"aria-haspopup": "dialog",
|
|
3021
|
+
"aria-labelledby": label ? `${triggerId}-label` : void 0,
|
|
3022
|
+
"aria-describedby": helperText ? helperId : void 0,
|
|
3023
|
+
"aria-invalid": visualStatus === "error" || void 0,
|
|
3024
|
+
"aria-disabled": disabled || void 0,
|
|
3025
|
+
disabled,
|
|
3026
|
+
onClick: () => !disabled && setIsOpen((o) => !o),
|
|
3027
|
+
style: backgroundColor ? { backgroundColor } : void 0,
|
|
3028
|
+
className: [
|
|
3029
|
+
"rh-group rh-flex rh-items-center rh-justify-between rh-gap-2",
|
|
3030
|
+
"rh-border rh-font-body",
|
|
3031
|
+
!backgroundColor && "rh-bg-surface",
|
|
3032
|
+
"rh-transition-colors rh-duration-150",
|
|
3033
|
+
"rh-text-left rh-w-full",
|
|
3034
|
+
statusClasses4[visualStatus],
|
|
3035
|
+
radiusClasses6[radius],
|
|
3036
|
+
sizeClasses7[size],
|
|
3037
|
+
disabled ? "rh-opacity-50 rh-cursor-not-allowed rh-bg-background" : "rh-cursor-pointer",
|
|
3038
|
+
className
|
|
3039
|
+
].filter(Boolean).join(" "),
|
|
3040
|
+
children: [
|
|
3041
|
+
/* @__PURE__ */ jsx(
|
|
3042
|
+
"span",
|
|
3043
|
+
{
|
|
3044
|
+
className: [
|
|
3045
|
+
"rh-flex-1 rh-truncate",
|
|
3046
|
+
displayText ? "rh-text-text" : "rh-text-text-muted group-hover:rh-text-text"
|
|
3047
|
+
].join(" "),
|
|
3048
|
+
children: displayText ?? placeholder
|
|
3049
|
+
}
|
|
3050
|
+
),
|
|
3051
|
+
/* @__PURE__ */ jsx(ClockIcon, {})
|
|
3052
|
+
]
|
|
3053
|
+
}
|
|
3054
|
+
),
|
|
3055
|
+
isOpen && presentation === "dropdown" && /* @__PURE__ */ jsxs(
|
|
3056
|
+
"div",
|
|
3057
|
+
{
|
|
3058
|
+
ref: dropdownRef,
|
|
3059
|
+
role: "dialog",
|
|
3060
|
+
"aria-label": "Seletor de hora",
|
|
3061
|
+
className: [
|
|
3062
|
+
"rh-absolute rh-z-50 rh-mt-1",
|
|
3063
|
+
"rh-bg-surface rh-rounded-xs rh-border rh-border-border",
|
|
3064
|
+
"rh-w-[240px]",
|
|
3065
|
+
dropdownAlign === "left" ? "rh-left-0" : "rh-right-0"
|
|
3066
|
+
].filter(Boolean).join(" "),
|
|
3067
|
+
style: {
|
|
3068
|
+
top: "100%",
|
|
3069
|
+
boxShadow: "0 0 9.6px 0 rgba(8, 11, 18, 0.08)"
|
|
3070
|
+
},
|
|
3071
|
+
children: [
|
|
3072
|
+
/* @__PURE__ */ jsxs("div", { className: "rh-flex rh-border-b rh-border-border", children: [
|
|
3073
|
+
/* @__PURE__ */ 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" }),
|
|
3074
|
+
/* @__PURE__ */ jsx("div", { className: "rh-w-px rh-bg-border" }),
|
|
3075
|
+
/* @__PURE__ */ 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" })
|
|
3076
|
+
] }),
|
|
3077
|
+
/* @__PURE__ */ jsxs("div", { className: "rh-flex", style: { height: 216 }, children: [
|
|
3078
|
+
/* @__PURE__ */ jsx(
|
|
3079
|
+
"div",
|
|
3080
|
+
{
|
|
3081
|
+
ref: hourColRef,
|
|
3082
|
+
className: "rh-flex-1 rh-overflow-y-auto rh-py-1 rh-scrollbar-thin",
|
|
3083
|
+
style: { scrollbarWidth: "none" },
|
|
3084
|
+
children: HOURS.map((h) => {
|
|
3085
|
+
const selected = h === pendingHour;
|
|
3086
|
+
return /* @__PURE__ */ jsx(
|
|
3087
|
+
"button",
|
|
3088
|
+
{
|
|
3089
|
+
type: "button",
|
|
3090
|
+
onClick: () => setPendingHour(h),
|
|
3091
|
+
style: { height: ITEM_HEIGHT },
|
|
3092
|
+
className: [
|
|
3093
|
+
"rh-w-full rh-flex rh-items-center rh-justify-center rh-text-sm rh-transition-colors rh-duration-100",
|
|
3094
|
+
selected ? "rh-bg-primary rh-text-surface rh-font-semibold" : "rh-text-text hover:rh-bg-background"
|
|
3095
|
+
].join(" "),
|
|
3096
|
+
children: pad(h)
|
|
3097
|
+
},
|
|
3098
|
+
h
|
|
3099
|
+
);
|
|
3100
|
+
})
|
|
3101
|
+
}
|
|
3102
|
+
),
|
|
3103
|
+
/* @__PURE__ */ jsx("div", { className: "rh-w-px rh-bg-border rh-self-stretch" }),
|
|
3104
|
+
/* @__PURE__ */ jsx(
|
|
3105
|
+
"div",
|
|
3106
|
+
{
|
|
3107
|
+
ref: minuteColRef,
|
|
3108
|
+
className: "rh-flex-1 rh-overflow-y-auto rh-py-1",
|
|
3109
|
+
style: { scrollbarWidth: "none" },
|
|
3110
|
+
children: MINUTES.map((m) => {
|
|
3111
|
+
const selected = m === pendingMinute;
|
|
3112
|
+
return /* @__PURE__ */ jsx(
|
|
3113
|
+
"button",
|
|
3114
|
+
{
|
|
3115
|
+
type: "button",
|
|
3116
|
+
onClick: () => setPendingMinute(m),
|
|
3117
|
+
style: { height: ITEM_HEIGHT },
|
|
3118
|
+
className: [
|
|
3119
|
+
"rh-w-full rh-flex rh-items-center rh-justify-center rh-text-sm rh-transition-colors rh-duration-100",
|
|
3120
|
+
selected ? "rh-bg-primary rh-text-surface rh-font-semibold" : "rh-text-text hover:rh-bg-background"
|
|
3121
|
+
].join(" "),
|
|
3122
|
+
children: pad(m)
|
|
3123
|
+
},
|
|
3124
|
+
m
|
|
3125
|
+
);
|
|
3126
|
+
})
|
|
3127
|
+
}
|
|
3128
|
+
)
|
|
3129
|
+
] }),
|
|
3130
|
+
/* @__PURE__ */ jsxs("div", { className: "rh-flex rh-items-center rh-justify-between rh-px-3 rh-py-2 rh-border-t rh-border-border", children: [
|
|
3131
|
+
/* @__PURE__ */ jsxs(
|
|
3132
|
+
"button",
|
|
3133
|
+
{
|
|
3134
|
+
type: "button",
|
|
3135
|
+
onClick: handleClear,
|
|
3136
|
+
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",
|
|
3137
|
+
children: [
|
|
3138
|
+
/* @__PURE__ */ jsx(EraserIcon2, {}),
|
|
3139
|
+
"Limpar"
|
|
3140
|
+
]
|
|
3141
|
+
}
|
|
3142
|
+
),
|
|
3143
|
+
/* @__PURE__ */ jsx(
|
|
3144
|
+
"button",
|
|
3145
|
+
{
|
|
3146
|
+
type: "button",
|
|
3147
|
+
onClick: () => commit(pendingHour, pendingMinute),
|
|
3148
|
+
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",
|
|
3149
|
+
children: "Aplicar"
|
|
3150
|
+
}
|
|
3151
|
+
)
|
|
3152
|
+
] })
|
|
3153
|
+
]
|
|
3154
|
+
}
|
|
3155
|
+
),
|
|
3156
|
+
isOpen && presentation === "clock" && /* @__PURE__ */ jsx(
|
|
3157
|
+
"div",
|
|
3158
|
+
{
|
|
3159
|
+
role: "presentation",
|
|
3160
|
+
className: "rh-fixed rh-inset-0 rh-z-50 rh-flex rh-items-center rh-justify-center rh-bg-text/50 rh-p-4",
|
|
3161
|
+
onMouseDown: (event) => {
|
|
3162
|
+
if (event.target === event.currentTarget) closeClockDialog();
|
|
3163
|
+
},
|
|
3164
|
+
children: /* @__PURE__ */ jsxs(
|
|
3165
|
+
"div",
|
|
3166
|
+
{
|
|
3167
|
+
ref: dropdownRef,
|
|
3168
|
+
role: "dialog",
|
|
3169
|
+
"aria-modal": "true",
|
|
3170
|
+
"aria-label": "Seletor de hora",
|
|
3171
|
+
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",
|
|
3172
|
+
style: { boxShadow: "0 24px 48px rgb(8 11 18 / 0.24)" },
|
|
3173
|
+
children: [
|
|
3174
|
+
/* @__PURE__ */ jsx("span", { className: "rh-text-sm rh-font-normal rh-uppercase rh-text-text-muted", children: "Selecione a hora" }),
|
|
3175
|
+
/* @__PURE__ */ jsxs("div", { className: "rh-mt-6 rh-flex rh-items-center rh-justify-between", children: [
|
|
3176
|
+
isManualClockInput ? /* @__PURE__ */ jsxs("div", { className: "rh-flex rh-items-center rh-gap-2", children: [
|
|
3177
|
+
/* @__PURE__ */ jsx(
|
|
3178
|
+
"input",
|
|
3179
|
+
{
|
|
3180
|
+
"aria-label": "Hora",
|
|
3181
|
+
inputMode: "numeric",
|
|
3182
|
+
maxLength: 2,
|
|
3183
|
+
value: pad(pendingHour),
|
|
3184
|
+
onChange: (event) => handleManualClockChange("hour", event.target.value),
|
|
3185
|
+
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"
|
|
3186
|
+
}
|
|
3187
|
+
),
|
|
3188
|
+
/* @__PURE__ */ jsx("span", { className: "rh-text-3xl rh-font-semibold rh-text-text-muted", children: ":" }),
|
|
3189
|
+
/* @__PURE__ */ jsx(
|
|
3190
|
+
"input",
|
|
3191
|
+
{
|
|
3192
|
+
"aria-label": "Minuto",
|
|
3193
|
+
inputMode: "numeric",
|
|
3194
|
+
maxLength: 2,
|
|
3195
|
+
value: pad(pendingMinute),
|
|
3196
|
+
onChange: (event) => handleManualClockChange("minute", event.target.value),
|
|
3197
|
+
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"
|
|
3198
|
+
}
|
|
3199
|
+
)
|
|
3200
|
+
] }) : /* @__PURE__ */ jsxs("div", { className: "rh-flex rh-items-center rh-gap-1 rh-text-3xl rh-font-semibold", children: [
|
|
3201
|
+
/* @__PURE__ */ jsx(
|
|
3202
|
+
"button",
|
|
3203
|
+
{
|
|
3204
|
+
type: "button",
|
|
3205
|
+
onClick: () => setClockStep("hour"),
|
|
3206
|
+
className: [
|
|
3207
|
+
"rh-rounded-xs rh-px-1 rh-transition-colors rh-duration-150",
|
|
3208
|
+
clockStep === "hour" ? "rh-text-text" : "rh-text-text-muted hover:rh-bg-background"
|
|
3209
|
+
].join(" "),
|
|
3210
|
+
children: clockDisplayText.slice(0, 2)
|
|
3211
|
+
}
|
|
3212
|
+
),
|
|
3213
|
+
/* @__PURE__ */ jsx("span", { className: "rh-text-text-muted", children: ":" }),
|
|
3214
|
+
/* @__PURE__ */ jsx(
|
|
3215
|
+
"button",
|
|
3216
|
+
{
|
|
3217
|
+
type: "button",
|
|
3218
|
+
onClick: () => setClockStep("minute"),
|
|
3219
|
+
className: [
|
|
3220
|
+
"rh-rounded-xs rh-px-1 rh-transition-colors rh-duration-150",
|
|
3221
|
+
clockStep === "minute" ? "rh-text-text" : "rh-text-text-muted hover:rh-bg-background"
|
|
3222
|
+
].join(" "),
|
|
3223
|
+
children: clockDisplayText.slice(3, 5)
|
|
3224
|
+
}
|
|
3225
|
+
)
|
|
3226
|
+
] }),
|
|
3227
|
+
/* @__PURE__ */ jsx(
|
|
3228
|
+
"button",
|
|
3229
|
+
{
|
|
3230
|
+
type: "button",
|
|
3231
|
+
"aria-label": isManualClockInput ? "Voltar ao rel\xF3gio" : "Digitar hor\xE1rio manualmente",
|
|
3232
|
+
onClick: () => setIsManualClockInput((current) => !current),
|
|
3233
|
+
className: "rh-rounded-full rh-p-2 rh-text-text hover:rh-bg-background",
|
|
3234
|
+
children: /* @__PURE__ */ jsx(PencilIcon, {})
|
|
3235
|
+
}
|
|
3236
|
+
)
|
|
3237
|
+
] }),
|
|
3238
|
+
!isManualClockInput && /* @__PURE__ */ 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__ */ jsxs("div", { className: "rh-relative rh-h-full rh-w-full", children: [
|
|
3239
|
+
clockStep === "hour" ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3240
|
+
CLOCK_HOURS_OUTER.map(
|
|
3241
|
+
(hour, index) => clockHourButton(hour, index, 102)
|
|
3242
|
+
),
|
|
3243
|
+
CLOCK_HOURS_INNER.map(
|
|
3244
|
+
(hour, index) => clockHourButton(hour, index, 68)
|
|
3245
|
+
)
|
|
3246
|
+
] }) : CLOCK_MINUTES.map(
|
|
3247
|
+
(minute, index) => clockMinuteButton(minute, index)
|
|
3248
|
+
),
|
|
3249
|
+
/* @__PURE__ */ 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" })
|
|
3250
|
+
] }) }),
|
|
3251
|
+
/* @__PURE__ */ jsxs("div", { className: "rh-mt-8 rh-flex rh-justify-end rh-gap-6", children: [
|
|
3252
|
+
/* @__PURE__ */ jsx(
|
|
3253
|
+
"button",
|
|
3254
|
+
{
|
|
3255
|
+
type: "button",
|
|
3256
|
+
onClick: closeClockDialog,
|
|
3257
|
+
className: "rh-text-base rh-font-medium rh-uppercase rh-text-primary hover:rh-opacity-80",
|
|
3258
|
+
children: "Cancelar"
|
|
3259
|
+
}
|
|
3260
|
+
),
|
|
3261
|
+
/* @__PURE__ */ jsx(
|
|
3262
|
+
"button",
|
|
3263
|
+
{
|
|
3264
|
+
type: "button",
|
|
3265
|
+
onClick: () => {
|
|
3266
|
+
if (hasPendingValue) commit(pendingHour, pendingMinute);
|
|
3267
|
+
else closeClockDialog();
|
|
3268
|
+
},
|
|
3269
|
+
className: "rh-text-base rh-font-medium rh-uppercase rh-text-primary hover:rh-opacity-80",
|
|
3270
|
+
children: "OK"
|
|
3271
|
+
}
|
|
3272
|
+
)
|
|
3273
|
+
] })
|
|
3274
|
+
]
|
|
3275
|
+
}
|
|
3276
|
+
)
|
|
3277
|
+
}
|
|
3278
|
+
),
|
|
3279
|
+
helperText && !isHelperDismissed && /* @__PURE__ */ jsxs(
|
|
3280
|
+
"span",
|
|
3281
|
+
{
|
|
3282
|
+
id: helperId,
|
|
3283
|
+
className: [
|
|
3284
|
+
"rh-flex rh-items-center rh-gap-1 rh-text-xs",
|
|
3285
|
+
helperStatusClasses4[visualStatus]
|
|
3286
|
+
].join(" "),
|
|
3287
|
+
children: [
|
|
3288
|
+
/* @__PURE__ */ jsx(WarningCircleIcon, {}),
|
|
3289
|
+
helperText
|
|
3290
|
+
]
|
|
3291
|
+
}
|
|
3292
|
+
)
|
|
3293
|
+
]
|
|
3294
|
+
}
|
|
3295
|
+
);
|
|
3296
|
+
}
|
|
3297
|
+
);
|
|
2753
3298
|
var variantClasses = {
|
|
2754
3299
|
light: "rh-bg-surface rh-text-text rh-border rh-border-border rh-shadow-md",
|
|
2755
3300
|
default: "rh-bg-primary/10 rh-text-text rh-border rh-border-primary/20 rh-shadow-md",
|
|
@@ -2760,7 +3305,7 @@ var arrowVariantClasses = {
|
|
|
2760
3305
|
default: "rh-border-primary/20 rh-bg-primary/10",
|
|
2761
3306
|
dark: "rh-bg-primary"
|
|
2762
3307
|
};
|
|
2763
|
-
var
|
|
3308
|
+
var sizeClasses8 = {
|
|
2764
3309
|
sm: "rh-px-3 rh-py-1.5 rh-text-xs",
|
|
2765
3310
|
md: "rh-px-4 rh-py-3 rh-text-sm"
|
|
2766
3311
|
};
|
|
@@ -2891,7 +3436,7 @@ var Tooltip = forwardRef(
|
|
|
2891
3436
|
"rh-absolute rh-z-50 rh-w-max rh-max-w-xs rh-rounded-xs",
|
|
2892
3437
|
tooltipPlacementClasses[placement],
|
|
2893
3438
|
variantClasses[variant],
|
|
2894
|
-
|
|
3439
|
+
sizeClasses8[size],
|
|
2895
3440
|
className
|
|
2896
3441
|
].filter(Boolean).join(" "),
|
|
2897
3442
|
children: [
|
|
@@ -2992,7 +3537,7 @@ function getAvatarColors(name) {
|
|
|
2992
3537
|
const index = hash % AVATAR_COLORS.length;
|
|
2993
3538
|
return AVATAR_COLORS[index];
|
|
2994
3539
|
}
|
|
2995
|
-
var
|
|
3540
|
+
var sizeClasses9 = {
|
|
2996
3541
|
sm: "rh-w-8 rh-h-8 rh-text-xs",
|
|
2997
3542
|
md: "rh-w-10 rh-h-10 rh-text-sm",
|
|
2998
3543
|
lg: "rh-w-12 rh-h-12 rh-text-base",
|
|
@@ -3027,7 +3572,7 @@ var Avatar = forwardRef(function Avatar2({ src, alt = "", initials, size = "md",
|
|
|
3027
3572
|
"rh-inline-flex rh-items-center rh-justify-center rh-shrink-0 rh-overflow-hidden",
|
|
3028
3573
|
avatarColors ? "" : "rh-bg-primary rh-text-surface",
|
|
3029
3574
|
"rh-font-display rh-font-medium rh-select-none",
|
|
3030
|
-
|
|
3575
|
+
sizeClasses9[size],
|
|
3031
3576
|
variantClasses2[variant],
|
|
3032
3577
|
className
|
|
3033
3578
|
].filter(Boolean).join(" "),
|
|
@@ -3094,7 +3639,7 @@ var hoverInactivePresetClasses = {
|
|
|
3094
3639
|
info: "hover:rh-bg-info/20 hover:rh-border-info/50",
|
|
3095
3640
|
neutral: "hover:rh-bg-neutral/20 hover:rh-border-neutral/50"
|
|
3096
3641
|
};
|
|
3097
|
-
var
|
|
3642
|
+
var sizeClasses10 = {
|
|
3098
3643
|
sm: "rh-text-xs rh-px-2 rh-py-0.5 rh-gap-1",
|
|
3099
3644
|
md: "rh-text-sm rh-px-2.5 rh-py-1 rh-gap-1.5",
|
|
3100
3645
|
lg: "rh-text-sm rh-px-3 rh-py-1.5 rh-gap-1.5"
|
|
@@ -3141,7 +3686,7 @@ var Tag = forwardRef(function Tag2({
|
|
|
3141
3686
|
"rh-transition-colors rh-duration-150",
|
|
3142
3687
|
"rh-cursor-pointer",
|
|
3143
3688
|
clickable ? "rh-cursor-pointer" : "",
|
|
3144
|
-
|
|
3689
|
+
sizeClasses10[size],
|
|
3145
3690
|
colorClasses3,
|
|
3146
3691
|
hoverClasses,
|
|
3147
3692
|
disabled ? "rh-opacity-50 rh-cursor-not-allowed rh-pointer-events-none" : "",
|
|
@@ -3158,16 +3703,16 @@ var Tag = forwardRef(function Tag2({
|
|
|
3158
3703
|
}
|
|
3159
3704
|
);
|
|
3160
3705
|
});
|
|
3161
|
-
var
|
|
3706
|
+
var statusClasses5 = {
|
|
3162
3707
|
default: "rh-border-border focus-within:rh-ring-2 focus-within:rh-ring-ring focus-within:rh-ring-offset-2",
|
|
3163
3708
|
error: "rh-border-danger focus-within:rh-ring-2 focus-within:rh-ring-danger focus-within:rh-ring-offset-2"
|
|
3164
3709
|
};
|
|
3165
|
-
var
|
|
3710
|
+
var sizeClasses11 = {
|
|
3166
3711
|
sm: "rh-min-h-[36px] rh-text-sm rh-px-2 rh-py-1",
|
|
3167
3712
|
md: "rh-h-[44px] rh-text-sm rh-px-2 rh-py-[6px]",
|
|
3168
3713
|
lg: "rh-min-h-[52px] rh-text-base rh-px-3 rh-py-2"
|
|
3169
3714
|
};
|
|
3170
|
-
var
|
|
3715
|
+
var radiusClasses7 = {
|
|
3171
3716
|
none: "rh-rounded-none",
|
|
3172
3717
|
xxs: "rh-rounded-xxs",
|
|
3173
3718
|
xs: "rh-rounded-xs",
|
|
@@ -3177,7 +3722,7 @@ var radiusClasses6 = {
|
|
|
3177
3722
|
xl: "rh-rounded-xl",
|
|
3178
3723
|
full: "rh-rounded-full"
|
|
3179
3724
|
};
|
|
3180
|
-
var
|
|
3725
|
+
var helperStatusClasses5 = {
|
|
3181
3726
|
default: "rh-text-text-muted",
|
|
3182
3727
|
error: "rh-text-danger"
|
|
3183
3728
|
};
|
|
@@ -3196,7 +3741,7 @@ var addButtonSizeClasses = {
|
|
|
3196
3741
|
md: "rh-w-5 rh-h-5",
|
|
3197
3742
|
lg: "rh-w-5 rh-h-5"
|
|
3198
3743
|
};
|
|
3199
|
-
var
|
|
3744
|
+
var getSubtitleClassName5 = (subtitle) => subtitle.trim() === "*" ? "rh-text-danger" : "rh-text-text-muted";
|
|
3200
3745
|
var TagInput = forwardRef(function TagInput2({
|
|
3201
3746
|
label,
|
|
3202
3747
|
subtitle,
|
|
@@ -3253,7 +3798,7 @@ var TagInput = forwardRef(function TagInput2({
|
|
|
3253
3798
|
children: [
|
|
3254
3799
|
label && /* @__PURE__ */ jsxs("label", { htmlFor: inputId, className: "rh-flex rh-items-baseline rh-gap-1", children: [
|
|
3255
3800
|
/* @__PURE__ */ jsx("span", { className: "rh-text-sm rh-font-semibold rh-text-text", children: label }),
|
|
3256
|
-
subtitle && /* @__PURE__ */ jsx("span", { className: `rh-text-sm ${
|
|
3801
|
+
subtitle && /* @__PURE__ */ jsx("span", { className: `rh-text-sm ${getSubtitleClassName5(subtitle)}`, children: subtitle })
|
|
3257
3802
|
] }),
|
|
3258
3803
|
/* @__PURE__ */ jsxs(
|
|
3259
3804
|
"div",
|
|
@@ -3263,9 +3808,9 @@ var TagInput = forwardRef(function TagInput2({
|
|
|
3263
3808
|
"rh-flex rh-flex-row rh-items-center rh-justify-between rh-gap-2",
|
|
3264
3809
|
"rh-border rh-bg-surface rh-font-body",
|
|
3265
3810
|
"rh-transition-colors rh-duration-150",
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
3811
|
+
statusClasses5[status],
|
|
3812
|
+
radiusClasses7[radius],
|
|
3813
|
+
sizeClasses11[size],
|
|
3269
3814
|
disabled ? "rh-opacity-50 rh-cursor-not-allowed rh-bg-background" : "rh-cursor-pointer",
|
|
3270
3815
|
className
|
|
3271
3816
|
].filter(Boolean).join(" "),
|
|
@@ -3428,7 +3973,7 @@ var TagInput = forwardRef(function TagInput2({
|
|
|
3428
3973
|
id: `${inputId}-helper`,
|
|
3429
3974
|
className: [
|
|
3430
3975
|
"rh-flex rh-items-center rh-gap-1 rh-text-xs",
|
|
3431
|
-
|
|
3976
|
+
helperStatusClasses5[status]
|
|
3432
3977
|
].join(" "),
|
|
3433
3978
|
children: helperText
|
|
3434
3979
|
}
|
|
@@ -3535,12 +4080,12 @@ var PRESET_COLORS5 = /* @__PURE__ */ new Set([
|
|
|
3535
4080
|
"info"
|
|
3536
4081
|
]);
|
|
3537
4082
|
var isPresetColor5 = (color) => PRESET_COLORS5.has(color);
|
|
3538
|
-
var
|
|
4083
|
+
var sizeClasses12 = {
|
|
3539
4084
|
sm: { container: "rh-h-8", button: "rh-px-2 rh-text-xs" },
|
|
3540
4085
|
md: { container: "rh-h-9", button: "rh-px-3 rh-text-sm" },
|
|
3541
4086
|
lg: { container: "rh-h-10", button: "rh-px-4 rh-text-sm" }
|
|
3542
4087
|
};
|
|
3543
|
-
var
|
|
4088
|
+
var radiusClasses8 = {
|
|
3544
4089
|
none: "rh-rounded-none",
|
|
3545
4090
|
xs: "rh-rounded-xs",
|
|
3546
4091
|
sm: "rh-rounded-sm",
|
|
@@ -3573,8 +4118,8 @@ function ToggleGroupInner({
|
|
|
3573
4118
|
className: [
|
|
3574
4119
|
"rh-inline-flex rh-items-center rh-bg-muted rh-overflow-hidden",
|
|
3575
4120
|
"rh-p-1 rh-gap-0.5",
|
|
3576
|
-
|
|
3577
|
-
|
|
4121
|
+
radiusClasses8[radius],
|
|
4122
|
+
sizeClasses12[size].container,
|
|
3578
4123
|
disabled ? "rh-opacity-50 rh-cursor-not-allowed" : "",
|
|
3579
4124
|
className
|
|
3580
4125
|
].filter(Boolean).join(" "),
|
|
@@ -3596,8 +4141,8 @@ function ToggleGroupInner({
|
|
|
3596
4141
|
"rh-border-0 rh-font-display rh-font-medium",
|
|
3597
4142
|
"rh-transition-all rh-duration-150",
|
|
3598
4143
|
"focus-visible:rh-outline-none focus-visible:rh-ring-2 focus-visible:rh-ring-ring",
|
|
3599
|
-
|
|
3600
|
-
|
|
4144
|
+
radiusClasses8[radius],
|
|
4145
|
+
sizeClasses12[size].button,
|
|
3601
4146
|
isActive ? "rh-bg-surface rh-text-text rh-shadow-sm" : "rh-bg-transparent rh-text-text-muted",
|
|
3602
4147
|
!isActive && !isDisabled ? "hover:rh-bg-surface/50" : "",
|
|
3603
4148
|
isDisabled ? "rh-cursor-not-allowed rh-pointer-events-none" : "rh-cursor-pointer"
|
|
@@ -3620,7 +4165,7 @@ var variantClasses3 = {
|
|
|
3620
4165
|
outlined: "rh-bg-surface rh-border rh-border-border rh-shadow-none",
|
|
3621
4166
|
filled: "rh-bg-background rh-border-0 rh-shadow-none"
|
|
3622
4167
|
};
|
|
3623
|
-
var
|
|
4168
|
+
var radiusClasses9 = {
|
|
3624
4169
|
none: "rh-rounded-none",
|
|
3625
4170
|
xs: "rh-rounded-xs",
|
|
3626
4171
|
sm: "rh-rounded-sm",
|
|
@@ -3655,7 +4200,7 @@ var CardRoot = forwardRef(function Card({
|
|
|
3655
4200
|
className: [
|
|
3656
4201
|
"rh-font-body rh-transition-all rh-duration-150",
|
|
3657
4202
|
variantClasses3[variant],
|
|
3658
|
-
|
|
4203
|
+
radiusClasses9[radius],
|
|
3659
4204
|
paddingClasses[padding],
|
|
3660
4205
|
isInteractive ? "rh-cursor-pointer hover:rh-shadow-lg hover:rh-scale-[1.01] active:rh-scale-[0.99]" : "",
|
|
3661
4206
|
disabled ? "rh-opacity-50 rh-cursor-not-allowed rh-pointer-events-none" : "",
|
|
@@ -3708,7 +4253,7 @@ var PRESET_COLORS6 = /* @__PURE__ */ new Set([
|
|
|
3708
4253
|
"info"
|
|
3709
4254
|
]);
|
|
3710
4255
|
var isPresetColor6 = (color) => PRESET_COLORS6.has(color);
|
|
3711
|
-
var
|
|
4256
|
+
var sizeClasses13 = {
|
|
3712
4257
|
xs: "rh-w-3 rh-h-3",
|
|
3713
4258
|
sm: "rh-w-4 rh-h-4",
|
|
3714
4259
|
md: "rh-w-6 rh-h-6",
|
|
@@ -3736,7 +4281,7 @@ var Spinner = forwardRef(function Spinner2({ size = "md", color = "primary", lab
|
|
|
3736
4281
|
"aria-label": label,
|
|
3737
4282
|
className: [
|
|
3738
4283
|
"rh-inline-flex rh-items-center rh-justify-center",
|
|
3739
|
-
|
|
4284
|
+
sizeClasses13[size],
|
|
3740
4285
|
colorClass,
|
|
3741
4286
|
className
|
|
3742
4287
|
].filter(Boolean).join(" "),
|
|
@@ -4189,7 +4734,7 @@ var CustomSelect = ({
|
|
|
4189
4734
|
)
|
|
4190
4735
|
] });
|
|
4191
4736
|
};
|
|
4192
|
-
var
|
|
4737
|
+
var sizeClasses14 = {
|
|
4193
4738
|
sm: { cell: "rh-px-2 rh-py-2 rh-text-xs", header: "rh-px-2 rh-py-2 rh-text-xs" },
|
|
4194
4739
|
md: { cell: "rh-px-3 rh-py-3 rh-text-sm", header: "rh-px-3 rh-py-3 rh-text-xs" },
|
|
4195
4740
|
lg: { cell: "rh-px-4 rh-py-4 rh-text-sm", header: "rh-px-4 rh-py-3 rh-text-sm" }
|
|
@@ -4344,7 +4889,7 @@ function TableInner({
|
|
|
4344
4889
|
...rowPaddingStyle
|
|
4345
4890
|
},
|
|
4346
4891
|
className: [
|
|
4347
|
-
rowPadding ? "" :
|
|
4892
|
+
rowPadding ? "" : sizeClasses14[size].header,
|
|
4348
4893
|
alignClasses[column.align || "left"],
|
|
4349
4894
|
`rh-font-semibold rh-whitespace-nowrap ${headerTextClassName || "rh-text-text-muted"}`,
|
|
4350
4895
|
stickyHeader ? "rh-sticky rh-top-0 rh-bg-surface rh-z-10" : "",
|
|
@@ -4425,7 +4970,7 @@ function TableInner({
|
|
|
4425
4970
|
{
|
|
4426
4971
|
style: { width: column.width, maxWidth: column.maxWidth, ...rowPaddingStyle },
|
|
4427
4972
|
className: [
|
|
4428
|
-
rowPadding ? "" :
|
|
4973
|
+
rowPadding ? "" : sizeClasses14[size].cell,
|
|
4429
4974
|
alignClasses[column.align || "left"],
|
|
4430
4975
|
"rh-text-text"
|
|
4431
4976
|
].filter(Boolean).join(" "),
|
|
@@ -4919,6 +5464,6 @@ var GridItem = forwardRef(
|
|
|
4919
5464
|
}
|
|
4920
5465
|
);
|
|
4921
5466
|
|
|
4922
|
-
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, Toast, ToastContainer, ToastProvider, ToggleGroup, Tooltip, Typography, WarningIcon, useToast };
|
|
5467
|
+
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 };
|
|
4923
5468
|
//# sourceMappingURL=index.mjs.map
|
|
4924
5469
|
//# sourceMappingURL=index.mjs.map
|