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.
- package/dist/components/data/ag-grid-react/ag-grid-tooltip-overflow.d.ts +2 -1
- package/dist/components/data/ag-grid-react/ag-grid-tooltip-overflow.js +12 -11
- package/dist/components/data/ag-grid-react/cell-renderers/link-with-batch-cell-renderer.js +54 -56
- package/dist/components/data/ag-grid-react/index.d.ts +2 -0
- package/dist/components/data/ag-grid-react/index.js +41 -36
- package/dist/components/data/data-table/data-table-saved-views.js +223 -207
- package/dist/components/data/expandable-list-item/expandable-list-item-metrics.js +44 -30
- package/dist/components/data/expandable-list-item/expandable-list-item-parts.js +158 -184
- package/dist/components/data-display/badge/badge.variants.d.ts +2 -2
- package/dist/components/data-display/statistics-card/statistics-card.js +138 -111
- package/dist/components/feedback/alert/alert.variants.d.ts +1 -1
- package/dist/components/feedback/tooltip/badge-overflow-tooltip.d.ts +19 -0
- package/dist/components/feedback/tooltip/badge-overflow-tooltip.js +48 -0
- package/dist/components/feedback/tooltip/index.d.ts +5 -0
- package/dist/components/feedback/tooltip/index.js +16 -10
- package/dist/components/feedback/tooltip/overflow-tooltip.d.ts +2 -0
- package/dist/components/feedback/tooltip/overflow-tooltip.js +92 -0
- package/dist/components/feedback/tooltip/overflow-tooltip.types.d.ts +42 -0
- package/dist/components/feedback/tooltip/tooltip.d.ts +2 -2
- package/dist/components/feedback/tooltip/tooltip.js +65 -28
- package/dist/components/feedback/tooltip/tooltip.variants.js +1 -1
- package/dist/components/feedback/tooltip/use-overflow-tooltip.d.ts +3 -0
- package/dist/components/feedback/tooltip/use-overflow-tooltip.js +109 -0
- package/dist/components/flows/command-palette/shortcut-settings.js +85 -66
- package/dist/components/flows/filter-panel/filter-panel.js +94 -83
- package/dist/components/flows/filter-strip/filter-summary.js +187 -177
- package/dist/components/flows/filter-strip/filter-tag-list.js +123 -107
- package/dist/components/forms/prompt/prompt.variants.d.ts +1 -1
- package/dist/components/forms/select/components/SelectMenuPanel.js +26 -22
- package/dist/components/forms/select/components/SelectOptionRow.js +77 -66
- package/dist/components/forms/select/components/SelectTriggerValue.js +49 -20
- package/dist/components/forms/select/components/Submenu.js +53 -39
- package/dist/components/forms/select/hooks/useSuppressOptionClickForTextSelection.d.ts +5 -0
- package/dist/components/forms/select/hooks/useSuppressOptionClickForTextSelection.js +28 -0
- package/dist/components/forms/select/select.js +121 -120
- package/dist/components/forms/select/utils/shouldSuppressOptionClickForTextSelection.d.ts +5 -0
- package/dist/components/forms/select/utils/shouldSuppressOptionClickForTextSelection.js +16 -0
- package/dist/components/layout/horizontal-scroller/index.d.ts +4 -0
- package/dist/components/layout/horizontal-scroller/index.js +6 -2
- package/dist/components/layout/horizontal-scroller/scroll-overflow-affordance.d.ts +10 -0
- package/dist/components/layout/horizontal-scroller/scroll-overflow-affordance.js +124 -0
- package/dist/components/layout/horizontal-scroller/use-horizontal-scroll-overflow.d.ts +13 -0
- package/dist/components/layout/horizontal-scroller/use-horizontal-scroll-overflow.js +40 -0
- package/dist/components/primitives/stepper/stepper.js +61 -42
- package/dist/components/primitives/tag/tag.variants.d.ts +1 -1
- package/dist/impact-nova.css +1 -1
- package/dist/index.js +473 -463
- package/dist/lib/overflow/is-text-overflowing.d.ts +3 -0
- package/dist/lib/overflow/is-text-overflowing.js +6 -0
- package/dist/lib/overlay/prevent-dismiss-on-tooltip-outside.d.ts +3 -0
- package/dist/lib/overlay/prevent-dismiss-on-tooltip-outside.js +34 -0
- package/dist/lib/tooltip/tooltip-content-interaction.d.ts +4 -0
- package/dist/lib/tooltip/tooltip-content-interaction.js +21 -0
- package/dist/llms/rules/ag-grid.js +1 -1
- package/dist/llms/rules/best-practices.js +1 -1
- package/dist/llms/rules/installation.js +1 -1
- package/dist/llms/rules/requirements.js +1 -1
- package/dist/llms/rules/troubleshooting.js +1 -1
- package/dist/providers/app-providers.js +18 -11
- package/package.json +1 -1
|
@@ -1,28 +1,57 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { cn as
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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
|
|
16
|
+
const n = x(
|
|
15
17
|
"text-[14px] font-medium truncate min-w-0 block",
|
|
16
|
-
|
|
18
|
+
p ? "text-disabled-foreground" : "text-foreground"
|
|
17
19
|
);
|
|
18
|
-
if (
|
|
19
|
-
const e =
|
|
20
|
+
if (u) {
|
|
21
|
+
const e = o || [];
|
|
20
22
|
let t = 0;
|
|
21
|
-
|
|
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
|
|
24
|
-
|
|
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
|
-
|
|
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
|
|
3
|
-
import { Checkbox as
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
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:
|
|
12
|
-
isSelected:
|
|
13
|
-
getIndeterminateState:
|
|
14
|
+
isReadOnly: l,
|
|
15
|
+
isSelected: x,
|
|
16
|
+
getIndeterminateState: g,
|
|
14
17
|
getSelectedCount: h,
|
|
15
|
-
handleSelect:
|
|
18
|
+
handleSelect: C
|
|
16
19
|
}) => {
|
|
17
|
-
const N =
|
|
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(
|
|
21
|
-
/* @__PURE__ */ t(
|
|
22
|
-
/* @__PURE__ */ t(
|
|
23
|
-
|
|
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:
|
|
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
|
-
|
|
39
|
+
_
|
|
37
40
|
),
|
|
38
41
|
"data-component": "select-menu",
|
|
39
42
|
children: d.map((e) => {
|
|
40
|
-
const
|
|
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:
|
|
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
|
-
|
|
47
|
-
|
|
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
|
-
|
|
50
|
-
|
|
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":
|
|
54
|
-
"data-disabled":
|
|
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
|
-
|
|
66
|
+
P,
|
|
60
67
|
{
|
|
61
|
-
checked:
|
|
62
|
-
disabled:
|
|
68
|
+
checked: D ? "indeterminate" : o,
|
|
69
|
+
disabled: r || l,
|
|
63
70
|
onChange: () => {
|
|
64
71
|
}
|
|
65
72
|
}
|
|
66
73
|
),
|
|
67
74
|
/* @__PURE__ */ t(
|
|
68
|
-
|
|
75
|
+
y,
|
|
69
76
|
{
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
children:
|
|
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
|
-
|
|
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
|
-
|
|
84
|
-
!u &&
|
|
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
|
-
|
|
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
|
+
};
|