impact-nova 3.0.0-alpha.6 → 3.0.0-alpha.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/headers/header-search-input.js +203 -199
- package/dist/components/flows/iris-chat/iris-chat-artifact.js +46 -36
- package/dist/components/flows/iris-chat/iris-chat-markdown.js +47 -27
- package/dist/components/flows/iris-chat/iris-chat-thread.d.ts +1 -0
- package/dist/components/flows/iris-chat/iris-chat-thread.js +81 -75
- package/dist/components/flows/iris-chat/iris-chat.js +83 -83
- package/dist/components/flows/iris-chat/iris-chat.types.d.ts +2 -0
- package/dist/components/flows/iris-chat/iris-chat.variants.d.ts +1 -0
- package/dist/components/flows/iris-chat/iris-chat.variants.js +29 -11
- package/dist/components/forms/choice-card/choice-card-percent.js +50 -37
- package/dist/components/forms/input/input.js +5 -5
- package/dist/components/primitives/button/button.variants.js +1 -1
- package/dist/components/primitives/stepper/internals/step-model.d.ts +1 -1
- package/dist/components/primitives/stepper/internals/step-model.js +5 -5
- package/dist/components/primitives/stepper/internals/stepper-compact.js +13 -13
- package/dist/components/primitives/stepper/internals/stepper-pipeline.js +6 -6
- package/dist/components/primitives/stepper/internals/stepper-rail.js +15 -15
- package/dist/components/primitives/stepper/internals/stepper-summary.js +2 -2
- package/dist/components/primitives/stepper/internals/stepper-track.js +2 -2
- package/dist/components/primitives/stepper/stepper.js +92 -91
- package/dist/components/primitives/stepper/stepper.types.d.ts +2 -0
- package/dist/impact-nova-components.css +56 -0
- package/dist/impact-nova.css +1 -1
- package/package.json +1 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsxs as r, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { Download as
|
|
3
|
-
import { Checkbox as
|
|
4
|
-
import { DropdownMenu as
|
|
2
|
+
import { Download as N, ThreeDots as y } from "impact-nova-icons";
|
|
3
|
+
import { Checkbox as v } from "../../forms/checkbox/checkbox.js";
|
|
4
|
+
import { DropdownMenu as C, DropdownMenuTrigger as j, DropdownMenuContent as k, DropdownMenuItem as p } from "../../feedback/dropdown-menu/dropdown-menu.js";
|
|
5
5
|
import { ButtonIconTooltip as x } from "../../feedback/tooltip/button-icon-tooltip.js";
|
|
6
|
-
import { Button as
|
|
6
|
+
import { Button as f } from "../../primitives/button/button.js";
|
|
7
7
|
import { useImpactNovaI18n as I } from "../../../i18n/use-impact-nova-i18n.js";
|
|
8
|
-
import { createComponent as
|
|
8
|
+
import { createComponent as b } from "../../../lib/primitives/create-component.js";
|
|
9
9
|
import { cn as u } from "../../../lib/utils.js";
|
|
10
|
-
function
|
|
10
|
+
function g(o, i) {
|
|
11
11
|
const a = o.map((l) => l.header).join(","), n = i.map(
|
|
12
12
|
(l) => o.map((t) => {
|
|
13
13
|
const d = l.cells[t.id];
|
|
@@ -18,16 +18,16 @@ function N(o, i) {
|
|
|
18
18
|
`);
|
|
19
19
|
}
|
|
20
20
|
function S(o, i, a) {
|
|
21
|
-
const n = new Blob([
|
|
21
|
+
const n = new Blob([g(i, a)], { type: "text/csv;charset=utf-8" }), l = URL.createObjectURL(n), t = document.createElement("a");
|
|
22
22
|
t.href = l, t.download = `${o.replaceAll(/\s+/g, "-").toLowerCase()}.csv`, t.click(), URL.revokeObjectURL(l);
|
|
23
23
|
}
|
|
24
|
-
const O =
|
|
24
|
+
const O = b(
|
|
25
25
|
"IrisChatArtifact",
|
|
26
26
|
({ className: o, title: i, columns: a, rows: n, onDownload: l, onMore: t }, d) => {
|
|
27
27
|
const { t: c } = I(), m = () => {
|
|
28
28
|
S(i, a, n), l?.();
|
|
29
|
-
},
|
|
30
|
-
navigator.clipboard?.writeText(
|
|
29
|
+
}, w = () => {
|
|
30
|
+
navigator.clipboard?.writeText(g(a, n)).catch(() => {
|
|
31
31
|
}), t?.();
|
|
32
32
|
};
|
|
33
33
|
return /* @__PURE__ */ r(
|
|
@@ -35,62 +35,72 @@ const O = f(
|
|
|
35
35
|
{
|
|
36
36
|
ref: d,
|
|
37
37
|
"data-component": "iris-chat-artifact",
|
|
38
|
-
className: u(
|
|
38
|
+
className: u(
|
|
39
|
+
"grid w-full min-w-0 max-w-full grid-cols-[minmax(0,1fr)] overflow-hidden rounded-xl border border-stroke-subtle",
|
|
40
|
+
o
|
|
41
|
+
),
|
|
39
42
|
children: [
|
|
40
|
-
/* @__PURE__ */ r("header", { className: "flex items-center justify-between gap-2 px-3 py-2", children: [
|
|
43
|
+
/* @__PURE__ */ r("header", { className: "flex min-w-0 items-center justify-between gap-2 px-3 py-2", children: [
|
|
41
44
|
/* @__PURE__ */ e("h3", { className: "text-sm font-semibold text-content", children: i }),
|
|
42
45
|
/* @__PURE__ */ r("div", { className: "flex items-center gap-1", children: [
|
|
43
46
|
/* @__PURE__ */ e(x, { label: c("irisChat.download"), children: /* @__PURE__ */ e(
|
|
44
|
-
|
|
47
|
+
f,
|
|
45
48
|
{
|
|
46
49
|
type: "button",
|
|
47
50
|
variant: "ghost",
|
|
48
51
|
size: "iconSm",
|
|
49
52
|
"aria-label": c("irisChat.download"),
|
|
50
53
|
onClick: m,
|
|
51
|
-
children: /* @__PURE__ */ e(
|
|
54
|
+
children: /* @__PURE__ */ e(N, { size: 16 })
|
|
52
55
|
}
|
|
53
56
|
) }),
|
|
54
|
-
/* @__PURE__ */ r(
|
|
57
|
+
/* @__PURE__ */ r(C, { children: [
|
|
55
58
|
/* @__PURE__ */ e(x, { label: c("irisChat.moreActions"), children: /* @__PURE__ */ e(j, { asChild: !0, children: /* @__PURE__ */ e(
|
|
56
|
-
|
|
59
|
+
f,
|
|
57
60
|
{
|
|
58
61
|
type: "button",
|
|
59
62
|
variant: "ghost",
|
|
60
63
|
size: "iconSm",
|
|
61
64
|
"aria-label": c("irisChat.moreActions"),
|
|
62
|
-
children: /* @__PURE__ */ e(
|
|
65
|
+
children: /* @__PURE__ */ e(y, { size: 16 })
|
|
63
66
|
}
|
|
64
67
|
) }) }),
|
|
65
68
|
/* @__PURE__ */ r(k, { align: "end", children: [
|
|
66
|
-
/* @__PURE__ */ e(p, { onSelect:
|
|
69
|
+
/* @__PURE__ */ e(p, { onSelect: w, children: c("irisChat.copy") }),
|
|
67
70
|
/* @__PURE__ */ e(p, { onSelect: m, children: c("irisChat.download") })
|
|
68
71
|
] })
|
|
69
72
|
] })
|
|
70
73
|
] })
|
|
71
74
|
] }),
|
|
72
|
-
/* @__PURE__ */ e(
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
children:
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
75
|
+
/* @__PURE__ */ e(
|
|
76
|
+
"div",
|
|
77
|
+
{
|
|
78
|
+
"data-slot": "artifact-scroll",
|
|
79
|
+
className: "min-w-0 max-w-full overflow-x-auto overflow-y-hidden overscroll-x-contain",
|
|
80
|
+
children: /* @__PURE__ */ r("table", { className: "w-max min-w-full border-t border-stroke-subtle text-sm", children: [
|
|
81
|
+
/* @__PURE__ */ e("thead", { className: "bg-secondary", children: /* @__PURE__ */ r("tr", { children: [
|
|
82
|
+
/* @__PURE__ */ e("th", { className: "w-10 px-3 py-2", children: /* @__PURE__ */ e("span", { className: "sr-only", children: c("aria.toggleSelection") }) }),
|
|
83
|
+
a.map((s) => /* @__PURE__ */ e(
|
|
84
|
+
"th",
|
|
85
|
+
{
|
|
86
|
+
className: "whitespace-nowrap px-3 py-2 text-start font-medium text-content",
|
|
87
|
+
children: s.header
|
|
88
|
+
},
|
|
89
|
+
s.id
|
|
90
|
+
))
|
|
91
|
+
] }) }),
|
|
92
|
+
/* @__PURE__ */ e("tbody", { children: n.map((s) => /* @__PURE__ */ r("tr", { className: "border-t border-stroke-subtle", children: [
|
|
93
|
+
/* @__PURE__ */ e("td", { className: "px-3 py-2", children: /* @__PURE__ */ e(v, { "aria-label": s.id }) }),
|
|
94
|
+
a.map((h) => /* @__PURE__ */ e("td", { className: "whitespace-nowrap px-3 py-2 text-content", children: s.cells[h.id] }, h.id))
|
|
95
|
+
] }, s.id)) })
|
|
96
|
+
] })
|
|
97
|
+
}
|
|
98
|
+
)
|
|
89
99
|
]
|
|
90
100
|
}
|
|
91
101
|
);
|
|
92
102
|
}
|
|
93
|
-
), $ =
|
|
103
|
+
), $ = b(
|
|
94
104
|
"IrisChatScenario",
|
|
95
105
|
({ className: o, title: i, rows: a, notes: n }, l) => /* @__PURE__ */ r(
|
|
96
106
|
"section",
|
|
@@ -1,62 +1,82 @@
|
|
|
1
1
|
import { jsx as t, jsxs as s } from "react/jsx-runtime";
|
|
2
|
-
import { useState as
|
|
3
|
-
import { ButtonIconTooltip as
|
|
4
|
-
import { Button as
|
|
5
|
-
import { useImpactNovaI18n as
|
|
6
|
-
import { createComponent as
|
|
7
|
-
import { cn as
|
|
8
|
-
import { IrisChatCopyIcon as
|
|
2
|
+
import { useState as l } from "react";
|
|
3
|
+
import { ButtonIconTooltip as c } from "../../feedback/tooltip/button-icon-tooltip.js";
|
|
4
|
+
import { Button as d } from "../../primitives/button/button.js";
|
|
5
|
+
import { useImpactNovaI18n as m } from "../../../i18n/use-impact-nova-i18n.js";
|
|
6
|
+
import { createComponent as p } from "../../../lib/primitives/create-component.js";
|
|
7
|
+
import { cn as h } from "../../../lib/utils.js";
|
|
8
|
+
import { IrisChatCopyIcon as f } from "./iris-chat-icons.js";
|
|
9
9
|
import { irisChatMarkdownVariants as u } from "./iris-chat.variants.js";
|
|
10
|
-
import { Markdown as
|
|
11
|
-
import
|
|
10
|
+
import { Markdown as w } from "../../../node_modules/react-markdown/lib/index.js";
|
|
11
|
+
import b from "../../../node_modules/remark-gfm/lib/index.js";
|
|
12
12
|
function n(r) {
|
|
13
13
|
return typeof r == "string" || typeof r == "number" ? String(r) : Array.isArray(r) ? r.map(n).join("") : r && typeof r == "object" && "props" in r ? n(r.props.children) : "";
|
|
14
14
|
}
|
|
15
|
-
function
|
|
16
|
-
|
|
15
|
+
function x({ children: r }) {
|
|
16
|
+
return /* @__PURE__ */ t("div", { className: "grid w-full min-w-0 max-w-full grid-cols-[minmax(0,1fr)] overflow-hidden rounded-xl border border-stroke-subtle", children: /* @__PURE__ */ t(
|
|
17
|
+
"div",
|
|
18
|
+
{
|
|
19
|
+
"data-slot": "markdown-table-scroll",
|
|
20
|
+
className: "min-w-0 max-w-full overflow-x-auto overflow-y-hidden overscroll-x-contain",
|
|
21
|
+
children: /* @__PURE__ */ t("table", { className: "w-max min-w-full border-separate border-spacing-0 text-sm", children: r })
|
|
22
|
+
}
|
|
23
|
+
) });
|
|
24
|
+
}
|
|
25
|
+
function k({ children: r }) {
|
|
26
|
+
const { t: i } = m(), [a, e] = l(!1), o = n(r);
|
|
17
27
|
return /* @__PURE__ */ s("div", { className: "relative", children: [
|
|
18
|
-
/* @__PURE__ */ t(
|
|
19
|
-
|
|
28
|
+
/* @__PURE__ */ t(c, { label: i(a ? "irisChat.copied" : "irisChat.copyCode"), children: /* @__PURE__ */ t(
|
|
29
|
+
d,
|
|
20
30
|
{
|
|
21
31
|
type: "button",
|
|
22
32
|
variant: "ghost",
|
|
23
33
|
size: "icon",
|
|
24
34
|
className: "absolute end-1.5 top-1.5 size-7",
|
|
25
|
-
"aria-label":
|
|
35
|
+
"aria-label": i(a ? "irisChat.copied" : "irisChat.copyCode"),
|
|
26
36
|
"data-testid": "iris-chat-copy-code",
|
|
27
37
|
onClick: () => {
|
|
28
|
-
navigator.clipboard?.writeText(
|
|
29
|
-
}),
|
|
38
|
+
navigator.clipboard?.writeText(o).catch(() => {
|
|
39
|
+
}), e(!0), window.setTimeout(() => e(!1), 1600);
|
|
30
40
|
},
|
|
31
|
-
children: /* @__PURE__ */ t(
|
|
41
|
+
children: /* @__PURE__ */ t(f, { size: 14 })
|
|
32
42
|
}
|
|
33
43
|
) }),
|
|
34
44
|
/* @__PURE__ */ t("pre", { children: r })
|
|
35
45
|
] });
|
|
36
46
|
}
|
|
37
|
-
const
|
|
47
|
+
const A = p(
|
|
38
48
|
"IrisChatMarkdown",
|
|
39
|
-
({ className: r, children:
|
|
49
|
+
({ className: r, children: i }, a) => /* @__PURE__ */ t(
|
|
40
50
|
"div",
|
|
41
51
|
{
|
|
42
|
-
ref:
|
|
52
|
+
ref: a,
|
|
43
53
|
"data-component": "iris-chat-markdown",
|
|
44
|
-
className:
|
|
54
|
+
className: h(u(), r),
|
|
45
55
|
children: /* @__PURE__ */ t(
|
|
46
|
-
|
|
56
|
+
w,
|
|
47
57
|
{
|
|
48
|
-
remarkPlugins: [
|
|
58
|
+
remarkPlugins: [b],
|
|
49
59
|
skipHtml: !0,
|
|
50
60
|
components: {
|
|
51
|
-
a: ({ href:
|
|
52
|
-
pre: ({ children:
|
|
61
|
+
a: ({ href: e, children: o }) => /* @__PURE__ */ t("a", { href: e, target: "_blank", rel: "noreferrer", children: o }),
|
|
62
|
+
pre: ({ children: e }) => /* @__PURE__ */ t(k, { children: e }),
|
|
63
|
+
table: ({ children: e }) => /* @__PURE__ */ t(x, { children: e }),
|
|
64
|
+
th: ({ children: e, style: o }) => /* @__PURE__ */ t(
|
|
65
|
+
"th",
|
|
66
|
+
{
|
|
67
|
+
style: o,
|
|
68
|
+
className: "whitespace-nowrap bg-secondary px-3 py-2 text-start text-xs font-semibold",
|
|
69
|
+
children: e
|
|
70
|
+
}
|
|
71
|
+
),
|
|
72
|
+
td: ({ children: e, style: o }) => /* @__PURE__ */ t("td", { style: o, className: "whitespace-nowrap border-t border-stroke-subtle px-3 py-2", children: e })
|
|
53
73
|
},
|
|
54
|
-
children:
|
|
74
|
+
children: i
|
|
55
75
|
}
|
|
56
76
|
)
|
|
57
77
|
}
|
|
58
78
|
)
|
|
59
79
|
);
|
|
60
80
|
export {
|
|
61
|
-
|
|
81
|
+
A as IrisChatMarkdown
|
|
62
82
|
};
|
|
@@ -15,6 +15,7 @@ declare const IrisChatDay: React.ForwardRefExoticComponent<IrisChatDayProps & Re
|
|
|
15
15
|
declare const IrisChatMessage: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLElement> & {
|
|
16
16
|
role: import('./iris-chat.types').IrisChatRole;
|
|
17
17
|
time?: string;
|
|
18
|
+
framed?: boolean;
|
|
18
19
|
} & React.RefAttributes<HTMLElement>>;
|
|
19
20
|
declare const IrisChatActions: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
|
|
20
21
|
liked?: boolean;
|