@hybridcore/ui 1.6.20 → 1.6.22

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,6 +1,6 @@
1
- import { R as Y, A as R } from "../../../AnimatedTheme-ktdO3Bel.js";
2
- import { useThemeProps as E, useTheme as I } from "@mui/material";
3
- import F from "lodash";
1
+ import { R as T, A as Y } from "../../../AnimatedTheme-ktdO3Bel.js";
2
+ import { useThemeProps as R, useTheme as E } from "@mui/material";
3
+ import I from "lodash";
4
4
  import { useId as G, useRef as O, useEffect as P } from "react";
5
5
  import { humanizeLabel as V } from "../_common/format.js";
6
6
  import { attachCombinedAxisTooltip as q } from "../_common/tooltip.js";
@@ -8,32 +8,32 @@ import { colorSetFromPalette as z, applyDateAxisLabelFormat as B, applyValueForm
8
8
  import { c as i } from "../../../Entity-BJCuhdq_.js";
9
9
  import { X as N, V as U } from "../../../AxisRenderer-BCQoUJw6.js";
10
10
  import { X as W } from "../../../XYCursor-CVUSpqb9.js";
11
- import { A as X, a as Z } from "../../../AxisRendererY-AXWvGU6r.js";
11
+ import { A as F, a as Z } from "../../../AxisRendererY-AXWvGU6r.js";
12
12
  import { C as _ } from "../../../CategoryAxis-B6NqW8qd.js";
13
13
  import { L as $ } from "../../../LineSeries-D_IL2qGF.js";
14
14
  import { D as j, G as J } from "../../../GaplessDateAxis-B2g2jgSG.js";
15
15
  import { S as K } from "../../../Scrollbar-CTI7_8Qw.js";
16
16
  import { D as M } from "../../../DateAxis-DEXKps1S.js";
17
- const xe = (k) => {
18
- const f = E({ props: k, name: "HCLogaritmicScale" }), {
17
+ const xe = (X) => {
18
+ const f = R({ props: X, name: "HCLogaritmicScale" }), {
19
19
  dimensions: t,
20
20
  values: s,
21
- data: n,
22
- initDelay: L = 0,
21
+ data: p,
22
+ initDelay: k = 0,
23
23
  baseInterval: h,
24
24
  colors: A,
25
25
  skipEmptyDates: x = !1,
26
- sx: S,
27
- ...C
28
- } = f, a = I(), g = `hc-logaritmic-scale-${G().replace(/:/g, "")}`, d = O(null);
29
- let m = null;
30
- t.length < 1 ? m = "LogaritmicScale requires at least 1 dimension" : s.length < 1 && (m = "LogaritmicScale requires at least 1 value"), P(() => {
31
- if (m) return;
32
- let u;
33
- return u = setTimeout(() => {
34
- var v, w, D, b;
35
- const e = Y.new(g);
36
- d.current = e, e.setThemes([R.new(e)]), e.interfaceColors.setAll({
26
+ sx: L,
27
+ ...S
28
+ } = f, a = E(), g = `hc-logaritmic-scale-${G().replace(/:/g, "")}`, c = O(null);
29
+ let n = null;
30
+ t.length < 1 ? n = "LogaritmicScale requires at least 1 dimension" : s.length < 1 && (n = "LogaritmicScale requires at least 1 value"), P(() => {
31
+ if (n) return;
32
+ let d;
33
+ return d = setTimeout(() => {
34
+ var w, v, D, b;
35
+ const e = T.new(g);
36
+ c.current = e, e.setThemes([Y.new(e)]), e.interfaceColors.setAll({
37
37
  text: i(a.palette.text.primary),
38
38
  grid: i(a.palette.divider),
39
39
  stroke: i(a.palette.divider)
@@ -52,18 +52,18 @@ const xe = (k) => {
52
52
  "cursor",
53
53
  W.new(e, { behavior: "none" })
54
54
  ).lineY.set("visible", !1);
55
- let o, p = n;
55
+ let o, u = p;
56
56
  if (t[0].type === "date") {
57
- p = F.orderBy(n, [t[0].value]);
57
+ u = I.orderBy(p, [t[0].value]);
58
58
  const l = x ? J : M;
59
59
  o = r.xAxes.push(
60
60
  l.new(e, {
61
61
  maxDeviation: 0.1,
62
62
  groupData: !1,
63
63
  baseInterval: h || { timeUnit: "day", count: 1 },
64
- renderer: X.new(e, {})
64
+ renderer: F.new(e, {})
65
65
  })
66
- ), (v = o.get("renderer")) == null || v.grid.template.setAll({
66
+ ), (w = o.get("renderer")) == null || w.grid.template.setAll({
67
67
  stroke: i(a.palette.divider),
68
68
  strokeOpacity: 1
69
69
  }), B(o, t[0]);
@@ -71,12 +71,12 @@ const xe = (k) => {
71
71
  o = r.xAxes.push(
72
72
  _.new(e, {
73
73
  categoryField: t[0].value,
74
- renderer: X.new(e, {})
74
+ renderer: F.new(e, {})
75
75
  })
76
76
  ), e.numberFormatter.setAll({
77
77
  numberFormat: "#",
78
78
  numericFields: ["valueX"]
79
- }), p = F.orderBy(n, [t[0].value]), o.data.setAll(p), (w = o.get("renderer")) == null || w.grid.template.setAll({
79
+ }), o.data.setAll(u), (v = o.get("renderer")) == null || v.grid.template.setAll({
80
80
  stroke: i(a.palette.divider),
81
81
  strokeOpacity: 1
82
82
  });
@@ -90,7 +90,7 @@ const xe = (k) => {
90
90
  stroke: i(a.palette.divider),
91
91
  strokeOpacity: 1
92
92
  }), s.forEach((l) => {
93
- const c = r.series.push(
93
+ const m = r.series.push(
94
94
  $.new(e, {
95
95
  name: l.label ?? V(l.name),
96
96
  xAxis: o,
@@ -99,10 +99,10 @@ const xe = (k) => {
99
99
  ...t[0].type === "date" ? { valueXField: t[0].value } : { categoryXField: t[0].value }
100
100
  })
101
101
  );
102
- c.strokes.template.setAll({ strokeWidth: 3 }), t[0].type === "date" && (c.data.processor = j.new(e, {
102
+ m.strokes.template.setAll({ strokeWidth: 3 }), t[0].type === "date" && (m.data.processor = j.new(e, {
103
103
  dateFormat: "i",
104
104
  dateFields: [t[0].value]
105
- })), c.data.setAll(p), c.appear(1e3);
105
+ })), m.data.setAll(u), m.appear(1e3);
106
106
  }), q({
107
107
  root: e,
108
108
  chart: r,
@@ -115,13 +115,13 @@ const xe = (k) => {
115
115
  "scrollbarX",
116
116
  K.new(e, { orientation: "horizontal" })
117
117
  ), H(e, (b = s == null ? void 0 : s[0]) == null ? void 0 : b.format), r.appear(1e3, 100);
118
- }, L), () => {
118
+ }, k), () => {
119
119
  var e;
120
- u && clearTimeout(u), (e = d.current) == null || e.dispose(), d.current = null;
120
+ d && clearTimeout(d), (e = c.current) == null || e.dispose(), c.current = null;
121
121
  };
122
- }, [n, t, s, a.palette.mode, A, x]);
123
- const T = { ...f };
124
- return { chartId: g, ownerState: T, sx: S, error: m, other: C };
122
+ }, [p, t, s, a.palette.mode, A, x]);
123
+ const C = { ...f };
124
+ return { chartId: g, ownerState: C, sx: L, error: n, other: S };
125
125
  };
126
126
  export {
127
127
  xe as useLogaritmicScaleLogic
@@ -1,11 +1,11 @@
1
1
  import { R as j, A as q } from "../../../AnimatedTheme-ktdO3Bel.js";
2
2
  import { useThemeProps as z, useTheme as U } from "@mui/material";
3
- import v from "lodash";
3
+ import N from "lodash";
4
4
  import { useId as H, useRef as $, useEffect as J } from "react";
5
5
  import { humanizeLabel as P } from "../_common/format.js";
6
6
  import { attachCombinedAxisTooltip as K } from "../_common/tooltip.js";
7
7
  import { colorSetFromPalette as Q, applyDateAxisLabelFormat as Z, applyValueFormat as ee } from "../_common/utils.js";
8
- import { c as C, a as A } from "../../../Entity-BJCuhdq_.js";
8
+ import { c as v, a as g } from "../../../Entity-BJCuhdq_.js";
9
9
  import { X as te, V as re } from "../../../AxisRenderer-BCQoUJw6.js";
10
10
  import { L as se } from "../../../Legend-CFvQiIfn.js";
11
11
  import { A as X, a as ae } from "../../../AxisRendererY-AXWvGU6r.js";
@@ -14,10 +14,10 @@ import { X as oe } from "../../../XYCursor-CVUSpqb9.js";
14
14
  import { G as le, D as ne } from "../../../GaplessDateAxis-B2g2jgSG.js";
15
15
  import { D as ce } from "../../../DateAxis-DEXKps1S.js";
16
16
  import { L as me } from "../../../LineSeries-D_IL2qGF.js";
17
- import { G, R as ue } from "../../../Tooltip-vyZRZWih.js";
18
- import { C as pe } from "../../../Circle-BnfBNKBD.js";
17
+ import { G, R as pe } from "../../../Tooltip-vyZRZWih.js";
18
+ import { C as ue } from "../../../Circle-BnfBNKBD.js";
19
19
  import { B as de } from "../../../Bullet-Djj7Vs9T.js";
20
- class y extends G {
20
+ class x extends G {
21
21
  _beforeChanged() {
22
22
  super._beforeChanged(), (this.isDirty("width") || this.isDirty("height") || this.isPrivateDirty("width") || this.isPrivateDirty("height")) && (this._clear = !0);
23
23
  }
@@ -32,41 +32,41 @@ class y extends G {
32
32
  this.markDirty(), this._clear = !0;
33
33
  }
34
34
  }
35
- Object.defineProperty(y, "className", {
35
+ Object.defineProperty(x, "className", {
36
36
  enumerable: !0,
37
37
  configurable: !0,
38
38
  writable: !0,
39
39
  value: "Triangle"
40
40
  });
41
- Object.defineProperty(y, "classNames", {
41
+ Object.defineProperty(x, "classNames", {
42
42
  enumerable: !0,
43
43
  configurable: !0,
44
44
  writable: !0,
45
- value: G.classNames.concat([y.className])
45
+ value: G.classNames.concat([x.className])
46
46
  });
47
- const x = ["CIRCLE", "RECTANGLE", "TRIANGLE"], Ge = (T) => {
48
- const c = z({ props: T, name: "HCMultipleValueAxes" }), {
47
+ const A = ["CIRCLE", "RECTANGLE", "TRIANGLE"], Ge = (C) => {
48
+ const c = z({ props: C, name: "HCMultipleValueAxes" }), {
49
49
  dimensions: s,
50
50
  values: t,
51
- data: d,
51
+ data: y,
52
52
  initDelay: I = 0,
53
- baseInterval: L,
54
- colors: R,
55
- skipEmptyDates: E = !1,
53
+ baseInterval: T,
54
+ colors: L,
55
+ skipEmptyDates: R = !1,
56
56
  sx: Y,
57
57
  ...V
58
- } = c, u = U(), _ = `hc-multiple-value-axes-${H().replace(/:/g, "")}`, w = $(null);
59
- let h = null;
60
- s.length < 1 ? h = "MultipleValueAxes requires at least 1 dimension" : t.length < 1 && (h = "MultipleValueAxes requires at least 1 value"), J(() => {
61
- if (h) return;
58
+ } = c, p = U(), E = `hc-multiple-value-axes-${H().replace(/:/g, "")}`, w = $(null);
59
+ let u = null;
60
+ s.length < 1 ? u = "MultipleValueAxes requires at least 1 dimension" : t.length < 1 && (u = "MultipleValueAxes requires at least 1 value"), J(() => {
61
+ if (u) return;
62
62
  let b;
63
63
  return b = setTimeout(() => {
64
- var N;
65
- const e = j.new(_);
64
+ var F;
65
+ const e = j.new(E);
66
66
  w.current = e, e.setThemes([q.new(e)]), e.interfaceColors.setAll({
67
- text: C(u.palette.text.primary),
68
- grid: C(u.palette.divider),
69
- stroke: C(u.palette.divider)
67
+ text: v(p.palette.text.primary),
68
+ grid: v(p.palette.divider),
69
+ stroke: v(p.palette.divider)
70
70
  });
71
71
  const r = e.container.children.push(
72
72
  te.new(e, {
@@ -78,75 +78,75 @@ const x = ["CIRCLE", "RECTANGLE", "TRIANGLE"], Ge = (T) => {
78
78
  layout: e.verticalLayout
79
79
  })
80
80
  );
81
- r.set("colors", Q(e, R)), r.get("colors", {}).set("step", 3);
82
- const O = r.children.push(
83
- se.new(e, { centerX: A, x: A })
84
- ), i = s[0];
85
- let l, p = d;
86
- if (i.type === "date") {
87
- const a = E ? le : ce;
81
+ r.set("colors", Q(e, L)), r.get("colors", {}).set("step", 3);
82
+ const S = r.children.push(
83
+ se.new(e, { centerX: g, x: g })
84
+ ), o = s[0];
85
+ let l, d = y;
86
+ if (o.type === "date") {
87
+ const a = R ? le : ce;
88
88
  l = r.xAxes.push(
89
89
  a.new(e, {
90
90
  maxDeviation: 0.1,
91
91
  groupData: !1,
92
- baseInterval: L || { timeUnit: "day", count: 1 },
92
+ baseInterval: T || { timeUnit: "day", count: 1 },
93
93
  renderer: X.new(e, {})
94
94
  })
95
- ), Z(l, i), p = v.orderBy(d, [i.value]);
95
+ ), Z(l, o), d = N.orderBy(y, [o.value]);
96
96
  } else
97
97
  l = r.xAxes.push(
98
98
  ie.new(e, {
99
- categoryField: i.value,
99
+ categoryField: o.value,
100
100
  renderer: X.new(e, {})
101
101
  })
102
102
  ), e.numberFormatter.setAll({
103
103
  numberFormat: "#",
104
104
  numericFields: ["valueX"]
105
- }), p = v.orderBy(d, [i.value]), l.data.setAll(p);
106
- function F(a, n, m, S, W, D, M) {
107
- const f = ae.new(e, { opposite: W }), k = r.yAxes.push(
108
- re.new(e, { maxDeviation: 1, renderer: f })
105
+ }), l.data.setAll(d);
106
+ function _(a, n, m, B, W, D, M) {
107
+ const h = ae.new(e, { opposite: W }), k = r.yAxes.push(
108
+ re.new(e, { maxDeviation: 1, renderer: h })
109
109
  );
110
110
  r.yAxes.indexOf(k) > 0 && k.set("syncWithAxis", r.yAxes.getIndex(0));
111
- const o = r.series.push(
111
+ const i = r.series.push(
112
112
  me.new(e, {
113
113
  name: n,
114
114
  xAxis: l,
115
115
  yAxis: k,
116
- valueYField: S,
117
- ...i.type === "date" ? { valueXField: m } : { categoryXField: m }
116
+ valueYField: B,
117
+ ...o.type === "date" ? { valueXField: m } : { categoryXField: m }
118
118
  })
119
119
  );
120
- o.strokes.template.setAll({ strokeWidth: 2 }), f.grid.template.set("strokeOpacity", 0.05), f.labels.template.set("fill", o.get("fill")), f.setAll({
121
- stroke: o.get("fill"),
120
+ i.strokes.template.setAll({ strokeWidth: 2 }), h.grid.template.set("strokeOpacity", 0.05), h.labels.template.set("fill", i.get("fill")), h.setAll({
121
+ stroke: i.get("fill"),
122
122
  strokeOpacity: 1,
123
123
  opacity: 1
124
- }), M === "date" && (o.data.processor = ne.new(e, {
124
+ }), M === "date" && (i.data.processor = ne.new(e, {
125
125
  dateFormat: "i",
126
126
  dateFields: [m]
127
- })), D !== void 0 && o.bullets.push(function() {
128
- let g;
129
- return D === "RECTANGLE" ? g = ue.new(e, {
127
+ })), D !== void 0 && i.bullets.push(function() {
128
+ let f;
129
+ return D === "RECTANGLE" ? f = pe.new(e, {
130
130
  width: 10,
131
131
  height: 10,
132
- centerX: A,
133
- centerY: A,
132
+ centerX: g,
133
+ centerY: g,
134
134
  strokeWidth: 2,
135
- stroke: o.get("stroke"),
135
+ stroke: i.get("stroke"),
136
136
  fill: e.interfaceColors.get("background")
137
- }) : D === "TRIANGLE" ? g = y.new(e, {
137
+ }) : D === "TRIANGLE" ? f = x.new(e, {
138
138
  width: 10,
139
139
  height: 10,
140
140
  strokeWidth: 2,
141
- stroke: o.get("stroke"),
141
+ stroke: i.get("stroke"),
142
142
  fill: e.interfaceColors.get("background")
143
- }) : g = pe.new(e, {
143
+ }) : f = ue.new(e, {
144
144
  strokeWidth: 2,
145
145
  radius: 4,
146
- stroke: o.get("stroke"),
146
+ stroke: i.get("stroke"),
147
147
  fill: e.interfaceColors.get("background")
148
- }), de.new(e, { sprite: g });
149
- }), o.data.setAll(a);
148
+ }), de.new(e, { sprite: f });
149
+ }), i.data.setAll(a);
150
150
  }
151
151
  if (r.set(
152
152
  "cursor",
@@ -155,42 +155,42 @@ const x = ["CIRCLE", "RECTANGLE", "TRIANGLE"], Ge = (T) => {
155
155
  root: e,
156
156
  chart: r,
157
157
  xAxis: l,
158
- theme: u,
159
- isDateAxis: i.type === "date",
160
- baseInterval: L,
158
+ theme: p,
159
+ isDateAxis: o.type === "date",
160
+ baseInterval: T,
161
161
  follow: !0
162
162
  }), s.length > 1) {
163
- const a = v.groupBy(p, s[1].value);
163
+ const a = N.groupBy(d, s[1].value);
164
164
  Object.keys(a).forEach((n, m) => {
165
- F(
165
+ _(
166
166
  a[n],
167
167
  P(n),
168
168
  s[0].value,
169
169
  t[0].dataFieldName,
170
170
  m !== 0,
171
- x[m % x.length]
171
+ A[m % A.length]
172
172
  );
173
173
  });
174
174
  } else
175
175
  t.forEach((a, n) => {
176
- F(
177
- p,
176
+ _(
177
+ d,
178
178
  a.label ?? P(a.name),
179
- i.value,
179
+ o.value,
180
180
  a.dataFieldName,
181
181
  n !== 0,
182
- x[n % x.length],
183
- i.type
182
+ A[n % A.length],
183
+ o.type
184
184
  );
185
185
  });
186
- O.data.setAll(r.series.values), ee(e, (N = t == null ? void 0 : t[0]) == null ? void 0 : N.format), r.appear(1e3, 100);
186
+ S.data.setAll(r.series.values), ee(e, (F = t == null ? void 0 : t[0]) == null ? void 0 : F.format), r.appear(1e3, 100);
187
187
  }, I), () => {
188
188
  var e;
189
189
  b && clearTimeout(b), (e = w.current) == null || e.dispose(), w.current = null;
190
190
  };
191
- }, [d, s, t, u.palette.mode, R, E]);
192
- const B = { ...c };
193
- return { chartId: _, ownerState: B, sx: Y, error: h, other: V };
191
+ }, [y, s, t, p.palette.mode, L, R]);
192
+ const O = { ...c };
193
+ return { chartId: E, ownerState: O, sx: Y, error: u, other: V };
194
194
  };
195
195
  export {
196
196
  Ge as useMultipleValueAxesLogic
@@ -178,7 +178,15 @@ const Be = (I) => {
178
178
  var t;
179
179
  x && clearTimeout(x), (t = h.current) == null || t.dispose(), h.current = null;
180
180
  };
181
- }, [f, l, c, n.palette.mode, w, b, D]);
181
+ }, [
182
+ f,
183
+ l,
184
+ c,
185
+ n.palette.mode,
186
+ w,
187
+ b,
188
+ D
189
+ ]);
182
190
  const j = { ...g };
183
191
  return { chartId: X, ownerState: j, sx: W, error: C, other: N };
184
192
  };
@@ -1,29 +1,29 @@
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
- ownerState: i,
1
+ import { jsx as e, jsxs as i, Fragment as m } from "react/jsx-runtime";
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), {
8
+ ownerState: n,
9
9
  layout: d,
10
- calculatedValue: y,
11
- calculatedSecondValue: l,
12
- calculatedChange: h,
13
- TrendIcon: S,
14
- Icon: a,
10
+ calculatedValue: o,
11
+ calculatedSecondValue: h,
12
+ calculatedChange: s,
13
+ TrendIcon: b,
14
+ Icon: r,
15
15
  showCornerIcon: I,
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 !== "—";
16
+ showSideIcon: C,
17
+ iconPosition: x,
18
+ snapshotPayload: T
19
+ } = S, g = !!t.showChart && !!t.chartType && (t.value ?? []).length >= 2, j = (t.showChange || t.showTrend) && s !== "—";
20
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%" }),
21
+ return /* @__PURE__ */ e(f, { ownerState: n, sx: t.sx, children: /* @__PURE__ */ i(a, { spacing: 1, children: [
22
+ /* @__PURE__ */ e(l, { variant: "text", width: "60%" }),
23
+ /* @__PURE__ */ e(l, { variant: "rectangular", height: 40, width: "40%" }),
24
+ /* @__PURE__ */ e(l, { variant: "text", width: "80%" }),
25
25
  t.showChart && /* @__PURE__ */ e(
26
- c,
26
+ l,
27
27
  {
28
28
  variant: "rectangular",
29
29
  height: 40,
@@ -32,40 +32,50 @@ const G = (t) => {
32
32
  }
33
33
  )
34
34
  ] }) });
35
- const g = /* @__PURE__ */ n(
36
- r,
35
+ const u = /* @__PURE__ */ i(
36
+ a,
37
37
  {
38
38
  direction: "row",
39
39
  alignItems: "center",
40
40
  spacing: 1,
41
41
  flexWrap: d === "panel" ? "nowrap" : "wrap",
42
+ sx: { minWidth: 0 },
42
43
  children: [
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", ownerState: i, 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
44
+ /* @__PURE__ */ i(
45
+ a,
46
+ {
47
+ direction: "row",
48
+ alignItems: "baseline",
49
+ spacing: 0.5,
50
+ sx: { minWidth: 0 },
51
+ 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 }) })
54
+ ]
55
+ }
56
+ ),
57
+ j && /* @__PURE__ */ i(P, { ownerState: n, children: [
58
+ d === "overlay" && t.showTrend && /* @__PURE__ */ e(b, { size: 16 }),
59
+ t.showChange && s
50
60
  ] })
51
61
  ]
52
62
  }
53
63
  );
54
64
  return /* @__PURE__ */ e(
55
- m,
65
+ f,
56
66
  {
57
- ownerState: i,
67
+ ownerState: n,
58
68
  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
- g,
65
- t.description && /* @__PURE__ */ e(f, { variant: "caption", children: t.description })
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: [
73
+ /* @__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 }) })
66
76
  ] }),
67
- C && /* @__PURE__ */ e(L, { children: /* @__PURE__ */ e(
68
- x,
77
+ g && /* @__PURE__ */ e(L, { children: /* @__PURE__ */ e(
78
+ w,
69
79
  {
70
80
  type: t.chartType,
71
81
  data: t.value,
@@ -74,41 +84,41 @@ const G = (t) => {
74
84
  }
75
85
  ) })
76
86
  ] })
77
- ] }) : /* @__PURE__ */ n(u, { children: [
78
- I && a && /* @__PURE__ */ e(A, { ownerState: i, children: /* @__PURE__ */ e(a, { size: 24 }) }),
79
- /* @__PURE__ */ n(
80
- r,
87
+ ] }) : /* @__PURE__ */ i(m, { children: [
88
+ I && r && /* @__PURE__ */ e(A, { ownerState: n, children: /* @__PURE__ */ e(r, { size: 24 }) }),
89
+ /* @__PURE__ */ i(
90
+ a,
81
91
  {
82
92
  direction: "row",
83
93
  justifyContent: "space-between",
84
94
  alignItems: "flex-start",
85
95
  sx: { flex: 1 },
86
96
  children: [
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
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
91
101
  ] }),
92
- o && a && s === "right" && /* @__PURE__ */ e(v, { ownerState: i, children: /* @__PURE__ */ e(a, { sx: { fontSize: 24 } }) })
102
+ C && r && x === "right" && /* @__PURE__ */ e(y, { ownerState: n, children: /* @__PURE__ */ e(r, { sx: { fontSize: 24 } }) })
93
103
  ]
94
104
  }
95
105
  ),
96
- /* @__PURE__ */ n(
97
- r,
106
+ /* @__PURE__ */ i(
107
+ a,
98
108
  {
99
109
  direction: { xs: "column-reverse", sm: "column" },
100
110
  spacing: 1,
101
111
  sx: { width: "100%", mt: 2 },
102
112
  children: [
103
- t.description && /* @__PURE__ */ e(
104
- f,
113
+ t.description && /* @__PURE__ */ e(c, { title: t.description, children: /* @__PURE__ */ e(
114
+ M,
105
115
  {
106
116
  variant: "caption",
107
117
  sx: { textAlign: { xs: "center", sm: "left" } },
108
118
  children: t.description
109
119
  }
110
- ),
111
- C && /* @__PURE__ */ e(F, { children: /* @__PURE__ */ e(x, { type: t.chartType, data: t.value }) })
120
+ ) }),
121
+ g && /* @__PURE__ */ e(F, { children: /* @__PURE__ */ e(w, { type: t.chartType, data: t.value }) })
112
122
  ]
113
123
  }
114
124
  )
@@ -117,5 +127,5 @@ const G = (t) => {
117
127
  );
118
128
  };
119
129
  export {
120
- G as MetricCard
130
+ H as MetricCard
121
131
  };