@mx-cartographer/experiences 7.2.12 → 7.2.13

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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## [7.2.13] - 11-24-2025
2
+
3
+ - **FIXED** - interactive controls for budget and spending mini widgets
4
+
1
5
  ## [7.2.12] - 11-20-2025
2
6
 
3
7
  - **FIXED** - Accessibility label on split transaction amount input
@@ -0,0 +1,86 @@
1
+ import { jsxs as c, jsx as e } from "react/jsx-runtime";
2
+ import b from "react";
3
+ import { selectAll as m, interpolateString as x, arc as I } from "d3";
4
+ import d from "@mui/material/Box";
5
+ import { useTheme as S } from "@mui/material/styles";
6
+ const k = 100, E = 140, v = 10, B = ({
7
+ data: u,
8
+ hoveredId: h,
9
+ onClick: s,
10
+ onMouseEnter: a,
11
+ onMouseLeave: l,
12
+ selectedId: i,
13
+ size: t = 300,
14
+ children: p
15
+ }) => {
16
+ const f = S();
17
+ let r = 0;
18
+ const g = (o, n) => {
19
+ (o.key === "Enter" || o.key === " ") && (o.preventDefault(), s?.(n));
20
+ }, y = (o) => {
21
+ a?.(o);
22
+ }, D = (o) => {
23
+ l?.(o);
24
+ };
25
+ return b.useEffect(() => {
26
+ m(".arc-outer").transition("roll").duration(500).attrTween("transform", () => x("rotate(0)", "rotate(360)"));
27
+ }, []), /* @__PURE__ */ c(d, { height: t, position: "relative", width: t, children: [
28
+ /* @__PURE__ */ e(d, { height: "100%", width: "100%", children: p }),
29
+ /* @__PURE__ */ c(
30
+ "svg",
31
+ {
32
+ height: t,
33
+ style: { position: "absolute", top: 0, left: 0 },
34
+ viewBox: "-150 -150 300 300",
35
+ width: t,
36
+ children: [
37
+ /* @__PURE__ */ e("style", { children: `
38
+ .arc-outer:focus,
39
+ .arc-outer:focus-visible {
40
+ stroke: ${f.palette.primary.main};
41
+ stroke-width: 3;
42
+ stroke-opacity: 0.8;
43
+ }
44
+ ` }),
45
+ /* @__PURE__ */ e("g", { children: u.map((o) => {
46
+ const n = r;
47
+ r = r + 2 * Math.PI * (o.value / 100);
48
+ const w = r, R = I().cornerRadius(4)({
49
+ innerRadius: k,
50
+ outerRadius: E + (o.id === i || o.id === h ? v : 0),
51
+ startAngle: n,
52
+ endAngle: w,
53
+ padAngle: 0.025
54
+ });
55
+ return /* @__PURE__ */ e(
56
+ "path",
57
+ {
58
+ "aria-label": o.label || `Segment ${o.id}`,
59
+ "aria-pressed": o.id === i,
60
+ className: "arc-outer",
61
+ d: R,
62
+ fill: o.color,
63
+ onBlur: () => D(o.id),
64
+ onClick: () => s?.(o.id),
65
+ onFocus: () => y(o.id),
66
+ onKeyDown: (A) => g(A, o.id),
67
+ onMouseEnter: () => a?.(o.id),
68
+ onMouseLeave: () => l?.(o.id),
69
+ role: "button",
70
+ style: {
71
+ cursor: "pointer",
72
+ outline: "none"
73
+ },
74
+ tabIndex: 0
75
+ },
76
+ o.id
77
+ );
78
+ }) })
79
+ ]
80
+ }
81
+ )
82
+ ] });
83
+ }, j = B;
84
+ export {
85
+ j as D
86
+ };