@donkit-ai/design-system 1.4.59 → 1.4.61
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/index.cjs.js +3 -3
- package/dist/index.d.ts +13 -0
- package/dist/index.es.js +587 -559
- package/dist/tokens.css +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import V, { useState as A, useRef as R, useEffect as B, useLayoutEffect as Ze, useContext as
|
|
2
|
-
import { Check as Te, X as ee, ChevronDown as ve, Minus as
|
|
1
|
+
import V, { useState as A, useRef as R, useEffect as B, useLayoutEffect as Ze, useContext as je, forwardRef as Qe, createContext as et, useCallback as $e } from "react";
|
|
2
|
+
import { Check as Te, X as ee, ChevronDown as ve, Minus as tt, Plus as st, XCircle as Re, AlertTriangle as Se, CheckCircle as Ae, Info as Ie, ChevronUp as nt, ChevronsUpDown as rt, ChevronLeft as at, ChevronRight as ot, Copy as it, Brain as lt, Loader as ct, Paperclip as Me, Square as dt, ArrowUp as ut, Zap as ft, Cpu as ze, FileText as mt, ThumbsUp as pt, ThumbsDown as ht } from "lucide-react";
|
|
3
3
|
import pe from "react-dom";
|
|
4
4
|
const P = {
|
|
5
5
|
1: 16,
|
|
@@ -8,7 +8,7 @@ const P = {
|
|
|
8
8
|
4: 28,
|
|
9
9
|
5: 48
|
|
10
10
|
};
|
|
11
|
-
var
|
|
11
|
+
var ye = { exports: {} }, he = {};
|
|
12
12
|
/**
|
|
13
13
|
* @license React
|
|
14
14
|
* react-jsx-runtime.production.js
|
|
@@ -18,10 +18,10 @@ var ge = { exports: {} }, he = {};
|
|
|
18
18
|
* This source code is licensed under the MIT license found in the
|
|
19
19
|
* LICENSE file in the root directory of this source tree.
|
|
20
20
|
*/
|
|
21
|
-
var
|
|
22
|
-
function
|
|
23
|
-
if (
|
|
24
|
-
|
|
21
|
+
var Ce;
|
|
22
|
+
function xt() {
|
|
23
|
+
if (Ce) return he;
|
|
24
|
+
Ce = 1;
|
|
25
25
|
var t = Symbol.for("react.transitional.element"), s = Symbol.for("react.fragment");
|
|
26
26
|
function n(a, o, r) {
|
|
27
27
|
var i = null;
|
|
@@ -51,15 +51,15 @@ var xe = {};
|
|
|
51
51
|
* LICENSE file in the root directory of this source tree.
|
|
52
52
|
*/
|
|
53
53
|
var Oe;
|
|
54
|
-
function
|
|
54
|
+
function vt() {
|
|
55
55
|
return Oe || (Oe = 1, process.env.NODE_ENV !== "production" && function() {
|
|
56
56
|
function t(f) {
|
|
57
57
|
if (f == null) return null;
|
|
58
58
|
if (typeof f == "function")
|
|
59
|
-
return f.$$typeof ===
|
|
59
|
+
return f.$$typeof === C ? null : f.displayName || f.name || null;
|
|
60
60
|
if (typeof f == "string") return f;
|
|
61
61
|
switch (f) {
|
|
62
|
-
case
|
|
62
|
+
case w:
|
|
63
63
|
return "Fragment";
|
|
64
64
|
case k:
|
|
65
65
|
return "Profiler";
|
|
@@ -69,7 +69,7 @@ function xt() {
|
|
|
69
69
|
return "Suspense";
|
|
70
70
|
case H:
|
|
71
71
|
return "SuspenseList";
|
|
72
|
-
case
|
|
72
|
+
case g:
|
|
73
73
|
return "Activity";
|
|
74
74
|
}
|
|
75
75
|
if (typeof f == "object")
|
|
@@ -117,7 +117,7 @@ function xt() {
|
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
119
|
function a(f) {
|
|
120
|
-
if (f ===
|
|
120
|
+
if (f === w) return "<>";
|
|
121
121
|
if (typeof f == "object" && f !== null && f.$$typeof === W)
|
|
122
122
|
return "<...>";
|
|
123
123
|
try {
|
|
@@ -135,7 +135,7 @@ function xt() {
|
|
|
135
135
|
return Error("react-stack-top-frame");
|
|
136
136
|
}
|
|
137
137
|
function i(f) {
|
|
138
|
-
if (
|
|
138
|
+
if (O.call(f, "key")) {
|
|
139
139
|
var $ = Object.getOwnPropertyDescriptor(f, "key").get;
|
|
140
140
|
if ($ && $.isReactWarning) return !1;
|
|
141
141
|
}
|
|
@@ -159,7 +159,7 @@ function xt() {
|
|
|
159
159
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
160
160
|
)), f = this.props.ref, f !== void 0 ? f : null;
|
|
161
161
|
}
|
|
162
|
-
function
|
|
162
|
+
function c(f, $, z, F, ne, oe) {
|
|
163
163
|
var Y = z.ref;
|
|
164
164
|
return f = {
|
|
165
165
|
$$typeof: v,
|
|
@@ -205,10 +205,10 @@ function xt() {
|
|
|
205
205
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
206
206
|
);
|
|
207
207
|
else p(Y);
|
|
208
|
-
if (
|
|
208
|
+
if (O.call($, "key")) {
|
|
209
209
|
Y = t(f);
|
|
210
|
-
var Q = Object.keys($).filter(function(
|
|
211
|
-
return
|
|
210
|
+
var Q = Object.keys($).filter(function(Ne) {
|
|
211
|
+
return Ne !== "key";
|
|
212
212
|
});
|
|
213
213
|
F = 0 < Q.length ? "{key: someKey, " + Q.join(": ..., ") + ": ...}" : "{key: someKey}", T[Y + F] || (Q = 0 < Q.length ? "{" + Q.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
214
214
|
`A props object containing a "key" prop is being spread into JSX:
|
|
@@ -231,7 +231,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
231
231
|
return Y && l(
|
|
232
232
|
z,
|
|
233
233
|
typeof f == "function" ? f.displayName || f.name || "Unknown" : f
|
|
234
|
-
),
|
|
234
|
+
), c(
|
|
235
235
|
f,
|
|
236
236
|
Y,
|
|
237
237
|
z,
|
|
@@ -246,19 +246,19 @@ React keys must be passed directly to JSX without using spread:
|
|
|
246
246
|
function h(f) {
|
|
247
247
|
return typeof f == "object" && f !== null && f.$$typeof === v;
|
|
248
248
|
}
|
|
249
|
-
var
|
|
249
|
+
var d = V, v = Symbol.for("react.transitional.element"), _ = Symbol.for("react.portal"), w = Symbol.for("react.fragment"), y = Symbol.for("react.strict_mode"), k = Symbol.for("react.profiler"), j = Symbol.for("react.consumer"), S = Symbol.for("react.context"), M = Symbol.for("react.forward_ref"), D = Symbol.for("react.suspense"), H = Symbol.for("react.suspense_list"), q = Symbol.for("react.memo"), W = Symbol.for("react.lazy"), g = Symbol.for("react.activity"), C = Symbol.for("react.client.reference"), K = d.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, O = Object.prototype.hasOwnProperty, x = Array.isArray, b = console.createTask ? console.createTask : function() {
|
|
250
250
|
return null;
|
|
251
251
|
};
|
|
252
|
-
|
|
252
|
+
d = {
|
|
253
253
|
react_stack_bottom_frame: function(f) {
|
|
254
254
|
return f();
|
|
255
255
|
}
|
|
256
256
|
};
|
|
257
|
-
var E, L = {}, U =
|
|
258
|
-
|
|
257
|
+
var E, L = {}, U = d.react_stack_bottom_frame.bind(
|
|
258
|
+
d,
|
|
259
259
|
r
|
|
260
260
|
)(), G = b(a(r)), T = {};
|
|
261
|
-
xe.Fragment =
|
|
261
|
+
xe.Fragment = w, xe.jsx = function(f, $, z) {
|
|
262
262
|
var F = 1e4 > K.recentlyCreatedOwnerStacks++;
|
|
263
263
|
return m(
|
|
264
264
|
f,
|
|
@@ -281,9 +281,9 @@ React keys must be passed directly to JSX without using spread:
|
|
|
281
281
|
};
|
|
282
282
|
}()), xe;
|
|
283
283
|
}
|
|
284
|
-
process.env.NODE_ENV === "production" ?
|
|
285
|
-
var e =
|
|
286
|
-
function
|
|
284
|
+
process.env.NODE_ENV === "production" ? ye.exports = xt() : ye.exports = vt();
|
|
285
|
+
var e = ye.exports;
|
|
286
|
+
function _t({ size: t = "m", color: s = "default", className: n = "", ...a }) {
|
|
287
287
|
return /* @__PURE__ */ e.jsx(
|
|
288
288
|
"span",
|
|
289
289
|
{
|
|
@@ -294,7 +294,7 @@ function vt({ size: t = "m", color: s = "default", className: n = "", ...a }) {
|
|
|
294
294
|
}
|
|
295
295
|
);
|
|
296
296
|
}
|
|
297
|
-
const
|
|
297
|
+
const bt = { xs: 12, s: 14, m: 16, l: 20 };
|
|
298
298
|
function ae({
|
|
299
299
|
children: t,
|
|
300
300
|
variant: s = "primary",
|
|
@@ -305,35 +305,35 @@ function ae({
|
|
|
305
305
|
state: i = "idle",
|
|
306
306
|
onClick: l,
|
|
307
307
|
type: u = "button",
|
|
308
|
-
href:
|
|
308
|
+
href: c,
|
|
309
309
|
"aria-label": m,
|
|
310
310
|
className: p = "",
|
|
311
311
|
...h
|
|
312
312
|
}) {
|
|
313
|
-
const
|
|
313
|
+
const d = o && !t, v = i === "loading", _ = i === "success", w = i === "error", y = v || _ || w, k = n === "xs" ? "s" : "m", j = s === "danger" ? "on-accent" : "default", S = bt[n] ?? 16, M = v ? /* @__PURE__ */ e.jsx(_t, { size: k, color: j }) : _ ? /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(Te, { size: S, strokeWidth: 2.5 }) }) : w ? /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(ee, { size: S, strokeWidth: 2.5 }) }) : null, D = [
|
|
314
314
|
"ds-button",
|
|
315
315
|
`ds-button--${s}`,
|
|
316
316
|
`ds-button--${n}`,
|
|
317
317
|
a && "ds-button--full",
|
|
318
|
-
|
|
318
|
+
d && "ds-button--icon-only",
|
|
319
319
|
p
|
|
320
320
|
].filter(Boolean).join(" "), H = i !== "idle" ? i : void 0, q = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
321
321
|
y ? M : o && /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: o }),
|
|
322
322
|
t
|
|
323
323
|
] });
|
|
324
|
-
if (
|
|
325
|
-
const W = (
|
|
324
|
+
if (c) {
|
|
325
|
+
const W = (g) => {
|
|
326
326
|
if (r || v) {
|
|
327
|
-
|
|
327
|
+
g.preventDefault();
|
|
328
328
|
return;
|
|
329
329
|
}
|
|
330
|
-
|
|
330
|
+
g.metaKey || g.ctrlKey || g.button === 1 || (g.preventDefault(), l == null || l(g));
|
|
331
331
|
};
|
|
332
332
|
return /* @__PURE__ */ e.jsx(
|
|
333
333
|
"a",
|
|
334
334
|
{
|
|
335
335
|
className: D,
|
|
336
|
-
href: r || v ? void 0 :
|
|
336
|
+
href: r || v ? void 0 : c,
|
|
337
337
|
onClick: W,
|
|
338
338
|
"aria-label": m,
|
|
339
339
|
"aria-disabled": r || v ? "true" : void 0,
|
|
@@ -359,7 +359,7 @@ function ae({
|
|
|
359
359
|
}
|
|
360
360
|
);
|
|
361
361
|
}
|
|
362
|
-
function
|
|
362
|
+
function is({
|
|
363
363
|
label: t,
|
|
364
364
|
error: s,
|
|
365
365
|
hint: n,
|
|
@@ -369,10 +369,10 @@ function os({
|
|
|
369
369
|
onIconRightClick: i,
|
|
370
370
|
size: l = "m",
|
|
371
371
|
disabled: u,
|
|
372
|
-
id:
|
|
372
|
+
id: c,
|
|
373
373
|
...m
|
|
374
374
|
}) {
|
|
375
|
-
const p =
|
|
375
|
+
const p = c || `input-${V.useId()}`, h = n ? `${p}-hint` : void 0, d = s ? `${p}-error` : void 0, v = d || h;
|
|
376
376
|
return /* @__PURE__ */ e.jsxs("div", { className: `ds-input-wrapper ${a ? "ds-input-wrapper--full" : ""} ${u ? "ds-input-wrapper--disabled" : ""} ${s ? "ds-input-wrapper--error" : ""}`, children: [
|
|
377
377
|
t && /* @__PURE__ */ e.jsx("label", { className: "ds-input-label", htmlFor: p, children: t }),
|
|
378
378
|
/* @__PURE__ */ e.jsxs("div", { className: "ds-input-container", children: [
|
|
@@ -401,10 +401,10 @@ function os({
|
|
|
401
401
|
)
|
|
402
402
|
] }),
|
|
403
403
|
n && !s && /* @__PURE__ */ e.jsx("span", { id: h, className: "ds-input-hint", children: n }),
|
|
404
|
-
/* @__PURE__ */ e.jsx("div", { className: "ds-input-error-wrap", children: /* @__PURE__ */ e.jsx("div", { className: "ds-input-error-inner", children: s && /* @__PURE__ */ e.jsx("span", { id:
|
|
404
|
+
/* @__PURE__ */ e.jsx("div", { className: "ds-input-error-wrap", children: /* @__PURE__ */ e.jsx("div", { className: "ds-input-error-inner", children: s && /* @__PURE__ */ e.jsx("span", { id: d, className: "ds-input-error", role: "alert", children: s }) }) })
|
|
405
405
|
] });
|
|
406
406
|
}
|
|
407
|
-
function
|
|
407
|
+
function ls({
|
|
408
408
|
label: t,
|
|
409
409
|
error: s,
|
|
410
410
|
hint: n,
|
|
@@ -414,9 +414,9 @@ function is({
|
|
|
414
414
|
id: i,
|
|
415
415
|
resize: l = !0,
|
|
416
416
|
rows: u = 3,
|
|
417
|
-
...
|
|
417
|
+
...c
|
|
418
418
|
}) {
|
|
419
|
-
const m = i || `textarea-${V.useId()}`, p = n ? `${m}-hint` : void 0, h = s ? `${m}-error` : void 0,
|
|
419
|
+
const m = i || `textarea-${V.useId()}`, p = n ? `${m}-hint` : void 0, h = s ? `${m}-error` : void 0, d = h || p;
|
|
420
420
|
return /* @__PURE__ */ e.jsxs("div", { className: `ds-textarea-wrapper ${a ? "ds-textarea-wrapper--full" : ""} ${r ? "ds-textarea-wrapper--disabled" : ""}`, children: [
|
|
421
421
|
t && /* @__PURE__ */ e.jsx("label", { className: "ds-textarea-label", htmlFor: m, children: t }),
|
|
422
422
|
/* @__PURE__ */ e.jsx(
|
|
@@ -426,16 +426,16 @@ function is({
|
|
|
426
426
|
className: `ds-textarea ds-textarea--${o} ${s ? "ds-textarea--error" : ""} ${l ? "" : "ds-textarea--no-resize"}`,
|
|
427
427
|
disabled: r,
|
|
428
428
|
"aria-invalid": s ? "true" : "false",
|
|
429
|
-
"aria-describedby":
|
|
429
|
+
"aria-describedby": d,
|
|
430
430
|
rows: u,
|
|
431
|
-
...
|
|
431
|
+
...c
|
|
432
432
|
}
|
|
433
433
|
),
|
|
434
434
|
n && !s && /* @__PURE__ */ e.jsx("span", { id: p, className: "ds-textarea-hint", children: n }),
|
|
435
435
|
s && /* @__PURE__ */ e.jsx("span", { id: h, className: "ds-textarea-error", role: "alert", children: s })
|
|
436
436
|
] });
|
|
437
437
|
}
|
|
438
|
-
function
|
|
438
|
+
function cs({
|
|
439
439
|
label: t,
|
|
440
440
|
value: s,
|
|
441
441
|
onChange: n,
|
|
@@ -445,11 +445,11 @@ function ls({
|
|
|
445
445
|
fullWidth: i = !0,
|
|
446
446
|
size: l = "m",
|
|
447
447
|
disabled: u = !1,
|
|
448
|
-
id:
|
|
448
|
+
id: c,
|
|
449
449
|
...m
|
|
450
450
|
}) {
|
|
451
|
-
const [p, h] = A(!1), [
|
|
452
|
-
|
|
451
|
+
const [p, h] = A(!1), [d, v] = A(!1), [_, w] = A({}), [y, k] = A("down"), [j, S] = A(-1), M = R(null), D = R(null), H = R(null), q = R(null), W = c || `select-${V.useId()}`, g = `${W}-label`, C = r ? `${W}-error` : void 0, K = 150, O = (T = !1) => {
|
|
452
|
+
d || (v(!0), S(-1), q.current = setTimeout(() => {
|
|
453
453
|
var f;
|
|
454
454
|
h(!1), v(!1), T && ((f = H.current) == null || f.focus());
|
|
455
455
|
}, K));
|
|
@@ -464,7 +464,7 @@ function ls({
|
|
|
464
464
|
const T = (oe = M.current) == null ? void 0 : oe.getBoundingClientRect();
|
|
465
465
|
if (!T) return;
|
|
466
466
|
const f = window.innerHeight, $ = f - T.bottom, z = T.top, ne = $ < 300 && z > $;
|
|
467
|
-
k(ne ? "up" : "down"),
|
|
467
|
+
k(ne ? "up" : "down"), w(
|
|
468
468
|
ne ? { bottom: f - T.top + 4, left: T.left, width: T.width } : { top: T.bottom + 4, left: T.left, width: T.width }
|
|
469
469
|
);
|
|
470
470
|
};
|
|
@@ -475,10 +475,10 @@ function ls({
|
|
|
475
475
|
};
|
|
476
476
|
}, [p]), B(() => {
|
|
477
477
|
const T = (f) => {
|
|
478
|
-
M.current && !M.current.contains(f.target) && D.current && !D.current.contains(f.target) &&
|
|
478
|
+
M.current && !M.current.contains(f.target) && D.current && !D.current.contains(f.target) && O();
|
|
479
479
|
};
|
|
480
480
|
return document.addEventListener("mousedown", T), () => document.removeEventListener("mousedown", T);
|
|
481
|
-
}, [
|
|
481
|
+
}, [d]), B(() => {
|
|
482
482
|
var f;
|
|
483
483
|
if (!p || j < 0 || !D.current) return;
|
|
484
484
|
(f = D.current.querySelectorAll(".ds-select-option")[j]) == null || f.scrollIntoView({ block: "nearest" });
|
|
@@ -499,13 +499,13 @@ function ls({
|
|
|
499
499
|
break;
|
|
500
500
|
case "Enter":
|
|
501
501
|
case " ":
|
|
502
|
-
T.preventDefault(), p ? j >= 0 && (n == null || n(a[j].value),
|
|
502
|
+
T.preventDefault(), p ? j >= 0 && (n == null || n(a[j].value), O(!0)) : x();
|
|
503
503
|
break;
|
|
504
504
|
case "Escape":
|
|
505
|
-
p && (T.preventDefault(),
|
|
505
|
+
p && (T.preventDefault(), O(!0));
|
|
506
506
|
break;
|
|
507
507
|
case "Tab":
|
|
508
|
-
p &&
|
|
508
|
+
p && O(!1);
|
|
509
509
|
break;
|
|
510
510
|
}
|
|
511
511
|
}, L = a.find((T) => T.value === s), U = l === "xs" ? P[1] : l === "small" ? P[2] : P[3], G = p && /* @__PURE__ */ e.jsx(
|
|
@@ -514,13 +514,13 @@ function ls({
|
|
|
514
514
|
ref: D,
|
|
515
515
|
"data-ds-portal": "",
|
|
516
516
|
role: "listbox",
|
|
517
|
-
"aria-labelledby": t ?
|
|
517
|
+
"aria-labelledby": t ? g : void 0,
|
|
518
518
|
tabIndex: -1,
|
|
519
519
|
className: [
|
|
520
520
|
"ds-select-dropdown ds-scrollable",
|
|
521
521
|
`ds-select-dropdown--${l}`,
|
|
522
522
|
`ds-select-dropdown--${y}`,
|
|
523
|
-
|
|
523
|
+
d && "ds-select-dropdown--closing"
|
|
524
524
|
].filter(Boolean).join(" "),
|
|
525
525
|
style: _,
|
|
526
526
|
children: a.map((T, f) => /* @__PURE__ */ e.jsx(
|
|
@@ -538,7 +538,7 @@ function ls({
|
|
|
538
538
|
f === j && "ds-select-option--active"
|
|
539
539
|
].filter(Boolean).join(" "),
|
|
540
540
|
onClick: () => {
|
|
541
|
-
n == null || n(T.value),
|
|
541
|
+
n == null || n(T.value), O(!0);
|
|
542
542
|
},
|
|
543
543
|
children: T.label
|
|
544
544
|
},
|
|
@@ -547,7 +547,7 @@ function ls({
|
|
|
547
547
|
}
|
|
548
548
|
);
|
|
549
549
|
return /* @__PURE__ */ e.jsxs("div", { className: `ds-select-wrapper ${i ? "ds-select-wrapper--full" : ""} ${u ? "ds-select-wrapper--disabled" : ""}`, children: [
|
|
550
|
-
t && /* @__PURE__ */ e.jsx("label", { id:
|
|
550
|
+
t && /* @__PURE__ */ e.jsx("label", { id: g, className: "ds-select-label", children: t }),
|
|
551
551
|
/* @__PURE__ */ e.jsx("div", { className: "ds-select-container", ref: M, children: /* @__PURE__ */ e.jsxs(
|
|
552
552
|
"button",
|
|
553
553
|
{
|
|
@@ -558,12 +558,12 @@ function ls({
|
|
|
558
558
|
"aria-haspopup": "listbox",
|
|
559
559
|
"aria-expanded": p,
|
|
560
560
|
"aria-activedescendant": p && j >= 0 ? `${W}-opt-${j}` : void 0,
|
|
561
|
-
"aria-labelledby": t ?
|
|
561
|
+
"aria-labelledby": t ? g : void 0,
|
|
562
562
|
"aria-invalid": r ? "true" : "false",
|
|
563
|
-
"aria-describedby":
|
|
563
|
+
"aria-describedby": C,
|
|
564
564
|
className: `ds-select-trigger ds-select-trigger--${l} ${r ? "ds-select-trigger--error" : ""}`,
|
|
565
565
|
onClick: () => {
|
|
566
|
-
u || (p ?
|
|
566
|
+
u || (p ? O() : x());
|
|
567
567
|
},
|
|
568
568
|
onKeyDown: E,
|
|
569
569
|
disabled: u,
|
|
@@ -582,11 +582,11 @@ function ls({
|
|
|
582
582
|
]
|
|
583
583
|
}
|
|
584
584
|
) }),
|
|
585
|
-
r && /* @__PURE__ */ e.jsx("span", { id:
|
|
585
|
+
r && /* @__PURE__ */ e.jsx("span", { id: C, className: "ds-select-error", role: "alert", children: r }),
|
|
586
586
|
typeof document < "u" && pe.createPortal(G, document.body)
|
|
587
587
|
] });
|
|
588
588
|
}
|
|
589
|
-
function
|
|
589
|
+
function ds({
|
|
590
590
|
label: t,
|
|
591
591
|
value: s = 0,
|
|
592
592
|
onChange: n,
|
|
@@ -596,7 +596,7 @@ function cs({
|
|
|
596
596
|
size: i = "m",
|
|
597
597
|
disabled: l = !1,
|
|
598
598
|
hint: u,
|
|
599
|
-
error:
|
|
599
|
+
error: c,
|
|
600
600
|
...m
|
|
601
601
|
}) {
|
|
602
602
|
const p = () => {
|
|
@@ -607,7 +607,7 @@ function cs({
|
|
|
607
607
|
if (l) return;
|
|
608
608
|
const y = Math.max(Number(s) - r, a);
|
|
609
609
|
n == null || n(y);
|
|
610
|
-
},
|
|
610
|
+
}, d = (y) => {
|
|
611
611
|
if (l) return;
|
|
612
612
|
const k = y.target.value;
|
|
613
613
|
if (k === "") {
|
|
@@ -622,12 +622,12 @@ function cs({
|
|
|
622
622
|
}, v = [
|
|
623
623
|
"ds-stepper-wrapper",
|
|
624
624
|
l && "ds-stepper-wrapper--disabled",
|
|
625
|
-
|
|
625
|
+
c && "ds-stepper-wrapper--error"
|
|
626
626
|
].filter(Boolean).join(" "), _ = [
|
|
627
627
|
"ds-stepper",
|
|
628
628
|
`ds-stepper--${i}`,
|
|
629
629
|
l && "ds-stepper--disabled"
|
|
630
|
-
].filter(Boolean).join(" "),
|
|
630
|
+
].filter(Boolean).join(" "), w = i === "xs" ? P[1] : i === "small" ? P[2] : P[3];
|
|
631
631
|
return /* @__PURE__ */ e.jsxs("div", { className: v, children: [
|
|
632
632
|
t && /* @__PURE__ */ e.jsx("label", { className: "ds-stepper-label", children: t }),
|
|
633
633
|
/* @__PURE__ */ e.jsxs("div", { className: _, children: [
|
|
@@ -639,7 +639,7 @@ function cs({
|
|
|
639
639
|
onClick: h,
|
|
640
640
|
disabled: l || s <= a,
|
|
641
641
|
"aria-label": "Decrease",
|
|
642
|
-
children: /* @__PURE__ */ e.jsx(
|
|
642
|
+
children: /* @__PURE__ */ e.jsx(tt, { size: w, strokeWidth: 1.5 })
|
|
643
643
|
}
|
|
644
644
|
),
|
|
645
645
|
/* @__PURE__ */ e.jsx(
|
|
@@ -648,7 +648,7 @@ function cs({
|
|
|
648
648
|
type: "number",
|
|
649
649
|
className: "ds-stepper-input",
|
|
650
650
|
value: s,
|
|
651
|
-
onChange:
|
|
651
|
+
onChange: d,
|
|
652
652
|
min: a,
|
|
653
653
|
max: o,
|
|
654
654
|
step: r,
|
|
@@ -664,15 +664,15 @@ function cs({
|
|
|
664
664
|
onClick: p,
|
|
665
665
|
disabled: l || s >= o,
|
|
666
666
|
"aria-label": "Increase",
|
|
667
|
-
children: /* @__PURE__ */ e.jsx(
|
|
667
|
+
children: /* @__PURE__ */ e.jsx(st, { size: w, strokeWidth: 1.5 })
|
|
668
668
|
}
|
|
669
669
|
)
|
|
670
670
|
] }),
|
|
671
|
-
u && !
|
|
672
|
-
|
|
671
|
+
u && !c && /* @__PURE__ */ e.jsx("div", { className: "ds-stepper-hint", children: u }),
|
|
672
|
+
c && /* @__PURE__ */ e.jsx("div", { className: "ds-stepper-error", children: c })
|
|
673
673
|
] });
|
|
674
674
|
}
|
|
675
|
-
function
|
|
675
|
+
function us({
|
|
676
676
|
children: t,
|
|
677
677
|
padding: s = "m",
|
|
678
678
|
variant: n = "info",
|
|
@@ -683,13 +683,13 @@ function ds({
|
|
|
683
683
|
disabled: i = !1,
|
|
684
684
|
...l
|
|
685
685
|
}) {
|
|
686
|
-
const
|
|
686
|
+
const c = (a ? "interactive" : n) === "interactive" || o || r, m = [
|
|
687
687
|
"ds-card",
|
|
688
688
|
`ds-card--${s}`,
|
|
689
|
-
|
|
689
|
+
c && "ds-card--interactive"
|
|
690
690
|
].filter(Boolean).join(" ");
|
|
691
691
|
if (r) {
|
|
692
|
-
const
|
|
692
|
+
const d = (v) => {
|
|
693
693
|
if (i) {
|
|
694
694
|
v.preventDefault();
|
|
695
695
|
return;
|
|
@@ -701,14 +701,14 @@ function ds({
|
|
|
701
701
|
{
|
|
702
702
|
className: m,
|
|
703
703
|
href: i ? void 0 : r,
|
|
704
|
-
onClick:
|
|
704
|
+
onClick: d,
|
|
705
705
|
"aria-disabled": i ? "true" : void 0,
|
|
706
706
|
...l,
|
|
707
707
|
children: t
|
|
708
708
|
}
|
|
709
709
|
);
|
|
710
710
|
}
|
|
711
|
-
const p =
|
|
711
|
+
const p = c && o ? "button" : "div", h = c && o ? {
|
|
712
712
|
type: "button",
|
|
713
713
|
onClick: o,
|
|
714
714
|
disabled: i
|
|
@@ -717,32 +717,32 @@ function ds({
|
|
|
717
717
|
p,
|
|
718
718
|
{
|
|
719
719
|
className: m,
|
|
720
|
-
role:
|
|
720
|
+
role: c && !o ? "article" : void 0,
|
|
721
721
|
...h,
|
|
722
722
|
...l,
|
|
723
723
|
children: t
|
|
724
724
|
}
|
|
725
725
|
);
|
|
726
726
|
}
|
|
727
|
-
function
|
|
727
|
+
function fs({ children: t, ...s }) {
|
|
728
728
|
return /* @__PURE__ */ e.jsx("h1", { className: "ds-h1", ...s, children: t });
|
|
729
729
|
}
|
|
730
|
-
function
|
|
730
|
+
function ms({ children: t, ...s }) {
|
|
731
731
|
return /* @__PURE__ */ e.jsx("h2", { className: "ds-h2", ...s, children: t });
|
|
732
732
|
}
|
|
733
|
-
function
|
|
733
|
+
function ps({ children: t, ...s }) {
|
|
734
734
|
return /* @__PURE__ */ e.jsx("h3", { className: "ds-h3", ...s, children: t });
|
|
735
735
|
}
|
|
736
|
-
function
|
|
736
|
+
function hs({ children: t, ...s }) {
|
|
737
737
|
return /* @__PURE__ */ e.jsx("h4", { className: "ds-h4", ...s, children: t });
|
|
738
738
|
}
|
|
739
|
-
function
|
|
739
|
+
function xs({ children: t, secondary: s = !1, ...n }) {
|
|
740
740
|
return /* @__PURE__ */ e.jsx("p", { className: `ds-p1 ${s ? "ds-p1--secondary" : ""}`, ...n, children: t });
|
|
741
741
|
}
|
|
742
|
-
function
|
|
742
|
+
function jt({ children: t, secondary: s = !1, ...n }) {
|
|
743
743
|
return /* @__PURE__ */ e.jsx("p", { className: `ds-p2 ${s ? "ds-p2--secondary" : ""}`, ...n, children: t });
|
|
744
744
|
}
|
|
745
|
-
function
|
|
745
|
+
function Ke({ children: t, secondary: s = !1, ...n }) {
|
|
746
746
|
return /* @__PURE__ */ e.jsx("p", { className: `ds-p3 ${s ? "ds-p3--secondary" : ""}`, ...n, children: t });
|
|
747
747
|
}
|
|
748
748
|
function de({
|
|
@@ -759,12 +759,12 @@ function de({
|
|
|
759
759
|
].filter(Boolean).join(" "), i = a || (["info", "success", "warning", "error"].includes(s) ? "status" : void 0);
|
|
760
760
|
return /* @__PURE__ */ e.jsx("span", { className: r, role: i, ...o, children: t });
|
|
761
761
|
}
|
|
762
|
-
const
|
|
762
|
+
const Nt = {
|
|
763
763
|
info: Ie,
|
|
764
764
|
success: Ae,
|
|
765
765
|
warning: Se,
|
|
766
766
|
error: Re
|
|
767
|
-
},
|
|
767
|
+
}, vs = V.forwardRef(function({
|
|
768
768
|
children: s,
|
|
769
769
|
variant: n = "info",
|
|
770
770
|
title: a,
|
|
@@ -772,8 +772,8 @@ const jt = {
|
|
|
772
772
|
role: r,
|
|
773
773
|
...i
|
|
774
774
|
}, l) {
|
|
775
|
-
const u =
|
|
776
|
-
return /* @__PURE__ */ e.jsxs("div", { ref: l, className: `ds-alert ds-alert--${n} ${a ? "" : "ds-alert--no-title"}`, role:
|
|
775
|
+
const u = Nt[n], c = r || (n === "error" ? "alert" : "status");
|
|
776
|
+
return /* @__PURE__ */ e.jsxs("div", { ref: l, className: `ds-alert ds-alert--${n} ${a ? "" : "ds-alert--no-title"}`, role: c, ...i, children: [
|
|
777
777
|
u && /* @__PURE__ */ e.jsx("div", { className: "ds-alert__icon", children: /* @__PURE__ */ e.jsx(u, { size: P[3], strokeWidth: 1.5 }) }),
|
|
778
778
|
/* @__PURE__ */ e.jsxs("div", { className: "ds-alert__content", children: [
|
|
779
779
|
a && /* @__PURE__ */ e.jsx("div", { className: "ds-alert__title", children: a }),
|
|
@@ -790,8 +790,8 @@ const jt = {
|
|
|
790
790
|
}
|
|
791
791
|
)
|
|
792
792
|
] });
|
|
793
|
-
}),
|
|
794
|
-
function
|
|
793
|
+
}), gt = 200;
|
|
794
|
+
function _s({
|
|
795
795
|
children: t,
|
|
796
796
|
title: s,
|
|
797
797
|
onClose: n,
|
|
@@ -800,25 +800,25 @@ function vs({
|
|
|
800
800
|
subHeader: r,
|
|
801
801
|
...i
|
|
802
802
|
}) {
|
|
803
|
-
const l = R(null), u = V.useId(), [
|
|
804
|
-
!n ||
|
|
803
|
+
const l = R(null), u = V.useId(), [c, m] = A(!1), p = () => {
|
|
804
|
+
!n || c || (m(!0), setTimeout(() => {
|
|
805
805
|
m(!1), n();
|
|
806
|
-
},
|
|
806
|
+
}, gt));
|
|
807
807
|
};
|
|
808
808
|
B(() => {
|
|
809
809
|
const _ = (y) => {
|
|
810
810
|
y.key === "Escape" && p();
|
|
811
|
-
},
|
|
811
|
+
}, w = (y) => {
|
|
812
812
|
var j, S, M;
|
|
813
813
|
const k = ((S = (j = y.composedPath) == null ? void 0 : j.call(y)) == null ? void 0 : S[0]) ?? y.target;
|
|
814
814
|
l.current && !l.current.contains(k) && !((M = k.closest) != null && M.call(k, "[data-ds-portal]")) && p();
|
|
815
815
|
};
|
|
816
|
-
return document.addEventListener("keydown", _), document.addEventListener("mousedown",
|
|
817
|
-
document.removeEventListener("keydown", _), document.removeEventListener("mousedown",
|
|
816
|
+
return document.addEventListener("keydown", _), document.addEventListener("mousedown", w), () => {
|
|
817
|
+
document.removeEventListener("keydown", _), document.removeEventListener("mousedown", w);
|
|
818
818
|
};
|
|
819
|
-
}, [n,
|
|
820
|
-
const h = V.Children.toArray(t),
|
|
821
|
-
return /* @__PURE__ */ e.jsx("div", { className: ["ds-modal-overlay",
|
|
819
|
+
}, [n, c]);
|
|
820
|
+
const h = V.Children.toArray(t), d = h.find((_) => (_ == null ? void 0 : _.type) === fe), v = h.filter((_) => (_ == null ? void 0 : _.type) !== fe);
|
|
821
|
+
return /* @__PURE__ */ e.jsx("div", { className: ["ds-modal-overlay", c && "ds-modal-overlay--closing"].filter(Boolean).join(" "), ...i, children: /* @__PURE__ */ e.jsxs(
|
|
822
822
|
"div",
|
|
823
823
|
{
|
|
824
824
|
className: [`ds-modal ds-modal--${a}`, o && "ds-modal--scrollable"].filter(Boolean).join(" "),
|
|
@@ -843,7 +843,7 @@ function vs({
|
|
|
843
843
|
r && /* @__PURE__ */ e.jsx("div", { className: "ds-modal__subheader", children: r })
|
|
844
844
|
] }),
|
|
845
845
|
/* @__PURE__ */ e.jsx("div", { className: "ds-modal__body ds-scrollable", children: v }),
|
|
846
|
-
|
|
846
|
+
d
|
|
847
847
|
]
|
|
848
848
|
}
|
|
849
849
|
) });
|
|
@@ -852,31 +852,31 @@ function fe({ children: t }) {
|
|
|
852
852
|
return !t || V.Children.count(t) === 0 ? null : /* @__PURE__ */ e.jsx("div", { className: "ds-modal__footer", children: t });
|
|
853
853
|
}
|
|
854
854
|
const wt = 320;
|
|
855
|
-
function
|
|
855
|
+
function bs({
|
|
856
856
|
children: t,
|
|
857
857
|
title: s,
|
|
858
858
|
onClose: n,
|
|
859
859
|
subHeader: a,
|
|
860
860
|
...o
|
|
861
861
|
}) {
|
|
862
|
-
const r = R(null), i = V.useId(), [l, u] = A(!1),
|
|
862
|
+
const r = R(null), i = V.useId(), [l, u] = A(!1), c = () => {
|
|
863
863
|
!n || l || (u(!0), setTimeout(() => {
|
|
864
864
|
u(!1), n();
|
|
865
865
|
}, wt));
|
|
866
866
|
};
|
|
867
867
|
B(() => {
|
|
868
|
-
const
|
|
869
|
-
_.key === "Escape" &&
|
|
868
|
+
const d = (_) => {
|
|
869
|
+
_.key === "Escape" && c();
|
|
870
870
|
}, v = (_) => {
|
|
871
871
|
var y, k, j;
|
|
872
|
-
const
|
|
873
|
-
r.current && !r.current.contains(
|
|
872
|
+
const w = ((k = (y = _.composedPath) == null ? void 0 : y.call(_)) == null ? void 0 : k[0]) ?? _.target;
|
|
873
|
+
r.current && !r.current.contains(w) && !((j = w.closest) != null && j.call(w, "[data-ds-portal]")) && c();
|
|
874
874
|
};
|
|
875
|
-
return document.addEventListener("keydown",
|
|
876
|
-
document.removeEventListener("keydown",
|
|
875
|
+
return document.addEventListener("keydown", d), document.addEventListener("mousedown", v), () => {
|
|
876
|
+
document.removeEventListener("keydown", d), document.removeEventListener("mousedown", v);
|
|
877
877
|
};
|
|
878
878
|
}, [n, l]);
|
|
879
|
-
const m = V.Children.toArray(t), p = m.find((
|
|
879
|
+
const m = V.Children.toArray(t), p = m.find((d) => (d == null ? void 0 : d.type) === fe), h = m.filter((d) => (d == null ? void 0 : d.type) !== fe);
|
|
880
880
|
return /* @__PURE__ */ e.jsx(
|
|
881
881
|
"div",
|
|
882
882
|
{
|
|
@@ -899,7 +899,7 @@ function _s({
|
|
|
899
899
|
variant: "ghost",
|
|
900
900
|
size: "small",
|
|
901
901
|
icon: /* @__PURE__ */ e.jsx(ee, { size: P[2], strokeWidth: 1.5 }),
|
|
902
|
-
onClick:
|
|
902
|
+
onClick: c,
|
|
903
903
|
"aria-label": "Close"
|
|
904
904
|
}
|
|
905
905
|
),
|
|
@@ -915,7 +915,7 @@ function _s({
|
|
|
915
915
|
}
|
|
916
916
|
);
|
|
917
917
|
}
|
|
918
|
-
function
|
|
918
|
+
function yt({
|
|
919
919
|
children: t,
|
|
920
920
|
title: s = "Code",
|
|
921
921
|
defaultExpanded: n = !1,
|
|
@@ -925,15 +925,15 @@ function gt({
|
|
|
925
925
|
className: i = "",
|
|
926
926
|
...l
|
|
927
927
|
}) {
|
|
928
|
-
const [u,
|
|
929
|
-
m ? o == null || o(!a) :
|
|
930
|
-
},
|
|
928
|
+
const [u, c] = A(n), m = a !== void 0, p = m ? a : u, h = () => {
|
|
929
|
+
m ? o == null || o(!a) : c((v) => !v);
|
|
930
|
+
}, d = [
|
|
931
931
|
"ds-code-accordion",
|
|
932
932
|
`ds-code-accordion--${r}`,
|
|
933
933
|
p && "ds-code-accordion--expanded",
|
|
934
934
|
i
|
|
935
935
|
].filter(Boolean).join(" ");
|
|
936
|
-
return /* @__PURE__ */ e.jsxs("div", { className:
|
|
936
|
+
return /* @__PURE__ */ e.jsxs("div", { className: d, ...l, children: [
|
|
937
937
|
/* @__PURE__ */ e.jsxs(
|
|
938
938
|
"button",
|
|
939
939
|
{
|
|
@@ -957,10 +957,10 @@ function gt({
|
|
|
957
957
|
/* @__PURE__ */ e.jsx("div", { className: "ds-code-accordion__content", children: /* @__PURE__ */ e.jsx("div", { className: "ds-code-accordion__inner", children: /* @__PURE__ */ e.jsx("pre", { className: "ds-code-accordion__pre ds-scrollable", children: /* @__PURE__ */ e.jsx("code", { children: t }) }) }) })
|
|
958
958
|
] });
|
|
959
959
|
}
|
|
960
|
-
function
|
|
961
|
-
return s ? n ? /* @__PURE__ */ e.jsx(
|
|
960
|
+
function js({ children: t, block: s = !1, collapsible: n = !1, title: a = "Code", defaultExpanded: o = !1, ...r }) {
|
|
961
|
+
return s ? n ? /* @__PURE__ */ e.jsx(yt, { title: a, defaultExpanded: o, ...r, children: t }) : /* @__PURE__ */ e.jsx("pre", { className: "ds-code-block ds-scrollable", ...r, children: /* @__PURE__ */ e.jsx("code", { children: t }) }) : /* @__PURE__ */ e.jsx("code", { className: "ds-code-inline", ...r, children: t });
|
|
962
962
|
}
|
|
963
|
-
function
|
|
963
|
+
function Ns({ href: t, children: s, onClick: n, target: a, rel: o, ...r }) {
|
|
964
964
|
const l = a === "_blank" ? o ? `${o} noopener noreferrer` : "noopener noreferrer" : o;
|
|
965
965
|
return /* @__PURE__ */ e.jsx(
|
|
966
966
|
"a",
|
|
@@ -975,27 +975,27 @@ function js({ href: t, children: s, onClick: n, target: a, rel: o, ...r }) {
|
|
|
975
975
|
}
|
|
976
976
|
);
|
|
977
977
|
}
|
|
978
|
-
function
|
|
978
|
+
function gs({ children: t, size: s = "m", variant: n = "ghost", ...a }) {
|
|
979
979
|
return /* @__PURE__ */ e.jsx("div", { className: "ds-tabs", role: "tablist", ...a, children: V.Children.map(t, (o) => V.isValidElement(o) ? V.cloneElement(o, { size: s, variant: n }) : o) });
|
|
980
980
|
}
|
|
981
981
|
function ws({ children: t, selected: s = !1, onClick: n, size: a = "m", variant: o = "ghost", disabled: r = !1, icon: i, href: l, ...u }) {
|
|
982
|
-
const
|
|
982
|
+
const c = i && !t, m = [
|
|
983
983
|
"ds-tab",
|
|
984
984
|
`ds-tab--${a}`,
|
|
985
985
|
`ds-tab--${o}`,
|
|
986
986
|
s && "ds-tab--selected",
|
|
987
|
-
|
|
987
|
+
c && "ds-tab--icon-only"
|
|
988
988
|
].filter(Boolean).join(" "), p = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
989
989
|
i && /* @__PURE__ */ e.jsx("span", { className: "ds-tab-icon", children: i }),
|
|
990
990
|
t
|
|
991
991
|
] });
|
|
992
992
|
if (l) {
|
|
993
|
-
const h = (
|
|
993
|
+
const h = (d) => {
|
|
994
994
|
if (r) {
|
|
995
|
-
|
|
995
|
+
d.preventDefault();
|
|
996
996
|
return;
|
|
997
997
|
}
|
|
998
|
-
|
|
998
|
+
d.metaKey || d.ctrlKey || d.button === 1 || (d.preventDefault(), n == null || n(d));
|
|
999
999
|
};
|
|
1000
1000
|
return /* @__PURE__ */ e.jsx(
|
|
1001
1001
|
"a",
|
|
@@ -1024,13 +1024,13 @@ function ws({ children: t, selected: s = !1, onClick: n, size: a = "m", variant:
|
|
|
1024
1024
|
}
|
|
1025
1025
|
);
|
|
1026
1026
|
}
|
|
1027
|
-
function
|
|
1028
|
-
const r = R(null), i = R(null), [l, u] = A(!1),
|
|
1027
|
+
function ys({ options: t, value: s, onChange: n, size: a = "m", disabled: o = !1 }) {
|
|
1028
|
+
const r = R(null), i = R(null), [l, u] = A(!1), c = R(!1), m = R(null), p = R(null), h = () => {
|
|
1029
1029
|
if (!r.current) return;
|
|
1030
|
-
const
|
|
1031
|
-
if (!
|
|
1032
|
-
const v = r.current.getBoundingClientRect(), _ =
|
|
1033
|
-
i.current ? (i.current.style.transition =
|
|
1030
|
+
const d = r.current.querySelector(`[data-value="${s}"]`);
|
|
1031
|
+
if (!d) return;
|
|
1032
|
+
const v = r.current.getBoundingClientRect(), _ = d.getBoundingClientRect(), w = _.left - v.left, y = _.width;
|
|
1033
|
+
i.current ? (i.current.style.transition = c.current ? "left var(--transition-normal), width var(--transition-normal)" : "none", i.current.style.left = w + "px", i.current.style.width = y + "px", c.current = !1) : (u(!0), requestAnimationFrame(() => {
|
|
1034
1034
|
if (!i.current || !r.current) return;
|
|
1035
1035
|
const k = r.current.querySelector(`[data-value="${s}"]`);
|
|
1036
1036
|
if (!k) return;
|
|
@@ -1039,14 +1039,14 @@ function gs({ options: t, value: s, onChange: n, size: a = "m", disabled: o = !1
|
|
|
1039
1039
|
}));
|
|
1040
1040
|
};
|
|
1041
1041
|
return p.current = h, Ze(() => {
|
|
1042
|
-
const
|
|
1043
|
-
m.current = s,
|
|
1042
|
+
const d = m.current !== s;
|
|
1043
|
+
m.current = s, c.current = l && d, h();
|
|
1044
1044
|
}), B(() => {
|
|
1045
1045
|
if (!r.current) return;
|
|
1046
|
-
const
|
|
1047
|
-
|
|
1046
|
+
const d = new ResizeObserver(() => {
|
|
1047
|
+
c.current = !1, p.current();
|
|
1048
1048
|
});
|
|
1049
|
-
return
|
|
1049
|
+
return d.observe(r.current), () => d.disconnect();
|
|
1050
1050
|
}, []), /* @__PURE__ */ e.jsxs(
|
|
1051
1051
|
"div",
|
|
1052
1052
|
{
|
|
@@ -1066,21 +1066,21 @@ function gs({ options: t, value: s, onChange: n, size: a = "m", disabled: o = !1
|
|
|
1066
1066
|
"aria-hidden": "true"
|
|
1067
1067
|
}
|
|
1068
1068
|
),
|
|
1069
|
-
t.map((
|
|
1069
|
+
t.map((d) => /* @__PURE__ */ e.jsxs(
|
|
1070
1070
|
"button",
|
|
1071
1071
|
{
|
|
1072
1072
|
type: "button",
|
|
1073
|
-
"data-value":
|
|
1074
|
-
className: ["ds-seg__btn", s ===
|
|
1075
|
-
onClick: () => !o && n(
|
|
1076
|
-
"aria-pressed": s ===
|
|
1073
|
+
"data-value": d.value,
|
|
1074
|
+
className: ["ds-seg__btn", s === d.value && "ds-seg__btn--active"].filter(Boolean).join(" "),
|
|
1075
|
+
onClick: () => !o && n(d.value),
|
|
1076
|
+
"aria-pressed": s === d.value,
|
|
1077
1077
|
disabled: o,
|
|
1078
1078
|
children: [
|
|
1079
|
-
|
|
1080
|
-
|
|
1079
|
+
d.icon && /* @__PURE__ */ e.jsx("span", { className: "ds-seg__btn-icon", "aria-hidden": "true", children: d.icon }),
|
|
1080
|
+
d.label
|
|
1081
1081
|
]
|
|
1082
1082
|
},
|
|
1083
|
-
|
|
1083
|
+
d.value
|
|
1084
1084
|
))
|
|
1085
1085
|
]
|
|
1086
1086
|
}
|
|
@@ -1095,8 +1095,8 @@ function Be({
|
|
|
1095
1095
|
padding: r = "m",
|
|
1096
1096
|
...i
|
|
1097
1097
|
}) {
|
|
1098
|
-
const [l, u] = A(n),
|
|
1099
|
-
|
|
1098
|
+
const [l, u] = A(n), c = a !== void 0, m = c ? a : l, p = () => {
|
|
1099
|
+
c ? o == null || o(!a) : u((d) => !d);
|
|
1100
1100
|
}, h = [
|
|
1101
1101
|
"ds-accordion",
|
|
1102
1102
|
`ds-accordion--${r}`,
|
|
@@ -1127,7 +1127,7 @@ function Be({
|
|
|
1127
1127
|
] });
|
|
1128
1128
|
}
|
|
1129
1129
|
const re = 8, ue = 8;
|
|
1130
|
-
function
|
|
1130
|
+
function kt(t, s, n) {
|
|
1131
1131
|
const a = window.innerWidth;
|
|
1132
1132
|
let o, r;
|
|
1133
1133
|
switch (t) {
|
|
@@ -1149,7 +1149,7 @@ function yt(t, s, n) {
|
|
|
1149
1149
|
const i = Math.max(ue, Math.min(a - n.width - ue, r)), l = r - i;
|
|
1150
1150
|
return { top: o, left: i, arrowOffset: l };
|
|
1151
1151
|
}
|
|
1152
|
-
function
|
|
1152
|
+
function Et(t, s, n) {
|
|
1153
1153
|
const a = window.innerWidth, o = window.innerHeight;
|
|
1154
1154
|
if (t.top >= s + re + ue) return "top";
|
|
1155
1155
|
if (o - t.bottom >= s + re + ue) return "bottom";
|
|
@@ -1158,11 +1158,11 @@ function kt(t, s, n) {
|
|
|
1158
1158
|
const r = Math.max(t.top, o - t.bottom, t.left, a - t.right);
|
|
1159
1159
|
return r === t.top ? "top" : r === o - t.bottom ? "bottom" : r === a - t.right ? "right" : "left";
|
|
1160
1160
|
}
|
|
1161
|
-
function
|
|
1162
|
-
const [o, r] = A(!1), [i, l] = A({ visibility: "hidden" }), [u,
|
|
1161
|
+
function De({ children: t, content: s, position: n, ...a }) {
|
|
1162
|
+
const [o, r] = A(!1), [i, l] = A({ visibility: "hidden" }), [u, c] = A(n || "top"), m = R(null), p = R(null), h = R(!1), d = () => {
|
|
1163
1163
|
if (!m.current || !p.current) return;
|
|
1164
|
-
const _ = m.current.getBoundingClientRect(),
|
|
1165
|
-
|
|
1164
|
+
const _ = m.current.getBoundingClientRect(), w = p.current.getBoundingClientRect(), y = n || Et(_, w.height, w.width), { top: k, left: j, arrowOffset: S } = kt(y, _, w);
|
|
1165
|
+
c(y), l({
|
|
1166
1166
|
position: "fixed",
|
|
1167
1167
|
top: k,
|
|
1168
1168
|
left: j,
|
|
@@ -1173,14 +1173,14 @@ function Ke({ children: t, content: s, position: n, ...a }) {
|
|
|
1173
1173
|
if (B(() => {
|
|
1174
1174
|
if (!o) return;
|
|
1175
1175
|
l({ position: "fixed", visibility: "hidden" });
|
|
1176
|
-
const _ = requestAnimationFrame(
|
|
1177
|
-
return window.addEventListener("scroll",
|
|
1178
|
-
cancelAnimationFrame(_), window.removeEventListener("scroll",
|
|
1176
|
+
const _ = requestAnimationFrame(d);
|
|
1177
|
+
return window.addEventListener("scroll", d, !0), window.addEventListener("resize", d), () => {
|
|
1178
|
+
cancelAnimationFrame(_), window.removeEventListener("scroll", d, !0), window.removeEventListener("resize", d);
|
|
1179
1179
|
};
|
|
1180
1180
|
}, [o, n]), B(() => {
|
|
1181
1181
|
if (!o) return;
|
|
1182
|
-
const _ = (
|
|
1183
|
-
m.current && !m.current.contains(
|
|
1182
|
+
const _ = (w) => {
|
|
1183
|
+
m.current && !m.current.contains(w.target) && r(!1);
|
|
1184
1184
|
};
|
|
1185
1185
|
return document.addEventListener("touchstart", _), () => document.removeEventListener("touchstart", _);
|
|
1186
1186
|
}, [o]), !s) return t;
|
|
@@ -1217,7 +1217,7 @@ function Ke({ children: t, content: s, position: n, ...a }) {
|
|
|
1217
1217
|
}
|
|
1218
1218
|
);
|
|
1219
1219
|
}
|
|
1220
|
-
function
|
|
1220
|
+
function ks({
|
|
1221
1221
|
checked: t = !1,
|
|
1222
1222
|
onChange: s,
|
|
1223
1223
|
size: n = "m",
|
|
@@ -1239,7 +1239,7 @@ function ys({
|
|
|
1239
1239
|
id: l,
|
|
1240
1240
|
className: "ds-toggle__input",
|
|
1241
1241
|
checked: t,
|
|
1242
|
-
onChange: (
|
|
1242
|
+
onChange: (c) => s == null ? void 0 : s(c.target.checked),
|
|
1243
1243
|
disabled: a,
|
|
1244
1244
|
...i
|
|
1245
1245
|
}
|
|
@@ -1248,7 +1248,7 @@ function ys({
|
|
|
1248
1248
|
o && /* @__PURE__ */ e.jsx("span", { className: "ds-toggle__label", children: o })
|
|
1249
1249
|
] });
|
|
1250
1250
|
}
|
|
1251
|
-
function
|
|
1251
|
+
function Es({
|
|
1252
1252
|
checked: t = !1,
|
|
1253
1253
|
onChange: s,
|
|
1254
1254
|
size: n = "m",
|
|
@@ -1261,7 +1261,7 @@ function ks({
|
|
|
1261
1261
|
"ds-checkbox",
|
|
1262
1262
|
`ds-checkbox--${n}`,
|
|
1263
1263
|
a && "ds-checkbox--disabled"
|
|
1264
|
-
].filter(Boolean).join(" "),
|
|
1264
|
+
].filter(Boolean).join(" "), c = n === "xs" ? 10 : n === "small" ? 14 : n === "large" ? 20 : 16;
|
|
1265
1265
|
return /* @__PURE__ */ e.jsxs("label", { className: u, htmlFor: l, children: [
|
|
1266
1266
|
/* @__PURE__ */ e.jsx(
|
|
1267
1267
|
"input",
|
|
@@ -1278,7 +1278,7 @@ function ks({
|
|
|
1278
1278
|
/* @__PURE__ */ e.jsx("span", { className: "ds-checkbox__box", children: t && /* @__PURE__ */ e.jsx(
|
|
1279
1279
|
Te,
|
|
1280
1280
|
{
|
|
1281
|
-
size:
|
|
1281
|
+
size: c,
|
|
1282
1282
|
strokeWidth: 2.5,
|
|
1283
1283
|
className: "ds-checkbox__icon"
|
|
1284
1284
|
}
|
|
@@ -1286,7 +1286,7 @@ function ks({
|
|
|
1286
1286
|
o && /* @__PURE__ */ e.jsx("span", { className: "ds-checkbox__label", children: o })
|
|
1287
1287
|
] });
|
|
1288
1288
|
}
|
|
1289
|
-
function
|
|
1289
|
+
function $s({
|
|
1290
1290
|
checked: t = !1,
|
|
1291
1291
|
onChange: s,
|
|
1292
1292
|
size: n = "m",
|
|
@@ -1297,17 +1297,17 @@ function Es({
|
|
|
1297
1297
|
id: l,
|
|
1298
1298
|
...u
|
|
1299
1299
|
}) {
|
|
1300
|
-
const
|
|
1300
|
+
const c = l || `radio-${V.useId()}`, m = [
|
|
1301
1301
|
"ds-radio",
|
|
1302
1302
|
`ds-radio--${n}`,
|
|
1303
1303
|
a && "ds-radio--disabled"
|
|
1304
1304
|
].filter(Boolean).join(" ");
|
|
1305
|
-
return /* @__PURE__ */ e.jsxs("label", { className: m, htmlFor:
|
|
1305
|
+
return /* @__PURE__ */ e.jsxs("label", { className: m, htmlFor: c, children: [
|
|
1306
1306
|
/* @__PURE__ */ e.jsx(
|
|
1307
1307
|
"input",
|
|
1308
1308
|
{
|
|
1309
1309
|
type: "radio",
|
|
1310
|
-
id:
|
|
1310
|
+
id: c,
|
|
1311
1311
|
className: "ds-radio__input",
|
|
1312
1312
|
checked: t,
|
|
1313
1313
|
onChange: (p) => s == null ? void 0 : s(p.target.checked),
|
|
@@ -1321,7 +1321,7 @@ function Es({
|
|
|
1321
1321
|
o && /* @__PURE__ */ e.jsx("span", { className: "ds-radio__label", children: o })
|
|
1322
1322
|
] });
|
|
1323
1323
|
}
|
|
1324
|
-
function
|
|
1324
|
+
function $t({ width: t, height: s, shape: n = "rect", aspectRatio: a, className: o = "", style: r = {}, ...i }) {
|
|
1325
1325
|
return /* @__PURE__ */ e.jsx(
|
|
1326
1326
|
"span",
|
|
1327
1327
|
{
|
|
@@ -1332,7 +1332,7 @@ function Et({ width: t, height: s, shape: n = "rect", aspectRatio: a, className:
|
|
|
1332
1332
|
}
|
|
1333
1333
|
);
|
|
1334
1334
|
}
|
|
1335
|
-
function
|
|
1335
|
+
function Tt({ lines: t = 1, lastLineWidth: s = "70%", gap: n, className: a = "", style: o = {}, ...r }) {
|
|
1336
1336
|
return /* @__PURE__ */ e.jsx(
|
|
1337
1337
|
"span",
|
|
1338
1338
|
{
|
|
@@ -1351,20 +1351,20 @@ function $t({ lines: t = 1, lastLineWidth: s = "70%", gap: n, className: a = "",
|
|
|
1351
1351
|
}
|
|
1352
1352
|
);
|
|
1353
1353
|
}
|
|
1354
|
-
|
|
1355
|
-
function
|
|
1354
|
+
$t.Text = Tt;
|
|
1355
|
+
function Rt(t) {
|
|
1356
1356
|
let s = 2166136261;
|
|
1357
1357
|
for (let n = 0; n < t.length; n++)
|
|
1358
1358
|
s ^= t.charCodeAt(n), s = Math.imul(s, 16777619) >>> 0;
|
|
1359
1359
|
return s % 360;
|
|
1360
1360
|
}
|
|
1361
|
-
function
|
|
1361
|
+
function St(t) {
|
|
1362
1362
|
if (!t) return "";
|
|
1363
1363
|
const s = t.trim().split(/\s+/);
|
|
1364
1364
|
return s.length >= 2 ? (s[0][0] + s[1][0]).toUpperCase() : t[0].toUpperCase();
|
|
1365
1365
|
}
|
|
1366
|
-
function
|
|
1367
|
-
const l =
|
|
1366
|
+
function Ts({ seed: t, icon: s, src: n, size: a = 32, className: o = "", style: r = {}, ...i }) {
|
|
1367
|
+
const l = Rt(t ?? ""), [u, c] = A(!1), m = s ?? /* @__PURE__ */ e.jsx("span", { className: "ds-avatar__initials", children: St(t) });
|
|
1368
1368
|
return /* @__PURE__ */ e.jsx(
|
|
1369
1369
|
"div",
|
|
1370
1370
|
{
|
|
@@ -1372,11 +1372,11 @@ function $s({ seed: t, icon: s, src: n, size: a = 32, className: o = "", style:
|
|
|
1372
1372
|
style: { width: a, height: a, "--ds-avatar-h": l, ...r },
|
|
1373
1373
|
"aria-hidden": "true",
|
|
1374
1374
|
...i,
|
|
1375
|
-
children: n && !u ? /* @__PURE__ */ e.jsx("img", { src: n, alt: "", onError: () =>
|
|
1375
|
+
children: n && !u ? /* @__PURE__ */ e.jsx("img", { src: n, alt: "", onError: () => c(!0) }) : m
|
|
1376
1376
|
}
|
|
1377
1377
|
);
|
|
1378
1378
|
}
|
|
1379
|
-
function
|
|
1379
|
+
function Rs({
|
|
1380
1380
|
children: t,
|
|
1381
1381
|
size: s = "compact",
|
|
1382
1382
|
stickyTop: n,
|
|
@@ -1406,13 +1406,13 @@ function Ts({
|
|
|
1406
1406
|
}
|
|
1407
1407
|
);
|
|
1408
1408
|
}
|
|
1409
|
-
function
|
|
1409
|
+
function Ss({ children: t, ...s }) {
|
|
1410
1410
|
return /* @__PURE__ */ e.jsx("thead", { ...s, children: t });
|
|
1411
1411
|
}
|
|
1412
|
-
function
|
|
1412
|
+
function As({ children: t, ...s }) {
|
|
1413
1413
|
return /* @__PURE__ */ e.jsx("tbody", { ...s, children: t });
|
|
1414
1414
|
}
|
|
1415
|
-
function
|
|
1415
|
+
function Is({ children: t, interactive: s, selected: n, subheader: a, exiting: o, updated: r, className: i = "", onClick: l, ...u }) {
|
|
1416
1416
|
return /* @__PURE__ */ e.jsx(
|
|
1417
1417
|
"tr",
|
|
1418
1418
|
{
|
|
@@ -1431,11 +1431,11 @@ function As({ children: t, interactive: s, selected: n, subheader: a, exiting: o
|
|
|
1431
1431
|
}
|
|
1432
1432
|
);
|
|
1433
1433
|
}
|
|
1434
|
-
function
|
|
1434
|
+
function Bs({ children: t, colSpan: s = 999, ...n }) {
|
|
1435
1435
|
return /* @__PURE__ */ e.jsx("tr", { className: "ds-table-row ds-table-row--subheader", ...n, children: /* @__PURE__ */ e.jsx("td", { colSpan: s, children: t }) });
|
|
1436
1436
|
}
|
|
1437
|
-
function
|
|
1438
|
-
const u = !!a || n !== void 0,
|
|
1437
|
+
function Ds({ children: t, align: s = "left", sortDir: n, onSort: a, width: o, className: r = "", style: i = {}, ...l }) {
|
|
1438
|
+
const u = !!a || n !== void 0, c = n === "asc" ? nt : n === "desc" ? ve : rt;
|
|
1439
1439
|
return /* @__PURE__ */ e.jsx(
|
|
1440
1440
|
"th",
|
|
1441
1441
|
{
|
|
@@ -1451,12 +1451,12 @@ function Bs({ children: t, align: s = "left", sortDir: n, onSort: a, width: o, c
|
|
|
1451
1451
|
...l,
|
|
1452
1452
|
children: u ? /* @__PURE__ */ e.jsxs("span", { className: "ds-th__inner", children: [
|
|
1453
1453
|
t,
|
|
1454
|
-
/* @__PURE__ */ e.jsx("span", { className: "ds-th__sort-icon", children: /* @__PURE__ */ e.jsx(
|
|
1454
|
+
/* @__PURE__ */ e.jsx("span", { className: "ds-th__sort-icon", children: /* @__PURE__ */ e.jsx(c, { size: 11, strokeWidth: 2.5 }) })
|
|
1455
1455
|
] }) : t
|
|
1456
1456
|
}
|
|
1457
1457
|
);
|
|
1458
1458
|
}
|
|
1459
|
-
function
|
|
1459
|
+
function Ls({ children: t, align: s = "left", secondary: n, muted: a, truncate: o, nowrap: r, className: i = "", ...l }) {
|
|
1460
1460
|
return /* @__PURE__ */ e.jsx(
|
|
1461
1461
|
"td",
|
|
1462
1462
|
{
|
|
@@ -1474,7 +1474,7 @@ function Ds({ children: t, align: s = "left", secondary: n, muted: a, truncate:
|
|
|
1474
1474
|
}
|
|
1475
1475
|
);
|
|
1476
1476
|
}
|
|
1477
|
-
function
|
|
1477
|
+
function Ps({
|
|
1478
1478
|
icon: t,
|
|
1479
1479
|
title: s,
|
|
1480
1480
|
description: n,
|
|
@@ -1497,7 +1497,7 @@ function Ls({
|
|
|
1497
1497
|
}
|
|
1498
1498
|
);
|
|
1499
1499
|
}
|
|
1500
|
-
function
|
|
1500
|
+
function Ms({
|
|
1501
1501
|
label: t,
|
|
1502
1502
|
hint: s,
|
|
1503
1503
|
error: n,
|
|
@@ -1507,9 +1507,9 @@ function Ps({
|
|
|
1507
1507
|
children: i,
|
|
1508
1508
|
className: l = "",
|
|
1509
1509
|
style: u,
|
|
1510
|
-
...
|
|
1510
|
+
...c
|
|
1511
1511
|
}) {
|
|
1512
|
-
const m = V.useId(), p = r ?? m, h = `${p}-hint`,
|
|
1512
|
+
const m = V.useId(), p = r ?? m, h = `${p}-hint`, d = `${p}-error`;
|
|
1513
1513
|
return /* @__PURE__ */ e.jsxs(
|
|
1514
1514
|
"div",
|
|
1515
1515
|
{
|
|
@@ -1518,17 +1518,17 @@ function Ps({
|
|
|
1518
1518
|
"data-required": a ? "" : void 0,
|
|
1519
1519
|
"data-disabled": o ? "" : void 0,
|
|
1520
1520
|
style: u,
|
|
1521
|
-
...
|
|
1521
|
+
...c,
|
|
1522
1522
|
children: [
|
|
1523
1523
|
t && /* @__PURE__ */ e.jsx("label", { className: "ds-field-label", htmlFor: p, children: t }),
|
|
1524
1524
|
/* @__PURE__ */ e.jsx("div", { className: "ds-field-control", children: i }),
|
|
1525
1525
|
s && !n && /* @__PURE__ */ e.jsx("p", { className: "ds-field-hint", id: h, children: s }),
|
|
1526
|
-
n && /* @__PURE__ */ e.jsx("p", { className: "ds-field-error", id:
|
|
1526
|
+
n && /* @__PURE__ */ e.jsx("p", { className: "ds-field-error", id: d, role: "alert", children: n })
|
|
1527
1527
|
]
|
|
1528
1528
|
}
|
|
1529
1529
|
);
|
|
1530
1530
|
}
|
|
1531
|
-
function
|
|
1531
|
+
function zs({ label: t, value: s, delta: n, size: a = "m", inline: o = !1, className: r = "", style: i, ...l }) {
|
|
1532
1532
|
const u = n != null && n.startsWith("+") ? "up" : n != null && n.startsWith("-") ? "down" : "neutral";
|
|
1533
1533
|
return /* @__PURE__ */ e.jsxs(
|
|
1534
1534
|
"div",
|
|
@@ -1549,7 +1549,7 @@ function Ms({ label: t, value: s, delta: n, size: a = "m", inline: o = !1, class
|
|
|
1549
1549
|
}
|
|
1550
1550
|
);
|
|
1551
1551
|
}
|
|
1552
|
-
function
|
|
1552
|
+
function Cs({
|
|
1553
1553
|
children: t,
|
|
1554
1554
|
separator: s = "/",
|
|
1555
1555
|
"aria-label": n = "Breadcrumb",
|
|
@@ -1582,7 +1582,7 @@ function Os({
|
|
|
1582
1582
|
style: i,
|
|
1583
1583
|
...l
|
|
1584
1584
|
}) {
|
|
1585
|
-
const u =
|
|
1585
|
+
const u = At(t, s, a);
|
|
1586
1586
|
return /* @__PURE__ */ e.jsxs(
|
|
1587
1587
|
"nav",
|
|
1588
1588
|
{
|
|
@@ -1598,20 +1598,20 @@ function Os({
|
|
|
1598
1598
|
onClick: () => n == null ? void 0 : n(t - 1),
|
|
1599
1599
|
disabled: t <= 1,
|
|
1600
1600
|
"aria-label": "Previous page",
|
|
1601
|
-
children: /* @__PURE__ */ e.jsx(
|
|
1601
|
+
children: /* @__PURE__ */ e.jsx(at, { size: 16 })
|
|
1602
1602
|
}
|
|
1603
1603
|
),
|
|
1604
1604
|
u.map(
|
|
1605
|
-
(
|
|
1605
|
+
(c, m) => c === "…" ? /* @__PURE__ */ e.jsx("span", { className: "ds-pagination-gap", "aria-hidden": "true", children: "…" }, `gap-${m}`) : /* @__PURE__ */ e.jsx(
|
|
1606
1606
|
"button",
|
|
1607
1607
|
{
|
|
1608
|
-
className: `ds-pagination-page${
|
|
1609
|
-
onClick: () =>
|
|
1610
|
-
"aria-current":
|
|
1611
|
-
"aria-label": `Page ${
|
|
1612
|
-
children:
|
|
1608
|
+
className: `ds-pagination-page${c === t ? " ds-pagination-page--current" : ""}`,
|
|
1609
|
+
onClick: () => c !== t && (n == null ? void 0 : n(c)),
|
|
1610
|
+
"aria-current": c === t ? "page" : void 0,
|
|
1611
|
+
"aria-label": `Page ${c}`,
|
|
1612
|
+
children: c
|
|
1613
1613
|
},
|
|
1614
|
-
|
|
1614
|
+
c
|
|
1615
1615
|
)
|
|
1616
1616
|
),
|
|
1617
1617
|
/* @__PURE__ */ e.jsx(
|
|
@@ -1621,46 +1621,46 @@ function Os({
|
|
|
1621
1621
|
onClick: () => n == null ? void 0 : n(t + 1),
|
|
1622
1622
|
disabled: t >= s,
|
|
1623
1623
|
"aria-label": "Next page",
|
|
1624
|
-
children: /* @__PURE__ */ e.jsx(
|
|
1624
|
+
children: /* @__PURE__ */ e.jsx(ot, { size: 16 })
|
|
1625
1625
|
}
|
|
1626
1626
|
)
|
|
1627
1627
|
]
|
|
1628
1628
|
}
|
|
1629
1629
|
);
|
|
1630
1630
|
}
|
|
1631
|
-
function
|
|
1631
|
+
function At(t, s, n) {
|
|
1632
1632
|
if (s <= 7) return Array.from({ length: s }, (i, l) => l + 1);
|
|
1633
1633
|
const a = Math.max(2, t - n), o = Math.min(s - 1, t + n), r = [1];
|
|
1634
1634
|
a > 2 && r.push("…");
|
|
1635
1635
|
for (let i = a; i <= o; i++) r.push(i);
|
|
1636
1636
|
return o < s - 1 && r.push("…"), r.push(s), r;
|
|
1637
1637
|
}
|
|
1638
|
-
const
|
|
1639
|
-
function
|
|
1638
|
+
const It = 200;
|
|
1639
|
+
function Fs({
|
|
1640
1640
|
children: t,
|
|
1641
1641
|
title: s,
|
|
1642
1642
|
onClose: n,
|
|
1643
1643
|
side: a = "right",
|
|
1644
1644
|
...o
|
|
1645
1645
|
}) {
|
|
1646
|
-
const r = R(null), i = V.useId(), [l, u] = A(!1),
|
|
1646
|
+
const r = R(null), i = V.useId(), [l, u] = A(!1), c = () => {
|
|
1647
1647
|
!n || l || (u(!0), setTimeout(() => {
|
|
1648
1648
|
u(!1), n();
|
|
1649
|
-
},
|
|
1649
|
+
}, It));
|
|
1650
1650
|
};
|
|
1651
1651
|
B(() => {
|
|
1652
|
-
const
|
|
1653
|
-
_.key === "Escape" &&
|
|
1652
|
+
const d = (_) => {
|
|
1653
|
+
_.key === "Escape" && c();
|
|
1654
1654
|
}, v = (_) => {
|
|
1655
1655
|
var y, k, j;
|
|
1656
|
-
const
|
|
1657
|
-
r.current && !r.current.contains(
|
|
1656
|
+
const w = ((k = (y = _.composedPath) == null ? void 0 : y.call(_)) == null ? void 0 : k[0]) ?? _.target;
|
|
1657
|
+
r.current && !r.current.contains(w) && !((j = w.closest) != null && j.call(w, "[data-ds-portal]")) && c();
|
|
1658
1658
|
};
|
|
1659
|
-
return document.addEventListener("keydown",
|
|
1660
|
-
document.removeEventListener("keydown",
|
|
1659
|
+
return document.addEventListener("keydown", d), document.addEventListener("mousedown", v), () => {
|
|
1660
|
+
document.removeEventListener("keydown", d), document.removeEventListener("mousedown", v);
|
|
1661
1661
|
};
|
|
1662
1662
|
}, [n, l]);
|
|
1663
|
-
const m = V.Children.toArray(t), p = m.find((
|
|
1663
|
+
const m = V.Children.toArray(t), p = m.find((d) => (d == null ? void 0 : d.type) === Fe), h = m.filter((d) => (d == null ? void 0 : d.type) !== Fe);
|
|
1664
1664
|
return /* @__PURE__ */ e.jsx(
|
|
1665
1665
|
"div",
|
|
1666
1666
|
{
|
|
@@ -1678,7 +1678,7 @@ function Cs({
|
|
|
1678
1678
|
children: [
|
|
1679
1679
|
/* @__PURE__ */ e.jsxs("header", { className: "ds-drawer-header", children: [
|
|
1680
1680
|
s && /* @__PURE__ */ e.jsx("h3", { id: i, className: "ds-drawer-title", children: s }),
|
|
1681
|
-
n && /* @__PURE__ */ e.jsx("button", { className: "ds-drawer-close", onClick:
|
|
1681
|
+
n && /* @__PURE__ */ e.jsx("button", { className: "ds-drawer-close", onClick: c, "aria-label": "Close drawer", children: /* @__PURE__ */ e.jsx(ee, { size: P[2], strokeWidth: 1.5 }) })
|
|
1682
1682
|
] }),
|
|
1683
1683
|
/* @__PURE__ */ e.jsx("div", { className: "ds-drawer-body ds-scrollable", children: h }),
|
|
1684
1684
|
p
|
|
@@ -1688,35 +1688,35 @@ function Cs({
|
|
|
1688
1688
|
}
|
|
1689
1689
|
);
|
|
1690
1690
|
}
|
|
1691
|
-
function
|
|
1691
|
+
function Fe({ children: t }) {
|
|
1692
1692
|
return /* @__PURE__ */ e.jsx("footer", { className: "ds-drawer-footer", children: t });
|
|
1693
1693
|
}
|
|
1694
|
-
const
|
|
1695
|
-
function
|
|
1694
|
+
const Bt = 320;
|
|
1695
|
+
function Ws({
|
|
1696
1696
|
children: t,
|
|
1697
1697
|
title: s,
|
|
1698
1698
|
onClose: n,
|
|
1699
1699
|
subHeader: a,
|
|
1700
1700
|
...o
|
|
1701
1701
|
}) {
|
|
1702
|
-
const r = R(null), i = V.useId(), [l, u] = A(!1),
|
|
1702
|
+
const r = R(null), i = V.useId(), [l, u] = A(!1), c = () => {
|
|
1703
1703
|
!n || l || (u(!0), setTimeout(() => {
|
|
1704
1704
|
u(!1), n();
|
|
1705
|
-
},
|
|
1705
|
+
}, Bt));
|
|
1706
1706
|
};
|
|
1707
1707
|
B(() => {
|
|
1708
|
-
const
|
|
1709
|
-
_.key === "Escape" &&
|
|
1708
|
+
const d = (_) => {
|
|
1709
|
+
_.key === "Escape" && c();
|
|
1710
1710
|
}, v = (_) => {
|
|
1711
1711
|
var y, k, j;
|
|
1712
|
-
const
|
|
1713
|
-
r.current && !r.current.contains(
|
|
1712
|
+
const w = ((k = (y = _.composedPath) == null ? void 0 : y.call(_)) == null ? void 0 : k[0]) ?? _.target;
|
|
1713
|
+
r.current && !r.current.contains(w) && !((j = w.closest) != null && j.call(w, "[data-ds-portal]")) && c();
|
|
1714
1714
|
};
|
|
1715
|
-
return document.addEventListener("keydown",
|
|
1716
|
-
document.removeEventListener("keydown",
|
|
1715
|
+
return document.addEventListener("keydown", d), document.addEventListener("mousedown", v), () => {
|
|
1716
|
+
document.removeEventListener("keydown", d), document.removeEventListener("mousedown", v);
|
|
1717
1717
|
};
|
|
1718
1718
|
}, [n, l]);
|
|
1719
|
-
const m = V.Children.toArray(t), p = m.find((
|
|
1719
|
+
const m = V.Children.toArray(t), p = m.find((d) => (d == null ? void 0 : d.type) === We || (d == null ? void 0 : d.type) === fe), h = m.filter((d) => (d == null ? void 0 : d.type) !== We && (d == null ? void 0 : d.type) !== fe);
|
|
1720
1720
|
return /* @__PURE__ */ e.jsx(
|
|
1721
1721
|
"div",
|
|
1722
1722
|
{
|
|
@@ -1738,7 +1738,7 @@ function Fs({
|
|
|
1738
1738
|
variant: "ghost",
|
|
1739
1739
|
size: "small",
|
|
1740
1740
|
icon: /* @__PURE__ */ e.jsx(ee, { size: P[2], strokeWidth: 1.5 }),
|
|
1741
|
-
onClick:
|
|
1741
|
+
onClick: c,
|
|
1742
1742
|
"aria-label": "Close"
|
|
1743
1743
|
}
|
|
1744
1744
|
),
|
|
@@ -1754,11 +1754,11 @@ function Fs({
|
|
|
1754
1754
|
}
|
|
1755
1755
|
);
|
|
1756
1756
|
}
|
|
1757
|
-
function
|
|
1757
|
+
function We({ children: t }) {
|
|
1758
1758
|
return !t || V.Children.count(t) === 0 ? null : /* @__PURE__ */ e.jsx("div", { className: "ds-side-page__footer", children: t });
|
|
1759
1759
|
}
|
|
1760
|
-
const
|
|
1761
|
-
function
|
|
1760
|
+
const _e = et({ collapsed: !1, side: "left" });
|
|
1761
|
+
function Us({
|
|
1762
1762
|
children: t,
|
|
1763
1763
|
collapsed: s = !1,
|
|
1764
1764
|
side: n = "left",
|
|
@@ -1771,9 +1771,9 @@ function Ws({
|
|
|
1771
1771
|
`ds-nav-rail--${n}`,
|
|
1772
1772
|
a
|
|
1773
1773
|
].filter(Boolean).join(" ");
|
|
1774
|
-
return /* @__PURE__ */ e.jsx(
|
|
1774
|
+
return /* @__PURE__ */ e.jsx(_e.Provider, { value: { collapsed: s, side: n }, children: /* @__PURE__ */ e.jsx("nav", { className: r, ...o, children: t }) });
|
|
1775
1775
|
}
|
|
1776
|
-
function
|
|
1776
|
+
function Vs({
|
|
1777
1777
|
icon: t,
|
|
1778
1778
|
label: s,
|
|
1779
1779
|
selected: n = !1,
|
|
@@ -1783,11 +1783,11 @@ function Us({
|
|
|
1783
1783
|
count: i,
|
|
1784
1784
|
updated: l = !1,
|
|
1785
1785
|
open: u = !1,
|
|
1786
|
-
onboarding:
|
|
1786
|
+
onboarding: c = !1,
|
|
1787
1787
|
className: m = "",
|
|
1788
1788
|
...p
|
|
1789
1789
|
}) {
|
|
1790
|
-
const { collapsed: h, side:
|
|
1790
|
+
const { collapsed: h, side: d } = je(_e), w = {
|
|
1791
1791
|
className: [
|
|
1792
1792
|
"ds-nav-rail__item",
|
|
1793
1793
|
m
|
|
@@ -1801,32 +1801,32 @@ function Us({
|
|
|
1801
1801
|
"data-selected": n || void 0,
|
|
1802
1802
|
"data-disabled": a || void 0,
|
|
1803
1803
|
"data-open": u || void 0,
|
|
1804
|
-
"data-onboarding":
|
|
1804
|
+
"data-onboarding": c || void 0
|
|
1805
1805
|
},
|
|
1806
1806
|
...p
|
|
1807
|
-
}, y = i != null, k =
|
|
1807
|
+
}, y = i != null, k = d === "left" ? "right" : "left", j = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1808
1808
|
/* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__icon", "aria-hidden": "true", children: t }),
|
|
1809
1809
|
!h && /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__label", children: s }),
|
|
1810
1810
|
!h && l && /* @__PURE__ */ e.jsx(de, { size: "xs", variant: "accent", className: "ds-nav-rail__badge-expanded", children: "New" }),
|
|
1811
1811
|
!h && y && /* @__PURE__ */ e.jsx("span", { className: ["ds-nav-rail__count", i === 0 && "ds-nav-rail__count--zero"].filter(Boolean).join(" "), children: i }),
|
|
1812
1812
|
h && l && /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__dot", "aria-hidden": "true" })
|
|
1813
|
-
] }), S = o ? /* @__PURE__ */ e.jsx("a", { href: a ? void 0 : o, ...
|
|
1814
|
-
return h ? /* @__PURE__ */ e.jsx(
|
|
1813
|
+
] }), S = o ? /* @__PURE__ */ e.jsx("a", { href: a ? void 0 : o, ...w, children: j }) : /* @__PURE__ */ e.jsx("button", { type: "button", ...w, children: j });
|
|
1814
|
+
return h ? /* @__PURE__ */ e.jsx(De, { content: s, position: k, children: S }) : S;
|
|
1815
1815
|
}
|
|
1816
|
-
function
|
|
1816
|
+
function Ys({ children: t, className: s = "", ...n }) {
|
|
1817
1817
|
return /* @__PURE__ */ e.jsx("div", { className: ["ds-nav-rail__body", "ds-scrollable", s].filter(Boolean).join(" "), ...n, children: t });
|
|
1818
1818
|
}
|
|
1819
|
-
function
|
|
1819
|
+
function qs({ children: t, className: s = "", ...n }) {
|
|
1820
1820
|
return /* @__PURE__ */ e.jsx("div", { className: ["ds-nav-rail__header", s].filter(Boolean).join(" "), ...n, children: t });
|
|
1821
1821
|
}
|
|
1822
|
-
function
|
|
1822
|
+
function Hs({ children: t, className: s = "", ...n }) {
|
|
1823
1823
|
return /* @__PURE__ */ e.jsx("div", { className: ["ds-nav-rail__footer", s].filter(Boolean).join(" "), ...n, children: t });
|
|
1824
1824
|
}
|
|
1825
|
-
function
|
|
1825
|
+
function Ks({ className: t = "", ...s }) {
|
|
1826
1826
|
return /* @__PURE__ */ e.jsx("hr", { className: ["ds-nav-rail__divider", t].filter(Boolean).join(" "), ...s });
|
|
1827
1827
|
}
|
|
1828
|
-
function
|
|
1829
|
-
const { collapsed: r } =
|
|
1828
|
+
function Gs({ children: t, label: s = "Recents", defaultOpen: n = !0, className: a = "", ...o }) {
|
|
1829
|
+
const { collapsed: r } = je(_e), [i, l] = A(n);
|
|
1830
1830
|
return /* @__PURE__ */ e.jsxs("div", { className: ["ds-nav-rail__recents", a].filter(Boolean).join(" "), ...o, children: [
|
|
1831
1831
|
!r && /* @__PURE__ */ e.jsxs(
|
|
1832
1832
|
"button",
|
|
@@ -1844,8 +1844,35 @@ function Ks({ children: t, label: s = "Recents", defaultOpen: n = !0, className:
|
|
|
1844
1844
|
(i || r) && /* @__PURE__ */ e.jsx("div", { className: "ds-nav-rail__recents-body", children: t })
|
|
1845
1845
|
] });
|
|
1846
1846
|
}
|
|
1847
|
-
|
|
1848
|
-
|
|
1847
|
+
const Xs = Qe(function({
|
|
1848
|
+
as: s = "button",
|
|
1849
|
+
avatar: n,
|
|
1850
|
+
label: a,
|
|
1851
|
+
className: o = "",
|
|
1852
|
+
...r
|
|
1853
|
+
}, i) {
|
|
1854
|
+
const { collapsed: l, side: u } = je(_e), c = u === "left" ? "right" : "left", m = [
|
|
1855
|
+
"ds-nav-rail__item",
|
|
1856
|
+
"ds-nav-rail__agent",
|
|
1857
|
+
o
|
|
1858
|
+
].filter(Boolean).join(" "), p = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1859
|
+
/* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__icon", "aria-hidden": "true", children: n }),
|
|
1860
|
+
!l && /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__label", children: a })
|
|
1861
|
+
] }), h = /* @__PURE__ */ e.jsx(
|
|
1862
|
+
s,
|
|
1863
|
+
{
|
|
1864
|
+
ref: i,
|
|
1865
|
+
className: m,
|
|
1866
|
+
"aria-label": l ? a : void 0,
|
|
1867
|
+
...s === "button" ? { type: "button" } : {},
|
|
1868
|
+
...r,
|
|
1869
|
+
children: p
|
|
1870
|
+
}
|
|
1871
|
+
);
|
|
1872
|
+
return l ? /* @__PURE__ */ e.jsx(De, { content: a, position: c, children: h }) : h;
|
|
1873
|
+
});
|
|
1874
|
+
function Js({ avatar: t, label: s, selected: n = !1, disabled: a = !1, href: o, onClick: r, className: i = "", ...l }) {
|
|
1875
|
+
const { collapsed: u, side: c } = je(_e), h = {
|
|
1849
1876
|
className: [
|
|
1850
1877
|
"ds-nav-rail__item",
|
|
1851
1878
|
"ds-nav-rail__agent",
|
|
@@ -1860,19 +1887,19 @@ function Gs({ avatar: t, label: s, selected: n = !1, disabled: a = !1, href: o,
|
|
|
1860
1887
|
"data-disabled": a || void 0
|
|
1861
1888
|
},
|
|
1862
1889
|
...l
|
|
1863
|
-
},
|
|
1890
|
+
}, d = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1864
1891
|
/* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__icon", "aria-hidden": "true", children: t }),
|
|
1865
1892
|
!u && /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__label", children: s })
|
|
1866
|
-
] }), v =
|
|
1867
|
-
return u ? /* @__PURE__ */ e.jsx(
|
|
1893
|
+
] }), v = c === "left" ? "right" : "left", _ = o ? /* @__PURE__ */ e.jsx("a", { href: a ? void 0 : o, ...h, children: d }) : /* @__PURE__ */ e.jsx("button", { type: "button", ...h, children: d });
|
|
1894
|
+
return u ? /* @__PURE__ */ e.jsx(De, { content: s, position: v, children: _ }) : _;
|
|
1868
1895
|
}
|
|
1869
|
-
const
|
|
1896
|
+
const Dt = {
|
|
1870
1897
|
info: Ie,
|
|
1871
1898
|
success: Ae,
|
|
1872
1899
|
warning: Se,
|
|
1873
1900
|
error: Re
|
|
1874
1901
|
};
|
|
1875
|
-
function
|
|
1902
|
+
function Zs({
|
|
1876
1903
|
children: t,
|
|
1877
1904
|
variant: s = "info",
|
|
1878
1905
|
action: n,
|
|
@@ -1881,7 +1908,7 @@ function Xs({
|
|
|
1881
1908
|
role: r,
|
|
1882
1909
|
...i
|
|
1883
1910
|
}) {
|
|
1884
|
-
const l =
|
|
1911
|
+
const l = Dt[s], u = r || (s === "error" ? "alert" : "status");
|
|
1885
1912
|
return /* @__PURE__ */ e.jsxs(
|
|
1886
1913
|
"div",
|
|
1887
1914
|
{
|
|
@@ -1914,7 +1941,7 @@ function Xs({
|
|
|
1914
1941
|
}
|
|
1915
1942
|
);
|
|
1916
1943
|
}
|
|
1917
|
-
function
|
|
1944
|
+
function Qs({
|
|
1918
1945
|
trigger: t,
|
|
1919
1946
|
items: s = [],
|
|
1920
1947
|
open: n,
|
|
@@ -1924,23 +1951,23 @@ function Js({
|
|
|
1924
1951
|
style: i,
|
|
1925
1952
|
...l
|
|
1926
1953
|
}) {
|
|
1927
|
-
const [u,
|
|
1954
|
+
const [u, c] = A(!1), [m, p] = A(!1), h = n !== void 0, d = h ? n : u, v = R(null), _ = R(null), w = R(null), y = R(null), [k, j] = A({}), S = R(null), M = 150, D = () => {
|
|
1928
1955
|
if (h)
|
|
1929
1956
|
a == null || a(!1);
|
|
1930
1957
|
else {
|
|
1931
1958
|
if (m) return;
|
|
1932
1959
|
p(!0), S.current = setTimeout(() => {
|
|
1933
|
-
|
|
1960
|
+
c(!1), p(!1);
|
|
1934
1961
|
}, M);
|
|
1935
1962
|
}
|
|
1936
1963
|
}, H = () => {
|
|
1937
|
-
const x = !
|
|
1938
|
-
h ? a == null || a(x) : x ? (clearTimeout(S.current), p(!1),
|
|
1964
|
+
const x = !d;
|
|
1965
|
+
h ? a == null || a(x) : x ? (clearTimeout(S.current), p(!1), c(!0)) : D();
|
|
1939
1966
|
}, q = () => {
|
|
1940
|
-
|
|
1967
|
+
d || (h ? a == null || a(!0) : (clearTimeout(S.current), p(!1), c(!0)));
|
|
1941
1968
|
};
|
|
1942
1969
|
B(() => () => clearTimeout(S.current), []), B(() => {
|
|
1943
|
-
if (!
|
|
1970
|
+
if (!d) return;
|
|
1944
1971
|
const x = 300, b = () => {
|
|
1945
1972
|
var G;
|
|
1946
1973
|
const E = (G = v.current) == null ? void 0 : G.getBoundingClientRect();
|
|
@@ -1953,16 +1980,16 @@ function Js({
|
|
|
1953
1980
|
return b(), window.addEventListener("scroll", b, !0), window.addEventListener("resize", b), () => {
|
|
1954
1981
|
window.removeEventListener("scroll", b, !0), window.removeEventListener("resize", b);
|
|
1955
1982
|
};
|
|
1956
|
-
}, [
|
|
1983
|
+
}, [d, o]);
|
|
1957
1984
|
const W = () => {
|
|
1958
1985
|
var b;
|
|
1959
|
-
const x = (b =
|
|
1986
|
+
const x = (b = w.current) == null ? void 0 : b.querySelector(
|
|
1960
1987
|
'button:not([disabled]), [href], [tabindex]:not([tabindex="-1"]), input, select, textarea'
|
|
1961
1988
|
);
|
|
1962
1989
|
x == null || x.focus();
|
|
1963
1990
|
};
|
|
1964
1991
|
B(() => {
|
|
1965
|
-
if (!
|
|
1992
|
+
if (!d) return;
|
|
1966
1993
|
const x = (E) => {
|
|
1967
1994
|
var L, U;
|
|
1968
1995
|
!((L = v.current) != null && L.contains(E.target)) && !((U = _.current) != null && U.contains(E.target)) && D();
|
|
@@ -1972,27 +1999,27 @@ function Js({
|
|
|
1972
1999
|
return document.addEventListener("mousedown", x), document.addEventListener("keydown", b), () => {
|
|
1973
2000
|
document.removeEventListener("mousedown", x), document.removeEventListener("keydown", b);
|
|
1974
2001
|
};
|
|
1975
|
-
}, [
|
|
1976
|
-
if (!
|
|
1977
|
-
const x =
|
|
2002
|
+
}, [d]), B(() => {
|
|
2003
|
+
if (!d || !y.current || !_.current) return;
|
|
2004
|
+
const x = g(), b = y.current === "last" ? x[x.length - 1] : x[0];
|
|
1978
2005
|
b == null || b.focus(), y.current = null;
|
|
1979
|
-
}, [
|
|
1980
|
-
const
|
|
2006
|
+
}, [d]);
|
|
2007
|
+
const g = () => _.current ? [..._.current.querySelectorAll(
|
|
1981
2008
|
'button:not([disabled]), a[href]:not([aria-disabled="true"]), [tabindex]:not([tabindex="-1"])'
|
|
1982
|
-
)] : [],
|
|
2009
|
+
)] : [], C = (x) => {
|
|
1983
2010
|
var b, E;
|
|
1984
2011
|
if (x.key === "ArrowDown")
|
|
1985
|
-
x.preventDefault(),
|
|
2012
|
+
x.preventDefault(), d ? (b = g()[0]) == null || b.focus() : (y.current = "first", q());
|
|
1986
2013
|
else if (x.key === "ArrowUp")
|
|
1987
|
-
if (x.preventDefault(), !
|
|
2014
|
+
if (x.preventDefault(), !d)
|
|
1988
2015
|
y.current = "last", q();
|
|
1989
2016
|
else {
|
|
1990
|
-
const L =
|
|
2017
|
+
const L = g();
|
|
1991
2018
|
(E = L[L.length - 1]) == null || E.focus();
|
|
1992
2019
|
}
|
|
1993
2020
|
}, K = (x) => {
|
|
1994
2021
|
var L, U, G, T;
|
|
1995
|
-
const b =
|
|
2022
|
+
const b = g(), E = b.findIndex((f) => f === document.activeElement);
|
|
1996
2023
|
switch (x.key) {
|
|
1997
2024
|
case "ArrowDown":
|
|
1998
2025
|
x.preventDefault(), (L = b[Math.min(E + 1, b.length - 1)]) == null || L.focus();
|
|
@@ -2010,7 +2037,7 @@ function Js({
|
|
|
2010
2037
|
D();
|
|
2011
2038
|
break;
|
|
2012
2039
|
}
|
|
2013
|
-
},
|
|
2040
|
+
}, O = d && /* @__PURE__ */ e.jsx(
|
|
2014
2041
|
"div",
|
|
2015
2042
|
{
|
|
2016
2043
|
ref: _,
|
|
@@ -2067,19 +2094,19 @@ function Js({
|
|
|
2067
2094
|
/* @__PURE__ */ e.jsx(
|
|
2068
2095
|
"div",
|
|
2069
2096
|
{
|
|
2070
|
-
ref:
|
|
2097
|
+
ref: w,
|
|
2071
2098
|
className: "ds-dropdown__trigger",
|
|
2072
2099
|
onClick: H,
|
|
2073
|
-
onKeyDown:
|
|
2100
|
+
onKeyDown: C,
|
|
2074
2101
|
children: t
|
|
2075
2102
|
}
|
|
2076
2103
|
),
|
|
2077
|
-
typeof document < "u" && pe.createPortal(
|
|
2104
|
+
typeof document < "u" && pe.createPortal(O, document.body)
|
|
2078
2105
|
]
|
|
2079
2106
|
}
|
|
2080
2107
|
);
|
|
2081
2108
|
}
|
|
2082
|
-
function
|
|
2109
|
+
function en({
|
|
2083
2110
|
value: t = 0,
|
|
2084
2111
|
size: s = "m",
|
|
2085
2112
|
variant: n = "default",
|
|
@@ -2116,36 +2143,36 @@ function Zs({
|
|
|
2116
2143
|
}
|
|
2117
2144
|
);
|
|
2118
2145
|
}
|
|
2119
|
-
const
|
|
2120
|
-
function
|
|
2146
|
+
const Lt = (t) => 1 - Math.pow(1 - t, 3), Pt = () => typeof window < "u" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
2147
|
+
function Mt(t, { duration: s = 600 } = {}) {
|
|
2121
2148
|
const [n, a] = A(t), o = R(t), r = R(null);
|
|
2122
2149
|
return B(() => {
|
|
2123
|
-
if (
|
|
2150
|
+
if (Pt()) {
|
|
2124
2151
|
a(t), o.current = t;
|
|
2125
2152
|
return;
|
|
2126
2153
|
}
|
|
2127
2154
|
const i = o.current, l = t - i;
|
|
2128
2155
|
if (l === 0) return;
|
|
2129
2156
|
let u = null;
|
|
2130
|
-
const
|
|
2157
|
+
const c = (m) => {
|
|
2131
2158
|
u || (u = m);
|
|
2132
2159
|
const p = Math.min((m - u) / s, 1);
|
|
2133
|
-
a(i + l *
|
|
2160
|
+
a(i + l * Lt(p)), p < 1 ? r.current = requestAnimationFrame(c) : o.current = t;
|
|
2134
2161
|
};
|
|
2135
|
-
return r.current = requestAnimationFrame(
|
|
2162
|
+
return r.current = requestAnimationFrame(c), () => cancelAnimationFrame(r.current);
|
|
2136
2163
|
}, [t, s]), n;
|
|
2137
2164
|
}
|
|
2138
|
-
function
|
|
2165
|
+
function tn({
|
|
2139
2166
|
value: t,
|
|
2140
2167
|
duration: s = 600,
|
|
2141
2168
|
decimals: n = 0,
|
|
2142
2169
|
prefix: a = "",
|
|
2143
2170
|
suffix: o = ""
|
|
2144
2171
|
}) {
|
|
2145
|
-
const i =
|
|
2172
|
+
const i = Mt(t, { duration: s }).toFixed(n);
|
|
2146
2173
|
return `${a}${i}${o}`;
|
|
2147
2174
|
}
|
|
2148
|
-
function
|
|
2175
|
+
function zt({ threshold: t = 0.1, rootMargin: s = "0px", once: n = !1 } = {}) {
|
|
2149
2176
|
const a = R(null), [o, r] = A(!1);
|
|
2150
2177
|
return B(() => {
|
|
2151
2178
|
const i = a.current;
|
|
@@ -2159,7 +2186,7 @@ function Mt({ threshold: t = 0.1, rootMargin: s = "0px", once: n = !1 } = {}) {
|
|
|
2159
2186
|
return l.observe(i), () => l.disconnect();
|
|
2160
2187
|
}, [t, s, n]), { ref: a, inView: o };
|
|
2161
2188
|
}
|
|
2162
|
-
function
|
|
2189
|
+
function sn({
|
|
2163
2190
|
children: t,
|
|
2164
2191
|
as: s = "div",
|
|
2165
2192
|
once: n = !1,
|
|
@@ -2169,31 +2196,31 @@ function en({
|
|
|
2169
2196
|
onLeave: i,
|
|
2170
2197
|
...l
|
|
2171
2198
|
}) {
|
|
2172
|
-
const { ref: u, inView:
|
|
2199
|
+
const { ref: u, inView: c } = zt({ threshold: a, rootMargin: o, once: n }), m = R(!1);
|
|
2173
2200
|
return B(() => {
|
|
2174
|
-
|
|
2175
|
-
}, [
|
|
2201
|
+
c && !m.current && (r == null || r()), !c && m.current && (i == null || i()), m.current = c;
|
|
2202
|
+
}, [c]), /* @__PURE__ */ e.jsx(s, { ref: u, ...l, children: typeof t == "function" ? t(c) : t });
|
|
2176
2203
|
}
|
|
2177
|
-
const
|
|
2204
|
+
const Ue = {
|
|
2178
2205
|
default: Ie,
|
|
2179
2206
|
success: Ae,
|
|
2180
2207
|
warning: Se,
|
|
2181
2208
|
error: Re
|
|
2182
2209
|
};
|
|
2183
2210
|
let me = [];
|
|
2184
|
-
const
|
|
2211
|
+
const ke = /* @__PURE__ */ new Set();
|
|
2185
2212
|
function Ge() {
|
|
2186
|
-
|
|
2213
|
+
ke.forEach((t) => t([...me]));
|
|
2187
2214
|
}
|
|
2188
|
-
function
|
|
2215
|
+
function Ct(t) {
|
|
2189
2216
|
me = [...me, t], Ge();
|
|
2190
2217
|
}
|
|
2191
2218
|
function Ot(t) {
|
|
2192
2219
|
me = me.filter((s) => s.id !== t), Ge();
|
|
2193
2220
|
}
|
|
2194
|
-
function
|
|
2221
|
+
function nn() {
|
|
2195
2222
|
const t = (s, n = {}) => {
|
|
2196
|
-
|
|
2223
|
+
Ct({
|
|
2197
2224
|
id: `${Date.now()}-${Math.random()}`,
|
|
2198
2225
|
message: s,
|
|
2199
2226
|
type: "default",
|
|
@@ -2203,13 +2230,13 @@ function tn() {
|
|
|
2203
2230
|
};
|
|
2204
2231
|
return t.success = (s, n) => t(s, { ...n, type: "success" }), t.error = (s, n) => t(s, { ...n, type: "error" }), t.warning = (s, n) => t(s, { ...n, type: "warning" }), { toast: t };
|
|
2205
2232
|
}
|
|
2206
|
-
function
|
|
2233
|
+
function Ft({ data: t, onDismiss: s }) {
|
|
2207
2234
|
const [n, a] = A(!1), o = R(null);
|
|
2208
2235
|
B(() => (requestAnimationFrame(() => a(!0)), t.duration > 0 && (o.current = setTimeout(() => r(), t.duration)), () => clearTimeout(o.current)), []);
|
|
2209
2236
|
function r() {
|
|
2210
2237
|
a(!1), setTimeout(() => s(t.id), 250);
|
|
2211
2238
|
}
|
|
2212
|
-
const i =
|
|
2239
|
+
const i = Ue[t.type] ?? Ue.default;
|
|
2213
2240
|
return /* @__PURE__ */ e.jsxs(
|
|
2214
2241
|
"div",
|
|
2215
2242
|
{
|
|
@@ -2236,19 +2263,19 @@ function Ct({ data: t, onDismiss: s }) {
|
|
|
2236
2263
|
}
|
|
2237
2264
|
);
|
|
2238
2265
|
}
|
|
2239
|
-
function
|
|
2266
|
+
function rn({ position: t = "bottom-right" }) {
|
|
2240
2267
|
const [s, n] = A(() => [...me]);
|
|
2241
|
-
return B(() => (
|
|
2242
|
-
/* @__PURE__ */ e.jsx("div", { "data-ds-portal": "", className: ["ds-toast-container", `ds-toast-container--${t}`].join(" "), children: s.map((a) => /* @__PURE__ */ e.jsx(
|
|
2268
|
+
return B(() => (ke.add(n), () => ke.delete(n)), []), !s.length || typeof document > "u" ? null : pe.createPortal(
|
|
2269
|
+
/* @__PURE__ */ e.jsx("div", { "data-ds-portal": "", className: ["ds-toast-container", `ds-toast-container--${t}`].join(" "), children: s.map((a) => /* @__PURE__ */ e.jsx(Ft, { data: a, onDismiss: Ot }, a.id)) }),
|
|
2243
2270
|
document.body
|
|
2244
2271
|
);
|
|
2245
2272
|
}
|
|
2246
|
-
const
|
|
2273
|
+
const Wt = {
|
|
2247
2274
|
running: /* @__PURE__ */ e.jsx(de, { size: "xs", variant: "info", children: "Running..." }),
|
|
2248
2275
|
success: /* @__PURE__ */ e.jsx(de, { size: "xs", variant: "success", children: "Done" }),
|
|
2249
2276
|
error: /* @__PURE__ */ e.jsx(de, { size: "xs", variant: "error", children: "Error" })
|
|
2250
2277
|
};
|
|
2251
|
-
function
|
|
2278
|
+
function an({
|
|
2252
2279
|
label: t,
|
|
2253
2280
|
status: s = "idle",
|
|
2254
2281
|
icon: n,
|
|
@@ -2258,19 +2285,19 @@ function nn({
|
|
|
2258
2285
|
onToggle: i,
|
|
2259
2286
|
children: l,
|
|
2260
2287
|
className: u = "",
|
|
2261
|
-
...
|
|
2288
|
+
...c
|
|
2262
2289
|
}) {
|
|
2263
2290
|
const m = s === "running", p = /* @__PURE__ */ e.jsxs("span", { className: "ds-tool-card__title-row", children: [
|
|
2264
2291
|
n && /* @__PURE__ */ e.jsx("span", { className: "ds-tool-card__icon", children: n }),
|
|
2265
2292
|
/* @__PURE__ */ e.jsx("span", { className: "ds-tool-card__label", children: t }),
|
|
2266
|
-
|
|
2293
|
+
Wt[s],
|
|
2267
2294
|
a
|
|
2268
2295
|
] });
|
|
2269
2296
|
return l ? /* @__PURE__ */ e.jsx(
|
|
2270
2297
|
"div",
|
|
2271
2298
|
{
|
|
2272
2299
|
className: ["ds-tool-card", m && "ds-tool-card--running", u].filter(Boolean).join(" "),
|
|
2273
|
-
...
|
|
2300
|
+
...c,
|
|
2274
2301
|
children: /* @__PURE__ */ e.jsx(
|
|
2275
2302
|
Be,
|
|
2276
2303
|
{
|
|
@@ -2287,12 +2314,12 @@ function nn({
|
|
|
2287
2314
|
"div",
|
|
2288
2315
|
{
|
|
2289
2316
|
className: ["ds-tool-card", "ds-tool-card--bubble", u].filter(Boolean).join(" "),
|
|
2290
|
-
...
|
|
2317
|
+
...c,
|
|
2291
2318
|
children: p
|
|
2292
2319
|
}
|
|
2293
2320
|
);
|
|
2294
2321
|
}
|
|
2295
|
-
function
|
|
2322
|
+
function Ut({
|
|
2296
2323
|
text: t,
|
|
2297
2324
|
size: s = "xs",
|
|
2298
2325
|
timeout: n = 800,
|
|
@@ -2310,14 +2337,14 @@ function Wt({
|
|
|
2310
2337
|
variant: "ghost",
|
|
2311
2338
|
size: s,
|
|
2312
2339
|
state: r ? "success" : "idle",
|
|
2313
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
2340
|
+
icon: /* @__PURE__ */ e.jsx(it, { size: P[1], strokeWidth: 1.5 }),
|
|
2314
2341
|
"aria-label": a,
|
|
2315
2342
|
onClick: l,
|
|
2316
2343
|
...o
|
|
2317
2344
|
}
|
|
2318
2345
|
);
|
|
2319
2346
|
}
|
|
2320
|
-
function
|
|
2347
|
+
function on({ content: t, streaming: s = !1, ...n }) {
|
|
2321
2348
|
const [a, o] = A(s);
|
|
2322
2349
|
return B(() => {
|
|
2323
2350
|
o(!!s);
|
|
@@ -2328,18 +2355,18 @@ function rn({ content: t, streaming: s = !1, ...n }) {
|
|
|
2328
2355
|
onToggle: o,
|
|
2329
2356
|
padding: "s",
|
|
2330
2357
|
title: /* @__PURE__ */ e.jsxs("div", { className: "ds-reasoning__title", children: [
|
|
2331
|
-
/* @__PURE__ */ e.jsx(
|
|
2332
|
-
/* @__PURE__ */ e.jsx(
|
|
2358
|
+
/* @__PURE__ */ e.jsx(lt, { size: P[1], strokeWidth: 1.5, className: "ds-reasoning__icon" }),
|
|
2359
|
+
/* @__PURE__ */ e.jsx(jt, { secondary: !0, children: "Thinking" })
|
|
2333
2360
|
] }),
|
|
2334
2361
|
...n,
|
|
2335
|
-
children: /* @__PURE__ */ e.jsxs(
|
|
2362
|
+
children: /* @__PURE__ */ e.jsxs(Ke, { secondary: !0, style: { whiteSpace: "pre-wrap" }, children: [
|
|
2336
2363
|
t,
|
|
2337
2364
|
s && /* @__PURE__ */ e.jsx("span", { className: "ds-cursor ds-cursor--line" })
|
|
2338
2365
|
] })
|
|
2339
2366
|
}
|
|
2340
2367
|
);
|
|
2341
2368
|
}
|
|
2342
|
-
function
|
|
2369
|
+
function ln({
|
|
2343
2370
|
count: t,
|
|
2344
2371
|
current: s = 0,
|
|
2345
2372
|
done: n = [],
|
|
@@ -2350,8 +2377,8 @@ function an({
|
|
|
2350
2377
|
...l
|
|
2351
2378
|
}) {
|
|
2352
2379
|
return /* @__PURE__ */ e.jsxs("div", { className: ["ds-step-indicator", r].filter(Boolean).join(" "), ...l, children: [
|
|
2353
|
-
/* @__PURE__ */ e.jsx("div", { className: "ds-step-indicator__dots", role: "tablist", "aria-label": i, children: Array.from({ length: t }, (u,
|
|
2354
|
-
const m =
|
|
2380
|
+
/* @__PURE__ */ e.jsx("div", { className: "ds-step-indicator__dots", role: "tablist", "aria-label": i, children: Array.from({ length: t }, (u, c) => {
|
|
2381
|
+
const m = c === s, p = n.includes(c) && !m, h = a && (c <= s || n.includes(c)), d = [
|
|
2355
2382
|
"ds-step-indicator__dot",
|
|
2356
2383
|
m && "ds-step-indicator__dot--active",
|
|
2357
2384
|
p && "ds-step-indicator__dot--done"
|
|
@@ -2360,25 +2387,25 @@ function an({
|
|
|
2360
2387
|
"button",
|
|
2361
2388
|
{
|
|
2362
2389
|
type: "button",
|
|
2363
|
-
className:
|
|
2390
|
+
className: d,
|
|
2364
2391
|
role: "tab",
|
|
2365
2392
|
"aria-selected": m,
|
|
2366
|
-
"aria-label": `Step ${
|
|
2367
|
-
disabled: !h ||
|
|
2368
|
-
onClick: () => a == null ? void 0 : a(
|
|
2393
|
+
"aria-label": `Step ${c + 1}`,
|
|
2394
|
+
disabled: !h || c === s,
|
|
2395
|
+
onClick: () => a == null ? void 0 : a(c),
|
|
2369
2396
|
children: p ? /* @__PURE__ */ e.jsx(Te, { size: 8, strokeWidth: 3 }) : null
|
|
2370
2397
|
},
|
|
2371
|
-
|
|
2398
|
+
c
|
|
2372
2399
|
);
|
|
2373
2400
|
}) }),
|
|
2374
|
-
o && /* @__PURE__ */ e.jsxs(
|
|
2401
|
+
o && /* @__PURE__ */ e.jsxs(Ke, { secondary: !0, className: "ds-step-indicator__counter", children: [
|
|
2375
2402
|
s + 1,
|
|
2376
2403
|
" / ",
|
|
2377
2404
|
t
|
|
2378
2405
|
] })
|
|
2379
2406
|
] });
|
|
2380
2407
|
}
|
|
2381
|
-
function
|
|
2408
|
+
function cn({
|
|
2382
2409
|
content: t,
|
|
2383
2410
|
isStreaming: s = !1,
|
|
2384
2411
|
cursor: n = "line",
|
|
@@ -2394,7 +2421,7 @@ function on({
|
|
|
2394
2421
|
s && n !== "none" && /* @__PURE__ */ e.jsx("span", { className: `ds-cursor ds-cursor--${n}`, "aria-hidden": "true" })
|
|
2395
2422
|
] });
|
|
2396
2423
|
}
|
|
2397
|
-
function
|
|
2424
|
+
function dn({
|
|
2398
2425
|
role: t = "assistant",
|
|
2399
2426
|
header: s,
|
|
2400
2427
|
footer: n,
|
|
@@ -2421,7 +2448,7 @@ function ln({
|
|
|
2421
2448
|
n && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__footer", children: n })
|
|
2422
2449
|
] });
|
|
2423
2450
|
}
|
|
2424
|
-
function
|
|
2451
|
+
function un(t, { containerRef: s, smartPause: n = !0 } = {}) {
|
|
2425
2452
|
const a = R(!1), o = R(0);
|
|
2426
2453
|
B(() => {
|
|
2427
2454
|
const r = s == null ? void 0 : s.current;
|
|
@@ -2436,7 +2463,7 @@ function cn(t, { containerRef: s, smartPause: n = !0 } = {}) {
|
|
|
2436
2463
|
r && (n && a.current || (r.scrollTop = r.scrollHeight));
|
|
2437
2464
|
}, t);
|
|
2438
2465
|
}
|
|
2439
|
-
function
|
|
2466
|
+
function Vt({
|
|
2440
2467
|
prompts: t,
|
|
2441
2468
|
enabled: s,
|
|
2442
2469
|
typingSpeed: n = 38,
|
|
@@ -2445,9 +2472,9 @@ function Ut({
|
|
|
2445
2472
|
betweenTime: r = 380,
|
|
2446
2473
|
manualPauseMs: i = 5e3
|
|
2447
2474
|
}) {
|
|
2448
|
-
const [l, u] = A(0), [
|
|
2475
|
+
const [l, u] = A(0), [c, m] = A(""), p = R("typing"), h = R(0), d = R(0), v = R(null), _ = R(0);
|
|
2449
2476
|
B(() => {
|
|
2450
|
-
|
|
2477
|
+
d.current = l;
|
|
2451
2478
|
}, [l]), B(() => {
|
|
2452
2479
|
if (v.current && (clearTimeout(v.current), v.current = null), !s || t.length === 0) {
|
|
2453
2480
|
m(""), h.current = 0, p.current = "typing";
|
|
@@ -2459,22 +2486,22 @@ function Ut({
|
|
|
2459
2486
|
v.current = setTimeout(S, _.current - M);
|
|
2460
2487
|
return;
|
|
2461
2488
|
}
|
|
2462
|
-
const D = t[
|
|
2463
|
-
p.current === "typing" ? (h.current += 1, m(D.slice(0, h.current)), h.current >= D.length ? (p.current = "holding", v.current = setTimeout(S, o)) : v.current = setTimeout(S, n + Math.random() * 28)) : p.current === "holding" ? (p.current = "erasing", v.current = setTimeout(S, a)) : (h.current = Math.max(0, h.current - 1), m(D.slice(0, h.current)), h.current <= 0 ? (p.current = "typing",
|
|
2489
|
+
const D = t[d.current % t.length] ?? "";
|
|
2490
|
+
p.current === "typing" ? (h.current += 1, m(D.slice(0, h.current)), h.current >= D.length ? (p.current = "holding", v.current = setTimeout(S, o)) : v.current = setTimeout(S, n + Math.random() * 28)) : p.current === "holding" ? (p.current = "erasing", v.current = setTimeout(S, a)) : (h.current = Math.max(0, h.current - 1), m(D.slice(0, h.current)), h.current <= 0 ? (p.current = "typing", d.current = (d.current + 1) % t.length, u(d.current), v.current = setTimeout(S, r)) : v.current = setTimeout(S, a));
|
|
2464
2491
|
};
|
|
2465
2492
|
return v.current = setTimeout(S, 260), () => {
|
|
2466
2493
|
v.current && clearTimeout(v.current);
|
|
2467
2494
|
};
|
|
2468
2495
|
}, [s, t, n, a, o, r]);
|
|
2469
|
-
const
|
|
2496
|
+
const w = (S) => {
|
|
2470
2497
|
if (t.length === 0) return;
|
|
2471
2498
|
const M = (S % t.length + t.length) % t.length, D = t[M];
|
|
2472
|
-
|
|
2473
|
-
}, y = () =>
|
|
2474
|
-
return { displayed:
|
|
2499
|
+
d.current = M, h.current = D.length, p.current = "holding", _.current = Date.now() + i, u(M), m(D);
|
|
2500
|
+
}, y = () => w(d.current + 1), k = () => w(d.current - 1), j = t[l % t.length] ?? "";
|
|
2501
|
+
return { displayed: c, currentPrompt: j, index: l, next: y, prev: k };
|
|
2475
2502
|
}
|
|
2476
|
-
let
|
|
2477
|
-
function
|
|
2503
|
+
let Yt = 0;
|
|
2504
|
+
function fn({
|
|
2478
2505
|
value: t = "",
|
|
2479
2506
|
onChange: s,
|
|
2480
2507
|
onSubmit: n,
|
|
@@ -2484,14 +2511,14 @@ function dn({
|
|
|
2484
2511
|
disabled: i = !1,
|
|
2485
2512
|
placeholder: l = "Let's get things done...",
|
|
2486
2513
|
animatedPlaceholders: u,
|
|
2487
|
-
attachments:
|
|
2514
|
+
attachments: c,
|
|
2488
2515
|
images: m,
|
|
2489
2516
|
onAttachFiles: p,
|
|
2490
2517
|
onAttachImages: h,
|
|
2491
|
-
onRemoveAttachment:
|
|
2518
|
+
onRemoveAttachment: d,
|
|
2492
2519
|
onRemoveImage: v,
|
|
2493
2520
|
acceptImage: _,
|
|
2494
|
-
acceptFile:
|
|
2521
|
+
acceptFile: w,
|
|
2495
2522
|
maxImages: y,
|
|
2496
2523
|
maxImageSize: k,
|
|
2497
2524
|
leftSlot: j,
|
|
@@ -2499,10 +2526,10 @@ function dn({
|
|
|
2499
2526
|
className: M = "",
|
|
2500
2527
|
...D
|
|
2501
2528
|
}) {
|
|
2502
|
-
const H = R(null), q = R(null), W = R(0), [
|
|
2503
|
-
const I = ++
|
|
2504
|
-
|
|
2505
|
-
}, b = (N) =>
|
|
2529
|
+
const H = R(null), q = R(null), W = R(0), [g, C] = A(!1), [K, O] = A([]), x = (N) => {
|
|
2530
|
+
const I = ++Yt;
|
|
2531
|
+
O((X) => [...X, { id: I, msg: N }]), setTimeout(() => O((X) => X.filter((J) => J.id !== I)), 6e3);
|
|
2532
|
+
}, b = (N) => O((I) => I.filter((X) => X.id !== N)), E = (N) => N.type.startsWith("image/"), L = () => !0, U = _ ?? E, G = w ?? L, T = (N) => {
|
|
2506
2533
|
const I = [], X = [], J = [], Z = [];
|
|
2507
2534
|
let te = 0, ce = y != null ? y - ((m == null ? void 0 : m.length) ?? 0) : 1 / 0;
|
|
2508
2535
|
for (const se of N)
|
|
@@ -2527,11 +2554,11 @@ function dn({
|
|
|
2527
2554
|
return document.addEventListener("keydown", N), () => document.removeEventListener("keydown", N);
|
|
2528
2555
|
}, [r, i]);
|
|
2529
2556
|
const $ = (N) => {
|
|
2530
|
-
N.preventDefault(), W.current++, N.dataTransfer.types.includes("Files") &&
|
|
2557
|
+
N.preventDefault(), W.current++, N.dataTransfer.types.includes("Files") && C(!0);
|
|
2531
2558
|
}, z = (N) => {
|
|
2532
|
-
N.preventDefault(), W.current--, W.current === 0 &&
|
|
2559
|
+
N.preventDefault(), W.current--, W.current === 0 && C(!1);
|
|
2533
2560
|
}, F = (N) => N.preventDefault(), ne = (N) => {
|
|
2534
|
-
N.preventDefault(), W.current = 0,
|
|
2561
|
+
N.preventDefault(), W.current = 0, C(!1);
|
|
2535
2562
|
const I = Array.from(N.dataTransfer.files);
|
|
2536
2563
|
I.length && f(I);
|
|
2537
2564
|
}, oe = (N) => {
|
|
@@ -2544,16 +2571,16 @@ function dn({
|
|
|
2544
2571
|
if (!I) return;
|
|
2545
2572
|
const X = [];
|
|
2546
2573
|
for (const Je of I) {
|
|
2547
|
-
const
|
|
2548
|
-
|
|
2574
|
+
const Pe = Je.getAsFile();
|
|
2575
|
+
Pe && X.push(Pe);
|
|
2549
2576
|
}
|
|
2550
2577
|
if (X.length === 0) return;
|
|
2551
2578
|
const { imageFiles: J, tooLarge: Z, skipped: te, limitExceeded: ce } = T(X);
|
|
2552
2579
|
Z.length && x(`File${Z.length > 1 ? "s" : ""} too large: ${Z.join(", ")}`), te.length && x(`Skipped unsupported file${te.length > 1 ? "s" : ""}: ${te.join(", ")}`), ce && x(`Max ${y} images per message`), J.length && (N.preventDefault(), h(J));
|
|
2553
|
-
}, Q = !r && !i && !!(u != null && u.length) && t.length === 0, ie =
|
|
2580
|
+
}, Q = !r && !i && !!(u != null && u.length) && t.length === 0, ie = Vt({
|
|
2554
2581
|
prompts: u ?? [],
|
|
2555
2582
|
enabled: Q
|
|
2556
|
-
}),
|
|
2583
|
+
}), Ne = (N) => {
|
|
2557
2584
|
if (Q) {
|
|
2558
2585
|
if (N.key === "ArrowDown" || N.key === "ArrowRight") {
|
|
2559
2586
|
N.preventDefault(), ie.next();
|
|
@@ -2569,9 +2596,9 @@ function dn({
|
|
|
2569
2596
|
}
|
|
2570
2597
|
}
|
|
2571
2598
|
o == null || o(N);
|
|
2572
|
-
}, Xe = (t.trim() || (m == null ? void 0 : m.length) > 0 || (
|
|
2599
|
+
}, Xe = (t.trim() || (m == null ? void 0 : m.length) > 0 || (c == null ? void 0 : c.length) > 0) && !i, Le = p || h;
|
|
2573
2600
|
return /* @__PURE__ */ e.jsxs("div", { className: ["ds-prompt-input", M].filter(Boolean).join(" "), ...D, children: [
|
|
2574
|
-
|
|
2601
|
+
Le && /* @__PURE__ */ e.jsx(
|
|
2575
2602
|
"input",
|
|
2576
2603
|
{
|
|
2577
2604
|
ref: H,
|
|
@@ -2585,20 +2612,20 @@ function dn({
|
|
|
2585
2612
|
/* @__PURE__ */ e.jsxs(
|
|
2586
2613
|
"div",
|
|
2587
2614
|
{
|
|
2588
|
-
className: ["ds-prompt-input__box",
|
|
2615
|
+
className: ["ds-prompt-input__box", g && "ds-prompt-input__box--dragging"].filter(Boolean).join(" "),
|
|
2589
2616
|
onDragEnter: $,
|
|
2590
2617
|
onDragLeave: z,
|
|
2591
2618
|
onDragOver: F,
|
|
2592
2619
|
onDrop: ne,
|
|
2593
2620
|
children: [
|
|
2594
|
-
|
|
2621
|
+
g && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__drag-overlay", children: "Drop files here" }),
|
|
2595
2622
|
/* @__PURE__ */ e.jsx(
|
|
2596
2623
|
"textarea",
|
|
2597
2624
|
{
|
|
2598
2625
|
ref: q,
|
|
2599
2626
|
value: t,
|
|
2600
2627
|
onChange: (N) => s == null ? void 0 : s(N.target.value),
|
|
2601
|
-
onKeyDown:
|
|
2628
|
+
onKeyDown: Ne,
|
|
2602
2629
|
onPaste: Y,
|
|
2603
2630
|
placeholder: Q ? "" : l,
|
|
2604
2631
|
disabled: r || i,
|
|
@@ -2636,26 +2663,26 @@ function dn({
|
|
|
2636
2663
|
}
|
|
2637
2664
|
)
|
|
2638
2665
|
] }, N.id)) }),
|
|
2639
|
-
|
|
2640
|
-
N.uploading ? /* @__PURE__ */ e.jsx(
|
|
2666
|
+
c && c.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__attachments", children: c.map((N, I) => /* @__PURE__ */ e.jsx(de, { size: "xs", children: /* @__PURE__ */ e.jsxs("span", { className: "ds-prompt-input__badge-content", children: [
|
|
2667
|
+
N.uploading ? /* @__PURE__ */ e.jsx(ct, { size: P[1], strokeWidth: 1.5, className: "spin" }) : /* @__PURE__ */ e.jsx(Me, { size: P[1], strokeWidth: 1.5 }),
|
|
2641
2668
|
N.filename,
|
|
2642
2669
|
N.uploading ? /* @__PURE__ */ e.jsx("span", { className: "ds-prompt-input__uploading", children: "Uploading..." }) : /* @__PURE__ */ e.jsx(
|
|
2643
2670
|
"button",
|
|
2644
2671
|
{
|
|
2645
2672
|
type: "button",
|
|
2646
2673
|
className: "ds-prompt-input__remove-btn",
|
|
2647
|
-
onClick: () =>
|
|
2674
|
+
onClick: () => d == null ? void 0 : d(I),
|
|
2648
2675
|
children: /* @__PURE__ */ e.jsx(ee, { size: P[1], strokeWidth: 1.5 })
|
|
2649
2676
|
}
|
|
2650
2677
|
)
|
|
2651
2678
|
] }) }, I)) }),
|
|
2652
2679
|
/* @__PURE__ */ e.jsxs("div", { className: "ds-prompt-input__toolbar", children: [
|
|
2653
|
-
|
|
2680
|
+
Le && /* @__PURE__ */ e.jsx(
|
|
2654
2681
|
ae,
|
|
2655
2682
|
{
|
|
2656
2683
|
variant: "ghost",
|
|
2657
2684
|
size: "xs",
|
|
2658
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
2685
|
+
icon: /* @__PURE__ */ e.jsx(Me, { size: P[2], strokeWidth: 1.5 }),
|
|
2659
2686
|
"aria-label": "Attach files",
|
|
2660
2687
|
onClick: () => {
|
|
2661
2688
|
var N;
|
|
@@ -2671,7 +2698,7 @@ function dn({
|
|
|
2671
2698
|
{
|
|
2672
2699
|
variant: "primary",
|
|
2673
2700
|
size: "xs",
|
|
2674
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
2701
|
+
icon: /* @__PURE__ */ e.jsx(dt, { size: P[2], strokeWidth: 1.5 }),
|
|
2675
2702
|
onClick: a,
|
|
2676
2703
|
"aria-label": "Stop"
|
|
2677
2704
|
}
|
|
@@ -2680,7 +2707,7 @@ function dn({
|
|
|
2680
2707
|
{
|
|
2681
2708
|
variant: "primary",
|
|
2682
2709
|
size: "xs",
|
|
2683
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
2710
|
+
icon: /* @__PURE__ */ e.jsx(ut, { size: P[2], strokeWidth: 1.5 }),
|
|
2684
2711
|
onClick: n,
|
|
2685
2712
|
disabled: !Xe,
|
|
2686
2713
|
"aria-label": "Send"
|
|
@@ -2692,8 +2719,8 @@ function dn({
|
|
|
2692
2719
|
)
|
|
2693
2720
|
] });
|
|
2694
2721
|
}
|
|
2695
|
-
const
|
|
2696
|
-
function
|
|
2722
|
+
const Ve = { fast: 0, standard: 1, premium: 2 }, Ye = { fast: "data-5", standard: "data-3", premium: "data-6" };
|
|
2723
|
+
function mn({
|
|
2697
2724
|
models: t = [],
|
|
2698
2725
|
value: s,
|
|
2699
2726
|
onChange: n,
|
|
@@ -2704,14 +2731,14 @@ function un({
|
|
|
2704
2731
|
className: l = "",
|
|
2705
2732
|
...u
|
|
2706
2733
|
}) {
|
|
2707
|
-
const [
|
|
2734
|
+
const [c, m] = A(!1), p = R(null), h = R(null), d = R(null), [v, _] = A({}), w = t.filter((g) => !o || g.name === "auto" ? !0 : (Ve[g.tier] ?? 1) >= (Ve[o] ?? 1)), y = w.find((g) => g.name === "auto"), k = w.filter((g) => g.name !== "auto"), j = t.find((g) => g.name === s), M = new Set(k.map((g) => g.tier).filter(Boolean)).size > 1;
|
|
2708
2735
|
B(() => {
|
|
2709
|
-
if (!
|
|
2710
|
-
const
|
|
2736
|
+
if (!c) return;
|
|
2737
|
+
const g = 320, C = () => {
|
|
2711
2738
|
var L;
|
|
2712
2739
|
const x = (L = h.current) == null ? void 0 : L.getBoundingClientRect();
|
|
2713
2740
|
if (!x) return;
|
|
2714
|
-
const b = window.innerHeight - x.bottom, E = b <
|
|
2741
|
+
const b = window.innerHeight - x.bottom, E = b < g + 8 && x.top > b;
|
|
2715
2742
|
_({
|
|
2716
2743
|
position: "fixed",
|
|
2717
2744
|
zIndex: "var(--z-dropdown, 500)",
|
|
@@ -2719,42 +2746,42 @@ function un({
|
|
|
2719
2746
|
...E ? { bottom: window.innerHeight - x.top + 4, top: "auto" } : { top: x.bottom + 4, bottom: "auto" }
|
|
2720
2747
|
});
|
|
2721
2748
|
};
|
|
2722
|
-
|
|
2749
|
+
C(), window.addEventListener("scroll", C, !0), window.addEventListener("resize", C);
|
|
2723
2750
|
const K = (x) => {
|
|
2724
2751
|
var b, E;
|
|
2725
|
-
!((b = p.current) != null && b.contains(x.target)) && !((E =
|
|
2726
|
-
},
|
|
2752
|
+
!((b = p.current) != null && b.contains(x.target)) && !((E = d.current) != null && E.contains(x.target)) && m(!1);
|
|
2753
|
+
}, O = (x) => {
|
|
2727
2754
|
x.key === "Escape" && m(!1);
|
|
2728
2755
|
};
|
|
2729
|
-
return document.addEventListener("mousedown", K), document.addEventListener("keydown",
|
|
2730
|
-
window.removeEventListener("scroll",
|
|
2756
|
+
return document.addEventListener("mousedown", K), document.addEventListener("keydown", O), () => {
|
|
2757
|
+
window.removeEventListener("scroll", C, !0), window.removeEventListener("resize", C), document.removeEventListener("mousedown", K), document.removeEventListener("keydown", O);
|
|
2731
2758
|
};
|
|
2732
|
-
}, [
|
|
2733
|
-
const D = (
|
|
2734
|
-
n == null || n(
|
|
2735
|
-
}, H = (
|
|
2759
|
+
}, [c]);
|
|
2760
|
+
const D = (g) => {
|
|
2761
|
+
n == null || n(g), m(!1);
|
|
2762
|
+
}, H = (g) => /* @__PURE__ */ e.jsxs(
|
|
2736
2763
|
"button",
|
|
2737
2764
|
{
|
|
2738
2765
|
type: "button",
|
|
2739
2766
|
className: [
|
|
2740
2767
|
"ds-model-picker__item",
|
|
2741
|
-
|
|
2768
|
+
g.name === s && "ds-model-picker__item--active"
|
|
2742
2769
|
].filter(Boolean).join(" "),
|
|
2743
|
-
onClick: () => D(
|
|
2770
|
+
onClick: () => D(g.name),
|
|
2744
2771
|
children: [
|
|
2745
|
-
|
|
2746
|
-
/* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__item-name", children:
|
|
2747
|
-
M &&
|
|
2772
|
+
g.icon ? /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__item-icon", children: g.icon }) : /* @__PURE__ */ e.jsx(ze, { size: 12, strokeWidth: 1.5, className: "ds-model-picker__item-icon" }),
|
|
2773
|
+
/* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__item-name", children: g.displayName || g.name }),
|
|
2774
|
+
M && g.tier && /* @__PURE__ */ e.jsx(de, { size: "xs", variant: Ye[g.tier] || "default", children: g.tier })
|
|
2748
2775
|
]
|
|
2749
2776
|
},
|
|
2750
|
-
|
|
2751
|
-
), q = () => !i || !M ? k.map(H) : ["fast", "standard", "premium"].flatMap((
|
|
2752
|
-
const
|
|
2753
|
-
return
|
|
2754
|
-
/* @__PURE__ */ e.jsx("div", { className: "ds-model-picker__group-label", "data-tier":
|
|
2755
|
-
...
|
|
2777
|
+
g.name
|
|
2778
|
+
), q = () => !i || !M ? k.map(H) : ["fast", "standard", "premium"].flatMap((g) => {
|
|
2779
|
+
const C = k.filter((K) => K.tier === g);
|
|
2780
|
+
return C.length ? [
|
|
2781
|
+
/* @__PURE__ */ e.jsx("div", { className: "ds-model-picker__group-label", "data-tier": g, children: g.charAt(0).toUpperCase() + g.slice(1) }, `lbl-${g}`),
|
|
2782
|
+
...C.map(H)
|
|
2756
2783
|
] : [];
|
|
2757
|
-
}), W =
|
|
2784
|
+
}), W = c && /* @__PURE__ */ e.jsxs("div", { ref: d, className: "ds-model-picker__menu ds-scrollable", "data-ds-portal": "", style: v, children: [
|
|
2758
2785
|
r && y && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
2759
2786
|
/* @__PURE__ */ e.jsxs(
|
|
2760
2787
|
"button",
|
|
@@ -2767,7 +2794,7 @@ function un({
|
|
|
2767
2794
|
].filter(Boolean).join(" "),
|
|
2768
2795
|
onClick: () => D("auto"),
|
|
2769
2796
|
children: [
|
|
2770
|
-
/* @__PURE__ */ e.jsx(
|
|
2797
|
+
/* @__PURE__ */ e.jsx(ft, { size: 12, strokeWidth: 1.5, className: "ds-model-picker__item-icon" }),
|
|
2771
2798
|
/* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__item-name", children: "Auto (smart routing)" })
|
|
2772
2799
|
]
|
|
2773
2800
|
}
|
|
@@ -2789,13 +2816,13 @@ function un({
|
|
|
2789
2816
|
ref: h,
|
|
2790
2817
|
type: "button",
|
|
2791
2818
|
className: "ds-model-picker__trigger",
|
|
2792
|
-
onClick: () => m((
|
|
2819
|
+
onClick: () => m((g) => !g),
|
|
2793
2820
|
"aria-haspopup": "listbox",
|
|
2794
|
-
"aria-expanded":
|
|
2821
|
+
"aria-expanded": c,
|
|
2795
2822
|
children: [
|
|
2796
|
-
j != null && j.icon ? /* @__PURE__ */ e.jsx("span", { children: j.icon }) : /* @__PURE__ */ e.jsx(
|
|
2823
|
+
j != null && j.icon ? /* @__PURE__ */ e.jsx("span", { children: j.icon }) : /* @__PURE__ */ e.jsx(ze, { size: 12, strokeWidth: 1.5 }),
|
|
2797
2824
|
/* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__trigger-name", children: (j == null ? void 0 : j.displayName) || (j == null ? void 0 : j.name) || s }),
|
|
2798
|
-
M && (j == null ? void 0 : j.tier) && /* @__PURE__ */ e.jsx(de, { size: "xs", variant:
|
|
2825
|
+
M && (j == null ? void 0 : j.tier) && /* @__PURE__ */ e.jsx(de, { size: "xs", variant: Ye[j.tier] || "default", children: j.tier })
|
|
2799
2826
|
]
|
|
2800
2827
|
}
|
|
2801
2828
|
),
|
|
@@ -2804,39 +2831,39 @@ function un({
|
|
|
2804
2831
|
}
|
|
2805
2832
|
);
|
|
2806
2833
|
}
|
|
2807
|
-
const
|
|
2834
|
+
const qt = ({ filename: t, pages: s }) => /* @__PURE__ */ e.jsxs("span", { style: { display: "flex", alignItems: "center", gap: "var(--space-2)", minWidth: 0 }, children: [
|
|
2808
2835
|
/* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__filename", children: t }),
|
|
2809
|
-
s.length > 0 && /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__pages", children:
|
|
2836
|
+
s.length > 0 && /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__pages", children: Ee(s) })
|
|
2810
2837
|
] });
|
|
2811
|
-
function
|
|
2838
|
+
function Ee(t) {
|
|
2812
2839
|
return t != null && t.length ? "p. " + t.join(", ") : null;
|
|
2813
2840
|
}
|
|
2814
|
-
function
|
|
2841
|
+
function Ht(t) {
|
|
2815
2842
|
const s = /* @__PURE__ */ new Map();
|
|
2816
2843
|
for (const n of t)
|
|
2817
2844
|
s.has(n.filename) || s.set(n.filename, { filename: n.filename, url: n.url, items: [] }), s.get(n.filename).items.push(n);
|
|
2818
2845
|
return [...s.values()];
|
|
2819
2846
|
}
|
|
2820
|
-
function
|
|
2847
|
+
function pn({
|
|
2821
2848
|
sources: t = [],
|
|
2822
2849
|
layout: s = "list",
|
|
2823
2850
|
title: n = "Sources",
|
|
2824
2851
|
maxVisible: a = 5,
|
|
2825
2852
|
onSourceClick: o
|
|
2826
2853
|
}) {
|
|
2827
|
-
const [r, i] = A(!1), l =
|
|
2854
|
+
const [r, i] = A(!1), l = Ht(t), u = l.length > a, c = r ? l : l.slice(0, a), m = t.some((h) => h.snippet), p = ["ds-sources-panel", s === "compact" && "ds-sources-panel--compact"].filter(Boolean).join(" ");
|
|
2828
2855
|
return s === "compact" ? /* @__PURE__ */ e.jsxs("div", { className: p, children: [
|
|
2829
|
-
|
|
2830
|
-
const
|
|
2856
|
+
c.map((h) => {
|
|
2857
|
+
const d = h.items.map((_) => _.page).filter(Boolean), v = !!o;
|
|
2831
2858
|
return /* @__PURE__ */ e.jsxs(
|
|
2832
2859
|
"div",
|
|
2833
2860
|
{
|
|
2834
2861
|
className: `ds-sources-panel__compact-row${v ? " ds-sources-panel__compact-row--clickable" : ""}`,
|
|
2835
2862
|
onClick: v ? () => o(h.items[0]) : void 0,
|
|
2836
2863
|
children: [
|
|
2837
|
-
/* @__PURE__ */ e.jsx(
|
|
2864
|
+
/* @__PURE__ */ e.jsx(mt, { size: P[1], strokeWidth: 1.5, className: "ds-sources-panel__compact-icon" }),
|
|
2838
2865
|
/* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__filename", children: h.filename }),
|
|
2839
|
-
|
|
2866
|
+
d.length > 0 && /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__pages", children: Ee(d) })
|
|
2840
2867
|
]
|
|
2841
2868
|
},
|
|
2842
2869
|
h.filename
|
|
@@ -2849,21 +2876,21 @@ function fn({
|
|
|
2849
2876
|
] })
|
|
2850
2877
|
] }) : /* @__PURE__ */ e.jsxs("div", { className: p, children: [
|
|
2851
2878
|
n && /* @__PURE__ */ e.jsx("div", { className: "ds-sources-panel__title", children: n }),
|
|
2852
|
-
|
|
2853
|
-
const
|
|
2879
|
+
c.map((h) => {
|
|
2880
|
+
const d = h.items.map((_) => _.page).filter(Boolean), v = !!o;
|
|
2854
2881
|
return m ? /* @__PURE__ */ e.jsx(
|
|
2855
2882
|
Be,
|
|
2856
2883
|
{
|
|
2857
|
-
title: /* @__PURE__ */ e.jsx(
|
|
2884
|
+
title: /* @__PURE__ */ e.jsx(qt, { filename: h.filename, pages: d }),
|
|
2858
2885
|
padding: "s",
|
|
2859
|
-
children: h.items.map((_,
|
|
2886
|
+
children: h.items.map((_, w) => /* @__PURE__ */ e.jsx(
|
|
2860
2887
|
"div",
|
|
2861
2888
|
{
|
|
2862
2889
|
className: `ds-sources-panel__snippet${v ? " ds-sources-panel__snippet--clickable" : ""}`,
|
|
2863
2890
|
onClick: v ? () => o(_) : void 0,
|
|
2864
2891
|
children: _.snippet ?? `p. ${_.page}`
|
|
2865
2892
|
},
|
|
2866
|
-
|
|
2893
|
+
w
|
|
2867
2894
|
))
|
|
2868
2895
|
},
|
|
2869
2896
|
h.filename
|
|
@@ -2874,7 +2901,7 @@ function fn({
|
|
|
2874
2901
|
onClick: v ? () => o(h.items[0]) : void 0,
|
|
2875
2902
|
children: [
|
|
2876
2903
|
/* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__filename", children: h.filename }),
|
|
2877
|
-
|
|
2904
|
+
d.length > 0 && /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__pages", children: Ee(d) })
|
|
2878
2905
|
]
|
|
2879
2906
|
},
|
|
2880
2907
|
h.filename
|
|
@@ -2887,10 +2914,10 @@ function fn({
|
|
|
2887
2914
|
] })
|
|
2888
2915
|
] });
|
|
2889
2916
|
}
|
|
2890
|
-
function
|
|
2917
|
+
function qe(t) {
|
|
2891
2918
|
return t >= 1e6 ? (t / 1e6).toFixed(1).replace(/\.0$/, "") + "M" : t >= 1e3 ? (t / 1e3).toFixed(1).replace(/\.0$/, "") + "K" : String(t);
|
|
2892
2919
|
}
|
|
2893
|
-
function
|
|
2920
|
+
function hn({
|
|
2894
2921
|
used: t,
|
|
2895
2922
|
limit: s,
|
|
2896
2923
|
size: n = "s",
|
|
@@ -2899,7 +2926,7 @@ function mn({
|
|
|
2899
2926
|
warningThreshold: r = 0.8,
|
|
2900
2927
|
errorThreshold: i = 1
|
|
2901
2928
|
}) {
|
|
2902
|
-
const l = s > 0 ? t / s : 0, u = Math.min(l * 100, 100),
|
|
2929
|
+
const l = s > 0 ? t / s : 0, u = Math.min(l * 100, 100), c = l >= i ? "error" : l >= r ? "warning" : "normal";
|
|
2903
2930
|
return /* @__PURE__ */ e.jsxs(
|
|
2904
2931
|
"div",
|
|
2905
2932
|
{
|
|
@@ -2911,15 +2938,15 @@ function mn({
|
|
|
2911
2938
|
/* @__PURE__ */ e.jsx("div", { className: "ds-token-counter__track", children: /* @__PURE__ */ e.jsx(
|
|
2912
2939
|
"div",
|
|
2913
2940
|
{
|
|
2914
|
-
className: `ds-token-counter__fill ds-token-counter__fill--${
|
|
2941
|
+
className: `ds-token-counter__fill ds-token-counter__fill--${c}`,
|
|
2915
2942
|
style: { width: `${u}%` }
|
|
2916
2943
|
}
|
|
2917
2944
|
) }),
|
|
2918
|
-
(a || o) && /* @__PURE__ */ e.jsxs("div", { className: `ds-token-counter__label ds-token-counter__label--${
|
|
2945
|
+
(a || o) && /* @__PURE__ */ e.jsxs("div", { className: `ds-token-counter__label ds-token-counter__label--${c}`, children: [
|
|
2919
2946
|
a && /* @__PURE__ */ e.jsxs("span", { children: [
|
|
2920
|
-
|
|
2947
|
+
qe(t),
|
|
2921
2948
|
" / ",
|
|
2922
|
-
|
|
2949
|
+
qe(s)
|
|
2923
2950
|
] }),
|
|
2924
2951
|
o && /* @__PURE__ */ e.jsxs("span", { style: { marginLeft: "auto" }, children: [
|
|
2925
2952
|
Math.round(l * 100),
|
|
@@ -2930,24 +2957,24 @@ function mn({
|
|
|
2930
2957
|
}
|
|
2931
2958
|
);
|
|
2932
2959
|
}
|
|
2933
|
-
const
|
|
2934
|
-
function
|
|
2960
|
+
const He = 5;
|
|
2961
|
+
function Kt(t) {
|
|
2935
2962
|
return t < 0.34 ? "low" : t < 0.67 ? "medium" : "high";
|
|
2936
2963
|
}
|
|
2937
|
-
function
|
|
2964
|
+
function xn({
|
|
2938
2965
|
value: t = 0,
|
|
2939
2966
|
size: s = "xs",
|
|
2940
2967
|
showLabel: n = "none",
|
|
2941
2968
|
layout: a = "inline"
|
|
2942
2969
|
}) {
|
|
2943
|
-
const o = Math.max(0, Math.min(1, t)), r = Math.round(o *
|
|
2970
|
+
const o = Math.max(0, Math.min(1, t)), r = Math.round(o * He), i = Kt(o);
|
|
2944
2971
|
return /* @__PURE__ */ e.jsxs("div", { className: [
|
|
2945
2972
|
"ds-confidence-bar",
|
|
2946
2973
|
`ds-confidence-bar--${s}`,
|
|
2947
2974
|
`ds-confidence-bar--${i}`,
|
|
2948
2975
|
a === "block" && "ds-confidence-bar--block"
|
|
2949
2976
|
].filter(Boolean).join(" "), children: [
|
|
2950
|
-
/* @__PURE__ */ e.jsx("div", { className: "ds-confidence-bar__segments", "aria-hidden": "true", children: Array.from({ length:
|
|
2977
|
+
/* @__PURE__ */ e.jsx("div", { className: "ds-confidence-bar__segments", "aria-hidden": "true", children: Array.from({ length: He }, (l, u) => /* @__PURE__ */ e.jsx(
|
|
2951
2978
|
"div",
|
|
2952
2979
|
{
|
|
2953
2980
|
className: `ds-confidence-bar__seg${u < r ? " ds-confidence-bar__seg--filled" : ""}`
|
|
@@ -2957,15 +2984,15 @@ function pn({
|
|
|
2957
2984
|
n === "text" && /* @__PURE__ */ e.jsx("span", { className: "ds-confidence-bar__label", children: i })
|
|
2958
2985
|
] });
|
|
2959
2986
|
}
|
|
2960
|
-
const
|
|
2961
|
-
function
|
|
2987
|
+
const Gt = { add: "+", remove: "-", context: " " };
|
|
2988
|
+
function ge({ line: t, lineNumbers: s }) {
|
|
2962
2989
|
return /* @__PURE__ */ e.jsxs("div", { className: `ds-diff-view__line ds-diff-view__line--${t.type}`, children: [
|
|
2963
2990
|
s && t.lineNo != null && /* @__PURE__ */ e.jsx("span", { className: "ds-diff-view__lineno", children: t.lineNo }),
|
|
2964
|
-
/* @__PURE__ */ e.jsx("span", { className: "ds-diff-view__prefix", children:
|
|
2991
|
+
/* @__PURE__ */ e.jsx("span", { className: "ds-diff-view__prefix", children: Gt[t.type] }),
|
|
2965
2992
|
/* @__PURE__ */ e.jsx("span", { className: "ds-diff-view__text", children: t.text })
|
|
2966
2993
|
] });
|
|
2967
2994
|
}
|
|
2968
|
-
function
|
|
2995
|
+
function vn({
|
|
2969
2996
|
lines: t = [],
|
|
2970
2997
|
layout: s = "inline",
|
|
2971
2998
|
wordWrap: n = !1,
|
|
@@ -2979,21 +3006,21 @@ function hn({
|
|
|
2979
3006
|
n && "ds-diff-view--wrap"
|
|
2980
3007
|
].filter(Boolean).join(" "), l = o ? { maxHeight: o, overflowY: "auto" } : void 0;
|
|
2981
3008
|
if (s === "split") {
|
|
2982
|
-
const u = t.filter((m) => m.type === "remove" || m.type === "context"),
|
|
3009
|
+
const u = t.filter((m) => m.type === "remove" || m.type === "context"), c = t.filter((m) => m.type === "add" || m.type === "context");
|
|
2983
3010
|
return /* @__PURE__ */ e.jsxs("div", { className: i, children: [
|
|
2984
3011
|
r && /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__title", children: r }),
|
|
2985
3012
|
/* @__PURE__ */ e.jsxs("div", { className: "ds-diff-view__body ds-scrollable", style: l, children: [
|
|
2986
|
-
/* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__split-col ds-scrollable", children: u.map((m, p) => /* @__PURE__ */ e.jsx(
|
|
2987
|
-
/* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__split-col ds-scrollable", children:
|
|
3013
|
+
/* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__split-col ds-scrollable", children: u.map((m, p) => /* @__PURE__ */ e.jsx(ge, { line: m, lineNumbers: a }, p)) }),
|
|
3014
|
+
/* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__split-col ds-scrollable", children: c.map((m, p) => /* @__PURE__ */ e.jsx(ge, { line: m, lineNumbers: a }, p)) })
|
|
2988
3015
|
] })
|
|
2989
3016
|
] });
|
|
2990
3017
|
}
|
|
2991
3018
|
return /* @__PURE__ */ e.jsxs("div", { className: i, children: [
|
|
2992
3019
|
r && /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__title", children: r }),
|
|
2993
|
-
/* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__body ds-scrollable", style: l, children: t.map((u,
|
|
3020
|
+
/* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__body ds-scrollable", style: l, children: t.map((u, c) => /* @__PURE__ */ e.jsx(ge, { line: u, lineNumbers: a }, c)) })
|
|
2994
3021
|
] });
|
|
2995
3022
|
}
|
|
2996
|
-
function
|
|
3023
|
+
function Xt({
|
|
2997
3024
|
value: t = "idle",
|
|
2998
3025
|
onLike: s,
|
|
2999
3026
|
onDislike: n,
|
|
@@ -3023,7 +3050,7 @@ function Gt({
|
|
|
3023
3050
|
"aria-label": "Like",
|
|
3024
3051
|
"aria-pressed": t === "liked",
|
|
3025
3052
|
children: /* @__PURE__ */ e.jsx(
|
|
3026
|
-
|
|
3053
|
+
pt,
|
|
3027
3054
|
{
|
|
3028
3055
|
size: P[1],
|
|
3029
3056
|
strokeWidth: 1.5,
|
|
@@ -3044,7 +3071,7 @@ function Gt({
|
|
|
3044
3071
|
"aria-label": "Dislike",
|
|
3045
3072
|
"aria-pressed": t === "disliked",
|
|
3046
3073
|
children: /* @__PURE__ */ e.jsx(
|
|
3047
|
-
|
|
3074
|
+
ht,
|
|
3048
3075
|
{
|
|
3049
3076
|
size: P[1],
|
|
3050
3077
|
strokeWidth: 1.5,
|
|
@@ -3057,7 +3084,7 @@ function Gt({
|
|
|
3057
3084
|
}
|
|
3058
3085
|
);
|
|
3059
3086
|
}
|
|
3060
|
-
function
|
|
3087
|
+
function Jt(t) {
|
|
3061
3088
|
const s = t instanceof Date ? t : new Date(t);
|
|
3062
3089
|
if (isNaN(s)) return null;
|
|
3063
3090
|
const n = /* @__PURE__ */ new Date(), a = s.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit", hour12: !1 }), o = new Date(n.getFullYear(), n.getMonth(), n.getDate()), r = new Date(o - 864e5);
|
|
@@ -3066,7 +3093,7 @@ function Xt(t) {
|
|
|
3066
3093
|
const i = s.getDate(), l = s.toLocaleString([], { month: "short" });
|
|
3067
3094
|
return `${i} ${l} ${a}`;
|
|
3068
3095
|
}
|
|
3069
|
-
function
|
|
3096
|
+
function _n({
|
|
3070
3097
|
role: t = "assistant",
|
|
3071
3098
|
text: s,
|
|
3072
3099
|
timestamp: n,
|
|
@@ -3076,28 +3103,28 @@ function xn({
|
|
|
3076
3103
|
className: i = "",
|
|
3077
3104
|
...l
|
|
3078
3105
|
}) {
|
|
3079
|
-
const u = t === "assistant" && (o || r),
|
|
3080
|
-
return !u && !
|
|
3106
|
+
const u = t === "assistant" && (o || r), c = !!s, m = n ? Jt(n) : null;
|
|
3107
|
+
return !u && !c && !m ? null : /* @__PURE__ */ e.jsxs(
|
|
3081
3108
|
"div",
|
|
3082
3109
|
{
|
|
3083
3110
|
className: ["ds-message-footer", `ds-message-footer--${t}`, i].filter(Boolean).join(" "),
|
|
3084
3111
|
...l,
|
|
3085
3112
|
children: [
|
|
3086
3113
|
t === "user" && m && /* @__PURE__ */ e.jsx("span", { className: "ds-message-footer__timestamp ds-message-action", children: m }),
|
|
3087
|
-
u && /* @__PURE__ */ e.jsx(
|
|
3088
|
-
|
|
3114
|
+
u && /* @__PURE__ */ e.jsx(Xt, { className: "ds-message-action", value: a, onLike: o, onDislike: r }),
|
|
3115
|
+
c && /* @__PURE__ */ e.jsx(Ut, { className: "ds-message-action", text: s }),
|
|
3089
3116
|
t === "assistant" && m && /* @__PURE__ */ e.jsx("span", { className: "ds-message-footer__timestamp ds-message-action", children: m })
|
|
3090
3117
|
]
|
|
3091
3118
|
}
|
|
3092
3119
|
);
|
|
3093
3120
|
}
|
|
3094
|
-
function
|
|
3121
|
+
function bn({ label: t, className: s = "", ...n }) {
|
|
3095
3122
|
return /* @__PURE__ */ e.jsxs("span", { className: ["ds-thinking-dot", s].filter(Boolean).join(" "), ...n, children: [
|
|
3096
3123
|
/* @__PURE__ */ e.jsx("span", { className: "ds-thinking-dot__pulse" }),
|
|
3097
3124
|
t && /* @__PURE__ */ e.jsx("span", { className: "ds-thinking-dot__label", children: t })
|
|
3098
3125
|
] });
|
|
3099
3126
|
}
|
|
3100
|
-
function
|
|
3127
|
+
function jn({ variant: t = "light", glow: s, mask: n = !0, style: a, ...o }) {
|
|
3101
3128
|
const r = t === "dark", i = s ?? r, l = r ? "rgba(255,250,250,0.05)" : "var(--color-border-light)", u = r ? "rgba(255,250,250,0.025)" : "color-mix(in srgb, var(--color-border-light) 50%, transparent)";
|
|
3102
3129
|
return /* @__PURE__ */ e.jsx(
|
|
3103
3130
|
"div",
|
|
@@ -3138,7 +3165,7 @@ function _n({ variant: t = "light", glow: s, mask: n = !0, style: a, ...o }) {
|
|
|
3138
3165
|
}
|
|
3139
3166
|
);
|
|
3140
3167
|
}
|
|
3141
|
-
function
|
|
3168
|
+
function Nn({ children: t, axis: s = "y", style: n, className: a = "", ...o }) {
|
|
3142
3169
|
const r = s === "x" ? { overflowX: "auto", overflowY: "hidden" } : s === "both" ? { overflow: "auto" } : { overflowY: "auto", overflowX: "hidden" };
|
|
3143
3170
|
return /* @__PURE__ */ e.jsx(
|
|
3144
3171
|
"div",
|
|
@@ -3150,11 +3177,11 @@ function bn({ children: t, axis: s = "y", style: n, className: a = "", ...o }) {
|
|
|
3150
3177
|
}
|
|
3151
3178
|
);
|
|
3152
3179
|
}
|
|
3153
|
-
const we = 280,
|
|
3154
|
-
function
|
|
3180
|
+
const we = 280, Zt = 22, Qt = 14, le = 8, be = 6, es = 200;
|
|
3181
|
+
function ts(t) {
|
|
3155
3182
|
return t ? typeof t == "function" ? t() : typeof t == "string" ? document.querySelector(t) : null : null;
|
|
3156
3183
|
}
|
|
3157
|
-
function
|
|
3184
|
+
function ss(t, s, n, a) {
|
|
3158
3185
|
const o = window.innerWidth, r = window.innerHeight;
|
|
3159
3186
|
if (r - t.bottom >= s + a + le) return "bottom";
|
|
3160
3187
|
if (t.top >= s + a + le) return "top";
|
|
@@ -3163,7 +3190,7 @@ function ts(t, s, n, a) {
|
|
|
3163
3190
|
const i = Math.max(t.top, r - t.bottom, o - t.right, t.left);
|
|
3164
3191
|
return i === r - t.bottom ? "bottom" : i === t.top ? "top" : i === o - t.right ? "right" : "left";
|
|
3165
3192
|
}
|
|
3166
|
-
function
|
|
3193
|
+
function ns(t, s, n, a, o) {
|
|
3167
3194
|
const r = window.innerWidth, i = window.innerHeight;
|
|
3168
3195
|
let l, u;
|
|
3169
3196
|
switch (t) {
|
|
@@ -3179,10 +3206,10 @@ function ss(t, s, n, a, o) {
|
|
|
3179
3206
|
default:
|
|
3180
3207
|
l = s.top + s.height / 2 - n / 2, u = s.right + o;
|
|
3181
3208
|
}
|
|
3182
|
-
const
|
|
3183
|
-
return { top: Math.max(le, Math.min(i - n - le, l)), left:
|
|
3209
|
+
const c = Math.max(le, Math.min(r - a - le, u));
|
|
3210
|
+
return { top: Math.max(le, Math.min(i - n - le, l)), left: c, arrowOffset: u - c };
|
|
3184
3211
|
}
|
|
3185
|
-
function
|
|
3212
|
+
function gn({
|
|
3186
3213
|
steps: t,
|
|
3187
3214
|
currentStep: s,
|
|
3188
3215
|
onNext: n,
|
|
@@ -3192,20 +3219,20 @@ function jn({
|
|
|
3192
3219
|
overlay: i = !0,
|
|
3193
3220
|
ring: l = !0,
|
|
3194
3221
|
labelNext: u = "Next",
|
|
3195
|
-
labelBack:
|
|
3222
|
+
labelBack: c = "Back",
|
|
3196
3223
|
labelSkip: m = "Skip tour",
|
|
3197
3224
|
labelFinish: p = "Done",
|
|
3198
3225
|
statePrimary: h = "idle",
|
|
3199
|
-
stateBack:
|
|
3226
|
+
stateBack: d = "idle"
|
|
3200
3227
|
}) {
|
|
3201
|
-
const v = R(null), _ = R(t),
|
|
3202
|
-
_.current = t,
|
|
3203
|
-
const [k, j] = A(!1), [S, M] = A({ position: "fixed", visibility: "hidden", width: we }), [D, H] = A("bottom"), [q, W] = A(null),
|
|
3204
|
-
const x = _.current[
|
|
3228
|
+
const v = R(null), _ = R(t), w = R(s), y = R(l);
|
|
3229
|
+
_.current = t, w.current = s, y.current = l;
|
|
3230
|
+
const [k, j] = A(!1), [S, M] = A({ position: "fixed", visibility: "hidden", width: we }), [D, H] = A("bottom"), [q, W] = A(null), g = R(!1), C = t[s], K = s === t.length - 1, O = $e(() => {
|
|
3231
|
+
const x = _.current[w.current];
|
|
3205
3232
|
if (!x || !v.current) return;
|
|
3206
|
-
const b =
|
|
3233
|
+
const b = ts(x.target);
|
|
3207
3234
|
if (!b) return;
|
|
3208
|
-
const E = b.getBoundingClientRect(), U = v.current.getBoundingClientRect().height || 160, G = we, T = y.current ?
|
|
3235
|
+
const E = b.getBoundingClientRect(), U = v.current.getBoundingClientRect().height || 160, G = we, T = y.current ? Zt : Qt, f = x.position || ss(E, U, G, T), { top: $, left: z, arrowOffset: F } = ns(f, E, U, G, T);
|
|
3209
3236
|
H(f), M({
|
|
3210
3237
|
position: "fixed",
|
|
3211
3238
|
top: $,
|
|
@@ -3214,28 +3241,28 @@ function jn({
|
|
|
3214
3241
|
visibility: "visible",
|
|
3215
3242
|
"--arrow-offset": `${F}px`
|
|
3216
3243
|
}), W({
|
|
3217
|
-
top: E.top -
|
|
3218
|
-
left: E.left -
|
|
3219
|
-
width: E.width +
|
|
3220
|
-
height: E.height +
|
|
3244
|
+
top: E.top - be,
|
|
3245
|
+
left: E.left - be,
|
|
3246
|
+
width: E.width + be * 2,
|
|
3247
|
+
height: E.height + be * 2
|
|
3221
3248
|
});
|
|
3222
3249
|
}, []);
|
|
3223
3250
|
return B(() => {
|
|
3224
|
-
window.addEventListener("scroll",
|
|
3251
|
+
window.addEventListener("scroll", O, !0), window.addEventListener("resize", O);
|
|
3225
3252
|
const x = requestAnimationFrame(() => {
|
|
3226
|
-
|
|
3253
|
+
O(), j(!0), g.current = !0;
|
|
3227
3254
|
});
|
|
3228
3255
|
return () => {
|
|
3229
|
-
cancelAnimationFrame(x), window.removeEventListener("scroll",
|
|
3256
|
+
cancelAnimationFrame(x), window.removeEventListener("scroll", O, !0), window.removeEventListener("resize", O);
|
|
3230
3257
|
};
|
|
3231
3258
|
}, []), B(() => {
|
|
3232
|
-
if (!
|
|
3259
|
+
if (!g.current) return;
|
|
3233
3260
|
j(!1);
|
|
3234
3261
|
const x = setTimeout(() => {
|
|
3235
3262
|
M((b) => ({ ...b, visibility: "hidden" })), requestAnimationFrame(() => {
|
|
3236
|
-
|
|
3263
|
+
O(), j(!0);
|
|
3237
3264
|
});
|
|
3238
|
-
},
|
|
3265
|
+
}, es + 20);
|
|
3239
3266
|
return () => clearTimeout(x);
|
|
3240
3267
|
}, [s]), B(() => {
|
|
3241
3268
|
k && v.current && v.current.focus({ preventScroll: !0 });
|
|
@@ -3256,7 +3283,7 @@ function jn({
|
|
|
3256
3283
|
b.shiftKey && document.activeElement === L ? (b.preventDefault(), U.focus()) : !b.shiftKey && document.activeElement === U && (b.preventDefault(), L.focus());
|
|
3257
3284
|
};
|
|
3258
3285
|
return document.addEventListener("keydown", x), () => document.removeEventListener("keydown", x);
|
|
3259
|
-
}, [k]), !
|
|
3286
|
+
}, [k]), !C || typeof document > "u" ? null : pe.createPortal(
|
|
3260
3287
|
/* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
3261
3288
|
q && /* @__PURE__ */ e.jsx(
|
|
3262
3289
|
"div",
|
|
@@ -3279,7 +3306,7 @@ function jn({
|
|
|
3279
3306
|
role: "dialog",
|
|
3280
3307
|
"aria-modal": "false",
|
|
3281
3308
|
"aria-live": "polite",
|
|
3282
|
-
"aria-label":
|
|
3309
|
+
"aria-label": C.title ?? `Step ${s + 1} of ${t.length}`,
|
|
3283
3310
|
className: [
|
|
3284
3311
|
"ds-coachmark__bubble",
|
|
3285
3312
|
`ds-coachmark__bubble--${D}`,
|
|
@@ -3298,8 +3325,8 @@ function jn({
|
|
|
3298
3325
|
children: /* @__PURE__ */ e.jsx(ee, { size: 16, strokeWidth: 2 })
|
|
3299
3326
|
}
|
|
3300
3327
|
),
|
|
3301
|
-
|
|
3302
|
-
/* @__PURE__ */ e.jsx("div", { className: "ds-coachmark__body", children:
|
|
3328
|
+
C.title && /* @__PURE__ */ e.jsx("div", { className: "ds-coachmark__title", children: C.title }),
|
|
3329
|
+
/* @__PURE__ */ e.jsx("div", { className: "ds-coachmark__body", children: C.content }),
|
|
3303
3330
|
/* @__PURE__ */ e.jsxs("div", { className: "ds-coachmark__footer", children: [
|
|
3304
3331
|
t.length > 1 && /* @__PURE__ */ e.jsxs("span", { className: "ds-coachmark__counter", children: [
|
|
3305
3332
|
s + 1,
|
|
@@ -3307,7 +3334,7 @@ function jn({
|
|
|
3307
3334
|
t.length
|
|
3308
3335
|
] }),
|
|
3309
3336
|
/* @__PURE__ */ e.jsxs("div", { className: "ds-coachmark__footer-nav", children: [
|
|
3310
|
-
s > 0 && /* @__PURE__ */ e.jsx(ae, { variant: "secondary", size: "s", state:
|
|
3337
|
+
s > 0 && /* @__PURE__ */ e.jsx(ae, { variant: "secondary", size: "s", state: d, onClick: a, children: c }),
|
|
3311
3338
|
/* @__PURE__ */ e.jsx(ae, { variant: "primary", size: "s", state: h, onClick: K ? r : n, children: K ? p : u })
|
|
3312
3339
|
] })
|
|
3313
3340
|
] })
|
|
@@ -3318,7 +3345,7 @@ function jn({
|
|
|
3318
3345
|
document.body
|
|
3319
3346
|
);
|
|
3320
3347
|
}
|
|
3321
|
-
function
|
|
3348
|
+
function wn(t, s = {}) {
|
|
3322
3349
|
const { storageKey: n } = s, [a, o] = A(0), [r, i] = A(!1), l = () => n && typeof localStorage < "u" && localStorage.getItem(n) === "done", u = $e(() => {
|
|
3323
3350
|
i(!1), n && typeof localStorage < "u" && localStorage.setItem(n, "done");
|
|
3324
3351
|
}, [n]);
|
|
@@ -3328,13 +3355,13 @@ function Nn(t, s = {}) {
|
|
|
3328
3355
|
start: () => {
|
|
3329
3356
|
l() || (o(0), i(!0));
|
|
3330
3357
|
},
|
|
3331
|
-
next: () => o((
|
|
3332
|
-
back: () => o((
|
|
3358
|
+
next: () => o((c) => Math.min(c + 1, t.length - 1)),
|
|
3359
|
+
back: () => o((c) => Math.max(c - 1, 0)),
|
|
3333
3360
|
skip: u,
|
|
3334
3361
|
finish: u
|
|
3335
3362
|
};
|
|
3336
3363
|
}
|
|
3337
|
-
function
|
|
3364
|
+
function yn() {
|
|
3338
3365
|
const t = R(null), s = $e(() => {
|
|
3339
3366
|
const n = t.current;
|
|
3340
3367
|
if (!n) return;
|
|
@@ -3348,92 +3375,93 @@ function wn() {
|
|
|
3348
3375
|
}
|
|
3349
3376
|
export {
|
|
3350
3377
|
Be as Accordion,
|
|
3351
|
-
|
|
3352
|
-
|
|
3353
|
-
|
|
3378
|
+
vs as Alert,
|
|
3379
|
+
tn as AnimatedNumber,
|
|
3380
|
+
Ts as Avatar,
|
|
3354
3381
|
de as Badge,
|
|
3355
|
-
|
|
3356
|
-
|
|
3357
|
-
|
|
3382
|
+
Zs as Banner,
|
|
3383
|
+
bs as BottomSheet,
|
|
3384
|
+
Cs as Breadcrumb,
|
|
3358
3385
|
ae as Button,
|
|
3359
|
-
|
|
3360
|
-
|
|
3361
|
-
|
|
3362
|
-
|
|
3363
|
-
|
|
3364
|
-
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
|
|
3377
|
-
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
|
|
3386
|
+
us as Card,
|
|
3387
|
+
dn as ChatMessage,
|
|
3388
|
+
Es as Checkbox,
|
|
3389
|
+
gn as Coachmark,
|
|
3390
|
+
js as Code,
|
|
3391
|
+
yt as CodeAccordion,
|
|
3392
|
+
xn as ConfidenceBar,
|
|
3393
|
+
Ut as CopyButton,
|
|
3394
|
+
vn as DiffView,
|
|
3395
|
+
Fs as Drawer,
|
|
3396
|
+
Fe as DrawerFooter,
|
|
3397
|
+
Qs as Dropdown,
|
|
3398
|
+
Ps as EmptyState,
|
|
3399
|
+
jn as EngineerGrid,
|
|
3400
|
+
Ms as FormField,
|
|
3401
|
+
fs as H1,
|
|
3402
|
+
ms as H2,
|
|
3403
|
+
ps as H3,
|
|
3404
|
+
hs as H4,
|
|
3405
|
+
sn as InView,
|
|
3406
|
+
is as Input,
|
|
3407
|
+
Ns as Link,
|
|
3408
|
+
Xt as MessageFeedback,
|
|
3409
|
+
_n as MessageFooter,
|
|
3410
|
+
_s as Modal,
|
|
3384
3411
|
fe as ModalFooter,
|
|
3385
|
-
|
|
3386
|
-
|
|
3387
|
-
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
3412
|
+
mn as ModelPicker,
|
|
3413
|
+
Us as NavRail,
|
|
3414
|
+
Js as NavRailAgent,
|
|
3415
|
+
Ys as NavRailBody,
|
|
3416
|
+
Xs as NavRailCustomItem,
|
|
3417
|
+
Ks as NavRailDivider,
|
|
3418
|
+
Hs as NavRailFooter,
|
|
3419
|
+
qs as NavRailHeader,
|
|
3420
|
+
Vs as NavRailItem,
|
|
3421
|
+
Gs as NavRailRecents,
|
|
3422
|
+
xs as P1,
|
|
3423
|
+
jt as P2,
|
|
3424
|
+
Ke as P3,
|
|
3397
3425
|
Os as Pagination,
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
|
|
3426
|
+
en as ProgressBar,
|
|
3427
|
+
fn as PromptInput,
|
|
3428
|
+
$s as Radio,
|
|
3429
|
+
on as ReasoningBlock,
|
|
3430
|
+
Nn as Scrollable,
|
|
3431
|
+
ys as SegmentedControl,
|
|
3432
|
+
cs as Select,
|
|
3433
|
+
Ws as SidePage,
|
|
3434
|
+
We as SidePageFooter,
|
|
3435
|
+
$t as Skeleton,
|
|
3436
|
+
pn as SourcesPanel,
|
|
3437
|
+
_t as Spinner,
|
|
3438
|
+
zs as Stat,
|
|
3439
|
+
ln as StepIndicator,
|
|
3440
|
+
ds as Stepper,
|
|
3441
|
+
cn as StreamingText,
|
|
3414
3442
|
ws as Tab,
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
|
|
3420
|
-
|
|
3421
|
-
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
|
|
3443
|
+
Rs as Table,
|
|
3444
|
+
As as TableBody,
|
|
3445
|
+
Ss as TableHead,
|
|
3446
|
+
Is as TableRow,
|
|
3447
|
+
Bs as TableSubheaderRow,
|
|
3448
|
+
gs as Tabs,
|
|
3449
|
+
Ls as Td,
|
|
3450
|
+
ls as Textarea,
|
|
3451
|
+
Ds as Th,
|
|
3452
|
+
bn as ThinkingDot,
|
|
3453
|
+
rn as ToastContainer,
|
|
3454
|
+
ks as Toggle,
|
|
3455
|
+
hn as TokenCounter,
|
|
3456
|
+
an as ToolCallBubble,
|
|
3457
|
+
an as ToolCallCard,
|
|
3458
|
+
De as Tooltip,
|
|
3431
3459
|
P as iconSizes,
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3460
|
+
Mt as useAnimatedNumber,
|
|
3461
|
+
Vt as useAnimatedPlaceholder,
|
|
3462
|
+
wn as useCoachmark,
|
|
3463
|
+
zt as useInView,
|
|
3464
|
+
yn as useShake,
|
|
3465
|
+
un as useStreamScroll,
|
|
3466
|
+
nn as useToast
|
|
3439
3467
|
};
|