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.
Files changed (24) hide show
  1. package/dist/components/data/ag-grid-react/headers/header-search-input.js +203 -199
  2. package/dist/components/flows/iris-chat/iris-chat-artifact.js +46 -36
  3. package/dist/components/flows/iris-chat/iris-chat-markdown.js +47 -27
  4. package/dist/components/flows/iris-chat/iris-chat-thread.d.ts +1 -0
  5. package/dist/components/flows/iris-chat/iris-chat-thread.js +81 -75
  6. package/dist/components/flows/iris-chat/iris-chat.js +83 -83
  7. package/dist/components/flows/iris-chat/iris-chat.types.d.ts +2 -0
  8. package/dist/components/flows/iris-chat/iris-chat.variants.d.ts +1 -0
  9. package/dist/components/flows/iris-chat/iris-chat.variants.js +29 -11
  10. package/dist/components/forms/choice-card/choice-card-percent.js +50 -37
  11. package/dist/components/forms/input/input.js +5 -5
  12. package/dist/components/primitives/button/button.variants.js +1 -1
  13. package/dist/components/primitives/stepper/internals/step-model.d.ts +1 -1
  14. package/dist/components/primitives/stepper/internals/step-model.js +5 -5
  15. package/dist/components/primitives/stepper/internals/stepper-compact.js +13 -13
  16. package/dist/components/primitives/stepper/internals/stepper-pipeline.js +6 -6
  17. package/dist/components/primitives/stepper/internals/stepper-rail.js +15 -15
  18. package/dist/components/primitives/stepper/internals/stepper-summary.js +2 -2
  19. package/dist/components/primitives/stepper/internals/stepper-track.js +2 -2
  20. package/dist/components/primitives/stepper/stepper.js +92 -91
  21. package/dist/components/primitives/stepper/stepper.types.d.ts +2 -0
  22. package/dist/impact-nova-components.css +56 -0
  23. package/dist/impact-nova.css +1 -1
  24. 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 y, ThreeDots as v } from "impact-nova-icons";
3
- import { Checkbox as C } from "../../forms/checkbox/checkbox.js";
4
- import { DropdownMenu as w, DropdownMenuTrigger as j, DropdownMenuContent as k, DropdownMenuItem as p } from "../../feedback/dropdown-menu/dropdown-menu.js";
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 b } from "../../primitives/button/button.js";
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 f } from "../../../lib/primitives/create-component.js";
8
+ import { createComponent as b } from "../../../lib/primitives/create-component.js";
9
9
  import { cn as u } from "../../../lib/utils.js";
10
- function N(o, i) {
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([N(i, a)], { type: "text/csv;charset=utf-8" }), l = URL.createObjectURL(n), t = document.createElement("a");
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 = f(
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
- }, g = () => {
30
- navigator.clipboard?.writeText(N(a, n)).catch(() => {
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("min-w-0 w-full max-w-full overflow-hidden rounded-xl border border-stroke-subtle", o),
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
- b,
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(y, { size: 16 })
54
+ children: /* @__PURE__ */ e(N, { size: 16 })
52
55
  }
53
56
  ) }),
