@burdenoff/microfe-assethandler 2026.1002.1 → 2026.1006.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.
@@ -1 +1 @@
1
- {"version":3,"file":"BarsChart.d.ts","sourceRoot":"","sources":["../../../../src/assethandler/components/charts/BarsChart.tsx"],"names":[],"mappings":"AAUA,OAAO,EAKL,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,cAAc,EACpB,MAAM,cAAc,CAAC;AAGtB,MAAM,WAAW,cAAc;IAC7B,yDAAyD;IACzD,IAAI,EAAE,UAAU,EAAE,CAAC;IACnB,wCAAwC;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,kCAAkC;IAClC,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB,oFAAoF;IACpF,WAAW,CAAC,EAAE,UAAU,GAAG,YAAY,CAAC;IACxC,wEAAwE;IACxE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,iCAAiC;IACjC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,6EAA6E;IAC7E,WAAW,CAAC,EAAE,cAAc,CAAC;IAC7B,kDAAkD;IAClD,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,KAAK,MAAM,CAAC;IACjD,8CAA8C;IAC9C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,sEAAsE;IACtE,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,2EAA2E;IAC3E,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,0CAA0C;IAC1C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,uBAAuB;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,EACxB,IAAI,EACJ,IAAI,EACJ,MAAM,EACN,WAAwB,EACxB,OAAe,EACf,MAAY,EACZ,WAA0B,EAC1B,WAAW,EACX,QAAe,EACf,UAAU,EACV,aAAkB,EAClB,UAAU,EACV,SAAS,EACT,SAAS,GACV,EAAE,cAAc,+BAiIhB"}
1
+ {"version":3,"file":"BarsChart.d.ts","sourceRoot":"","sources":["../../../../src/assethandler/components/charts/BarsChart.tsx"],"names":[],"mappings":"AAUA,OAAO,EAKL,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,cAAc,EACpB,MAAM,cAAc,CAAC;AAGtB,MAAM,WAAW,cAAc;IAC7B,yDAAyD;IACzD,IAAI,EAAE,UAAU,EAAE,CAAC;IACnB,wCAAwC;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,kCAAkC;IAClC,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB,oFAAoF;IACpF,WAAW,CAAC,EAAE,UAAU,GAAG,YAAY,CAAC;IACxC,wEAAwE;IACxE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,iCAAiC;IACjC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,6EAA6E;IAC7E,WAAW,CAAC,EAAE,cAAc,CAAC;IAC7B,kDAAkD;IAClD,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,KAAK,MAAM,CAAC;IACjD,8CAA8C;IAC9C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,sEAAsE;IACtE,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,2EAA2E;IAC3E,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,0CAA0C;IAC1C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,uBAAuB;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,EACxB,IAAI,EACJ,IAAI,EACJ,MAAM,EACN,WAAwB,EACxB,OAAe,EACf,MAAY,EACZ,WAA0B,EAC1B,WAAW,EACX,QAAe,EACf,UAAU,EACV,aAAkB,EAClB,UAAU,EACV,SAAS,EACT,SAAS,GACV,EAAE,cAAc,+BA0GhB"}
@@ -8,23 +8,23 @@ import { XAxis as l } from "../../../node_modules/recharts/es6/cartesian/XAxis.j
8
8
  import { YAxis as u } from "../../../node_modules/recharts/es6/cartesian/YAxis.js";
9
9
  import { BarChart as d } from "../../../node_modules/recharts/es6/chart/BarChart.js";
10
10
  import { ChartDataTable as f, ChartEmpty as p, ChartFigure as m, ChartLegend as h, ChartTooltip as g } from "./ChartParts.js";
11
- import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
11
+ import { jsx as _, jsxs as v } from "react/jsx-runtime";
12
12
  //#region src/assethandler/components/charts/BarsChart.tsx
