@facter/ds-core 1.25.0 → 1.27.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.d.mts CHANGED
@@ -311,6 +311,14 @@ interface DataTableProps<TData extends object> {
311
311
  * Usado para calcular navegação quando dados vêm do servidor.
312
312
  */
313
313
  pageCount?: number;
314
+ /**
315
+ * Callback disparado quando page ou pageSize mudam (server-side pagination).
316
+ * Inclui mudanças do autoPageSize e do seletor manual.
317
+ */
318
+ onPaginationChange?: (pagination: {
319
+ pageIndex: number;
320
+ pageSize: number;
321
+ }) => void;
314
322
  /** Custom className */
315
323
  className?: string;
316
324
  }
@@ -547,7 +555,7 @@ declare const DENSITY_CONFIG: {
547
555
  };
548
556
  };
549
557
 
550
- declare function DataTableRoot<TData extends object>({ children, data, columns, getRowId, manualPagination, pageCount, initialPageSize, className, }: DataTableProps<TData>): react_jsx_runtime.JSX.Element;
558
+ declare function DataTableRoot<TData extends object>({ children, data, columns, getRowId, manualPagination, pageCount, initialPageSize, onPaginationChange, className, }: DataTableProps<TData>): react_jsx_runtime.JSX.Element;
551
559
  declare namespace DataTableRoot {
552
560
  var displayName: string;
553
561
  }
package/dist/index.d.ts CHANGED
@@ -311,6 +311,14 @@ interface DataTableProps<TData extends object> {
311
311
  * Usado para calcular navegação quando dados vêm do servidor.
312
312
  */
313
313
  pageCount?: number;
314
+ /**
315
+ * Callback disparado quando page ou pageSize mudam (server-side pagination).
316
+ * Inclui mudanças do autoPageSize e do seletor manual.
317
+ */
318
+ onPaginationChange?: (pagination: {
319
+ pageIndex: number;
320
+ pageSize: number;
321
+ }) => void;
314
322
  /** Custom className */
315
323
  className?: string;
316
324
  }
@@ -547,7 +555,7 @@ declare const DENSITY_CONFIG: {
547
555
  };
548
556
  };
549
557
 
550
- declare function DataTableRoot<TData extends object>({ children, data, columns, getRowId, manualPagination, pageCount, initialPageSize, className, }: DataTableProps<TData>): react_jsx_runtime.JSX.Element;
558
+ declare function DataTableRoot<TData extends object>({ children, data, columns, getRowId, manualPagination, pageCount, initialPageSize, onPaginationChange, className, }: DataTableProps<TData>): react_jsx_runtime.JSX.Element;
551
559
  declare namespace DataTableRoot {
552
560
  var displayName: string;
553
561
  }
package/dist/index.js CHANGED
@@ -129,7 +129,7 @@ function CardTitle({ className, ...props }) {
129
129
  "h3",
130
130
  {
131
131
  className: cn(
132
- "text-2xl font-semibold leading-none tracking-tight",
132
+ "text-2xl font-semibold leading-none tracking-tight font-heading",
133
133
  className
134
134
  ),
135
135
  ...props
@@ -1142,7 +1142,8 @@ function useDataTableInternal({
1142
1142
  getRowId,
1143
1143
  manualPagination = false,
1144
1144
  pageCount: externalPageCount,
1145
- initialPageSize = 10
1145
+ initialPageSize = 10,
1146
+ onPaginationChange: onPaginationChangeProp
1146
1147
  }) {
1147
1148
  const [rowSelection, setRowSelection] = React10__namespace.useState({});
1148
1149
  const [columnVisibility, setColumnVisibility] = React10__namespace.useState({});
@@ -1187,6 +1188,14 @@ function useDataTableInternal({
1187
1188
  getPaginationRowModel: reactTable.getPaginationRowModel(),
1188
1189
  getSortedRowModel: reactTable.getSortedRowModel()
1189
1190
  });
1191
+ React10__namespace.useEffect(() => {
1192
+ if (onPaginationChangeProp) {
1193
+ onPaginationChangeProp({
1194
+ pageIndex: pagination.pageIndex,
1195
+ pageSize: pagination.pageSize
1196
+ });
1197
+ }
1198
+ }, [pagination.pageIndex, pagination.pageSize, onPaginationChangeProp]);
1190
1199
  const meta = React10__namespace.useMemo(
1191
1200
  () => ({
1192
1201
  isLoading: false,
@@ -1376,6 +1385,7 @@ function DataTableRoot({
1376
1385
  manualPagination,
1377
1386
  pageCount,
1378
1387
  initialPageSize,
1388
+ onPaginationChange,
1379
1389
  className
1380
1390
  }) {
1381
1391
  const { table, meta, density, setDensity, pageIndex, pageSize } = useDataTableInternal({
@@ -1384,7 +1394,8 @@ function DataTableRoot({
1384
1394
  getRowId,
1385
1395
  manualPagination,
1386
1396
  pageCount,
1387
- initialPageSize
1397
+ initialPageSize,
1398
+ onPaginationChange
1388
1399
  });
1389
1400
  return /* @__PURE__ */ jsxRuntime.jsx(
1390
1401
  DataTableProvider,
@@ -2619,7 +2630,7 @@ var DialogTitle = React10__namespace.memo(
2619
2630
  {
2620
2631
  ref,
2621
2632
  className: cn(
2622
- "text-2xl font-semibold leading-none tracking-tight",
2633
+ "text-2xl font-semibold leading-none tracking-tight font-heading",
2623
2634
  className
2624
2635
  ),
2625
2636
  ...props
@@ -6697,7 +6708,7 @@ var PageHeader = React10__namespace.memo(function PageHeader2({
6697
6708
  ),
6698
6709
  children: [
6699
6710
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col leading-none", children: [
6700
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-3xl font-semibold", children: title }),
6711
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-3xl font-semibold font-heading", children: title }),
6701
6712
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[1.05rem] text-muted-foreground max-w-lg text-balance leading-relaxed", children: description })
6702
6713
  ] }),
6703
6714
  children && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex gap-3 mt-2 sm:mt-0 shrink-0", children })