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
@@ -1,28 +1,57 @@
1
- import { jsx as n } from "react/jsx-runtime";
2
- import { cn as p } from "../../../../lib/utils.js";
3
- import { isInvertedSelection as x, isOptionArray as f } from "../utils/select.js";
4
- function T({
5
- isMulti: l,
6
- isDisabled: m,
7
- internalValue: s,
8
- totalCount: i,
9
- totalOptionsCount: u,
10
- formatSelectedCount: d,
11
- resolveOptionLabel: c,
12
- placeholder: o
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { cn as x } from "../../../../lib/utils.js";
3
+ import "react";
4
+ import { OverflowTooltip as m } from "../../../feedback/tooltip/overflow-tooltip.js";
5
+ import { isInvertedSelection as h, isOptionArray as d } from "../utils/select.js";
6
+ function C({
7
+ isMulti: u,
8
+ isDisabled: p,
9
+ internalValue: o,
10
+ totalCount: s,
11
+ totalOptionsCount: g,
12
+ formatSelectedCount: v,
13
+ resolveOptionLabel: a,
14
+ placeholder: c
13
15
  }) {
14
- const r = p(
16
+ const n = x(
15
17
  "text-[14px] font-medium truncate min-w-0 block",
16
- m ? "text-disabled-foreground" : "text-foreground"
18
+ p ? "text-disabled-foreground" : "text-foreground"
17
19
  );
18
- if (l) {
19
- const e = s || [];
20
+ if (u) {
21
+ const e = o || [];
20
22
  let t = 0;
21
- return x(e) ? t = Math.max(0, (typeof i == "number" ? i : u) - e.excludedValues.length) : f(e) && (t = e.length), t === 0 ? o : t === 1 && f(e) ? /* @__PURE__ */ n("span", { className: r, children: c(e[0]) }) : /* @__PURE__ */ n("span", { className: r, children: d(t) });
23
+ if (h(e) ? t = Math.max(0, (typeof s == "number" ? s : g) - e.excludedValues.length) : d(e) && (t = e.length), t === 0)
24
+ return c;
25
+ if (t === 1 && d(e)) {
26
+ const i = a(e[0]);
27
+ return /* @__PURE__ */ r(
28
+ m,
29
+ {
30
+ triggerClassName: n,
31
+ content: i,
32
+ side: "top",
33
+ variant: "tertiary",
34
+ children: /* @__PURE__ */ r("span", { children: i })
35
+ }
36
+ );
37
+ }
38
+ return /* @__PURE__ */ r("span", { className: n, children: v(t) });
22
39
  }
23
- const a = s;
24
- return a ? /* @__PURE__ */ n("span", { className: r, children: c(a) }) : o;
40
+ const l = o;
41
+ if (!l)
42
+ return c;
43
+ const f = a(l);
44
+ return /* @__PURE__ */ r(
45
+ m,
46
+ {
47
+ triggerClassName: n,
48
+ content: f,
49
+ side: "top",
50
+ variant: "tertiary",
51
+ children: /* @__PURE__ */ r("span", { children: f })
52
+ }
53
+ );
25
54
  }
26
55
  export {
27
- T as SelectTriggerValue
56
+ C as SelectTriggerValue
28
57
  };
@@ -1,26 +1,29 @@
1
1
  import { jsxs as s, jsx as t } from "react/jsx-runtime";
2
- import * as l from "@radix-ui/react-popover";
3
- import { Checkbox as k } from "../../checkbox/checkbox.js";
4
- import { ChevronRight as A, Checkmark as y } from "impact-nova-icons";
5
- import { cn as f } from "../../../../lib/utils.js";
6
- import { useOverlayPortalContainer as P } from "../../../../lib/overlay/overlay-portal-context.js";
7
- import { OVERLAY_NESTED_FLOATING_INSTANT_HIDE_CLASS as w } from "../../../../lib/overlay/overlay-host.constants.js";
8
- const $ = ({
2
+ import * as i from "@radix-ui/react-popover";
3
+ import { Checkbox as P } from "../../checkbox/checkbox.js";
4
+ import "react";
5
+ import { OverflowTooltip as y } from "../../../feedback/tooltip/overflow-tooltip.js";
6
+ import { ChevronRight as A, Checkmark as O } from "impact-nova-icons";
7
+ import { cn as v } from "../../../../lib/utils.js";
8
+ import { useOverlayPortalContainer as T } from "../../../../lib/overlay/overlay-portal-context.js";
9
+ import { OVERLAY_NESTED_FLOATING_INSTANT_HIDE_CLASS as _ } from "../../../../lib/overlay/overlay-host.constants.js";
10
+ import { useSuppressOptionClickForTextSelection as E } from "../hooks/useSuppressOptionClickForTextSelection.js";
11
+ const R = ({
9
12
  parentOption: n,
10
13
  isMulti: u,
11
- isReadOnly: i,
12
- isSelected: v,
13
- getIndeterminateState: x,
14
+ isReadOnly: l,
15
+ isSelected: x,
16
+ getIndeterminateState: g,
14
17
  getSelectedCount: h,
15
- handleSelect: g
18
+ handleSelect: C
16
19
  }) => {
17
- const N = P(), d = "children" in n && Array.isArray(n.children) ? n.children : null;
20
+ const k = T(), { onOptionPointerDown: S, onOptionDoubleClick: N, createOptionClickHandler: w } = E(), d = "children" in n && Array.isArray(n.children) ? n.children : null;
18
21
  if (!d) return null;
19
22
  const c = String(n.value || "");
20
- return /* @__PURE__ */ s(l.Root, { open: !0, children: [
21
- /* @__PURE__ */ t(l.Anchor, { className: "absolute inset-0 pointer-events-none" }),
22
- /* @__PURE__ */ t(l.Portal, { container: N, children: /* @__PURE__ */ t(
23
- l.Content,
23
+ return /* @__PURE__ */ s(i.Root, { open: !0, children: [
24
+ /* @__PURE__ */ t(i.Anchor, { className: "absolute inset-0 pointer-events-none" }),
25
+ /* @__PURE__ */ t(i.Portal, { container: k, children: /* @__PURE__ */ t(
26
+ i.Content,
24
27
  {
25
28
  side: "right",
26
29
  sideOffset: 8,
@@ -31,57 +34,68 @@ const $ = ({
31
34
  onOpenAutoFocus: (e) => e.preventDefault(),
32
35
  onInteractOutside: (e) => e.preventDefault(),
33
36
  onFocusOutside: (e) => e.preventDefault(),
34
- className: f(
37
+ className: v(
35
38
  "select-submenu-container z-50 min-w-[180px] max-h-[300px] overflow-auto rounded-xl bg-canvas-elevated py-1 shadow-elevation-floating",
36
- w
39
+ _
37
40
  ),
38
41
  "data-component": "select-menu",
39
42
  children: d.map((e) => {
40
- const a = v(e), S = x(e), o = e.isDisabled, m = h(e), r = "children" in e && Array.isArray(e.children) && e.children.length > 0, p = e.isParentSelectable !== !1, b = String(e.value || "");
43
+ const o = x(e), D = g(e), r = e.isDisabled, m = h(e), a = "children" in e && Array.isArray(e.children) && e.children.length > 0, p = e.isParentSelectable !== !1, b = String(e.value || "");
41
44
  return /* @__PURE__ */ s(
42
45
  "div",
43
46
  {
44
- className: f(
47
+ className: v(
45
48
  "relative flex h-[35px] cursor-default select-none items-center justify-between gap-1.5 rounded-[8px] px-3",
46
- o ? "cursor-not-allowed bg-canvas-readonly opacity-50" : i ? "cursor-default" : "cursor-pointer hover:bg-canvas-muted",
47
- a && !o && !r ? "bg-brand-subtle text-content" : "text-content"
49
+ r ? "cursor-not-allowed bg-canvas-readonly opacity-50" : l ? "cursor-default" : "cursor-pointer hover:bg-canvas-muted",
50
+ o && !r && !a ? "bg-brand-subtle text-content" : "text-content"
48
51
  ),
49
- onClick: (C) => {
50
- C.stopPropagation(), !o && !i && p && g(e);
52
+ onPointerDown: S,
53
+ onDoubleClick: N,
54
+ onClick: (f) => {
55
+ f.stopPropagation(), w(() => {
56
+ !r && !l && p && C(e);
57
+ })(f);
51
58
  },
52
59
  "data-testid": `select-submenu-option-${c}-${b}`,
53
- "data-state": a ? "checked" : "unchecked",
54
- "data-disabled": o || void 0,
60
+ "data-state": o ? "checked" : "unchecked",
61
+ "data-disabled": r || void 0,
55
62
  "data-component": "select-option",
56
63
  children: [
57
64
  /* @__PURE__ */ s("div", { className: "flex min-w-0 flex-1 items-center gap-1.5", children: [
58
65
  u && p && /* @__PURE__ */ t(
59
- k,
66
+ P,
60
67
  {
61
- checked: S ? "indeterminate" : a,
62
- disabled: o || i,
68
+ checked: D ? "indeterminate" : o,
69
+ disabled: r || l,
63
70
  onChange: () => {
64
71
  }
65
72
  }
66
73
  ),
67
74
  /* @__PURE__ */ t(
68
- "span",
75
+ y,
69
76
  {
70
- className: "block truncate text-[14px] font-medium leading-5",
71
- "data-testid": `select-submenu-option-label-${c}-${b}`,
72
- "data-state": a ? "checked" : "unchecked",
73
- title: String(e.label || ""),
74
- children: e.label
77
+ triggerClassName: "block truncate select-text text-[14px] font-medium leading-5 min-w-0",
78
+ content: String(e.label || ""),
79
+ side: "top",
80
+ variant: "tertiary",
81
+ children: /* @__PURE__ */ t(
82
+ "span",
83
+ {
84
+ "data-testid": `select-submenu-option-label-${c}-${b}`,
85
+ "data-state": o ? "checked" : "unchecked",
86
+ children: e.label
87
+ }
88
+ )
75
89
  }
76
90
  ),
77
- r && m > 0 && /* @__PURE__ */ s("span", { className: "text-xs text-secondary-foreground font-medium", children: [
91
+ a && m > 0 && /* @__PURE__ */ s("span", { className: "text-xs text-secondary-foreground font-medium", children: [
78
92
  "(",
79
93
  m,
80
94
  ")"
81
95
  ] })
82
96
  ] }),
83
- r && /* @__PURE__ */ t(A, { size: "sm", className: "text-content-icon" }),
84
- !u && a && !r && /* @__PURE__ */ t(y, { className: "h-4 w-4 text-brand" })
97
+ a && /* @__PURE__ */ t(A, { size: "sm", className: "text-content-icon" }),
98
+ !u && o && !a && /* @__PURE__ */ t(O, { className: "h-4 w-4 text-brand" })
85
99
  ]
86
100
  },
87
101
  e.value
@@ -92,5 +106,5 @@ const $ = ({
92
106
  ] });
93
107
  };
94
108
  export {
95
- $ as Submenu
109
+ R as Submenu
96
110
  };
@@ -0,0 +1,5 @@
1
+ export declare function useSuppressOptionClickForTextSelection(): {
2
+ onOptionPointerDown: (event: React.PointerEvent<HTMLElement>) => void;
3
+ onOptionDoubleClick: (event: React.MouseEvent<HTMLElement>) => void;
4
+ createOptionClickHandler: (onOptionClick: () => void) => (event: React.MouseEvent<HTMLElement>) => void;
5
+ };
@@ -0,0 +1,28 @@
1
+ import { useRef as u, useCallback as t } from "react";
2
+ import { shouldSuppressOptionClickForTextSelection as p } from "../utils/shouldSuppressOptionClickForTextSelection.js";
3
+ function a() {
4
+ const n = u(null), i = t(
5
+ (o) => {
6
+ o.button === 0 && (n.current = {
7
+ clientX: o.clientX,
8
+ clientY: o.clientY
9
+ });
10
+ },
11
+ []
12
+ ), e = t(
13
+ (o) => {
14
+ o.stopPropagation();
15
+ },
16
+ []
17
+ ), r = t(
18
+ (o) => (c) => {
19
+ const l = n.current;
20
+ n.current = null, !p(l, c) && o();
21
+ },
22
+ []
23
+ );
24
+ return { onOptionPointerDown: i, onOptionDoubleClick: e, createOptionClickHandler: r };
25
+ }
26
+ export {
27
+ a as useSuppressOptionClickForTextSelection
28
+ };