@amateescu/portal-ui-components 0.0.7 → 0.0.9-beta0

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.
Files changed (38) hide show
  1. package/dist/ButtonBase-Dv90LYxj.js +956 -0
  2. package/dist/Skeleton-g81JQrtl.js +25004 -0
  3. package/dist/VModalIcon-D7L4bQLO.js +5 -0
  4. package/dist/assets/index2.css +1 -1
  5. package/dist/assets/index3.css +1 -1
  6. package/dist/components/ConfirmationModal/ConfirmationModal.d.ts +2 -0
  7. package/dist/components/ConfirmationModal/ConfirmationModal.js +50 -0
  8. package/dist/components/ConfirmationModal/ConfirmationModal.types.d.ts +11 -0
  9. package/dist/components/CustomButton/index.js +359 -9
  10. package/dist/components/CustomPagination/CustomPagination.d.ts +11 -0
  11. package/dist/components/CustomPagination/CustomPagination.js +948 -0
  12. package/dist/components/ErrorModal/ErrorModal.d.ts +2 -0
  13. package/dist/components/ErrorModal/ErrorModal.js +35 -0
  14. package/dist/components/ErrorModal/ErrorModal.types.d.ts +10 -0
  15. package/dist/components/ErrorModal/ErrorModal.types.js +1 -0
  16. package/dist/components/InfoModal/index.js +23 -6128
  17. package/dist/components/KpiCard/index.js +23 -24
  18. package/dist/components/LoadingAnimation/index.js +254 -37
  19. package/dist/components/TotalDataGrid/TotalDataGrid.d.ts +2 -0
  20. package/dist/components/TotalDataGrid/TotalDataGrid.js +125 -0
  21. package/dist/components/TotalDataGrid/TotalDataGrid.types.js +1 -0
  22. package/dist/generateUtilityClasses-CBdP3bZj.js +3259 -0
  23. package/dist/index-BczMuCik.js +6111 -0
  24. package/dist/main.d.ts +4 -1
  25. package/dist/main.js +18 -12
  26. package/dist/{index-kNWC7pFF.js → objectWithoutPropertiesLoose-CIT-1_kH.js} +25 -25
  27. package/dist/types/CustomSvg.d.ts +5 -0
  28. package/dist/types/CustomSvg.js +1 -0
  29. package/package.json +1 -1
  30. package/dist/Button-BgbkoKxR.js +0 -1314
  31. package/dist/CircularProgress-BsBIRj7X.js +0 -225
  32. package/dist/Skeleton-BB4Y_Her.js +0 -5898
  33. package/dist/components/TotalDataGrid/index.d.ts +0 -2
  34. package/dist/components/TotalDataGrid/index.js +0 -28058
  35. package/dist/generateUtilityClasses-sdN6xOVt.js +0 -3985
  36. package/dist/toPropertyKey-DMiYgyB_.js +0 -19113
  37. /package/dist/components/{TotalDataGrid/types.js → ConfirmationModal/ConfirmationModal.types.js} +0 -0
  38. /package/dist/components/TotalDataGrid/{types.d.ts → TotalDataGrid.types.d.ts} +0 -0
