@donkit-ai/design-system 1.4.87 → 1.4.89
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/index.cjs.js +4 -4
- package/dist/index.d.ts +2 -0
- package/dist/index.es.js +797 -772
- package/dist/tokens.css +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import X, { useMemo as
|
|
2
|
-
import { Check as Pe, X as ee, ChevronDown as ye, Minus as
|
|
1
|
+
import X, { useMemo as vt, useContext as ie, createContext as De, useState as L, useRef as S, useEffect as F, useLayoutEffect as ct, useId as bt, useCallback as se, forwardRef as dt } from "react";
|
|
2
|
+
import { Check as Pe, X as ee, ChevronDown as ye, Minus as _t, Plus as jt, XCircle as Me, AlertTriangle as ze, CheckCircle as Fe, Info as We, ChevronUp as Nt, ChevronsUpDown as wt, ChevronLeft as gt, ChevronRight as yt, Copy as kt, Brain as Et, Loader as Tt, Paperclip as Ge, Square as $t, ArrowUp as Rt, Zap as St, Cpu as Ke, FileText as At, ThumbsUp as Bt, ThumbsDown as It } from "lucide-react";
|
|
3
3
|
import re from "react-dom";
|
|
4
4
|
const q = {
|
|
5
5
|
1: 16,
|
|
@@ -18,10 +18,10 @@ var Ie = { exports: {} }, we = {};
|
|
|
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 Xe;
|
|
22
|
+
function Lt() {
|
|
23
|
+
if (Xe) return we;
|
|
24
|
+
Xe = 1;
|
|
25
25
|
var t = Symbol.for("react.transitional.element"), s = Symbol.for("react.fragment");
|
|
26
26
|
function n(r, a, o) {
|
|
27
27
|
var i = null;
|
|
@@ -50,24 +50,24 @@ var ge = {};
|
|
|
50
50
|
* This source code is licensed under the MIT license found in the
|
|
51
51
|
* LICENSE file in the root directory of this source tree.
|
|
52
52
|
*/
|
|
53
|
-
var
|
|
54
|
-
function
|
|
55
|
-
return
|
|
53
|
+
var Je;
|
|
54
|
+
function Dt() {
|
|
55
|
+
return Je || (Je = 1, process.env.NODE_ENV !== "production" && function() {
|
|
56
56
|
function t(m) {
|
|
57
57
|
if (m == null) return null;
|
|
58
58
|
if (typeof m == "function")
|
|
59
|
-
return m.$$typeof ===
|
|
59
|
+
return m.$$typeof === P ? null : m.displayName || m.name || null;
|
|
60
60
|
if (typeof m == "string") return m;
|
|
61
61
|
switch (m) {
|
|
62
|
-
case w:
|
|
63
|
-
return "Fragment";
|
|
64
62
|
case y:
|
|
63
|
+
return "Fragment";
|
|
64
|
+
case T:
|
|
65
65
|
return "Profiler";
|
|
66
|
-
case
|
|
66
|
+
case j:
|
|
67
67
|
return "StrictMode";
|
|
68
|
-
case S:
|
|
69
|
-
return "Suspense";
|
|
70
68
|
case A:
|
|
69
|
+
return "Suspense";
|
|
70
|
+
case I:
|
|
71
71
|
return "SuspenseList";
|
|
72
72
|
case k:
|
|
73
73
|
return "Activity";
|
|
@@ -76,16 +76,16 @@ function It() {
|
|
|
76
76
|
switch (typeof m.tag == "number" && console.error(
|
|
77
77
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
78
78
|
), m.$$typeof) {
|
|
79
|
-
case j:
|
|
80
|
-
return "Portal";
|
|
81
79
|
case N:
|
|
80
|
+
return "Portal";
|
|
81
|
+
case w:
|
|
82
82
|
return m.displayName || "Context";
|
|
83
|
-
case
|
|
83
|
+
case g:
|
|
84
84
|
return (m._context.displayName || "Context") + ".Consumer";
|
|
85
85
|
case _:
|
|
86
86
|
var x = m.render;
|
|
87
87
|
return m = m.displayName, m || (m = x.displayName || x.name || "", m = m !== "" ? "ForwardRef(" + m + ")" : "ForwardRef"), m;
|
|
88
|
-
case
|
|
88
|
+
case D:
|
|
89
89
|
return x = m.displayName || null, x !== null ? x : t(m.type) || "Memo";
|
|
90
90
|
case O:
|
|
91
91
|
x = m._payload, m = m._init;
|
|
@@ -108,16 +108,16 @@ function It() {
|
|
|
108
108
|
}
|
|
109
109
|
if (x) {
|
|
110
110
|
x = console;
|
|
111
|
-
var B = x.error,
|
|
111
|
+
var B = x.error, C = typeof Symbol == "function" && Symbol.toStringTag && m[Symbol.toStringTag] || m.constructor.name || "Object";
|
|
112
112
|
return B.call(
|
|
113
113
|
x,
|
|
114
114
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
115
|
-
|
|
115
|
+
C
|
|
116
116
|
), s(m);
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
119
|
function r(m) {
|
|
120
|
-
if (m ===
|
|
120
|
+
if (m === y) return "<>";
|
|
121
121
|
if (typeof m == "object" && m !== null && m.$$typeof === O)
|
|
122
122
|
return "<...>";
|
|
123
123
|
try {
|
|
@@ -128,7 +128,7 @@ function It() {
|
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
130
|
function a() {
|
|
131
|
-
var m =
|
|
131
|
+
var m = H.A;
|
|
132
132
|
return m === null ? null : m.getOwner();
|
|
133
133
|
}
|
|
134
134
|
function o() {
|
|
@@ -159,14 +159,14 @@ function It() {
|
|
|
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
|
)), m = this.props.ref, m !== void 0 ? m : null;
|
|
161
161
|
}
|
|
162
|
-
function u(m, x, B,
|
|
162
|
+
function u(m, x, B, C, te, le) {
|
|
163
163
|
var G = B.ref;
|
|
164
164
|
return m = {
|
|
165
165
|
$$typeof: v,
|
|
166
166
|
type: m,
|
|
167
167
|
key: x,
|
|
168
168
|
props: B,
|
|
169
|
-
_owner:
|
|
169
|
+
_owner: C
|
|
170
170
|
}, (G !== void 0 ? G : null) !== null ? Object.defineProperty(m, "ref", {
|
|
171
171
|
enumerable: !1,
|
|
172
172
|
get: c
|
|
@@ -192,13 +192,13 @@ function It() {
|
|
|
192
192
|
value: le
|
|
193
193
|
}), Object.freeze && (Object.freeze(m.props), Object.freeze(m)), m;
|
|
194
194
|
}
|
|
195
|
-
function d(m, x, B,
|
|
195
|
+
function d(m, x, B, C, te, le) {
|
|
196
196
|
var G = x.children;
|
|
197
197
|
if (G !== void 0)
|
|
198
|
-
if (
|
|
198
|
+
if (C)
|
|
199
199
|
if (M(G)) {
|
|
200
|
-
for (
|
|
201
|
-
p(G[
|
|
200
|
+
for (C = 0; C < G.length; C++)
|
|
201
|
+
p(G[C]);
|
|
202
202
|
Object.freeze && Object.freeze(G);
|
|
203
203
|
} else
|
|
204
204
|
console.error(
|
|
@@ -210,18 +210,18 @@ function It() {
|
|
|
210
210
|
var Z = Object.keys(x).filter(function(je) {
|
|
211
211
|
return je !== "key";
|
|
212
212
|
});
|
|
213
|
-
|
|
213
|
+
C = 0 < Z.length ? "{key: someKey, " + Z.join(": ..., ") + ": ...}" : "{key: someKey}", Y[G + C] || (Z = 0 < Z.length ? "{" + Z.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
214
214
|
`A props object containing a "key" prop is being spread into JSX:
|
|
215
215
|
let props = %s;
|
|
216
216
|
<%s {...props} />
|
|
217
217
|
React keys must be passed directly to JSX without using spread:
|
|
218
218
|
let props = %s;
|
|
219
219
|
<%s key={someKey} {...props} />`,
|
|
220
|
-
|
|
220
|
+
C,
|
|
221
221
|
G,
|
|
222
222
|
Z,
|
|
223
223
|
G
|
|
224
|
-
), Y[G +
|
|
224
|
+
), Y[G + C] = !0);
|
|
225
225
|
}
|
|
226
226
|
if (G = null, B !== void 0 && (n(B), G = "" + B), i(x) && (n(x.key), G = "" + x.key), "key" in x) {
|
|
227
227
|
B = {};
|
|
@@ -246,7 +246,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
246
246
|
function h(m) {
|
|
247
247
|
return typeof m == "object" && m !== null && m.$$typeof === v;
|
|
248
248
|
}
|
|
249
|
-
var f = X, v = Symbol.for("react.transitional.element"),
|
|
249
|
+
var f = X, v = Symbol.for("react.transitional.element"), N = Symbol.for("react.portal"), y = Symbol.for("react.fragment"), j = Symbol.for("react.strict_mode"), T = Symbol.for("react.profiler"), g = Symbol.for("react.consumer"), w = Symbol.for("react.context"), _ = Symbol.for("react.forward_ref"), A = Symbol.for("react.suspense"), I = Symbol.for("react.suspense_list"), D = Symbol.for("react.memo"), O = Symbol.for("react.lazy"), k = Symbol.for("react.activity"), P = Symbol.for("react.client.reference"), H = f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, W = Object.prototype.hasOwnProperty, M = Array.isArray, b = console.createTask ? console.createTask : function() {
|
|
250
250
|
return null;
|
|
251
251
|
};
|
|
252
252
|
f = {
|
|
@@ -257,31 +257,31 @@ React keys must be passed directly to JSX without using spread:
|
|
|
257
257
|
var $, R = {}, V = f.react_stack_bottom_frame.bind(
|
|
258
258
|
f,
|
|
259
259
|
o
|
|
260
|
-
)(),
|
|
261
|
-
ge.Fragment =
|
|
262
|
-
var
|
|
260
|
+
)(), U = b(r(o)), Y = {};
|
|
261
|
+
ge.Fragment = y, ge.jsx = function(m, x, B) {
|
|
262
|
+
var C = 1e4 > H.recentlyCreatedOwnerStacks++;
|
|
263
263
|
return d(
|
|
264
264
|
m,
|
|
265
265
|
x,
|
|
266
266
|
B,
|
|
267
267
|
!1,
|
|
268
|
-
|
|
269
|
-
|
|
268
|
+
C ? Error("react-stack-top-frame") : V,
|
|
269
|
+
C ? b(r(m)) : U
|
|
270
270
|
);
|
|
271
271
|
}, ge.jsxs = function(m, x, B) {
|
|
272
|
-
var
|
|
272
|
+
var C = 1e4 > H.recentlyCreatedOwnerStacks++;
|
|
273
273
|
return d(
|
|
274
274
|
m,
|
|
275
275
|
x,
|
|
276
276
|
B,
|
|
277
277
|
!0,
|
|
278
|
-
|
|
279
|
-
|
|
278
|
+
C ? Error("react-stack-top-frame") : V,
|
|
279
|
+
C ? b(r(m)) : U
|
|
280
280
|
);
|
|
281
281
|
};
|
|
282
282
|
}()), ge;
|
|
283
283
|
}
|
|
284
|
-
process.env.NODE_ENV === "production" ? Ie.exports =
|
|
284
|
+
process.env.NODE_ENV === "production" ? Ie.exports = Lt() : Ie.exports = Dt();
|
|
285
285
|
var e = Ie.exports;
|
|
286
286
|
const $e = {
|
|
287
287
|
// Close / dismiss
|
|
@@ -334,7 +334,7 @@ const $e = {
|
|
|
334
334
|
// Browser tabs
|
|
335
335
|
closeTab: "Close {label}"
|
|
336
336
|
};
|
|
337
|
-
function
|
|
337
|
+
function ut(t, s = {}) {
|
|
338
338
|
return typeof t == "function" ? t(s) : typeof t != "string" ? "" : t.replace(
|
|
339
339
|
/\{(\w+)\}/g,
|
|
340
340
|
(n, r) => s[r] !== void 0 && s[r] !== null ? String(s[r]) : ""
|
|
@@ -342,14 +342,14 @@ function ct(t, s = {}) {
|
|
|
342
342
|
}
|
|
343
343
|
const Oe = De({
|
|
344
344
|
strings: $e,
|
|
345
|
-
t: (t, s) =>
|
|
345
|
+
t: (t, s) => ut($e[t] ?? t, s)
|
|
346
346
|
});
|
|
347
|
-
function
|
|
348
|
-
const n =
|
|
347
|
+
function Es({ strings: t, children: s }) {
|
|
348
|
+
const n = vt(() => {
|
|
349
349
|
const r = { ...$e, ...t };
|
|
350
350
|
return {
|
|
351
351
|
strings: r,
|
|
352
|
-
t: (a, o) =>
|
|
352
|
+
t: (a, o) => ut(r[a] ?? $e[a] ?? a, o)
|
|
353
353
|
};
|
|
354
354
|
}, [t]);
|
|
355
355
|
return /* @__PURE__ */ e.jsx(Oe.Provider, { value: n, children: s });
|
|
@@ -360,7 +360,7 @@ function be() {
|
|
|
360
360
|
function K() {
|
|
361
361
|
return ie(Oe).strings;
|
|
362
362
|
}
|
|
363
|
-
function
|
|
363
|
+
function Pt({ size: t = "m", color: s = "default", className: n = "", "aria-label": r, ...a }) {
|
|
364
364
|
const o = K();
|
|
365
365
|
return /* @__PURE__ */ e.jsx(
|
|
366
366
|
"span",
|
|
@@ -372,7 +372,7 @@ function Lt({ size: t = "m", color: s = "default", className: n = "", "aria-labe
|
|
|
372
372
|
}
|
|
373
373
|
);
|
|
374
374
|
}
|
|
375
|
-
const
|
|
375
|
+
const Mt = { xs: 12, s: 14, m: 16, l: 20 };
|
|
376
376
|
function de({
|
|
377
377
|
children: t,
|
|
378
378
|
variant: s = "primary",
|
|
@@ -395,22 +395,22 @@ function de({
|
|
|
395
395
|
"aria-label": h,
|
|
396
396
|
"aria-pressed": f,
|
|
397
397
|
className: v = "",
|
|
398
|
-
...
|
|
398
|
+
...N
|
|
399
399
|
}) {
|
|
400
|
-
const
|
|
400
|
+
const y = a && !t, j = i === "loading", T = i === "success", g = i === "error", w = j || T || g, _ = !!(l || c), A = n === "xs" ? "s" : "m", I = s === "danger" ? "on-accent" : "default", D = Mt[n] ?? 16, O = j ? /* @__PURE__ */ e.jsx(Pt, { size: A, color: I }) : T ? /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(Pe, { size: D, strokeWidth: 2.5 }) }) : g ? /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(ee, { size: D, strokeWidth: 2.5 }) }) : null, k = [
|
|
401
401
|
"ds-button",
|
|
402
402
|
`ds-button--${s}`,
|
|
403
403
|
`ds-button--${n}`,
|
|
404
404
|
r && "ds-button--full",
|
|
405
|
-
|
|
405
|
+
y && "ds-button--icon-only",
|
|
406
406
|
v
|
|
407
|
-
].filter(Boolean).join(" "),
|
|
408
|
-
|
|
407
|
+
].filter(Boolean).join(" "), P = i !== "idle" ? i : void 0, H = f !== void 0 ? f : _ ? !0 : void 0, W = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
408
|
+
w ? O : a && /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: a }),
|
|
409
409
|
t
|
|
410
410
|
] });
|
|
411
411
|
if (p) {
|
|
412
412
|
const M = (b) => {
|
|
413
|
-
if (o ||
|
|
413
|
+
if (o || j) {
|
|
414
414
|
b.preventDefault();
|
|
415
415
|
return;
|
|
416
416
|
}
|
|
@@ -420,15 +420,15 @@ function de({
|
|
|
420
420
|
"a",
|
|
421
421
|
{
|
|
422
422
|
className: k,
|
|
423
|
-
href: o ||
|
|
423
|
+
href: o || j ? void 0 : p,
|
|
424
424
|
onClick: M,
|
|
425
425
|
"aria-label": h,
|
|
426
|
-
"aria-disabled": o ||
|
|
427
|
-
"aria-busy":
|
|
428
|
-
"aria-pressed":
|
|
429
|
-
"data-state":
|
|
426
|
+
"aria-disabled": o || j ? "true" : void 0,
|
|
427
|
+
"aria-busy": j ? "true" : void 0,
|
|
428
|
+
"aria-pressed": H,
|
|
429
|
+
"data-state": P,
|
|
430
430
|
"data-active": _ ? "true" : void 0,
|
|
431
|
-
...
|
|
431
|
+
...N,
|
|
432
432
|
children: W
|
|
433
433
|
}
|
|
434
434
|
);
|
|
@@ -439,18 +439,18 @@ function de({
|
|
|
439
439
|
type: d,
|
|
440
440
|
className: k,
|
|
441
441
|
disabled: o,
|
|
442
|
-
onClick:
|
|
442
|
+
onClick: j ? void 0 : u,
|
|
443
443
|
"aria-label": h,
|
|
444
|
-
"aria-busy":
|
|
445
|
-
"aria-pressed":
|
|
446
|
-
"data-state":
|
|
444
|
+
"aria-busy": j ? "true" : void 0,
|
|
445
|
+
"aria-pressed": H,
|
|
446
|
+
"data-state": P,
|
|
447
447
|
"data-active": _ ? "true" : void 0,
|
|
448
|
-
...
|
|
448
|
+
...N,
|
|
449
449
|
children: W
|
|
450
450
|
}
|
|
451
451
|
);
|
|
452
452
|
}
|
|
453
|
-
function
|
|
453
|
+
function Ts({
|
|
454
454
|
label: t,
|
|
455
455
|
error: s,
|
|
456
456
|
hint: n,
|
|
@@ -464,7 +464,7 @@ function ys({
|
|
|
464
464
|
iconRightLabel: d,
|
|
465
465
|
...p
|
|
466
466
|
}) {
|
|
467
|
-
const h = K(), f = u || `input-${X.useId()}`, v = n ? `${f}-hint` : void 0,
|
|
467
|
+
const h = K(), f = u || `input-${X.useId()}`, v = n ? `${f}-hint` : void 0, N = s ? `${f}-error` : void 0, y = N || v;
|
|
468
468
|
return /* @__PURE__ */ e.jsxs("div", { className: `ds-input-wrapper ${r ? "ds-input-wrapper--full" : ""} ${c ? "ds-input-wrapper--disabled" : ""} ${s ? "ds-input-wrapper--error" : ""}`, children: [
|
|
469
469
|
t && /* @__PURE__ */ e.jsx("label", { className: "ds-input-label", htmlFor: f, children: t }),
|
|
470
470
|
/* @__PURE__ */ e.jsxs("div", { className: "ds-input-container", children: [
|
|
@@ -476,7 +476,7 @@ function ys({
|
|
|
476
476
|
className: `ds-input ds-input--${l} ${a ? "ds-input--with-icon" : ""} ${o ? "ds-input--with-icon-right" : ""} ${s ? "ds-input--error" : ""}`,
|
|
477
477
|
disabled: c,
|
|
478
478
|
"aria-invalid": s ? "true" : "false",
|
|
479
|
-
"aria-describedby":
|
|
479
|
+
"aria-describedby": y,
|
|
480
480
|
...p
|
|
481
481
|
}
|
|
482
482
|
),
|
|
@@ -493,10 +493,10 @@ function ys({
|
|
|
493
493
|
)
|
|
494
494
|
] }),
|
|
495
495
|
n && !s && /* @__PURE__ */ e.jsx("span", { id: v, className: "ds-input-hint", children: n }),
|
|
496
|
-
/* @__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:
|
|
496
|
+
/* @__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: N, className: "ds-input-error", role: "alert", children: s }) }) })
|
|
497
497
|
] });
|
|
498
498
|
}
|
|
499
|
-
function
|
|
499
|
+
function $s({
|
|
500
500
|
label: t,
|
|
501
501
|
error: s,
|
|
502
502
|
hint: n,
|
|
@@ -527,7 +527,7 @@ function ks({
|
|
|
527
527
|
s && /* @__PURE__ */ e.jsx("span", { id: h, className: "ds-textarea-error", role: "alert", children: s })
|
|
528
528
|
] });
|
|
529
529
|
}
|
|
530
|
-
function
|
|
530
|
+
function Rs({
|
|
531
531
|
label: t,
|
|
532
532
|
value: s,
|
|
533
533
|
onChange: n,
|
|
@@ -540,23 +540,23 @@ function Es({
|
|
|
540
540
|
id: u,
|
|
541
541
|
...d
|
|
542
542
|
}) {
|
|
543
|
-
const p = K(), h = a ?? p.selectOption, [f, v] =
|
|
544
|
-
|
|
543
|
+
const p = K(), h = a ?? p.selectOption, [f, v] = L(!1), [N, y] = L(!1), [j, T] = L({}), [g, w] = L("down"), [_, A] = L(-1), I = S(null), D = S(null), O = S(null), k = S(null), P = u || `select-${X.useId()}`, H = `${P}-label`, W = o ? `${P}-error` : void 0, M = 150, b = (x = !1) => {
|
|
544
|
+
N || (y(!0), A(-1), k.current = setTimeout(() => {
|
|
545
545
|
var B;
|
|
546
|
-
v(!1),
|
|
546
|
+
v(!1), y(!1), x && ((B = O.current) == null || B.focus());
|
|
547
547
|
}, M));
|
|
548
548
|
}, $ = (x) => {
|
|
549
|
-
clearTimeout(k.current),
|
|
550
|
-
const B = x !== void 0 ? x : Math.max(r.findIndex((
|
|
551
|
-
|
|
549
|
+
clearTimeout(k.current), y(!1);
|
|
550
|
+
const B = x !== void 0 ? x : Math.max(r.findIndex((C) => C.value === s), 0);
|
|
551
|
+
A(B), v(!0);
|
|
552
552
|
};
|
|
553
553
|
F(() => () => clearTimeout(k.current), []);
|
|
554
554
|
const R = () => {
|
|
555
555
|
var Z;
|
|
556
|
-
const x = (Z =
|
|
556
|
+
const x = (Z = I.current) == null ? void 0 : Z.getBoundingClientRect();
|
|
557
557
|
if (!x) return;
|
|
558
|
-
const B = window.innerHeight,
|
|
559
|
-
|
|
558
|
+
const B = window.innerHeight, C = B - x.bottom, te = x.top, G = C < 300 && te > C;
|
|
559
|
+
w(G ? "up" : "down"), T(
|
|
560
560
|
G ? { bottom: B - x.top + 4, left: x.left, width: x.width } : { top: x.bottom + 4, left: x.left, width: x.width }
|
|
561
561
|
);
|
|
562
562
|
};
|
|
@@ -567,27 +567,27 @@ function Es({
|
|
|
567
567
|
};
|
|
568
568
|
}, [f]), F(() => {
|
|
569
569
|
const x = (B) => {
|
|
570
|
-
|
|
570
|
+
I.current && !I.current.contains(B.target) && D.current && !D.current.contains(B.target) && b();
|
|
571
571
|
};
|
|
572
572
|
return document.addEventListener("mousedown", x), () => document.removeEventListener("mousedown", x);
|
|
573
|
-
}, [
|
|
573
|
+
}, [N]), F(() => {
|
|
574
574
|
var B;
|
|
575
|
-
if (!f || _ < 0 || !
|
|
576
|
-
(B =
|
|
575
|
+
if (!f || _ < 0 || !D.current) return;
|
|
576
|
+
(B = D.current.querySelectorAll(".ds-select-option")[_]) == null || B.scrollIntoView({ block: "nearest" });
|
|
577
577
|
}, [_, f]);
|
|
578
578
|
const V = (x) => {
|
|
579
579
|
switch (x.key) {
|
|
580
580
|
case "ArrowDown":
|
|
581
|
-
x.preventDefault(), f ?
|
|
581
|
+
x.preventDefault(), f ? A((B) => Math.min(B + 1, r.length - 1)) : $();
|
|
582
582
|
break;
|
|
583
583
|
case "ArrowUp":
|
|
584
|
-
x.preventDefault(), f ?
|
|
584
|
+
x.preventDefault(), f ? A((B) => Math.max(B - 1, 0)) : $(r.length - 1);
|
|
585
585
|
break;
|
|
586
586
|
case "Home":
|
|
587
|
-
f && (x.preventDefault(),
|
|
587
|
+
f && (x.preventDefault(), A(0));
|
|
588
588
|
break;
|
|
589
589
|
case "End":
|
|
590
|
-
f && (x.preventDefault(),
|
|
590
|
+
f && (x.preventDefault(), A(r.length - 1));
|
|
591
591
|
break;
|
|
592
592
|
case "Enter":
|
|
593
593
|
case " ":
|
|
@@ -600,25 +600,25 @@ function Es({
|
|
|
600
600
|
f && b(!1);
|
|
601
601
|
break;
|
|
602
602
|
}
|
|
603
|
-
},
|
|
603
|
+
}, U = r.find((x) => x.value === s), Y = l === "xs" ? q[1] : l === "small" ? q[2] : q[3], m = f && /* @__PURE__ */ e.jsx(
|
|
604
604
|
"div",
|
|
605
605
|
{
|
|
606
|
-
ref:
|
|
606
|
+
ref: D,
|
|
607
607
|
"data-ds-portal": "",
|
|
608
608
|
role: "listbox",
|
|
609
|
-
"aria-labelledby": t ?
|
|
609
|
+
"aria-labelledby": t ? H : void 0,
|
|
610
610
|
tabIndex: -1,
|
|
611
611
|
className: [
|
|
612
612
|
"ds-select-dropdown ds-scrollable",
|
|
613
613
|
`ds-select-dropdown--${l}`,
|
|
614
|
-
`ds-select-dropdown--${
|
|
615
|
-
|
|
614
|
+
`ds-select-dropdown--${g}`,
|
|
615
|
+
N && "ds-select-dropdown--closing"
|
|
616
616
|
].filter(Boolean).join(" "),
|
|
617
|
-
style:
|
|
617
|
+
style: j,
|
|
618
618
|
children: r.map((x, B) => /* @__PURE__ */ e.jsx(
|
|
619
619
|
"button",
|
|
620
620
|
{
|
|
621
|
-
id: `${
|
|
621
|
+
id: `${P}-opt-${B}`,
|
|
622
622
|
type: "button",
|
|
623
623
|
role: "option",
|
|
624
624
|
tabIndex: -1,
|
|
@@ -639,18 +639,18 @@ function Es({
|
|
|
639
639
|
}
|
|
640
640
|
);
|
|
641
641
|
return /* @__PURE__ */ e.jsxs("div", { className: `ds-select-wrapper ${i ? "ds-select-wrapper--full" : ""} ${c ? "ds-select-wrapper--disabled" : ""}`, children: [
|
|
642
|
-
t && /* @__PURE__ */ e.jsx("label", { id:
|
|
643
|
-
/* @__PURE__ */ e.jsx("div", { className: "ds-select-container", ref:
|
|
642
|
+
t && /* @__PURE__ */ e.jsx("label", { id: H, className: "ds-select-label", children: t }),
|
|
643
|
+
/* @__PURE__ */ e.jsx("div", { className: "ds-select-container", ref: I, children: /* @__PURE__ */ e.jsxs(
|
|
644
644
|
"button",
|
|
645
645
|
{
|
|
646
646
|
ref: O,
|
|
647
647
|
type: "button",
|
|
648
|
-
id:
|
|
648
|
+
id: P,
|
|
649
649
|
role: "combobox",
|
|
650
650
|
"aria-haspopup": "listbox",
|
|
651
651
|
"aria-expanded": f,
|
|
652
|
-
"aria-activedescendant": f && _ >= 0 ? `${
|
|
653
|
-
"aria-labelledby": t ?
|
|
652
|
+
"aria-activedescendant": f && _ >= 0 ? `${P}-opt-${_}` : void 0,
|
|
653
|
+
"aria-labelledby": t ? H : void 0,
|
|
654
654
|
"aria-invalid": o ? "true" : "false",
|
|
655
655
|
"aria-describedby": W,
|
|
656
656
|
className: `ds-select-trigger ds-select-trigger--${l} ${o ? "ds-select-trigger--error" : ""}`,
|
|
@@ -661,13 +661,13 @@ function Es({
|
|
|
661
661
|
disabled: c,
|
|
662
662
|
...d,
|
|
663
663
|
children: [
|
|
664
|
-
/* @__PURE__ */ e.jsx("span", { className:
|
|
664
|
+
/* @__PURE__ */ e.jsx("span", { className: U ? "" : "ds-select-placeholder", children: (U == null ? void 0 : U.label) || h }),
|
|
665
665
|
/* @__PURE__ */ e.jsx(
|
|
666
666
|
ye,
|
|
667
667
|
{
|
|
668
668
|
size: Y,
|
|
669
669
|
strokeWidth: 1.5,
|
|
670
|
-
className: `ds-select-icon ${f &&
|
|
670
|
+
className: `ds-select-icon ${f && g === "down" ? "ds-select-icon--open" : ""} ${f && g === "up" ? "ds-select-icon--up" : ""}`,
|
|
671
671
|
"aria-hidden": "true"
|
|
672
672
|
}
|
|
673
673
|
)
|
|
@@ -678,7 +678,7 @@ function Es({
|
|
|
678
678
|
typeof document < "u" && re.createPortal(m, document.body)
|
|
679
679
|
] });
|
|
680
680
|
}
|
|
681
|
-
function
|
|
681
|
+
function Ss({
|
|
682
682
|
label: t,
|
|
683
683
|
value: s = 0,
|
|
684
684
|
onChange: n,
|
|
@@ -695,45 +695,45 @@ function Ts({
|
|
|
695
695
|
}) {
|
|
696
696
|
const f = K(), v = () => {
|
|
697
697
|
if (l) return;
|
|
698
|
-
const
|
|
699
|
-
n == null || n(
|
|
700
|
-
},
|
|
698
|
+
const w = Math.min(Number(s) + o, a);
|
|
699
|
+
n == null || n(w);
|
|
700
|
+
}, N = () => {
|
|
701
701
|
if (l) return;
|
|
702
|
-
const
|
|
703
|
-
n == null || n(
|
|
704
|
-
},
|
|
702
|
+
const w = Math.max(Number(s) - o, r);
|
|
703
|
+
n == null || n(w);
|
|
704
|
+
}, y = (w) => {
|
|
705
705
|
if (l) return;
|
|
706
|
-
const _ =
|
|
706
|
+
const _ = w.target.value;
|
|
707
707
|
if (_ === "") {
|
|
708
708
|
n == null || n(r);
|
|
709
709
|
return;
|
|
710
710
|
}
|
|
711
|
-
const
|
|
712
|
-
if (!isNaN(
|
|
713
|
-
const
|
|
714
|
-
n == null || n(
|
|
711
|
+
const A = Number(_);
|
|
712
|
+
if (!isNaN(A)) {
|
|
713
|
+
const I = Math.min(Math.max(A, r), a);
|
|
714
|
+
n == null || n(I);
|
|
715
715
|
}
|
|
716
|
-
},
|
|
716
|
+
}, j = [
|
|
717
717
|
"ds-stepper-wrapper",
|
|
718
718
|
l && "ds-stepper-wrapper--disabled",
|
|
719
719
|
u && "ds-stepper-wrapper--error"
|
|
720
|
-
].filter(Boolean).join(" "),
|
|
720
|
+
].filter(Boolean).join(" "), T = [
|
|
721
721
|
"ds-stepper",
|
|
722
722
|
`ds-stepper--${i}`,
|
|
723
723
|
l && "ds-stepper--disabled"
|
|
724
|
-
].filter(Boolean).join(" "),
|
|
725
|
-
return /* @__PURE__ */ e.jsxs("div", { className:
|
|
724
|
+
].filter(Boolean).join(" "), g = i === "xs" ? q[1] : i === "small" ? q[2] : q[3];
|
|
725
|
+
return /* @__PURE__ */ e.jsxs("div", { className: j, children: [
|
|
726
726
|
t && /* @__PURE__ */ e.jsx("label", { className: "ds-stepper-label", children: t }),
|
|
727
|
-
/* @__PURE__ */ e.jsxs("div", { className:
|
|
727
|
+
/* @__PURE__ */ e.jsxs("div", { className: T, children: [
|
|
728
728
|
/* @__PURE__ */ e.jsx(
|
|
729
729
|
"button",
|
|
730
730
|
{
|
|
731
731
|
type: "button",
|
|
732
732
|
className: "ds-stepper-button ds-stepper-button--minus",
|
|
733
|
-
onClick:
|
|
733
|
+
onClick: N,
|
|
734
734
|
disabled: l || s <= r,
|
|
735
735
|
"aria-label": d ?? f.decrease,
|
|
736
|
-
children: /* @__PURE__ */ e.jsx(
|
|
736
|
+
children: /* @__PURE__ */ e.jsx(_t, { size: g, strokeWidth: 1.5 })
|
|
737
737
|
}
|
|
738
738
|
),
|
|
739
739
|
/* @__PURE__ */ e.jsx(
|
|
@@ -742,7 +742,7 @@ function Ts({
|
|
|
742
742
|
type: "number",
|
|
743
743
|
className: "ds-stepper-input",
|
|
744
744
|
value: s,
|
|
745
|
-
onChange:
|
|
745
|
+
onChange: y,
|
|
746
746
|
min: r,
|
|
747
747
|
max: a,
|
|
748
748
|
step: o,
|
|
@@ -758,7 +758,7 @@ function Ts({
|
|
|
758
758
|
onClick: v,
|
|
759
759
|
disabled: l || s >= a,
|
|
760
760
|
"aria-label": p ?? f.increase,
|
|
761
|
-
children: /* @__PURE__ */ e.jsx(
|
|
761
|
+
children: /* @__PURE__ */ e.jsx(jt, { size: g, strokeWidth: 1.5 })
|
|
762
762
|
}
|
|
763
763
|
)
|
|
764
764
|
] }),
|
|
@@ -766,7 +766,7 @@ function Ts({
|
|
|
766
766
|
u && /* @__PURE__ */ e.jsx("div", { className: "ds-stepper-error", children: u })
|
|
767
767
|
] });
|
|
768
768
|
}
|
|
769
|
-
function
|
|
769
|
+
function As({
|
|
770
770
|
children: t,
|
|
771
771
|
padding: s = "m",
|
|
772
772
|
variant: n = "default",
|
|
@@ -785,12 +785,12 @@ function $s({
|
|
|
785
785
|
l
|
|
786
786
|
].filter(Boolean).join(" ");
|
|
787
787
|
if (o) {
|
|
788
|
-
const v = (
|
|
788
|
+
const v = (N) => {
|
|
789
789
|
if (i) {
|
|
790
|
-
|
|
790
|
+
N.preventDefault();
|
|
791
791
|
return;
|
|
792
792
|
}
|
|
793
|
-
|
|
793
|
+
N.metaKey || N.ctrlKey || N.button === 1 || (N.preventDefault(), a == null || a(N));
|
|
794
794
|
};
|
|
795
795
|
return /* @__PURE__ */ e.jsx(
|
|
796
796
|
"a",
|
|
@@ -820,25 +820,25 @@ function $s({
|
|
|
820
820
|
}
|
|
821
821
|
);
|
|
822
822
|
}
|
|
823
|
-
function
|
|
823
|
+
function Bs({ children: t, ...s }) {
|
|
824
824
|
return /* @__PURE__ */ e.jsx("h1", { className: "ds-h1", ...s, children: t });
|
|
825
825
|
}
|
|
826
|
-
function
|
|
826
|
+
function Is({ children: t, ...s }) {
|
|
827
827
|
return /* @__PURE__ */ e.jsx("h2", { className: "ds-h2", ...s, children: t });
|
|
828
828
|
}
|
|
829
|
-
function
|
|
829
|
+
function Ls({ children: t, ...s }) {
|
|
830
830
|
return /* @__PURE__ */ e.jsx("h3", { className: "ds-h3", ...s, children: t });
|
|
831
831
|
}
|
|
832
|
-
function
|
|
832
|
+
function Ds({ children: t, ...s }) {
|
|
833
833
|
return /* @__PURE__ */ e.jsx("h4", { className: "ds-h4", ...s, children: t });
|
|
834
834
|
}
|
|
835
|
-
function
|
|
835
|
+
function Ps({ children: t, secondary: s = !1, ...n }) {
|
|
836
836
|
return /* @__PURE__ */ e.jsx("p", { className: `ds-p1 ${s ? "ds-p1--secondary" : ""}`, ...n, children: t });
|
|
837
837
|
}
|
|
838
|
-
function
|
|
838
|
+
function zt({ children: t, secondary: s = !1, ...n }) {
|
|
839
839
|
return /* @__PURE__ */ e.jsx("p", { className: `ds-p2 ${s ? "ds-p2--secondary" : ""}`, ...n, children: t });
|
|
840
840
|
}
|
|
841
|
-
function
|
|
841
|
+
function ft({ children: t, secondary: s = !1, ...n }) {
|
|
842
842
|
return /* @__PURE__ */ e.jsx("p", { className: `ds-p3 ${s ? "ds-p3--secondary" : ""}`, ...n, children: t });
|
|
843
843
|
}
|
|
844
844
|
function he({
|
|
@@ -855,12 +855,12 @@ function he({
|
|
|
855
855
|
].filter(Boolean).join(" "), i = r || (["info", "success", "warning", "error"].includes(s) ? "status" : void 0);
|
|
856
856
|
return /* @__PURE__ */ e.jsx("span", { className: o, role: i, ...a, children: t });
|
|
857
857
|
}
|
|
858
|
-
const
|
|
858
|
+
const Ft = {
|
|
859
859
|
info: We,
|
|
860
860
|
success: Fe,
|
|
861
861
|
warning: ze,
|
|
862
862
|
error: Me
|
|
863
|
-
},
|
|
863
|
+
}, Ms = X.forwardRef(function({
|
|
864
864
|
children: s,
|
|
865
865
|
variant: n = "info",
|
|
866
866
|
title: r,
|
|
@@ -869,7 +869,7 @@ const Mt = {
|
|
|
869
869
|
closeLabel: i,
|
|
870
870
|
...l
|
|
871
871
|
}, c) {
|
|
872
|
-
const u = K(), d =
|
|
872
|
+
const u = K(), d = Ft[n], p = o || (n === "error" ? "alert" : "status");
|
|
873
873
|
return /* @__PURE__ */ e.jsxs("div", { ref: c, className: `ds-alert ds-alert--${n} ${r ? "" : "ds-alert--no-title"}`, role: p, ...l, children: [
|
|
874
874
|
d && /* @__PURE__ */ e.jsx("div", { className: "ds-alert__icon", children: /* @__PURE__ */ e.jsx(d, { size: q[3], strokeWidth: 1.5 }) }),
|
|
875
875
|
/* @__PURE__ */ e.jsxs("div", { className: "ds-alert__content", children: [
|
|
@@ -887,8 +887,19 @@ const Mt = {
|
|
|
887
887
|
}
|
|
888
888
|
)
|
|
889
889
|
] });
|
|
890
|
-
}),
|
|
891
|
-
function
|
|
890
|
+
}), Wt = "data-ds-portal";
|
|
891
|
+
function Ce(t) {
|
|
892
|
+
var n;
|
|
893
|
+
const s = ((n = t.composedPath) == null ? void 0 : n.call(t)[0]) ?? t.target;
|
|
894
|
+
return s instanceof Element ? s : s instanceof Node ? s.parentElement : null;
|
|
895
|
+
}
|
|
896
|
+
function Ue(t, s) {
|
|
897
|
+
var r;
|
|
898
|
+
const n = (r = t == null ? void 0 : t.closest) == null ? void 0 : r.call(t, `[${Wt}]`);
|
|
899
|
+
return !!(n && n !== s);
|
|
900
|
+
}
|
|
901
|
+
const Ot = 200;
|
|
902
|
+
function zs({
|
|
892
903
|
children: t,
|
|
893
904
|
title: s,
|
|
894
905
|
onClose: n,
|
|
@@ -898,59 +909,69 @@ function Ds({
|
|
|
898
909
|
closeLabel: i,
|
|
899
910
|
...l
|
|
900
911
|
}) {
|
|
901
|
-
const c = K(), u =
|
|
902
|
-
!n ||
|
|
903
|
-
|
|
904
|
-
},
|
|
912
|
+
const c = K(), u = S(null), d = S(null), p = X.useId(), [h, f] = L(!1), v = () => {
|
|
913
|
+
!n || h || (f(!0), setTimeout(() => {
|
|
914
|
+
f(!1), n();
|
|
915
|
+
}, Ot));
|
|
905
916
|
};
|
|
906
917
|
F(() => {
|
|
907
|
-
const
|
|
908
|
-
|
|
909
|
-
},
|
|
910
|
-
var
|
|
911
|
-
const
|
|
912
|
-
|
|
918
|
+
const g = (_) => {
|
|
919
|
+
_.key === "Escape" && v();
|
|
920
|
+
}, w = (_) => {
|
|
921
|
+
var I;
|
|
922
|
+
const A = Ce(_);
|
|
923
|
+
A && ((I = d.current) != null && I.contains(A) || Ue(A, u.current) || v());
|
|
913
924
|
};
|
|
914
|
-
return document.addEventListener("keydown",
|
|
915
|
-
document.removeEventListener("keydown",
|
|
925
|
+
return document.addEventListener("keydown", g), document.addEventListener("mousedown", w), () => {
|
|
926
|
+
document.removeEventListener("keydown", g), document.removeEventListener("mousedown", w);
|
|
916
927
|
};
|
|
917
|
-
}, [n,
|
|
918
|
-
const
|
|
928
|
+
}, [n, h]);
|
|
929
|
+
const N = X.Children.toArray(t), y = N.find((g) => (g == null ? void 0 : g.type) === xe), j = N.filter((g) => (g == null ? void 0 : g.type) !== xe), T = /* @__PURE__ */ e.jsx(
|
|
919
930
|
"div",
|
|
920
931
|
{
|
|
921
|
-
className: [
|
|
932
|
+
className: ["ds-modal-overlay", h && "ds-modal-overlay--closing"].filter(Boolean).join(" "),
|
|
933
|
+
...l,
|
|
922
934
|
ref: u,
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
935
|
+
"data-ds-portal": "",
|
|
936
|
+
children: /* @__PURE__ */ e.jsxs(
|
|
937
|
+
"div",
|
|
938
|
+
{
|
|
939
|
+
className: [`ds-modal ds-modal--${r}`, a && "ds-modal--scrollable"].filter(Boolean).join(" "),
|
|
940
|
+
"data-surface": "2",
|
|
941
|
+
ref: d,
|
|
942
|
+
role: "dialog",
|
|
943
|
+
"aria-modal": "true",
|
|
944
|
+
"aria-labelledby": s ? p : void 0,
|
|
945
|
+
children: [
|
|
946
|
+
n && /* @__PURE__ */ e.jsx(
|
|
947
|
+
de,
|
|
948
|
+
{
|
|
949
|
+
className: "ds-modal__close",
|
|
950
|
+
variant: "ghost",
|
|
951
|
+
size: "small",
|
|
952
|
+
icon: /* @__PURE__ */ e.jsx(ee, { size: q[2], strokeWidth: 1.5 }),
|
|
953
|
+
onClick: v,
|
|
954
|
+
"aria-label": i ?? c.closeModal
|
|
955
|
+
}
|
|
956
|
+
),
|
|
957
|
+
(s || o) && /* @__PURE__ */ e.jsxs("div", { className: "ds-modal__header", children: [
|
|
958
|
+
s && /* @__PURE__ */ e.jsx("h3", { id: p, className: "ds-modal__title", children: s }),
|
|
959
|
+
o && /* @__PURE__ */ e.jsx("div", { className: "ds-modal__subheader", children: o })
|
|
960
|
+
] }),
|
|
961
|
+
/* @__PURE__ */ e.jsx("div", { className: "ds-modal__body ds-scrollable", children: j }),
|
|
962
|
+
y
|
|
963
|
+
]
|
|
964
|
+
}
|
|
965
|
+
)
|
|
945
966
|
}
|
|
946
|
-
)
|
|
947
|
-
return typeof document > "u" ?
|
|
967
|
+
);
|
|
968
|
+
return typeof document > "u" ? T : re.createPortal(T, document.body);
|
|
948
969
|
}
|
|
949
970
|
function xe({ children: t }) {
|
|
950
971
|
return !t || X.Children.count(t) === 0 ? null : /* @__PURE__ */ e.jsx("div", { className: "ds-modal__footer", children: t });
|
|
951
972
|
}
|
|
952
|
-
const
|
|
953
|
-
function
|
|
973
|
+
const Ct = 320;
|
|
974
|
+
function Fs({
|
|
954
975
|
children: t,
|
|
955
976
|
title: s,
|
|
956
977
|
onClose: n,
|
|
@@ -958,36 +979,39 @@ function Ps({
|
|
|
958
979
|
closeLabel: a,
|
|
959
980
|
...o
|
|
960
981
|
}) {
|
|
961
|
-
const i = K(), l =
|
|
962
|
-
!n ||
|
|
963
|
-
|
|
964
|
-
},
|
|
982
|
+
const i = K(), l = S(null), c = S(null), u = X.useId(), [d, p] = L(!1), h = () => {
|
|
983
|
+
!n || d || (p(!0), setTimeout(() => {
|
|
984
|
+
p(!1), n();
|
|
985
|
+
}, Ct));
|
|
965
986
|
};
|
|
966
987
|
F(() => {
|
|
967
|
-
const
|
|
968
|
-
|
|
969
|
-
},
|
|
970
|
-
var
|
|
971
|
-
const
|
|
972
|
-
|
|
988
|
+
const j = (g) => {
|
|
989
|
+
g.key === "Escape" && h();
|
|
990
|
+
}, T = (g) => {
|
|
991
|
+
var _;
|
|
992
|
+
const w = Ce(g);
|
|
993
|
+
w && ((_ = c.current) != null && _.contains(w) || Ue(w, l.current) || h());
|
|
973
994
|
};
|
|
974
|
-
return document.addEventListener("keydown",
|
|
975
|
-
document.removeEventListener("keydown",
|
|
995
|
+
return document.addEventListener("keydown", j), document.addEventListener("mousedown", T), () => {
|
|
996
|
+
document.removeEventListener("keydown", j), document.removeEventListener("mousedown", T);
|
|
976
997
|
};
|
|
977
|
-
}, [n,
|
|
978
|
-
const
|
|
998
|
+
}, [n, d]);
|
|
999
|
+
const f = X.Children.toArray(t), v = f.find((j) => (j == null ? void 0 : j.type) === xe), N = f.filter((j) => (j == null ? void 0 : j.type) !== xe), y = /* @__PURE__ */ e.jsx(
|
|
979
1000
|
"div",
|
|
980
1001
|
{
|
|
981
|
-
className: ["ds-bottom-sheet-overlay",
|
|
1002
|
+
className: ["ds-bottom-sheet-overlay", d && "ds-bottom-sheet-overlay--closing"].filter(Boolean).join(" "),
|
|
982
1003
|
...o,
|
|
1004
|
+
ref: l,
|
|
1005
|
+
"data-ds-portal": "",
|
|
983
1006
|
children: /* @__PURE__ */ e.jsxs(
|
|
984
1007
|
"div",
|
|
985
1008
|
{
|
|
986
|
-
ref:
|
|
987
|
-
className: ["ds-bottom-sheet",
|
|
1009
|
+
ref: c,
|
|
1010
|
+
className: ["ds-bottom-sheet", d && "ds-bottom-sheet--closing"].filter(Boolean).join(" "),
|
|
1011
|
+
"data-surface": "2",
|
|
988
1012
|
role: "dialog",
|
|
989
1013
|
"aria-modal": "true",
|
|
990
|
-
"aria-labelledby": s ?
|
|
1014
|
+
"aria-labelledby": s ? u : void 0,
|
|
991
1015
|
children: [
|
|
992
1016
|
/* @__PURE__ */ e.jsx("div", { className: "ds-bottom-sheet__handle", "aria-hidden": "true" }),
|
|
993
1017
|
n && /* @__PURE__ */ e.jsx(
|
|
@@ -997,24 +1021,24 @@ function Ps({
|
|
|
997
1021
|
variant: "ghost",
|
|
998
1022
|
size: "small",
|
|
999
1023
|
icon: /* @__PURE__ */ e.jsx(ee, { size: q[2], strokeWidth: 1.5 }),
|
|
1000
|
-
onClick:
|
|
1024
|
+
onClick: h,
|
|
1001
1025
|
"aria-label": a ?? i.close
|
|
1002
1026
|
}
|
|
1003
1027
|
),
|
|
1004
1028
|
(s || r) && /* @__PURE__ */ e.jsxs("div", { className: "ds-bottom-sheet__header", children: [
|
|
1005
|
-
s && /* @__PURE__ */ e.jsx("h3", { id:
|
|
1029
|
+
s && /* @__PURE__ */ e.jsx("h3", { id: u, className: "ds-bottom-sheet__title", children: s }),
|
|
1006
1030
|
r && /* @__PURE__ */ e.jsx("div", { className: "ds-bottom-sheet__subheader", children: r })
|
|
1007
1031
|
] }),
|
|
1008
|
-
/* @__PURE__ */ e.jsx("div", { className: "ds-bottom-sheet__body ds-scrollable", children:
|
|
1009
|
-
|
|
1032
|
+
/* @__PURE__ */ e.jsx("div", { className: "ds-bottom-sheet__body ds-scrollable", children: N }),
|
|
1033
|
+
v
|
|
1010
1034
|
]
|
|
1011
1035
|
}
|
|
1012
1036
|
)
|
|
1013
1037
|
}
|
|
1014
1038
|
);
|
|
1015
|
-
return typeof document > "u" ?
|
|
1039
|
+
return typeof document > "u" ? y : re.createPortal(y, document.body);
|
|
1016
1040
|
}
|
|
1017
|
-
function
|
|
1041
|
+
function Ut({
|
|
1018
1042
|
children: t,
|
|
1019
1043
|
title: s,
|
|
1020
1044
|
defaultExpanded: n = !1,
|
|
@@ -1024,15 +1048,15 @@ function Wt({
|
|
|
1024
1048
|
className: i = "",
|
|
1025
1049
|
...l
|
|
1026
1050
|
}) {
|
|
1027
|
-
const c = K(), u = s ?? c.code, [d, p] =
|
|
1028
|
-
h ? a == null || a(!r) : p((
|
|
1029
|
-
},
|
|
1051
|
+
const c = K(), u = s ?? c.code, [d, p] = L(n), h = r !== void 0, f = h ? r : d, v = () => {
|
|
1052
|
+
h ? a == null || a(!r) : p((y) => !y);
|
|
1053
|
+
}, N = [
|
|
1030
1054
|
"ds-code-accordion",
|
|
1031
1055
|
`ds-code-accordion--${o}`,
|
|
1032
1056
|
f && "ds-code-accordion--expanded",
|
|
1033
1057
|
i
|
|
1034
1058
|
].filter(Boolean).join(" ");
|
|
1035
|
-
return /* @__PURE__ */ e.jsxs("div", { className:
|
|
1059
|
+
return /* @__PURE__ */ e.jsxs("div", { className: N, ...l, children: [
|
|
1036
1060
|
/* @__PURE__ */ e.jsxs(
|
|
1037
1061
|
"button",
|
|
1038
1062
|
{
|
|
@@ -1056,11 +1080,11 @@ function Wt({
|
|
|
1056
1080
|
/* @__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 }) }) }) })
|
|
1057
1081
|
] });
|
|
1058
1082
|
}
|
|
1059
|
-
function
|
|
1083
|
+
function Ws({ children: t, block: s = !1, collapsible: n = !1, title: r, defaultExpanded: a = !1, ...o }) {
|
|
1060
1084
|
const i = K(), l = r ?? i.code;
|
|
1061
|
-
return s ? n ? /* @__PURE__ */ e.jsx(
|
|
1085
|
+
return s ? n ? /* @__PURE__ */ e.jsx(Ut, { title: l, defaultExpanded: a, ...o, children: t }) : /* @__PURE__ */ e.jsx("pre", { className: "ds-code-block ds-scrollable", ...o, children: /* @__PURE__ */ e.jsx("code", { children: t }) }) : /* @__PURE__ */ e.jsx("code", { className: "ds-code-inline", ...o, children: t });
|
|
1062
1086
|
}
|
|
1063
|
-
function
|
|
1087
|
+
function Os({ href: t, children: s, onClick: n, target: r, rel: a, ...o }) {
|
|
1064
1088
|
const l = r === "_blank" ? a ? `${a} noopener noreferrer` : "noopener noreferrer" : a;
|
|
1065
1089
|
return /* @__PURE__ */ e.jsx(
|
|
1066
1090
|
"a",
|
|
@@ -1075,10 +1099,10 @@ function zs({ href: t, children: s, onClick: n, target: r, rel: a, ...o }) {
|
|
|
1075
1099
|
}
|
|
1076
1100
|
);
|
|
1077
1101
|
}
|
|
1078
|
-
function
|
|
1102
|
+
function Cs({ children: t, size: s = "m", variant: n = "ghost", ...r }) {
|
|
1079
1103
|
return /* @__PURE__ */ e.jsx("div", { className: "ds-tabs", role: "tablist", ...r, children: X.Children.map(t, (a) => X.isValidElement(a) ? X.cloneElement(a, { size: s, variant: n }) : a) });
|
|
1080
1104
|
}
|
|
1081
|
-
function
|
|
1105
|
+
function Us({ children: t, selected: s = !1, onClick: n, size: r = "m", variant: a = "ghost", disabled: o = !1, icon: i, href: l, ...c }) {
|
|
1082
1106
|
const u = i && !t, d = [
|
|
1083
1107
|
"ds-tab",
|
|
1084
1108
|
`ds-tab--${r}`,
|
|
@@ -1124,10 +1148,10 @@ function Ws({ children: t, selected: s = !1, onClick: n, size: r = "m", variant:
|
|
|
1124
1148
|
}
|
|
1125
1149
|
);
|
|
1126
1150
|
}
|
|
1127
|
-
function
|
|
1151
|
+
function Hs({ children: t, className: s = "", ...n }) {
|
|
1128
1152
|
return /* @__PURE__ */ e.jsx("div", { className: ["ds-browser-pane", s].filter(Boolean).join(" "), ...n, children: t });
|
|
1129
1153
|
}
|
|
1130
|
-
function
|
|
1154
|
+
function Vs({ tabs: t, active: s, onChange: n, onClose: r, className: a = "", ...o }) {
|
|
1131
1155
|
const { t: i } = be();
|
|
1132
1156
|
return /* @__PURE__ */ e.jsx(
|
|
1133
1157
|
"div",
|
|
@@ -1181,10 +1205,10 @@ function Cs({ tabs: t, active: s, onChange: n, onClose: r, className: a = "", ..
|
|
|
1181
1205
|
}
|
|
1182
1206
|
);
|
|
1183
1207
|
}
|
|
1184
|
-
function
|
|
1208
|
+
function Ys({ children: t, className: s = "", ...n }) {
|
|
1185
1209
|
return /* @__PURE__ */ e.jsx("div", { className: ["ds-list", s].filter(Boolean).join(" "), role: "list", ...n, children: t });
|
|
1186
1210
|
}
|
|
1187
|
-
function
|
|
1211
|
+
function qs({
|
|
1188
1212
|
icon: t,
|
|
1189
1213
|
title: s,
|
|
1190
1214
|
subtitle: n,
|
|
@@ -1208,21 +1232,21 @@ function Hs({
|
|
|
1208
1232
|
] });
|
|
1209
1233
|
return a ? /* @__PURE__ */ e.jsx("button", { type: "button", role: "listitem", className: c, onClick: a, ...i, children: u }) : /* @__PURE__ */ e.jsx("div", { role: "listitem", className: c, ...i, children: u });
|
|
1210
1234
|
}
|
|
1211
|
-
function
|
|
1212
|
-
const o =
|
|
1235
|
+
function Gs({ options: t, value: s, onChange: n, size: r = "m", disabled: a = !1 }) {
|
|
1236
|
+
const o = S(null), i = S(null), [l, c] = L(!1), u = S(!1), d = S(null), p = S(null), h = () => {
|
|
1213
1237
|
if (!o.current) return;
|
|
1214
1238
|
const f = o.current.querySelector(`[data-value="${s}"]`);
|
|
1215
1239
|
if (!f) return;
|
|
1216
|
-
const v = o.current.getBoundingClientRect(),
|
|
1217
|
-
i.current ? (i.current.style.transition = u.current ? "left var(--transition-normal), width var(--transition-normal)" : "none", i.current.style.left =
|
|
1240
|
+
const v = o.current.getBoundingClientRect(), N = f.getBoundingClientRect(), y = N.left - v.left, j = N.width;
|
|
1241
|
+
i.current ? (i.current.style.transition = u.current ? "left var(--transition-normal), width var(--transition-normal)" : "none", i.current.style.left = y + "px", i.current.style.width = j + "px", u.current = !1) : (c(!0), requestAnimationFrame(() => {
|
|
1218
1242
|
if (!i.current || !o.current) return;
|
|
1219
|
-
const
|
|
1220
|
-
if (!
|
|
1221
|
-
const
|
|
1222
|
-
i.current.style.transition = "none", i.current.style.left =
|
|
1243
|
+
const T = o.current.querySelector(`[data-value="${s}"]`);
|
|
1244
|
+
if (!T) return;
|
|
1245
|
+
const g = o.current.getBoundingClientRect(), w = T.getBoundingClientRect();
|
|
1246
|
+
i.current.style.transition = "none", i.current.style.left = w.left - g.left + "px", i.current.style.width = w.width + "px";
|
|
1223
1247
|
}));
|
|
1224
1248
|
};
|
|
1225
|
-
return p.current = h,
|
|
1249
|
+
return p.current = h, ct(() => {
|
|
1226
1250
|
const f = d.current !== s;
|
|
1227
1251
|
d.current = s, u.current = l && f, h();
|
|
1228
1252
|
}), F(() => {
|
|
@@ -1270,7 +1294,7 @@ function Vs({ options: t, value: s, onChange: n, size: r = "m", disabled: a = !1
|
|
|
1270
1294
|
}
|
|
1271
1295
|
);
|
|
1272
1296
|
}
|
|
1273
|
-
function
|
|
1297
|
+
function He({
|
|
1274
1298
|
children: t,
|
|
1275
1299
|
title: s,
|
|
1276
1300
|
defaultExpanded: n = !1,
|
|
@@ -1279,7 +1303,7 @@ function Ce({
|
|
|
1279
1303
|
padding: o = "m",
|
|
1280
1304
|
...i
|
|
1281
1305
|
}) {
|
|
1282
|
-
const [l, c] =
|
|
1306
|
+
const [l, c] = L(n), u = r !== void 0, d = u ? r : l, p = () => {
|
|
1283
1307
|
u ? a == null || a(!r) : c((f) => !f);
|
|
1284
1308
|
}, h = [
|
|
1285
1309
|
"ds-accordion",
|
|
@@ -1311,7 +1335,7 @@ function Ce({
|
|
|
1311
1335
|
] });
|
|
1312
1336
|
}
|
|
1313
1337
|
const ce = 8, pe = 8;
|
|
1314
|
-
function
|
|
1338
|
+
function Ht(t, s, n) {
|
|
1315
1339
|
const r = window.innerWidth;
|
|
1316
1340
|
let a, o;
|
|
1317
1341
|
switch (t) {
|
|
@@ -1333,7 +1357,7 @@ function Ot(t, s, n) {
|
|
|
1333
1357
|
const i = Math.max(pe, Math.min(r - n.width - pe, o)), l = o - i;
|
|
1334
1358
|
return { top: a, left: i, arrowOffset: l };
|
|
1335
1359
|
}
|
|
1336
|
-
function
|
|
1360
|
+
function Vt(t, s, n) {
|
|
1337
1361
|
const r = window.innerWidth, a = window.innerHeight;
|
|
1338
1362
|
if (t.top >= s + ce + pe) return "top";
|
|
1339
1363
|
if (a - t.bottom >= s + ce + pe) return "bottom";
|
|
@@ -1342,31 +1366,31 @@ function Ct(t, s, n) {
|
|
|
1342
1366
|
const o = Math.max(t.top, a - t.bottom, t.left, r - t.right);
|
|
1343
1367
|
return o === t.top ? "top" : o === a - t.bottom ? "bottom" : o === r - t.right ? "right" : "left";
|
|
1344
1368
|
}
|
|
1345
|
-
function
|
|
1346
|
-
const [a, o] =
|
|
1369
|
+
function Ve({ children: t, content: s, position: n, ...r }) {
|
|
1370
|
+
const [a, o] = L(!1), [i, l] = L({ visibility: "hidden" }), [c, u] = L(n || "top"), d = S(null), p = S(null), h = S(!1), f = () => {
|
|
1347
1371
|
if (!d.current || !p.current) return;
|
|
1348
|
-
const
|
|
1349
|
-
u(
|
|
1372
|
+
const N = d.current.getBoundingClientRect(), y = p.current.getBoundingClientRect(), j = n || Vt(N, y.height, y.width), { top: T, left: g, arrowOffset: w } = Ht(j, N, y);
|
|
1373
|
+
u(j), l({
|
|
1350
1374
|
position: "fixed",
|
|
1351
|
-
top:
|
|
1352
|
-
left:
|
|
1375
|
+
top: T,
|
|
1376
|
+
left: g,
|
|
1353
1377
|
visibility: "visible",
|
|
1354
|
-
"--arrow-offset": `${
|
|
1378
|
+
"--arrow-offset": `${w}px`
|
|
1355
1379
|
});
|
|
1356
1380
|
};
|
|
1357
1381
|
if (F(() => {
|
|
1358
1382
|
if (!a) return;
|
|
1359
1383
|
l({ position: "fixed", visibility: "hidden" });
|
|
1360
|
-
const
|
|
1384
|
+
const N = requestAnimationFrame(f);
|
|
1361
1385
|
return window.addEventListener("scroll", f, !0), window.addEventListener("resize", f), () => {
|
|
1362
|
-
cancelAnimationFrame(
|
|
1386
|
+
cancelAnimationFrame(N), window.removeEventListener("scroll", f, !0), window.removeEventListener("resize", f);
|
|
1363
1387
|
};
|
|
1364
1388
|
}, [a, n]), F(() => {
|
|
1365
1389
|
if (!a) return;
|
|
1366
|
-
const
|
|
1367
|
-
d.current && !d.current.contains(
|
|
1390
|
+
const N = (y) => {
|
|
1391
|
+
d.current && !d.current.contains(y.target) && o(!1);
|
|
1368
1392
|
};
|
|
1369
|
-
return document.addEventListener("touchstart",
|
|
1393
|
+
return document.addEventListener("touchstart", N), () => document.removeEventListener("touchstart", N);
|
|
1370
1394
|
}, [a]), !s) return t;
|
|
1371
1395
|
const v = a && /* @__PURE__ */ e.jsx(
|
|
1372
1396
|
"div",
|
|
@@ -1391,7 +1415,7 @@ function Ue({ children: t, content: s, position: n, ...r }) {
|
|
|
1391
1415
|
h.current || o(!1);
|
|
1392
1416
|
},
|
|
1393
1417
|
onTouchStart: () => {
|
|
1394
|
-
h.current = !0, o((
|
|
1418
|
+
h.current = !0, o((N) => !N);
|
|
1395
1419
|
},
|
|
1396
1420
|
...r,
|
|
1397
1421
|
children: [
|
|
@@ -1401,12 +1425,12 @@ function Ue({ children: t, content: s, position: n, ...r }) {
|
|
|
1401
1425
|
}
|
|
1402
1426
|
);
|
|
1403
1427
|
}
|
|
1404
|
-
const
|
|
1405
|
-
function
|
|
1428
|
+
const Ze = 8, Ee = 8, Yt = 140;
|
|
1429
|
+
function Qe(t) {
|
|
1406
1430
|
const s = String(t ?? "").replace(/^@/, "").trim();
|
|
1407
1431
|
return s ? `@${s}` : "";
|
|
1408
1432
|
}
|
|
1409
|
-
function
|
|
1433
|
+
function Ks({
|
|
1410
1434
|
label: t,
|
|
1411
1435
|
children: s,
|
|
1412
1436
|
mode: n = "click",
|
|
@@ -1419,59 +1443,59 @@ function Ys({
|
|
|
1419
1443
|
popoverClassName: u = "",
|
|
1420
1444
|
...d
|
|
1421
1445
|
}) {
|
|
1422
|
-
const p =
|
|
1446
|
+
const p = bt(), h = S(null), f = S(null), v = S(null), [N, y] = L(!1), [j, T] = L(null), g = s != null, w = a || t || "", _ = Qe(t || a), A = Qe(o), I = se(() => {
|
|
1423
1447
|
v.current != null && (window.clearTimeout(v.current), v.current = null);
|
|
1424
|
-
}, []),
|
|
1425
|
-
|
|
1426
|
-
}, [
|
|
1427
|
-
|
|
1428
|
-
}, [
|
|
1448
|
+
}, []), D = se(() => {
|
|
1449
|
+
I(), y(!0);
|
|
1450
|
+
}, [I]), O = se(() => {
|
|
1451
|
+
I(), v.current = window.setTimeout(() => y(!1), Yt);
|
|
1452
|
+
}, [I]), k = se(() => {
|
|
1429
1453
|
const W = h.current, M = f.current;
|
|
1430
1454
|
if (!W) return;
|
|
1431
1455
|
const b = W.getBoundingClientRect(), $ = (M == null ? void 0 : M.offsetHeight) ?? 160, R = (M == null ? void 0 : M.offsetWidth) ?? 260;
|
|
1432
|
-
let V = b.bottom +
|
|
1433
|
-
V + $ > window.innerHeight - Ee && (V = Math.max(Ee, b.top - $ -
|
|
1434
|
-
const
|
|
1435
|
-
|
|
1456
|
+
let V = b.bottom + Ze;
|
|
1457
|
+
V + $ > window.innerHeight - Ee && (V = Math.max(Ee, b.top - $ - Ze));
|
|
1458
|
+
const U = Math.max(Ee, Math.min(b.left, window.innerWidth - R - Ee));
|
|
1459
|
+
T({ top: V, left: U });
|
|
1436
1460
|
}, []);
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
}, [
|
|
1440
|
-
if (!
|
|
1461
|
+
ct(() => {
|
|
1462
|
+
N && k();
|
|
1463
|
+
}, [N, k]), F(() => {
|
|
1464
|
+
if (!N) return;
|
|
1441
1465
|
const W = () => k(), M = ($) => {
|
|
1442
|
-
$.key === "Escape" &&
|
|
1466
|
+
$.key === "Escape" && y(!1);
|
|
1443
1467
|
}, b = ($) => {
|
|
1444
|
-
var V,
|
|
1468
|
+
var V, U;
|
|
1445
1469
|
if (n === "hover") return;
|
|
1446
1470
|
const R = $.target;
|
|
1447
|
-
(V = f.current) != null && V.contains(R) || (
|
|
1471
|
+
(V = f.current) != null && V.contains(R) || (U = h.current) != null && U.contains(R) || y(!1);
|
|
1448
1472
|
};
|
|
1449
1473
|
return window.addEventListener("scroll", W, !0), window.addEventListener("resize", W), document.addEventListener("keydown", M), document.addEventListener("mousedown", b), () => {
|
|
1450
1474
|
window.removeEventListener("scroll", W, !0), window.removeEventListener("resize", W), document.removeEventListener("keydown", M), document.removeEventListener("mousedown", b);
|
|
1451
1475
|
};
|
|
1452
|
-
}, [
|
|
1453
|
-
const
|
|
1476
|
+
}, [N, k, n]), F(() => () => I(), [I]);
|
|
1477
|
+
const P = n === "hover" ? { onMouseEnter: D, onMouseLeave: O } : {}, H = N ? re.createPortal(
|
|
1454
1478
|
/* @__PURE__ */ e.jsxs(
|
|
1455
1479
|
"div",
|
|
1456
1480
|
{
|
|
1457
1481
|
ref: f,
|
|
1458
1482
|
id: p,
|
|
1459
1483
|
role: "dialog",
|
|
1460
|
-
"aria-label":
|
|
1484
|
+
"aria-label": w || _ || "Mention",
|
|
1461
1485
|
"data-ds-portal": "",
|
|
1462
1486
|
className: ["ds-mention__popover", u].filter(Boolean).join(" "),
|
|
1463
|
-
style:
|
|
1464
|
-
...
|
|
1487
|
+
style: j ? { top: j.top, left: j.left } : { top: -9999, left: -9999, visibility: "hidden" },
|
|
1488
|
+
...P,
|
|
1465
1489
|
children: [
|
|
1466
|
-
(r ||
|
|
1490
|
+
(r || w || A) && /* @__PURE__ */ e.jsxs("div", { className: "ds-mention__head", children: [
|
|
1467
1491
|
r,
|
|
1468
|
-
(
|
|
1469
|
-
|
|
1470
|
-
|
|
1492
|
+
(w || A) && /* @__PURE__ */ e.jsxs("div", { className: "ds-mention__meta", children: [
|
|
1493
|
+
w ? /* @__PURE__ */ e.jsx("span", { className: "ds-mention__name", children: w }) : null,
|
|
1494
|
+
A ? /* @__PURE__ */ e.jsx("span", { className: "ds-mention__handle", children: A }) : null
|
|
1471
1495
|
] })
|
|
1472
1496
|
] }),
|
|
1473
1497
|
i ? /* @__PURE__ */ e.jsx("p", { className: "ds-mention__desc", children: i }) : null,
|
|
1474
|
-
l ? /* @__PURE__ */ e.jsx("div", { className: "ds-mention__actions", onClick: () =>
|
|
1498
|
+
l ? /* @__PURE__ */ e.jsx("div", { className: "ds-mention__actions", onClick: () => y(!1), children: l }) : null
|
|
1475
1499
|
]
|
|
1476
1500
|
}
|
|
1477
1501
|
),
|
|
@@ -1486,31 +1510,31 @@ function Ys({
|
|
|
1486
1510
|
type: "button",
|
|
1487
1511
|
className: [
|
|
1488
1512
|
"ds-mention",
|
|
1489
|
-
|
|
1513
|
+
g && "ds-mention--custom",
|
|
1490
1514
|
c
|
|
1491
1515
|
].filter(Boolean).join(" "),
|
|
1492
|
-
"aria-expanded":
|
|
1516
|
+
"aria-expanded": N,
|
|
1493
1517
|
"aria-haspopup": "dialog",
|
|
1494
|
-
"aria-label":
|
|
1495
|
-
"aria-controls":
|
|
1518
|
+
"aria-label": g && (_ || w) || void 0,
|
|
1519
|
+
"aria-controls": N ? p : void 0,
|
|
1496
1520
|
onClick: (W) => {
|
|
1497
1521
|
var M;
|
|
1498
1522
|
if ((M = d.onClick) == null || M.call(d, W), !W.defaultPrevented) {
|
|
1499
1523
|
if (W.preventDefault(), W.stopPropagation(), n === "hover") {
|
|
1500
|
-
|
|
1524
|
+
D();
|
|
1501
1525
|
return;
|
|
1502
1526
|
}
|
|
1503
|
-
|
|
1527
|
+
y((b) => !b);
|
|
1504
1528
|
}
|
|
1505
1529
|
},
|
|
1506
|
-
...
|
|
1507
|
-
children:
|
|
1530
|
+
...P,
|
|
1531
|
+
children: g ? s : _
|
|
1508
1532
|
}
|
|
1509
1533
|
),
|
|
1510
|
-
typeof document < "u" ?
|
|
1534
|
+
typeof document < "u" ? H : null
|
|
1511
1535
|
] });
|
|
1512
1536
|
}
|
|
1513
|
-
function
|
|
1537
|
+
function Xs({
|
|
1514
1538
|
checked: t = !1,
|
|
1515
1539
|
onChange: s,
|
|
1516
1540
|
size: n = "m",
|
|
@@ -1541,7 +1565,7 @@ function qs({
|
|
|
1541
1565
|
a && /* @__PURE__ */ e.jsx("span", { className: "ds-toggle__label", children: a })
|
|
1542
1566
|
] });
|
|
1543
1567
|
}
|
|
1544
|
-
function
|
|
1568
|
+
function Js({
|
|
1545
1569
|
checked: t = !1,
|
|
1546
1570
|
onChange: s,
|
|
1547
1571
|
size: n = "m",
|
|
@@ -1579,7 +1603,7 @@ function Gs({
|
|
|
1579
1603
|
a && /* @__PURE__ */ e.jsx("span", { className: "ds-checkbox__label", children: a })
|
|
1580
1604
|
] });
|
|
1581
1605
|
}
|
|
1582
|
-
function
|
|
1606
|
+
function Zs({
|
|
1583
1607
|
checked: t = !1,
|
|
1584
1608
|
onChange: s,
|
|
1585
1609
|
size: n = "m",
|
|
@@ -1614,7 +1638,7 @@ function Ks({
|
|
|
1614
1638
|
a && /* @__PURE__ */ e.jsx("span", { className: "ds-radio__label", children: a })
|
|
1615
1639
|
] });
|
|
1616
1640
|
}
|
|
1617
|
-
function
|
|
1641
|
+
function qt({ width: t, height: s, shape: n = "rect", aspectRatio: r, className: a = "", style: o = {}, ...i }) {
|
|
1618
1642
|
return /* @__PURE__ */ e.jsx(
|
|
1619
1643
|
"span",
|
|
1620
1644
|
{
|
|
@@ -1625,7 +1649,7 @@ function Ht({ width: t, height: s, shape: n = "rect", aspectRatio: r, className:
|
|
|
1625
1649
|
}
|
|
1626
1650
|
);
|
|
1627
1651
|
}
|
|
1628
|
-
function
|
|
1652
|
+
function Gt({ lines: t = 1, lastLineWidth: s = "70%", gap: n, className: r = "", style: a = {}, ...o }) {
|
|
1629
1653
|
return /* @__PURE__ */ e.jsx(
|
|
1630
1654
|
"span",
|
|
1631
1655
|
{
|
|
@@ -1644,20 +1668,20 @@ function Vt({ lines: t = 1, lastLineWidth: s = "70%", gap: n, className: r = "",
|
|
|
1644
1668
|
}
|
|
1645
1669
|
);
|
|
1646
1670
|
}
|
|
1647
|
-
|
|
1648
|
-
function
|
|
1671
|
+
qt.Text = Gt;
|
|
1672
|
+
function Kt(t) {
|
|
1649
1673
|
let s = 2166136261;
|
|
1650
1674
|
for (let n = 0; n < t.length; n++)
|
|
1651
1675
|
s ^= t.charCodeAt(n), s = Math.imul(s, 16777619) >>> 0;
|
|
1652
1676
|
return s % 360;
|
|
1653
1677
|
}
|
|
1654
|
-
function
|
|
1678
|
+
function Xt(t) {
|
|
1655
1679
|
if (!t) return "";
|
|
1656
1680
|
const s = t.trim().split(/\s+/);
|
|
1657
1681
|
return s.length >= 2 ? (s[0][0] + s[1][0]).toUpperCase() : t[0].toUpperCase();
|
|
1658
1682
|
}
|
|
1659
|
-
function
|
|
1660
|
-
const l =
|
|
1683
|
+
function Qs({ seed: t, icon: s, src: n, size: r = 32, className: a = "", style: o = {}, ...i }) {
|
|
1684
|
+
const l = Kt(t ?? ""), [c, u] = L(!1), d = s ?? /* @__PURE__ */ e.jsx("span", { className: "ds-avatar__initials", children: Xt(t) });
|
|
1661
1685
|
return /* @__PURE__ */ e.jsx(
|
|
1662
1686
|
"div",
|
|
1663
1687
|
{
|
|
@@ -1669,7 +1693,7 @@ function Xs({ seed: t, icon: s, src: n, size: r = 32, className: a = "", style:
|
|
|
1669
1693
|
}
|
|
1670
1694
|
);
|
|
1671
1695
|
}
|
|
1672
|
-
function
|
|
1696
|
+
function en({
|
|
1673
1697
|
children: t,
|
|
1674
1698
|
size: s = "compact",
|
|
1675
1699
|
stickyTop: n,
|
|
@@ -1699,13 +1723,13 @@ function Js({
|
|
|
1699
1723
|
}
|
|
1700
1724
|
);
|
|
1701
1725
|
}
|
|
1702
|
-
function
|
|
1726
|
+
function tn({ children: t, ...s }) {
|
|
1703
1727
|
return /* @__PURE__ */ e.jsx("thead", { ...s, children: t });
|
|
1704
1728
|
}
|
|
1705
|
-
function
|
|
1729
|
+
function sn({ children: t, ...s }) {
|
|
1706
1730
|
return /* @__PURE__ */ e.jsx("tbody", { ...s, children: t });
|
|
1707
1731
|
}
|
|
1708
|
-
function
|
|
1732
|
+
function nn({ children: t, interactive: s, selected: n, subheader: r, exiting: a, updated: o, className: i = "", onClick: l, ...c }) {
|
|
1709
1733
|
return /* @__PURE__ */ e.jsx(
|
|
1710
1734
|
"tr",
|
|
1711
1735
|
{
|
|
@@ -1724,11 +1748,11 @@ function en({ children: t, interactive: s, selected: n, subheader: r, exiting: a
|
|
|
1724
1748
|
}
|
|
1725
1749
|
);
|
|
1726
1750
|
}
|
|
1727
|
-
function
|
|
1751
|
+
function rn({ children: t, colSpan: s = 999, ...n }) {
|
|
1728
1752
|
return /* @__PURE__ */ e.jsx("tr", { className: "ds-table-row ds-table-row--subheader", ...n, children: /* @__PURE__ */ e.jsx("td", { colSpan: s, children: t }) });
|
|
1729
1753
|
}
|
|
1730
|
-
function
|
|
1731
|
-
const c = !!r || n !== void 0, u = n === "asc" ?
|
|
1754
|
+
function an({ children: t, align: s = "left", sortDir: n, onSort: r, width: a, className: o = "", style: i = {}, ...l }) {
|
|
1755
|
+
const c = !!r || n !== void 0, u = n === "asc" ? Nt : n === "desc" ? ye : wt;
|
|
1732
1756
|
return /* @__PURE__ */ e.jsx(
|
|
1733
1757
|
"th",
|
|
1734
1758
|
{
|
|
@@ -1749,7 +1773,7 @@ function sn({ children: t, align: s = "left", sortDir: n, onSort: r, width: a, c
|
|
|
1749
1773
|
}
|
|
1750
1774
|
);
|
|
1751
1775
|
}
|
|
1752
|
-
function
|
|
1776
|
+
function on({ children: t, align: s = "left", secondary: n, muted: r, truncate: a, nowrap: o, className: i = "", ...l }) {
|
|
1753
1777
|
return /* @__PURE__ */ e.jsx(
|
|
1754
1778
|
"td",
|
|
1755
1779
|
{
|
|
@@ -1767,7 +1791,7 @@ function nn({ children: t, align: s = "left", secondary: n, muted: r, truncate:
|
|
|
1767
1791
|
}
|
|
1768
1792
|
);
|
|
1769
1793
|
}
|
|
1770
|
-
function
|
|
1794
|
+
function ln({
|
|
1771
1795
|
icon: t,
|
|
1772
1796
|
title: s,
|
|
1773
1797
|
description: n,
|
|
@@ -1790,7 +1814,7 @@ function rn({
|
|
|
1790
1814
|
}
|
|
1791
1815
|
);
|
|
1792
1816
|
}
|
|
1793
|
-
function
|
|
1817
|
+
function cn({
|
|
1794
1818
|
label: t,
|
|
1795
1819
|
hint: s,
|
|
1796
1820
|
error: n,
|
|
@@ -1821,7 +1845,7 @@ function an({
|
|
|
1821
1845
|
}
|
|
1822
1846
|
);
|
|
1823
1847
|
}
|
|
1824
|
-
function
|
|
1848
|
+
function dn({ label: t, value: s, delta: n, size: r = "m", inline: a = !1, className: o = "", style: i, ...l }) {
|
|
1825
1849
|
const c = n != null && n.startsWith("+") ? "up" : n != null && n.startsWith("-") ? "down" : "neutral";
|
|
1826
1850
|
return /* @__PURE__ */ e.jsxs(
|
|
1827
1851
|
"div",
|
|
@@ -1842,7 +1866,7 @@ function on({ label: t, value: s, delta: n, size: r = "m", inline: a = !1, class
|
|
|
1842
1866
|
}
|
|
1843
1867
|
);
|
|
1844
1868
|
}
|
|
1845
|
-
function
|
|
1869
|
+
function un({
|
|
1846
1870
|
children: t,
|
|
1847
1871
|
separator: s = "/",
|
|
1848
1872
|
"aria-label": n,
|
|
@@ -1865,7 +1889,7 @@ function ln({
|
|
|
1865
1889
|
}
|
|
1866
1890
|
);
|
|
1867
1891
|
}
|
|
1868
|
-
function
|
|
1892
|
+
function fn({
|
|
1869
1893
|
page: t,
|
|
1870
1894
|
total: s,
|
|
1871
1895
|
onChange: n,
|
|
@@ -1877,7 +1901,7 @@ function cn({
|
|
|
1877
1901
|
style: c,
|
|
1878
1902
|
...u
|
|
1879
1903
|
}) {
|
|
1880
|
-
const d = K(), { t: p } = be(), h =
|
|
1904
|
+
const d = K(), { t: p } = be(), h = Jt(t, s, r);
|
|
1881
1905
|
return /* @__PURE__ */ e.jsxs(
|
|
1882
1906
|
"nav",
|
|
1883
1907
|
{
|
|
@@ -1893,7 +1917,7 @@ function cn({
|
|
|
1893
1917
|
onClick: () => n == null ? void 0 : n(t - 1),
|
|
1894
1918
|
disabled: t <= 1,
|
|
1895
1919
|
"aria-label": o ?? d.previousPage,
|
|
1896
|
-
children: /* @__PURE__ */ e.jsx(
|
|
1920
|
+
children: /* @__PURE__ */ e.jsx(gt, { size: 16 })
|
|
1897
1921
|
}
|
|
1898
1922
|
),
|
|
1899
1923
|
h.map(
|
|
@@ -1916,22 +1940,22 @@ function cn({
|
|
|
1916
1940
|
onClick: () => n == null ? void 0 : n(t + 1),
|
|
1917
1941
|
disabled: t >= s,
|
|
1918
1942
|
"aria-label": i ?? d.nextPage,
|
|
1919
|
-
children: /* @__PURE__ */ e.jsx(
|
|
1943
|
+
children: /* @__PURE__ */ e.jsx(yt, { size: 16 })
|
|
1920
1944
|
}
|
|
1921
1945
|
)
|
|
1922
1946
|
]
|
|
1923
1947
|
}
|
|
1924
1948
|
);
|
|
1925
1949
|
}
|
|
1926
|
-
function
|
|
1950
|
+
function Jt(t, s, n) {
|
|
1927
1951
|
if (s <= 7) return Array.from({ length: s }, (i, l) => l + 1);
|
|
1928
1952
|
const r = Math.max(2, t - n), a = Math.min(s - 1, t + n), o = [1];
|
|
1929
1953
|
r > 2 && o.push("…");
|
|
1930
1954
|
for (let i = r; i <= a; i++) o.push(i);
|
|
1931
1955
|
return a < s - 1 && o.push("…"), o.push(s), o;
|
|
1932
1956
|
}
|
|
1933
|
-
const
|
|
1934
|
-
function
|
|
1957
|
+
const Zt = 300;
|
|
1958
|
+
function mn({
|
|
1935
1959
|
children: t,
|
|
1936
1960
|
title: s,
|
|
1937
1961
|
onClose: n,
|
|
@@ -1944,24 +1968,24 @@ function dn({
|
|
|
1944
1968
|
closeLabel: u,
|
|
1945
1969
|
...d
|
|
1946
1970
|
}) {
|
|
1947
|
-
const p = K(), h =
|
|
1948
|
-
!n || v || (
|
|
1949
|
-
|
|
1950
|
-
},
|
|
1971
|
+
const p = K(), h = S(null), f = X.useId(), [v, N] = L(!1), y = () => {
|
|
1972
|
+
!n || v || (N(!0), setTimeout(() => {
|
|
1973
|
+
N(!1), n();
|
|
1974
|
+
}, Zt));
|
|
1951
1975
|
};
|
|
1952
1976
|
F(() => {
|
|
1953
|
-
const _ = (
|
|
1954
|
-
|
|
1955
|
-
},
|
|
1956
|
-
var O, k
|
|
1957
|
-
const
|
|
1958
|
-
|
|
1977
|
+
const _ = (I) => {
|
|
1978
|
+
I.key === "Escape" && y();
|
|
1979
|
+
}, A = (I) => {
|
|
1980
|
+
var O, k;
|
|
1981
|
+
const D = Ce(I);
|
|
1982
|
+
D && ((O = c == null ? void 0 : c.current) != null && O.contains(D) || (k = h.current) != null && k.contains(D) || Ue(D, null) || y());
|
|
1959
1983
|
};
|
|
1960
|
-
return document.addEventListener("keydown", _), document.addEventListener("mousedown",
|
|
1961
|
-
document.removeEventListener("keydown", _), document.removeEventListener("mousedown",
|
|
1984
|
+
return document.addEventListener("keydown", _), document.addEventListener("mousedown", A), () => {
|
|
1985
|
+
document.removeEventListener("keydown", _), document.removeEventListener("mousedown", A);
|
|
1962
1986
|
};
|
|
1963
1987
|
}, [n, v, c]);
|
|
1964
|
-
const
|
|
1988
|
+
const j = X.Children.toArray(t), T = j.find((_) => (_ == null ? void 0 : _.type) === et || (_ == null ? void 0 : _.type) === xe), g = j.filter((_) => (_ == null ? void 0 : _.type) !== et && (_ == null ? void 0 : _.type) !== xe), w = /* @__PURE__ */ e.jsx(
|
|
1965
1989
|
"div",
|
|
1966
1990
|
{
|
|
1967
1991
|
className: ["ds-side-page-overlay", v && "ds-side-page-overlay--closing"].filter(Boolean).join(" "),
|
|
@@ -1973,6 +1997,7 @@ function dn({
|
|
|
1973
1997
|
{
|
|
1974
1998
|
ref: h,
|
|
1975
1999
|
className: ["ds-side-page", v && "ds-side-page--closing"].filter(Boolean).join(" "),
|
|
2000
|
+
"data-surface": "2",
|
|
1976
2001
|
"data-side": a,
|
|
1977
2002
|
"data-size": o,
|
|
1978
2003
|
role: "dialog",
|
|
@@ -1986,7 +2011,7 @@ function dn({
|
|
|
1986
2011
|
variant: "ghost",
|
|
1987
2012
|
size: "small",
|
|
1988
2013
|
icon: /* @__PURE__ */ e.jsx(ee, { size: q[2], strokeWidth: 1.5 }),
|
|
1989
|
-
onClick:
|
|
2014
|
+
onClick: y,
|
|
1990
2015
|
"aria-label": u ?? p.close
|
|
1991
2016
|
}
|
|
1992
2017
|
),
|
|
@@ -1994,19 +2019,19 @@ function dn({
|
|
|
1994
2019
|
s && /* @__PURE__ */ e.jsx("h3", { id: f, className: "ds-side-page__title", children: s }),
|
|
1995
2020
|
r && /* @__PURE__ */ e.jsx("div", { className: "ds-side-page__subheader", children: r })
|
|
1996
2021
|
] }),
|
|
1997
|
-
/* @__PURE__ */ e.jsx("div", { className: "ds-side-page__body ds-scrollable", children:
|
|
1998
|
-
|
|
2022
|
+
/* @__PURE__ */ e.jsx("div", { className: "ds-side-page__body ds-scrollable", children: g }),
|
|
2023
|
+
T
|
|
1999
2024
|
]
|
|
2000
2025
|
}
|
|
2001
2026
|
)
|
|
2002
2027
|
}
|
|
2003
2028
|
);
|
|
2004
|
-
return typeof document > "u" ?
|
|
2029
|
+
return typeof document > "u" ? w : re.createPortal(w, document.body);
|
|
2005
2030
|
}
|
|
2006
|
-
function
|
|
2031
|
+
function et({ children: t }) {
|
|
2007
2032
|
return !t || X.Children.count(t) === 0 ? null : /* @__PURE__ */ e.jsx("div", { className: "ds-side-page__footer", children: t });
|
|
2008
2033
|
}
|
|
2009
|
-
const _e = De({ collapsed: !1, side: "left" }), Re = De(!1),
|
|
2034
|
+
const _e = De({ collapsed: !1, side: "left" }), Re = De(!1), pn = dt(function({
|
|
2010
2035
|
children: s,
|
|
2011
2036
|
collapsed: n = !1,
|
|
2012
2037
|
side: r = "left",
|
|
@@ -2042,7 +2067,7 @@ const _e = De({ collapsed: !1, side: "left" }), Re = De(!1), un = lt(function({
|
|
|
2042
2067
|
}
|
|
2043
2068
|
) });
|
|
2044
2069
|
});
|
|
2045
|
-
function
|
|
2070
|
+
function hn({
|
|
2046
2071
|
icon: t,
|
|
2047
2072
|
label: s,
|
|
2048
2073
|
selected: n = !1,
|
|
@@ -2056,7 +2081,7 @@ function fn({
|
|
|
2056
2081
|
className: d = "",
|
|
2057
2082
|
...p
|
|
2058
2083
|
}) {
|
|
2059
|
-
const { collapsed: h, side: f } = ie(_e), v = ie(Re),
|
|
2084
|
+
const { collapsed: h, side: f } = ie(_e), v = ie(Re), j = {
|
|
2060
2085
|
className: [
|
|
2061
2086
|
"ds-nav-rail__item",
|
|
2062
2087
|
d
|
|
@@ -2073,10 +2098,10 @@ function fn({
|
|
|
2073
2098
|
"data-onboarding": u || void 0
|
|
2074
2099
|
},
|
|
2075
2100
|
...p
|
|
2076
|
-
},
|
|
2101
|
+
}, T = i != null, g = f === "left" ? "right" : "left", w = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
2077
2102
|
/* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__icon", "aria-hidden": "true", children: t }),
|
|
2078
2103
|
!h && /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__label", children: s }),
|
|
2079
|
-
!h &&
|
|
2104
|
+
!h && T && /* @__PURE__ */ e.jsx(
|
|
2080
2105
|
"span",
|
|
2081
2106
|
{
|
|
2082
2107
|
className: ["ds-nav-rail__count", i === 0 && "ds-nav-rail__count--zero"].filter(Boolean).join(" "),
|
|
@@ -2084,26 +2109,26 @@ function fn({
|
|
|
2084
2109
|
children: i
|
|
2085
2110
|
}
|
|
2086
2111
|
),
|
|
2087
|
-
!h && l && (!
|
|
2088
|
-
h &&
|
|
2089
|
-
h && l && (!
|
|
2090
|
-
] }), _ = a ? /* @__PURE__ */ e.jsx("a", { href: r ? void 0 : a, ...
|
|
2091
|
-
return h && !v ? /* @__PURE__ */ e.jsx(
|
|
2112
|
+
!h && l && (!T || i === 0) && /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__dot ds-nav-rail__dot--inline", "aria-hidden": "true" }),
|
|
2113
|
+
h && T && i !== 0 && /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__count-collapsed", "data-updated": l || void 0, children: i > 99 ? "99+" : i }),
|
|
2114
|
+
h && l && (!T || i === 0) && /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__dot", "aria-hidden": "true" })
|
|
2115
|
+
] }), _ = a ? /* @__PURE__ */ e.jsx("a", { href: r ? void 0 : a, ...j, children: w }) : /* @__PURE__ */ e.jsx("button", { type: "button", ...j, children: w });
|
|
2116
|
+
return h && !v ? /* @__PURE__ */ e.jsx(Ve, { content: s, position: g, children: _ }) : _;
|
|
2092
2117
|
}
|
|
2093
|
-
function
|
|
2118
|
+
function xn({ children: t, className: s = "", ...n }) {
|
|
2094
2119
|
return /* @__PURE__ */ e.jsx("div", { className: ["ds-nav-rail__body", "ds-scrollable", s].filter(Boolean).join(" "), ...n, children: t });
|
|
2095
2120
|
}
|
|
2096
|
-
function
|
|
2121
|
+
function vn({ children: t, className: s = "", ...n }) {
|
|
2097
2122
|
return /* @__PURE__ */ e.jsx("div", { className: ["ds-nav-rail__header", s].filter(Boolean).join(" "), ...n, children: t });
|
|
2098
2123
|
}
|
|
2099
|
-
function
|
|
2124
|
+
function bn({ children: t, className: s = "", ...n }) {
|
|
2100
2125
|
return /* @__PURE__ */ e.jsx("div", { className: ["ds-nav-rail__footer", s].filter(Boolean).join(" "), ...n, children: t });
|
|
2101
2126
|
}
|
|
2102
|
-
function
|
|
2127
|
+
function _n({ className: t = "", ...s }) {
|
|
2103
2128
|
return /* @__PURE__ */ e.jsx("hr", { className: ["ds-nav-rail__divider", t].filter(Boolean).join(" "), ...s });
|
|
2104
2129
|
}
|
|
2105
|
-
function
|
|
2106
|
-
const { collapsed: o } = ie(_e), i = K(), l = s ?? i.recents, [c, u] =
|
|
2130
|
+
function jn({ children: t, label: s, defaultOpen: n = !0, className: r = "", ...a }) {
|
|
2131
|
+
const { collapsed: o } = ie(_e), i = K(), l = s ?? i.recents, [c, u] = L(n);
|
|
2107
2132
|
return /* @__PURE__ */ e.jsxs("div", { className: ["ds-nav-rail__recents", r].filter(Boolean).join(" "), ...a, children: [
|
|
2108
2133
|
!o && /* @__PURE__ */ e.jsxs(
|
|
2109
2134
|
"button",
|
|
@@ -2121,7 +2146,7 @@ function vn({ children: t, label: s, defaultOpen: n = !0, className: r = "", ...
|
|
|
2121
2146
|
(c || o) && /* @__PURE__ */ e.jsx("div", { className: "ds-nav-rail__recents-body", children: t })
|
|
2122
2147
|
] });
|
|
2123
2148
|
}
|
|
2124
|
-
const
|
|
2149
|
+
const Nn = dt(function({
|
|
2125
2150
|
as: s = "button",
|
|
2126
2151
|
avatar: n,
|
|
2127
2152
|
label: r,
|
|
@@ -2146,9 +2171,9 @@ const bn = lt(function({
|
|
|
2146
2171
|
children: h
|
|
2147
2172
|
}
|
|
2148
2173
|
);
|
|
2149
|
-
return l && !u ? /* @__PURE__ */ e.jsx(
|
|
2174
|
+
return l && !u ? /* @__PURE__ */ e.jsx(Ve, { content: r, position: d, children: f }) : f;
|
|
2150
2175
|
});
|
|
2151
|
-
function
|
|
2176
|
+
function wn({ avatar: t, label: s, selected: n = !1, disabled: r = !1, href: a, onClick: o, className: i = "", ...l }) {
|
|
2152
2177
|
const { collapsed: c, side: u } = ie(_e), d = ie(Re), f = {
|
|
2153
2178
|
className: [
|
|
2154
2179
|
"ds-nav-rail__item",
|
|
@@ -2167,11 +2192,11 @@ function _n({ avatar: t, label: s, selected: n = !1, disabled: r = !1, href: a,
|
|
|
2167
2192
|
}, v = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
2168
2193
|
/* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__icon", "aria-hidden": "true", children: t }),
|
|
2169
2194
|
!c && /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__label", children: s })
|
|
2170
|
-
] }),
|
|
2171
|
-
return c && !d ? /* @__PURE__ */ e.jsx(
|
|
2195
|
+
] }), N = u === "left" ? "right" : "left", y = a ? /* @__PURE__ */ e.jsx("a", { href: r ? void 0 : a, ...f, children: v }) : /* @__PURE__ */ e.jsx("button", { type: "button", ...f, children: v });
|
|
2196
|
+
return c && !d ? /* @__PURE__ */ e.jsx(Ve, { content: s, position: N, children: y }) : y;
|
|
2172
2197
|
}
|
|
2173
|
-
const
|
|
2174
|
-
function
|
|
2198
|
+
const tt = 240, st = 6, nt = 8;
|
|
2199
|
+
function gn({
|
|
2175
2200
|
trigger: t,
|
|
2176
2201
|
title: s,
|
|
2177
2202
|
children: n,
|
|
@@ -2180,25 +2205,25 @@ function jn({
|
|
|
2180
2205
|
defaultOpen: o = !1,
|
|
2181
2206
|
closeLabel: i
|
|
2182
2207
|
}) {
|
|
2183
|
-
const l = K(), { side: c } = ie(_e), [u, d] =
|
|
2208
|
+
const l = K(), { side: c } = ie(_e), [u, d] = L(o), p = r !== void 0, h = p ? r : u, [f, v] = L(!1), N = S(null), y = S(null), [j, T] = L({}), g = se(() => {
|
|
2184
2209
|
p ? a == null || a(!0) : d(!0);
|
|
2185
|
-
}, [p, a]),
|
|
2210
|
+
}, [p, a]), w = se(() => {
|
|
2186
2211
|
p ? a == null || a(!1) : d(!1);
|
|
2187
|
-
}, [p, a]), _ = se(() => h ?
|
|
2212
|
+
}, [p, a]), _ = se(() => h ? w() : g(), [h, g, w]), A = se(() => {
|
|
2188
2213
|
var W;
|
|
2189
|
-
const
|
|
2190
|
-
if (!
|
|
2191
|
-
const O =
|
|
2192
|
-
|
|
2214
|
+
const D = N.current;
|
|
2215
|
+
if (!D) return;
|
|
2216
|
+
const O = D.getBoundingClientRect(), k = window.innerHeight, P = ((W = y.current) == null ? void 0 : W.offsetHeight) ?? 300, H = Math.max(nt, Math.min(k - P - nt, O.top));
|
|
2217
|
+
T(c === "right" ? {
|
|
2193
2218
|
position: "fixed",
|
|
2194
|
-
top:
|
|
2195
|
-
right: window.innerWidth - O.left +
|
|
2196
|
-
width:
|
|
2219
|
+
top: H,
|
|
2220
|
+
right: window.innerWidth - O.left + st,
|
|
2221
|
+
width: tt
|
|
2197
2222
|
} : {
|
|
2198
2223
|
position: "fixed",
|
|
2199
|
-
top:
|
|
2200
|
-
left: O.right +
|
|
2201
|
-
width:
|
|
2224
|
+
top: H,
|
|
2225
|
+
left: O.right + st,
|
|
2226
|
+
width: tt
|
|
2202
2227
|
});
|
|
2203
2228
|
}, [c]);
|
|
2204
2229
|
F(() => {
|
|
@@ -2206,31 +2231,31 @@ function jn({
|
|
|
2206
2231
|
v(!1);
|
|
2207
2232
|
return;
|
|
2208
2233
|
}
|
|
2209
|
-
return
|
|
2210
|
-
window.removeEventListener("scroll",
|
|
2234
|
+
return A(), requestAnimationFrame(() => v(!0)), window.addEventListener("scroll", A, !0), window.addEventListener("resize", A), () => {
|
|
2235
|
+
window.removeEventListener("scroll", A, !0), window.removeEventListener("resize", A);
|
|
2211
2236
|
};
|
|
2212
|
-
}, [h,
|
|
2237
|
+
}, [h, A]), F(() => {
|
|
2213
2238
|
if (!h) return;
|
|
2214
|
-
const
|
|
2215
|
-
var
|
|
2216
|
-
!((
|
|
2239
|
+
const D = (k) => {
|
|
2240
|
+
var P, H;
|
|
2241
|
+
!((P = y.current) != null && P.contains(k.target)) && !((H = N.current) != null && H.contains(k.target)) && w();
|
|
2217
2242
|
}, O = (k) => {
|
|
2218
|
-
k.key === "Escape" &&
|
|
2243
|
+
k.key === "Escape" && w();
|
|
2219
2244
|
};
|
|
2220
|
-
return document.addEventListener("mousedown",
|
|
2221
|
-
document.removeEventListener("mousedown",
|
|
2245
|
+
return document.addEventListener("mousedown", D), document.addEventListener("keydown", O), () => {
|
|
2246
|
+
document.removeEventListener("mousedown", D), document.removeEventListener("keydown", O);
|
|
2222
2247
|
};
|
|
2223
|
-
}, [h,
|
|
2224
|
-
const
|
|
2248
|
+
}, [h, w]);
|
|
2249
|
+
const I = h && /* @__PURE__ */ e.jsxs(
|
|
2225
2250
|
"div",
|
|
2226
2251
|
{
|
|
2227
|
-
ref:
|
|
2252
|
+
ref: y,
|
|
2228
2253
|
className: [
|
|
2229
2254
|
"ds-nav-rail-flyout",
|
|
2230
2255
|
`ds-nav-rail-flyout--${c}`,
|
|
2231
2256
|
f && "ds-nav-rail-flyout--visible"
|
|
2232
2257
|
].filter(Boolean).join(" "),
|
|
2233
|
-
style:
|
|
2258
|
+
style: j,
|
|
2234
2259
|
"data-ds-portal": "",
|
|
2235
2260
|
role: "dialog",
|
|
2236
2261
|
"aria-modal": "false",
|
|
@@ -2242,7 +2267,7 @@ function jn({
|
|
|
2242
2267
|
{
|
|
2243
2268
|
type: "button",
|
|
2244
2269
|
className: "ds-nav-rail-flyout__close",
|
|
2245
|
-
onClick:
|
|
2270
|
+
onClick: w,
|
|
2246
2271
|
"aria-label": i ?? l.close,
|
|
2247
2272
|
children: /* @__PURE__ */ e.jsx(ee, { size: 16, strokeWidth: 2 })
|
|
2248
2273
|
}
|
|
@@ -2253,17 +2278,17 @@ function jn({
|
|
|
2253
2278
|
}
|
|
2254
2279
|
);
|
|
2255
2280
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
2256
|
-
/* @__PURE__ */ e.jsx(Re.Provider, { value: h, children: /* @__PURE__ */ e.jsx("div", { ref:
|
|
2257
|
-
typeof document < "u" && re.createPortal(
|
|
2281
|
+
/* @__PURE__ */ e.jsx(Re.Provider, { value: h, children: /* @__PURE__ */ e.jsx("div", { ref: N, onClick: _, style: { display: "flex", flexDirection: "column", width: "100%" }, children: t }) }),
|
|
2282
|
+
typeof document < "u" && re.createPortal(I, document.body)
|
|
2258
2283
|
] });
|
|
2259
2284
|
}
|
|
2260
|
-
const
|
|
2285
|
+
const Qt = {
|
|
2261
2286
|
info: We,
|
|
2262
2287
|
success: Fe,
|
|
2263
2288
|
warning: ze,
|
|
2264
2289
|
error: Me
|
|
2265
2290
|
};
|
|
2266
|
-
function
|
|
2291
|
+
function yn({
|
|
2267
2292
|
children: t,
|
|
2268
2293
|
variant: s = "info",
|
|
2269
2294
|
action: n,
|
|
@@ -2273,7 +2298,7 @@ function Nn({
|
|
|
2273
2298
|
dismissLabel: i,
|
|
2274
2299
|
...l
|
|
2275
2300
|
}) {
|
|
2276
|
-
const c = K(), u =
|
|
2301
|
+
const c = K(), u = Qt[s], d = o || (s === "error" ? "alert" : "status");
|
|
2277
2302
|
return /* @__PURE__ */ e.jsxs(
|
|
2278
2303
|
"div",
|
|
2279
2304
|
{
|
|
@@ -2306,7 +2331,7 @@ function Nn({
|
|
|
2306
2331
|
}
|
|
2307
2332
|
);
|
|
2308
2333
|
}
|
|
2309
|
-
function
|
|
2334
|
+
function kn({
|
|
2310
2335
|
trigger: t,
|
|
2311
2336
|
items: s = [],
|
|
2312
2337
|
open: n,
|
|
@@ -2317,18 +2342,18 @@ function wn({
|
|
|
2317
2342
|
style: l,
|
|
2318
2343
|
...c
|
|
2319
2344
|
}) {
|
|
2320
|
-
const [u, d] =
|
|
2345
|
+
const [u, d] = L(!1), [p, h] = L(!1), f = n !== void 0, v = f ? n : u, N = S(null), y = S(null), j = S(null), T = S(null), [g, w] = L({}), _ = S(null), A = 150, I = () => {
|
|
2321
2346
|
if (f)
|
|
2322
2347
|
r == null || r(!1);
|
|
2323
2348
|
else {
|
|
2324
2349
|
if (p) return;
|
|
2325
2350
|
h(!0), _.current = setTimeout(() => {
|
|
2326
2351
|
d(!1), h(!1);
|
|
2327
|
-
},
|
|
2352
|
+
}, A);
|
|
2328
2353
|
}
|
|
2329
|
-
},
|
|
2354
|
+
}, D = () => {
|
|
2330
2355
|
const b = !v;
|
|
2331
|
-
f ? r == null || r(b) : b ? (clearTimeout(_.current), h(!1), d(!0)) :
|
|
2356
|
+
f ? r == null || r(b) : b ? (clearTimeout(_.current), h(!1), d(!0)) : I();
|
|
2332
2357
|
}, O = () => {
|
|
2333
2358
|
v || (f ? r == null || r(!0) : (clearTimeout(_.current), h(!1), d(!0)));
|
|
2334
2359
|
};
|
|
@@ -2336,11 +2361,11 @@ function wn({
|
|
|
2336
2361
|
if (!v) return;
|
|
2337
2362
|
const b = 300, $ = () => {
|
|
2338
2363
|
var Y;
|
|
2339
|
-
const R = (Y =
|
|
2364
|
+
const R = (Y = N.current) == null ? void 0 : Y.getBoundingClientRect();
|
|
2340
2365
|
if (!R) return;
|
|
2341
|
-
const V = window.innerHeight - R.bottom,
|
|
2342
|
-
|
|
2343
|
-
a === "right" ?
|
|
2366
|
+
const V = window.innerHeight - R.bottom, U = V < b + 8 && R.top > V;
|
|
2367
|
+
w(
|
|
2368
|
+
a === "right" ? U ? { bottom: window.innerHeight - R.top + 4, top: "auto", right: window.innerWidth - R.right } : { top: R.bottom + 4, bottom: "auto", right: window.innerWidth - R.right } : U ? { bottom: window.innerHeight - R.top + 4, top: "auto", left: R.left } : { top: R.bottom + 4, bottom: "auto", left: R.left }
|
|
2344
2369
|
);
|
|
2345
2370
|
};
|
|
2346
2371
|
return $(), window.addEventListener("scroll", $, !0), window.addEventListener("resize", $), () => {
|
|
@@ -2349,7 +2374,7 @@ function wn({
|
|
|
2349
2374
|
}, [v, a]);
|
|
2350
2375
|
const k = () => {
|
|
2351
2376
|
var $;
|
|
2352
|
-
const b = ($ =
|
|
2377
|
+
const b = ($ = j.current) == null ? void 0 : $.querySelector(
|
|
2353
2378
|
'button:not([disabled]), [href], [tabindex]:not([tabindex="-1"]), input, select, textarea'
|
|
2354
2379
|
);
|
|
2355
2380
|
b == null || b.focus();
|
|
@@ -2357,41 +2382,41 @@ function wn({
|
|
|
2357
2382
|
F(() => {
|
|
2358
2383
|
if (!v) return;
|
|
2359
2384
|
const b = (R) => {
|
|
2360
|
-
var V,
|
|
2361
|
-
!((V =
|
|
2385
|
+
var V, U;
|
|
2386
|
+
!((V = N.current) != null && V.contains(R.target)) && !((U = y.current) != null && U.contains(R.target)) && I();
|
|
2362
2387
|
}, $ = (R) => {
|
|
2363
|
-
R.key === "Escape" && (
|
|
2388
|
+
R.key === "Escape" && (I(), k());
|
|
2364
2389
|
};
|
|
2365
2390
|
return document.addEventListener("mousedown", b), document.addEventListener("keydown", $), () => {
|
|
2366
2391
|
document.removeEventListener("mousedown", b), document.removeEventListener("keydown", $);
|
|
2367
2392
|
};
|
|
2368
2393
|
}, [v]), F(() => {
|
|
2369
|
-
if (!v || !
|
|
2370
|
-
const b =
|
|
2371
|
-
$ == null || $.focus(),
|
|
2394
|
+
if (!v || !T.current || !y.current) return;
|
|
2395
|
+
const b = P(), $ = T.current === "last" ? b[b.length - 1] : b[0];
|
|
2396
|
+
$ == null || $.focus(), T.current = null;
|
|
2372
2397
|
}, [v]);
|
|
2373
|
-
const
|
|
2398
|
+
const P = () => y.current ? [...y.current.querySelectorAll(
|
|
2374
2399
|
'button:not([disabled]), a[href]:not([aria-disabled="true"]), [tabindex]:not([tabindex="-1"])'
|
|
2375
|
-
)] : [],
|
|
2400
|
+
)] : [], H = (b) => {
|
|
2376
2401
|
var $, R;
|
|
2377
2402
|
if (b.key === "ArrowDown")
|
|
2378
|
-
b.preventDefault(), v ? ($ =
|
|
2403
|
+
b.preventDefault(), v ? ($ = P()[0]) == null || $.focus() : (T.current = "first", O());
|
|
2379
2404
|
else if (b.key === "ArrowUp")
|
|
2380
2405
|
if (b.preventDefault(), !v)
|
|
2381
|
-
|
|
2406
|
+
T.current = "last", O();
|
|
2382
2407
|
else {
|
|
2383
|
-
const V =
|
|
2408
|
+
const V = P();
|
|
2384
2409
|
(R = V[V.length - 1]) == null || R.focus();
|
|
2385
2410
|
}
|
|
2386
2411
|
}, W = (b) => {
|
|
2387
|
-
var V,
|
|
2388
|
-
const $ =
|
|
2412
|
+
var V, U, Y, m;
|
|
2413
|
+
const $ = P(), R = $.findIndex((x) => x === document.activeElement);
|
|
2389
2414
|
switch (b.key) {
|
|
2390
2415
|
case "ArrowDown":
|
|
2391
2416
|
b.preventDefault(), (V = $[Math.min(R + 1, $.length - 1)]) == null || V.focus();
|
|
2392
2417
|
break;
|
|
2393
2418
|
case "ArrowUp":
|
|
2394
|
-
b.preventDefault(), R <= 0 ? k() : (
|
|
2419
|
+
b.preventDefault(), R <= 0 ? k() : (U = $[R - 1]) == null || U.focus();
|
|
2395
2420
|
break;
|
|
2396
2421
|
case "Home":
|
|
2397
2422
|
b.preventDefault(), (Y = $[0]) == null || Y.focus();
|
|
@@ -2400,13 +2425,13 @@ function wn({
|
|
|
2400
2425
|
b.preventDefault(), (m = $[$.length - 1]) == null || m.focus();
|
|
2401
2426
|
break;
|
|
2402
2427
|
case "Tab":
|
|
2403
|
-
|
|
2428
|
+
I();
|
|
2404
2429
|
break;
|
|
2405
2430
|
}
|
|
2406
2431
|
}, M = v && /* @__PURE__ */ e.jsx(
|
|
2407
2432
|
"div",
|
|
2408
2433
|
{
|
|
2409
|
-
ref:
|
|
2434
|
+
ref: y,
|
|
2410
2435
|
role: "menu",
|
|
2411
2436
|
"data-ds-portal": "",
|
|
2412
2437
|
className: [
|
|
@@ -2414,7 +2439,7 @@ function wn({
|
|
|
2414
2439
|
`ds-dropdown__menu--${a}`,
|
|
2415
2440
|
p && "ds-dropdown__menu--closing"
|
|
2416
2441
|
].filter(Boolean).join(" "),
|
|
2417
|
-
style:
|
|
2442
|
+
style: g,
|
|
2418
2443
|
onKeyDown: W,
|
|
2419
2444
|
children: s.map((b, $) => {
|
|
2420
2445
|
if (b.separator)
|
|
@@ -2424,7 +2449,7 @@ function wn({
|
|
|
2424
2449
|
b.label && /* @__PURE__ */ e.jsx("div", { className: "ds-dropdown__section-label", children: b.label }),
|
|
2425
2450
|
/* @__PURE__ */ e.jsx("div", { className: "ds-dropdown__section-content", children: b.content })
|
|
2426
2451
|
] }, $);
|
|
2427
|
-
const R = !!b.href, V = R ? "a" : "button",
|
|
2452
|
+
const R = !!b.href, V = R ? "a" : "button", U = R ? { href: b.disabled ? void 0 : b.href, "aria-disabled": b.disabled ? "true" : void 0 } : { type: "button", disabled: b.disabled };
|
|
2428
2453
|
return /* @__PURE__ */ e.jsxs(
|
|
2429
2454
|
V,
|
|
2430
2455
|
{
|
|
@@ -2433,10 +2458,10 @@ function wn({
|
|
|
2433
2458
|
"ds-dropdown__item",
|
|
2434
2459
|
b.danger && "ds-dropdown__item--danger"
|
|
2435
2460
|
].filter(Boolean).join(" "),
|
|
2436
|
-
...
|
|
2461
|
+
...U,
|
|
2437
2462
|
onClick: () => {
|
|
2438
2463
|
var Y;
|
|
2439
|
-
(Y = b.onClick) == null || Y.call(b),
|
|
2464
|
+
(Y = b.onClick) == null || Y.call(b), I();
|
|
2440
2465
|
},
|
|
2441
2466
|
children: [
|
|
2442
2467
|
b.icon && /* @__PURE__ */ e.jsx("span", { className: "ds-dropdown__item-icon", children: b.icon }),
|
|
@@ -2452,7 +2477,7 @@ function wn({
|
|
|
2452
2477
|
return /* @__PURE__ */ e.jsxs(
|
|
2453
2478
|
"div",
|
|
2454
2479
|
{
|
|
2455
|
-
ref:
|
|
2480
|
+
ref: N,
|
|
2456
2481
|
className: ["ds-dropdown", o && "ds-dropdown--full-width", i].filter(Boolean).join(" "),
|
|
2457
2482
|
style: l,
|
|
2458
2483
|
...c,
|
|
@@ -2460,10 +2485,10 @@ function wn({
|
|
|
2460
2485
|
/* @__PURE__ */ e.jsx(
|
|
2461
2486
|
"div",
|
|
2462
2487
|
{
|
|
2463
|
-
ref:
|
|
2488
|
+
ref: j,
|
|
2464
2489
|
className: "ds-dropdown__trigger",
|
|
2465
|
-
onClick:
|
|
2466
|
-
onKeyDown:
|
|
2490
|
+
onClick: D,
|
|
2491
|
+
onKeyDown: H,
|
|
2467
2492
|
children: t
|
|
2468
2493
|
}
|
|
2469
2494
|
),
|
|
@@ -2472,7 +2497,7 @@ function wn({
|
|
|
2472
2497
|
}
|
|
2473
2498
|
);
|
|
2474
2499
|
}
|
|
2475
|
-
function
|
|
2500
|
+
function En({
|
|
2476
2501
|
value: t = 0,
|
|
2477
2502
|
size: s = "m",
|
|
2478
2503
|
variant: n = "default",
|
|
@@ -2509,11 +2534,11 @@ function gn({
|
|
|
2509
2534
|
}
|
|
2510
2535
|
);
|
|
2511
2536
|
}
|
|
2512
|
-
const
|
|
2513
|
-
function
|
|
2514
|
-
const [n, r] =
|
|
2537
|
+
const es = (t) => 1 - Math.pow(1 - t, 3), ts = () => typeof window < "u" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
2538
|
+
function ss(t, { duration: s = 600 } = {}) {
|
|
2539
|
+
const [n, r] = L(t), a = S(t), o = S(null);
|
|
2515
2540
|
return F(() => {
|
|
2516
|
-
if (
|
|
2541
|
+
if (ts()) {
|
|
2517
2542
|
r(t), a.current = t;
|
|
2518
2543
|
return;
|
|
2519
2544
|
}
|
|
@@ -2523,23 +2548,23 @@ function Qt(t, { duration: s = 600 } = {}) {
|
|
|
2523
2548
|
const u = (d) => {
|
|
2524
2549
|
c || (c = d);
|
|
2525
2550
|
const p = Math.min((d - c) / s, 1);
|
|
2526
|
-
r(i + l *
|
|
2551
|
+
r(i + l * es(p)), p < 1 ? o.current = requestAnimationFrame(u) : a.current = t;
|
|
2527
2552
|
};
|
|
2528
2553
|
return o.current = requestAnimationFrame(u), () => cancelAnimationFrame(o.current);
|
|
2529
2554
|
}, [t, s]), n;
|
|
2530
2555
|
}
|
|
2531
|
-
function
|
|
2556
|
+
function Tn({
|
|
2532
2557
|
value: t,
|
|
2533
2558
|
duration: s = 600,
|
|
2534
2559
|
decimals: n = 0,
|
|
2535
2560
|
prefix: r = "",
|
|
2536
2561
|
suffix: a = ""
|
|
2537
2562
|
}) {
|
|
2538
|
-
const i =
|
|
2563
|
+
const i = ss(t, { duration: s }).toFixed(n);
|
|
2539
2564
|
return `${r}${i}${a}`;
|
|
2540
2565
|
}
|
|
2541
|
-
function
|
|
2542
|
-
const r =
|
|
2566
|
+
function ns({ threshold: t = 0.1, rootMargin: s = "0px", once: n = !1 } = {}) {
|
|
2567
|
+
const r = S(null), [a, o] = L(!1);
|
|
2543
2568
|
return F(() => {
|
|
2544
2569
|
const i = r.current;
|
|
2545
2570
|
if (!i) return;
|
|
@@ -2552,7 +2577,7 @@ function es({ threshold: t = 0.1, rootMargin: s = "0px", once: n = !1 } = {}) {
|
|
|
2552
2577
|
return l.observe(i), () => l.disconnect();
|
|
2553
2578
|
}, [t, s, n]), { ref: r, inView: a };
|
|
2554
2579
|
}
|
|
2555
|
-
function
|
|
2580
|
+
function $n({
|
|
2556
2581
|
children: t,
|
|
2557
2582
|
as: s = "div",
|
|
2558
2583
|
once: n = !1,
|
|
@@ -2562,12 +2587,12 @@ function kn({
|
|
|
2562
2587
|
onLeave: i,
|
|
2563
2588
|
...l
|
|
2564
2589
|
}) {
|
|
2565
|
-
const { ref: c, inView: u } =
|
|
2590
|
+
const { ref: c, inView: u } = ns({ threshold: r, rootMargin: a, once: n }), d = S(!1);
|
|
2566
2591
|
return F(() => {
|
|
2567
2592
|
u && !d.current && (o == null || o()), !u && d.current && (i == null || i()), d.current = u;
|
|
2568
2593
|
}, [u]), /* @__PURE__ */ e.jsx(s, { ref: c, ...l, children: typeof t == "function" ? t(u) : t });
|
|
2569
2594
|
}
|
|
2570
|
-
const
|
|
2595
|
+
const rt = {
|
|
2571
2596
|
default: We,
|
|
2572
2597
|
success: Fe,
|
|
2573
2598
|
warning: ze,
|
|
@@ -2575,18 +2600,18 @@ const st = {
|
|
|
2575
2600
|
};
|
|
2576
2601
|
let ve = [];
|
|
2577
2602
|
const Le = /* @__PURE__ */ new Set();
|
|
2578
|
-
function
|
|
2603
|
+
function mt() {
|
|
2579
2604
|
Le.forEach((t) => t([...ve]));
|
|
2580
2605
|
}
|
|
2581
|
-
function
|
|
2582
|
-
ve = [...ve, t],
|
|
2606
|
+
function rs(t) {
|
|
2607
|
+
ve = [...ve, t], mt();
|
|
2583
2608
|
}
|
|
2584
|
-
function
|
|
2585
|
-
ve = ve.filter((s) => s.id !== t),
|
|
2609
|
+
function as(t) {
|
|
2610
|
+
ve = ve.filter((s) => s.id !== t), mt();
|
|
2586
2611
|
}
|
|
2587
|
-
function
|
|
2612
|
+
function Rn() {
|
|
2588
2613
|
const t = (s, n = {}) => {
|
|
2589
|
-
|
|
2614
|
+
rs({
|
|
2590
2615
|
id: `${Date.now()}-${Math.random()}`,
|
|
2591
2616
|
message: s,
|
|
2592
2617
|
type: "default",
|
|
@@ -2596,13 +2621,13 @@ function En() {
|
|
|
2596
2621
|
};
|
|
2597
2622
|
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 };
|
|
2598
2623
|
}
|
|
2599
|
-
function
|
|
2600
|
-
const n = K(), [r, a] =
|
|
2624
|
+
function os({ data: t, onDismiss: s }) {
|
|
2625
|
+
const n = K(), [r, a] = L(!1), o = S(null);
|
|
2601
2626
|
F(() => (requestAnimationFrame(() => a(!0)), t.duration > 0 && (o.current = setTimeout(() => i(), t.duration)), () => clearTimeout(o.current)), []);
|
|
2602
2627
|
function i() {
|
|
2603
2628
|
a(!1), setTimeout(() => s(t.id), 250);
|
|
2604
2629
|
}
|
|
2605
|
-
const l =
|
|
2630
|
+
const l = rt[t.type] ?? rt.default;
|
|
2606
2631
|
return /* @__PURE__ */ e.jsxs(
|
|
2607
2632
|
"div",
|
|
2608
2633
|
{
|
|
@@ -2629,19 +2654,19 @@ function ns({ data: t, onDismiss: s }) {
|
|
|
2629
2654
|
}
|
|
2630
2655
|
);
|
|
2631
2656
|
}
|
|
2632
|
-
function
|
|
2633
|
-
const [s, n] =
|
|
2657
|
+
function Sn({ position: t = "bottom-right" }) {
|
|
2658
|
+
const [s, n] = L(() => [...ve]);
|
|
2634
2659
|
return F(() => (Le.add(n), () => Le.delete(n)), []), !s.length || typeof document > "u" ? null : re.createPortal(
|
|
2635
|
-
/* @__PURE__ */ e.jsx("div", { "data-ds-portal": "", className: ["ds-toast-container", `ds-toast-container--${t}`].join(" "), children: s.map((r) => /* @__PURE__ */ e.jsx(
|
|
2660
|
+
/* @__PURE__ */ e.jsx("div", { "data-ds-portal": "", className: ["ds-toast-container", `ds-toast-container--${t}`].join(" "), children: s.map((r) => /* @__PURE__ */ e.jsx(os, { data: r, onDismiss: as }, r.id)) }),
|
|
2636
2661
|
document.body
|
|
2637
2662
|
);
|
|
2638
2663
|
}
|
|
2639
|
-
const
|
|
2664
|
+
const is = {
|
|
2640
2665
|
running: /* @__PURE__ */ e.jsx(he, { size: "xs", variant: "info", children: "Running..." }),
|
|
2641
2666
|
success: /* @__PURE__ */ e.jsx(he, { size: "xs", variant: "success", children: "Done" }),
|
|
2642
2667
|
error: /* @__PURE__ */ e.jsx(he, { size: "xs", variant: "error", children: "Error" })
|
|
2643
2668
|
};
|
|
2644
|
-
function
|
|
2669
|
+
function An({
|
|
2645
2670
|
label: t,
|
|
2646
2671
|
status: s = "idle",
|
|
2647
2672
|
icon: n,
|
|
@@ -2656,7 +2681,7 @@ function $n({
|
|
|
2656
2681
|
const d = s === "running", p = /* @__PURE__ */ e.jsxs("span", { className: "ds-tool-card__title-row", children: [
|
|
2657
2682
|
n && /* @__PURE__ */ e.jsx("span", { className: "ds-tool-card__icon", children: n }),
|
|
2658
2683
|
/* @__PURE__ */ e.jsx("span", { className: "ds-tool-card__label", children: t }),
|
|
2659
|
-
|
|
2684
|
+
is[s],
|
|
2660
2685
|
r
|
|
2661
2686
|
] });
|
|
2662
2687
|
return l ? /* @__PURE__ */ e.jsx(
|
|
@@ -2665,7 +2690,7 @@ function $n({
|
|
|
2665
2690
|
className: ["ds-tool-card", d && "ds-tool-card--running", c].filter(Boolean).join(" "),
|
|
2666
2691
|
...u,
|
|
2667
2692
|
children: /* @__PURE__ */ e.jsx(
|
|
2668
|
-
|
|
2693
|
+
He,
|
|
2669
2694
|
{
|
|
2670
2695
|
title: p,
|
|
2671
2696
|
padding: "s",
|
|
@@ -2685,14 +2710,14 @@ function $n({
|
|
|
2685
2710
|
}
|
|
2686
2711
|
);
|
|
2687
2712
|
}
|
|
2688
|
-
function
|
|
2713
|
+
function ls({
|
|
2689
2714
|
text: t,
|
|
2690
2715
|
size: s = "xs",
|
|
2691
2716
|
timeout: n = 800,
|
|
2692
2717
|
"aria-label": r,
|
|
2693
2718
|
...a
|
|
2694
2719
|
}) {
|
|
2695
|
-
const o = K(), [i, l] =
|
|
2720
|
+
const o = K(), [i, l] = L(!1), c = (u) => {
|
|
2696
2721
|
u.currentTarget.blur(), navigator.clipboard.writeText(t).then(() => {
|
|
2697
2722
|
l(!0), setTimeout(() => l(!1), n);
|
|
2698
2723
|
});
|
|
@@ -2703,36 +2728,36 @@ function as({
|
|
|
2703
2728
|
variant: "ghost",
|
|
2704
2729
|
size: s,
|
|
2705
2730
|
state: i ? "success" : "idle",
|
|
2706
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
2731
|
+
icon: /* @__PURE__ */ e.jsx(kt, { size: q[1], strokeWidth: 1.5 }),
|
|
2707
2732
|
"aria-label": r ?? o.copyToClipboard,
|
|
2708
2733
|
onClick: c,
|
|
2709
2734
|
...a
|
|
2710
2735
|
}
|
|
2711
2736
|
);
|
|
2712
2737
|
}
|
|
2713
|
-
function
|
|
2714
|
-
const [r, a] =
|
|
2738
|
+
function Bn({ content: t, streaming: s = !1, ...n }) {
|
|
2739
|
+
const [r, a] = L(s);
|
|
2715
2740
|
return F(() => {
|
|
2716
2741
|
a(!!s);
|
|
2717
2742
|
}, [s]), /* @__PURE__ */ e.jsx(
|
|
2718
|
-
|
|
2743
|
+
He,
|
|
2719
2744
|
{
|
|
2720
2745
|
expanded: r,
|
|
2721
2746
|
onToggle: a,
|
|
2722
2747
|
padding: "s",
|
|
2723
2748
|
title: /* @__PURE__ */ e.jsxs("div", { className: "ds-reasoning__title", children: [
|
|
2724
|
-
/* @__PURE__ */ e.jsx(
|
|
2725
|
-
/* @__PURE__ */ e.jsx(
|
|
2749
|
+
/* @__PURE__ */ e.jsx(Et, { size: q[1], strokeWidth: 1.5, className: "ds-reasoning__icon" }),
|
|
2750
|
+
/* @__PURE__ */ e.jsx(zt, { secondary: !0, children: "Thinking" })
|
|
2726
2751
|
] }),
|
|
2727
2752
|
...n,
|
|
2728
|
-
children: /* @__PURE__ */ e.jsxs(
|
|
2753
|
+
children: /* @__PURE__ */ e.jsxs(ft, { secondary: !0, style: { whiteSpace: "pre-wrap" }, children: [
|
|
2729
2754
|
t,
|
|
2730
2755
|
s && /* @__PURE__ */ e.jsx("span", { className: "ds-cursor ds-cursor--line" })
|
|
2731
2756
|
] })
|
|
2732
2757
|
}
|
|
2733
2758
|
);
|
|
2734
2759
|
}
|
|
2735
|
-
function
|
|
2760
|
+
function In({
|
|
2736
2761
|
count: t,
|
|
2737
2762
|
current: s = 0,
|
|
2738
2763
|
done: n = [],
|
|
@@ -2745,7 +2770,7 @@ function Sn({
|
|
|
2745
2770
|
const c = K(), { t: u } = be();
|
|
2746
2771
|
return /* @__PURE__ */ e.jsxs("div", { className: ["ds-step-indicator", o].filter(Boolean).join(" "), ...l, children: [
|
|
2747
2772
|
/* @__PURE__ */ e.jsx("div", { className: "ds-step-indicator__dots", role: "tablist", "aria-label": i ?? c.steps, children: Array.from({ length: t }, (d, p) => {
|
|
2748
|
-
const h = p === s, f = n.includes(p) && !h, v = r && (p <= s || n.includes(p)),
|
|
2773
|
+
const h = p === s, f = n.includes(p) && !h, v = r && (p <= s || n.includes(p)), N = [
|
|
2749
2774
|
"ds-step-indicator__dot",
|
|
2750
2775
|
h && "ds-step-indicator__dot--active",
|
|
2751
2776
|
f && "ds-step-indicator__dot--done"
|
|
@@ -2754,7 +2779,7 @@ function Sn({
|
|
|
2754
2779
|
"button",
|
|
2755
2780
|
{
|
|
2756
2781
|
type: "button",
|
|
2757
|
-
className:
|
|
2782
|
+
className: N,
|
|
2758
2783
|
role: "tab",
|
|
2759
2784
|
"aria-selected": h,
|
|
2760
2785
|
"aria-label": u("stepN", { n: p + 1 }),
|
|
@@ -2765,14 +2790,14 @@ function Sn({
|
|
|
2765
2790
|
p
|
|
2766
2791
|
);
|
|
2767
2792
|
}) }),
|
|
2768
|
-
a && /* @__PURE__ */ e.jsxs(
|
|
2793
|
+
a && /* @__PURE__ */ e.jsxs(ft, { secondary: !0, className: "ds-step-indicator__counter", children: [
|
|
2769
2794
|
s + 1,
|
|
2770
2795
|
" / ",
|
|
2771
2796
|
t
|
|
2772
2797
|
] })
|
|
2773
2798
|
] });
|
|
2774
2799
|
}
|
|
2775
|
-
function
|
|
2800
|
+
function Ln({
|
|
2776
2801
|
content: t,
|
|
2777
2802
|
isStreaming: s = !1,
|
|
2778
2803
|
cursor: n = "line",
|
|
@@ -2780,7 +2805,7 @@ function An({
|
|
|
2780
2805
|
className: a = "",
|
|
2781
2806
|
...o
|
|
2782
2807
|
}) {
|
|
2783
|
-
const i =
|
|
2808
|
+
const i = S(t);
|
|
2784
2809
|
return F(() => {
|
|
2785
2810
|
t !== i.current && (r == null || r(t), i.current = t);
|
|
2786
2811
|
}, [t, r]), /* @__PURE__ */ e.jsxs("span", { className: ["ds-streaming-text", a].filter(Boolean).join(" "), ...o, children: [
|
|
@@ -2788,7 +2813,7 @@ function An({
|
|
|
2788
2813
|
s && n !== "none" && /* @__PURE__ */ e.jsx("span", { className: `ds-cursor ds-cursor--${n}`, "aria-hidden": "true" })
|
|
2789
2814
|
] });
|
|
2790
2815
|
}
|
|
2791
|
-
function
|
|
2816
|
+
function Dn({
|
|
2792
2817
|
role: t = "assistant",
|
|
2793
2818
|
header: s,
|
|
2794
2819
|
footer: n,
|
|
@@ -2815,8 +2840,8 @@ function Bn({
|
|
|
2815
2840
|
n && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__footer", children: n })
|
|
2816
2841
|
] });
|
|
2817
2842
|
}
|
|
2818
|
-
function
|
|
2819
|
-
const r =
|
|
2843
|
+
function Pn(t, { containerRef: s, smartPause: n = !0 } = {}) {
|
|
2844
|
+
const r = S(!1), a = S(0);
|
|
2820
2845
|
F(() => {
|
|
2821
2846
|
const o = s == null ? void 0 : s.current;
|
|
2822
2847
|
if (!o) return;
|
|
@@ -2830,7 +2855,7 @@ function In(t, { containerRef: s, smartPause: n = !0 } = {}) {
|
|
|
2830
2855
|
o && (n && r.current || (o.scrollTop = o.scrollHeight));
|
|
2831
2856
|
}, t);
|
|
2832
2857
|
}
|
|
2833
|
-
function
|
|
2858
|
+
function cs({
|
|
2834
2859
|
prompts: t,
|
|
2835
2860
|
enabled: s,
|
|
2836
2861
|
typingSpeed: n = 38,
|
|
@@ -2839,7 +2864,7 @@ function os({
|
|
|
2839
2864
|
betweenTime: o = 380,
|
|
2840
2865
|
manualPauseMs: i = 5e3
|
|
2841
2866
|
}) {
|
|
2842
|
-
const [l, c] =
|
|
2867
|
+
const [l, c] = L(0), [u, d] = L(""), p = S("typing"), h = S(0), f = S(0), v = S(null), N = S(0);
|
|
2843
2868
|
F(() => {
|
|
2844
2869
|
f.current = l;
|
|
2845
2870
|
}, [l]), F(() => {
|
|
@@ -2847,28 +2872,28 @@ function os({
|
|
|
2847
2872
|
d(""), h.current = 0, p.current = "typing";
|
|
2848
2873
|
return;
|
|
2849
2874
|
}
|
|
2850
|
-
const
|
|
2875
|
+
const w = () => {
|
|
2851
2876
|
const _ = Date.now();
|
|
2852
|
-
if (
|
|
2853
|
-
v.current = setTimeout(
|
|
2877
|
+
if (N.current > _) {
|
|
2878
|
+
v.current = setTimeout(w, N.current - _);
|
|
2854
2879
|
return;
|
|
2855
2880
|
}
|
|
2856
|
-
const
|
|
2857
|
-
p.current === "typing" ? (h.current += 1, d(
|
|
2881
|
+
const A = t[f.current % t.length] ?? "";
|
|
2882
|
+
p.current === "typing" ? (h.current += 1, d(A.slice(0, h.current)), h.current >= A.length ? (p.current = "holding", v.current = setTimeout(w, a)) : v.current = setTimeout(w, n + Math.random() * 28)) : p.current === "holding" ? (p.current = "erasing", v.current = setTimeout(w, r)) : (h.current = Math.max(0, h.current - 1), d(A.slice(0, h.current)), h.current <= 0 ? (p.current = "typing", f.current = (f.current + 1) % t.length, c(f.current), v.current = setTimeout(w, o)) : v.current = setTimeout(w, r));
|
|
2858
2883
|
};
|
|
2859
|
-
return v.current = setTimeout(
|
|
2884
|
+
return v.current = setTimeout(w, 260), () => {
|
|
2860
2885
|
v.current && clearTimeout(v.current);
|
|
2861
2886
|
};
|
|
2862
2887
|
}, [s, t, n, r, a, o]);
|
|
2863
|
-
const
|
|
2888
|
+
const y = (w) => {
|
|
2864
2889
|
if (t.length === 0) return;
|
|
2865
|
-
const _ = (
|
|
2866
|
-
f.current = _, h.current =
|
|
2867
|
-
},
|
|
2868
|
-
return { displayed: u, currentPrompt:
|
|
2890
|
+
const _ = (w % t.length + t.length) % t.length, A = t[_];
|
|
2891
|
+
f.current = _, h.current = A.length, p.current = "holding", N.current = Date.now() + i, c(_), d(A);
|
|
2892
|
+
}, j = () => y(f.current + 1), T = () => y(f.current - 1), g = t[l % t.length] ?? "";
|
|
2893
|
+
return { displayed: u, currentPrompt: g, index: l, next: j, prev: T };
|
|
2869
2894
|
}
|
|
2870
|
-
let
|
|
2871
|
-
function
|
|
2895
|
+
let ds = 0;
|
|
2896
|
+
function Mn({
|
|
2872
2897
|
value: t = "",
|
|
2873
2898
|
onChange: s,
|
|
2874
2899
|
onSubmit: n,
|
|
@@ -2884,91 +2909,91 @@ function Ln({
|
|
|
2884
2909
|
onAttachImages: h,
|
|
2885
2910
|
onRemoveAttachment: f,
|
|
2886
2911
|
onRemoveImage: v,
|
|
2887
|
-
acceptImage:
|
|
2888
|
-
acceptFile:
|
|
2889
|
-
maxImages:
|
|
2890
|
-
maxImageSize:
|
|
2891
|
-
leftSlot:
|
|
2892
|
-
rightSlot:
|
|
2912
|
+
acceptImage: N,
|
|
2913
|
+
acceptFile: y,
|
|
2914
|
+
maxImages: j,
|
|
2915
|
+
maxImageSize: T,
|
|
2916
|
+
leftSlot: g,
|
|
2917
|
+
rightSlot: w,
|
|
2893
2918
|
className: _ = "",
|
|
2894
|
-
...
|
|
2919
|
+
...A
|
|
2895
2920
|
}) {
|
|
2896
|
-
const
|
|
2897
|
-
const z = ++
|
|
2898
|
-
b((J) => [...J, { id: z, msg:
|
|
2899
|
-
}, V = (
|
|
2921
|
+
const I = K(), { t: D } = be(), O = S(null), k = S(null), P = S(0), [H, W] = L(!1), [M, b] = L([]), $ = l ?? I.promptPlaceholder, R = (E) => {
|
|
2922
|
+
const z = ++ds;
|
|
2923
|
+
b((J) => [...J, { id: z, msg: E }]), setTimeout(() => b((J) => J.filter((Q) => Q.id !== z)), 6e3);
|
|
2924
|
+
}, V = (E) => b((z) => z.filter((J) => J.id !== E)), U = (E) => E.type.startsWith("image/"), Y = () => !0, m = N ?? U, x = y ?? Y, B = (E) => {
|
|
2900
2925
|
const z = [], J = [], Q = [], ne = [];
|
|
2901
|
-
let ae = 0, me =
|
|
2902
|
-
for (const oe of
|
|
2903
|
-
m(oe) ?
|
|
2926
|
+
let ae = 0, me = j != null ? j - ((d == null ? void 0 : d.length) ?? 0) : 1 / 0;
|
|
2927
|
+
for (const oe of E)
|
|
2928
|
+
m(oe) ? T && oe.size > T ? Q.push(oe.name) : me > 0 ? (z.push(oe), me--) : ae++ : x(oe) ? J.push(oe) : ne.push(oe.name);
|
|
2904
2929
|
return { imageFiles: z, docFiles: J, tooLarge: Q, skipped: ne, limitExceeded: ae };
|
|
2905
|
-
},
|
|
2906
|
-
const z =
|
|
2907
|
-
R(
|
|
2908
|
-
}, te = (
|
|
2909
|
-
const { imageFiles: z, docFiles: J, tooLarge: Q, skipped: ne, limitExceeded: ae } = B(
|
|
2910
|
-
Q.length &&
|
|
2930
|
+
}, C = (E) => {
|
|
2931
|
+
const z = T ? D("fileTooLargeMaxHint", { maxMb: T / 1024 / 1024 }) : "";
|
|
2932
|
+
R(D("fileTooLarge", { maxHint: z, names: E.join(", ") }));
|
|
2933
|
+
}, te = (E) => {
|
|
2934
|
+
const { imageFiles: z, docFiles: J, tooLarge: Q, skipped: ne, limitExceeded: ae } = B(E);
|
|
2935
|
+
Q.length && C(Q), ne.length && R(D("filesSkipped", { names: ne.join(", ") })), ae && R(D("maxImages", { n: j })), h && z.length && h(z);
|
|
2911
2936
|
const me = J.concat(h ? [] : z);
|
|
2912
2937
|
p && me.length && p(me);
|
|
2913
2938
|
};
|
|
2914
2939
|
F(() => {
|
|
2915
|
-
const
|
|
2916
|
-
|
|
2940
|
+
const E = k.current;
|
|
2941
|
+
E && (E.style.height = "auto", E.style.height = `${Math.min(E.scrollHeight, 200)}px`);
|
|
2917
2942
|
}, [t]), F(() => {
|
|
2918
|
-
const
|
|
2943
|
+
const E = (z) => {
|
|
2919
2944
|
var Q, ne, ae;
|
|
2920
2945
|
if (o || i) return;
|
|
2921
2946
|
const J = (Q = z.target) == null ? void 0 : Q.tagName;
|
|
2922
2947
|
J === "INPUT" || J === "TEXTAREA" || J === "SELECT" || (ne = z.target) != null && ne.isContentEditable || z.ctrlKey || z.metaKey || z.altKey || z.key.length !== 1 && z.key !== "Backspace" && z.key !== "Delete" || (ae = k.current) == null || ae.focus();
|
|
2923
2948
|
};
|
|
2924
|
-
return document.addEventListener("keydown",
|
|
2949
|
+
return document.addEventListener("keydown", E), () => document.removeEventListener("keydown", E);
|
|
2925
2950
|
}, [o, i]);
|
|
2926
|
-
const le = (
|
|
2927
|
-
|
|
2928
|
-
}, G = (
|
|
2929
|
-
|
|
2930
|
-
}, Z = (
|
|
2931
|
-
|
|
2932
|
-
const z = Array.from(
|
|
2951
|
+
const le = (E) => {
|
|
2952
|
+
E.preventDefault(), P.current++, E.dataTransfer.types.includes("Files") && W(!0);
|
|
2953
|
+
}, G = (E) => {
|
|
2954
|
+
E.preventDefault(), P.current--, P.current === 0 && W(!1);
|
|
2955
|
+
}, Z = (E) => E.preventDefault(), fe = (E) => {
|
|
2956
|
+
E.preventDefault(), P.current = 0, W(!1);
|
|
2957
|
+
const z = Array.from(E.dataTransfer.files);
|
|
2933
2958
|
z.length && te(z);
|
|
2934
|
-
}, je = (
|
|
2935
|
-
const z = Array.from(
|
|
2959
|
+
}, je = (E) => {
|
|
2960
|
+
const z = Array.from(E.target.files || []);
|
|
2936
2961
|
O.current && (O.current.value = ""), z.length && te(z);
|
|
2937
|
-
}, Se = (
|
|
2962
|
+
}, Se = (E) => {
|
|
2938
2963
|
var oe;
|
|
2939
2964
|
if (!h) return;
|
|
2940
|
-
const z = (oe =
|
|
2965
|
+
const z = (oe = E.clipboardData) == null ? void 0 : oe.items;
|
|
2941
2966
|
if (!z) return;
|
|
2942
2967
|
const J = [];
|
|
2943
|
-
for (const
|
|
2944
|
-
const
|
|
2945
|
-
|
|
2968
|
+
for (const xt of z) {
|
|
2969
|
+
const qe = xt.getAsFile();
|
|
2970
|
+
qe && J.push(qe);
|
|
2946
2971
|
}
|
|
2947
2972
|
if (J.length === 0) return;
|
|
2948
2973
|
const { imageFiles: Q, tooLarge: ne, skipped: ae, limitExceeded: me } = B(J);
|
|
2949
|
-
ne.length &&
|
|
2950
|
-
}, Ne = !o && !i && !!(c != null && c.length) && t.length === 0, ke =
|
|
2974
|
+
ne.length && C(ne), ae.length && R(D("filesSkipped", { names: ae.join(", ") })), me && R(D("maxImages", { n: j })), Q.length && (E.preventDefault(), h(Q));
|
|
2975
|
+
}, Ne = !o && !i && !!(c != null && c.length) && t.length === 0, ke = cs({
|
|
2951
2976
|
prompts: c ?? [],
|
|
2952
2977
|
enabled: Ne
|
|
2953
|
-
}),
|
|
2978
|
+
}), pt = (E) => {
|
|
2954
2979
|
if (Ne) {
|
|
2955
|
-
if (
|
|
2956
|
-
|
|
2980
|
+
if (E.key === "ArrowDown" || E.key === "ArrowRight") {
|
|
2981
|
+
E.preventDefault(), ke.next();
|
|
2957
2982
|
return;
|
|
2958
2983
|
}
|
|
2959
|
-
if (
|
|
2960
|
-
|
|
2984
|
+
if (E.key === "ArrowUp" || E.key === "ArrowLeft") {
|
|
2985
|
+
E.preventDefault(), ke.prev();
|
|
2961
2986
|
return;
|
|
2962
2987
|
}
|
|
2963
|
-
if (
|
|
2964
|
-
|
|
2988
|
+
if (E.key === "Tab" && !E.shiftKey) {
|
|
2989
|
+
E.preventDefault(), s == null || s(ke.currentPrompt);
|
|
2965
2990
|
return;
|
|
2966
2991
|
}
|
|
2967
2992
|
}
|
|
2968
|
-
a == null || a(
|
|
2969
|
-
},
|
|
2970
|
-
return /* @__PURE__ */ e.jsxs("div", { className: ["ds-prompt-input", _].filter(Boolean).join(" "), ...
|
|
2971
|
-
|
|
2993
|
+
a == null || a(E);
|
|
2994
|
+
}, ht = (t.trim() || (d == null ? void 0 : d.length) > 0 || (u == null ? void 0 : u.length) > 0) && !i, Ye = p || h;
|
|
2995
|
+
return /* @__PURE__ */ e.jsxs("div", { className: ["ds-prompt-input", _].filter(Boolean).join(" "), ...A, children: [
|
|
2996
|
+
Ye && /* @__PURE__ */ e.jsx(
|
|
2972
2997
|
"input",
|
|
2973
2998
|
{
|
|
2974
2999
|
ref: O,
|
|
@@ -2982,20 +3007,20 @@ function Ln({
|
|
|
2982
3007
|
/* @__PURE__ */ e.jsxs(
|
|
2983
3008
|
"div",
|
|
2984
3009
|
{
|
|
2985
|
-
className: ["ds-prompt-input__box",
|
|
3010
|
+
className: ["ds-prompt-input__box", H && "ds-prompt-input__box--dragging"].filter(Boolean).join(" "),
|
|
2986
3011
|
onDragEnter: le,
|
|
2987
3012
|
onDragLeave: G,
|
|
2988
3013
|
onDragOver: Z,
|
|
2989
3014
|
onDrop: fe,
|
|
2990
3015
|
children: [
|
|
2991
|
-
|
|
3016
|
+
H && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__drag-overlay", children: I.dropFilesHere }),
|
|
2992
3017
|
/* @__PURE__ */ e.jsx(
|
|
2993
3018
|
"textarea",
|
|
2994
3019
|
{
|
|
2995
3020
|
ref: k,
|
|
2996
3021
|
value: t,
|
|
2997
|
-
onChange: (
|
|
2998
|
-
onKeyDown:
|
|
3022
|
+
onChange: (E) => s == null ? void 0 : s(E.target.value),
|
|
3023
|
+
onKeyDown: pt,
|
|
2999
3024
|
onPaste: Se,
|
|
3000
3025
|
placeholder: Ne ? "" : $,
|
|
3001
3026
|
disabled: o || i,
|
|
@@ -3007,81 +3032,81 @@ function Ln({
|
|
|
3007
3032
|
/* @__PURE__ */ e.jsx("span", { className: "ds-prompt-input__anim-text", children: ke.displayed }),
|
|
3008
3033
|
/* @__PURE__ */ e.jsx("span", { className: "ds-prompt-input__anim-cursor" })
|
|
3009
3034
|
] }),
|
|
3010
|
-
d && d.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__images", children: d.map((
|
|
3011
|
-
/* @__PURE__ */ e.jsx("img", { src:
|
|
3035
|
+
d && d.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__images", children: d.map((E, z) => /* @__PURE__ */ e.jsxs("div", { className: "ds-prompt-input__image-thumb", children: [
|
|
3036
|
+
/* @__PURE__ */ e.jsx("img", { src: E.preview, alt: "" }),
|
|
3012
3037
|
/* @__PURE__ */ e.jsx(
|
|
3013
3038
|
"button",
|
|
3014
3039
|
{
|
|
3015
3040
|
className: "ds-prompt-input__image-remove",
|
|
3016
3041
|
onClick: () => v == null ? void 0 : v(z),
|
|
3017
|
-
"aria-label":
|
|
3042
|
+
"aria-label": I.removeImage,
|
|
3018
3043
|
type: "button",
|
|
3019
3044
|
children: /* @__PURE__ */ e.jsx(ee, { size: 12, strokeWidth: 2 })
|
|
3020
3045
|
}
|
|
3021
3046
|
)
|
|
3022
3047
|
] }, z)) }),
|
|
3023
|
-
M.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__warnings", children: M.map((
|
|
3024
|
-
/* @__PURE__ */ e.jsx("span", { children:
|
|
3048
|
+
M.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__warnings", children: M.map((E) => /* @__PURE__ */ e.jsxs("div", { className: "ds-prompt-input__warning", role: "alert", children: [
|
|
3049
|
+
/* @__PURE__ */ e.jsx("span", { children: E.msg }),
|
|
3025
3050
|
/* @__PURE__ */ e.jsx(
|
|
3026
3051
|
"button",
|
|
3027
3052
|
{
|
|
3028
3053
|
type: "button",
|
|
3029
3054
|
className: "ds-prompt-input__warning-close",
|
|
3030
|
-
onClick: () => V(
|
|
3031
|
-
"aria-label":
|
|
3055
|
+
onClick: () => V(E.id),
|
|
3056
|
+
"aria-label": I.dismiss,
|
|
3032
3057
|
children: /* @__PURE__ */ e.jsx(ee, { size: q[1], strokeWidth: 1.5 })
|
|
3033
3058
|
}
|
|
3034
3059
|
)
|
|
3035
|
-
] },
|
|
3036
|
-
u && u.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__attachments", children: u.map((
|
|
3037
|
-
|
|
3038
|
-
|
|
3039
|
-
|
|
3060
|
+
] }, E.id)) }),
|
|
3061
|
+
u && u.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__attachments", children: u.map((E, z) => /* @__PURE__ */ e.jsx(he, { size: "xs", children: /* @__PURE__ */ e.jsxs("span", { className: "ds-prompt-input__badge-content", children: [
|
|
3062
|
+
E.uploading ? /* @__PURE__ */ e.jsx(Tt, { size: q[1], strokeWidth: 1.5, className: "spin" }) : /* @__PURE__ */ e.jsx(Ge, { size: q[1], strokeWidth: 1.5 }),
|
|
3063
|
+
E.filename,
|
|
3064
|
+
E.uploading ? /* @__PURE__ */ e.jsx("span", { className: "ds-prompt-input__uploading", children: I.uploading }) : /* @__PURE__ */ e.jsx(
|
|
3040
3065
|
"button",
|
|
3041
3066
|
{
|
|
3042
3067
|
type: "button",
|
|
3043
3068
|
className: "ds-prompt-input__remove-btn",
|
|
3044
3069
|
onClick: () => f == null ? void 0 : f(z),
|
|
3045
|
-
"aria-label":
|
|
3070
|
+
"aria-label": I.removeAttachment,
|
|
3046
3071
|
children: /* @__PURE__ */ e.jsx(ee, { size: q[1], strokeWidth: 1.5 })
|
|
3047
3072
|
}
|
|
3048
3073
|
)
|
|
3049
3074
|
] }) }, z)) }),
|
|
3050
3075
|
/* @__PURE__ */ e.jsxs("div", { className: "ds-prompt-input__toolbar", children: [
|
|
3051
|
-
|
|
3076
|
+
Ye && /* @__PURE__ */ e.jsx(
|
|
3052
3077
|
de,
|
|
3053
3078
|
{
|
|
3054
3079
|
variant: "ghost",
|
|
3055
3080
|
size: "xs",
|
|
3056
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
3057
|
-
"aria-label":
|
|
3081
|
+
icon: /* @__PURE__ */ e.jsx(Ge, { size: q[2], strokeWidth: 1.5 }),
|
|
3082
|
+
"aria-label": I.attachFiles,
|
|
3058
3083
|
onClick: () => {
|
|
3059
|
-
var
|
|
3060
|
-
return (
|
|
3084
|
+
var E;
|
|
3085
|
+
return (E = O.current) == null ? void 0 : E.click();
|
|
3061
3086
|
}
|
|
3062
3087
|
}
|
|
3063
3088
|
),
|
|
3064
|
-
|
|
3065
|
-
|
|
3089
|
+
g,
|
|
3090
|
+
w,
|
|
3066
3091
|
/* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__spacer" }),
|
|
3067
3092
|
o ? /* @__PURE__ */ e.jsx(
|
|
3068
3093
|
de,
|
|
3069
3094
|
{
|
|
3070
3095
|
variant: "primary",
|
|
3071
3096
|
size: "xs",
|
|
3072
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
3097
|
+
icon: /* @__PURE__ */ e.jsx($t, { size: q[2], strokeWidth: 1.5 }),
|
|
3073
3098
|
onClick: r,
|
|
3074
|
-
"aria-label":
|
|
3099
|
+
"aria-label": I.stop
|
|
3075
3100
|
}
|
|
3076
3101
|
) : /* @__PURE__ */ e.jsx(
|
|
3077
3102
|
de,
|
|
3078
3103
|
{
|
|
3079
3104
|
variant: "primary",
|
|
3080
3105
|
size: "xs",
|
|
3081
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
3106
|
+
icon: /* @__PURE__ */ e.jsx(Rt, { size: q[2], strokeWidth: 1.5 }),
|
|
3082
3107
|
onClick: n,
|
|
3083
|
-
disabled: !
|
|
3084
|
-
"aria-label":
|
|
3108
|
+
disabled: !ht,
|
|
3109
|
+
"aria-label": I.send
|
|
3085
3110
|
}
|
|
3086
3111
|
)
|
|
3087
3112
|
] })
|
|
@@ -3090,8 +3115,8 @@ function Ln({
|
|
|
3090
3115
|
)
|
|
3091
3116
|
] });
|
|
3092
3117
|
}
|
|
3093
|
-
const
|
|
3094
|
-
function
|
|
3118
|
+
const at = { fast: 0, standard: 1, premium: 2 }, ot = { fast: "data-5", standard: "data-3", premium: "data-6" };
|
|
3119
|
+
function zn({
|
|
3095
3120
|
models: t = [],
|
|
3096
3121
|
value: s,
|
|
3097
3122
|
onChange: n,
|
|
@@ -3102,35 +3127,35 @@ function Dn({
|
|
|
3102
3127
|
className: l = "",
|
|
3103
3128
|
...c
|
|
3104
3129
|
}) {
|
|
3105
|
-
const [u, d] =
|
|
3130
|
+
const [u, d] = L(!1), p = S(null), h = S(null), f = S(null), [v, N] = L({}), y = t.filter((k) => !a || k.name === "auto" ? !0 : (at[k.tier] ?? 1) >= (at[a] ?? 1)), j = y.find((k) => k.name === "auto"), T = y.filter((k) => k.name !== "auto"), g = t.find((k) => k.name === s), _ = new Set(T.map((k) => k.tier).filter(Boolean)).size > 1;
|
|
3106
3131
|
F(() => {
|
|
3107
3132
|
if (!u) return;
|
|
3108
|
-
const k = 320,
|
|
3133
|
+
const k = 320, P = () => {
|
|
3109
3134
|
var R;
|
|
3110
3135
|
const M = (R = h.current) == null ? void 0 : R.getBoundingClientRect();
|
|
3111
3136
|
if (!M) return;
|
|
3112
3137
|
const b = window.innerHeight - M.bottom, $ = b < k + 8 && M.top > b;
|
|
3113
|
-
|
|
3138
|
+
N({
|
|
3114
3139
|
position: "fixed",
|
|
3115
3140
|
zIndex: "var(--z-dropdown, 500)",
|
|
3116
3141
|
left: M.left,
|
|
3117
3142
|
...$ ? { bottom: window.innerHeight - M.top + 4, top: "auto" } : { top: M.bottom + 4, bottom: "auto" }
|
|
3118
3143
|
});
|
|
3119
3144
|
};
|
|
3120
|
-
|
|
3121
|
-
const
|
|
3145
|
+
P(), window.addEventListener("scroll", P, !0), window.addEventListener("resize", P);
|
|
3146
|
+
const H = (M) => {
|
|
3122
3147
|
var b, $;
|
|
3123
3148
|
!((b = p.current) != null && b.contains(M.target)) && !(($ = f.current) != null && $.contains(M.target)) && d(!1);
|
|
3124
3149
|
}, W = (M) => {
|
|
3125
3150
|
M.key === "Escape" && d(!1);
|
|
3126
3151
|
};
|
|
3127
|
-
return document.addEventListener("mousedown",
|
|
3128
|
-
window.removeEventListener("scroll",
|
|
3152
|
+
return document.addEventListener("mousedown", H), document.addEventListener("keydown", W), () => {
|
|
3153
|
+
window.removeEventListener("scroll", P, !0), window.removeEventListener("resize", P), document.removeEventListener("mousedown", H), document.removeEventListener("keydown", W);
|
|
3129
3154
|
};
|
|
3130
3155
|
}, [u]);
|
|
3131
|
-
const
|
|
3156
|
+
const A = (k) => {
|
|
3132
3157
|
n == null || n(k), d(!1);
|
|
3133
|
-
},
|
|
3158
|
+
}, I = (k) => /* @__PURE__ */ e.jsxs(
|
|
3134
3159
|
"button",
|
|
3135
3160
|
{
|
|
3136
3161
|
type: "button",
|
|
@@ -3138,22 +3163,22 @@ function Dn({
|
|
|
3138
3163
|
"ds-model-picker__item",
|
|
3139
3164
|
k.name === s && "ds-model-picker__item--active"
|
|
3140
3165
|
].filter(Boolean).join(" "),
|
|
3141
|
-
onClick: () =>
|
|
3166
|
+
onClick: () => A(k.name),
|
|
3142
3167
|
children: [
|
|
3143
|
-
k.icon ? /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__item-icon", children: k.icon }) : /* @__PURE__ */ e.jsx(
|
|
3168
|
+
k.icon ? /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__item-icon", children: k.icon }) : /* @__PURE__ */ e.jsx(Ke, { size: 12, strokeWidth: 1.5, className: "ds-model-picker__item-icon" }),
|
|
3144
3169
|
/* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__item-name", children: k.displayName || k.name }),
|
|
3145
|
-
_ && k.tier && /* @__PURE__ */ e.jsx(he, { size: "xs", variant:
|
|
3170
|
+
_ && k.tier && /* @__PURE__ */ e.jsx(he, { size: "xs", variant: ot[k.tier] || "default", children: k.tier })
|
|
3146
3171
|
]
|
|
3147
3172
|
},
|
|
3148
3173
|
k.name
|
|
3149
|
-
),
|
|
3150
|
-
const
|
|
3151
|
-
return
|
|
3174
|
+
), D = () => !i || !_ ? T.map(I) : ["fast", "standard", "premium"].flatMap((k) => {
|
|
3175
|
+
const P = T.filter((H) => H.tier === k);
|
|
3176
|
+
return P.length ? [
|
|
3152
3177
|
/* @__PURE__ */ e.jsx("div", { className: "ds-model-picker__group-label", "data-tier": k, children: k.charAt(0).toUpperCase() + k.slice(1) }, `lbl-${k}`),
|
|
3153
|
-
...
|
|
3178
|
+
...P.map(I)
|
|
3154
3179
|
] : [];
|
|
3155
3180
|
}), O = u && /* @__PURE__ */ e.jsxs("div", { ref: f, className: "ds-model-picker__menu ds-scrollable", "data-ds-portal": "", style: v, children: [
|
|
3156
|
-
o &&
|
|
3181
|
+
o && j && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
3157
3182
|
/* @__PURE__ */ e.jsxs(
|
|
3158
3183
|
"button",
|
|
3159
3184
|
{
|
|
@@ -3163,16 +3188,16 @@ function Dn({
|
|
|
3163
3188
|
"ds-model-picker__item--auto",
|
|
3164
3189
|
s === "auto" && "ds-model-picker__item--active"
|
|
3165
3190
|
].filter(Boolean).join(" "),
|
|
3166
|
-
onClick: () =>
|
|
3191
|
+
onClick: () => A("auto"),
|
|
3167
3192
|
children: [
|
|
3168
|
-
/* @__PURE__ */ e.jsx(
|
|
3193
|
+
/* @__PURE__ */ e.jsx(St, { size: 12, strokeWidth: 1.5, className: "ds-model-picker__item-icon" }),
|
|
3169
3194
|
/* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__item-name", children: "Auto (smart routing)" })
|
|
3170
3195
|
]
|
|
3171
3196
|
}
|
|
3172
3197
|
),
|
|
3173
|
-
|
|
3198
|
+
T.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-model-picker__separator" })
|
|
3174
3199
|
] }),
|
|
3175
|
-
|
|
3200
|
+
D()
|
|
3176
3201
|
] });
|
|
3177
3202
|
return /* @__PURE__ */ e.jsxs(
|
|
3178
3203
|
"div",
|
|
@@ -3191,9 +3216,9 @@ function Dn({
|
|
|
3191
3216
|
"aria-haspopup": "listbox",
|
|
3192
3217
|
"aria-expanded": u,
|
|
3193
3218
|
children: [
|
|
3194
|
-
|
|
3195
|
-
/* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__trigger-name", children: (
|
|
3196
|
-
_ && (
|
|
3219
|
+
g != null && g.icon ? /* @__PURE__ */ e.jsx("span", { children: g.icon }) : /* @__PURE__ */ e.jsx(Ke, { size: 12, strokeWidth: 1.5 }),
|
|
3220
|
+
/* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__trigger-name", children: (g == null ? void 0 : g.displayName) || (g == null ? void 0 : g.name) || s }),
|
|
3221
|
+
_ && (g == null ? void 0 : g.tier) && /* @__PURE__ */ e.jsx(he, { size: "xs", variant: ot[g.tier] || "default", children: g.tier })
|
|
3197
3222
|
]
|
|
3198
3223
|
}
|
|
3199
3224
|
),
|
|
@@ -3202,82 +3227,82 @@ function Dn({
|
|
|
3202
3227
|
}
|
|
3203
3228
|
);
|
|
3204
3229
|
}
|
|
3205
|
-
const
|
|
3230
|
+
const us = ({ filename: t, pagesLabel: s }) => /* @__PURE__ */ e.jsxs("span", { style: { display: "flex", alignItems: "center", gap: "var(--space-2)", minWidth: 0 }, children: [
|
|
3206
3231
|
/* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__filename", children: t }),
|
|
3207
3232
|
s && /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__pages", children: s })
|
|
3208
3233
|
] });
|
|
3209
|
-
function
|
|
3234
|
+
function fs(t) {
|
|
3210
3235
|
const s = /* @__PURE__ */ new Map();
|
|
3211
3236
|
for (const n of t)
|
|
3212
3237
|
s.has(n.filename) || s.set(n.filename, { filename: n.filename, url: n.url, items: [] }), s.get(n.filename).items.push(n);
|
|
3213
3238
|
return [...s.values()];
|
|
3214
3239
|
}
|
|
3215
|
-
function
|
|
3240
|
+
function Fn({
|
|
3216
3241
|
sources: t = [],
|
|
3217
3242
|
layout: s = "list",
|
|
3218
3243
|
title: n,
|
|
3219
3244
|
maxVisible: r = 5,
|
|
3220
3245
|
onSourceClick: a
|
|
3221
3246
|
}) {
|
|
3222
|
-
const o = K(), { t: i } = be(), l = n ?? o.sources, [c, u] =
|
|
3223
|
-
return s === "compact" ? /* @__PURE__ */ e.jsxs("div", { className:
|
|
3224
|
-
h.map((
|
|
3225
|
-
const
|
|
3247
|
+
const o = K(), { t: i } = be(), l = n ?? o.sources, [c, u] = L(!1), d = fs(t), p = d.length > r, h = c ? d : d.slice(0, r), f = t.some((j) => j.snippet), v = (j) => j != null && j.length ? i("pageAbbrev", { pages: j.join(", ") }) : null, N = i("moreSources", { n: d.length - r }), y = ["ds-sources-panel", s === "compact" && "ds-sources-panel--compact"].filter(Boolean).join(" ");
|
|
3248
|
+
return s === "compact" ? /* @__PURE__ */ e.jsxs("div", { className: y, children: [
|
|
3249
|
+
h.map((j) => {
|
|
3250
|
+
const T = j.items.map((_) => _.page).filter(Boolean), g = v(T), w = !!a;
|
|
3226
3251
|
return /* @__PURE__ */ e.jsxs(
|
|
3227
3252
|
"div",
|
|
3228
3253
|
{
|
|
3229
|
-
className: `ds-sources-panel__compact-row${
|
|
3230
|
-
onClick:
|
|
3254
|
+
className: `ds-sources-panel__compact-row${w ? " ds-sources-panel__compact-row--clickable" : ""}`,
|
|
3255
|
+
onClick: w ? () => a(j.items[0]) : void 0,
|
|
3231
3256
|
children: [
|
|
3232
|
-
/* @__PURE__ */ e.jsx(
|
|
3233
|
-
/* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__filename", children:
|
|
3234
|
-
|
|
3257
|
+
/* @__PURE__ */ e.jsx(At, { size: q[1], strokeWidth: 1.5, className: "ds-sources-panel__compact-icon" }),
|
|
3258
|
+
/* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__filename", children: j.filename }),
|
|
3259
|
+
g && /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__pages", children: g })
|
|
3235
3260
|
]
|
|
3236
3261
|
},
|
|
3237
|
-
|
|
3262
|
+
j.filename
|
|
3238
3263
|
);
|
|
3239
3264
|
}),
|
|
3240
|
-
p && !c && /* @__PURE__ */ e.jsx("button", { className: "ds-sources-panel__more", onClick: () => u(!0), children:
|
|
3241
|
-
] }) : /* @__PURE__ */ e.jsxs("div", { className:
|
|
3265
|
+
p && !c && /* @__PURE__ */ e.jsx("button", { className: "ds-sources-panel__more", onClick: () => u(!0), children: N })
|
|
3266
|
+
] }) : /* @__PURE__ */ e.jsxs("div", { className: y, children: [
|
|
3242
3267
|
l && /* @__PURE__ */ e.jsx("div", { className: "ds-sources-panel__title", children: l }),
|
|
3243
|
-
h.map((
|
|
3244
|
-
const
|
|
3268
|
+
h.map((j) => {
|
|
3269
|
+
const T = j.items.map((_) => _.page).filter(Boolean), g = v(T), w = !!a;
|
|
3245
3270
|
return f ? /* @__PURE__ */ e.jsx(
|
|
3246
|
-
|
|
3271
|
+
He,
|
|
3247
3272
|
{
|
|
3248
|
-
title: /* @__PURE__ */ e.jsx(
|
|
3273
|
+
title: /* @__PURE__ */ e.jsx(us, { filename: j.filename, pagesLabel: g }),
|
|
3249
3274
|
padding: "s",
|
|
3250
|
-
children:
|
|
3275
|
+
children: j.items.map((_, A) => /* @__PURE__ */ e.jsx(
|
|
3251
3276
|
"div",
|
|
3252
3277
|
{
|
|
3253
|
-
className: `ds-sources-panel__snippet${
|
|
3254
|
-
onClick:
|
|
3278
|
+
className: `ds-sources-panel__snippet${w ? " ds-sources-panel__snippet--clickable" : ""}`,
|
|
3279
|
+
onClick: w ? () => a(_) : void 0,
|
|
3255
3280
|
children: _.snippet ?? i("pageAbbrev", { pages: _.page })
|
|
3256
3281
|
},
|
|
3257
|
-
|
|
3282
|
+
A
|
|
3258
3283
|
))
|
|
3259
3284
|
},
|
|
3260
|
-
|
|
3285
|
+
j.filename
|
|
3261
3286
|
) : /* @__PURE__ */ e.jsxs(
|
|
3262
3287
|
"div",
|
|
3263
3288
|
{
|
|
3264
|
-
className: `ds-sources-panel__row${
|
|
3265
|
-
onClick:
|
|
3289
|
+
className: `ds-sources-panel__row${w ? " ds-sources-panel__row--clickable" : ""}`,
|
|
3290
|
+
onClick: w ? () => a(j.items[0]) : void 0,
|
|
3266
3291
|
children: [
|
|
3267
|
-
/* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__filename", children:
|
|
3268
|
-
|
|
3292
|
+
/* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__filename", children: j.filename }),
|
|
3293
|
+
g && /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__pages", children: g })
|
|
3269
3294
|
]
|
|
3270
3295
|
},
|
|
3271
|
-
|
|
3296
|
+
j.filename
|
|
3272
3297
|
);
|
|
3273
3298
|
}),
|
|
3274
|
-
p && !c && /* @__PURE__ */ e.jsx("button", { className: "ds-sources-panel__more", onClick: () => u(!0), children:
|
|
3299
|
+
p && !c && /* @__PURE__ */ e.jsx("button", { className: "ds-sources-panel__more", onClick: () => u(!0), children: N })
|
|
3275
3300
|
] });
|
|
3276
3301
|
}
|
|
3277
|
-
function
|
|
3302
|
+
function it(t) {
|
|
3278
3303
|
return t >= 1e6 ? (t / 1e6).toFixed(1).replace(/\.0$/, "") + "M" : t >= 1e3 ? (t / 1e3).toFixed(1).replace(/\.0$/, "") + "K" : String(t);
|
|
3279
3304
|
}
|
|
3280
|
-
function
|
|
3305
|
+
function Wn({
|
|
3281
3306
|
used: t,
|
|
3282
3307
|
limit: s,
|
|
3283
3308
|
size: n = "s",
|
|
@@ -3304,9 +3329,9 @@ function Mn({
|
|
|
3304
3329
|
) }),
|
|
3305
3330
|
(r || a) && /* @__PURE__ */ e.jsxs("div", { className: `ds-token-counter__label ds-token-counter__label--${u}`, children: [
|
|
3306
3331
|
r && /* @__PURE__ */ e.jsxs("span", { children: [
|
|
3307
|
-
|
|
3332
|
+
it(t),
|
|
3308
3333
|
" / ",
|
|
3309
|
-
|
|
3334
|
+
it(s)
|
|
3310
3335
|
] }),
|
|
3311
3336
|
a && /* @__PURE__ */ e.jsxs("span", { style: { marginLeft: "auto" }, children: [
|
|
3312
3337
|
Math.round(l * 100),
|
|
@@ -3317,24 +3342,24 @@ function Mn({
|
|
|
3317
3342
|
}
|
|
3318
3343
|
);
|
|
3319
3344
|
}
|
|
3320
|
-
const
|
|
3321
|
-
function
|
|
3345
|
+
const lt = 5;
|
|
3346
|
+
function ms(t) {
|
|
3322
3347
|
return t < 0.34 ? "low" : t < 0.67 ? "medium" : "high";
|
|
3323
3348
|
}
|
|
3324
|
-
function
|
|
3349
|
+
function On({
|
|
3325
3350
|
value: t = 0,
|
|
3326
3351
|
size: s = "xs",
|
|
3327
3352
|
showLabel: n = "none",
|
|
3328
3353
|
layout: r = "inline"
|
|
3329
3354
|
}) {
|
|
3330
|
-
const a = Math.max(0, Math.min(1, t)), o = Math.round(a *
|
|
3355
|
+
const a = Math.max(0, Math.min(1, t)), o = Math.round(a * lt), i = ms(a);
|
|
3331
3356
|
return /* @__PURE__ */ e.jsxs("div", { className: [
|
|
3332
3357
|
"ds-confidence-bar",
|
|
3333
3358
|
`ds-confidence-bar--${s}`,
|
|
3334
3359
|
`ds-confidence-bar--${i}`,
|
|
3335
3360
|
r === "block" && "ds-confidence-bar--block"
|
|
3336
3361
|
].filter(Boolean).join(" "), children: [
|
|
3337
|
-
/* @__PURE__ */ e.jsx("div", { className: "ds-confidence-bar__segments", "aria-hidden": "true", children: Array.from({ length:
|
|
3362
|
+
/* @__PURE__ */ e.jsx("div", { className: "ds-confidence-bar__segments", "aria-hidden": "true", children: Array.from({ length: lt }, (l, c) => /* @__PURE__ */ e.jsx(
|
|
3338
3363
|
"div",
|
|
3339
3364
|
{
|
|
3340
3365
|
className: `ds-confidence-bar__seg${c < o ? " ds-confidence-bar__seg--filled" : ""}`
|
|
@@ -3344,15 +3369,15 @@ function zn({
|
|
|
3344
3369
|
n === "text" && /* @__PURE__ */ e.jsx("span", { className: "ds-confidence-bar__label", children: i })
|
|
3345
3370
|
] });
|
|
3346
3371
|
}
|
|
3347
|
-
const
|
|
3372
|
+
const ps = { add: "+", remove: "-", context: " " };
|
|
3348
3373
|
function Ae({ line: t, lineNumbers: s }) {
|
|
3349
3374
|
return /* @__PURE__ */ e.jsxs("div", { className: `ds-diff-view__line ds-diff-view__line--${t.type}`, children: [
|
|
3350
3375
|
s && t.lineNo != null && /* @__PURE__ */ e.jsx("span", { className: "ds-diff-view__lineno", children: t.lineNo }),
|
|
3351
|
-
/* @__PURE__ */ e.jsx("span", { className: "ds-diff-view__prefix", children:
|
|
3376
|
+
/* @__PURE__ */ e.jsx("span", { className: "ds-diff-view__prefix", children: ps[t.type] }),
|
|
3352
3377
|
/* @__PURE__ */ e.jsx("span", { className: "ds-diff-view__text", children: t.text })
|
|
3353
3378
|
] });
|
|
3354
3379
|
}
|
|
3355
|
-
function
|
|
3380
|
+
function Cn({
|
|
3356
3381
|
lines: t = [],
|
|
3357
3382
|
layout: s = "inline",
|
|
3358
3383
|
wordWrap: n = !1,
|
|
@@ -3380,7 +3405,7 @@ function Fn({
|
|
|
3380
3405
|
/* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__body ds-scrollable", style: l, children: t.map((c, u) => /* @__PURE__ */ e.jsx(Ae, { line: c, lineNumbers: r }, u)) })
|
|
3381
3406
|
] });
|
|
3382
3407
|
}
|
|
3383
|
-
function
|
|
3408
|
+
function hs({
|
|
3384
3409
|
value: t = "idle",
|
|
3385
3410
|
onLike: s,
|
|
3386
3411
|
onDislike: n,
|
|
@@ -3412,7 +3437,7 @@ function fs({
|
|
|
3412
3437
|
"aria-label": a ?? l.like,
|
|
3413
3438
|
"aria-pressed": t === "liked",
|
|
3414
3439
|
children: /* @__PURE__ */ e.jsx(
|
|
3415
|
-
|
|
3440
|
+
Bt,
|
|
3416
3441
|
{
|
|
3417
3442
|
size: q[1],
|
|
3418
3443
|
strokeWidth: 1.5,
|
|
@@ -3433,7 +3458,7 @@ function fs({
|
|
|
3433
3458
|
"aria-label": o ?? l.dislike,
|
|
3434
3459
|
"aria-pressed": t === "disliked",
|
|
3435
3460
|
children: /* @__PURE__ */ e.jsx(
|
|
3436
|
-
|
|
3461
|
+
It,
|
|
3437
3462
|
{
|
|
3438
3463
|
size: q[1],
|
|
3439
3464
|
strokeWidth: 1.5,
|
|
@@ -3446,7 +3471,7 @@ function fs({
|
|
|
3446
3471
|
}
|
|
3447
3472
|
);
|
|
3448
3473
|
}
|
|
3449
|
-
function
|
|
3474
|
+
function xs(t) {
|
|
3450
3475
|
const s = t instanceof Date ? t : new Date(t);
|
|
3451
3476
|
if (isNaN(s)) return null;
|
|
3452
3477
|
const n = /* @__PURE__ */ new Date(), r = s.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit", hour12: !1 }), a = new Date(n.getFullYear(), n.getMonth(), n.getDate()), o = new Date(a - 864e5);
|
|
@@ -3455,7 +3480,7 @@ function ms(t) {
|
|
|
3455
3480
|
const i = s.getDate(), l = s.toLocaleString([], { month: "short" });
|
|
3456
3481
|
return `${i} ${l} ${r}`;
|
|
3457
3482
|
}
|
|
3458
|
-
function
|
|
3483
|
+
function Un({
|
|
3459
3484
|
role: t = "assistant",
|
|
3460
3485
|
text: s,
|
|
3461
3486
|
timestamp: n,
|
|
@@ -3465,7 +3490,7 @@ function Wn({
|
|
|
3465
3490
|
className: i = "",
|
|
3466
3491
|
...l
|
|
3467
3492
|
}) {
|
|
3468
|
-
const c = t === "assistant" && (a || o), u = !!s, d = n ?
|
|
3493
|
+
const c = t === "assistant" && (a || o), u = !!s, d = n ? xs(n) : null;
|
|
3469
3494
|
return !c && !u && !d ? null : /* @__PURE__ */ e.jsxs(
|
|
3470
3495
|
"div",
|
|
3471
3496
|
{
|
|
@@ -3473,20 +3498,20 @@ function Wn({
|
|
|
3473
3498
|
...l,
|
|
3474
3499
|
children: [
|
|
3475
3500
|
t === "user" && d && /* @__PURE__ */ e.jsx("span", { className: "ds-message-footer__timestamp ds-message-action", children: d }),
|
|
3476
|
-
c && /* @__PURE__ */ e.jsx(
|
|
3477
|
-
u && /* @__PURE__ */ e.jsx(
|
|
3501
|
+
c && /* @__PURE__ */ e.jsx(hs, { className: "ds-message-action", value: r, onLike: a, onDislike: o }),
|
|
3502
|
+
u && /* @__PURE__ */ e.jsx(ls, { className: "ds-message-action", text: s }),
|
|
3478
3503
|
t === "assistant" && d && /* @__PURE__ */ e.jsx("span", { className: "ds-message-footer__timestamp ds-message-action", children: d })
|
|
3479
3504
|
]
|
|
3480
3505
|
}
|
|
3481
3506
|
);
|
|
3482
3507
|
}
|
|
3483
|
-
function
|
|
3508
|
+
function Hn({ label: t, className: s = "", ...n }) {
|
|
3484
3509
|
return /* @__PURE__ */ e.jsxs("span", { className: ["ds-thinking-dot", s].filter(Boolean).join(" "), ...n, children: [
|
|
3485
3510
|
/* @__PURE__ */ e.jsx("span", { className: "ds-thinking-dot__pulse" }),
|
|
3486
3511
|
t && /* @__PURE__ */ e.jsx("span", { className: "ds-thinking-dot__label", children: t })
|
|
3487
3512
|
] });
|
|
3488
3513
|
}
|
|
3489
|
-
function
|
|
3514
|
+
function Vn({ variant: t = "light", glow: s, mask: n = !0, style: r, ...a }) {
|
|
3490
3515
|
const o = t === "dark", i = s ?? o, l = o ? "rgba(255,250,250,0.05)" : "var(--color-border-light)", c = o ? "rgba(255,250,250,0.025)" : "color-mix(in srgb, var(--color-border-light) 50%, transparent)";
|
|
3491
3516
|
return /* @__PURE__ */ e.jsx(
|
|
3492
3517
|
"div",
|
|
@@ -3527,7 +3552,7 @@ function Cn({ variant: t = "light", glow: s, mask: n = !0, style: r, ...a }) {
|
|
|
3527
3552
|
}
|
|
3528
3553
|
);
|
|
3529
3554
|
}
|
|
3530
|
-
function
|
|
3555
|
+
function Yn({ children: t, axis: s = "y", style: n, className: r = "", ...a }) {
|
|
3531
3556
|
const o = s === "x" ? { overflowX: "auto", overflowY: "hidden" } : s === "both" ? { overflow: "auto" } : { overflowY: "auto", overflowX: "hidden" };
|
|
3532
3557
|
return /* @__PURE__ */ e.jsx(
|
|
3533
3558
|
"div",
|
|
@@ -3539,11 +3564,11 @@ function Un({ children: t, axis: s = "y", style: n, className: r = "", ...a }) {
|
|
|
3539
3564
|
}
|
|
3540
3565
|
);
|
|
3541
3566
|
}
|
|
3542
|
-
const Be = 280,
|
|
3543
|
-
function
|
|
3567
|
+
const Be = 280, vs = 22, bs = 14, ue = 8, Te = 6, _s = 200;
|
|
3568
|
+
function js(t) {
|
|
3544
3569
|
return t ? typeof t == "function" ? t() : typeof t == "string" ? document.querySelector(t) : null : null;
|
|
3545
3570
|
}
|
|
3546
|
-
function
|
|
3571
|
+
function Ns(t, s, n, r) {
|
|
3547
3572
|
const a = window.innerWidth, o = window.innerHeight;
|
|
3548
3573
|
if (o - t.bottom >= s + r + ue) return "bottom";
|
|
3549
3574
|
if (t.top >= s + r + ue) return "top";
|
|
@@ -3552,7 +3577,7 @@ function bs(t, s, n, r) {
|
|
|
3552
3577
|
const i = Math.max(t.top, o - t.bottom, a - t.right, t.left);
|
|
3553
3578
|
return i === o - t.bottom ? "bottom" : i === t.top ? "top" : i === a - t.right ? "right" : "left";
|
|
3554
3579
|
}
|
|
3555
|
-
function
|
|
3580
|
+
function ws(t, s, n, r, a) {
|
|
3556
3581
|
const o = window.innerWidth, i = window.innerHeight;
|
|
3557
3582
|
let l, c;
|
|
3558
3583
|
switch (t) {
|
|
@@ -3571,7 +3596,7 @@ function _s(t, s, n, r, a) {
|
|
|
3571
3596
|
const u = Math.max(ue, Math.min(o - r - ue, c)), d = Math.max(ue, Math.min(i - n - ue, l));
|
|
3572
3597
|
return { top: d, left: u, arrowOffset: c - u, arrowOffsetY: l - d };
|
|
3573
3598
|
}
|
|
3574
|
-
function
|
|
3599
|
+
function qn({
|
|
3575
3600
|
steps: t,
|
|
3576
3601
|
currentStep: s,
|
|
3577
3602
|
onNext: n,
|
|
@@ -3587,15 +3612,15 @@ function Hn({
|
|
|
3587
3612
|
statePrimary: h = "idle",
|
|
3588
3613
|
stateBack: f = "idle"
|
|
3589
3614
|
}) {
|
|
3590
|
-
const v = K(), { t:
|
|
3591
|
-
_.current = t,
|
|
3592
|
-
const [
|
|
3593
|
-
const Y = _.current[
|
|
3594
|
-
if (!Y || !
|
|
3595
|
-
const m =
|
|
3615
|
+
const v = K(), { t: N } = be(), y = c ?? v.next, j = u ?? v.back, T = d ?? v.skipTour, g = p ?? v.done, w = S(null), _ = S(t), A = S(s), I = S(l);
|
|
3616
|
+
_.current = t, A.current = s, I.current = l;
|
|
3617
|
+
const [D, O] = L(!1), [k, P] = L({ position: "fixed", visibility: "hidden", width: Be }), [H, W] = L("bottom"), [M, b] = L(null), $ = S(!1), R = t[s], V = s === t.length - 1, U = se(() => {
|
|
3618
|
+
const Y = _.current[A.current];
|
|
3619
|
+
if (!Y || !w.current) return;
|
|
3620
|
+
const m = js(Y.target);
|
|
3596
3621
|
if (!m) return;
|
|
3597
|
-
const x = m.getBoundingClientRect(),
|
|
3598
|
-
W(G),
|
|
3622
|
+
const x = m.getBoundingClientRect(), C = w.current.getBoundingClientRect().height || 160, te = Be, le = I.current ? vs : bs, G = Y.position || Ns(x, C, te, le), { top: Z, left: fe, arrowOffset: je, arrowOffsetY: Se } = ws(G, x, C, te, le);
|
|
3623
|
+
W(G), P({
|
|
3599
3624
|
position: "fixed",
|
|
3600
3625
|
top: Z,
|
|
3601
3626
|
left: fe,
|
|
@@ -3611,42 +3636,42 @@ function Hn({
|
|
|
3611
3636
|
});
|
|
3612
3637
|
}, []);
|
|
3613
3638
|
return F(() => {
|
|
3614
|
-
window.addEventListener("scroll",
|
|
3639
|
+
window.addEventListener("scroll", U, !0), window.addEventListener("resize", U);
|
|
3615
3640
|
const Y = requestAnimationFrame(() => {
|
|
3616
|
-
|
|
3641
|
+
U(), O(!0), $.current = !0;
|
|
3617
3642
|
});
|
|
3618
3643
|
return () => {
|
|
3619
|
-
cancelAnimationFrame(Y), window.removeEventListener("scroll",
|
|
3644
|
+
cancelAnimationFrame(Y), window.removeEventListener("scroll", U, !0), window.removeEventListener("resize", U);
|
|
3620
3645
|
};
|
|
3621
3646
|
}, []), F(() => {
|
|
3622
3647
|
if (!$.current) return;
|
|
3623
3648
|
O(!1);
|
|
3624
3649
|
const Y = setTimeout(() => {
|
|
3625
|
-
|
|
3626
|
-
|
|
3650
|
+
P((m) => ({ ...m, visibility: "hidden" })), requestAnimationFrame(() => {
|
|
3651
|
+
U(), O(!0);
|
|
3627
3652
|
});
|
|
3628
|
-
},
|
|
3653
|
+
}, _s + 20);
|
|
3629
3654
|
return () => clearTimeout(Y);
|
|
3630
3655
|
}, [s]), F(() => {
|
|
3631
|
-
|
|
3632
|
-
}, [
|
|
3656
|
+
D && w.current && w.current.focus({ preventScroll: !0 });
|
|
3657
|
+
}, [D]), F(() => {
|
|
3633
3658
|
const Y = (m) => {
|
|
3634
3659
|
m.key === "Escape" && a();
|
|
3635
3660
|
};
|
|
3636
3661
|
return document.addEventListener("keydown", Y), () => document.removeEventListener("keydown", Y);
|
|
3637
3662
|
}, [a]), F(() => {
|
|
3638
|
-
if (!
|
|
3663
|
+
if (!D) return;
|
|
3639
3664
|
const Y = (m) => {
|
|
3640
|
-
if (m.key !== "Tab" || !
|
|
3665
|
+
if (m.key !== "Tab" || !w.current) return;
|
|
3641
3666
|
const x = Array.from(
|
|
3642
|
-
|
|
3667
|
+
w.current.querySelectorAll('button:not([disabled]), [href], [tabindex]:not([tabindex="-1"])')
|
|
3643
3668
|
);
|
|
3644
3669
|
if (!x.length) return;
|
|
3645
|
-
const B = x[0],
|
|
3646
|
-
m.shiftKey && document.activeElement === B ? (m.preventDefault(),
|
|
3670
|
+
const B = x[0], C = x[x.length - 1];
|
|
3671
|
+
m.shiftKey && document.activeElement === B ? (m.preventDefault(), C.focus()) : !m.shiftKey && document.activeElement === C && (m.preventDefault(), B.focus());
|
|
3647
3672
|
};
|
|
3648
3673
|
return document.addEventListener("keydown", Y), () => document.removeEventListener("keydown", Y);
|
|
3649
|
-
}, [
|
|
3674
|
+
}, [D]), !R || typeof document > "u" ? null : re.createPortal(
|
|
3650
3675
|
/* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
3651
3676
|
M && /* @__PURE__ */ e.jsx(
|
|
3652
3677
|
"div",
|
|
@@ -3655,7 +3680,7 @@ function Hn({
|
|
|
3655
3680
|
"ds-coachmark__spotlight",
|
|
3656
3681
|
i && "ds-coachmark__spotlight--overlay",
|
|
3657
3682
|
!l && "ds-coachmark__spotlight--no-ring",
|
|
3658
|
-
|
|
3683
|
+
D && "ds-coachmark__spotlight--visible"
|
|
3659
3684
|
].filter(Boolean).join(" "),
|
|
3660
3685
|
style: M,
|
|
3661
3686
|
"aria-hidden": "true"
|
|
@@ -3664,16 +3689,16 @@ function Hn({
|
|
|
3664
3689
|
/* @__PURE__ */ e.jsxs(
|
|
3665
3690
|
"div",
|
|
3666
3691
|
{
|
|
3667
|
-
ref:
|
|
3692
|
+
ref: w,
|
|
3668
3693
|
"data-ds-portal": "",
|
|
3669
3694
|
role: "dialog",
|
|
3670
3695
|
"aria-modal": "false",
|
|
3671
3696
|
"aria-live": "polite",
|
|
3672
|
-
"aria-label": R.title ??
|
|
3697
|
+
"aria-label": R.title ?? N("stepOf", { current: s + 1, total: t.length }),
|
|
3673
3698
|
className: [
|
|
3674
3699
|
"ds-coachmark__bubble",
|
|
3675
|
-
`ds-coachmark__bubble--${
|
|
3676
|
-
|
|
3700
|
+
`ds-coachmark__bubble--${H}`,
|
|
3701
|
+
D && "ds-coachmark__bubble--visible"
|
|
3677
3702
|
].filter(Boolean).join(" "),
|
|
3678
3703
|
style: k,
|
|
3679
3704
|
tabIndex: -1,
|
|
@@ -3684,7 +3709,7 @@ function Hn({
|
|
|
3684
3709
|
type: "button",
|
|
3685
3710
|
className: "ds-coachmark__close",
|
|
3686
3711
|
onClick: a,
|
|
3687
|
-
"aria-label":
|
|
3712
|
+
"aria-label": T,
|
|
3688
3713
|
children: /* @__PURE__ */ e.jsx(ee, { size: 16, strokeWidth: 2 })
|
|
3689
3714
|
}
|
|
3690
3715
|
),
|
|
@@ -3697,8 +3722,8 @@ function Hn({
|
|
|
3697
3722
|
t.length
|
|
3698
3723
|
] }),
|
|
3699
3724
|
/* @__PURE__ */ e.jsxs("div", { className: "ds-coachmark__footer-nav", children: [
|
|
3700
|
-
s > 0 && /* @__PURE__ */ e.jsx(de, { variant: "secondary", size: "s", state: f, onClick: r, children:
|
|
3701
|
-
/* @__PURE__ */ e.jsx(de, { variant: "primary", size: "s", state: h, onClick: V ? o : n, children: V ?
|
|
3725
|
+
s > 0 && /* @__PURE__ */ e.jsx(de, { variant: "secondary", size: "s", state: f, onClick: r, children: j }),
|
|
3726
|
+
/* @__PURE__ */ e.jsx(de, { variant: "primary", size: "s", state: h, onClick: V ? o : n, children: V ? g : y })
|
|
3702
3727
|
] })
|
|
3703
3728
|
] })
|
|
3704
3729
|
]
|
|
@@ -3708,8 +3733,8 @@ function Hn({
|
|
|
3708
3733
|
document.body
|
|
3709
3734
|
);
|
|
3710
3735
|
}
|
|
3711
|
-
function
|
|
3712
|
-
const { storageKey: n } = s, [r, a] =
|
|
3736
|
+
function Gn(t, s = {}) {
|
|
3737
|
+
const { storageKey: n } = s, [r, a] = L(0), [o, i] = L(!1), l = () => n && typeof localStorage < "u" && localStorage.getItem(n) === "done", c = se(() => {
|
|
3713
3738
|
i(!1), n && typeof localStorage < "u" && localStorage.setItem(n, "done");
|
|
3714
3739
|
}, [n]);
|
|
3715
3740
|
return {
|
|
@@ -3724,8 +3749,8 @@ function Vn(t, s = {}) {
|
|
|
3724
3749
|
finish: c
|
|
3725
3750
|
};
|
|
3726
3751
|
}
|
|
3727
|
-
function
|
|
3728
|
-
const t =
|
|
3752
|
+
function Kn() {
|
|
3753
|
+
const t = S(null), s = se(() => {
|
|
3729
3754
|
const n = t.current;
|
|
3730
3755
|
if (!n) return;
|
|
3731
3756
|
n.classList.remove("ds-shake"), n.offsetWidth, n.classList.add("ds-shake");
|
|
@@ -3737,103 +3762,103 @@ function Yn() {
|
|
|
3737
3762
|
return { ref: t, shake: s };
|
|
3738
3763
|
}
|
|
3739
3764
|
export {
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3765
|
+
He as Accordion,
|
|
3766
|
+
Ms as Alert,
|
|
3767
|
+
Tn as AnimatedNumber,
|
|
3768
|
+
Qs as Avatar,
|
|
3744
3769
|
he as Badge,
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3770
|
+
yn as Banner,
|
|
3771
|
+
Fs as BottomSheet,
|
|
3772
|
+
un as Breadcrumb,
|
|
3773
|
+
Hs as BrowserPane,
|
|
3774
|
+
Vs as BrowserTabs,
|
|
3750
3775
|
de as Button,
|
|
3751
|
-
|
|
3752
|
-
|
|
3753
|
-
|
|
3754
|
-
|
|
3755
|
-
|
|
3756
|
-
|
|
3757
|
-
|
|
3758
|
-
|
|
3759
|
-
|
|
3760
|
-
|
|
3761
|
-
|
|
3762
|
-
|
|
3763
|
-
|
|
3764
|
-
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
|
-
|
|
3768
|
-
|
|
3769
|
-
|
|
3770
|
-
|
|
3771
|
-
|
|
3772
|
-
|
|
3773
|
-
|
|
3774
|
-
|
|
3775
|
-
|
|
3776
|
-
|
|
3777
|
-
|
|
3776
|
+
As as Card,
|
|
3777
|
+
Dn as ChatMessage,
|
|
3778
|
+
Js as Checkbox,
|
|
3779
|
+
qn as Coachmark,
|
|
3780
|
+
Ws as Code,
|
|
3781
|
+
Ut as CodeAccordion,
|
|
3782
|
+
On as ConfidenceBar,
|
|
3783
|
+
ls as CopyButton,
|
|
3784
|
+
Cn as DiffView,
|
|
3785
|
+
kn as Dropdown,
|
|
3786
|
+
ln as EmptyState,
|
|
3787
|
+
Vn as EngineerGrid,
|
|
3788
|
+
cn as FormField,
|
|
3789
|
+
Bs as H1,
|
|
3790
|
+
Is as H2,
|
|
3791
|
+
Ls as H3,
|
|
3792
|
+
Ds as H4,
|
|
3793
|
+
$n as InView,
|
|
3794
|
+
Ts as Input,
|
|
3795
|
+
Os as Link,
|
|
3796
|
+
Ys as List,
|
|
3797
|
+
qs as ListRow,
|
|
3798
|
+
Es as LocaleProvider,
|
|
3799
|
+
Ks as Mention,
|
|
3800
|
+
hs as MessageFeedback,
|
|
3801
|
+
Un as MessageFooter,
|
|
3802
|
+
zs as Modal,
|
|
3778
3803
|
xe as ModalFooter,
|
|
3779
|
-
|
|
3780
|
-
|
|
3781
|
-
|
|
3782
|
-
|
|
3783
|
-
|
|
3784
|
-
|
|
3785
|
-
|
|
3786
|
-
|
|
3787
|
-
|
|
3788
|
-
|
|
3789
|
-
|
|
3790
|
-
|
|
3791
|
-
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
|
|
3796
|
-
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
|
|
3801
|
-
|
|
3802
|
-
|
|
3803
|
-
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
|
|
3807
|
-
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
|
-
|
|
3811
|
-
|
|
3812
|
-
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
|
|
3820
|
-
|
|
3821
|
-
|
|
3822
|
-
|
|
3823
|
-
|
|
3824
|
-
|
|
3825
|
-
|
|
3826
|
-
|
|
3804
|
+
zn as ModelPicker,
|
|
3805
|
+
pn as NavRail,
|
|
3806
|
+
wn as NavRailAgent,
|
|
3807
|
+
xn as NavRailBody,
|
|
3808
|
+
Nn as NavRailCustomItem,
|
|
3809
|
+
_n as NavRailDivider,
|
|
3810
|
+
gn as NavRailFlyout,
|
|
3811
|
+
bn as NavRailFooter,
|
|
3812
|
+
vn as NavRailHeader,
|
|
3813
|
+
hn as NavRailItem,
|
|
3814
|
+
jn as NavRailRecents,
|
|
3815
|
+
Ps as P1,
|
|
3816
|
+
zt as P2,
|
|
3817
|
+
ft as P3,
|
|
3818
|
+
fn as Pagination,
|
|
3819
|
+
En as ProgressBar,
|
|
3820
|
+
Mn as PromptInput,
|
|
3821
|
+
Zs as Radio,
|
|
3822
|
+
Bn as ReasoningBlock,
|
|
3823
|
+
Yn as Scrollable,
|
|
3824
|
+
Gs as SegmentedControl,
|
|
3825
|
+
Rs as Select,
|
|
3826
|
+
mn as SidePage,
|
|
3827
|
+
et as SidePageFooter,
|
|
3828
|
+
qt as Skeleton,
|
|
3829
|
+
Fn as SourcesPanel,
|
|
3830
|
+
Pt as Spinner,
|
|
3831
|
+
dn as Stat,
|
|
3832
|
+
In as StepIndicator,
|
|
3833
|
+
Ss as Stepper,
|
|
3834
|
+
Ln as StreamingText,
|
|
3835
|
+
Us as Tab,
|
|
3836
|
+
en as Table,
|
|
3837
|
+
sn as TableBody,
|
|
3838
|
+
tn as TableHead,
|
|
3839
|
+
nn as TableRow,
|
|
3840
|
+
rn as TableSubheaderRow,
|
|
3841
|
+
Cs as Tabs,
|
|
3842
|
+
on as Td,
|
|
3843
|
+
$s as Textarea,
|
|
3844
|
+
an as Th,
|
|
3845
|
+
Hn as ThinkingDot,
|
|
3846
|
+
Sn as ToastContainer,
|
|
3847
|
+
Xs as Toggle,
|
|
3848
|
+
Wn as TokenCounter,
|
|
3849
|
+
An as ToolCallBubble,
|
|
3850
|
+
An as ToolCallCard,
|
|
3851
|
+
Ve as Tooltip,
|
|
3827
3852
|
$e as defaultStrings,
|
|
3828
|
-
|
|
3853
|
+
ut as formatString,
|
|
3829
3854
|
q as iconSizes,
|
|
3830
|
-
|
|
3831
|
-
|
|
3832
|
-
|
|
3833
|
-
|
|
3855
|
+
ss as useAnimatedNumber,
|
|
3856
|
+
cs as useAnimatedPlaceholder,
|
|
3857
|
+
Gn as useCoachmark,
|
|
3858
|
+
ns as useInView,
|
|
3834
3859
|
be as useLocale,
|
|
3835
|
-
|
|
3836
|
-
|
|
3860
|
+
Kn as useShake,
|
|
3861
|
+
Pn as useStreamScroll,
|
|
3837
3862
|
K as useStrings,
|
|
3838
|
-
|
|
3863
|
+
Rn as useToast
|
|
3839
3864
|
};
|