@hybridcore/ui 1.6.5 → 1.6.7

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 (34) hide show
  1. package/dist/IconX-C2wmVYSK.js +11 -0
  2. package/dist/components/charts/_common/format.js +55 -0
  3. package/dist/components/charts/_common/utils.js +12 -7
  4. package/dist/components/charts/chart-wrapper/helpers.js +46 -21
  5. package/dist/components/charts/chart-wrapper/logic.js +57 -40
  6. package/dist/components/charts/column-line-mix/logic.js +87 -86
  7. package/dist/components/charts/donut-chart/logic.js +37 -36
  8. package/dist/components/charts/drill-down-treemap/logic.js +123 -123
  9. package/dist/components/charts/drill-down-voronoi-treemap/logic.js +253 -252
  10. package/dist/components/charts/heatmap/logic.js +73 -73
  11. package/dist/components/charts/line/logic.js +201 -103
  12. package/dist/components/charts/logaritmic-scale/logic.js +65 -65
  13. package/dist/components/charts/multiple-value-axes/logic.js +96 -94
  14. package/dist/components/charts/nested-pie/logic.js +43 -42
  15. package/dist/components/charts/packed-circles/logic.js +111 -110
  16. package/dist/components/charts/pie-chart/logic.js +40 -39
  17. package/dist/components/charts/stacked-area-radar/logic.js +68 -67
  18. package/dist/components/charts/stacked-column-chart/logic.js +71 -70
  19. package/dist/components/charts/xy-chart/logic.js +82 -76
  20. package/dist/components/color-picker/index.js +1645 -1602
  21. package/dist/components/color-picker/logic.js +21 -12
  22. package/dist/components/color-picker/styled.js +4 -2
  23. package/dist/components/date-range-picker/index.js +359 -365
  24. package/dist/components/metric-card/helpers.js +12 -5
  25. package/dist/components/metric-card/index.js +58 -54
  26. package/dist/components/metric-card/logic.js +78 -61
  27. package/dist/components/metric-card/styled.js +63 -45
  28. package/dist/components/simple-pivot-table/index.js +129 -54
  29. package/dist/components/simple-pivot-table/logic.js +111 -45
  30. package/dist/components/simple-pivot-table/styled.js +31 -11
  31. package/dist/main.d.ts +125 -8
  32. package/dist/main.js +145 -141
  33. package/dist/{styled-Db1RdcPA.js → styled-SoqbyrkW.js} +116 -89
  34. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
