warqadui 0.0.102 → 0.0.103

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 CHANGED
@@ -661,8 +661,9 @@ interface SummaryTableProps<T> {
661
661
  columns: SummaryColumn<T>[];
662
662
  data: T[];
663
663
  className?: string;
664
+ isLoading?: boolean;
664
665
  }
665
- declare function SummaryTable<T>({ title, columns, data, className, }: SummaryTableProps<T>): react_jsx_runtime.JSX.Element;
666
+ declare function SummaryTable<T>({ title, columns, data, className, isLoading, }: SummaryTableProps<T>): react_jsx_runtime.JSX.Element;
666
667
 
667
668
  interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {
668
669
  variant?: "primary" | "danger" | "warning" | "success";
package/dist/index.d.ts CHANGED
@@ -661,8 +661,9 @@ interface SummaryTableProps<T> {
661
661
  columns: SummaryColumn<T>[];
662
662
  data: T[];
663
663
  className?: string;
664
+ isLoading?: boolean;
664
665
  }
665
- declare function SummaryTable<T>({ title, columns, data, className, }: SummaryTableProps<T>): react_jsx_runtime.JSX.Element;
666
+ declare function SummaryTable<T>({ title, columns, data, className, isLoading, }: SummaryTableProps<T>): react_jsx_runtime.JSX.Element;
666
667
 
667
668
  interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {
668
669
  variant?: "primary" | "danger" | "warning" | "success";
package/dist/index.js CHANGED
@@ -4576,7 +4576,8 @@ function SummaryTable({
4576
4576
  title = "Account overview",
4577
4577
  columns,
4578
4578
  data,
4579
- className
4579
+ className,
4580
+ isLoading
4580
4581
  }) {
4581
4582
  return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
4582
4583
  "div",
@@ -4591,7 +4592,7 @@ function SummaryTable({
4591
4592
  title && /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex items-center justify-between px-6 py-4 border-b border-gray-100 dark:border-zinc-800/80 bg-white dark:bg-zinc-900", children: [
4592
4593
  /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("h3", { className: "text-lg font-bold text-gray-900 dark:text-white capitalize flex items-center gap-3", children: [
4593
4594
  /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "w-1.5 h-5 bg-blue-600 dark:bg-blue-500 rounded-full inline-block shadow-sm" }),
4594
- title
4595
+ isLoading ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "h-5 w-32 bg-gray-100 dark:bg-zinc-800 rounded animate-pulse" }) : title
4595
4596
  ] }),
4596
4597
  /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("button", { className: "text-gray-400 hover:text-gray-900 dark:hover:text-white transition-colors p-1 rounded-md hover:bg-gray-100 dark:hover:bg-zinc-800", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
4597
4598
  "svg",
@@ -4624,7 +4625,7 @@ function SummaryTable({
4624
4625
  },
4625
4626
  col.key || idx
4626
4627
  )) }) }),
4627
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("tbody", { className: "text-gray-800 dark:text-gray-200 bg-white dark:bg-zinc-900", children: data.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("td", { colSpan: columns.length, className: "px-6 py-12 text-center", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex flex-col items-center justify-center space-y-3", children: [
4628
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("tbody", { className: "text-gray-800 dark:text-gray-200 bg-white dark:bg-zinc-900", children: isLoading ? [...Array(3)].map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("tr", { className: "border-b border-gray-50 dark:border-zinc-800/60", children: columns.map((col, j) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("td", { className: "px-6 py-4", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "h-4 bg-gray-100 dark:bg-zinc-800 rounded animate-pulse w-full" }) }, j)) }, i)) : data.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("td", { colSpan: columns.length, className: "px-6 py-12 text-center", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex flex-col items-center justify-center space-y-3", children: [
4628
4629
  /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "h-12 w-12 rounded-full bg-gray-50 dark:bg-zinc-800 flex items-center justify-center text-gray-400 border border-gray-100 dark:border-zinc-700", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
4629
4630
  "svg",
4630
4631
  {
package/dist/index.mjs CHANGED
@@ -4481,7 +4481,8 @@ function SummaryTable({
4481
4481
  title = "Account overview",
4482
4482
  columns,
4483
4483
  data,
4484
- className
4484
+ className,
4485
+ isLoading
4485
4486
  }) {
4486
4487
  return /* @__PURE__ */ jsxs23(
4487
4488
  "div",
@@ -4496,7 +4497,7 @@ function SummaryTable({
4496
4497
  title && /* @__PURE__ */ jsxs23("div", { className: "flex items-center justify-between px-6 py-4 border-b border-gray-100 dark:border-zinc-800/80 bg-white dark:bg-zinc-900", children: [
4497
4498
  /* @__PURE__ */ jsxs23("h3", { className: "text-lg font-bold text-gray-900 dark:text-white capitalize flex items-center gap-3", children: [
4498
4499
  /* @__PURE__ */ jsx28("span", { className: "w-1.5 h-5 bg-blue-600 dark:bg-blue-500 rounded-full inline-block shadow-sm" }),
4499
- title
4500
+ isLoading ? /* @__PURE__ */ jsx28("div", { className: "h-5 w-32 bg-gray-100 dark:bg-zinc-800 rounded animate-pulse" }) : title
4500
4501
  ] }),
4501
4502
  /* @__PURE__ */ jsx28("button", { className: "text-gray-400 hover:text-gray-900 dark:hover:text-white transition-colors p-1 rounded-md hover:bg-gray-100 dark:hover:bg-zinc-800", children: /* @__PURE__ */ jsxs23(
4502
4503
  "svg",
@@ -4529,7 +4530,7 @@ function SummaryTable({
4529
4530
  },
4530
4531
  col.key || idx
4531
4532
  )) }) }),
4532
- /* @__PURE__ */ jsx28("tbody", { className: "text-gray-800 dark:text-gray-200 bg-white dark:bg-zinc-900", children: data.length === 0 ? /* @__PURE__ */ jsx28("tr", { children: /* @__PURE__ */ jsx28("td", { colSpan: columns.length, className: "px-6 py-12 text-center", children: /* @__PURE__ */ jsxs23("div", { className: "flex flex-col items-center justify-center space-y-3", children: [
4533
+ /* @__PURE__ */ jsx28("tbody", { className: "text-gray-800 dark:text-gray-200 bg-white dark:bg-zinc-900", children: isLoading ? [...Array(3)].map((_, i) => /* @__PURE__ */ jsx28("tr", { className: "border-b border-gray-50 dark:border-zinc-800/60", children: columns.map((col, j) => /* @__PURE__ */ jsx28("td", { className: "px-6 py-4", children: /* @__PURE__ */ jsx28("div", { className: "h-4 bg-gray-100 dark:bg-zinc-800 rounded animate-pulse w-full" }) }, j)) }, i)) : data.length === 0 ? /* @__PURE__ */ jsx28("tr", { children: /* @__PURE__ */ jsx28("td", { colSpan: columns.length, className: "px-6 py-12 text-center", children: /* @__PURE__ */ jsxs23("div", { className: "flex flex-col items-center justify-center space-y-3", children: [
4533
4534
  /* @__PURE__ */ jsx28("div", { className: "h-12 w-12 rounded-full bg-gray-50 dark:bg-zinc-800 flex items-center justify-center text-gray-400 border border-gray-100 dark:border-zinc-700", children: /* @__PURE__ */ jsxs23(
4534
4535
  "svg",
4535
4536
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "warqadui",
3
- "version": "0.0.102",
3
+ "version": "0.0.103",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.ts",