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