impact-nova 3.0.0-alpha.6 → 3.0.0-alpha.9
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/README.md +1 -1
- package/dist/components/data/ag-grid-react/headers/header-search-input.js +203 -199
- package/dist/components/data/expandable-list-item/sku-picker-chrome.d.ts +4 -0
- package/dist/components/data/expandable-list-item/sku-picker-chrome.js +37 -42
- package/dist/components/data-display/stereo-scatter/index.d.ts +2 -0
- package/dist/components/data-display/stereo-scatter/index.js +10 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-engine-frame.d.ts +41 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-engine-frame.js +178 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-engine-theme.d.ts +14 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-engine-theme.js +29 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-engine-wedges.d.ts +23 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-engine-wedges.js +80 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-engine.d.ts +120 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-engine.js +519 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-math.d.ts +64 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-math.js +129 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-model.d.ts +37 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-model.js +71 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-context.d.ts +33 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-context.js +19 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-key.d.ts +4 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-key.js +19 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-legend.d.ts +2 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-legend.js +75 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-scene.d.ts +2 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-scene.js +149 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-toolbar.d.ts +13 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-toolbar.js +93 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-tooltip.d.ts +2 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-tooltip.js +62 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-viewport.d.ts +3 -0
- package/dist/components/data-display/stereo-scatter/internals/stereo-scatter-viewport.js +41 -0
- package/dist/components/data-display/stereo-scatter/stereo-scatter.d.ts +12 -0
- package/dist/components/data-display/stereo-scatter/stereo-scatter.js +107 -0
- package/dist/components/data-display/stereo-scatter/stereo-scatter.stories-data.d.ts +11 -0
- package/dist/components/data-display/stereo-scatter/stereo-scatter.types.d.ts +69 -0
- package/dist/components/data-display/stereo-scatter/stereo-scatter.variants.d.ts +13 -0
- package/dist/components/data-display/stereo-scatter/stereo-scatter.variants.js +42 -0
- package/dist/components/feedback/tooltip/button-icon-tooltip.d.ts +3 -1
- package/dist/components/feedback/tooltip/button-icon-tooltip.js +22 -19
- package/dist/components/flows/iris-chat/IrisChatComposerVoiceCapture.d.ts +5 -0
- package/dist/components/flows/iris-chat/IrisChatComposerVoiceCapture.js +73 -0
- package/dist/components/flows/iris-chat/IrisChatVoiceWaveform.d.ts +3 -0
- package/dist/components/flows/iris-chat/IrisChatVoiceWaveform.js +25 -0
- package/dist/components/flows/iris-chat/index.d.ts +3 -1
- package/dist/components/flows/iris-chat/index.js +58 -53
- package/dist/components/flows/iris-chat/iris-chat-artifact.js +46 -36
- package/dist/components/flows/iris-chat/iris-chat-chrome.d.ts +39 -0
- package/dist/components/flows/iris-chat/iris-chat-chrome.js +325 -0
- package/dist/components/flows/iris-chat/iris-chat-close-animation.d.ts +12 -0
- package/dist/components/flows/iris-chat/iris-chat-close-animation.js +21 -0
- package/dist/components/flows/iris-chat/iris-chat-composer.js +266 -238
- package/dist/components/flows/iris-chat/iris-chat-context.d.ts +13 -0
- package/dist/components/flows/iris-chat/iris-chat-context.js +14 -10
- package/dist/components/flows/iris-chat/iris-chat-copy-feedback.d.ts +4 -0
- package/dist/components/flows/iris-chat/iris-chat-copy-feedback.js +16 -0
- package/dist/components/flows/iris-chat/iris-chat-frame.d.ts +31 -0
- package/dist/components/flows/iris-chat/iris-chat-frame.js +79 -0
- package/dist/components/flows/iris-chat/iris-chat-icons.d.ts +1 -0
- package/dist/components/flows/iris-chat/iris-chat-icons.js +28 -15
- package/dist/components/flows/iris-chat/iris-chat-launch-animation.d.ts +11 -0
- package/dist/components/flows/iris-chat/iris-chat-launch-animation.js +35 -0
- package/dist/components/flows/iris-chat/iris-chat-markdown.js +82 -42
- package/dist/components/flows/iris-chat/iris-chat-menu.js +91 -86
- package/dist/components/flows/iris-chat/iris-chat-speech.d.ts +52 -0
- package/dist/components/flows/iris-chat/iris-chat-speech.js +121 -0
- package/dist/components/flows/iris-chat/iris-chat-thread.d.ts +4 -0
- package/dist/components/flows/iris-chat/iris-chat-thread.js +277 -220
- package/dist/components/flows/iris-chat/iris-chat-window-chrome.d.ts +30 -0
- package/dist/components/flows/iris-chat/iris-chat-window-chrome.js +34 -0
- package/dist/components/flows/iris-chat/iris-chat-window-geometry-context.d.ts +14 -0
- package/dist/components/flows/iris-chat/iris-chat-window-geometry-context.js +15 -0
- package/dist/components/flows/iris-chat/iris-chat-window-geometry.d.ts +12 -0
- package/dist/components/flows/iris-chat/iris-chat-window-geometry.js +113 -0
- package/dist/components/flows/iris-chat/iris-chat-window-handles.d.ts +6 -0
- package/dist/components/flows/iris-chat/iris-chat-window-handles.js +50 -0
- package/dist/components/flows/iris-chat/iris-chat-window-shell.d.ts +8 -0
- package/dist/components/flows/iris-chat/iris-chat-window-shell.js +37 -0
- package/dist/components/flows/iris-chat/iris-chat.d.ts +3 -39
- package/dist/components/flows/iris-chat/iris-chat.js +22 -330
- package/dist/components/flows/iris-chat/iris-chat.types.d.ts +20 -0
- package/dist/components/flows/iris-chat/iris-chat.variants.d.ts +4 -3
- package/dist/components/flows/iris-chat/iris-chat.variants.js +46 -23
- package/dist/components/flows/iris-chat/use-iris-chat-root.d.ts +26 -0
- package/dist/components/flows/iris-chat/use-iris-chat-root.js +140 -0
- package/dist/components/forms/choice-card/choice-card-percent.js +50 -37
- package/dist/components/forms/choice-card/choice-card.d.ts +1 -0
- package/dist/components/forms/choice-card/choice-card.js +183 -186
- package/dist/components/forms/input/input.js +5 -5
- package/dist/components/layout/header/header.js +1 -0
- 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/form-react/Fields/SelectField.js +66 -57
- package/dist/form-react/Fields/VirtualizedListField.js +140 -96
- package/dist/form-react/index.d.ts +1 -1
- package/dist/form-react/types/fields.types.d.ts +27 -0
- package/dist/form-react/types/reactHookForm.types.d.ts +18 -1
- package/dist/i18n/defaultMessages.d.ts +37 -0
- package/dist/i18n/defaultMessages.js +54 -18
- package/dist/i18n/index.d.ts +1 -1
- package/dist/i18n/locales/de.js +36 -0
- package/dist/i18n/locales/es.js +36 -0
- package/dist/i18n/locales/hi.js +36 -0
- package/dist/i18n/locales/kn.js +36 -0
- package/dist/impact-nova-components.css +75 -0
- package/dist/impact-nova.css +1 -1
- package/dist/llms/rules/installation.js +1 -1
- package/dist/llms/rules/requirements.js +1 -1
- package/package.json +5 -1
|
@@ -1,55 +1,60 @@
|
|
|
1
|
-
import { IrisChat as
|
|
2
|
-
import { IrisChatComposer as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
1
|
+
import { IrisChat as a } from "./iris-chat.js";
|
|
2
|
+
import { IrisChatComposer as s } from "./iris-chat-composer.js";
|
|
3
|
+
import { clampIrisChatFrame as o, createCompactIrisChatFrame as h, createDefaultIrisChatFrame as C } from "./iris-chat-frame.js";
|
|
4
|
+
import { IrisChatActions as n, IrisChatAttachment as m, IrisChatChip as p, IrisChatDay as f, IrisChatError as u, IrisChatFollowUp as c, IrisChatFollowUps as d, IrisChatGreeting as l, IrisChatMessage as g, IrisChatSuggestion as x, IrisChatSuggestions as H, IrisChatThread as B, IrisChatWorkflow as k, IrisChatWorkflows as w } from "./iris-chat-thread.js";
|
|
5
|
+
import { IrisChatCitations as M, IrisChatProcessSteps as S, IrisChatThinking as T, IrisChatThinkingStatus as A } from "./iris-chat-thinking.js";
|
|
6
|
+
import { IrisChatMarkdown as L } from "./iris-chat-markdown.js";
|
|
7
|
+
import { IrisChatPrompt as y } from "./iris-chat-prompt.js";
|
|
8
|
+
import { IrisChatArtifact as W, IrisChatScenario as z } from "./iris-chat-artifact.js";
|
|
9
|
+
import { IrisChatList as G, IrisChatListItem as N, IrisChatMenu as b, IrisChatMenuSection as j } from "./iris-chat-menu.js";
|
|
10
|
+
import { useIrisChat as v } from "./iris-chat-context.js";
|
|
11
|
+
import { IrisChatBody as K, IrisChatDisclaimer as O, IrisChatFooter as Q, IrisChatHeader as R, IrisChatHeaderBackButton as V, IrisChatHeaderCloseButton as X, IrisChatHeaderLeading as Y, IrisChatHeaderMenuButton as Z, IrisChatHeaderMinimizeButton as _, IrisChatHeaderNewChatButton as $, IrisChatHeaderTitle as rr, IrisChatHeaderTrailing as tr, IrisChatIconButton as ar, IrisChatPanel as ir, IrisChatTrigger as sr } from "./iris-chat-chrome.js";
|
|
10
12
|
export {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
13
|
+
a as IrisChat,
|
|
14
|
+
n as IrisChatActions,
|
|
15
|
+
W as IrisChatArtifact,
|
|
16
|
+
m as IrisChatAttachment,
|
|
17
|
+
K as IrisChatBody,
|
|
18
|
+
p as IrisChatChip,
|
|
19
|
+
M as IrisChatCitations,
|
|
20
|
+
s as IrisChatComposer,
|
|
21
|
+
f as IrisChatDay,
|
|
22
|
+
O as IrisChatDisclaimer,
|
|
23
|
+
u as IrisChatError,
|
|
24
|
+
c as IrisChatFollowUp,
|
|
25
|
+
d as IrisChatFollowUps,
|
|
26
|
+
Q as IrisChatFooter,
|
|
27
|
+
l as IrisChatGreeting,
|
|
28
|
+
R as IrisChatHeader,
|
|
29
|
+
V as IrisChatHeaderBackButton,
|
|
30
|
+
X as IrisChatHeaderCloseButton,
|
|
31
|
+
Y as IrisChatHeaderLeading,
|
|
32
|
+
Z as IrisChatHeaderMenuButton,
|
|
33
|
+
_ as IrisChatHeaderMinimizeButton,
|
|
34
|
+
$ as IrisChatHeaderNewChatButton,
|
|
35
|
+
rr as IrisChatHeaderTitle,
|
|
36
|
+
tr as IrisChatHeaderTrailing,
|
|
37
|
+
ar as IrisChatIconButton,
|
|
38
|
+
G as IrisChatList,
|
|
39
|
+
N as IrisChatListItem,
|
|
40
|
+
L as IrisChatMarkdown,
|
|
41
|
+
b as IrisChatMenu,
|
|
42
|
+
j as IrisChatMenuSection,
|
|
43
|
+
g as IrisChatMessage,
|
|
44
|
+
ir as IrisChatPanel,
|
|
45
|
+
S as IrisChatProcessSteps,
|
|
46
|
+
y as IrisChatPrompt,
|
|
47
|
+
z as IrisChatScenario,
|
|
48
|
+
x as IrisChatSuggestion,
|
|
49
|
+
H as IrisChatSuggestions,
|
|
50
|
+
T as IrisChatThinking,
|
|
51
|
+
A as IrisChatThinkingStatus,
|
|
52
|
+
B as IrisChatThread,
|
|
53
|
+
sr as IrisChatTrigger,
|
|
54
|
+
k as IrisChatWorkflow,
|
|
55
|
+
w as IrisChatWorkflows,
|
|
56
|
+
o as clampIrisChatFrame,
|
|
57
|
+
h as createCompactIrisChatFrame,
|
|
58
|
+
C as createDefaultIrisChatFrame,
|
|
59
|
+
v as useIrisChat
|
|
55
60
|
};
|
|
@@ -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",
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { IrisChatBodyProps, IrisChatFooterProps, IrisChatHeaderProps, IrisChatIconButtonProps, IrisChatPanelProps } from './iris-chat.types';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare const IrisChatPanel: React.ForwardRefExoticComponent<IrisChatPanelProps & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
+
declare const IrisChatHeader: React.ForwardRefExoticComponent<IrisChatHeaderProps & React.RefAttributes<HTMLElement>>;
|
|
5
|
+
declare const IrisChatHeaderLeading: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
declare const IrisChatHeaderTrailing: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
declare const IrisChatHeaderTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & {
|
|
8
|
+
showBrand?: boolean;
|
|
9
|
+
} & React.RefAttributes<HTMLHeadingElement>>;
|
|
10
|
+
declare const IrisChatIconButton: React.ForwardRefExoticComponent<React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
11
|
+
label: string;
|
|
12
|
+
variant?: "secondary" | "ghost";
|
|
13
|
+
} & React.RefAttributes<HTMLButtonElement>>;
|
|
14
|
+
declare const IrisChatHeaderMenuButton: React.ForwardRefExoticComponent<Omit<IrisChatIconButtonProps, "label"> & {
|
|
15
|
+
label?: string;
|
|
16
|
+
} & React.RefAttributes<HTMLButtonElement>>;
|
|
17
|
+
declare const IrisChatHeaderBackButton: React.ForwardRefExoticComponent<Omit<IrisChatIconButtonProps, "label"> & {
|
|
18
|
+
label?: string;
|
|
19
|
+
} & React.RefAttributes<HTMLButtonElement>>;
|
|
20
|
+
declare const IrisChatHeaderNewChatButton: React.ForwardRefExoticComponent<Omit<IrisChatIconButtonProps, "label"> & {
|
|
21
|
+
label?: string;
|
|
22
|
+
} & React.RefAttributes<HTMLButtonElement>>;
|
|
23
|
+
declare const IrisChatHeaderMinimizeButton: React.ForwardRefExoticComponent<Omit<IrisChatIconButtonProps, "label"> & {
|
|
24
|
+
label?: string;
|
|
25
|
+
} & React.RefAttributes<HTMLButtonElement>>;
|
|
26
|
+
declare const IrisChatHeaderCloseButton: React.ForwardRefExoticComponent<Omit<IrisChatIconButtonProps, "label"> & {
|
|
27
|
+
label?: string;
|
|
28
|
+
} & React.RefAttributes<HTMLButtonElement>>;
|
|
29
|
+
declare const IrisChatBody: React.ForwardRefExoticComponent<IrisChatBodyProps & React.RefAttributes<HTMLDivElement>>;
|
|
30
|
+
declare const IrisChatFooter: React.ForwardRefExoticComponent<IrisChatFooterProps & React.RefAttributes<HTMLDivElement>>;
|
|
31
|
+
declare const IrisChatDisclaimer: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & {
|
|
32
|
+
href?: string;
|
|
33
|
+
} & React.RefAttributes<HTMLParagraphElement>>;
|
|
34
|
+
declare const IrisChatTrigger: React.ForwardRefExoticComponent<React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
35
|
+
asChild?: boolean;
|
|
36
|
+
size?: "sm" | "md" | "lg";
|
|
37
|
+
shape?: "default" | "pill";
|
|
38
|
+
} & React.RefAttributes<HTMLButtonElement>>;
|
|
39
|
+
export { IrisChatBody, IrisChatDisclaimer, IrisChatFooter, IrisChatHeader, IrisChatHeaderBackButton, IrisChatHeaderCloseButton, IrisChatHeaderLeading, IrisChatHeaderMenuButton, IrisChatHeaderMinimizeButton, IrisChatHeaderNewChatButton, IrisChatHeaderTitle, IrisChatHeaderTrailing, IrisChatIconButton, IrisChatPanel, IrisChatTrigger, };
|
|
@@ -0,0 +1,325 @@
|
|
|
1
|
+
import { jsx as t, jsxs as C, Fragment as P } from "react/jsx-runtime";
|
|
2
|
+
import * as g from "react";
|
|
3
|
+
import { Slot as N } from "@radix-ui/react-slot";
|
|
4
|
+
import { Back as y, Cross as z, Draw as k } from "impact-nova-icons";
|
|
5
|
+
import { Popover as T, PopoverTrigger as W, PopoverContent as D, PopoverHeader as F, PopoverTitle as R, PopoverBody as M } from "../../feedback/popover/popover.js";
|
|
6
|
+
import { ButtonIconTooltip as O } from "../../feedback/tooltip/button-icon-tooltip.js";
|
|
7
|
+
import { Button as G } from "../../primitives/button/button.js";
|
|
8
|
+
import { IrisButton as L } from "../../primitives/iris/iris.js";
|
|
9
|
+
import { IrisAlanGradientIcon as v } from "../../primitives/iris/iris-alan-gradient-icon.js";
|
|
10
|
+
import { useImpactNovaI18n as p } from "../../../i18n/use-impact-nova-i18n.js";
|
|
11
|
+
import { useComposedRefs as x } from "../../../lib/compose-refs.js";
|
|
12
|
+
import { createComponent as c } from "../../../lib/primitives/create-component.js";
|
|
13
|
+
import { cn as m } from "../../../lib/utils.js";
|
|
14
|
+
import { useIrisChat as u, useIrisChatOptional as S } from "./iris-chat-context.js";
|
|
15
|
+
import { IrisChatHamburgerIcon as j, IrisChatMinimizeIcon as V } from "./iris-chat-icons.js";
|
|
16
|
+
import { useIrisChatWindowGeometryOptional as q, IrisChatWindowGeometryProvider as A } from "./iris-chat-window-geometry-context.js";
|
|
17
|
+
import { IrisChatWindowShell as E } from "./iris-chat-window-shell.js";
|
|
18
|
+
import { useIrisChatWindowGeometry as J } from "./iris-chat-window-geometry.js";
|
|
19
|
+
import { irisChatHeaderVariants as K, irisChatPanelVariants as Q } from "./iris-chat.variants.js";
|
|
20
|
+
import { readIrisChatHorizontalPaddingClass as H, readIrisChatDisclaimerPaddingClass as U } from "./iris-chat-window-chrome.js";
|
|
21
|
+
const ue = c(
|
|
22
|
+
"IrisChatPanel",
|
|
23
|
+
({ className: i, hidden: r, children: a, ...n }, o) => {
|
|
24
|
+
const e = u(), s = r ?? !e.open, d = J({
|
|
25
|
+
frame: e.frame,
|
|
26
|
+
commitFrame: e.commitFrame,
|
|
27
|
+
resetFrame: e.resetFrame
|
|
28
|
+
}), l = x(o, d.panelRef, e.registerPanelNode);
|
|
29
|
+
return s ? null : e.isWindowPlacement ? /* @__PURE__ */ t(A, { value: d.geometry, children: /* @__PURE__ */ t(
|
|
30
|
+
E,
|
|
31
|
+
{
|
|
32
|
+
panelRef: l,
|
|
33
|
+
isClosing: e.isClosing,
|
|
34
|
+
isOpening: e.isOpening,
|
|
35
|
+
className: i,
|
|
36
|
+
children: a
|
|
37
|
+
}
|
|
38
|
+
) }) : /* @__PURE__ */ t(
|
|
39
|
+
"div",
|
|
40
|
+
{
|
|
41
|
+
ref: o,
|
|
42
|
+
"data-component": "iris-chat-panel",
|
|
43
|
+
"data-placement": e.placement,
|
|
44
|
+
className: m(Q({ placement: e.placement }), i),
|
|
45
|
+
...n,
|
|
46
|
+
children: a
|
|
47
|
+
}
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
), Ce = c(
|
|
51
|
+
"IrisChatHeader",
|
|
52
|
+
({ className: i, onPointerDown: r, onDoubleClick: a, ...n }, o) => {
|
|
53
|
+
const e = q();
|
|
54
|
+
return /* @__PURE__ */ t(
|
|
55
|
+
"header",
|
|
56
|
+
{
|
|
57
|
+
ref: o,
|
|
58
|
+
"data-component": "iris-chat-header",
|
|
59
|
+
"aria-grabbed": e?.isDragging ? !0 : void 0,
|
|
60
|
+
className: m(
|
|
61
|
+
K(),
|
|
62
|
+
e ? "cursor-grab active:cursor-grabbing" : void 0,
|
|
63
|
+
i
|
|
64
|
+
),
|
|
65
|
+
onPointerDown: (s) => {
|
|
66
|
+
e?.onHeaderPointerDown(s), r?.(s);
|
|
67
|
+
},
|
|
68
|
+
onDoubleClick: (s) => {
|
|
69
|
+
e?.onHeaderDoubleClick(s), a?.(s);
|
|
70
|
+
},
|
|
71
|
+
...n
|
|
72
|
+
}
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
), fe = c("IrisChatHeaderLeading", ({ className: i, ...r }, a) => /* @__PURE__ */ t(
|
|
76
|
+
"div",
|
|
77
|
+
{
|
|
78
|
+
ref: a,
|
|
79
|
+
"data-component": "iris-chat-header-leading",
|
|
80
|
+
className: m("flex min-w-0 items-center gap-2", i),
|
|
81
|
+
...r
|
|
82
|
+
}
|
|
83
|
+
)), Ie = c("IrisChatHeaderTrailing", ({ className: i, ...r }, a) => /* @__PURE__ */ t(
|
|
84
|
+
"div",
|
|
85
|
+
{
|
|
86
|
+
ref: a,
|
|
87
|
+
"data-component": "iris-chat-header-trailing",
|
|
88
|
+
className: m("flex shrink-0 items-center gap-2", i),
|
|
89
|
+
...r
|
|
90
|
+
}
|
|
91
|
+
)), ge = c(
|
|
92
|
+
"IrisChatHeaderTitle",
|
|
93
|
+
({ className: i, showBrand: r = !1, children: a, ...n }, o) => {
|
|
94
|
+
const { t: e } = p();
|
|
95
|
+
return /* @__PURE__ */ C("div", { className: "flex min-w-0 items-center gap-1", children: [
|
|
96
|
+
r ? /* @__PURE__ */ t(v, { size: 18 }) : null,
|
|
97
|
+
/* @__PURE__ */ t(
|
|
98
|
+
"h2",
|
|
99
|
+
{
|
|
100
|
+
ref: o,
|
|
101
|
+
"data-component": "iris-chat-header-title",
|
|
102
|
+
className: m("truncate text-sm font-semibold leading-5 text-content", i),
|
|
103
|
+
...n,
|
|
104
|
+
children: a ?? e("irisChat.askIris")
|
|
105
|
+
}
|
|
106
|
+
)
|
|
107
|
+
] });
|
|
108
|
+
}
|
|
109
|
+
), f = c(
|
|
110
|
+
"IrisChatIconButton",
|
|
111
|
+
({ className: i, label: r, children: a, type: n = "button", variant: o = "secondary", disabled: e, ...s }, d) => /* @__PURE__ */ t(O, { label: r, disabled: e, children: /* @__PURE__ */ t(
|
|
112
|
+
G,
|
|
113
|
+
{
|
|
114
|
+
ref: d,
|
|
115
|
+
type: n,
|
|
116
|
+
variant: o,
|
|
117
|
+
size: "icon",
|
|
118
|
+
"aria-label": r,
|
|
119
|
+
disabled: e,
|
|
120
|
+
"data-component": "iris-chat-icon-button",
|
|
121
|
+
className: m(
|
|
122
|
+
"text-content",
|
|
123
|
+
o === "secondary" ? "rounded-full" : "rounded-lg",
|
|
124
|
+
i
|
|
125
|
+
),
|
|
126
|
+
...s,
|
|
127
|
+
children: a
|
|
128
|
+
}
|
|
129
|
+
) })
|
|
130
|
+
), we = c("IrisChatHeaderMenuButton", ({ label: i, ...r }, a) => {
|
|
131
|
+
const { t: n } = p();
|
|
132
|
+
return /* @__PURE__ */ t(f, { ref: a, variant: "ghost", label: i ?? n("irisChat.menu"), ...r, children: /* @__PURE__ */ t(j, { size: 16 }) });
|
|
133
|
+
}), be = c("IrisChatHeaderBackButton", ({ label: i, ...r }, a) => {
|
|
134
|
+
const { t: n } = p();
|
|
135
|
+
return /* @__PURE__ */ t(f, { ref: a, variant: "ghost", label: i ?? n("irisChat.back"), ...r, children: /* @__PURE__ */ t(y, { size: 16 }) });
|
|
136
|
+
}), ve = c("IrisChatHeaderNewChatButton", ({ label: i, ...r }, a) => {
|
|
137
|
+
const { t: n } = p();
|
|
138
|
+
return /* @__PURE__ */ t(f, { ref: a, label: i ?? n("irisChat.newChat"), ...r, children: /* @__PURE__ */ t(k, { size: 16 }) });
|
|
139
|
+
}), xe = c("IrisChatHeaderMinimizeButton", ({ label: i, onClick: r, ...a }, n) => {
|
|
140
|
+
const { t: o } = p(), e = u(), s = e.placement === "minimized";
|
|
141
|
+
return /* @__PURE__ */ t(
|
|
142
|
+
f,
|
|
143
|
+
{
|
|
144
|
+
ref: n,
|
|
145
|
+
label: i ?? o(s ? "irisChat.expand" : "irisChat.minimize"),
|
|
146
|
+
"aria-pressed": s,
|
|
147
|
+
onClick: (d) => {
|
|
148
|
+
s ? e.expandFromCompactFrame() : e.applyCompactFrame(), r?.(d);
|
|
149
|
+
},
|
|
150
|
+
...a,
|
|
151
|
+
children: /* @__PURE__ */ t(V, { size: 16 })
|
|
152
|
+
}
|
|
153
|
+
);
|
|
154
|
+
}), He = c("IrisChatHeaderCloseButton", ({ label: i, onClick: r, ...a }, n) => {
|
|
155
|
+
const { t: o } = p(), e = u();
|
|
156
|
+
return /* @__PURE__ */ t(
|
|
157
|
+
f,
|
|
158
|
+
{
|
|
159
|
+
ref: n,
|
|
160
|
+
label: i ?? o("aria.close"),
|
|
161
|
+
onClick: (s) => {
|
|
162
|
+
e.requestClose(), r?.(s);
|
|
163
|
+
},
|
|
164
|
+
...a,
|
|
165
|
+
children: /* @__PURE__ */ t(z, { size: 16 })
|
|
166
|
+
}
|
|
167
|
+
);
|
|
168
|
+
}), Be = c(
|
|
169
|
+
"IrisChatBody",
|
|
170
|
+
({ className: i, onScroll: r, ...a }, n) => {
|
|
171
|
+
const o = u(), e = g.useRef(null), s = g.useRef(!0), d = x(n, e);
|
|
172
|
+
return g.useEffect(() => {
|
|
173
|
+
const l = e.current;
|
|
174
|
+
if (!l)
|
|
175
|
+
return;
|
|
176
|
+
const h = () => {
|
|
177
|
+
s.current && (l.scrollTop = l.scrollHeight);
|
|
178
|
+
}, I = new ResizeObserver(h), w = () => {
|
|
179
|
+
I.disconnect(), I.observe(l);
|
|
180
|
+
for (const B of l.children)
|
|
181
|
+
I.observe(B);
|
|
182
|
+
}, b = new MutationObserver(() => {
|
|
183
|
+
w(), h();
|
|
184
|
+
});
|
|
185
|
+
return b.observe(l, { childList: !0, subtree: !0, characterData: !0 }), w(), h(), () => {
|
|
186
|
+
I.disconnect(), b.disconnect();
|
|
187
|
+
};
|
|
188
|
+
}, []), /* @__PURE__ */ t(
|
|
189
|
+
"div",
|
|
190
|
+
{
|
|
191
|
+
ref: d,
|
|
192
|
+
"data-component": "iris-chat-body",
|
|
193
|
+
"data-placement": o.placement,
|
|
194
|
+
className: m(
|
|
195
|
+
"flex min-h-0 min-w-0 flex-1 flex-col overflow-x-hidden overflow-y-auto overscroll-x-contain",
|
|
196
|
+
H({
|
|
197
|
+
isWindowPlacement: o.isWindowPlacement,
|
|
198
|
+
placement: o.placement
|
|
199
|
+
}),
|
|
200
|
+
i
|
|
201
|
+
),
|
|
202
|
+
onScroll: (l) => {
|
|
203
|
+
const h = l.currentTarget;
|
|
204
|
+
s.current = h.scrollHeight - h.scrollTop - h.clientHeight < 64, r?.(l);
|
|
205
|
+
},
|
|
206
|
+
...a
|
|
207
|
+
}
|
|
208
|
+
);
|
|
209
|
+
}
|
|
210
|
+
), Pe = c(
|
|
211
|
+
"IrisChatFooter",
|
|
212
|
+
({ className: i, ...r }, a) => {
|
|
213
|
+
const n = u();
|
|
214
|
+
return /* @__PURE__ */ t(
|
|
215
|
+
"div",
|
|
216
|
+
{
|
|
217
|
+
ref: a,
|
|
218
|
+
"data-component": "iris-chat-footer",
|
|
219
|
+
"data-placement": n.placement,
|
|
220
|
+
className: m(
|
|
221
|
+
"min-w-0 shrink-0 pb-2",
|
|
222
|
+
H({
|
|
223
|
+
isWindowPlacement: n.isWindowPlacement,
|
|
224
|
+
placement: n.placement
|
|
225
|
+
}),
|
|
226
|
+
i
|
|
227
|
+
),
|
|
228
|
+
...r
|
|
229
|
+
}
|
|
230
|
+
);
|
|
231
|
+
}
|
|
232
|
+
), Ne = c(
|
|
233
|
+
"IrisChatDisclaimer",
|
|
234
|
+
({ className: i, href: r, children: a, ...n }, o) => {
|
|
235
|
+
const { t: e } = p(), s = u();
|
|
236
|
+
return /* @__PURE__ */ t(
|
|
237
|
+
"p",
|
|
238
|
+
{
|
|
239
|
+
ref: o,
|
|
240
|
+
"data-component": "iris-chat-disclaimer",
|
|
241
|
+
className: m(
|
|
242
|
+
"shrink-0 text-center text-xs font-medium leading-4 text-content-caption",
|
|
243
|
+
U({ isWindowPlacement: s.isWindowPlacement }),
|
|
244
|
+
i
|
|
245
|
+
),
|
|
246
|
+
...n,
|
|
247
|
+
children: a ?? /* @__PURE__ */ C(P, { children: [
|
|
248
|
+
e("irisChat.disclaimer"),
|
|
249
|
+
" ",
|
|
250
|
+
r ? /* @__PURE__ */ t("a", { href: r, className: "underline hover:text-brand", children: e("irisChat.learnMore") }) : /* @__PURE__ */ C(T, { children: [
|
|
251
|
+
/* @__PURE__ */ t(W, { asChild: !0, children: /* @__PURE__ */ t(
|
|
252
|
+
"button",
|
|
253
|
+
{
|
|
254
|
+
type: "button",
|
|
255
|
+
className: "underline hover:text-brand",
|
|
256
|
+
"data-testid": "iris-chat-learn-more",
|
|
257
|
+
children: e("irisChat.learnMore")
|
|
258
|
+
}
|
|
259
|
+
) }),
|
|
260
|
+
/* @__PURE__ */ C(
|
|
261
|
+
D,
|
|
262
|
+
{
|
|
263
|
+
align: "center",
|
|
264
|
+
side: "top",
|
|
265
|
+
className: "iris-menu-surface w-[320px] rounded-xl p-4",
|
|
266
|
+
children: [
|
|
267
|
+
/* @__PURE__ */ t(F, { className: "mb-2", children: /* @__PURE__ */ C("div", { className: "flex items-center gap-2", children: [
|
|
268
|
+
/* @__PURE__ */ t(v, { size: 18 }),
|
|
269
|
+
/* @__PURE__ */ t(R, { className: "text-sm font-semibold", children: e("irisChat.disclaimerTitle") })
|
|
270
|
+
] }) }),
|
|
271
|
+
/* @__PURE__ */ t(M, { className: "text-sm leading-5 text-content-secondary", children: e("irisChat.disclaimerBody") })
|
|
272
|
+
]
|
|
273
|
+
}
|
|
274
|
+
)
|
|
275
|
+
] })
|
|
276
|
+
] })
|
|
277
|
+
}
|
|
278
|
+
);
|
|
279
|
+
}
|
|
280
|
+
), ye = c(
|
|
281
|
+
"IrisChatTrigger",
|
|
282
|
+
({ asChild: i = !1, onClick: r, size: a = "md", shape: n = "default", className: o, ...e }, s) => {
|
|
283
|
+
const d = S(), l = (h) => {
|
|
284
|
+
d?.setOpen(!0), r?.(h);
|
|
285
|
+
};
|
|
286
|
+
return i ? /* @__PURE__ */ t(
|
|
287
|
+
N,
|
|
288
|
+
{
|
|
289
|
+
ref: s,
|
|
290
|
+
"data-component": "iris-chat-trigger",
|
|
291
|
+
className: m("pointer-events-auto", o),
|
|
292
|
+
onClick: l,
|
|
293
|
+
...e
|
|
294
|
+
}
|
|
295
|
+
) : /* @__PURE__ */ t(
|
|
296
|
+
L,
|
|
297
|
+
{
|
|
298
|
+
ref: s,
|
|
299
|
+
size: a,
|
|
300
|
+
shape: n,
|
|
301
|
+
"data-component": "iris-chat-trigger",
|
|
302
|
+
className: m("pointer-events-auto", o),
|
|
303
|
+
onClick: l,
|
|
304
|
+
...e
|
|
305
|
+
}
|
|
306
|
+
);
|
|
307
|
+
}
|
|
308
|
+
);
|
|
309
|
+
export {
|
|
310
|
+
Be as IrisChatBody,
|
|
311
|
+
Ne as IrisChatDisclaimer,
|
|
312
|
+
Pe as IrisChatFooter,
|
|
313
|
+
Ce as IrisChatHeader,
|
|
314
|
+
be as IrisChatHeaderBackButton,
|
|
315
|
+
He as IrisChatHeaderCloseButton,
|
|
316
|
+
fe as IrisChatHeaderLeading,
|
|
317
|
+
we as IrisChatHeaderMenuButton,
|
|
318
|
+
xe as IrisChatHeaderMinimizeButton,
|
|
319
|
+
ve as IrisChatHeaderNewChatButton,
|
|
320
|
+
ge as IrisChatHeaderTitle,
|
|
321
|
+
Ie as IrisChatHeaderTrailing,
|
|
322
|
+
f as IrisChatIconButton,
|
|
323
|
+
ue as IrisChatPanel,
|
|
324
|
+
ye as IrisChatTrigger
|
|
325
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type IrisChatCloseTransform = {
|
|
2
|
+
translateX: number;
|
|
3
|
+
translateY: number;
|
|
4
|
+
scale: number;
|
|
5
|
+
};
|
|
6
|
+
export declare const IRIS_CHAT_CLOSE_ANIMATION_MS = 320;
|
|
7
|
+
export declare function readIrisChatCloseTransform(panelRect: DOMRectReadOnly, targetRect: DOMRectReadOnly): IrisChatCloseTransform;
|
|
8
|
+
export declare function readIrisChatCloseAnimationStyle(transform: IrisChatCloseTransform): {
|
|
9
|
+
transform: string;
|
|
10
|
+
opacity: string;
|
|
11
|
+
transition: string;
|
|
12
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const C = 320;
|
|
2
|
+
function I(t, s) {
|
|
3
|
+
const n = t.left + t.width / 2, a = t.top + t.height / 2, i = s.left + s.width / 2, e = s.top + s.height / 2, o = s.width / t.width, r = s.height / t.height, h = Math.min(o, r, 1) * 0.85;
|
|
4
|
+
return {
|
|
5
|
+
translateX: i - n,
|
|
6
|
+
translateY: e - a,
|
|
7
|
+
scale: Math.max(h, 0.04)
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
function l(t) {
|
|
11
|
+
return {
|
|
12
|
+
transform: `translate(${t.translateX}px, ${t.translateY}px) scale(${t.scale})`,
|
|
13
|
+
opacity: "0",
|
|
14
|
+
transition: "transform 320ms cubic-bezier(0.4, 0, 0.2, 1), opacity 280ms ease-in"
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
C as IRIS_CHAT_CLOSE_ANIMATION_MS,
|
|
19
|
+
l as readIrisChatCloseAnimationStyle,
|
|
20
|
+
I as readIrisChatCloseTransform
|
|
21
|
+
};
|