@amateescu/portal-ui-components 0.0.7-beta1 → 0.0.7-beta2

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