@rehagro/ui 1.0.4 → 1.0.6

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.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import React8, { forwardRef, createContext, useState, useRef, useCallback, useEffect, useContext, useMemo } from 'react';
2
+ import React8, { forwardRef, createContext, useState, useRef, useCallback, useEffect, useMemo, useContext } from 'react';
3
3
  import { jsxs, jsx } from 'react/jsx-runtime';
4
4
 
5
5
  // src/provider/RehagroProvider.tsx
@@ -694,6 +694,7 @@ var Button = forwardRef(function Button2({
694
694
  radius = "sm",
695
695
  color = "primary",
696
696
  hoverColor,
697
+ hoverStyle,
697
698
  loading = false,
698
699
  disabled,
699
700
  leftIcon,
@@ -706,13 +707,15 @@ var Button = forwardRef(function Button2({
706
707
  const isDisabled = React8.useMemo(() => disabled || loading, [disabled, loading]);
707
708
  const preset = isPresetColor(color);
708
709
  const computedStyle = React8.useMemo(() => {
709
- if (preset) {
710
- if (!hoverColor) return style ?? {};
711
- const triplet = toRgbTriplet2(hoverColor);
712
- return { ...style, [`--rh-${color}-hover`]: triplet ?? hoverColor };
713
- }
714
- return { ...style, ...getArbitraryColorStyle(variant, color) };
715
- }, [preset, color, variant, hoverColor, style]);
710
+ const baseStyle = preset ? hoverColor ? { [`--rh-${color}-hover`]: toRgbTriplet2(hoverColor) ?? hoverColor } : {} : getArbitraryColorStyle(variant, color);
711
+ const hoverVars = hoverStyle ? {
712
+ "--btn-hover-bg": hoverStyle.backgroundColor,
713
+ "--btn-hover-border": hoverStyle.borderColor,
714
+ "--btn-hover-color": hoverStyle.color
715
+ } : {};
716
+ return { ...style, ...baseStyle, ...hoverVars };
717
+ }, [preset, color, variant, hoverColor, hoverStyle, style]);
718
+ const hasCustomHover = Boolean(hoverStyle);
716
719
  return /* @__PURE__ */ jsxs(
717
720
  "button",
718
721
  {
@@ -725,7 +728,9 @@ var Button = forwardRef(function Button2({
725
728
  "rh-border rh-font-sans rh-font-medium",
726
729
  "rh-transition-colors rh-duration-150",
727
730
  "focus-visible:rh-outline-none focus-visible:rh-ring-2 focus-visible:rh-ring-ring focus-visible:rh-ring-offset-2",
728
- preset ? variantColorClasses[variant][color] : "hover:rh-brightness-90",
731
+ preset && !hasCustomHover ? variantColorClasses[variant][color] : "",
732
+ !preset && !hasCustomHover ? "hover:rh-brightness-90" : "",
733
+ hasCustomHover ? "btn-custom-hover" : "",
729
734
  sizeClasses[size],
730
735
  radiusClasses[radius],
731
736
  isDisabled ? "rh-opacity-50 rh-cursor-not-allowed rh-pointer-events-none" : "",
@@ -1771,6 +1776,33 @@ var Tooltip = forwardRef(
1771
1776
  );
1772
1777
  }
1773
1778
  );
1779
+ var AVATAR_COLORS = [
1780
+ { bg: "#FBF1E6", text: "#D6822D" },
1781
+ // Laranja
1782
+ { bg: "#EDF3FA", text: "#538CC6" },
1783
+ // Azul
1784
+ { bg: "#F3E5F5", text: "#9C27B0" },
1785
+ // Roxo
1786
+ { bg: "#E8F5E9", text: "#4CAF50" },
1787
+ // Verde
1788
+ { bg: "#FFF3E0", text: "#FF9800" },
1789
+ // Amarelo
1790
+ { bg: "#FFEBEE", text: "#F44336" },
1791
+ // Vermelho
1792
+ { bg: "#E3F2FD", text: "#2196F3" },
1793
+ // Azul claro
1794
+ { bg: "#F3E5F5", text: "#673AB7" },
1795
+ // Violeta
1796
+ { bg: "#E0F2F1", text: "#009688" },
1797
+ // Teal
1798
+ { bg: "#FBE9E7", text: "#FF5722" }
1799
+ // Deep Orange
1800
+ ];
1801
+ function getAvatarColors(name) {
1802
+ const hash = name.split("").reduce((acc, char) => acc + char.charCodeAt(0), 0);
1803
+ const index = hash % AVATAR_COLORS.length;
1804
+ return AVATAR_COLORS[index];
1805
+ }
1774
1806
  var sizeClasses7 = {
1775
1807
  sm: "rh-w-8 rh-h-8 rh-text-xs",
1776
1808
  md: "rh-w-10 rh-h-10 rh-text-sm",
@@ -1787,9 +1819,14 @@ var variantClasses2 = {
1787
1819
  circle: "rh-rounded-full",
1788
1820
  square: "rh-rounded-sm"
1789
1821
  };
1790
- var Avatar = forwardRef(function Avatar2({ src, alt = "", initials, size = "md", variant = "circle", className = "", ...rest }, ref) {
1822
+ var Avatar = forwardRef(function Avatar2({ src, alt = "", initials, size = "md", variant = "circle", colorFromName = false, className = "", style, ...rest }, ref) {
1791
1823
  const [imgError, setImgError] = useState(false);
1792
1824
  const showImage = src && !imgError;
1825
+ const avatarColors = useMemo(() => {
1826
+ if (!colorFromName) return null;
1827
+ const name = initials || alt || "";
1828
+ return name ? getAvatarColors(name) : null;
1829
+ }, [colorFromName, initials, alt]);
1793
1830
  const fallbackLabel = initials ? initials.slice(0, 2).toUpperCase() : alt ? alt.split(" ").slice(0, 2).map((w) => w[0]).join("").toUpperCase() : "?";
1794
1831
  return /* @__PURE__ */ jsx(
1795
1832
  "div",
@@ -1799,11 +1836,16 @@ var Avatar = forwardRef(function Avatar2({ src, alt = "", initials, size = "md",
1799
1836
  "aria-label": showImage ? void 0 : alt || initials,
1800
1837
  className: [
1801
1838
  "rh-inline-flex rh-items-center rh-justify-center rh-shrink-0 rh-overflow-hidden",
1802
- "rh-bg-primary rh-text-surface rh-font-sans rh-font-medium rh-select-none",
1839
+ avatarColors ? "" : "rh-bg-primary rh-text-surface",
1840
+ "rh-font-sans rh-font-medium rh-select-none",
1803
1841
  sizeClasses7[size],
1804
1842
  variantClasses2[variant],
1805
1843
  className
1806
1844
  ].filter(Boolean).join(" "),
1845
+ style: {
1846
+ ...avatarColors && { backgroundColor: avatarColors.bg, color: avatarColors.text },
1847
+ ...style
1848
+ },
1807
1849
  ...rest,
1808
1850
  children: showImage ? /* @__PURE__ */ jsx(
1809
1851
  "img",
@@ -1888,7 +1930,7 @@ var Tag = forwardRef(function Tag2({
1888
1930
  }, ref) {
1889
1931
  const preset = isPresetColor3(color);
1890
1932
  const clickable = !!rest.onClick && !disabled;
1891
- const colorClasses = preset ? active ? activePresetClasses[color] : inactivePresetClasses[color] : "";
1933
+ const colorClasses2 = preset ? active ? activePresetClasses[color] : inactivePresetClasses[color] : "";
1892
1934
  const hoverClasses = clickable && preset ? active ? hoverActivePresetClasses[color] : hoverInactivePresetClasses[color] : clickable ? "hover:rh-brightness-95" : "";
1893
1935
  const customStyles = preset ? {} : getCustomColorStyles(color, active);
1894
1936
  return /* @__PURE__ */ jsxs(
@@ -1906,7 +1948,7 @@ var Tag = forwardRef(function Tag2({
1906
1948
  "rh-cursor-pointer",
1907
1949
  clickable ? "rh-cursor-pointer" : "",
1908
1950
  sizeClasses8[size],
1909
- colorClasses,
1951
+ colorClasses2,
1910
1952
  hoverClasses,
1911
1953
  disabled ? "rh-opacity-50 rh-cursor-not-allowed rh-pointer-events-none" : "",
1912
1954
  className
@@ -1922,6 +1964,411 @@ var Tag = forwardRef(function Tag2({
1922
1964
  }
1923
1965
  );
1924
1966
  });
1967
+ var PRESET_COLORS4 = /* @__PURE__ */ new Set([
1968
+ "primary",
1969
+ "secondary",
1970
+ "danger",
1971
+ "warning",
1972
+ "success",
1973
+ "info"
1974
+ ]);
1975
+ var isPresetColor4 = (color) => PRESET_COLORS4.has(color);
1976
+ var sizeClasses9 = {
1977
+ sm: { container: "rh-h-8", button: "rh-px-2 rh-text-xs" },
1978
+ md: { container: "rh-h-9", button: "rh-px-3 rh-text-sm" },
1979
+ lg: { container: "rh-h-10", button: "rh-px-4 rh-text-sm" }
1980
+ };
1981
+ var radiusClasses5 = {
1982
+ none: "rh-rounded-none",
1983
+ xs: "rh-rounded-xs",
1984
+ sm: "rh-rounded-sm",
1985
+ md: "rh-rounded-md",
1986
+ lg: "rh-rounded-lg",
1987
+ xl: "rh-rounded-xl",
1988
+ full: "rh-rounded-full"
1989
+ };
1990
+ function getActiveStyles(color, isPreset) {
1991
+ if (isPreset) return {};
1992
+ return { backgroundColor: color, color: "#fff" };
1993
+ }
1994
+ function ToggleGroupInner({
1995
+ options,
1996
+ value,
1997
+ onChange,
1998
+ size = "md",
1999
+ radius = "full",
2000
+ color = "primary",
2001
+ disabled = false,
2002
+ className = "",
2003
+ ...rest
2004
+ }, ref) {
2005
+ const preset = isPresetColor4(color);
2006
+ return /* @__PURE__ */ jsx(
2007
+ "div",
2008
+ {
2009
+ ref,
2010
+ role: "group",
2011
+ className: [
2012
+ "rh-inline-flex rh-items-center rh-bg-muted rh-overflow-hidden",
2013
+ "rh-p-1 rh-gap-0.5",
2014
+ radiusClasses5[radius],
2015
+ sizeClasses9[size].container,
2016
+ disabled ? "rh-opacity-50 rh-cursor-not-allowed" : "",
2017
+ className
2018
+ ].filter(Boolean).join(" "),
2019
+ ...rest,
2020
+ children: options.map((option) => {
2021
+ const isActive = value === option.value;
2022
+ const isDisabled = disabled || option.disabled;
2023
+ return /* @__PURE__ */ jsxs(
2024
+ "button",
2025
+ {
2026
+ type: "button",
2027
+ role: "radio",
2028
+ "aria-checked": isActive,
2029
+ "aria-label": option["aria-label"],
2030
+ disabled: isDisabled,
2031
+ onClick: () => !isDisabled && onChange(option.value),
2032
+ className: [
2033
+ "rh-flex rh-items-center rh-justify-center rh-h-full",
2034
+ "rh-border-0 rh-font-sans rh-font-medium",
2035
+ "rh-transition-all rh-duration-150",
2036
+ "focus-visible:rh-outline-none focus-visible:rh-ring-2 focus-visible:rh-ring-ring",
2037
+ radiusClasses5[radius],
2038
+ sizeClasses9[size].button,
2039
+ isActive ? "rh-bg-surface rh-text-text rh-shadow-sm" : "rh-bg-transparent rh-text-text-muted",
2040
+ !isActive && !isDisabled ? "hover:rh-bg-surface/50" : "",
2041
+ isDisabled ? "rh-cursor-not-allowed rh-pointer-events-none" : "rh-cursor-pointer"
2042
+ ].filter(Boolean).join(" "),
2043
+ style: isActive && !preset ? getActiveStyles(color, preset) : void 0,
2044
+ children: [
2045
+ option.icon,
2046
+ option.label
2047
+ ]
2048
+ },
2049
+ option.value
2050
+ );
2051
+ })
2052
+ }
2053
+ );
2054
+ }
2055
+ var ToggleGroup = forwardRef(ToggleGroupInner);
2056
+ var variantClasses3 = {
2057
+ elevated: "rh-bg-surface rh-shadow-md rh-border-0",
2058
+ outlined: "rh-bg-surface rh-border rh-border-border rh-shadow-none",
2059
+ filled: "rh-bg-background rh-border-0 rh-shadow-none"
2060
+ };
2061
+ var radiusClasses6 = {
2062
+ none: "rh-rounded-none",
2063
+ xs: "rh-rounded-xs",
2064
+ sm: "rh-rounded-sm",
2065
+ md: "rh-rounded-md",
2066
+ lg: "rh-rounded-lg",
2067
+ xl: "rh-rounded-xl"
2068
+ };
2069
+ var paddingClasses = {
2070
+ none: "rh-p-0",
2071
+ sm: "rh-p-3",
2072
+ md: "rh-p-4",
2073
+ lg: "rh-p-6"
2074
+ };
2075
+ var Card = forwardRef(function Card2({
2076
+ variant = "outlined",
2077
+ radius = "sm",
2078
+ padding = "md",
2079
+ clickable = false,
2080
+ disabled = false,
2081
+ className = "",
2082
+ children,
2083
+ ...rest
2084
+ }, ref) {
2085
+ const isInteractive = clickable && !disabled;
2086
+ return /* @__PURE__ */ jsx(
2087
+ "div",
2088
+ {
2089
+ ref,
2090
+ role: clickable ? "button" : void 0,
2091
+ tabIndex: isInteractive ? 0 : void 0,
2092
+ "aria-disabled": disabled || void 0,
2093
+ className: [
2094
+ "rh-font-sans rh-transition-all rh-duration-150",
2095
+ variantClasses3[variant],
2096
+ radiusClasses6[radius],
2097
+ paddingClasses[padding],
2098
+ isInteractive ? "rh-cursor-pointer hover:rh-shadow-lg hover:rh-scale-[1.01] active:rh-scale-[0.99]" : "",
2099
+ disabled ? "rh-opacity-50 rh-cursor-not-allowed rh-pointer-events-none" : "",
2100
+ className
2101
+ ].filter(Boolean).join(" "),
2102
+ ...rest,
2103
+ children
2104
+ }
2105
+ );
2106
+ });
2107
+ var CardHeader = forwardRef(function CardHeader2({ className = "", children, ...rest }, ref) {
2108
+ return /* @__PURE__ */ jsx(
2109
+ "div",
2110
+ {
2111
+ ref,
2112
+ className: ["rh-flex rh-items-center rh-justify-between rh-gap-4", className].filter(Boolean).join(" "),
2113
+ ...rest,
2114
+ children
2115
+ }
2116
+ );
2117
+ });
2118
+ var CardContent = forwardRef(function CardContent2({ className = "", children, ...rest }, ref) {
2119
+ return /* @__PURE__ */ jsx("div", { ref, className: ["rh-mt-2", className].filter(Boolean).join(" "), ...rest, children });
2120
+ });
2121
+ var CardFooter = forwardRef(function CardFooter2({ className = "", children, ...rest }, ref) {
2122
+ return /* @__PURE__ */ jsx(
2123
+ "div",
2124
+ {
2125
+ ref,
2126
+ className: [
2127
+ "rh-flex rh-items-center rh-justify-end rh-gap-2 rh-mt-4 rh-pt-4 rh-border-t rh-border-border",
2128
+ className
2129
+ ].filter(Boolean).join(" "),
2130
+ ...rest,
2131
+ children
2132
+ }
2133
+ );
2134
+ });
2135
+ var PRESET_COLORS5 = /* @__PURE__ */ new Set([
2136
+ "primary",
2137
+ "secondary",
2138
+ "danger",
2139
+ "warning",
2140
+ "success",
2141
+ "info"
2142
+ ]);
2143
+ var isPresetColor5 = (color) => PRESET_COLORS5.has(color);
2144
+ var sizeClasses10 = {
2145
+ xs: "rh-w-3 rh-h-3",
2146
+ sm: "rh-w-4 rh-h-4",
2147
+ md: "rh-w-6 rh-h-6",
2148
+ lg: "rh-w-8 rh-h-8",
2149
+ xl: "rh-w-12 rh-h-12"
2150
+ };
2151
+ var colorClasses = {
2152
+ primary: "rh-text-primary",
2153
+ secondary: "rh-text-secondary",
2154
+ danger: "rh-text-danger",
2155
+ warning: "rh-text-warning",
2156
+ success: "rh-text-success",
2157
+ info: "rh-text-info"
2158
+ };
2159
+ var Spinner = forwardRef(function Spinner2({ size = "md", color = "primary", label = "Carregando...", className = "", style, ...rest }, ref) {
2160
+ const preset = isPresetColor5(color);
2161
+ const colorClass = preset ? colorClasses[color] : "";
2162
+ const customStyle = preset ? style : { ...style, color };
2163
+ return /* @__PURE__ */ jsxs(
2164
+ "div",
2165
+ {
2166
+ ref,
2167
+ role: "status",
2168
+ "aria-label": label,
2169
+ className: [
2170
+ "rh-inline-flex rh-items-center rh-justify-center",
2171
+ sizeClasses10[size],
2172
+ colorClass,
2173
+ className
2174
+ ].filter(Boolean).join(" "),
2175
+ style: customStyle,
2176
+ ...rest,
2177
+ children: [
2178
+ /* @__PURE__ */ jsxs(
2179
+ "svg",
2180
+ {
2181
+ className: "rh-animate-spin",
2182
+ xmlns: "http://www.w3.org/2000/svg",
2183
+ fill: "none",
2184
+ viewBox: "0 0 24 24",
2185
+ "aria-hidden": "true",
2186
+ children: [
2187
+ /* @__PURE__ */ jsx(
2188
+ "circle",
2189
+ {
2190
+ className: "rh-opacity-25",
2191
+ cx: "12",
2192
+ cy: "12",
2193
+ r: "10",
2194
+ stroke: "currentColor",
2195
+ strokeWidth: "4"
2196
+ }
2197
+ ),
2198
+ /* @__PURE__ */ jsx(
2199
+ "path",
2200
+ {
2201
+ className: "rh-opacity-75",
2202
+ fill: "currentColor",
2203
+ d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"
2204
+ }
2205
+ )
2206
+ ]
2207
+ }
2208
+ ),
2209
+ /* @__PURE__ */ jsx("span", { className: "rh-sr-only", children: label })
2210
+ ]
2211
+ }
2212
+ );
2213
+ });
2214
+ var sizeClasses11 = {
2215
+ sm: { cell: "rh-px-2 rh-py-2 rh-text-xs", header: "rh-px-2 rh-py-2 rh-text-xs" },
2216
+ md: { cell: "rh-px-3 rh-py-3 rh-text-sm", header: "rh-px-3 rh-py-3 rh-text-xs" },
2217
+ lg: { cell: "rh-px-4 rh-py-4 rh-text-sm", header: "rh-px-4 rh-py-3 rh-text-sm" }
2218
+ };
2219
+ var alignClasses = {
2220
+ left: "rh-text-left",
2221
+ center: "rh-text-center",
2222
+ right: "rh-text-right"
2223
+ };
2224
+ function TableInner({
2225
+ columns,
2226
+ data,
2227
+ rowKey,
2228
+ size = "md",
2229
+ variant = "default",
2230
+ sort,
2231
+ onSortChange,
2232
+ loading = false,
2233
+ emptyContent = "Nenhum dado encontrado",
2234
+ loadingContent,
2235
+ stickyHeader = false,
2236
+ headerStyle,
2237
+ className = "",
2238
+ ...rest
2239
+ }, ref) {
2240
+ const handleSort = (column) => {
2241
+ if (!column.sortable || !onSortChange) return;
2242
+ const newDirection = sort?.key === column.key ? sort.direction === "asc" ? "desc" : sort.direction === "desc" ? null : "asc" : "asc";
2243
+ onSortChange({ key: column.key, direction: newDirection });
2244
+ };
2245
+ const renderSortIcon = (column) => {
2246
+ if (!column.sortable) return null;
2247
+ const isAsc = sort?.key === column.key && sort.direction === "asc";
2248
+ const isDesc = sort?.key === column.key && sort.direction === "desc";
2249
+ return /* @__PURE__ */ jsxs("span", { className: "rh-ml-1 rh-inline-flex rh-flex-col rh-gap-0.5", children: [
2250
+ /* @__PURE__ */ jsx(
2251
+ "svg",
2252
+ {
2253
+ width: "8",
2254
+ height: "5",
2255
+ viewBox: "0 0 8 5",
2256
+ fill: "none",
2257
+ xmlns: "http://www.w3.org/2000/svg",
2258
+ className: isAsc ? "rh-text-primary" : "rh-text-text-muted",
2259
+ children: /* @__PURE__ */ jsx("path", { d: "M4 0L7.4641 4.5H0.535898L4 0Z", fill: "currentColor" })
2260
+ }
2261
+ ),
2262
+ /* @__PURE__ */ jsx(
2263
+ "svg",
2264
+ {
2265
+ width: "8",
2266
+ height: "5",
2267
+ viewBox: "0 0 8 5",
2268
+ fill: "none",
2269
+ xmlns: "http://www.w3.org/2000/svg",
2270
+ className: isDesc ? "rh-text-primary" : "rh-text-text-muted",
2271
+ children: /* @__PURE__ */ jsx("path", { d: "M4 5L0.535898 0.5H7.4641L4 5Z", fill: "currentColor" })
2272
+ }
2273
+ )
2274
+ ] });
2275
+ };
2276
+ const isEmpty = !loading && data.length === 0;
2277
+ const colSpan = columns.length;
2278
+ return /* @__PURE__ */ jsx("div", { className: "rh-w-full rh-overflow-x-auto", children: /* @__PURE__ */ jsxs(
2279
+ "table",
2280
+ {
2281
+ ref,
2282
+ className: [
2283
+ "rh-w-full rh-border-collapse rh-font-sans",
2284
+ className
2285
+ ].filter(Boolean).join(" "),
2286
+ ...rest,
2287
+ children: [
2288
+ /* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsx("tr", { className: "rh-border-b rh-border-border", style: headerStyle, children: columns.map((column) => /* @__PURE__ */ jsx(
2289
+ "th",
2290
+ {
2291
+ scope: "col",
2292
+ style: { width: column.width },
2293
+ className: [
2294
+ sizeClasses11[size].header,
2295
+ alignClasses[column.align || "left"],
2296
+ "rh-font-semibold rh-text-text-muted rh-whitespace-nowrap",
2297
+ stickyHeader ? "rh-sticky rh-top-0 rh-bg-surface rh-z-10" : "",
2298
+ column.sortable ? "rh-cursor-pointer rh-select-none hover:rh-text-text" : ""
2299
+ ].filter(Boolean).join(" "),
2300
+ onClick: () => handleSort(column),
2301
+ children: /* @__PURE__ */ jsxs("span", { className: "rh-inline-flex rh-items-center", children: [
2302
+ column.header,
2303
+ renderSortIcon(column)
2304
+ ] })
2305
+ },
2306
+ column.key
2307
+ )) }) }),
2308
+ /* @__PURE__ */ jsxs("tbody", { children: [
2309
+ loading && /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx("td", { colSpan, className: "rh-text-center rh-py-8", children: loadingContent || /* @__PURE__ */ jsxs("div", { className: "rh-flex rh-items-center rh-justify-center rh-gap-2 rh-text-text-muted", children: [
2310
+ /* @__PURE__ */ jsxs(
2311
+ "svg",
2312
+ {
2313
+ className: "rh-animate-spin rh-h-5 rh-w-5",
2314
+ xmlns: "http://www.w3.org/2000/svg",
2315
+ fill: "none",
2316
+ viewBox: "0 0 24 24",
2317
+ children: [
2318
+ /* @__PURE__ */ jsx(
2319
+ "circle",
2320
+ {
2321
+ className: "rh-opacity-25",
2322
+ cx: "12",
2323
+ cy: "12",
2324
+ r: "10",
2325
+ stroke: "currentColor",
2326
+ strokeWidth: "4"
2327
+ }
2328
+ ),
2329
+ /* @__PURE__ */ jsx(
2330
+ "path",
2331
+ {
2332
+ className: "rh-opacity-75",
2333
+ fill: "currentColor",
2334
+ d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"
2335
+ }
2336
+ )
2337
+ ]
2338
+ }
2339
+ ),
2340
+ "Carregando..."
2341
+ ] }) }) }),
2342
+ isEmpty && /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx("td", { colSpan, className: "rh-text-center rh-py-8 rh-text-text-muted", children: emptyContent }) }),
2343
+ !loading && data.map((row, index) => /* @__PURE__ */ jsx(
2344
+ "tr",
2345
+ {
2346
+ className: [
2347
+ "rh-border-b rh-border-border rh-transition-colors",
2348
+ "hover:rh-bg-background",
2349
+ variant === "striped" && index % 2 === 1 ? "rh-bg-background/50" : ""
2350
+ ].filter(Boolean).join(" "),
2351
+ children: columns.map((column) => /* @__PURE__ */ jsx(
2352
+ "td",
2353
+ {
2354
+ className: [
2355
+ sizeClasses11[size].cell,
2356
+ alignClasses[column.align || "left"],
2357
+ "rh-text-text"
2358
+ ].filter(Boolean).join(" "),
2359
+ children: column.render(row, index)
2360
+ },
2361
+ column.key
2362
+ ))
2363
+ },
2364
+ rowKey(row, index)
2365
+ ))
2366
+ ] })
2367
+ ]
2368
+ }
2369
+ ) });
2370
+ }
2371
+ var Table = forwardRef(TableInner);
1925
2372
  var Container = forwardRef(
1926
2373
  function Container2({ fluid = false, className = "", children, ...rest }, ref) {
1927
2374
  return /* @__PURE__ */ jsx(
@@ -2091,6 +2538,6 @@ var GridItem = forwardRef(
2091
2538
  }
2092
2539
  );
2093
2540
 
2094
- export { Avatar, Button, Checkbox, CloseIcon, Container, DeleteIcon, EditIcon, ErrorIcon, GridContainer, GridItem, IconButton, InfoIcon, NeutralIcon, PlusIcon, RehagroProvider, SearchIcon, Select, SuccessIcon, Tag, TextInput, Toast, ToastContainer, ToastProvider, Tooltip, WarningIcon, useToast };
2541
+ export { Avatar, Button, Card, CardContent, CardFooter, CardHeader, Checkbox, CloseIcon, Container, DeleteIcon, EditIcon, ErrorIcon, GridContainer, GridItem, IconButton, InfoIcon, NeutralIcon, PlusIcon, RehagroProvider, SearchIcon, Select, Spinner, SuccessIcon, Table, Tag, TextInput, Toast, ToastContainer, ToastProvider, ToggleGroup, Tooltip, WarningIcon, useToast };
2095
2542
  //# sourceMappingURL=index.mjs.map
2096
2543
  //# sourceMappingURL=index.mjs.map