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.
Files changed (36) hide show
  1. package/dist/ChatMessage.cjs.js +15 -0
  2. package/dist/ChatMessage.cjs.js.map +1 -0
  3. package/dist/ChatMessage.es.js +915 -0
  4. package/dist/ChatMessage.es.js.map +1 -0
  5. package/dist/SideDrawer.cjs.js +2 -0
  6. package/dist/SideDrawer.cjs.js.map +1 -0
  7. package/dist/SideDrawer.es.js +358 -0
  8. package/dist/SideDrawer.es.js.map +1 -0
  9. package/dist/Toast.cjs.js +2 -2
  10. package/dist/Toast.cjs.js.map +1 -1
  11. package/dist/Toast.es.js +301 -671
  12. package/dist/Toast.es.js.map +1 -1
  13. package/dist/components/UpdatedInteractionDetails.cjs.js +4 -4
  14. package/dist/components/UpdatedInteractionDetails.cjs.js.map +1 -1
  15. package/dist/components/UpdatedInteractionDetails.es.js +652 -603
  16. package/dist/components/UpdatedInteractionDetails.es.js.map +1 -1
  17. package/dist/components/chat.cjs.js +5 -7
  18. package/dist/components/chat.cjs.js.map +1 -1
  19. package/dist/components/chat.es.js +393 -849
  20. package/dist/components/chat.es.js.map +1 -1
  21. package/dist/components/common.cjs.js +1 -1
  22. package/dist/components/common.es.js +28 -27
  23. package/dist/components/common.es.js.map +1 -1
  24. package/dist/index.cjs.js +1 -1
  25. package/dist/index.es.js +73 -72
  26. package/dist/index.es.js.map +1 -1
  27. package/package.json +1 -1
  28. package/src/components/UpdatedInteractionDetails/UpdatedInteractionContext.jsx +6 -2
  29. package/src/components/UpdatedInteractionDetails/UpdatedInteractionDetails.jsx +190 -139
  30. package/src/components/chat/ChartRenderer.jsx +300 -49
  31. package/src/components/common/AskCompass.jsx +91 -87
  32. package/src/components/common/SideDrawer.jsx +7 -3
  33. package/dist/ChartRenderer.cjs.js +0 -3
  34. package/dist/ChartRenderer.cjs.js.map +0 -1
  35. package/dist/ChartRenderer.es.js +0 -304
  36. package/dist/ChartRenderer.es.js.map +0 -1
