impact-nova 2.2.5 → 2.2.7

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 (60) hide show
  1. package/dist/components/data/ag-grid-react/ag-grid-tooltip-overflow.d.ts +2 -1
  2. package/dist/components/data/ag-grid-react/ag-grid-tooltip-overflow.js +12 -11
  3. package/dist/components/data/ag-grid-react/cell-renderers/link-with-batch-cell-renderer.js +54 -56
  4. package/dist/components/data/ag-grid-react/index.d.ts +2 -0
  5. package/dist/components/data/ag-grid-react/index.js +41 -36
  6. package/dist/components/data/data-table/data-table-saved-views.js +223 -207
  7. package/dist/components/data/expandable-list-item/expandable-list-item-metrics.js +44 -30
  8. package/dist/components/data/expandable-list-item/expandable-list-item-parts.js +158 -184
  9. package/dist/components/data-display/badge/badge.variants.d.ts +2 -2
  10. package/dist/components/data-display/statistics-card/statistics-card.js +138 -111
  11. package/dist/components/feedback/alert/alert.variants.d.ts +1 -1
  12. package/dist/components/feedback/tooltip/badge-overflow-tooltip.d.ts +19 -0
  13. package/dist/components/feedback/tooltip/badge-overflow-tooltip.js +48 -0
  14. package/dist/components/feedback/tooltip/index.d.ts +5 -0
  15. package/dist/components/feedback/tooltip/index.js +16 -10
  16. package/dist/components/feedback/tooltip/overflow-tooltip.d.ts +2 -0
  17. package/dist/components/feedback/tooltip/overflow-tooltip.js +92 -0
  18. package/dist/components/feedback/tooltip/overflow-tooltip.types.d.ts +42 -0
  19. package/dist/components/feedback/tooltip/tooltip.d.ts +2 -2
  20. package/dist/components/feedback/tooltip/tooltip.js +65 -28
  21. package/dist/components/feedback/tooltip/tooltip.variants.js +1 -1
  22. package/dist/components/feedback/tooltip/use-overflow-tooltip.d.ts +3 -0
  23. package/dist/components/feedback/tooltip/use-overflow-tooltip.js +109 -0
  24. package/dist/components/flows/command-palette/shortcut-settings.js +85 -66
  25. package/dist/components/flows/filter-panel/filter-panel.js +94 -83
  26. package/dist/components/flows/filter-strip/filter-summary.js +187 -177
  27. package/dist/components/flows/filter-strip/filter-tag-list.js +123 -107
  28. package/dist/components/forms/prompt/prompt.variants.d.ts +1 -1
  29. package/dist/components/forms/select/components/SelectMenuPanel.js +26 -22
  30. package/dist/components/forms/select/components/SelectOptionRow.js +77 -66
  31. package/dist/components/forms/select/components/SelectTriggerValue.js +49 -20
  32. package/dist/components/forms/select/components/Submenu.js +53 -39
  33. package/dist/components/forms/select/hooks/useSuppressOptionClickForTextSelection.d.ts +5 -0
  34. package/dist/components/forms/select/hooks/useSuppressOptionClickForTextSelection.js +28 -0
  35. package/dist/components/forms/select/select.js +121 -120
  36. package/dist/components/forms/select/utils/shouldSuppressOptionClickForTextSelection.d.ts +5 -0
  37. package/dist/components/forms/select/utils/shouldSuppressOptionClickForTextSelection.js +16 -0
  38. package/dist/components/layout/horizontal-scroller/index.d.ts +4 -0
  39. package/dist/components/layout/horizontal-scroller/index.js +6 -2
  40. package/dist/components/layout/horizontal-scroller/scroll-overflow-affordance.d.ts +10 -0
  41. package/dist/components/layout/horizontal-scroller/scroll-overflow-affordance.js +124 -0
  42. package/dist/components/layout/horizontal-scroller/use-horizontal-scroll-overflow.d.ts +13 -0
  43. package/dist/components/layout/horizontal-scroller/use-horizontal-scroll-overflow.js +40 -0
  44. package/dist/components/primitives/stepper/stepper.js +61 -42
  45. package/dist/components/primitives/tag/tag.variants.d.ts +1 -1
  46. package/dist/impact-nova.css +1 -1
  47. package/dist/index.js +473 -463
  48. package/dist/lib/overflow/is-text-overflowing.d.ts +3 -0
  49. package/dist/lib/overflow/is-text-overflowing.js +6 -0
  50. package/dist/lib/overlay/prevent-dismiss-on-tooltip-outside.d.ts +3 -0
  51. package/dist/lib/overlay/prevent-dismiss-on-tooltip-outside.js +34 -0
  52. package/dist/lib/tooltip/tooltip-content-interaction.d.ts +4 -0
  53. package/dist/lib/tooltip/tooltip-content-interaction.js +21 -0
  54. package/dist/llms/rules/ag-grid.js +1 -1
  55. package/dist/llms/rules/best-practices.js +1 -1
  56. package/dist/llms/rules/installation.js +1 -1
  57. package/dist/llms/rules/requirements.js +1 -1
  58. package/dist/llms/rules/troubleshooting.js +1 -1
  59. package/dist/providers/app-providers.js +18 -11
  60. package/package.json +1 -1
