karsten-design-system 2.0.12 → 2.0.13

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
@@ -4462,7 +4462,7 @@ const RowsPerPageDropdown = ({ value, options, onChange, }) => {
4462
4462
  }
4463
4463
  }, children: option }, option))) }) }))] }));
4464
4464
  };
4465
- function Paginator(props) {
4465
+ function Paginator({ rowsPerPageOptions = [10, 20, 30, 50, 100], onRowsPerPageChange, ...props }) {
4466
4466
  const template = {
4467
4467
  layout: 'PrevPageLink PageLinks NextPageLink RowsPerPageDropdown',
4468
4468
  PrevPageLink: (options) => {
@@ -4480,8 +4480,13 @@ function Paginator(props) {
4480
4480
  });
4481
4481
  },
4482
4482
  RowsPerPageDropdown: (options) => {
4483
- const rowsOptions = [10, 20, 30, 50, 100];
4484
- return (jsxs("div", { className: "flex items-center gap-2 ml-4", children: [jsx("span", { className: "text-sm font-roboto text-dark-500 dark:text-light-500", children: "Registros por p\u00E1gina:" }), jsx(RowsPerPageDropdown, { value: options.value, options: rowsOptions, onChange: options.onChange })] }));
4483
+ return (jsxs("div", { className: "flex items-center gap-2 ml-4", children: [jsx("span", { className: "text-sm font-roboto text-dark-500 dark:text-light-500", children: "Registros por p\u00E1gina:" }), jsx(RowsPerPageDropdown, { value: options.value, options: rowsPerPageOptions, onChange: (e) => {
4484
+ options.onChange(e);
4485
+ const customEvent = e;
4486
+ if (onRowsPerPageChange && customEvent.rows !== options.value) {
4487
+ onRowsPerPageChange(customEvent.rows);
4488
+ }
4489
+ } })] }));
4485
4490
  },
4486
4491
  };
4487
4492
  return (jsx(Paginator$1, { ...props, template: template, className: "bg-light-500 dark:bg-dark-100" }));