@pismo/marola 1.0.0-beta.23 → 1.0.0-beta.25

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.
@@ -1,6 +1,6 @@
1
1
  import '../../assets/Pagination.css';
2
2
  import { jsxs as s, Fragment as p, jsx as t } from "react/jsx-runtime";
3
- import { c as o } from "../../clsx-DB4S2d7J.js";
3
+ import { c as _ } from "../../clsx-DB4S2d7J.js";
4
4
  import { Select as d } from "../Select/Select.js";
5
5
  import I from "./usePagination.js";
6
6
  const C = "_pagination_2n0nk_43", a = {
@@ -44,7 +44,7 @@ const C = "_pagination_2n0nk_43", a = {
44
44
  next: "Next",
45
45
  perPage: "Items per page"
46
46
  }
47
- }, j = ({ perPageOptions: g = [5, 10, 25, 50, 100], language: y = "en", ...e }) => {
47
+ }, j = ({ perPageOptions: o = [5, 10, 25, 50, 100], language: y = "en", ...e }) => {
48
48
  const l = Math.ceil(e.totalItems / e.perPage), b = e.currentPage <= 1, m = e.currentPage >= l, k = { ...w[y], ...e.t || {} }, i = (n) => k[n], { items: v } = I({
49
49
  count: l,
50
50
  hideNextButton: !0,
@@ -53,14 +53,14 @@ const C = "_pagination_2n0nk_43", a = {
53
53
  siblingCount: 1,
54
54
  boundaryCount: 2
55
55
  }), c = e.perPage * (e.currentPage - 1) + 1, u = c + e.perPage - 1, x = u > e.totalItems ? u - e.totalItems : 0, P = u - x;
56
- return /* @__PURE__ */ s("div", { className: o(a.pagination, e.className), "data-testid": e["data-testid"], children: [
56
+ return /* @__PURE__ */ s("div", { className: _(a.pagination, e.className), "data-testid": e["data-testid"], children: [
57
57
  /* @__PURE__ */ s(
58
58
  "div",
59
59
  {
60
- className: o(a["per-page-container"], e.classNamePerPage),
60
+ className: _(a["per-page-container"], e.classNamePerPage),
61
61
  "data-testid": e["data-testid-per-page"],
62
62
  children: [
63
- g && /* @__PURE__ */ s(p, { children: [
63
+ o && /* @__PURE__ */ s(p, { children: [
64
64
  /* @__PURE__ */ t("span", { children: i`perPage` }),
65
65
  /* @__PURE__ */ t(
66
66
  d,
@@ -68,7 +68,7 @@ const C = "_pagination_2n0nk_43", a = {
68
68
  className: a["per-page-container__select"],
69
69
  value: String(e.perPage),
70
70
  onChange: (n) => e.onRowsPerPageChange(Number(n)),
71
- children: g == null ? void 0 : g.map((n) => {
71
+ children: o == null ? void 0 : o.map((n) => {
72
72
  const r = typeof n == "number";
73
73
  return /* @__PURE__ */ t(
74
74
  d.Option,
@@ -82,35 +82,28 @@ const C = "_pagination_2n0nk_43", a = {
82
82
  }
83
83
  )
84
84
  ] }),
85
- /* @__PURE__ */ s(
86
- "div",
87
- {
88
- className: o(a["page-infos"], e.classNamePagesInfo),
89
- "data-testid": e["data-testid-pages-info"],
90
- children: [
91
- /* @__PURE__ */ s("span", { children: [
92
- c,
93
- " - ",
94
- P
95
- ] }),
96
- " ",
97
- /* @__PURE__ */ s("span", { children: [
98
- i`of`,
99
- " ",
100
- /* @__PURE__ */ t("strong", { children: e.totalItems }),
101
- " ",
102
- i`results`
103
- ] })
104
- ]
105
- }
106
- )
85
+ /* @__PURE__ */ s("div", { className: e.classNamePagesInfo, "data-testid": e["data-testid-pages-info"], children: [
86
+ /* @__PURE__ */ s("span", { children: [
87
+ c,
88
+ " - ",
89
+ P
90
+ ] }),
91
+ " ",
92
+ /* @__PURE__ */ s("span", { children: [
93
+ i`of`,
94
+ " ",
95
+ /* @__PURE__ */ t("strong", { children: e.totalItems }),
96
+ " ",
97
+ i`results`
98
+ ] })
99
+ ] })
107
100
  ]
108
101
  }
109
102
  ),
110
103
  /* @__PURE__ */ s(
111
104
  "div",
112
105
  {
113
- className: o(a["pages-navigator-container"], e.classNamePagesNav),
106
+ className: _(a["pages-navigator-container"], e.classNamePagesNav),
114
107
  "data-testid": e["data-testid-pages-nav"],
115
108
  children: [
116
109
  /* @__PURE__ */ t(
@@ -125,17 +118,17 @@ const C = "_pagination_2n0nk_43", a = {
125
118
  "page__previous"
126
119
  ),
127
120
  /* @__PURE__ */ t("ul", { children: v.map(({ page: n, type: r, selected: N, ...f }, h) => {
128
- let _ = /* @__PURE__ */ t(p, {});
129
- return r === "start-ellipsis" || r === "end-ellipsis" ? _ = /* @__PURE__ */ t("span", { className: a["page-item"], children: "..." }) : r === "page" ? _ = /* @__PURE__ */ t(
121
+ let g = /* @__PURE__ */ t(p, {});
122
+ return r === "start-ellipsis" || r === "end-ellipsis" ? g = /* @__PURE__ */ t("span", { className: a["page-item"], children: "..." }) : r === "page" ? g = /* @__PURE__ */ t(
130
123
  "button",
131
124
  {
132
- className: o(a["page-number__btn"], N && a["page-number__btn--selected"]),
125
+ className: _(a["page-number__btn"], N && a["page-number__btn--selected"]),
133
126
  onClick: () => e.onPageChange(n || 0),
134
127
  type: "button",
135
128
  children: n
136
129
  },
137
130
  `page__${h}`
138
- ) : _ = /* @__PURE__ */ t("button", { type: "button", ...f, children: r }), /* @__PURE__ */ t("li", { children: _ }, h);
131
+ ) : g = /* @__PURE__ */ t("button", { type: "button", ...f, children: r }), /* @__PURE__ */ t("li", { children: g }, h);
139
132
  }) }),
140
133
  /* @__PURE__ */ t(
141
134
  "button",
@@ -24,6 +24,7 @@ export type SelectProps = {
24
24
  testIdWrapper?: string;
25
25
  'data-testid'?: string;
26
26
  onChange?: (value: string | null, event?: React.SyntheticEvent<Element, Event> | null) => void;
27
+ fullWidth?: boolean;
27
28
  };
28
29
  declare const Select: {
29
30
  (props: SelectProps): import("react/jsx-runtime").JSX.Element;