@aveonline/ui-react 2.28.1 → 2.28.2

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.
@@ -13,4 +13,6 @@ export interface IPropsPie<T> {
13
13
  minValue?: number;
14
14
  colors: string[];
15
15
  decimals: number;
16
+ hasLabel?: boolean;
17
+ children?: React.SVGProps<SVGGElement>;
16
18
  }
@@ -3,7 +3,7 @@ interface PieData {
3
3
  name: string;
4
4
  value: number;
5
5
  }
6
- export default function Pie<T extends PieData>({ data, width, height, innerRadius, outerRadius, cx, cy, paddingAngle, cornerRadius, dataKey, isLoading, minValue, colors, decimals }: IPropsPie<T> & {
6
+ export default function Pie<T extends PieData>({ data, width, height, innerRadius, outerRadius, cx, cy, paddingAngle, cornerRadius, dataKey, isLoading, minValue, colors, decimals, hasLabel, children }: IPropsPie<T> & {
7
7
  minValue?: number;
8
8
  colors?: string[];
9
9
  }): JSX.Element;
package/dist/ui-react.mjs CHANGED
@@ -49498,24 +49498,33 @@ function f9e({
49498
49498
  isLoading: d = !1,
49499
49499
  minValue: f = 2,
49500
49500
  colors: h,
49501
- decimals: p = 3
49501
+ decimals: p = 3,
49502
+ hasLabel: g = !0,
49503
+ children: v
49502
49504
  }) {
49503
- const v = e.filter((x) => x.value >= f), m = O6e(v), C = h && h.length >= m.length ? h : Array.from({ length: m.length }, (x, y) => `hsl(${y * 360 / m.length}, 70%, 50%)`), b = a || Math.min(t, n) / (m.length > 5 ? 2.5 : 2);
49504
- return d ? /* @__PURE__ */ A.jsx("div", { className: "flex flex-col items-center gap-y-3 justify-center text-center rounded-b-sm border-border-subdued", children: /* @__PURE__ */ A.jsx("div", { className: "py-8", children: /* @__PURE__ */ A.jsx(Ia, { size: "lg" }) }) }) : /* @__PURE__ */ A.jsx(d5e, { width: t, height: n, children: /* @__PURE__ */ A.jsx(
49505
- Y1,
49506
- {
49507
- data: m,
49508
- innerRadius: r,
49509
- outerRadius: b,
49510
- cx: i,
49511
- cy: o,
49512
- paddingAngle: l,
49513
- dataKey: u,
49514
- cornerRadius: s,
49515
- label: ({ value: x, name: y }) => y ? `${y} - ${parseFloat(x).toFixed(p)}%` : `${parseFloat(x).toFixed(p)}%`,
49516
- children: m.map((x, y) => /* @__PURE__ */ A.jsx(_o, { fill: C[y] }, `cell-${y}`))
49517
- }
49518
- ) });
49505
+ const C = e.filter((E) => E.value >= f), b = O6e(C), x = h && h.length >= b.length ? h : Array.from({ length: b.length }, (E, w) => `hsl(${w * 360 / b.length}, 70%, 50%)`), y = a || Math.min(t, n) / (b.length > 5 ? 2.5 : 2);
49506
+ return d ? /* @__PURE__ */ A.jsx("div", { className: "flex flex-col items-center gap-y-3 justify-center text-center rounded-b-sm border-border-subdued", children: /* @__PURE__ */ A.jsx("div", { className: "py-8", children: /* @__PURE__ */ A.jsx(Ia, { size: "lg" }) }) }) : /* @__PURE__ */ A.jsxs(d5e, { width: t, height: n, children: [
49507
+ /* @__PURE__ */ A.jsx(
49508
+ Y1,
49509
+ {
49510
+ data: b,
49511
+ innerRadius: r,
49512
+ outerRadius: y,
49513
+ cx: i,
49514
+ cy: o,
49515
+ paddingAngle: l,
49516
+ dataKey: u,
49517
+ cornerRadius: s,
49518
+ labelLine: g,
49519
+ label: ({ value: E, name: w }) => {
49520
+ if (g)
49521
+ return w ? `${w} - ${parseFloat(E).toFixed(p)}%` : `${parseFloat(E).toFixed(p)}%`;
49522
+ },
49523
+ children: b.map((E, w) => /* @__PURE__ */ A.jsx(_o, { fill: x[w] }, `cell-${w}`))
49524
+ }
49525
+ ),
49526
+ v
49527
+ ] });
49519
49528
  }
49520
49529
  function h9e({
49521
49530
  data: e,
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@aveonline/ui-react",
3
3
  "description": "Home base for Aveonline design system - ecosystem react",
4
4
  "private": false,
5
- "version": "2.28.1",
5
+ "version": "2.28.2",
6
6
  "types": "./dist/index.d.ts",
7
7
  "files": [
8
8
  "dist"