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
|
@@ -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
|
|
2
|
-
import * as
|
|
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
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
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:
|
|
11
|
-
const { t:
|
|
12
|
-
return /* @__PURE__ */
|
|
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:
|
|
16
|
-
className:
|
|
17
|
-
"data-orientation":
|
|
16
|
+
ref: g,
|
|
17
|
+
className: o(A({ orientation: r }), v),
|
|
18
|
+
"data-orientation": r,
|
|
18
19
|
"data-component": "stepper",
|
|
19
20
|
role: "list",
|
|
20
|
-
...
|
|
21
|
-
children: n.map((d,
|
|
22
|
-
const
|
|
23
|
-
return /* @__PURE__ */ p(
|
|
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: () => !
|
|
29
|
-
"aria-label":
|
|
30
|
-
"aria-current":
|
|
31
|
-
tabIndex: s && !
|
|
32
|
-
onKeyDown: s && !
|
|
33
|
-
(m.key === "Enter" || m.key === " ") && (m.preventDefault(), s(
|
|
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":
|
|
37
|
-
"data-disabled":
|
|
38
|
-
className:
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
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__ */
|
|
45
|
-
/* @__PURE__ */ p("div", { className: "flex flex-col justify-center overflow-hidden", children: [
|
|
46
|
-
/* @__PURE__ */
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
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
|
-
|
|
78
|
+
i < n.length - 1 && /* @__PURE__ */ e(
|
|
60
79
|
"div",
|
|
61
80
|
{
|
|
62
|
-
className:
|
|
81
|
+
className: o(
|
|
63
82
|
"border-t border-dashed border-stroke-hairline transition-colors",
|
|
64
|
-
|
|
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
|
-
] },
|
|
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" | "
|
|
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;
|