chordia-ui 3.6.2 → 3.6.4
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/Toast.cjs.js +2 -2
- package/dist/Toast.cjs.js.map +1 -1
- package/dist/Toast.es.js +232 -199
- package/dist/Toast.es.js.map +1 -1
- package/package.json +1 -1
- package/src/components/common/AskCompass.jsx +42 -10
package/dist/Toast.es.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import A, { useState as
|
|
3
|
-
import { AnimatePresence as
|
|
4
|
-
import { MessageCircleQuestion as O, History as N, Search as K, X as
|
|
5
|
-
import { C as
|
|
1
|
+
import { jsxs as s, jsx as e, Fragment as w } from "react/jsx-runtime";
|
|
2
|
+
import A, { useState as b, useRef as E, useEffect as k, useMemo as W, useCallback as Z } from "react";
|
|
3
|
+
import { AnimatePresence as H, motion as S } from "motion/react";
|
|
4
|
+
import { MessageCircleQuestion as O, History as N, Search as K, X as L, PlusCircle as V, FolderCheck as Y, CircleCheck as R, Info as Q, OctagonAlert as U, AlertTriangle as X } from "lucide-react";
|
|
5
|
+
import { C as $ } from "./ChartRenderer.es.js";
|
|
6
6
|
import { T as _ } from "./TextInput.es.js";
|
|
7
7
|
import { S as M } from "./SmallButton.es.js";
|
|
8
8
|
function q({ size: t = 48, isHovered: n = !1 }) {
|
|
9
|
-
return /* @__PURE__ */
|
|
9
|
+
return /* @__PURE__ */ s(
|
|
10
10
|
"svg",
|
|
11
11
|
{
|
|
12
12
|
width: t,
|
|
@@ -37,7 +37,7 @@ function q({ size: t = 48, isHovered: n = !1 }) {
|
|
|
37
37
|
);
|
|
38
38
|
}
|
|
39
39
|
function J({ size: t = 48 }) {
|
|
40
|
-
return /* @__PURE__ */
|
|
40
|
+
return /* @__PURE__ */ s(
|
|
41
41
|
"svg",
|
|
42
42
|
{
|
|
43
43
|
width: t,
|
|
@@ -56,18 +56,18 @@ function J({ size: t = 48 }) {
|
|
|
56
56
|
}
|
|
57
57
|
);
|
|
58
58
|
}
|
|
59
|
-
function P({ onSend: t, onHistoryClick: n, messages: r = [], loading:
|
|
60
|
-
const [a,
|
|
61
|
-
|
|
62
|
-
|
|
59
|
+
function P({ onSend: t, onHistoryClick: n, messages: r = [], loading: l = !1, statusLabel: c }) {
|
|
60
|
+
const [a, d] = b(""), h = E(null);
|
|
61
|
+
k(() => {
|
|
62
|
+
h.current && (h.current.scrollTop = h.current.scrollHeight);
|
|
63
63
|
}, [r]);
|
|
64
|
-
const
|
|
65
|
-
const
|
|
66
|
-
!
|
|
67
|
-
},
|
|
68
|
-
|
|
69
|
-
},
|
|
70
|
-
return /* @__PURE__ */
|
|
64
|
+
const i = () => {
|
|
65
|
+
const o = a.trim();
|
|
66
|
+
!o || l || (t == null || t(o), d(""));
|
|
67
|
+
}, g = (o) => {
|
|
68
|
+
o.key === "Enter" && !o.shiftKey && (o.preventDefault(), i());
|
|
69
|
+
}, u = r.length > 0;
|
|
70
|
+
return /* @__PURE__ */ s(
|
|
71
71
|
S.div,
|
|
72
72
|
{
|
|
73
73
|
initial: { opacity: 0, y: 20, scale: 0.95 },
|
|
@@ -87,7 +87,7 @@ function P({ onSend: t, onHistoryClick: n, messages: r = [], loading: o = !1 })
|
|
|
87
87
|
boxSizing: "border-box"
|
|
88
88
|
},
|
|
89
89
|
children: [
|
|
90
|
-
/* @__PURE__ */
|
|
90
|
+
/* @__PURE__ */ s(
|
|
91
91
|
"div",
|
|
92
92
|
{
|
|
93
93
|
style: {
|
|
@@ -97,7 +97,7 @@ function P({ onSend: t, onHistoryClick: n, messages: r = [], loading: o = !1 })
|
|
|
97
97
|
alignSelf: "stretch"
|
|
98
98
|
},
|
|
99
99
|
children: [
|
|
100
|
-
/* @__PURE__ */
|
|
100
|
+
/* @__PURE__ */ s("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
|
|
101
101
|
/* @__PURE__ */ e(
|
|
102
102
|
"div",
|
|
103
103
|
{
|
|
@@ -127,7 +127,7 @@ function P({ onSend: t, onHistoryClick: n, messages: r = [], loading: o = !1 })
|
|
|
127
127
|
}
|
|
128
128
|
)
|
|
129
129
|
] }),
|
|
130
|
-
/* @__PURE__ */ e("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: /* @__PURE__ */
|
|
130
|
+
/* @__PURE__ */ e("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: /* @__PURE__ */ s(
|
|
131
131
|
"button",
|
|
132
132
|
{
|
|
133
133
|
onClick: n,
|
|
@@ -154,31 +154,31 @@ function P({ onSend: t, onHistoryClick: n, messages: r = [], loading: o = !1 })
|
|
|
154
154
|
]
|
|
155
155
|
}
|
|
156
156
|
),
|
|
157
|
-
/* @__PURE__ */
|
|
157
|
+
/* @__PURE__ */ s(
|
|
158
158
|
"div",
|
|
159
159
|
{
|
|
160
|
-
ref:
|
|
160
|
+
ref: h,
|
|
161
161
|
style: {
|
|
162
162
|
flex: 1,
|
|
163
163
|
display: "flex",
|
|
164
164
|
flexDirection: "column",
|
|
165
|
-
justifyContent:
|
|
166
|
-
alignItems:
|
|
165
|
+
justifyContent: u ? "flex-start" : "center",
|
|
166
|
+
alignItems: u ? "stretch" : "center",
|
|
167
167
|
gap: 12,
|
|
168
168
|
overflow: "auto",
|
|
169
169
|
marginTop: 16,
|
|
170
170
|
marginBottom: 16
|
|
171
171
|
},
|
|
172
172
|
children: [
|
|
173
|
-
|
|
174
|
-
var
|
|
175
|
-
return /* @__PURE__ */
|
|
173
|
+
u ? r.map((o, C) => {
|
|
174
|
+
var m;
|
|
175
|
+
return /* @__PURE__ */ s(A.Fragment, { children: [
|
|
176
176
|
/* @__PURE__ */ e(
|
|
177
177
|
"div",
|
|
178
178
|
{
|
|
179
179
|
style: {
|
|
180
180
|
display: "flex",
|
|
181
|
-
justifyContent:
|
|
181
|
+
justifyContent: o.role === "user" ? "flex-end" : "flex-start"
|
|
182
182
|
},
|
|
183
183
|
children: /* @__PURE__ */ e(
|
|
184
184
|
"div",
|
|
@@ -186,8 +186,8 @@ function P({ onSend: t, onHistoryClick: n, messages: r = [], loading: o = !1 })
|
|
|
186
186
|
style: {
|
|
187
187
|
maxWidth: "85%",
|
|
188
188
|
padding: "10px 14px",
|
|
189
|
-
borderRadius:
|
|
190
|
-
background:
|
|
189
|
+
borderRadius: o.role === "user" ? "14px 14px 4px 14px" : "14px 14px 14px 4px",
|
|
190
|
+
background: o.role === "user" ? "var(--Rail-Surface-2, #E3E1D7)" : "#F3F7F7",
|
|
191
191
|
fontSize: 14,
|
|
192
192
|
fontWeight: 400,
|
|
193
193
|
color: "var(--Grey-Strong, #2E3236)",
|
|
@@ -195,23 +195,46 @@ function P({ onSend: t, onHistoryClick: n, messages: r = [], loading: o = !1 })
|
|
|
195
195
|
whiteSpace: "pre-wrap",
|
|
196
196
|
wordBreak: "break-word"
|
|
197
197
|
},
|
|
198
|
-
children:
|
|
198
|
+
children: o.content
|
|
199
199
|
}
|
|
200
200
|
)
|
|
201
201
|
}
|
|
202
202
|
),
|
|
203
|
-
(
|
|
204
|
-
|
|
203
|
+
(m = o.charts) == null ? void 0 : m.map((y, v) => /* @__PURE__ */ e(
|
|
204
|
+
"div",
|
|
205
205
|
{
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
206
|
+
style: {
|
|
207
|
+
width: "100%",
|
|
208
|
+
marginTop: 8,
|
|
209
|
+
overflowX: "auto",
|
|
210
|
+
overflowY: "hidden"
|
|
211
|
+
},
|
|
212
|
+
children: /* @__PURE__ */ e(
|
|
213
|
+
"div",
|
|
214
|
+
{
|
|
215
|
+
style: {
|
|
216
|
+
width: 520,
|
|
217
|
+
transform: "scale(0.85)",
|
|
218
|
+
transformOrigin: "top left",
|
|
219
|
+
marginBottom: -40
|
|
220
|
+
},
|
|
221
|
+
children: /* @__PURE__ */ e(
|
|
222
|
+
$,
|
|
223
|
+
{
|
|
224
|
+
chartType: y.chartType,
|
|
225
|
+
title: y.title,
|
|
226
|
+
xLabel: y.xLabel,
|
|
227
|
+
yLabel: y.yLabel,
|
|
228
|
+
series: y.series
|
|
229
|
+
}
|
|
230
|
+
)
|
|
231
|
+
}
|
|
232
|
+
)
|
|
233
|
+
},
|
|
234
|
+
`chart-${v}`
|
|
235
|
+
))
|
|
236
|
+
] }, C);
|
|
237
|
+
}) : /* @__PURE__ */ s(w, { children: [
|
|
215
238
|
/* @__PURE__ */ e(J, { size: 48 }),
|
|
216
239
|
/* @__PURE__ */ e(
|
|
217
240
|
"span",
|
|
@@ -228,7 +251,7 @@ function P({ onSend: t, onHistoryClick: n, messages: r = [], loading: o = !1 })
|
|
|
228
251
|
}
|
|
229
252
|
)
|
|
230
253
|
] }),
|
|
231
|
-
|
|
254
|
+
l && /* @__PURE__ */ e("div", { style: { display: "flex", justifyContent: "flex-start" }, children: /* @__PURE__ */ e(
|
|
232
255
|
"div",
|
|
233
256
|
{
|
|
234
257
|
style: {
|
|
@@ -238,13 +261,13 @@ function P({ onSend: t, onHistoryClick: n, messages: r = [], loading: o = !1 })
|
|
|
238
261
|
fontSize: 14,
|
|
239
262
|
color: "var(--Grey-Muted, #808183)"
|
|
240
263
|
},
|
|
241
|
-
children: "Thinking..."
|
|
264
|
+
children: c || "Thinking..."
|
|
242
265
|
}
|
|
243
266
|
) })
|
|
244
267
|
]
|
|
245
268
|
}
|
|
246
269
|
),
|
|
247
|
-
/* @__PURE__ */
|
|
270
|
+
/* @__PURE__ */ s(
|
|
248
271
|
"div",
|
|
249
272
|
{
|
|
250
273
|
style: {
|
|
@@ -264,10 +287,10 @@ function P({ onSend: t, onHistoryClick: n, messages: r = [], loading: o = !1 })
|
|
|
264
287
|
{
|
|
265
288
|
type: "text",
|
|
266
289
|
value: a,
|
|
267
|
-
onChange: (
|
|
268
|
-
onKeyDown:
|
|
290
|
+
onChange: (o) => d(o.target.value),
|
|
291
|
+
onKeyDown: g,
|
|
269
292
|
placeholder: "Ask a Question",
|
|
270
|
-
disabled:
|
|
293
|
+
disabled: l,
|
|
271
294
|
style: {
|
|
272
295
|
flex: 1,
|
|
273
296
|
border: "none",
|
|
@@ -283,8 +306,8 @@ function P({ onSend: t, onHistoryClick: n, messages: r = [], loading: o = !1 })
|
|
|
283
306
|
/* @__PURE__ */ e(
|
|
284
307
|
"button",
|
|
285
308
|
{
|
|
286
|
-
onClick:
|
|
287
|
-
disabled: !a.trim() ||
|
|
309
|
+
onClick: i,
|
|
310
|
+
disabled: !a.trim() || l,
|
|
288
311
|
style: {
|
|
289
312
|
display: "flex",
|
|
290
313
|
height: 28,
|
|
@@ -298,8 +321,8 @@ function P({ onSend: t, onHistoryClick: n, messages: r = [], loading: o = !1 })
|
|
|
298
321
|
color: "#fff",
|
|
299
322
|
fontSize: 12,
|
|
300
323
|
fontWeight: 500,
|
|
301
|
-
cursor: a.trim() && !
|
|
302
|
-
opacity: a.trim() && !
|
|
324
|
+
cursor: a.trim() && !l ? "pointer" : "default",
|
|
325
|
+
opacity: a.trim() && !l ? 1 : 0.4,
|
|
303
326
|
flexShrink: 0,
|
|
304
327
|
boxSizing: "border-box"
|
|
305
328
|
},
|
|
@@ -317,13 +340,22 @@ function d1({
|
|
|
317
340
|
onSend: t,
|
|
318
341
|
onHistoryClick: n,
|
|
319
342
|
messages: r = [],
|
|
320
|
-
loading:
|
|
343
|
+
loading: l = !1,
|
|
344
|
+
statusLabel: c,
|
|
321
345
|
className: a = ""
|
|
322
346
|
}) {
|
|
323
|
-
const [
|
|
324
|
-
return
|
|
347
|
+
const [d, h] = b(!1), [i, g] = b(!1), u = E(null);
|
|
348
|
+
return k(() => {
|
|
349
|
+
if (!i)
|
|
350
|
+
return;
|
|
351
|
+
const o = (C) => {
|
|
352
|
+
u.current && !u.current.contains(C.target) && g(!1);
|
|
353
|
+
};
|
|
354
|
+
return document.addEventListener("mousedown", o), () => document.removeEventListener("mousedown", o);
|
|
355
|
+
}, [i]), /* @__PURE__ */ s(
|
|
325
356
|
"div",
|
|
326
357
|
{
|
|
358
|
+
ref: u,
|
|
327
359
|
className: a,
|
|
328
360
|
style: {
|
|
329
361
|
position: "fixed",
|
|
@@ -336,31 +368,32 @@ function d1({
|
|
|
336
368
|
gap: 12
|
|
337
369
|
},
|
|
338
370
|
children: [
|
|
339
|
-
/* @__PURE__ */ e(
|
|
371
|
+
/* @__PURE__ */ e(H, { children: i && /* @__PURE__ */ e(
|
|
340
372
|
P,
|
|
341
373
|
{
|
|
342
374
|
onSend: t,
|
|
343
375
|
onHistoryClick: n,
|
|
344
376
|
messages: r,
|
|
345
|
-
loading:
|
|
377
|
+
loading: l,
|
|
378
|
+
statusLabel: c
|
|
346
379
|
}
|
|
347
380
|
) }),
|
|
348
381
|
/* @__PURE__ */ e(
|
|
349
382
|
"div",
|
|
350
383
|
{
|
|
351
384
|
style: { width: 48, height: 48 },
|
|
352
|
-
onMouseEnter: () =>
|
|
353
|
-
onMouseLeave: () =>
|
|
354
|
-
children: /* @__PURE__ */
|
|
385
|
+
onMouseEnter: () => h(!0),
|
|
386
|
+
onMouseLeave: () => h(!1),
|
|
387
|
+
children: /* @__PURE__ */ s(
|
|
355
388
|
S.button,
|
|
356
389
|
{
|
|
357
|
-
onClick: () =>
|
|
390
|
+
onClick: () => g((o) => !o),
|
|
358
391
|
initial: !1,
|
|
359
392
|
animate: {
|
|
360
|
-
width:
|
|
361
|
-
height:
|
|
362
|
-
borderRadius:
|
|
363
|
-
background:
|
|
393
|
+
width: d || i ? 166 : 48,
|
|
394
|
+
height: d || i ? 56 : 48,
|
|
395
|
+
borderRadius: d || i ? 30 : 12,
|
|
396
|
+
background: d || i ? "var(--Rail-Surface-2, #E3E1D7)" : "rgba(0,0,0,0)"
|
|
364
397
|
},
|
|
365
398
|
transition: { type: "spring", stiffness: 400, damping: 30 },
|
|
366
399
|
style: {
|
|
@@ -370,8 +403,8 @@ function d1({
|
|
|
370
403
|
display: "flex",
|
|
371
404
|
justifyContent: "center",
|
|
372
405
|
alignItems: "center",
|
|
373
|
-
gap:
|
|
374
|
-
padding:
|
|
406
|
+
gap: d || i ? 10 : 0,
|
|
407
|
+
padding: d || i ? "0 0 0 16px" : 0,
|
|
375
408
|
border: "none",
|
|
376
409
|
outline: "none",
|
|
377
410
|
cursor: "pointer",
|
|
@@ -380,7 +413,7 @@ function d1({
|
|
|
380
413
|
boxSizing: "border-box"
|
|
381
414
|
},
|
|
382
415
|
children: [
|
|
383
|
-
/* @__PURE__ */ e(
|
|
416
|
+
/* @__PURE__ */ e(H, { children: (d || i) && /* @__PURE__ */ e(
|
|
384
417
|
S.span,
|
|
385
418
|
{
|
|
386
419
|
initial: { opacity: 0, width: 0 },
|
|
@@ -398,7 +431,7 @@ function d1({
|
|
|
398
431
|
children: "Ask Compass"
|
|
399
432
|
}
|
|
400
433
|
) }),
|
|
401
|
-
/* @__PURE__ */ e(q, { size: 48, isHovered:
|
|
434
|
+
/* @__PURE__ */ e(q, { size: 48, isHovered: d || i })
|
|
402
435
|
]
|
|
403
436
|
}
|
|
404
437
|
)
|
|
@@ -412,62 +445,62 @@ const c1 = ({
|
|
|
412
445
|
options: t = [],
|
|
413
446
|
value: n = null,
|
|
414
447
|
onChange: r,
|
|
415
|
-
placeholder:
|
|
416
|
-
disabled:
|
|
417
|
-
showSuggestions:
|
|
418
|
-
styling:
|
|
419
|
-
isAddNew:
|
|
448
|
+
placeholder: l = "Search...",
|
|
449
|
+
disabled: c = !1,
|
|
450
|
+
showSuggestions: a = !0,
|
|
451
|
+
styling: d,
|
|
452
|
+
isAddNew: h = !1
|
|
420
453
|
}) => {
|
|
421
|
-
const [
|
|
422
|
-
if (!
|
|
454
|
+
const [i, g] = b(""), [u, o] = b(!1), [C, m] = b(null), y = E(null), v = W(() => {
|
|
455
|
+
if (!a)
|
|
423
456
|
return [];
|
|
424
|
-
const p =
|
|
457
|
+
const p = i.toLowerCase();
|
|
425
458
|
return t.filter((f) => {
|
|
426
459
|
if (!f)
|
|
427
460
|
return !1;
|
|
428
461
|
const I = f.label || "", z = f.value || "";
|
|
429
462
|
return (I.toLowerCase().includes(p) || z.toLowerCase().includes(p)) && (!C || f.value !== C.value);
|
|
430
463
|
});
|
|
431
|
-
}, [
|
|
432
|
-
if (!
|
|
464
|
+
}, [i, t, a, C]), D = W(() => {
|
|
465
|
+
if (!h)
|
|
433
466
|
return !1;
|
|
434
|
-
const p =
|
|
467
|
+
const p = i.toLowerCase();
|
|
435
468
|
return t.some((f) => {
|
|
436
469
|
if (!f)
|
|
437
470
|
return !1;
|
|
438
471
|
const I = f.label || "", z = f.value || "";
|
|
439
472
|
return I.toLowerCase() === p || z.toLowerCase() === p;
|
|
440
473
|
});
|
|
441
|
-
}, [t,
|
|
442
|
-
|
|
443
|
-
if (!
|
|
474
|
+
}, [t, i, h]);
|
|
475
|
+
k(() => {
|
|
476
|
+
if (!u)
|
|
444
477
|
return;
|
|
445
478
|
const p = (f) => {
|
|
446
|
-
|
|
479
|
+
y.current && !y.current.contains(f.target) && o(!1);
|
|
447
480
|
};
|
|
448
481
|
return document.addEventListener("mousedown", p), () => document.removeEventListener("mousedown", p);
|
|
449
|
-
}, [
|
|
482
|
+
}, [u]);
|
|
450
483
|
const x = (p) => {
|
|
451
|
-
r == null || r(p),
|
|
452
|
-
},
|
|
453
|
-
const p = { label:
|
|
454
|
-
|
|
455
|
-
},
|
|
456
|
-
r == null || r(null),
|
|
484
|
+
r == null || r(p), g(""), o(!1), m(null);
|
|
485
|
+
}, B = () => {
|
|
486
|
+
const p = { label: i, value: i };
|
|
487
|
+
m(p), r == null || r(p), o(!1), g("");
|
|
488
|
+
}, F = () => {
|
|
489
|
+
r == null || r(null), g(""), o(!1), m(null);
|
|
457
490
|
}, G = (p) => {
|
|
458
491
|
const f = p.target.value;
|
|
459
|
-
|
|
492
|
+
a ? (g(f), o(!0)) : h ? (g(f), o(f.length >= 3)) : r == null || r(f);
|
|
460
493
|
}, T = () => {
|
|
461
|
-
(
|
|
462
|
-
}, j =
|
|
463
|
-
return /* @__PURE__ */
|
|
464
|
-
/* @__PURE__ */
|
|
494
|
+
(a || h) && o(!0);
|
|
495
|
+
}, j = u && !n && i.length >= 3;
|
|
496
|
+
return /* @__PURE__ */ s("div", { className: "relative w-full", ref: y, children: [
|
|
497
|
+
/* @__PURE__ */ s(
|
|
465
498
|
"div",
|
|
466
499
|
{
|
|
467
|
-
className:
|
|
500
|
+
className: d || "flex items-center gap-2 border rounded-md px-3 py-2 bg-white shadow-sm",
|
|
468
501
|
children: [
|
|
469
502
|
/* @__PURE__ */ e(K, { className: "w-4 h-4 text-gray-400" }),
|
|
470
|
-
/* @__PURE__ */ e("div", { className: "flex-1", children:
|
|
503
|
+
/* @__PURE__ */ e("div", { className: "flex-1", children: a && n ? /* @__PURE__ */ e(
|
|
471
504
|
"div",
|
|
472
505
|
{
|
|
473
506
|
className: "text-gray-800 truncate",
|
|
@@ -486,10 +519,10 @@ const c1 = ({
|
|
|
486
519
|
) : /* @__PURE__ */ e(
|
|
487
520
|
_,
|
|
488
521
|
{
|
|
489
|
-
value:
|
|
522
|
+
value: a || h ? i : n || "",
|
|
490
523
|
onChange: (p) => G({ target: { value: p } }),
|
|
491
|
-
placeholder:
|
|
492
|
-
disabled:
|
|
524
|
+
placeholder: l,
|
|
525
|
+
disabled: c,
|
|
493
526
|
style: {
|
|
494
527
|
border: "none",
|
|
495
528
|
boxShadow: "none",
|
|
@@ -505,7 +538,7 @@ const c1 = ({
|
|
|
505
538
|
type: "button",
|
|
506
539
|
variant: "ghost",
|
|
507
540
|
size: "sm",
|
|
508
|
-
onClick:
|
|
541
|
+
onClick: F,
|
|
509
542
|
style: {
|
|
510
543
|
padding: 0,
|
|
511
544
|
width: 20,
|
|
@@ -514,13 +547,13 @@ const c1 = ({
|
|
|
514
547
|
backgroundColor: "transparent",
|
|
515
548
|
color: "rgba(107,114,128,1)"
|
|
516
549
|
},
|
|
517
|
-
children: /* @__PURE__ */ e(
|
|
550
|
+
children: /* @__PURE__ */ e(L, { className: "w-3 h-3" })
|
|
518
551
|
}
|
|
519
552
|
)
|
|
520
553
|
]
|
|
521
554
|
}
|
|
522
555
|
),
|
|
523
|
-
j && /* @__PURE__ */
|
|
556
|
+
j && /* @__PURE__ */ s(
|
|
524
557
|
"div",
|
|
525
558
|
{
|
|
526
559
|
className: "absolute w-full rounded-md border border-gray-300 bg-white shadow-lg custom-thin-scrollbar-library",
|
|
@@ -562,12 +595,12 @@ const c1 = ({
|
|
|
562
595
|
},
|
|
563
596
|
p.value
|
|
564
597
|
)) }),
|
|
565
|
-
|
|
598
|
+
h && !D && !C && i.length >= 3 && /* @__PURE__ */ s(
|
|
566
599
|
M,
|
|
567
600
|
{
|
|
568
601
|
type: "button",
|
|
569
602
|
variant: "secondary",
|
|
570
|
-
onClick:
|
|
603
|
+
onClick: B,
|
|
571
604
|
style: {
|
|
572
605
|
width: "100%",
|
|
573
606
|
justifyContent: "space-between",
|
|
@@ -579,7 +612,7 @@ const c1 = ({
|
|
|
579
612
|
color: "rgba(107,114,128,1)"
|
|
580
613
|
},
|
|
581
614
|
children: [
|
|
582
|
-
/* @__PURE__ */ e("span", { children: `Add "${
|
|
615
|
+
/* @__PURE__ */ e("span", { children: `Add "${i}"` }),
|
|
583
616
|
/* @__PURE__ */ e(V, { className: "w-5 h-5 text-green-500" })
|
|
584
617
|
]
|
|
585
618
|
}
|
|
@@ -593,24 +626,24 @@ function p1({
|
|
|
593
626
|
open: t,
|
|
594
627
|
onClose: n,
|
|
595
628
|
title: r,
|
|
596
|
-
subtitle:
|
|
597
|
-
children:
|
|
598
|
-
footer:
|
|
599
|
-
width:
|
|
600
|
-
height:
|
|
601
|
-
toggleLabel:
|
|
602
|
-
toggleChecked:
|
|
603
|
-
onToggle:
|
|
629
|
+
subtitle: l,
|
|
630
|
+
children: c,
|
|
631
|
+
footer: a,
|
|
632
|
+
width: d = 515,
|
|
633
|
+
height: h = 762,
|
|
634
|
+
toggleLabel: i,
|
|
635
|
+
toggleChecked: g,
|
|
636
|
+
onToggle: u
|
|
604
637
|
}) {
|
|
605
|
-
const
|
|
606
|
-
return
|
|
638
|
+
const o = E(null);
|
|
639
|
+
return k(() => {
|
|
607
640
|
if (!t)
|
|
608
641
|
return;
|
|
609
|
-
const C = (
|
|
610
|
-
|
|
642
|
+
const C = (m) => {
|
|
643
|
+
m.key === "Escape" && (n == null || n());
|
|
611
644
|
};
|
|
612
645
|
return document.addEventListener("keydown", C), () => document.removeEventListener("keydown", C);
|
|
613
|
-
}, [t, n]), t ? /* @__PURE__ */
|
|
646
|
+
}, [t, n]), t ? /* @__PURE__ */ s(w, { children: [
|
|
614
647
|
/* @__PURE__ */ e(
|
|
615
648
|
"div",
|
|
616
649
|
{
|
|
@@ -623,10 +656,10 @@ function p1({
|
|
|
623
656
|
}
|
|
624
657
|
}
|
|
625
658
|
),
|
|
626
|
-
/* @__PURE__ */
|
|
659
|
+
/* @__PURE__ */ s(
|
|
627
660
|
"div",
|
|
628
661
|
{
|
|
629
|
-
ref:
|
|
662
|
+
ref: o,
|
|
630
663
|
style: {
|
|
631
664
|
position: "fixed",
|
|
632
665
|
top: "50%",
|
|
@@ -634,8 +667,8 @@ function p1({
|
|
|
634
667
|
transform: "translateY(-50%)",
|
|
635
668
|
zIndex: 1201,
|
|
636
669
|
display: "flex",
|
|
637
|
-
width:
|
|
638
|
-
height:
|
|
670
|
+
width: d,
|
|
671
|
+
height: h,
|
|
639
672
|
maxHeight: "100vh",
|
|
640
673
|
padding: "20px",
|
|
641
674
|
flexDirection: "column",
|
|
@@ -646,7 +679,7 @@ function p1({
|
|
|
646
679
|
boxShadow: "648px 0 100px 0 rgba(0, 0, 0, 0.20)"
|
|
647
680
|
},
|
|
648
681
|
children: [
|
|
649
|
-
/* @__PURE__ */
|
|
682
|
+
/* @__PURE__ */ s(
|
|
650
683
|
"div",
|
|
651
684
|
{
|
|
652
685
|
style: {
|
|
@@ -694,7 +727,7 @@ function p1({
|
|
|
694
727
|
onMouseLeave: (C) => {
|
|
695
728
|
C.currentTarget.style.background = "transparent";
|
|
696
729
|
},
|
|
697
|
-
children: /* @__PURE__ */ e(
|
|
730
|
+
children: /* @__PURE__ */ e(L, { size: 20, strokeWidth: 2 })
|
|
698
731
|
}
|
|
699
732
|
)
|
|
700
733
|
]
|
|
@@ -711,7 +744,7 @@ function p1({
|
|
|
711
744
|
}
|
|
712
745
|
}
|
|
713
746
|
),
|
|
714
|
-
(
|
|
747
|
+
(l || i) && /* @__PURE__ */ s(
|
|
715
748
|
"div",
|
|
716
749
|
{
|
|
717
750
|
style: {
|
|
@@ -723,7 +756,7 @@ function p1({
|
|
|
723
756
|
flexShrink: 0
|
|
724
757
|
},
|
|
725
758
|
children: [
|
|
726
|
-
|
|
759
|
+
l && /* @__PURE__ */ e(
|
|
727
760
|
"p",
|
|
728
761
|
{
|
|
729
762
|
style: {
|
|
@@ -735,10 +768,10 @@ function p1({
|
|
|
735
768
|
margin: 0,
|
|
736
769
|
flex: 1
|
|
737
770
|
},
|
|
738
|
-
children:
|
|
771
|
+
children: l
|
|
739
772
|
}
|
|
740
773
|
),
|
|
741
|
-
|
|
774
|
+
i && /* @__PURE__ */ s(
|
|
742
775
|
"div",
|
|
743
776
|
{
|
|
744
777
|
style: {
|
|
@@ -751,14 +784,14 @@ function p1({
|
|
|
751
784
|
/* @__PURE__ */ e(
|
|
752
785
|
"button",
|
|
753
786
|
{
|
|
754
|
-
onClick: () =>
|
|
787
|
+
onClick: () => u == null ? void 0 : u(!g),
|
|
755
788
|
style: {
|
|
756
789
|
position: "relative",
|
|
757
790
|
width: "40px",
|
|
758
791
|
height: "22px",
|
|
759
792
|
borderRadius: "11px",
|
|
760
793
|
border: "none",
|
|
761
|
-
background:
|
|
794
|
+
background: g ? "var(--Base-Strong, #0B0B0B)" : "var(--Base-Faint, #D9D9D9)",
|
|
762
795
|
cursor: "pointer",
|
|
763
796
|
transition: "background 0.2s ease",
|
|
764
797
|
padding: 0,
|
|
@@ -770,7 +803,7 @@ function p1({
|
|
|
770
803
|
style: {
|
|
771
804
|
position: "absolute",
|
|
772
805
|
top: "2px",
|
|
773
|
-
left:
|
|
806
|
+
left: g ? "20px" : "2px",
|
|
774
807
|
width: "18px",
|
|
775
808
|
height: "18px",
|
|
776
809
|
borderRadius: "50%",
|
|
@@ -791,7 +824,7 @@ function p1({
|
|
|
791
824
|
color: "var(--Base-Strong, #1E1E1E)",
|
|
792
825
|
lineHeight: 1.4
|
|
793
826
|
},
|
|
794
|
-
children:
|
|
827
|
+
children: i
|
|
795
828
|
}
|
|
796
829
|
)
|
|
797
830
|
]
|
|
@@ -812,10 +845,10 @@ function p1({
|
|
|
812
845
|
gap: "16px",
|
|
813
846
|
minHeight: 0
|
|
814
847
|
},
|
|
815
|
-
children:
|
|
848
|
+
children: c
|
|
816
849
|
}
|
|
817
850
|
),
|
|
818
|
-
|
|
851
|
+
a && /* @__PURE__ */ s(w, { children: [
|
|
819
852
|
/* @__PURE__ */ e(
|
|
820
853
|
"div",
|
|
821
854
|
{
|
|
@@ -838,7 +871,7 @@ function p1({
|
|
|
838
871
|
width: "100%",
|
|
839
872
|
flexShrink: 0
|
|
840
873
|
},
|
|
841
|
-
children:
|
|
874
|
+
children: a
|
|
842
875
|
}
|
|
843
876
|
)
|
|
844
877
|
] })
|
|
@@ -851,14 +884,14 @@ function u1({
|
|
|
851
884
|
label: t,
|
|
852
885
|
variant: n = "secondary",
|
|
853
886
|
onClick: r,
|
|
854
|
-
disabled:
|
|
887
|
+
disabled: l
|
|
855
888
|
}) {
|
|
856
|
-
const
|
|
889
|
+
const c = n === "primary";
|
|
857
890
|
return /* @__PURE__ */ e(
|
|
858
891
|
"button",
|
|
859
892
|
{
|
|
860
893
|
onClick: r,
|
|
861
|
-
disabled:
|
|
894
|
+
disabled: l,
|
|
862
895
|
style: {
|
|
863
896
|
display: "flex",
|
|
864
897
|
height: "36px",
|
|
@@ -867,20 +900,20 @@ function u1({
|
|
|
867
900
|
alignItems: "center",
|
|
868
901
|
gap: "8px",
|
|
869
902
|
borderRadius: "6px",
|
|
870
|
-
border:
|
|
871
|
-
background:
|
|
872
|
-
color:
|
|
903
|
+
border: c ? "none" : "1px solid #D9D9D9",
|
|
904
|
+
background: c ? "var(--Base-Strong, #0B0B0B)" : "var(--Base-White, #FFF)",
|
|
905
|
+
color: c ? "#FFF" : "var(--Base-Strong, #1E1E1E)",
|
|
873
906
|
fontSize: "16px",
|
|
874
907
|
fontWeight: 600,
|
|
875
|
-
cursor:
|
|
876
|
-
opacity:
|
|
908
|
+
cursor: l ? "default" : "pointer",
|
|
909
|
+
opacity: l ? 0.5 : 1,
|
|
877
910
|
transition: "all 0.15s ease"
|
|
878
911
|
},
|
|
879
|
-
onMouseEnter: (
|
|
880
|
-
!
|
|
912
|
+
onMouseEnter: (a) => {
|
|
913
|
+
!l && !c && (a.currentTarget.style.background = "#ECEEF2");
|
|
881
914
|
},
|
|
882
|
-
onMouseLeave: (
|
|
883
|
-
!
|
|
915
|
+
onMouseLeave: (a) => {
|
|
916
|
+
!l && !c && (a.currentTarget.style.background = "var(--Base-White, #FFF)");
|
|
884
917
|
},
|
|
885
918
|
children: t
|
|
886
919
|
}
|
|
@@ -937,7 +970,7 @@ function h1(t) {
|
|
|
937
970
|
);
|
|
938
971
|
}
|
|
939
972
|
function e1({ size: t = 48 }) {
|
|
940
|
-
return /* @__PURE__ */
|
|
973
|
+
return /* @__PURE__ */ s(
|
|
941
974
|
"svg",
|
|
942
975
|
{
|
|
943
976
|
width: t,
|
|
@@ -982,23 +1015,23 @@ function C1({
|
|
|
982
1015
|
title: t = "Uploading your file...",
|
|
983
1016
|
subtitle: n = "Please wait while we process your file",
|
|
984
1017
|
progress: r,
|
|
985
|
-
width:
|
|
986
|
-
height:
|
|
1018
|
+
width: l = 648,
|
|
1019
|
+
height: c = 281
|
|
987
1020
|
}) {
|
|
988
|
-
return /* @__PURE__ */
|
|
1021
|
+
return /* @__PURE__ */ s(w, { children: [
|
|
989
1022
|
/* @__PURE__ */ e("style", { children: `
|
|
990
1023
|
@keyframes file-upload-spin {
|
|
991
1024
|
from { transform: rotate(0deg); }
|
|
992
1025
|
to { transform: rotate(360deg); }
|
|
993
1026
|
}
|
|
994
1027
|
` }),
|
|
995
|
-
/* @__PURE__ */
|
|
1028
|
+
/* @__PURE__ */ s(
|
|
996
1029
|
"div",
|
|
997
1030
|
{
|
|
998
1031
|
style: {
|
|
999
1032
|
display: "flex",
|
|
1000
|
-
width:
|
|
1001
|
-
height:
|
|
1033
|
+
width: l,
|
|
1034
|
+
height: c,
|
|
1002
1035
|
padding: "88px 64px 64px 64px",
|
|
1003
1036
|
flexDirection: "column",
|
|
1004
1037
|
justifyContent: "center",
|
|
@@ -1073,17 +1106,17 @@ function g1({
|
|
|
1073
1106
|
title: t = "File uploaded successfully!",
|
|
1074
1107
|
subtitle: n = "Redirecting...",
|
|
1075
1108
|
actionLabel: r = "Add more files",
|
|
1076
|
-
onAction:
|
|
1077
|
-
width:
|
|
1078
|
-
height:
|
|
1109
|
+
onAction: l,
|
|
1110
|
+
width: c = 648,
|
|
1111
|
+
height: a = 281
|
|
1079
1112
|
}) {
|
|
1080
|
-
return /* @__PURE__ */
|
|
1113
|
+
return /* @__PURE__ */ s(
|
|
1081
1114
|
"div",
|
|
1082
1115
|
{
|
|
1083
1116
|
style: {
|
|
1084
1117
|
display: "flex",
|
|
1085
|
-
width:
|
|
1086
|
-
height:
|
|
1118
|
+
width: c,
|
|
1119
|
+
height: a,
|
|
1087
1120
|
padding: "88px 64px 64px 64px",
|
|
1088
1121
|
flexDirection: "column",
|
|
1089
1122
|
justifyContent: "center",
|
|
@@ -1109,7 +1142,7 @@ function g1({
|
|
|
1109
1142
|
flexShrink: 0,
|
|
1110
1143
|
marginBottom: "8px"
|
|
1111
1144
|
},
|
|
1112
|
-
children: /* @__PURE__ */ e(
|
|
1145
|
+
children: /* @__PURE__ */ e(Y, { size: 24, strokeWidth: 2, color: "var(--Base-Strong, #2E3236)" })
|
|
1113
1146
|
}
|
|
1114
1147
|
),
|
|
1115
1148
|
/* @__PURE__ */ e(
|
|
@@ -1140,10 +1173,10 @@ function g1({
|
|
|
1140
1173
|
children: n
|
|
1141
1174
|
}
|
|
1142
1175
|
),
|
|
1143
|
-
r &&
|
|
1176
|
+
r && l && /* @__PURE__ */ e(
|
|
1144
1177
|
"button",
|
|
1145
1178
|
{
|
|
1146
|
-
onClick:
|
|
1179
|
+
onClick: l,
|
|
1147
1180
|
style: {
|
|
1148
1181
|
display: "flex",
|
|
1149
1182
|
padding: "8px 20px",
|
|
@@ -1160,11 +1193,11 @@ function g1({
|
|
|
1160
1193
|
marginTop: "8px",
|
|
1161
1194
|
transition: "all 0.15s ease"
|
|
1162
1195
|
},
|
|
1163
|
-
onMouseEnter: (
|
|
1164
|
-
|
|
1196
|
+
onMouseEnter: (d) => {
|
|
1197
|
+
d.currentTarget.style.background = "#ECEEF2";
|
|
1165
1198
|
},
|
|
1166
|
-
onMouseLeave: (
|
|
1167
|
-
|
|
1199
|
+
onMouseLeave: (d) => {
|
|
1200
|
+
d.currentTarget.style.background = "var(--Base-White, #FFF)";
|
|
1168
1201
|
},
|
|
1169
1202
|
children: r
|
|
1170
1203
|
}
|
|
@@ -1175,28 +1208,28 @@ function g1({
|
|
|
1175
1208
|
}
|
|
1176
1209
|
const t1 = {
|
|
1177
1210
|
success: R,
|
|
1178
|
-
information:
|
|
1179
|
-
warning:
|
|
1180
|
-
error:
|
|
1211
|
+
information: Q,
|
|
1212
|
+
warning: U,
|
|
1213
|
+
error: X
|
|
1181
1214
|
}, x1 = ({
|
|
1182
1215
|
variant: t = "success",
|
|
1183
1216
|
message: n = "",
|
|
1184
1217
|
showClose: r,
|
|
1185
|
-
autoClose:
|
|
1186
|
-
onClose:
|
|
1187
|
-
actions:
|
|
1218
|
+
autoClose: l,
|
|
1219
|
+
onClose: c,
|
|
1220
|
+
actions: a
|
|
1188
1221
|
}) => {
|
|
1189
|
-
const [
|
|
1190
|
-
|
|
1191
|
-
}, [
|
|
1192
|
-
if (
|
|
1193
|
-
if (!
|
|
1222
|
+
const [d, h] = b(!0), i = t === "error", g = r !== void 0 ? r : !0, u = l !== void 0 ? l : 5e3, o = Z(() => {
|
|
1223
|
+
h(!1), c == null || c();
|
|
1224
|
+
}, [c]);
|
|
1225
|
+
if (k(() => {
|
|
1226
|
+
if (!u || !d)
|
|
1194
1227
|
return;
|
|
1195
|
-
const x = setTimeout(
|
|
1228
|
+
const x = setTimeout(o, u);
|
|
1196
1229
|
return () => clearTimeout(x);
|
|
1197
|
-
}, [
|
|
1230
|
+
}, [u, d, o]), !d)
|
|
1198
1231
|
return null;
|
|
1199
|
-
const C = t1[t] || R,
|
|
1232
|
+
const C = t1[t] || R, m = {
|
|
1200
1233
|
display: "inline-flex",
|
|
1201
1234
|
width: "fit-content",
|
|
1202
1235
|
padding: "8px 12px",
|
|
@@ -1209,7 +1242,7 @@ const t1 = {
|
|
|
1209
1242
|
lineHeight: "normal",
|
|
1210
1243
|
transition: "opacity 0.2s",
|
|
1211
1244
|
boxSizing: "border-box",
|
|
1212
|
-
...
|
|
1245
|
+
...i ? {
|
|
1213
1246
|
background: "var(--Grey-Strong, #2E3236)",
|
|
1214
1247
|
color: "var(--Grey-White, #FFF)",
|
|
1215
1248
|
border: "1px solid var(--Grey-Strong, #2E3236)"
|
|
@@ -1218,7 +1251,7 @@ const t1 = {
|
|
|
1218
1251
|
color: "var(--Grey-Strong, #2E3236)",
|
|
1219
1252
|
border: "1px solid var(--Grey-Faint, #ACADAD)"
|
|
1220
1253
|
}
|
|
1221
|
-
},
|
|
1254
|
+
}, y = i ? "#FFF" : "var(--Grey-Strong, #2E3236)", v = (x) => ({
|
|
1222
1255
|
display: "flex",
|
|
1223
1256
|
padding: "4px 12px",
|
|
1224
1257
|
justifyContent: "center",
|
|
@@ -1231,14 +1264,14 @@ const t1 = {
|
|
|
1231
1264
|
borderRadius: 6,
|
|
1232
1265
|
cursor: "pointer",
|
|
1233
1266
|
transition: "background 0.15s",
|
|
1234
|
-
...
|
|
1267
|
+
...i ? {
|
|
1235
1268
|
background: x ? "var(--Grey-White, #FFF)" : "transparent",
|
|
1236
1269
|
color: x ? "var(--Grey-Strong, #2E3236)" : "var(--Grey-White, #FFF)"
|
|
1237
1270
|
} : {
|
|
1238
1271
|
background: x ? "var(--Grey-Strong, #2E3236)" : "transparent",
|
|
1239
1272
|
color: x ? "var(--Grey-White, #FFF)" : "var(--Grey-Strong, #2E3236)"
|
|
1240
1273
|
}
|
|
1241
|
-
}),
|
|
1274
|
+
}), D = {
|
|
1242
1275
|
display: "flex",
|
|
1243
1276
|
alignItems: "center",
|
|
1244
1277
|
justifyContent: "center",
|
|
@@ -1249,41 +1282,41 @@ const t1 = {
|
|
|
1249
1282
|
marginLeft: 4,
|
|
1250
1283
|
flexShrink: 0
|
|
1251
1284
|
};
|
|
1252
|
-
return /* @__PURE__ */
|
|
1285
|
+
return /* @__PURE__ */ s("div", { style: m, children: [
|
|
1253
1286
|
/* @__PURE__ */ e(
|
|
1254
1287
|
C,
|
|
1255
1288
|
{
|
|
1256
1289
|
size: 16,
|
|
1257
|
-
color:
|
|
1290
|
+
color: y,
|
|
1258
1291
|
strokeWidth: 2,
|
|
1259
1292
|
style: { flexShrink: 0 }
|
|
1260
1293
|
}
|
|
1261
1294
|
),
|
|
1262
1295
|
/* @__PURE__ */ e("span", { children: n }),
|
|
1263
|
-
|
|
1296
|
+
a && a.length > 0 && /* @__PURE__ */ e("div", { style: { display: "flex", alignItems: "center", gap: 4, marginLeft: 8 }, children: a.map((x, B) => /* @__PURE__ */ e(
|
|
1264
1297
|
"button",
|
|
1265
1298
|
{
|
|
1266
1299
|
type: "button",
|
|
1267
1300
|
onClick: () => {
|
|
1268
|
-
var
|
|
1269
|
-
(
|
|
1301
|
+
var F;
|
|
1302
|
+
(F = x.onClick) == null || F.call(x), x.dismissOnClick !== !1 && o();
|
|
1270
1303
|
},
|
|
1271
1304
|
style: v(!!x.primary),
|
|
1272
1305
|
children: x.label
|
|
1273
1306
|
},
|
|
1274
|
-
|
|
1307
|
+
B
|
|
1275
1308
|
)) }),
|
|
1276
|
-
|
|
1309
|
+
g && /* @__PURE__ */ e(
|
|
1277
1310
|
"button",
|
|
1278
1311
|
{
|
|
1279
1312
|
type: "button",
|
|
1280
|
-
onClick:
|
|
1281
|
-
style:
|
|
1313
|
+
onClick: o,
|
|
1314
|
+
style: D,
|
|
1282
1315
|
children: /* @__PURE__ */ e(
|
|
1283
|
-
|
|
1316
|
+
L,
|
|
1284
1317
|
{
|
|
1285
1318
|
size: 16,
|
|
1286
|
-
color:
|
|
1319
|
+
color: i ? "var(--Grey-White, #FFF)" : "var(--Grey-Muted, #808183)",
|
|
1287
1320
|
strokeWidth: 2
|
|
1288
1321
|
}
|
|
1289
1322
|
)
|