@algorithm-shift/design-system 1.2.29 → 1.2.31

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
@@ -68,6 +68,7 @@ interface TableProps extends ElementProps {
68
68
  pagination?: boolean;
69
69
  itemsPerPage?: number;
70
70
  onPageChange?: (page: number) => void;
71
+ loading?: boolean;
71
72
  }
72
73
 
73
74
  interface TabsProps extends ElementProps {
@@ -99,7 +100,7 @@ interface LogoProps extends ElementProps {
99
100
  altText?: string;
100
101
  }
101
102
 
102
- interface ButtonProps extends ElementProps {
103
+ type ButtonProps = ElementProps & React.ComponentProps<"button"> & {
103
104
  textContent?: string;
104
105
  type?: 'button' | 'submit';
105
106
  }
@@ -208,7 +209,7 @@ declare function DatePicker({ className, style, ...props }: DatePickerInputProps
208
209
 
209
210
  declare const DateRange: ({ className, style }: DateRangeInputProps) => react_jsx_runtime.JSX.Element;
210
211
 
211
- declare const Table: ({ columns, data, rowActions, className, style, pagination, itemsPerPage, onPageChange }: TableProps) => react_jsx_runtime.JSX.Element;
212
+ declare const Table: ({ columns, data, rowActions, className, style, pagination, itemsPerPage, onPageChange, loading }: TableProps) => react_jsx_runtime.JSX.Element;
212
213
 
213
214
  interface CustomPaginationProps {
214
215
  totalPages: number;
package/dist/index.d.ts CHANGED
@@ -68,6 +68,7 @@ interface TableProps extends ElementProps {
68
68
  pagination?: boolean;
69
69
  itemsPerPage?: number;
70
70
  onPageChange?: (page: number) => void;
71
+ loading?: boolean;
71
72
  }
72
73
 
73
74
  interface TabsProps extends ElementProps {
@@ -99,7 +100,7 @@ interface LogoProps extends ElementProps {
99
100
  altText?: string;
100
101
  }
101
102
 
102
- interface ButtonProps extends ElementProps {
103
+ type ButtonProps = ElementProps & React.ComponentProps<"button"> & {
103
104
  textContent?: string;
104
105
  type?: 'button' | 'submit';
105
106
  }
@@ -208,7 +209,7 @@ declare function DatePicker({ className, style, ...props }: DatePickerInputProps
208
209
 
209
210
  declare const DateRange: ({ className, style }: DateRangeInputProps) => react_jsx_runtime.JSX.Element;
210
211
 
211
- declare const Table: ({ columns, data, rowActions, className, style, pagination, itemsPerPage, onPageChange }: TableProps) => react_jsx_runtime.JSX.Element;
212
+ declare const Table: ({ columns, data, rowActions, className, style, pagination, itemsPerPage, onPageChange, loading }: TableProps) => react_jsx_runtime.JSX.Element;
212
213
 
213
214
  interface CustomPaginationProps {
214
215
  totalPages: number;
package/dist/index.js CHANGED
@@ -2223,7 +2223,7 @@ var Pagination_default = CustomPagination;
2223
2223
  // src/components/DataDisplay/Table/Table.tsx
2224
2224
  var import_react9 = require("react");
2225
2225
  var import_jsx_runtime41 = require("react/jsx-runtime");
2226
- var Table2 = ({ columns, data, rowActions, className, style, pagination = false, itemsPerPage = 10, onPageChange }) => {
2226
+ var Table2 = ({ columns, data, rowActions, className, style, pagination = false, itemsPerPage = 10, onPageChange, loading = false }) => {
2227
2227
  const rawColumns = Array.isArray(columns) ? columns : [];
2228
2228
  const rawData = Array.isArray(data) ? data : [];
2229
2229
  const rawRowActions = Array.isArray(rowActions) ? rowActions : [];
@@ -2235,7 +2235,7 @@ var Table2 = ({ columns, data, rowActions, className, style, pagination = false,
2235
2235
  };
2236
2236
  const paginatedData = enablePagination ? rawData.slice((currentPage - 1) * itemsPerPage, currentPage * itemsPerPage) : rawData;
2237
2237
  return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: `${className} space-y-3`, style, children: [
2238
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(DataTable, { columns: rawColumns, data: paginatedData, rowActions: rawRowActions }),
2238
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(DataTable, { columns: rawColumns, data: paginatedData, rowActions: rawRowActions, loading }),
2239
2239
  enablePagination && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
2240
2240
  Pagination_default,
2241
2241
  {