13
- function b({ data: b, xKey: x, series: S, orientation: C = "vertical", stacked: w = !1, height: T = 260, valueFormat: E = n, xTickFormat: D, showGrid: O = !0, showLegend: k, categoryWidth: A = 96, emptyLabel: j, ariaLabel: M, className: N }) {
14
- let P = r(), F = S.map((e, n) => ({
13
+ function y({ data: y, xKey: b, series: x, orientation: S = "vertical", stacked: C = !1, height: w = 260, valueFormat: T = n, xTickFormat: E, showGrid: D = !0, showLegend: O, categoryWidth: k = 96, emptyLabel: A, ariaLabel: j, className: M }) {
14
+ let N = r(), P = x.map((e, n) => ({
15
15
  ...e,
16
16
  label: e.label ?? e.key,
17
- color: e.color ?? t(n, S.length)
18
- })), I = M ?? `${F.map((e) => e.label).join(", ")} by ${x}`;
19
- if (b.length === 0) return /* @__PURE__ */ v(p, {
20
- height: T,
21
- label: j,
22
- className: N
17
+ color: e.color ?? t(n, x.length)
18
+ })), F = j ?? `${P.map((e) => e.label).join(", ")} by ${b}`;
19
+ if (y.length === 0) return /* @__PURE__ */ _(p, {
20
+ height: w,
21
+ label: A,
22
+ className: M
23
23
  });
24
- let L = C === "vertical", R = k ?? F.length > 1, z = {
24
+ let I = S === "vertical", L = O ?? P.length > 1, R = {
25
25
  fill: e.textMuted,
26
26
  fontSize: 12
27
- }, B = F.length - 1, V = (e) => !w || e === B ? L ? [
27
+ }, z = P.length - 1, B = (e) => !C || e === z ? I ? [
28
28
  4,
29
29
  4,
30
30
  0,
@@ -39,88 +39,76 @@ function b({ data: b, xKey: x, series: S, orientation: C = "vertical", stacked:
39
39
  0,
40
40
  0,
41
41
  0
42
- ], H = w ? "stack" : void 0;
43
- return /* @__PURE__ */ v(m, {
44
- ariaLabel: I,
45
- height: T,
46
- className: N,
47
- a11y: /* @__PURE__ */ v(f, {
48
- caption: I,
49
- xLabel: x,
50
- xKey: x,
51
- data: b,
52
- series: F,
53
- valueFormat: E
42
+ ], V = C ? "stack" : void 0;
43
+ return /* @__PURE__ */ _(m, {
44
+ ariaLabel: F,
45
+ height: w,
46
+ className: M,
47
+ a11y: /* @__PURE__ */ _(f, {
48
+ caption: F,
49
+ xLabel: b,
50
+ xKey: b,
51
+ data: y,
52
+ series: P,
53
+ valueFormat: T
54
54
  }),
55
- children: /* @__PURE__ */ v(o, {
55
+ children: /* @__PURE__ */ _(o, {
56
56
  width: "100%",
57
57
  height: "100%",
58
- children: /* @__PURE__ */ y(d, {
59
- data: b,
60
- layout: L ? "horizontal" : "vertical",
58
+ children: /* @__PURE__ */ v(d, {
59
+ data: y,
60
+ layout: I ? "horizontal" : "vertical",
61
61
  margin: {
62
62
  top: 8,
63
63
  right: 16,
64
64
  bottom: 4,
65
65
  left: 4
66
66
  },
67
- barCategoryGap: L ? "24%" : "28%",
67
+ barCategoryGap: I ? "24%" : "28%",
68
68
  children: [
69
- O ? /* @__PURE__ */ v(c, {
70
- vertical: !L,
71
- horizontal: L,
69
+ D ? /* @__PURE__ */ _(c, {
70
+ vertical: !I,
71
+ horizontal: I,
72
72
  stroke: e.grid,
73
73
  strokeWidth: 1
74
74
  }) : null,
75
- L ? /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(l, {
76
- dataKey: x,
77
- type: "category",
75
+ /* @__PURE__ */ _(l, {
76
+ dataKey: I ? b : void 0,
77
+ type: I ? "category" : "number",
78
78
  tickLine: !1,
79
79
  axisLine: !1,
80
- tick: z,
81
- tickMargin: 8,
82
- tickFormatter: D ? (e) => D(e) : void 0
83
- }), /* @__PURE__ */ v(u, {
84
- type: "number",
85
- tickLine: !1,
86
- axisLine: !1,
87
- tick: z,
88
- width: 48,
89
- tickFormatter: (e) => E(Number(e))
90
- })] }) : /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(l, {
91
- type: "number",
92
- tickLine: !1,
93
- axisLine: !1,
94
- tick: z,
95
- tickFormatter: (e) => E(Number(e))
96
- }), /* @__PURE__ */ v(u, {
97
- dataKey: x,
98
- type: "category",
80
+ tick: R,
81
+ tickMargin: I ? 8 : void 0,
82
+ tickFormatter: I ? E : (e) => T(Number(e))
83
+ }),
84
+ /* @__PURE__ */ _(u, {
85
+ dataKey: I ? void 0 : b,
86
+ type: I ? "number" : "category",
99
87
  tickLine: !1,
100
88
  axisLine: !1,
101
- tick: z,
102
- width: A,
103
- tickFormatter: D ? (e) => D(e) : void 0
104
- })] }),
105
- /* @__PURE__ */ v(a, {
89
+ tick: R,
90
+ width: I ? 48 : k,
91
+ tickFormatter: I ? (e) => T(Number(e)) : E
92
+ }),
93
+ /* @__PURE__ */ _(a, {
106
94
  cursor: {
107
95
  fill: e.track,
108
96
  opacity: .5
109
97
  },
110
- content: /* @__PURE__ */ v(g, {
111
- valueFormat: E,
112
- labelFormat: D
98
+ content: /* @__PURE__ */ _(g, {
99
+ valueFormat: T,
100
+ labelFormat: E
113
101
  })
114
102
  }),
115
- R ? /* @__PURE__ */ v(i, { content: /* @__PURE__ */ v(h, {}) }) : null,
116
- F.map((e, t) => /* @__PURE__ */ v(s, {
103
+ L ? /* @__PURE__ */ _(i, { content: /* @__PURE__ */ _(h, {}) }) : null,
104
+ P.map((e, t) => /* @__PURE__ */ _(s, {
117
105
  dataKey: e.key,
118
106
  name: e.label,
119
107
  fill: e.color,
120
- stackId: H,
108
+ stackId: V,
121
109
  maxBarSize: 24,
122
- radius: V(t),
123
- isAnimationActive: !P
110
+ radius: B(t),
111
+ isAnimationActive: !N
124
112
  }, e.key))
125
113
  ]
126
114
  })
@@ -128,6 +116,6 @@ function b({ data: b, xKey: x, series: S, orientation: C = "vertical", stacked:
128
116
  });
129
117
  }
130
118
  //#endregion
131
- export { b as BarsChart };
119
+ export { y as BarsChart };
132
120
 
133
121
  //# sourceMappingURL=BarsChart.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BarsChart.js","names":[],"sources":["../../../../src/assethandler/components/charts/BarsChart.tsx"],"sourcesContent":["import {\n Bar,\n BarChart,\n CartesianGrid,\n Legend,\n ResponsiveContainer,\n Tooltip,\n XAxis,\n YAxis,\n} from 'recharts';\nimport {\n chartTokens,\n defaultSeriesColor,\n formatNumber,\n usePrefersReducedMotion,\n type ChartDatum,\n type ChartSeries,\n type ValueFormatter,\n} from './chartTheme';\nimport { ChartDataTable, ChartEmpty, ChartFigure, ChartLegend, ChartTooltip } from './ChartParts';\n\nexport interface BarsChartProps {\n /** Rows of `{ [xKey]: label, [series.key]: number }`. */\n data: ChartDatum[];\n /** Field holding the category label. */\n xKey: string;\n /** One or more numeric series. */\n series: ChartSeries[];\n /** `vertical` = columns growing up (default); `horizontal` = bars growing right. */\n orientation?: 'vertical' | 'horizontal';\n /** Stack the series instead of grouping side-by-side. Default false. */\n stacked?: boolean;\n /** Pixel height. Default 260. */\n height?: number;\n /** Formats numeric values in the axis + tooltip. Default grouped integer. */\n valueFormat?: ValueFormatter;\n /** Formats the category tick + tooltip header. */\n xTickFormat?: (value: string | number) => string;\n /** Show the value-axis grid. Default true. */\n showGrid?: boolean;\n /** Force the legend on/off. Default: on when there are ≥ 2 series. */\n showLegend?: boolean;\n /** Width of the category label column in `horizontal` mode. Default 96. */\n categoryWidth?: number;\n /** Message shown when `data` is empty. */\n emptyLabel?: string;\n /** Accessible name. */\n ariaLabel?: string;\n className?: string;\n}\n\n/**\n * BarsChart — categorical magnitude as columns or horizontal bars, grouped or\n * stacked. Thin (≤ 24px) marks with 4px rounded data-ends, a hairline grid, a\n * per-mark tooltip, a multi-series legend, an empty state and a screen-reader\n * table. Colour is identity only (never re-encoding the bar's length).\n */\nexport function BarsChart({\n data,\n xKey,\n series,\n orientation = 'vertical',\n stacked = false,\n height = 260,\n valueFormat = formatNumber,\n xTickFormat,\n showGrid = true,\n showLegend,\n categoryWidth = 96,\n emptyLabel,\n ariaLabel,\n className,\n}: BarsChartProps) {\n const reducedMotion = usePrefersReducedMotion();\n\n const resolved = series.map((s, index) => ({\n ...s,\n label: s.label ?? s.key,\n color: s.color ?? defaultSeriesColor(index, series.length),\n }));\n const label = ariaLabel ?? `${resolved.map((s) => s.label).join(', ')} by ${xKey}`;\n\n if (data.length === 0) {\n return <ChartEmpty height={height} label={emptyLabel} className={className} />;\n }\n\n const isColumns = orientation === 'vertical';\n const withLegend = showLegend ?? resolved.length > 1;\n const axisTick = { fill: chartTokens.textMuted, fontSize: 12 };\n const lastIndex = resolved.length - 1;\n\n /** Rounded data-end: columns round the top, horizontal bars the right; a stack\n * rounds only its outermost (last) segment. */\n const radiusFor = (index: number): [number, number, number, number] => {\n const rounded = !stacked || index === lastIndex;\n if (!rounded) return [0, 0, 0, 0];\n return isColumns ? [4, 4, 0, 0] : [0, 4, 4, 0];\n };\n\n const stackId = stacked ? 'stack' : undefined;\n\n return (\n <ChartFigure\n ariaLabel={label}\n height={height}\n className={className}\n a11y={\n <ChartDataTable\n caption={label}\n xLabel={xKey}\n xKey={xKey}\n data={data}\n series={resolved}\n valueFormat={valueFormat}\n />\n }\n >\n <ResponsiveContainer width=\"100%\" height=\"100%\">\n <BarChart\n data={data}\n layout={isColumns ? 'horizontal' : 'vertical'}\n margin={{ top: 8, right: 16, bottom: 4, left: 4 }}\n barCategoryGap={isColumns ? '24%' : '28%'}\n >\n {showGrid ? (\n <CartesianGrid\n vertical={!isColumns}\n horizontal={isColumns}\n stroke={chartTokens.grid}\n strokeWidth={1}\n />\n ) : null}\n\n {isColumns ? (\n <>\n <XAxis\n dataKey={xKey}\n type=\"category\"\n tickLine={false}\n axisLine={false}\n tick={axisTick}\n tickMargin={8}\n tickFormatter={\n xTickFormat ? (value) => xTickFormat(value as string | number) : undefined\n }\n />\n <YAxis\n type=\"number\"\n tickLine={false}\n axisLine={false}\n tick={axisTick}\n width={48}\n tickFormatter={(value) => valueFormat(Number(value))}\n />\n </>\n ) : (\n <>\n <XAxis\n type=\"number\"\n tickLine={false}\n axisLine={false}\n tick={axisTick}\n tickFormatter={(value) => valueFormat(Number(value))}\n />\n <YAxis\n dataKey={xKey}\n type=\"category\"\n tickLine={false}\n axisLine={false}\n tick={axisTick}\n width={categoryWidth}\n tickFormatter={\n xTickFormat ? (value) => xTickFormat(value as string | number) : undefined\n }\n />\n </>\n )}\n\n <Tooltip\n cursor={{ fill: chartTokens.track, opacity: 0.5 }}\n content={<ChartTooltip valueFormat={valueFormat} labelFormat={xTickFormat} />}\n />\n\n {withLegend ? <Legend content={<ChartLegend />} /> : null}\n\n {resolved.map((s, index) => (\n <Bar\n key={s.key}\n dataKey={s.key}\n name={s.label}\n fill={s.color}\n stackId={stackId}\n maxBarSize={24}\n radius={radiusFor(index)}\n isAnimationActive={!reducedMotion}\n />\n ))}\n </BarChart>\n </ResponsiveContainer>\n </ChartFigure>\n );\n}\n"],"mappings":";;;;;;;;;;;;AAyDA,SAAgB,EAAU,EACxB,SACA,SACA,WACA,iBAAc,YACd,aAAU,IACV,YAAS,KACT,iBAAc,GACd,gBACA,cAAW,IACX,eACA,mBAAgB,IAChB,eACA,cACA,gBACiB;CACjB,IAAM,IAAgB,EAAwB,GAExC,IAAW,EAAO,KAAK,GAAG,OAAW;EACzC,GAAG;EACH,OAAO,EAAE,SAAS,EAAE;EACpB,OAAO,EAAE,SAAS,EAAmB,GAAO,EAAO,MAAM;CAC3D,EAAE,GACI,IAAQ,KAAa,GAAG,EAAS,KAAK,MAAM,EAAE,KAAK,EAAE,KAAK,IAAI,EAAE,MAAM;CAE5E,IAAI,EAAK,WAAW,GAClB,OAA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AAY,OAAO,CAAK,CAAC;KACpD,CAAA,GACD,kBAAC,GAAD;MACE,SAAS;MACT,MAAK;MACL,UAAU;MACV,UAAU;MACV,MAAM;MACN,OAAO;MACP,eACE,KAAe,MAAU,EAAY,CAAwB,IAAI,KAAA;KAEpE,CAAA,CACD,EAAA,CAAA;KAGJ,kBAAC,GAAD;MACE,QAAQ;OAAE,MAAM,EAAY;OAAO,SAAS;MAAI;MAChD,SAAS,kBAAC,GAAD;OAA2B;OAAa,aAAa;MAAc,CAAA;KAC7E,CAAA;KAEA,IAAa,kBAAC,GAAD,EAAQ,SAAS,kBAAC,GAAD,CAAc,CAAA,EAAI,CAAA,IAAI;KAEpD,EAAS,KAAK,GAAG,MAChB,kBAAC,GAAD;MAEE,SAAS,EAAE;MACX,MAAM,EAAE;MACR,MAAM,EAAE;MACC;MACT,YAAY;MACZ,QAAQ,EAAU,CAAK;MACvB,mBAAmB,CAAC;KACrB,GARM,EAAE,GAQR,CACF;IACO;;EACS,CAAA;CACV,CAAA;AAEjB"}
1
+ {"version":3,"file":"BarsChart.js","names":[],"sources":["../../../../src/assethandler/components/charts/BarsChart.tsx"],"sourcesContent":["import {\n Bar,\n BarChart,\n CartesianGrid,\n Legend,\n ResponsiveContainer,\n Tooltip,\n XAxis,\n YAxis,\n} from 'recharts';\nimport {\n chartTokens,\n defaultSeriesColor,\n formatNumber,\n usePrefersReducedMotion,\n type ChartDatum,\n type ChartSeries,\n type ValueFormatter,\n} from './chartTheme';\nimport { ChartDataTable, ChartEmpty, ChartFigure, ChartLegend, ChartTooltip } from './ChartParts';\n\nexport interface BarsChartProps {\n /** Rows of `{ [xKey]: label, [series.key]: number }`. */\n data: ChartDatum[];\n /** Field holding the category label. */\n xKey: string;\n /** One or more numeric series. */\n series: ChartSeries[];\n /** `vertical` = columns growing up (default); `horizontal` = bars growing right. */\n orientation?: 'vertical' | 'horizontal';\n /** Stack the series instead of grouping side-by-side. Default false. */\n stacked?: boolean;\n /** Pixel height. Default 260. */\n height?: number;\n /** Formats numeric values in the axis + tooltip. Default grouped integer. */\n valueFormat?: ValueFormatter;\n /** Formats the category tick + tooltip header. */\n xTickFormat?: (value: string | number) => string;\n /** Show the value-axis grid. Default true. */\n showGrid?: boolean;\n /** Force the legend on/off. Default: on when there are ≥ 2 series. */\n showLegend?: boolean;\n /** Width of the category label column in `horizontal` mode. Default 96. */\n categoryWidth?: number;\n /** Message shown when `data` is empty. */\n emptyLabel?: string;\n /** Accessible name. */\n ariaLabel?: string;\n className?: string;\n}\n\n/**\n * BarsChart — categorical magnitude as columns or horizontal bars, grouped or\n * stacked. Thin (≤ 24px) marks with 4px rounded data-ends, a hairline grid, a\n * per-mark tooltip, a multi-series legend, an empty state and a screen-reader\n * table. Colour is identity only (never re-encoding the bar's length).\n */\nexport function BarsChart({\n data,\n xKey,\n series,\n orientation = 'vertical',\n stacked = false,\n height = 260,\n valueFormat = formatNumber,\n xTickFormat,\n showGrid = true,\n showLegend,\n categoryWidth = 96,\n emptyLabel,\n ariaLabel,\n className,\n}: BarsChartProps) {\n const reducedMotion = usePrefersReducedMotion();\n\n const resolved = series.map((s, index) => ({\n ...s,\n label: s.label ?? s.key,\n color: s.color ?? defaultSeriesColor(index, series.length),\n }));\n const label = ariaLabel ?? `${resolved.map((s) => s.label).join(', ')} by ${xKey}`;\n\n if (data.length === 0) {\n return <ChartEmpty height={height} label={emptyLabel} className={className} />;\n }\n\n const isColumns = orientation === 'vertical';\n const withLegend = showLegend ?? resolved.length > 1;\n const axisTick = { fill: chartTokens.textMuted, fontSize: 12 };\n const lastIndex = resolved.length - 1;\n\n /** Rounded data-end: columns round the top, horizontal bars the right; a stack\n * rounds only its outermost (last) segment. */\n const radiusFor = (index: number): [number, number, number, number] => {\n const rounded = !stacked || index === lastIndex;\n if (!rounded) return [0, 0, 0, 0];\n return isColumns ? [4, 4, 0, 0] : [0, 4, 4, 0];\n };\n\n const stackId = stacked ? 'stack' : undefined;\n\n return (\n <ChartFigure\n ariaLabel={label}\n height={height}\n className={className}\n a11y={\n <ChartDataTable\n caption={label}\n xLabel={xKey}\n xKey={xKey}\n data={data}\n series={resolved}\n valueFormat={valueFormat}\n />\n }\n >\n <ResponsiveContainer width=\"100%\" height=\"100%\">\n <BarChart\n data={data}\n layout={isColumns ? 'horizontal' : 'vertical'}\n margin={{ top: 8, right: 16, bottom: 4, left: 4 }}\n barCategoryGap={isColumns ? '24%' : '28%'}\n >\n {showGrid ? (\n <CartesianGrid\n vertical={!isColumns}\n horizontal={isColumns}\n stroke={chartTokens.grid}\n strokeWidth={1}\n />\n ) : null}\n\n {/* Keep axes as direct children. Recharts 2's react-is dependency\n cannot recognise React 19 fragments, so fragment-wrapped axes\n disappear from its child discovery and implicit axes take over. */}\n <XAxis\n dataKey={isColumns ? xKey : undefined}\n type={isColumns ? 'category' : 'number'}\n tickLine={false}\n axisLine={false}\n tick={axisTick}\n tickMargin={isColumns ? 8 : undefined}\n tickFormatter={isColumns ? xTickFormat : (value) => valueFormat(Number(value))}\n />\n <YAxis\n dataKey={isColumns ? undefined : xKey}\n type={isColumns ? 'number' : 'category'}\n tickLine={false}\n axisLine={false}\n tick={axisTick}\n width={isColumns ? 48 : categoryWidth}\n tickFormatter={isColumns ? (value) => valueFormat(Number(value)) : xTickFormat}\n />\n\n <Tooltip\n cursor={{ fill: chartTokens.track, opacity: 0.5 }}\n content={<ChartTooltip valueFormat={valueFormat} labelFormat={xTickFormat} />}\n />\n\n {withLegend ? <Legend content={<ChartLegend />} /> : null}\n\n {resolved.map((s, index) => (\n <Bar\n key={s.key}\n dataKey={s.key}\n name={s.label}\n fill={s.color}\n stackId={stackId}\n maxBarSize={24}\n radius={radiusFor(index)}\n isAnimationActive={!reducedMotion}\n />\n ))}\n </BarChart>\n </ResponsiveContainer>\n </ChartFigure>\n );\n}\n"],"mappings":";;;;;;;;;;;;AAyDA,SAAgB,EAAU,EACxB,SACA,SACA,WACA,iBAAc,YACd,aAAU,IACV,YAAS,KACT,iBAAc,GACd,gBACA,cAA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MACN,YAAY,IAAY,IAAI,KAAA;MAC5B,eAAe,IAAY,KAAe,MAAU,EAAY,OAAO,CAAK,CAAC;KAC9E,CAAA;KACD,kBAAC,GAAD;MACE,SAAS,IAAY,KAAA,IAAY;MACjC,MAAM,IAAY,WAAW;MAC7B,UAAU;MACV,UAAU;MACV,MAAM;MACN,OAAO,IAAY,KAAK;MACxB,eAAe,KAAa,MAAU,EAAY,OAAO,CAAK,CAAC,IAAI;KACpE,CAAA;KAED,kBAAC,GAAD;MACE,QAAQ;OAAE,MAAM,EAAY;OAAO,SAAS;MAAI;MAChD,SAAS,kBAAC,GAAD;OAA2B;OAAa,aAAa;MAAc,CAAA;KAC7E,CAAA;KAEA,IAAa,kBAAC,GAAD,EAAQ,SAAS,kBAAC,GAAD,CAAc,CAAA,EAAI,CAAA,IAAI;KAEpD,EAAS,KAAK,GAAG,MAChB,kBAAC,GAAD;MAEE,SAAS,EAAE;MACX,MAAM,EAAE;MACR,MAAM,EAAE;MACC;MACT,YAAY;MACZ,QAAQ,EAAU,CAAK;MACvB,mBAAmB,CAAC;KACrB,GARM,EAAE,GAQR,CACF;IACO;;EACS,CAAA;CACV,CAAA;AAEjB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burdenoff/microfe-assethandler",
3
- "version": "2026.1002.1",
3
+ "version": "2026.1006.1",
4
4
  "description": "Burdenoff AssetHandler Microfrontend",
5
5
  "type": "module",
6
6
  "files": [