impact-nova 2.0.2 → 2.0.4

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 (40) hide show
  1. package/dist/components/ui/accordion.d.ts +13 -0
  2. package/dist/components/ui/accordion.js +50 -33
  3. package/dist/components/ui/ag-grid-react/cell-renderers/percent-progress-display-renderer.js +24 -23
  4. package/dist/components/ui/ag-grid-react/headers/components/header-info.d.ts +8 -6
  5. package/dist/components/ui/ag-grid-react/headers/components/header-info.js +69 -60
  6. package/dist/components/ui/ag-grid-react/headers/custom-header.js +23 -22
  7. package/dist/components/ui/ag-grid-react/headers/header-search-input.js +43 -35
  8. package/dist/components/ui/ag-grid-react/index.js +44 -42
  9. package/dist/components/ui/breadcrumb.d.ts +5 -1
  10. package/dist/components/ui/breadcrumb.js +59 -51
  11. package/dist/components/ui/date-picker/date-picker.js +14 -14
  12. package/dist/components/ui/date-picker/date-range-picker.js +25 -25
  13. package/dist/components/ui/date-picker/month-picker.js +4 -4
  14. package/dist/components/ui/date-picker/month-range-picker.js +7 -7
  15. package/dist/components/ui/date-picker/multi-date-picker.js +9 -9
  16. package/dist/components/ui/date-picker/multi-month-picker.js +29 -29
  17. package/dist/components/ui/date-picker/multi-week-picker.js +20 -20
  18. package/dist/components/ui/date-picker/week-picker.js +31 -31
  19. package/dist/components/ui/date-picker/week-range-picker.js +22 -22
  20. package/dist/components/ui/dynamic-layout.d.ts +1 -1
  21. package/dist/components/ui/empty-container.js +58 -49
  22. package/dist/components/ui/filter-strip/filter-summary.js +28 -29
  23. package/dist/components/ui/filter-strip/filter-tag-list.js +87 -96
  24. package/dist/components/ui/radio-group.js +19 -19
  25. package/dist/components/ui/select/select.js +49 -48
  26. package/dist/components/ui/sidebar.d.ts +2 -1
  27. package/dist/components/ui/sidebar.js +212 -202
  28. package/dist/components/ui/tag.d.ts +3 -1
  29. package/dist/components/ui/tag.js +65 -44
  30. package/dist/components/ui/types/empty-container.types.d.ts +2 -0
  31. package/dist/i18n/defaultMessages.d.ts +1 -0
  32. package/dist/i18n/defaultMessages.js +1 -0
  33. package/dist/i18n/locales/de.js +1 -0
  34. package/dist/i18n/locales/es.js +1 -0
  35. package/dist/i18n/locales/hi.js +1 -0
  36. package/dist/i18n/locales/kn.js +1 -0
  37. package/dist/impact-nova-components.css +4 -0
  38. package/dist/impact-nova.css +1 -1
  39. package/dist/index.js +441 -439
  40. package/package.json +1 -1
@@ -1,10 +1,23 @@
1
1
  import * as React from "react";
2
2
  import * as AccordionPrimitive from "@radix-ui/react-accordion";
3
3
  declare const Accordion: React.ForwardRefExoticComponent<(AccordionPrimitive.AccordionSingleProps | AccordionPrimitive.AccordionMultipleProps) & React.RefAttributes<HTMLDivElement>>;
4
+ declare const ACCORDION_HEADING_TAGS: {
5
+ readonly 2: "h2";
6
+ readonly 3: "h3";
7
+ readonly 4: "h4";
8
+ readonly 5: "h5";
9
+ readonly 6: "h6";
10
+ };
11
+ type AccordionHeadingLevel = keyof typeof ACCORDION_HEADING_TAGS;
4
12
  declare const AccordionItem: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
