@hybridcore/ui 1.6.28 → 1.6.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,28 +1,33 @@
1
- import { jsx as e, jsxs as i, Fragment as m } from "react/jsx-runtime";
1
+ import { jsx as e, jsxs as i, Fragment as v } from "react/jsx-runtime";
2
2
  import { Stack as a, Skeleton as l, Tooltip as c } from "@mui/material";
3
- import { MetricChart as w } from "./MetricChart.js";
4
- import { useMetricCardLogic as z } from "./logic.js";
5
- import { MetricCardRoot as f, MetricCardValue as V, MetricCardSecondValue as k, MetricCardTrendContainer as P, MetricCardLabel as v, MetricCardPanel as W, MetricCardDescription as M, MetricCardSideChart as L, MetricCardCornerIconContainer as A, MetricCardIconContainer as y, MetricCardContent as D, MetricCardChartContainer as F } from "./styled.js";
6
- const H = (t) => {
7
- const { state: S } = z(t), {
3
+ import { MetricChart as y } from "./MetricChart.js";
4
+ import { useMetricCardLogic as W } from "./logic.js";
5
+ import { MetricCardRoot as S, MetricCardValue as D, MetricCardSecondValue as F, MetricCardTrendContainer as L, MetricCardLabel as b, MetricCardPanel as A, MetricCardDescription as I, MetricCardSideChart as R, MetricCardCornerIconContainer as q, MetricCardIconContainer as T, MetricCardContent as B, MetricCardChartContainer as E } from "./styled.js";
6
+ const O = (t) => {
7
+ const { state: j } = W(t), {
8
8
  ownerState: n,
9
9
  layout: d,
10
10
  calculatedValue: o,
11
11
  calculatedSecondValue: h,
12
12
  calculatedChange: s,
13
- TrendIcon: b,
13
+ TrendIcon: z,
14
14
  Icon: r,
15
- showCornerIcon: I,
15
+ showCornerIcon: V,
16
16
  showSideIcon: C,
17
17
  iconPosition: x,
18
- snapshotPayload: T
19
- } = S, g = !!t.showChart && !!t.chartType && (t.value ?? []).length >= 2, j = (t.showChange || t.showTrend) && s !== "—";
18
+ snapshotPayload: k,
19
+ hasChart: g,
20
+ chartType: m,
21
+ chartData: w,
22
+ chartColor: f,
23
+ chartFill: u
24
+ } = j, P = (t.showChange || t.showTrend) && s !== "—";
20
25
  if (t.loading)
21
- return /* @__PURE__ */ e(f, { ownerState: n, sx: t.sx, children: /* @__PURE__ */ i(a, { spacing: 1, children: [
26
+ return /* @__PURE__ */ e(S, { ownerState: n, sx: t.sx, children: /* @__PURE__ */ i(a, { spacing: 1, children: [
22
27
  /* @__PURE__ */ e(l, { variant: "text", width: "60%" }),
23
28
  /* @__PURE__ */ e(l, { variant: "rectangular", height: 40, width: "40%" }),
24
29
  /* @__PURE__ */ e(l, { variant: "text", width: "80%" }),
25
- t.showChart && /* @__PURE__ */ e(
30
+ n.showChart && /* @__PURE__ */ e(
26
31
  l,
27
32
  {
28
33
  variant: "rectangular",
@@ -32,7 +37,7 @@ const H = (t) => {
32
37
  }
33
38
  )
34
39
  ] }) });
35
- const u = /* @__PURE__ */ i(
40
+ const M = /* @__PURE__ */ i(
36
41
  a,
37
42
  {
38
43
  direction: "row",
@@ -49,43 +54,43 @@ const H = (t) => {
49
54
  spacing: 0.5,
50
55
  sx: { minWidth: 0 },
51
56
  children: [
52
- /* @__PURE__ */ e(c, { title: o, children: /* @__PURE__ */ e(V, { variant: "h4", ownerState: n, children: o }) }),
53
- h && /* @__PURE__ */ e(c, { title: h, children: /* @__PURE__ */ e(k, { variant: "h5", ownerState: n, children: h }) })
57
+ /* @__PURE__ */ e(c, { title: o, children: /* @__PURE__ */ e(D, { variant: "h4", ownerState: n, children: o }) }),
58
+ h && /* @__PURE__ */ e(c, { title: h, children: /* @__PURE__ */ e(F, { variant: "h5", ownerState: n, children: h }) })
54
59
  ]
55
60
  }
56
61
  ),
57
- j && /* @__PURE__ */ i(P, { ownerState: n, children: [
58
- d === "overlay" && t.showTrend && /* @__PURE__ */ e(b, { size: 16 }),
62
+ P && /* @__PURE__ */ i(L, { ownerState: n, children: [
63
+ d === "overlay" && t.showTrend && /* @__PURE__ */ e(z, { size: 16 }),
59
64
  t.showChange && s
60
65
  ] })
61
66
  ]
62
67
  }
63
68
  );
64
69
  return /* @__PURE__ */ e(
65
- f,
70
+ S,
66
71
  {
67
72
  ownerState: n,
68
73
  sx: t.sx,
69
- "data-snapshot": T,
70
- children: d === "panel" ? /* @__PURE__ */ i(m, { children: [
71
- /* @__PURE__ */ e(c, { title: t.label, children: /* @__PURE__ */ e(v, { variant: "body2", children: t.label }) }),
72
- /* @__PURE__ */ i(W, { children: [
74
+ "data-snapshot": k,
75
+ children: d === "panel" ? /* @__PURE__ */ i(v, { children: [
76
+ /* @__PURE__ */ e(c, { title: t.label, children: /* @__PURE__ */ e(b, { variant: "body2", children: t.label }) }),
77
+ /* @__PURE__ */ i(A, { children: [
73
78
  /* @__PURE__ */ i(a, { justifyContent: "center", spacing: 0.5, sx: { flexShrink: 0 }, children: [
74
- u,
75
- t.description && /* @__PURE__ */ e(c, { title: t.description, children: /* @__PURE__ */ e(M, { variant: "caption", children: t.description }) })
79
+ M,
80
+ t.description && /* @__PURE__ */ e(c, { title: t.description, children: /* @__PURE__ */ e(I, { variant: "caption", children: t.description }) })
76
81
  ] }),
77
- g && /* @__PURE__ */ e(L, { children: /* @__PURE__ */ e(
78
- w,
82
+ g && /* @__PURE__ */ e(R, { children: /* @__PURE__ */ e(
83
+ y,
79
84
  {
80
- type: t.chartType,
81
- data: t.value,
82
- inset: !0,
83
- gradient: !0
85
+ type: m,
86
+ data: w,
87
+ fill: u ?? "gradient",
88
+ color: f
84
89
  }
85
90
  ) })
86
91
  ] })
87
- ] }) : /* @__PURE__ */ i(m, { children: [
88
- I && r && /* @__PURE__ */ e(A, { ownerState: n, children: /* @__PURE__ */ e(r, { size: 24 }) }),
92
+ ] }) : /* @__PURE__ */ i(v, { children: [
93
+ V && r && /* @__PURE__ */ e(q, { ownerState: n, children: /* @__PURE__ */ e(r, { size: 24 }) }),
89
94
  /* @__PURE__ */ i(
90
95
  a,
91
96
  {
@@ -94,12 +99,12 @@ const H = (t) => {
94
99
  alignItems: "flex-start",
95
100
  sx: { flex: 1 },
96
101
  children: [
97
- C && r && x === "left" && /* @__PURE__ */ e(y, { ownerState: n, children: /* @__PURE__ */ e(r, { sx: { fontSize: 24 } }) }),
98
- /* @__PURE__ */ i(D, { children: [
99
- /* @__PURE__ */ e(c, { title: t.label, children: /* @__PURE__ */ e(v, { variant: "body2", children: t.label }) }),
100
- u
102
+ C && r && x === "left" && /* @__PURE__ */ e(T, { ownerState: n, children: /* @__PURE__ */ e(r, { sx: { fontSize: 24 } }) }),
103
+ /* @__PURE__ */ i(B, { children: [
104
+ /* @__PURE__ */ e(c, { title: t.label, children: /* @__PURE__ */ e(b, { variant: "body2", children: t.label }) }),
105
+ M
101
106
  ] }),
102
- C && r && x === "right" && /* @__PURE__ */ e(y, { ownerState: n, children: /* @__PURE__ */ e(r, { sx: { fontSize: 24 } }) })
107
+ C && r && x === "right" && /* @__PURE__ */ e(T, { ownerState: n, children: /* @__PURE__ */ e(r, { sx: { fontSize: 24 } }) })
103
108
  ]
104
109
  }
105
110
  ),
@@ -111,14 +116,22 @@ const H = (t) => {
111
116
  sx: { width: "100%", mt: 2 },
112
117
  children: [
113
118
  t.description && /* @__PURE__ */ e(c, { title: t.description, children: /* @__PURE__ */ e(
114
- M,
119
+ I,
115
120
  {
116
121
  variant: "caption",
117
122
  sx: { textAlign: { xs: "center", sm: "left" } },
118
123
  children: t.description
119
124
  }
120
125
  ) }),
121
- g && /* @__PURE__ */ e(F, { children: /* @__PURE__ */ e(w, { type: t.chartType, data: t.value }) })
126
+ g && /* @__PURE__ */ e(E, { children: /* @__PURE__ */ e(
127
+ y,
128
+ {
129
+ type: m,
130
+ data: w,
131
+ fill: u ?? "solid",
132
+ color: f
133
+ }
134
+ ) })
122
135
  ]
123
136
  }
124
137
  )
@@ -127,5 +140,5 @@ const H = (t) => {
127
140
  );
128
141
  };
129
142
  export {
130
- H as MetricCard
143
+ O as MetricCard
131
144
  };
@@ -1,96 +1,105 @@
1
- import { useThemeProps as K } from "@mui/material";
2
- import { formatValue as D, resolveConditionalStyle as M } from "../charts/_common/format.js";
3
- import { I as Q, a as W, b as X } from "../../IconTrendingUp-CW4SFYmc.js";
4
- const oe = ($) => {
5
- const i = K({ props: $, name: "HCMetricCard" }), {
6
- value: c = [],
7
- secondValue: v = [],
8
- secondValueFormat: k,
9
- variant: O = "default",
10
- layout: C = "overlay",
11
- valuePrefix: Z,
12
- valueSuffix: A,
13
- format: o,
14
- showChange: H = !1,
1
+ import { useThemeProps as _ } from "@mui/material";
2
+ import { formatValue as M, resolveConditionalStyle as $ } from "../charts/_common/format.js";
3
+ import { I as ee, a as oe, b as te } from "../../IconTrendingUp-CW4SFYmc.js";
4
+ const le = (k) => {
5
+ const i = _({ props: k, name: "HCMetricCard" }), {
6
+ value: o = [],
7
+ secondValue: C = [],
8
+ secondValueFormat: O,
9
+ variant: Z = "default",
10
+ layout: v = "overlay",
11
+ valuePrefix: A,
12
+ valueSuffix: H,
13
+ format: t,
14
+ showChange: J = !1,
15
15
  changeType: l = "percentage",
16
- showTrend: J = !1,
16
+ showTrend: L = !1,
17
17
  showIcon: b = !1,
18
18
  icon: u,
19
- iconPosition: d = "right"
20
- } = i, L = c.length > 0, f = c[c.length - 1], S = c[c.length - 2], e = f ? Number(f.v) : NaN, t = S ? Number(S.v) : NaN, w = !isNaN(e) && !isNaN(t), g = {
21
- ...o,
22
- prefix: (o == null ? void 0 : o.prefix) ?? Z,
23
- suffix: (o == null ? void 0 : o.suffix) ?? A
19
+ iconPosition: d = "right",
20
+ showChart: R = !1,
21
+ chartType: w,
22
+ chartColor: U,
23
+ chartFill: j
24
+ } = i, q = o.length > 0, h = o[o.length - 1], y = o[o.length - 2], e = h ? Number(h.v) : NaN, a = y ? Number(y.v) : NaN, S = !isNaN(e) && !isNaN(a), f = {
25
+ ...t,
26
+ prefix: (t == null ? void 0 : t.prefix) ?? A,
27
+ suffix: (t == null ? void 0 : t.suffix) ?? H
24
28
  };
25
- let r = "—", y = "", I, V;
29
+ let r = "—", I = "", V, x;
26
30
  if (!isNaN(e)) {
27
- r = D(e, g), y = f.t;
28
- const a = M(e, g);
29
- I = a.color, V = a.backgroundColor;
31
+ r = M(e, f), I = h.t;
32
+ const c = $(e, f);
33
+ V = c.color, x = c.backgroundColor;
30
34
  }
31
- const x = k ?? g;
32
- let p, T, B;
33
- const F = v[v.length - 1], h = F ? Number(F.v) : NaN;
34
- if (!isNaN(h)) {
35
- p = D(h, x);
36
- const a = M(h, x);
37
- T = a.color, B = a.backgroundColor;
35
+ const T = O ?? f;
36
+ let g, B, F;
37
+ const D = C[C.length - 1], p = D ? Number(D.v) : NaN;
38
+ if (!isNaN(p)) {
39
+ g = M(p, T);
40
+ const c = $(p, T);
41
+ B = c.color, F = c.backgroundColor;
38
42
  }
39
43
  let s;
40
- if (H)
41
- if (w && !(t === 0 && l === "percentage")) {
42
- const m = l === "absolute" ? e - t : (e - t) / t * 100, z = m > 0 ? "+" : m < 0 ? "−" : "", E = l === "percentage" ? 1 : 2, G = l === "percentage" ? "%" : "";
43
- s = `${z}${Math.abs(m).toFixed(E)}${G}`;
44
+ if (J)
45
+ if (S && !(a === 0 && l === "percentage")) {
46
+ const m = l === "absolute" ? e - a : (e - a) / a * 100, W = m > 0 ? "+" : m < 0 ? "−" : "", X = l === "percentage" ? 1 : 2, Y = l === "percentage" ? "%" : "";
47
+ s = `${W}${Math.abs(m).toFixed(X)}${Y}`;
44
48
  } else
45
49
  s = "—";
46
50
  let n;
47
- J && w && (e > t ? n = "up" : e < t ? n = "down" : n = "neutral");
48
- let N = Q;
49
- n === "up" ? N = W : n === "down" && (N = X);
51
+ L && S && (e > a ? n = "up" : e < a ? n = "down" : n = "neutral");
52
+ let N = ee;
53
+ n === "up" ? N = oe : n === "down" && (N = te);
50
54
  const P = [
51
55
  "top-left",
52
56
  "top-right",
53
57
  "bottom-left",
54
58
  "bottom-right"
55
- ].includes(d), R = b && !!u && P, U = b && !!u && !P, j = JSON.stringify({
59
+ ].includes(d), z = b && !!u && P, E = b && !!u && !P, G = JSON.stringify({
56
60
  metric: i.label,
57
61
  value: r,
58
62
  change: s,
59
- asOf: y
60
- }), q = {
63
+ asOf: I
64
+ }), K = {
61
65
  ...i,
62
- variant: O,
63
- layout: C,
66
+ variant: Z,
67
+ layout: v,
64
68
  changeType: l,
65
69
  iconPosition: d,
66
70
  calculatedValue: r,
67
- calculatedSecondValue: p,
68
- calculatedSecondValueColor: T,
69
- calculatedSecondValueBg: B,
71
+ calculatedSecondValue: g,
72
+ calculatedSecondValueColor: B,
73
+ calculatedSecondValueBg: F,
70
74
  calculatedChange: s,
71
75
  calculatedTrend: n,
72
- calculatedValueColor: I,
73
- calculatedValueBg: V,
74
- hasData: L
75
- };
76
+ calculatedValueColor: V,
77
+ calculatedValueBg: x,
78
+ hasData: q
79
+ }, Q = !!R && !!w && o.length >= 2;
76
80
  return {
77
81
  refs: {},
78
82
  state: {
79
- ownerState: q,
80
- layout: C,
83
+ ownerState: K,
84
+ layout: v,
85
+ hasChart: Q,
86
+ chartType: w,
87
+ chartData: o,
88
+ chartColor: U,
89
+ chartFill: j,
81
90
  calculatedValue: r,
82
- calculatedSecondValue: p,
91
+ calculatedSecondValue: g,
83
92
  calculatedChange: s,
84
93
  TrendIcon: N,
85
94
  Icon: u,
86
- showCornerIcon: R,
87
- showSideIcon: U,
95
+ showCornerIcon: z,
96
+ showSideIcon: E,
88
97
  iconPosition: d,
89
- snapshotPayload: j
98
+ snapshotPayload: G
90
99
  },
91
100
  actions: {}
92
101
  };
93
102
  };
94
103
  export {
95
- oe as useMetricCardLogic
104
+ le as useMetricCardLogic
96
105
  };
@@ -3,7 +3,7 @@ import { Widget as f } from "../widget/styled.js";
3
3
  import { variantColor as s, resolvePaletteColor as d, trendColor as u } from "./helpers.js";
4
4
  const e = {
5
5
  shouldForwardProp: (o) => o !== "ownerState"
6
- }, M = t(f.Root, {
6
+ }, w = t(f.Root, {
7
7
  name: "HCMetricCard",
8
8
  slot: "Root",
9
9
  ...e
@@ -19,7 +19,7 @@ const e = {
19
19
  padding: o.spacing(1.5)
20
20
  }
21
21
  };
22
- }), w = t(C, {
22
+ }), M = t(C, {
23
23
  name: "HCMetricCard",
24
24
  slot: "Content"
25
25
  })(() => ({
@@ -86,7 +86,7 @@ const e = {
86
86
  [o.breakpoints.down("md")]: { fontSize: "0.95rem" },
87
87
  [o.breakpoints.up("md")]: { fontSize: "1.25rem" }
88
88
  };
89
- }), S = t("div", {
89
+ }), h = t("div", {
90
90
  name: "HCMetricCard",
91
91
  slot: "TrendContainer",
92
92
  ...e
@@ -112,7 +112,7 @@ const e = {
112
112
  }
113
113
  }
114
114
  };
115
- }), h = t(l, {
115
+ }), S = t(l, {
116
116
  name: "HCMetricCard",
117
117
  slot: "Description"
118
118
  })(({ theme: o }) => ({
@@ -194,19 +194,23 @@ const e = {
194
194
  minWidth: 0,
195
195
  alignSelf: "stretch",
196
196
  display: "flex",
197
- alignItems: "flex-end"
197
+ alignItems: "flex-end",
198
+ // `MetricChart` is drawn wider and taller than its box so amCharts' axis gutters (and
199
+ // its watermark) fall outside — this is what clips them, and what keeps the overhang
200
+ // from reaching the value column beside it.
201
+ overflow: "hidden"
198
202
  }));
199
203
  export {
200
204
  I as MetricCardChartContainer,
201
- w as MetricCardContent,
205
+ M as MetricCardContent,
202
206
  H as MetricCardCornerIconContainer,
203
- h as MetricCardDescription,
207
+ S as MetricCardDescription,
204
208
  k as MetricCardIconContainer,
205
209
  m as MetricCardLabel,
206
210
  R as MetricCardPanel,
207
- M as MetricCardRoot,
211
+ w as MetricCardRoot,
208
212
  W as MetricCardSecondValue,
209
213
  z as MetricCardSideChart,
210
- S as MetricCardTrendContainer,
214
+ h as MetricCardTrendContainer,
211
215
  y as MetricCardValue
212
216
  };
@@ -0,0 +1,8 @@
1
+ const r = (i, o) => {
2
+ if (!i) return;
3
+ const n = i.filter((t) => t != null && `${t}`.trim() !== "").map((t) => `${t}`.trim());
4
+ return n.length ? n.join(` ${o} `) : void 0;
5
+ };
6
+ export {
7
+ r as joinMeta
8
+ };
@@ -1,73 +1,156 @@
1
- import { jsxs as a, Fragment as T, jsx as n } from "react/jsx-runtime";
2
- import { Typography as l, Divider as h, Box as k, ListItem as I, Checkbox as w, ListItemIcon as O, ListItemText as R, TablePagination as b } from "@mui/material";
3
- import S from "lodash";
4
- import { usePaginatedListLogic as _ } from "./logic.js";
5
- import { PaginatedListRoot as E, PaginatedListHeader as D, PaginatedListContent as j, PaginatedListList as A, PaginatedListPagination as F } from "./styled.js";
6
- const N = [5, 10, 25, 50], U = (g) => {
1
+ import { jsxs as n, Fragment as g, jsx as e } from "react/jsx-runtime";
2
+ import { Typography as I, Divider as k, Checkbox as R, CircularProgress as H, TablePagination as T, Box as W, ListItem as B, ListItemIcon as J, ListItemText as q } from "@mui/material";
3
+ import K from "lodash";
4
+ import { joinMeta as Q } from "./helpers.js";
5
+ import { usePaginatedListLogic as X } from "./logic.js";
6
+ import { PaginatedListRoot as Y, PaginatedListHeader as Z, PaginatedListViewAll as $, PaginatedListContent as ee, PaginatedListCardRail as ie, PaginatedListCard as ne, PaginatedListCardHeader as ae, PaginatedListCardIcon as te, PaginatedListCardTitle as re, PaginatedListCardDescription as oe, PaginatedListCardFooter as de, PaginatedListCardMeta as se, PaginatedListCardAction as ce, PaginatedListLoadMore as le, PaginatedListPagination as M, PaginatedListList as he } from "./styled.js";
7
+ import { c as ge } from "../../createReactComponent-C7L-DMHj.js";
8
+ /**
9
+ * @license @tabler/icons-react v3.44.0 - MIT
10
+ *
11
+ * This source code is licensed under the MIT license.
12
+ * See the LICENSE file in the root directory of this source tree.
13
+ */
14
+ const pe = [["path", { d: "M17 7l-10 10", key: "svg-0" }], ["path", { d: "M8 7l9 0l0 9", key: "svg-1" }]], O = ge("outline", "arrow-up-right", "ArrowUpRight", pe), A = [5, 10, 25, 50], xe = (_) => {
7
15
  const {
8
- title: t,
9
- displayData: r,
10
- count: p,
11
- page: P,
16
+ title: c,
17
+ variant: b,
18
+ itemIcon: S,
19
+ metaSeparator: z,
20
+ cardsLayout: D,
21
+ isInfinite: p,
22
+ hasMore: E,
23
+ isLoadingMore: j,
24
+ refs: F,
25
+ onViewAll: P,
26
+ displayData: l,
27
+ count: C,
28
+ page: L,
12
29
  rowsPerPage: m,
13
- expanded: d,
14
- selectionMode: o,
15
- selected: y,
16
- handleChangePage: L,
17
- handleChangeRowsPerPage: u,
18
- handleItemClick: x,
19
- handleExpandToggle: C,
20
- onItemClick: s,
21
- ownerState: i,
22
- sx: v,
23
- other: f
24
- } = _(g);
25
- return /* @__PURE__ */ a(
26
- E,
30
+ expanded: u,
31
+ selectionMode: t,
32
+ selected: v,
33
+ handleChangePage: f,
34
+ handleChangeRowsPerPage: x,
35
+ handleItemClick: y,
36
+ handleExpandToggle: N,
37
+ onItemClick: U,
38
+ ownerState: a,
39
+ sx: V,
40
+ other: G
41
+ } = X(_), h = S, r = b === "cards", o = r && D === "grid", d = t || !!U;
42
+ return /* @__PURE__ */ n(
43
+ Y,
27
44
  {
28
- ownerState: i,
29
- sx: v,
45
+ ownerState: a,
46
+ sx: V,
30
47
  elevation: 0,
31
48
  "data-snapshot": JSON.stringify({
32
- title: t,
33
- data: r
49
+ title: c,
50
+ data: l
34
51
  }),
35
- ...f,
52
+ ...G,
36
53
  children: [
37
- t && /* @__PURE__ */ a(T, { children: [
38
- /* @__PURE__ */ n(D, { ownerState: i, children: /* @__PURE__ */ n(l, { variant: "h3", children: t }) }),
39
- /* @__PURE__ */ n(h, {})
54
+ c && /* @__PURE__ */ n(g, { children: [
55
+ /* @__PURE__ */ n(Z, { ownerState: a, children: [
56
+ /* @__PURE__ */ e(I, { variant: "h3", children: c }),
57
+ r && !o && P && /* @__PURE__ */ e(
58
+ $,
59
+ {
60
+ size: "small",
61
+ endIcon: /* @__PURE__ */ e(O, { size: 16 }),
62
+ onClick: P,
63
+ children: "View all"
64
+ }
65
+ )
66
+ ] }),
67
+ !r && /* @__PURE__ */ e(k, {})
40
68
  ] }),
41
- /* @__PURE__ */ a(j, { ownerState: i, children: [
42
- /* @__PURE__ */ n(A, { disablePadding: !0, ownerState: i, children: r.map((e, c) => /* @__PURE__ */ a(k, { children: [
43
- c !== 0 && /* @__PURE__ */ n(h, { component: "li" }),
44
- /* @__PURE__ */ a(
45
- I,
69
+ /* @__PURE__ */ e(ee, { ownerState: a, children: r ? /* @__PURE__ */ n(g, { children: [
70
+ /* @__PURE__ */ n(ie, { grid: o, children: [
71
+ l.map((i, s) => {
72
+ const w = Q(i.meta, z);
73
+ return /* @__PURE__ */ n(
74
+ ne,
75
+ {
76
+ onClick: y(i),
77
+ sx: {
78
+ cursor: d ? "pointer" : "default",
79
+ ...o && { flex: "1 1 280px", maxWidth: 360 }
80
+ },
81
+ children: [
82
+ /* @__PURE__ */ n(ae, { children: [
83
+ t ? /* @__PURE__ */ e(
84
+ R,
85
+ {
86
+ size: "small",
87
+ sx: { p: 0 },
88
+ checked: v.indexOf(i.id) !== -1
89
+ }
90
+ ) : (i.icon || h) && /* @__PURE__ */ e(te, { children: i.icon ?? (h ? /* @__PURE__ */ e(h, {}) : null) }),
91
+ /* @__PURE__ */ e(re, { variant: "h4", title: i.title, children: i.title })
92
+ ] }),
93
+ /* @__PURE__ */ e(
94
+ oe,
95
+ {
96
+ variant: "body2",
97
+ title: i.description,
98
+ children: i.description
99
+ }
100
+ ),
101
+ /* @__PURE__ */ n(de, { children: [
102
+ /* @__PURE__ */ e(se, { variant: "caption", title: w, children: w }),
103
+ d && /* @__PURE__ */ e(ce, { children: /* @__PURE__ */ e(O, { size: 18 }) })
104
+ ] })
105
+ ]
106
+ },
107
+ i.id || s
108
+ );
109
+ }),
110
+ p && E && /* @__PURE__ */ e(le, { ref: F.sentinelRef, children: j && /* @__PURE__ */ e(H, { size: 18 }) })
111
+ ] }),
112
+ o && !p && /* @__PURE__ */ e(M, { ownerState: a, children: /* @__PURE__ */ e(
113
+ T,
114
+ {
115
+ component: "div",
116
+ count: C,
117
+ page: L,
118
+ rowsPerPage: m,
119
+ rowsPerPageOptions: A,
120
+ onPageChange: f,
121
+ onRowsPerPageChange: x
122
+ }
123
+ ) })
124
+ ] }) : /* @__PURE__ */ n(g, { children: [
125
+ /* @__PURE__ */ e(he, { disablePadding: !0, ownerState: a, children: l.map((i, s) => /* @__PURE__ */ n(W, { children: [
126
+ s !== 0 && /* @__PURE__ */ e(k, { component: "li" }),
127
+ /* @__PURE__ */ n(
128
+ B,
46
129
  {
47
- onClick: x(e),
130
+ onClick: y(i),
48
131
  sx: {
49
- cursor: o || s ? "pointer" : "default",
50
- "&:hover": o || s ? { backgroundColor: "action.hover" } : void 0,
51
- pl: o ? 0 : 2
132
+ cursor: d ? "pointer" : "default",
133
+ "&:hover": d ? { backgroundColor: "action.hover" } : void 0,
134
+ pl: t ? 0 : 2
52
135
  },
53
136
  children: [
54
- o && /* @__PURE__ */ n(w, { checked: y.indexOf(e.id) !== -1 }),
55
- !o && e.icon && /* @__PURE__ */ n(O, { children: e.icon }),
56
- /* @__PURE__ */ n(
57
- R,
137
+ t && /* @__PURE__ */ e(R, { checked: v.indexOf(i.id) !== -1 }),
138
+ !t && i.icon && /* @__PURE__ */ e(J, { children: i.icon }),
139
+ /* @__PURE__ */ e(
140
+ q,
58
141
  {
59
- primary: e.title,
142
+ primary: i.title,
60
143
  primaryTypographyProps: { variant: "h4" },
61
144
  secondaryTypographyProps: { component: "div" },
62
- secondary: /* @__PURE__ */ n(
63
- l,
145
+ secondary: /* @__PURE__ */ e(
146
+ I,
64
147
  {
65
148
  variant: "body2",
66
149
  mt: 1,
67
150
  sx: { cursor: "pointer" },
68
- title: d.includes(e.id) ? "Show less" : "Read more",
69
- onClick: C(e),
70
- children: d.includes(e.id) ? e.description : S.truncate(e.description, { length: 100 })
151
+ title: u.includes(i.id) ? "Show less" : "Read more",
152
+ onClick: N(i),
153
+ children: u.includes(i.id) ? i.description : K.truncate(i.description, { length: 100 })
71
154
  }
72
155
  )
73
156
  }
@@ -75,24 +158,24 @@ const N = [5, 10, 25, 50], U = (g) => {
75
158
  ]
76
159
  }
77
160
  )
78
- ] }, e.id || c)) }),
79
- /* @__PURE__ */ n(F, { ownerState: i, children: /* @__PURE__ */ n(
80
- b,
161
+ ] }, i.id || s)) }),
162
+ /* @__PURE__ */ e(M, { ownerState: a, children: /* @__PURE__ */ e(
163
+ T,
81
164
  {
82
165
  component: "div",
83
- count: p,
84
- page: P,
166
+ count: C,
167
+ page: L,
85
168
  rowsPerPage: m,
86
- rowsPerPageOptions: N,
87
- onPageChange: L,
88
- onRowsPerPageChange: u
169
+ rowsPerPageOptions: A,
170
+ onPageChange: f,
171
+ onRowsPerPageChange: x
89
172
  }
90
173
  ) })
91
- ] })
174
+ ] }) })
92
175
  ]
93
176
  }
94
177
  );
95
178
  };
96
179
  export {
97
- U as PaginatedList
180
+ xe as PaginatedList
98
181
  };