@@ -0,0 +1,40 @@
1
+ import * as t from "react";
2
+ function m({
3
+ scrollStep: r = 200,
4
+ contentDependency: i
5
+ } = {}) {
6
+ const l = t.useRef(null), [a, f] = t.useState(!1), [u, h] = t.useState(!1), s = t.useCallback(() => {
7
+ const e = l.current;
8
+ e && (f(e.scrollLeft > 0), h(
9
+ Math.ceil(e.scrollLeft + e.clientWidth) < e.scrollWidth
10
+ ));
11
+ }, []);
12
+ t.useEffect(() => {
13
+ const e = l.current;
14
+ if (!e) return;
15
+ s();
16
+ const o = () => s();
17
+ e.addEventListener("scroll", o, { passive: !0 });
18
+ const c = new ResizeObserver(() => s());
19
+ c.observe(e);
20
+ const n = e.firstElementChild;
21
+ return n && c.observe(n), () => {
22
+ e.removeEventListener("scroll", o), c.disconnect();
23
+ };
24
+ }, [s, i]);
25
+ const v = t.useCallback(() => {
26
+ l.current?.scrollBy({ left: -r, behavior: "smooth" });
27
+ }, [r]), b = t.useCallback(() => {
28
+ l.current?.scrollBy({ left: r, behavior: "smooth" });
29
+ }, [r]);
30
+ return {
31
+ scrollRef: l,
32
+ canScrollLeft: a,
33
+ canScrollRight: u,
34
+ scrollLeft: v,
35
+ scrollRight: b
36
+ };
37
+ }
38
+ export {
39
+ m as useHorizontalScrollOverflow
40
+ };
@@ -1,71 +1,90 @@
1
- import { jsx as t, jsxs as p } from "react/jsx-runtime";
2
- import * as y from "react";
1
+ import { jsx as e, jsxs as p } from "react/jsx-runtime";
2
+ import * as k from "react";
3
3
  import { Checkmark as I } from "impact-nova-icons";
4
4
  import { createComponent as j } from "../../../lib/primitives/create-component.js";
