@ambuj.bhaskar/react-component-library 0.18.10-alpha → 0.18.12-alpha

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.ts CHANGED
@@ -538,7 +538,7 @@ declare type ToastProps = {
538
538
 
539
539
  declare type ToastType = "success" | "error" | "info" | "warning";
540
540
 
541
- export declare function usePagination(initialPage?: number): {
541
+ export declare function usePagination(initialPage?: number, initialTotalPages?: number): {
542
542
  currentPage: number;
543
543
  setPage: (newPage: number) => void;
544
544
  nextPage: () => void;
package/dist/index.js CHANGED
@@ -54226,7 +54226,7 @@ const xle = ({
54226
54226
  c ? /* @__PURE__ */ pe.jsxs(
54227
54227
  "span",
54228
54228
  {
54229
- className: "paginator_current_page " + (c && !u) ? "full_pagination" : "",
54229
+ className: "paginator_current_page " + (c && !u ? "full_pagination" : ""),
54230
54230
  children: [
54231
54231
  /* @__PURE__ */ pe.jsx(
54232
54232
  Y4,
@@ -54255,7 +54255,7 @@ const xle = ({
54255
54255
  u ? /* @__PURE__ */ pe.jsxs(
54256
54256
  "span",
54257
54257
  {
54258
- className: "paginator_arrows " + (!c && u) ? "full_pagination" : "",
54258
+ className: "paginator_arrows " + (!c && u ? "full_pagination" : ""),
54259
54259
  children: [
54260
54260
  /* @__PURE__ */ pe.jsx(
54261
54261
  or,
@@ -54743,24 +54743,24 @@ const Rle = "_backdrop_iv22p_1", Ile = "_backdrop__transparent_iv22p_10", Lle =
54743
54743
  ] }),
54744
54744
  /* @__PURE__ */ pe.jsx("div", { className: o1.modal__row__option, children: t })
54745
54745
  ] });
54746
- function F6e(e = 1) {
54747
- const [t, n] = Kn(e), [r, o] = Kn(1), i = T1(
54748
- (c) => {
54749
- c >= 1 && c < r ? n(c) : console.error(`Invalid page number: ${c}`);
54750
- },
54751
- [r]
54752
- ), a = T1(() => {
54753
- i(t + 1);
54754
- }, [t, i]), l = T1(() => {
54755
- i(t - 1);
54756
- }, [t, i]);
54746
+ function F6e(e = 1, t = 1) {
54747
+ const [n, r] = Kn(e), [o, i] = Kn(t), a = T1(
54748
+ (u) => {
54749
+ u >= 1 && u <= o ? r(u) : console.error(`Invalid page number: ${u}`);
54750
+ },
54751
+ [o]
54752
+ ), l = T1(() => {
54753
+ a(n + 1);
54754
+ }, [n, a]), c = T1(() => {
54755
+ a(n - 1);
54756
+ }, [n, a]);
54757
54757
  return {
54758
- currentPage: t,
54759
- setPage: i,
54760
- nextPage: a,
54761
- prevPage: l,
54762
- totalPages: r,
54763
- setTotalPages: o
54758
+ currentPage: n,
54759
+ setPage: a,
54760
+ nextPage: l,
54761
+ prevPage: c,
54762
+ totalPages: o,
54763
+ setTotalPages: i
54764
54764
  };
54765
54765
  }
54766
54766
  const Vw = (e, t = "", n) => {