chordia-ui 3.7.0 → 3.7.2
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/ChatMessage.cjs.js +15 -0
- package/dist/ChatMessage.cjs.js.map +1 -0
- package/dist/ChatMessage.es.js +915 -0
- package/dist/ChatMessage.es.js.map +1 -0
- package/dist/SideDrawer.cjs.js +2 -0
- package/dist/SideDrawer.cjs.js.map +1 -0
- package/dist/SideDrawer.es.js +358 -0
- package/dist/SideDrawer.es.js.map +1 -0
- package/dist/Toast.cjs.js +2 -2
- package/dist/Toast.cjs.js.map +1 -1
- package/dist/Toast.es.js +301 -671
- package/dist/Toast.es.js.map +1 -1
- package/dist/components/UpdatedInteractionDetails.cjs.js +4 -4
- package/dist/components/UpdatedInteractionDetails.cjs.js.map +1 -1
- package/dist/components/UpdatedInteractionDetails.es.js +652 -603
- package/dist/components/UpdatedInteractionDetails.es.js.map +1 -1
- package/dist/components/chat.cjs.js +5 -7
- package/dist/components/chat.cjs.js.map +1 -1
- package/dist/components/chat.es.js +393 -849
- package/dist/components/chat.es.js.map +1 -1
- package/dist/components/common.cjs.js +1 -1
- package/dist/components/common.es.js +28 -27
- package/dist/components/common.es.js.map +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +73 -72
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
- package/src/components/UpdatedInteractionDetails/UpdatedInteractionContext.jsx +6 -2
- package/src/components/UpdatedInteractionDetails/UpdatedInteractionDetails.jsx +190 -139
- package/src/components/chat/ChartRenderer.jsx +300 -49
- package/src/components/common/AskCompass.jsx +91 -87
- package/src/components/common/SideDrawer.jsx +7 -3
- package/dist/ChartRenderer.cjs.js +0 -3
- package/dist/ChartRenderer.cjs.js.map +0 -1
- package/dist/ChartRenderer.es.js +0 -304
- package/dist/ChartRenderer.es.js.map +0 -1
package/dist/Toast.es.js
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import { MessageCircleQuestion as
|
|
5
|
-
import { C as
|
|
6
|
-
import { T as
|
|
7
|
-
import { S as
|
|
8
|
-
function
|
|
9
|
-
return /* @__PURE__ */
|
|
1
|
+
import { jsxs as d, jsx as e, Fragment as R } from "react/jsx-runtime";
|
|
2
|
+
import Z, { useState as w, useRef as I, useEffect as E, useMemo as z, useCallback as j } from "react";
|
|
3
|
+
import { motion as L, AnimatePresence as O } from "motion/react";
|
|
4
|
+
import { MessageCircleQuestion as N, History as K, Search as V, X as T, PlusCircle as Y, FolderCheck as Q, CircleCheck as B, Info as U, OctagonAlert as X, AlertTriangle as $ } from "lucide-react";
|
|
5
|
+
import { a as W, C as _ } from "./ChatMessage.es.js";
|
|
6
|
+
import { T as q } from "./TextInput.es.js";
|
|
7
|
+
import { S as G } from "./SmallButton.es.js";
|
|
8
|
+
function J({ size: r = 48, isHovered: c = !1 }) {
|
|
9
|
+
return /* @__PURE__ */ d(
|
|
10
10
|
"svg",
|
|
11
11
|
{
|
|
12
|
-
width:
|
|
13
|
-
height:
|
|
12
|
+
width: r,
|
|
13
|
+
height: r,
|
|
14
14
|
viewBox: "0 0 48 48",
|
|
15
15
|
fill: "none",
|
|
16
16
|
xmlns: "http://www.w3.org/2000/svg",
|
|
17
17
|
style: { flexShrink: 0, display: "block" },
|
|
18
18
|
children: [
|
|
19
19
|
/* @__PURE__ */ e(
|
|
20
|
-
|
|
20
|
+
L.rect,
|
|
21
21
|
{
|
|
22
22
|
width: "48",
|
|
23
23
|
height: "48",
|
|
24
24
|
fill: "#2E3236",
|
|
25
25
|
initial: { rx: 12 },
|
|
26
|
-
animate: { rx:
|
|
26
|
+
animate: { rx: c ? 24 : 12 },
|
|
27
27
|
transition: { duration: 0.8, ease: [0.16, 1, 0.3, 1] }
|
|
28
28
|
}
|
|
29
29
|
),
|
|
@@ -36,12 +36,12 @@ function q({ size: t = 48, isHovered: i = !1 }) {
|
|
|
36
36
|
}
|
|
37
37
|
);
|
|
38
38
|
}
|
|
39
|
-
function
|
|
40
|
-
return /* @__PURE__ */
|
|
39
|
+
function P({ size: r = 48 }) {
|
|
40
|
+
return /* @__PURE__ */ d(
|
|
41
41
|
"svg",
|
|
42
42
|
{
|
|
43
|
-
width:
|
|
44
|
-
height:
|
|
43
|
+
width: r,
|
|
44
|
+
height: r,
|
|
45
45
|
viewBox: "0 0 48 48",
|
|
46
46
|
fill: "none",
|
|
47
47
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -56,39 +56,47 @@ function J({ size: t = 48 }) {
|
|
|
56
56
|
}
|
|
57
57
|
);
|
|
58
58
|
}
|
|
59
|
-
function
|
|
60
|
-
const [
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}, [
|
|
64
|
-
const
|
|
65
|
-
if (!
|
|
59
|
+
function e1({ isOpen: r = !0, onSend: c, onHistoryClick: n, messages: f = [], loading: C = !1, statusLabel: h, onCodeBlockClick: g }) {
|
|
60
|
+
const [i, o] = w(""), l = I(null), y = I(null);
|
|
61
|
+
E(() => {
|
|
62
|
+
l.current && (l.current.scrollTop = l.current.scrollHeight);
|
|
63
|
+
}, [f]), E(() => {
|
|
64
|
+
const t = y.current;
|
|
65
|
+
if (!t)
|
|
66
66
|
return;
|
|
67
|
-
|
|
68
|
-
const
|
|
69
|
-
|
|
70
|
-
}, [
|
|
71
|
-
const
|
|
72
|
-
const
|
|
73
|
-
!
|
|
74
|
-
},
|
|
75
|
-
if (
|
|
76
|
-
if (
|
|
67
|
+
t.style.height = "auto";
|
|
68
|
+
const s = 140;
|
|
69
|
+
t.style.height = Math.min(t.scrollHeight, s) + "px", t.style.overflowY = t.scrollHeight > s ? "auto" : "hidden";
|
|
70
|
+
}, [i]);
|
|
71
|
+
const u = () => {
|
|
72
|
+
const t = i.trim();
|
|
73
|
+
!t || C || (c == null || c(t), o(""));
|
|
74
|
+
}, x = (t) => {
|
|
75
|
+
if (t.key === "Enter") {
|
|
76
|
+
if (t.metaKey || t.ctrlKey || t.shiftKey)
|
|
77
77
|
return;
|
|
78
|
-
|
|
78
|
+
t.preventDefault(), u();
|
|
79
79
|
}
|
|
80
|
-
},
|
|
81
|
-
|
|
82
|
-
|
|
80
|
+
}, m = f.length > 0, b = {
|
|
81
|
+
alignSelf: "stretch",
|
|
82
|
+
marginTop: 8,
|
|
83
|
+
overflowX: "auto",
|
|
84
|
+
overflowY: "hidden",
|
|
85
|
+
flexShrink: 0
|
|
86
|
+
}, k = (t) => ({
|
|
87
|
+
width: t === "pie" || t === "donut" ? 500 : 460,
|
|
88
|
+
flexShrink: 0
|
|
89
|
+
});
|
|
90
|
+
return /* @__PURE__ */ d(
|
|
91
|
+
L.div,
|
|
83
92
|
{
|
|
84
|
-
initial:
|
|
85
|
-
animate: { opacity: 1, y: 0, scale: 1 },
|
|
86
|
-
exit: { opacity: 0, y: 20, scale: 0.95 },
|
|
93
|
+
initial: !1,
|
|
94
|
+
animate: r ? { opacity: 1, y: 0, scale: 1, pointerEvents: "auto" } : { opacity: 0, y: 20, scale: 0.95, pointerEvents: "none" },
|
|
87
95
|
transition: { type: "spring", stiffness: 400, damping: 30 },
|
|
88
96
|
style: {
|
|
89
97
|
display: "flex",
|
|
90
|
-
width:
|
|
91
|
-
height:
|
|
98
|
+
width: "min(360px, calc(100vw - 24px))",
|
|
99
|
+
height: "min(709px, calc(100dvh - 100px))",
|
|
92
100
|
padding: 24,
|
|
93
101
|
flexDirection: "column",
|
|
94
102
|
justifyContent: "space-between",
|
|
@@ -98,7 +106,7 @@ function P({ onSend: t, onHistoryClick: i, messages: n = [], loading: a = !1, st
|
|
|
98
106
|
boxSizing: "border-box"
|
|
99
107
|
},
|
|
100
108
|
children: [
|
|
101
|
-
/* @__PURE__ */
|
|
109
|
+
/* @__PURE__ */ d(
|
|
102
110
|
"div",
|
|
103
111
|
{
|
|
104
112
|
style: {
|
|
@@ -108,7 +116,7 @@ function P({ onSend: t, onHistoryClick: i, messages: n = [], loading: a = !1, st
|
|
|
108
116
|
alignSelf: "stretch"
|
|
109
117
|
},
|
|
110
118
|
children: [
|
|
111
|
-
/* @__PURE__ */
|
|
119
|
+
/* @__PURE__ */ d("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
|
|
112
120
|
/* @__PURE__ */ e(
|
|
113
121
|
"div",
|
|
114
122
|
{
|
|
@@ -122,7 +130,7 @@ function P({ onSend: t, onHistoryClick: i, messages: n = [], loading: a = !1, st
|
|
|
122
130
|
borderRadius: 9999,
|
|
123
131
|
background: "#F3F7F7"
|
|
124
132
|
},
|
|
125
|
-
children: /* @__PURE__ */ e(
|
|
133
|
+
children: /* @__PURE__ */ e(N, { size: 20, style: { color: "var(--Grey-Strong, #2E3236)" } })
|
|
126
134
|
}
|
|
127
135
|
),
|
|
128
136
|
/* @__PURE__ */ e(
|
|
@@ -138,10 +146,10 @@ function P({ onSend: t, onHistoryClick: i, messages: n = [], loading: a = !1, st
|
|
|
138
146
|
}
|
|
139
147
|
)
|
|
140
148
|
] }),
|
|
141
|
-
/* @__PURE__ */ e("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: /* @__PURE__ */
|
|
149
|
+
/* @__PURE__ */ e("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: /* @__PURE__ */ d(
|
|
142
150
|
"button",
|
|
143
151
|
{
|
|
144
|
-
onClick:
|
|
152
|
+
onClick: n,
|
|
145
153
|
style: {
|
|
146
154
|
display: "flex",
|
|
147
155
|
height: 28,
|
|
@@ -157,7 +165,7 @@ function P({ onSend: t, onHistoryClick: i, messages: n = [], loading: a = !1, st
|
|
|
157
165
|
boxSizing: "border-box"
|
|
158
166
|
},
|
|
159
167
|
children: [
|
|
160
|
-
/* @__PURE__ */ e(
|
|
168
|
+
/* @__PURE__ */ e(K, { size: 16 }),
|
|
161
169
|
/* @__PURE__ */ e("span", { style: { fontSize: 12, fontWeight: 500, lineHeight: "120%" }, children: "History" })
|
|
162
170
|
]
|
|
163
171
|
}
|
|
@@ -165,88 +173,62 @@ function P({ onSend: t, onHistoryClick: i, messages: n = [], loading: a = !1, st
|
|
|
165
173
|
]
|
|
166
174
|
}
|
|
167
175
|
),
|
|
168
|
-
/* @__PURE__ */
|
|
176
|
+
/* @__PURE__ */ d(
|
|
169
177
|
"div",
|
|
170
178
|
{
|
|
171
|
-
ref:
|
|
179
|
+
ref: l,
|
|
172
180
|
style: {
|
|
173
181
|
flex: 1,
|
|
174
182
|
display: "flex",
|
|
175
183
|
flexDirection: "column",
|
|
176
|
-
justifyContent:
|
|
177
|
-
alignItems:
|
|
184
|
+
justifyContent: m ? "flex-start" : "center",
|
|
185
|
+
alignItems: m ? "stretch" : "center",
|
|
178
186
|
gap: 12,
|
|
179
187
|
overflow: "auto",
|
|
180
188
|
marginTop: 16,
|
|
181
189
|
marginBottom: 16
|
|
182
190
|
},
|
|
183
191
|
children: [
|
|
184
|
-
|
|
185
|
-
var
|
|
186
|
-
|
|
192
|
+
m ? f.map((t, s) => {
|
|
193
|
+
var S;
|
|
194
|
+
const F = t.id ?? s;
|
|
195
|
+
return t.chartType && t.series ? /* @__PURE__ */ e("div", { style: b, children: /* @__PURE__ */ e("div", { style: k(t.chartType), children: /* @__PURE__ */ e(
|
|
196
|
+
W,
|
|
197
|
+
{
|
|
198
|
+
chartType: t.chartType,
|
|
199
|
+
title: t.title,
|
|
200
|
+
xLabel: t.xLabel,
|
|
201
|
+
yLabel: t.yLabel,
|
|
202
|
+
series: t.series,
|
|
203
|
+
compact: !0
|
|
204
|
+
}
|
|
205
|
+
) }) }, F) : /* @__PURE__ */ d(Z.Fragment, { children: [
|
|
187
206
|
/* @__PURE__ */ e(
|
|
188
|
-
|
|
207
|
+
_,
|
|
189
208
|
{
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
style: {
|
|
198
|
-
maxWidth: "85%",
|
|
199
|
-
padding: "10px 14px",
|
|
200
|
-
borderRadius: r.role === "user" ? "14px 14px 4px 14px" : "14px 14px 14px 4px",
|
|
201
|
-
background: r.role === "user" ? "var(--Rail-Surface-2, #E3E1D7)" : "#F3F7F7",
|
|
202
|
-
fontSize: 14,
|
|
203
|
-
fontWeight: 400,
|
|
204
|
-
color: "var(--Grey-Strong, #2E3236)",
|
|
205
|
-
lineHeight: "140%",
|
|
206
|
-
whiteSpace: "pre-wrap",
|
|
207
|
-
wordBreak: "break-word"
|
|
208
|
-
},
|
|
209
|
-
children: r.content
|
|
210
|
-
}
|
|
211
|
-
)
|
|
209
|
+
role: t.role,
|
|
210
|
+
content: t.content,
|
|
211
|
+
html: t.html,
|
|
212
|
+
timestamp: t.timestamp,
|
|
213
|
+
toolBadges: t.toolBadges,
|
|
214
|
+
isStreaming: t.isStreaming,
|
|
215
|
+
onCodeBlockClick: g
|
|
212
216
|
}
|
|
213
217
|
),
|
|
214
|
-
(
|
|
215
|
-
|
|
218
|
+
(S = t.charts) == null ? void 0 : S.map((v, M) => /* @__PURE__ */ e("div", { style: b, children: /* @__PURE__ */ e("div", { style: k(v.chartType), children: /* @__PURE__ */ e(
|
|
219
|
+
W,
|
|
216
220
|
{
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
transform: "scale(0.85)",
|
|
229
|
-
transformOrigin: "top left",
|
|
230
|
-
marginBottom: -40
|
|
231
|
-
},
|
|
232
|
-
children: /* @__PURE__ */ e(
|
|
233
|
-
$,
|
|
234
|
-
{
|
|
235
|
-
chartType: m.chartType,
|
|
236
|
-
title: m.title,
|
|
237
|
-
xLabel: m.xLabel,
|
|
238
|
-
yLabel: m.yLabel,
|
|
239
|
-
series: m.series
|
|
240
|
-
}
|
|
241
|
-
)
|
|
242
|
-
}
|
|
243
|
-
)
|
|
244
|
-
},
|
|
245
|
-
`chart-${w}`
|
|
246
|
-
))
|
|
247
|
-
] }, y);
|
|
248
|
-
}) : /* @__PURE__ */ s(E, { children: [
|
|
249
|
-
/* @__PURE__ */ e(J, { size: 48 }),
|
|
221
|
+
chartType: v.chartType,
|
|
222
|
+
title: v.title,
|
|
223
|
+
xLabel: v.xLabel,
|
|
224
|
+
yLabel: v.yLabel,
|
|
225
|
+
series: v.series,
|
|
226
|
+
compact: !0
|
|
227
|
+
}
|
|
228
|
+
) }) }, `chart-${M}`))
|
|
229
|
+
] }, F);
|
|
230
|
+
}) : /* @__PURE__ */ d(R, { children: [
|
|
231
|
+
/* @__PURE__ */ e(P, { size: 48 }),
|
|
250
232
|
/* @__PURE__ */ e(
|
|
251
233
|
"span",
|
|
252
234
|
{
|
|
@@ -262,7 +244,7 @@ function P({ onSend: t, onHistoryClick: i, messages: n = [], loading: a = !1, st
|
|
|
262
244
|
}
|
|
263
245
|
)
|
|
264
246
|
] }),
|
|
265
|
-
|
|
247
|
+
C && /* @__PURE__ */ e("div", { style: { display: "flex", justifyContent: "flex-start" }, children: /* @__PURE__ */ e(
|
|
266
248
|
"div",
|
|
267
249
|
{
|
|
268
250
|
style: {
|
|
@@ -272,13 +254,13 @@ function P({ onSend: t, onHistoryClick: i, messages: n = [], loading: a = !1, st
|
|
|
272
254
|
fontSize: 14,
|
|
273
255
|
color: "var(--Grey-Muted, #808183)"
|
|
274
256
|
},
|
|
275
|
-
children:
|
|
257
|
+
children: h || "Thinking..."
|
|
276
258
|
}
|
|
277
259
|
) })
|
|
278
260
|
]
|
|
279
261
|
}
|
|
280
262
|
),
|
|
281
|
-
/* @__PURE__ */
|
|
263
|
+
/* @__PURE__ */ d(
|
|
282
264
|
"div",
|
|
283
265
|
{
|
|
284
266
|
style: {
|
|
@@ -296,12 +278,12 @@ function P({ onSend: t, onHistoryClick: i, messages: n = [], loading: a = !1, st
|
|
|
296
278
|
/* @__PURE__ */ e(
|
|
297
279
|
"textarea",
|
|
298
280
|
{
|
|
299
|
-
ref:
|
|
300
|
-
value:
|
|
301
|
-
onChange: (
|
|
302
|
-
onKeyDown:
|
|
281
|
+
ref: y,
|
|
282
|
+
value: i,
|
|
283
|
+
onChange: (t) => o(t.target.value),
|
|
284
|
+
onKeyDown: x,
|
|
303
285
|
placeholder: "Ask a Question",
|
|
304
|
-
disabled:
|
|
286
|
+
disabled: C,
|
|
305
287
|
rows: 1,
|
|
306
288
|
style: {
|
|
307
289
|
flex: 1,
|
|
@@ -311,7 +293,7 @@ function P({ onSend: t, onHistoryClick: i, messages: n = [], loading: a = !1, st
|
|
|
311
293
|
fontSize: 15,
|
|
312
294
|
fontWeight: 400,
|
|
313
295
|
color: "var(--Base-Strong, #2E3236)",
|
|
314
|
-
lineHeight: "1
|
|
296
|
+
lineHeight: "1",
|
|
315
297
|
resize: "none",
|
|
316
298
|
fontFamily: "inherit",
|
|
317
299
|
padding: 0,
|
|
@@ -324,8 +306,8 @@ function P({ onSend: t, onHistoryClick: i, messages: n = [], loading: a = !1, st
|
|
|
324
306
|
/* @__PURE__ */ e(
|
|
325
307
|
"button",
|
|
326
308
|
{
|
|
327
|
-
onClick:
|
|
328
|
-
disabled: !
|
|
309
|
+
onClick: u,
|
|
310
|
+
disabled: !i.trim() || C,
|
|
329
311
|
style: {
|
|
330
312
|
display: "flex",
|
|
331
313
|
height: 28,
|
|
@@ -339,8 +321,8 @@ function P({ onSend: t, onHistoryClick: i, messages: n = [], loading: a = !1, st
|
|
|
339
321
|
color: "#fff",
|
|
340
322
|
fontSize: 12,
|
|
341
323
|
fontWeight: 500,
|
|
342
|
-
cursor:
|
|
343
|
-
opacity:
|
|
324
|
+
cursor: i.trim() && !C ? "pointer" : "default",
|
|
325
|
+
opacity: i.trim() && !C ? 1 : 0.4,
|
|
344
326
|
flexShrink: 0,
|
|
345
327
|
boxSizing: "border-box"
|
|
346
328
|
},
|
|
@@ -354,64 +336,63 @@ function P({ onSend: t, onHistoryClick: i, messages: n = [], loading: a = !1, st
|
|
|
354
336
|
}
|
|
355
337
|
);
|
|
356
338
|
}
|
|
357
|
-
function
|
|
358
|
-
onSend:
|
|
359
|
-
onHistoryClick:
|
|
339
|
+
function c1({
|
|
340
|
+
onSend: r,
|
|
341
|
+
onHistoryClick: c,
|
|
360
342
|
messages: n = [],
|
|
361
|
-
loading:
|
|
362
|
-
statusLabel:
|
|
363
|
-
|
|
343
|
+
loading: f = !1,
|
|
344
|
+
statusLabel: C,
|
|
345
|
+
onCodeBlockClick: h,
|
|
346
|
+
className: g = ""
|
|
364
347
|
}) {
|
|
365
|
-
const [
|
|
366
|
-
return
|
|
367
|
-
if (!o)
|
|
368
|
-
return;
|
|
369
|
-
const c = (r) => {
|
|
370
|
-
g.current && !g.current.contains(r.target) && C(!1);
|
|
371
|
-
};
|
|
372
|
-
return document.addEventListener("mousedown", c), () => document.removeEventListener("mousedown", c);
|
|
373
|
-
}, [o]), /* @__PURE__ */ s(
|
|
348
|
+
const [i, o] = w(!1), [l, y] = w(!1);
|
|
349
|
+
return /* @__PURE__ */ d(
|
|
374
350
|
"div",
|
|
375
351
|
{
|
|
376
|
-
|
|
377
|
-
className: l,
|
|
352
|
+
className: g,
|
|
378
353
|
style: {
|
|
379
354
|
position: "fixed",
|
|
380
|
-
bottom:
|
|
381
|
-
right:
|
|
355
|
+
bottom: "max(12px, env(safe-area-inset-bottom))",
|
|
356
|
+
right: "max(12px, env(safe-area-inset-right))",
|
|
382
357
|
zIndex: 1e3,
|
|
383
358
|
display: "flex",
|
|
384
359
|
flexDirection: "column",
|
|
385
360
|
alignItems: "flex-end",
|
|
386
|
-
gap: 12
|
|
361
|
+
gap: 12,
|
|
362
|
+
// Wrapper itself is transparent to clicks; only the FAB (and the panel when open)
|
|
363
|
+
// capture pointer events. This keeps page content underneath clickable when the
|
|
364
|
+
// panel is closed but still mounted.
|
|
365
|
+
pointerEvents: "none"
|
|
387
366
|
},
|
|
388
367
|
children: [
|
|
389
|
-
/* @__PURE__ */ e(
|
|
390
|
-
|
|
368
|
+
/* @__PURE__ */ e(
|
|
369
|
+
e1,
|
|
391
370
|
{
|
|
392
|
-
|
|
393
|
-
|
|
371
|
+
isOpen: l,
|
|
372
|
+
onSend: r,
|
|
373
|
+
onHistoryClick: c,
|
|
394
374
|
messages: n,
|
|
395
|
-
loading:
|
|
396
|
-
statusLabel:
|
|
375
|
+
loading: f,
|
|
376
|
+
statusLabel: C,
|
|
377
|
+
onCodeBlockClick: h
|
|
397
378
|
}
|
|
398
|
-
)
|
|
379
|
+
),
|
|
399
380
|
/* @__PURE__ */ e(
|
|
400
381
|
"div",
|
|
401
382
|
{
|
|
402
|
-
style: { width: 48, height: 48 },
|
|
403
|
-
onMouseEnter: () =>
|
|
404
|
-
onMouseLeave: () =>
|
|
405
|
-
children: /* @__PURE__ */
|
|
406
|
-
|
|
383
|
+
style: { width: 48, height: 48, pointerEvents: "auto" },
|
|
384
|
+
onMouseEnter: () => o(!0),
|
|
385
|
+
onMouseLeave: () => o(!1),
|
|
386
|
+
children: /* @__PURE__ */ d(
|
|
387
|
+
L.button,
|
|
407
388
|
{
|
|
408
|
-
onClick: () =>
|
|
389
|
+
onClick: () => y((u) => !u),
|
|
409
390
|
initial: !1,
|
|
410
391
|
animate: {
|
|
411
|
-
width:
|
|
412
|
-
height:
|
|
413
|
-
borderRadius:
|
|
414
|
-
background:
|
|
392
|
+
width: i || l ? 166 : 48,
|
|
393
|
+
height: i || l ? 56 : 48,
|
|
394
|
+
borderRadius: i || l ? 30 : 12,
|
|
395
|
+
background: i || l ? "var(--Rail-Surface-2, #E3E1D7)" : "rgba(0,0,0,0)"
|
|
415
396
|
},
|
|
416
397
|
transition: { duration: 0.8, ease: [0.16, 1, 0.3, 1] },
|
|
417
398
|
style: {
|
|
@@ -421,8 +402,8 @@ function d1({
|
|
|
421
402
|
display: "flex",
|
|
422
403
|
justifyContent: "center",
|
|
423
404
|
alignItems: "center",
|
|
424
|
-
gap:
|
|
425
|
-
padding:
|
|
405
|
+
gap: i || l ? 10 : 0,
|
|
406
|
+
padding: i || l ? "0 0 0 16px" : 0,
|
|
426
407
|
border: "none",
|
|
427
408
|
outline: "none",
|
|
428
409
|
cursor: "pointer",
|
|
@@ -431,8 +412,8 @@ function d1({
|
|
|
431
412
|
boxSizing: "border-box"
|
|
432
413
|
},
|
|
433
414
|
children: [
|
|
434
|
-
/* @__PURE__ */ e(
|
|
435
|
-
|
|
415
|
+
/* @__PURE__ */ e(O, { children: (i || l) && /* @__PURE__ */ e(
|
|
416
|
+
L.span,
|
|
436
417
|
{
|
|
437
418
|
initial: { opacity: 0, width: 0 },
|
|
438
419
|
animate: { opacity: 1, width: "auto" },
|
|
@@ -449,7 +430,7 @@ function d1({
|
|
|
449
430
|
children: "Ask Compass"
|
|
450
431
|
}
|
|
451
432
|
) }),
|
|
452
|
-
/* @__PURE__ */ e(
|
|
433
|
+
/* @__PURE__ */ e(J, { size: 48, isHovered: i || l })
|
|
453
434
|
]
|
|
454
435
|
}
|
|
455
436
|
)
|
|
@@ -459,70 +440,70 @@ function d1({
|
|
|
459
440
|
}
|
|
460
441
|
);
|
|
461
442
|
}
|
|
462
|
-
const
|
|
463
|
-
options:
|
|
464
|
-
value:
|
|
443
|
+
const C1 = ({
|
|
444
|
+
options: r = [],
|
|
445
|
+
value: c = null,
|
|
465
446
|
onChange: n,
|
|
466
|
-
placeholder:
|
|
467
|
-
disabled:
|
|
468
|
-
showSuggestions:
|
|
469
|
-
styling:
|
|
470
|
-
isAddNew:
|
|
447
|
+
placeholder: f = "Search...",
|
|
448
|
+
disabled: C = !1,
|
|
449
|
+
showSuggestions: h = !0,
|
|
450
|
+
styling: g,
|
|
451
|
+
isAddNew: i = !1
|
|
471
452
|
}) => {
|
|
472
|
-
const [o,
|
|
473
|
-
if (!
|
|
453
|
+
const [o, l] = w(""), [y, u] = w(!1), [x, m] = w(null), b = I(null), k = z(() => {
|
|
454
|
+
if (!h)
|
|
474
455
|
return [];
|
|
475
|
-
const
|
|
476
|
-
return
|
|
477
|
-
if (!
|
|
456
|
+
const a = o.toLowerCase();
|
|
457
|
+
return r.filter((p) => {
|
|
458
|
+
if (!p)
|
|
478
459
|
return !1;
|
|
479
|
-
const
|
|
480
|
-
return (
|
|
460
|
+
const D = p.label || "", H = p.value || "";
|
|
461
|
+
return (D.toLowerCase().includes(a) || H.toLowerCase().includes(a)) && (!x || p.value !== x.value);
|
|
481
462
|
});
|
|
482
|
-
}, [o,
|
|
483
|
-
if (!
|
|
463
|
+
}, [o, r, h, x]), t = z(() => {
|
|
464
|
+
if (!i)
|
|
484
465
|
return !1;
|
|
485
|
-
const
|
|
486
|
-
return
|
|
487
|
-
if (!
|
|
466
|
+
const a = o.toLowerCase();
|
|
467
|
+
return r.some((p) => {
|
|
468
|
+
if (!p)
|
|
488
469
|
return !1;
|
|
489
|
-
const
|
|
490
|
-
return
|
|
470
|
+
const D = p.label || "", H = p.value || "";
|
|
471
|
+
return D.toLowerCase() === a || H.toLowerCase() === a;
|
|
491
472
|
});
|
|
492
|
-
}, [
|
|
493
|
-
|
|
494
|
-
if (!
|
|
473
|
+
}, [r, o, i]);
|
|
474
|
+
E(() => {
|
|
475
|
+
if (!y)
|
|
495
476
|
return;
|
|
496
|
-
const
|
|
497
|
-
b.current && !b.current.contains(
|
|
477
|
+
const a = (p) => {
|
|
478
|
+
b.current && !b.current.contains(p.target) && u(!1);
|
|
498
479
|
};
|
|
499
|
-
return document.addEventListener("mousedown",
|
|
500
|
-
}, [
|
|
501
|
-
const
|
|
502
|
-
n == null || n(
|
|
503
|
-
},
|
|
504
|
-
const
|
|
505
|
-
|
|
480
|
+
return document.addEventListener("mousedown", a), () => document.removeEventListener("mousedown", a);
|
|
481
|
+
}, [y]);
|
|
482
|
+
const s = (a) => {
|
|
483
|
+
n == null || n(a), l(""), u(!1), m(null);
|
|
484
|
+
}, F = () => {
|
|
485
|
+
const a = { label: o, value: o };
|
|
486
|
+
m(a), n == null || n(a), u(!1), l("");
|
|
506
487
|
}, S = () => {
|
|
507
|
-
n == null || n(null),
|
|
508
|
-
},
|
|
509
|
-
const
|
|
510
|
-
|
|
511
|
-
},
|
|
512
|
-
(
|
|
513
|
-
},
|
|
514
|
-
return /* @__PURE__ */
|
|
515
|
-
/* @__PURE__ */
|
|
488
|
+
n == null || n(null), l(""), u(!1), m(null);
|
|
489
|
+
}, v = (a) => {
|
|
490
|
+
const p = a.target.value;
|
|
491
|
+
h ? (l(p), u(!0)) : i ? (l(p), u(p.length >= 3)) : n == null || n(p);
|
|
492
|
+
}, M = () => {
|
|
493
|
+
(h || i) && u(!0);
|
|
494
|
+
}, A = y && !c && o.length >= 3;
|
|
495
|
+
return /* @__PURE__ */ d("div", { className: "relative w-full", ref: b, children: [
|
|
496
|
+
/* @__PURE__ */ d(
|
|
516
497
|
"div",
|
|
517
498
|
{
|
|
518
|
-
className:
|
|
499
|
+
className: g || "flex items-center gap-2 border rounded-md px-3 py-2 bg-white shadow-sm",
|
|
519
500
|
children: [
|
|
520
|
-
/* @__PURE__ */ e(
|
|
521
|
-
/* @__PURE__ */ e("div", { className: "flex-1", children:
|
|
501
|
+
/* @__PURE__ */ e(V, { className: "w-4 h-4 text-gray-400" }),
|
|
502
|
+
/* @__PURE__ */ e("div", { className: "flex-1", children: h && c ? /* @__PURE__ */ e(
|
|
522
503
|
"div",
|
|
523
504
|
{
|
|
524
505
|
className: "text-gray-800 truncate",
|
|
525
|
-
title:
|
|
506
|
+
title: c.label,
|
|
526
507
|
style: {
|
|
527
508
|
fontSize: "var(--text-sm)",
|
|
528
509
|
fontWeight: "var(--font-medium)",
|
|
@@ -532,26 +513,26 @@ const c1 = ({
|
|
|
532
513
|
textDecoration: "none",
|
|
533
514
|
fontFamily: "var(--font-sans)"
|
|
534
515
|
},
|
|
535
|
-
children:
|
|
516
|
+
children: c.label
|
|
536
517
|
}
|
|
537
518
|
) : /* @__PURE__ */ e(
|
|
538
|
-
|
|
519
|
+
q,
|
|
539
520
|
{
|
|
540
|
-
value:
|
|
541
|
-
onChange: (
|
|
542
|
-
placeholder:
|
|
543
|
-
disabled:
|
|
521
|
+
value: h || i ? o : c || "",
|
|
522
|
+
onChange: (a) => v({ target: { value: a } }),
|
|
523
|
+
placeholder: f,
|
|
524
|
+
disabled: C,
|
|
544
525
|
style: {
|
|
545
526
|
border: "none",
|
|
546
527
|
boxShadow: "none",
|
|
547
528
|
padding: 0,
|
|
548
529
|
backgroundColor: "transparent"
|
|
549
530
|
},
|
|
550
|
-
onFocus:
|
|
531
|
+
onFocus: M
|
|
551
532
|
}
|
|
552
533
|
) }),
|
|
553
|
-
(
|
|
554
|
-
|
|
534
|
+
(c || x) && /* @__PURE__ */ e(
|
|
535
|
+
G,
|
|
555
536
|
{
|
|
556
537
|
type: "button",
|
|
557
538
|
variant: "ghost",
|
|
@@ -565,13 +546,13 @@ const c1 = ({
|
|
|
565
546
|
backgroundColor: "transparent",
|
|
566
547
|
color: "rgba(107,114,128,1)"
|
|
567
548
|
},
|
|
568
|
-
children: /* @__PURE__ */ e(
|
|
549
|
+
children: /* @__PURE__ */ e(T, { className: "w-3 h-3" })
|
|
569
550
|
}
|
|
570
551
|
)
|
|
571
552
|
]
|
|
572
553
|
}
|
|
573
554
|
),
|
|
574
|
-
|
|
555
|
+
A && /* @__PURE__ */ d(
|
|
575
556
|
"div",
|
|
576
557
|
{
|
|
577
558
|
className: "absolute w-full rounded-md border border-gray-300 bg-white shadow-lg custom-thin-scrollbar-library",
|
|
@@ -581,18 +562,18 @@ const c1 = ({
|
|
|
581
562
|
zIndex: 30
|
|
582
563
|
},
|
|
583
564
|
children: [
|
|
584
|
-
|
|
565
|
+
k.length > 0 && /* @__PURE__ */ e("ul", { className: "m-0 p-0 list-none", children: k.map((a) => /* @__PURE__ */ e(
|
|
585
566
|
"li",
|
|
586
567
|
{
|
|
587
|
-
onClick: () =>
|
|
588
|
-
onMouseEnter: (
|
|
589
|
-
|
|
568
|
+
onClick: () => s(a),
|
|
569
|
+
onMouseEnter: (p) => {
|
|
570
|
+
p.currentTarget.style.backgroundColor = "var(--hover-warm)";
|
|
590
571
|
},
|
|
591
|
-
onMouseLeave: (
|
|
592
|
-
|
|
572
|
+
onMouseLeave: (p) => {
|
|
573
|
+
p.currentTarget.style.backgroundColor = "transparent";
|
|
593
574
|
},
|
|
594
575
|
className: "cursor-pointer px-4 py-2",
|
|
595
|
-
title:
|
|
576
|
+
title: a.label,
|
|
596
577
|
children: /* @__PURE__ */ e(
|
|
597
578
|
"span",
|
|
598
579
|
{
|
|
@@ -607,18 +588,18 @@ const c1 = ({
|
|
|
607
588
|
textTransform: "none",
|
|
608
589
|
textDecoration: "none"
|
|
609
590
|
},
|
|
610
|
-
children:
|
|
591
|
+
children: a.label
|
|
611
592
|
}
|
|
612
593
|
)
|
|
613
594
|
},
|
|
614
|
-
|
|
595
|
+
a.value
|
|
615
596
|
)) }),
|
|
616
|
-
|
|
617
|
-
|
|
597
|
+
i && !t && !x && o.length >= 3 && /* @__PURE__ */ d(
|
|
598
|
+
G,
|
|
618
599
|
{
|
|
619
600
|
type: "button",
|
|
620
601
|
variant: "secondary",
|
|
621
|
-
onClick:
|
|
602
|
+
onClick: F,
|
|
622
603
|
style: {
|
|
623
604
|
width: "100%",
|
|
624
605
|
justifyContent: "space-between",
|
|
@@ -640,359 +621,12 @@ const c1 = ({
|
|
|
640
621
|
)
|
|
641
622
|
] });
|
|
642
623
|
};
|
|
643
|
-
function
|
|
644
|
-
|
|
645
|
-
onClose: i,
|
|
646
|
-
title: n,
|
|
647
|
-
subtitle: a,
|
|
648
|
-
children: u,
|
|
649
|
-
footer: l,
|
|
650
|
-
width: d = 515,
|
|
651
|
-
height: h = 762,
|
|
652
|
-
toggleLabel: o,
|
|
653
|
-
toggleChecked: C,
|
|
654
|
-
onToggle: g
|
|
655
|
-
}) {
|
|
656
|
-
const c = F(null);
|
|
657
|
-
return k(() => {
|
|
658
|
-
if (!t)
|
|
659
|
-
return;
|
|
660
|
-
const r = (y) => {
|
|
661
|
-
y.key === "Escape" && (i == null || i());
|
|
662
|
-
};
|
|
663
|
-
return document.addEventListener("keydown", r), () => document.removeEventListener("keydown", r);
|
|
664
|
-
}, [t, i]), t ? /* @__PURE__ */ s(E, { children: [
|
|
665
|
-
/* @__PURE__ */ e(
|
|
666
|
-
"div",
|
|
667
|
-
{
|
|
668
|
-
onClick: i,
|
|
669
|
-
style: {
|
|
670
|
-
position: "fixed",
|
|
671
|
-
inset: 0,
|
|
672
|
-
zIndex: 1200,
|
|
673
|
-
background: "rgba(0, 0, 0, 0.20)"
|
|
674
|
-
}
|
|
675
|
-
}
|
|
676
|
-
),
|
|
677
|
-
/* @__PURE__ */ s(
|
|
678
|
-
"div",
|
|
679
|
-
{
|
|
680
|
-
ref: c,
|
|
681
|
-
style: {
|
|
682
|
-
position: "fixed",
|
|
683
|
-
top: "50%",
|
|
684
|
-
right: 0,
|
|
685
|
-
transform: "translateY(-50%)",
|
|
686
|
-
zIndex: 1201,
|
|
687
|
-
display: "flex",
|
|
688
|
-
width: d,
|
|
689
|
-
height: h,
|
|
690
|
-
maxHeight: "100vh",
|
|
691
|
-
padding: "20px",
|
|
692
|
-
flexDirection: "column",
|
|
693
|
-
alignItems: "flex-start",
|
|
694
|
-
gap: "20px",
|
|
695
|
-
borderRadius: "12px 0 0 12px",
|
|
696
|
-
background: "#FFF",
|
|
697
|
-
boxShadow: "648px 0 100px 0 rgba(0, 0, 0, 0.20)"
|
|
698
|
-
},
|
|
699
|
-
children: [
|
|
700
|
-
/* @__PURE__ */ s(
|
|
701
|
-
"div",
|
|
702
|
-
{
|
|
703
|
-
style: {
|
|
704
|
-
display: "flex",
|
|
705
|
-
alignItems: "center",
|
|
706
|
-
justifyContent: "space-between",
|
|
707
|
-
width: "100%",
|
|
708
|
-
flexShrink: 0
|
|
709
|
-
},
|
|
710
|
-
children: [
|
|
711
|
-
/* @__PURE__ */ e(
|
|
712
|
-
"h2",
|
|
713
|
-
{
|
|
714
|
-
style: {
|
|
715
|
-
fontSize: "24px",
|
|
716
|
-
fontWeight: 600,
|
|
717
|
-
fontStyle: "normal",
|
|
718
|
-
color: "var(--Grey-3, #252525)",
|
|
719
|
-
margin: 0,
|
|
720
|
-
lineHeight: "normal"
|
|
721
|
-
},
|
|
722
|
-
children: n
|
|
723
|
-
}
|
|
724
|
-
),
|
|
725
|
-
/* @__PURE__ */ e(
|
|
726
|
-
"button",
|
|
727
|
-
{
|
|
728
|
-
onClick: i,
|
|
729
|
-
style: {
|
|
730
|
-
display: "flex",
|
|
731
|
-
alignItems: "center",
|
|
732
|
-
justifyContent: "center",
|
|
733
|
-
width: "28px",
|
|
734
|
-
height: "28px",
|
|
735
|
-
border: "none",
|
|
736
|
-
background: "transparent",
|
|
737
|
-
color: "var(--Grey-Strong, #808183)",
|
|
738
|
-
cursor: "pointer",
|
|
739
|
-
borderRadius: "4px",
|
|
740
|
-
transition: "background 0.15s ease"
|
|
741
|
-
},
|
|
742
|
-
onMouseEnter: (r) => {
|
|
743
|
-
r.currentTarget.style.background = "#ECEEF2";
|
|
744
|
-
},
|
|
745
|
-
onMouseLeave: (r) => {
|
|
746
|
-
r.currentTarget.style.background = "transparent";
|
|
747
|
-
},
|
|
748
|
-
children: /* @__PURE__ */ e(I, { size: 20, strokeWidth: 2 })
|
|
749
|
-
}
|
|
750
|
-
)
|
|
751
|
-
]
|
|
752
|
-
}
|
|
753
|
-
),
|
|
754
|
-
/* @__PURE__ */ e(
|
|
755
|
-
"div",
|
|
756
|
-
{
|
|
757
|
-
style: {
|
|
758
|
-
width: "100%",
|
|
759
|
-
height: "1px",
|
|
760
|
-
background: "#ECEEF2",
|
|
761
|
-
flexShrink: 0
|
|
762
|
-
}
|
|
763
|
-
}
|
|
764
|
-
),
|
|
765
|
-
(a || o) && /* @__PURE__ */ s(
|
|
766
|
-
"div",
|
|
767
|
-
{
|
|
768
|
-
style: {
|
|
769
|
-
display: "flex",
|
|
770
|
-
alignItems: "center",
|
|
771
|
-
justifyContent: "space-between",
|
|
772
|
-
width: "100%",
|
|
773
|
-
gap: "12px",
|
|
774
|
-
flexShrink: 0
|
|
775
|
-
},
|
|
776
|
-
children: [
|
|
777
|
-
a && /* @__PURE__ */ e(
|
|
778
|
-
"p",
|
|
779
|
-
{
|
|
780
|
-
style: {
|
|
781
|
-
fontSize: "13px",
|
|
782
|
-
fontStyle: "normal",
|
|
783
|
-
fontWeight: 400,
|
|
784
|
-
lineHeight: "140%",
|
|
785
|
-
color: "#0B0B0B",
|
|
786
|
-
margin: 0,
|
|
787
|
-
flex: 1
|
|
788
|
-
},
|
|
789
|
-
children: a
|
|
790
|
-
}
|
|
791
|
-
),
|
|
792
|
-
o && /* @__PURE__ */ s(
|
|
793
|
-
"div",
|
|
794
|
-
{
|
|
795
|
-
style: {
|
|
796
|
-
display: "flex",
|
|
797
|
-
alignItems: "center",
|
|
798
|
-
gap: "8px",
|
|
799
|
-
flexShrink: 0
|
|
800
|
-
},
|
|
801
|
-
children: [
|
|
802
|
-
/* @__PURE__ */ e(
|
|
803
|
-
"button",
|
|
804
|
-
{
|
|
805
|
-
onClick: () => g == null ? void 0 : g(!C),
|
|
806
|
-
style: {
|
|
807
|
-
position: "relative",
|
|
808
|
-
width: "40px",
|
|
809
|
-
height: "22px",
|
|
810
|
-
borderRadius: "11px",
|
|
811
|
-
border: "none",
|
|
812
|
-
background: C ? "var(--Base-Strong, #0B0B0B)" : "var(--Base-Faint, #D9D9D9)",
|
|
813
|
-
cursor: "pointer",
|
|
814
|
-
transition: "background 0.2s ease",
|
|
815
|
-
padding: 0,
|
|
816
|
-
flexShrink: 0
|
|
817
|
-
},
|
|
818
|
-
children: /* @__PURE__ */ e(
|
|
819
|
-
"div",
|
|
820
|
-
{
|
|
821
|
-
style: {
|
|
822
|
-
position: "absolute",
|
|
823
|
-
top: "2px",
|
|
824
|
-
left: C ? "20px" : "2px",
|
|
825
|
-
width: "18px",
|
|
826
|
-
height: "18px",
|
|
827
|
-
borderRadius: "50%",
|
|
828
|
-
background: "#FFF",
|
|
829
|
-
transition: "left 0.2s ease",
|
|
830
|
-
boxShadow: "0 1px 3px rgba(0,0,0,0.15)"
|
|
831
|
-
}
|
|
832
|
-
}
|
|
833
|
-
)
|
|
834
|
-
}
|
|
835
|
-
),
|
|
836
|
-
/* @__PURE__ */ e(
|
|
837
|
-
"span",
|
|
838
|
-
{
|
|
839
|
-
style: {
|
|
840
|
-
fontSize: "13px",
|
|
841
|
-
fontWeight: 500,
|
|
842
|
-
color: "var(--Base-Strong, #1E1E1E)",
|
|
843
|
-
lineHeight: 1.4
|
|
844
|
-
},
|
|
845
|
-
children: o
|
|
846
|
-
}
|
|
847
|
-
)
|
|
848
|
-
]
|
|
849
|
-
}
|
|
850
|
-
)
|
|
851
|
-
]
|
|
852
|
-
}
|
|
853
|
-
),
|
|
854
|
-
/* @__PURE__ */ e(
|
|
855
|
-
"div",
|
|
856
|
-
{
|
|
857
|
-
style: {
|
|
858
|
-
flex: 1,
|
|
859
|
-
width: "100%",
|
|
860
|
-
overflowY: "auto",
|
|
861
|
-
display: "flex",
|
|
862
|
-
flexDirection: "column",
|
|
863
|
-
gap: "16px",
|
|
864
|
-
minHeight: 0
|
|
865
|
-
},
|
|
866
|
-
children: u
|
|
867
|
-
}
|
|
868
|
-
),
|
|
869
|
-
l && /* @__PURE__ */ s(E, { children: [
|
|
870
|
-
/* @__PURE__ */ e(
|
|
871
|
-
"div",
|
|
872
|
-
{
|
|
873
|
-
style: {
|
|
874
|
-
width: "100%",
|
|
875
|
-
height: "1px",
|
|
876
|
-
background: "#ECEEF2",
|
|
877
|
-
flexShrink: 0
|
|
878
|
-
}
|
|
879
|
-
}
|
|
880
|
-
),
|
|
881
|
-
/* @__PURE__ */ e(
|
|
882
|
-
"div",
|
|
883
|
-
{
|
|
884
|
-
style: {
|
|
885
|
-
display: "flex",
|
|
886
|
-
alignItems: "center",
|
|
887
|
-
justifyContent: "flex-end",
|
|
888
|
-
gap: "12px",
|
|
889
|
-
width: "100%",
|
|
890
|
-
flexShrink: 0
|
|
891
|
-
},
|
|
892
|
-
children: l
|
|
893
|
-
}
|
|
894
|
-
)
|
|
895
|
-
] })
|
|
896
|
-
]
|
|
897
|
-
}
|
|
898
|
-
)
|
|
899
|
-
] }) : null;
|
|
900
|
-
}
|
|
901
|
-
function p1({
|
|
902
|
-
label: t,
|
|
903
|
-
variant: i = "secondary",
|
|
904
|
-
onClick: n,
|
|
905
|
-
disabled: a
|
|
906
|
-
}) {
|
|
907
|
-
const u = i === "primary";
|
|
908
|
-
return /* @__PURE__ */ e(
|
|
909
|
-
"button",
|
|
910
|
-
{
|
|
911
|
-
onClick: n,
|
|
912
|
-
disabled: a,
|
|
913
|
-
style: {
|
|
914
|
-
display: "flex",
|
|
915
|
-
height: "36px",
|
|
916
|
-
padding: "0 20px",
|
|
917
|
-
justifyContent: "center",
|
|
918
|
-
alignItems: "center",
|
|
919
|
-
gap: "8px",
|
|
920
|
-
borderRadius: "6px",
|
|
921
|
-
border: u ? "none" : "1px solid #D9D9D9",
|
|
922
|
-
background: u ? "var(--Base-Strong, #0B0B0B)" : "var(--Base-White, #FFF)",
|
|
923
|
-
color: u ? "#FFF" : "var(--Base-Strong, #1E1E1E)",
|
|
924
|
-
fontSize: "16px",
|
|
925
|
-
fontWeight: 600,
|
|
926
|
-
cursor: a ? "default" : "pointer",
|
|
927
|
-
opacity: a ? 0.5 : 1,
|
|
928
|
-
transition: "all 0.15s ease"
|
|
929
|
-
},
|
|
930
|
-
onMouseEnter: (l) => {
|
|
931
|
-
!a && !u && (l.currentTarget.style.background = "#ECEEF2");
|
|
932
|
-
},
|
|
933
|
-
onMouseLeave: (l) => {
|
|
934
|
-
!a && !u && (l.currentTarget.style.background = "var(--Base-White, #FFF)");
|
|
935
|
-
},
|
|
936
|
-
children: t
|
|
937
|
-
}
|
|
938
|
-
);
|
|
939
|
-
}
|
|
940
|
-
function f1({ children: t, htmlFor: i }) {
|
|
941
|
-
return /* @__PURE__ */ e(
|
|
942
|
-
"label",
|
|
943
|
-
{
|
|
944
|
-
htmlFor: i,
|
|
945
|
-
style: {
|
|
946
|
-
display: "block",
|
|
947
|
-
color: "var(--Base-Strong, #2E3236)",
|
|
948
|
-
fontSize: "16px",
|
|
949
|
-
fontStyle: "normal",
|
|
950
|
-
fontWeight: 400,
|
|
951
|
-
lineHeight: "normal",
|
|
952
|
-
marginBottom: "6px"
|
|
953
|
-
},
|
|
954
|
-
children: t
|
|
955
|
-
}
|
|
956
|
-
);
|
|
957
|
-
}
|
|
958
|
-
function h1(t) {
|
|
959
|
-
return /* @__PURE__ */ e(
|
|
960
|
-
"input",
|
|
961
|
-
{
|
|
962
|
-
...t,
|
|
963
|
-
style: {
|
|
964
|
-
width: "100%",
|
|
965
|
-
padding: "10px 12px",
|
|
966
|
-
borderRadius: "6px",
|
|
967
|
-
border: "1px solid #D9D9D9",
|
|
968
|
-
color: "var(--Base-Strong, #2E3236)",
|
|
969
|
-
fontSize: "16px",
|
|
970
|
-
fontStyle: "normal",
|
|
971
|
-
fontWeight: 400,
|
|
972
|
-
lineHeight: "normal",
|
|
973
|
-
outline: "none",
|
|
974
|
-
boxSizing: "border-box",
|
|
975
|
-
background: "#FFF",
|
|
976
|
-
transition: "border-color 0.15s ease",
|
|
977
|
-
...t.style
|
|
978
|
-
},
|
|
979
|
-
onFocus: (i) => {
|
|
980
|
-
var n;
|
|
981
|
-
i.currentTarget.style.borderColor = "#808183", (n = t.onFocus) == null || n.call(t, i);
|
|
982
|
-
},
|
|
983
|
-
onBlur: (i) => {
|
|
984
|
-
var n;
|
|
985
|
-
i.currentTarget.style.borderColor = "#D9D9D9", (n = t.onBlur) == null || n.call(t, i);
|
|
986
|
-
}
|
|
987
|
-
}
|
|
988
|
-
);
|
|
989
|
-
}
|
|
990
|
-
function e1({ size: t = 48 }) {
|
|
991
|
-
return /* @__PURE__ */ s(
|
|
624
|
+
function t1({ size: r = 48 }) {
|
|
625
|
+
return /* @__PURE__ */ d(
|
|
992
626
|
"svg",
|
|
993
627
|
{
|
|
994
|
-
width:
|
|
995
|
-
height:
|
|
628
|
+
width: r,
|
|
629
|
+
height: r,
|
|
996
630
|
viewBox: "0 0 48 48",
|
|
997
631
|
fill: "none",
|
|
998
632
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1029,27 +663,27 @@ function e1({ size: t = 48 }) {
|
|
|
1029
663
|
}
|
|
1030
664
|
);
|
|
1031
665
|
}
|
|
1032
|
-
function
|
|
1033
|
-
title:
|
|
1034
|
-
subtitle:
|
|
666
|
+
function p1({
|
|
667
|
+
title: r = "Uploading your file...",
|
|
668
|
+
subtitle: c = "Please wait while we process your file",
|
|
1035
669
|
progress: n,
|
|
1036
|
-
width:
|
|
1037
|
-
height:
|
|
670
|
+
width: f = 648,
|
|
671
|
+
height: C = 281
|
|
1038
672
|
}) {
|
|
1039
|
-
return /* @__PURE__ */
|
|
673
|
+
return /* @__PURE__ */ d(R, { children: [
|
|
1040
674
|
/* @__PURE__ */ e("style", { children: `
|
|
1041
675
|
@keyframes file-upload-spin {
|
|
1042
676
|
from { transform: rotate(0deg); }
|
|
1043
677
|
to { transform: rotate(360deg); }
|
|
1044
678
|
}
|
|
1045
679
|
` }),
|
|
1046
|
-
/* @__PURE__ */
|
|
680
|
+
/* @__PURE__ */ d(
|
|
1047
681
|
"div",
|
|
1048
682
|
{
|
|
1049
683
|
style: {
|
|
1050
684
|
display: "flex",
|
|
1051
|
-
width:
|
|
1052
|
-
height:
|
|
685
|
+
width: f,
|
|
686
|
+
height: C,
|
|
1053
687
|
padding: "88px 64px 64px 64px",
|
|
1054
688
|
flexDirection: "column",
|
|
1055
689
|
justifyContent: "center",
|
|
@@ -1061,7 +695,7 @@ function C1({
|
|
|
1061
695
|
boxSizing: "border-box"
|
|
1062
696
|
},
|
|
1063
697
|
children: [
|
|
1064
|
-
/* @__PURE__ */ e(
|
|
698
|
+
/* @__PURE__ */ e(t1, { size: 48 }),
|
|
1065
699
|
/* @__PURE__ */ e(
|
|
1066
700
|
"p",
|
|
1067
701
|
{
|
|
@@ -1073,7 +707,7 @@ function C1({
|
|
|
1073
707
|
lineHeight: "normal",
|
|
1074
708
|
textAlign: "center"
|
|
1075
709
|
},
|
|
1076
|
-
children:
|
|
710
|
+
children: r
|
|
1077
711
|
}
|
|
1078
712
|
),
|
|
1079
713
|
/* @__PURE__ */ e(
|
|
@@ -1087,7 +721,7 @@ function C1({
|
|
|
1087
721
|
lineHeight: "140%",
|
|
1088
722
|
textAlign: "center"
|
|
1089
723
|
},
|
|
1090
|
-
children:
|
|
724
|
+
children: c
|
|
1091
725
|
}
|
|
1092
726
|
),
|
|
1093
727
|
n !== void 0 && /* @__PURE__ */ e(
|
|
@@ -1120,21 +754,21 @@ function C1({
|
|
|
1120
754
|
)
|
|
1121
755
|
] });
|
|
1122
756
|
}
|
|
1123
|
-
function
|
|
1124
|
-
title:
|
|
1125
|
-
subtitle:
|
|
757
|
+
function h1({
|
|
758
|
+
title: r = "File uploaded successfully!",
|
|
759
|
+
subtitle: c = "Redirecting...",
|
|
1126
760
|
actionLabel: n = "Add more files",
|
|
1127
|
-
onAction:
|
|
1128
|
-
width:
|
|
1129
|
-
height:
|
|
761
|
+
onAction: f,
|
|
762
|
+
width: C = 648,
|
|
763
|
+
height: h = 281
|
|
1130
764
|
}) {
|
|
1131
|
-
return /* @__PURE__ */
|
|
765
|
+
return /* @__PURE__ */ d(
|
|
1132
766
|
"div",
|
|
1133
767
|
{
|
|
1134
768
|
style: {
|
|
1135
769
|
display: "flex",
|
|
1136
|
-
width:
|
|
1137
|
-
height:
|
|
770
|
+
width: C,
|
|
771
|
+
height: h,
|
|
1138
772
|
padding: "88px 64px 64px 64px",
|
|
1139
773
|
flexDirection: "column",
|
|
1140
774
|
justifyContent: "center",
|
|
@@ -1160,7 +794,7 @@ function g1({
|
|
|
1160
794
|
flexShrink: 0,
|
|
1161
795
|
marginBottom: "8px"
|
|
1162
796
|
},
|
|
1163
|
-
children: /* @__PURE__ */ e(
|
|
797
|
+
children: /* @__PURE__ */ e(Q, { size: 24, strokeWidth: 2, color: "var(--Base-Strong, #2E3236)" })
|
|
1164
798
|
}
|
|
1165
799
|
),
|
|
1166
800
|
/* @__PURE__ */ e(
|
|
@@ -1174,7 +808,7 @@ function g1({
|
|
|
1174
808
|
lineHeight: "normal",
|
|
1175
809
|
textAlign: "center"
|
|
1176
810
|
},
|
|
1177
|
-
children:
|
|
811
|
+
children: r
|
|
1178
812
|
}
|
|
1179
813
|
),
|
|
1180
814
|
/* @__PURE__ */ e(
|
|
@@ -1188,13 +822,13 @@ function g1({
|
|
|
1188
822
|
lineHeight: "140%",
|
|
1189
823
|
textAlign: "center"
|
|
1190
824
|
},
|
|
1191
|
-
children:
|
|
825
|
+
children: c
|
|
1192
826
|
}
|
|
1193
827
|
),
|
|
1194
|
-
n &&
|
|
828
|
+
n && f && /* @__PURE__ */ e(
|
|
1195
829
|
"button",
|
|
1196
830
|
{
|
|
1197
|
-
onClick:
|
|
831
|
+
onClick: f,
|
|
1198
832
|
style: {
|
|
1199
833
|
display: "flex",
|
|
1200
834
|
padding: "8px 20px",
|
|
@@ -1211,11 +845,11 @@ function g1({
|
|
|
1211
845
|
marginTop: "8px",
|
|
1212
846
|
transition: "all 0.15s ease"
|
|
1213
847
|
},
|
|
1214
|
-
onMouseEnter: (
|
|
1215
|
-
|
|
848
|
+
onMouseEnter: (g) => {
|
|
849
|
+
g.currentTarget.style.background = "#ECEEF2";
|
|
1216
850
|
},
|
|
1217
|
-
onMouseLeave: (
|
|
1218
|
-
|
|
851
|
+
onMouseLeave: (g) => {
|
|
852
|
+
g.currentTarget.style.background = "var(--Base-White, #FFF)";
|
|
1219
853
|
},
|
|
1220
854
|
children: n
|
|
1221
855
|
}
|
|
@@ -1224,30 +858,30 @@ function g1({
|
|
|
1224
858
|
}
|
|
1225
859
|
);
|
|
1226
860
|
}
|
|
1227
|
-
const
|
|
1228
|
-
success:
|
|
1229
|
-
information:
|
|
1230
|
-
warning:
|
|
1231
|
-
error:
|
|
1232
|
-
},
|
|
1233
|
-
variant:
|
|
1234
|
-
message:
|
|
861
|
+
const r1 = {
|
|
862
|
+
success: B,
|
|
863
|
+
information: U,
|
|
864
|
+
warning: X,
|
|
865
|
+
error: $
|
|
866
|
+
}, u1 = ({
|
|
867
|
+
variant: r = "success",
|
|
868
|
+
message: c = "",
|
|
1235
869
|
showClose: n,
|
|
1236
|
-
autoClose:
|
|
1237
|
-
onClose:
|
|
1238
|
-
actions:
|
|
870
|
+
autoClose: f,
|
|
871
|
+
onClose: C,
|
|
872
|
+
actions: h
|
|
1239
873
|
}) => {
|
|
1240
|
-
const [
|
|
1241
|
-
|
|
1242
|
-
}, [
|
|
1243
|
-
if (
|
|
1244
|
-
if (!
|
|
874
|
+
const [g, i] = w(!0), o = r === "error", l = n !== void 0 ? n : !0, y = f !== void 0 ? f : 5e3, u = j(() => {
|
|
875
|
+
i(!1), C == null || C();
|
|
876
|
+
}, [C]);
|
|
877
|
+
if (E(() => {
|
|
878
|
+
if (!y || !g)
|
|
1245
879
|
return;
|
|
1246
|
-
const
|
|
1247
|
-
return () => clearTimeout(
|
|
1248
|
-
}, [
|
|
880
|
+
const s = setTimeout(u, y);
|
|
881
|
+
return () => clearTimeout(s);
|
|
882
|
+
}, [y, g, u]), !g)
|
|
1249
883
|
return null;
|
|
1250
|
-
const
|
|
884
|
+
const x = r1[r] || B, m = {
|
|
1251
885
|
display: "inline-flex",
|
|
1252
886
|
width: "fit-content",
|
|
1253
887
|
padding: "8px 12px",
|
|
@@ -1269,13 +903,13 @@ const t1 = {
|
|
|
1269
903
|
color: "var(--Grey-Strong, #2E3236)",
|
|
1270
904
|
border: "1px solid var(--Grey-Faint, #ACADAD)"
|
|
1271
905
|
}
|
|
1272
|
-
}, b = o ? "#FFF" : "var(--Grey-Strong, #2E3236)",
|
|
906
|
+
}, b = o ? "#FFF" : "var(--Grey-Strong, #2E3236)", k = (s) => ({
|
|
1273
907
|
display: "flex",
|
|
1274
908
|
padding: "4px 12px",
|
|
1275
909
|
justifyContent: "center",
|
|
1276
910
|
alignItems: "center",
|
|
1277
911
|
fontSize: 13,
|
|
1278
|
-
fontWeight:
|
|
912
|
+
fontWeight: s ? 600 : 400,
|
|
1279
913
|
fontFamily: "var(--default-font-family)",
|
|
1280
914
|
lineHeight: "150%",
|
|
1281
915
|
border: "none",
|
|
@@ -1283,13 +917,13 @@ const t1 = {
|
|
|
1283
917
|
cursor: "pointer",
|
|
1284
918
|
transition: "background 0.15s",
|
|
1285
919
|
...o ? {
|
|
1286
|
-
background:
|
|
1287
|
-
color:
|
|
920
|
+
background: s ? "var(--Grey-White, #FFF)" : "transparent",
|
|
921
|
+
color: s ? "var(--Grey-Strong, #2E3236)" : "var(--Grey-White, #FFF)"
|
|
1288
922
|
} : {
|
|
1289
|
-
background:
|
|
1290
|
-
color:
|
|
923
|
+
background: s ? "var(--Grey-Strong, #2E3236)" : "transparent",
|
|
924
|
+
color: s ? "var(--Grey-White, #FFF)" : "var(--Grey-Strong, #2E3236)"
|
|
1291
925
|
}
|
|
1292
|
-
}),
|
|
926
|
+
}), t = {
|
|
1293
927
|
display: "flex",
|
|
1294
928
|
alignItems: "center",
|
|
1295
929
|
justifyContent: "center",
|
|
@@ -1300,9 +934,9 @@ const t1 = {
|
|
|
1300
934
|
marginLeft: 4,
|
|
1301
935
|
flexShrink: 0
|
|
1302
936
|
};
|
|
1303
|
-
return /* @__PURE__ */
|
|
937
|
+
return /* @__PURE__ */ d("div", { style: m, children: [
|
|
1304
938
|
/* @__PURE__ */ e(
|
|
1305
|
-
|
|
939
|
+
x,
|
|
1306
940
|
{
|
|
1307
941
|
size: 16,
|
|
1308
942
|
color: b,
|
|
@@ -1310,28 +944,28 @@ const t1 = {
|
|
|
1310
944
|
style: { flexShrink: 0 }
|
|
1311
945
|
}
|
|
1312
946
|
),
|
|
1313
|
-
/* @__PURE__ */ e("span", { children:
|
|
1314
|
-
|
|
947
|
+
/* @__PURE__ */ e("span", { children: c }),
|
|
948
|
+
h && h.length > 0 && /* @__PURE__ */ e("div", { style: { display: "flex", alignItems: "center", gap: 4, marginLeft: 8 }, children: h.map((s, F) => /* @__PURE__ */ e(
|
|
1315
949
|
"button",
|
|
1316
950
|
{
|
|
1317
951
|
type: "button",
|
|
1318
952
|
onClick: () => {
|
|
1319
953
|
var S;
|
|
1320
|
-
(S =
|
|
954
|
+
(S = s.onClick) == null || S.call(s), s.dismissOnClick !== !1 && u();
|
|
1321
955
|
},
|
|
1322
|
-
style:
|
|
1323
|
-
children:
|
|
956
|
+
style: k(!!s.primary),
|
|
957
|
+
children: s.label
|
|
1324
958
|
},
|
|
1325
|
-
|
|
959
|
+
F
|
|
1326
960
|
)) }),
|
|
1327
|
-
|
|
961
|
+
l && /* @__PURE__ */ e(
|
|
1328
962
|
"button",
|
|
1329
963
|
{
|
|
1330
964
|
type: "button",
|
|
1331
|
-
onClick:
|
|
1332
|
-
style:
|
|
965
|
+
onClick: u,
|
|
966
|
+
style: t,
|
|
1333
967
|
children: /* @__PURE__ */ e(
|
|
1334
|
-
|
|
968
|
+
T,
|
|
1335
969
|
{
|
|
1336
970
|
size: 16,
|
|
1337
971
|
color: o ? "var(--Grey-White, #FFF)" : "var(--Grey-Muted, #808183)",
|
|
@@ -1341,7 +975,7 @@ const t1 = {
|
|
|
1341
975
|
}
|
|
1342
976
|
)
|
|
1343
977
|
] });
|
|
1344
|
-
},
|
|
978
|
+
}, f1 = ({ children: r }) => /* @__PURE__ */ e(
|
|
1345
979
|
"div",
|
|
1346
980
|
{
|
|
1347
981
|
style: {
|
|
@@ -1356,19 +990,15 @@ const t1 = {
|
|
|
1356
990
|
gap: 8,
|
|
1357
991
|
pointerEvents: "none"
|
|
1358
992
|
},
|
|
1359
|
-
children: /* @__PURE__ */ e("div", { style: { pointerEvents: "auto" }, children:
|
|
993
|
+
children: /* @__PURE__ */ e("div", { style: { pointerEvents: "auto" }, children: r })
|
|
1360
994
|
}
|
|
1361
995
|
);
|
|
1362
996
|
export {
|
|
1363
|
-
|
|
1364
|
-
p1 as
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
f1 as b,
|
|
1370
|
-
h1 as c,
|
|
1371
|
-
g1 as d,
|
|
1372
|
-
y1 as e
|
|
997
|
+
c1 as A,
|
|
998
|
+
p1 as F,
|
|
999
|
+
u1 as T,
|
|
1000
|
+
C1 as a,
|
|
1001
|
+
h1 as b,
|
|
1002
|
+
f1 as c
|
|
1373
1003
|
};
|
|
1374
1004
|
//# sourceMappingURL=Toast.es.js.map
|