@acronis-platform/ui-react 5.4.1 → 5.4.3

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 (33) hide show
  1. package/dist/components/ui/area-chart/area-chart.js +107 -105
  2. package/dist/components/ui/area-chart/area-chart.js.map +1 -1
  3. package/dist/components/ui/bar-chart/bar-chart.js +135 -132
  4. package/dist/components/ui/bar-chart/bar-chart.js.map +1 -1
  5. package/dist/components/ui/chart/chart-format.js +36 -31
  6. package/dist/components/ui/chart/chart-format.js.map +1 -1
  7. package/dist/components/ui/chart/chart.js +9 -7
  8. package/dist/components/ui/chart/chart.js.map +1 -1
  9. package/dist/components/ui/chart/use-x-axis-layout.js +71 -0
  10. package/dist/components/ui/chart/use-x-axis-layout.js.map +1 -0
  11. package/dist/components/ui/composed-chart/composed-chart.js +141 -139
  12. package/dist/components/ui/composed-chart/composed-chart.js.map +1 -1
  13. package/dist/components/ui/confidence-cone/confidence-cone.js +70 -67
  14. package/dist/components/ui/confidence-cone/confidence-cone.js.map +1 -1
  15. package/dist/components/ui/histogram/histogram.js +54 -51
  16. package/dist/components/ui/histogram/histogram.js.map +1 -1
  17. package/dist/components/ui/line-chart/line-chart.js +119 -117
  18. package/dist/components/ui/line-chart/line-chart.js.map +1 -1
  19. package/dist/components/ui/scatter-chart/scatter-chart.js +53 -51
  20. package/dist/components/ui/scatter-chart/scatter-chart.js.map +1 -1
  21. package/dist/llms/area-chart.md +10 -1
  22. package/dist/llms/bar-chart.md +10 -1
  23. package/dist/llms/composed-chart.md +10 -1
  24. package/dist/llms/confidence-cone.md +10 -1
  25. package/dist/llms/histogram.md +10 -1
  26. package/dist/llms/line-chart.md +10 -1
  27. package/dist/llms/scatter-chart.md +10 -1
  28. package/dist/llms.txt +1 -1
  29. package/dist/src/components/ui/chart/chart-format.d.ts +10 -4
  30. package/dist/src/components/ui/chart/chart.d.ts +1 -1
  31. package/dist/src/components/ui/chart/use-x-axis-layout.d.ts +28 -0
  32. package/dist/ui-react.css +1 -1
  33. package/package.json +2 -2
@@ -3,13 +3,14 @@ import { cn as e } from "../../../lib/utils.js";
3
3
  import { cva as t } from "../../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js";
4
4
  import { Tooltip as n, TooltipContent as r, TooltipTrigger as i } from "../tooltip/tooltip.js";
5
5
  import { ChartContainer as a, ChartLegend as o, ChartLegendContent as s, ChartTooltip as c, ChartTooltipContent as l, resolveChartColors as u, toCssKey as d } from "../chart/chart.js";
6
- import { resolveAnimation as f, resolveAxisDomain as p, resolveBrushProps as m, resolveCartesianLabelPosition as h, resolveCategoryRange as g, resolveChartReferenceValue as _, resolveLabelFillClass as v, resolveReferenceLineProps as ee, resolveRotatedTickAnchor as te, resolveXAxisHeight as ne, resolveXAxisTitle as re, resolveYAxisTitle as ie, toLabelFormatter as ae, toReferenceLineList as oe } from "../chart/chart-format.js";
6
+ import { resolveAnimation as f, resolveAxisDomain as p, resolveBrushProps as m, resolveCartesianLabelPosition as h, resolveCategoryRange as g, resolveChartReferenceValue as _, resolveLabelFillClass as v, resolveReferenceLineProps as ee, resolveRotatedTickAnchor as te, resolveXAxisTickLabels as ne, resolveXAxisTitle as re, resolveYAxisTitle as ie, toLabelFormatter as ae, toReferenceLineList as oe } from "../chart/chart-format.js";
7
+ import { mergeXAxisLayoutMargin as se, useXAxisLayout as ce } from "../chart/use-x-axis-layout.js";
7
8
  import * as y from "react";
