@thebuoyant-tsdev/mui-ts-library 3.21.0 → 3.24.1

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 (38) hide show
  1. package/README.de.md +17 -6
  2. package/README.md +17 -6
  3. package/dist/components/chord-chart/ChordChart.d.ts +1 -1
  4. package/dist/components/chord-chart/ChordChart.js +66 -65
  5. package/dist/components/chord-chart/ChordChart.types.d.ts +7 -0
  6. package/dist/components/circle-packing-chart/CirclePackingChart.d.ts +1 -1
  7. package/dist/components/circle-packing-chart/CirclePackingChart.js +128 -128
  8. package/dist/components/circle-packing-chart/CirclePackingChart.types.d.ts +7 -0
  9. package/dist/components/color-picker/ColorPicker.d.ts +1 -1
  10. package/dist/components/color-picker/ColorPicker.js +282 -266
  11. package/dist/components/color-picker/ColorPicker.types.d.ts +3 -1
  12. package/dist/components/color-picker/colorPickerClasses.d.ts +35 -0
  13. package/dist/components/color-picker/colorPickerClasses.js +15 -0
  14. package/dist/components/password-strength-meter/PasswordStrengthBar.d.ts +2 -1
  15. package/dist/components/password-strength-meter/PasswordStrengthBar.js +3 -1
  16. package/dist/components/password-strength-meter/PasswordStrengthMeter.js +258 -237
  17. package/dist/components/password-strength-meter/passwordStrengthMeterClasses.d.ts +40 -0
  18. package/dist/components/password-strength-meter/passwordStrengthMeterClasses.js +16 -0
  19. package/dist/components/radial-stacked-bar-chart/RadialStackedBarChart.d.ts +1 -1
  20. package/dist/components/radial-stacked-bar-chart/RadialStackedBarChart.js +85 -84
  21. package/dist/components/radial-stacked-bar-chart/RadialStackedBarChart.types.d.ts +8 -0
  22. package/dist/components/rich-text-editor/RichTextEditorToolbar.js +115 -111
  23. package/dist/components/sunburst-chart/SunburstChart.d.ts +1 -1
  24. package/dist/components/sunburst-chart/SunburstChart.js +41 -40
  25. package/dist/components/sunburst-chart/SunburstChart.types.d.ts +7 -0
  26. package/dist/components/tag-selection/TagSelection.js +82 -79
  27. package/dist/components/tag-selection/TagSelectionAutocomplete.js +102 -98
  28. package/dist/components/tag-selection/TagSelectionChip.js +24 -21
  29. package/dist/components/tag-selection/TagSelectionSelectedTags.js +44 -38
  30. package/dist/components/tag-selection/tagSelectionClasses.d.ts +34 -0
  31. package/dist/components/tag-selection/tagSelectionClasses.js +15 -0
  32. package/dist/index.cjs +2 -2
  33. package/dist/index.d.cts +4 -0
  34. package/dist/index.d.ts +4 -0
  35. package/dist/index.js +31 -27
  36. package/dist/utils/muiTsClasses.d.ts +7 -0
  37. package/dist/utils/muiTsClasses.js +9 -0
  38. package/package.json +1 -1