package/dist/Toast.es.js CHANGED
@@ -1,29 +1,29 @@
1
- import { jsxs as s, jsx as e, Fragment as E } from "react/jsx-runtime";
2
- import A, { useState as v, useRef as F, useEffect as k, useMemo as L, useCallback as Z } from "react";
3
- import { AnimatePresence as M, motion as D } from "motion/react";
4
- import { MessageCircleQuestion as O, History as N, Search as K, X as I, PlusCircle as Y, FolderCheck as V, CircleCheck as R, Info as Q, OctagonAlert as U, AlertTriangle as X } from "lucide-react";
5
- import { C as $ } from "./ChartRenderer.es.js";
6
- import { T as _ } from "./TextInput.es.js";
7
- import { S as W } from "./SmallButton.es.js";
8
- function q({ size: t = 48, isHovered: i = !1 }) {
9
- return /* @__PURE__ */ s(
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: t,
13
- height: t,
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
- D.rect,
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: i ? 24 : 12 },
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 J({ size: t = 48 }) {
40
- return /* @__PURE__ */ s(
39
+ function P({ size: r = 48 }) {
40
+ return /* @__PURE__ */ d(
41
41
  "svg",
42
42
  {
43
- width: t,
44
- height: t,
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 P({ onSend: t, onHistoryClick: i, messages: n = [], loading: a = !1, statusLabel: u }) {
60
- const [l, d] = v(""), h = F(null), o = F(null);
61
- k(() => {
62
- h.current && (h.current.scrollTop = h.current.scrollHeight);
63
- }, [n]), k(() => {
64
- const r = o.current;
65
- if (!r)
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
- r.style.height = "auto";
68
- const y = 140;
69
- r.style.height = Math.min(r.scrollHeight, y) + "px", r.style.overflowY = r.scrollHeight > y ? "auto" : "hidden";
70
- }, [l]);
71
- const C = () => {
72
- const r = l.trim();
73
- !r || a || (t == null || t(r), d(""));
74
- }, g = (r) => {
75
- if (r.key === "Enter") {
76
- if (r.metaKey || r.ctrlKey || r.shiftKey)
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
- r.preventDefault(), C();
78
+ t.preventDefault(), u();
79
79
  }
80
- }, c = n.length > 0;
81
- return /* @__PURE__ */ s(
82
- D.div,
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: { opacity: 0, y: 20, scale: 0.95 },
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: 360,
91
- height: 709,
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__ */ s(
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__ */ s("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
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(O, { size: 20, style: { color: "var(--Grey-Strong, #2E3236)" } })
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__ */ s(
149
+ /* @__PURE__ */ e("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: /* @__PURE__ */ d(
142
150
  "button",
143
151
  {
144
- onClick: i,
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(N, { size: 16 }),
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__ */ s(
176
+ /* @__PURE__ */ d(
169
177
  "div",
170
178
  {
171
- ref: h,
179
+ ref: l,
172
180
  style: {
173
181
  flex: 1,
174
182
  display: "flex",
175
183
  flexDirection: "column",
176
- justifyContent: c ? "flex-start" : "center",
177
- alignItems: c ? "stretch" : "center",
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
- c ? n.map((r, y) => {
185
- var b;
186
- return /* @__PURE__ */ s(A.Fragment, { children: [
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
- "div",
207
+ _,
189
208
  {
190
- style: {
191
- display: "flex",
192
- justifyContent: r.role === "user" ? "flex-end" : "flex-start"
193
- },
194
- children: /* @__PURE__ */ e(
195
- "div",
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
- (b = r.charts) == null ? void 0 : b.map((m, w) => /* @__PURE__ */ e(
215
- "div",
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
- style: {
218
- width: "100%",
219
- marginTop: 8,
220
- overflowX: "auto",
221
- overflowY: "hidden"
222
- },
223
- children: /* @__PURE__ */ e(
224
- "div",
225
- {
226
- style: {
227
- width: 520,
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
- a && /* @__PURE__ */ e("div", { style: { display: "flex", justifyContent: "flex-start" }, children: /* @__PURE__ */ e(
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: u || "Thinking..."
257
+ children: h || "Thinking..."
276
258
  }
277
259
  ) })
278
260
  ]
279
261
  }
280
262
  ),
281
- /* @__PURE__ */ s(
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: o,
300
- value: l,
301
- onChange: (r) => d(r.target.value),
302
- onKeyDown: g,
281
+ ref: y,
282
+ value: i,
283
+ onChange: (t) => o(t.target.value),
284
+ onKeyDown: x,
303
285
  placeholder: "Ask a Question",
304
- disabled: a,
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.4",
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: C,
328
- disabled: !l.trim() || a,
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: l.trim() && !a ? "pointer" : "default",
343
- opacity: l.trim() && !a ? 1 : 0.4,
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 d1({
358
- onSend: t,
359
- onHistoryClick: i,
339
+ function c1({
340
+ onSend: r,
341
+ onHistoryClick: c,
360
342
  messages: n = [],
361
- loading: a = !1,
362
- statusLabel: u,
363
- className: l = ""
343
+ loading: f = !1,
344
+ statusLabel: C,
345
+ onCodeBlockClick: h,
346
+ className: g = ""
364
347
  }) {
365
- const [d, h] = v(!1), [o, C] = v(!1), g = F(null);
366
- return k(() => {
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
- ref: g,
377
- className: l,
352
+ className: g,
378
353
  style: {
379
354
  position: "fixed",
380
- bottom: 24,
381
- right: 24,
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(M, { children: o && /* @__PURE__ */ e(
390
- P,
368
+ /* @__PURE__ */ e(
369
+ e1,
391
370
  {
392
- onSend: t,
393
- onHistoryClick: i,
371
+ isOpen: l,
372
+ onSend: r,
373
+ onHistoryClick: c,
394
374
  messages: n,
395
- loading: a,
396
- statusLabel: u
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: () => h(!0),
404
- onMouseLeave: () => h(!1),
405
- children: /* @__PURE__ */ s(
406
- D.button,
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: () => C((c) => !c),
389
+ onClick: () => y((u) => !u),
409
390
  initial: !1,
410
391
  animate: {
411
- width: d || o ? 166 : 48,
412
- height: d || o ? 56 : 48,
413
- borderRadius: d || o ? 30 : 12,
414
- background: d || o ? "var(--Rail-Surface-2, #E3E1D7)" : "rgba(0,0,0,0)"
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: d || o ? 10 : 0,
425
- padding: d || o ? "0 0 0 16px" : 0,
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(M, { children: (d || o) && /* @__PURE__ */ e(
435
- D.span,
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(q, { size: 48, isHovered: d || o })
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 c1 = ({
463
- options: t = [],
464
- value: i = null,
443
+ const C1 = ({
444
+ options: r = [],
445
+ value: c = null,
465
446
  onChange: n,
466
- placeholder: a = "Search...",
467
- disabled: u = !1,
468
- showSuggestions: l = !0,
469
- styling: d,
470
- isAddNew: h = !1
447
+ placeholder: f = "Search...",
448
+ disabled: C = !1,
449
+ showSuggestions: h = !0,
450
+ styling: g,
451
+ isAddNew: i = !1
471
452
  }) => {
472
- const [o, C] = v(""), [g, c] = v(!1), [r, y] = v(null), b = F(null), m = L(() => {
473
- if (!l)
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 p = o.toLowerCase();
476
- return t.filter((f) => {
477
- if (!f)
456
+ const a = o.toLowerCase();
457
+ return r.filter((p) => {
458
+ if (!p)
478
459
  return !1;
479
- const z = f.label || "", B = f.value || "";
480
- return (z.toLowerCase().includes(p) || B.toLowerCase().includes(p)) && (!r || f.value !== r.value);
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, t, l, r]), w = L(() => {
483
- if (!h)
463
+ }, [o, r, h, x]), t = z(() => {
464
+ if (!i)
484
465
  return !1;
485
- const p = o.toLowerCase();
486
- return t.some((f) => {
487
- if (!f)
466
+ const a = o.toLowerCase();
467
+ return r.some((p) => {
468
+ if (!p)
488
469
  return !1;
489
- const z = f.label || "", B = f.value || "";
490
- return z.toLowerCase() === p || B.toLowerCase() === p;
470
+ const D = p.label || "", H = p.value || "";
471
+ return D.toLowerCase() === a || H.toLowerCase() === a;
491
472
  });
492
- }, [t, o, h]);
493
- k(() => {
494
- if (!g)
473
+ }, [r, o, i]);
474
+ E(() => {
475
+ if (!y)
495
476
  return;
496
- const p = (f) => {
497
- b.current && !b.current.contains(f.target) && c(!1);
477
+ const a = (p) => {
478
+ b.current && !b.current.contains(p.target) && u(!1);
498
479
  };
499
- return document.addEventListener("mousedown", p), () => document.removeEventListener("mousedown", p);
500
- }, [g]);
501
- const x = (p) => {
502
- n == null || n(p), C(""), c(!1), y(null);
503
- }, H = () => {
504
- const p = { label: o, value: o };
505
- y(p), n == null || n(p), c(!1), C("");
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), C(""), c(!1), y(null);
508
- }, G = (p) => {
509
- const f = p.target.value;
510
- l ? (C(f), c(!0)) : h ? (C(f), c(f.length >= 3)) : n == null || n(f);
511
- }, T = () => {
512
- (l || h) && c(!0);
513
- }, j = g && !i && o.length >= 3;
514
- return /* @__PURE__ */ s("div", { className: "relative w-full", ref: b, children: [
515
- /* @__PURE__ */ s(
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: d || "flex items-center gap-2 border rounded-md px-3 py-2 bg-white shadow-sm",
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(K, { className: "w-4 h-4 text-gray-400" }),
521
- /* @__PURE__ */ e("div", { className: "flex-1", children: l && i ? /* @__PURE__ */ e(
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: i.label,
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: i.label
516
+ children: c.label
536
517
  }
537
518
  ) : /* @__PURE__ */ e(
538
- _,
519
+ q,
539
520
  {
540
- value: l || h ? o : i || "",
541
- onChange: (p) => G({ target: { value: p } }),
542
- placeholder: a,
543
- disabled: u,
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: T
531
+ onFocus: M
551
532
  }
552
533
  ) }),
553
- (i || r) && /* @__PURE__ */ e(
554
- W,
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(I, { className: "w-3 h-3" })
549
+ children: /* @__PURE__ */ e(T, { className: "w-3 h-3" })
569
550
  }
570
551
  )
571
552
  ]
572
553
  }
573
554
  ),
574
- j && /* @__PURE__ */ s(
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
- m.length > 0 && /* @__PURE__ */ e("ul", { className: "m-0 p-0 list-none", children: m.map((p) => /* @__PURE__ */ e(
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: () => x(p),
588
- onMouseEnter: (f) => {
589
- f.currentTarget.style.backgroundColor = "var(--hover-warm)";
568
+ onClick: () => s(a),
569
+ onMouseEnter: (p) => {
570
+ p.currentTarget.style.backgroundColor = "var(--hover-warm)";
590
571
  },
591
- onMouseLeave: (f) => {
592
- f.currentTarget.style.backgroundColor = "transparent";
572
+ onMouseLeave: (p) => {
573
+ p.currentTarget.style.backgroundColor = "transparent";
593
574
  },
594
575
  className: "cursor-pointer px-4 py-2",
595
- title: p.label,
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: p.label
591
+ children: a.label
611
592
  }
612
593
  )
613
594
  },
614
- p.value
595
+ a.value
615
596
  )) }),
616
- h && !w && !r && o.length >= 3 && /* @__PURE__ */ s(
617
- W,
597
+ i && !t && !x && o.length >= 3 && /* @__PURE__ */ d(
598
+ G,
618
599
  {
619
600
  type: "button",
620
601
  variant: "secondary",
621
- onClick: H,
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 u1({
644
- open: t,
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: t,
995
- height: t,
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 C1({
1033
- title: t = "Uploading your file...",
1034
- subtitle: i = "Please wait while we process your file",
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: a = 648,
1037
- height: u = 281
670
+ width: f = 648,
671
+ height: C = 281
1038
672
  }) {
1039
- return /* @__PURE__ */ s(E, { children: [
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__ */ s(
680
+ /* @__PURE__ */ d(
1047
681
  "div",
1048
682
  {
1049
683
  style: {
1050
684
  display: "flex",
1051
- width: a,
1052
- height: u,
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(e1, { size: 48 }),
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: t
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: i
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 g1({
1124
- title: t = "File uploaded successfully!",
1125
- subtitle: i = "Redirecting...",
757
+ function h1({
758
+ title: r = "File uploaded successfully!",
759
+ subtitle: c = "Redirecting...",
1126
760
  actionLabel: n = "Add more files",
1127
- onAction: a,
1128
- width: u = 648,
1129
- height: l = 281
761
+ onAction: f,
762
+ width: C = 648,
763
+ height: h = 281
1130
764
  }) {
1131
- return /* @__PURE__ */ s(
765
+ return /* @__PURE__ */ d(
1132
766
  "div",
1133
767
  {
1134
768
  style: {
1135
769
  display: "flex",
1136
- width: u,
1137
- height: l,
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(V, { size: 24, strokeWidth: 2, color: "var(--Base-Strong, #2E3236)" })
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: t
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: i
825
+ children: c
1192
826
  }
1193
827
  ),
1194
- n && a && /* @__PURE__ */ e(
828
+ n && f && /* @__PURE__ */ e(
1195
829
  "button",
1196
830
  {
1197
- onClick: a,
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: (d) => {
1215
- d.currentTarget.style.background = "#ECEEF2";
848
+ onMouseEnter: (g) => {
849
+ g.currentTarget.style.background = "#ECEEF2";
1216
850
  },
1217
- onMouseLeave: (d) => {
1218
- d.currentTarget.style.background = "var(--Base-White, #FFF)";
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 t1 = {
1228
- success: R,
1229
- information: Q,
1230
- warning: U,
1231
- error: X
1232
- }, x1 = ({
1233
- variant: t = "success",
1234
- message: i = "",
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: a,
1237
- onClose: u,
1238
- actions: l
870
+ autoClose: f,
871
+ onClose: C,
872
+ actions: h
1239
873
  }) => {
1240
- const [d, h] = v(!0), o = t === "error", C = n !== void 0 ? n : !0, g = a !== void 0 ? a : 5e3, c = Z(() => {
1241
- h(!1), u == null || u();
1242
- }, [u]);
1243
- if (k(() => {
1244
- if (!g || !d)
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 x = setTimeout(c, g);
1247
- return () => clearTimeout(x);
1248
- }, [g, d, c]), !d)
880
+ const s = setTimeout(u, y);
881
+ return () => clearTimeout(s);
882
+ }, [y, g, u]), !g)
1249
883
  return null;
1250
- const r = t1[t] || R, y = {
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)", m = (x) => ({
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: x ? 600 : 400,
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: x ? "var(--Grey-White, #FFF)" : "transparent",
1287
- color: x ? "var(--Grey-Strong, #2E3236)" : "var(--Grey-White, #FFF)"
920
+ background: s ? "var(--Grey-White, #FFF)" : "transparent",
921
+ color: s ? "var(--Grey-Strong, #2E3236)" : "var(--Grey-White, #FFF)"
1288
922
  } : {
1289
- background: x ? "var(--Grey-Strong, #2E3236)" : "transparent",
1290
- color: x ? "var(--Grey-White, #FFF)" : "var(--Grey-Strong, #2E3236)"
923
+ background: s ? "var(--Grey-Strong, #2E3236)" : "transparent",
924
+ color: s ? "var(--Grey-White, #FFF)" : "var(--Grey-Strong, #2E3236)"
1291
925
  }
1292
- }), w = {
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__ */ s("div", { style: y, children: [
937
+ return /* @__PURE__ */ d("div", { style: m, children: [
1304
938
  /* @__PURE__ */ e(
1305
- r,
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: i }),
1314
- l && l.length > 0 && /* @__PURE__ */ e("div", { style: { display: "flex", alignItems: "center", gap: 4, marginLeft: 8 }, children: l.map((x, H) => /* @__PURE__ */ e(
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 = x.onClick) == null || S.call(x), x.dismissOnClick !== !1 && c();
954
+ (S = s.onClick) == null || S.call(s), s.dismissOnClick !== !1 && u();
1321
955
  },
1322
- style: m(!!x.primary),
1323
- children: x.label
956
+ style: k(!!s.primary),
957
+ children: s.label
1324
958
  },
1325
- H
959
+ F
1326
960
  )) }),
1327
- C && /* @__PURE__ */ e(
961
+ l && /* @__PURE__ */ e(
1328
962
  "button",
1329
963
  {
1330
964
  type: "button",
1331
- onClick: c,
1332
- style: w,
965
+ onClick: u,
966
+ style: t,
1333
967
  children: /* @__PURE__ */ e(
1334
- I,
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
- }, y1 = ({ children: t }) => /* @__PURE__ */ e(
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: t })
993
+ children: /* @__PURE__ */ e("div", { style: { pointerEvents: "auto" }, children: r })
1360
994
  }
1361
995
  );
1362
996
  export {
1363
- d1 as A,
1364
- p1 as D,
1365
- C1 as F,
1366
- u1 as S,
1367
- x1 as T,
1368
- c1 as a,
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