8
9
  import { Fragment as b, jsx as x, jsxs as S } from "react/jsx-runtime";
9
- import { Bar as C, BarChart as se, Brush as ce, CartesianGrid as le, Cell as w, LabelList as ue, Rectangle as T, ReferenceArea as de, ReferenceLine as fe, Text as pe, XAxis as me, YAxis as he } from "recharts";
10
+ import { Bar as C, BarChart as le, Brush as ue, CartesianGrid as de, Cell as w, LabelList as fe, Rectangle as T, ReferenceArea as pe, ReferenceLine as me, Text as he, XAxis as ge, YAxis as _e } from "recharts";
10
11
  import { Meter as E } from "@base-ui/react/meter";
11
12
  //#region src/components/ui/bar-chart/bar-chart.tsx
12
- var ge = t("", {
13
+ var D = t("", {
13
14
  variants: {
14
15
  orientation: {
15
16
  vertical: "",
@@ -24,31 +25,31 @@ var ge = t("", {
24
25
  orientation: "vertical",
25
26
  layout: "grouped"
26
27
  }
27
- }), D = "__headroom_";
28
- function O(e, t) {
29
- let n = e?.filter((e) => !String(e.dataKey).startsWith(D));
28
+ }), O = "__headroom_";
29
+ function k(e, t) {
30
+ let n = e?.filter((e) => !String(e.dataKey).startsWith(O));
30
31
  return t ? n?.slice().sort((e, n) => t.indexOf(String(e.dataKey)) - t.indexOf(String(n.dataKey))) : n;
31
32
  }
32
- function k(e) {
33
+ function A(e) {
33
34
  return e?.map((e) => e.color?.startsWith("url(") ? {
34
35
  ...e,
35
36
  color: `var(--color-${d(String(e.dataKey))})`
36
37
  } : e);
37
38
  }
38
- function A({ content: e, dataKeys: t, ...n }) {
39
+ function ve({ content: e, dataKeys: t, ...n }) {
39
40
  let r = {
40
41
  ...n,
41
- payload: k(O(n.payload, t))
42
+ payload: A(k(n.payload, t))
42
43
  };
43
44
  return e ? typeof e == "function" ? y.createElement(e, r) : y.cloneElement(e, r) : /* @__PURE__ */ x(l, { ...r });
44
45
  }
45
- function j({ dataKeys: e, ...t }) {
46
+ function ye({ dataKeys: e, ...t }) {
46
47
  return /* @__PURE__ */ x(s, {
47
48
  verticalAlign: t.verticalAlign,
48
- payload: k(O(t.payload, e))
49
+ payload: A(k(t.payload, e))
49
50
  });
50
51
  }
51
- function M({ bar: e, track: t, trackFill: n, paint: r }) {
52
+ function j({ bar: e, track: t, trackFill: n, paint: r }) {
52
53
  return /* @__PURE__ */ S(b, { children: [t && /* @__PURE__ */ x(T, {
53
54
  className: "recharts-bar-background-rectangle",
54
55
  x: t.x ?? void 0,
@@ -69,21 +70,21 @@ function M({ bar: e, track: t, trackFill: n, paint: r }) {
69
70
  strokeDasharray: e.strokeDasharray
70
71
  })] });
71
72
  }
72
- function N({ inRange: e, trackFill: t, paint: n }) {
73
- return ({ background: r, index: i, ...a }) => M({
73
+ function M({ inRange: e, trackFill: t, paint: n }) {
74
+ return ({ background: r, index: i, ...a }) => j({
74
75
  bar: a,
75
76
  track: e(i) ? r : void 0,
76
77
  trackFill: t,
77
78
  paint: n
78
79
  });
79
80
  }
80
- function _e({ rangeBackground: e, inRange: t, trackFill: n, activeBarOption: r }) {
81
+ function be({ rangeBackground: e, inRange: t, trackFill: n, activeBarOption: r }) {
81
82
  return e ? {
82
- shape: N({
83
+ shape: M({
83
84
  inRange: t,
84
85
  trackFill: n
85
86
  }),
86
- activeBar: r && N({
87
+ activeBar: r && M({
87
88
  inRange: t,
88
89
  trackFill: n,
89
90
  paint: r
@@ -93,7 +94,7 @@ function _e({ rangeBackground: e, inRange: t, trackFill: n, activeBarOption: r }
93
94
  activeBar: r
94
95
  };
95
96
  }
96
- function P(e) {
97
+ function xe(e) {
97
98
  let { x: t = 0, y: n = 0, width: r = 0, height: i = 0, fill: a, fillOpacity: o } = e;
98
99
  return /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ x(T, {
99
100
  className: "recharts-reference-area-rect",
@@ -112,10 +113,10 @@ function P(e) {
112
113
  strokeDasharray: "4 4"
113
114
  })] });
114
115
  }
115
- function ve(e) {
116
- if (e) return P;
116
+ function Se(e) {
117
+ if (e) return xe;
117
118
  }
118
- function ye(e) {
119
+ function Ce(e) {
119
120
  return e ? {
120
121
  value: e,
121
122
  position: "insideTop",
@@ -123,7 +124,7 @@ function ye(e) {
123
124
  fontSize: 12
124
125
  } : void 0;
125
126
  }
126
- function be({ id: e, dataKeys: t, shapes: n }) {
127
+ function we({ id: e, dataKeys: t, shapes: n }) {
127
128
  let r = n.has("gradient"), i = n.has("pattern");
128
129
  return !r && !i ? null : /* @__PURE__ */ x("defs", { children: t.map((t) => /* @__PURE__ */ S(y.Fragment, { children: [r && /* @__PURE__ */ S("linearGradient", {
129
130
  id: `${e}-gradient-${d(t)}`,
@@ -161,10 +162,10 @@ function be({ id: e, dataKeys: t, shapes: n }) {
161
162
  })]
162
163
  })] }, t)) });
163
164
  }
164
- function xe({ data: e, chartData: t, xKey: n, seriesKey: r, settings: i, range: a, headroomKey: o, barShape: s, rounded: c, fillOf: l, radiusFor: u }) {
165
+ function Te({ data: e, chartData: t, xKey: n, seriesKey: r, settings: i, range: a, headroomKey: o, barShape: s, rounded: c, fillOf: l, radiusFor: u }) {
165
166
  let { fill: f, opacity: p, dashed: m } = i;
166
167
  return e.map((e, h) => {
167
- let g = h >= a[0] && h <= a[1], _ = g && i.shape || s, v = o !== void 0 && Number(t[h]?.[`${D}${r}`]) > 0;
168
+ let g = h >= a[0] && h <= a[1], _ = g && i.shape || s, v = o !== void 0 && Number(t[h]?.[`${O}${r}`]) > 0;
168
169
  return /* @__PURE__ */ x(w, {
169
170
  fill: g ? f ?? l(r, _) : l(r, s),
170
171
  fillOpacity: g ? p : void 0,
@@ -175,8 +176,8 @@ function xe({ data: e, chartData: t, xKey: n, seriesKey: r, settings: i, range:
175
176
  }, `${r}-${String(e[n])}-${h}`);
176
177
  });
177
178
  }
178
- var F = (e) => e.toLocaleString();
179
- function I({ item: t, resolvedColor: a, max: o, valueFormatter: s, showTooltip: c, tooltip: l }) {
179
+ var N = (e) => e.toLocaleString();
180
+ function P({ item: t, resolvedColor: a, max: o, valueFormatter: s, showTooltip: c, tooltip: l }) {
180
181
  let { label: u, value: d, forecast: f } = t, p = a, m = o > 0 ? Math.round(d / o * 100) : 0, h = f != null && f > d, g = /* @__PURE__ */ S(E.Root, {
181
182
  value: d,
182
183
  max: o,
@@ -244,7 +245,7 @@ function I({ item: t, resolvedColor: a, max: o, valueFormatter: s, showTooltip:
244
245
  ] })
245
246
  })] }) : g;
246
247
  }
247
- var L = y.forwardRef(({ items: t, max: n, palette: r, valueFormatter: i = F, showTooltip: a = !0, tooltip: o, className: s, ...c }, l) => {
248
+ var F = y.forwardRef(({ items: t, max: n, palette: r, valueFormatter: i = N, showTooltip: a = !0, tooltip: o, className: s, ...c }, l) => {
248
249
  let d = n !== void 0 && n > 0 ? n : t.reduce((e, t) => e + t.value, 0) || 1, f = y.useMemo(() => {
249
250
  if (!r) return null;
250
251
  let e = Object.fromEntries(t.map((e, t) => [`item${t}`, {
@@ -258,7 +259,7 @@ var L = y.forwardRef(({ items: t, max: n, palette: r, valueFormatter: i = F, sho
258
259
  "data-orientation": "horizontal",
259
260
  className: e("flex flex-col gap-4", s),
260
261
  ...c,
261
- children: t.map((e, t) => /* @__PURE__ */ x(I, {
262
+ children: t.map((e, t) => /* @__PURE__ */ x(P, {
262
263
  item: e,
263
264
  resolvedColor: f ? f[t] ?? "" : e.color ?? "",
264
265
  max: d,
@@ -268,135 +269,135 @@ var L = y.forwardRef(({ items: t, max: n, palette: r, valueFormatter: i = F, sho
268
269
  }, `${t}-${e.label}`))
269
270
  });
270
271
  });
271
- L.displayName = "HorizontalBarLayout";
272
- var R = y.forwardRef((t, n) => {
273
- let r = y.useId().replace(/:/g, "");
272
+ F.displayName = "HorizontalBarLayout";
273
+ var I = y.forwardRef((t, n) => {
274
+ let r = y.useId().replace(/:/g, ""), i = y.useRef(null), s = t, l = s.xKey, u = ne(s.data && l ? s.data.map((e) => e[l]) : [], s.xTickFormatter), w = ce(i, s.xAxisAngle, s.xAxisLabel, u.join("\0"));
274
275
  if (t.orientation === "horizontal") {
275
276
  let { orientation: e, ...r } = t;
276
- return /* @__PURE__ */ x(L, {
277
+ return /* @__PURE__ */ x(F, {
277
278
  ...r,
278
279
  ref: n
279
280
  });
280
281
  }
281
- let { className: i, config: s, palette: l, data: u, dataKeys: w, xKey: T, referenceLine: E, referenceArea: O, barSettings: k, xAxisLabel: M, yAxisLabel: N, yUnit: P, orientation: F = "vertical", layout: I = "grouped", barRadius: R = 8, barShape: z = "rounded", barSize: Se = 8, maxBarSize: Ce, barGap: we = 4, barCategoryGap: Te, minPointSize: B, showBackground: Ee = !1, backgroundFill: V = "var(--ui-background-surface-secondary)", showActiveBar: De = !1, activeBar: H, showGrid: Oe = !0, showTooltip: ke = !0, showLegend: Ae = !0, showXAxis: je = !0, showYAxis: Me = !0, xTickFormatter: U, yTickFormatter: Ne, xAxisAngle: W, xAxisInterval: Pe, yAxisTickCount: Fe, yAxisDomain: Ie, gridDashed: Le = !0, gridHorizontal: Re, gridVertical: ze, tooltipContent: Be, animate: Ve, animationDuration: He, animationBegin: Ue, animationEasing: We, showLabels: Ge = !1, labelPosition: Ke, labelFormatter: qe, showBrush: Je = !1, brushHeight: Ye, brushAriaLabel: Xe, ...Ze } = t, G = f({
282
- animate: Ve,
283
- animationDuration: He,
284
- animationBegin: Ue,
285
- animationEasing: We
286
- }), K = I === "stacked", q = h({
287
- labelPosition: Ke,
282
+ let { className: T, config: E, palette: k, data: A, dataKeys: j, xKey: M, referenceLine: xe, referenceArea: N, barSettings: P, xAxisLabel: I, yAxisLabel: Ee, yUnit: De, orientation: Oe = "vertical", layout: L = "grouped", barRadius: R = 8, barShape: z = "rounded", barSize: ke = 8, maxBarSize: Ae, barGap: je = 4, barCategoryGap: Me, minPointSize: B, showBackground: Ne = !1, backgroundFill: V = "var(--ui-background-surface-secondary)", showActiveBar: Pe = !1, activeBar: H, showGrid: Fe = !0, showTooltip: Ie = !0, showLegend: Le = !0, showXAxis: Re = !0, showYAxis: ze = !0, xTickFormatter: U, yTickFormatter: Be, xAxisAngle: W, xAxisInterval: Ve, yAxisTickCount: He, yAxisDomain: Ue, gridDashed: We = !0, gridHorizontal: Ge, gridVertical: Ke, tooltipContent: qe, animate: Je, animationDuration: Ye, animationBegin: Xe, animationEasing: Ze, showLabels: Qe = !1, labelPosition: $e, labelFormatter: et, showBrush: tt = !1, brushHeight: nt, brushAriaLabel: rt, ...it } = t, G = f({
283
+ animate: Je,
284
+ animationDuration: Ye,
285
+ animationBegin: Xe,
286
+ animationEasing: Ze
287
+ }), K = L === "stacked", q = h({
288
+ labelPosition: $e,
288
289
  isStacked: K,
289
290
  growingEnd: "top"
290
- }), Qe = oe(E), $e = (O ? Array.isArray(O) ? O : [O] : []).map((e) => ({
291
+ }), at = oe(xe), J = (N ? Array.isArray(N) ? N : [N] : []).map((e) => ({
291
292
  area: e,
292
- range: g(e, u, T)
293
- })).filter((e) => e.range !== void 0), J = new Map(w.flatMap((e) => {
294
- let t = k?.[e], n = t ? g(t, u, T) : void 0;
293
+ range: g(e, A, M)
294
+ })).filter((e) => e.range !== void 0), Y = new Map(j.flatMap((e) => {
295
+ let t = P?.[e], n = t ? g(t, A, M) : void 0;
295
296
  return t && n ? [[e, {
296
297
  settings: t,
297
298
  range: n
298
299
  }]] : [];
299
- })), Y = new Map(K ? [] : Array.from(J, ([e, t]) => typeof t.settings.background == "string" ? [e, t.settings.background] : void 0).filter((e) => e !== void 0)), X = Y.size ? u.map((e, t) => {
300
+ })), X = new Map(K ? [] : Array.from(Y, ([e, t]) => typeof t.settings.background == "string" ? [e, t.settings.background] : void 0).filter((e) => e !== void 0)), Z = X.size ? A.map((e, t) => {
300
301
  let n = {};
301
- return Y.forEach((r, i) => {
302
- let a = J.get(i);
302
+ return X.forEach((r, i) => {
303
+ let a = Y.get(i);
303
304
  if (!a) return;
304
305
  let [o, s] = a.range;
305
306
  if (t < o || t > s) return;
306
307
  let c = e[i], l = e[r];
307
- typeof c == "number" && typeof l == "number" && (n[`${D}${i}`] = Math.max(0, l - c));
308
+ typeof c == "number" && typeof l == "number" && (n[`${O}${i}`] = Math.max(0, l - c));
308
309
  }), {
309
310
  ...e,
310
311
  ...n
311
312
  };
312
- }) : u, Z = new Set($e.filter(({ area: e }) => e.highlightTicks !== !1).flatMap(({ range: e }) => u.slice(e[0], e[1] + 1).map((e) => e[T]))), et = Z.size ? ({ payload: t, index: n, ...r }) => {
313
+ }) : A, ot = new Set(J.filter(({ area: e }) => e.highlightTicks !== !1).flatMap(({ range: e }) => A.slice(e[0], e[1] + 1).map((e) => e[M]))), st = ot.size ? ({ payload: t, index: n, ...r }) => {
313
314
  let i = U ? U(t.value, n) : t.value;
314
- return /* @__PURE__ */ x(pe, {
315
+ return /* @__PURE__ */ x(he, {
315
316
  ...r,
316
- className: e("fill-muted-foreground", Z.has(t.value) && "fill-primary italic"),
317
+ className: e("fill-muted-foreground", ot.has(t.value) && "fill-primary italic"),
317
318
  fontSize: 12,
318
319
  children: i
319
320
  });
320
- } : void 0, tt = De ? {
321
+ } : void 0, ct = Pe ? {
321
322
  ...H?.fill === void 0 ? {} : { fill: H.fill },
322
323
  fillOpacity: H?.opacity ?? .85
323
- } : !1, Q = `bar-${r}`, nt = /* @__PURE__ */ new Set([z]);
324
- J.forEach(({ settings: e }) => {
325
- e.shape && nt.add(e.shape);
324
+ } : !1, Q = `bar-${r}`, lt = /* @__PURE__ */ new Set([z]);
325
+ Y.forEach(({ settings: e }) => {
326
+ e.shape && lt.add(e.shape);
326
327
  });
327
- let rt = (e) => B === void 0 ? void 0 : (t, n) => {
328
- let r = K ? X[n]?.[e] : t;
328
+ let ut = (e) => B === void 0 ? void 0 : (t, n) => {
329
+ let r = K ? Z[n]?.[e] : t;
329
330
  return typeof r == "number" && r !== 0 ? B : 0;
330
- }, it = (e, t) => t === "gradient" ? `url(#${Q}-gradient-${d(e)})` : t === "pattern" ? `url(#${Q}-pattern-${d(e)})` : `var(--color-${d(e)})`, at = re(M), ot = ie(N), st = p(Ie), ct = ne(M, W), lt = [
331
+ }, dt = (e, t) => t === "gradient" ? `url(#${Q}-gradient-${d(e)})` : t === "pattern" ? `url(#${Q}-pattern-${d(e)})` : `var(--color-${d(e)})`, ft = re(I), pt = ie(Ee), mt = p(Ue), ht = [
331
332
  R,
332
333
  R,
333
334
  0,
334
335
  0
335
- ], $ = (e, t) => e === "pill" ? 9999 : R > 0 && t ? lt : void 0, ut = /* @__PURE__ */ x(A, {
336
- content: Be,
337
- dataKeys: w
338
- }), dt = /* @__PURE__ */ x(j, { dataKeys: w }), ft = () => /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ x(me, {
339
- dataKey: T,
336
+ ], $ = (e, t) => e === "pill" ? 9999 : R > 0 && t ? ht : void 0, gt = /* @__PURE__ */ x(ve, {
337
+ content: qe,
338
+ dataKeys: j
339
+ }), _t = /* @__PURE__ */ x(ye, { dataKeys: j }), vt = () => /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ x(ge, {
340
+ dataKey: M,
340
341
  type: "category",
341
- hide: !je,
342
+ hide: !Re,
342
343
  tickLine: !1,
343
344
  axisLine: !1,
344
- tick: et,
345
+ tick: st,
345
346
  tickFormatter: U,
346
347
  angle: W,
347
- interval: Pe,
348
+ interval: Ve,
348
349
  textAnchor: te(W),
349
- height: ct,
350
- label: at
351
- }), /* @__PURE__ */ x(he, {
350
+ height: w.height,
351
+ label: ft
352
+ }), /* @__PURE__ */ x(_e, {
352
353
  type: "number",
353
- hide: !Me,
354
+ hide: !ze,
354
355
  tickLine: !1,
355
356
  axisLine: !1,
356
- unit: P,
357
- tickFormatter: Ne,
358
- tickCount: Fe,
359
- domain: st,
360
- width: N ? 72 : void 0,
361
- label: ot
362
- })] }), pt = () => w.map((e, t) => {
363
- let n = !K || t === w.length - 1, r = J.get(e), i = (e) => r !== void 0 && e >= r.range[0] && e <= r.range[1], a = Y.get(e), { shape: o, activeBar: s } = _e({
357
+ unit: De,
358
+ tickFormatter: Be,
359
+ tickCount: He,
360
+ domain: mt,
361
+ width: Ee ? 72 : void 0,
362
+ label: pt
363
+ })] }), yt = () => j.map((e, t) => {
364
+ let n = !K || t === j.length - 1, r = Y.get(e), i = (e) => r !== void 0 && e >= r.range[0] && e <= r.range[1], a = X.get(e), { shape: o, activeBar: s } = be({
364
365
  rangeBackground: r?.settings.background === !0,
365
366
  inRange: i,
366
367
  trackFill: V,
367
- activeBarOption: tt
368
- }), c = r && xe({
369
- data: u,
370
- chartData: X,
371
- xKey: T,
368
+ activeBarOption: ct
369
+ }), c = r && Te({
370
+ data: A,
371
+ chartData: Z,
372
+ xKey: M,
372
373
  seriesKey: e,
373
374
  settings: r.settings,
374
375
  range: r.range,
375
376
  headroomKey: a,
376
377
  barShape: z,
377
378
  rounded: n,
378
- fillOf: it,
379
+ fillOf: dt,
379
380
  radiusFor: $
380
- }), l = Ge && /* @__PURE__ */ x(ue, {
381
+ }), l = Qe && /* @__PURE__ */ x(fe, {
381
382
  dataKey: e,
382
383
  position: q,
383
- formatter: ae(qe),
384
+ formatter: ae(et),
384
385
  className: v(q),
385
386
  fontSize: 12
386
387
  });
387
388
  return /* @__PURE__ */ S(y.Fragment, { children: [/* @__PURE__ */ S(C, {
388
389
  dataKey: e,
389
- fill: it(e, z),
390
+ fill: dt(e, z),
390
391
  stackId: K ? "a" : a ? e : void 0,
391
392
  radius: $(z, n),
392
- minPointSize: rt(e),
393
- background: Ee ? { fill: V } : void 0,
393
+ minPointSize: ut(e),
394
+ background: Ne ? { fill: V } : void 0,
394
395
  shape: o,
395
396
  activeBar: s,
396
397
  ...G,
397
398
  children: [c, l]
398
399
  }), a && /* @__PURE__ */ x(C, {
399
- dataKey: `${D}${e}`,
400
+ dataKey: `${O}${e}`,
400
401
  stackId: e,
401
402
  fill: `var(--color-${d(e)})`,
402
403
  fillOpacity: .25,
@@ -405,67 +406,69 @@ var R = y.forwardRef((t, n) => {
405
406
  tooltipType: "none",
406
407
  ...G
407
408
  })] }, e);
408
- }), mt = () => $e.map(({ area: e, range: t }, n) => {
409
+ }), bt = () => J.map(({ area: e, range: t }, n) => {
409
410
  let [r, i] = t;
410
- return /* @__PURE__ */ x(de, {
411
- x1: u[r]?.[T],
412
- x2: u[i]?.[T],
411
+ return /* @__PURE__ */ x(pe, {
412
+ x1: A[r]?.[M],
413
+ x2: A[i]?.[M],
413
414
  fill: "var(--ui-background-surface-secondary)",
414
415
  fillOpacity: .6,
415
416
  ifOverflow: "extendDomain",
416
- shape: ve(e.divider),
417
- label: ye(e.label)
417
+ shape: Se(e.divider),
418
+ label: Ce(e.label)
418
419
  }, `${e.label ?? "area"}-${n}`);
419
- }), ht = () => Qe.map((e, t) => {
420
- let n = _(e, u, w);
421
- return n === void 0 ? null : /* @__PURE__ */ x(fe, {
420
+ }), xt = () => at.map((e, t) => {
421
+ let n = _(e, A, j);
422
+ return n === void 0 ? null : /* @__PURE__ */ x(me, {
422
423
  y: n,
423
424
  ...ee(e.label, e.labelPosition ?? "insideTopRight")
424
425
  }, `${e.label ?? "ref"}-${t}`);
425
426
  });
426
427
  return /* @__PURE__ */ x("div", {
427
428
  ref: n,
428
- "data-orientation": F,
429
- "data-layout": I,
430
- className: e(ge({
431
- orientation: F,
432
- layout: I
433
- }), i),
434
- ...Ze,
429
+ "data-orientation": Oe,
430
+ "data-layout": L,
431
+ className: e(D({
432
+ orientation: Oe,
433
+ layout: L
434
+ }), T),
435
+ ...it,
435
436
  children: /* @__PURE__ */ x(a, {
436
- config: s,
437
- palette: l,
437
+ ref: i,
438
+ config: E,
439
+ palette: k,
438
440
  className: "size-full [&_.recharts-label]:fill-foreground",
439
- children: /* @__PURE__ */ S(se, {
440
- data: X,
441
+ children: /* @__PURE__ */ S(le, {
442
+ data: Z,
441
443
  layout: "horizontal",
442
- barSize: Se,
443
- maxBarSize: Ce,
444
- barGap: we,
445
- barCategoryGap: Te,
444
+ barSize: ke,
445
+ maxBarSize: Ae,
446
+ barGap: je,
447
+ barCategoryGap: Me,
448
+ margin: se(void 0, w.margin),
446
449
  children: [
447
- /* @__PURE__ */ x(be, {
450
+ /* @__PURE__ */ x(we, {
448
451
  id: Q,
449
- dataKeys: w,
450
- shapes: nt
452
+ dataKeys: j,
453
+ shapes: lt
451
454
  }),
452
- Oe && /* @__PURE__ */ x(le, {
453
- horizontal: Re ?? !0,
454
- vertical: ze ?? !1,
455
- strokeDasharray: Le ? "3 3" : void 0
455
+ Fe && /* @__PURE__ */ x(de, {
456
+ horizontal: Ge ?? !0,
457
+ vertical: Ke ?? !1,
458
+ strokeDasharray: We ? "3 3" : void 0
456
459
  }),
457
- ft(),
458
- ke && /* @__PURE__ */ x(c, { content: ut }),
459
- Ae && /* @__PURE__ */ x(o, { content: dt }),
460
- pt(),
461
- mt(),
462
- ht(),
463
- Je && /* @__PURE__ */ x(ce, {
464
- dataKey: T,
460
+ vt(),
461
+ Ie && /* @__PURE__ */ x(c, { content: gt }),
462
+ Le && /* @__PURE__ */ x(o, { content: _t }),
463
+ yt(),
464
+ bt(),
465
+ xt(),
466
+ tt && /* @__PURE__ */ x(ue, {
467
+ dataKey: M,
465
468
  tickFormatter: U,
466
469
  ...m({
467
- brushHeight: Ye,
468
- brushAriaLabel: Xe
470
+ brushHeight: nt,
471
+ brushAriaLabel: rt
469
472
  })
470
473
  })
471
474
  ]
@@ -473,8 +476,8 @@ var R = y.forwardRef((t, n) => {
473
476
  })
474
477
  });
475
478
  });
476
- R.displayName = "BarChart";
479
+ I.displayName = "BarChart";
477
480
  //#endregion
478
- export { R as BarChart, j as NormalizedLegendContent, A as NormalizedTooltipContent, ge as barChartVariants, N as createTrackShape, O as dropHeadroomSeries, k as withSeriesColor };
481
+ export { I as BarChart, ye as NormalizedLegendContent, ve as NormalizedTooltipContent, D as barChartVariants, M as createTrackShape, k as dropHeadroomSeries, A as withSeriesColor };
479
482
 
480
483
  //# sourceMappingURL=bar-chart.js.map