@wmoney/ui-kit 1.0.29 → 1.0.30

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
@@ -13002,12 +13002,19 @@ function Ix(e, t) {
13002
13002
  } else n.push(1), n.push("ellipsis"), n.push(e - 1), n.push(e), n.push(e + 1), n.push("ellipsis"), n.push(t);
13003
13003
  return n;
13004
13004
  }
13005
- function Lx({ currentPage: e, totalPages: t, pageSize: n, totalItems: r, onPageChange: i, onPageSizeChange: a }) {
13006
- let o = r === 0 ? 0 : (e - 1) * n + 1, s = Math.min(e * n, r), c = d(() => Ix(e, t), [e, t]), l = (n, r) => {
13005
+ function Lx({ currentPage: e, totalPages: t, pageSize: n, totalItems: r, onPageChange: i, onPageSizeChange: a, className: o, ...s }) {
13006
+ let c = r === 0 ? 0 : (e - 1) * n + 1, l = Math.min(e * n, r), u = d(() => Ix(e, t), [e, t]), f = (n, r) => {
13007
13007
  r.preventDefault(), n >= 1 && n <= t && n !== e && i(n);
13008
+ }, p = (t) => {
13009
+ t.preventDefault(), e > 1 && i(e - 1);
13010
+ }, m = (n) => {
13011
+ n.preventDefault(), e < t && i(e + 1);
13012
+ }, _ = (e) => {
13013
+ a(parseInt(e, 10));
13008
13014
  };
13009
13015
  return t === 0 ? null : /* @__PURE__ */ g("div", {
13010
- className: "w-full flex flex-col md:flex-row items-center justify-between gap-4 px-2 py-4 bg-background",
13016
+ className: (q("w-full flex flex-col md:flex-row items-center justify-between gap-4 px-2 py-4 bg-background"), o),
13017
+ ...s,
13011
13018
  children: [
13012
13019
  /* @__PURE__ */ g("div", {
13013
13020
  className: "w-fit flex flex-row items-center gap-2",
@@ -13016,9 +13023,7 @@ function Lx({ currentPage: e, totalPages: t, pageSize: n, totalItems: r, onPageC
13016
13023
  children: "Itens por página"
13017
13024
  }), /* @__PURE__ */ g(Ex, {
13018
13025
  value: n.toString(),
13019
- onValueChange: (e) => {
13020
- a(parseInt(e, 10));
13021
- },
13026
+ onValueChange: _,
13022
13027
  children: [/* @__PURE__ */ h(kx, {
13023
13028
  className: "w-20",
13024
13029
  id: "select-rows-per-page",
@@ -13049,9 +13054,9 @@ function Lx({ currentPage: e, totalPages: t, pageSize: n, totalItems: r, onPageC
13049
13054
  /* @__PURE__ */ g("span", {
13050
13055
  className: "text-nowrap text-neutrals-800 text-sm font-medium",
13051
13056
  children: [
13052
- o,
13057
+ c,
13053
13058
  " - ",
13054
- s,
13059
+ l,
13055
13060
  " de ",
13056
13061
  r
13057
13062
  ]
@@ -13060,21 +13065,17 @@ function Lx({ currentPage: e, totalPages: t, pageSize: n, totalItems: r, onPageC
13060
13065
  className: "mx-0 w-auto",
13061
13066
  children: /* @__PURE__ */ g(Fy, { children: [
13062
13067
  /* @__PURE__ */ h(Iy, { children: /* @__PURE__ */ h(Ry, {
13063
- onClick: (t) => {
13064
- t.preventDefault(), e > 1 && i(e - 1);
13065
- },
13068
+ onClick: p,
13066
13069
  className: e === 1 ? "pointer-events-none opacity-50" : "cursor-pointer"
13067
13070
  }) }),
13068
- c.map((t, n) => t === "ellipsis" ? /* @__PURE__ */ h(Iy, { children: /* @__PURE__ */ h(By, {}) }, `ellipsis-${n}`) : /* @__PURE__ */ h(Iy, { children: /* @__PURE__ */ h(Ly, {
13071
+ u.map((t, n) => t === "ellipsis" ? /* @__PURE__ */ h(Iy, { children: /* @__PURE__ */ h(By, {}) }, `ellipsis-${n}`) : /* @__PURE__ */ h(Iy, { children: /* @__PURE__ */ h(Ly, {
13069
13072
  isActive: t === e,
13070
- onClick: (e) => l(t, e),
13073
+ onClick: (e) => f(t, e),
13071
13074
  className: "cursor-pointer",
13072
13075
  children: t
13073
13076
  }) }, t)),
13074
13077
  /* @__PURE__ */ h(Iy, { children: /* @__PURE__ */ h(zy, {
13075
- onClick: (n) => {
13076
- n.preventDefault(), e < t && i(e + 1);
13077
- },
13078
+ onClick: m,
13078
13079
  className: e === t ? "pointer-events-none opacity-50" : "cursor-pointer"
13079
13080
  }) })
13080
13081
  ] })