@@ -0,0 +1,948 @@
1
+ import { jsxs as Q, jsx as b } from "react/jsx-runtime";
2
+ import { GridPagination as ne } from "@mui/x-data-grid";
3
+ import { _ as w, a as f } from "../../objectWithoutPropertiesLoose-CIT-1_kH.js";
4
+ import * as m from "react";
5
+ import { P as t, g as U, a as D, u as F, c as O, b as W, s as B, f as V, e as S } from "../../generateUtilityClasses-CBdP3bZj.js";
6
+ import { B as ae } from "../../ButtonBase-Dv90LYxj.js";
7
+ function ie({
8
+ controlled: e,
9
+ default: o,
10
+ name: n,
11
+ state: a = "value"
12
+ }) {
13
+ const {
14
+ current: i
15
+ } = m.useRef(e !== void 0), [l, u] = m.useState(o), s = i ? e : l;
16
+ if (process.env.NODE_ENV !== "production") {
17
+ m.useEffect(() => {
18
+ i !== (e !== void 0) && console.error([`MUI: A component is changing the ${i ? "" : "un"}controlled ${a} state of ${n} to be ${i ? "un" : ""}controlled.`, "Elements should not switch from uncontrolled to controlled (or vice versa).", `Decide between using a controlled or uncontrolled ${n} element for the lifetime of the component.`, "The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.", "More info: https://fb.me/react-controlled-components"].join(`
19
+ `));
20
+ }, [a, n, e]);
21
+ const {
22
+ current: c
23
+ } = m.useRef(o);
24
+ m.useEffect(() => {
25
+ !i && !Object.is(c, o) && console.error([`MUI: A component is changing the default ${a} state of an uncontrolled ${n} after being initialized. To suppress this warning opt to use a controlled ${n}.`].join(`
26
+ `));
27
+ }, [JSON.stringify(o)]);
28
+ }
29
+ const g = m.useCallback((c) => {
30
+ i || u(c);
31
+ }, []);
32
+ return [s, g];
33
+ }
34
+ function re(e) {
35
+ const o = typeof e;
36
+ switch (o) {
37
+ case "number":
38
+ return Number.isNaN(e) ? "NaN" : Number.isFinite(e) ? e !== Math.floor(e) ? "float" : "number" : "Infinity";
39
+ case "object":
40
+ return e === null ? "null" : e.constructor.name;
41
+ default:
42
+ return o;
43
+ }
44
+ }
45
+ function se(e) {
46
+ return typeof e == "number" && isFinite(e) && Math.floor(e) === e;
47
+ }
48
+ const le = Number.isInteger || se;
49
+ function X(e, o, n, a) {
50
+ const i = e[o];
51
+ if (i == null || !le(i)) {
52
+ const l = re(i);
53
+ return new RangeError(`Invalid ${a} \`${o}\` of type \`${l}\` supplied to \`${n}\`, expected \`integer\`.`);
54
+ }
55
+ return null;
56
+ }
57
+ function Y(e, o, ...n) {
58
+ return e[o] === void 0 ? null : X(e, o, ...n);
59
+ }
60
+ function j() {
61
+ return null;
62
+ }
63
+ Y.isRequired = X;
64
+ j.isRequired = j;
65
+ const L = process.env.NODE_ENV === "production" ? j : Y, ce = /* @__PURE__ */ m.createContext();
66
+ process.env.NODE_ENV !== "production" && (t.node, t.bool);
67
+ const de = () => {
68
+ const e = m.useContext(ce);
69
+ return e ?? !1;
70
+ };
71
+ function pe(e) {
72
+ return U("MuiSvgIcon", e);
73
+ }
74
+ D("MuiSvgIcon", ["root", "colorPrimary", "colorSecondary", "colorAction", "colorError", "colorDisabled", "fontSizeInherit", "fontSizeSmall", "fontSizeMedium", "fontSizeLarge"]);
75
+ const ue = ["children", "className", "color", "component", "fontSize", "htmlColor", "inheritViewBox", "titleAccess", "viewBox"], ge = (e) => {
76
+ const {
77
+ color: o,
78
+ fontSize: n,
79
+ classes: a
80
+ } = e, i = {
81
+ root: ["root", o !== "inherit" && `color${O(o)}`, `fontSize${O(n)}`]
82
+ };
83
+ return W(i, pe, a);
84
+ }, fe = B("svg", {
85
+ name: "MuiSvgIcon",
86
+ slot: "Root",
87
+ overridesResolver: (e, o) => {
88
+ const {
89
+ ownerState: n
90
+ } = e;
91
+ return [o.root, n.color !== "inherit" && o[`color${O(n.color)}`], o[`fontSize${O(n.fontSize)}`]];
92
+ }
93
+ })(({
94
+ theme: e,
95
+ ownerState: o
96
+ }) => {
97
+ var n, a, i, l, u, s, g, c, y, x, v, d, r;
98
+ return {
99
+ userSelect: "none",
100
+ width: "1em",
101
+ height: "1em",
102
+ display: "inline-block",
103
+ // the <svg> will define the property that has `currentColor`
104
+ // for example heroicons uses fill="none" and stroke="currentColor"
105
+ fill: o.hasSvgAsChild ? void 0 : "currentColor",
106
+ flexShrink: 0,
107
+ transition: (n = e.transitions) == null || (a = n.create) == null ? void 0 : a.call(n, "fill", {
108
+ duration: (i = e.transitions) == null || (i = i.duration) == null ? void 0 : i.shorter
109
+ }),
110
+ fontSize: {
111
+ inherit: "inherit",
112
+ small: ((l = e.typography) == null || (u = l.pxToRem) == null ? void 0 : u.call(l, 20)) || "1.25rem",
113
+ medium: ((s = e.typography) == null || (g = s.pxToRem) == null ? void 0 : g.call(s, 24)) || "1.5rem",
114
+ large: ((c = e.typography) == null || (y = c.pxToRem) == null ? void 0 : y.call(c, 35)) || "2.1875rem"
115
+ }[o.fontSize],
116
+ // TODO v5 deprecate, v6 remove for sx
117
+ color: (x = (v = (e.vars || e).palette) == null || (v = v[o.color]) == null ? void 0 : v.main) != null ? x : {
118
+ action: (d = (e.vars || e).palette) == null || (d = d.action) == null ? void 0 : d.active,
119
+ disabled: (r = (e.vars || e).palette) == null || (r = r.action) == null ? void 0 : r.disabled,
120
+ inherit: void 0
121
+ }[o.color]
122
+ };
123
+ }), E = /* @__PURE__ */ m.forwardRef(function(o, n) {
124
+ const a = F({
125
+ props: o,
126
+ name: "MuiSvgIcon"
127
+ }), {
128
+ children: i,
129
+ className: l,
130
+ color: u = "inherit",
131
+ component: s = "svg",
132
+ fontSize: g = "medium",
133
+ htmlColor: c,
134
+ inheritViewBox: y = !1,
135
+ titleAccess: x,
136
+ viewBox: v = "0 0 24 24"
137
+ } = a, d = w(a, ue), r = /* @__PURE__ */ m.isValidElement(i) && i.type === "svg", P = f({}, a, {
138
+ color: u,
139
+ component: s,
140
+ fontSize: g,
141
+ instanceFontSize: o.fontSize,
142
+ inheritViewBox: y,
143
+ viewBox: v,
144
+ hasSvgAsChild: r
145
+ }), N = {};
146
+ y || (N.viewBox = v);
147
+ const h = ge(P);
148
+ return /* @__PURE__ */ Q(fe, f({
149
+ as: s,
150
+ className: V(h.root, l),
151
+ focusable: "false",
152
+ color: c,
153
+ "aria-hidden": x ? void 0 : !0,
154
+ role: x ? "img" : void 0,
155
+ ref: n
156
+ }, N, d, r && i.props, {
157
+ ownerState: P,
158
+ children: [r ? i.props.children : i, x ? /* @__PURE__ */ b("title", {
159
+ children: x
160
+ }) : null]
161
+ }));
162
+ });
163
+ process.env.NODE_ENV !== "production" && (E.propTypes = {
164
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
165
+ // │ These PropTypes are generated from the TypeScript type definitions. │
166
+ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
167
+ // └─────────────────────────────────────────────────────────────────────┘
168
+ /**
169
+ * Node passed into the SVG element.
170
+ */
171
+ children: t.node,
172
+ /**
173
+ * Override or extend the styles applied to the component.
174
+ */
175
+ classes: t.object,
176
+ /**
177
+ * @ignore
178
+ */
179
+ className: t.string,
180
+ /**
181
+ * The color of the component.
182
+ * It supports both default and custom theme colors, which can be added as shown in the
183
+ * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
184
+ * You can use the `htmlColor` prop to apply a color attribute to the SVG element.
185
+ * @default 'inherit'
186
+ */
187
+ color: t.oneOfType([t.oneOf(["inherit", "action", "disabled", "primary", "secondary", "error", "info", "success", "warning"]), t.string]),
188
+ /**
189
+ * The component used for the root node.
190
+ * Either a string to use a HTML element or a component.
191
+ */
192
+ component: t.elementType,
193
+ /**
194
+ * The fontSize applied to the icon. Defaults to 24px, but can be configure to inherit font size.
195
+ * @default 'medium'
196
+ */
197
+ fontSize: t.oneOfType([t.oneOf(["inherit", "large", "medium", "small"]), t.string]),
198
+ /**
199
+ * Applies a color attribute to the SVG element.
200
+ */
201
+ htmlColor: t.string,
202
+ /**
203
+ * If `true`, the root node will inherit the custom `component`'s viewBox and the `viewBox`
204
+ * prop will be ignored.
205
+ * Useful when you want to reference a custom `component` and have `SvgIcon` pass that
206
+ * `component`'s viewBox to the root node.
207
+ * @default false
208
+ */
209
+ inheritViewBox: t.bool,
210
+ /**
211
+ * The shape-rendering attribute. The behavior of the different options is described on the
212
+ * [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/shape-rendering).
213
+ * If you are having issues with blurry icons you should investigate this prop.
214
+ */
215
+ shapeRendering: t.string,
216
+ /**
217
+ * The system prop that allows defining system overrides as well as additional CSS styles.
218
+ */
219
+ sx: t.oneOfType([t.arrayOf(t.oneOfType([t.func, t.object, t.bool])), t.func, t.object]),
220
+ /**
221
+ * Provides a human-readable title for the element that contains it.
222
+ * https://www.w3.org/TR/SVG-access/#Equivalent
223
+ */
224
+ titleAccess: t.string,
225
+ /**
226
+ * Allows you to redefine what the coordinates without units mean inside an SVG element.
227
+ * For example, if the SVG element is 500 (width) by 200 (height),
228
+ * and you pass viewBox="0 0 50 20",
229
+ * this means that the coordinates inside the SVG will go from the top left corner (0,0)
230
+ * to bottom right (50,20) and each unit will be worth 10px.
231
+ * @default '0 0 24 24'
232
+ */
233
+ viewBox: t.string
234
+ });
235
+ E.muiName = "SvgIcon";
236
+ function A(e, o) {
237
+ function n(a, i) {
238
+ return /* @__PURE__ */ b(E, f({
239
+ "data-testid": `${o}Icon`,
240
+ ref: i
241
+ }, a, {
242
+ children: e
243
+ }));
244
+ }
245
+ return process.env.NODE_ENV !== "production" && (n.displayName = `${o}Icon`), n.muiName = E.muiName, /* @__PURE__ */ m.memo(/* @__PURE__ */ m.forwardRef(n));
246
+ }
247
+ function ve(e) {
248
+ return U("MuiPagination", e);
249
+ }
250
+ D("MuiPagination", ["root", "ul", "outlined", "text"]);
251
+ const be = ["boundaryCount", "componentName", "count", "defaultPage", "disabled", "hideNextButton", "hidePrevButton", "onChange", "page", "showFirstButton", "showLastButton", "siblingCount"];
252
+ function ye(e = {}) {
253
+ const {
254
+ boundaryCount: o = 1,
255
+ componentName: n = "usePagination",
256
+ count: a = 1,
257
+ defaultPage: i = 1,
258
+ disabled: l = !1,
259
+ hideNextButton: u = !1,
260
+ hidePrevButton: s = !1,
261
+ onChange: g,
262
+ page: c,
263
+ showFirstButton: y = !1,
264
+ showLastButton: x = !1,
265
+ siblingCount: v = 1
266
+ } = e, d = w(e, be), [r, P] = ie({
267
+ controlled: c,
268
+ default: i,
269
+ name: n,
270
+ state: "page"
271
+ }), N = (p, I) => {
272
+ c || P(I), g && g(p, I);
273
+ }, h = (p, I) => {
274
+ const oe = I - p + 1;
275
+ return Array.from({
276
+ length: oe
277
+ }, (Se, te) => p + te);
278
+ }, R = h(1, Math.min(o, a)), C = h(Math.max(a - o + 1, o + 1), a), M = Math.max(
279
+ Math.min(
280
+ // Natural start
281
+ r - v,
282
+ // Lower boundary when page is high
283
+ a - o - v * 2 - 1
284
+ ),
285
+ // Greater than startPages
286
+ o + 2
287
+ ), T = Math.min(
288
+ Math.max(
289
+ // Natural end
290
+ r + v,
291
+ // Upper boundary when page is low
292
+ o + v * 2 + 2
293
+ ),
294
+ // Less than endPages
295
+ C.length > 0 ? C[0] - 2 : a - 1
296
+ ), _ = [
297
+ ...y ? ["first"] : [],
298
+ ...s ? [] : ["previous"],
299
+ ...R,
300
+ // Start ellipsis
301
+ // eslint-disable-next-line no-nested-ternary
302
+ ...M > o + 2 ? ["start-ellipsis"] : o + 1 < a - o ? [o + 1] : [],
303
+ // Sibling pages
304
+ ...h(M, T),
305
+ // End ellipsis
306
+ // eslint-disable-next-line no-nested-ternary
307
+ ...T < a - o - 1 ? ["end-ellipsis"] : a - o > o ? [a - o] : [],
308
+ ...C,
309
+ ...u ? [] : ["next"],
310
+ ...x ? ["last"] : []
311
+ ], k = (p) => {
312
+ switch (p) {
313
+ case "first":
314
+ return 1;
315
+ case "previous":
316
+ return r - 1;
317
+ case "next":
318
+ return r + 1;
319
+ case "last":
320
+ return a;
321
+ default:
322
+ return null;
323
+ }
324
+ }, z = _.map((p) => typeof p == "number" ? {
325
+ onClick: (I) => {
326
+ N(I, p);
327
+ },
328
+ type: "page",
329
+ page: p,
330
+ selected: p === r,
331
+ disabled: l,
332
+ "aria-current": p === r ? "true" : void 0
333
+ } : {
334
+ onClick: (I) => {
335
+ N(I, k(p));
336
+ },
337
+ type: p,
338
+ page: k(p),
339
+ selected: !1,
340
+ disabled: l || p.indexOf("ellipsis") === -1 && (p === "next" || p === "last" ? r >= a : r <= 1)
341
+ });
342
+ return f({
343
+ items: z
344
+ }, d);
345
+ }
346
+ function me(e) {
347
+ return U("MuiPaginationItem", e);
348
+ }
349
+ const $ = D("MuiPaginationItem", ["root", "page", "sizeSmall", "sizeLarge", "text", "textPrimary", "textSecondary", "outlined", "outlinedPrimary", "outlinedSecondary", "rounded", "ellipsis", "firstLast", "previousNext", "focusVisible", "disabled", "selected", "icon", "colorPrimary", "colorSecondary"]), q = A(/* @__PURE__ */ b("path", {
350
+ d: "M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"
351
+ }), "FirstPage"), H = A(/* @__PURE__ */ b("path", {
352
+ d: "M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"
353
+ }), "LastPage"), J = A(/* @__PURE__ */ b("path", {
354
+ d: "M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"
355
+ }), "NavigateBefore"), K = A(/* @__PURE__ */ b("path", {
356
+ d: "M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"
357
+ }), "NavigateNext"), xe = ["className", "color", "component", "components", "disabled", "page", "selected", "shape", "size", "slots", "type", "variant"], Z = (e, o) => {
358
+ const {
359
+ ownerState: n
360
+ } = e;
361
+ return [o.root, o[n.variant], o[`size${O(n.size)}`], n.variant === "text" && o[`text${O(n.color)}`], n.variant === "outlined" && o[`outlined${O(n.color)}`], n.shape === "rounded" && o.rounded, n.type === "page" && o.page, (n.type === "start-ellipsis" || n.type === "end-ellipsis") && o.ellipsis, (n.type === "previous" || n.type === "next") && o.previousNext, (n.type === "first" || n.type === "last") && o.firstLast];
362
+ }, he = (e) => {
363
+ const {
364
+ classes: o,
365
+ color: n,
366
+ disabled: a,
367
+ selected: i,
368
+ size: l,
369
+ shape: u,
370
+ type: s,
371
+ variant: g
372
+ } = e, c = {
373
+ root: ["root", `size${O(l)}`, g, u, n !== "standard" && `color${O(n)}`, n !== "standard" && `${g}${O(n)}`, a && "disabled", i && "selected", {
374
+ page: "page",
375
+ first: "firstLast",
376
+ last: "firstLast",
377
+ "start-ellipsis": "ellipsis",
378
+ "end-ellipsis": "ellipsis",
379
+ previous: "previousNext",
380
+ next: "previousNext"
381
+ }[s]],
382
+ icon: ["icon"]
383
+ };
384
+ return W(c, me, o);
385
+ }, $e = B("div", {
386
+ name: "MuiPaginationItem",
387
+ slot: "Root",
388
+ overridesResolver: Z
389
+ })(({
390
+ theme: e,
391
+ ownerState: o
392
+ }) => f({}, e.typography.body2, {
393
+ borderRadius: 32 / 2,
394
+ textAlign: "center",
395
+ boxSizing: "border-box",
396
+ minWidth: 32,
397
+ padding: "0 6px",
398
+ margin: "0 3px",
399
+ color: (e.vars || e).palette.text.primary,
400
+ height: "auto",
401
+ [`&.${$.disabled}`]: {
402
+ opacity: (e.vars || e).palette.action.disabledOpacity
403
+ }
404
+ }, o.size === "small" && {
405
+ minWidth: 26,
406
+ borderRadius: 26 / 2,
407
+ margin: "0 1px",
408
+ padding: "0 4px"
409
+ }, o.size === "large" && {
410
+ minWidth: 40,
411
+ borderRadius: 40 / 2,
412
+ padding: "0 10px",
413
+ fontSize: e.typography.pxToRem(15)
414
+ })), Ce = B(ae, {
415
+ name: "MuiPaginationItem",
416
+ slot: "Root",
417
+ overridesResolver: Z
418
+ })(({
419
+ theme: e,
420
+ ownerState: o
421
+ }) => f({}, e.typography.body2, {
422
+ borderRadius: 32 / 2,
423
+ textAlign: "center",
424
+ boxSizing: "border-box",
425
+ minWidth: 32,
426
+ height: 32,
427
+ padding: "0 6px",
428
+ margin: "0 3px",
429
+ color: (e.vars || e).palette.text.primary,
430
+ [`&.${$.focusVisible}`]: {
431
+ backgroundColor: (e.vars || e).palette.action.focus
432
+ },
433
+ [`&.${$.disabled}`]: {
434
+ opacity: (e.vars || e).palette.action.disabledOpacity
435
+ },
436
+ transition: e.transitions.create(["color", "background-color"], {
437
+ duration: e.transitions.duration.short
438
+ }),
439
+ "&:hover": {
440
+ backgroundColor: (e.vars || e).palette.action.hover,
441
+ // Reset on touch devices, it doesn't add specificity
442
+ "@media (hover: none)": {
443
+ backgroundColor: "transparent"
444
+ }
445
+ },
446
+ [`&.${$.selected}`]: {
447
+ backgroundColor: (e.vars || e).palette.action.selected,
448
+ "&:hover": {
449
+ backgroundColor: e.vars ? `rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))` : S(e.palette.action.selected, e.palette.action.selectedOpacity + e.palette.action.hoverOpacity),
450
+ // Reset on touch devices, it doesn't add specificity
451
+ "@media (hover: none)": {
452
+ backgroundColor: (e.vars || e).palette.action.selected
453
+ }
454
+ },
455
+ [`&.${$.focusVisible}`]: {
456
+ backgroundColor: e.vars ? `rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))` : S(e.palette.action.selected, e.palette.action.selectedOpacity + e.palette.action.focusOpacity)
457
+ },
458
+ [`&.${$.disabled}`]: {
459
+ opacity: 1,
460
+ color: (e.vars || e).palette.action.disabled,
461
+ backgroundColor: (e.vars || e).palette.action.selected
462
+ }
463
+ }
464
+ }, o.size === "small" && {
465
+ minWidth: 26,
466
+ height: 26,
467
+ borderRadius: 26 / 2,
468
+ margin: "0 1px",
469
+ padding: "0 4px"
470
+ }, o.size === "large" && {
471
+ minWidth: 40,
472
+ height: 40,
473
+ borderRadius: 40 / 2,
474
+ padding: "0 10px",
475
+ fontSize: e.typography.pxToRem(15)
476
+ }, o.shape === "rounded" && {
477
+ borderRadius: (e.vars || e).shape.borderRadius
478
+ }), ({
479
+ theme: e,
480
+ ownerState: o
481
+ }) => f({}, o.variant === "text" && {
482
+ [`&.${$.selected}`]: f({}, o.color !== "standard" && {
483
+ color: (e.vars || e).palette[o.color].contrastText,
484
+ backgroundColor: (e.vars || e).palette[o.color].main,
485
+ "&:hover": {
486
+ backgroundColor: (e.vars || e).palette[o.color].dark,
487
+ // Reset on touch devices, it doesn't add specificity
488
+ "@media (hover: none)": {
489
+ backgroundColor: (e.vars || e).palette[o.color].main
490
+ }
491
+ },
492
+ [`&.${$.focusVisible}`]: {
493
+ backgroundColor: (e.vars || e).palette[o.color].dark
494
+ }
495
+ }, {
496
+ [`&.${$.disabled}`]: {
497
+ color: (e.vars || e).palette.action.disabled
498
+ }
499
+ })
500
+ }, o.variant === "outlined" && {
501
+ border: e.vars ? `1px solid rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)` : `1px solid ${e.palette.mode === "light" ? "rgba(0, 0, 0, 0.23)" : "rgba(255, 255, 255, 0.23)"}`,
502
+ [`&.${$.selected}`]: f({}, o.color !== "standard" && {
503
+ color: (e.vars || e).palette[o.color].main,
504
+ border: `1px solid ${e.vars ? `rgba(${e.vars.palette[o.color].mainChannel} / 0.5)` : S(e.palette[o.color].main, 0.5)}`,
505
+ backgroundColor: e.vars ? `rgba(${e.vars.palette[o.color].mainChannel} / ${e.vars.palette.action.activatedOpacity})` : S(e.palette[o.color].main, e.palette.action.activatedOpacity),
506
+ "&:hover": {
507
+ backgroundColor: e.vars ? `rgba(${e.vars.palette[o.color].mainChannel} / calc(${e.vars.palette.action.activatedOpacity} + ${e.vars.palette.action.focusOpacity}))` : S(e.palette[o.color].main, e.palette.action.activatedOpacity + e.palette.action.focusOpacity),
508
+ // Reset on touch devices, it doesn't add specificity
509
+ "@media (hover: none)": {
510
+ backgroundColor: "transparent"
511
+ }
512
+ },
513
+ [`&.${$.focusVisible}`]: {
514
+ backgroundColor: e.vars ? `rgba(${e.vars.palette[o.color].mainChannel} / calc(${e.vars.palette.action.activatedOpacity} + ${e.vars.palette.action.focusOpacity}))` : S(e.palette[o.color].main, e.palette.action.activatedOpacity + e.palette.action.focusOpacity)
515
+ }
516
+ }, {
517
+ [`&.${$.disabled}`]: {
518
+ borderColor: (e.vars || e).palette.action.disabledBackground,
519
+ color: (e.vars || e).palette.action.disabled
520
+ }
521
+ })
522
+ })), Oe = B("div", {
523
+ name: "MuiPaginationItem",
524
+ slot: "Icon",
525
+ overridesResolver: (e, o) => o.icon
526
+ })(({
527
+ theme: e,
528
+ ownerState: o
529
+ }) => f({
530
+ fontSize: e.typography.pxToRem(20),
531
+ margin: "0 -8px"
532
+ }, o.size === "small" && {
533
+ fontSize: e.typography.pxToRem(18)
534
+ }, o.size === "large" && {
535
+ fontSize: e.typography.pxToRem(22)
536
+ })), G = /* @__PURE__ */ m.forwardRef(function(o, n) {
537
+ const a = F({
538
+ props: o,
539
+ name: "MuiPaginationItem"
540
+ }), {
541
+ className: i,
542
+ color: l = "standard",
543
+ component: u,
544
+ components: s = {},
545
+ disabled: g = !1,
546
+ page: c,
547
+ selected: y = !1,
548
+ shape: x = "circular",
549
+ size: v = "medium",
550
+ slots: d = {},
551
+ type: r = "page",
552
+ variant: P = "text"
553
+ } = a, N = w(a, xe), h = f({}, a, {
554
+ color: l,
555
+ disabled: g,
556
+ selected: y,
557
+ shape: x,
558
+ size: v,
559
+ type: r,
560
+ variant: P
561
+ }), R = de(), C = he(h), T = (R ? {
562
+ previous: d.next || s.next || K,
563
+ next: d.previous || s.previous || J,
564
+ last: d.first || s.first || q,
565
+ first: d.last || s.last || H
566
+ } : {
567
+ previous: d.previous || s.previous || J,
568
+ next: d.next || s.next || K,
569
+ first: d.first || s.first || q,
570
+ last: d.last || s.last || H
571
+ })[r];
572
+ return r === "start-ellipsis" || r === "end-ellipsis" ? /* @__PURE__ */ b($e, {
573
+ ref: n,
574
+ ownerState: h,
575
+ className: V(C.root, i),
576
+ children: "…"
577
+ }) : /* @__PURE__ */ Q(Ce, f({
578
+ ref: n,
579
+ ownerState: h,
580
+ component: u,
581
+ disabled: g,
582
+ className: V(C.root, i)
583
+ }, N, {
584
+ children: [r === "page" && c, T ? /* @__PURE__ */ b(Oe, {
585
+ as: T,
586
+ ownerState: h,
587
+ className: C.icon
588
+ }) : null]
589
+ }));
590
+ });
591
+ process.env.NODE_ENV !== "production" && (G.propTypes = {
592
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
593
+ // │ These PropTypes are generated from the TypeScript type definitions. │
594
+ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
595
+ // └─────────────────────────────────────────────────────────────────────┘
596
+ /**
597
+ * @ignore
598
+ */
599
+ children: t.node,
600
+ /**
601
+ * Override or extend the styles applied to the component.
602
+ */
603
+ classes: t.object,
604
+ /**
605
+ * @ignore
606
+ */
607
+ className: t.string,
608
+ /**
609
+ * The active color.
610
+ * It supports both default and custom theme colors, which can be added as shown in the
611
+ * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
612
+ * @default 'standard'
613
+ */
614
+ color: t.oneOfType([t.oneOf(["primary", "secondary", "standard"]), t.string]),
615
+ /**
616
+ * The component used for the root node.
617
+ * Either a string to use a HTML element or a component.
618
+ */
619
+ component: t.elementType,
620
+ /**
621
+ * The components used for each slot inside.
622
+ *
623
+ * This prop is an alias for the `slots` prop.
624
+ * It's recommended to use the `slots` prop instead.
625
+ *
626
+ * @default {}
627
+ */
628
+ components: t.shape({
629
+ first: t.elementType,
630
+ last: t.elementType,
631
+ next: t.elementType,
632
+ previous: t.elementType
633
+ }),
634
+ /**
635
+ * If `true`, the component is disabled.
636
+ * @default false
637
+ */
638
+ disabled: t.bool,
639
+ /**
640
+ * The current page number.
641
+ */
642
+ page: t.node,
643
+ /**
644
+ * If `true` the pagination item is selected.
645
+ * @default false
646
+ */
647
+ selected: t.bool,
648
+ /**
649
+ * The shape of the pagination item.
650
+ * @default 'circular'
651
+ */
652
+ shape: t.oneOf(["circular", "rounded"]),
653
+ /**
654
+ * The size of the component.
655
+ * @default 'medium'
656
+ */
657
+ size: t.oneOfType([t.oneOf(["small", "medium", "large"]), t.string]),
658
+ /**
659
+ * The components used for each slot inside.
660
+ *
661
+ * This prop is an alias for the `components` prop, which will be deprecated in the future.
662
+ *
663
+ * @default {}
664
+ */
665
+ slots: t.shape({
666
+ first: t.elementType,
667
+ last: t.elementType,
668
+ next: t.elementType,
669
+ previous: t.elementType
670
+ }),
671
+ /**
672
+ * The system prop that allows defining system overrides as well as additional CSS styles.
673
+ */
674
+ sx: t.oneOfType([t.arrayOf(t.oneOfType([t.func, t.object, t.bool])), t.func, t.object]),
675
+ /**
676
+ * The type of pagination item.
677
+ * @default 'page'
678
+ */
679
+ type: t.oneOf(["end-ellipsis", "first", "last", "next", "page", "previous", "start-ellipsis"]),
680
+ /**
681
+ * The variant to use.
682
+ * @default 'text'
683
+ */
684
+ variant: t.oneOfType([t.oneOf(["outlined", "text"]), t.string])
685
+ });
686
+ const Ne = ["boundaryCount", "className", "color", "count", "defaultPage", "disabled", "getItemAriaLabel", "hideNextButton", "hidePrevButton", "onChange", "page", "renderItem", "shape", "showFirstButton", "showLastButton", "siblingCount", "size", "variant"], Pe = (e) => {
687
+ const {
688
+ classes: o,
689
+ variant: n
690
+ } = e;
691
+ return W({
692
+ root: ["root", n],
693
+ ul: ["ul"]
694
+ }, ve, o);
695
+ }, ze = B("nav", {
696
+ name: "MuiPagination",
697
+ slot: "Root",
698
+ overridesResolver: (e, o) => {
699
+ const {
700
+ ownerState: n
701
+ } = e;
702
+ return [o.root, o[n.variant]];
703
+ }
704
+ })({}), Ie = B("ul", {
705
+ name: "MuiPagination",
706
+ slot: "Ul",
707
+ overridesResolver: (e, o) => o.ul
708
+ })({
709
+ display: "flex",
710
+ flexWrap: "wrap",
711
+ alignItems: "center",
712
+ padding: 0,
713
+ margin: 0,
714
+ listStyle: "none"
715
+ });
716
+ function Te(e, o, n) {
717
+ return e === "page" ? `${n ? "" : "Go to "}page ${o}` : `Go to ${e} page`;
718
+ }
719
+ const ee = /* @__PURE__ */ m.forwardRef(function(o, n) {
720
+ const a = F({
721
+ props: o,
722
+ name: "MuiPagination"
723
+ }), {
724
+ boundaryCount: i = 1,
725
+ className: l,
726
+ color: u = "standard",
727
+ count: s = 1,
728
+ defaultPage: g = 1,
729
+ disabled: c = !1,
730
+ getItemAriaLabel: y = Te,
731
+ hideNextButton: x = !1,
732
+ hidePrevButton: v = !1,
733
+ renderItem: d = (z) => /* @__PURE__ */ b(G, f({}, z)),
734
+ shape: r = "circular",
735
+ showFirstButton: P = !1,
736
+ showLastButton: N = !1,
737
+ siblingCount: h = 1,
738
+ size: R = "medium",
739
+ variant: C = "text"
740
+ } = a, M = w(a, Ne), {
741
+ items: T
742
+ } = ye(f({}, a, {
743
+ componentName: "Pagination"
744
+ })), _ = f({}, a, {
745
+ boundaryCount: i,
746
+ color: u,
747
+ count: s,
748
+ defaultPage: g,
749
+ disabled: c,
750
+ getItemAriaLabel: y,
751
+ hideNextButton: x,
752
+ hidePrevButton: v,
753
+ renderItem: d,
754
+ shape: r,
755
+ showFirstButton: P,
756
+ showLastButton: N,
757
+ siblingCount: h,
758
+ size: R,
759
+ variant: C
760
+ }), k = Pe(_);
761
+ return /* @__PURE__ */ b(ze, f({
762
+ "aria-label": "pagination navigation",
763
+ className: V(k.root, l),
764
+ ownerState: _,
765
+ ref: n
766
+ }, M, {
767
+ children: /* @__PURE__ */ b(Ie, {
768
+ className: k.ul,
769
+ ownerState: _,
770
+ children: T.map((z, p) => /* @__PURE__ */ b("li", {
771
+ children: d(f({}, z, {
772
+ color: u,
773
+ "aria-label": y(z.type, z.page, z.selected),
774
+ shape: r,
775
+ size: R,
776
+ variant: C
777
+ }))
778
+ }, p))
779
+ })
780
+ }));
781
+ });
782
+ process.env.NODE_ENV !== "production" && (ee.propTypes = {
783
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
784
+ // │ These PropTypes are generated from the TypeScript type definitions. │
785
+ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
786
+ // └─────────────────────────────────────────────────────────────────────┘
787
+ /**
788
+ * Number of always visible pages at the beginning and end.
789
+ * @default 1
790
+ */
791
+ boundaryCount: L,
792
+ /**
793
+ * Override or extend the styles applied to the component.
794
+ */
795
+ classes: t.object,
796
+ /**
797
+ * @ignore
798
+ */
799
+ className: t.string,
800
+ /**
801
+ * The active color.
802
+ * It supports both default and custom theme colors, which can be added as shown in the
803
+ * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
804
+ * @default 'standard'
805
+ */
806
+ color: t.oneOfType([t.oneOf(["primary", "secondary", "standard"]), t.string]),
807
+ /**
808
+ * The total number of pages.
809
+ * @default 1
810
+ */
811
+ count: L,
812
+ /**
813
+ * The page selected by default when the component is uncontrolled.
814
+ * @default 1
815
+ */
816
+ defaultPage: L,
817
+ /**
818
+ * If `true`, the component is disabled.
819
+ * @default false
820
+ */
821
+ disabled: t.bool,
822
+ /**
823
+ * Accepts a function which returns a string value that provides a user-friendly name for the current page.
824
+ * This is important for screen reader users.
825
+ *
826
+ * For localization purposes, you can use the provided [translations](/material-ui/guides/localization/).
827
+ * @param {string} type The link or button type to format ('page' | 'first' | 'last' | 'next' | 'previous' | 'start-ellipsis' | 'end-ellipsis'). Defaults to 'page'.
828
+ * @param {number} page The page number to format.
829
+ * @param {bool} selected If true, the current page is selected.
830
+ * @returns {string}
831
+ */
832
+ getItemAriaLabel: t.func,
833
+ /**
834
+ * If `true`, hide the next-page button.
835
+ * @default false
836
+ */
837
+ hideNextButton: t.bool,
838
+ /**
839
+ * If `true`, hide the previous-page button.
840
+ * @default false
841
+ */
842
+ hidePrevButton: t.bool,
843
+ /**
844
+ * Callback fired when the page is changed.
845
+ *
846
+ * @param {React.ChangeEvent<unknown>} event The event source of the callback.
847
+ * @param {number} page The page selected.
848
+ */
849
+ onChange: t.func,
850
+ /**
851
+ * The current page. Unlike `TablePagination`, which starts numbering from `0`, this pagination starts from `1`.
852
+ */
853
+ page: L,
854
+ /**
855
+ * Render the item.
856
+ * @param {PaginationRenderItemParams} params The props to spread on a PaginationItem.
857
+ * @returns {ReactNode}
858
+ * @default (item) => <PaginationItem {...item} />
859
+ */
860
+ renderItem: t.func,
861
+ /**
862
+ * The shape of the pagination items.
863
+ * @default 'circular'
864
+ */
865
+ shape: t.oneOf(["circular", "rounded"]),
866
+ /**
867
+ * If `true`, show the first-page button.
868
+ * @default false
869
+ */
870
+ showFirstButton: t.bool,
871
+ /**
872
+ * If `true`, show the last-page button.
873
+ * @default false
874
+ */
875
+ showLastButton: t.bool,
876
+ /**
877
+ * Number of always visible pages before and after the current page.
878
+ * @default 1
879
+ */
880
+ siblingCount: L,
881
+ /**
882
+ * The size of the component.
883
+ * @default 'medium'
884
+ */
885
+ size: t.oneOfType([t.oneOf(["small", "medium", "large"]), t.string]),
886
+ /**
887
+ * The system prop that allows defining system overrides as well as additional CSS styles.
888
+ */
889
+ sx: t.oneOfType([t.arrayOf(t.oneOfType([t.func, t.object, t.bool])), t.func, t.object]),
890
+ /**
891
+ * The variant to use.
892
+ * @default 'text'
893
+ */
894
+ variant: t.oneOfType([t.oneOf(["outlined", "text"]), t.string])
895
+ });
896
+ function Re({
897
+ isRtl: e,
898
+ pageCount: o,
899
+ arrowFirstIcon: n,
900
+ arrowLastIcon: a,
901
+ nextIcon: i,
902
+ previousIcon: l,
903
+ page: u,
904
+ onPageChange: s,
905
+ className: g
906
+ }) {
907
+ return /* @__PURE__ */ b(
908
+ ee,
909
+ {
910
+ showFirstButton: !0,
911
+ showLastButton: !0,
912
+ className: g,
913
+ count: o,
914
+ page: u + 1,
915
+ onChange: (c, y) => {
916
+ s(c, y - 1);
917
+ },
918
+ boundaryCount: 0,
919
+ siblingCount: 1,
920
+ renderItem: (c) => /* @__PURE__ */ b(
921
+ G,
922
+ {
923
+ slots: { previous: e ? i : l, next: e ? l : i, first: e ? a : n, last: e ? n : a },
924
+ ...c
925
+ }
926
+ ),
927
+ sx: {
928
+ "& .MuiPaginationItem-root": {
929
+ fontWeight: "300",
930
+ fontSize: "16px",
931
+ "&.Mui-selected": {
932
+ color: "#12121A",
933
+ fontWeight: "400",
934
+ fontSize: "16px",
935
+ background: "#05A952",
936
+ borderRadius: "8px"
937
+ }
938
+ }
939
+ }
940
+ }
941
+ );
942
+ }
943
+ function Ve({ isRtl: e, pageCount: o, arrowFirstIcon: n, arrowLastIcon: a, nextIcon: i, previousIcon: l }) {
944
+ return /* @__PURE__ */ b(ne, { ActionsComponent: (u) => /* @__PURE__ */ b(Re, { isRtl: e, pageCount: o, arrowFirstIcon: n, arrowLastIcon: a, nextIcon: i, previousIcon: l, ...u }) });
945
+ }
946
+ export {
947
+ Ve as CustomPagination
948
+ };