@@ -0,0 +1,40 @@
1
+ /**
2
+ * CSS class names for every named slot in the PasswordStrengthMeter component.
3
+ *
4
+ * Use these to style individual parts of the component without relying on
5
+ * MUI's internal class names, which can change between versions.
6
+ *
7
+ * @example
8
+ * ```css
9
+ * .MuiTsPasswordStrengthMeter-strengthBar.MuiTsPasswordStrengthMeter-strengthBarWeak {
10
+ * /* custom weak-strength color *\/
11
+ * }
12
+ * .MuiTsPasswordStrengthMeter-root.MuiTs-error .MuiTsPasswordStrengthMeter-input {
13
+ * border-color: red;
14
+ * }
15
+ * ```
16
+ */
17
+ export declare const passwordStrengthMeterClasses: {
18
+ /** The outermost wrapper element. Also receives `MuiTs-disabled` and `MuiTs-error` state classes. */
19
+ readonly root: "MuiTsPasswordStrengthMeter-root";
20
+ /** The FormControl wrapping the main password input field. */
21
+ readonly input: "MuiTsPasswordStrengthMeter-input";
22
+ /** The "Generate password" button (only present when `showPasswordGenerator={true}`). */
23
+ readonly generatorButton: "MuiTsPasswordStrengthMeter-generatorButton";
24
+ /** The FormControl wrapping the confirm password input (only when `showConfirmField={true}`). */
25
+ readonly confirmInput: "MuiTsPasswordStrengthMeter-confirmInput";
26
+ /** The strength progress bar element. Also receives one of the strength state classes below. */
27
+ readonly strengthBar: "MuiTsPasswordStrengthMeter-strengthBar";
28
+ /** Added to the strength bar when the password is weak (score 0–25 %). */
29
+ readonly strengthBarWeak: "MuiTsPasswordStrengthMeter-strengthBarWeak";
30
+ /** Added to the strength bar when the password is acceptable (score ~50 %). */
31
+ readonly strengthBarOk: "MuiTsPasswordStrengthMeter-strengthBarOk";
32
+ /** Added to the strength bar when the password is good (score ~75 %). */
33
+ readonly strengthBarGood: "MuiTsPasswordStrengthMeter-strengthBarGood";
34
+ /** Added to the strength bar when the password is very good (score 100 %). */
35
+ readonly strengthBarVeryGood: "MuiTsPasswordStrengthMeter-strengthBarVeryGood";
36
+ /** The requirements summary box below the bar (only when `showSummary={true}`). */
37
+ readonly summary: "MuiTsPasswordStrengthMeter-summary";
38
+ /** Each individual requirement row (label + check/error icon). */
39
+ readonly requirementItem: "MuiTsPasswordStrengthMeter-requirementItem";
40
+ };
@@ -0,0 +1,16 @@
1
+ //#region src/components/password-strength-meter/passwordStrengthMeterClasses.ts
2
+ var e = {
3
+ root: "MuiTsPasswordStrengthMeter-root",
4
+ input: "MuiTsPasswordStrengthMeter-input",
5
+ generatorButton: "MuiTsPasswordStrengthMeter-generatorButton",
6
+ confirmInput: "MuiTsPasswordStrengthMeter-confirmInput",
7
+ strengthBar: "MuiTsPasswordStrengthMeter-strengthBar",
8
+ strengthBarWeak: "MuiTsPasswordStrengthMeter-strengthBarWeak",
9
+ strengthBarOk: "MuiTsPasswordStrengthMeter-strengthBarOk",
10
+ strengthBarGood: "MuiTsPasswordStrengthMeter-strengthBarGood",
11
+ strengthBarVeryGood: "MuiTsPasswordStrengthMeter-strengthBarVeryGood",
12
+ summary: "MuiTsPasswordStrengthMeter-summary",
13
+ requirementItem: "MuiTsPasswordStrengthMeter-requirementItem"
14
+ };
15
+ //#endregion
16
+ export { e as passwordStrengthMeterClasses };
@@ -1,5 +1,5 @@
1
1
  import { type RadialStackedBarChartProps } from "./RadialStackedBarChart.types";
2
- export declare function RadialStackedBarChart({ data, keys, size, innerRadius, barPadding, chartColors, colorConfig, showLabels, showGridLines, gridLineCount, showGridValues, showLegend, sortBy, valueDecimalCount, valueDecimalSeparator, valueThousandsSeparator, gridValueFormatter, zoomable, onBarClick, disabled, translation, }: RadialStackedBarChartProps): import("react/jsx-runtime").JSX.Element;
2
+ export declare function RadialStackedBarChart({ data, keys, size, innerRadius, barPadding, chartColors, colorConfig, showLabels, showGridLines, gridLineCount, showGridValues, showLegend, sortBy, valueDecimalCount, valueDecimalSeparator, valueThousandsSeparator, valueFormatter, gridValueFormatter, zoomable, onBarClick, disabled, translation, }: RadialStackedBarChartProps): import("react/jsx-runtime").JSX.Element;
3
3
  export declare namespace RadialStackedBarChart {
4
4
  var displayName: string;
5
5
  }
