@acronis-platform/ui-react 5.1.1 → 5.3.0

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 (55) hide show
  1. package/dist/components/ui/area-chart/area-chart.js +107 -107
  2. package/dist/components/ui/area-chart/area-chart.js.map +1 -1
  3. package/dist/components/ui/bar-chart/bar-chart.js +162 -162
  4. package/dist/components/ui/bar-chart/bar-chart.js.map +1 -1
  5. package/dist/components/ui/category-bar/category-bar.js +50 -50
  6. package/dist/components/ui/category-bar/category-bar.js.map +1 -1
  7. package/dist/components/ui/chart/chart.js +53 -40
  8. package/dist/components/ui/chart/chart.js.map +1 -1
  9. package/dist/components/ui/checkbox/checkbox.js +1 -1
  10. package/dist/components/ui/checkbox/checkbox.js.map +1 -1
  11. package/dist/components/ui/combobox/combobox.js +1 -1
  12. package/dist/components/ui/combobox/combobox.js.map +1 -1
  13. package/dist/components/ui/composed-chart/composed-chart.js +146 -146
  14. package/dist/components/ui/composed-chart/composed-chart.js.map +1 -1
  15. package/dist/components/ui/confidence-cone/confidence-cone.js +97 -97
  16. package/dist/components/ui/confidence-cone/confidence-cone.js.map +1 -1
  17. package/dist/components/ui/dropdown-menu/dropdown-menu.js +2 -2
  18. package/dist/components/ui/dropdown-menu/dropdown-menu.js.map +1 -1
  19. package/dist/components/ui/funnel-chart/funnel-chart.js +120 -120
  20. package/dist/components/ui/funnel-chart/funnel-chart.js.map +1 -1
  21. package/dist/components/ui/histogram/histogram.js +58 -58
  22. package/dist/components/ui/histogram/histogram.js.map +1 -1
  23. package/dist/components/ui/input-num-picker/input-num-picker.js.map +1 -1
  24. package/dist/components/ui/input-select/input-select.js +1 -1
  25. package/dist/components/ui/input-select/input-select.js.map +1 -1
  26. package/dist/components/ui/line-chart/line-chart.js +91 -91
  27. package/dist/components/ui/line-chart/line-chart.js.map +1 -1
  28. package/dist/components/ui/number-field/number-field.js.map +1 -1
  29. package/dist/components/ui/pie-chart/pie-chart.js +92 -92
  30. package/dist/components/ui/pie-chart/pie-chart.js.map +1 -1
  31. package/dist/components/ui/radar-chart/radar-chart.js +37 -37
  32. package/dist/components/ui/radar-chart/radar-chart.js.map +1 -1
  33. package/dist/components/ui/radial-bar-chart/radial-bar-chart.js +112 -112
  34. package/dist/components/ui/radial-bar-chart/radial-bar-chart.js.map +1 -1
  35. package/dist/components/ui/sankey-chart/sankey-chart.js +78 -78
  36. package/dist/components/ui/sankey-chart/sankey-chart.js.map +1 -1
  37. package/dist/components/ui/scatter-chart/scatter-chart.js +57 -57
  38. package/dist/components/ui/scatter-chart/scatter-chart.js.map +1 -1
  39. package/dist/components/ui/sidebar-primary/sidebar-primary.js +10 -5
  40. package/dist/components/ui/sidebar-primary/sidebar-primary.js.map +1 -1
  41. package/dist/components/ui/treemap/treemap.js +87 -87
  42. package/dist/components/ui/treemap/treemap.js.map +1 -1
  43. package/dist/index.js +111 -111
  44. package/dist/llms/checkbox.md +63 -12
  45. package/dist/llms/sidebar-primary.md +18 -1
  46. package/dist/llms.txt +1 -1
  47. package/dist/react.js +111 -111
  48. package/dist/src/components/ui/chart/chart.d.ts +1 -0
  49. package/dist/src/components/ui/chart/index.d.ts +1 -1
  50. package/dist/src/components/ui/radial-bar-chart/radial-bar-chart.d.ts +3 -2
  51. package/dist/src/components/ui/sankey-chart/sankey-chart.d.ts +1 -1
  52. package/dist/src/components/ui/sidebar-primary/sidebar-primary.d.ts +23 -0
  53. package/dist/src/components/ui/treemap/treemap.d.ts +3 -2
  54. package/dist/ui-react.css +1 -1
  55. package/package.json +2 -2
