@donkit-ai/design-system 1.4.87 → 1.4.88
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 +794 -772
- 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,68 @@ 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
|
+
ref: d,
|
|
941
|
+
role: "dialog",
|
|
942
|
+
"aria-modal": "true",
|
|
943
|
+
"aria-labelledby": s ? p : void 0,
|
|
944
|
+
children: [
|
|
945
|
+
n && /* @__PURE__ */ e.jsx(
|
|
946
|
+
de,
|
|
947
|
+
{
|
|
948
|
+
className: "ds-modal__close",
|
|
949
|
+
variant: "ghost",
|
|
950
|
+
size: "small",
|
|
951
|
+
icon: /* @__PURE__ */ e.jsx(ee, { size: q[2], strokeWidth: 1.5 }),
|
|
952
|
+
onClick: v,
|
|
953
|
+
"aria-label": i ?? c.closeModal
|
|
954
|
+
}
|
|
955
|
+
),
|
|
956
|
+
(s || o) && /* @__PURE__ */ e.jsxs("div", { className: "ds-modal__header", children: [
|
|
957
|
+
s && /* @__PURE__ */ e.jsx("h3", { id: p, className: "ds-modal__title", children: s }),
|
|
958
|
+
o && /* @__PURE__ */ e.jsx("div", { className: "ds-modal__subheader", children: o })
|
|
959
|
+
] }),
|
|
960
|
+
/* @__PURE__ */ e.jsx("div", { className: "ds-modal__body ds-scrollable", children: j }),
|
|
961
|
+
y
|
|
962
|
+
]
|
|
963
|
+
}
|
|
964
|
+
)
|
|
945
965
|
}
|
|
946
|
-
)
|
|
947
|
-
return typeof document > "u" ?
|
|
966
|
+
);
|
|
967
|
+
return typeof document > "u" ? T : re.createPortal(T, document.body);
|
|
948
968
|
}
|
|
949
969
|
function xe({ children: t }) {
|
|
950
970
|
return !t || X.Children.count(t) === 0 ? null : /* @__PURE__ */ e.jsx("div", { className: "ds-modal__footer", children: t });
|
|
951
971
|
}
|
|
952
|
-
const
|
|
953
|
-
function
|
|
972
|
+
const Ct = 320;
|
|
973
|
+
function Fs({
|
|
954
974
|
children: t,
|
|
955
975
|
title: s,
|
|
956
976
|
onClose: n,
|
|
@@ -958,36 +978,38 @@ function Ps({
|
|
|
958
978
|
closeLabel: a,
|
|
959
979
|
...o
|
|
960
980
|
}) {
|
|
961
|
-
const i = K(), l =
|
|
962
|
-
!n ||
|
|
963
|
-
|
|
964
|
-
},
|
|
981
|
+
const i = K(), l = S(null), c = S(null), u = X.useId(), [d, p] = L(!1), h = () => {
|
|
982
|
+
!n || d || (p(!0), setTimeout(() => {
|
|
983
|
+
p(!1), n();
|
|
984
|
+
}, Ct));
|
|
965
985
|
};
|
|
966
986
|
F(() => {
|
|
967
|
-
const
|
|
968
|
-
|
|
969
|
-
},
|
|
970
|
-
var
|
|
971
|
-
const
|
|
972
|
-
|
|
987
|
+
const j = (g) => {
|
|
988
|
+
g.key === "Escape" && h();
|
|
989
|
+
}, T = (g) => {
|
|
990
|
+
var _;
|
|
991
|
+
const w = Ce(g);
|
|
992
|
+
w && ((_ = c.current) != null && _.contains(w) || Ue(w, l.current) || h());
|
|
973
993
|
};
|
|
974
|
-
return document.addEventListener("keydown",
|
|
975
|
-
document.removeEventListener("keydown",
|
|
994
|
+
return document.addEventListener("keydown", j), document.addEventListener("mousedown", T), () => {
|
|
995
|
+
document.removeEventListener("keydown", j), document.removeEventListener("mousedown", T);
|
|
976
996
|
};
|
|
977
|
-
}, [n,
|
|
978
|
-
const
|
|
997
|
+
}, [n, d]);
|
|
998
|
+
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
999
|
"div",
|
|
980
1000
|
{
|
|
981
|
-
className: ["ds-bottom-sheet-overlay",
|
|
1001
|
+
className: ["ds-bottom-sheet-overlay", d && "ds-bottom-sheet-overlay--closing"].filter(Boolean).join(" "),
|
|
982
1002
|
...o,
|
|
1003
|
+
ref: l,
|
|
1004
|
+
"data-ds-portal": "",
|
|
983
1005
|
children: /* @__PURE__ */ e.jsxs(
|
|
984
1006
|
"div",
|
|
985
1007
|
{
|
|
986
|
-
ref:
|
|
987
|
-
className: ["ds-bottom-sheet",
|
|
1008
|
+
ref: c,
|
|
1009
|
+
className: ["ds-bottom-sheet", d && "ds-bottom-sheet--closing"].filter(Boolean).join(" "),
|
|
988
1010
|
role: "dialog",
|
|
989
1011
|
"aria-modal": "true",
|
|
990
|
-
"aria-labelledby": s ?
|
|
1012
|
+
"aria-labelledby": s ? u : void 0,
|
|
991
1013
|
children: [
|
|
992
1014
|
/* @__PURE__ */ e.jsx("div", { className: "ds-bottom-sheet__handle", "aria-hidden": "true" }),
|
|
993
1015
|
n && /* @__PURE__ */ e.jsx(
|
|
@@ -997,24 +1019,24 @@ function Ps({
|
|
|
997
1019
|
variant: "ghost",
|
|
998
1020
|
size: "small",
|
|
999
1021
|
icon: /* @__PURE__ */ e.jsx(ee, { size: q[2], strokeWidth: 1.5 }),
|
|
1000
|
-
onClick:
|
|
1022
|
+
onClick: h,
|
|
1001
1023
|
"aria-label": a ?? i.close
|
|
1002
1024
|
}
|
|
1003
1025
|
),
|
|
1004
1026
|
(s || r) && /* @__PURE__ */ e.jsxs("div", { className: "ds-bottom-sheet__header", children: [
|
|
1005
|
-
s && /* @__PURE__ */ e.jsx("h3", { id:
|
|
1027
|
+
s && /* @__PURE__ */ e.jsx("h3", { id: u, className: "ds-bottom-sheet__title", children: s }),
|
|
1006
1028
|
r && /* @__PURE__ */ e.jsx("div", { className: "ds-bottom-sheet__subheader", children: r })
|
|
1007
1029
|
] }),
|
|
1008
|
-
/* @__PURE__ */ e.jsx("div", { className: "ds-bottom-sheet__body ds-scrollable", children:
|
|
1009
|
-
|
|
1030
|
+
/* @__PURE__ */ e.jsx("div", { className: "ds-bottom-sheet__body ds-scrollable", children: N }),
|
|
1031
|
+
v
|
|
1010
1032
|
]
|
|
1011
1033
|
}
|
|
1012
1034
|
)
|
|
1013
1035
|
}
|
|
1014
1036
|
);
|
|
1015
|
-
return typeof document > "u" ?
|
|
1037
|
+
return typeof document > "u" ? y : re.createPortal(y, document.body);
|
|
1016
1038
|
}
|
|
1017
|
-
function
|
|
1039
|
+
function Ut({
|
|
1018
1040
|
children: t,
|
|
1019
1041
|
title: s,
|
|
1020
1042
|
defaultExpanded: n = !1,
|
|
@@ -1024,15 +1046,15 @@ function Wt({
|
|
|
1024
1046
|
className: i = "",
|
|
1025
1047
|
...l
|
|
1026
1048
|
}) {
|
|
1027
|
-
const c = K(), u = s ?? c.code, [d, p] =
|
|
1028
|
-
h ? a == null || a(!r) : p((
|
|
1029
|
-
},
|
|
1049
|
+
const c = K(), u = s ?? c.code, [d, p] = L(n), h = r !== void 0, f = h ? r : d, v = () => {
|
|
1050
|
+
h ? a == null || a(!r) : p((y) => !y);
|
|
1051
|
+
}, N = [
|
|
1030
1052
|
"ds-code-accordion",
|
|
1031
1053
|
`ds-code-accordion--${o}`,
|
|
1032
1054
|
f && "ds-code-accordion--expanded",
|
|
1033
1055
|
i
|
|
1034
1056
|
].filter(Boolean).join(" ");
|
|
1035
|
-
return /* @__PURE__ */ e.jsxs("div", { className:
|
|
1057
|
+
return /* @__PURE__ */ e.jsxs("div", { className: N, ...l, children: [
|
|
1036
1058
|
/* @__PURE__ */ e.jsxs(
|
|
1037
1059
|
"button",
|
|
1038
1060
|
{
|
|
@@ -1056,11 +1078,11 @@ function Wt({
|
|
|
1056
1078
|
/* @__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
1079
|
] });
|
|
1058
1080
|
}
|
|
1059
|
-
function
|
|
1081
|
+
function Ws({ children: t, block: s = !1, collapsible: n = !1, title: r, defaultExpanded: a = !1, ...o }) {
|
|
1060
1082
|
const i = K(), l = r ?? i.code;
|
|
1061
|
-
return s ? n ? /* @__PURE__ */ e.jsx(
|
|
1083
|
+
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
1084
|
}
|
|
1063
|
-
function
|
|
1085
|
+
function Os({ href: t, children: s, onClick: n, target: r, rel: a, ...o }) {
|
|
1064
1086
|
const l = r === "_blank" ? a ? `${a} noopener noreferrer` : "noopener noreferrer" : a;
|
|
1065
1087
|
return /* @__PURE__ */ e.jsx(
|
|
1066
1088
|
"a",
|
|
@@ -1075,10 +1097,10 @@ function zs({ href: t, children: s, onClick: n, target: r, rel: a, ...o }) {
|
|
|
1075
1097
|
}
|
|
1076
1098
|
);
|
|
1077
1099
|
}
|
|
1078
|
-
function
|
|
1100
|
+
function Cs({ children: t, size: s = "m", variant: n = "ghost", ...r }) {
|
|
1079
1101
|
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
1102
|
}
|
|
1081
|
-
function
|
|
1103
|
+
function Us({ children: t, selected: s = !1, onClick: n, size: r = "m", variant: a = "ghost", disabled: o = !1, icon: i, href: l, ...c }) {
|
|
1082
1104
|
const u = i && !t, d = [
|
|
1083
1105
|
"ds-tab",
|
|
1084
1106
|
`ds-tab--${r}`,
|
|
@@ -1124,10 +1146,10 @@ function Ws({ children: t, selected: s = !1, onClick: n, size: r = "m", variant:
|
|
|
1124
1146
|
}
|
|
1125
1147
|
);
|
|
1126
1148
|
}
|
|
1127
|
-
function
|
|
1149
|
+
function Hs({ children: t, className: s = "", ...n }) {
|
|
1128
1150
|
return /* @__PURE__ */ e.jsx("div", { className: ["ds-browser-pane", s].filter(Boolean).join(" "), ...n, children: t });
|
|
1129
1151
|
}
|
|
1130
|
-
function
|
|
1152
|
+
function Vs({ tabs: t, active: s, onChange: n, onClose: r, className: a = "", ...o }) {
|
|
1131
1153
|
const { t: i } = be();
|
|
1132
1154
|
return /* @__PURE__ */ e.jsx(
|
|
1133
1155
|
"div",
|
|
@@ -1181,10 +1203,10 @@ function Cs({ tabs: t, active: s, onChange: n, onClose: r, className: a = "", ..
|
|
|
1181
1203
|
}
|
|
1182
1204
|
);
|
|
1183
1205
|
}
|
|
1184
|
-
function
|
|
1206
|
+
function Ys({ children: t, className: s = "", ...n }) {
|
|
1185
1207
|
return /* @__PURE__ */ e.jsx("div", { className: ["ds-list", s].filter(Boolean).join(" "), role: "list", ...n, children: t });
|
|
1186
1208
|
}
|
|
1187
|
-
function
|
|
1209
|
+
function qs({
|
|
1188
1210
|
icon: t,
|
|
1189
1211
|
title: s,
|
|
1190
1212
|
subtitle: n,
|
|
@@ -1208,21 +1230,21 @@ function Hs({
|
|
|
1208
1230
|
] });
|
|
1209
1231
|
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
1232
|
}
|
|
1211
|
-
function
|
|
1212
|
-
const o =
|
|
1233
|
+
function Gs({ options: t, value: s, onChange: n, size: r = "m", disabled: a = !1 }) {
|
|
1234
|
+
const o = S(null), i = S(null), [l, c] = L(!1), u = S(!1), d = S(null), p = S(null), h = () => {
|
|
1213
1235
|
if (!o.current) return;
|
|
1214
1236
|
const f = o.current.querySelector(`[data-value="${s}"]`);
|
|
1215
1237
|
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 =
|
|
1238
|
+
const v = o.current.getBoundingClientRect(), N = f.getBoundingClientRect(), y = N.left - v.left, j = N.width;
|
|
1239
|
+
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
1240
|
if (!i.current || !o.current) return;
|
|
1219
|
-
const
|
|
1220
|
-
if (!
|
|
1221
|
-
const
|
|
1222
|
-
i.current.style.transition = "none", i.current.style.left =
|
|
1241
|
+
const T = o.current.querySelector(`[data-value="${s}"]`);
|
|
1242
|
+
if (!T) return;
|
|
1243
|
+
const g = o.current.getBoundingClientRect(), w = T.getBoundingClientRect();
|
|
1244
|
+
i.current.style.transition = "none", i.current.style.left = w.left - g.left + "px", i.current.style.width = w.width + "px";
|
|
1223
1245
|
}));
|
|
1224
1246
|
};
|
|
1225
|
-
return p.current = h,
|
|
1247
|
+
return p.current = h, ct(() => {
|
|
1226
1248
|
const f = d.current !== s;
|
|
1227
1249
|
d.current = s, u.current = l && f, h();
|
|
1228
1250
|
}), F(() => {
|
|
@@ -1270,7 +1292,7 @@ function Vs({ options: t, value: s, onChange: n, size: r = "m", disabled: a = !1
|
|
|
1270
1292
|
}
|
|
1271
1293
|
);
|
|
1272
1294
|
}
|
|
1273
|
-
function
|
|
1295
|
+
function He({
|
|
1274
1296
|
children: t,
|
|
1275
1297
|
title: s,
|
|
1276
1298
|
defaultExpanded: n = !1,
|
|
@@ -1279,7 +1301,7 @@ function Ce({
|
|
|
1279
1301
|
padding: o = "m",
|
|
1280
1302
|
...i
|
|
1281
1303
|
}) {
|
|
1282
|
-
const [l, c] =
|
|
1304
|
+
const [l, c] = L(n), u = r !== void 0, d = u ? r : l, p = () => {
|
|
1283
1305
|
u ? a == null || a(!r) : c((f) => !f);
|
|
1284
1306
|
}, h = [
|
|
1285
1307
|
"ds-accordion",
|
|
@@ -1311,7 +1333,7 @@ function Ce({
|
|
|
1311
1333
|
] });
|
|
1312
1334
|
}
|
|
1313
1335
|
const ce = 8, pe = 8;
|
|
1314
|
-
function
|
|
1336
|
+
function Ht(t, s, n) {
|
|
1315
1337
|
const r = window.innerWidth;
|
|
1316
1338
|
let a, o;
|
|
1317
1339
|
switch (t) {
|
|
@@ -1333,7 +1355,7 @@ function Ot(t, s, n) {
|
|
|
1333
1355
|
const i = Math.max(pe, Math.min(r - n.width - pe, o)), l = o - i;
|
|
1334
1356
|
return { top: a, left: i, arrowOffset: l };
|
|
1335
1357
|
}
|
|
1336
|
-
function
|
|
1358
|
+
function Vt(t, s, n) {
|
|
1337
1359
|
const r = window.innerWidth, a = window.innerHeight;
|
|
1338
1360
|
if (t.top >= s + ce + pe) return "top";
|
|
1339
1361
|
if (a - t.bottom >= s + ce + pe) return "bottom";
|
|
@@ -1342,31 +1364,31 @@ function Ct(t, s, n) {
|
|
|
1342
1364
|
const o = Math.max(t.top, a - t.bottom, t.left, r - t.right);
|
|
1343
1365
|
return o === t.top ? "top" : o === a - t.bottom ? "bottom" : o === r - t.right ? "right" : "left";
|
|
1344
1366
|
}
|
|
1345
|
-
function
|
|
1346
|
-
const [a, o] =
|
|
1367
|
+
function Ve({ children: t, content: s, position: n, ...r }) {
|
|
1368
|
+
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
1369
|
if (!d.current || !p.current) return;
|
|
1348
|
-
const
|
|
1349
|
-
u(
|
|
1370
|
+
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);
|
|
1371
|
+
u(j), l({
|
|
1350
1372
|
position: "fixed",
|
|
1351
|
-
top:
|
|
1352
|
-
left:
|
|
1373
|
+
top: T,
|
|
1374
|
+
left: g,
|
|
1353
1375
|
visibility: "visible",
|
|
1354
|
-
"--arrow-offset": `${
|
|
1376
|
+
"--arrow-offset": `${w}px`
|
|
1355
1377
|
});
|
|
1356
1378
|
};
|
|
1357
1379
|
if (F(() => {
|
|
1358
1380
|
if (!a) return;
|
|
1359
1381
|
l({ position: "fixed", visibility: "hidden" });
|
|
1360
|
-
const
|
|
1382
|
+
const N = requestAnimationFrame(f);
|
|
1361
1383
|
return window.addEventListener("scroll", f, !0), window.addEventListener("resize", f), () => {
|
|
1362
|
-
cancelAnimationFrame(
|
|
1384
|
+
cancelAnimationFrame(N), window.removeEventListener("scroll", f, !0), window.removeEventListener("resize", f);
|
|
1363
1385
|
};
|
|
1364
1386
|
}, [a, n]), F(() => {
|
|
1365
1387
|
if (!a) return;
|
|
1366
|
-
const
|
|
1367
|
-
d.current && !d.current.contains(
|
|
1388
|
+
const N = (y) => {
|
|
1389
|
+
d.current && !d.current.contains(y.target) && o(!1);
|
|
1368
1390
|
};
|
|
1369
|
-
return document.addEventListener("touchstart",
|
|
1391
|
+
return document.addEventListener("touchstart", N), () => document.removeEventListener("touchstart", N);
|
|
1370
1392
|
}, [a]), !s) return t;
|
|
1371
1393
|
const v = a && /* @__PURE__ */ e.jsx(
|
|
1372
1394
|
"div",
|
|
@@ -1391,7 +1413,7 @@ function Ue({ children: t, content: s, position: n, ...r }) {
|
|
|
1391
1413
|
h.current || o(!1);
|
|
1392
1414
|
},
|
|
1393
1415
|
onTouchStart: () => {
|
|
1394
|
-
h.current = !0, o((
|
|
1416
|
+
h.current = !0, o((N) => !N);
|
|
1395
1417
|
},
|
|
1396
1418
|
...r,
|
|
1397
1419
|
children: [
|
|
@@ -1401,12 +1423,12 @@ function Ue({ children: t, content: s, position: n, ...r }) {
|
|
|
1401
1423
|
}
|
|
1402
1424
|
);
|
|
1403
1425
|
}
|
|
1404
|
-
const
|
|
1405
|
-
function
|
|
1426
|
+
const Ze = 8, Ee = 8, Yt = 140;
|
|
1427
|
+
function Qe(t) {
|
|
1406
1428
|
const s = String(t ?? "").replace(/^@/, "").trim();
|
|
1407
1429
|
return s ? `@${s}` : "";
|
|
1408
1430
|
}
|
|
1409
|
-
function
|
|
1431
|
+
function Ks({
|
|
1410
1432
|
label: t,
|
|
1411
1433
|
children: s,
|
|
1412
1434
|
mode: n = "click",
|
|
@@ -1419,59 +1441,59 @@ function Ys({
|
|
|
1419
1441
|
popoverClassName: u = "",
|
|
1420
1442
|
...d
|
|
1421
1443
|
}) {
|
|
1422
|
-
const p =
|
|
1444
|
+
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
1445
|
v.current != null && (window.clearTimeout(v.current), v.current = null);
|
|
1424
|
-
}, []),
|
|
1425
|
-
|
|
1426
|
-
}, [
|
|
1427
|
-
|
|
1428
|
-
}, [
|
|
1446
|
+
}, []), D = se(() => {
|
|
1447
|
+
I(), y(!0);
|
|
1448
|
+
}, [I]), O = se(() => {
|
|
1449
|
+
I(), v.current = window.setTimeout(() => y(!1), Yt);
|
|
1450
|
+
}, [I]), k = se(() => {
|
|
1429
1451
|
const W = h.current, M = f.current;
|
|
1430
1452
|
if (!W) return;
|
|
1431
1453
|
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
|
-
|
|
1454
|
+
let V = b.bottom + Ze;
|
|
1455
|
+
V + $ > window.innerHeight - Ee && (V = Math.max(Ee, b.top - $ - Ze));
|
|
1456
|
+
const U = Math.max(Ee, Math.min(b.left, window.innerWidth - R - Ee));
|
|
1457
|
+
T({ top: V, left: U });
|
|
1436
1458
|
}, []);
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
}, [
|
|
1440
|
-
if (!
|
|
1459
|
+
ct(() => {
|
|
1460
|
+
N && k();
|
|
1461
|
+
}, [N, k]), F(() => {
|
|
1462
|
+
if (!N) return;
|
|
1441
1463
|
const W = () => k(), M = ($) => {
|
|
1442
|
-
$.key === "Escape" &&
|
|
1464
|
+
$.key === "Escape" && y(!1);
|
|
1443
1465
|
}, b = ($) => {
|
|
1444
|
-
var V,
|
|
1466
|
+
var V, U;
|
|
1445
1467
|
if (n === "hover") return;
|
|
1446
1468
|
const R = $.target;
|
|
1447
|
-
(V = f.current) != null && V.contains(R) || (
|
|
1469
|
+
(V = f.current) != null && V.contains(R) || (U = h.current) != null && U.contains(R) || y(!1);
|
|
1448
1470
|
};
|
|
1449
1471
|
return window.addEventListener("scroll", W, !0), window.addEventListener("resize", W), document.addEventListener("keydown", M), document.addEventListener("mousedown", b), () => {
|
|
1450
1472
|
window.removeEventListener("scroll", W, !0), window.removeEventListener("resize", W), document.removeEventListener("keydown", M), document.removeEventListener("mousedown", b);
|
|
1451
1473
|
};
|
|
1452
|
-
}, [
|
|
1453
|
-
const
|
|
1474
|
+
}, [N, k, n]), F(() => () => I(), [I]);
|
|
1475
|
+
const P = n === "hover" ? { onMouseEnter: D, onMouseLeave: O } : {}, H = N ? re.createPortal(
|
|
1454
1476
|
/* @__PURE__ */ e.jsxs(
|
|
1455
1477
|
"div",
|
|
1456
1478
|
{
|
|
1457
1479
|
ref: f,
|
|
1458
1480
|
id: p,
|
|
1459
1481
|
role: "dialog",
|
|
1460
|
-
"aria-label":
|
|
1482
|
+
"aria-label": w || _ || "Mention",
|
|
1461
1483
|
"data-ds-portal": "",
|
|
1462
1484
|
className: ["ds-mention__popover", u].filter(Boolean).join(" "),
|
|
1463
|
-
style:
|
|
1464
|
-
...
|
|
1485
|
+
style: j ? { top: j.top, left: j.left } : { top: -9999, left: -9999, visibility: "hidden" },
|
|
1486
|
+
...P,
|
|
1465
1487
|
children: [
|
|
1466
|
-
(r ||
|
|
1488
|
+
(r || w || A) && /* @__PURE__ */ e.jsxs("div", { className: "ds-mention__head", children: [
|
|
1467
1489
|
r,
|
|
1468
|
-
(
|
|
1469
|
-
|
|
1470
|
-
|
|
1490
|
+
(w || A) && /* @__PURE__ */ e.jsxs("div", { className: "ds-mention__meta", children: [
|
|
1491
|
+
w ? /* @__PURE__ */ e.jsx("span", { className: "ds-mention__name", children: w }) : null,
|
|
1492
|
+
A ? /* @__PURE__ */ e.jsx("span", { className: "ds-mention__handle", children: A }) : null
|
|
1471
1493
|
] })
|
|
1472
1494
|
] }),
|
|
1473
1495
|
i ? /* @__PURE__ */ e.jsx("p", { className: "ds-mention__desc", children: i }) : null,
|
|
1474
|
-
l ? /* @__PURE__ */ e.jsx("div", { className: "ds-mention__actions", onClick: () =>
|
|
1496
|
+
l ? /* @__PURE__ */ e.jsx("div", { className: "ds-mention__actions", onClick: () => y(!1), children: l }) : null
|
|
1475
1497
|
]
|
|
1476
1498
|
}
|
|
1477
1499
|
),
|
|
@@ -1486,31 +1508,31 @@ function Ys({
|
|
|
1486
1508
|
type: "button",
|
|
1487
1509
|
className: [
|
|
1488
1510
|
"ds-mention",
|
|
1489
|
-
|
|
1511
|
+
g && "ds-mention--custom",
|
|
1490
1512
|
c
|
|
1491
1513
|
].filter(Boolean).join(" "),
|
|
1492
|
-
"aria-expanded":
|
|
1514
|
+
"aria-expanded": N,
|
|
1493
1515
|
"aria-haspopup": "dialog",
|
|
1494
|
-
"aria-label":
|
|
1495
|
-
"aria-controls":
|
|
1516
|
+
"aria-label": g && (_ || w) || void 0,
|
|
1517
|
+
"aria-controls": N ? p : void 0,
|
|
1496
1518
|
onClick: (W) => {
|
|
1497
1519
|
var M;
|
|
1498
1520
|
if ((M = d.onClick) == null || M.call(d, W), !W.defaultPrevented) {
|
|
1499
1521
|
if (W.preventDefault(), W.stopPropagation(), n === "hover") {
|
|
1500
|
-
|
|
1522
|
+
D();
|
|
1501
1523
|
return;
|
|
1502
1524
|
}
|
|
1503
|
-
|
|
1525
|
+
y((b) => !b);
|
|
1504
1526
|
}
|
|
1505
1527
|
},
|
|
1506
|
-
...
|
|
1507
|
-
children:
|
|
1528
|
+
...P,
|
|
1529
|
+
children: g ? s : _
|
|
1508
1530
|
}
|
|
1509
1531
|
),
|
|
1510
|
-
typeof document < "u" ?
|
|
1532
|
+
typeof document < "u" ? H : null
|
|
1511
1533
|
] });
|
|
1512
1534
|
}
|
|
1513
|
-
function
|
|
1535
|
+
function Xs({
|
|
1514
1536
|
checked: t = !1,
|
|
1515
1537
|
onChange: s,
|
|
1516
1538
|
size: n = "m",
|
|
@@ -1541,7 +1563,7 @@ function qs({
|
|
|
1541
1563
|
a && /* @__PURE__ */ e.jsx("span", { className: "ds-toggle__label", children: a })
|
|
1542
1564
|
] });
|
|
1543
1565
|
}
|
|
1544
|
-
function
|
|
1566
|
+
function Js({
|
|
1545
1567
|
checked: t = !1,
|
|
1546
1568
|
onChange: s,
|
|
1547
1569
|
size: n = "m",
|
|
@@ -1579,7 +1601,7 @@ function Gs({
|
|
|
1579
1601
|
a && /* @__PURE__ */ e.jsx("span", { className: "ds-checkbox__label", children: a })
|
|
1580
1602
|
] });
|
|
1581
1603
|
}
|
|
1582
|
-
function
|
|
1604
|
+
function Zs({
|
|
1583
1605
|
checked: t = !1,
|
|
1584
1606
|
onChange: s,
|
|
1585
1607
|
size: n = "m",
|
|
@@ -1614,7 +1636,7 @@ function Ks({
|
|
|
1614
1636
|
a && /* @__PURE__ */ e.jsx("span", { className: "ds-radio__label", children: a })
|
|
1615
1637
|
] });
|
|
1616
1638
|
}
|
|
1617
|
-
function
|
|
1639
|
+
function qt({ width: t, height: s, shape: n = "rect", aspectRatio: r, className: a = "", style: o = {}, ...i }) {
|
|
1618
1640
|
return /* @__PURE__ */ e.jsx(
|
|
1619
1641
|
"span",
|
|
1620
1642
|
{
|
|
@@ -1625,7 +1647,7 @@ function Ht({ width: t, height: s, shape: n = "rect", aspectRatio: r, className:
|
|
|
1625
1647
|
}
|
|
1626
1648
|
);
|
|
1627
1649
|
}
|
|
1628
|
-
function
|
|
1650
|
+
function Gt({ lines: t = 1, lastLineWidth: s = "70%", gap: n, className: r = "", style: a = {}, ...o }) {
|
|
1629
1651
|
return /* @__PURE__ */ e.jsx(
|
|
1630
1652
|
"span",
|
|
1631
1653
|
{
|
|
@@ -1644,20 +1666,20 @@ function Vt({ lines: t = 1, lastLineWidth: s = "70%", gap: n, className: r = "",
|
|
|
1644
1666
|
}
|
|
1645
1667
|
);
|
|
1646
1668
|
}
|
|
1647
|
-
|
|
1648
|
-
function
|
|
1669
|
+
qt.Text = Gt;
|
|
1670
|
+
function Kt(t) {
|
|
1649
1671
|
let s = 2166136261;
|
|
1650
1672
|
for (let n = 0; n < t.length; n++)
|
|
1651
1673
|
s ^= t.charCodeAt(n), s = Math.imul(s, 16777619) >>> 0;
|
|
1652
1674
|
return s % 360;
|
|
1653
1675
|
}
|
|
1654
|
-
function
|
|
1676
|
+
function Xt(t) {
|
|
1655
1677
|
if (!t) return "";
|
|
1656
1678
|
const s = t.trim().split(/\s+/);
|
|
1657
1679
|
return s.length >= 2 ? (s[0][0] + s[1][0]).toUpperCase() : t[0].toUpperCase();
|
|
1658
1680
|
}
|
|
1659
|
-
function
|
|
1660
|
-
const l =
|
|
1681
|
+
function Qs({ seed: t, icon: s, src: n, size: r = 32, className: a = "", style: o = {}, ...i }) {
|
|
1682
|
+
const l = Kt(t ?? ""), [c, u] = L(!1), d = s ?? /* @__PURE__ */ e.jsx("span", { className: "ds-avatar__initials", children: Xt(t) });
|
|
1661
1683
|
return /* @__PURE__ */ e.jsx(
|
|
1662
1684
|
"div",
|
|
1663
1685
|
{
|
|
@@ -1669,7 +1691,7 @@ function Xs({ seed: t, icon: s, src: n, size: r = 32, className: a = "", style:
|
|
|
1669
1691
|
}
|
|
1670
1692
|
);
|
|
1671
1693
|
}
|
|
1672
|
-
function
|
|
1694
|
+
function en({
|
|
1673
1695
|
children: t,
|
|
1674
1696
|
size: s = "compact",
|
|
1675
1697
|
stickyTop: n,
|
|
@@ -1699,13 +1721,13 @@ function Js({
|
|
|
1699
1721
|
}
|
|
1700
1722
|
);
|
|
1701
1723
|
}
|
|
1702
|
-
function
|
|
1724
|
+
function tn({ children: t, ...s }) {
|
|
1703
1725
|
return /* @__PURE__ */ e.jsx("thead", { ...s, children: t });
|
|
1704
1726
|
}
|
|
1705
|
-
function
|
|
1727
|
+
function sn({ children: t, ...s }) {
|
|
1706
1728
|
return /* @__PURE__ */ e.jsx("tbody", { ...s, children: t });
|
|
1707
1729
|
}
|
|
1708
|
-
function
|
|
1730
|
+
function nn({ children: t, interactive: s, selected: n, subheader: r, exiting: a, updated: o, className: i = "", onClick: l, ...c }) {
|
|
1709
1731
|
return /* @__PURE__ */ e.jsx(
|
|
1710
1732
|
"tr",
|
|
1711
1733
|
{
|
|
@@ -1724,11 +1746,11 @@ function en({ children: t, interactive: s, selected: n, subheader: r, exiting: a
|
|
|
1724
1746
|
}
|
|
1725
1747
|
);
|
|
1726
1748
|
}
|
|
1727
|
-
function
|
|
1749
|
+
function rn({ children: t, colSpan: s = 999, ...n }) {
|
|
1728
1750
|
return /* @__PURE__ */ e.jsx("tr", { className: "ds-table-row ds-table-row--subheader", ...n, children: /* @__PURE__ */ e.jsx("td", { colSpan: s, children: t }) });
|
|
1729
1751
|
}
|
|
1730
|
-
function
|
|
1731
|
-
const c = !!r || n !== void 0, u = n === "asc" ?
|
|
1752
|
+
function an({ children: t, align: s = "left", sortDir: n, onSort: r, width: a, className: o = "", style: i = {}, ...l }) {
|
|
1753
|
+
const c = !!r || n !== void 0, u = n === "asc" ? Nt : n === "desc" ? ye : wt;
|
|
1732
1754
|
return /* @__PURE__ */ e.jsx(
|
|
1733
1755
|
"th",
|
|
1734
1756
|
{
|
|
@@ -1749,7 +1771,7 @@ function sn({ children: t, align: s = "left", sortDir: n, onSort: r, width: a, c
|
|
|
1749
1771
|
}
|
|
1750
1772
|
);
|
|
1751
1773
|
}
|
|
1752
|
-
function
|
|
1774
|
+
function on({ children: t, align: s = "left", secondary: n, muted: r, truncate: a, nowrap: o, className: i = "", ...l }) {
|
|
1753
1775
|
return /* @__PURE__ */ e.jsx(
|
|
1754
1776
|
"td",
|
|
1755
1777
|
{
|
|
@@ -1767,7 +1789,7 @@ function nn({ children: t, align: s = "left", secondary: n, muted: r, truncate:
|
|
|
1767
1789
|
}
|
|
1768
1790
|
);
|
|
1769
1791
|
}
|
|
1770
|
-
function
|
|
1792
|
+
function ln({
|
|
1771
1793
|
icon: t,
|
|
1772
1794
|
title: s,
|
|
1773
1795
|
description: n,
|
|
@@ -1790,7 +1812,7 @@ function rn({
|
|
|
1790
1812
|
}
|
|
1791
1813
|
);
|
|
1792
1814
|
}
|
|
1793
|
-
function
|
|
1815
|
+
function cn({
|
|
1794
1816
|
label: t,
|
|
1795
1817
|
hint: s,
|
|
1796
1818
|
error: n,
|
|
@@ -1821,7 +1843,7 @@ function an({
|
|
|
1821
1843
|
}
|
|
1822
1844
|
);
|
|
1823
1845
|
}
|
|
1824
|
-
function
|
|
1846
|
+
function dn({ label: t, value: s, delta: n, size: r = "m", inline: a = !1, className: o = "", style: i, ...l }) {
|
|
1825
1847
|
const c = n != null && n.startsWith("+") ? "up" : n != null && n.startsWith("-") ? "down" : "neutral";
|
|
1826
1848
|
return /* @__PURE__ */ e.jsxs(
|
|
1827
1849
|
"div",
|
|
@@ -1842,7 +1864,7 @@ function on({ label: t, value: s, delta: n, size: r = "m", inline: a = !1, class
|
|
|
1842
1864
|
}
|
|
1843
1865
|
);
|
|
1844
1866
|
}
|
|
1845
|
-
function
|
|
1867
|
+
function un({
|
|
1846
1868
|
children: t,
|
|
1847
1869
|
separator: s = "/",
|
|
1848
1870
|
"aria-label": n,
|
|
@@ -1865,7 +1887,7 @@ function ln({
|
|
|
1865
1887
|
}
|
|
1866
1888
|
);
|
|
1867
1889
|
}
|
|
1868
|
-
function
|
|
1890
|
+
function fn({
|
|
1869
1891
|
page: t,
|
|
1870
1892
|
total: s,
|
|
1871
1893
|
onChange: n,
|
|
@@ -1877,7 +1899,7 @@ function cn({
|
|
|
1877
1899
|
style: c,
|
|
1878
1900
|
...u
|
|
1879
1901
|
}) {
|
|
1880
|
-
const d = K(), { t: p } = be(), h =
|
|
1902
|
+
const d = K(), { t: p } = be(), h = Jt(t, s, r);
|
|
1881
1903
|
return /* @__PURE__ */ e.jsxs(
|
|
1882
1904
|
"nav",
|
|
1883
1905
|
{
|
|
@@ -1893,7 +1915,7 @@ function cn({
|
|
|
1893
1915
|
onClick: () => n == null ? void 0 : n(t - 1),
|
|
1894
1916
|
disabled: t <= 1,
|
|
1895
1917
|
"aria-label": o ?? d.previousPage,
|
|
1896
|
-
children: /* @__PURE__ */ e.jsx(
|
|
1918
|
+
children: /* @__PURE__ */ e.jsx(gt, { size: 16 })
|
|
1897
1919
|
}
|
|
1898
1920
|
),
|
|
1899
1921
|
h.map(
|
|
@@ -1916,22 +1938,22 @@ function cn({
|
|
|
1916
1938
|
onClick: () => n == null ? void 0 : n(t + 1),
|
|
1917
1939
|
disabled: t >= s,
|
|
1918
1940
|
"aria-label": i ?? d.nextPage,
|
|
1919
|
-
children: /* @__PURE__ */ e.jsx(
|
|
1941
|
+
children: /* @__PURE__ */ e.jsx(yt, { size: 16 })
|
|
1920
1942
|
}
|
|
1921
1943
|
)
|
|
1922
1944
|
]
|
|
1923
1945
|
}
|
|
1924
1946
|
);
|
|
1925
1947
|
}
|
|
1926
|
-
function
|
|
1948
|
+
function Jt(t, s, n) {
|
|
1927
1949
|
if (s <= 7) return Array.from({ length: s }, (i, l) => l + 1);
|
|
1928
1950
|
const r = Math.max(2, t - n), a = Math.min(s - 1, t + n), o = [1];
|
|
1929
1951
|
r > 2 && o.push("…");
|
|
1930
1952
|
for (let i = r; i <= a; i++) o.push(i);
|
|
1931
1953
|
return a < s - 1 && o.push("…"), o.push(s), o;
|
|
1932
1954
|
}
|
|
1933
|
-
const
|
|
1934
|
-
function
|
|
1955
|
+
const Zt = 300;
|
|
1956
|
+
function mn({
|
|
1935
1957
|
children: t,
|
|
1936
1958
|
title: s,
|
|
1937
1959
|
onClose: n,
|
|
@@ -1944,24 +1966,24 @@ function dn({
|
|
|
1944
1966
|
closeLabel: u,
|
|
1945
1967
|
...d
|
|
1946
1968
|
}) {
|
|
1947
|
-
const p = K(), h =
|
|
1948
|
-
!n || v || (
|
|
1949
|
-
|
|
1950
|
-
},
|
|
1969
|
+
const p = K(), h = S(null), f = X.useId(), [v, N] = L(!1), y = () => {
|
|
1970
|
+
!n || v || (N(!0), setTimeout(() => {
|
|
1971
|
+
N(!1), n();
|
|
1972
|
+
}, Zt));
|
|
1951
1973
|
};
|
|
1952
1974
|
F(() => {
|
|
1953
|
-
const _ = (
|
|
1954
|
-
|
|
1955
|
-
},
|
|
1956
|
-
var O, k
|
|
1957
|
-
const
|
|
1958
|
-
|
|
1975
|
+
const _ = (I) => {
|
|
1976
|
+
I.key === "Escape" && y();
|
|
1977
|
+
}, A = (I) => {
|
|
1978
|
+
var O, k;
|
|
1979
|
+
const D = Ce(I);
|
|
1980
|
+
D && ((O = c == null ? void 0 : c.current) != null && O.contains(D) || (k = h.current) != null && k.contains(D) || Ue(D, null) || y());
|
|
1959
1981
|
};
|
|
1960
|
-
return document.addEventListener("keydown", _), document.addEventListener("mousedown",
|
|
1961
|
-
document.removeEventListener("keydown", _), document.removeEventListener("mousedown",
|
|
1982
|
+
return document.addEventListener("keydown", _), document.addEventListener("mousedown", A), () => {
|
|
1983
|
+
document.removeEventListener("keydown", _), document.removeEventListener("mousedown", A);
|
|
1962
1984
|
};
|
|
1963
1985
|
}, [n, v, c]);
|
|
1964
|
-
const
|
|
1986
|
+
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
1987
|
"div",
|
|
1966
1988
|
{
|
|
1967
1989
|
className: ["ds-side-page-overlay", v && "ds-side-page-overlay--closing"].filter(Boolean).join(" "),
|
|
@@ -1986,7 +2008,7 @@ function dn({
|
|
|
1986
2008
|
variant: "ghost",
|
|
1987
2009
|
size: "small",
|
|
1988
2010
|
icon: /* @__PURE__ */ e.jsx(ee, { size: q[2], strokeWidth: 1.5 }),
|
|
1989
|
-
onClick:
|
|
2011
|
+
onClick: y,
|
|
1990
2012
|
"aria-label": u ?? p.close
|
|
1991
2013
|
}
|
|
1992
2014
|
),
|
|
@@ -1994,19 +2016,19 @@ function dn({
|
|
|
1994
2016
|
s && /* @__PURE__ */ e.jsx("h3", { id: f, className: "ds-side-page__title", children: s }),
|
|
1995
2017
|
r && /* @__PURE__ */ e.jsx("div", { className: "ds-side-page__subheader", children: r })
|
|
1996
2018
|
] }),
|
|
1997
|
-
/* @__PURE__ */ e.jsx("div", { className: "ds-side-page__body ds-scrollable", children:
|
|
1998
|
-
|
|
2019
|
+
/* @__PURE__ */ e.jsx("div", { className: "ds-side-page__body ds-scrollable", children: g }),
|
|
2020
|
+
T
|
|
1999
2021
|
]
|
|
2000
2022
|
}
|
|
2001
2023
|
)
|
|
2002
2024
|
}
|
|
2003
2025
|
);
|
|
2004
|
-
return typeof document > "u" ?
|
|
2026
|
+
return typeof document > "u" ? w : re.createPortal(w, document.body);
|
|
2005
2027
|
}
|
|
2006
|
-
function
|
|
2028
|
+
function et({ children: t }) {
|
|
2007
2029
|
return !t || X.Children.count(t) === 0 ? null : /* @__PURE__ */ e.jsx("div", { className: "ds-side-page__footer", children: t });
|
|
2008
2030
|
}
|
|
2009
|
-
const _e = De({ collapsed: !1, side: "left" }), Re = De(!1),
|
|
2031
|
+
const _e = De({ collapsed: !1, side: "left" }), Re = De(!1), pn = dt(function({
|
|
2010
2032
|
children: s,
|
|
2011
2033
|
collapsed: n = !1,
|
|
2012
2034
|
side: r = "left",
|
|
@@ -2042,7 +2064,7 @@ const _e = De({ collapsed: !1, side: "left" }), Re = De(!1), un = lt(function({
|
|
|
2042
2064
|
}
|
|
2043
2065
|
) });
|
|
2044
2066
|
});
|
|
2045
|
-
function
|
|
2067
|
+
function hn({
|
|
2046
2068
|
icon: t,
|
|
2047
2069
|
label: s,
|
|
2048
2070
|
selected: n = !1,
|
|
@@ -2056,7 +2078,7 @@ function fn({
|
|
|
2056
2078
|
className: d = "",
|
|
2057
2079
|
...p
|
|
2058
2080
|
}) {
|
|
2059
|
-
const { collapsed: h, side: f } = ie(_e), v = ie(Re),
|
|
2081
|
+
const { collapsed: h, side: f } = ie(_e), v = ie(Re), j = {
|
|
2060
2082
|
className: [
|
|
2061
2083
|
"ds-nav-rail__item",
|
|
2062
2084
|
d
|
|
@@ -2073,10 +2095,10 @@ function fn({
|
|
|
2073
2095
|
"data-onboarding": u || void 0
|
|
2074
2096
|
},
|
|
2075
2097
|
...p
|
|
2076
|
-
},
|
|
2098
|
+
}, T = i != null, g = f === "left" ? "right" : "left", w = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
2077
2099
|
/* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__icon", "aria-hidden": "true", children: t }),
|
|
2078
2100
|
!h && /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__label", children: s }),
|
|
2079
|
-
!h &&
|
|
2101
|
+
!h && T && /* @__PURE__ */ e.jsx(
|
|
2080
2102
|
"span",
|
|
2081
2103
|
{
|
|
2082
2104
|
className: ["ds-nav-rail__count", i === 0 && "ds-nav-rail__count--zero"].filter(Boolean).join(" "),
|
|
@@ -2084,26 +2106,26 @@ function fn({
|
|
|
2084
2106
|
children: i
|
|
2085
2107
|
}
|
|
2086
2108
|
),
|
|
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(
|
|
2109
|
+
!h && l && (!T || i === 0) && /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__dot ds-nav-rail__dot--inline", "aria-hidden": "true" }),
|
|
2110
|
+
h && T && i !== 0 && /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__count-collapsed", "data-updated": l || void 0, children: i > 99 ? "99+" : i }),
|
|
2111
|
+
h && l && (!T || i === 0) && /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__dot", "aria-hidden": "true" })
|
|
2112
|
+
] }), _ = a ? /* @__PURE__ */ e.jsx("a", { href: r ? void 0 : a, ...j, children: w }) : /* @__PURE__ */ e.jsx("button", { type: "button", ...j, children: w });
|
|
2113
|
+
return h && !v ? /* @__PURE__ */ e.jsx(Ve, { content: s, position: g, children: _ }) : _;
|
|
2092
2114
|
}
|
|
2093
|
-
function
|
|
2115
|
+
function xn({ children: t, className: s = "", ...n }) {
|
|
2094
2116
|
return /* @__PURE__ */ e.jsx("div", { className: ["ds-nav-rail__body", "ds-scrollable", s].filter(Boolean).join(" "), ...n, children: t });
|
|
2095
2117
|
}
|
|
2096
|
-
function
|
|
2118
|
+
function vn({ children: t, className: s = "", ...n }) {
|
|
2097
2119
|
return /* @__PURE__ */ e.jsx("div", { className: ["ds-nav-rail__header", s].filter(Boolean).join(" "), ...n, children: t });
|
|
2098
2120
|
}
|
|
2099
|
-
function
|
|
2121
|
+
function bn({ children: t, className: s = "", ...n }) {
|
|
2100
2122
|
return /* @__PURE__ */ e.jsx("div", { className: ["ds-nav-rail__footer", s].filter(Boolean).join(" "), ...n, children: t });
|
|
2101
2123
|
}
|
|
2102
|
-
function
|
|
2124
|
+
function _n({ className: t = "", ...s }) {
|
|
2103
2125
|
return /* @__PURE__ */ e.jsx("hr", { className: ["ds-nav-rail__divider", t].filter(Boolean).join(" "), ...s });
|
|
2104
2126
|
}
|
|
2105
|
-
function
|
|
2106
|
-
const { collapsed: o } = ie(_e), i = K(), l = s ?? i.recents, [c, u] =
|
|
2127
|
+
function jn({ children: t, label: s, defaultOpen: n = !0, className: r = "", ...a }) {
|
|
2128
|
+
const { collapsed: o } = ie(_e), i = K(), l = s ?? i.recents, [c, u] = L(n);
|
|
2107
2129
|
return /* @__PURE__ */ e.jsxs("div", { className: ["ds-nav-rail__recents", r].filter(Boolean).join(" "), ...a, children: [
|
|
2108
2130
|
!o && /* @__PURE__ */ e.jsxs(
|
|
2109
2131
|
"button",
|
|
@@ -2121,7 +2143,7 @@ function vn({ children: t, label: s, defaultOpen: n = !0, className: r = "", ...
|
|
|
2121
2143
|
(c || o) && /* @__PURE__ */ e.jsx("div", { className: "ds-nav-rail__recents-body", children: t })
|
|
2122
2144
|
] });
|
|
2123
2145
|
}
|
|
2124
|
-
const
|
|
2146
|
+
const Nn = dt(function({
|
|
2125
2147
|
as: s = "button",
|
|
2126
2148
|
avatar: n,
|
|
2127
2149
|
label: r,
|
|
@@ -2146,9 +2168,9 @@ const bn = lt(function({
|
|
|
2146
2168
|
children: h
|
|
2147
2169
|
}
|
|
2148
2170
|
);
|
|
2149
|
-
return l && !u ? /* @__PURE__ */ e.jsx(
|
|
2171
|
+
return l && !u ? /* @__PURE__ */ e.jsx(Ve, { content: r, position: d, children: f }) : f;
|
|
2150
2172
|
});
|
|
2151
|
-
function
|
|
2173
|
+
function wn({ avatar: t, label: s, selected: n = !1, disabled: r = !1, href: a, onClick: o, className: i = "", ...l }) {
|
|
2152
2174
|
const { collapsed: c, side: u } = ie(_e), d = ie(Re), f = {
|
|
2153
2175
|
className: [
|
|
2154
2176
|
"ds-nav-rail__item",
|
|
@@ -2167,11 +2189,11 @@ function _n({ avatar: t, label: s, selected: n = !1, disabled: r = !1, href: a,
|
|
|
2167
2189
|
}, v = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
2168
2190
|
/* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__icon", "aria-hidden": "true", children: t }),
|
|
2169
2191
|
!c && /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__label", children: s })
|
|
2170
|
-
] }),
|
|
2171
|
-
return c && !d ? /* @__PURE__ */ e.jsx(
|
|
2192
|
+
] }), 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 });
|
|
2193
|
+
return c && !d ? /* @__PURE__ */ e.jsx(Ve, { content: s, position: N, children: y }) : y;
|
|
2172
2194
|
}
|
|
2173
|
-
const
|
|
2174
|
-
function
|
|
2195
|
+
const tt = 240, st = 6, nt = 8;
|
|
2196
|
+
function gn({
|
|
2175
2197
|
trigger: t,
|
|
2176
2198
|
title: s,
|
|
2177
2199
|
children: n,
|
|
@@ -2180,25 +2202,25 @@ function jn({
|
|
|
2180
2202
|
defaultOpen: o = !1,
|
|
2181
2203
|
closeLabel: i
|
|
2182
2204
|
}) {
|
|
2183
|
-
const l = K(), { side: c } = ie(_e), [u, d] =
|
|
2205
|
+
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
2206
|
p ? a == null || a(!0) : d(!0);
|
|
2185
|
-
}, [p, a]),
|
|
2207
|
+
}, [p, a]), w = se(() => {
|
|
2186
2208
|
p ? a == null || a(!1) : d(!1);
|
|
2187
|
-
}, [p, a]), _ = se(() => h ?
|
|
2209
|
+
}, [p, a]), _ = se(() => h ? w() : g(), [h, g, w]), A = se(() => {
|
|
2188
2210
|
var W;
|
|
2189
|
-
const
|
|
2190
|
-
if (!
|
|
2191
|
-
const O =
|
|
2192
|
-
|
|
2211
|
+
const D = N.current;
|
|
2212
|
+
if (!D) return;
|
|
2213
|
+
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));
|
|
2214
|
+
T(c === "right" ? {
|
|
2193
2215
|
position: "fixed",
|
|
2194
|
-
top:
|
|
2195
|
-
right: window.innerWidth - O.left +
|
|
2196
|
-
width:
|
|
2216
|
+
top: H,
|
|
2217
|
+
right: window.innerWidth - O.left + st,
|
|
2218
|
+
width: tt
|
|
2197
2219
|
} : {
|
|
2198
2220
|
position: "fixed",
|
|
2199
|
-
top:
|
|
2200
|
-
left: O.right +
|
|
2201
|
-
width:
|
|
2221
|
+
top: H,
|
|
2222
|
+
left: O.right + st,
|
|
2223
|
+
width: tt
|
|
2202
2224
|
});
|
|
2203
2225
|
}, [c]);
|
|
2204
2226
|
F(() => {
|
|
@@ -2206,31 +2228,31 @@ function jn({
|
|
|
2206
2228
|
v(!1);
|
|
2207
2229
|
return;
|
|
2208
2230
|
}
|
|
2209
|
-
return
|
|
2210
|
-
window.removeEventListener("scroll",
|
|
2231
|
+
return A(), requestAnimationFrame(() => v(!0)), window.addEventListener("scroll", A, !0), window.addEventListener("resize", A), () => {
|
|
2232
|
+
window.removeEventListener("scroll", A, !0), window.removeEventListener("resize", A);
|
|
2211
2233
|
};
|
|
2212
|
-
}, [h,
|
|
2234
|
+
}, [h, A]), F(() => {
|
|
2213
2235
|
if (!h) return;
|
|
2214
|
-
const
|
|
2215
|
-
var
|
|
2216
|
-
!((
|
|
2236
|
+
const D = (k) => {
|
|
2237
|
+
var P, H;
|
|
2238
|
+
!((P = y.current) != null && P.contains(k.target)) && !((H = N.current) != null && H.contains(k.target)) && w();
|
|
2217
2239
|
}, O = (k) => {
|
|
2218
|
-
k.key === "Escape" &&
|
|
2240
|
+
k.key === "Escape" && w();
|
|
2219
2241
|
};
|
|
2220
|
-
return document.addEventListener("mousedown",
|
|
2221
|
-
document.removeEventListener("mousedown",
|
|
2242
|
+
return document.addEventListener("mousedown", D), document.addEventListener("keydown", O), () => {
|
|
2243
|
+
document.removeEventListener("mousedown", D), document.removeEventListener("keydown", O);
|
|
2222
2244
|
};
|
|
2223
|
-
}, [h,
|
|
2224
|
-
const
|
|
2245
|
+
}, [h, w]);
|
|
2246
|
+
const I = h && /* @__PURE__ */ e.jsxs(
|
|
2225
2247
|
"div",
|
|
2226
2248
|
{
|
|
2227
|
-
ref:
|
|
2249
|
+
ref: y,
|
|
2228
2250
|
className: [
|
|
2229
2251
|
"ds-nav-rail-flyout",
|
|
2230
2252
|
`ds-nav-rail-flyout--${c}`,
|
|
2231
2253
|
f && "ds-nav-rail-flyout--visible"
|
|
2232
2254
|
].filter(Boolean).join(" "),
|
|
2233
|
-
style:
|
|
2255
|
+
style: j,
|
|
2234
2256
|
"data-ds-portal": "",
|
|
2235
2257
|
role: "dialog",
|
|
2236
2258
|
"aria-modal": "false",
|
|
@@ -2242,7 +2264,7 @@ function jn({
|
|
|
2242
2264
|
{
|
|
2243
2265
|
type: "button",
|
|
2244
2266
|
className: "ds-nav-rail-flyout__close",
|
|
2245
|
-
onClick:
|
|
2267
|
+
onClick: w,
|
|
2246
2268
|
"aria-label": i ?? l.close,
|
|
2247
2269
|
children: /* @__PURE__ */ e.jsx(ee, { size: 16, strokeWidth: 2 })
|
|
2248
2270
|
}
|
|
@@ -2253,17 +2275,17 @@ function jn({
|
|
|
2253
2275
|
}
|
|
2254
2276
|
);
|
|
2255
2277
|
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(
|
|
2278
|
+
/* @__PURE__ */ e.jsx(Re.Provider, { value: h, children: /* @__PURE__ */ e.jsx("div", { ref: N, onClick: _, style: { display: "flex", flexDirection: "column", width: "100%" }, children: t }) }),
|
|
2279
|
+
typeof document < "u" && re.createPortal(I, document.body)
|
|
2258
2280
|
] });
|
|
2259
2281
|
}
|
|
2260
|
-
const
|
|
2282
|
+
const Qt = {
|
|
2261
2283
|
info: We,
|
|
2262
2284
|
success: Fe,
|
|
2263
2285
|
warning: ze,
|
|
2264
2286
|
error: Me
|
|
2265
2287
|
};
|
|
2266
|
-
function
|
|
2288
|
+
function yn({
|
|
2267
2289
|
children: t,
|
|
2268
2290
|
variant: s = "info",
|
|
2269
2291
|
action: n,
|
|
@@ -2273,7 +2295,7 @@ function Nn({
|
|
|
2273
2295
|
dismissLabel: i,
|
|
2274
2296
|
...l
|
|
2275
2297
|
}) {
|
|
2276
|
-
const c = K(), u =
|
|
2298
|
+
const c = K(), u = Qt[s], d = o || (s === "error" ? "alert" : "status");
|
|
2277
2299
|
return /* @__PURE__ */ e.jsxs(
|
|
2278
2300
|
"div",
|
|
2279
2301
|
{
|
|
@@ -2306,7 +2328,7 @@ function Nn({
|
|
|
2306
2328
|
}
|
|
2307
2329
|
);
|
|
2308
2330
|
}
|
|
2309
|
-
function
|
|
2331
|
+
function kn({
|
|
2310
2332
|
trigger: t,
|
|
2311
2333
|
items: s = [],
|
|
2312
2334
|
open: n,
|
|
@@ -2317,18 +2339,18 @@ function wn({
|
|
|
2317
2339
|
style: l,
|
|
2318
2340
|
...c
|
|
2319
2341
|
}) {
|
|
2320
|
-
const [u, d] =
|
|
2342
|
+
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
2343
|
if (f)
|
|
2322
2344
|
r == null || r(!1);
|
|
2323
2345
|
else {
|
|
2324
2346
|
if (p) return;
|
|
2325
2347
|
h(!0), _.current = setTimeout(() => {
|
|
2326
2348
|
d(!1), h(!1);
|
|
2327
|
-
},
|
|
2349
|
+
}, A);
|
|
2328
2350
|
}
|
|
2329
|
-
},
|
|
2351
|
+
}, D = () => {
|
|
2330
2352
|
const b = !v;
|
|
2331
|
-
f ? r == null || r(b) : b ? (clearTimeout(_.current), h(!1), d(!0)) :
|
|
2353
|
+
f ? r == null || r(b) : b ? (clearTimeout(_.current), h(!1), d(!0)) : I();
|
|
2332
2354
|
}, O = () => {
|
|
2333
2355
|
v || (f ? r == null || r(!0) : (clearTimeout(_.current), h(!1), d(!0)));
|
|
2334
2356
|
};
|
|
@@ -2336,11 +2358,11 @@ function wn({
|
|
|
2336
2358
|
if (!v) return;
|
|
2337
2359
|
const b = 300, $ = () => {
|
|
2338
2360
|
var Y;
|
|
2339
|
-
const R = (Y =
|
|
2361
|
+
const R = (Y = N.current) == null ? void 0 : Y.getBoundingClientRect();
|
|
2340
2362
|
if (!R) return;
|
|
2341
|
-
const V = window.innerHeight - R.bottom,
|
|
2342
|
-
|
|
2343
|
-
a === "right" ?
|
|
2363
|
+
const V = window.innerHeight - R.bottom, U = V < b + 8 && R.top > V;
|
|
2364
|
+
w(
|
|
2365
|
+
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
2366
|
);
|
|
2345
2367
|
};
|
|
2346
2368
|
return $(), window.addEventListener("scroll", $, !0), window.addEventListener("resize", $), () => {
|
|
@@ -2349,7 +2371,7 @@ function wn({
|
|
|
2349
2371
|
}, [v, a]);
|
|
2350
2372
|
const k = () => {
|
|
2351
2373
|
var $;
|
|
2352
|
-
const b = ($ =
|
|
2374
|
+
const b = ($ = j.current) == null ? void 0 : $.querySelector(
|
|
2353
2375
|
'button:not([disabled]), [href], [tabindex]:not([tabindex="-1"]), input, select, textarea'
|
|
2354
2376
|
);
|
|
2355
2377
|
b == null || b.focus();
|
|
@@ -2357,41 +2379,41 @@ function wn({
|
|
|
2357
2379
|
F(() => {
|
|
2358
2380
|
if (!v) return;
|
|
2359
2381
|
const b = (R) => {
|
|
2360
|
-
var V,
|
|
2361
|
-
!((V =
|
|
2382
|
+
var V, U;
|
|
2383
|
+
!((V = N.current) != null && V.contains(R.target)) && !((U = y.current) != null && U.contains(R.target)) && I();
|
|
2362
2384
|
}, $ = (R) => {
|
|
2363
|
-
R.key === "Escape" && (
|
|
2385
|
+
R.key === "Escape" && (I(), k());
|
|
2364
2386
|
};
|
|
2365
2387
|
return document.addEventListener("mousedown", b), document.addEventListener("keydown", $), () => {
|
|
2366
2388
|
document.removeEventListener("mousedown", b), document.removeEventListener("keydown", $);
|
|
2367
2389
|
};
|
|
2368
2390
|
}, [v]), F(() => {
|
|
2369
|
-
if (!v || !
|
|
2370
|
-
const b =
|
|
2371
|
-
$ == null || $.focus(),
|
|
2391
|
+
if (!v || !T.current || !y.current) return;
|
|
2392
|
+
const b = P(), $ = T.current === "last" ? b[b.length - 1] : b[0];
|
|
2393
|
+
$ == null || $.focus(), T.current = null;
|
|
2372
2394
|
}, [v]);
|
|
2373
|
-
const
|
|
2395
|
+
const P = () => y.current ? [...y.current.querySelectorAll(
|
|
2374
2396
|
'button:not([disabled]), a[href]:not([aria-disabled="true"]), [tabindex]:not([tabindex="-1"])'
|
|
2375
|
-
)] : [],
|
|
2397
|
+
)] : [], H = (b) => {
|
|
2376
2398
|
var $, R;
|
|
2377
2399
|
if (b.key === "ArrowDown")
|
|
2378
|
-
b.preventDefault(), v ? ($ =
|
|
2400
|
+
b.preventDefault(), v ? ($ = P()[0]) == null || $.focus() : (T.current = "first", O());
|
|
2379
2401
|
else if (b.key === "ArrowUp")
|
|
2380
2402
|
if (b.preventDefault(), !v)
|
|
2381
|
-
|
|
2403
|
+
T.current = "last", O();
|
|
2382
2404
|
else {
|
|
2383
|
-
const V =
|
|
2405
|
+
const V = P();
|
|
2384
2406
|
(R = V[V.length - 1]) == null || R.focus();
|
|
2385
2407
|
}
|
|
2386
2408
|
}, W = (b) => {
|
|
2387
|
-
var V,
|
|
2388
|
-
const $ =
|
|
2409
|
+
var V, U, Y, m;
|
|
2410
|
+
const $ = P(), R = $.findIndex((x) => x === document.activeElement);
|
|
2389
2411
|
switch (b.key) {
|
|
2390
2412
|
case "ArrowDown":
|
|
2391
2413
|
b.preventDefault(), (V = $[Math.min(R + 1, $.length - 1)]) == null || V.focus();
|
|
2392
2414
|
break;
|
|
2393
2415
|
case "ArrowUp":
|
|
2394
|
-
b.preventDefault(), R <= 0 ? k() : (
|
|
2416
|
+
b.preventDefault(), R <= 0 ? k() : (U = $[R - 1]) == null || U.focus();
|
|
2395
2417
|
break;
|
|
2396
2418
|
case "Home":
|
|
2397
2419
|
b.preventDefault(), (Y = $[0]) == null || Y.focus();
|
|
@@ -2400,13 +2422,13 @@ function wn({
|
|
|
2400
2422
|
b.preventDefault(), (m = $[$.length - 1]) == null || m.focus();
|
|
2401
2423
|
break;
|
|
2402
2424
|
case "Tab":
|
|
2403
|
-
|
|
2425
|
+
I();
|
|
2404
2426
|
break;
|
|
2405
2427
|
}
|
|
2406
2428
|
}, M = v && /* @__PURE__ */ e.jsx(
|
|
2407
2429
|
"div",
|
|
2408
2430
|
{
|
|
2409
|
-
ref:
|
|
2431
|
+
ref: y,
|
|
2410
2432
|
role: "menu",
|
|
2411
2433
|
"data-ds-portal": "",
|
|
2412
2434
|
className: [
|
|
@@ -2414,7 +2436,7 @@ function wn({
|
|
|
2414
2436
|
`ds-dropdown__menu--${a}`,
|
|
2415
2437
|
p && "ds-dropdown__menu--closing"
|
|
2416
2438
|
].filter(Boolean).join(" "),
|
|
2417
|
-
style:
|
|
2439
|
+
style: g,
|
|
2418
2440
|
onKeyDown: W,
|
|
2419
2441
|
children: s.map((b, $) => {
|
|
2420
2442
|
if (b.separator)
|
|
@@ -2424,7 +2446,7 @@ function wn({
|
|
|
2424
2446
|
b.label && /* @__PURE__ */ e.jsx("div", { className: "ds-dropdown__section-label", children: b.label }),
|
|
2425
2447
|
/* @__PURE__ */ e.jsx("div", { className: "ds-dropdown__section-content", children: b.content })
|
|
2426
2448
|
] }, $);
|
|
2427
|
-
const R = !!b.href, V = R ? "a" : "button",
|
|
2449
|
+
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
2450
|
return /* @__PURE__ */ e.jsxs(
|
|
2429
2451
|
V,
|
|
2430
2452
|
{
|
|
@@ -2433,10 +2455,10 @@ function wn({
|
|
|
2433
2455
|
"ds-dropdown__item",
|
|
2434
2456
|
b.danger && "ds-dropdown__item--danger"
|
|
2435
2457
|
].filter(Boolean).join(" "),
|
|
2436
|
-
...
|
|
2458
|
+
...U,
|
|
2437
2459
|
onClick: () => {
|
|
2438
2460
|
var Y;
|
|
2439
|
-
(Y = b.onClick) == null || Y.call(b),
|
|
2461
|
+
(Y = b.onClick) == null || Y.call(b), I();
|
|
2440
2462
|
},
|
|
2441
2463
|
children: [
|
|
2442
2464
|
b.icon && /* @__PURE__ */ e.jsx("span", { className: "ds-dropdown__item-icon", children: b.icon }),
|
|
@@ -2452,7 +2474,7 @@ function wn({
|
|
|
2452
2474
|
return /* @__PURE__ */ e.jsxs(
|
|
2453
2475
|
"div",
|
|
2454
2476
|
{
|
|
2455
|
-
ref:
|
|
2477
|
+
ref: N,
|
|
2456
2478
|
className: ["ds-dropdown", o && "ds-dropdown--full-width", i].filter(Boolean).join(" "),
|
|
2457
2479
|
style: l,
|
|
2458
2480
|
...c,
|
|
@@ -2460,10 +2482,10 @@ function wn({
|
|
|
2460
2482
|
/* @__PURE__ */ e.jsx(
|
|
2461
2483
|
"div",
|
|
2462
2484
|
{
|
|
2463
|
-
ref:
|
|
2485
|
+
ref: j,
|
|
2464
2486
|
className: "ds-dropdown__trigger",
|
|
2465
|
-
onClick:
|
|
2466
|
-
onKeyDown:
|
|
2487
|
+
onClick: D,
|
|
2488
|
+
onKeyDown: H,
|
|
2467
2489
|
children: t
|
|
2468
2490
|
}
|
|
2469
2491
|
),
|
|
@@ -2472,7 +2494,7 @@ function wn({
|
|
|
2472
2494
|
}
|
|
2473
2495
|
);
|
|
2474
2496
|
}
|
|
2475
|
-
function
|
|
2497
|
+
function En({
|
|
2476
2498
|
value: t = 0,
|
|
2477
2499
|
size: s = "m",
|
|
2478
2500
|
variant: n = "default",
|
|
@@ -2509,11 +2531,11 @@ function gn({
|
|
|
2509
2531
|
}
|
|
2510
2532
|
);
|
|
2511
2533
|
}
|
|
2512
|
-
const
|
|
2513
|
-
function
|
|
2514
|
-
const [n, r] =
|
|
2534
|
+
const es = (t) => 1 - Math.pow(1 - t, 3), ts = () => typeof window < "u" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
2535
|
+
function ss(t, { duration: s = 600 } = {}) {
|
|
2536
|
+
const [n, r] = L(t), a = S(t), o = S(null);
|
|
2515
2537
|
return F(() => {
|
|
2516
|
-
if (
|
|
2538
|
+
if (ts()) {
|
|
2517
2539
|
r(t), a.current = t;
|
|
2518
2540
|
return;
|
|
2519
2541
|
}
|
|
@@ -2523,23 +2545,23 @@ function Qt(t, { duration: s = 600 } = {}) {
|
|
|
2523
2545
|
const u = (d) => {
|
|
2524
2546
|
c || (c = d);
|
|
2525
2547
|
const p = Math.min((d - c) / s, 1);
|
|
2526
|
-
r(i + l *
|
|
2548
|
+
r(i + l * es(p)), p < 1 ? o.current = requestAnimationFrame(u) : a.current = t;
|
|
2527
2549
|
};
|
|
2528
2550
|
return o.current = requestAnimationFrame(u), () => cancelAnimationFrame(o.current);
|
|
2529
2551
|
}, [t, s]), n;
|
|
2530
2552
|
}
|
|
2531
|
-
function
|
|
2553
|
+
function Tn({
|
|
2532
2554
|
value: t,
|
|
2533
2555
|
duration: s = 600,
|
|
2534
2556
|
decimals: n = 0,
|
|
2535
2557
|
prefix: r = "",
|
|
2536
2558
|
suffix: a = ""
|
|
2537
2559
|
}) {
|
|
2538
|
-
const i =
|
|
2560
|
+
const i = ss(t, { duration: s }).toFixed(n);
|
|
2539
2561
|
return `${r}${i}${a}`;
|
|
2540
2562
|
}
|
|
2541
|
-
function
|
|
2542
|
-
const r =
|
|
2563
|
+
function ns({ threshold: t = 0.1, rootMargin: s = "0px", once: n = !1 } = {}) {
|
|
2564
|
+
const r = S(null), [a, o] = L(!1);
|
|
2543
2565
|
return F(() => {
|
|
2544
2566
|
const i = r.current;
|
|
2545
2567
|
if (!i) return;
|
|
@@ -2552,7 +2574,7 @@ function es({ threshold: t = 0.1, rootMargin: s = "0px", once: n = !1 } = {}) {
|
|
|
2552
2574
|
return l.observe(i), () => l.disconnect();
|
|
2553
2575
|
}, [t, s, n]), { ref: r, inView: a };
|
|
2554
2576
|
}
|
|
2555
|
-
function
|
|
2577
|
+
function $n({
|
|
2556
2578
|
children: t,
|
|
2557
2579
|
as: s = "div",
|
|
2558
2580
|
once: n = !1,
|
|
@@ -2562,12 +2584,12 @@ function kn({
|
|
|
2562
2584
|
onLeave: i,
|
|
2563
2585
|
...l
|
|
2564
2586
|
}) {
|
|
2565
|
-
const { ref: c, inView: u } =
|
|
2587
|
+
const { ref: c, inView: u } = ns({ threshold: r, rootMargin: a, once: n }), d = S(!1);
|
|
2566
2588
|
return F(() => {
|
|
2567
2589
|
u && !d.current && (o == null || o()), !u && d.current && (i == null || i()), d.current = u;
|
|
2568
2590
|
}, [u]), /* @__PURE__ */ e.jsx(s, { ref: c, ...l, children: typeof t == "function" ? t(u) : t });
|
|
2569
2591
|
}
|
|
2570
|
-
const
|
|
2592
|
+
const rt = {
|
|
2571
2593
|
default: We,
|
|
2572
2594
|
success: Fe,
|
|
2573
2595
|
warning: ze,
|
|
@@ -2575,18 +2597,18 @@ const st = {
|
|
|
2575
2597
|
};
|
|
2576
2598
|
let ve = [];
|
|
2577
2599
|
const Le = /* @__PURE__ */ new Set();
|
|
2578
|
-
function
|
|
2600
|
+
function mt() {
|
|
2579
2601
|
Le.forEach((t) => t([...ve]));
|
|
2580
2602
|
}
|
|
2581
|
-
function
|
|
2582
|
-
ve = [...ve, t],
|
|
2603
|
+
function rs(t) {
|
|
2604
|
+
ve = [...ve, t], mt();
|
|
2583
2605
|
}
|
|
2584
|
-
function
|
|
2585
|
-
ve = ve.filter((s) => s.id !== t),
|
|
2606
|
+
function as(t) {
|
|
2607
|
+
ve = ve.filter((s) => s.id !== t), mt();
|
|
2586
2608
|
}
|
|
2587
|
-
function
|
|
2609
|
+
function Rn() {
|
|
2588
2610
|
const t = (s, n = {}) => {
|
|
2589
|
-
|
|
2611
|
+
rs({
|
|
2590
2612
|
id: `${Date.now()}-${Math.random()}`,
|
|
2591
2613
|
message: s,
|
|
2592
2614
|
type: "default",
|
|
@@ -2596,13 +2618,13 @@ function En() {
|
|
|
2596
2618
|
};
|
|
2597
2619
|
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
2620
|
}
|
|
2599
|
-
function
|
|
2600
|
-
const n = K(), [r, a] =
|
|
2621
|
+
function os({ data: t, onDismiss: s }) {
|
|
2622
|
+
const n = K(), [r, a] = L(!1), o = S(null);
|
|
2601
2623
|
F(() => (requestAnimationFrame(() => a(!0)), t.duration > 0 && (o.current = setTimeout(() => i(), t.duration)), () => clearTimeout(o.current)), []);
|
|
2602
2624
|
function i() {
|
|
2603
2625
|
a(!1), setTimeout(() => s(t.id), 250);
|
|
2604
2626
|
}
|
|
2605
|
-
const l =
|
|
2627
|
+
const l = rt[t.type] ?? rt.default;
|
|
2606
2628
|
return /* @__PURE__ */ e.jsxs(
|
|
2607
2629
|
"div",
|
|
2608
2630
|
{
|
|
@@ -2629,19 +2651,19 @@ function ns({ data: t, onDismiss: s }) {
|
|
|
2629
2651
|
}
|
|
2630
2652
|
);
|
|
2631
2653
|
}
|
|
2632
|
-
function
|
|
2633
|
-
const [s, n] =
|
|
2654
|
+
function Sn({ position: t = "bottom-right" }) {
|
|
2655
|
+
const [s, n] = L(() => [...ve]);
|
|
2634
2656
|
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(
|
|
2657
|
+
/* @__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
2658
|
document.body
|
|
2637
2659
|
);
|
|
2638
2660
|
}
|
|
2639
|
-
const
|
|
2661
|
+
const is = {
|
|
2640
2662
|
running: /* @__PURE__ */ e.jsx(he, { size: "xs", variant: "info", children: "Running..." }),
|
|
2641
2663
|
success: /* @__PURE__ */ e.jsx(he, { size: "xs", variant: "success", children: "Done" }),
|
|
2642
2664
|
error: /* @__PURE__ */ e.jsx(he, { size: "xs", variant: "error", children: "Error" })
|
|
2643
2665
|
};
|
|
2644
|
-
function
|
|
2666
|
+
function An({
|
|
2645
2667
|
label: t,
|
|
2646
2668
|
status: s = "idle",
|
|
2647
2669
|
icon: n,
|
|
@@ -2656,7 +2678,7 @@ function $n({
|
|
|
2656
2678
|
const d = s === "running", p = /* @__PURE__ */ e.jsxs("span", { className: "ds-tool-card__title-row", children: [
|
|
2657
2679
|
n && /* @__PURE__ */ e.jsx("span", { className: "ds-tool-card__icon", children: n }),
|
|
2658
2680
|
/* @__PURE__ */ e.jsx("span", { className: "ds-tool-card__label", children: t }),
|
|
2659
|
-
|
|
2681
|
+
is[s],
|
|
2660
2682
|
r
|
|
2661
2683
|
] });
|
|
2662
2684
|
return l ? /* @__PURE__ */ e.jsx(
|
|
@@ -2665,7 +2687,7 @@ function $n({
|
|
|
2665
2687
|
className: ["ds-tool-card", d && "ds-tool-card--running", c].filter(Boolean).join(" "),
|
|
2666
2688
|
...u,
|
|
2667
2689
|
children: /* @__PURE__ */ e.jsx(
|
|
2668
|
-
|
|
2690
|
+
He,
|
|
2669
2691
|
{
|
|
2670
2692
|
title: p,
|
|
2671
2693
|
padding: "s",
|
|
@@ -2685,14 +2707,14 @@ function $n({
|
|
|
2685
2707
|
}
|
|
2686
2708
|
);
|
|
2687
2709
|
}
|
|
2688
|
-
function
|
|
2710
|
+
function ls({
|
|
2689
2711
|
text: t,
|
|
2690
2712
|
size: s = "xs",
|
|
2691
2713
|
timeout: n = 800,
|
|
2692
2714
|
"aria-label": r,
|
|
2693
2715
|
...a
|
|
2694
2716
|
}) {
|
|
2695
|
-
const o = K(), [i, l] =
|
|
2717
|
+
const o = K(), [i, l] = L(!1), c = (u) => {
|
|
2696
2718
|
u.currentTarget.blur(), navigator.clipboard.writeText(t).then(() => {
|
|
2697
2719
|
l(!0), setTimeout(() => l(!1), n);
|
|
2698
2720
|
});
|
|
@@ -2703,36 +2725,36 @@ function as({
|
|
|
2703
2725
|
variant: "ghost",
|
|
2704
2726
|
size: s,
|
|
2705
2727
|
state: i ? "success" : "idle",
|
|
2706
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
2728
|
+
icon: /* @__PURE__ */ e.jsx(kt, { size: q[1], strokeWidth: 1.5 }),
|
|
2707
2729
|
"aria-label": r ?? o.copyToClipboard,
|
|
2708
2730
|
onClick: c,
|
|
2709
2731
|
...a
|
|
2710
2732
|
}
|
|
2711
2733
|
);
|
|
2712
2734
|
}
|
|
2713
|
-
function
|
|
2714
|
-
const [r, a] =
|
|
2735
|
+
function Bn({ content: t, streaming: s = !1, ...n }) {
|
|
2736
|
+
const [r, a] = L(s);
|
|
2715
2737
|
return F(() => {
|
|
2716
2738
|
a(!!s);
|
|
2717
2739
|
}, [s]), /* @__PURE__ */ e.jsx(
|
|
2718
|
-
|
|
2740
|
+
He,
|
|
2719
2741
|
{
|
|
2720
2742
|
expanded: r,
|
|
2721
2743
|
onToggle: a,
|
|
2722
2744
|
padding: "s",
|
|
2723
2745
|
title: /* @__PURE__ */ e.jsxs("div", { className: "ds-reasoning__title", children: [
|
|
2724
|
-
/* @__PURE__ */ e.jsx(
|
|
2725
|
-
/* @__PURE__ */ e.jsx(
|
|
2746
|
+
/* @__PURE__ */ e.jsx(Et, { size: q[1], strokeWidth: 1.5, className: "ds-reasoning__icon" }),
|
|
2747
|
+
/* @__PURE__ */ e.jsx(zt, { secondary: !0, children: "Thinking" })
|
|
2726
2748
|
] }),
|
|
2727
2749
|
...n,
|
|
2728
|
-
children: /* @__PURE__ */ e.jsxs(
|
|
2750
|
+
children: /* @__PURE__ */ e.jsxs(ft, { secondary: !0, style: { whiteSpace: "pre-wrap" }, children: [
|
|
2729
2751
|
t,
|
|
2730
2752
|
s && /* @__PURE__ */ e.jsx("span", { className: "ds-cursor ds-cursor--line" })
|
|
2731
2753
|
] })
|
|
2732
2754
|
}
|
|
2733
2755
|
);
|
|
2734
2756
|
}
|
|
2735
|
-
function
|
|
2757
|
+
function In({
|
|
2736
2758
|
count: t,
|
|
2737
2759
|
current: s = 0,
|
|
2738
2760
|
done: n = [],
|
|
@@ -2745,7 +2767,7 @@ function Sn({
|
|
|
2745
2767
|
const c = K(), { t: u } = be();
|
|
2746
2768
|
return /* @__PURE__ */ e.jsxs("div", { className: ["ds-step-indicator", o].filter(Boolean).join(" "), ...l, children: [
|
|
2747
2769
|
/* @__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)),
|
|
2770
|
+
const h = p === s, f = n.includes(p) && !h, v = r && (p <= s || n.includes(p)), N = [
|
|
2749
2771
|
"ds-step-indicator__dot",
|
|
2750
2772
|
h && "ds-step-indicator__dot--active",
|
|
2751
2773
|
f && "ds-step-indicator__dot--done"
|
|
@@ -2754,7 +2776,7 @@ function Sn({
|
|
|
2754
2776
|
"button",
|
|
2755
2777
|
{
|
|
2756
2778
|
type: "button",
|
|
2757
|
-
className:
|
|
2779
|
+
className: N,
|
|
2758
2780
|
role: "tab",
|
|
2759
2781
|
"aria-selected": h,
|
|
2760
2782
|
"aria-label": u("stepN", { n: p + 1 }),
|
|
@@ -2765,14 +2787,14 @@ function Sn({
|
|
|
2765
2787
|
p
|
|
2766
2788
|
);
|
|
2767
2789
|
}) }),
|
|
2768
|
-
a && /* @__PURE__ */ e.jsxs(
|
|
2790
|
+
a && /* @__PURE__ */ e.jsxs(ft, { secondary: !0, className: "ds-step-indicator__counter", children: [
|
|
2769
2791
|
s + 1,
|
|
2770
2792
|
" / ",
|
|
2771
2793
|
t
|
|
2772
2794
|
] })
|
|
2773
2795
|
] });
|
|
2774
2796
|
}
|
|
2775
|
-
function
|
|
2797
|
+
function Ln({
|
|
2776
2798
|
content: t,
|
|
2777
2799
|
isStreaming: s = !1,
|
|
2778
2800
|
cursor: n = "line",
|
|
@@ -2780,7 +2802,7 @@ function An({
|
|
|
2780
2802
|
className: a = "",
|
|
2781
2803
|
...o
|
|
2782
2804
|
}) {
|
|
2783
|
-
const i =
|
|
2805
|
+
const i = S(t);
|
|
2784
2806
|
return F(() => {
|
|
2785
2807
|
t !== i.current && (r == null || r(t), i.current = t);
|
|
2786
2808
|
}, [t, r]), /* @__PURE__ */ e.jsxs("span", { className: ["ds-streaming-text", a].filter(Boolean).join(" "), ...o, children: [
|
|
@@ -2788,7 +2810,7 @@ function An({
|
|
|
2788
2810
|
s && n !== "none" && /* @__PURE__ */ e.jsx("span", { className: `ds-cursor ds-cursor--${n}`, "aria-hidden": "true" })
|
|
2789
2811
|
] });
|
|
2790
2812
|
}
|
|
2791
|
-
function
|
|
2813
|
+
function Dn({
|
|
2792
2814
|
role: t = "assistant",
|
|
2793
2815
|
header: s,
|
|
2794
2816
|
footer: n,
|
|
@@ -2815,8 +2837,8 @@ function Bn({
|
|
|
2815
2837
|
n && /* @__PURE__ */ e.jsx("div", { className: "ds-chat-message__footer", children: n })
|
|
2816
2838
|
] });
|
|
2817
2839
|
}
|
|
2818
|
-
function
|
|
2819
|
-
const r =
|
|
2840
|
+
function Pn(t, { containerRef: s, smartPause: n = !0 } = {}) {
|
|
2841
|
+
const r = S(!1), a = S(0);
|
|
2820
2842
|
F(() => {
|
|
2821
2843
|
const o = s == null ? void 0 : s.current;
|
|
2822
2844
|
if (!o) return;
|
|
@@ -2830,7 +2852,7 @@ function In(t, { containerRef: s, smartPause: n = !0 } = {}) {
|
|
|
2830
2852
|
o && (n && r.current || (o.scrollTop = o.scrollHeight));
|
|
2831
2853
|
}, t);
|
|
2832
2854
|
}
|
|
2833
|
-
function
|
|
2855
|
+
function cs({
|
|
2834
2856
|
prompts: t,
|
|
2835
2857
|
enabled: s,
|
|
2836
2858
|
typingSpeed: n = 38,
|
|
@@ -2839,7 +2861,7 @@ function os({
|
|
|
2839
2861
|
betweenTime: o = 380,
|
|
2840
2862
|
manualPauseMs: i = 5e3
|
|
2841
2863
|
}) {
|
|
2842
|
-
const [l, c] =
|
|
2864
|
+
const [l, c] = L(0), [u, d] = L(""), p = S("typing"), h = S(0), f = S(0), v = S(null), N = S(0);
|
|
2843
2865
|
F(() => {
|
|
2844
2866
|
f.current = l;
|
|
2845
2867
|
}, [l]), F(() => {
|
|
@@ -2847,28 +2869,28 @@ function os({
|
|
|
2847
2869
|
d(""), h.current = 0, p.current = "typing";
|
|
2848
2870
|
return;
|
|
2849
2871
|
}
|
|
2850
|
-
const
|
|
2872
|
+
const w = () => {
|
|
2851
2873
|
const _ = Date.now();
|
|
2852
|
-
if (
|
|
2853
|
-
v.current = setTimeout(
|
|
2874
|
+
if (N.current > _) {
|
|
2875
|
+
v.current = setTimeout(w, N.current - _);
|
|
2854
2876
|
return;
|
|
2855
2877
|
}
|
|
2856
|
-
const
|
|
2857
|
-
p.current === "typing" ? (h.current += 1, d(
|
|
2878
|
+
const A = t[f.current % t.length] ?? "";
|
|
2879
|
+
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
2880
|
};
|
|
2859
|
-
return v.current = setTimeout(
|
|
2881
|
+
return v.current = setTimeout(w, 260), () => {
|
|
2860
2882
|
v.current && clearTimeout(v.current);
|
|
2861
2883
|
};
|
|
2862
2884
|
}, [s, t, n, r, a, o]);
|
|
2863
|
-
const
|
|
2885
|
+
const y = (w) => {
|
|
2864
2886
|
if (t.length === 0) return;
|
|
2865
|
-
const _ = (
|
|
2866
|
-
f.current = _, h.current =
|
|
2867
|
-
},
|
|
2868
|
-
return { displayed: u, currentPrompt:
|
|
2887
|
+
const _ = (w % t.length + t.length) % t.length, A = t[_];
|
|
2888
|
+
f.current = _, h.current = A.length, p.current = "holding", N.current = Date.now() + i, c(_), d(A);
|
|
2889
|
+
}, j = () => y(f.current + 1), T = () => y(f.current - 1), g = t[l % t.length] ?? "";
|
|
2890
|
+
return { displayed: u, currentPrompt: g, index: l, next: j, prev: T };
|
|
2869
2891
|
}
|
|
2870
|
-
let
|
|
2871
|
-
function
|
|
2892
|
+
let ds = 0;
|
|
2893
|
+
function Mn({
|
|
2872
2894
|
value: t = "",
|
|
2873
2895
|
onChange: s,
|
|
2874
2896
|
onSubmit: n,
|
|
@@ -2884,91 +2906,91 @@ function Ln({
|
|
|
2884
2906
|
onAttachImages: h,
|
|
2885
2907
|
onRemoveAttachment: f,
|
|
2886
2908
|
onRemoveImage: v,
|
|
2887
|
-
acceptImage:
|
|
2888
|
-
acceptFile:
|
|
2889
|
-
maxImages:
|
|
2890
|
-
maxImageSize:
|
|
2891
|
-
leftSlot:
|
|
2892
|
-
rightSlot:
|
|
2909
|
+
acceptImage: N,
|
|
2910
|
+
acceptFile: y,
|
|
2911
|
+
maxImages: j,
|
|
2912
|
+
maxImageSize: T,
|
|
2913
|
+
leftSlot: g,
|
|
2914
|
+
rightSlot: w,
|
|
2893
2915
|
className: _ = "",
|
|
2894
|
-
...
|
|
2916
|
+
...A
|
|
2895
2917
|
}) {
|
|
2896
|
-
const
|
|
2897
|
-
const z = ++
|
|
2898
|
-
b((J) => [...J, { id: z, msg:
|
|
2899
|
-
}, V = (
|
|
2918
|
+
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) => {
|
|
2919
|
+
const z = ++ds;
|
|
2920
|
+
b((J) => [...J, { id: z, msg: E }]), setTimeout(() => b((J) => J.filter((Q) => Q.id !== z)), 6e3);
|
|
2921
|
+
}, 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
2922
|
const z = [], J = [], Q = [], ne = [];
|
|
2901
|
-
let ae = 0, me =
|
|
2902
|
-
for (const oe of
|
|
2903
|
-
m(oe) ?
|
|
2923
|
+
let ae = 0, me = j != null ? j - ((d == null ? void 0 : d.length) ?? 0) : 1 / 0;
|
|
2924
|
+
for (const oe of E)
|
|
2925
|
+
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
2926
|
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 &&
|
|
2927
|
+
}, C = (E) => {
|
|
2928
|
+
const z = T ? D("fileTooLargeMaxHint", { maxMb: T / 1024 / 1024 }) : "";
|
|
2929
|
+
R(D("fileTooLarge", { maxHint: z, names: E.join(", ") }));
|
|
2930
|
+
}, te = (E) => {
|
|
2931
|
+
const { imageFiles: z, docFiles: J, tooLarge: Q, skipped: ne, limitExceeded: ae } = B(E);
|
|
2932
|
+
Q.length && C(Q), ne.length && R(D("filesSkipped", { names: ne.join(", ") })), ae && R(D("maxImages", { n: j })), h && z.length && h(z);
|
|
2911
2933
|
const me = J.concat(h ? [] : z);
|
|
2912
2934
|
p && me.length && p(me);
|
|
2913
2935
|
};
|
|
2914
2936
|
F(() => {
|
|
2915
|
-
const
|
|
2916
|
-
|
|
2937
|
+
const E = k.current;
|
|
2938
|
+
E && (E.style.height = "auto", E.style.height = `${Math.min(E.scrollHeight, 200)}px`);
|
|
2917
2939
|
}, [t]), F(() => {
|
|
2918
|
-
const
|
|
2940
|
+
const E = (z) => {
|
|
2919
2941
|
var Q, ne, ae;
|
|
2920
2942
|
if (o || i) return;
|
|
2921
2943
|
const J = (Q = z.target) == null ? void 0 : Q.tagName;
|
|
2922
2944
|
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
2945
|
};
|
|
2924
|
-
return document.addEventListener("keydown",
|
|
2946
|
+
return document.addEventListener("keydown", E), () => document.removeEventListener("keydown", E);
|
|
2925
2947
|
}, [o, i]);
|
|
2926
|
-
const le = (
|
|
2927
|
-
|
|
2928
|
-
}, G = (
|
|
2929
|
-
|
|
2930
|
-
}, Z = (
|
|
2931
|
-
|
|
2932
|
-
const z = Array.from(
|
|
2948
|
+
const le = (E) => {
|
|
2949
|
+
E.preventDefault(), P.current++, E.dataTransfer.types.includes("Files") && W(!0);
|
|
2950
|
+
}, G = (E) => {
|
|
2951
|
+
E.preventDefault(), P.current--, P.current === 0 && W(!1);
|
|
2952
|
+
}, Z = (E) => E.preventDefault(), fe = (E) => {
|
|
2953
|
+
E.preventDefault(), P.current = 0, W(!1);
|
|
2954
|
+
const z = Array.from(E.dataTransfer.files);
|
|
2933
2955
|
z.length && te(z);
|
|
2934
|
-
}, je = (
|
|
2935
|
-
const z = Array.from(
|
|
2956
|
+
}, je = (E) => {
|
|
2957
|
+
const z = Array.from(E.target.files || []);
|
|
2936
2958
|
O.current && (O.current.value = ""), z.length && te(z);
|
|
2937
|
-
}, Se = (
|
|
2959
|
+
}, Se = (E) => {
|
|
2938
2960
|
var oe;
|
|
2939
2961
|
if (!h) return;
|
|
2940
|
-
const z = (oe =
|
|
2962
|
+
const z = (oe = E.clipboardData) == null ? void 0 : oe.items;
|
|
2941
2963
|
if (!z) return;
|
|
2942
2964
|
const J = [];
|
|
2943
|
-
for (const
|
|
2944
|
-
const
|
|
2945
|
-
|
|
2965
|
+
for (const xt of z) {
|
|
2966
|
+
const qe = xt.getAsFile();
|
|
2967
|
+
qe && J.push(qe);
|
|
2946
2968
|
}
|
|
2947
2969
|
if (J.length === 0) return;
|
|
2948
2970
|
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 =
|
|
2971
|
+
ne.length && C(ne), ae.length && R(D("filesSkipped", { names: ae.join(", ") })), me && R(D("maxImages", { n: j })), Q.length && (E.preventDefault(), h(Q));
|
|
2972
|
+
}, Ne = !o && !i && !!(c != null && c.length) && t.length === 0, ke = cs({
|
|
2951
2973
|
prompts: c ?? [],
|
|
2952
2974
|
enabled: Ne
|
|
2953
|
-
}),
|
|
2975
|
+
}), pt = (E) => {
|
|
2954
2976
|
if (Ne) {
|
|
2955
|
-
if (
|
|
2956
|
-
|
|
2977
|
+
if (E.key === "ArrowDown" || E.key === "ArrowRight") {
|
|
2978
|
+
E.preventDefault(), ke.next();
|
|
2957
2979
|
return;
|
|
2958
2980
|
}
|
|
2959
|
-
if (
|
|
2960
|
-
|
|
2981
|
+
if (E.key === "ArrowUp" || E.key === "ArrowLeft") {
|
|
2982
|
+
E.preventDefault(), ke.prev();
|
|
2961
2983
|
return;
|
|
2962
2984
|
}
|
|
2963
|
-
if (
|
|
2964
|
-
|
|
2985
|
+
if (E.key === "Tab" && !E.shiftKey) {
|
|
2986
|
+
E.preventDefault(), s == null || s(ke.currentPrompt);
|
|
2965
2987
|
return;
|
|
2966
2988
|
}
|
|
2967
2989
|
}
|
|
2968
|
-
a == null || a(
|
|
2969
|
-
},
|
|
2970
|
-
return /* @__PURE__ */ e.jsxs("div", { className: ["ds-prompt-input", _].filter(Boolean).join(" "), ...
|
|
2971
|
-
|
|
2990
|
+
a == null || a(E);
|
|
2991
|
+
}, ht = (t.trim() || (d == null ? void 0 : d.length) > 0 || (u == null ? void 0 : u.length) > 0) && !i, Ye = p || h;
|
|
2992
|
+
return /* @__PURE__ */ e.jsxs("div", { className: ["ds-prompt-input", _].filter(Boolean).join(" "), ...A, children: [
|
|
2993
|
+
Ye && /* @__PURE__ */ e.jsx(
|
|
2972
2994
|
"input",
|
|
2973
2995
|
{
|
|
2974
2996
|
ref: O,
|
|
@@ -2982,20 +3004,20 @@ function Ln({
|
|
|
2982
3004
|
/* @__PURE__ */ e.jsxs(
|
|
2983
3005
|
"div",
|
|
2984
3006
|
{
|
|
2985
|
-
className: ["ds-prompt-input__box",
|
|
3007
|
+
className: ["ds-prompt-input__box", H && "ds-prompt-input__box--dragging"].filter(Boolean).join(" "),
|
|
2986
3008
|
onDragEnter: le,
|
|
2987
3009
|
onDragLeave: G,
|
|
2988
3010
|
onDragOver: Z,
|
|
2989
3011
|
onDrop: fe,
|
|
2990
3012
|
children: [
|
|
2991
|
-
|
|
3013
|
+
H && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__drag-overlay", children: I.dropFilesHere }),
|
|
2992
3014
|
/* @__PURE__ */ e.jsx(
|
|
2993
3015
|
"textarea",
|
|
2994
3016
|
{
|
|
2995
3017
|
ref: k,
|
|
2996
3018
|
value: t,
|
|
2997
|
-
onChange: (
|
|
2998
|
-
onKeyDown:
|
|
3019
|
+
onChange: (E) => s == null ? void 0 : s(E.target.value),
|
|
3020
|
+
onKeyDown: pt,
|
|
2999
3021
|
onPaste: Se,
|
|
3000
3022
|
placeholder: Ne ? "" : $,
|
|
3001
3023
|
disabled: o || i,
|
|
@@ -3007,81 +3029,81 @@ function Ln({
|
|
|
3007
3029
|
/* @__PURE__ */ e.jsx("span", { className: "ds-prompt-input__anim-text", children: ke.displayed }),
|
|
3008
3030
|
/* @__PURE__ */ e.jsx("span", { className: "ds-prompt-input__anim-cursor" })
|
|
3009
3031
|
] }),
|
|
3010
|
-
d && d.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__images", children: d.map((
|
|
3011
|
-
/* @__PURE__ */ e.jsx("img", { src:
|
|
3032
|
+
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: [
|
|
3033
|
+
/* @__PURE__ */ e.jsx("img", { src: E.preview, alt: "" }),
|
|
3012
3034
|
/* @__PURE__ */ e.jsx(
|
|
3013
3035
|
"button",
|
|
3014
3036
|
{
|
|
3015
3037
|
className: "ds-prompt-input__image-remove",
|
|
3016
3038
|
onClick: () => v == null ? void 0 : v(z),
|
|
3017
|
-
"aria-label":
|
|
3039
|
+
"aria-label": I.removeImage,
|
|
3018
3040
|
type: "button",
|
|
3019
3041
|
children: /* @__PURE__ */ e.jsx(ee, { size: 12, strokeWidth: 2 })
|
|
3020
3042
|
}
|
|
3021
3043
|
)
|
|
3022
3044
|
] }, z)) }),
|
|
3023
|
-
M.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__warnings", children: M.map((
|
|
3024
|
-
/* @__PURE__ */ e.jsx("span", { children:
|
|
3045
|
+
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: [
|
|
3046
|
+
/* @__PURE__ */ e.jsx("span", { children: E.msg }),
|
|
3025
3047
|
/* @__PURE__ */ e.jsx(
|
|
3026
3048
|
"button",
|
|
3027
3049
|
{
|
|
3028
3050
|
type: "button",
|
|
3029
3051
|
className: "ds-prompt-input__warning-close",
|
|
3030
|
-
onClick: () => V(
|
|
3031
|
-
"aria-label":
|
|
3052
|
+
onClick: () => V(E.id),
|
|
3053
|
+
"aria-label": I.dismiss,
|
|
3032
3054
|
children: /* @__PURE__ */ e.jsx(ee, { size: q[1], strokeWidth: 1.5 })
|
|
3033
3055
|
}
|
|
3034
3056
|
)
|
|
3035
|
-
] },
|
|
3036
|
-
u && u.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__attachments", children: u.map((
|
|
3037
|
-
|
|
3038
|
-
|
|
3039
|
-
|
|
3057
|
+
] }, E.id)) }),
|
|
3058
|
+
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: [
|
|
3059
|
+
E.uploading ? /* @__PURE__ */ e.jsx(Tt, { size: q[1], strokeWidth: 1.5, className: "spin" }) : /* @__PURE__ */ e.jsx(Ge, { size: q[1], strokeWidth: 1.5 }),
|
|
3060
|
+
E.filename,
|
|
3061
|
+
E.uploading ? /* @__PURE__ */ e.jsx("span", { className: "ds-prompt-input__uploading", children: I.uploading }) : /* @__PURE__ */ e.jsx(
|
|
3040
3062
|
"button",
|
|
3041
3063
|
{
|
|
3042
3064
|
type: "button",
|
|
3043
3065
|
className: "ds-prompt-input__remove-btn",
|
|
3044
3066
|
onClick: () => f == null ? void 0 : f(z),
|
|
3045
|
-
"aria-label":
|
|
3067
|
+
"aria-label": I.removeAttachment,
|
|
3046
3068
|
children: /* @__PURE__ */ e.jsx(ee, { size: q[1], strokeWidth: 1.5 })
|
|
3047
3069
|
}
|
|
3048
3070
|
)
|
|
3049
3071
|
] }) }, z)) }),
|
|
3050
3072
|
/* @__PURE__ */ e.jsxs("div", { className: "ds-prompt-input__toolbar", children: [
|
|
3051
|
-
|
|
3073
|
+
Ye && /* @__PURE__ */ e.jsx(
|
|
3052
3074
|
de,
|
|
3053
3075
|
{
|
|
3054
3076
|
variant: "ghost",
|
|
3055
3077
|
size: "xs",
|
|
3056
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
3057
|
-
"aria-label":
|
|
3078
|
+
icon: /* @__PURE__ */ e.jsx(Ge, { size: q[2], strokeWidth: 1.5 }),
|
|
3079
|
+
"aria-label": I.attachFiles,
|
|
3058
3080
|
onClick: () => {
|
|
3059
|
-
var
|
|
3060
|
-
return (
|
|
3081
|
+
var E;
|
|
3082
|
+
return (E = O.current) == null ? void 0 : E.click();
|
|
3061
3083
|
}
|
|
3062
3084
|
}
|
|
3063
3085
|
),
|
|
3064
|
-
|
|
3065
|
-
|
|
3086
|
+
g,
|
|
3087
|
+
w,
|
|
3066
3088
|
/* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__spacer" }),
|
|
3067
3089
|
o ? /* @__PURE__ */ e.jsx(
|
|
3068
3090
|
de,
|
|
3069
3091
|
{
|
|
3070
3092
|
variant: "primary",
|
|
3071
3093
|
size: "xs",
|
|
3072
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
3094
|
+
icon: /* @__PURE__ */ e.jsx($t, { size: q[2], strokeWidth: 1.5 }),
|
|
3073
3095
|
onClick: r,
|
|
3074
|
-
"aria-label":
|
|
3096
|
+
"aria-label": I.stop
|
|
3075
3097
|
}
|
|
3076
3098
|
) : /* @__PURE__ */ e.jsx(
|
|
3077
3099
|
de,
|
|
3078
3100
|
{
|
|
3079
3101
|
variant: "primary",
|
|
3080
3102
|
size: "xs",
|
|
3081
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
3103
|
+
icon: /* @__PURE__ */ e.jsx(Rt, { size: q[2], strokeWidth: 1.5 }),
|
|
3082
3104
|
onClick: n,
|
|
3083
|
-
disabled: !
|
|
3084
|
-
"aria-label":
|
|
3105
|
+
disabled: !ht,
|
|
3106
|
+
"aria-label": I.send
|
|
3085
3107
|
}
|
|
3086
3108
|
)
|
|
3087
3109
|
] })
|
|
@@ -3090,8 +3112,8 @@ function Ln({
|
|
|
3090
3112
|
)
|
|
3091
3113
|
] });
|
|
3092
3114
|
}
|
|
3093
|
-
const
|
|
3094
|
-
function
|
|
3115
|
+
const at = { fast: 0, standard: 1, premium: 2 }, ot = { fast: "data-5", standard: "data-3", premium: "data-6" };
|
|
3116
|
+
function zn({
|
|
3095
3117
|
models: t = [],
|
|
3096
3118
|
value: s,
|
|
3097
3119
|
onChange: n,
|
|
@@ -3102,35 +3124,35 @@ function Dn({
|
|
|
3102
3124
|
className: l = "",
|
|
3103
3125
|
...c
|
|
3104
3126
|
}) {
|
|
3105
|
-
const [u, d] =
|
|
3127
|
+
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
3128
|
F(() => {
|
|
3107
3129
|
if (!u) return;
|
|
3108
|
-
const k = 320,
|
|
3130
|
+
const k = 320, P = () => {
|
|
3109
3131
|
var R;
|
|
3110
3132
|
const M = (R = h.current) == null ? void 0 : R.getBoundingClientRect();
|
|
3111
3133
|
if (!M) return;
|
|
3112
3134
|
const b = window.innerHeight - M.bottom, $ = b < k + 8 && M.top > b;
|
|
3113
|
-
|
|
3135
|
+
N({
|
|
3114
3136
|
position: "fixed",
|
|
3115
3137
|
zIndex: "var(--z-dropdown, 500)",
|
|
3116
3138
|
left: M.left,
|
|
3117
3139
|
...$ ? { bottom: window.innerHeight - M.top + 4, top: "auto" } : { top: M.bottom + 4, bottom: "auto" }
|
|
3118
3140
|
});
|
|
3119
3141
|
};
|
|
3120
|
-
|
|
3121
|
-
const
|
|
3142
|
+
P(), window.addEventListener("scroll", P, !0), window.addEventListener("resize", P);
|
|
3143
|
+
const H = (M) => {
|
|
3122
3144
|
var b, $;
|
|
3123
3145
|
!((b = p.current) != null && b.contains(M.target)) && !(($ = f.current) != null && $.contains(M.target)) && d(!1);
|
|
3124
3146
|
}, W = (M) => {
|
|
3125
3147
|
M.key === "Escape" && d(!1);
|
|
3126
3148
|
};
|
|
3127
|
-
return document.addEventListener("mousedown",
|
|
3128
|
-
window.removeEventListener("scroll",
|
|
3149
|
+
return document.addEventListener("mousedown", H), document.addEventListener("keydown", W), () => {
|
|
3150
|
+
window.removeEventListener("scroll", P, !0), window.removeEventListener("resize", P), document.removeEventListener("mousedown", H), document.removeEventListener("keydown", W);
|
|
3129
3151
|
};
|
|
3130
3152
|
}, [u]);
|
|
3131
|
-
const
|
|
3153
|
+
const A = (k) => {
|
|
3132
3154
|
n == null || n(k), d(!1);
|
|
3133
|
-
},
|
|
3155
|
+
}, I = (k) => /* @__PURE__ */ e.jsxs(
|
|
3134
3156
|
"button",
|
|
3135
3157
|
{
|
|
3136
3158
|
type: "button",
|
|
@@ -3138,22 +3160,22 @@ function Dn({
|
|
|
3138
3160
|
"ds-model-picker__item",
|
|
3139
3161
|
k.name === s && "ds-model-picker__item--active"
|
|
3140
3162
|
].filter(Boolean).join(" "),
|
|
3141
|
-
onClick: () =>
|
|
3163
|
+
onClick: () => A(k.name),
|
|
3142
3164
|
children: [
|
|
3143
|
-
k.icon ? /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__item-icon", children: k.icon }) : /* @__PURE__ */ e.jsx(
|
|
3165
|
+
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
3166
|
/* @__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:
|
|
3167
|
+
_ && k.tier && /* @__PURE__ */ e.jsx(he, { size: "xs", variant: ot[k.tier] || "default", children: k.tier })
|
|
3146
3168
|
]
|
|
3147
3169
|
},
|
|
3148
3170
|
k.name
|
|
3149
|
-
),
|
|
3150
|
-
const
|
|
3151
|
-
return
|
|
3171
|
+
), D = () => !i || !_ ? T.map(I) : ["fast", "standard", "premium"].flatMap((k) => {
|
|
3172
|
+
const P = T.filter((H) => H.tier === k);
|
|
3173
|
+
return P.length ? [
|
|
3152
3174
|
/* @__PURE__ */ e.jsx("div", { className: "ds-model-picker__group-label", "data-tier": k, children: k.charAt(0).toUpperCase() + k.slice(1) }, `lbl-${k}`),
|
|
3153
|
-
...
|
|
3175
|
+
...P.map(I)
|
|
3154
3176
|
] : [];
|
|
3155
3177
|
}), O = u && /* @__PURE__ */ e.jsxs("div", { ref: f, className: "ds-model-picker__menu ds-scrollable", "data-ds-portal": "", style: v, children: [
|
|
3156
|
-
o &&
|
|
3178
|
+
o && j && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
3157
3179
|
/* @__PURE__ */ e.jsxs(
|
|
3158
3180
|
"button",
|
|
3159
3181
|
{
|
|
@@ -3163,16 +3185,16 @@ function Dn({
|
|
|
3163
3185
|
"ds-model-picker__item--auto",
|
|
3164
3186
|
s === "auto" && "ds-model-picker__item--active"
|
|
3165
3187
|
].filter(Boolean).join(" "),
|
|
3166
|
-
onClick: () =>
|
|
3188
|
+
onClick: () => A("auto"),
|
|
3167
3189
|
children: [
|
|
3168
|
-
/* @__PURE__ */ e.jsx(
|
|
3190
|
+
/* @__PURE__ */ e.jsx(St, { size: 12, strokeWidth: 1.5, className: "ds-model-picker__item-icon" }),
|
|
3169
3191
|
/* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__item-name", children: "Auto (smart routing)" })
|
|
3170
3192
|
]
|
|
3171
3193
|
}
|
|
3172
3194
|
),
|
|
3173
|
-
|
|
3195
|
+
T.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-model-picker__separator" })
|
|
3174
3196
|
] }),
|
|
3175
|
-
|
|
3197
|
+
D()
|
|
3176
3198
|
] });
|
|
3177
3199
|
return /* @__PURE__ */ e.jsxs(
|
|
3178
3200
|
"div",
|
|
@@ -3191,9 +3213,9 @@ function Dn({
|
|
|
3191
3213
|
"aria-haspopup": "listbox",
|
|
3192
3214
|
"aria-expanded": u,
|
|
3193
3215
|
children: [
|
|
3194
|
-
|
|
3195
|
-
/* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__trigger-name", children: (
|
|
3196
|
-
_ && (
|
|
3216
|
+
g != null && g.icon ? /* @__PURE__ */ e.jsx("span", { children: g.icon }) : /* @__PURE__ */ e.jsx(Ke, { size: 12, strokeWidth: 1.5 }),
|
|
3217
|
+
/* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__trigger-name", children: (g == null ? void 0 : g.displayName) || (g == null ? void 0 : g.name) || s }),
|
|
3218
|
+
_ && (g == null ? void 0 : g.tier) && /* @__PURE__ */ e.jsx(he, { size: "xs", variant: ot[g.tier] || "default", children: g.tier })
|
|
3197
3219
|
]
|
|
3198
3220
|
}
|
|
3199
3221
|
),
|
|
@@ -3202,82 +3224,82 @@ function Dn({
|
|
|
3202
3224
|
}
|
|
3203
3225
|
);
|
|
3204
3226
|
}
|
|
3205
|
-
const
|
|
3227
|
+
const us = ({ filename: t, pagesLabel: s }) => /* @__PURE__ */ e.jsxs("span", { style: { display: "flex", alignItems: "center", gap: "var(--space-2)", minWidth: 0 }, children: [
|
|
3206
3228
|
/* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__filename", children: t }),
|
|
3207
3229
|
s && /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__pages", children: s })
|
|
3208
3230
|
] });
|
|
3209
|
-
function
|
|
3231
|
+
function fs(t) {
|
|
3210
3232
|
const s = /* @__PURE__ */ new Map();
|
|
3211
3233
|
for (const n of t)
|
|
3212
3234
|
s.has(n.filename) || s.set(n.filename, { filename: n.filename, url: n.url, items: [] }), s.get(n.filename).items.push(n);
|
|
3213
3235
|
return [...s.values()];
|
|
3214
3236
|
}
|
|
3215
|
-
function
|
|
3237
|
+
function Fn({
|
|
3216
3238
|
sources: t = [],
|
|
3217
3239
|
layout: s = "list",
|
|
3218
3240
|
title: n,
|
|
3219
3241
|
maxVisible: r = 5,
|
|
3220
3242
|
onSourceClick: a
|
|
3221
3243
|
}) {
|
|
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
|
|
3244
|
+
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(" ");
|
|
3245
|
+
return s === "compact" ? /* @__PURE__ */ e.jsxs("div", { className: y, children: [
|
|
3246
|
+
h.map((j) => {
|
|
3247
|
+
const T = j.items.map((_) => _.page).filter(Boolean), g = v(T), w = !!a;
|
|
3226
3248
|
return /* @__PURE__ */ e.jsxs(
|
|
3227
3249
|
"div",
|
|
3228
3250
|
{
|
|
3229
|
-
className: `ds-sources-panel__compact-row${
|
|
3230
|
-
onClick:
|
|
3251
|
+
className: `ds-sources-panel__compact-row${w ? " ds-sources-panel__compact-row--clickable" : ""}`,
|
|
3252
|
+
onClick: w ? () => a(j.items[0]) : void 0,
|
|
3231
3253
|
children: [
|
|
3232
|
-
/* @__PURE__ */ e.jsx(
|
|
3233
|
-
/* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__filename", children:
|
|
3234
|
-
|
|
3254
|
+
/* @__PURE__ */ e.jsx(At, { size: q[1], strokeWidth: 1.5, className: "ds-sources-panel__compact-icon" }),
|
|
3255
|
+
/* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__filename", children: j.filename }),
|
|
3256
|
+
g && /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__pages", children: g })
|
|
3235
3257
|
]
|
|
3236
3258
|
},
|
|
3237
|
-
|
|
3259
|
+
j.filename
|
|
3238
3260
|
);
|
|
3239
3261
|
}),
|
|
3240
|
-
p && !c && /* @__PURE__ */ e.jsx("button", { className: "ds-sources-panel__more", onClick: () => u(!0), children:
|
|
3241
|
-
] }) : /* @__PURE__ */ e.jsxs("div", { className:
|
|
3262
|
+
p && !c && /* @__PURE__ */ e.jsx("button", { className: "ds-sources-panel__more", onClick: () => u(!0), children: N })
|
|
3263
|
+
] }) : /* @__PURE__ */ e.jsxs("div", { className: y, children: [
|
|
3242
3264
|
l && /* @__PURE__ */ e.jsx("div", { className: "ds-sources-panel__title", children: l }),
|
|
3243
|
-
h.map((
|
|
3244
|
-
const
|
|
3265
|
+
h.map((j) => {
|
|
3266
|
+
const T = j.items.map((_) => _.page).filter(Boolean), g = v(T), w = !!a;
|
|
3245
3267
|
return f ? /* @__PURE__ */ e.jsx(
|
|
3246
|
-
|
|
3268
|
+
He,
|
|
3247
3269
|
{
|
|
3248
|
-
title: /* @__PURE__ */ e.jsx(
|
|
3270
|
+
title: /* @__PURE__ */ e.jsx(us, { filename: j.filename, pagesLabel: g }),
|
|
3249
3271
|
padding: "s",
|
|
3250
|
-
children:
|
|
3272
|
+
children: j.items.map((_, A) => /* @__PURE__ */ e.jsx(
|
|
3251
3273
|
"div",
|
|
3252
3274
|
{
|
|
3253
|
-
className: `ds-sources-panel__snippet${
|
|
3254
|
-
onClick:
|
|
3275
|
+
className: `ds-sources-panel__snippet${w ? " ds-sources-panel__snippet--clickable" : ""}`,
|
|
3276
|
+
onClick: w ? () => a(_) : void 0,
|
|
3255
3277
|
children: _.snippet ?? i("pageAbbrev", { pages: _.page })
|
|
3256
3278
|
},
|
|
3257
|
-
|
|
3279
|
+
A
|
|
3258
3280
|
))
|
|
3259
3281
|
},
|
|
3260
|
-
|
|
3282
|
+
j.filename
|
|
3261
3283
|
) : /* @__PURE__ */ e.jsxs(
|
|
3262
3284
|
"div",
|
|
3263
3285
|
{
|
|
3264
|
-
className: `ds-sources-panel__row${
|
|
3265
|
-
onClick:
|
|
3286
|
+
className: `ds-sources-panel__row${w ? " ds-sources-panel__row--clickable" : ""}`,
|
|
3287
|
+
onClick: w ? () => a(j.items[0]) : void 0,
|
|
3266
3288
|
children: [
|
|
3267
|
-
/* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__filename", children:
|
|
3268
|
-
|
|
3289
|
+
/* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__filename", children: j.filename }),
|
|
3290
|
+
g && /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__pages", children: g })
|
|
3269
3291
|
]
|
|
3270
3292
|
},
|
|
3271
|
-
|
|
3293
|
+
j.filename
|
|
3272
3294
|
);
|
|
3273
3295
|
}),
|
|
3274
|
-
p && !c && /* @__PURE__ */ e.jsx("button", { className: "ds-sources-panel__more", onClick: () => u(!0), children:
|
|
3296
|
+
p && !c && /* @__PURE__ */ e.jsx("button", { className: "ds-sources-panel__more", onClick: () => u(!0), children: N })
|
|
3275
3297
|
] });
|
|
3276
3298
|
}
|
|
3277
|
-
function
|
|
3299
|
+
function it(t) {
|
|
3278
3300
|
return t >= 1e6 ? (t / 1e6).toFixed(1).replace(/\.0$/, "") + "M" : t >= 1e3 ? (t / 1e3).toFixed(1).replace(/\.0$/, "") + "K" : String(t);
|
|
3279
3301
|
}
|
|
3280
|
-
function
|
|
3302
|
+
function Wn({
|
|
3281
3303
|
used: t,
|
|
3282
3304
|
limit: s,
|
|
3283
3305
|
size: n = "s",
|
|
@@ -3304,9 +3326,9 @@ function Mn({
|
|
|
3304
3326
|
) }),
|
|
3305
3327
|
(r || a) && /* @__PURE__ */ e.jsxs("div", { className: `ds-token-counter__label ds-token-counter__label--${u}`, children: [
|
|
3306
3328
|
r && /* @__PURE__ */ e.jsxs("span", { children: [
|
|
3307
|
-
|
|
3329
|
+
it(t),
|
|
3308
3330
|
" / ",
|
|
3309
|
-
|
|
3331
|
+
it(s)
|
|
3310
3332
|
] }),
|
|
3311
3333
|
a && /* @__PURE__ */ e.jsxs("span", { style: { marginLeft: "auto" }, children: [
|
|
3312
3334
|
Math.round(l * 100),
|
|
@@ -3317,24 +3339,24 @@ function Mn({
|
|
|
3317
3339
|
}
|
|
3318
3340
|
);
|
|
3319
3341
|
}
|
|
3320
|
-
const
|
|
3321
|
-
function
|
|
3342
|
+
const lt = 5;
|
|
3343
|
+
function ms(t) {
|
|
3322
3344
|
return t < 0.34 ? "low" : t < 0.67 ? "medium" : "high";
|
|
3323
3345
|
}
|
|
3324
|
-
function
|
|
3346
|
+
function On({
|
|
3325
3347
|
value: t = 0,
|
|
3326
3348
|
size: s = "xs",
|
|
3327
3349
|
showLabel: n = "none",
|
|
3328
3350
|
layout: r = "inline"
|
|
3329
3351
|
}) {
|
|
3330
|
-
const a = Math.max(0, Math.min(1, t)), o = Math.round(a *
|
|
3352
|
+
const a = Math.max(0, Math.min(1, t)), o = Math.round(a * lt), i = ms(a);
|
|
3331
3353
|
return /* @__PURE__ */ e.jsxs("div", { className: [
|
|
3332
3354
|
"ds-confidence-bar",
|
|
3333
3355
|
`ds-confidence-bar--${s}`,
|
|
3334
3356
|
`ds-confidence-bar--${i}`,
|
|
3335
3357
|
r === "block" && "ds-confidence-bar--block"
|
|
3336
3358
|
].filter(Boolean).join(" "), children: [
|
|
3337
|
-
/* @__PURE__ */ e.jsx("div", { className: "ds-confidence-bar__segments", "aria-hidden": "true", children: Array.from({ length:
|
|
3359
|
+
/* @__PURE__ */ e.jsx("div", { className: "ds-confidence-bar__segments", "aria-hidden": "true", children: Array.from({ length: lt }, (l, c) => /* @__PURE__ */ e.jsx(
|
|
3338
3360
|
"div",
|
|
3339
3361
|
{
|
|
3340
3362
|
className: `ds-confidence-bar__seg${c < o ? " ds-confidence-bar__seg--filled" : ""}`
|
|
@@ -3344,15 +3366,15 @@ function zn({
|
|
|
3344
3366
|
n === "text" && /* @__PURE__ */ e.jsx("span", { className: "ds-confidence-bar__label", children: i })
|
|
3345
3367
|
] });
|
|
3346
3368
|
}
|
|
3347
|
-
const
|
|
3369
|
+
const ps = { add: "+", remove: "-", context: " " };
|
|
3348
3370
|
function Ae({ line: t, lineNumbers: s }) {
|
|
3349
3371
|
return /* @__PURE__ */ e.jsxs("div", { className: `ds-diff-view__line ds-diff-view__line--${t.type}`, children: [
|
|
3350
3372
|
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:
|
|
3373
|
+
/* @__PURE__ */ e.jsx("span", { className: "ds-diff-view__prefix", children: ps[t.type] }),
|
|
3352
3374
|
/* @__PURE__ */ e.jsx("span", { className: "ds-diff-view__text", children: t.text })
|
|
3353
3375
|
] });
|
|
3354
3376
|
}
|
|
3355
|
-
function
|
|
3377
|
+
function Cn({
|
|
3356
3378
|
lines: t = [],
|
|
3357
3379
|
layout: s = "inline",
|
|
3358
3380
|
wordWrap: n = !1,
|
|
@@ -3380,7 +3402,7 @@ function Fn({
|
|
|
3380
3402
|
/* @__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
3403
|
] });
|
|
3382
3404
|
}
|
|
3383
|
-
function
|
|
3405
|
+
function hs({
|
|
3384
3406
|
value: t = "idle",
|
|
3385
3407
|
onLike: s,
|
|
3386
3408
|
onDislike: n,
|
|
@@ -3412,7 +3434,7 @@ function fs({
|
|
|
3412
3434
|
"aria-label": a ?? l.like,
|
|
3413
3435
|
"aria-pressed": t === "liked",
|
|
3414
3436
|
children: /* @__PURE__ */ e.jsx(
|
|
3415
|
-
|
|
3437
|
+
Bt,
|
|
3416
3438
|
{
|
|
3417
3439
|
size: q[1],
|
|
3418
3440
|
strokeWidth: 1.5,
|
|
@@ -3433,7 +3455,7 @@ function fs({
|
|
|
3433
3455
|
"aria-label": o ?? l.dislike,
|
|
3434
3456
|
"aria-pressed": t === "disliked",
|
|
3435
3457
|
children: /* @__PURE__ */ e.jsx(
|
|
3436
|
-
|
|
3458
|
+
It,
|
|
3437
3459
|
{
|
|
3438
3460
|
size: q[1],
|
|
3439
3461
|
strokeWidth: 1.5,
|
|
@@ -3446,7 +3468,7 @@ function fs({
|
|
|
3446
3468
|
}
|
|
3447
3469
|
);
|
|
3448
3470
|
}
|
|
3449
|
-
function
|
|
3471
|
+
function xs(t) {
|
|
3450
3472
|
const s = t instanceof Date ? t : new Date(t);
|
|
3451
3473
|
if (isNaN(s)) return null;
|
|
3452
3474
|
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 +3477,7 @@ function ms(t) {
|
|
|
3455
3477
|
const i = s.getDate(), l = s.toLocaleString([], { month: "short" });
|
|
3456
3478
|
return `${i} ${l} ${r}`;
|
|
3457
3479
|
}
|
|
3458
|
-
function
|
|
3480
|
+
function Un({
|
|
3459
3481
|
role: t = "assistant",
|
|
3460
3482
|
text: s,
|
|
3461
3483
|
timestamp: n,
|
|
@@ -3465,7 +3487,7 @@ function Wn({
|
|
|
3465
3487
|
className: i = "",
|
|
3466
3488
|
...l
|
|
3467
3489
|
}) {
|
|
3468
|
-
const c = t === "assistant" && (a || o), u = !!s, d = n ?
|
|
3490
|
+
const c = t === "assistant" && (a || o), u = !!s, d = n ? xs(n) : null;
|
|
3469
3491
|
return !c && !u && !d ? null : /* @__PURE__ */ e.jsxs(
|
|
3470
3492
|
"div",
|
|
3471
3493
|
{
|
|
@@ -3473,20 +3495,20 @@ function Wn({
|
|
|
3473
3495
|
...l,
|
|
3474
3496
|
children: [
|
|
3475
3497
|
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(
|
|
3498
|
+
c && /* @__PURE__ */ e.jsx(hs, { className: "ds-message-action", value: r, onLike: a, onDislike: o }),
|
|
3499
|
+
u && /* @__PURE__ */ e.jsx(ls, { className: "ds-message-action", text: s }),
|
|
3478
3500
|
t === "assistant" && d && /* @__PURE__ */ e.jsx("span", { className: "ds-message-footer__timestamp ds-message-action", children: d })
|
|
3479
3501
|
]
|
|
3480
3502
|
}
|
|
3481
3503
|
);
|
|
3482
3504
|
}
|
|
3483
|
-
function
|
|
3505
|
+
function Hn({ label: t, className: s = "", ...n }) {
|
|
3484
3506
|
return /* @__PURE__ */ e.jsxs("span", { className: ["ds-thinking-dot", s].filter(Boolean).join(" "), ...n, children: [
|
|
3485
3507
|
/* @__PURE__ */ e.jsx("span", { className: "ds-thinking-dot__pulse" }),
|
|
3486
3508
|
t && /* @__PURE__ */ e.jsx("span", { className: "ds-thinking-dot__label", children: t })
|
|
3487
3509
|
] });
|
|
3488
3510
|
}
|
|
3489
|
-
function
|
|
3511
|
+
function Vn({ variant: t = "light", glow: s, mask: n = !0, style: r, ...a }) {
|
|
3490
3512
|
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
3513
|
return /* @__PURE__ */ e.jsx(
|
|
3492
3514
|
"div",
|
|
@@ -3527,7 +3549,7 @@ function Cn({ variant: t = "light", glow: s, mask: n = !0, style: r, ...a }) {
|
|
|
3527
3549
|
}
|
|
3528
3550
|
);
|
|
3529
3551
|
}
|
|
3530
|
-
function
|
|
3552
|
+
function Yn({ children: t, axis: s = "y", style: n, className: r = "", ...a }) {
|
|
3531
3553
|
const o = s === "x" ? { overflowX: "auto", overflowY: "hidden" } : s === "both" ? { overflow: "auto" } : { overflowY: "auto", overflowX: "hidden" };
|
|
3532
3554
|
return /* @__PURE__ */ e.jsx(
|
|
3533
3555
|
"div",
|
|
@@ -3539,11 +3561,11 @@ function Un({ children: t, axis: s = "y", style: n, className: r = "", ...a }) {
|
|
|
3539
3561
|
}
|
|
3540
3562
|
);
|
|
3541
3563
|
}
|
|
3542
|
-
const Be = 280,
|
|
3543
|
-
function
|
|
3564
|
+
const Be = 280, vs = 22, bs = 14, ue = 8, Te = 6, _s = 200;
|
|
3565
|
+
function js(t) {
|
|
3544
3566
|
return t ? typeof t == "function" ? t() : typeof t == "string" ? document.querySelector(t) : null : null;
|
|
3545
3567
|
}
|
|
3546
|
-
function
|
|
3568
|
+
function Ns(t, s, n, r) {
|
|
3547
3569
|
const a = window.innerWidth, o = window.innerHeight;
|
|
3548
3570
|
if (o - t.bottom >= s + r + ue) return "bottom";
|
|
3549
3571
|
if (t.top >= s + r + ue) return "top";
|
|
@@ -3552,7 +3574,7 @@ function bs(t, s, n, r) {
|
|
|
3552
3574
|
const i = Math.max(t.top, o - t.bottom, a - t.right, t.left);
|
|
3553
3575
|
return i === o - t.bottom ? "bottom" : i === t.top ? "top" : i === a - t.right ? "right" : "left";
|
|
3554
3576
|
}
|
|
3555
|
-
function
|
|
3577
|
+
function ws(t, s, n, r, a) {
|
|
3556
3578
|
const o = window.innerWidth, i = window.innerHeight;
|
|
3557
3579
|
let l, c;
|
|
3558
3580
|
switch (t) {
|
|
@@ -3571,7 +3593,7 @@ function _s(t, s, n, r, a) {
|
|
|
3571
3593
|
const u = Math.max(ue, Math.min(o - r - ue, c)), d = Math.max(ue, Math.min(i - n - ue, l));
|
|
3572
3594
|
return { top: d, left: u, arrowOffset: c - u, arrowOffsetY: l - d };
|
|
3573
3595
|
}
|
|
3574
|
-
function
|
|
3596
|
+
function qn({
|
|
3575
3597
|
steps: t,
|
|
3576
3598
|
currentStep: s,
|
|
3577
3599
|
onNext: n,
|
|
@@ -3587,15 +3609,15 @@ function Hn({
|
|
|
3587
3609
|
statePrimary: h = "idle",
|
|
3588
3610
|
stateBack: f = "idle"
|
|
3589
3611
|
}) {
|
|
3590
|
-
const v = K(), { t:
|
|
3591
|
-
_.current = t,
|
|
3592
|
-
const [
|
|
3593
|
-
const Y = _.current[
|
|
3594
|
-
if (!Y || !
|
|
3595
|
-
const m =
|
|
3612
|
+
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);
|
|
3613
|
+
_.current = t, A.current = s, I.current = l;
|
|
3614
|
+
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(() => {
|
|
3615
|
+
const Y = _.current[A.current];
|
|
3616
|
+
if (!Y || !w.current) return;
|
|
3617
|
+
const m = js(Y.target);
|
|
3596
3618
|
if (!m) return;
|
|
3597
|
-
const x = m.getBoundingClientRect(),
|
|
3598
|
-
W(G),
|
|
3619
|
+
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);
|
|
3620
|
+
W(G), P({
|
|
3599
3621
|
position: "fixed",
|
|
3600
3622
|
top: Z,
|
|
3601
3623
|
left: fe,
|
|
@@ -3611,42 +3633,42 @@ function Hn({
|
|
|
3611
3633
|
});
|
|
3612
3634
|
}, []);
|
|
3613
3635
|
return F(() => {
|
|
3614
|
-
window.addEventListener("scroll",
|
|
3636
|
+
window.addEventListener("scroll", U, !0), window.addEventListener("resize", U);
|
|
3615
3637
|
const Y = requestAnimationFrame(() => {
|
|
3616
|
-
|
|
3638
|
+
U(), O(!0), $.current = !0;
|
|
3617
3639
|
});
|
|
3618
3640
|
return () => {
|
|
3619
|
-
cancelAnimationFrame(Y), window.removeEventListener("scroll",
|
|
3641
|
+
cancelAnimationFrame(Y), window.removeEventListener("scroll", U, !0), window.removeEventListener("resize", U);
|
|
3620
3642
|
};
|
|
3621
3643
|
}, []), F(() => {
|
|
3622
3644
|
if (!$.current) return;
|
|
3623
3645
|
O(!1);
|
|
3624
3646
|
const Y = setTimeout(() => {
|
|
3625
|
-
|
|
3626
|
-
|
|
3647
|
+
P((m) => ({ ...m, visibility: "hidden" })), requestAnimationFrame(() => {
|
|
3648
|
+
U(), O(!0);
|
|
3627
3649
|
});
|
|
3628
|
-
},
|
|
3650
|
+
}, _s + 20);
|
|
3629
3651
|
return () => clearTimeout(Y);
|
|
3630
3652
|
}, [s]), F(() => {
|
|
3631
|
-
|
|
3632
|
-
}, [
|
|
3653
|
+
D && w.current && w.current.focus({ preventScroll: !0 });
|
|
3654
|
+
}, [D]), F(() => {
|
|
3633
3655
|
const Y = (m) => {
|
|
3634
3656
|
m.key === "Escape" && a();
|
|
3635
3657
|
};
|
|
3636
3658
|
return document.addEventListener("keydown", Y), () => document.removeEventListener("keydown", Y);
|
|
3637
3659
|
}, [a]), F(() => {
|
|
3638
|
-
if (!
|
|
3660
|
+
if (!D) return;
|
|
3639
3661
|
const Y = (m) => {
|
|
3640
|
-
if (m.key !== "Tab" || !
|
|
3662
|
+
if (m.key !== "Tab" || !w.current) return;
|
|
3641
3663
|
const x = Array.from(
|
|
3642
|
-
|
|
3664
|
+
w.current.querySelectorAll('button:not([disabled]), [href], [tabindex]:not([tabindex="-1"])')
|
|
3643
3665
|
);
|
|
3644
3666
|
if (!x.length) return;
|
|
3645
|
-
const B = x[0],
|
|
3646
|
-
m.shiftKey && document.activeElement === B ? (m.preventDefault(),
|
|
3667
|
+
const B = x[0], C = x[x.length - 1];
|
|
3668
|
+
m.shiftKey && document.activeElement === B ? (m.preventDefault(), C.focus()) : !m.shiftKey && document.activeElement === C && (m.preventDefault(), B.focus());
|
|
3647
3669
|
};
|
|
3648
3670
|
return document.addEventListener("keydown", Y), () => document.removeEventListener("keydown", Y);
|
|
3649
|
-
}, [
|
|
3671
|
+
}, [D]), !R || typeof document > "u" ? null : re.createPortal(
|
|
3650
3672
|
/* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
3651
3673
|
M && /* @__PURE__ */ e.jsx(
|
|
3652
3674
|
"div",
|
|
@@ -3655,7 +3677,7 @@ function Hn({
|
|
|
3655
3677
|
"ds-coachmark__spotlight",
|
|
3656
3678
|
i && "ds-coachmark__spotlight--overlay",
|
|
3657
3679
|
!l && "ds-coachmark__spotlight--no-ring",
|
|
3658
|
-
|
|
3680
|
+
D && "ds-coachmark__spotlight--visible"
|
|
3659
3681
|
].filter(Boolean).join(" "),
|
|
3660
3682
|
style: M,
|
|
3661
3683
|
"aria-hidden": "true"
|
|
@@ -3664,16 +3686,16 @@ function Hn({
|
|
|
3664
3686
|
/* @__PURE__ */ e.jsxs(
|
|
3665
3687
|
"div",
|
|
3666
3688
|
{
|
|
3667
|
-
ref:
|
|
3689
|
+
ref: w,
|
|
3668
3690
|
"data-ds-portal": "",
|
|
3669
3691
|
role: "dialog",
|
|
3670
3692
|
"aria-modal": "false",
|
|
3671
3693
|
"aria-live": "polite",
|
|
3672
|
-
"aria-label": R.title ??
|
|
3694
|
+
"aria-label": R.title ?? N("stepOf", { current: s + 1, total: t.length }),
|
|
3673
3695
|
className: [
|
|
3674
3696
|
"ds-coachmark__bubble",
|
|
3675
|
-
`ds-coachmark__bubble--${
|
|
3676
|
-
|
|
3697
|
+
`ds-coachmark__bubble--${H}`,
|
|
3698
|
+
D && "ds-coachmark__bubble--visible"
|
|
3677
3699
|
].filter(Boolean).join(" "),
|
|
3678
3700
|
style: k,
|
|
3679
3701
|
tabIndex: -1,
|
|
@@ -3684,7 +3706,7 @@ function Hn({
|
|
|
3684
3706
|
type: "button",
|
|
3685
3707
|
className: "ds-coachmark__close",
|
|
3686
3708
|
onClick: a,
|
|
3687
|
-
"aria-label":
|
|
3709
|
+
"aria-label": T,
|
|
3688
3710
|
children: /* @__PURE__ */ e.jsx(ee, { size: 16, strokeWidth: 2 })
|
|
3689
3711
|
}
|
|
3690
3712
|
),
|
|
@@ -3697,8 +3719,8 @@ function Hn({
|
|
|
3697
3719
|
t.length
|
|
3698
3720
|
] }),
|
|
3699
3721
|
/* @__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 ?
|
|
3722
|
+
s > 0 && /* @__PURE__ */ e.jsx(de, { variant: "secondary", size: "s", state: f, onClick: r, children: j }),
|
|
3723
|
+
/* @__PURE__ */ e.jsx(de, { variant: "primary", size: "s", state: h, onClick: V ? o : n, children: V ? g : y })
|
|
3702
3724
|
] })
|
|
3703
3725
|
] })
|
|
3704
3726
|
]
|
|
@@ -3708,8 +3730,8 @@ function Hn({
|
|
|
3708
3730
|
document.body
|
|
3709
3731
|
);
|
|
3710
3732
|
}
|
|
3711
|
-
function
|
|
3712
|
-
const { storageKey: n } = s, [r, a] =
|
|
3733
|
+
function Gn(t, s = {}) {
|
|
3734
|
+
const { storageKey: n } = s, [r, a] = L(0), [o, i] = L(!1), l = () => n && typeof localStorage < "u" && localStorage.getItem(n) === "done", c = se(() => {
|
|
3713
3735
|
i(!1), n && typeof localStorage < "u" && localStorage.setItem(n, "done");
|
|
3714
3736
|
}, [n]);
|
|
3715
3737
|
return {
|
|
@@ -3724,8 +3746,8 @@ function Vn(t, s = {}) {
|
|
|
3724
3746
|
finish: c
|
|
3725
3747
|
};
|
|
3726
3748
|
}
|
|
3727
|
-
function
|
|
3728
|
-
const t =
|
|
3749
|
+
function Kn() {
|
|
3750
|
+
const t = S(null), s = se(() => {
|
|
3729
3751
|
const n = t.current;
|
|
3730
3752
|
if (!n) return;
|
|
3731
3753
|
n.classList.remove("ds-shake"), n.offsetWidth, n.classList.add("ds-shake");
|
|
@@ -3737,103 +3759,103 @@ function Yn() {
|
|
|
3737
3759
|
return { ref: t, shake: s };
|
|
3738
3760
|
}
|
|
3739
3761
|
export {
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3762
|
+
He as Accordion,
|
|
3763
|
+
Ms as Alert,
|
|
3764
|
+
Tn as AnimatedNumber,
|
|
3765
|
+
Qs as Avatar,
|
|
3744
3766
|
he as Badge,
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3767
|
+
yn as Banner,
|
|
3768
|
+
Fs as BottomSheet,
|
|
3769
|
+
un as Breadcrumb,
|
|
3770
|
+
Hs as BrowserPane,
|
|
3771
|
+
Vs as BrowserTabs,
|
|
3750
3772
|
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
|
-
|
|
3773
|
+
As as Card,
|
|
3774
|
+
Dn as ChatMessage,
|
|
3775
|
+
Js as Checkbox,
|
|
3776
|
+
qn as Coachmark,
|
|
3777
|
+
Ws as Code,
|
|
3778
|
+
Ut as CodeAccordion,
|
|
3779
|
+
On as ConfidenceBar,
|
|
3780
|
+
ls as CopyButton,
|
|
3781
|
+
Cn as DiffView,
|
|
3782
|
+
kn as Dropdown,
|
|
3783
|
+
ln as EmptyState,
|
|
3784
|
+
Vn as EngineerGrid,
|
|
3785
|
+
cn as FormField,
|
|
3786
|
+
Bs as H1,
|
|
3787
|
+
Is as H2,
|
|
3788
|
+
Ls as H3,
|
|
3789
|
+
Ds as H4,
|
|
3790
|
+
$n as InView,
|
|
3791
|
+
Ts as Input,
|
|
3792
|
+
Os as Link,
|
|
3793
|
+
Ys as List,
|
|
3794
|
+
qs as ListRow,
|
|
3795
|
+
Es as LocaleProvider,
|
|
3796
|
+
Ks as Mention,
|
|
3797
|
+
hs as MessageFeedback,
|
|
3798
|
+
Un as MessageFooter,
|
|
3799
|
+
zs as Modal,
|
|
3778
3800
|
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
|
-
|
|
3801
|
+
zn as ModelPicker,
|
|
3802
|
+
pn as NavRail,
|
|
3803
|
+
wn as NavRailAgent,
|
|
3804
|
+
xn as NavRailBody,
|
|
3805
|
+
Nn as NavRailCustomItem,
|
|
3806
|
+
_n as NavRailDivider,
|
|
3807
|
+
gn as NavRailFlyout,
|
|
3808
|
+
bn as NavRailFooter,
|
|
3809
|
+
vn as NavRailHeader,
|
|
3810
|
+
hn as NavRailItem,
|
|
3811
|
+
jn as NavRailRecents,
|
|
3812
|
+
Ps as P1,
|
|
3813
|
+
zt as P2,
|
|
3814
|
+
ft as P3,
|
|
3815
|
+
fn as Pagination,
|
|
3816
|
+
En as ProgressBar,
|
|
3817
|
+
Mn as PromptInput,
|
|
3818
|
+
Zs as Radio,
|
|
3819
|
+
Bn as ReasoningBlock,
|
|
3820
|
+
Yn as Scrollable,
|
|
3821
|
+
Gs as SegmentedControl,
|
|
3822
|
+
Rs as Select,
|
|
3823
|
+
mn as SidePage,
|
|
3824
|
+
et as SidePageFooter,
|
|
3825
|
+
qt as Skeleton,
|
|
3826
|
+
Fn as SourcesPanel,
|
|
3827
|
+
Pt as Spinner,
|
|
3828
|
+
dn as Stat,
|
|
3829
|
+
In as StepIndicator,
|
|
3830
|
+
Ss as Stepper,
|
|
3831
|
+
Ln as StreamingText,
|
|
3832
|
+
Us as Tab,
|
|
3833
|
+
en as Table,
|
|
3834
|
+
sn as TableBody,
|
|
3835
|
+
tn as TableHead,
|
|
3836
|
+
nn as TableRow,
|
|
3837
|
+
rn as TableSubheaderRow,
|
|
3838
|
+
Cs as Tabs,
|
|
3839
|
+
on as Td,
|
|
3840
|
+
$s as Textarea,
|
|
3841
|
+
an as Th,
|
|
3842
|
+
Hn as ThinkingDot,
|
|
3843
|
+
Sn as ToastContainer,
|
|
3844
|
+
Xs as Toggle,
|
|
3845
|
+
Wn as TokenCounter,
|
|
3846
|
+
An as ToolCallBubble,
|
|
3847
|
+
An as ToolCallCard,
|
|
3848
|
+
Ve as Tooltip,
|
|
3827
3849
|
$e as defaultStrings,
|
|
3828
|
-
|
|
3850
|
+
ut as formatString,
|
|
3829
3851
|
q as iconSizes,
|
|
3830
|
-
|
|
3831
|
-
|
|
3832
|
-
|
|
3833
|
-
|
|
3852
|
+
ss as useAnimatedNumber,
|
|
3853
|
+
cs as useAnimatedPlaceholder,
|
|
3854
|
+
Gn as useCoachmark,
|
|
3855
|
+
ns as useInView,
|
|
3834
3856
|
be as useLocale,
|
|
3835
|
-
|
|
3836
|
-
|
|
3857
|
+
Kn as useShake,
|
|
3858
|
+
Pn as useStreamScroll,
|
|
3837
3859
|
K as useStrings,
|
|
3838
|
-
|
|
3860
|
+
Rn as useToast
|
|
3839
3861
|
};
|