@aveonline/ui-react 2.5.1 → 2.5.3

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.
@@ -10,6 +10,7 @@ export declare type ITooltipProps = {
10
10
  initialOpen?: boolean;
11
11
  fullWidthContainer?: boolean;
12
12
  classNameContainer?: string;
13
+ className?: string;
13
14
  /**
14
15
  * Content children portal custom
15
16
  */
@@ -3,5 +3,5 @@ import { ITooltipProps } from './ITooltip';
3
3
  /**
4
4
  * Floating labels that briefly explain the function of a user interface element. They can be triggered when merchants hover.
5
5
  */
6
- declare function Tooltip({ placement, title, description, initialOpen, fullWidthContainer, classNameContainer, asChild, withClick, content, children }: ITooltipProps): JSX.Element;
6
+ declare function Tooltip({ placement, title, description, initialOpen, fullWidthContainer, classNameContainer, asChild, withClick, content, children, className }: ITooltipProps): JSX.Element;
7
7
  export default Tooltip;
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
2
  import { IPropsBar } from './IBar';
3
- export default function Bar<T>({ className, data, cells, paintLastCellForKey, width, height, margin, xAxis, yAxis, isLoading, legend }: IPropsBar<T>): JSX.Element;
3
+ export default function Bar<T>({ className, data, cells, paintLastCellForKey, width, height, margin, xAxis, yAxis, isLoading, legend, tooltipItems }: IPropsBar<T>): JSX.Element;
@@ -5,6 +5,10 @@ export interface CellBar {
5
5
  group: number;
6
6
  color: ColorBar;
7
7
  }
8
+ export interface TooltipItem {
9
+ key: string | number;
10
+ newKey: string | number;
11
+ }
8
12
  export interface MarginBar {
9
13
  top: number;
10
14
  right: number;
@@ -23,4 +27,5 @@ export interface IPropsBar<T> {
23
27
  xAxis?: XAxisProps;
24
28
  yAxis?: YAxisProps;
25
29
  legend?: LegendProps['payload'];
30
+ tooltipItems?: TooltipItem[];
26
31
  }
package/dist/ui-react.mjs CHANGED
@@ -5634,9 +5634,10 @@ function L7({
5634
5634
  asChild: o = !1,
5635
5635
  withClick: s = !1,
5636
5636
  content: l,
5637
- children: u
5637
+ children: u,
5638
+ className: c
5638
5639
  }) {
5639
- const c = hw({ initialOpen: r, placement: e, withClick: s }), f = () => l ? /* @__PURE__ */ b.jsx(b.Fragment, { children: l }) : /* @__PURE__ */ b.jsxs(b.Fragment, { children: [
5640
+ const f = hw({ initialOpen: r, placement: e, withClick: s }), g = () => l ? /* @__PURE__ */ b.jsx(b.Fragment, { children: l }) : /* @__PURE__ */ b.jsxs(b.Fragment, { children: [
5640
5641
  /* @__PURE__ */ b.jsx(Re, { variant: "highlight", color: "default", className: "mb-1", children: t }),
5641
5642
  /* @__PURE__ */ b.jsx(Re, { variant: "body", color: "subdued", children: n })
5642
5643
  ] });
@@ -5644,7 +5645,7 @@ function L7({
5644
5645
  /* @__PURE__ */ b.jsx(
5645
5646
  pw,
5646
5647
  {
5647
- state: c,
5648
+ state: f,
5648
5649
  asChild: o,
5649
5650
  fullWidthContainer: i,
5650
5651
  classNameContainer: a,
@@ -5654,9 +5655,12 @@ function L7({
5654
5655
  /* @__PURE__ */ b.jsx(
5655
5656
  gw,
5656
5657
  {
5657
- state: c,
5658
- className: "w-max max-w-[368px] rounded-[5px] bg-surface-default py-[12px] px-[16px] drop-shadow-[0px_2px_10px_rgba(0,0,0,0.1)]",
5659
- children: f()
5658
+ state: f,
5659
+ className: K(
5660
+ "w-max max-w-[368px] rounded-[5px] bg-surface-default py-[12px] px-[16px] drop-shadow-[0px_2px_10px_rgba(0,0,0,0.1)]",
5661
+ c
5662
+ ),
5663
+ children: g()
5660
5664
  }
5661
5665
  )
5662
5666
  ] });
@@ -11039,7 +11043,7 @@ function jae({
11039
11043
  {
11040
11044
  open: i,
11041
11045
  onClose: (g) => s == null ? void 0 : s(g),
11042
- className: "relative z-50",
11046
+ className: K("relative z-50", l),
11043
11047
  children: [
11044
11048
  /* @__PURE__ */ b.jsx("div", { className: "fixed inset-0 bg-background-modal", "aria-hidden": "true" }),
11045
11049
  /* @__PURE__ */ b.jsx("div", { className: "fixed inset-0 overflow-y-auto", children: /* @__PURE__ */ b.jsx("div", { className: "flex min-h-full items-center justify-center", children: /* @__PURE__ */ b.jsxs(
@@ -15463,7 +15467,7 @@ function Hae({
15463
15467
  }) {
15464
15468
  const [f, g] = he(s), p = !Fa("(min-width: 768px)"), [v, d] = he(o), [h, A] = he(
15465
15469
  l
15466
- ), [C, m] = he(0), [y, E] = he(!1);
15470
+ ), [C, m] = he(o ? 2 : 0), [y, E] = he(!1);
15467
15471
  function x(O, M) {
15468
15472
  A(O === null ? null : O), g(M), M != null ? t([
15469
15473
  new Dt.DateObject({
@@ -33318,37 +33322,48 @@ function Wae({
33318
33322
  xAxis: s,
33319
33323
  yAxis: l,
33320
33324
  isLoading: u = !1,
33321
- legend: c
33325
+ legend: c,
33326
+ tooltipItems: f
33322
33327
  }) {
33323
33328
  if (u)
33324
33329
  return /* @__PURE__ */ b.jsx("div", { className: "flex flex-col items-center gap-y-3 justify-center text-center rounded-b-sm border-border-subdued", children: /* @__PURE__ */ b.jsx("div", { className: "py-8", children: /* @__PURE__ */ b.jsx(iu, { size: "lg" }) }) });
33325
- const f = ({
33326
- index: g,
33327
- name: p,
33328
- color: v
33329
- }) => r && g === t.length - 1 && p in r ? qu(r[p]) : qu(v);
33330
+ const g = ({
33331
+ index: p,
33332
+ name: v,
33333
+ color: d
33334
+ }) => r && p === t.length - 1 && v in r ? qu(r[v]) : qu(d);
33330
33335
  return /* @__PURE__ */ b.jsx("div", { className: K(e), children: /* @__PURE__ */ b.jsxs(hte, { width: i, height: a, data: t, margin: o, children: [
33331
33336
  /* @__PURE__ */ b.jsx(Os, { ...s }),
33332
33337
  /* @__PURE__ */ b.jsx(Bs, { ...l }),
33333
- /* @__PURE__ */ b.jsx(Wi, {}),
33338
+ /* @__PURE__ */ b.jsx(
33339
+ Wi,
33340
+ {
33341
+ formatter: (p, v) => {
33342
+ let d = p;
33343
+ return f && f.forEach((h) => {
33344
+ h.key === v && (d = [p.toString(), h.newKey]);
33345
+ }), d;
33346
+ }
33347
+ }
33348
+ ),
33334
33349
  /* @__PURE__ */ b.jsx(Lo, { payload: c }),
33335
- n.map(({ name: g, group: p, color: v }) => /* @__PURE__ */ b.jsx(
33350
+ n.map(({ name: p, group: v, color: d }) => /* @__PURE__ */ b.jsx(
33336
33351
  Ss,
33337
33352
  {
33338
- role: g,
33339
- dataKey: g,
33340
- stackId: p,
33341
- fill: qu(v),
33342
- children: t.map((d, h) => /* @__PURE__ */ b.jsx(
33353
+ role: p,
33354
+ dataKey: p,
33355
+ stackId: v,
33356
+ fill: qu(d),
33357
+ children: t.map((h, A) => /* @__PURE__ */ b.jsx(
33343
33358
  rh,
33344
33359
  {
33345
33360
  role: "img",
33346
- fill: f({ index: h, name: g, color: v })
33361
+ fill: g({ index: A, name: p, color: d })
33347
33362
  },
33348
- `cell-${h}`
33363
+ `cell-${A}`
33349
33364
  ))
33350
33365
  },
33351
- g
33366
+ p
33352
33367
  ))
33353
33368
  ] }) });
33354
33369
  }
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.5.1",
5
+ "version": "2.5.3",
6
6
  "types": "./dist/index.d.ts",
7
7
  "files": [
8
8
  "dist"