5
13
  declare const AccordionTrigger: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & {
6
14
  badge?: React.ReactNode;
7
15
  rightActions?: React.ReactNode;
16
+ /**
17
+ * Heading level for the accordion section title. Defaults to `2` so panels
18
+ * follow a single page `h1` without skipping levels.
19
+ */
20
+ headingLevel?: AccordionHeadingLevel;
8
21
  /**
9
22
  * `default` — leading chevron tile + i18n tooltip (standard panels).
10
23
  * `plain` — trigger only; use for list rows (e.g. SKU) where children include layout + chevron.
@@ -1,65 +1,82 @@
1
1
  import { jsx as e, jsxs as s } from "react/jsx-runtime";
2
2
  import * as d from "react";
3
3
  import * as i from "@radix-ui/react-accordion";
4
- import { ChevronRight as g } from "impact-nova-icons";
5
- import { cn as a } from "../../lib/utils.js";
6
- import { Tooltip as p, TooltipTrigger as u, TooltipContent as v } from "./tooltip.js";
7
- import { useImpactNovaI18n as x } from "../../i18n/ImpactNovaI18nContext.js";
8
- const R = i.Root, b = d.forwardRef(({ className: o, ...t }, r) => /* @__PURE__ */ e(
4
+ import { ChevronRight as u } from "impact-nova-icons";
5
+ import { cn as o } from "../../lib/utils.js";
6
+ import { Tooltip as v, TooltipTrigger as x, TooltipContent as N } from "./tooltip.js";
7
+ import { useImpactNovaI18n as b } from "../../i18n/ImpactNovaI18nContext.js";
8
+ const F = i.Root, y = {
9
+ 2: "h2",
10
+ 3: "h3",
11
+ 4: "h4",
12
+ 5: "h5",
13
+ 6: "h6"
14
+ }, g = "m-0 p-0 text-inherit font-inherit", w = d.forwardRef(({ className: a, ...t }, r) => /* @__PURE__ */ e(
9
15
  i.Item,
10
16
  {
11
17
  ref: r,
12
18
  "data-item": t.value,
13
19
  "data-disabled": t.disabled ? "" : void 0,
14
- className: a(
20
+ className: o(
15
21
  "ia-accordion-item border-b rounded-lg bg-white border-[#EFF2FA]",
16
- o
22
+ a
17
23
  ),
18
24
  ...t
19
25
  }
20
26
  ));
21
- b.displayName = "AccordionItem";
22
- const h = d.forwardRef(
23
- ({ className: o, children: t, badge: r, rightActions: n, variant: l = "default", ...c }, m) => {
24
- const { t: f } = x();
25
- return l === "plain" ? /* @__PURE__ */ e(i.Header, { className: "flex flex-1", children: /* @__PURE__ */ e(
27
+ w.displayName = "AccordionItem";
28
+ const C = d.forwardRef(
29
+ ({
30
+ className: a,
31
+ children: t,
32
+ badge: r,
33
+ rightActions: n,
34
+ headingLevel: l = 2,
35
+ variant: h = "default",
36
+ ...c
37
+ }, m) => {
38
+ const { t: p } = b(), f = y[l];
39
+ return h === "plain" ? /* @__PURE__ */ e(i.Header, { asChild: !0, className: "flex flex-1", children: /* @__PURE__ */ e(f, { className: o("flex flex-1", g), children: /* @__PURE__ */ e(
26
40
  i.Trigger,
27
41
  {
28
42
  ref: m,
29
- className: a(
43
+ className: o(
30
44
  "group flex flex-1 outline-none transition-all",
31
45
  "focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-2 focus-visible:ring-offset-canvas-elevated",
32
- o
46
+ a
33
47
  ),
34
48
  ...c,
35
49
  children: t
36
50
  }
37
- ) }) : /* @__PURE__ */ s(
38
- i.Header,
51
+ ) }) }) : /* @__PURE__ */ e(i.Header, { asChild: !0, children: /* @__PURE__ */ s(
52
+ f,
39
53
  {
40
- className: "flex items-center",
54
+ className: o(
55
+ "flex items-center",
56
+ g
57
+ ),
41
58
  style: { overflow: "visible" },
42
59
  children: [
43
60
  /* @__PURE__ */ s(
44
61
  i.Trigger,
45
62
  {
46
63
  ref: m,
47
- className: a(
64
+ className: o(
48
65
  "flex min-w-0 flex-1 items-center gap-3 px-4 py-2 text-sm font-semibold transition-all text-left [&[data-state=open]>div>svg]:-rotate-90 focus-visible:outline-none",
49
- o
66
+ a
50
67
  ),
51
68
  style: { outline: "none" },
52
69
  ...c,
53
70
  children: [
54
- /* @__PURE__ */ s(p, { children: [
55
- /* @__PURE__ */ e(u, { asChild: !0, children: /* @__PURE__ */ e("div", { className: "flex items-center justify-center h-8 w-8 shrink-0 rounded-lg bg-secondary text-secondary-foreground transition-transform duration-200", children: /* @__PURE__ */ e(
56
- g,
71
+ /* @__PURE__ */ s(v, { children: [
72
+ /* @__PURE__ */ e(x, { asChild: !0, children: /* @__PURE__ */ e("div", { className: "flex items-center justify-center h-8 w-8 shrink-0 rounded-lg bg-secondary text-secondary-foreground transition-transform duration-200", children: /* @__PURE__ */ e(
73
+ u,
57
74
  {
58
75
  size: 19,
59
76
  className: "transition-transform duration-200"
60
77
  }
61
78
  ) }) }),
62
- /* @__PURE__ */ e(v, { side: "top", variant: "tertiary", children: f("aria.toggle") })
79
+ /* @__PURE__ */ e(N, { side: "top", variant: "tertiary", children: p("aria.toggle") })
63
80
  ] }),
64
81
  /* @__PURE__ */ s("div", { className: "flex min-w-0 flex-1 items-center gap-3", children: [
65
82
  t,
@@ -71,26 +88,26 @@ const h = d.forwardRef(
71
88
  n ? /* @__PURE__ */ e("div", { className: "flex shrink-0 items-center pr-4", children: n }) : null
72
89
  ]
73
90
  }
74
- );
91
+ ) });
75
92
  }
76
93
  );
77
- h.displayName = i.Trigger.displayName;
78
- const N = d.forwardRef(({ className: o, children: t, surfaceClassName: r, ...n }, l) => /* @__PURE__ */ e(
94
+ C.displayName = i.Trigger.displayName;
95
+ const T = d.forwardRef(({ className: a, children: t, surfaceClassName: r, ...n }, l) => /* @__PURE__ */ e(
79
96
  i.Content,
80
97
  {
81
98
  ref: l,
82
- className: a(
99
+ className: o(
83
100
  "overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down data-[state=open]:overflow-visible",
84
101
  r
85
102
  ),
86
103
  ...n,
87
- children: /* @__PURE__ */ e("div", { className: a("px-4 pb-4 pt-2", o), children: t })
104
+ children: /* @__PURE__ */ e("div", { className: o("px-4 pb-4 pt-2", a), children: t })
88
105
  }
89
106
  ));
90
- N.displayName = i.Content.displayName;
107
+ T.displayName = i.Content.displayName;
91
108
  export {
92
- R as Accordion,
93
- N as AccordionContent,
94
- b as AccordionItem,
95
- h as AccordionTrigger
109
+ F as Accordion,
110
+ T as AccordionContent,
111
+ w as AccordionItem,
112
+ C as AccordionTrigger
96
113
  };
@@ -1,61 +1,62 @@
1
- import { jsx as c, jsxs as V } from "react/jsx-runtime";
1
+ import { jsx as o, jsxs as $ } from "react/jsx-runtime";
2
2
  import { Badge as j } from "../../badge.js";
3
3
  import { Progress as w } from "../../progress.js";
4
- import { cn as $ } from "../../../../lib/utils.js";
5
- function E(e) {
4
+ import { cn as E } from "../../../../lib/utils.js";
5
+ function F(e) {
6
6
  return e && typeof e == "object" && "value" in e ? e.value : e;
7
7
  }
8
- function F(e) {
8
+ function S(e) {
9
9
  if (e == null || e === "") return null;
10
10
  if (typeof e == "number") return isNaN(e) ? null : e;
11
11
  const a = Number(String(e).replace(/%/g, "").trim());
12
12
  return isNaN(a) ? null : a;
13
13
  }
14
- function S(e, a, n) {
14
+ function _(e, a, n) {
15
15
  return Math.min(n, Math.max(a, e));
16
16
  }
17
- const _ = (e) => {
18
- const { value: a, disabled: n, colDef: o, className: b, data: s } = e, l = e.min ?? 0, d = e.max ?? 100, u = e.fractionDigits ?? 0, h = e.badgeVariant ?? "subtle", x = e.badgeColor ?? "neutral", p = e.badgeShape ?? "circle", N = e.progressVariant ?? "default", f = a && typeof a == "object" && "cellMetadata" in a ? a.cellMetadata?._isDisabled : void 0, m = s && typeof s == "object" && "rowMetadata" in s ? s.rowMetadata?._isDisabled : void 0;
17
+ const A = (e) => {
18
+ const { value: a, disabled: n, colDef: s, className: h, data: r } = e, l = e.min ?? 0, d = e.max ?? 100, m = e.fractionDigits ?? 0, N = e.badgeVariant ?? "subtle", x = e.badgeColor ?? "neutral", p = e.badgeShape ?? "circle", v = e.progressVariant ?? "default", u = a && typeof a == "object" && "cellMetadata" in a ? a.cellMetadata?._isDisabled : void 0, f = r && typeof r == "object" && "rowMetadata" in r ? r.rowMetadata?._isDisabled : void 0;
19
19
  let t = !1;
20
20
  if (!n) {
21
- const P = o?._originalEditable;
22
- o?.editable === !1 ? t = !1 : f === !1 ? t = !0 : f === !0 ? t = !1 : m === !1 ? t = !0 : m === !0 ? t = !1 : t = P === !0 || o?.editable === !0;
21
+ const V = s?._originalEditable;
22
+ s?.editable === !1 ? t = !1 : u === !1 ? t = !0 : u === !0 ? t = !1 : f === !1 ? t = !0 : f === !0 ? t = !1 : t = V === !0 || s?.editable === !0;
23
23
  }
24
- const v = E(a), g = F(v), i = g != null, r = i ? S(g, l, d) : l, y = d - l || 1, D = i ? (r - l) / y * 100 : 0, M = i ? u > 0 ? `${r.toFixed(u)}%` : `${Math.round(r)}%` : "--";
25
- return /* @__PURE__ */ c(
24
+ const y = F(a), g = S(y), i = g != null, c = i ? _(g, l, d) : l, D = d - l || 1, P = i ? (c - l) / D * 100 : 0, b = i ? m > 0 ? `${c.toFixed(m)}%` : `${Math.round(c)}%` : "--", M = `${s?.headerName?.trim() || "Progress"}: ${b}`;
25
+ return /* @__PURE__ */ o(
26
26
  "div",
27
27
  {
28
- className: `w-full h-full flex items-center ag-cell-inner-padding ${b ?? ""} ${n ? "opacity-60 cursor-not-allowed" : t ? "in-ag-editable-cell-highlight" : ""}`,
29
- children: /* @__PURE__ */ V("div", { className: "flex w-full min-w-0 items-center gap-2", children: [
30
- /* @__PURE__ */ c("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ c(
28
+ className: `w-full h-full flex items-center ag-cell-inner-padding ${h ?? ""} ${n ? "opacity-60 cursor-not-allowed" : t ? "in-ag-editable-cell-highlight" : ""}`,
29
+ children: /* @__PURE__ */ $("div", { className: "flex w-full min-w-0 items-center gap-2", children: [
30
+ /* @__PURE__ */ o("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ o(
31
31
  w,
32
32
  {
33
33
  label: !1,
34
- variant: N,
35
- value: D,
34
+ "aria-label": M,
35
+ variant: v,
36
+ value: P,
36
37
  max: 100,
37
- "aria-valuenow": i ? r : void 0,
38
+ "aria-valuenow": i ? c : void 0,
38
39
  "aria-valuemin": l,
39
40
  "aria-valuemax": d,
40
41
  className: "h-2.5"
41
42
  }
42
43
  ) }),
43
- /* @__PURE__ */ c(
44
+ /* @__PURE__ */ o(
44
45
  j,
45
46
  {
46
- variant: h,
47
+ variant: N,
47
48
  color: x,
48
49
  shape: p,
49
50
  size: "sm",
50
- className: $("shrink-0 tabular-nums leading-none", !i && "text-content-empty"),
51
- children: M
51
+ className: E("shrink-0 tabular-nums leading-none", !i && "text-content-empty"),
52
+ children: b
52
53
  }
53
54
  )
54
55
  ] })
55
56
  }
56
57
  );
57
58
  };
58
- _.displayName = "PercentProgressDisplayRenderer";
59
+ A.displayName = "PercentProgressDisplayRenderer";
59
60
  export {
60
- _ as PercentProgressDisplayRenderer
61
+ A as PercentProgressDisplayRenderer
61
62
  };
@@ -2,29 +2,31 @@ import { CustomHeaderProps } from 'ag-grid-react';
2
2
  import { IHeaderGroupParams } from 'ag-grid-community';
3
3
  import { ExtendedHeaderComponentParams, InfoContent } from '../../../types/ag-grid.types';
4
4
  /**
5
- * Info Icon Trigger - Shared presentational component with propagation stop
5
+ * Info Icon Trigger - native button for grid header info actions.
6
6
  */
7
- export declare const InfoIconTrigger: ({ onClick, className }: {
8
- onClick?: (e: React.MouseEvent) => void;
7
+ export declare const InfoIconTrigger: ({ onClick, className, label, }: {
8
+ onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
9
9
  className?: string;
10
+ label: string;
10
11
  }) => import("react/jsx-runtime").JSX.Element;
11
12
  /**
12
13
  * Tooltip-only Info Trigger
13
14
  */
14
- export declare const TooltipInfoTrigger: ({ content, className, onInfoClick }: {
15
+ export declare const TooltipInfoTrigger: ({ content, className, onInfoClick, label, }: {
15
16
  content: string;
16
17
  className?: string;
17
18
  onInfoClick?: (e: React.MouseEvent) => void;
19
+ label: string;
18
20
  }) => import("react/jsx-runtime").JSX.Element;
19
21
  /**
20
22
  * Modal-enabled Info Trigger
21
23
  * Only this component allocates a useState hook.
22
24
  */
23
- export declare const ModalInfoTrigger: ({ infoData, className, onInfoClick }: {
25
+ export declare const ModalInfoTrigger: ({ infoData, className, onInfoClick, label, }: {
24
26
  infoData?: InfoContent;
25
- displayName?: string;
26
27
  className?: string;
27
28
  onInfoClick?: (e: React.MouseEvent) => void;
29
+ label: string;
28
30
  }) => import("react/jsx-runtime").JSX.Element;
29
31
  type HeaderInfoProps = (CustomHeaderProps | IHeaderGroupParams) & ExtendedHeaderComponentParams & {
30
32
  className?: string;
@@ -1,96 +1,105 @@
1
- import { jsx as n, jsxs as p, Fragment as h } from "react/jsx-runtime";
2
- import { useState as u } from "react";
3
- import { cn as f } from "../../../../../lib/utils.js";
4
- import { Info as I } from "impact-nova-icons";
5
- import { LazyTooltip as d } from "./lazy-tooltip.js";
6
- import { InfoModal as g } from "./info-modal.js";
7
- import { useImpactNovaI18n as k } from "../../../../../i18n/ImpactNovaI18nContext.js";
8
- const m = ({ onClick: t, className: e }) => {
9
- const o = (i) => {
10
- i.stopPropagation(), t && t(i);
1
+ import { jsx as t, jsxs as I, Fragment as g } from "react/jsx-runtime";
2
+ import { useState as k } from "react";
3
+ import { cn as m } from "../../../../../lib/utils.js";
4
+ import { Info as b } from "impact-nova-icons";
5
+ import { LazyTooltip as p } from "./lazy-tooltip.js";
6
+ import { InfoModal as C } from "./info-modal.js";
7
+ import { useImpactNovaI18n as h } from "../../../../../i18n/ImpactNovaI18nContext.js";
8
+ const u = ({
9
+ onClick: n,
10
+ className: i,
11
+ label: r
12
+ }) => {
13
+ const o = (a) => {
14
+ a.stopPropagation(), n?.(a);
11
15
  };
12
- return /* @__PURE__ */ n(
13
- "span",
16
+ return /* @__PURE__ */ t(
17
+ "button",
14
18
  {
15
- className: f(
19
+ type: "button",
20
+ "aria-label": r,
21
+ className: m(
16
22
  "cursor-pointer flex items-center justify-center shrink-0 w-6 h-6 rounded-md transition-all duration-200 text-content-tertiary hover:bg-muted active:bg-stroke-hairline",
17
- e
23
+ i
18
24
  ),
19
25
  onClick: o,
20
- role: "button",
21
- children: /* @__PURE__ */ n(I, { size: 16 })
26
+ children: /* @__PURE__ */ t(b, { size: 16, "aria-hidden": !0 })
22
27
  }
23
28
  );
24
29
  }, v = ({
25
- content: t,
26
- className: e,
27
- onInfoClick: o
28
- }) => /* @__PURE__ */ n(d, { content: t, children: /* @__PURE__ */ n(m, { onClick: o, className: e }) }), C = ({
29
- infoData: t,
30
- className: e,
31
- onInfoClick: o
30
+ content: n,
31
+ className: i,
32
+ onInfoClick: r,
33
+ label: o
34
+ }) => /* @__PURE__ */ t(p, { content: n, children: /* @__PURE__ */ t(u, { onClick: r, className: i, label: o }) }), y = ({
35
+ infoData: n,
36
+ className: i,
37
+ onInfoClick: r,
38
+ label: o
32
39
  }) => {
33
- const { t: i } = k(), [a, s] = u(!1), l = (r) => {
34
- r.stopPropagation(), s(!0);
40
+ const { t: a } = h(), [l, s] = k(!1), c = (e) => {
41
+ e.stopPropagation(), s(!0);
35
42
  };
36
- return /* @__PURE__ */ p(h, { children: [
37
- /* @__PURE__ */ n(d, { content: i("gridHeader.clickForDetails"), children: /* @__PURE__ */ n(
38
- m,
43
+ return /* @__PURE__ */ I(g, { children: [
44
+ /* @__PURE__ */ t(p, { content: a("gridHeader.clickForDetails"), children: /* @__PURE__ */ t(
45
+ u,
39
46
  {
40
- onClick: (r) => {
41
- l(r), o && o(r);
47
+ label: o,
48
+ onClick: (e) => {
49
+ c(e), r && r(e);
42
50
  },
43
- className: f(
51
+ className: m(
44
52
  "hover:bg-muted hover:shadow-sm hover:text-brand-variant-hover hover:-translate-y-0.5 active:scale-95",
45
- e
53
+ i
46
54
  )
47
55
  }
48
56
  ) }),
49
- a && t && // Stop propagation to prevent the click from bubbling to the header group
57
+ l && n && // Stop propagation to prevent the click from bubbling to the header group
50
58
  // regardless of whether the modal is portaled or not.
51
- /* @__PURE__ */ n("div", { onClick: (r) => r.stopPropagation(), children: /* @__PURE__ */ n(
52
- g,
59
+ /* @__PURE__ */ t("div", { onClick: (e) => e.stopPropagation(), children: /* @__PURE__ */ t(
60
+ C,
53
61
  {
54
- open: a,
62
+ open: l,
55
63
  onClose: () => s(!1),
56
- data: t
64
+ data: n
57
65
  }
58
66
  ) })
59
67
  ] });
60
- }, M = (t) => {
61
- const {
62
- showInfoIcon: e,
68
+ }, M = (n) => {
69
+ const { t: i } = h(), {
70
+ showInfoIcon: r,
63
71
  displayName: o,
64
- displayMode: i = "tooltip",
65
- infoTooltip: a,
72
+ displayMode: a = "tooltip",
73
+ infoTooltip: l,
66
74
  infoData: s,
67
- className: l,
68
- onInfoClick: r
69
- } = t;
70
- if (!e || !o || o.trim() === "") return null;
71
- const c = () => {
72
- r && r(t);
73
- };
74
- return i === "modal" ? /* @__PURE__ */ n(
75
- C,
75
+ className: c,
76
+ onInfoClick: e
77
+ } = n;
78
+ if (!r || !o || o.trim() === "") return null;
79
+ const d = () => {
80
+ e && e(n);
81
+ }, f = l ? `${o}: ${l}` : `${o} ${i("gridHeader.information")}`;
82
+ return a === "modal" ? /* @__PURE__ */ t(
83
+ y,
76
84
  {
77
85
  infoData: s,
78
- displayName: o,
79
- className: l,
80
- onInfoClick: c
86
+ className: c,
87
+ onInfoClick: d,
88
+ label: f
81
89
  }
82
- ) : /* @__PURE__ */ n(
90
+ ) : /* @__PURE__ */ t(
83
91
  v,
84
92
  {
85
- content: a || `Info about ${o}`,
86
- className: l,
87
- onInfoClick: c
93
+ content: l || `Info about ${o}`,
94
+ className: c,
95
+ onInfoClick: d,
96
+ label: f
88
97
  }
89
98
  );
90
99
  };
91
100
  export {
92
101
  M as HeaderInfo,
93
- m as InfoIconTrigger,
94
- C as ModalInfoTrigger,
102
+ u as InfoIconTrigger,
103
+ y as ModalInfoTrigger,
95
104
  v as TooltipInfoTrigger
96
105
  };
@@ -1,12 +1,12 @@
1
- import { jsx as e, jsxs as c, Fragment as Q } from "react/jsx-runtime";
1
+ import { jsx as e, jsxs as c, Fragment as J } from "react/jsx-runtime";
2
2
  import { cn as u } from "../../../../lib/utils.js";
3
- import { useGridHeader as U } from "./context/grid-header-context.js";
4
- import { HeaderInfo as W } from "./components/header-info.js";
5
- import { Checkbox as X } from "../../checkbox.js";
6
- import { TruncatedText as Y } from "./components/truncated-text.js";
7
- import { HeaderSearchInput as $ } from "./header-search-input.js";
3
+ import { useGridHeader as Q } from "./context/grid-header-context.js";
4
+ import { HeaderInfo as U } from "./components/header-info.js";
5
+ import { Checkbox as W } from "../../checkbox.js";
6
+ import { TruncatedText as X } from "./components/truncated-text.js";
7
+ import { HeaderSearchInput as Y } from "./header-search-input.js";
8
8
  import { useImpactNovaI18n as H } from "../../../../i18n/ImpactNovaI18nContext.js";
9
- const ee = () => /* @__PURE__ */ c(Q, { children: [
9
+ const ee = () => /* @__PURE__ */ c(J, { children: [
10
10
  /* @__PURE__ */ e("span", { className: "sort-asc-icon inline-flex transition-colors text-content-tertiary hover:text-brand-variant-hover", children: /* @__PURE__ */ c(
11
11
  "svg",
12
12
  {
@@ -55,8 +55,8 @@ function te(o) {
55
55
  const d = o.getServerSideSelectionState?.();
56
56
  if (!d || !("selectAll" in d))
57
57
  return { isChecked: !1, isIndeterminate: !1 };
58
- const { selectAll: i, toggledNodes: l } = d, f = !!(l && l.length > 0);
59
- return i && !f ? { isChecked: !0, isIndeterminate: !1 } : i && f ? { isChecked: !1, isIndeterminate: !0 } : !i && f ? { isChecked: !1, isIndeterminate: !0 } : { isChecked: !1, isIndeterminate: !1 };
58
+ const { selectAll: i, toggledNodes: l } = d, g = !!(l && l.length > 0);
59
+ return i && !g ? { isChecked: !0, isIndeterminate: !1 } : i && g ? { isChecked: !1, isIndeterminate: !0 } : !i && g ? { isChecked: !1, isIndeterminate: !0 } : { isChecked: !1, isIndeterminate: !1 };
60
60
  }
61
61
  const s = o.getSelectedRows().length, m = o.getDisplayedRowCount();
62
62
  return s === 0 ? { isChecked: !1, isIndeterminate: !1 } : s === m && m > 0 ? { isChecked: !0, isIndeterminate: !1 } : { isChecked: !1, isIndeterminate: !0 };
@@ -64,7 +64,7 @@ function te(o) {
64
64
  const re = ({ api: o }) => {
65
65
  const { t } = H(), { isChecked: s, isIndeterminate: m } = te(o);
66
66
  return /* @__PURE__ */ e(
67
- X,
67
+ W,
68
68
  {
69
69
  checked: m ? "indeterminate" : s,
70
70
  onCheckedChange: (i) => {
@@ -86,7 +86,7 @@ const re = ({ api: o }) => {
86
86
  progressSort: d,
87
87
  column: i,
88
88
  api: l,
89
- handleInlineSearch: f,
89
+ handleInlineSearch: g,
90
90
  handleClearSearchInline: x,
91
91
  onColumnSearchClick: w,
92
92
  onAdvanceSearchClick: I,
@@ -104,7 +104,7 @@ const re = ({ api: o }) => {
104
104
  enableSpaceSplitting: _,
105
105
  enableBooleanParsing: B,
106
106
  enableDateParsing: Z
107
- } = o, a = U(), { t: p } = H(), n = i.getColDef(), h = i.getColId(), v = i.isFilterActive(), R = i.getSort(), g = i.getSortIndex(), j = !!R, O = g != null && (g > 0 || l.getColumnState().filter((r) => r.sort).length > 1), z = j && O, S = n?.filter || "agTextColumnFilter", C = S === "agNumberColumnFilter" || (Array.isArray(n?.type) ? n.type.some((r) => r === "number" || r === "numericColumn") : n?.type === "number" || n?.type === "numericColumn");
107
+ } = o, a = Q(), { t: f } = H(), n = i.getColDef(), h = i.getColId(), v = i.isFilterActive(), R = i.getSort(), p = i.getSortIndex(), j = !!R, O = p != null && (p > 0 || l.getColumnState().filter((r) => r.sort).length > 1), z = j && O, S = n?.filter || "agTextColumnFilter", C = S === "agNumberColumnFilter" || (Array.isArray(n?.type) ? n.type.some((r) => r === "number" || r === "numericColumn") : n?.type === "number" || n?.type === "numericColumn");
108
108
  S === "agDateColumnFilter" || (Array.isArray(n?.type) ? n.type.includes("dateColumn") : n?.type);
109
109
  const b = l.getGridOption("context")?.activeSearchColumnId === h, E = a?.activeMenuColumnId === h, k = ![
110
110
  "agTextColumnFilter",
@@ -124,22 +124,22 @@ const re = ({ api: o }) => {
124
124
  return;
125
125
  }
126
126
  a && (b ? a.closeSearch() : a.openSearch(h));
127
- }, K = (r) => {
127
+ }, $ = (r) => {
128
128
  r.preventDefault(), r.stopPropagation(), a && a.openMenu(h, r.currentTarget, "column");
129
- }, q = (r) => /* @__PURE__ */ e("span", { onClick: (J) => J.stopPropagation(), children: /* @__PURE__ */ e(
130
- W,
129
+ }, K = (r) => /* @__PURE__ */ e("span", { onClick: (q) => q.stopPropagation(), children: /* @__PURE__ */ e(
130
+ U,
131
131
  {
132
132
  ...o,
133
133
  className: r
134
134
  }
135
135
  ) });
136
136
  return b && a && !k ? /* @__PURE__ */ e(
137
- $,
137
+ Y,
138
138
  {
139
139
  column: i,
140
140
  api: l,
141
141
  onClose: () => a.closeSearch(),
142
- handleInlineSearch: f,
142
+ handleInlineSearch: g,
143
143
  handleClearSearchInline: x ? () => x(o) : void 0,
144
144
  onAdvanceSearchClick: I,
145
145
  toggleAdvanceSearch: N,
@@ -164,7 +164,7 @@ const re = ({ api: o }) => {
164
164
  n?.headerCheckboxSelection && (!t || t.trim() === "") ? "justify-center" : ""
165
165
  ),
166
166
  "data-selection-column": n?.headerCheckboxSelection && (!t || t.trim() === "") ? "true" : void 0,
167
- onContextMenu: K,
167
+ onContextMenu: $,
168
168
  children: [
169
169
  /* @__PURE__ */ e(
170
170
  "div",
@@ -187,8 +187,8 @@ const re = ({ api: o }) => {
187
187
  n?.headerCheckboxSelection && (!t || t.trim() === "") ? "justify-center items-center" : "gap-1 flex-1"
188
188
  ), children: [
189
189
  n?.headerCheckboxSelection && /* @__PURE__ */ e(re, { api: l }),
190
- t && t.trim() !== "" && t !== p("gridHeader.selection") && /* @__PURE__ */ e(Y, { text: t }),
191
- t && t.trim() !== "" && q(u(
190
+ t && t.trim() !== "" && t !== f("gridHeader.selection") && /* @__PURE__ */ e(X, { text: t }),
191
+ t && t.trim() !== "" && K(u(
192
192
  "text-content-tertiary hover:text-brand-variant-hover transition-colors",
193
193
  C ? "mr-1" : "ml-1"
194
194
  ))
@@ -209,7 +209,7 @@ const re = ({ api: o }) => {
209
209
  className: "ag-sort-indicator-container cursor-pointer flex items-center",
210
210
  onClick: y,
211
211
  children: [
212
- z && /* @__PURE__ */ e("span", { className: "ag-sort-order text-[10px] font-bold text-content-tertiary mr-0.5", children: g + 1 }),
212
+ z && /* @__PURE__ */ e("span", { className: "ag-sort-order text-[10px] font-bold text-content-tertiary mr-0.5", children: p + 1 }),
213
213
  /* @__PURE__ */ e("span", { className: "ag-sort-indicator-icon", children: /* @__PURE__ */ e(ee, {}) })
214
214
  ]
215
215
  }
@@ -222,7 +222,7 @@ const re = ({ api: o }) => {
222
222
  v ? "opacity-100 w-auto" : "opacity-0 w-0 overflow-hidden group-hover:opacity-100 group-hover:w-auto"
223
223
  ),
224
224
  onClick: G,
225
- title: p(v ? "gridHeader.activeFilter" : "gridHeader.search"),
225
+ title: f(v ? "gridHeader.activeFilter" : "gridHeader.search"),
226
226
  children: [
227
227
  /* @__PURE__ */ e("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ e("path", { d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z", fill: "currentColor" }) }),
228
228
  v && /* @__PURE__ */ e("span", { className: "absolute -top-0.5 -right-0.5 w-2.5 h-2.5 rounded-full border-2 bg-brand z-10" })
@@ -236,6 +236,7 @@ const re = ({ api: o }) => {
236
236
  "custom-ag-menu-icon-button cursor-pointer flex items-center shrink-0 overflow-hidden transition-colors duration-200 outline-none focus:outline-none focus:ring-0 text-content-tertiary hover:text-brand-variant-hover",
237
237
  E ? "opacity-100 w-auto" : "w-0 opacity-0 group-hover:w-auto group-hover:opacity-100"
238
238
  ),
239
+ "aria-label": `${t} ${f("gridHeader.columnSettings")}`,
239
240
  onClick: (r) => {
240
241
  r.stopPropagation(), a && a.openMenu(h, r.currentTarget);
241
242
  },