@motor-hero/ui-kit 0.38.0 → 0.39.0

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
@@ -2052,13 +2052,14 @@ function ResponsiveDataView({
2052
2052
  cards,
2053
2053
  isEmpty,
2054
2054
  isLoading,
2055
+ isBusy = false,
2055
2056
  emptyIcon,
2056
2057
  emptyTitle = "Nenhum registro encontrado",
2057
2058
  emptyDescription,
2058
2059
  emptyAction,
2059
2060
  pagination
2060
2061
  }) {
2061
- if (!isLoading && isEmpty) {
2062
+ if (!isLoading && !isBusy && isEmpty) {
2062
2063
  return /* @__PURE__ */ jsx25("div", { className: "rounded-md border", children: /* @__PURE__ */ jsx25(
2063
2064
  EmptyState,
2064
2065
  {
@@ -2069,9 +2070,20 @@ function ResponsiveDataView({
2069
2070
  }
2070
2071
  ) });
2071
2072
  }
2073
+ const busyClass = isBusy && "pointer-events-none opacity-50";
2072
2074
  return /* @__PURE__ */ jsxs22("div", { className: "space-y-4", children: [
2073
- /* @__PURE__ */ jsx25("div", { className: "hidden overflow-x-auto rounded-md border md:block", children: table }),
2074
- /* @__PURE__ */ jsx25("div", { className: "md:hidden", children: cards }),
2075
+ /* @__PURE__ */ jsx25(
2076
+ "div",
2077
+ {
2078
+ "aria-busy": isBusy,
2079
+ className: cn(
2080
+ "hidden overflow-x-auto rounded-md border transition-opacity md:block",
2081
+ busyClass
2082
+ ),
2083
+ children: table
2084
+ }
2085
+ ),
2086
+ /* @__PURE__ */ jsx25("div", { "aria-busy": isBusy, className: cn("transition-opacity md:hidden", busyClass), children: cards }),
2075
2087
  pagination
2076
2088
  ] });
2077
2089
  }