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