@amateescu/portal-ui-components 0.0.29 → 0.0.30-beta
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/Box-ZFRI9JCw.js +102 -0
- package/dist/Button-CNfTnafe.js +676 -0
- package/dist/ButtonBase-DWpUn0eT.js +965 -0
- package/dist/CircularProgress-D6RyizwS.js +247 -0
- package/dist/{EllipsisOutlined-DZsCEqiL.js → EllipsisOutlined-CzFuvGH_.js} +3 -3
- package/dist/{PurePanel-iUNZWTe_.js → PurePanel-CxlAi3G7.js} +3 -3
- package/dist/{Skeleton-CfEiGUkR.js → Skeleton-dypyF9G2.js} +2 -2
- package/dist/{UserInfoDropdown-CoZutJAR.js → UserInfoDropdown-DPyds49a.js} +763 -769
- package/dist/_commonjsHelpers-C6fGbg64.js +6 -0
- package/dist/components/ConfirmationModal/ConfirmationModal.js +1 -1
- package/dist/components/ConfirmationModal/ConfirmationModal.stories.js +1 -1
- package/dist/components/CustomButton/CustomButton.js +1 -1
- package/dist/components/CustomButton/CustomButton.stories.js +14 -28
- package/dist/components/CustomPagination/CustomPagination.js +464 -353
- package/dist/components/ErrorModal/ErrorModal.js +1 -1
- package/dist/components/ErrorModal/ErrorModal.stories.js +1 -1
- package/dist/components/InfoModal/InfoModal.js +1 -1
- package/dist/components/InfoModal/InfoModal.stories.js +1 -1
- package/dist/components/KpiCard/KpiCard.js +355 -351
- package/dist/components/LoadingAnimation/LoadingAnimation.js +6 -215
- package/dist/components/Login/Login.js +4598 -3690
- package/dist/components/Login/Login.stories.js +15693 -14785
- package/dist/components/SideMenu/SideMenu.js +1 -1
- package/dist/components/TotalDataGrid/TotalDataGrid.js +6 -6
- package/dist/components/UserInfoDropdown/UserInfoDropdown.js +1 -1
- package/dist/components/UserInfoDropdown/UserInfoDropdown.stories.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/{context-Crxhk7DD.js → context-Bk4VnwMB.js} +7 -7
- package/dist/createSimplePaletteValueFilter-rq2_biPF.js +3443 -0
- package/dist/createSvgIcon-jB7EUYpq.js +248 -0
- package/dist/{index-BxiDYyNJ.js → index-DLbr86ak.js} +511 -513
- package/dist/{index-DpDv68WZ.js → index-xh_JY2OQ.js} +1 -1
- package/dist/main.js +1 -1
- package/dist/objectWithoutPropertiesLoose-BTau6TOn.js +33 -0
- package/dist/useSlot-CT4096EK.js +188 -0
- package/package.json +31 -31
- package/dist/Box-5HNe2k-0.js +0 -68
- package/dist/Button-BPyfMt4k.js +0 -355
- package/dist/ButtonBase-CJNjsL6d.js +0 -966
- package/dist/assertThisInitialized-BUtkG-md.js +0 -13
- package/dist/createSvgIcon-DAETaHdH.js +0 -131
- package/dist/createSvgIcon-KoZ8TVCY.js +0 -211
- package/dist/generateUtilityClasses-DRfbjUGr.js +0 -3427
- package/dist/index-DrCfXZ3h.js +0 -44
- package/dist/objectWithoutPropertiesLoose-DYizGgyG.js +0 -46
|
@@ -1,140 +1,140 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import * as
|
|
1
|
+
import { jsx as l, jsxs as ot } from "react/jsx-runtime";
|
|
2
|
+
import * as c from "react";
|
|
3
3
|
import '../../assets/theme.css';/* empty css */
|
|
4
|
-
import { GridPagination as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
return J("MuiPagination", t);
|
|
4
|
+
import { GridPagination as nt } from "@mui/x-data-grid";
|
|
5
|
+
import { g as Q, a as X, u as Y, s as R, c as A, b as T, d as Z, m as F, i as S, e as _, P as e } from "../../createSimplePaletteValueFilter-rq2_biPF.js";
|
|
6
|
+
import { u as st, a as rt, b as j, i as B } from "../../useSlot-CT4096EK.js";
|
|
7
|
+
import { c as E } from "../../createSvgIcon-jB7EUYpq.js";
|
|
8
|
+
import { B as it } from "../../ButtonBase-DWpUn0eT.js";
|
|
9
|
+
const H = (t) => /* @__PURE__ */ c.createElement("svg", { width: 25, height: 24, viewBox: "0 0 25 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ c.createElement("g", { id: "arrow/chevron/</default-first" }, /* @__PURE__ */ c.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" }))), q = (t) => /* @__PURE__ */ c.createElement("svg", { width: 25, height: 24, viewBox: "0 0 25 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ c.createElement("g", { id: "arrow/chevron/>/end" }, /* @__PURE__ */ c.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" }))), J = (t) => /* @__PURE__ */ c.createElement("svg", { width: 10, height: 16, viewBox: "0 0 10 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ c.createElement("path", { d: "M1.5 1L8.5 8L1.5 15", stroke: "#045529", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" })), K = (t) => /* @__PURE__ */ c.createElement("svg", { width: 10, height: 16, viewBox: "0 0 10 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ c.createElement("path", { d: "M8.5 15L1.5 8L8.5 1", stroke: "#045529", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" }));
|
|
10
|
+
function lt(t) {
|
|
11
|
+
return Q("MuiPagination", t);
|
|
13
12
|
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
function ct(t = {}) {
|
|
13
|
+
X("MuiPagination", ["root", "ul", "outlined", "text"]);
|
|
14
|
+
function pt(t = {}) {
|
|
17
15
|
const {
|
|
18
16
|
boundaryCount: a = 1,
|
|
19
|
-
componentName:
|
|
17
|
+
componentName: o = "usePagination",
|
|
20
18
|
count: n = 1,
|
|
21
19
|
defaultPage: v = 1,
|
|
22
|
-
disabled:
|
|
20
|
+
disabled: p = !1,
|
|
23
21
|
hideNextButton: f = !1,
|
|
24
|
-
hidePrevButton:
|
|
25
|
-
onChange:
|
|
26
|
-
page:
|
|
27
|
-
showFirstButton:
|
|
28
|
-
showLastButton:
|
|
29
|
-
siblingCount:
|
|
30
|
-
|
|
31
|
-
|
|
22
|
+
hidePrevButton: b = !1,
|
|
23
|
+
onChange: y,
|
|
24
|
+
page: P,
|
|
25
|
+
showFirstButton: L = !1,
|
|
26
|
+
showLastButton: z = !1,
|
|
27
|
+
siblingCount: C = 1,
|
|
28
|
+
...w
|
|
29
|
+
} = t, [d, u] = st({
|
|
30
|
+
controlled: P,
|
|
32
31
|
default: v,
|
|
33
|
-
name:
|
|
32
|
+
name: o,
|
|
34
33
|
state: "page"
|
|
35
|
-
}),
|
|
36
|
-
|
|
37
|
-
},
|
|
38
|
-
const
|
|
34
|
+
}), O = (s, r) => {
|
|
35
|
+
P || u(r), y && y(s, r);
|
|
36
|
+
}, $ = (s, r) => {
|
|
37
|
+
const I = r - s + 1;
|
|
39
38
|
return Array.from({
|
|
40
|
-
length:
|
|
41
|
-
}, (
|
|
42
|
-
},
|
|
39
|
+
length: I
|
|
40
|
+
}, (V, W) => s + W);
|
|
41
|
+
}, g = $(1, Math.min(a, n)), M = $(Math.max(n - a + 1, a + 1), n), m = Math.max(
|
|
43
42
|
Math.min(
|
|
44
43
|
// Natural start
|
|
45
|
-
|
|
44
|
+
d - C,
|
|
46
45
|
// Lower boundary when page is high
|
|
47
|
-
n - a -
|
|
46
|
+
n - a - C * 2 - 1
|
|
48
47
|
),
|
|
49
48
|
// Greater than startPages
|
|
50
49
|
a + 2
|
|
51
|
-
),
|
|
50
|
+
), x = Math.min(
|
|
52
51
|
Math.max(
|
|
53
52
|
// Natural end
|
|
54
|
-
|
|
53
|
+
d + C,
|
|
55
54
|
// Upper boundary when page is low
|
|
56
|
-
a +
|
|
55
|
+
a + C * 2 + 2
|
|
57
56
|
),
|
|
58
57
|
// Less than endPages
|
|
59
|
-
|
|
60
|
-
),
|
|
61
|
-
...
|
|
62
|
-
...
|
|
63
|
-
...
|
|
58
|
+
n - a - 1
|
|
59
|
+
), N = [
|
|
60
|
+
...L ? ["first"] : [],
|
|
61
|
+
...b ? [] : ["previous"],
|
|
62
|
+
...g,
|
|
64
63
|
// Start ellipsis
|
|
65
64
|
// eslint-disable-next-line no-nested-ternary
|
|
66
|
-
...
|
|
65
|
+
...m > a + 2 ? ["start-ellipsis"] : a + 1 < n - a ? [a + 1] : [],
|
|
67
66
|
// Sibling pages
|
|
68
|
-
|
|
67
|
+
...$(m, x),
|
|
69
68
|
// End ellipsis
|
|
70
69
|
// eslint-disable-next-line no-nested-ternary
|
|
71
|
-
...
|
|
72
|
-
...
|
|
70
|
+
...x < n - a - 1 ? ["end-ellipsis"] : n - a > a ? [n - a] : [],
|
|
71
|
+
...M,
|
|
73
72
|
...f ? [] : ["next"],
|
|
74
|
-
...
|
|
75
|
-
],
|
|
73
|
+
...z ? ["last"] : []
|
|
74
|
+
], h = (s) => {
|
|
76
75
|
switch (s) {
|
|
77
76
|
case "first":
|
|
78
77
|
return 1;
|
|
79
78
|
case "previous":
|
|
80
|
-
return
|
|
79
|
+
return d - 1;
|
|
81
80
|
case "next":
|
|
82
|
-
return
|
|
81
|
+
return d + 1;
|
|
83
82
|
case "last":
|
|
84
83
|
return n;
|
|
85
84
|
default:
|
|
86
85
|
return null;
|
|
87
86
|
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
87
|
+
};
|
|
88
|
+
return {
|
|
89
|
+
items: N.map((s) => typeof s == "number" ? {
|
|
90
|
+
onClick: (r) => {
|
|
91
|
+
O(r, s);
|
|
92
|
+
},
|
|
93
|
+
type: "page",
|
|
94
|
+
page: s,
|
|
95
|
+
selected: s === d,
|
|
96
|
+
disabled: p,
|
|
97
|
+
"aria-current": s === d ? "page" : void 0
|
|
98
|
+
} : {
|
|
99
|
+
onClick: (r) => {
|
|
100
|
+
O(r, h(s));
|
|
101
|
+
},
|
|
102
|
+
type: s,
|
|
103
|
+
page: h(s),
|
|
104
|
+
selected: !1,
|
|
105
|
+
disabled: p || !s.includes("ellipsis") && (s === "next" || s === "last" ? d >= n : d <= 1)
|
|
106
|
+
}),
|
|
107
|
+
...w
|
|
108
|
+
};
|
|
109
109
|
}
|
|
110
|
-
function
|
|
111
|
-
return
|
|
110
|
+
function ct(t) {
|
|
111
|
+
return Q("MuiPaginationItem", t);
|
|
112
112
|
}
|
|
113
|
-
const
|
|
113
|
+
const i = X("MuiPaginationItem", ["root", "page", "sizeSmall", "sizeLarge", "text", "textPrimary", "textSecondary", "outlined", "outlinedPrimary", "outlinedSecondary", "rounded", "ellipsis", "firstLast", "previousNext", "focusVisible", "disabled", "selected", "icon", "colorPrimary", "colorSecondary"]), dt = E(/* @__PURE__ */ l("path", {
|
|
114
114
|
d: "M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"
|
|
115
|
-
}), "FirstPage"),
|
|
115
|
+
}), "FirstPage"), ut = E(/* @__PURE__ */ l("path", {
|
|
116
116
|
d: "M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"
|
|
117
|
-
}), "LastPage"),
|
|
117
|
+
}), "LastPage"), gt = E(/* @__PURE__ */ l("path", {
|
|
118
118
|
d: "M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"
|
|
119
|
-
}), "NavigateBefore"),
|
|
119
|
+
}), "NavigateBefore"), vt = E(/* @__PURE__ */ l("path", {
|
|
120
120
|
d: "M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"
|
|
121
|
-
}), "NavigateNext"),
|
|
121
|
+
}), "NavigateNext"), tt = (t, a) => {
|
|
122
122
|
const {
|
|
123
|
-
ownerState:
|
|
123
|
+
ownerState: o
|
|
124
124
|
} = t;
|
|
125
|
-
return [a.root, a[
|
|
126
|
-
},
|
|
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
|
+
}, ft = (t) => {
|
|
127
127
|
const {
|
|
128
128
|
classes: a,
|
|
129
|
-
color:
|
|
129
|
+
color: o,
|
|
130
130
|
disabled: n,
|
|
131
131
|
selected: v,
|
|
132
|
-
size:
|
|
132
|
+
size: p,
|
|
133
133
|
shape: f,
|
|
134
|
-
type:
|
|
135
|
-
variant:
|
|
136
|
-
} = t,
|
|
137
|
-
root: ["root", `size${
|
|
134
|
+
type: b,
|
|
135
|
+
variant: y
|
|
136
|
+
} = t, P = {
|
|
137
|
+
root: ["root", `size${T(p)}`, y, f, o !== "standard" && `color${T(o)}`, o !== "standard" && `${y}${T(o)}`, n && "disabled", v && "selected", {
|
|
138
138
|
page: "page",
|
|
139
139
|
first: "firstLast",
|
|
140
140
|
last: "firstLast",
|
|
@@ -142,18 +142,18 @@ const u = K("MuiPaginationItem", ["root", "page", "sizeSmall", "sizeLarge", "tex
|
|
|
142
142
|
"end-ellipsis": "ellipsis",
|
|
143
143
|
previous: "previousNext",
|
|
144
144
|
next: "previousNext"
|
|
145
|
-
}[
|
|
145
|
+
}[b]],
|
|
146
146
|
icon: ["icon"]
|
|
147
147
|
};
|
|
148
|
-
return
|
|
149
|
-
},
|
|
148
|
+
return Z(P, ct, a);
|
|
149
|
+
}, bt = R("div", {
|
|
150
150
|
name: "MuiPaginationItem",
|
|
151
151
|
slot: "Root",
|
|
152
|
-
overridesResolver:
|
|
153
|
-
})(({
|
|
154
|
-
theme: t
|
|
155
|
-
|
|
156
|
-
|
|
152
|
+
overridesResolver: tt
|
|
153
|
+
})(F(({
|
|
154
|
+
theme: t
|
|
155
|
+
}) => ({
|
|
156
|
+
...t.typography.body2,
|
|
157
157
|
borderRadius: 32 / 2,
|
|
158
158
|
textAlign: "center",
|
|
159
159
|
boxSizing: "border-box",
|
|
@@ -162,27 +162,38 @@ const u = K("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
|
-
}
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
}
|
|
167
|
+
},
|
|
168
|
+
variants: [{
|
|
169
|
+
props: {
|
|
170
|
+
size: "small"
|
|
171
|
+
},
|
|
172
|
+
style: {
|
|
173
|
+
minWidth: 26,
|
|
174
|
+
borderRadius: 26 / 2,
|
|
175
|
+
margin: "0 1px",
|
|
176
|
+
padding: "0 4px"
|
|
177
|
+
}
|
|
178
|
+
}, {
|
|
179
|
+
props: {
|
|
180
|
+
size: "large"
|
|
181
|
+
},
|
|
182
|
+
style: {
|
|
183
|
+
minWidth: 40,
|
|
184
|
+
borderRadius: 40 / 2,
|
|
185
|
+
padding: "0 10px",
|
|
186
|
+
fontSize: t.typography.pxToRem(15)
|
|
187
|
+
}
|
|
188
|
+
}]
|
|
189
|
+
}))), yt = R(it, {
|
|
179
190
|
name: "MuiPaginationItem",
|
|
180
191
|
slot: "Root",
|
|
181
|
-
overridesResolver:
|
|
182
|
-
})(({
|
|
183
|
-
theme: t
|
|
184
|
-
|
|
185
|
-
|
|
192
|
+
overridesResolver: tt
|
|
193
|
+
})(F(({
|
|
194
|
+
theme: t
|
|
195
|
+
}) => ({
|
|
196
|
+
...t.typography.body2,
|
|
186
197
|
borderRadius: 32 / 2,
|
|
187
198
|
textAlign: "center",
|
|
188
199
|
boxSizing: "border-box",
|
|
@@ -191,10 +202,10 @@ const u = K("MuiPaginationItem", ["root", "page", "sizeSmall", "sizeLarge", "tex
|
|
|
191
202
|
padding: "0 6px",
|
|
192
203
|
margin: "0 3px",
|
|
193
204
|
color: (t.vars || t).palette.text.primary,
|
|
194
|
-
[`&.${
|
|
205
|
+
[`&.${i.focusVisible}`]: {
|
|
195
206
|
backgroundColor: (t.vars || t).palette.action.focus
|
|
196
207
|
},
|
|
197
|
-
[`&.${
|
|
208
|
+
[`&.${i.disabled}`]: {
|
|
198
209
|
opacity: (t.vars || t).palette.action.disabledOpacity
|
|
199
210
|
},
|
|
200
211
|
transition: t.transitions.create(["color", "background-color"], {
|
|
@@ -207,152 +218,236 @@ const u = K("MuiPaginationItem", ["root", "page", "sizeSmall", "sizeLarge", "tex
|
|
|
207
218
|
backgroundColor: "transparent"
|
|
208
219
|
}
|
|
209
220
|
},
|
|
210
|
-
[`&.${
|
|
221
|
+
[`&.${i.selected}`]: {
|
|
211
222
|
backgroundColor: (t.vars || t).palette.action.selected,
|
|
212
223
|
"&:hover": {
|
|
213
|
-
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}))` : S(t.palette.action.selected, t.palette.action.selectedOpacity + t.palette.action.hoverOpacity),
|
|
214
225
|
// Reset on touch devices, it doesn't add specificity
|
|
215
226
|
"@media (hover: none)": {
|
|
216
227
|
backgroundColor: (t.vars || t).palette.action.selected
|
|
217
228
|
}
|
|
218
229
|
},
|
|
219
|
-
[`&.${
|
|
220
|
-
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}))` : S(t.palette.action.selected, t.palette.action.selectedOpacity + t.palette.action.focusOpacity)
|
|
221
232
|
},
|
|
222
|
-
[`&.${
|
|
233
|
+
[`&.${i.disabled}`]: {
|
|
223
234
|
opacity: 1,
|
|
224
235
|
color: (t.vars || t).palette.action.disabled,
|
|
225
236
|
backgroundColor: (t.vars || t).palette.action.selected
|
|
226
237
|
}
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
borderRadius: 26 / 2,
|
|
232
|
-
margin: "0 1px",
|
|
233
|
-
padding: "0 4px"
|
|
234
|
-
}, a.size === "large" && {
|
|
235
|
-
minWidth: 40,
|
|
236
|
-
height: 40,
|
|
237
|
-
borderRadius: 40 / 2,
|
|
238
|
-
padding: "0 10px",
|
|
239
|
-
fontSize: t.typography.pxToRem(15)
|
|
240
|
-
}, a.shape === "rounded" && {
|
|
241
|
-
borderRadius: (t.vars || t).shape.borderRadius
|
|
242
|
-
}), ({
|
|
243
|
-
theme: t,
|
|
244
|
-
ownerState: a
|
|
245
|
-
}) => l({}, a.variant === "text" && {
|
|
246
|
-
[`&.${u.selected}`]: l({}, a.color !== "standard" && {
|
|
247
|
-
color: (t.vars || t).palette[a.color].contrastText,
|
|
248
|
-
backgroundColor: (t.vars || t).palette[a.color].main,
|
|
249
|
-
"&:hover": {
|
|
250
|
-
backgroundColor: (t.vars || t).palette[a.color].dark,
|
|
251
|
-
// Reset on touch devices, it doesn't add specificity
|
|
252
|
-
"@media (hover: none)": {
|
|
253
|
-
backgroundColor: (t.vars || t).palette[a.color].main
|
|
254
|
-
}
|
|
238
|
+
},
|
|
239
|
+
variants: [{
|
|
240
|
+
props: {
|
|
241
|
+
size: "small"
|
|
255
242
|
},
|
|
256
|
-
|
|
257
|
-
|
|
243
|
+
style: {
|
|
244
|
+
minWidth: 26,
|
|
245
|
+
height: 26,
|
|
246
|
+
borderRadius: 26 / 2,
|
|
247
|
+
margin: "0 1px",
|
|
248
|
+
padding: "0 4px"
|
|
258
249
|
}
|
|
259
250
|
}, {
|
|
260
|
-
|
|
261
|
-
|
|
251
|
+
props: {
|
|
252
|
+
size: "large"
|
|
253
|
+
},
|
|
254
|
+
style: {
|
|
255
|
+
minWidth: 40,
|
|
256
|
+
height: 40,
|
|
257
|
+
borderRadius: 40 / 2,
|
|
258
|
+
padding: "0 10px",
|
|
259
|
+
fontSize: t.typography.pxToRem(15)
|
|
262
260
|
}
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
"@media (hover: none)": {
|
|
274
|
-
backgroundColor: "transparent"
|
|
275
|
-
}
|
|
261
|
+
}, {
|
|
262
|
+
props: {
|
|
263
|
+
shape: "rounded"
|
|
264
|
+
},
|
|
265
|
+
style: {
|
|
266
|
+
borderRadius: (t.vars || t).shape.borderRadius
|
|
267
|
+
}
|
|
268
|
+
}, {
|
|
269
|
+
props: {
|
|
270
|
+
variant: "outlined"
|
|
276
271
|
},
|
|
277
|
-
|
|
278
|
-
|
|
272
|
+
style: {
|
|
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
|
+
[`&.${i.selected}`]: {
|
|
275
|
+
[`&.${i.disabled}`]: {
|
|
276
|
+
borderColor: (t.vars || t).palette.action.disabledBackground,
|
|
277
|
+
color: (t.vars || t).palette.action.disabled
|
|
278
|
+
}
|
|
279
|
+
}
|
|
279
280
|
}
|
|
280
281
|
}, {
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
282
|
+
props: {
|
|
283
|
+
variant: "text"
|
|
284
|
+
},
|
|
285
|
+
style: {
|
|
286
|
+
[`&.${i.selected}`]: {
|
|
287
|
+
[`&.${i.disabled}`]: {
|
|
288
|
+
color: (t.vars || t).palette.action.disabled
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
}, ...Object.entries(t.palette).filter(_(["dark", "contrastText"])).map(([a]) => ({
|
|
293
|
+
props: {
|
|
294
|
+
variant: "text",
|
|
295
|
+
color: a
|
|
296
|
+
},
|
|
297
|
+
style: {
|
|
298
|
+
[`&.${i.selected}`]: {
|
|
299
|
+
color: (t.vars || t).palette[a].contrastText,
|
|
300
|
+
backgroundColor: (t.vars || t).palette[a].main,
|
|
301
|
+
"&:hover": {
|
|
302
|
+
backgroundColor: (t.vars || t).palette[a].dark,
|
|
303
|
+
// Reset on touch devices, it doesn't add specificity
|
|
304
|
+
"@media (hover: none)": {
|
|
305
|
+
backgroundColor: (t.vars || t).palette[a].main
|
|
306
|
+
}
|
|
307
|
+
},
|
|
308
|
+
[`&.${i.focusVisible}`]: {
|
|
309
|
+
backgroundColor: (t.vars || t).palette[a].dark
|
|
310
|
+
},
|
|
311
|
+
[`&.${i.disabled}`]: {
|
|
312
|
+
color: (t.vars || t).palette.action.disabled
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
})), ...Object.entries(t.palette).filter(_(["light"])).map(([a]) => ({
|
|
317
|
+
props: {
|
|
318
|
+
variant: "outlined",
|
|
319
|
+
color: a
|
|
320
|
+
},
|
|
321
|
+
style: {
|
|
322
|
+
[`&.${i.selected}`]: {
|
|
323
|
+
color: (t.vars || t).palette[a].main,
|
|
324
|
+
border: `1px solid ${t.vars ? `rgba(${t.vars.palette[a].mainChannel} / 0.5)` : S(t.palette[a].main, 0.5)}`,
|
|
325
|
+
backgroundColor: t.vars ? `rgba(${t.vars.palette[a].mainChannel} / ${t.vars.palette.action.activatedOpacity})` : S(t.palette[a].main, t.palette.action.activatedOpacity),
|
|
326
|
+
"&:hover": {
|
|
327
|
+
backgroundColor: t.vars ? `rgba(${t.vars.palette[a].mainChannel} / calc(${t.vars.palette.action.activatedOpacity} + ${t.vars.palette.action.focusOpacity}))` : S(t.palette[a].main, t.palette.action.activatedOpacity + t.palette.action.focusOpacity),
|
|
328
|
+
// Reset on touch devices, it doesn't add specificity
|
|
329
|
+
"@media (hover: none)": {
|
|
330
|
+
backgroundColor: "transparent"
|
|
331
|
+
}
|
|
332
|
+
},
|
|
333
|
+
[`&.${i.focusVisible}`]: {
|
|
334
|
+
backgroundColor: t.vars ? `rgba(${t.vars.palette[a].mainChannel} / calc(${t.vars.palette.action.activatedOpacity} + ${t.vars.palette.action.focusOpacity}))` : S(t.palette[a].main, t.palette.action.activatedOpacity + t.palette.action.focusOpacity)
|
|
335
|
+
}
|
|
336
|
+
}
|
|
284
337
|
}
|
|
285
|
-
})
|
|
286
|
-
})),
|
|
338
|
+
}))]
|
|
339
|
+
}))), xt = R("div", {
|
|
287
340
|
name: "MuiPaginationItem",
|
|
288
341
|
slot: "Icon",
|
|
289
342
|
overridesResolver: (t, a) => a.icon
|
|
290
|
-
})(({
|
|
291
|
-
theme: t
|
|
292
|
-
|
|
293
|
-
}) => l({
|
|
343
|
+
})(F(({
|
|
344
|
+
theme: t
|
|
345
|
+
}) => ({
|
|
294
346
|
fontSize: t.typography.pxToRem(20),
|
|
295
|
-
margin: "0 -8px"
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
347
|
+
margin: "0 -8px",
|
|
348
|
+
variants: [{
|
|
349
|
+
props: {
|
|
350
|
+
size: "small"
|
|
351
|
+
},
|
|
352
|
+
style: {
|
|
353
|
+
fontSize: t.typography.pxToRem(18)
|
|
354
|
+
}
|
|
355
|
+
}, {
|
|
356
|
+
props: {
|
|
357
|
+
size: "large"
|
|
358
|
+
},
|
|
359
|
+
style: {
|
|
360
|
+
fontSize: t.typography.pxToRem(22)
|
|
361
|
+
}
|
|
362
|
+
}]
|
|
363
|
+
}))), U = /* @__PURE__ */ c.forwardRef(function(a, o) {
|
|
364
|
+
const n = Y({
|
|
302
365
|
props: a,
|
|
303
366
|
name: "MuiPaginationItem"
|
|
304
367
|
}), {
|
|
305
368
|
className: v,
|
|
306
|
-
color:
|
|
369
|
+
color: p = "standard",
|
|
307
370
|
component: f,
|
|
308
|
-
components:
|
|
309
|
-
disabled:
|
|
310
|
-
page:
|
|
311
|
-
selected:
|
|
312
|
-
shape:
|
|
313
|
-
size:
|
|
314
|
-
slots:
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
371
|
+
components: b = {},
|
|
372
|
+
disabled: y = !1,
|
|
373
|
+
page: P,
|
|
374
|
+
selected: L = !1,
|
|
375
|
+
shape: z = "circular",
|
|
376
|
+
size: C = "medium",
|
|
377
|
+
slots: w = {},
|
|
378
|
+
slotProps: d = {},
|
|
379
|
+
type: u = "page",
|
|
380
|
+
variant: O = "text",
|
|
381
|
+
...$
|
|
382
|
+
} = n, g = {
|
|
383
|
+
...n,
|
|
384
|
+
color: p,
|
|
385
|
+
disabled: y,
|
|
386
|
+
selected: L,
|
|
387
|
+
shape: z,
|
|
388
|
+
size: C,
|
|
389
|
+
type: u,
|
|
390
|
+
variant: O
|
|
391
|
+
}, M = rt(), m = ft(g), x = {
|
|
392
|
+
slots: {
|
|
393
|
+
previous: w.previous ?? b.previous,
|
|
394
|
+
next: w.next ?? b.next,
|
|
395
|
+
first: w.first ?? b.first,
|
|
396
|
+
last: w.last ?? b.last
|
|
397
|
+
},
|
|
398
|
+
slotProps: d
|
|
399
|
+
}, [N, h] = j("previous", {
|
|
400
|
+
elementType: gt,
|
|
401
|
+
externalForwardedProps: x,
|
|
402
|
+
ownerState: g
|
|
403
|
+
}), [k, s] = j("next", {
|
|
404
|
+
elementType: vt,
|
|
405
|
+
externalForwardedProps: x,
|
|
406
|
+
ownerState: g
|
|
407
|
+
}), [r, I] = j("first", {
|
|
408
|
+
elementType: dt,
|
|
409
|
+
externalForwardedProps: x,
|
|
410
|
+
ownerState: g
|
|
411
|
+
}), [V, W] = j("last", {
|
|
412
|
+
elementType: ut,
|
|
413
|
+
externalForwardedProps: x,
|
|
414
|
+
ownerState: g
|
|
415
|
+
}), D = M ? {
|
|
416
|
+
previous: "next",
|
|
417
|
+
next: "previous",
|
|
418
|
+
first: "last",
|
|
419
|
+
last: "first"
|
|
420
|
+
}[u] : u, G = {
|
|
421
|
+
previous: N,
|
|
422
|
+
next: k,
|
|
423
|
+
first: r,
|
|
424
|
+
last: V
|
|
425
|
+
}[D], at = {
|
|
426
|
+
previous: h,
|
|
427
|
+
next: s,
|
|
428
|
+
first: I,
|
|
429
|
+
last: W
|
|
430
|
+
}[D];
|
|
431
|
+
return u === "start-ellipsis" || u === "end-ellipsis" ? /* @__PURE__ */ l(bt, {
|
|
432
|
+
ref: o,
|
|
433
|
+
ownerState: g,
|
|
434
|
+
className: A(m.root, v),
|
|
340
435
|
children: "…"
|
|
341
|
-
}) : /* @__PURE__ */ ot(
|
|
342
|
-
ref:
|
|
343
|
-
ownerState:
|
|
436
|
+
}) : /* @__PURE__ */ ot(yt, {
|
|
437
|
+
ref: o,
|
|
438
|
+
ownerState: g,
|
|
344
439
|
component: f,
|
|
345
|
-
disabled:
|
|
346
|
-
className:
|
|
347
|
-
|
|
348
|
-
children: [
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
440
|
+
disabled: y,
|
|
441
|
+
className: A(m.root, v),
|
|
442
|
+
...$,
|
|
443
|
+
children: [u === "page" && P, G ? /* @__PURE__ */ l(xt, {
|
|
444
|
+
...at,
|
|
445
|
+
className: m.icon,
|
|
446
|
+
as: G
|
|
352
447
|
}) : null]
|
|
353
|
-
})
|
|
448
|
+
});
|
|
354
449
|
});
|
|
355
|
-
process.env.NODE_ENV !== "production" && (
|
|
450
|
+
process.env.NODE_ENV !== "production" && (U.propTypes = {
|
|
356
451
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
357
452
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
358
453
|
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
@@ -360,27 +455,27 @@ process.env.NODE_ENV !== "production" && (F.propTypes = {
|
|
|
360
455
|
/**
|
|
361
456
|
* @ignore
|
|
362
457
|
*/
|
|
363
|
-
children:
|
|
458
|
+
children: e.node,
|
|
364
459
|
/**
|
|
365
460
|
* Override or extend the styles applied to the component.
|
|
366
461
|
*/
|
|
367
|
-
classes:
|
|
462
|
+
classes: e.object,
|
|
368
463
|
/**
|
|
369
464
|
* @ignore
|
|
370
465
|
*/
|
|
371
|
-
className:
|
|
466
|
+
className: e.string,
|
|
372
467
|
/**
|
|
373
468
|
* The active color.
|
|
374
469
|
* It supports both default and custom theme colors, which can be added as shown in the
|
|
375
470
|
* [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
|
|
376
471
|
* @default 'standard'
|
|
377
472
|
*/
|
|
378
|
-
color:
|
|
473
|
+
color: e.oneOfType([e.oneOf(["primary", "secondary", "standard"]), e.string]),
|
|
379
474
|
/**
|
|
380
475
|
* The component used for the root node.
|
|
381
476
|
* Either a string to use a HTML element or a component.
|
|
382
477
|
*/
|
|
383
|
-
component:
|
|
478
|
+
component: e.elementType,
|
|
384
479
|
/**
|
|
385
480
|
* The components used for each slot inside.
|
|
386
481
|
*
|
|
@@ -388,84 +483,92 @@ process.env.NODE_ENV !== "production" && (F.propTypes = {
|
|
|
388
483
|
* It's recommended to use the `slots` prop instead.
|
|
389
484
|
*
|
|
390
485
|
* @default {}
|
|
486
|
+
* @deprecated use the `slots` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
391
487
|
*/
|
|
392
|
-
components:
|
|
393
|
-
first:
|
|
394
|
-
last:
|
|
395
|
-
next:
|
|
396
|
-
previous:
|
|
488
|
+
components: e.shape({
|
|
489
|
+
first: e.elementType,
|
|
490
|
+
last: e.elementType,
|
|
491
|
+
next: e.elementType,
|
|
492
|
+
previous: e.elementType
|
|
397
493
|
}),
|
|
398
494
|
/**
|
|
399
495
|
* If `true`, the component is disabled.
|
|
400
496
|
* @default false
|
|
401
497
|
*/
|
|
402
|
-
disabled:
|
|
498
|
+
disabled: e.bool,
|
|
403
499
|
/**
|
|
404
500
|
* The current page number.
|
|
405
501
|
*/
|
|
406
|
-
page:
|
|
502
|
+
page: e.node,
|
|
407
503
|
/**
|
|
408
504
|
* If `true` the pagination item is selected.
|
|
409
505
|
* @default false
|
|
410
506
|
*/
|
|
411
|
-
selected:
|
|
507
|
+
selected: e.bool,
|
|
412
508
|
/**
|
|
413
509
|
* The shape of the pagination item.
|
|
414
510
|
* @default 'circular'
|
|
415
511
|
*/
|
|
416
|
-
shape:
|
|
512
|
+
shape: e.oneOf(["circular", "rounded"]),
|
|
417
513
|
/**
|
|
418
514
|
* The size of the component.
|
|
419
515
|
* @default 'medium'
|
|
420
516
|
*/
|
|
421
|
-
size:
|
|
517
|
+
size: e.oneOfType([e.oneOf(["small", "medium", "large"]), e.string]),
|
|
518
|
+
/**
|
|
519
|
+
* The props used for each slot inside.
|
|
520
|
+
* @default {}
|
|
521
|
+
*/
|
|
522
|
+
slotProps: e.shape({
|
|
523
|
+
first: e.oneOfType([e.func, e.object]),
|
|
524
|
+
last: e.oneOfType([e.func, e.object]),
|
|
525
|
+
next: e.oneOfType([e.func, e.object]),
|
|
526
|
+
previous: e.oneOfType([e.func, e.object])
|
|
527
|
+
}),
|
|
422
528
|
/**
|
|
423
529
|
* The components used for each slot inside.
|
|
424
|
-
*
|
|
425
|
-
* This prop is an alias for the `components` prop, which will be deprecated in the future.
|
|
426
|
-
*
|
|
427
530
|
* @default {}
|
|
428
531
|
*/
|
|
429
|
-
slots:
|
|
430
|
-
first:
|
|
431
|
-
last:
|
|
432
|
-
next:
|
|
433
|
-
previous:
|
|
532
|
+
slots: e.shape({
|
|
533
|
+
first: e.elementType,
|
|
534
|
+
last: e.elementType,
|
|
535
|
+
next: e.elementType,
|
|
536
|
+
previous: e.elementType
|
|
434
537
|
}),
|
|
435
538
|
/**
|
|
436
539
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
437
540
|
*/
|
|
438
|
-
sx:
|
|
541
|
+
sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
|
|
439
542
|
/**
|
|
440
543
|
* The type of pagination item.
|
|
441
544
|
* @default 'page'
|
|
442
545
|
*/
|
|
443
|
-
type:
|
|
546
|
+
type: e.oneOf(["end-ellipsis", "first", "last", "next", "page", "previous", "start-ellipsis"]),
|
|
444
547
|
/**
|
|
445
548
|
* The variant to use.
|
|
446
549
|
* @default 'text'
|
|
447
550
|
*/
|
|
448
|
-
variant:
|
|
551
|
+
variant: e.oneOfType([e.oneOf(["outlined", "text"]), e.string])
|
|
449
552
|
});
|
|
450
|
-
const
|
|
553
|
+
const mt = (t) => {
|
|
451
554
|
const {
|
|
452
555
|
classes: a,
|
|
453
|
-
variant:
|
|
556
|
+
variant: o
|
|
454
557
|
} = t;
|
|
455
|
-
return
|
|
456
|
-
root: ["root",
|
|
558
|
+
return Z({
|
|
559
|
+
root: ["root", o],
|
|
457
560
|
ul: ["ul"]
|
|
458
|
-
},
|
|
459
|
-
},
|
|
561
|
+
}, lt, a);
|
|
562
|
+
}, Pt = R("nav", {
|
|
460
563
|
name: "MuiPagination",
|
|
461
564
|
slot: "Root",
|
|
462
565
|
overridesResolver: (t, a) => {
|
|
463
566
|
const {
|
|
464
|
-
ownerState:
|
|
567
|
+
ownerState: o
|
|
465
568
|
} = t;
|
|
466
|
-
return [a.root, a[
|
|
569
|
+
return [a.root, a[o.variant]];
|
|
467
570
|
}
|
|
468
|
-
})({}),
|
|
571
|
+
})({}), Ct = R("ul", {
|
|
469
572
|
name: "MuiPagination",
|
|
470
573
|
slot: "Ul",
|
|
471
574
|
overridesResolver: (t, a) => a.ul
|
|
@@ -477,73 +580,81 @@ const bt = ["boundaryCount", "className", "color", "count", "defaultPage", "disa
|
|
|
477
580
|
margin: 0,
|
|
478
581
|
listStyle: "none"
|
|
479
582
|
});
|
|
480
|
-
function
|
|
481
|
-
return t === "page" ? `${
|
|
583
|
+
function wt(t, a, o) {
|
|
584
|
+
return t === "page" ? `${o ? "" : "Go to "}page ${a}` : `Go to ${t} page`;
|
|
482
585
|
}
|
|
483
|
-
const
|
|
484
|
-
const n =
|
|
586
|
+
const et = /* @__PURE__ */ c.forwardRef(function(a, o) {
|
|
587
|
+
const n = Y({
|
|
485
588
|
props: a,
|
|
486
589
|
name: "MuiPagination"
|
|
487
590
|
}), {
|
|
488
591
|
boundaryCount: v = 1,
|
|
489
|
-
className:
|
|
592
|
+
className: p,
|
|
490
593
|
color: f = "standard",
|
|
491
|
-
count:
|
|
492
|
-
defaultPage:
|
|
493
|
-
disabled:
|
|
494
|
-
getItemAriaLabel:
|
|
495
|
-
hideNextButton:
|
|
496
|
-
hidePrevButton:
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
594
|
+
count: b = 1,
|
|
595
|
+
defaultPage: y = 1,
|
|
596
|
+
disabled: P = !1,
|
|
597
|
+
getItemAriaLabel: L = wt,
|
|
598
|
+
hideNextButton: z = !1,
|
|
599
|
+
hidePrevButton: C = !1,
|
|
600
|
+
onChange: w,
|
|
601
|
+
page: d,
|
|
602
|
+
renderItem: u = (r) => /* @__PURE__ */ l(U, {
|
|
603
|
+
...r
|
|
604
|
+
}),
|
|
605
|
+
shape: O = "circular",
|
|
606
|
+
showFirstButton: $ = !1,
|
|
607
|
+
showLastButton: g = !1,
|
|
608
|
+
siblingCount: M = 1,
|
|
609
|
+
size: m = "medium",
|
|
610
|
+
variant: x = "text",
|
|
611
|
+
...N
|
|
612
|
+
} = n, {
|
|
613
|
+
items: h
|
|
614
|
+
} = pt({
|
|
615
|
+
...n,
|
|
507
616
|
componentName: "Pagination"
|
|
508
|
-
})
|
|
617
|
+
}), k = {
|
|
618
|
+
...n,
|
|
509
619
|
boundaryCount: v,
|
|
510
620
|
color: f,
|
|
511
|
-
count:
|
|
512
|
-
defaultPage:
|
|
513
|
-
disabled:
|
|
514
|
-
getItemAriaLabel:
|
|
515
|
-
hideNextButton:
|
|
516
|
-
hidePrevButton:
|
|
517
|
-
renderItem:
|
|
518
|
-
shape:
|
|
519
|
-
showFirstButton:
|
|
520
|
-
showLastButton:
|
|
521
|
-
siblingCount:
|
|
522
|
-
size:
|
|
621
|
+
count: b,
|
|
622
|
+
defaultPage: y,
|
|
623
|
+
disabled: P,
|
|
624
|
+
getItemAriaLabel: L,
|
|
625
|
+
hideNextButton: z,
|
|
626
|
+
hidePrevButton: C,
|
|
627
|
+
renderItem: u,
|
|
628
|
+
shape: O,
|
|
629
|
+
showFirstButton: $,
|
|
630
|
+
showLastButton: g,
|
|
631
|
+
siblingCount: M,
|
|
632
|
+
size: m,
|
|
523
633
|
variant: x
|
|
524
|
-
}
|
|
525
|
-
return /* @__PURE__ */
|
|
634
|
+
}, s = mt(k);
|
|
635
|
+
return /* @__PURE__ */ l(Pt, {
|
|
526
636
|
"aria-label": "pagination navigation",
|
|
527
|
-
className:
|
|
528
|
-
ownerState:
|
|
529
|
-
ref:
|
|
530
|
-
|
|
531
|
-
children: /* @__PURE__ */
|
|
532
|
-
className:
|
|
533
|
-
ownerState:
|
|
534
|
-
children:
|
|
535
|
-
children:
|
|
637
|
+
className: A(s.root, p),
|
|
638
|
+
ownerState: k,
|
|
639
|
+
ref: o,
|
|
640
|
+
...N,
|
|
641
|
+
children: /* @__PURE__ */ l(Ct, {
|
|
642
|
+
className: s.ul,
|
|
643
|
+
ownerState: k,
|
|
644
|
+
children: h.map((r, I) => /* @__PURE__ */ l("li", {
|
|
645
|
+
children: u({
|
|
646
|
+
...r,
|
|
536
647
|
color: f,
|
|
537
|
-
"aria-label":
|
|
538
|
-
shape:
|
|
539
|
-
size:
|
|
648
|
+
"aria-label": L(r.type, r.page, r.selected),
|
|
649
|
+
shape: O,
|
|
650
|
+
size: m,
|
|
540
651
|
variant: x
|
|
541
|
-
})
|
|
542
|
-
},
|
|
652
|
+
})
|
|
653
|
+
}, I))
|
|
543
654
|
})
|
|
544
|
-
})
|
|
655
|
+
});
|
|
545
656
|
});
|
|
546
|
-
process.env.NODE_ENV !== "production" && (
|
|
657
|
+
process.env.NODE_ENV !== "production" && (et.propTypes = {
|
|
547
658
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
548
659
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
549
660
|
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
@@ -552,136 +663,136 @@ process.env.NODE_ENV !== "production" && (Z.propTypes = {
|
|
|
552
663
|
* Number of always visible pages at the beginning and end.
|
|
553
664
|
* @default 1
|
|
554
665
|
*/
|
|
555
|
-
boundaryCount:
|
|
666
|
+
boundaryCount: B,
|
|
556
667
|
/**
|
|
557
668
|
* Override or extend the styles applied to the component.
|
|
558
669
|
*/
|
|
559
|
-
classes:
|
|
670
|
+
classes: e.object,
|
|
560
671
|
/**
|
|
561
672
|
* @ignore
|
|
562
673
|
*/
|
|
563
|
-
className:
|
|
674
|
+
className: e.string,
|
|
564
675
|
/**
|
|
565
676
|
* The active color.
|
|
566
677
|
* It supports both default and custom theme colors, which can be added as shown in the
|
|
567
678
|
* [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
|
|
568
679
|
* @default 'standard'
|
|
569
680
|
*/
|
|
570
|
-
color:
|
|
681
|
+
color: e.oneOfType([e.oneOf(["primary", "secondary", "standard"]), e.string]),
|
|
571
682
|
/**
|
|
572
683
|
* The total number of pages.
|
|
573
684
|
* @default 1
|
|
574
685
|
*/
|
|
575
|
-
count:
|
|
686
|
+
count: B,
|
|
576
687
|
/**
|
|
577
688
|
* The page selected by default when the component is uncontrolled.
|
|
578
689
|
* @default 1
|
|
579
690
|
*/
|
|
580
|
-
defaultPage:
|
|
691
|
+
defaultPage: B,
|
|
581
692
|
/**
|
|
582
693
|
* If `true`, the component is disabled.
|
|
583
694
|
* @default false
|
|
584
695
|
*/
|
|
585
|
-
disabled:
|
|
696
|
+
disabled: e.bool,
|
|
586
697
|
/**
|
|
587
698
|
* Accepts a function which returns a string value that provides a user-friendly name for the current page.
|
|
588
699
|
* This is important for screen reader users.
|
|
589
700
|
*
|
|
590
|
-
* For localization purposes, you can use the provided [translations](/material-ui/guides/localization/).
|
|
701
|
+
* For localization purposes, you can use the provided [translations](https://mui.com/material-ui/guides/localization/).
|
|
591
702
|
* @param {string} type The link or button type to format ('page' | 'first' | 'last' | 'next' | 'previous' | 'start-ellipsis' | 'end-ellipsis'). Defaults to 'page'.
|
|
592
|
-
* @param {number} page The page number to format.
|
|
593
|
-
* @param {
|
|
703
|
+
* @param {number | null} page The page number to format.
|
|
704
|
+
* @param {boolean} selected If true, the current page is selected.
|
|
594
705
|
* @returns {string}
|
|
595
706
|
*/
|
|
596
|
-
getItemAriaLabel:
|
|
707
|
+
getItemAriaLabel: e.func,
|
|
597
708
|
/**
|
|
598
709
|
* If `true`, hide the next-page button.
|
|
599
710
|
* @default false
|
|
600
711
|
*/
|
|
601
|
-
hideNextButton:
|
|
712
|
+
hideNextButton: e.bool,
|
|
602
713
|
/**
|
|
603
714
|
* If `true`, hide the previous-page button.
|
|
604
715
|
* @default false
|
|
605
716
|
*/
|
|
606
|
-
hidePrevButton:
|
|
717
|
+
hidePrevButton: e.bool,
|
|
607
718
|
/**
|
|
608
719
|
* Callback fired when the page is changed.
|
|
609
720
|
*
|
|
610
721
|
* @param {React.ChangeEvent<unknown>} event The event source of the callback.
|
|
611
722
|
* @param {number} page The page selected.
|
|
612
723
|
*/
|
|
613
|
-
onChange:
|
|
724
|
+
onChange: e.func,
|
|
614
725
|
/**
|
|
615
726
|
* The current page. Unlike `TablePagination`, which starts numbering from `0`, this pagination starts from `1`.
|
|
616
727
|
*/
|
|
617
|
-
page:
|
|
728
|
+
page: B,
|
|
618
729
|
/**
|
|
619
730
|
* Render the item.
|
|
620
731
|
* @param {PaginationRenderItemParams} params The props to spread on a PaginationItem.
|
|
621
732
|
* @returns {ReactNode}
|
|
622
733
|
* @default (item) => <PaginationItem {...item} />
|
|
623
734
|
*/
|
|
624
|
-
renderItem:
|
|
735
|
+
renderItem: e.func,
|
|
625
736
|
/**
|
|
626
737
|
* The shape of the pagination items.
|
|
627
738
|
* @default 'circular'
|
|
628
739
|
*/
|
|
629
|
-
shape:
|
|
740
|
+
shape: e.oneOf(["circular", "rounded"]),
|
|
630
741
|
/**
|
|
631
742
|
* If `true`, show the first-page button.
|
|
632
743
|
* @default false
|
|
633
744
|
*/
|
|
634
|
-
showFirstButton:
|
|
745
|
+
showFirstButton: e.bool,
|
|
635
746
|
/**
|
|
636
747
|
* If `true`, show the last-page button.
|
|
637
748
|
* @default false
|
|
638
749
|
*/
|
|
639
|
-
showLastButton:
|
|
750
|
+
showLastButton: e.bool,
|
|
640
751
|
/**
|
|
641
752
|
* Number of always visible pages before and after the current page.
|
|
642
753
|
* @default 1
|
|
643
754
|
*/
|
|
644
|
-
siblingCount:
|
|
755
|
+
siblingCount: B,
|
|
645
756
|
/**
|
|
646
757
|
* The size of the component.
|
|
647
758
|
* @default 'medium'
|
|
648
759
|
*/
|
|
649
|
-
size:
|
|
760
|
+
size: e.oneOfType([e.oneOf(["small", "medium", "large"]), e.string]),
|
|
650
761
|
/**
|
|
651
762
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
652
763
|
*/
|
|
653
|
-
sx:
|
|
764
|
+
sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
|
|
654
765
|
/**
|
|
655
766
|
* The variant to use.
|
|
656
767
|
* @default 'text'
|
|
657
768
|
*/
|
|
658
|
-
variant:
|
|
769
|
+
variant: e.oneOfType([e.oneOf(["outlined", "text"]), e.string])
|
|
659
770
|
});
|
|
660
|
-
function
|
|
771
|
+
function Ot({
|
|
661
772
|
isRtl: t,
|
|
662
773
|
pageCount: a,
|
|
663
|
-
page:
|
|
774
|
+
page: o,
|
|
664
775
|
onPageChange: n,
|
|
665
776
|
className: v
|
|
666
777
|
}) {
|
|
667
|
-
return /* @__PURE__ */
|
|
668
|
-
|
|
778
|
+
return /* @__PURE__ */ l(
|
|
779
|
+
et,
|
|
669
780
|
{
|
|
670
781
|
showFirstButton: !0,
|
|
671
782
|
showLastButton: !0,
|
|
672
783
|
className: v,
|
|
673
784
|
count: a,
|
|
674
|
-
page:
|
|
675
|
-
onChange: (
|
|
676
|
-
n(
|
|
785
|
+
page: o + 1,
|
|
786
|
+
onChange: (p, f) => {
|
|
787
|
+
n(p, f - 1);
|
|
677
788
|
},
|
|
678
789
|
boundaryCount: 0,
|
|
679
790
|
siblingCount: 1,
|
|
680
|
-
renderItem: (
|
|
681
|
-
|
|
791
|
+
renderItem: (p) => /* @__PURE__ */ l(
|
|
792
|
+
U,
|
|
682
793
|
{
|
|
683
|
-
slots: { previous: t ?
|
|
684
|
-
...
|
|
794
|
+
slots: { previous: t ? J : K, next: t ? K : J, first: t ? q : H, last: t ? H : q },
|
|
795
|
+
...p
|
|
685
796
|
}
|
|
686
797
|
),
|
|
687
798
|
sx: {
|
|
@@ -700,10 +811,10 @@ function Pt({
|
|
|
700
811
|
}
|
|
701
812
|
);
|
|
702
813
|
}
|
|
703
|
-
function
|
|
704
|
-
return /* @__PURE__ */
|
|
814
|
+
function Mt({ isRtl: t, pageCount: a }) {
|
|
815
|
+
return /* @__PURE__ */ l(nt, { ActionsComponent: (o) => /* @__PURE__ */ l(Ot, { isRtl: t, pageCount: a, ...o }) });
|
|
705
816
|
}
|
|
706
817
|
export {
|
|
707
|
-
|
|
708
|
-
|
|
818
|
+
Mt as CustomPagination,
|
|
819
|
+
Ot as Pagination
|
|
709
820
|
};
|