@amateescu/portal-ui-components 0.0.30-beta10 → 0.0.30-beta11
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,3 +1,3 @@
|
|
|
1
|
-
import { ExtendedPaginationProps
|
|
1
|
+
import { ExtendedPaginationProps } from './CustomPagination.types';
|
|
2
2
|
export declare function Pagination({ isRtl, pageCount, page, onPageChange, className, }: ExtendedPaginationProps): import("react/jsx-runtime").JSX.Element;
|
|
3
|
-
export declare function CustomPagination({ isRtl,
|
|
3
|
+
export declare function CustomPagination({ isRtl, className }: any): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import * as
|
|
1
|
+
import { jsx as p, jsxs as nt } from "react/jsx-runtime";
|
|
2
|
+
import * as u from "react";
|
|
3
3
|
import '../../assets/theme.css';/* empty css */
|
|
4
|
-
import {
|
|
5
|
-
import { g as
|
|
6
|
-
import { u as
|
|
4
|
+
import { useGridApiContext as st, useGridSelector as _, gridPaginationModelSelector as rt, gridPageCountSelector as it } from "@mui/x-data-grid";
|
|
5
|
+
import { g as X, a as Y, u as Z, s as R, c as A, b as T, d as tt, m as F, i as k, e as H, P as e } from "../../createSimplePaletteValueFilter-evt-Xthj.js";
|
|
6
|
+
import { u as lt, a as pt, b as j, i as B } from "../../useSlot-Baxtq84W.js";
|
|
7
7
|
import { c as E } from "../../createSvgIcon-CgFXfzFk.js";
|
|
8
|
-
import { B as
|
|
9
|
-
const
|
|
10
|
-
function
|
|
11
|
-
return
|
|
8
|
+
import { B as ct } from "../../ButtonBase-DUKuDCWw.js";
|
|
9
|
+
const q = (t) => /* @__PURE__ */ u.createElement("svg", { width: 25, height: 24, viewBox: "0 0 25 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ u.createElement("g", { id: "arrow/chevron/</default-first" }, /* @__PURE__ */ u.createElement("path", { id: "vector", d: "M17.5 5L10.5 12L17.5 19M7.5 5L7.5 19", stroke: "#045529", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" }))), J = (t) => /* @__PURE__ */ u.createElement("svg", { width: 25, height: 24, viewBox: "0 0 25 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ u.createElement("g", { id: "arrow/chevron/>/end" }, /* @__PURE__ */ u.createElement("path", { id: "vector", d: "M7.5 4.99998L14.5 12L7.5 19M17.5 4.99998L17.5 19", stroke: "#045529", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" }))), K = (t) => /* @__PURE__ */ u.createElement("svg", { width: 10, height: 16, viewBox: "0 0 10 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ u.createElement("path", { d: "M1.5 1L8.5 8L1.5 15", stroke: "#045529", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" })), Q = (t) => /* @__PURE__ */ u.createElement("svg", { width: 10, height: 16, viewBox: "0 0 10 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ u.createElement("path", { d: "M8.5 15L1.5 8L8.5 1", stroke: "#045529", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" }));
|
|
10
|
+
function dt(t) {
|
|
11
|
+
return X("MuiPagination", t);
|
|
12
12
|
}
|
|
13
|
-
|
|
14
|
-
function
|
|
13
|
+
Y("MuiPagination", ["root", "ul", "outlined", "text"]);
|
|
14
|
+
function ut(t = {}) {
|
|
15
15
|
const {
|
|
16
16
|
boundaryCount: a = 1,
|
|
17
17
|
componentName: o = "usePagination",
|
|
18
18
|
count: n = 1,
|
|
19
|
-
defaultPage:
|
|
20
|
-
disabled:
|
|
21
|
-
hideNextButton:
|
|
19
|
+
defaultPage: c = 1,
|
|
20
|
+
disabled: l = !1,
|
|
21
|
+
hideNextButton: d = !1,
|
|
22
22
|
hidePrevButton: b = !1,
|
|
23
23
|
onChange: y,
|
|
24
|
-
page:
|
|
25
|
-
showFirstButton:
|
|
24
|
+
page: m,
|
|
25
|
+
showFirstButton: S = !1,
|
|
26
26
|
showLastButton: z = !1,
|
|
27
27
|
siblingCount: C = 1,
|
|
28
28
|
...w
|
|
29
|
-
} = t, [
|
|
30
|
-
controlled:
|
|
31
|
-
default:
|
|
29
|
+
} = t, [g, v] = lt({
|
|
30
|
+
controlled: m,
|
|
31
|
+
default: c,
|
|
32
32
|
name: o,
|
|
33
33
|
state: "page"
|
|
34
|
-
}), O = (s,
|
|
35
|
-
|
|
36
|
-
}, $ = (s,
|
|
37
|
-
const I =
|
|
34
|
+
}), O = (s, r) => {
|
|
35
|
+
m || v(r), y && y(s, r);
|
|
36
|
+
}, $ = (s, r) => {
|
|
37
|
+
const I = r - s + 1;
|
|
38
38
|
return Array.from({
|
|
39
39
|
length: I
|
|
40
40
|
}, (V, W) => s + W);
|
|
41
|
-
},
|
|
41
|
+
}, f = $(1, Math.min(a, n)), M = $(Math.max(n - a + 1, a + 1), n), P = Math.max(
|
|
42
42
|
Math.min(
|
|
43
43
|
// Natural start
|
|
44
|
-
|
|
44
|
+
g - C,
|
|
45
45
|
// Lower boundary when page is high
|
|
46
46
|
n - a - C * 2 - 1
|
|
47
47
|
),
|
|
@@ -50,35 +50,35 @@ function pt(t = {}) {
|
|
|
50
50
|
), x = Math.min(
|
|
51
51
|
Math.max(
|
|
52
52
|
// Natural end
|
|
53
|
-
|
|
53
|
+
g + C,
|
|
54
54
|
// Upper boundary when page is low
|
|
55
55
|
a + C * 2 + 2
|
|
56
56
|
),
|
|
57
57
|
// Less than endPages
|
|
58
58
|
n - a - 1
|
|
59
59
|
), N = [
|
|
60
|
-
...
|
|
60
|
+
...S ? ["first"] : [],
|
|
61
61
|
...b ? [] : ["previous"],
|
|
62
|
-
...
|
|
62
|
+
...f,
|
|
63
63
|
// Start ellipsis
|
|
64
64
|
// eslint-disable-next-line no-nested-ternary
|
|
65
|
-
...
|
|
65
|
+
...P > a + 2 ? ["start-ellipsis"] : a + 1 < n - a ? [a + 1] : [],
|
|
66
66
|
// Sibling pages
|
|
67
|
-
...$(
|
|
67
|
+
...$(P, x),
|
|
68
68
|
// End ellipsis
|
|
69
69
|
// eslint-disable-next-line no-nested-ternary
|
|
70
70
|
...x < n - a - 1 ? ["end-ellipsis"] : n - a > a ? [n - a] : [],
|
|
71
71
|
...M,
|
|
72
|
-
...
|
|
72
|
+
...d ? [] : ["next"],
|
|
73
73
|
...z ? ["last"] : []
|
|
74
74
|
], h = (s) => {
|
|
75
75
|
switch (s) {
|
|
76
76
|
case "first":
|
|
77
77
|
return 1;
|
|
78
78
|
case "previous":
|
|
79
|
-
return
|
|
79
|
+
return g - 1;
|
|
80
80
|
case "next":
|
|
81
|
-
return
|
|
81
|
+
return g + 1;
|
|
82
82
|
case "last":
|
|
83
83
|
return n;
|
|
84
84
|
default:
|
|
@@ -87,54 +87,54 @@ function pt(t = {}) {
|
|
|
87
87
|
};
|
|
88
88
|
return {
|
|
89
89
|
items: N.map((s) => typeof s == "number" ? {
|
|
90
|
-
onClick: (
|
|
91
|
-
O(
|
|
90
|
+
onClick: (r) => {
|
|
91
|
+
O(r, s);
|
|
92
92
|
},
|
|
93
93
|
type: "page",
|
|
94
94
|
page: s,
|
|
95
|
-
selected: s ===
|
|
96
|
-
disabled:
|
|
97
|
-
"aria-current": s ===
|
|
95
|
+
selected: s === g,
|
|
96
|
+
disabled: l,
|
|
97
|
+
"aria-current": s === g ? "page" : void 0
|
|
98
98
|
} : {
|
|
99
|
-
onClick: (
|
|
100
|
-
O(
|
|
99
|
+
onClick: (r) => {
|
|
100
|
+
O(r, h(s));
|
|
101
101
|
},
|
|
102
102
|
type: s,
|
|
103
103
|
page: h(s),
|
|
104
104
|
selected: !1,
|
|
105
|
-
disabled:
|
|
105
|
+
disabled: l || !s.includes("ellipsis") && (s === "next" || s === "last" ? g >= n : g <= 1)
|
|
106
106
|
}),
|
|
107
107
|
...w
|
|
108
108
|
};
|
|
109
109
|
}
|
|
110
|
-
function
|
|
111
|
-
return
|
|
110
|
+
function gt(t) {
|
|
111
|
+
return X("MuiPaginationItem", t);
|
|
112
112
|
}
|
|
113
|
-
const
|
|
113
|
+
const i = Y("MuiPaginationItem", ["root", "page", "sizeSmall", "sizeLarge", "text", "textPrimary", "textSecondary", "outlined", "outlinedPrimary", "outlinedSecondary", "rounded", "ellipsis", "firstLast", "previousNext", "focusVisible", "disabled", "selected", "icon", "colorPrimary", "colorSecondary"]), vt = E(/* @__PURE__ */ p("path", {
|
|
114
114
|
d: "M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"
|
|
115
|
-
}), "FirstPage"),
|
|
115
|
+
}), "FirstPage"), ft = E(/* @__PURE__ */ p("path", {
|
|
116
116
|
d: "M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"
|
|
117
|
-
}), "LastPage"),
|
|
117
|
+
}), "LastPage"), bt = E(/* @__PURE__ */ p("path", {
|
|
118
118
|
d: "M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"
|
|
119
|
-
}), "NavigateBefore"),
|
|
119
|
+
}), "NavigateBefore"), yt = E(/* @__PURE__ */ p("path", {
|
|
120
120
|
d: "M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"
|
|
121
|
-
}), "NavigateNext"),
|
|
121
|
+
}), "NavigateNext"), et = (t, a) => {
|
|
122
122
|
const {
|
|
123
123
|
ownerState: o
|
|
124
124
|
} = t;
|
|
125
125
|
return [a.root, a[o.variant], a[`size${T(o.size)}`], o.variant === "text" && a[`text${T(o.color)}`], o.variant === "outlined" && a[`outlined${T(o.color)}`], o.shape === "rounded" && a.rounded, o.type === "page" && a.page, (o.type === "start-ellipsis" || o.type === "end-ellipsis") && a.ellipsis, (o.type === "previous" || o.type === "next") && a.previousNext, (o.type === "first" || o.type === "last") && a.firstLast];
|
|
126
|
-
},
|
|
126
|
+
}, xt = (t) => {
|
|
127
127
|
const {
|
|
128
128
|
classes: a,
|
|
129
129
|
color: o,
|
|
130
130
|
disabled: n,
|
|
131
|
-
selected:
|
|
132
|
-
size:
|
|
133
|
-
shape:
|
|
131
|
+
selected: c,
|
|
132
|
+
size: l,
|
|
133
|
+
shape: d,
|
|
134
134
|
type: b,
|
|
135
135
|
variant: y
|
|
136
|
-
} = t,
|
|
137
|
-
root: ["root", `size${T(
|
|
136
|
+
} = t, m = {
|
|
137
|
+
root: ["root", `size${T(l)}`, y, d, o !== "standard" && `color${T(o)}`, o !== "standard" && `${y}${T(o)}`, n && "disabled", c && "selected", {
|
|
138
138
|
page: "page",
|
|
139
139
|
first: "firstLast",
|
|
140
140
|
last: "firstLast",
|
|
@@ -145,11 +145,11 @@ const r = X("MuiPaginationItem", ["root", "page", "sizeSmall", "sizeLarge", "tex
|
|
|
145
145
|
}[b]],
|
|
146
146
|
icon: ["icon"]
|
|
147
147
|
};
|
|
148
|
-
return
|
|
149
|
-
},
|
|
148
|
+
return tt(m, gt, a);
|
|
149
|
+
}, Pt = R("div", {
|
|
150
150
|
name: "MuiPaginationItem",
|
|
151
151
|
slot: "Root",
|
|
152
|
-
overridesResolver:
|
|
152
|
+
overridesResolver: et
|
|
153
153
|
})(F(({
|
|
154
154
|
theme: t
|
|
155
155
|
}) => ({
|
|
@@ -162,7 +162,7 @@ const r = X("MuiPaginationItem", ["root", "page", "sizeSmall", "sizeLarge", "tex
|
|
|
162
162
|
margin: "0 3px",
|
|
163
163
|
color: (t.vars || t).palette.text.primary,
|
|
164
164
|
height: "auto",
|
|
165
|
-
[`&.${
|
|
165
|
+
[`&.${i.disabled}`]: {
|
|
166
166
|
opacity: (t.vars || t).palette.action.disabledOpacity
|
|
167
167
|
},
|
|
168
168
|
variants: [{
|
|
@@ -186,10 +186,10 @@ const r = X("MuiPaginationItem", ["root", "page", "sizeSmall", "sizeLarge", "tex
|
|
|
186
186
|
fontSize: t.typography.pxToRem(15)
|
|
187
187
|
}
|
|
188
188
|
}]
|
|
189
|
-
}))),
|
|
189
|
+
}))), mt = R(ct, {
|
|
190
190
|
name: "MuiPaginationItem",
|
|
191
191
|
slot: "Root",
|
|
192
|
-
overridesResolver:
|
|
192
|
+
overridesResolver: et
|
|
193
193
|
})(F(({
|
|
194
194
|
theme: t
|
|
195
195
|
}) => ({
|
|
@@ -202,10 +202,10 @@ const r = X("MuiPaginationItem", ["root", "page", "sizeSmall", "sizeLarge", "tex
|
|
|
202
202
|
padding: "0 6px",
|
|
203
203
|
margin: "0 3px",
|
|
204
204
|
color: (t.vars || t).palette.text.primary,
|
|
205
|
-
[`&.${
|
|
205
|
+
[`&.${i.focusVisible}`]: {
|
|
206
206
|
backgroundColor: (t.vars || t).palette.action.focus
|
|
207
207
|
},
|
|
208
|
-
[`&.${
|
|
208
|
+
[`&.${i.disabled}`]: {
|
|
209
209
|
opacity: (t.vars || t).palette.action.disabledOpacity
|
|
210
210
|
},
|
|
211
211
|
transition: t.transitions.create(["color", "background-color"], {
|
|
@@ -218,19 +218,19 @@ const r = X("MuiPaginationItem", ["root", "page", "sizeSmall", "sizeLarge", "tex
|
|
|
218
218
|
backgroundColor: "transparent"
|
|
219
219
|
}
|
|
220
220
|
},
|
|
221
|
-
[`&.${
|
|
221
|
+
[`&.${i.selected}`]: {
|
|
222
222
|
backgroundColor: (t.vars || t).palette.action.selected,
|
|
223
223
|
"&:hover": {
|
|
224
|
-
backgroundColor: t.vars ? `rgba(${t.vars.palette.action.selectedChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))` :
|
|
224
|
+
backgroundColor: t.vars ? `rgba(${t.vars.palette.action.selectedChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))` : k(t.palette.action.selected, t.palette.action.selectedOpacity + t.palette.action.hoverOpacity),
|
|
225
225
|
// Reset on touch devices, it doesn't add specificity
|
|
226
226
|
"@media (hover: none)": {
|
|
227
227
|
backgroundColor: (t.vars || t).palette.action.selected
|
|
228
228
|
}
|
|
229
229
|
},
|
|
230
|
-
[`&.${
|
|
231
|
-
backgroundColor: t.vars ? `rgba(${t.vars.palette.action.selectedChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))` :
|
|
230
|
+
[`&.${i.focusVisible}`]: {
|
|
231
|
+
backgroundColor: t.vars ? `rgba(${t.vars.palette.action.selectedChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))` : k(t.palette.action.selected, t.palette.action.selectedOpacity + t.palette.action.focusOpacity)
|
|
232
232
|
},
|
|
233
|
-
[`&.${
|
|
233
|
+
[`&.${i.disabled}`]: {
|
|
234
234
|
opacity: 1,
|
|
235
235
|
color: (t.vars || t).palette.action.disabled,
|
|
236
236
|
backgroundColor: (t.vars || t).palette.action.selected
|
|
@@ -271,8 +271,8 @@ const r = X("MuiPaginationItem", ["root", "page", "sizeSmall", "sizeLarge", "tex
|
|
|
271
271
|
},
|
|
272
272
|
style: {
|
|
273
273
|
border: t.vars ? `1px solid rgba(${t.vars.palette.common.onBackgroundChannel} / 0.23)` : `1px solid ${t.palette.mode === "light" ? "rgba(0, 0, 0, 0.23)" : "rgba(255, 255, 255, 0.23)"}`,
|
|
274
|
-
[`&.${
|
|
275
|
-
[`&.${
|
|
274
|
+
[`&.${i.selected}`]: {
|
|
275
|
+
[`&.${i.disabled}`]: {
|
|
276
276
|
borderColor: (t.vars || t).palette.action.disabledBackground,
|
|
277
277
|
color: (t.vars || t).palette.action.disabled
|
|
278
278
|
}
|
|
@@ -283,19 +283,19 @@ const r = X("MuiPaginationItem", ["root", "page", "sizeSmall", "sizeLarge", "tex
|
|
|
283
283
|
variant: "text"
|
|
284
284
|
},
|
|
285
285
|
style: {
|
|
286
|
-
[`&.${
|
|
287
|
-
[`&.${
|
|
286
|
+
[`&.${i.selected}`]: {
|
|
287
|
+
[`&.${i.disabled}`]: {
|
|
288
288
|
color: (t.vars || t).palette.action.disabled
|
|
289
289
|
}
|
|
290
290
|
}
|
|
291
291
|
}
|
|
292
|
-
}, ...Object.entries(t.palette).filter(
|
|
292
|
+
}, ...Object.entries(t.palette).filter(H(["dark", "contrastText"])).map(([a]) => ({
|
|
293
293
|
props: {
|
|
294
294
|
variant: "text",
|
|
295
295
|
color: a
|
|
296
296
|
},
|
|
297
297
|
style: {
|
|
298
|
-
[`&.${
|
|
298
|
+
[`&.${i.selected}`]: {
|
|
299
299
|
color: (t.vars || t).palette[a].contrastText,
|
|
300
300
|
backgroundColor: (t.vars || t).palette[a].main,
|
|
301
301
|
"&:hover": {
|
|
@@ -305,38 +305,38 @@ const r = X("MuiPaginationItem", ["root", "page", "sizeSmall", "sizeLarge", "tex
|
|
|
305
305
|
backgroundColor: (t.vars || t).palette[a].main
|
|
306
306
|
}
|
|
307
307
|
},
|
|
308
|
-
[`&.${
|
|
308
|
+
[`&.${i.focusVisible}`]: {
|
|
309
309
|
backgroundColor: (t.vars || t).palette[a].dark
|
|
310
310
|
},
|
|
311
|
-
[`&.${
|
|
311
|
+
[`&.${i.disabled}`]: {
|
|
312
312
|
color: (t.vars || t).palette.action.disabled
|
|
313
313
|
}
|
|
314
314
|
}
|
|
315
315
|
}
|
|
316
|
-
})), ...Object.entries(t.palette).filter(
|
|
316
|
+
})), ...Object.entries(t.palette).filter(H(["light"])).map(([a]) => ({
|
|
317
317
|
props: {
|
|
318
318
|
variant: "outlined",
|
|
319
319
|
color: a
|
|
320
320
|
},
|
|
321
321
|
style: {
|
|
322
|
-
[`&.${
|
|
322
|
+
[`&.${i.selected}`]: {
|
|
323
323
|
color: (t.vars || t).palette[a].main,
|
|
324
|
-
border: `1px solid ${t.vars ? `rgba(${t.vars.palette[a].mainChannel} / 0.5)` :
|
|
325
|
-
backgroundColor: t.vars ? `rgba(${t.vars.palette[a].mainChannel} / ${t.vars.palette.action.activatedOpacity})` :
|
|
324
|
+
border: `1px solid ${t.vars ? `rgba(${t.vars.palette[a].mainChannel} / 0.5)` : k(t.palette[a].main, 0.5)}`,
|
|
325
|
+
backgroundColor: t.vars ? `rgba(${t.vars.palette[a].mainChannel} / ${t.vars.palette.action.activatedOpacity})` : k(t.palette[a].main, t.palette.action.activatedOpacity),
|
|
326
326
|
"&:hover": {
|
|
327
|
-
backgroundColor: t.vars ? `rgba(${t.vars.palette[a].mainChannel} / calc(${t.vars.palette.action.activatedOpacity} + ${t.vars.palette.action.focusOpacity}))` :
|
|
327
|
+
backgroundColor: t.vars ? `rgba(${t.vars.palette[a].mainChannel} / calc(${t.vars.palette.action.activatedOpacity} + ${t.vars.palette.action.focusOpacity}))` : k(t.palette[a].main, t.palette.action.activatedOpacity + t.palette.action.focusOpacity),
|
|
328
328
|
// Reset on touch devices, it doesn't add specificity
|
|
329
329
|
"@media (hover: none)": {
|
|
330
330
|
backgroundColor: "transparent"
|
|
331
331
|
}
|
|
332
332
|
},
|
|
333
|
-
[`&.${
|
|
334
|
-
backgroundColor: t.vars ? `rgba(${t.vars.palette[a].mainChannel} / calc(${t.vars.palette.action.activatedOpacity} + ${t.vars.palette.action.focusOpacity}))` :
|
|
333
|
+
[`&.${i.focusVisible}`]: {
|
|
334
|
+
backgroundColor: t.vars ? `rgba(${t.vars.palette[a].mainChannel} / calc(${t.vars.palette.action.activatedOpacity} + ${t.vars.palette.action.focusOpacity}))` : k(t.palette[a].main, t.palette.action.activatedOpacity + t.palette.action.focusOpacity)
|
|
335
335
|
}
|
|
336
336
|
}
|
|
337
337
|
}
|
|
338
338
|
}))]
|
|
339
|
-
}))),
|
|
339
|
+
}))), Ct = R("div", {
|
|
340
340
|
name: "MuiPaginationItem",
|
|
341
341
|
slot: "Icon"
|
|
342
342
|
})(F(({
|
|
@@ -359,89 +359,89 @@ const r = X("MuiPaginationItem", ["root", "page", "sizeSmall", "sizeLarge", "tex
|
|
|
359
359
|
fontSize: t.typography.pxToRem(22)
|
|
360
360
|
}
|
|
361
361
|
}]
|
|
362
|
-
}))), U = /* @__PURE__ */
|
|
363
|
-
const n =
|
|
362
|
+
}))), U = /* @__PURE__ */ u.forwardRef(function(a, o) {
|
|
363
|
+
const n = Z({
|
|
364
364
|
props: a,
|
|
365
365
|
name: "MuiPaginationItem"
|
|
366
366
|
}), {
|
|
367
|
-
className:
|
|
368
|
-
color:
|
|
369
|
-
component:
|
|
367
|
+
className: c,
|
|
368
|
+
color: l = "standard",
|
|
369
|
+
component: d,
|
|
370
370
|
components: b = {},
|
|
371
371
|
disabled: y = !1,
|
|
372
|
-
page:
|
|
373
|
-
selected:
|
|
372
|
+
page: m,
|
|
373
|
+
selected: S = !1,
|
|
374
374
|
shape: z = "circular",
|
|
375
375
|
size: C = "medium",
|
|
376
376
|
slots: w = {},
|
|
377
|
-
slotProps:
|
|
378
|
-
type:
|
|
377
|
+
slotProps: g = {},
|
|
378
|
+
type: v = "page",
|
|
379
379
|
variant: O = "text",
|
|
380
380
|
...$
|
|
381
|
-
} = n,
|
|
381
|
+
} = n, f = {
|
|
382
382
|
...n,
|
|
383
|
-
color:
|
|
383
|
+
color: l,
|
|
384
384
|
disabled: y,
|
|
385
|
-
selected:
|
|
385
|
+
selected: S,
|
|
386
386
|
shape: z,
|
|
387
387
|
size: C,
|
|
388
|
-
type:
|
|
388
|
+
type: v,
|
|
389
389
|
variant: O
|
|
390
|
-
}, M =
|
|
390
|
+
}, M = pt(), P = xt(f), x = {
|
|
391
391
|
slots: {
|
|
392
392
|
previous: w.previous ?? b.previous,
|
|
393
393
|
next: w.next ?? b.next,
|
|
394
394
|
first: w.first ?? b.first,
|
|
395
395
|
last: w.last ?? b.last
|
|
396
396
|
},
|
|
397
|
-
slotProps:
|
|
397
|
+
slotProps: g
|
|
398
398
|
}, [N, h] = j("previous", {
|
|
399
|
-
elementType:
|
|
399
|
+
elementType: bt,
|
|
400
400
|
externalForwardedProps: x,
|
|
401
|
-
ownerState:
|
|
402
|
-
}), [
|
|
403
|
-
elementType:
|
|
401
|
+
ownerState: f
|
|
402
|
+
}), [L, s] = j("next", {
|
|
403
|
+
elementType: yt,
|
|
404
404
|
externalForwardedProps: x,
|
|
405
|
-
ownerState:
|
|
406
|
-
}), [
|
|
407
|
-
elementType:
|
|
405
|
+
ownerState: f
|
|
406
|
+
}), [r, I] = j("first", {
|
|
407
|
+
elementType: vt,
|
|
408
408
|
externalForwardedProps: x,
|
|
409
|
-
ownerState:
|
|
409
|
+
ownerState: f
|
|
410
410
|
}), [V, W] = j("last", {
|
|
411
|
-
elementType:
|
|
411
|
+
elementType: ft,
|
|
412
412
|
externalForwardedProps: x,
|
|
413
|
-
ownerState:
|
|
413
|
+
ownerState: f
|
|
414
414
|
}), D = M ? {
|
|
415
415
|
previous: "next",
|
|
416
416
|
next: "previous",
|
|
417
417
|
first: "last",
|
|
418
418
|
last: "first"
|
|
419
|
-
}[
|
|
419
|
+
}[v] : v, G = {
|
|
420
420
|
previous: N,
|
|
421
|
-
next:
|
|
422
|
-
first:
|
|
421
|
+
next: L,
|
|
422
|
+
first: r,
|
|
423
423
|
last: V
|
|
424
|
-
}[D],
|
|
424
|
+
}[D], ot = {
|
|
425
425
|
previous: h,
|
|
426
426
|
next: s,
|
|
427
427
|
first: I,
|
|
428
428
|
last: W
|
|
429
429
|
}[D];
|
|
430
|
-
return
|
|
430
|
+
return v === "start-ellipsis" || v === "end-ellipsis" ? /* @__PURE__ */ p(Pt, {
|
|
431
431
|
ref: o,
|
|
432
|
-
ownerState:
|
|
433
|
-
className: A(
|
|
432
|
+
ownerState: f,
|
|
433
|
+
className: A(P.root, c),
|
|
434
434
|
children: "…"
|
|
435
|
-
}) : /* @__PURE__ */
|
|
435
|
+
}) : /* @__PURE__ */ nt(mt, {
|
|
436
436
|
ref: o,
|
|
437
|
-
ownerState:
|
|
438
|
-
component:
|
|
437
|
+
ownerState: f,
|
|
438
|
+
component: d,
|
|
439
439
|
disabled: y,
|
|
440
|
-
className: A(
|
|
440
|
+
className: A(P.root, c),
|
|
441
441
|
...$,
|
|
442
|
-
children: [
|
|
443
|
-
...
|
|
444
|
-
className:
|
|
442
|
+
children: [v === "page" && m, G ? /* @__PURE__ */ p(Ct, {
|
|
443
|
+
...ot,
|
|
444
|
+
className: P.icon,
|
|
445
445
|
as: G
|
|
446
446
|
}) : null]
|
|
447
447
|
});
|
|
@@ -549,16 +549,16 @@ process.env.NODE_ENV !== "production" && (U.propTypes = {
|
|
|
549
549
|
*/
|
|
550
550
|
variant: e.oneOfType([e.oneOf(["outlined", "text"]), e.string])
|
|
551
551
|
});
|
|
552
|
-
const
|
|
552
|
+
const wt = (t) => {
|
|
553
553
|
const {
|
|
554
554
|
classes: a,
|
|
555
555
|
variant: o
|
|
556
556
|
} = t;
|
|
557
|
-
return
|
|
557
|
+
return tt({
|
|
558
558
|
root: ["root", o],
|
|
559
559
|
ul: ["ul"]
|
|
560
|
-
},
|
|
561
|
-
},
|
|
560
|
+
}, dt, a);
|
|
561
|
+
}, Ot = R("nav", {
|
|
562
562
|
name: "MuiPagination",
|
|
563
563
|
slot: "Root",
|
|
564
564
|
overridesResolver: (t, a) => {
|
|
@@ -567,7 +567,7 @@ const mt = (t) => {
|
|
|
567
567
|
} = t;
|
|
568
568
|
return [a.root, a[o.variant]];
|
|
569
569
|
}
|
|
570
|
-
})({}),
|
|
570
|
+
})({}), $t = R("ul", {
|
|
571
571
|
name: "MuiPagination",
|
|
572
572
|
slot: "Ul"
|
|
573
573
|
})({
|
|
@@ -578,81 +578,81 @@ const mt = (t) => {
|
|
|
578
578
|
margin: 0,
|
|
579
579
|
listStyle: "none"
|
|
580
580
|
});
|
|
581
|
-
function
|
|
581
|
+
function St(t, a, o) {
|
|
582
582
|
return t === "page" ? `${o ? "" : "Go to "}page ${a}` : `Go to ${t} page`;
|
|
583
583
|
}
|
|
584
|
-
const
|
|
585
|
-
const n =
|
|
584
|
+
const at = /* @__PURE__ */ u.forwardRef(function(a, o) {
|
|
585
|
+
const n = Z({
|
|
586
586
|
props: a,
|
|
587
587
|
name: "MuiPagination"
|
|
588
588
|
}), {
|
|
589
|
-
boundaryCount:
|
|
590
|
-
className:
|
|
591
|
-
color:
|
|
589
|
+
boundaryCount: c = 1,
|
|
590
|
+
className: l,
|
|
591
|
+
color: d = "standard",
|
|
592
592
|
count: b = 1,
|
|
593
593
|
defaultPage: y = 1,
|
|
594
|
-
disabled:
|
|
595
|
-
getItemAriaLabel:
|
|
594
|
+
disabled: m = !1,
|
|
595
|
+
getItemAriaLabel: S = St,
|
|
596
596
|
hideNextButton: z = !1,
|
|
597
597
|
hidePrevButton: C = !1,
|
|
598
598
|
onChange: w,
|
|
599
|
-
page:
|
|
600
|
-
renderItem:
|
|
601
|
-
...
|
|
599
|
+
page: g,
|
|
600
|
+
renderItem: v = (r) => /* @__PURE__ */ p(U, {
|
|
601
|
+
...r
|
|
602
602
|
}),
|
|
603
603
|
shape: O = "circular",
|
|
604
604
|
showFirstButton: $ = !1,
|
|
605
|
-
showLastButton:
|
|
605
|
+
showLastButton: f = !1,
|
|
606
606
|
siblingCount: M = 1,
|
|
607
|
-
size:
|
|
607
|
+
size: P = "medium",
|
|
608
608
|
variant: x = "text",
|
|
609
609
|
...N
|
|
610
610
|
} = n, {
|
|
611
611
|
items: h
|
|
612
|
-
} =
|
|
612
|
+
} = ut({
|
|
613
613
|
...n,
|
|
614
614
|
componentName: "Pagination"
|
|
615
|
-
}),
|
|
615
|
+
}), L = {
|
|
616
616
|
...n,
|
|
617
|
-
boundaryCount:
|
|
618
|
-
color:
|
|
617
|
+
boundaryCount: c,
|
|
618
|
+
color: d,
|
|
619
619
|
count: b,
|
|
620
620
|
defaultPage: y,
|
|
621
|
-
disabled:
|
|
622
|
-
getItemAriaLabel:
|
|
621
|
+
disabled: m,
|
|
622
|
+
getItemAriaLabel: S,
|
|
623
623
|
hideNextButton: z,
|
|
624
624
|
hidePrevButton: C,
|
|
625
|
-
renderItem:
|
|
625
|
+
renderItem: v,
|
|
626
626
|
shape: O,
|
|
627
627
|
showFirstButton: $,
|
|
628
|
-
showLastButton:
|
|
628
|
+
showLastButton: f,
|
|
629
629
|
siblingCount: M,
|
|
630
|
-
size:
|
|
630
|
+
size: P,
|
|
631
631
|
variant: x
|
|
632
|
-
}, s =
|
|
633
|
-
return /* @__PURE__ */
|
|
632
|
+
}, s = wt(L);
|
|
633
|
+
return /* @__PURE__ */ p(Ot, {
|
|
634
634
|
"aria-label": "pagination navigation",
|
|
635
|
-
className: A(s.root,
|
|
636
|
-
ownerState:
|
|
635
|
+
className: A(s.root, l),
|
|
636
|
+
ownerState: L,
|
|
637
637
|
ref: o,
|
|
638
638
|
...N,
|
|
639
|
-
children: /* @__PURE__ */
|
|
639
|
+
children: /* @__PURE__ */ p($t, {
|
|
640
640
|
className: s.ul,
|
|
641
|
-
ownerState:
|
|
642
|
-
children: h.map((
|
|
643
|
-
children:
|
|
644
|
-
...
|
|
645
|
-
color:
|
|
646
|
-
"aria-label":
|
|
641
|
+
ownerState: L,
|
|
642
|
+
children: h.map((r, I) => /* @__PURE__ */ p("li", {
|
|
643
|
+
children: v({
|
|
644
|
+
...r,
|
|
645
|
+
color: d,
|
|
646
|
+
"aria-label": S(r.type, r.page, r.selected),
|
|
647
647
|
shape: O,
|
|
648
|
-
size:
|
|
648
|
+
size: P,
|
|
649
649
|
variant: x
|
|
650
650
|
})
|
|
651
651
|
}, I))
|
|
652
652
|
})
|
|
653
653
|
});
|
|
654
654
|
});
|
|
655
|
-
process.env.NODE_ENV !== "production" && (
|
|
655
|
+
process.env.NODE_ENV !== "production" && (at.propTypes = {
|
|
656
656
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
657
657
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
658
658
|
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
@@ -766,31 +766,31 @@ process.env.NODE_ENV !== "production" && (et.propTypes = {
|
|
|
766
766
|
*/
|
|
767
767
|
variant: e.oneOfType([e.oneOf(["outlined", "text"]), e.string])
|
|
768
768
|
});
|
|
769
|
-
function
|
|
769
|
+
function ht({
|
|
770
770
|
isRtl: t,
|
|
771
771
|
pageCount: a,
|
|
772
772
|
page: o,
|
|
773
773
|
onPageChange: n,
|
|
774
|
-
className:
|
|
774
|
+
className: c
|
|
775
775
|
}) {
|
|
776
|
-
return /* @__PURE__ */
|
|
777
|
-
|
|
776
|
+
return /* @__PURE__ */ p(
|
|
777
|
+
at,
|
|
778
778
|
{
|
|
779
779
|
showFirstButton: !0,
|
|
780
780
|
showLastButton: !0,
|
|
781
|
-
className:
|
|
781
|
+
className: c,
|
|
782
782
|
count: a,
|
|
783
783
|
page: o + 1,
|
|
784
|
-
onChange: (
|
|
785
|
-
n(
|
|
784
|
+
onChange: (l, d) => {
|
|
785
|
+
n(l, d - 1);
|
|
786
786
|
},
|
|
787
787
|
boundaryCount: 0,
|
|
788
788
|
siblingCount: 1,
|
|
789
|
-
renderItem: (
|
|
789
|
+
renderItem: (l) => /* @__PURE__ */ p(
|
|
790
790
|
U,
|
|
791
791
|
{
|
|
792
|
-
slots: { previous: t ?
|
|
793
|
-
...
|
|
792
|
+
slots: { previous: t ? K : Q, next: t ? Q : K, first: t ? J : q, last: t ? q : J },
|
|
793
|
+
...l
|
|
794
794
|
}
|
|
795
795
|
),
|
|
796
796
|
sx: {
|
|
@@ -809,10 +809,11 @@ function Ot({
|
|
|
809
809
|
}
|
|
810
810
|
);
|
|
811
811
|
}
|
|
812
|
-
function
|
|
813
|
-
|
|
812
|
+
function Bt({ isRtl: t, className: a }) {
|
|
813
|
+
const o = st(), n = _(o, rt), c = _(o, it);
|
|
814
|
+
return /* @__PURE__ */ p(ht, { isRtl: t, pageCount: c, page: n.page + 1, onPageChange: (l, d) => o.current.setPage(d - 1), className: a });
|
|
814
815
|
}
|
|
815
816
|
export {
|
|
816
|
-
|
|
817
|
-
|
|
817
|
+
Bt as CustomPagination,
|
|
818
|
+
ht as Pagination
|
|
818
819
|
};
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@amateescu/portal-ui-components",
|
|
3
3
|
"main": "dist/main.js",
|
|
4
4
|
"types": "dist/main.d.ts",
|
|
5
|
-
"version": "0.0.30-
|
|
5
|
+
"version": "0.0.30-beta11",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"files": [
|
|
8
8
|
"dist",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"@eslint/js": "^9.26.0",
|
|
41
41
|
"@mui/icons-material": "^7.1.0",
|
|
42
42
|
"@mui/material": "^7.1.0",
|
|
43
|
-
"@mui/x-data-grid": "^
|
|
43
|
+
"@mui/x-data-grid": "^8.2.0",
|
|
44
44
|
"@storybook/addon-essentials": "^8.6.12",
|
|
45
45
|
"@storybook/addon-interactions": "^8.6.12",
|
|
46
46
|
"@storybook/addon-onboarding": "^8.6.12",
|