@@ -2,12 +2,12 @@
2
2
  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
- import { ChartContainer as a, ChartLegend as o, ChartLegendContent as s, ChartTooltip as c, ChartTooltipContent as l, resolveChartColors as u } from "../chart/chart.js";
6
- import { resolveAnimation as d, resolveAxisDomain as f, resolveBrushProps as p, resolveCartesianLabelPosition as m, resolveCategoryRange as h, resolveChartReferenceValue as g, resolveLabelFillClass as _, 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";
7
- import * as v from "react";
8
- import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
9
- import { Bar as S, BarChart as se, Brush as ce, CartesianGrid as le, Cell as C, LabelList as ue, Rectangle as w, ReferenceArea as de, ReferenceLine as fe, Text as pe, XAxis as me, YAxis as he } from "recharts";
10
- import { Meter as T } from "@base-ui/react/meter";
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";
7
+ import * as y from "react";
8
+ 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 { Meter as E } from "@base-ui/react/meter";
11
11
  //#region src/components/ui/bar-chart/bar-chart.tsx
12
12
  var ge = t("", {
13
13
  variants: {
@@ -24,39 +24,39 @@ var ge = t("", {
24
24
  orientation: "vertical",
25
25
  layout: "grouped"
26
26
  }
27
- }), E = "__headroom_";
28
- function D(e, t) {
29
- let n = e?.filter((e) => !String(e.dataKey).startsWith(E));
27
+ }), D = "__headroom_";
28
+ function O(e, t) {
29
+ let n = e?.filter((e) => !String(e.dataKey).startsWith(D));
30
30
  return t ? n?.slice().sort((e, n) => t.indexOf(String(e.dataKey)) - t.indexOf(String(n.dataKey))) : n;
31
31
  }
32
- function O(e) {
32
+ function k(e) {
33
33
  return e?.map((e) => e.color?.startsWith("url(") ? {
34
34
  ...e,
35
- color: `var(--color-${String(e.dataKey)})`
35
+ color: `var(--color-${d(String(e.dataKey))})`
36
36
  } : e);
37
37
  }
38
- function k({ content: e, dataKeys: t, ...n }) {
38
+ function A({ content: e, dataKeys: t, ...n }) {
39
39
  let r = {
40
40
  ...n,
41
- payload: O(D(n.payload, t))
41
+ payload: k(O(n.payload, t))
42
42
  };
43
- return e ? typeof e == "function" ? v.createElement(e, r) : v.cloneElement(e, r) : /* @__PURE__ */ b(l, { ...r });
43
+ return e ? typeof e == "function" ? y.createElement(e, r) : y.cloneElement(e, r) : /* @__PURE__ */ x(l, { ...r });
44
44
  }
45
- function A({ dataKeys: e, ...t }) {
46
- return /* @__PURE__ */ b(s, {
45
+ function j({ dataKeys: e, ...t }) {
46
+ return /* @__PURE__ */ x(s, {
47
47
  verticalAlign: t.verticalAlign,
48
- payload: O(D(t.payload, e))
48
+ payload: k(O(t.payload, e))
49
49
  });
50
50
  }
51
- function j({ bar: e, track: t, trackFill: n, paint: r }) {
52
- return /* @__PURE__ */ x(y, { children: [t && /* @__PURE__ */ b(w, {
51
+ function M({ bar: e, track: t, trackFill: n, paint: r }) {
52
+ return /* @__PURE__ */ S(b, { children: [t && /* @__PURE__ */ x(T, {
53
53
  className: "recharts-bar-background-rectangle",
54
54
  x: t.x ?? void 0,
55
55
  y: t.y ?? void 0,
56
56
  width: t.width ?? void 0,
57
57
  height: t.height ?? void 0,
58
58
  fill: n
59
- }), /* @__PURE__ */ b(w, {
59
+ }), /* @__PURE__ */ x(T, {
60
60
  x: e.x ?? void 0,
61
61
  y: e.y ?? void 0,
62
62
  width: e.width ?? void 0,
@@ -69,8 +69,8 @@ function j({ bar: e, track: t, trackFill: n, paint: r }) {
69
69
  strokeDasharray: e.strokeDasharray
70
70
  })] });
71
71
  }
72
- function M({ inRange: e, trackFill: t, paint: n }) {
73
- return ({ background: r, index: i, ...a }) => j({
72
+ function N({ inRange: e, trackFill: t, paint: n }) {
73
+ return ({ background: r, index: i, ...a }) => M({
74
74
  bar: a,
75
75
  track: e(i) ? r : void 0,
76
76
  trackFill: t,
@@ -79,11 +79,11 @@ function M({ inRange: e, trackFill: t, paint: n }) {
79
79
  }
80
80
  function _e({ rangeBackground: e, inRange: t, trackFill: n, activeBarOption: r }) {
81
81
  return e ? {
82
- shape: M({
82
+ shape: N({
83
83
  inRange: t,
84
84
  trackFill: n
85
85
  }),
86
- activeBar: r && M({
86
+ activeBar: r && N({
87
87
  inRange: t,
88
88
  trackFill: n,
89
89
  paint: r
@@ -93,9 +93,9 @@ function _e({ rangeBackground: e, inRange: t, trackFill: n, activeBarOption: r }
93
93
  activeBar: r
94
94
  };
95
95
  }
96
- function N(e) {
96
+ function P(e) {
97
97
  let { x: t = 0, y: n = 0, width: r = 0, height: i = 0, fill: a, fillOpacity: o } = e;
98
- return /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b(w, {
98
+ return /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ x(T, {
99
99
  className: "recharts-reference-area-rect",
100
100
  x: t,
101
101
  y: n,
@@ -103,7 +103,7 @@ function N(e) {
103
103
  height: i,
104
104
  fill: a,
105
105
  fillOpacity: o
106
- }), /* @__PURE__ */ b("line", {
106
+ }), /* @__PURE__ */ x("line", {
107
107
  x1: t,
108
108
  y1: n,
109
109
  x2: t,
@@ -113,7 +113,7 @@ function N(e) {
113
113
  })] });
114
114
  }
115
115
  function ve(e) {
116
- if (e) return N;
116
+ if (e) return P;
117
117
  }
118
118
  function ye(e) {
119
119
  return e ? {
@@ -125,76 +125,76 @@ function ye(e) {
125
125
  }
126
126
  function be({ id: e, dataKeys: t, shapes: n }) {
127
127
  let r = n.has("gradient"), i = n.has("pattern");
128
- return !r && !i ? null : /* @__PURE__ */ b("defs", { children: t.map((t) => /* @__PURE__ */ x(v.Fragment, { children: [r && /* @__PURE__ */ x("linearGradient", {
129
- id: `${e}-gradient-${t}`,
128
+ return !r && !i ? null : /* @__PURE__ */ x("defs", { children: t.map((t) => /* @__PURE__ */ S(y.Fragment, { children: [r && /* @__PURE__ */ S("linearGradient", {
129
+ id: `${e}-gradient-${d(t)}`,
130
130
  x1: "0",
131
131
  y1: "0",
132
132
  x2: "0",
133
133
  y2: "1",
134
- children: [/* @__PURE__ */ b("stop", {
134
+ children: [/* @__PURE__ */ x("stop", {
135
135
  offset: "0%",
136
- stopColor: `var(--color-${t})`,
136
+ stopColor: `var(--color-${d(t)})`,
137
137
  stopOpacity: 1
138
- }), /* @__PURE__ */ b("stop", {
138
+ }), /* @__PURE__ */ x("stop", {
139
139
  offset: "100%",
140
- stopColor: `var(--color-${t})`,
140
+ stopColor: `var(--color-${d(t)})`,
141
141
  stopOpacity: .35
142
142
  })]
143
- }), i && /* @__PURE__ */ x("pattern", {
144
- id: `${e}-pattern-${t}`,
143
+ }), i && /* @__PURE__ */ S("pattern", {
144
+ id: `${e}-pattern-${d(t)}`,
145
145
  patternUnits: "userSpaceOnUse",
146
146
  width: 6,
147
147
  height: 6,
148
148
  patternTransform: "rotate(45)",
149
- children: [/* @__PURE__ */ b("rect", {
149
+ children: [/* @__PURE__ */ x("rect", {
150
150
  width: 6,
151
151
  height: 6,
152
- fill: `var(--color-${t})`,
152
+ fill: `var(--color-${d(t)})`,
153
153
  fillOpacity: .25
154
- }), /* @__PURE__ */ b("line", {
154
+ }), /* @__PURE__ */ x("line", {
155
155
  x1: 0,
156
156
  y1: 0,
157
157
  x2: 0,
158
158
  y2: 6,
159
- stroke: `var(--color-${t})`,
159
+ stroke: `var(--color-${d(t)})`,
160
160
  strokeWidth: 3
161
161
  })]
162
162
  })] }, t)) });
163
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
- let { fill: d, opacity: f, dashed: p } = i;
166
- return e.map((e, m) => {
167
- let h = m >= a[0] && m <= a[1], g = h && i.shape || s, _ = o !== void 0 && Number(t[m]?.[`${E}${r}`]) > 0;
168
- return /* @__PURE__ */ b(C, {
169
- fill: h ? d ?? l(r, g) : l(r, s),
170
- fillOpacity: h ? f : void 0,
171
- stroke: h && p ? `var(--color-${r})` : void 0,
172
- strokeWidth: h && p ? 1 : void 0,
173
- strokeDasharray: h && p ? "4 3" : void 0,
174
- radius: _ ? void 0 : u(g, c)
175
- }, `${r}-${String(e[n])}-${m}`);
165
+ let { fill: f, opacity: p, dashed: m } = i;
166
+ 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
+ return /* @__PURE__ */ x(w, {
169
+ fill: g ? f ?? l(r, _) : l(r, s),
170
+ fillOpacity: g ? p : void 0,
171
+ stroke: g && m ? `var(--color-${d(r)})` : void 0,
172
+ strokeWidth: g && m ? 1 : void 0,
173
+ strokeDasharray: g && m ? "4 3" : void 0,
174
+ radius: v ? void 0 : u(_, c)
175
+ }, `${r}-${String(e[n])}-${h}`);
176
176
  });
177
177
  }
178
- var P = (e) => e.toLocaleString();
179
- function F({ item: t, resolvedColor: a, max: o, valueFormatter: s, showTooltip: c, tooltip: l }) {
180
- 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__ */ x(T.Root, {
178
+ var F = (e) => e.toLocaleString();
179
+ function I({ item: t, resolvedColor: a, max: o, valueFormatter: s, showTooltip: c, tooltip: l }) {
180
+ 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
181
  value: d,
182
182
  max: o,
183
183
  "aria-valuemax": o,
184
184
  "aria-valuetext": h ? `${s(d)} of ${s(o)} (${m}%), forecast ${s(f)}` : `${s(d)} of ${s(o)} (${m}%)`,
185
185
  tabIndex: c ? 0 : void 0,
186
186
  className: "flex w-full flex-col gap-1.5",
187
- children: [/* @__PURE__ */ x("div", {
187
+ children: [/* @__PURE__ */ S("div", {
188
188
  className: "flex items-baseline justify-between gap-2 text-sm leading-none",
189
- children: [/* @__PURE__ */ b(T.Label, {
189
+ children: [/* @__PURE__ */ x(E.Label, {
190
190
  className: "truncate font-semibold",
191
191
  children: u
192
- }), /* @__PURE__ */ x("span", {
192
+ }), /* @__PURE__ */ S("span", {
193
193
  className: "shrink-0 tabular-nums",
194
- children: [/* @__PURE__ */ b("span", {
194
+ children: [/* @__PURE__ */ x("span", {
195
195
  className: "font-semibold text-[var(--ui-text-on-surface-link-idle)]",
196
196
  children: s(d)
197
- }), /* @__PURE__ */ x("span", {
197
+ }), /* @__PURE__ */ S("span", {
198
198
  className: "text-muted-foreground",
199
199
  children: [
200
200
  " ",
@@ -203,9 +203,9 @@ function F({ item: t, resolvedColor: a, max: o, valueFormatter: s, showTooltip:
203
203
  ]
204
204
  })]
205
205
  })]
206
- }), /* @__PURE__ */ x(T.Track, {
206
+ }), /* @__PURE__ */ S(E.Track, {
207
207
  className: "relative h-2 w-full overflow-hidden rounded-full bg-[var(--ui-background-status-neutral-pressed)]",
208
- children: [h && /* @__PURE__ */ b("div", {
208
+ children: [h && /* @__PURE__ */ x("div", {
209
209
  "data-forecast": !0,
210
210
  className: "absolute inset-y-0 start-0 rounded-full",
211
211
  style: {
@@ -213,24 +213,24 @@ function F({ item: t, resolvedColor: a, max: o, valueFormatter: s, showTooltip:
213
213
  opacity: .3,
214
214
  width: `${f / o * 100}%`
215
215
  }
216
- }), /* @__PURE__ */ b(T.Indicator, {
216
+ }), /* @__PURE__ */ x(E.Indicator, {
217
217
  className: "relative rounded-full",
218
218
  style: { backgroundColor: p }
219
219
  })]
220
220
  })]
221
221
  });
222
- return c ? /* @__PURE__ */ x(n, { children: [/* @__PURE__ */ b(i, { render: g }), /* @__PURE__ */ b(r, {
222
+ return c ? /* @__PURE__ */ S(n, { children: [/* @__PURE__ */ x(i, { render: g }), /* @__PURE__ */ x(r, {
223
223
  className: e("border border-border bg-background text-foreground shadow-md", !l && "flex items-center gap-2"),
224
- children: l ?? /* @__PURE__ */ x(y, { children: [
225
- /* @__PURE__ */ b("span", {
224
+ children: l ?? /* @__PURE__ */ S(b, { children: [
225
+ /* @__PURE__ */ x("span", {
226
226
  className: "size-2.5 shrink-0 rounded-full",
227
227
  style: { backgroundColor: p }
228
228
  }),
229
- /* @__PURE__ */ b("span", {
229
+ /* @__PURE__ */ x("span", {
230
230
  className: "font-semibold",
231
231
  children: u
232
232
  }),
233
- /* @__PURE__ */ x("span", {
233
+ /* @__PURE__ */ S("span", {
234
234
  className: "text-muted-foreground",
235
235
  children: [
236
236
  s(d),
@@ -244,8 +244,8 @@ function F({ item: t, resolvedColor: a, max: o, valueFormatter: s, showTooltip:
244
244
  ] })
245
245
  })] }) : g;
246
246
  }
247
- var I = v.forwardRef(({ items: t, max: n, palette: r, valueFormatter: i = P, showTooltip: a = !0, tooltip: o, className: s, ...c }, l) => {
248
- let d = n !== void 0 && n > 0 ? n : t.reduce((e, t) => e + t.value, 0) || 1, f = v.useMemo(() => {
247
+ var L = y.forwardRef(({ items: t, max: n, palette: r, valueFormatter: i = F, showTooltip: a = !0, tooltip: o, className: s, ...c }, l) => {
248
+ let d = n !== void 0 && n > 0 ? n : t.reduce((e, t) => e + t.value, 0) || 1, f = y.useMemo(() => {
249
249
  if (!r) return null;
250
250
  let e = Object.fromEntries(t.map((e, t) => [`item${t}`, {
251
251
  label: e.label,
@@ -253,12 +253,12 @@ var I = v.forwardRef(({ items: t, max: n, palette: r, valueFormatter: i = P, sho
253
253
  }])), n = u(e, r);
254
254
  return t.map((e, t) => e.color ?? n[`item${t}`]?.color ?? "");
255
255
  }, [t, r]);
256
- return /* @__PURE__ */ b("div", {
256
+ return /* @__PURE__ */ x("div", {
257
257
  ref: l,
258
258
  "data-orientation": "horizontal",
259
259
  className: e("flex flex-col gap-4", s),
260
260
  ...c,
261
- children: t.map((e, t) => /* @__PURE__ */ b(F, {
261
+ children: t.map((e, t) => /* @__PURE__ */ x(I, {
262
262
  item: e,
263
263
  resolvedColor: f ? f[t] ?? "" : e.color ?? "",
264
264
  max: d,
@@ -268,35 +268,35 @@ var I = v.forwardRef(({ items: t, max: n, palette: r, valueFormatter: i = P, sho
268
268
  }, `${t}-${e.label}`))
269
269
  });
270
270
  });
271
- I.displayName = "HorizontalBarLayout";
272
- var L = v.forwardRef((t, n) => {
273
- let r = v.useId().replace(/:/g, "");
271
+ L.displayName = "HorizontalBarLayout";
272
+ var R = y.forwardRef((t, n) => {
273
+ let r = y.useId().replace(/:/g, "");
274
274
  if (t.orientation === "horizontal") {
275
275
  let { orientation: e, ...r } = t;
276
- return /* @__PURE__ */ b(I, {
276
+ return /* @__PURE__ */ x(L, {
277
277
  ...r,
278
278
  ref: n
279
279
  });
280
280
  }
281
- let { className: i, config: s, palette: l, data: u, dataKeys: C, xKey: w, referenceLine: T, referenceArea: D, barSettings: O, xAxisLabel: j, yAxisLabel: M, yUnit: N, orientation: P = "vertical", layout: F = "grouped", barRadius: L = 8, barShape: R = "rounded", barSize: Se = 8, maxBarSize: Ce, barGap: we = 4, barCategoryGap: Te, minPointSize: z, showBackground: Ee = !1, backgroundFill: B = "var(--ui-background-surface-secondary)", showActiveBar: De = !1, activeBar: V, showGrid: Oe = !0, showTooltip: ke = !0, showLegend: Ae = !0, showXAxis: je = !0, showYAxis: Me = !0, xTickFormatter: H, yTickFormatter: Ne, xAxisAngle: U, 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, W = d({
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
282
  animate: Ve,
283
283
  animationDuration: He,
284
284
  animationBegin: Ue,
285
285
  animationEasing: We
286
- }), G = F === "stacked", K = m({
286
+ }), K = I === "stacked", q = h({
287
287
  labelPosition: Ke,
288
- isStacked: G,
288
+ isStacked: K,
289
289
  growingEnd: "top"
290
- }), Qe = oe(T), q = (D ? Array.isArray(D) ? D : [D] : []).map((e) => ({
290
+ }), Qe = oe(E), $e = (O ? Array.isArray(O) ? O : [O] : []).map((e) => ({
291
291
  area: e,
292
- range: h(e, u, w)
293
- })).filter((e) => e.range !== void 0), J = new Map(C.flatMap((e) => {
294
- let t = O?.[e], n = t ? h(t, u, w) : void 0;
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;
295
295
  return t && n ? [[e, {
296
296
  settings: t,
297
297
  range: n
298
298
  }]] : [];
299
- })), Y = new Map(G ? [] : 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) => {
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
300
  let n = {};
301
301
  return Y.forEach((r, i) => {
302
302
  let a = J.get(i);
@@ -304,139 +304,139 @@ var L = v.forwardRef((t, n) => {
304
304
  let [o, s] = a.range;
305
305
  if (t < o || t > s) return;
306
306
  let c = e[i], l = e[r];
307
- typeof c == "number" && typeof l == "number" && (n[`${E}${i}`] = Math.max(0, l - c));
307
+ typeof c == "number" && typeof l == "number" && (n[`${D}${i}`] = Math.max(0, l - c));
308
308
  }), {
309
309
  ...e,
310
310
  ...n
311
311
  };
312
- }) : u, Z = new Set(q.filter(({ area: e }) => e.highlightTicks !== !1).flatMap(({ range: e }) => u.slice(e[0], e[1] + 1).map((e) => e[w]))), $e = Z.size ? ({ payload: t, index: n, ...r }) => {
313
- let i = H ? H(t.value, n) : t.value;
314
- return /* @__PURE__ */ b(pe, {
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
+ let i = U ? U(t.value, n) : t.value;
314
+ return /* @__PURE__ */ x(pe, {
315
315
  ...r,
316
316
  className: e("fill-muted-foreground", Z.has(t.value) && "fill-primary italic"),
317
317
  fontSize: 12,
318
318
  children: i
319
319
  });
320
- } : void 0, et = De ? {
321
- ...V?.fill === void 0 ? {} : { fill: V.fill },
322
- fillOpacity: V?.opacity ?? .85
323
- } : !1, Q = `bar-${r}`, tt = /* @__PURE__ */ new Set([R]);
320
+ } : void 0, tt = De ? {
321
+ ...H?.fill === void 0 ? {} : { fill: H.fill },
322
+ fillOpacity: H?.opacity ?? .85
323
+ } : !1, Q = `bar-${r}`, nt = /* @__PURE__ */ new Set([z]);
324
324
  J.forEach(({ settings: e }) => {
325
- e.shape && tt.add(e.shape);
325
+ e.shape && nt.add(e.shape);
326
326
  });
327
- let nt = (e) => z === void 0 ? void 0 : (t, n) => {
328
- let r = G ? X[n]?.[e] : t;
329
- return typeof r == "number" && r !== 0 ? z : 0;
330
- }, rt = (e, t) => t === "gradient" ? `url(#${Q}-gradient-${e})` : t === "pattern" ? `url(#${Q}-pattern-${e})` : `var(--color-${e})`, it = re(j), at = ie(M), ot = f(Ie), st = ne(j, U), ct = [
331
- L,
332
- L,
327
+ let rt = (e) => B === void 0 ? void 0 : (t, n) => {
328
+ let r = K ? X[n]?.[e] : t;
329
+ 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
+ R,
332
+ R,
333
333
  0,
334
334
  0
335
- ], $ = (e, t) => e === "pill" ? 9999 : L > 0 && t ? ct : void 0, lt = /* @__PURE__ */ b(k, {
335
+ ], $ = (e, t) => e === "pill" ? 9999 : R > 0 && t ? lt : void 0, ut = /* @__PURE__ */ x(A, {
336
336
  content: Be,
337
- dataKeys: C
338
- }), ut = /* @__PURE__ */ b(A, { dataKeys: C }), dt = () => /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b(me, {
339
- dataKey: w,
337
+ dataKeys: w
338
+ }), dt = /* @__PURE__ */ x(j, { dataKeys: w }), ft = () => /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ x(me, {
339
+ dataKey: T,
340
340
  type: "category",
341
341
  hide: !je,
342
342
  tickLine: !1,
343
343
  axisLine: !1,
344
- tick: $e,
345
- tickFormatter: H,
346
- angle: U,
344
+ tick: et,
345
+ tickFormatter: U,
346
+ angle: W,
347
347
  interval: Pe,
348
- textAnchor: te(U),
349
- height: st,
350
- label: it
351
- }), /* @__PURE__ */ b(he, {
348
+ textAnchor: te(W),
349
+ height: ct,
350
+ label: at
351
+ }), /* @__PURE__ */ x(he, {
352
352
  type: "number",
353
353
  hide: !Me,
354
354
  tickLine: !1,
355
355
  axisLine: !1,
356
- unit: N,
356
+ unit: P,
357
357
  tickFormatter: Ne,
358
358
  tickCount: Fe,
359
- domain: ot,
360
- width: M ? 72 : void 0,
361
- label: at
362
- })] }), ft = () => C.map((e, t) => {
363
- let n = !G || t === C.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({
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({
364
364
  rangeBackground: r?.settings.background === !0,
365
365
  inRange: i,
366
- trackFill: B,
367
- activeBarOption: et
366
+ trackFill: V,
367
+ activeBarOption: tt
368
368
  }), c = r && xe({
369
369
  data: u,
370
370
  chartData: X,
371
- xKey: w,
371
+ xKey: T,
372
372
  seriesKey: e,
373
373
  settings: r.settings,
374
374
  range: r.range,
375
375
  headroomKey: a,
376
- barShape: R,
376
+ barShape: z,
377
377
  rounded: n,
378
- fillOf: rt,
378
+ fillOf: it,
379
379
  radiusFor: $
380
- }), l = Ge && /* @__PURE__ */ b(ue, {
380
+ }), l = Ge && /* @__PURE__ */ x(ue, {
381
381
  dataKey: e,
382
- position: K,
382
+ position: q,
383
383
  formatter: ae(qe),
384
- className: _(K),
384
+ className: v(q),
385
385
  fontSize: 12
386
386
  });
387
- return /* @__PURE__ */ x(v.Fragment, { children: [/* @__PURE__ */ x(S, {
387
+ return /* @__PURE__ */ S(y.Fragment, { children: [/* @__PURE__ */ S(C, {
388
388
  dataKey: e,
389
- fill: rt(e, R),
390
- stackId: G ? "a" : a ? e : void 0,
391
- radius: $(R, n),
392
- minPointSize: nt(e),
393
- background: Ee ? { fill: B } : void 0,
389
+ fill: it(e, z),
390
+ stackId: K ? "a" : a ? e : void 0,
391
+ radius: $(z, n),
392
+ minPointSize: rt(e),
393
+ background: Ee ? { fill: V } : void 0,
394
394
  shape: o,
395
395
  activeBar: s,
396
- ...W,
396
+ ...G,
397
397
  children: [c, l]
398
- }), a && /* @__PURE__ */ b(S, {
399
- dataKey: `${E}${e}`,
398
+ }), a && /* @__PURE__ */ x(C, {
399
+ dataKey: `${D}${e}`,
400
400
  stackId: e,
401
- fill: `var(--color-${e})`,
401
+ fill: `var(--color-${d(e)})`,
402
402
  fillOpacity: .25,
403
- radius: $(R, !0),
403
+ radius: $(z, !0),
404
404
  legendType: "none",
405
405
  tooltipType: "none",
406
- ...W
406
+ ...G
407
407
  })] }, e);
408
- }), pt = () => q.map(({ area: e, range: t }, n) => {
408
+ }), mt = () => $e.map(({ area: e, range: t }, n) => {
409
409
  let [r, i] = t;
410
- return /* @__PURE__ */ b(de, {
411
- x1: u[r]?.[w],
412
- x2: u[i]?.[w],
410
+ return /* @__PURE__ */ x(de, {
411
+ x1: u[r]?.[T],
412
+ x2: u[i]?.[T],
413
413
  fill: "var(--ui-background-surface-secondary)",
414
414
  fillOpacity: .6,
415
415
  ifOverflow: "extendDomain",
416
416
  shape: ve(e.divider),
417
417
  label: ye(e.label)
418
418
  }, `${e.label ?? "area"}-${n}`);
419
- }), mt = () => Qe.map((e, t) => {
420
- let n = g(e, u, C);
421
- return n === void 0 ? null : /* @__PURE__ */ b(fe, {
419
+ }), ht = () => Qe.map((e, t) => {
420
+ let n = _(e, u, w);
421
+ return n === void 0 ? null : /* @__PURE__ */ x(fe, {
422
422
  y: n,
423
423
  ...ee(e.label, e.labelPosition ?? "insideTopRight")
424
424
  }, `${e.label ?? "ref"}-${t}`);
425
425
  });
426
- return /* @__PURE__ */ b("div", {
426
+ return /* @__PURE__ */ x("div", {
427
427
  ref: n,
428
- "data-orientation": P,
429
- "data-layout": F,
428
+ "data-orientation": F,
429
+ "data-layout": I,
430
430
  className: e(ge({
431
- orientation: P,
432
- layout: F
431
+ orientation: F,
432
+ layout: I
433
433
  }), i),
434
434
  ...Ze,
435
- children: /* @__PURE__ */ b(a, {
435
+ children: /* @__PURE__ */ x(a, {
436
436
  config: s,
437
437
  palette: l,
438
438
  className: "size-full [&_.recharts-label]:fill-foreground",
439
- children: /* @__PURE__ */ x(se, {
439
+ children: /* @__PURE__ */ S(se, {
440
440
  data: X,
441
441
  layout: "horizontal",
442
442
  barSize: Se,
@@ -444,26 +444,26 @@ var L = v.forwardRef((t, n) => {
444
444
  barGap: we,
445
445
  barCategoryGap: Te,
446
446
  children: [
447
- /* @__PURE__ */ b(be, {
447
+ /* @__PURE__ */ x(be, {
448
448
  id: Q,
449
- dataKeys: C,
450
- shapes: tt
449
+ dataKeys: w,
450
+ shapes: nt
451
451
  }),
452
- Oe && /* @__PURE__ */ b(le, {
452
+ Oe && /* @__PURE__ */ x(le, {
453
453
  horizontal: Re ?? !0,
454
454
  vertical: ze ?? !1,
455
455
  strokeDasharray: Le ? "3 3" : void 0
456
456
  }),
457
- dt(),
458
- ke && /* @__PURE__ */ b(c, { content: lt }),
459
- Ae && /* @__PURE__ */ b(o, { content: ut }),
460
457
  ft(),
458
+ ke && /* @__PURE__ */ x(c, { content: ut }),
459
+ Ae && /* @__PURE__ */ x(o, { content: dt }),
461
460
  pt(),
462
461
  mt(),
463
- Je && /* @__PURE__ */ b(ce, {
464
- dataKey: w,
465
- tickFormatter: H,
466
- ...p({
462
+ ht(),
463
+ Je && /* @__PURE__ */ x(ce, {
464
+ dataKey: T,
465
+ tickFormatter: U,
466
+ ...m({
467
467
  brushHeight: Ye,
468
468
  brushAriaLabel: Xe
469
469
  })
@@ -473,8 +473,8 @@ var L = v.forwardRef((t, n) => {
473
473
  })
474
474
  });
475
475
  });
476
- L.displayName = "BarChart";
476
+ R.displayName = "BarChart";
477
477
  //#endregion
478
- export { L as BarChart, A as NormalizedLegendContent, k as NormalizedTooltipContent, ge as barChartVariants, M as createTrackShape, D as dropHeadroomSeries, O as withSeriesColor };
478
+ export { R as BarChart, j as NormalizedLegendContent, A as NormalizedTooltipContent, ge as barChartVariants, N as createTrackShape, O as dropHeadroomSeries, k as withSeriesColor };
479
479
 
480
480
  //# sourceMappingURL=bar-chart.js.map