@rehagro/ui 1.0.48 → 1.0.49

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.js CHANGED
@@ -1897,6 +1897,776 @@ var Select = React9.forwardRef(function Select2(props, ref) {
1897
1897
  }
1898
1898
  );
1899
1899
  });
1900
+ var MONTHS = [
1901
+ "Janeiro",
1902
+ "Fevereiro",
1903
+ "Mar\xE7o",
1904
+ "Abril",
1905
+ "Maio",
1906
+ "Junho",
1907
+ "Julho",
1908
+ "Agosto",
1909
+ "Setembro",
1910
+ "Outubro",
1911
+ "Novembro",
1912
+ "Dezembro"
1913
+ ];
1914
+ var MONTHS_SHORT = [
1915
+ "Jan",
1916
+ "Fev",
1917
+ "Mar",
1918
+ "Abr",
1919
+ "Mai",
1920
+ "Jun",
1921
+ "Jul",
1922
+ "Ago",
1923
+ "Set",
1924
+ "Out",
1925
+ "Nov",
1926
+ "Dez"
1927
+ ];
1928
+ var MODE_OPTIONS = [
1929
+ { value: "interval", label: "Intervalo" },
1930
+ { value: "day", label: "Dia" },
1931
+ { value: "month", label: "M\xEAs" },
1932
+ { value: "year", label: "Ano" }
1933
+ ];
1934
+ var statusClasses3 = {
1935
+ default: "rh-border-border focus-within:rh-border-primary focus-within:rh-ring-2 focus-within:rh-ring-gray-200",
1936
+ error: "rh-border-danger focus-within:rh-border-danger focus-within:rh-ring-2 focus-within:rh-ring-red-100"
1937
+ };
1938
+ var sizeClasses6 = {
1939
+ sm: "rh-min-h-[32px] rh-text-sm rh-px-input-x-sm",
1940
+ md: "rh-min-h-[40px] rh-text-sm rh-px-input-x-md",
1941
+ lg: "rh-min-h-[48px] rh-text-base rh-px-input-x-lg"
1942
+ };
1943
+ var radiusClasses5 = {
1944
+ none: "rh-rounded-none",
1945
+ xxs: "rh-rounded-xxs",
1946
+ xs: "rh-rounded-xs",
1947
+ sm: "rh-rounded-sm",
1948
+ md: "rh-rounded-md",
1949
+ lg: "rh-rounded-lg",
1950
+ xl: "rh-rounded-xl",
1951
+ full: "rh-rounded-full"
1952
+ };
1953
+ var dropdownRadiusClasses2 = {
1954
+ none: "rh-rounded-none",
1955
+ xxs: "rh-rounded-xxs",
1956
+ xs: "rh-rounded-xs",
1957
+ sm: "rh-rounded-xs",
1958
+ md: "rh-rounded-xs",
1959
+ lg: "rh-rounded-xs",
1960
+ xl: "rh-rounded-xs",
1961
+ full: "rh-rounded-xs"
1962
+ };
1963
+ var helperStatusClasses3 = {
1964
+ default: "rh-text-text-muted",
1965
+ error: "rh-text-danger"
1966
+ };
1967
+ var getSubtitleClassName3 = (subtitle) => subtitle.trim() === "*" ? "rh-text-danger" : "rh-text-text-muted";
1968
+ var ChevronIcon2 = ({ className }) => /* @__PURE__ */ jsxRuntime.jsx(
1969
+ "svg",
1970
+ {
1971
+ className,
1972
+ viewBox: "0 0 20 20",
1973
+ fill: "currentColor",
1974
+ xmlns: "http://www.w3.org/2000/svg",
1975
+ "aria-hidden": "true",
1976
+ children: /* @__PURE__ */ jsxRuntime.jsx(
1977
+ "path",
1978
+ {
1979
+ fillRule: "evenodd",
1980
+ d: "M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z",
1981
+ clipRule: "evenodd"
1982
+ }
1983
+ )
1984
+ }
1985
+ );
1986
+ var ChevronLeftIcon = ({ className }) => /* @__PURE__ */ jsxRuntime.jsx(
1987
+ "svg",
1988
+ {
1989
+ className,
1990
+ viewBox: "0 0 20 20",
1991
+ fill: "currentColor",
1992
+ xmlns: "http://www.w3.org/2000/svg",
1993
+ "aria-hidden": "true",
1994
+ children: /* @__PURE__ */ jsxRuntime.jsx(
1995
+ "path",
1996
+ {
1997
+ fillRule: "evenodd",
1998
+ d: "M12.79 5.23a.75.75 0 01-.02 1.06L8.832 10l3.938 3.71a.75.75 0 11-1.04 1.08l-4.5-4.25a.75.75 0 010-1.08l4.5-4.25a.75.75 0 011.06.02z",
1999
+ clipRule: "evenodd"
2000
+ }
2001
+ )
2002
+ }
2003
+ );
2004
+ var ChevronRightIcon = ({ className }) => /* @__PURE__ */ jsxRuntime.jsx(
2005
+ "svg",
2006
+ {
2007
+ className,
2008
+ viewBox: "0 0 20 20",
2009
+ fill: "currentColor",
2010
+ xmlns: "http://www.w3.org/2000/svg",
2011
+ "aria-hidden": "true",
2012
+ children: /* @__PURE__ */ jsxRuntime.jsx(
2013
+ "path",
2014
+ {
2015
+ fillRule: "evenodd",
2016
+ d: "M7.21 14.77a.75.75 0 010-1.06L11.168 10 7.23 6.29a.75.75 0 011.04-1.08l4.5 4.25a.75.75 0 010 1.08l-4.5 4.25a.75.75 0 01-1.06-.02z",
2017
+ clipRule: "evenodd"
2018
+ }
2019
+ )
2020
+ }
2021
+ );
2022
+ var EraserIcon = ({ className }) => /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "17", height: "16", viewBox: "0 0 17 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsxRuntime.jsx(
2023
+ "path",
2024
+ {
2025
+ 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.7509ZM11.2353 1.96656C11.2643 1.93751 11.2988 1.91446 11.3367 1.89873C11.3747 1.88301 11.4153 1.87491 11.4564 1.87491C11.4975 1.87491 11.5381 1.88301 11.5761 1.89873C11.614 1.91446 11.6485 1.93751 11.6775 1.96656L14.9103 5.19938C14.9688 5.25796 15.0016 5.33733 15.0016 5.42008C15.0016 5.50283 14.9688 5.5822 14.9103 5.64078L10.9384 9.61031L7.26656 5.93844L11.2353 1.96656ZM4.04078 13.7509L1.96656 11.6767C1.90812 11.6181 1.8753 11.5388 1.8753 11.456C1.8753 11.3733 1.90812 11.2939 1.96656 11.2353L5.93844 7.26656L9.61031 10.9384L6.79781 13.7509H4.04078Z",
2026
+ fill: "#374151"
2027
+ }
2028
+ ) });
2029
+ var DateSelect = React9.forwardRef(
2030
+ function DateSelect2(props, ref) {
2031
+ const {
2032
+ label,
2033
+ subtitle,
2034
+ placeholder = "Selecione",
2035
+ status = "default",
2036
+ size = "md",
2037
+ radius = "xs",
2038
+ helperText,
2039
+ disabled = false,
2040
+ className = "",
2041
+ wrapperClassName = "",
2042
+ startYear,
2043
+ endYear,
2044
+ backgroundColor
2045
+ } = props;
2046
+ const triggerId = React9__default.default.useId();
2047
+ const helperId = React9__default.default.useId();
2048
+ const [isOpen, setIsOpen] = React9.useState(false);
2049
+ const [isHelperDismissed, setIsHelperDismissed] = React9.useState(false);
2050
+ const [internalValue, setInternalValue] = React9.useState(
2051
+ props.defaultValue ?? { mode: "day" }
2052
+ );
2053
+ const isControlled = props.value !== void 0;
2054
+ const value = isControlled ? props.value ?? internalValue : internalValue;
2055
+ const [activeMode, setActiveMode] = React9.useState(value.mode ?? "day");
2056
+ const [selectedYear, setSelectedYear] = React9.useState((/* @__PURE__ */ new Date()).getFullYear());
2057
+ const [selectedMonth, setSelectedMonth] = React9.useState((/* @__PURE__ */ new Date()).getMonth());
2058
+ const rightMonth = selectedMonth === 11 ? 0 : selectedMonth + 1;
2059
+ const rightYear = selectedMonth === 11 ? selectedYear + 1 : selectedYear;
2060
+ const [intervalStart, setIntervalStart] = React9.useState(value.startDate);
2061
+ const [intervalEnd, setIntervalEnd] = React9.useState(value.endDate);
2062
+ const [hoverDate, setHoverDate] = React9.useState();
2063
+ const [yearGridStart, setYearGridStart] = React9.useState(
2064
+ Math.floor((/* @__PURE__ */ new Date()).getFullYear() / 12) * 12
2065
+ );
2066
+ const wrapperRef = React9__default.default.useRef(null);
2067
+ const innerRef = React9__default.default.useRef(null);
2068
+ React9__default.default.useImperativeHandle(ref, () => innerRef.current);
2069
+ const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
2070
+ const yearStart = startYear ?? currentYear - 10;
2071
+ const yearEnd = endYear ?? currentYear + 10;
2072
+ const visualStatus = helperText && isHelperDismissed ? "default" : status;
2073
+ const handleChange = (newValue) => {
2074
+ if (helperText) setIsHelperDismissed(true);
2075
+ if (!isControlled) setInternalValue(newValue);
2076
+ props.onChange?.(newValue);
2077
+ if (newValue.mode !== "interval") {
2078
+ setIsOpen(false);
2079
+ }
2080
+ };
2081
+ const handleIntervalApply = () => {
2082
+ if (!intervalStart || !intervalEnd) return;
2083
+ const newValue = {
2084
+ mode: "interval",
2085
+ startDate: intervalStart,
2086
+ endDate: intervalEnd
2087
+ };
2088
+ if (helperText) setIsHelperDismissed(true);
2089
+ if (!isControlled) setInternalValue(newValue);
2090
+ props.onChange?.(newValue);
2091
+ setIsOpen(false);
2092
+ };
2093
+ const handleIntervalClear = () => {
2094
+ setIntervalStart(void 0);
2095
+ setIntervalEnd(void 0);
2096
+ setHoverDate(void 0);
2097
+ const newValue = { mode: "interval" };
2098
+ if (!isControlled) setInternalValue(newValue);
2099
+ props.onChange?.(newValue);
2100
+ };
2101
+ const displayText = React9__default.default.useMemo(() => {
2102
+ if (value.mode === "year" && value.year) return value.year.toString();
2103
+ if (value.mode === "month" && value.year != null)
2104
+ return `${MONTHS_SHORT[value.month || 0]} ${value.year}`;
2105
+ if (value.mode === "day" && value.year != null)
2106
+ return `${value.day}/${(value.month ?? 0) + 1}/${value.year}`;
2107
+ if (value.mode === "interval" && value.startDate && value.endDate) {
2108
+ return `${value.startDate.toLocaleDateString("pt-BR")} - ${value.endDate.toLocaleDateString("pt-BR")}`;
2109
+ }
2110
+ return null;
2111
+ }, [value]);
2112
+ React9__default.default.useEffect(() => {
2113
+ if (!isOpen) return;
2114
+ const handleClickOutside = (e) => {
2115
+ if (wrapperRef.current && !wrapperRef.current.contains(e.target)) {
2116
+ setIsOpen(false);
2117
+ }
2118
+ };
2119
+ document.addEventListener("mousedown", handleClickOutside);
2120
+ return () => document.removeEventListener("mousedown", handleClickOutside);
2121
+ }, [isOpen]);
2122
+ React9__default.default.useEffect(() => {
2123
+ if (!isOpen) return;
2124
+ const handleEscape = (e) => {
2125
+ if (e.key === "Escape") {
2126
+ setIsOpen(false);
2127
+ innerRef.current?.focus();
2128
+ }
2129
+ };
2130
+ document.addEventListener("keydown", handleEscape);
2131
+ return () => document.removeEventListener("keydown", handleEscape);
2132
+ }, [isOpen]);
2133
+ const getDaysInMonth2 = (year, month) => new Date(year, month + 1, 0).getDate();
2134
+ const getFirstDayOfMonth2 = (year, month) => new Date(year, month, 1).getDay();
2135
+ const isSameDay = (a, b) => a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth() && a.getDate() === b.getDate();
2136
+ const isInRange = (date, start, end) => {
2137
+ if (!start) return false;
2138
+ const ref2 = end ?? hoverDate;
2139
+ if (!ref2) return false;
2140
+ const [lo, hi] = start <= ref2 ? [start, ref2] : [ref2, start];
2141
+ return date > lo && date < hi;
2142
+ };
2143
+ const renderModeTabs = () => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rh-flex rh-border-b rh-border-border rh-bg-transparent", children: MODE_OPTIONS.map((option) => /* @__PURE__ */ jsxRuntime.jsx(
2144
+ "button",
2145
+ {
2146
+ onClick: () => setActiveMode(option.value),
2147
+ className: [
2148
+ "rh-flex-1 rh-py-2 rh-px-4 rh-text-sm rh-transition-colors rh-duration-150 rh-text-text rh-font-bold",
2149
+ "rh-border-b-2 -rh-mb-px",
2150
+ activeMode === option.value ? "rh-border-primary" : "rh-border-transparent hover:rh-border-border"
2151
+ ].join(" "),
2152
+ children: option.label
2153
+ },
2154
+ option.value
2155
+ )) });
2156
+ const renderYearGrid = () => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rh-p-1", children: [
2157
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rh-flex rh-items-center rh-justify-between", children: [
2158
+ /* @__PURE__ */ jsxRuntime.jsx(
2159
+ "button",
2160
+ {
2161
+ onClick: () => setYearGridStart((s) => s - 12),
2162
+ className: "rh-p-1 hover:rh-bg-background rh-rounded",
2163
+ children: /* @__PURE__ */ jsxRuntime.jsx(ChevronLeftIcon, { className: "rh-w-5 rh-h-5" })
2164
+ }
2165
+ ),
2166
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "rh-text-sm rh-font-medium rh-text-text", children: [
2167
+ yearGridStart,
2168
+ " \u2013 ",
2169
+ yearGridStart + 11
2170
+ ] }),
2171
+ /* @__PURE__ */ jsxRuntime.jsx(
2172
+ "button",
2173
+ {
2174
+ onClick: () => setYearGridStart((s) => s + 12),
2175
+ className: "rh-p-1 hover:rh-bg-background rh-rounded",
2176
+ children: /* @__PURE__ */ jsxRuntime.jsx(ChevronRightIcon, { className: "rh-w-5 rh-h-5" })
2177
+ }
2178
+ )
2179
+ ] }),
2180
+ /* @__PURE__ */ jsxRuntime.jsx(
2181
+ "svg",
2182
+ {
2183
+ xmlns: "http://www.w3.org/2000/svg",
2184
+ width: "100%",
2185
+ height: "1",
2186
+ viewBox: "0 0 350 1",
2187
+ fill: "none",
2188
+ className: "rh-mb-3",
2189
+ children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M0 0.5H350", stroke: "#F5F5F5" })
2190
+ }
2191
+ ),
2192
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rh-grid rh-grid-cols-4 rh-gap-2", children: Array.from({ length: 12 }, (_, i) => yearGridStart + i).map((year) => {
2193
+ const isSelected = value.mode === "year" && value.year === year;
2194
+ const outOfRange = year < yearStart || year > yearEnd;
2195
+ return /* @__PURE__ */ jsxRuntime.jsx(
2196
+ "button",
2197
+ {
2198
+ disabled: outOfRange,
2199
+ onClick: () => handleChange({ mode: "year", year }),
2200
+ className: [
2201
+ "rh-rounded-sm rh-py-4 rh-w-auto rh-text-sm rh-transition-colors rh-duration-150 rh-border-border rh-border",
2202
+ isSelected ? "rh-bg-primary rh-text-surface" : "rh-text-text hover:rh-bg-background",
2203
+ outOfRange ? "rh-opacity-30 rh-cursor-not-allowed" : ""
2204
+ ].join(" "),
2205
+ children: year
2206
+ },
2207
+ year
2208
+ );
2209
+ }) })
2210
+ ] });
2211
+ const renderMonthGrid = () => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rh-p-1", children: [
2212
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rh-flex rh-items-center rh-justify-between", children: [
2213
+ /* @__PURE__ */ jsxRuntime.jsx(
2214
+ "button",
2215
+ {
2216
+ onClick: () => setSelectedYear((y) => y - 1),
2217
+ className: "rh-p-1 hover:rh-bg-background rh-rounded",
2218
+ children: /* @__PURE__ */ jsxRuntime.jsx(ChevronLeftIcon, { className: "rh-w-5 rh-h-5" })
2219
+ }
2220
+ ),
2221
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "rh-text-sm rh-font-medium rh-text-text", children: selectedYear }),
2222
+ /* @__PURE__ */ jsxRuntime.jsx(
2223
+ "button",
2224
+ {
2225
+ onClick: () => setSelectedYear((y) => y + 1),
2226
+ className: "rh-p-1 hover:rh-bg-background rh-rounded",
2227
+ children: /* @__PURE__ */ jsxRuntime.jsx(ChevronRightIcon, { className: "rh-w-5 rh-h-5" })
2228
+ }
2229
+ )
2230
+ ] }),
2231
+ /* @__PURE__ */ jsxRuntime.jsx(
2232
+ "svg",
2233
+ {
2234
+ xmlns: "http://www.w3.org/2000/svg",
2235
+ width: "100%",
2236
+ height: "1",
2237
+ viewBox: "0 0 350 1",
2238
+ fill: "none",
2239
+ className: "rh-mb-3",
2240
+ children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M0 0.5H350", stroke: "#F5F5F5" })
2241
+ }
2242
+ ),
2243
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rh-grid rh-grid-cols-4 rh-gap-2", children: MONTHS.map((month, index) => {
2244
+ const isSelected = value.mode === "month" && value.year === selectedYear && value.month === index;
2245
+ return /* @__PURE__ */ jsxRuntime.jsx(
2246
+ "button",
2247
+ {
2248
+ onClick: () => handleChange({ mode: "month", year: selectedYear, month: index }),
2249
+ className: [
2250
+ "rh-rounded-sm rh-py-4 rh-w-auto rh-text-sm rh-transition-colors rh-duration-150 rh-border-border rh-border",
2251
+ isSelected ? "rh-bg-primary rh-text-surface" : "rh-text-text hover:rh-bg-background"
2252
+ ].join(" "),
2253
+ children: month
2254
+ },
2255
+ month
2256
+ );
2257
+ }) })
2258
+ ] });
2259
+ const renderIntervalNav = () => /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
2260
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rh-flex rh-gap-4 rh-p-1", children: [
2261
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rh-flex-1", children: [
2262
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rh-flex rh-items-center rh-justify-between", children: [
2263
+ /* @__PURE__ */ jsxRuntime.jsx(
2264
+ "button",
2265
+ {
2266
+ onClick: () => {
2267
+ if (selectedMonth === 0) {
2268
+ setSelectedMonth(11);
2269
+ setSelectedYear((y) => y - 1);
2270
+ } else setSelectedMonth((m) => m - 1);
2271
+ },
2272
+ className: "rh-p-1 hover:rh-bg-background rh-rounded",
2273
+ children: /* @__PURE__ */ jsxRuntime.jsx(ChevronLeftIcon, { className: "rh-w-5 rh-h-5" })
2274
+ }
2275
+ ),
2276
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "rh-text-sm rh-font-medium rh-text-text", children: [
2277
+ MONTHS[selectedMonth],
2278
+ " - ",
2279
+ selectedYear
2280
+ ] }),
2281
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rh-w-7" })
2282
+ ] }),
2283
+ /* @__PURE__ */ jsxRuntime.jsx(
2284
+ "svg",
2285
+ {
2286
+ xmlns: "http://www.w3.org/2000/svg",
2287
+ width: "100%",
2288
+ height: "1",
2289
+ viewBox: "0 0 350 1",
2290
+ fill: "none",
2291
+ className: "rh-mb-3",
2292
+ children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M0 0.5H350", stroke: "#F5F5F5" })
2293
+ }
2294
+ ),
2295
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rh-grid rh-grid-cols-7 rh-mb-1", children: ["D", "S", "T", "Q", "Q", "S", "S"].map((d, i) => /* @__PURE__ */ jsxRuntime.jsx(
2296
+ "div",
2297
+ {
2298
+ className: "rh-text-center rh-text-xs rh-text-text-muted rh-font-medium rh-py-1",
2299
+ children: d
2300
+ },
2301
+ i
2302
+ )) }),
2303
+ renderIntervalDays(selectedYear, selectedMonth)
2304
+ ] }),
2305
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rh-w-px rh-bg-border/30 rh-self-stretch" }),
2306
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rh-flex-1", children: [
2307
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rh-flex rh-items-center rh-justify-between", children: [
2308
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rh-w-7" }),
2309
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "rh-text-sm rh-font-medium rh-text-text", children: [
2310
+ MONTHS[rightMonth],
2311
+ " - ",
2312
+ rightYear
2313
+ ] }),
2314
+ /* @__PURE__ */ jsxRuntime.jsx(
2315
+ "button",
2316
+ {
2317
+ onClick: () => {
2318
+ if (selectedMonth === 11) {
2319
+ setSelectedMonth(0);
2320
+ setSelectedYear((y) => y + 1);
2321
+ } else setSelectedMonth((m) => m + 1);
2322
+ },
2323
+ className: "rh-p-1 hover:rh-bg-background rh-rounded",
2324
+ children: /* @__PURE__ */ jsxRuntime.jsx(ChevronRightIcon, { className: "rh-w-5 rh-h-5" })
2325
+ }
2326
+ )
2327
+ ] }),
2328
+ /* @__PURE__ */ jsxRuntime.jsx(
2329
+ "svg",
2330
+ {
2331
+ xmlns: "http://www.w3.org/2000/svg",
2332
+ width: "100%",
2333
+ height: "1",
2334
+ viewBox: "0 0 350 1",
2335
+ fill: "none",
2336
+ className: "rh-mb-3",
2337
+ children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M0 0.5H350", stroke: "#F5F5F5" })
2338
+ }
2339
+ ),
2340
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rh-grid rh-grid-cols-7 rh-mb-1", children: ["D", "S", "T", "Q", "Q", "S", "S"].map((d, i) => /* @__PURE__ */ jsxRuntime.jsx(
2341
+ "div",
2342
+ {
2343
+ className: "rh-text-center rh-text-xs rh-text-text-muted rh-font-medium rh-py-1",
2344
+ children: d
2345
+ },
2346
+ i
2347
+ )) }),
2348
+ renderIntervalDays(rightYear, rightMonth)
2349
+ ] })
2350
+ ] }),
2351
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rh-flex rh-items-center rh-justify-between rh-pt-3 rh-mt-3 rh-border-t rh-border-border/30", children: [
2352
+ /* @__PURE__ */ jsxRuntime.jsxs(
2353
+ "button",
2354
+ {
2355
+ onClick: handleIntervalClear,
2356
+ 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",
2357
+ children: [
2358
+ /* @__PURE__ */ jsxRuntime.jsx(EraserIcon, { className: "rh-w-4 rh-h-4" }),
2359
+ "Limpar"
2360
+ ]
2361
+ }
2362
+ ),
2363
+ /* @__PURE__ */ jsxRuntime.jsx(
2364
+ "button",
2365
+ {
2366
+ onClick: handleIntervalApply,
2367
+ disabled: !intervalStart || !intervalEnd,
2368
+ style: {
2369
+ backgroundColor: intervalStart && intervalEnd ? "#87A851" : "#87A85180",
2370
+ pointerEvents: !intervalStart || !intervalEnd ? "none" : "auto"
2371
+ },
2372
+ className: [
2373
+ "rh-text-sm rh-font-medium rh-px-4 rh-py-1.5 rh-rounded-lg rh-transition-colors rh-duration-150",
2374
+ intervalStart && intervalEnd ? "rh-text-surface hover:rh-opacity-90" : " rh-text-surface"
2375
+ ].join(" "),
2376
+ children: "Aplicar"
2377
+ }
2378
+ )
2379
+ ] })
2380
+ ] });
2381
+ const renderIntervalDays = (calYear, calMonth) => {
2382
+ const daysInMonth = getDaysInMonth2(calYear, calMonth);
2383
+ const firstDay = getFirstDayOfMonth2(calYear, calMonth);
2384
+ const days = Array.from({ length: daysInMonth }, (_, i) => i + 1);
2385
+ const prevMonth = calMonth === 0 ? 11 : calMonth - 1;
2386
+ const prevYear = calMonth === 0 ? calYear - 1 : calYear;
2387
+ const daysInPrevMonth = getDaysInMonth2(prevYear, prevMonth);
2388
+ const prevDays = Array.from(
2389
+ { length: firstDay },
2390
+ (_, i) => daysInPrevMonth - firstDay + i + 1
2391
+ );
2392
+ const totalCells = firstDay + daysInMonth;
2393
+ const nextDaysCount = totalCells % 7 === 0 ? 0 : 7 - totalCells % 7;
2394
+ const nextDays = Array.from({ length: nextDaysCount }, (_, i) => i + 1);
2395
+ const handleDayClick = (day) => {
2396
+ const clicked = new Date(calYear, calMonth, day);
2397
+ if (!intervalStart || intervalStart && intervalEnd) {
2398
+ setIntervalStart(clicked);
2399
+ setIntervalEnd(void 0);
2400
+ } else {
2401
+ const [lo, hi] = clicked >= intervalStart ? [intervalStart, clicked] : [clicked, intervalStart];
2402
+ setIntervalStart(lo);
2403
+ setIntervalEnd(hi);
2404
+ }
2405
+ };
2406
+ const getDayClasses = (day) => {
2407
+ const date = new Date(calYear, calMonth, day);
2408
+ const isStart = intervalStart && isSameDay(date, intervalStart);
2409
+ const isEnd = intervalEnd && isSameDay(date, intervalEnd);
2410
+ const isHoverEnd = !intervalEnd && hoverDate && isSameDay(date, hoverDate) && intervalStart;
2411
+ const inRange = isInRange(date, intervalStart, intervalEnd);
2412
+ const inHoverRange = !intervalEnd && isInRange(date, intervalStart, hoverDate);
2413
+ return [
2414
+ "rh-w-7 rh-h-7 rh-flex rh-items-center rh-justify-center rh-text-sm rh-transition-colors rh-duration-150 ",
2415
+ "rh-rounded-lg",
2416
+ isStart || isEnd ? "rh-bg-primary rh-text-surface" : "",
2417
+ isHoverEnd && !isStart ? "rh-bg-primary/70 rh-text-surface" : "",
2418
+ inRange || inHoverRange ? "rh-bg-primary/10 rh-text-text" : "",
2419
+ !isStart && !isEnd && !inRange && !inHoverRange && !isHoverEnd ? "rh-text-text hover:rh-ring-1 hover:rh-ring-[#15607A]" : ""
2420
+ ].join(" ");
2421
+ };
2422
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rh-grid rh-grid-cols-7 rh-gap-0 rh-text-center", children: [
2423
+ prevDays.map((d, i) => /* @__PURE__ */ jsxRuntime.jsx(
2424
+ "div",
2425
+ {
2426
+ className: "rh-w-7 rh-h-7 rh-flex rh-items-center rh-justify-center rh-text-sm rh-text-text-muted rh-opacity-40",
2427
+ children: d
2428
+ },
2429
+ `prev-${i}`
2430
+ )),
2431
+ days.map((day) => /* @__PURE__ */ jsxRuntime.jsx(
2432
+ "button",
2433
+ {
2434
+ onClick: () => handleDayClick(day),
2435
+ onMouseEnter: () => {
2436
+ if (intervalStart && !intervalEnd) {
2437
+ setHoverDate(new Date(calYear, calMonth, day));
2438
+ }
2439
+ },
2440
+ onMouseLeave: () => setHoverDate(void 0),
2441
+ className: getDayClasses(day),
2442
+ children: day
2443
+ },
2444
+ day
2445
+ )),
2446
+ nextDays.map((d, i) => /* @__PURE__ */ jsxRuntime.jsx(
2447
+ "div",
2448
+ {
2449
+ className: "rh-w-7 rh-h-7 rh-flex rh-items-center rh-justify-center rh-text-sm rh-text-text-muted rh-opacity-40",
2450
+ children: d
2451
+ },
2452
+ `next-${i}`
2453
+ ))
2454
+ ] });
2455
+ };
2456
+ const renderContent = () => {
2457
+ switch (activeMode) {
2458
+ case "interval":
2459
+ return renderIntervalNav();
2460
+ case "day":
2461
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rh-p-1", children: [
2462
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rh-flex rh-items-center rh-justify-between", children: [
2463
+ /* @__PURE__ */ jsxRuntime.jsx(
2464
+ "button",
2465
+ {
2466
+ onClick: () => {
2467
+ if (selectedMonth === 0) {
2468
+ setSelectedMonth(11);
2469
+ setSelectedYear((y) => y - 1);
2470
+ } else setSelectedMonth((m) => m - 1);
2471
+ },
2472
+ className: "rh-p-1 hover:rh-bg-background rh-rounded",
2473
+ children: /* @__PURE__ */ jsxRuntime.jsx(ChevronLeftIcon, { className: "rh-w-5 rh-h-5" })
2474
+ }
2475
+ ),
2476
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "rh-text-sm rh-font-medium rh-text-text", children: [
2477
+ MONTHS[selectedMonth],
2478
+ " - ",
2479
+ selectedYear
2480
+ ] }),
2481
+ /* @__PURE__ */ jsxRuntime.jsx(
2482
+ "button",
2483
+ {
2484
+ onClick: () => {
2485
+ if (selectedMonth === 11) {
2486
+ setSelectedMonth(0);
2487
+ setSelectedYear((y) => y + 1);
2488
+ } else setSelectedMonth((m) => m + 1);
2489
+ },
2490
+ className: "rh-p-1 hover:rh-bg-background rh-rounded",
2491
+ children: /* @__PURE__ */ jsxRuntime.jsx(ChevronRightIcon, { className: "rh-w-5 rh-h-5" })
2492
+ }
2493
+ )
2494
+ ] }),
2495
+ /* @__PURE__ */ jsxRuntime.jsx(
2496
+ "svg",
2497
+ {
2498
+ xmlns: "http://www.w3.org/2000/svg",
2499
+ width: "100%",
2500
+ height: "1",
2501
+ viewBox: "0 0 350 1",
2502
+ fill: "none",
2503
+ className: "rh-mb-3",
2504
+ children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M0 0.5H350", stroke: "#F5F5F5" })
2505
+ }
2506
+ ),
2507
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rh-grid rh-grid-cols-7 rh-mb-1", children: ["D", "S", "T", "Q", "Q", "S", "S"].map((d, i) => /* @__PURE__ */ jsxRuntime.jsx(
2508
+ "div",
2509
+ {
2510
+ className: "rh-text-center rh-text-xs rh-text-text-muted rh-font-medium rh-py-1",
2511
+ children: d
2512
+ },
2513
+ i
2514
+ )) }),
2515
+ renderDayGrid(selectedYear, selectedMonth)
2516
+ ] });
2517
+ case "month":
2518
+ return renderMonthGrid();
2519
+ case "year":
2520
+ return renderYearGrid();
2521
+ }
2522
+ };
2523
+ const renderDayGrid = (calYear, calMonth) => {
2524
+ const daysInMonth = getDaysInMonth2(calYear, calMonth);
2525
+ const firstDay = getFirstDayOfMonth2(calYear, calMonth);
2526
+ const days = Array.from({ length: daysInMonth }, (_, i) => i + 1);
2527
+ const prevMonth = calMonth === 0 ? 11 : calMonth - 1;
2528
+ const prevYear = calMonth === 0 ? calYear - 1 : calYear;
2529
+ const daysInPrevMonth = getDaysInMonth2(prevYear, prevMonth);
2530
+ const prevDays = Array.from(
2531
+ { length: firstDay },
2532
+ (_, i) => daysInPrevMonth - firstDay + i + 1
2533
+ );
2534
+ const totalCells = firstDay + daysInMonth;
2535
+ const nextDaysCount = totalCells % 7 === 0 ? 0 : 7 - totalCells % 7;
2536
+ const nextDays = Array.from({ length: nextDaysCount }, (_, i) => i + 1);
2537
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rh-grid rh-grid-cols-7 rh-gap-0", children: [
2538
+ prevDays.map((d, i) => /* @__PURE__ */ jsxRuntime.jsx(
2539
+ "div",
2540
+ {
2541
+ className: "rh-w-7 rh-h-7 rh-flex rh-items-center rh-justify-center rh-text-sm rh-text-text-muted rh-opacity-40",
2542
+ children: d
2543
+ },
2544
+ `prev-${i}`
2545
+ )),
2546
+ days.map((day) => {
2547
+ const isSelected = value.mode === "day" && value.year === calYear && value.month === calMonth && value.day === day;
2548
+ return /* @__PURE__ */ jsxRuntime.jsx(
2549
+ "button",
2550
+ {
2551
+ onClick: () => handleChange({ mode: "day", year: calYear, month: calMonth, day }),
2552
+ className: [
2553
+ "rh-w-7 rh-h-7 rh-flex rh-items-center rh-justify-center rh-text-sm rh-rounded-lg rh-transition-colors rh-duration-150",
2554
+ isSelected ? "rh-bg-primary rh-text-surface" : "rh-text-text hover:rh-ring-1 hover:rh-ring-[#15607A]"
2555
+ ].join(" "),
2556
+ children: day
2557
+ },
2558
+ day
2559
+ );
2560
+ }),
2561
+ nextDays.map((d, i) => /* @__PURE__ */ jsxRuntime.jsx(
2562
+ "div",
2563
+ {
2564
+ className: "rh-w-7 rh-h-7 rh-flex rh-items-center rh-justify-center rh-text-sm rh-text-text-muted rh-opacity-40",
2565
+ children: d
2566
+ },
2567
+ `next-${i}`
2568
+ ))
2569
+ ] });
2570
+ };
2571
+ return /* @__PURE__ */ jsxRuntime.jsxs(
2572
+ "div",
2573
+ {
2574
+ ref: wrapperRef,
2575
+ className: ["rh-relative rh-flex rh-flex-col rh-gap-1 rh-font-body", wrapperClassName].filter(Boolean).join(" "),
2576
+ children: [
2577
+ label && /* @__PURE__ */ jsxRuntime.jsxs("label", { id: `${triggerId}-label`, className: "rh-flex rh-items-baseline rh-gap-1", children: [
2578
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "rh-text-sm rh-font-medium rh-text-text", children: label }),
2579
+ subtitle && /* @__PURE__ */ jsxRuntime.jsx("span", { className: `rh-text-sm ${getSubtitleClassName3(subtitle)}`, children: subtitle })
2580
+ ] }),
2581
+ /* @__PURE__ */ jsxRuntime.jsxs(
2582
+ "button",
2583
+ {
2584
+ ref: innerRef,
2585
+ id: triggerId,
2586
+ type: "button",
2587
+ role: "combobox",
2588
+ "aria-expanded": isOpen,
2589
+ "aria-haspopup": "dialog",
2590
+ "aria-labelledby": label ? `${triggerId}-label` : void 0,
2591
+ "aria-describedby": helperText ? helperId : void 0,
2592
+ "aria-invalid": visualStatus === "error" || void 0,
2593
+ "aria-disabled": disabled || void 0,
2594
+ disabled,
2595
+ onClick: () => !disabled && setIsOpen((o) => !o),
2596
+ style: backgroundColor ? { backgroundColor } : void 0,
2597
+ className: [
2598
+ "rh-group rh-flex rh-items-center rh-justify-between rh-gap-2",
2599
+ "rh-border rh-font-body",
2600
+ !backgroundColor && "rh-bg-surface",
2601
+ "rh-transition-colors rh-duration-150",
2602
+ "rh-text-left rh-w-full",
2603
+ statusClasses3[visualStatus],
2604
+ radiusClasses5[radius],
2605
+ sizeClasses6[size],
2606
+ disabled ? "rh-opacity-50 rh-cursor-not-allowed rh-bg-background" : "rh-cursor-pointer",
2607
+ className
2608
+ ].filter(Boolean).join(" "),
2609
+ children: [
2610
+ /* @__PURE__ */ jsxRuntime.jsx(
2611
+ "span",
2612
+ {
2613
+ className: [
2614
+ "rh-flex-1 rh-truncate",
2615
+ displayText ? "rh-text-text" : "rh-text-text-muted group-hover:rh-text-text"
2616
+ ].join(" "),
2617
+ children: displayText ?? placeholder
2618
+ }
2619
+ ),
2620
+ /* @__PURE__ */ jsxRuntime.jsx(
2621
+ ChevronIcon2,
2622
+ {
2623
+ className: [
2624
+ "rh-w-4 rh-h-4 rh-shrink-0 rh-text-text-muted rh-transition-transform rh-duration-150 rh-bg-surface rh-rounded-xl",
2625
+ isOpen ? "rh-rotate-180" : ""
2626
+ ].filter(Boolean).join(" ")
2627
+ }
2628
+ )
2629
+ ]
2630
+ }
2631
+ ),
2632
+ isOpen && /* @__PURE__ */ jsxRuntime.jsxs(
2633
+ "div",
2634
+ {
2635
+ className: [
2636
+ "rh-absolute rh-z-50 rh-mt-1 rh-p-5",
2637
+ "rh-bg-surface rh-rounded-md",
2638
+ dropdownRadiusClasses2[radius],
2639
+ activeMode === "interval" ? "rh-w-[720px]" : "rh-w-[385px]"
2640
+ ].filter(Boolean).join(" "),
2641
+ style: {
2642
+ top: "100%",
2643
+ boxShadow: "0 0 9.6px 0 rgba(8, 11, 18, 0.08)"
2644
+ },
2645
+ children: [
2646
+ renderModeTabs(),
2647
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rh-mt-2", children: renderContent() })
2648
+ ]
2649
+ }
2650
+ ),
2651
+ helperText && !isHelperDismissed && /* @__PURE__ */ jsxRuntime.jsxs(
2652
+ "span",
2653
+ {
2654
+ id: helperId,
2655
+ className: [
2656
+ "rh-flex rh-items-center rh-gap-1 rh-text-xs",
2657
+ helperStatusClasses3[visualStatus]
2658
+ ].join(" "),
2659
+ children: [
2660
+ /* @__PURE__ */ jsxRuntime.jsx(WarningCircleIcon, {}),
2661
+ helperText
2662
+ ]
2663
+ }
2664
+ )
2665
+ ]
2666
+ }
2667
+ );
2668
+ }
2669
+ );
1900
2670
  var variantClasses = {
1901
2671
  light: "rh-bg-surface rh-text-text rh-border rh-border-border rh-shadow-md",
1902
2672
  default: "rh-bg-primary/10 rh-text-text rh-border rh-border-primary/20 rh-shadow-md",
@@ -1907,7 +2677,7 @@ var arrowVariantClasses = {
1907
2677
  default: "rh-border-primary/20 rh-bg-primary/10",
1908
2678
  dark: "rh-bg-primary"
1909
2679
  };
1910
- var sizeClasses6 = {
2680
+ var sizeClasses7 = {
1911
2681
  sm: "rh-px-3 rh-py-1.5 rh-text-xs",
1912
2682
  md: "rh-px-4 rh-py-3 rh-text-sm"
1913
2683
  };
@@ -2038,7 +2808,7 @@ var Tooltip = React9.forwardRef(
2038
2808
  "rh-absolute rh-z-50 rh-w-max rh-max-w-xs rh-rounded-xs",
2039
2809
  tooltipPlacementClasses[placement],
2040
2810
  variantClasses[variant],
2041
- sizeClasses6[size],
2811
+ sizeClasses7[size],
2042
2812
  className
2043
2813
  ].filter(Boolean).join(" "),
2044
2814
  children: [
@@ -2139,7 +2909,7 @@ function getAvatarColors(name) {
2139
2909
  const index = hash % AVATAR_COLORS.length;
2140
2910
  return AVATAR_COLORS[index];
2141
2911
  }
2142
- var sizeClasses7 = {
2912
+ var sizeClasses8 = {
2143
2913
  sm: "rh-w-8 rh-h-8 rh-text-xs",
2144
2914
  md: "rh-w-10 rh-h-10 rh-text-sm",
2145
2915
  lg: "rh-w-12 rh-h-12 rh-text-base",
@@ -2174,7 +2944,7 @@ var Avatar = React9.forwardRef(function Avatar2({ src, alt = "", initials, size
2174
2944
  "rh-inline-flex rh-items-center rh-justify-center rh-shrink-0 rh-overflow-hidden",
2175
2945
  avatarColors ? "" : "rh-bg-primary rh-text-surface",
2176
2946
  "rh-font-display rh-font-medium rh-select-none",
2177
- sizeClasses7[size],
2947
+ sizeClasses8[size],
2178
2948
  variantClasses2[variant],
2179
2949
  className
2180
2950
  ].filter(Boolean).join(" "),
@@ -2241,7 +3011,7 @@ var hoverInactivePresetClasses = {
2241
3011
  info: "hover:rh-bg-info/20 hover:rh-border-info/50",
2242
3012
  neutral: "hover:rh-bg-neutral/20 hover:rh-border-neutral/50"
2243
3013
  };
2244
- var sizeClasses8 = {
3014
+ var sizeClasses9 = {
2245
3015
  sm: "rh-text-xs rh-px-2 rh-py-0.5 rh-gap-1",
2246
3016
  md: "rh-text-sm rh-px-2.5 rh-py-1 rh-gap-1.5",
2247
3017
  lg: "rh-text-sm rh-px-3 rh-py-1.5 rh-gap-1.5"
@@ -2288,7 +3058,7 @@ var Tag = React9.forwardRef(function Tag2({
2288
3058
  "rh-transition-colors rh-duration-150",
2289
3059
  "rh-cursor-pointer",
2290
3060
  clickable ? "rh-cursor-pointer" : "",
2291
- sizeClasses8[size],
3061
+ sizeClasses9[size],
2292
3062
  colorClasses3,
2293
3063
  hoverClasses,
2294
3064
  disabled ? "rh-opacity-50 rh-cursor-not-allowed rh-pointer-events-none" : "",
@@ -2305,16 +3075,16 @@ var Tag = React9.forwardRef(function Tag2({
2305
3075
  }
2306
3076
  );
2307
3077
  });
2308
- var statusClasses3 = {
3078
+ var statusClasses4 = {
2309
3079
  default: "rh-border-border focus-within:rh-ring-2 focus-within:rh-ring-ring focus-within:rh-ring-offset-2",
2310
3080
  error: "rh-border-danger focus-within:rh-ring-2 focus-within:rh-ring-danger focus-within:rh-ring-offset-2"
2311
3081
  };
2312
- var sizeClasses9 = {
3082
+ var sizeClasses10 = {
2313
3083
  sm: "rh-min-h-[36px] rh-text-sm rh-px-2 rh-py-1",
2314
3084
  md: "rh-h-[44px] rh-text-sm rh-px-2 rh-py-[6px]",
2315
3085
  lg: "rh-min-h-[52px] rh-text-base rh-px-3 rh-py-2"
2316
3086
  };
2317
- var radiusClasses5 = {
3087
+ var radiusClasses6 = {
2318
3088
  none: "rh-rounded-none",
2319
3089
  xxs: "rh-rounded-xxs",
2320
3090
  xs: "rh-rounded-xs",
@@ -2324,7 +3094,7 @@ var radiusClasses5 = {
2324
3094
  xl: "rh-rounded-xl",
2325
3095
  full: "rh-rounded-full"
2326
3096
  };
2327
- var helperStatusClasses3 = {
3097
+ var helperStatusClasses4 = {
2328
3098
  default: "rh-text-text-muted",
2329
3099
  error: "rh-text-danger"
2330
3100
  };
@@ -2343,7 +3113,7 @@ var addButtonSizeClasses = {
2343
3113
  md: "rh-w-5 rh-h-5",
2344
3114
  lg: "rh-w-5 rh-h-5"
2345
3115
  };
2346
- var getSubtitleClassName3 = (subtitle) => subtitle.trim() === "*" ? "rh-text-danger" : "rh-text-text-muted";
3116
+ var getSubtitleClassName4 = (subtitle) => subtitle.trim() === "*" ? "rh-text-danger" : "rh-text-text-muted";
2347
3117
  var TagInput = React9.forwardRef(function TagInput2({
2348
3118
  label,
2349
3119
  subtitle,
@@ -2400,7 +3170,7 @@ var TagInput = React9.forwardRef(function TagInput2({
2400
3170
  children: [
2401
3171
  label && /* @__PURE__ */ jsxRuntime.jsxs("label", { htmlFor: inputId, className: "rh-flex rh-items-baseline rh-gap-1", children: [
2402
3172
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "rh-text-sm rh-font-semibold rh-text-text", children: label }),
2403
- subtitle && /* @__PURE__ */ jsxRuntime.jsx("span", { className: `rh-text-sm ${getSubtitleClassName3(subtitle)}`, children: subtitle })
3173
+ subtitle && /* @__PURE__ */ jsxRuntime.jsx("span", { className: `rh-text-sm ${getSubtitleClassName4(subtitle)}`, children: subtitle })
2404
3174
  ] }),
2405
3175
  /* @__PURE__ */ jsxRuntime.jsxs(
2406
3176
  "div",
@@ -2410,9 +3180,9 @@ var TagInput = React9.forwardRef(function TagInput2({
2410
3180
  "rh-flex rh-flex-row rh-items-center rh-justify-between rh-gap-2",
2411
3181
  "rh-border rh-bg-surface rh-font-body",
2412
3182
  "rh-transition-colors rh-duration-150",
2413
- statusClasses3[status],
2414
- radiusClasses5[radius],
2415
- sizeClasses9[size],
3183
+ statusClasses4[status],
3184
+ radiusClasses6[radius],
3185
+ sizeClasses10[size],
2416
3186
  disabled ? "rh-opacity-50 rh-cursor-not-allowed rh-bg-background" : "rh-cursor-pointer",
2417
3187
  className
2418
3188
  ].filter(Boolean).join(" "),
@@ -2575,7 +3345,7 @@ var TagInput = React9.forwardRef(function TagInput2({
2575
3345
  id: `${inputId}-helper`,
2576
3346
  className: [
2577
3347
  "rh-flex rh-items-center rh-gap-1 rh-text-xs",
2578
- helperStatusClasses3[status]
3348
+ helperStatusClasses4[status]
2579
3349
  ].join(" "),
2580
3350
  children: helperText
2581
3351
  }
@@ -2682,12 +3452,12 @@ var PRESET_COLORS5 = /* @__PURE__ */ new Set([
2682
3452
  "info"
2683
3453
  ]);
2684
3454
  var isPresetColor5 = (color) => PRESET_COLORS5.has(color);
2685
- var sizeClasses10 = {
3455
+ var sizeClasses11 = {
2686
3456
  sm: { container: "rh-h-8", button: "rh-px-2 rh-text-xs" },
2687
3457
  md: { container: "rh-h-9", button: "rh-px-3 rh-text-sm" },
2688
3458
  lg: { container: "rh-h-10", button: "rh-px-4 rh-text-sm" }
2689
3459
  };
2690
- var radiusClasses6 = {
3460
+ var radiusClasses7 = {
2691
3461
  none: "rh-rounded-none",
2692
3462
  xs: "rh-rounded-xs",
2693
3463
  sm: "rh-rounded-sm",
@@ -2720,8 +3490,8 @@ function ToggleGroupInner({
2720
3490
  className: [
2721
3491
  "rh-inline-flex rh-items-center rh-bg-muted rh-overflow-hidden",
2722
3492
  "rh-p-1 rh-gap-0.5",
2723
- radiusClasses6[radius],
2724
- sizeClasses10[size].container,
3493
+ radiusClasses7[radius],
3494
+ sizeClasses11[size].container,
2725
3495
  disabled ? "rh-opacity-50 rh-cursor-not-allowed" : "",
2726
3496
  className
2727
3497
  ].filter(Boolean).join(" "),
@@ -2743,8 +3513,8 @@ function ToggleGroupInner({
2743
3513
  "rh-border-0 rh-font-display rh-font-medium",
2744
3514
  "rh-transition-all rh-duration-150",
2745
3515
  "focus-visible:rh-outline-none focus-visible:rh-ring-2 focus-visible:rh-ring-ring",
2746
- radiusClasses6[radius],
2747
- sizeClasses10[size].button,
3516
+ radiusClasses7[radius],
3517
+ sizeClasses11[size].button,
2748
3518
  isActive ? "rh-bg-surface rh-text-text rh-shadow-sm" : "rh-bg-transparent rh-text-text-muted",
2749
3519
  !isActive && !isDisabled ? "hover:rh-bg-surface/50" : "",
2750
3520
  isDisabled ? "rh-cursor-not-allowed rh-pointer-events-none" : "rh-cursor-pointer"
@@ -2767,7 +3537,7 @@ var variantClasses3 = {
2767
3537
  outlined: "rh-bg-surface rh-border rh-border-border rh-shadow-none",
2768
3538
  filled: "rh-bg-background rh-border-0 rh-shadow-none"
2769
3539
  };
2770
- var radiusClasses7 = {
3540
+ var radiusClasses8 = {
2771
3541
  none: "rh-rounded-none",
2772
3542
  xs: "rh-rounded-xs",
2773
3543
  sm: "rh-rounded-sm",
@@ -2802,7 +3572,7 @@ var CardRoot = React9.forwardRef(function Card({
2802
3572
  className: [
2803
3573
  "rh-font-body rh-transition-all rh-duration-150",
2804
3574
  variantClasses3[variant],
2805
- radiusClasses7[radius],
3575
+ radiusClasses8[radius],
2806
3576
  paddingClasses[padding],
2807
3577
  isInteractive ? "rh-cursor-pointer hover:rh-shadow-lg hover:rh-scale-[1.01] active:rh-scale-[0.99]" : "",
2808
3578
  disabled ? "rh-opacity-50 rh-cursor-not-allowed rh-pointer-events-none" : "",
@@ -2855,7 +3625,7 @@ var PRESET_COLORS6 = /* @__PURE__ */ new Set([
2855
3625
  "info"
2856
3626
  ]);
2857
3627
  var isPresetColor6 = (color) => PRESET_COLORS6.has(color);
2858
- var sizeClasses11 = {
3628
+ var sizeClasses12 = {
2859
3629
  xs: "rh-w-3 rh-h-3",
2860
3630
  sm: "rh-w-4 rh-h-4",
2861
3631
  md: "rh-w-6 rh-h-6",
@@ -2883,7 +3653,7 @@ var Spinner = React9.forwardRef(function Spinner2({ size = "md", color = "primar
2883
3653
  "aria-label": label,
2884
3654
  className: [
2885
3655
  "rh-inline-flex rh-items-center rh-justify-center",
2886
- sizeClasses11[size],
3656
+ sizeClasses12[size],
2887
3657
  colorClass,
2888
3658
  className
2889
3659
  ].filter(Boolean).join(" "),
@@ -2971,7 +3741,7 @@ function getDaysInMonth(year, month) {
2971
3741
  function getFirstDayOfMonth(year, month) {
2972
3742
  return new Date(year, month, 1).getDay();
2973
3743
  }
2974
- var ChevronLeftIcon = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 20 20", fill: "currentColor", className: "rh-w-5 rh-h-5", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx(
3744
+ var ChevronLeftIcon2 = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 20 20", fill: "currentColor", className: "rh-w-5 rh-h-5", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx(
2975
3745
  "path",
2976
3746
  {
2977
3747
  fillRule: "evenodd",
@@ -2979,7 +3749,7 @@ var ChevronLeftIcon = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0
2979
3749
  clipRule: "evenodd"
2980
3750
  }
2981
3751
  ) });
2982
- var ChevronRightIcon = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 20 20", fill: "currentColor", className: "rh-w-5 rh-h-5", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx(
3752
+ var ChevronRightIcon2 = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 20 20", fill: "currentColor", className: "rh-w-5 rh-h-5", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx(
2983
3753
  "path",
2984
3754
  {
2985
3755
  fillRule: "evenodd",
@@ -3060,7 +3830,7 @@ var DatePickerDropdown = ({
3060
3830
  prevMonth();
3061
3831
  },
3062
3832
  className: "rh-p-1 hover:rh-bg-background rh-rounded rh-cursor-pointer rh-text-text",
3063
- children: /* @__PURE__ */ jsxRuntime.jsx(ChevronLeftIcon, {})
3833
+ children: /* @__PURE__ */ jsxRuntime.jsx(ChevronLeftIcon2, {})
3064
3834
  }
3065
3835
  ),
3066
3836
  /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "rh-text-sm rh-font-medium rh-text-text", children: [
@@ -3077,7 +3847,7 @@ var DatePickerDropdown = ({
3077
3847
  nextMonth();
3078
3848
  },
3079
3849
  className: "rh-p-1 hover:rh-bg-background rh-rounded rh-cursor-pointer rh-text-text",
3080
- children: /* @__PURE__ */ jsxRuntime.jsx(ChevronRightIcon, {})
3850
+ children: /* @__PURE__ */ jsxRuntime.jsx(ChevronRightIcon2, {})
3081
3851
  }
3082
3852
  )
3083
3853
  ] }),
@@ -3310,7 +4080,7 @@ var CustomSelect = ({
3310
4080
  )
3311
4081
  ] });
3312
4082
  };
3313
- var sizeClasses12 = {
4083
+ var sizeClasses13 = {
3314
4084
  sm: { cell: "rh-px-2 rh-py-2 rh-text-xs", header: "rh-px-2 rh-py-2 rh-text-xs" },
3315
4085
  md: { cell: "rh-px-3 rh-py-3 rh-text-sm", header: "rh-px-3 rh-py-3 rh-text-xs" },
3316
4086
  lg: { cell: "rh-px-4 rh-py-4 rh-text-sm", header: "rh-px-4 rh-py-3 rh-text-sm" }
@@ -3444,7 +4214,7 @@ function TableInner({
3444
4214
  ...rowPaddingStyle
3445
4215
  },
3446
4216
  className: [
3447
- rowPadding ? "" : sizeClasses12[size].header,
4217
+ rowPadding ? "" : sizeClasses13[size].header,
3448
4218
  alignClasses[column.align || "left"],
3449
4219
  `rh-font-semibold rh-whitespace-nowrap ${headerTextClassName || "rh-text-text-muted"}`,
3450
4220
  stickyHeader ? "rh-sticky rh-top-0 rh-bg-surface rh-z-10" : "",
@@ -3509,7 +4279,7 @@ function TableInner({
3509
4279
  {
3510
4280
  style: { width: column.width, maxWidth: column.maxWidth, ...rowPaddingStyle },
3511
4281
  className: [
3512
- rowPadding ? "" : sizeClasses12[size].cell,
4282
+ rowPadding ? "" : sizeClasses13[size].cell,
3513
4283
  alignClasses[column.align || "left"],
3514
4284
  "rh-text-text"
3515
4285
  ].filter(Boolean).join(" "),
@@ -3548,7 +4318,7 @@ function TableInner({
3548
4318
  colSpan,
3549
4319
  style: rowPaddingStyle,
3550
4320
  className: [
3551
- rowPadding ? "" : sizeClasses12[size].cell,
4321
+ rowPadding ? "" : sizeClasses13[size].cell,
3552
4322
  "rh-text-center rh-cursor-pointer rh-text-[#9CA3AF] rh-font-medium"
3553
4323
  ].filter(Boolean).join(" "),
3554
4324
  onClick: onAddRow,
@@ -4012,6 +4782,7 @@ exports.CaretRightIcon = CaretRightIcon;
4012
4782
  exports.Checkbox = Checkbox;
4013
4783
  exports.CloseIcon = CloseIcon;
4014
4784
  exports.Container = Container;
4785
+ exports.DateSelect = DateSelect;
4015
4786
  exports.DeleteIcon = DeleteIcon;
4016
4787
  exports.EditIcon = EditIcon;
4017
4788
  exports.ErrorIcon = ErrorIcon;