54
- /* @__PURE__ */ r(w, { children: [
57
+ /* @__PURE__ */ r(C, { children: [
55
58
  /* @__PURE__ */ e(x, { label: c("irisChat.moreActions"), children: /* @__PURE__ */ e(j, { asChild: !0, children: /* @__PURE__ */ e(
56
- b,
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(v, { size: 16 })
65
+ children: /* @__PURE__ */ e(y, { size: 16 })
63
66
  }
64
67
  ) }) }),
65
68
  /* @__PURE__ */ r(k, { align: "end", children: [
66
- /* @__PURE__ */ e(p, { onSelect: g, children: c("irisChat.copy") }),
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("div", { className: "overflow-x-auto", children: /* @__PURE__ */ r("table", { className: "w-full table-fixed border-t border-stroke-subtle text-sm", children: [
73
- /* @__PURE__ */ e("thead", { className: "bg-secondary", children: /* @__PURE__ */ r("tr", { children: [
74
- /* @__PURE__ */ e("th", { className: "w-10 px-3 py-2", children: /* @__PURE__ */ e("span", { className: "sr-only", children: c("aria.toggleSelection") }) }),
75
- a.map((s) => /* @__PURE__ */ e(
76
- "th",
77
- {
78
- className: "px-3 py-2 text-start font-medium text-content",
79
- children: s.header
80
- },
81
- s.id
82
- ))
83
- ] }) }),
84
- /* @__PURE__ */ e("tbody", { children: n.map((s) => /* @__PURE__ */ r("tr", { className: "border-t border-stroke-subtle", children: [
85
- /* @__PURE__ */ e("td", { className: "px-3 py-2", children: /* @__PURE__ */ e(C, { "aria-label": s.id }) }),
86
- a.map((h) => /* @__PURE__ */ e("td", { className: "px-3 py-2 text-content", children: s.cells[h.id] }, h.id))
87
- ] }, s.id)) })
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
- ), $ = f(
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 c } from "react";
3
- import { ButtonIconTooltip as p } from "../../feedback/tooltip/button-icon-tooltip.js";
4
- import { Button as m } from "../../primitives/button/button.js";
5
- import { useImpactNovaI18n as l } from "../../../i18n/use-impact-nova-i18n.js";
6
- import { createComponent as d } from "../../../lib/primitives/create-component.js";
7
- import { cn as f } from "../../../lib/utils.js";
8
- import { IrisChatCopyIcon as h } from "./iris-chat-icons.js";
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 C } from "../../../node_modules/react-markdown/lib/index.js";
11
- import k from "../../../node_modules/remark-gfm/lib/index.js";
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 y({ children: r }) {
16
- const { t: o } = l(), [e, i] = c(!1), a = n(r);
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(p, { label: o(e ? "irisChat.copied" : "irisChat.copyCode"), children: /* @__PURE__ */ t(
19
- m,
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": o(e ? "irisChat.copied" : "irisChat.copyCode"),
35
+ "aria-label": i(a ? "irisChat.copied" : "irisChat.copyCode"),
26
36
  "data-testid": "iris-chat-copy-code",
27
37
  onClick: () => {
28
- navigator.clipboard?.writeText(a).catch(() => {
29
- }), i(!0), window.setTimeout(() => i(!1), 1600);
38
+ navigator.clipboard?.writeText(o).catch(() => {
39
+ }), e(!0), window.setTimeout(() => e(!1), 1600);
30
40
  },
31
- children: /* @__PURE__ */ t(h, { size: 14 })
41
+ children: /* @__PURE__ */ t(f, { size: 14 })
32
42
  }
33
43
  ) }),
34
44
  /* @__PURE__ */ t("pre", { children: r })
35
45
  ] });
36
46
  }
37
- const B = d(
47
+ const A = p(
38
48
  "IrisChatMarkdown",
39
- ({ className: r, children: o }, e) => /* @__PURE__ */ t(
49
+ ({ className: r, children: i }, a) => /* @__PURE__ */ t(
40
50
  "div",
41
51
  {
42
- ref: e,
52
+ ref: a,
43
53
  "data-component": "iris-chat-markdown",
44
- className: f(u(), r),
54
+ className: h(u(), r),
45
55
  children: /* @__PURE__ */ t(
46
- C,
56
+ w,
47
57
  {
48
- remarkPlugins: [k],
58
+ remarkPlugins: [b],
49
59
  skipHtml: !0,
50
60
  components: {
51
- a: ({ href: i, children: a }) => /* @__PURE__ */ t("a", { href: i, target: "_blank", rel: "noreferrer", children: a }),
52
- pre: ({ children: i }) => /* @__PURE__ */ t(y, { children: i })
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: o
74
+ children: i
55
75
  }
56
76
  )
57
77
  }
58
78
  )
59
79
  );
60
80
  export {
61
- B as IrisChatMarkdown
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;