@@ -8,17 +8,17 @@ function m(e, t = 0, n = ".", r = ",") {
8
8
  let [i, a] = e.toFixed(Math.max(0, t)).split("."), o = i.replace(/\B(?=(\d{3})+(?!\d))/g, r);
9
9
  return a ? `${o}${n}${a}` : o;
10
10
  }
11
- function ee(e) {
11
+ function h(e) {
12
12
  return Math.abs(e) >= 1e9 ? `${(e / 1e9).toFixed(1).replace(/\.0$/, "")}B` : Math.abs(e) >= 1e6 ? `${(e / 1e6).toFixed(1).replace(/\.0$/, "")}M` : Math.abs(e) >= 1e3 ? `${(e / 1e3).toFixed(1).replace(/\.0$/, "")}k` : String(e);
13
13
  }
14
- function te(e) {
14
+ function g(e) {
15
15
  return e.map((e) => typeof e == "string" ? {
16
16
  key: e,
17
17
  label: e
18
18
  } : e);
19
19
  }
20
- function ne({ barData: e, seriesKey: t, seriesLabel: n, decimals: r, decimalSep: i, thousandSep: a }) {
21
- let s = e.values[t] ?? 0, l = p.sum(Object.values(e.values)), u = l > 0 ? Math.round(s / l * 1e3) / 10 : 0;
20
+ function ee({ barData: e, seriesKey: t, seriesLabel: n, decimals: r, decimalSep: i, thousandSep: a, valueFormatter: s }) {
21
+ let l = e.values[t] ?? 0, u = p.sum(Object.values(e.values)), h = u > 0 ? Math.round(l / u * 1e3) / 10 : 0, g = (e, t) => s ? s(e, t) : m(e, r, i, a);
22
22
  return /* @__PURE__ */ f(o, {
23
23
  sx: { py: .25 },
24
24
  children: [
@@ -39,7 +39,7 @@ function ne({ barData: e, seriesKey: t, seriesLabel: n, decimals: r, decimalSep:
39
39
  children: [
40
40
  n,
41
41
  ": ",
42
- m(s, r, i, a)
42
+ g(l, t)
43
43
  ]
44
44
  }),
45
45
  /* @__PURE__ */ f(c, {
@@ -50,48 +50,48 @@ function ne({ barData: e, seriesKey: t, seriesLabel: n, decimals: r, decimalSep:
50
50
  mt: .25
51
51
  },
52
52
  children: [
53
- u,
53
+ h,
54
54
  "% · Total: ",
55
- m(l, r, i, a)
55
+ g(u, "")
56
56
  ]
57
57
  })
58
58
  ]
59
59
  });
60
60
  }
61
- function h({ data: c, keys: m, size: h = 500, innerRadius: g, barPadding: _ = .12, chartColors: v, colorConfig: y, showLabels: b = !0, showGridLines: x = !0, gridLineCount: S = 3, showGridValues: re = !0, showLegend: C = !0, sortBy: w = "none", valueDecimalCount: ie = 0, valueDecimalSeparator: ae = ".", valueThousandsSeparator: oe = ",", gridValueFormatter: se, zoomable: T = !1, onBarClick: ce, disabled: E = !1, translation: D }) {
62
- let O = l(), k = {
61
+ function _({ data: c, keys: m, size: _ = 500, innerRadius: v, barPadding: y = .12, chartColors: b, colorConfig: x, showLabels: S = !0, showGridLines: C = !0, gridLineCount: w = 3, showGridValues: T = !0, showLegend: te = !0, sortBy: E = "none", valueDecimalCount: ne = 0, valueDecimalSeparator: re = ".", valueThousandsSeparator: ie = ",", valueFormatter: ae, gridValueFormatter: oe, zoomable: D = !1, onBarClick: O, disabled: k = !1, translation: se }) {
62
+ let A = l(), ce = {
63
63
  ...e,
64
- ...D
65
- }, A = r(() => te(m), [m]), j = r(() => A.map((e) => e.key), [A]), M = c.length === 0 || A.length === 0, le = b ? 63 : 16, N = h / 2 - le, P = g == null ? Math.round(h * .18) : Math.max(0, Math.min(g, N - 1)), ue = [
66
- O.palette.primary.main,
67
- O.palette.secondary.main,
68
- O.palette.success.main,
69
- O.palette.warning.main,
70
- O.palette.error.main,
71
- O.palette.info.main,
64
+ ...se
65
+ }, j = r(() => g(m), [m]), M = r(() => j.map((e) => e.key), [j]), N = c.length === 0 || j.length === 0, le = S ? 63 : 16, P = _ / 2 - le, F = v == null ? Math.round(_ * .18) : Math.max(0, Math.min(v, P - 1)), ue = [
66
+ A.palette.primary.main,
67
+ A.palette.secondary.main,
68
+ A.palette.success.main,
69
+ A.palette.warning.main,
70
+ A.palette.error.main,
71
+ A.palette.info.main,
72
72
  "#8e24aa",
73
73
  "#00897b",
74
74
  "#f06292",
75
75
  "#a1887f"
76
- ], F = v && v.length > 0 ? v : ue, I = t((e, t) => {
77
- let n = y?.[e];
78
- return n?.fill ? n.fill : F[t % F.length];
79
- }, [y, F]), L = r(() => w === "value" ? [...c].sort((e, t) => p.sum(j, (e) => t.values[e] ?? 0) - p.sum(j, (t) => e.values[t] ?? 0)) : w === "label" ? [...c].sort((e, t) => e.label.localeCompare(t.label, void 0, {
76
+ ], I = b && b.length > 0 ? b : ue, L = t((e, t) => {
77
+ let n = x?.[e];
78
+ return n?.fill ? n.fill : I[t % I.length];
79
+ }, [x, I]), R = r(() => E === "value" ? [...c].sort((e, t) => p.sum(M, (e) => t.values[e] ?? 0) - p.sum(M, (t) => e.values[t] ?? 0)) : E === "label" ? [...c].sort((e, t) => e.label.localeCompare(t.label, void 0, {
80
80
  numeric: !0,
81
81
  sensitivity: "base"
82
82
  })) : c, [
83
83
  c,
84
- w,
85
- j
86
- ]), R = r(() => p.max(L, (e) => p.sum(j, (t) => e.values[t] ?? 0)) ?? 0, [L, j]), z = r(() => p.scaleBand().domain(L.map((e) => e.id)).range([0, 2 * Math.PI]).padding(_), [L, _]), B = r(() => p.scaleLinear().domain([0, R]).range([P, N]), [
84
+ E,
85
+ M
86
+ ]), z = r(() => p.max(R, (e) => p.sum(M, (t) => e.values[t] ?? 0)) ?? 0, [R, M]), B = r(() => p.scaleBand().domain(R.map((e) => e.id)).range([0, 2 * Math.PI]).padding(y), [R, y]), V = r(() => p.scaleLinear().domain([0, z]).range([F, P]), [
87
+ F,
87
88
  P,
89
+ z
90
+ ]), H = r(() => N ? [] : p.stack().keys(M).value((e, t) => e.values[t] ?? 0).order(p.stackOrderNone).offset(p.stackOffsetNone)(R), [
88
91
  N,
89
- R
90
- ]), V = r(() => M ? [] : p.stack().keys(j).value((e, t) => e.values[t] ?? 0).order(p.stackOrderNone).offset(p.stackOffsetNone)(L), [
91
- M,
92
- L,
93
- j
94
- ]), H = r(() => p.arc().startAngle((e) => e.x0).endAngle((e) => e.x1).innerRadius((e) => e.y0).outerRadius((e) => e.y1).padAngle(.008).padRadius(P + 10), [P]), U = r(() => R > 0 ? p.ticks(0, R, S).filter((e) => e > 0) : [], [R, S]), de = se ?? ee, [W, G] = a(1), K = i(null), [q, J] = a(`-${h / 2} -${h / 2} ${h} ${h}`), fe = r(() => {
92
+ R,
93
+ M
94
+ ]), de = r(() => p.arc().startAngle((e) => e.x0).endAngle((e) => e.x1).innerRadius((e) => e.y0).outerRadius((e) => e.y1).padAngle(.008).padRadius(F + 10), [F]), U = r(() => z > 0 ? p.ticks(0, z, w).filter((e) => e > 0) : [], [z, w]), fe = oe ?? h, [W, G] = a(1), K = i(null), [q, J] = a(`-${_ / 2} -${_ / 2} ${_} ${_}`), pe = r(() => {
95
95
  if (W === 1) return q;
96
96
  let [e, t, n, r] = q.split(" ").map(Number), i = n / W, a = r / W;
97
97
  return `${e + (n - i) / 2} ${t + (r - a) / 2} ${i} ${a}`;
@@ -104,125 +104,126 @@ function h({ data: c, keys: m, size: h = 500, innerRadius: g, barPadding: _ = .1
104
104
  let t = e.getBBox();
105
105
  J(`${t.x - 4} ${t.y - 4} ${t.width + 8} ${t.height + 8}`);
106
106
  } catch {
107
- J(`-${h / 2} -${h / 2} ${h} ${h}`);
107
+ J(`-${_ / 2} -${_ / 2} ${_} ${_}`);
108
108
  }
109
109
  });
110
110
  return () => cancelAnimationFrame(t);
111
111
  }, [
112
- h,
112
+ _,
113
113
  c,
114
114
  m,
115
+ F,
115
116
  P,
116
- N,
117
- b,
118
- x
117
+ S,
118
+ C
119
119
  ]), n(() => {
120
- if (E) return;
120
+ if (k) return;
121
121
  let e = (e) => {
122
122
  e.key === "Escape" && G(1);
123
123
  };
124
124
  return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
125
- }, [E]);
126
- let pe = t((e) => {
127
- if (!T || E || !e.ctrlKey) return;
125
+ }, [k]);
126
+ let me = t((e) => {
127
+ if (!D || k || !e.ctrlKey) return;
128
128
  e.preventDefault();
129
129
  let t = e.deltaY < 0 ? 1.15 : 1 / 1.15;
130
130
  G((e) => Math.max(.25, Math.min(8, e * t)));
131
- }, [T, E]), me = -(A.length * 16) / 2, Y = Math.max(0, P * 2 - 10 - 5 - 10), X = 9 * .57, he = A.reduce((e, t) => Math.max(e, (t.label ?? t.key).length), 0), ge = -((15 + Math.min(he * X, Y)) / 2), Z = Math.max(1, Math.floor(Y / X)), _e = (e) => e.length <= Z ? e : `${e.slice(0, Z - 1)}…`, ve = {
131
+ }, [D, k]), he = -(j.length * 16) / 2, Y = Math.max(0, F * 2 - 10 - 5 - 10), X = 9 * .57, ge = j.reduce((e, t) => Math.max(e, (t.label ?? t.key).length), 0), _e = -((15 + Math.min(ge * X, Y)) / 2), Z = Math.max(1, Math.floor(Y / X)), ve = (e) => e.length <= Z ? e : `${e.slice(0, Z - 1)}…`, ye = {
132
132
  followCursor: !0,
133
133
  enterDelay: 50,
134
134
  enterNextDelay: 0,
135
- disableHoverListener: E,
135
+ disableHoverListener: k,
136
136
  slotProps: { tooltip: { sx: { maxWidth: 240 } } }
137
- }, Q = O.palette.text.primary, $ = O.palette.divider, ye = O.typography.fontFamily;
137
+ }, Q = A.palette.text.primary, $ = A.palette.divider, be = A.typography.fontFamily;
138
138
  return /* @__PURE__ */ d(o, {
139
- style: { opacity: E ? .5 : 1 },
139
+ style: { opacity: k ? .5 : 1 },
140
140
  sx: {
141
141
  display: "inline-flex",
142
- cursor: E ? "not-allowed" : "default",
142
+ cursor: k ? "not-allowed" : "default",
143
143
  userSelect: "none"
144
144
  },
145
145
  children: /* @__PURE__ */ d("svg", {
146
- width: h,
147
- height: h,
148
- viewBox: fe,
149
- onWheel: pe,
146
+ width: _,
147
+ height: _,
148
+ viewBox: pe,
149
+ onWheel: me,
150
150
  style: {
151
- fontFamily: ye ?? "sans-serif",
152
- overflow: T && W > 1 ? "hidden" : "visible"
151
+ fontFamily: be ?? "sans-serif",
152
+ overflow: D && W > 1 ? "hidden" : "visible"
153
153
  },
154
154
  role: "img",
155
155
  "aria-label": "Radial stacked bar chart",
156
156
  children: /* @__PURE__ */ f("g", {
157
157
  ref: K,
158
- children: [M && /* @__PURE__ */ d("text", {
158
+ children: [N && /* @__PURE__ */ d("text", {
159
159
  textAnchor: "middle",
160
160
  dy: "0.35em",
161
161
  fontSize: 13,
162
- fill: O.palette.text.secondary,
163
- children: k.noData
164
- }), !M && /* @__PURE__ */ f(u, { children: [
165
- x && U.map((e) => /* @__PURE__ */ d("circle", {
166
- r: B(e),
162
+ fill: A.palette.text.secondary,
163
+ children: ce.noData
164
+ }), !N && /* @__PURE__ */ f(u, { children: [
165
+ C && U.map((e) => /* @__PURE__ */ d("circle", {
166
+ r: V(e),
167
167
  fill: "none",
168
168
  stroke: $,
169
169
  strokeWidth: .5,
170
170
  strokeDasharray: "3 2"
171
171
  }, `grid-${e}`)),
172
- x && /* @__PURE__ */ d("circle", {
173
- r: P,
172
+ C && /* @__PURE__ */ d("circle", {
173
+ r: F,
174
174
  fill: "none",
175
175
  stroke: $,
176
176
  strokeWidth: .75
177
177
  }),
178
- x && re && U.map((e) => /* @__PURE__ */ d("text", {
178
+ C && T && U.map((e) => /* @__PURE__ */ d("text", {
179
179
  x: 0,
180
- y: -B(e),
180
+ y: -V(e),
181
181
  textAnchor: "middle",
182
182
  dy: "-3",
183
183
  fontSize: 9,
184
- fill: O.palette.text.secondary,
184
+ fill: A.palette.text.secondary,
185
185
  pointerEvents: "none",
186
- children: de(e)
186
+ children: fe(e)
187
187
  }, `gv-${e}`)),
188
- V.map((e, t) => {
189
- let n = e.key, r = A[t]?.label ?? n, i = I(n, t);
188
+ H.map((e, t) => {
189
+ let n = e.key, r = j[t]?.label ?? n, i = L(n, t);
190
190
  return e.map((e, t) => {
191
- let a = e.data, o = z(a.id) ?? 0, c = o + z.bandwidth(), l = B(e[0]), u = B(e[1]);
191
+ let a = e.data, o = B(a.id) ?? 0, c = o + B.bandwidth(), l = V(e[0]), u = V(e[1]);
192
192
  if (u - l < .5) return null;
193
- let f = H({
193
+ let f = de({
194
194
  x0: o,
195
195
  x1: c,
196
196
  y0: l,
197
197
  y1: u
198
198
  }) ?? "";
199
199
  return /* @__PURE__ */ d(s, {
200
- ...ve,
200
+ ...ye,
201
201
  placement: "top",
202
- title: /* @__PURE__ */ d(ne, {
202
+ title: /* @__PURE__ */ d(ee, {
203
203
  barData: a,
204
204
  seriesKey: n,
205
205
  seriesLabel: r,
206
- decimals: ie,
207
- decimalSep: ae,
208
- thousandSep: oe
206
+ decimals: ne,
207
+ decimalSep: re,
208
+ thousandSep: ie,
209
+ valueFormatter: ae
209
210
  }),
210
211
  children: /* @__PURE__ */ d("path", {
211
212
  d: f,
212
213
  fill: i,
213
214
  style: {
214
- cursor: E ? "not-allowed" : "pointer",
215
+ cursor: k ? "not-allowed" : "pointer",
215
216
  transition: "opacity 0.15s"
216
217
  },
217
218
  onMouseEnter: (e) => {
218
- E || (e.currentTarget.style.opacity = "0.75");
219
+ k || (e.currentTarget.style.opacity = "0.75");
219
220
  },
220
221
  onMouseLeave: (e) => {
221
222
  e.currentTarget.style.opacity = "1";
222
223
  },
223
224
  onClick: (e) => {
224
- if (E) return;
225
- let t = p.sum(j, (e) => a.values[e] ?? 0), r = {
225
+ if (k) return;
226
+ let t = p.sum(M, (e) => a.values[e] ?? 0), r = {
226
227
  id: a.id,
227
228
  label: a.label,
228
229
  seriesKey: n,
@@ -230,14 +231,14 @@ function h({ data: c, keys: m, size: h = 500, innerRadius: g, barPadding: _ = .1
230
231
  total: t,
231
232
  values: a.values
232
233
  };
233
- ce?.(r, e);
234
+ O?.(r, e);
234
235
  }
235
236
  })
236
237
  }, `${n}-${t}`);
237
238
  });
238
239
  }),
239
- b && L.map((e) => {
240
- let t = (z(e.id) ?? 0) + z.bandwidth() / 2, n = N + 8, r = n * Math.sin(t), i = -n * Math.cos(t), a = t * 180 / Math.PI;
240
+ S && R.map((e) => {
241
+ let t = (B(e.id) ?? 0) + B.bandwidth() / 2, n = P + 8, r = n * Math.sin(t), i = -n * Math.cos(t), a = t * 180 / Math.PI;
241
242
  return /* @__PURE__ */ d("text", {
242
243
  x: r,
243
244
  y: i,
@@ -250,11 +251,11 @@ function h({ data: c, keys: m, size: h = 500, innerRadius: g, barPadding: _ = .1
250
251
  children: e.label
251
252
  }, `lbl-${e.id}`);
252
253
  }),
253
- C && /* @__PURE__ */ d("g", {
254
+ te && /* @__PURE__ */ d("g", {
254
255
  pointerEvents: "none",
255
- transform: `translate(${ge},0)`,
256
- children: A.map((e, t) => {
257
- let n = I(e.key, t), r = me + t * 16, i = _e(e.label ?? e.key);
256
+ transform: `translate(${_e},0)`,
257
+ children: j.map((e, t) => {
258
+ let n = L(e.key, t), r = he + t * 16, i = ve(e.label ?? e.key);
258
259
  return /* @__PURE__ */ f("g", {
259
260
  transform: `translate(0,${r})`,
260
261
  children: [/* @__PURE__ */ d("rect", {
@@ -280,6 +281,6 @@ function h({ data: c, keys: m, size: h = 500, innerRadius: g, barPadding: _ = .1
280
281
  })
281
282
  });
282
283
  }
283
- h.displayName = "RadialStackedBarChart";
284
+ _.displayName = "RadialStackedBarChart";
284
285
  //#endregion
285
- export { h as RadialStackedBarChart };
286
+ export { _ as RadialStackedBarChart };
@@ -74,6 +74,14 @@ export type RadialStackedBarChartProps = {
74
74
  valueDecimalSeparator?: string;
75
75
  /** Thousands separator for values (default: ',') */
76
76
  valueThousandsSeparator?: string;
77
+ /**
78
+ * Custom formatter for tooltip bar values. Overrides `valueDecimalCount`,
79
+ * `valueDecimalSeparator`, and `valueThousandsSeparator` when provided.
80
+ * `seriesKey` is the key from `series` — use it to format different series differently.
81
+ * Example: `(v, key) => key === 'revenue' ? \`$${v.toFixed(0)}\` : \`${v} kg\``
82
+ * @since 3.22.0
83
+ */
84
+ valueFormatter?: (value: number, seriesKey: string) => string;
77
85
  /**
78
86
  * Custom formatter for the grid ring value labels.
79
87
  * Defaults to compact notation (e.g. 30000 → "30k", 3000000 → "3M").