5
- import { cn as a } from "../../../lib/utils.js";
6
- import { useImpactNovaI18n as k } from "../../../i18n/use-impact-nova-i18n.js";
7
- import { iconVariants as z, stepVariants as D, stepperVariants as V } from "./stepper.variants.js";
5
+ import { cn as o } from "../../../lib/utils.js";
6
+ import { OverflowTooltip as u } from "../../feedback/tooltip/overflow-tooltip.js";
7
+ import { useImpactNovaI18n as z } from "../../../i18n/use-impact-nova-i18n.js";
8
+ import { iconVariants as D, stepVariants as V, stepperVariants as A } from "./stepper.variants.js";
8
9
  const R = j(
9
10
  "Stepper",
10
- ({ className: u, currentStep: x, steps: n, orientation: e = "horizontal", onStepClick: s, ...v }, b) => {
11
- const { t: N } = k(), g = n.length;
12
- return /* @__PURE__ */ t(
11
+ ({ className: v, currentStep: f, steps: n, orientation: r = "horizontal", onStepClick: s, ...b }, g) => {
12
+ const { t: w } = z(), y = n.length;
13
+ return /* @__PURE__ */ e(
13
14
  "div",
14
15
  {
15
- ref: b,
16
- className: a(V({ orientation: e }), u),
17
- "data-orientation": e,
16
+ ref: g,
17
+ className: o(A({ orientation: r }), v),
18
+ "data-orientation": r,
18
19
  "data-component": "stepper",
19
20
  role: "list",
20
- ...v,
21
- children: n.map((d, o) => {
22
- const c = typeof d == "string" ? { label: d } : d, l = o + 1, f = l === x, h = l < x, i = c.disabled, r = h ? "completed" : f ? "active" : "default", w = N("stepper.stepOfTotal", { current: l, total: g });
23
- return /* @__PURE__ */ p(y.Fragment, { children: [
21
+ ...b,
22
+ children: n.map((d, i) => {
23
+ const t = typeof d == "string" ? { label: d } : d, l = i + 1, x = l === f, h = l < f, c = t.disabled, a = h ? "completed" : x ? "active" : "default", N = w("stepper.stepOfTotal", { current: l, total: y });
24
+ return /* @__PURE__ */ p(k.Fragment, { children: [
24
25
  /* @__PURE__ */ p(
25
26
  "div",
26
27
  {
27
28
  role: "listitem",
28
- onClick: () => !i && s?.(o),
29
- "aria-label": w,
30
- "aria-current": f ? "step" : void 0,
31
- tabIndex: s && !i ? 0 : void 0,
32
- onKeyDown: s && !i ? (m) => {
33
- (m.key === "Enter" || m.key === " ") && (m.preventDefault(), s(o));
29
+ onClick: () => !c && s?.(i),
30
+ "aria-label": N,
31
+ "aria-current": x ? "step" : void 0,
32
+ tabIndex: s && !c ? 0 : void 0,
33
+ onKeyDown: s && !c ? (m) => {
34
+ (m.key === "Enter" || m.key === " ") && (m.preventDefault(), s(i));
34
35
  } : void 0,
35
36
  "data-step": l,
36
- "data-status": r,
37
- "data-disabled": i || void 0,
38
- className: a(
39
- D({ orientation: e, status: r }),
40
- e === "horizontal" && "min-w-[140px]",
41
- i ? "opacity-80 cursor-not-allowed" : s ? "cursor-pointer" : "cursor-default"
37
+ "data-status": a,
38
+ "data-disabled": c || void 0,
39
+ className: o(
40
+ V({ orientation: r, status: a }),
41
+ r === "horizontal" && "min-w-[140px]",
42
+ c ? "opacity-80 cursor-not-allowed" : s ? "cursor-pointer" : "cursor-default"
42
43
  ),
43
44
  children: [
44
- /* @__PURE__ */ t("div", { className: a(z({ status: r }), "mr-2"), children: h ? /* @__PURE__ */ t(I, { className: "h-5 w-5 stroke-[3px]" }) : /* @__PURE__ */ t("span", { children: c.icon || l }) }),
45
- /* @__PURE__ */ p("div", { className: "flex flex-col justify-center overflow-hidden", children: [
46
- /* @__PURE__ */ t("div", { className: a(
47
- "text-[14px] leading-tight font-medium truncate max-w-[200px]",
48
- r === "completed" ? "text-success" : "text-content",
49
- r === "active" && e === "vertical" ? "text-brand" : ""
50
- ), children: c.label }),
51
- c.description && /* @__PURE__ */ t("div", { className: a(
52
- "text-[12px] leading-tight mt-0.5 truncate max-w-[200px]",
53
- r === "completed" ? "text-success" : "text-secondary-foreground"
54
- ), children: c.description })
45
+ /* @__PURE__ */ e("div", { className: o(D({ status: a }), "mr-2"), children: h ? /* @__PURE__ */ e(I, { className: "h-5 w-5 stroke-[3px]" }) : /* @__PURE__ */ e("span", { children: t.icon || l }) }),
46
+ /* @__PURE__ */ p("div", { className: "flex flex-col justify-center overflow-hidden min-w-0", children: [
47
+ /* @__PURE__ */ e(
48
+ u,
49
+ {
50
+ triggerClassName: o(
51
+ "text-[14px] leading-tight font-medium truncate max-w-[200px] block",
52
+ a === "completed" ? "text-success" : "text-content",
53
+ a === "active" && r === "vertical" ? "text-brand" : ""
54
+ ),
55
+ content: t.label,
56
+ side: "top",
57
+ variant: "tertiary",
58
+ children: t.label
59
+ }
60
+ ),
61
+ t.description && /* @__PURE__ */ e(
62
+ u,
63
+ {
64
+ triggerClassName: o(
65
+ "text-[12px] leading-tight mt-0.5 truncate max-w-[200px] block",
66
+ a === "completed" ? "text-success" : "text-secondary-foreground"
67
+ ),
68
+ content: t.description,
69
+ side: "top",
70
+ variant: "tertiary",
71
+ children: t.description
72
+ }
73
+ )
55
74
  ] })
56
75
  ]
57
76
  }
58
77
  ),
59
- o < n.length - 1 && /* @__PURE__ */ t(
78
+ i < n.length - 1 && /* @__PURE__ */ e(
60
79
  "div",
61
80
  {
62
- className: a(
81
+ className: o(
63
82
  "border-t border-dashed border-stroke-hairline transition-colors",
64
- e === "horizontal" ? "flex-1 min-w-[24px] mx-1 self-center" : "h-6 w-0 border-l ml-[12px] my-[-4px]"
83
+ r === "horizontal" ? "flex-1 min-w-[24px] mx-1 self-center" : "h-6 w-0 border-l ml-[12px] my-[-4px]"
65
84
  )
66
85
  }
67
86
  )
68
- ] }, o);
87
+ ] }, i);
69
88
  })
70
89
  }
71
90
  );
@@ -1,5 +1,5 @@
1
1
  export declare const tagVariants: (props?: ({
2
- variant?: "default" | "secondary" | "tertiary" | "outline" | "destructive" | "ghost" | "info" | "warning" | "success" | "choice" | null | undefined;
2
+ variant?: "default" | "secondary" | "tertiary" | "outline" | "success" | "warning" | "destructive" | "ghost" | "info" | "choice" | null | undefined;
3
3
  size?: "sm" | "md" | "lg" | null | undefined;
4
4
  shape?: "rounded" | "pill" | null | undefined;
5
5
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;