- const e = (r, a = "default") => {
2
- switch (a) {
1
+ const n = (r, t = "default") => {
2
+ switch (t) {
3
3
  case "primary":
4
4
  return r.palette.primary.main;
5
5
  case "success":
@@ -11,8 +11,15 @@ const e = (r, a = "default") => {
11
11
  default:
12
12
  return;
13
13
  }
14
- }, t = (r, a) => a === "up" ? r.palette.success.main : a === "down" ? r.palette.error.main : r.palette.text.secondary;
14
+ }, o = (r, t) => {
15
+ if (!t) return;
16
+ let e = r.palette;
17
+ for (const a of t.split("."))
18
+ e = e && typeof e == "object" ? e[a] : void 0;
19
+ return typeof e == "string" ? e : t;
20
+ }, s = (r, t) => t === "up" ? r.palette.success.main : t === "down" ? r.palette.error.main : r.palette.text.secondary;
15
21
  export {
16
- t as trendColor,
17
- e as variantColor
22
+ o as resolvePaletteColor,
23
+ s as trendColor,
24
+ n as variantColor
18
25
  };
@@ -1,27 +1,28 @@
1
- import { jsx as t, jsxs as n, Fragment as x } from "react/jsx-runtime";
2
- import { Stack as a, Skeleton as c } from "@mui/material";
3
- import { MetricChart as g } from "./MetricChart.js";
4
- import { useMetricCardLogic as b } from "./logic.js";
5
- import { MetricCardRoot as u, MetricCardValue as j, MetricCardTrendContainer as z, MetricCardLabel as m, MetricCardPanel as k, MetricCardDescription as w, MetricCardSideChart as P, MetricCardCornerIconContainer as L, MetricCardIconContainer as f, MetricCardContent as V, MetricCardChartContainer as A } from "./styled.js";
6
- const B = (e) => {
7
- const { state: v } = b(e), {
1
+ import { jsx as e, jsxs as n, Fragment as u } from "react/jsx-runtime";
2
+ import { Stack as r, Skeleton as c } from "@mui/material";
3
+ import { MetricChart as x } from "./MetricChart.js";
4
+ import { useMetricCardLogic as j } from "./logic.js";
5
+ import { MetricCardRoot as m, MetricCardValue as z, MetricCardSecondValue as V, MetricCardTrendContainer as k, MetricCardLabel as w, MetricCardPanel as P, MetricCardDescription as f, MetricCardSideChart as L, MetricCardCornerIconContainer as A, MetricCardIconContainer as v, MetricCardContent as D, MetricCardChartContainer as F } from "./styled.js";
6
+ const G = (t) => {
7
+ const { state: M } = j(t), {
8
8
  ownerState: i,
9
9
  layout: d,
10
- calculatedValue: M,
10
+ calculatedValue: y,
11
+ calculatedSecondValue: l,
11
12
  calculatedChange: h,
12
- TrendIcon: y,
13
- Icon: r,
13
+ TrendIcon: S,
14
+ Icon: a,
14
15
  showCornerIcon: I,
15
- showSideIcon: l,
16
- iconPosition: o,
17
- snapshotPayload: S
18
- } = v, s = !!e.showChart && !!e.chartType && (e.value ?? []).length >= 2, T = (e.showChange || e.showTrend) && h !== "—";
19
- if (e.loading)
20
- return /* @__PURE__ */ t(u, { ownerState: i, sx: e.sx, children: /* @__PURE__ */ n(a, { spacing: 1, children: [
21
- /* @__PURE__ */ t(c, { variant: "text", width: "60%" }),
22
- /* @__PURE__ */ t(c, { variant: "rectangular", height: 40, width: "40%" }),
23
- /* @__PURE__ */ t(c, { variant: "text", width: "80%" }),
24
- e.showChart && /* @__PURE__ */ t(
16
+ showSideIcon: o,
17
+ iconPosition: s,
18
+ snapshotPayload: b
19
+ } = M, C = !!t.showChart && !!t.chartType && (t.value ?? []).length >= 2, T = (t.showChange || t.showTrend) && h !== "—";
20
+ if (t.loading)
21
+ return /* @__PURE__ */ e(m, { ownerState: i, sx: t.sx, children: /* @__PURE__ */ n(r, { spacing: 1, children: [
22
+ /* @__PURE__ */ e(c, { variant: "text", width: "60%" }),
23
+ /* @__PURE__ */ e(c, { variant: "rectangular", height: 40, width: "40%" }),
24
+ /* @__PURE__ */ e(c, { variant: "text", width: "80%" }),
25
+ t.showChart && /* @__PURE__ */ e(
25
26
  c,
26
27
  {
27
28
  variant: "rectangular",
@@ -31,80 +32,83 @@ const B = (e) => {
31
32
  }
32
33
  )
33
34
  ] }) });
34
- const C = /* @__PURE__ */ n(
35
- a,
35
+ const g = /* @__PURE__ */ n(
36
+ r,
36
37
  {
37
38
  direction: "row",
38
39
  alignItems: "center",
39
40
  spacing: 1,
40
41
  flexWrap: d === "panel" ? "nowrap" : "wrap",
41
42
  children: [
42
- /* @__PURE__ */ t(j, { variant: "h4", ownerState: i, children: M }),
43
- T && /* @__PURE__ */ n(z, { ownerState: i, children: [
44
- d === "overlay" && e.showTrend && /* @__PURE__ */ t(y, { size: 16 }),
45
- e.showChange && h
43
+ /* @__PURE__ */ n(r, { direction: "row", alignItems: "baseline", spacing: 0.5, children: [
44
+ /* @__PURE__ */ e(z, { variant: "h4", ownerState: i, children: y }),
45
+ l && /* @__PURE__ */ e(V, { variant: "h5", children: l })
46
+ ] }),
47
+ T && /* @__PURE__ */ n(k, { ownerState: i, children: [
48
+ d === "overlay" && t.showTrend && /* @__PURE__ */ e(S, { size: 16 }),
49
+ t.showChange && h
46
50
  ] })
47
51
  ]
48
52
  }
49
53
  );
50
- return /* @__PURE__ */ t(
51
- u,
54
+ return /* @__PURE__ */ e(
55
+ m,
52
56
  {
53
57
  ownerState: i,
54
- sx: e.sx,
55
- "data-snapshot": S,
56
- children: d === "panel" ? /* @__PURE__ */ n(x, { children: [
57
- /* @__PURE__ */ t(m, { variant: "body2", children: e.label }),
58
- /* @__PURE__ */ n(k, { children: [
59
- /* @__PURE__ */ n(a, { justifyContent: "center", spacing: 0.5, sx: { flexShrink: 0 }, children: [
60
- C,
61
- e.description && /* @__PURE__ */ t(w, { variant: "caption", children: e.description })
62
- ] }),
63
- s && /* @__PURE__ */ t(P, { children: /* @__PURE__ */ t(
58
+ sx: t.sx,
59
+ "data-snapshot": b,
60
+ children: d === "panel" ? /* @__PURE__ */ n(u, { children: [
61
+ /* @__PURE__ */ e(w, { variant: "body2", children: t.label }),
62
+ /* @__PURE__ */ n(P, { children: [
63
+ /* @__PURE__ */ n(r, { justifyContent: "center", spacing: 0.5, sx: { flexShrink: 0 }, children: [
64
64
  g,
65
+ t.description && /* @__PURE__ */ e(f, { variant: "caption", children: t.description })
66
+ ] }),
67
+ C && /* @__PURE__ */ e(L, { children: /* @__PURE__ */ e(
68
+ x,
65
69
  {
66
- type: e.chartType,
67
- data: e.value,
70
+ type: t.chartType,
71
+ data: t.value,
68
72
  inset: !0,
69
73
  gradient: !0
70
74
  }
71
75
  ) })
72
76
  ] })
73
- ] }) : /* @__PURE__ */ n(x, { children: [
74
- I && r && /* @__PURE__ */ t(L, { ownerState: i, children: /* @__PURE__ */ t(r, { size: 24 }) }),
77
+ ] }) : /* @__PURE__ */ n(u, { children: [
78
+ I && a && /* @__PURE__ */ e(A, { ownerState: i, children: /* @__PURE__ */ e(a, { size: 24 }) }),
75
79
  /* @__PURE__ */ n(
76
- a,
80
+ r,
77
81
  {
78
82
  direction: "row",
79
83
  justifyContent: "space-between",
80
84
  alignItems: "flex-start",
81
85
  sx: { flex: 1 },
82
86
  children: [
83
- l && r && o === "left" && /* @__PURE__ */ t(f, { ownerState: i, children: /* @__PURE__ */ t(r, { sx: { fontSize: 24 } }) }),
84
- /* @__PURE__ */ n(V, { children: [
85
- /* @__PURE__ */ t(m, { variant: "body2", children: e.label }),
86
- C
87
+ o && a && s === "left" && /* @__PURE__ */ e(v, { ownerState: i, children: /* @__PURE__ */ e(a, { sx: { fontSize: 24 } }) }),
88
+ /* @__PURE__ */ n(D, { children: [
89
+ /* @__PURE__ */ e(w, { variant: "body2", children: t.label }),
90
+ g
87
91
  ] }),
88
- l && r && o === "right" && /* @__PURE__ */ t(f, { ownerState: i, children: /* @__PURE__ */ t(r, { sx: { fontSize: 24 } }) })
92
+ o && a && s === "right" && /* @__PURE__ */ e(v, { ownerState: i, children: /* @__PURE__ */ e(a, { sx: { fontSize: 24 } }) })
89
93
  ]
90
94
  }
91
95
  ),
92
96
  /* @__PURE__ */ n(
93
- a,
97
+ r,
94
98
  {
95
99
  direction: { xs: "column-reverse", sm: "column" },
96
100
  spacing: 1,
97
101
  sx: { width: "100%", mt: 2 },
98
102
  children: [
99
- e.description && /* @__PURE__ */ t(
100
- w,
103
+ t.description && /* @__PURE__ */ e(
104
+ f,
101
105
  {
102
106
  variant: "caption",
103
107
  sx: { textAlign: { xs: "center", sm: "left" } },
104
- children: e.description
108
+ children: t.description
105
109
  }
106
110
  ),
107
- s && /* @__PURE__ */ t(A, { children: /* @__PURE__ */ t(g, { type: e.chartType, data: e.value }) })
111
+ C && /* @__PURE__ */ e(F, { children: /* @__PURE__ */ e(x, { type: t.chartType, data: t.value }) })
108
112
  ]
109
113
  }
110
114
  )
@@ -113,5 +117,5 @@ const B = (e) => {
113
117
  );
114
118
  };
115
119
  export {
116
- B as MetricCard
120
+ G as MetricCard
117
121
  };
@@ -1,95 +1,112 @@
1
- import { useThemeProps as U } from "@mui/material";
2
- import { c as p } from "../../createReactComponent-C7L-DMHj.js";
1
+ import { useThemeProps as q } from "@mui/material";
2
+ import { formatValue as V, resolveConditionalStyle as z } from "../charts/_common/format.js";
3
+ import { c as N } from "../../createReactComponent-C7L-DMHj.js";
3
4
  /**
4
5
  * @license @tabler/icons-react v3.44.0 - MIT
5
6
  *
6
7
  * This source code is licensed under the MIT license.
7
8
  * See the LICENSE file in the root directory of this source tree.
8
9
  */
9
- const A = [["path", { d: "M5 12l14 0", key: "svg-0" }], ["path", { d: "M13 18l6 -6", key: "svg-1" }], ["path", { d: "M13 6l6 6", key: "svg-2" }]], B = p("outline", "arrow-right", "ArrowRight", A);
10
+ const E = [["path", { d: "M5 12l14 0", key: "svg-0" }], ["path", { d: "M13 18l6 -6", key: "svg-1" }], ["path", { d: "M13 6l6 6", key: "svg-2" }]], G = N("outline", "arrow-right", "ArrowRight", E);
10
11
  /**
11
12
  * @license @tabler/icons-react v3.44.0 - MIT
12
13
  *
13
14
  * This source code is licensed under the MIT license.
14
15
  * See the LICENSE file in the root directory of this source tree.
15
16
  */
16
- const O = [["path", { d: "M3 7l6 6l4 -4l8 8", key: "svg-0" }], ["path", { d: "M21 10l0 7l-7 0", key: "svg-1" }]], V = p("outline", "trending-down", "TrendingDown", O);
17
+ const K = [["path", { d: "M3 7l6 6l4 -4l8 8", key: "svg-0" }], ["path", { d: "M21 10l0 7l-7 0", key: "svg-1" }]], Q = N("outline", "trending-down", "TrendingDown", K);
17
18
  /**
18
19
  * @license @tabler/icons-react v3.44.0 - MIT
19
20
  *
20
21
  * This source code is licensed under the MIT license.
21
22
  * See the LICENSE file in the root directory of this source tree.
22
23
  */
23
- const Z = [["path", { d: "M3 17l6 -6l4 4l8 -8", key: "svg-0" }], ["path", { d: "M14 7l7 0l0 7", key: "svg-1" }]], H = p("outline", "trending-up", "TrendingUp", Z), j = (I) => {
24
- const r = U({ props: I, name: "HCMetricCard" }), {
25
- value: o = [],
26
- variant: M = "default",
27
- layout: u = "overlay",
28
- valuePrefix: T,
29
- valueSuffix: b,
30
- showChange: C = !1,
31
- changeType: s = "percentage",
32
- showTrend: $ = !1,
33
- showIcon: f = !1,
34
- icon: i,
35
- iconPosition: l = "right"
36
- } = r, k = o.length > 0, d = o[o.length - 1], m = o[o.length - 2], e = d ? Number(d.v) : NaN, t = m ? Number(m.v) : NaN, v = !isNaN(e) && !isNaN(t);
37
- let c = "—", N = "";
38
- if (!isNaN(e)) {
39
- const y = new Intl.NumberFormat("en-US", {
40
- maximumFractionDigits: 2
41
- }).format(e);
42
- c = `${T ?? ""}${y}${b ?? ""}`, N = d.t;
24
+ const W = [["path", { d: "M3 17l6 -6l4 4l8 -8", key: "svg-0" }], ["path", { d: "M14 7l7 0l0 7", key: "svg-1" }]], X = N("outline", "trending-up", "TrendingUp", W), ne = (_) => {
25
+ const i = q({ props: _, name: "HCMetricCard" }), {
26
+ value: l = [],
27
+ secondValue: y = [],
28
+ secondValueFormat: R,
29
+ variant: $ = "default",
30
+ layout: w = "overlay",
31
+ valuePrefix: D,
32
+ valueSuffix: P,
33
+ format: e,
34
+ showChange: B = !1,
35
+ changeType: c = "percentage",
36
+ showTrend: F = !1,
37
+ showIcon: C = !1,
38
+ icon: r,
39
+ iconPosition: d = "right"
40
+ } = i, A = l.length > 0, u = l[l.length - 1], b = l[l.length - 2], o = u ? Number(u.v) : NaN, n = b ? Number(b.v) : NaN, k = !isNaN(o) && !isNaN(n), g = {
41
+ prefix: (e == null ? void 0 : e.prefix) ?? D,
42
+ suffix: (e == null ? void 0 : e.suffix) ?? P,
43
+ decimals: e == null ? void 0 : e.decimals,
44
+ color: e == null ? void 0 : e.color,
45
+ backgroundColor: e == null ? void 0 : e.backgroundColor,
46
+ conditionalRules: e == null ? void 0 : e.conditionalRules
47
+ };
48
+ let a = "—", m = "", M, I;
49
+ if (!isNaN(o)) {
50
+ a = V(o, g), m = u.t;
51
+ const f = z(o, g);
52
+ M = f.color, I = f.backgroundColor;
43
53
  }
44
- let a;
45
- if (C)
46
- if (v && !(t === 0 && s === "percentage")) {
47
- const h = s === "absolute" ? e - t : (e - t) / t * 100, P = h > 0 ? "+" : h < 0 ? "−" : "", F = s === "percentage" ? 1 : 2, R = s === "percentage" ? "%" : "";
48
- a = `${P}${Math.abs(h).toFixed(F)}${R}`;
54
+ let p;
55
+ const T = y[y.length - 1], x = T ? Number(T.v) : NaN;
56
+ isNaN(x) || (p = V(x, R ?? g));
57
+ let s;
58
+ if (B)
59
+ if (k && !(n === 0 && c === "percentage")) {
60
+ const v = c === "absolute" ? o - n : (o - n) / n * 100, J = v > 0 ? "+" : v < 0 ? "−" : "", L = c === "percentage" ? 1 : 2, j = c === "percentage" ? "%" : "";
61
+ s = `${J}${Math.abs(v).toFixed(L)}${j}`;
49
62
  } else
50
- a = "—";
51
- let n;
52
- $ && v && (e > t ? n = "up" : e < t ? n = "down" : n = "neutral");
53
- let g = B;
54
- n === "up" ? g = H : n === "down" && (g = V);
55
- const w = [
63
+ s = "—";
64
+ let t;
65
+ F && k && (o > n ? t = "up" : o < n ? t = "down" : t = "neutral");
66
+ let h = G;
67
+ t === "up" ? h = X : t === "down" && (h = Q);
68
+ const S = [
56
69
  "top-left",
57
70
  "top-right",
58
71
  "bottom-left",
59
72
  "bottom-right"
60
- ].includes(l), _ = f && !!i && w, x = f && !!i && !w, D = JSON.stringify({
61
- metric: r.label,
62
- value: c,
63
- change: a,
64
- asOf: N
65
- }), S = {
66
- ...r,
67
- variant: M,
68
- layout: u,
69
- changeType: s,
70
- iconPosition: l,
71
- calculatedValue: c,
72
- calculatedChange: a,
73
- calculatedTrend: n,
74
- hasData: k
73
+ ].includes(d), O = C && !!r && S, U = C && !!r && !S, Z = JSON.stringify({
74
+ metric: i.label,
75
+ value: a,
76
+ change: s,
77
+ asOf: m
78
+ }), H = {
79
+ ...i,
80
+ variant: $,
81
+ layout: w,
82
+ changeType: c,
83
+ iconPosition: d,
84
+ calculatedValue: a,
85
+ calculatedSecondValue: p,
86
+ calculatedChange: s,
87
+ calculatedTrend: t,
88
+ calculatedValueColor: M,
89
+ calculatedValueBg: I,
90
+ hasData: A
75
91
  };
76
92
  return {
77
93
  refs: {},
78
94
  state: {
79
- ownerState: S,
80
- layout: u,
81
- calculatedValue: c,
82
- calculatedChange: a,
83
- TrendIcon: g,
84
- Icon: i,
85
- showCornerIcon: _,
86
- showSideIcon: x,
87
- iconPosition: l,
88
- snapshotPayload: D
95
+ ownerState: H,
96
+ layout: w,
97
+ calculatedValue: a,
98
+ calculatedSecondValue: p,
99
+ calculatedChange: s,
100
+ TrendIcon: h,
101
+ Icon: r,
102
+ showCornerIcon: O,
103
+ showSideIcon: U,
104
+ iconPosition: d,
105
+ snapshotPayload: Z
89
106
  },
90
107
  actions: {}
91
108
  };
92
109
  };
93
110
  export {
94
- j as useMetricCardLogic
111
+ ne as useMetricCardLogic
95
112
  };
@@ -1,16 +1,16 @@
1
- import { styled as i, alpha as p, Stack as C, Typography as d } from "@mui/material";
2
- import { Widget as g } from "../widget/styled.js";
3
- import { variantColor as s, trendColor as f } from "./helpers.js";
1
+ import { styled as i, alpha as C, Stack as g, Typography as d } from "@mui/material";
2
+ import { Widget as f } from "../widget/styled.js";
3
+ import { variantColor as s, resolvePaletteColor as p, trendColor as u } from "./helpers.js";
4
4
  const e = {
5
5
  shouldForwardProp: (o) => o !== "ownerState"
6
- }, x = i(g.Root, {
6
+ }, v = i(f.Root, {
7
7
  name: "HCMetricCard",
8
8
  slot: "Root",
9
9
  ...e
10
- })(({ theme: o, ownerState: t }) => {
11
- const n = s(o, t.variant), a = t.layout === "panel";
10
+ })(({ theme: o, ownerState: n }) => {
11
+ const t = s(o, n.variant), a = n.layout === "panel";
12
12
  let r;
13
- return n ? r = p(n, 0.05) : a && (r = o.palette.background.default), {
13
+ return t ? r = C(t, 0.05) : a && (r = o.palette.background.default), {
14
14
  position: "relative",
15
15
  overflow: "hidden",
16
16
  padding: o.spacing(1.5, 2),
@@ -19,7 +19,7 @@ const e = {
19
19
  padding: o.spacing(1.5)
20
20
  }
21
21
  };
22
- }), m = i(C, {
22
+ }), y = i(g, {
23
23
  name: "HCMetricCard",
24
24
  slot: "Content"
25
25
  })(() => ({
@@ -27,38 +27,55 @@ const e = {
27
27
  width: "100%",
28
28
  minWidth: 0,
29
29
  zIndex: 1
30
- })), v = i(d, {
30
+ })), m = i(d, {
31
31
  name: "HCMetricCard",
32
32
  slot: "Label"
33
33
  })(({ theme: o }) => ({
34
34
  color: o.palette.text.secondary,
35
35
  marginBottom: o.spacing(0.5),
36
36
  fontWeight: 500
37
- })), y = i(d, {
37
+ })), k = i(d, {
38
38
  name: "HCMetricCard",
39
39
  slot: "Value",
40
40
  ...e
41
- })(({ theme: o, ownerState: t }) => ({
42
- color: s(o, t.variant) ?? o.palette.text.primary,
43
- fontWeight: 500,
44
- marginBottom: o.spacing(0.5),
41
+ })(({ theme: o, ownerState: n }) => {
42
+ const t = p(o, n.calculatedValueColor), a = p(o, n.calculatedValueBg);
43
+ return {
44
+ color: t ?? s(o, n.variant) ?? o.palette.text.primary,
45
+ fontWeight: 500,
46
+ marginBottom: o.spacing(0.5),
47
+ whiteSpace: "nowrap",
48
+ ...a && {
49
+ backgroundColor: a,
50
+ borderRadius: o.shape.borderRadius,
51
+ padding: o.spacing(0, 0.75)
52
+ },
53
+ [o.breakpoints.down("md")]: { fontSize: "1.35rem" },
54
+ [o.breakpoints.up("md")]: { fontSize: "2rem" }
55
+ };
56
+ }), w = i(d, {
57
+ name: "HCMetricCard",
58
+ slot: "SecondValue"
59
+ })(({ theme: o }) => ({
60
+ color: o.palette.text.secondary,
61
+ fontWeight: 400,
45
62
  whiteSpace: "nowrap",
46
- [o.breakpoints.down("md")]: { fontSize: "1.35rem" },
47
- [o.breakpoints.up("md")]: { fontSize: "2rem" }
48
- })), I = i("div", {
63
+ [o.breakpoints.down("md")]: { fontSize: "0.95rem" },
64
+ [o.breakpoints.up("md")]: { fontSize: "1.25rem" }
65
+ })), H = i("div", {
49
66
  name: "HCMetricCard",
50
67
  slot: "TrendContainer",
51
68
  ...e
52
- })(({ theme: o, ownerState: t }) => {
53
- const n = f(o, t.calculatedTrend), a = t.layout === "panel";
69
+ })(({ theme: o, ownerState: n }) => {
70
+ const t = u(o, n.calculatedTrend), a = n.layout === "panel";
54
71
  return {
55
72
  display: "inline-flex",
56
73
  alignItems: "center",
57
74
  gap: o.spacing(0.5),
58
75
  fontWeight: 500,
59
- color: n,
76
+ color: t,
60
77
  ...a ? {
61
- backgroundColor: p(n, 0.14),
78
+ backgroundColor: C(t, 0.14),
62
79
  borderRadius: 999,
63
80
  padding: o.spacing(0.25, 1),
64
81
  fontSize: "0.8125rem",
@@ -71,7 +88,7 @@ const e = {
71
88
  }
72
89
  }
73
90
  };
74
- }), k = i(d, {
91
+ }), I = i(d, {
75
92
  name: "HCMetricCard",
76
93
  slot: "Description"
77
94
  })(({ theme: o }) => ({
@@ -79,34 +96,34 @@ const e = {
79
96
  display: "block",
80
97
  position: "relative",
81
98
  zIndex: 1
82
- })), w = i("div", {
99
+ })), S = i("div", {
83
100
  name: "HCMetricCard",
84
101
  slot: "Icon",
85
102
  ...e
86
- })(({ theme: o, ownerState: t }) => ({
103
+ })(({ theme: o, ownerState: n }) => ({
87
104
  display: "flex",
88
105
  alignItems: "center",
89
106
  justifyContent: "center",
90
- color: s(o, t.variant) ?? o.palette.text.secondary,
91
- marginRight: t.iconPosition === "left" ? o.spacing(2) : 0,
92
- marginLeft: t.iconPosition === "right" ? o.spacing(2) : 0,
107
+ color: s(o, n.variant) ?? o.palette.text.secondary,
108
+ marginRight: n.iconPosition === "left" ? o.spacing(2) : 0,
109
+ marginLeft: n.iconPosition === "right" ? o.spacing(2) : 0,
93
110
  [o.breakpoints.down("sm")]: {
94
111
  position: "absolute",
95
112
  top: o.spacing(2),
96
113
  left: o.spacing(2),
97
114
  margin: 0
98
115
  }
99
- })), H = i("div", {
116
+ })), z = i("div", {
100
117
  name: "HCMetricCard",
101
118
  slot: "CornerIcon",
102
119
  ...e
103
- })(({ theme: o, ownerState: t }) => {
120
+ })(({ theme: o, ownerState: n }) => {
104
121
  var c, l;
105
- const n = {}, a = (c = t.iconPosition) != null && c.startsWith("top") ? "top" : "bottom", r = (l = t.iconPosition) != null && l.endsWith("left") ? "left" : "right";
106
- return n[a] = o.spacing(2), n[r] = o.spacing(2), {
122
+ const t = {}, a = (c = n.iconPosition) != null && c.startsWith("top") ? "top" : "bottom", r = (l = n.iconPosition) != null && l.endsWith("left") ? "left" : "right";
123
+ return t[a] = o.spacing(2), t[r] = o.spacing(2), {
107
124
  position: "absolute",
108
- ...n,
109
- color: s(o, t.variant) ?? o.palette.text.secondary,
125
+ ...t,
126
+ color: s(o, n.variant) ?? o.palette.text.secondary,
110
127
  zIndex: 2
111
128
  };
112
129
  }), P = i("div", {
@@ -122,7 +139,7 @@ const e = {
122
139
  alignItems: "flex-end",
123
140
  overflow: "hidden",
124
141
  borderRadius: o.shape.borderRadius
125
- })), S = i("div", {
142
+ })), R = i("div", {
126
143
  name: "HCMetricCard",
127
144
  slot: "Panel"
128
145
  })(({ theme: o }) => ({
@@ -139,7 +156,7 @@ const e = {
139
156
  backgroundColor: o.palette.background.paper,
140
157
  boxShadow: o.shadows[1],
141
158
  overflow: "hidden"
142
- })), z = i("div", {
159
+ })), W = i("div", {
143
160
  name: "HCMetricCard",
144
161
  slot: "SideChart"
145
162
  })(() => ({
@@ -153,14 +170,15 @@ const e = {
153
170
  }));
154
171
  export {
155
172
  P as MetricCardChartContainer,
156
- m as MetricCardContent,
157
- H as MetricCardCornerIconContainer,
158
- k as MetricCardDescription,
159
- w as MetricCardIconContainer,
160
- v as MetricCardLabel,
161
- S as MetricCardPanel,
162
- x as MetricCardRoot,
163
- z as MetricCardSideChart,
164
- I as MetricCardTrendContainer,
165
- y as MetricCardValue
173
+ y as MetricCardContent,
174
+ z as MetricCardCornerIconContainer,
175
+ I as MetricCardDescription,
176
+ S as MetricCardIconContainer,
177
+ m as MetricCardLabel,
178
+ R as MetricCardPanel,
179
+ v as MetricCardRoot,
180
+ w as MetricCardSecondValue,
181
+ W as MetricCardSideChart,
182
+ H as MetricCardTrendContainer,
183
+ k as MetricCardValue
166
184
  };