@donkit-ai/design-system 1.4.74 → 1.4.76
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +3 -3
- package/dist/index.es.js +519 -511
- package/dist/tokens.css +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import q, { useState as
|
|
1
|
+
import q, { useState as B, useRef as R, useEffect as P, useLayoutEffect as nt, forwardRef as Je, useCallback as ce, useContext as ue, createContext as Ze } from "react";
|
|
2
2
|
import { Check as Re, X as ee, ChevronDown as je, Minus as rt, Plus as at, XCircle as Se, AlertTriangle as Ae, CheckCircle as De, Info as Ie, ChevronUp as ot, ChevronsUpDown as it, ChevronLeft as lt, ChevronRight as ct, Copy as dt, Brain as ut, Loader as ft, Paperclip as ze, Square as mt, ArrowUp as pt, Zap as ht, Cpu as Fe, FileText as xt, ThumbsUp as vt, ThumbsDown as _t } from "lucide-react";
|
|
3
|
-
import
|
|
3
|
+
import re from "react-dom";
|
|
4
4
|
const C = {
|
|
5
5
|
1: 16,
|
|
6
6
|
2: 20,
|
|
@@ -59,13 +59,13 @@ function jt() {
|
|
|
59
59
|
return f.$$typeof === F ? null : f.displayName || f.name || null;
|
|
60
60
|
if (typeof f == "string") return f;
|
|
61
61
|
switch (f) {
|
|
62
|
-
case
|
|
62
|
+
case b:
|
|
63
63
|
return "Fragment";
|
|
64
|
-
case
|
|
64
|
+
case N:
|
|
65
65
|
return "Profiler";
|
|
66
66
|
case $:
|
|
67
67
|
return "StrictMode";
|
|
68
|
-
case
|
|
68
|
+
case D:
|
|
69
69
|
return "Suspense";
|
|
70
70
|
case M:
|
|
71
71
|
return "SuspenseList";
|
|
@@ -76,11 +76,11 @@ function jt() {
|
|
|
76
76
|
switch (typeof f.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
|
), f.$$typeof) {
|
|
79
|
-
case
|
|
79
|
+
case w:
|
|
80
80
|
return "Portal";
|
|
81
81
|
case y:
|
|
82
82
|
return f.displayName || "Context";
|
|
83
|
-
case
|
|
83
|
+
case _:
|
|
84
84
|
return (f._context.displayName || "Context") + ".Consumer";
|
|
85
85
|
case S:
|
|
86
86
|
var T = f.render;
|
|
@@ -117,7 +117,7 @@ function jt() {
|
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
119
|
function r(f) {
|
|
120
|
-
if (f ===
|
|
120
|
+
if (f === b) return "<>";
|
|
121
121
|
if (typeof f == "object" && f !== null && f.$$typeof === z)
|
|
122
122
|
return "<...>";
|
|
123
123
|
try {
|
|
@@ -159,10 +159,10 @@ function jt() {
|
|
|
159
159
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
160
160
|
)), f = this.props.ref, f !== void 0 ? f : null;
|
|
161
161
|
}
|
|
162
|
-
function d(f, T, O, Y, te,
|
|
162
|
+
function d(f, T, O, Y, te, ie) {
|
|
163
163
|
var H = O.ref;
|
|
164
164
|
return f = {
|
|
165
|
-
$$typeof:
|
|
165
|
+
$$typeof: h,
|
|
166
166
|
type: f,
|
|
167
167
|
key: T,
|
|
168
168
|
props: O,
|
|
@@ -189,22 +189,22 @@ function jt() {
|
|
|
189
189
|
configurable: !1,
|
|
190
190
|
enumerable: !1,
|
|
191
191
|
writable: !0,
|
|
192
|
-
value:
|
|
192
|
+
value: ie
|
|
193
193
|
}), Object.freeze && (Object.freeze(f.props), Object.freeze(f)), f;
|
|
194
194
|
}
|
|
195
|
-
function u(f, T, O, Y, te,
|
|
195
|
+
function u(f, T, O, Y, te, ie) {
|
|
196
196
|
var H = T.children;
|
|
197
197
|
if (H !== void 0)
|
|
198
198
|
if (Y)
|
|
199
|
-
if (
|
|
199
|
+
if (I(H)) {
|
|
200
200
|
for (Y = 0; Y < H.length; Y++)
|
|
201
|
-
|
|
201
|
+
m(H[Y]);
|
|
202
202
|
Object.freeze && Object.freeze(H);
|
|
203
203
|
} else
|
|
204
204
|
console.error(
|
|
205
205
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
206
206
|
);
|
|
207
|
-
else
|
|
207
|
+
else m(H);
|
|
208
208
|
if (V.call(T, "key")) {
|
|
209
209
|
H = t(f);
|
|
210
210
|
var Q = Object.keys(T).filter(function(ge) {
|
|
@@ -225,8 +225,8 @@ React keys must be passed directly to JSX without using spread:
|
|
|
225
225
|
}
|
|
226
226
|
if (H = null, O !== void 0 && (n(O), H = "" + O), i(T) && (n(T.key), H = "" + T.key), "key" in T) {
|
|
227
227
|
O = {};
|
|
228
|
-
for (var
|
|
229
|
-
|
|
228
|
+
for (var le in T)
|
|
229
|
+
le !== "key" && (O[le] = T[le]);
|
|
230
230
|
} else O = T;
|
|
231
231
|
return H && l(
|
|
232
232
|
O,
|
|
@@ -237,28 +237,28 @@ React keys must be passed directly to JSX without using spread:
|
|
|
237
237
|
O,
|
|
238
238
|
a(),
|
|
239
239
|
te,
|
|
240
|
-
|
|
240
|
+
ie
|
|
241
241
|
);
|
|
242
242
|
}
|
|
243
|
-
function
|
|
244
|
-
|
|
243
|
+
function m(f) {
|
|
244
|
+
x(f) ? f._store && (f._store.validated = 1) : typeof f == "object" && f !== null && f.$$typeof === z && (f._payload.status === "fulfilled" ? x(f._payload.value) && f._payload.value._store && (f._payload.value._store.validated = 1) : f._store && (f._store.validated = 1));
|
|
245
245
|
}
|
|
246
|
-
function
|
|
247
|
-
return typeof f == "object" && f !== null && f.$$typeof ===
|
|
246
|
+
function x(f) {
|
|
247
|
+
return typeof f == "object" && f !== null && f.$$typeof === h;
|
|
248
248
|
}
|
|
249
|
-
var
|
|
249
|
+
var p = q, h = Symbol.for("react.transitional.element"), w = Symbol.for("react.portal"), b = Symbol.for("react.fragment"), $ = Symbol.for("react.strict_mode"), N = Symbol.for("react.profiler"), _ = Symbol.for("react.consumer"), y = Symbol.for("react.context"), S = Symbol.for("react.forward_ref"), D = Symbol.for("react.suspense"), M = Symbol.for("react.suspense_list"), W = Symbol.for("react.memo"), z = Symbol.for("react.lazy"), j = Symbol.for("react.activity"), F = Symbol.for("react.client.reference"), K = p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, V = Object.prototype.hasOwnProperty, I = Array.isArray, v = console.createTask ? console.createTask : function() {
|
|
250
250
|
return null;
|
|
251
251
|
};
|
|
252
|
-
|
|
252
|
+
p = {
|
|
253
253
|
react_stack_bottom_frame: function(f) {
|
|
254
254
|
return f();
|
|
255
255
|
}
|
|
256
256
|
};
|
|
257
|
-
var k, A = {}, U =
|
|
258
|
-
|
|
257
|
+
var k, A = {}, U = p.react_stack_bottom_frame.bind(
|
|
258
|
+
p,
|
|
259
259
|
o
|
|
260
260
|
)(), G = v(r(o)), E = {};
|
|
261
|
-
be.Fragment =
|
|
261
|
+
be.Fragment = b, be.jsx = function(f, T, O) {
|
|
262
262
|
var Y = 1e4 > K.recentlyCreatedOwnerStacks++;
|
|
263
263
|
return u(
|
|
264
264
|
f,
|
|
@@ -295,7 +295,7 @@ function Nt({ size: t = "m", color: s = "default", className: n = "", ...r }) {
|
|
|
295
295
|
);
|
|
296
296
|
}
|
|
297
297
|
const wt = { xs: 12, s: 14, m: 16, l: 20 };
|
|
298
|
-
function
|
|
298
|
+
function oe({
|
|
299
299
|
children: t,
|
|
300
300
|
variant: s = "primary",
|
|
301
301
|
size: n = "m",
|
|
@@ -307,23 +307,23 @@ function ae({
|
|
|
307
307
|
type: c = "button",
|
|
308
308
|
href: d,
|
|
309
309
|
"aria-label": u,
|
|
310
|
-
className:
|
|
311
|
-
...
|
|
310
|
+
className: m = "",
|
|
311
|
+
...x
|
|
312
312
|
}) {
|
|
313
|
-
const
|
|
313
|
+
const p = a && !t, h = i === "loading", w = i === "success", b = i === "error", $ = h || w || b, N = n === "xs" ? "s" : "m", _ = s === "danger" ? "on-accent" : "default", y = wt[n] ?? 16, S = h ? /* @__PURE__ */ e.jsx(Nt, { size: N, color: _ }) : w ? /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(Re, { size: y, strokeWidth: 2.5 }) }) : b ? /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(ee, { size: y, strokeWidth: 2.5 }) }) : null, D = [
|
|
314
314
|
"ds-button",
|
|
315
315
|
`ds-button--${s}`,
|
|
316
316
|
`ds-button--${n}`,
|
|
317
317
|
r && "ds-button--full",
|
|
318
|
-
|
|
319
|
-
|
|
318
|
+
p && "ds-button--icon-only",
|
|
319
|
+
m
|
|
320
320
|
].filter(Boolean).join(" "), M = i !== "idle" ? i : void 0, W = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
321
321
|
$ ? S : a && /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: a }),
|
|
322
322
|
t
|
|
323
323
|
] });
|
|
324
324
|
if (d) {
|
|
325
325
|
const z = (j) => {
|
|
326
|
-
if (o ||
|
|
326
|
+
if (o || h) {
|
|
327
327
|
j.preventDefault();
|
|
328
328
|
return;
|
|
329
329
|
}
|
|
@@ -332,14 +332,14 @@ function ae({
|
|
|
332
332
|
return /* @__PURE__ */ e.jsx(
|
|
333
333
|
"a",
|
|
334
334
|
{
|
|
335
|
-
className:
|
|
336
|
-
href: o ||
|
|
335
|
+
className: D,
|
|
336
|
+
href: o || h ? void 0 : d,
|
|
337
337
|
onClick: z,
|
|
338
338
|
"aria-label": u,
|
|
339
|
-
"aria-disabled": o ||
|
|
340
|
-
"aria-busy":
|
|
339
|
+
"aria-disabled": o || h ? "true" : void 0,
|
|
340
|
+
"aria-busy": h ? "true" : void 0,
|
|
341
341
|
"data-state": M,
|
|
342
|
-
...
|
|
342
|
+
...x,
|
|
343
343
|
children: W
|
|
344
344
|
}
|
|
345
345
|
);
|
|
@@ -348,13 +348,13 @@ function ae({
|
|
|
348
348
|
"button",
|
|
349
349
|
{
|
|
350
350
|
type: c,
|
|
351
|
-
className:
|
|
351
|
+
className: D,
|
|
352
352
|
disabled: o,
|
|
353
|
-
onClick:
|
|
353
|
+
onClick: h ? void 0 : l,
|
|
354
354
|
"aria-label": u,
|
|
355
|
-
"aria-busy":
|
|
355
|
+
"aria-busy": h ? "true" : void 0,
|
|
356
356
|
"data-state": M,
|
|
357
|
-
...
|
|
357
|
+
...x,
|
|
358
358
|
children: W
|
|
359
359
|
}
|
|
360
360
|
);
|
|
@@ -372,19 +372,19 @@ function cs({
|
|
|
372
372
|
id: d,
|
|
373
373
|
...u
|
|
374
374
|
}) {
|
|
375
|
-
const
|
|
375
|
+
const m = d || `input-${q.useId()}`, x = n ? `${m}-hint` : void 0, p = s ? `${m}-error` : void 0, h = p || x;
|
|
376
376
|
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: [
|
|
377
|
-
t && /* @__PURE__ */ e.jsx("label", { className: "ds-input-label", htmlFor:
|
|
377
|
+
t && /* @__PURE__ */ e.jsx("label", { className: "ds-input-label", htmlFor: m, children: t }),
|
|
378
378
|
/* @__PURE__ */ e.jsxs("div", { className: "ds-input-container", children: [
|
|
379
379
|
a && /* @__PURE__ */ e.jsx("span", { className: `ds-input-icon ds-input-icon--${l}`, "aria-hidden": "true", children: a }),
|
|
380
380
|
/* @__PURE__ */ e.jsx(
|
|
381
381
|
"input",
|
|
382
382
|
{
|
|
383
|
-
id:
|
|
383
|
+
id: m,
|
|
384
384
|
className: `ds-input ds-input--${l} ${a ? "ds-input--with-icon" : ""} ${o ? "ds-input--with-icon-right" : ""} ${s ? "ds-input--error" : ""}`,
|
|
385
385
|
disabled: c,
|
|
386
386
|
"aria-invalid": s ? "true" : "false",
|
|
387
|
-
"aria-describedby":
|
|
387
|
+
"aria-describedby": h,
|
|
388
388
|
...u
|
|
389
389
|
}
|
|
390
390
|
),
|
|
@@ -400,8 +400,8 @@ function cs({
|
|
|
400
400
|
}
|
|
401
401
|
)
|
|
402
402
|
] }),
|
|
403
|
-
n && !s && /* @__PURE__ */ e.jsx("span", { id:
|
|
404
|
-
/* @__PURE__ */ e.jsx("div", { className: "ds-input-error-wrap", children: /* @__PURE__ */ e.jsx("div", { className: "ds-input-error-inner", children: s && /* @__PURE__ */ e.jsx("span", { id:
|
|
403
|
+
n && !s && /* @__PURE__ */ e.jsx("span", { id: x, className: "ds-input-hint", children: n }),
|
|
404
|
+
/* @__PURE__ */ e.jsx("div", { className: "ds-input-error-wrap", children: /* @__PURE__ */ e.jsx("div", { className: "ds-input-error-inner", children: s && /* @__PURE__ */ e.jsx("span", { id: p, className: "ds-input-error", role: "alert", children: s }) }) })
|
|
405
405
|
] });
|
|
406
406
|
}
|
|
407
407
|
function ds({
|
|
@@ -416,7 +416,7 @@ function ds({
|
|
|
416
416
|
rows: c = 3,
|
|
417
417
|
...d
|
|
418
418
|
}) {
|
|
419
|
-
const u = i || `textarea-${q.useId()}`,
|
|
419
|
+
const u = i || `textarea-${q.useId()}`, m = n ? `${u}-hint` : void 0, x = s ? `${u}-error` : void 0, p = x || m;
|
|
420
420
|
return /* @__PURE__ */ e.jsxs("div", { className: `ds-textarea-wrapper ${r ? "ds-textarea-wrapper--full" : ""} ${o ? "ds-textarea-wrapper--disabled" : ""}`, children: [
|
|
421
421
|
t && /* @__PURE__ */ e.jsx("label", { className: "ds-textarea-label", htmlFor: u, children: t }),
|
|
422
422
|
/* @__PURE__ */ e.jsx(
|
|
@@ -426,13 +426,13 @@ function ds({
|
|
|
426
426
|
className: `ds-textarea ds-textarea--${a} ${s ? "ds-textarea--error" : ""} ${l ? "" : "ds-textarea--no-resize"}`,
|
|
427
427
|
disabled: o,
|
|
428
428
|
"aria-invalid": s ? "true" : "false",
|
|
429
|
-
"aria-describedby":
|
|
429
|
+
"aria-describedby": p,
|
|
430
430
|
rows: c,
|
|
431
431
|
...d
|
|
432
432
|
}
|
|
433
433
|
),
|
|
434
|
-
n && !s && /* @__PURE__ */ e.jsx("span", { id:
|
|
435
|
-
s && /* @__PURE__ */ e.jsx("span", { id:
|
|
434
|
+
n && !s && /* @__PURE__ */ e.jsx("span", { id: m, className: "ds-textarea-hint", children: n }),
|
|
435
|
+
s && /* @__PURE__ */ e.jsx("span", { id: x, className: "ds-textarea-error", role: "alert", children: s })
|
|
436
436
|
] });
|
|
437
437
|
}
|
|
438
438
|
function us({
|
|
@@ -448,70 +448,70 @@ function us({
|
|
|
448
448
|
id: d,
|
|
449
449
|
...u
|
|
450
450
|
}) {
|
|
451
|
-
const [
|
|
452
|
-
|
|
451
|
+
const [m, x] = B(!1), [p, h] = B(!1), [w, b] = B({}), [$, N] = B("down"), [_, y] = B(-1), S = R(null), D = R(null), M = R(null), W = R(null), z = d || `select-${q.useId()}`, j = `${z}-label`, F = o ? `${z}-error` : void 0, K = 150, V = (E = !1) => {
|
|
452
|
+
p || (h(!0), y(-1), W.current = setTimeout(() => {
|
|
453
453
|
var f;
|
|
454
|
-
|
|
454
|
+
x(!1), h(!1), E && ((f = M.current) == null || f.focus());
|
|
455
455
|
}, K));
|
|
456
|
-
},
|
|
457
|
-
clearTimeout(W.current),
|
|
456
|
+
}, I = (E) => {
|
|
457
|
+
clearTimeout(W.current), h(!1);
|
|
458
458
|
const f = E !== void 0 ? E : Math.max(r.findIndex((T) => T.value === s), 0);
|
|
459
|
-
y(f),
|
|
459
|
+
y(f), x(!0);
|
|
460
460
|
};
|
|
461
461
|
P(() => () => clearTimeout(W.current), []);
|
|
462
462
|
const v = () => {
|
|
463
|
-
var
|
|
464
|
-
const E = (
|
|
463
|
+
var ie;
|
|
464
|
+
const E = (ie = S.current) == null ? void 0 : ie.getBoundingClientRect();
|
|
465
465
|
if (!E) return;
|
|
466
466
|
const f = window.innerHeight, T = f - E.bottom, O = E.top, te = T < 300 && O > T;
|
|
467
|
-
|
|
467
|
+
N(te ? "up" : "down"), b(
|
|
468
468
|
te ? { bottom: f - E.top + 4, left: E.left, width: E.width } : { top: E.bottom + 4, left: E.left, width: E.width }
|
|
469
469
|
);
|
|
470
470
|
};
|
|
471
471
|
P(() => {
|
|
472
|
-
if (
|
|
472
|
+
if (m)
|
|
473
473
|
return v(), window.addEventListener("scroll", v, !0), window.addEventListener("resize", v), () => {
|
|
474
474
|
window.removeEventListener("scroll", v, !0), window.removeEventListener("resize", v);
|
|
475
475
|
};
|
|
476
|
-
}, [
|
|
476
|
+
}, [m]), P(() => {
|
|
477
477
|
const E = (f) => {
|
|
478
|
-
S.current && !S.current.contains(f.target) &&
|
|
478
|
+
S.current && !S.current.contains(f.target) && D.current && !D.current.contains(f.target) && V();
|
|
479
479
|
};
|
|
480
480
|
return document.addEventListener("mousedown", E), () => document.removeEventListener("mousedown", E);
|
|
481
|
-
}, [
|
|
481
|
+
}, [p]), P(() => {
|
|
482
482
|
var f;
|
|
483
|
-
if (!
|
|
484
|
-
(f =
|
|
485
|
-
}, [
|
|
483
|
+
if (!m || _ < 0 || !D.current) return;
|
|
484
|
+
(f = D.current.querySelectorAll(".ds-select-option")[_]) == null || f.scrollIntoView({ block: "nearest" });
|
|
485
|
+
}, [_, m]);
|
|
486
486
|
const k = (E) => {
|
|
487
487
|
switch (E.key) {
|
|
488
488
|
case "ArrowDown":
|
|
489
|
-
E.preventDefault(),
|
|
489
|
+
E.preventDefault(), m ? y((f) => Math.min(f + 1, r.length - 1)) : I();
|
|
490
490
|
break;
|
|
491
491
|
case "ArrowUp":
|
|
492
|
-
E.preventDefault(),
|
|
492
|
+
E.preventDefault(), m ? y((f) => Math.max(f - 1, 0)) : I(r.length - 1);
|
|
493
493
|
break;
|
|
494
494
|
case "Home":
|
|
495
|
-
|
|
495
|
+
m && (E.preventDefault(), y(0));
|
|
496
496
|
break;
|
|
497
497
|
case "End":
|
|
498
|
-
|
|
498
|
+
m && (E.preventDefault(), y(r.length - 1));
|
|
499
499
|
break;
|
|
500
500
|
case "Enter":
|
|
501
501
|
case " ":
|
|
502
|
-
E.preventDefault(),
|
|
502
|
+
E.preventDefault(), m ? _ >= 0 && (n == null || n(r[_].value), V(!0)) : I();
|
|
503
503
|
break;
|
|
504
504
|
case "Escape":
|
|
505
|
-
|
|
505
|
+
m && (E.preventDefault(), V(!0));
|
|
506
506
|
break;
|
|
507
507
|
case "Tab":
|
|
508
|
-
|
|
508
|
+
m && V(!1);
|
|
509
509
|
break;
|
|
510
510
|
}
|
|
511
|
-
}, A = r.find((E) => E.value === s), U = l === "xs" ? C[1] : l === "small" ? C[2] : C[3], G =
|
|
511
|
+
}, A = r.find((E) => E.value === s), U = l === "xs" ? C[1] : l === "small" ? C[2] : C[3], G = m && /* @__PURE__ */ e.jsx(
|
|
512
512
|
"div",
|
|
513
513
|
{
|
|
514
|
-
ref:
|
|
514
|
+
ref: D,
|
|
515
515
|
"data-ds-portal": "",
|
|
516
516
|
role: "listbox",
|
|
517
517
|
"aria-labelledby": t ? j : void 0,
|
|
@@ -520,9 +520,9 @@ function us({
|
|
|
520
520
|
"ds-select-dropdown ds-scrollable",
|
|
521
521
|
`ds-select-dropdown--${l}`,
|
|
522
522
|
`ds-select-dropdown--${$}`,
|
|
523
|
-
|
|
523
|
+
p && "ds-select-dropdown--closing"
|
|
524
524
|
].filter(Boolean).join(" "),
|
|
525
|
-
style:
|
|
525
|
+
style: w,
|
|
526
526
|
children: r.map((E, f) => /* @__PURE__ */ e.jsx(
|
|
527
527
|
"button",
|
|
528
528
|
{
|
|
@@ -535,7 +535,7 @@ function us({
|
|
|
535
535
|
"ds-select-option",
|
|
536
536
|
`ds-select-option--${l}`,
|
|
537
537
|
s === E.value && "ds-select-option--selected",
|
|
538
|
-
f ===
|
|
538
|
+
f === _ && "ds-select-option--active"
|
|
539
539
|
].filter(Boolean).join(" "),
|
|
540
540
|
onClick: () => {
|
|
541
541
|
n == null || n(E.value), V(!0);
|
|
@@ -556,14 +556,14 @@ function us({
|
|
|
556
556
|
id: z,
|
|
557
557
|
role: "combobox",
|
|
558
558
|
"aria-haspopup": "listbox",
|
|
559
|
-
"aria-expanded":
|
|
560
|
-
"aria-activedescendant":
|
|
559
|
+
"aria-expanded": m,
|
|
560
|
+
"aria-activedescendant": m && _ >= 0 ? `${z}-opt-${_}` : void 0,
|
|
561
561
|
"aria-labelledby": t ? j : void 0,
|
|
562
562
|
"aria-invalid": o ? "true" : "false",
|
|
563
563
|
"aria-describedby": F,
|
|
564
564
|
className: `ds-select-trigger ds-select-trigger--${l} ${o ? "ds-select-trigger--error" : ""}`,
|
|
565
565
|
onClick: () => {
|
|
566
|
-
c || (
|
|
566
|
+
c || (m ? V() : I());
|
|
567
567
|
},
|
|
568
568
|
onKeyDown: k,
|
|
569
569
|
disabled: c,
|
|
@@ -575,7 +575,7 @@ function us({
|
|
|
575
575
|
{
|
|
576
576
|
size: U,
|
|
577
577
|
strokeWidth: 1.5,
|
|
578
|
-
className: `ds-select-icon ${
|
|
578
|
+
className: `ds-select-icon ${m && $ === "down" ? "ds-select-icon--open" : ""} ${m && $ === "up" ? "ds-select-icon--up" : ""}`,
|
|
579
579
|
"aria-hidden": "true"
|
|
580
580
|
}
|
|
581
581
|
)
|
|
@@ -583,7 +583,7 @@ function us({
|
|
|
583
583
|
}
|
|
584
584
|
) }),
|
|
585
585
|
o && /* @__PURE__ */ e.jsx("span", { id: F, className: "ds-select-error", role: "alert", children: o }),
|
|
586
|
-
typeof document < "u" &&
|
|
586
|
+
typeof document < "u" && re.createPortal(G, document.body)
|
|
587
587
|
] });
|
|
588
588
|
}
|
|
589
589
|
function fs({
|
|
@@ -599,47 +599,47 @@ function fs({
|
|
|
599
599
|
error: d,
|
|
600
600
|
...u
|
|
601
601
|
}) {
|
|
602
|
-
const
|
|
602
|
+
const m = () => {
|
|
603
603
|
if (l) return;
|
|
604
604
|
const $ = Math.min(Number(s) + o, a);
|
|
605
605
|
n == null || n($);
|
|
606
|
-
},
|
|
606
|
+
}, x = () => {
|
|
607
607
|
if (l) return;
|
|
608
608
|
const $ = Math.max(Number(s) - o, r);
|
|
609
609
|
n == null || n($);
|
|
610
|
-
},
|
|
610
|
+
}, p = ($) => {
|
|
611
611
|
if (l) return;
|
|
612
|
-
const
|
|
613
|
-
if (
|
|
612
|
+
const N = $.target.value;
|
|
613
|
+
if (N === "") {
|
|
614
614
|
n == null || n(r);
|
|
615
615
|
return;
|
|
616
616
|
}
|
|
617
|
-
const
|
|
618
|
-
if (!isNaN(
|
|
619
|
-
const y = Math.min(Math.max(
|
|
617
|
+
const _ = Number(N);
|
|
618
|
+
if (!isNaN(_)) {
|
|
619
|
+
const y = Math.min(Math.max(_, r), a);
|
|
620
620
|
n == null || n(y);
|
|
621
621
|
}
|
|
622
|
-
},
|
|
622
|
+
}, h = [
|
|
623
623
|
"ds-stepper-wrapper",
|
|
624
624
|
l && "ds-stepper-wrapper--disabled",
|
|
625
625
|
d && "ds-stepper-wrapper--error"
|
|
626
|
-
].filter(Boolean).join(" "),
|
|
626
|
+
].filter(Boolean).join(" "), w = [
|
|
627
627
|
"ds-stepper",
|
|
628
628
|
`ds-stepper--${i}`,
|
|
629
629
|
l && "ds-stepper--disabled"
|
|
630
|
-
].filter(Boolean).join(" "),
|
|
631
|
-
return /* @__PURE__ */ e.jsxs("div", { className:
|
|
630
|
+
].filter(Boolean).join(" "), b = i === "xs" ? C[1] : i === "small" ? C[2] : C[3];
|
|
631
|
+
return /* @__PURE__ */ e.jsxs("div", { className: h, children: [
|
|
632
632
|
t && /* @__PURE__ */ e.jsx("label", { className: "ds-stepper-label", children: t }),
|
|
633
|
-
/* @__PURE__ */ e.jsxs("div", { className:
|
|
633
|
+
/* @__PURE__ */ e.jsxs("div", { className: w, children: [
|
|
634
634
|
/* @__PURE__ */ e.jsx(
|
|
635
635
|
"button",
|
|
636
636
|
{
|
|
637
637
|
type: "button",
|
|
638
638
|
className: "ds-stepper-button ds-stepper-button--minus",
|
|
639
|
-
onClick:
|
|
639
|
+
onClick: x,
|
|
640
640
|
disabled: l || s <= r,
|
|
641
641
|
"aria-label": "Decrease",
|
|
642
|
-
children: /* @__PURE__ */ e.jsx(rt, { size:
|
|
642
|
+
children: /* @__PURE__ */ e.jsx(rt, { size: b, strokeWidth: 1.5 })
|
|
643
643
|
}
|
|
644
644
|
),
|
|
645
645
|
/* @__PURE__ */ e.jsx(
|
|
@@ -648,7 +648,7 @@ function fs({
|
|
|
648
648
|
type: "number",
|
|
649
649
|
className: "ds-stepper-input",
|
|
650
650
|
value: s,
|
|
651
|
-
onChange:
|
|
651
|
+
onChange: p,
|
|
652
652
|
min: r,
|
|
653
653
|
max: a,
|
|
654
654
|
step: o,
|
|
@@ -661,10 +661,10 @@ function fs({
|
|
|
661
661
|
{
|
|
662
662
|
type: "button",
|
|
663
663
|
className: "ds-stepper-button ds-stepper-button--plus",
|
|
664
|
-
onClick:
|
|
664
|
+
onClick: m,
|
|
665
665
|
disabled: l || s >= a,
|
|
666
666
|
"aria-label": "Increase",
|
|
667
|
-
children: /* @__PURE__ */ e.jsx(at, { size:
|
|
667
|
+
children: /* @__PURE__ */ e.jsx(at, { size: b, strokeWidth: 1.5 })
|
|
668
668
|
}
|
|
669
669
|
)
|
|
670
670
|
] }),
|
|
@@ -689,36 +689,36 @@ function ms({
|
|
|
689
689
|
d && "ds-card--interactive"
|
|
690
690
|
].filter(Boolean).join(" ");
|
|
691
691
|
if (o) {
|
|
692
|
-
const
|
|
692
|
+
const p = (h) => {
|
|
693
693
|
if (i) {
|
|
694
|
-
|
|
694
|
+
h.preventDefault();
|
|
695
695
|
return;
|
|
696
696
|
}
|
|
697
|
-
|
|
697
|
+
h.metaKey || h.ctrlKey || h.button === 1 || (h.preventDefault(), a == null || a(h));
|
|
698
698
|
};
|
|
699
699
|
return /* @__PURE__ */ e.jsx(
|
|
700
700
|
"a",
|
|
701
701
|
{
|
|
702
702
|
className: u,
|
|
703
703
|
href: i ? void 0 : o,
|
|
704
|
-
onClick:
|
|
704
|
+
onClick: p,
|
|
705
705
|
"aria-disabled": i ? "true" : void 0,
|
|
706
706
|
...l,
|
|
707
707
|
children: t
|
|
708
708
|
}
|
|
709
709
|
);
|
|
710
710
|
}
|
|
711
|
-
const
|
|
711
|
+
const m = d && a ? "button" : "div", x = d && a ? {
|
|
712
712
|
type: "button",
|
|
713
713
|
onClick: a,
|
|
714
714
|
disabled: i
|
|
715
715
|
} : {};
|
|
716
716
|
return /* @__PURE__ */ e.jsx(
|
|
717
|
-
|
|
717
|
+
m,
|
|
718
718
|
{
|
|
719
719
|
className: u,
|
|
720
720
|
role: d && !a ? "article" : void 0,
|
|
721
|
-
...
|
|
721
|
+
...x,
|
|
722
722
|
...l,
|
|
723
723
|
children: t
|
|
724
724
|
}
|
|
@@ -745,7 +745,7 @@ function gt({ children: t, secondary: s = !1, ...n }) {
|
|
|
745
745
|
function Qe({ children: t, secondary: s = !1, ...n }) {
|
|
746
746
|
return /* @__PURE__ */ e.jsx("p", { className: `ds-p3 ${s ? "ds-p3--secondary" : ""}`, ...n, children: t });
|
|
747
747
|
}
|
|
748
|
-
function
|
|
748
|
+
function pe({
|
|
749
749
|
children: t,
|
|
750
750
|
variant: s = "default",
|
|
751
751
|
size: n = "m",
|
|
@@ -800,25 +800,24 @@ function js({
|
|
|
800
800
|
subHeader: o,
|
|
801
801
|
...i
|
|
802
802
|
}) {
|
|
803
|
-
const l = R(null), c = q.useId(), [d, u] =
|
|
803
|
+
const l = R(null), c = q.useId(), [d, u] = B(!1), m = () => {
|
|
804
804
|
!n || d || (u(!0), setTimeout(() => {
|
|
805
805
|
u(!1), n();
|
|
806
806
|
}, kt));
|
|
807
807
|
};
|
|
808
808
|
P(() => {
|
|
809
|
-
const b = (
|
|
810
|
-
|
|
811
|
-
},
|
|
812
|
-
var
|
|
813
|
-
const _ = ((
|
|
814
|
-
l.current && !l.current.contains(_) && !((
|
|
809
|
+
const b = (N) => {
|
|
810
|
+
N.key === "Escape" && m();
|
|
811
|
+
}, $ = (N) => {
|
|
812
|
+
var y, S, D;
|
|
813
|
+
const _ = ((S = (y = N.composedPath) == null ? void 0 : y.call(N)) == null ? void 0 : S[0]) ?? N.target;
|
|
814
|
+
l.current && !l.current.contains(_) && !((D = _.closest) != null && D.call(_, "[data-ds-portal]")) && m();
|
|
815
815
|
};
|
|
816
|
-
return document.addEventListener("keydown", b), document.addEventListener("mousedown",
|
|
817
|
-
document.removeEventListener("keydown", b), document.removeEventListener("mousedown",
|
|
816
|
+
return document.addEventListener("keydown", b), document.addEventListener("mousedown", $), () => {
|
|
817
|
+
document.removeEventListener("keydown", b), document.removeEventListener("mousedown", $);
|
|
818
818
|
};
|
|
819
819
|
}, [n, d]);
|
|
820
|
-
const
|
|
821
|
-
return /* @__PURE__ */ e.jsx("div", { className: ["ds-modal-overlay", d && "ds-modal-overlay--closing"].filter(Boolean).join(" "), ...i, children: /* @__PURE__ */ e.jsxs(
|
|
820
|
+
const x = q.Children.toArray(t), p = x.find((b) => (b == null ? void 0 : b.type) === he), h = x.filter((b) => (b == null ? void 0 : b.type) !== he), w = /* @__PURE__ */ e.jsx("div", { className: ["ds-modal-overlay", d && "ds-modal-overlay--closing"].filter(Boolean).join(" "), ...i, children: /* @__PURE__ */ e.jsxs(
|
|
822
821
|
"div",
|
|
823
822
|
{
|
|
824
823
|
className: [`ds-modal ds-modal--${r}`, a && "ds-modal--scrollable"].filter(Boolean).join(" "),
|
|
@@ -828,13 +827,13 @@ function js({
|
|
|
828
827
|
"aria-labelledby": s ? c : void 0,
|
|
829
828
|
children: [
|
|
830
829
|
n && /* @__PURE__ */ e.jsx(
|
|
831
|
-
|
|
830
|
+
oe,
|
|
832
831
|
{
|
|
833
832
|
className: "ds-modal__close",
|
|
834
833
|
variant: "ghost",
|
|
835
834
|
size: "small",
|
|
836
835
|
icon: /* @__PURE__ */ e.jsx(ee, { size: C[2], strokeWidth: 1.5 }),
|
|
837
|
-
onClick:
|
|
836
|
+
onClick: m,
|
|
838
837
|
"aria-label": "Close modal"
|
|
839
838
|
}
|
|
840
839
|
),
|
|
@@ -842,11 +841,12 @@ function js({
|
|
|
842
841
|
s && /* @__PURE__ */ e.jsx("h3", { id: c, className: "ds-modal__title", children: s }),
|
|
843
842
|
o && /* @__PURE__ */ e.jsx("div", { className: "ds-modal__subheader", children: o })
|
|
844
843
|
] }),
|
|
845
|
-
/* @__PURE__ */ e.jsx("div", { className: "ds-modal__body ds-scrollable", children:
|
|
846
|
-
|
|
844
|
+
/* @__PURE__ */ e.jsx("div", { className: "ds-modal__body ds-scrollable", children: h }),
|
|
845
|
+
p
|
|
847
846
|
]
|
|
848
847
|
}
|
|
849
848
|
) });
|
|
849
|
+
return typeof document > "u" ? w : re.createPortal(w, document.body);
|
|
850
850
|
}
|
|
851
851
|
function he({ children: t }) {
|
|
852
852
|
return !t || q.Children.count(t) === 0 ? null : /* @__PURE__ */ e.jsx("div", { className: "ds-modal__footer", children: t });
|
|
@@ -859,25 +859,24 @@ function Ns({
|
|
|
859
859
|
subHeader: r,
|
|
860
860
|
...a
|
|
861
861
|
}) {
|
|
862
|
-
const o = R(null), i = q.useId(), [l, c] =
|
|
862
|
+
const o = R(null), i = q.useId(), [l, c] = B(!1), d = () => {
|
|
863
863
|
!n || l || (c(!0), setTimeout(() => {
|
|
864
864
|
c(!1), n();
|
|
865
865
|
}, Et));
|
|
866
866
|
};
|
|
867
867
|
P(() => {
|
|
868
|
-
const
|
|
868
|
+
const h = (b) => {
|
|
869
869
|
b.key === "Escape" && d();
|
|
870
|
-
},
|
|
871
|
-
var
|
|
872
|
-
const
|
|
873
|
-
o.current && !o.current.contains(
|
|
870
|
+
}, w = (b) => {
|
|
871
|
+
var N, _, y;
|
|
872
|
+
const $ = ((_ = (N = b.composedPath) == null ? void 0 : N.call(b)) == null ? void 0 : _[0]) ?? b.target;
|
|
873
|
+
o.current && !o.current.contains($) && !((y = $.closest) != null && y.call($, "[data-ds-portal]")) && d();
|
|
874
874
|
};
|
|
875
|
-
return document.addEventListener("keydown",
|
|
876
|
-
document.removeEventListener("keydown",
|
|
875
|
+
return document.addEventListener("keydown", h), document.addEventListener("mousedown", w), () => {
|
|
876
|
+
document.removeEventListener("keydown", h), document.removeEventListener("mousedown", w);
|
|
877
877
|
};
|
|
878
878
|
}, [n, l]);
|
|
879
|
-
const u = q.Children.toArray(t),
|
|
880
|
-
return /* @__PURE__ */ e.jsx(
|
|
879
|
+
const u = q.Children.toArray(t), m = u.find((h) => (h == null ? void 0 : h.type) === he), x = u.filter((h) => (h == null ? void 0 : h.type) !== he), p = /* @__PURE__ */ e.jsx(
|
|
881
880
|
"div",
|
|
882
881
|
{
|
|
883
882
|
className: ["ds-bottom-sheet-overlay", l && "ds-bottom-sheet-overlay--closing"].filter(Boolean).join(" "),
|
|
@@ -893,7 +892,7 @@ function Ns({
|
|
|
893
892
|
children: [
|
|
894
893
|
/* @__PURE__ */ e.jsx("div", { className: "ds-bottom-sheet__handle", "aria-hidden": "true" }),
|
|
895
894
|
n && /* @__PURE__ */ e.jsx(
|
|
896
|
-
|
|
895
|
+
oe,
|
|
897
896
|
{
|
|
898
897
|
className: "ds-bottom-sheet__close",
|
|
899
898
|
variant: "ghost",
|
|
@@ -907,13 +906,14 @@ function Ns({
|
|
|
907
906
|
s && /* @__PURE__ */ e.jsx("h3", { id: i, className: "ds-bottom-sheet__title", children: s }),
|
|
908
907
|
r && /* @__PURE__ */ e.jsx("div", { className: "ds-bottom-sheet__subheader", children: r })
|
|
909
908
|
] }),
|
|
910
|
-
/* @__PURE__ */ e.jsx("div", { className: "ds-bottom-sheet__body ds-scrollable", children:
|
|
911
|
-
|
|
909
|
+
/* @__PURE__ */ e.jsx("div", { className: "ds-bottom-sheet__body ds-scrollable", children: x }),
|
|
910
|
+
m
|
|
912
911
|
]
|
|
913
912
|
}
|
|
914
913
|
)
|
|
915
914
|
}
|
|
916
915
|
);
|
|
916
|
+
return typeof document > "u" ? p : re.createPortal(p, document.body);
|
|
917
917
|
}
|
|
918
918
|
function $t({
|
|
919
919
|
children: t,
|
|
@@ -925,22 +925,22 @@ function $t({
|
|
|
925
925
|
className: i = "",
|
|
926
926
|
...l
|
|
927
927
|
}) {
|
|
928
|
-
const [c, d] =
|
|
929
|
-
u ? a == null || a(!r) : d((
|
|
930
|
-
},
|
|
928
|
+
const [c, d] = B(n), u = r !== void 0, m = u ? r : c, x = () => {
|
|
929
|
+
u ? a == null || a(!r) : d((h) => !h);
|
|
930
|
+
}, p = [
|
|
931
931
|
"ds-code-accordion",
|
|
932
932
|
`ds-code-accordion--${o}`,
|
|
933
|
-
|
|
933
|
+
m && "ds-code-accordion--expanded",
|
|
934
934
|
i
|
|
935
935
|
].filter(Boolean).join(" ");
|
|
936
|
-
return /* @__PURE__ */ e.jsxs("div", { className:
|
|
936
|
+
return /* @__PURE__ */ e.jsxs("div", { className: p, ...l, children: [
|
|
937
937
|
/* @__PURE__ */ e.jsxs(
|
|
938
938
|
"button",
|
|
939
939
|
{
|
|
940
940
|
type: "button",
|
|
941
941
|
className: "ds-code-accordion__header",
|
|
942
|
-
onClick:
|
|
943
|
-
"aria-expanded":
|
|
942
|
+
onClick: x,
|
|
943
|
+
"aria-expanded": m,
|
|
944
944
|
children: [
|
|
945
945
|
/* @__PURE__ */ e.jsx("span", { className: "ds-code-accordion__title", children: s }),
|
|
946
946
|
/* @__PURE__ */ e.jsx(
|
|
@@ -948,7 +948,7 @@ function $t({
|
|
|
948
948
|
{
|
|
949
949
|
size: C[2],
|
|
950
950
|
strokeWidth: 1.5,
|
|
951
|
-
className: `ds-code-accordion__icon ${
|
|
951
|
+
className: `ds-code-accordion__icon ${m ? "ds-code-accordion__icon--expanded" : ""}`
|
|
952
952
|
}
|
|
953
953
|
)
|
|
954
954
|
]
|
|
@@ -985,17 +985,17 @@ function ks({ children: t, selected: s = !1, onClick: n, size: r = "m", variant:
|
|
|
985
985
|
`ds-tab--${a}`,
|
|
986
986
|
s && "ds-tab--selected",
|
|
987
987
|
d && "ds-tab--icon-only"
|
|
988
|
-
].filter(Boolean).join(" "),
|
|
988
|
+
].filter(Boolean).join(" "), m = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
989
989
|
i && /* @__PURE__ */ e.jsx("span", { className: "ds-tab-icon", children: i }),
|
|
990
990
|
t
|
|
991
991
|
] });
|
|
992
992
|
if (l) {
|
|
993
|
-
const
|
|
993
|
+
const x = (p) => {
|
|
994
994
|
if (o) {
|
|
995
|
-
|
|
995
|
+
p.preventDefault();
|
|
996
996
|
return;
|
|
997
997
|
}
|
|
998
|
-
|
|
998
|
+
p.metaKey || p.ctrlKey || p.button === 1 || (p.preventDefault(), n == null || n(p));
|
|
999
999
|
};
|
|
1000
1000
|
return /* @__PURE__ */ e.jsx(
|
|
1001
1001
|
"a",
|
|
@@ -1005,9 +1005,9 @@ function ks({ children: t, selected: s = !1, onClick: n, size: r = "m", variant:
|
|
|
1005
1005
|
"aria-disabled": o ? "true" : void 0,
|
|
1006
1006
|
className: u,
|
|
1007
1007
|
href: o ? void 0 : l,
|
|
1008
|
-
onClick:
|
|
1008
|
+
onClick: x,
|
|
1009
1009
|
...c,
|
|
1010
|
-
children:
|
|
1010
|
+
children: m
|
|
1011
1011
|
}
|
|
1012
1012
|
);
|
|
1013
1013
|
}
|
|
@@ -1020,33 +1020,33 @@ function ks({ children: t, selected: s = !1, onClick: n, size: r = "m", variant:
|
|
|
1020
1020
|
onClick: n,
|
|
1021
1021
|
disabled: o,
|
|
1022
1022
|
...c,
|
|
1023
|
-
children:
|
|
1023
|
+
children: m
|
|
1024
1024
|
}
|
|
1025
1025
|
);
|
|
1026
1026
|
}
|
|
1027
1027
|
function Es({ options: t, value: s, onChange: n, size: r = "m", disabled: a = !1 }) {
|
|
1028
|
-
const o = R(null), i = R(null), [l, c] =
|
|
1028
|
+
const o = R(null), i = R(null), [l, c] = B(!1), d = R(!1), u = R(null), m = R(null), x = () => {
|
|
1029
1029
|
if (!o.current) return;
|
|
1030
|
-
const
|
|
1031
|
-
if (!
|
|
1032
|
-
const
|
|
1033
|
-
i.current ? (i.current.style.transition = d.current ? "left var(--transition-normal), width var(--transition-normal)" : "none", i.current.style.left =
|
|
1030
|
+
const p = o.current.querySelector(`[data-value="${s}"]`);
|
|
1031
|
+
if (!p) return;
|
|
1032
|
+
const h = o.current.getBoundingClientRect(), w = p.getBoundingClientRect(), b = w.left - h.left, $ = w.width;
|
|
1033
|
+
i.current ? (i.current.style.transition = d.current ? "left var(--transition-normal), width var(--transition-normal)" : "none", i.current.style.left = b + "px", i.current.style.width = $ + "px", d.current = !1) : (c(!0), requestAnimationFrame(() => {
|
|
1034
1034
|
if (!i.current || !o.current) return;
|
|
1035
|
-
const
|
|
1036
|
-
if (!
|
|
1037
|
-
const
|
|
1038
|
-
i.current.style.transition = "none", i.current.style.left = y.left -
|
|
1035
|
+
const N = o.current.querySelector(`[data-value="${s}"]`);
|
|
1036
|
+
if (!N) return;
|
|
1037
|
+
const _ = o.current.getBoundingClientRect(), y = N.getBoundingClientRect();
|
|
1038
|
+
i.current.style.transition = "none", i.current.style.left = y.left - _.left + "px", i.current.style.width = y.width + "px";
|
|
1039
1039
|
}));
|
|
1040
1040
|
};
|
|
1041
|
-
return
|
|
1042
|
-
const
|
|
1043
|
-
u.current = s, d.current = l &&
|
|
1041
|
+
return m.current = x, nt(() => {
|
|
1042
|
+
const p = u.current !== s;
|
|
1043
|
+
u.current = s, d.current = l && p, x();
|
|
1044
1044
|
}), P(() => {
|
|
1045
1045
|
if (!o.current) return;
|
|
1046
|
-
const
|
|
1047
|
-
d.current = !1,
|
|
1046
|
+
const p = new ResizeObserver(() => {
|
|
1047
|
+
d.current = !1, m.current();
|
|
1048
1048
|
});
|
|
1049
|
-
return
|
|
1049
|
+
return p.observe(o.current), () => p.disconnect();
|
|
1050
1050
|
}, []), /* @__PURE__ */ e.jsxs(
|
|
1051
1051
|
"div",
|
|
1052
1052
|
{
|
|
@@ -1066,21 +1066,21 @@ function Es({ options: t, value: s, onChange: n, size: r = "m", disabled: a = !1
|
|
|
1066
1066
|
"aria-hidden": "true"
|
|
1067
1067
|
}
|
|
1068
1068
|
),
|
|
1069
|
-
t.map((
|
|
1069
|
+
t.map((p) => /* @__PURE__ */ e.jsxs(
|
|
1070
1070
|
"button",
|
|
1071
1071
|
{
|
|
1072
1072
|
type: "button",
|
|
1073
|
-
"data-value":
|
|
1074
|
-
className: ["ds-seg__btn", s ===
|
|
1075
|
-
onClick: () => !a && n(
|
|
1076
|
-
"aria-pressed": s ===
|
|
1073
|
+
"data-value": p.value,
|
|
1074
|
+
className: ["ds-seg__btn", s === p.value && "ds-seg__btn--active"].filter(Boolean).join(" "),
|
|
1075
|
+
onClick: () => !a && n(p.value),
|
|
1076
|
+
"aria-pressed": s === p.value,
|
|
1077
1077
|
disabled: a,
|
|
1078
1078
|
children: [
|
|
1079
|
-
|
|
1080
|
-
|
|
1079
|
+
p.icon && /* @__PURE__ */ e.jsx("span", { className: "ds-seg__btn-icon", "aria-hidden": "true", children: p.icon }),
|
|
1080
|
+
p.label
|
|
1081
1081
|
]
|
|
1082
1082
|
},
|
|
1083
|
-
|
|
1083
|
+
p.value
|
|
1084
1084
|
))
|
|
1085
1085
|
]
|
|
1086
1086
|
}
|
|
@@ -1095,20 +1095,20 @@ function Be({
|
|
|
1095
1095
|
padding: o = "m",
|
|
1096
1096
|
...i
|
|
1097
1097
|
}) {
|
|
1098
|
-
const [l, c] =
|
|
1099
|
-
d ? a == null || a(!r) : c((
|
|
1100
|
-
},
|
|
1098
|
+
const [l, c] = B(n), d = r !== void 0, u = d ? r : l, m = () => {
|
|
1099
|
+
d ? a == null || a(!r) : c((p) => !p);
|
|
1100
|
+
}, x = [
|
|
1101
1101
|
"ds-accordion",
|
|
1102
1102
|
`ds-accordion--${o}`,
|
|
1103
1103
|
u && "ds-accordion--expanded"
|
|
1104
1104
|
].filter(Boolean).join(" ");
|
|
1105
|
-
return /* @__PURE__ */ e.jsxs("div", { className:
|
|
1105
|
+
return /* @__PURE__ */ e.jsxs("div", { className: x, ...i, children: [
|
|
1106
1106
|
/* @__PURE__ */ e.jsxs(
|
|
1107
1107
|
"button",
|
|
1108
1108
|
{
|
|
1109
1109
|
type: "button",
|
|
1110
1110
|
className: "ds-accordion__header",
|
|
1111
|
-
onClick:
|
|
1111
|
+
onClick: m,
|
|
1112
1112
|
"aria-expanded": u,
|
|
1113
1113
|
children: [
|
|
1114
1114
|
/* @__PURE__ */ e.jsx("span", { className: "ds-accordion__title", children: s }),
|
|
@@ -1126,46 +1126,46 @@ function Be({
|
|
|
1126
1126
|
/* @__PURE__ */ e.jsx("div", { className: "ds-accordion__content", children: /* @__PURE__ */ e.jsx("div", { className: "ds-accordion__content-inner", children: /* @__PURE__ */ e.jsx("div", { className: "ds-accordion__content-body", children: t }) }) })
|
|
1127
1127
|
] });
|
|
1128
1128
|
}
|
|
1129
|
-
const
|
|
1129
|
+
const ae = 8, me = 8;
|
|
1130
1130
|
function Tt(t, s, n) {
|
|
1131
1131
|
const r = window.innerWidth;
|
|
1132
1132
|
let a, o;
|
|
1133
1133
|
switch (t) {
|
|
1134
1134
|
case "top":
|
|
1135
|
-
a = s.top - n.height -
|
|
1135
|
+
a = s.top - n.height - ae, o = s.left + s.width / 2 - n.width / 2;
|
|
1136
1136
|
break;
|
|
1137
1137
|
case "bottom":
|
|
1138
|
-
a = s.bottom +
|
|
1138
|
+
a = s.bottom + ae, o = s.left + s.width / 2 - n.width / 2;
|
|
1139
1139
|
break;
|
|
1140
1140
|
case "left":
|
|
1141
|
-
a = s.top + s.height / 2 - n.height / 2, o = s.left - n.width -
|
|
1141
|
+
a = s.top + s.height / 2 - n.height / 2, o = s.left - n.width - ae;
|
|
1142
1142
|
break;
|
|
1143
1143
|
case "right":
|
|
1144
|
-
a = s.top + s.height / 2 - n.height / 2, o = s.right +
|
|
1144
|
+
a = s.top + s.height / 2 - n.height / 2, o = s.right + ae;
|
|
1145
1145
|
break;
|
|
1146
1146
|
default:
|
|
1147
|
-
a = s.bottom +
|
|
1147
|
+
a = s.bottom + ae, o = s.left;
|
|
1148
1148
|
}
|
|
1149
|
-
const i = Math.max(
|
|
1149
|
+
const i = Math.max(me, Math.min(r - n.width - me, o)), l = o - i;
|
|
1150
1150
|
return { top: a, left: i, arrowOffset: l };
|
|
1151
1151
|
}
|
|
1152
1152
|
function Rt(t, s, n) {
|
|
1153
1153
|
const r = window.innerWidth, a = window.innerHeight;
|
|
1154
|
-
if (t.top >= s +
|
|
1155
|
-
if (a - t.bottom >= s +
|
|
1156
|
-
if (r - t.right >= n +
|
|
1157
|
-
if (t.left >= n +
|
|
1154
|
+
if (t.top >= s + ae + me) return "top";
|
|
1155
|
+
if (a - t.bottom >= s + ae + me) return "bottom";
|
|
1156
|
+
if (r - t.right >= n + ae + me) return "right";
|
|
1157
|
+
if (t.left >= n + ae + me) return "left";
|
|
1158
1158
|
const o = Math.max(t.top, a - t.bottom, t.left, r - t.right);
|
|
1159
1159
|
return o === t.top ? "top" : o === a - t.bottom ? "bottom" : o === r - t.right ? "right" : "left";
|
|
1160
1160
|
}
|
|
1161
1161
|
function Le({ children: t, content: s, position: n, ...r }) {
|
|
1162
|
-
const [a, o] =
|
|
1163
|
-
if (!u.current || !
|
|
1164
|
-
const
|
|
1162
|
+
const [a, o] = B(!1), [i, l] = B({ visibility: "hidden" }), [c, d] = B(n || "top"), u = R(null), m = R(null), x = R(!1), p = () => {
|
|
1163
|
+
if (!u.current || !m.current) return;
|
|
1164
|
+
const w = u.current.getBoundingClientRect(), b = m.current.getBoundingClientRect(), $ = n || Rt(w, b.height, b.width), { top: N, left: _, arrowOffset: y } = Tt($, w, b);
|
|
1165
1165
|
d($), l({
|
|
1166
1166
|
position: "fixed",
|
|
1167
|
-
top:
|
|
1168
|
-
left:
|
|
1167
|
+
top: N,
|
|
1168
|
+
left: _,
|
|
1169
1169
|
visibility: "visible",
|
|
1170
1170
|
"--arrow-offset": `${y}px`
|
|
1171
1171
|
});
|
|
@@ -1173,21 +1173,21 @@ function Le({ children: t, content: s, position: n, ...r }) {
|
|
|
1173
1173
|
if (P(() => {
|
|
1174
1174
|
if (!a) return;
|
|
1175
1175
|
l({ position: "fixed", visibility: "hidden" });
|
|
1176
|
-
const
|
|
1177
|
-
return window.addEventListener("scroll",
|
|
1178
|
-
cancelAnimationFrame(
|
|
1176
|
+
const w = requestAnimationFrame(p);
|
|
1177
|
+
return window.addEventListener("scroll", p, !0), window.addEventListener("resize", p), () => {
|
|
1178
|
+
cancelAnimationFrame(w), window.removeEventListener("scroll", p, !0), window.removeEventListener("resize", p);
|
|
1179
1179
|
};
|
|
1180
1180
|
}, [a, n]), P(() => {
|
|
1181
1181
|
if (!a) return;
|
|
1182
|
-
const
|
|
1183
|
-
u.current && !u.current.contains(
|
|
1182
|
+
const w = (b) => {
|
|
1183
|
+
u.current && !u.current.contains(b.target) && o(!1);
|
|
1184
1184
|
};
|
|
1185
|
-
return document.addEventListener("touchstart",
|
|
1185
|
+
return document.addEventListener("touchstart", w), () => document.removeEventListener("touchstart", w);
|
|
1186
1186
|
}, [a]), !s) return t;
|
|
1187
|
-
const
|
|
1187
|
+
const h = a && /* @__PURE__ */ e.jsx(
|
|
1188
1188
|
"div",
|
|
1189
1189
|
{
|
|
1190
|
-
ref:
|
|
1190
|
+
ref: m,
|
|
1191
1191
|
"data-ds-portal": "",
|
|
1192
1192
|
className: `ds-tooltip ds-tooltip--${c}`,
|
|
1193
1193
|
role: "tooltip",
|
|
@@ -1201,18 +1201,18 @@ function Le({ children: t, content: s, position: n, ...r }) {
|
|
|
1201
1201
|
ref: u,
|
|
1202
1202
|
className: "ds-tooltip-wrapper",
|
|
1203
1203
|
onMouseEnter: () => {
|
|
1204
|
-
|
|
1204
|
+
x.current || o(!0);
|
|
1205
1205
|
},
|
|
1206
1206
|
onMouseLeave: () => {
|
|
1207
|
-
|
|
1207
|
+
x.current || o(!1);
|
|
1208
1208
|
},
|
|
1209
1209
|
onTouchStart: () => {
|
|
1210
|
-
|
|
1210
|
+
x.current = !0, o((w) => !w);
|
|
1211
1211
|
},
|
|
1212
1212
|
...r,
|
|
1213
1213
|
children: [
|
|
1214
1214
|
t,
|
|
1215
|
-
typeof document < "u" &&
|
|
1215
|
+
typeof document < "u" && re.createPortal(h, document.body)
|
|
1216
1216
|
]
|
|
1217
1217
|
}
|
|
1218
1218
|
);
|
|
@@ -1310,7 +1310,7 @@ function Rs({
|
|
|
1310
1310
|
id: d,
|
|
1311
1311
|
className: "ds-radio__input",
|
|
1312
1312
|
checked: t,
|
|
1313
|
-
onChange: (
|
|
1313
|
+
onChange: (m) => s == null ? void 0 : s(m.target.checked),
|
|
1314
1314
|
disabled: r,
|
|
1315
1315
|
name: o,
|
|
1316
1316
|
value: i,
|
|
@@ -1364,7 +1364,7 @@ function It(t) {
|
|
|
1364
1364
|
return s.length >= 2 ? (s[0][0] + s[1][0]).toUpperCase() : t[0].toUpperCase();
|
|
1365
1365
|
}
|
|
1366
1366
|
function Ss({ seed: t, icon: s, src: n, size: r = 32, className: a = "", style: o = {}, ...i }) {
|
|
1367
|
-
const l = Dt(t ?? ""), [c, d] =
|
|
1367
|
+
const l = Dt(t ?? ""), [c, d] = B(!1), u = s ?? /* @__PURE__ */ e.jsx("span", { className: "ds-avatar__initials", children: It(t) });
|
|
1368
1368
|
return /* @__PURE__ */ e.jsx(
|
|
1369
1369
|
"div",
|
|
1370
1370
|
{
|
|
@@ -1509,7 +1509,7 @@ function Fs({
|
|
|
1509
1509
|
style: c,
|
|
1510
1510
|
...d
|
|
1511
1511
|
}) {
|
|
1512
|
-
const u = q.useId(),
|
|
1512
|
+
const u = q.useId(), m = o ?? u, x = `${m}-hint`, p = `${m}-error`;
|
|
1513
1513
|
return /* @__PURE__ */ e.jsxs(
|
|
1514
1514
|
"div",
|
|
1515
1515
|
{
|
|
@@ -1520,10 +1520,10 @@ function Fs({
|
|
|
1520
1520
|
style: c,
|
|
1521
1521
|
...d,
|
|
1522
1522
|
children: [
|
|
1523
|
-
t && /* @__PURE__ */ e.jsx("label", { className: "ds-field-label", htmlFor:
|
|
1523
|
+
t && /* @__PURE__ */ e.jsx("label", { className: "ds-field-label", htmlFor: m, children: t }),
|
|
1524
1524
|
/* @__PURE__ */ e.jsx("div", { className: "ds-field-control", children: i }),
|
|
1525
|
-
s && !n && /* @__PURE__ */ e.jsx("p", { className: "ds-field-hint", id:
|
|
1526
|
-
n && /* @__PURE__ */ e.jsx("p", { className: "ds-field-error", id:
|
|
1525
|
+
s && !n && /* @__PURE__ */ e.jsx("p", { className: "ds-field-hint", id: x, children: s }),
|
|
1526
|
+
n && /* @__PURE__ */ e.jsx("p", { className: "ds-field-error", id: p, role: "alert", children: n })
|
|
1527
1527
|
]
|
|
1528
1528
|
}
|
|
1529
1529
|
);
|
|
@@ -1648,28 +1648,27 @@ function Us({
|
|
|
1648
1648
|
keepOpenRef: c,
|
|
1649
1649
|
...d
|
|
1650
1650
|
}) {
|
|
1651
|
-
const u = R(null),
|
|
1652
|
-
!n ||
|
|
1653
|
-
|
|
1651
|
+
const u = R(null), m = q.useId(), [x, p] = B(!1), h = () => {
|
|
1652
|
+
!n || x || (p(!0), setTimeout(() => {
|
|
1653
|
+
p(!1), n();
|
|
1654
1654
|
}, Lt));
|
|
1655
1655
|
};
|
|
1656
1656
|
P(() => {
|
|
1657
|
-
const _ = (
|
|
1658
|
-
|
|
1659
|
-
},
|
|
1660
|
-
var
|
|
1661
|
-
const
|
|
1662
|
-
(
|
|
1657
|
+
const _ = (S) => {
|
|
1658
|
+
S.key === "Escape" && h();
|
|
1659
|
+
}, y = (S) => {
|
|
1660
|
+
var M, W, z, j;
|
|
1661
|
+
const D = ((W = (M = S.composedPath) == null ? void 0 : M.call(S)) == null ? void 0 : W[0]) ?? S.target;
|
|
1662
|
+
(z = c == null ? void 0 : c.current) != null && z.contains(D) || u.current && !u.current.contains(D) && !((j = D.closest) != null && j.call(D, "[data-ds-portal]")) && h();
|
|
1663
1663
|
};
|
|
1664
|
-
return document.addEventListener("keydown", _), document.addEventListener("mousedown",
|
|
1665
|
-
document.removeEventListener("keydown", _), document.removeEventListener("mousedown",
|
|
1664
|
+
return document.addEventListener("keydown", _), document.addEventListener("mousedown", y), () => {
|
|
1665
|
+
document.removeEventListener("keydown", _), document.removeEventListener("mousedown", y);
|
|
1666
1666
|
};
|
|
1667
|
-
}, [n,
|
|
1668
|
-
const
|
|
1669
|
-
return /* @__PURE__ */ e.jsx(
|
|
1667
|
+
}, [n, x, c]);
|
|
1668
|
+
const w = q.Children.toArray(t), b = w.find((_) => (_ == null ? void 0 : _.type) === Oe || (_ == null ? void 0 : _.type) === he), $ = w.filter((_) => (_ == null ? void 0 : _.type) !== Oe && (_ == null ? void 0 : _.type) !== he), N = /* @__PURE__ */ e.jsx(
|
|
1670
1669
|
"div",
|
|
1671
1670
|
{
|
|
1672
|
-
className: ["ds-side-page-overlay",
|
|
1671
|
+
className: ["ds-side-page-overlay", x && "ds-side-page-overlay--closing"].filter(Boolean).join(" "),
|
|
1673
1672
|
"data-side": a,
|
|
1674
1673
|
style: { "--ds-side-page-offset-left": `${i}px`, "--ds-side-page-offset-right": `${l}px` },
|
|
1675
1674
|
...d,
|
|
@@ -1677,35 +1676,36 @@ function Us({
|
|
|
1677
1676
|
"div",
|
|
1678
1677
|
{
|
|
1679
1678
|
ref: u,
|
|
1680
|
-
className: ["ds-side-page",
|
|
1679
|
+
className: ["ds-side-page", x && "ds-side-page--closing"].filter(Boolean).join(" "),
|
|
1681
1680
|
"data-side": a,
|
|
1682
1681
|
"data-size": o,
|
|
1683
1682
|
role: "dialog",
|
|
1684
1683
|
"aria-modal": "true",
|
|
1685
|
-
"aria-labelledby": s ?
|
|
1684
|
+
"aria-labelledby": s ? m : void 0,
|
|
1686
1685
|
children: [
|
|
1687
1686
|
n && /* @__PURE__ */ e.jsx(
|
|
1688
|
-
|
|
1687
|
+
oe,
|
|
1689
1688
|
{
|
|
1690
1689
|
className: "ds-side-page__close",
|
|
1691
1690
|
variant: "ghost",
|
|
1692
1691
|
size: "small",
|
|
1693
1692
|
icon: /* @__PURE__ */ e.jsx(ee, { size: C[2], strokeWidth: 1.5 }),
|
|
1694
|
-
onClick:
|
|
1693
|
+
onClick: h,
|
|
1695
1694
|
"aria-label": "Close"
|
|
1696
1695
|
}
|
|
1697
1696
|
),
|
|
1698
1697
|
(s || r) && /* @__PURE__ */ e.jsxs("div", { className: "ds-side-page__header", children: [
|
|
1699
|
-
s && /* @__PURE__ */ e.jsx("h3", { id:
|
|
1698
|
+
s && /* @__PURE__ */ e.jsx("h3", { id: m, className: "ds-side-page__title", children: s }),
|
|
1700
1699
|
r && /* @__PURE__ */ e.jsx("div", { className: "ds-side-page__subheader", children: r })
|
|
1701
1700
|
] }),
|
|
1702
1701
|
/* @__PURE__ */ e.jsx("div", { className: "ds-side-page__body ds-scrollable", children: $ }),
|
|
1703
|
-
|
|
1702
|
+
b
|
|
1704
1703
|
]
|
|
1705
1704
|
}
|
|
1706
1705
|
)
|
|
1707
1706
|
}
|
|
1708
1707
|
);
|
|
1708
|
+
return typeof document > "u" ? N : re.createPortal(N, document.body);
|
|
1709
1709
|
}
|
|
1710
1710
|
function Oe({ children: t }) {
|
|
1711
1711
|
return !t || q.Children.count(t) === 0 ? null : /* @__PURE__ */ e.jsx("div", { className: "ds-side-page__footer", children: t });
|
|
@@ -1724,8 +1724,8 @@ const ve = Ze({ collapsed: !1, side: "left" }), we = Ze(!1), Vs = Je(function({
|
|
|
1724
1724
|
n && "ds-nav-rail--collapsed",
|
|
1725
1725
|
`ds-nav-rail--${r}`,
|
|
1726
1726
|
i
|
|
1727
|
-
].filter(Boolean).join(" "), u =
|
|
1728
|
-
if (!
|
|
1727
|
+
].filter(Boolean).join(" "), u = ce((m) => {
|
|
1728
|
+
if (!m.target.closest('button, a, input, select, textarea, [role="button"], [tabindex]')) {
|
|
1729
1729
|
if (n && a) {
|
|
1730
1730
|
a();
|
|
1731
1731
|
return;
|
|
@@ -1758,9 +1758,9 @@ function Ys({
|
|
|
1758
1758
|
open: c = !1,
|
|
1759
1759
|
onboarding: d = !1,
|
|
1760
1760
|
className: u = "",
|
|
1761
|
-
...
|
|
1761
|
+
...m
|
|
1762
1762
|
}) {
|
|
1763
|
-
const { collapsed:
|
|
1763
|
+
const { collapsed: x, side: p } = ue(ve), h = ue(we), $ = {
|
|
1764
1764
|
className: [
|
|
1765
1765
|
"ds-nav-rail__item",
|
|
1766
1766
|
u
|
|
@@ -1768,7 +1768,7 @@ function Ys({
|
|
|
1768
1768
|
onClick: r ? void 0 : o,
|
|
1769
1769
|
"aria-current": n ? "page" : void 0,
|
|
1770
1770
|
"aria-disabled": r ? "true" : void 0,
|
|
1771
|
-
"aria-label":
|
|
1771
|
+
"aria-label": x ? s : void 0,
|
|
1772
1772
|
tabIndex: r ? -1 : void 0,
|
|
1773
1773
|
...{
|
|
1774
1774
|
"data-selected": n || void 0,
|
|
@@ -1776,15 +1776,23 @@ function Ys({
|
|
|
1776
1776
|
"data-open": c || void 0,
|
|
1777
1777
|
"data-onboarding": d || void 0
|
|
1778
1778
|
},
|
|
1779
|
-
...
|
|
1780
|
-
},
|
|
1779
|
+
...m
|
|
1780
|
+
}, N = i != null, _ = p === "left" ? "right" : "left", y = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1781
1781
|
/* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__icon", "aria-hidden": "true", children: t }),
|
|
1782
|
-
!
|
|
1783
|
-
!
|
|
1784
|
-
|
|
1785
|
-
|
|
1782
|
+
!x && /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__label", children: s }),
|
|
1783
|
+
!x && N && /* @__PURE__ */ e.jsx(
|
|
1784
|
+
"span",
|
|
1785
|
+
{
|
|
1786
|
+
className: ["ds-nav-rail__count", i === 0 && "ds-nav-rail__count--zero"].filter(Boolean).join(" "),
|
|
1787
|
+
"data-updated": l && i !== 0 || void 0,
|
|
1788
|
+
children: i
|
|
1789
|
+
}
|
|
1790
|
+
),
|
|
1791
|
+
!x && l && (!N || i === 0) && /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__dot ds-nav-rail__dot--inline", "aria-hidden": "true" }),
|
|
1792
|
+
x && N && i !== 0 && /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__count-collapsed", "data-updated": l || void 0, children: i > 99 ? "99+" : i }),
|
|
1793
|
+
x && l && (!N || i === 0) && /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__dot", "aria-hidden": "true" })
|
|
1786
1794
|
] }), S = a ? /* @__PURE__ */ e.jsx("a", { href: r ? void 0 : a, ...$, children: y }) : /* @__PURE__ */ e.jsx("button", { type: "button", ...$, children: y });
|
|
1787
|
-
return
|
|
1795
|
+
return x && !h ? /* @__PURE__ */ e.jsx(Le, { content: s, position: _, children: S }) : S;
|
|
1788
1796
|
}
|
|
1789
1797
|
function Hs({ children: t, className: s = "", ...n }) {
|
|
1790
1798
|
return /* @__PURE__ */ e.jsx("div", { className: ["ds-nav-rail__body", "ds-scrollable", s].filter(Boolean).join(" "), ...n, children: t });
|
|
@@ -1799,7 +1807,7 @@ function Ks({ className: t = "", ...s }) {
|
|
|
1799
1807
|
return /* @__PURE__ */ e.jsx("hr", { className: ["ds-nav-rail__divider", t].filter(Boolean).join(" "), ...s });
|
|
1800
1808
|
}
|
|
1801
1809
|
function Xs({ children: t, label: s = "Recents", defaultOpen: n = !0, className: r = "", ...a }) {
|
|
1802
|
-
const { collapsed: o } =
|
|
1810
|
+
const { collapsed: o } = ue(ve), [i, l] = B(n);
|
|
1803
1811
|
return /* @__PURE__ */ e.jsxs("div", { className: ["ds-nav-rail__recents", r].filter(Boolean).join(" "), ...a, children: [
|
|
1804
1812
|
!o && /* @__PURE__ */ e.jsxs(
|
|
1805
1813
|
"button",
|
|
@@ -1824,28 +1832,28 @@ const Js = Je(function({
|
|
|
1824
1832
|
className: a = "",
|
|
1825
1833
|
...o
|
|
1826
1834
|
}, i) {
|
|
1827
|
-
const { collapsed: l, side: c } =
|
|
1835
|
+
const { collapsed: l, side: c } = ue(ve), d = ue(we), u = c === "left" ? "right" : "left", m = [
|
|
1828
1836
|
"ds-nav-rail__item",
|
|
1829
1837
|
"ds-nav-rail__agent",
|
|
1830
1838
|
a
|
|
1831
|
-
].filter(Boolean).join(" "),
|
|
1839
|
+
].filter(Boolean).join(" "), x = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1832
1840
|
/* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__icon", "aria-hidden": "true", children: n }),
|
|
1833
1841
|
!l && /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__label", children: r })
|
|
1834
|
-
] }),
|
|
1842
|
+
] }), p = /* @__PURE__ */ e.jsx(
|
|
1835
1843
|
s,
|
|
1836
1844
|
{
|
|
1837
1845
|
ref: i,
|
|
1838
|
-
className:
|
|
1846
|
+
className: m,
|
|
1839
1847
|
"aria-label": l ? r : void 0,
|
|
1840
1848
|
...s === "button" ? { type: "button" } : {},
|
|
1841
1849
|
...o,
|
|
1842
|
-
children:
|
|
1850
|
+
children: x
|
|
1843
1851
|
}
|
|
1844
1852
|
);
|
|
1845
|
-
return l && !d ? /* @__PURE__ */ e.jsx(Le, { content: r, position: u, children:
|
|
1853
|
+
return l && !d ? /* @__PURE__ */ e.jsx(Le, { content: r, position: u, children: p }) : p;
|
|
1846
1854
|
});
|
|
1847
1855
|
function Zs({ avatar: t, label: s, selected: n = !1, disabled: r = !1, href: a, onClick: o, className: i = "", ...l }) {
|
|
1848
|
-
const { collapsed: c, side: d } =
|
|
1856
|
+
const { collapsed: c, side: d } = ue(ve), u = ue(we), p = {
|
|
1849
1857
|
className: [
|
|
1850
1858
|
"ds-nav-rail__item",
|
|
1851
1859
|
"ds-nav-rail__agent",
|
|
@@ -1860,11 +1868,11 @@ function Zs({ avatar: t, label: s, selected: n = !1, disabled: r = !1, href: a,
|
|
|
1860
1868
|
"data-disabled": r || void 0
|
|
1861
1869
|
},
|
|
1862
1870
|
...l
|
|
1863
|
-
},
|
|
1871
|
+
}, h = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1864
1872
|
/* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__icon", "aria-hidden": "true", children: t }),
|
|
1865
1873
|
!c && /* @__PURE__ */ e.jsx("span", { className: "ds-nav-rail__label", children: s })
|
|
1866
|
-
] }),
|
|
1867
|
-
return c && !u ? /* @__PURE__ */ e.jsx(Le, { content: s, position:
|
|
1874
|
+
] }), w = d === "left" ? "right" : "left", b = a ? /* @__PURE__ */ e.jsx("a", { href: r ? void 0 : a, ...p, children: h }) : /* @__PURE__ */ e.jsx("button", { type: "button", ...p, children: h });
|
|
1875
|
+
return c && !u ? /* @__PURE__ */ e.jsx(Le, { content: s, position: w, children: b }) : b;
|
|
1868
1876
|
}
|
|
1869
1877
|
const Ue = 240, Ve = 6, Ye = 8;
|
|
1870
1878
|
function Qs({
|
|
@@ -1875,16 +1883,16 @@ function Qs({
|
|
|
1875
1883
|
onOpenChange: a,
|
|
1876
1884
|
defaultOpen: o = !1
|
|
1877
1885
|
}) {
|
|
1878
|
-
const { side: i } =
|
|
1886
|
+
const { side: i } = ue(ve), [l, c] = B(o), d = r !== void 0, u = d ? r : l, [m, x] = B(!1), p = R(null), h = R(null), [w, b] = B({}), $ = ce(() => {
|
|
1879
1887
|
d ? a == null || a(!0) : c(!0);
|
|
1880
|
-
}, [d, a]),
|
|
1888
|
+
}, [d, a]), N = ce(() => {
|
|
1881
1889
|
d ? a == null || a(!1) : c(!1);
|
|
1882
|
-
}, [d, a]),
|
|
1890
|
+
}, [d, a]), _ = ce(() => u ? N() : $(), [u, $, N]), y = ce(() => {
|
|
1883
1891
|
var F;
|
|
1884
|
-
const
|
|
1885
|
-
if (!
|
|
1886
|
-
const M =
|
|
1887
|
-
|
|
1892
|
+
const D = p.current;
|
|
1893
|
+
if (!D) return;
|
|
1894
|
+
const M = D.getBoundingClientRect(), W = window.innerHeight, z = ((F = h.current) == null ? void 0 : F.offsetHeight) ?? 300, j = Math.max(Ye, Math.min(W - z - Ye, M.top));
|
|
1895
|
+
b(i === "right" ? {
|
|
1888
1896
|
position: "fixed",
|
|
1889
1897
|
top: j,
|
|
1890
1898
|
right: window.innerWidth - M.left + Ve,
|
|
@@ -1898,34 +1906,34 @@ function Qs({
|
|
|
1898
1906
|
}, [i]);
|
|
1899
1907
|
P(() => {
|
|
1900
1908
|
if (!u) {
|
|
1901
|
-
|
|
1909
|
+
x(!1);
|
|
1902
1910
|
return;
|
|
1903
1911
|
}
|
|
1904
|
-
return y(), requestAnimationFrame(() =>
|
|
1912
|
+
return y(), requestAnimationFrame(() => x(!0)), window.addEventListener("scroll", y, !0), window.addEventListener("resize", y), () => {
|
|
1905
1913
|
window.removeEventListener("scroll", y, !0), window.removeEventListener("resize", y);
|
|
1906
1914
|
};
|
|
1907
1915
|
}, [u, y]), P(() => {
|
|
1908
1916
|
if (!u) return;
|
|
1909
|
-
const
|
|
1917
|
+
const D = (W) => {
|
|
1910
1918
|
var z, j;
|
|
1911
|
-
!((z =
|
|
1919
|
+
!((z = h.current) != null && z.contains(W.target)) && !((j = p.current) != null && j.contains(W.target)) && N();
|
|
1912
1920
|
}, M = (W) => {
|
|
1913
|
-
W.key === "Escape" &&
|
|
1921
|
+
W.key === "Escape" && N();
|
|
1914
1922
|
};
|
|
1915
|
-
return document.addEventListener("mousedown",
|
|
1916
|
-
document.removeEventListener("mousedown",
|
|
1923
|
+
return document.addEventListener("mousedown", D), document.addEventListener("keydown", M), () => {
|
|
1924
|
+
document.removeEventListener("mousedown", D), document.removeEventListener("keydown", M);
|
|
1917
1925
|
};
|
|
1918
|
-
}, [u,
|
|
1926
|
+
}, [u, N]);
|
|
1919
1927
|
const S = u && /* @__PURE__ */ e.jsxs(
|
|
1920
1928
|
"div",
|
|
1921
1929
|
{
|
|
1922
|
-
ref:
|
|
1930
|
+
ref: h,
|
|
1923
1931
|
className: [
|
|
1924
1932
|
"ds-nav-rail-flyout",
|
|
1925
1933
|
`ds-nav-rail-flyout--${i}`,
|
|
1926
|
-
|
|
1934
|
+
m && "ds-nav-rail-flyout--visible"
|
|
1927
1935
|
].filter(Boolean).join(" "),
|
|
1928
|
-
style:
|
|
1936
|
+
style: w,
|
|
1929
1937
|
"data-ds-portal": "",
|
|
1930
1938
|
role: "dialog",
|
|
1931
1939
|
"aria-modal": "false",
|
|
@@ -1937,7 +1945,7 @@ function Qs({
|
|
|
1937
1945
|
{
|
|
1938
1946
|
type: "button",
|
|
1939
1947
|
className: "ds-nav-rail-flyout__close",
|
|
1940
|
-
onClick:
|
|
1948
|
+
onClick: N,
|
|
1941
1949
|
"aria-label": "Close",
|
|
1942
1950
|
children: /* @__PURE__ */ e.jsx(ee, { size: 16, strokeWidth: 2 })
|
|
1943
1951
|
}
|
|
@@ -1948,8 +1956,8 @@ function Qs({
|
|
|
1948
1956
|
}
|
|
1949
1957
|
);
|
|
1950
1958
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1951
|
-
/* @__PURE__ */ e.jsx(we.Provider, { value: u, children: /* @__PURE__ */ e.jsx("div", { ref:
|
|
1952
|
-
typeof document < "u" &&
|
|
1959
|
+
/* @__PURE__ */ e.jsx(we.Provider, { value: u, children: /* @__PURE__ */ e.jsx("div", { ref: p, onClick: _, style: { display: "flex", flexDirection: "column", width: "100%" }, children: t }) }),
|
|
1960
|
+
typeof document < "u" && re.createPortal(S, document.body)
|
|
1953
1961
|
] });
|
|
1954
1962
|
}
|
|
1955
1963
|
const Pt = {
|
|
@@ -2011,26 +2019,26 @@ function tn({
|
|
|
2011
2019
|
style: l,
|
|
2012
2020
|
...c
|
|
2013
2021
|
}) {
|
|
2014
|
-
const [d, u] =
|
|
2015
|
-
if (
|
|
2022
|
+
const [d, u] = B(!1), [m, x] = B(!1), p = n !== void 0, h = p ? n : d, w = R(null), b = R(null), $ = R(null), N = R(null), [_, y] = B({}), S = R(null), D = 150, M = () => {
|
|
2023
|
+
if (p)
|
|
2016
2024
|
r == null || r(!1);
|
|
2017
2025
|
else {
|
|
2018
|
-
if (
|
|
2019
|
-
|
|
2020
|
-
u(!1),
|
|
2021
|
-
},
|
|
2026
|
+
if (m) return;
|
|
2027
|
+
x(!0), S.current = setTimeout(() => {
|
|
2028
|
+
u(!1), x(!1);
|
|
2029
|
+
}, D);
|
|
2022
2030
|
}
|
|
2023
2031
|
}, W = () => {
|
|
2024
|
-
const v = !
|
|
2025
|
-
|
|
2032
|
+
const v = !h;
|
|
2033
|
+
p ? r == null || r(v) : v ? (clearTimeout(S.current), x(!1), u(!0)) : M();
|
|
2026
2034
|
}, z = () => {
|
|
2027
|
-
|
|
2035
|
+
h || (p ? r == null || r(!0) : (clearTimeout(S.current), x(!1), u(!0)));
|
|
2028
2036
|
};
|
|
2029
2037
|
P(() => () => clearTimeout(S.current), []), P(() => {
|
|
2030
|
-
if (!
|
|
2038
|
+
if (!h) return;
|
|
2031
2039
|
const v = 300, k = () => {
|
|
2032
2040
|
var E;
|
|
2033
|
-
const A = (E =
|
|
2041
|
+
const A = (E = w.current) == null ? void 0 : E.getBoundingClientRect();
|
|
2034
2042
|
if (!A) return;
|
|
2035
2043
|
const U = window.innerHeight - A.bottom, G = U < v + 8 && A.top > U;
|
|
2036
2044
|
y(
|
|
@@ -2040,7 +2048,7 @@ function tn({
|
|
|
2040
2048
|
return k(), window.addEventListener("scroll", k, !0), window.addEventListener("resize", k), () => {
|
|
2041
2049
|
window.removeEventListener("scroll", k, !0), window.removeEventListener("resize", k);
|
|
2042
2050
|
};
|
|
2043
|
-
}, [
|
|
2051
|
+
}, [h, a]);
|
|
2044
2052
|
const j = () => {
|
|
2045
2053
|
var k;
|
|
2046
2054
|
const v = (k = $.current) == null ? void 0 : k.querySelector(
|
|
@@ -2049,30 +2057,30 @@ function tn({
|
|
|
2049
2057
|
v == null || v.focus();
|
|
2050
2058
|
};
|
|
2051
2059
|
P(() => {
|
|
2052
|
-
if (!
|
|
2060
|
+
if (!h) return;
|
|
2053
2061
|
const v = (A) => {
|
|
2054
2062
|
var U, G;
|
|
2055
|
-
!((U =
|
|
2063
|
+
!((U = w.current) != null && U.contains(A.target)) && !((G = b.current) != null && G.contains(A.target)) && M();
|
|
2056
2064
|
}, k = (A) => {
|
|
2057
2065
|
A.key === "Escape" && (M(), j());
|
|
2058
2066
|
};
|
|
2059
2067
|
return document.addEventListener("mousedown", v), document.addEventListener("keydown", k), () => {
|
|
2060
2068
|
document.removeEventListener("mousedown", v), document.removeEventListener("keydown", k);
|
|
2061
2069
|
};
|
|
2062
|
-
}, [
|
|
2063
|
-
if (!
|
|
2064
|
-
const v = F(), k =
|
|
2065
|
-
k == null || k.focus(),
|
|
2066
|
-
}, [
|
|
2067
|
-
const F = () =>
|
|
2070
|
+
}, [h]), P(() => {
|
|
2071
|
+
if (!h || !N.current || !b.current) return;
|
|
2072
|
+
const v = F(), k = N.current === "last" ? v[v.length - 1] : v[0];
|
|
2073
|
+
k == null || k.focus(), N.current = null;
|
|
2074
|
+
}, [h]);
|
|
2075
|
+
const F = () => b.current ? [...b.current.querySelectorAll(
|
|
2068
2076
|
'button:not([disabled]), a[href]:not([aria-disabled="true"]), [tabindex]:not([tabindex="-1"])'
|
|
2069
2077
|
)] : [], K = (v) => {
|
|
2070
2078
|
var k, A;
|
|
2071
2079
|
if (v.key === "ArrowDown")
|
|
2072
|
-
v.preventDefault(),
|
|
2080
|
+
v.preventDefault(), h ? (k = F()[0]) == null || k.focus() : (N.current = "first", z());
|
|
2073
2081
|
else if (v.key === "ArrowUp")
|
|
2074
|
-
if (v.preventDefault(), !
|
|
2075
|
-
|
|
2082
|
+
if (v.preventDefault(), !h)
|
|
2083
|
+
N.current = "last", z();
|
|
2076
2084
|
else {
|
|
2077
2085
|
const U = F();
|
|
2078
2086
|
(A = U[U.length - 1]) == null || A.focus();
|
|
@@ -2097,18 +2105,18 @@ function tn({
|
|
|
2097
2105
|
M();
|
|
2098
2106
|
break;
|
|
2099
2107
|
}
|
|
2100
|
-
},
|
|
2108
|
+
}, I = h && /* @__PURE__ */ e.jsx(
|
|
2101
2109
|
"div",
|
|
2102
2110
|
{
|
|
2103
|
-
ref:
|
|
2111
|
+
ref: b,
|
|
2104
2112
|
role: "menu",
|
|
2105
2113
|
"data-ds-portal": "",
|
|
2106
2114
|
className: [
|
|
2107
2115
|
"ds-dropdown__menu",
|
|
2108
2116
|
`ds-dropdown__menu--${a}`,
|
|
2109
|
-
|
|
2117
|
+
m && "ds-dropdown__menu--closing"
|
|
2110
2118
|
].filter(Boolean).join(" "),
|
|
2111
|
-
style:
|
|
2119
|
+
style: _,
|
|
2112
2120
|
onKeyDown: V,
|
|
2113
2121
|
children: s.map((v, k) => {
|
|
2114
2122
|
if (v.separator)
|
|
@@ -2146,7 +2154,7 @@ function tn({
|
|
|
2146
2154
|
return /* @__PURE__ */ e.jsxs(
|
|
2147
2155
|
"div",
|
|
2148
2156
|
{
|
|
2149
|
-
ref:
|
|
2157
|
+
ref: w,
|
|
2150
2158
|
className: ["ds-dropdown", o && "ds-dropdown--full-width", i].filter(Boolean).join(" "),
|
|
2151
2159
|
style: l,
|
|
2152
2160
|
...c,
|
|
@@ -2161,7 +2169,7 @@ function tn({
|
|
|
2161
2169
|
children: t
|
|
2162
2170
|
}
|
|
2163
2171
|
),
|
|
2164
|
-
typeof document < "u" &&
|
|
2172
|
+
typeof document < "u" && re.createPortal(I, document.body)
|
|
2165
2173
|
]
|
|
2166
2174
|
}
|
|
2167
2175
|
);
|
|
@@ -2205,7 +2213,7 @@ function sn({
|
|
|
2205
2213
|
}
|
|
2206
2214
|
const Mt = (t) => 1 - Math.pow(1 - t, 3), zt = () => typeof window < "u" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
2207
2215
|
function Ft(t, { duration: s = 600 } = {}) {
|
|
2208
|
-
const [n, r] =
|
|
2216
|
+
const [n, r] = B(t), a = R(t), o = R(null);
|
|
2209
2217
|
return P(() => {
|
|
2210
2218
|
if (zt()) {
|
|
2211
2219
|
r(t), a.current = t;
|
|
@@ -2216,8 +2224,8 @@ function Ft(t, { duration: s = 600 } = {}) {
|
|
|
2216
2224
|
let c = null;
|
|
2217
2225
|
const d = (u) => {
|
|
2218
2226
|
c || (c = u);
|
|
2219
|
-
const
|
|
2220
|
-
r(i + l * Mt(
|
|
2227
|
+
const m = Math.min((u - c) / s, 1);
|
|
2228
|
+
r(i + l * Mt(m)), m < 1 ? o.current = requestAnimationFrame(d) : a.current = t;
|
|
2221
2229
|
};
|
|
2222
2230
|
return o.current = requestAnimationFrame(d), () => cancelAnimationFrame(o.current);
|
|
2223
2231
|
}, [t, s]), n;
|
|
@@ -2233,7 +2241,7 @@ function nn({
|
|
|
2233
2241
|
return `${r}${i}${a}`;
|
|
2234
2242
|
}
|
|
2235
2243
|
function Wt({ threshold: t = 0.1, rootMargin: s = "0px", once: n = !1 } = {}) {
|
|
2236
|
-
const r = R(null), [a, o] =
|
|
2244
|
+
const r = R(null), [a, o] = B(!1);
|
|
2237
2245
|
return P(() => {
|
|
2238
2246
|
const i = r.current;
|
|
2239
2247
|
if (!i) return;
|
|
@@ -2291,7 +2299,7 @@ function an() {
|
|
|
2291
2299
|
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 };
|
|
2292
2300
|
}
|
|
2293
2301
|
function Ut({ data: t, onDismiss: s }) {
|
|
2294
|
-
const [n, r] =
|
|
2302
|
+
const [n, r] = B(!1), a = R(null);
|
|
2295
2303
|
P(() => (requestAnimationFrame(() => r(!0)), t.duration > 0 && (a.current = setTimeout(() => o(), t.duration)), () => clearTimeout(a.current)), []);
|
|
2296
2304
|
function o() {
|
|
2297
2305
|
r(!1), setTimeout(() => s(t.id), 250);
|
|
@@ -2324,16 +2332,16 @@ function Ut({ data: t, onDismiss: s }) {
|
|
|
2324
2332
|
);
|
|
2325
2333
|
}
|
|
2326
2334
|
function on({ position: t = "bottom-right" }) {
|
|
2327
|
-
const [s, n] =
|
|
2328
|
-
return P(() => ($e.add(n), () => $e.delete(n)), []), !s.length || typeof document > "u" ? null :
|
|
2335
|
+
const [s, n] = B(() => [...xe]);
|
|
2336
|
+
return P(() => ($e.add(n), () => $e.delete(n)), []), !s.length || typeof document > "u" ? null : re.createPortal(
|
|
2329
2337
|
/* @__PURE__ */ e.jsx("div", { "data-ds-portal": "", className: ["ds-toast-container", `ds-toast-container--${t}`].join(" "), children: s.map((r) => /* @__PURE__ */ e.jsx(Ut, { data: r, onDismiss: Ot }, r.id)) }),
|
|
2330
2338
|
document.body
|
|
2331
2339
|
);
|
|
2332
2340
|
}
|
|
2333
2341
|
const Vt = {
|
|
2334
|
-
running: /* @__PURE__ */ e.jsx(
|
|
2335
|
-
success: /* @__PURE__ */ e.jsx(
|
|
2336
|
-
error: /* @__PURE__ */ e.jsx(
|
|
2342
|
+
running: /* @__PURE__ */ e.jsx(pe, { size: "xs", variant: "info", children: "Running..." }),
|
|
2343
|
+
success: /* @__PURE__ */ e.jsx(pe, { size: "xs", variant: "success", children: "Done" }),
|
|
2344
|
+
error: /* @__PURE__ */ e.jsx(pe, { size: "xs", variant: "error", children: "Error" })
|
|
2337
2345
|
};
|
|
2338
2346
|
function ln({
|
|
2339
2347
|
label: t,
|
|
@@ -2347,7 +2355,7 @@ function ln({
|
|
|
2347
2355
|
className: c = "",
|
|
2348
2356
|
...d
|
|
2349
2357
|
}) {
|
|
2350
|
-
const u = s === "running",
|
|
2358
|
+
const u = s === "running", m = /* @__PURE__ */ e.jsxs("span", { className: "ds-tool-card__title-row", children: [
|
|
2351
2359
|
n && /* @__PURE__ */ e.jsx("span", { className: "ds-tool-card__icon", children: n }),
|
|
2352
2360
|
/* @__PURE__ */ e.jsx("span", { className: "ds-tool-card__label", children: t }),
|
|
2353
2361
|
Vt[s],
|
|
@@ -2361,7 +2369,7 @@ function ln({
|
|
|
2361
2369
|
children: /* @__PURE__ */ e.jsx(
|
|
2362
2370
|
Be,
|
|
2363
2371
|
{
|
|
2364
|
-
title:
|
|
2372
|
+
title: m,
|
|
2365
2373
|
padding: "s",
|
|
2366
2374
|
defaultExpanded: a,
|
|
2367
2375
|
expanded: u ? !1 : o,
|
|
@@ -2375,7 +2383,7 @@ function ln({
|
|
|
2375
2383
|
{
|
|
2376
2384
|
className: ["ds-tool-card", "ds-tool-card--bubble", c].filter(Boolean).join(" "),
|
|
2377
2385
|
...d,
|
|
2378
|
-
children:
|
|
2386
|
+
children: m
|
|
2379
2387
|
}
|
|
2380
2388
|
);
|
|
2381
2389
|
}
|
|
@@ -2386,13 +2394,13 @@ function Yt({
|
|
|
2386
2394
|
"aria-label": r = "Copy to clipboard",
|
|
2387
2395
|
...a
|
|
2388
2396
|
}) {
|
|
2389
|
-
const [o, i] =
|
|
2397
|
+
const [o, i] = B(!1), l = (c) => {
|
|
2390
2398
|
c.currentTarget.blur(), navigator.clipboard.writeText(t).then(() => {
|
|
2391
2399
|
i(!0), setTimeout(() => i(!1), n);
|
|
2392
2400
|
});
|
|
2393
2401
|
};
|
|
2394
2402
|
return /* @__PURE__ */ e.jsx(
|
|
2395
|
-
|
|
2403
|
+
oe,
|
|
2396
2404
|
{
|
|
2397
2405
|
variant: "ghost",
|
|
2398
2406
|
size: s,
|
|
@@ -2405,7 +2413,7 @@ function Yt({
|
|
|
2405
2413
|
);
|
|
2406
2414
|
}
|
|
2407
2415
|
function cn({ content: t, streaming: s = !1, ...n }) {
|
|
2408
|
-
const [r, a] =
|
|
2416
|
+
const [r, a] = B(s);
|
|
2409
2417
|
return P(() => {
|
|
2410
2418
|
a(!!s);
|
|
2411
2419
|
}, [s]), /* @__PURE__ */ e.jsx(
|
|
@@ -2438,22 +2446,22 @@ function dn({
|
|
|
2438
2446
|
}) {
|
|
2439
2447
|
return /* @__PURE__ */ e.jsxs("div", { className: ["ds-step-indicator", o].filter(Boolean).join(" "), ...l, children: [
|
|
2440
2448
|
/* @__PURE__ */ e.jsx("div", { className: "ds-step-indicator__dots", role: "tablist", "aria-label": i, children: Array.from({ length: t }, (c, d) => {
|
|
2441
|
-
const u = d === s,
|
|
2449
|
+
const u = d === s, m = n.includes(d) && !u, x = r && (d <= s || n.includes(d)), p = [
|
|
2442
2450
|
"ds-step-indicator__dot",
|
|
2443
2451
|
u && "ds-step-indicator__dot--active",
|
|
2444
|
-
|
|
2452
|
+
m && "ds-step-indicator__dot--done"
|
|
2445
2453
|
].filter(Boolean).join(" ");
|
|
2446
2454
|
return /* @__PURE__ */ e.jsx(
|
|
2447
2455
|
"button",
|
|
2448
2456
|
{
|
|
2449
2457
|
type: "button",
|
|
2450
|
-
className:
|
|
2458
|
+
className: p,
|
|
2451
2459
|
role: "tab",
|
|
2452
2460
|
"aria-selected": u,
|
|
2453
2461
|
"aria-label": `Step ${d + 1}`,
|
|
2454
|
-
disabled: !
|
|
2462
|
+
disabled: !x || d === s,
|
|
2455
2463
|
onClick: () => r == null ? void 0 : r(d),
|
|
2456
|
-
children:
|
|
2464
|
+
children: m ? /* @__PURE__ */ e.jsx(Re, { size: 8, strokeWidth: 3 }) : null
|
|
2457
2465
|
},
|
|
2458
2466
|
d
|
|
2459
2467
|
);
|
|
@@ -2532,33 +2540,33 @@ function Ht({
|
|
|
2532
2540
|
betweenTime: o = 380,
|
|
2533
2541
|
manualPauseMs: i = 5e3
|
|
2534
2542
|
}) {
|
|
2535
|
-
const [l, c] =
|
|
2543
|
+
const [l, c] = B(0), [d, u] = B(""), m = R("typing"), x = R(0), p = R(0), h = R(null), w = R(0);
|
|
2536
2544
|
P(() => {
|
|
2537
|
-
|
|
2545
|
+
p.current = l;
|
|
2538
2546
|
}, [l]), P(() => {
|
|
2539
|
-
if (
|
|
2540
|
-
u(""),
|
|
2547
|
+
if (h.current && (clearTimeout(h.current), h.current = null), !s || t.length === 0) {
|
|
2548
|
+
u(""), x.current = 0, m.current = "typing";
|
|
2541
2549
|
return;
|
|
2542
2550
|
}
|
|
2543
2551
|
const y = () => {
|
|
2544
2552
|
const S = Date.now();
|
|
2545
|
-
if (
|
|
2546
|
-
|
|
2553
|
+
if (w.current > S) {
|
|
2554
|
+
h.current = setTimeout(y, w.current - S);
|
|
2547
2555
|
return;
|
|
2548
2556
|
}
|
|
2549
|
-
const
|
|
2550
|
-
|
|
2557
|
+
const D = t[p.current % t.length] ?? "";
|
|
2558
|
+
m.current === "typing" ? (x.current += 1, u(D.slice(0, x.current)), x.current >= D.length ? (m.current = "holding", h.current = setTimeout(y, a)) : h.current = setTimeout(y, n + Math.random() * 28)) : m.current === "holding" ? (m.current = "erasing", h.current = setTimeout(y, r)) : (x.current = Math.max(0, x.current - 1), u(D.slice(0, x.current)), x.current <= 0 ? (m.current = "typing", p.current = (p.current + 1) % t.length, c(p.current), h.current = setTimeout(y, o)) : h.current = setTimeout(y, r));
|
|
2551
2559
|
};
|
|
2552
|
-
return
|
|
2553
|
-
|
|
2560
|
+
return h.current = setTimeout(y, 260), () => {
|
|
2561
|
+
h.current && clearTimeout(h.current);
|
|
2554
2562
|
};
|
|
2555
2563
|
}, [s, t, n, r, a, o]);
|
|
2556
|
-
const
|
|
2564
|
+
const b = (y) => {
|
|
2557
2565
|
if (t.length === 0) return;
|
|
2558
|
-
const S = (y % t.length + t.length) % t.length,
|
|
2559
|
-
|
|
2560
|
-
}, $ = () =>
|
|
2561
|
-
return { displayed: d, currentPrompt:
|
|
2566
|
+
const S = (y % t.length + t.length) % t.length, D = t[S];
|
|
2567
|
+
p.current = S, x.current = D.length, m.current = "holding", w.current = Date.now() + i, c(S), u(D);
|
|
2568
|
+
}, $ = () => b(p.current + 1), N = () => b(p.current - 1), _ = t[l % t.length] ?? "";
|
|
2569
|
+
return { displayed: d, currentPrompt: _, index: l, next: $, prev: N };
|
|
2562
2570
|
}
|
|
2563
2571
|
let qt = 0;
|
|
2564
2572
|
function pn({
|
|
@@ -2573,61 +2581,61 @@ function pn({
|
|
|
2573
2581
|
animatedPlaceholders: c,
|
|
2574
2582
|
attachments: d,
|
|
2575
2583
|
images: u,
|
|
2576
|
-
onAttachFiles:
|
|
2577
|
-
onAttachImages:
|
|
2578
|
-
onRemoveAttachment:
|
|
2579
|
-
onRemoveImage:
|
|
2580
|
-
acceptImage:
|
|
2581
|
-
acceptFile:
|
|
2584
|
+
onAttachFiles: m,
|
|
2585
|
+
onAttachImages: x,
|
|
2586
|
+
onRemoveAttachment: p,
|
|
2587
|
+
onRemoveImage: h,
|
|
2588
|
+
acceptImage: w,
|
|
2589
|
+
acceptFile: b,
|
|
2582
2590
|
maxImages: $,
|
|
2583
|
-
maxImageSize:
|
|
2584
|
-
leftSlot:
|
|
2591
|
+
maxImageSize: N,
|
|
2592
|
+
leftSlot: _,
|
|
2585
2593
|
rightSlot: y,
|
|
2586
2594
|
className: S = "",
|
|
2587
|
-
...
|
|
2595
|
+
...D
|
|
2588
2596
|
}) {
|
|
2589
|
-
const M = R(null), W = R(null), z = R(0), [j, F] =
|
|
2597
|
+
const M = R(null), W = R(null), z = R(0), [j, F] = B(!1), [K, V] = B([]), I = (g) => {
|
|
2590
2598
|
const L = ++qt;
|
|
2591
|
-
V((X) => [...X, { id: L, msg:
|
|
2592
|
-
}, v = (
|
|
2599
|
+
V((X) => [...X, { id: L, msg: g }]), setTimeout(() => V((X) => X.filter((J) => J.id !== L)), 6e3);
|
|
2600
|
+
}, v = (g) => V((L) => L.filter((X) => X.id !== g)), k = (g) => g.type.startsWith("image/"), A = () => !0, U = w ?? k, G = b ?? A, E = (g) => {
|
|
2593
2601
|
const L = [], X = [], J = [], Z = [];
|
|
2594
|
-
let se = 0,
|
|
2595
|
-
for (const ne of
|
|
2596
|
-
U(ne) ?
|
|
2602
|
+
let se = 0, fe = $ != null ? $ - ((u == null ? void 0 : u.length) ?? 0) : 1 / 0;
|
|
2603
|
+
for (const ne of g)
|
|
2604
|
+
U(ne) ? N && ne.size > N ? J.push(ne.name) : fe > 0 ? (L.push(ne), fe--) : se++ : G(ne) ? X.push(ne) : Z.push(ne.name);
|
|
2597
2605
|
return { imageFiles: L, docFiles: X, tooLarge: J, skipped: Z, limitExceeded: se };
|
|
2598
|
-
}, f = (
|
|
2599
|
-
const { imageFiles: L, docFiles: X, tooLarge: J, skipped: Z, limitExceeded: se } = E(
|
|
2600
|
-
J.length &&
|
|
2601
|
-
const
|
|
2602
|
-
|
|
2606
|
+
}, f = (g) => {
|
|
2607
|
+
const { imageFiles: L, docFiles: X, tooLarge: J, skipped: Z, limitExceeded: se } = E(g);
|
|
2608
|
+
J.length && I(`File${J.length > 1 ? "s" : ""} too large${N ? ` (max ${N / 1024 / 1024}MB)` : ""}: ${J.join(", ")}`), Z.length && I(`Skipped unsupported file${Z.length > 1 ? "s" : ""}: ${Z.join(", ")}`), se && I(`Max ${$} images per message`), x && L.length && x(L);
|
|
2609
|
+
const fe = X.concat(x ? [] : L);
|
|
2610
|
+
m && fe.length && m(fe);
|
|
2603
2611
|
};
|
|
2604
2612
|
P(() => {
|
|
2605
|
-
const
|
|
2606
|
-
|
|
2613
|
+
const g = W.current;
|
|
2614
|
+
g && (g.style.height = "auto", g.style.height = `${Math.min(g.scrollHeight, 200)}px`);
|
|
2607
2615
|
}, [t]), P(() => {
|
|
2608
|
-
const
|
|
2616
|
+
const g = (L) => {
|
|
2609
2617
|
var J, Z, se;
|
|
2610
2618
|
if (o || i) return;
|
|
2611
2619
|
const X = (J = L.target) == null ? void 0 : J.tagName;
|
|
2612
2620
|
X === "INPUT" || X === "TEXTAREA" || X === "SELECT" || (Z = L.target) != null && Z.isContentEditable || L.ctrlKey || L.metaKey || L.altKey || L.key.length !== 1 && L.key !== "Backspace" && L.key !== "Delete" || (se = W.current) == null || se.focus();
|
|
2613
2621
|
};
|
|
2614
|
-
return document.addEventListener("keydown",
|
|
2622
|
+
return document.addEventListener("keydown", g), () => document.removeEventListener("keydown", g);
|
|
2615
2623
|
}, [o, i]);
|
|
2616
|
-
const T = (
|
|
2617
|
-
|
|
2618
|
-
}, O = (
|
|
2619
|
-
|
|
2620
|
-
}, Y = (
|
|
2621
|
-
|
|
2622
|
-
const L = Array.from(
|
|
2624
|
+
const T = (g) => {
|
|
2625
|
+
g.preventDefault(), z.current++, g.dataTransfer.types.includes("Files") && F(!0);
|
|
2626
|
+
}, O = (g) => {
|
|
2627
|
+
g.preventDefault(), z.current--, z.current === 0 && F(!1);
|
|
2628
|
+
}, Y = (g) => g.preventDefault(), te = (g) => {
|
|
2629
|
+
g.preventDefault(), z.current = 0, F(!1);
|
|
2630
|
+
const L = Array.from(g.dataTransfer.files);
|
|
2623
2631
|
L.length && f(L);
|
|
2624
|
-
},
|
|
2625
|
-
const L = Array.from(
|
|
2632
|
+
}, ie = (g) => {
|
|
2633
|
+
const L = Array.from(g.target.files || []);
|
|
2626
2634
|
M.current && (M.current.value = ""), L.length && f(L);
|
|
2627
|
-
}, H = (
|
|
2635
|
+
}, H = (g) => {
|
|
2628
2636
|
var ne;
|
|
2629
|
-
if (!
|
|
2630
|
-
const L = (ne =
|
|
2637
|
+
if (!x) return;
|
|
2638
|
+
const L = (ne = g.clipboardData) == null ? void 0 : ne.items;
|
|
2631
2639
|
if (!L) return;
|
|
2632
2640
|
const X = [];
|
|
2633
2641
|
for (const st of L) {
|
|
@@ -2635,29 +2643,29 @@ function pn({
|
|
|
2635
2643
|
Me && X.push(Me);
|
|
2636
2644
|
}
|
|
2637
2645
|
if (X.length === 0) return;
|
|
2638
|
-
const { imageFiles: J, tooLarge: Z, skipped: se, limitExceeded:
|
|
2639
|
-
Z.length &&
|
|
2640
|
-
}, Q = !o && !i && !!(c != null && c.length) && t.length === 0,
|
|
2646
|
+
const { imageFiles: J, tooLarge: Z, skipped: se, limitExceeded: fe } = E(X);
|
|
2647
|
+
Z.length && I(`File${Z.length > 1 ? "s" : ""} too large: ${Z.join(", ")}`), se.length && I(`Skipped unsupported file${se.length > 1 ? "s" : ""}: ${se.join(", ")}`), fe && I(`Max ${$} images per message`), J.length && (g.preventDefault(), x(J));
|
|
2648
|
+
}, Q = !o && !i && !!(c != null && c.length) && t.length === 0, le = Ht({
|
|
2641
2649
|
prompts: c ?? [],
|
|
2642
2650
|
enabled: Q
|
|
2643
|
-
}), ge = (
|
|
2651
|
+
}), ge = (g) => {
|
|
2644
2652
|
if (Q) {
|
|
2645
|
-
if (
|
|
2646
|
-
|
|
2653
|
+
if (g.key === "ArrowDown" || g.key === "ArrowRight") {
|
|
2654
|
+
g.preventDefault(), le.next();
|
|
2647
2655
|
return;
|
|
2648
2656
|
}
|
|
2649
|
-
if (
|
|
2650
|
-
|
|
2657
|
+
if (g.key === "ArrowUp" || g.key === "ArrowLeft") {
|
|
2658
|
+
g.preventDefault(), le.prev();
|
|
2651
2659
|
return;
|
|
2652
2660
|
}
|
|
2653
|
-
if (
|
|
2654
|
-
|
|
2661
|
+
if (g.key === "Tab" && !g.shiftKey) {
|
|
2662
|
+
g.preventDefault(), s == null || s(le.currentPrompt);
|
|
2655
2663
|
return;
|
|
2656
2664
|
}
|
|
2657
2665
|
}
|
|
2658
|
-
a == null || a(
|
|
2659
|
-
}, tt = (t.trim() || (u == null ? void 0 : u.length) > 0 || (d == null ? void 0 : d.length) > 0) && !i, Pe =
|
|
2660
|
-
return /* @__PURE__ */ e.jsxs("div", { className: ["ds-prompt-input", S].filter(Boolean).join(" "), ...
|
|
2666
|
+
a == null || a(g);
|
|
2667
|
+
}, tt = (t.trim() || (u == null ? void 0 : u.length) > 0 || (d == null ? void 0 : d.length) > 0) && !i, Pe = m || x;
|
|
2668
|
+
return /* @__PURE__ */ e.jsxs("div", { className: ["ds-prompt-input", S].filter(Boolean).join(" "), ...D, children: [
|
|
2661
2669
|
Pe && /* @__PURE__ */ e.jsx(
|
|
2662
2670
|
"input",
|
|
2663
2671
|
{
|
|
@@ -2666,7 +2674,7 @@ function pn({
|
|
|
2666
2674
|
multiple: !0,
|
|
2667
2675
|
accept: "*/*",
|
|
2668
2676
|
className: "ds-prompt-input__file-input",
|
|
2669
|
-
onChange:
|
|
2677
|
+
onChange: ie
|
|
2670
2678
|
}
|
|
2671
2679
|
),
|
|
2672
2680
|
/* @__PURE__ */ e.jsxs(
|
|
@@ -2684,7 +2692,7 @@ function pn({
|
|
|
2684
2692
|
{
|
|
2685
2693
|
ref: W,
|
|
2686
2694
|
value: t,
|
|
2687
|
-
onChange: (
|
|
2695
|
+
onChange: (g) => s == null ? void 0 : s(g.target.value),
|
|
2688
2696
|
onKeyDown: ge,
|
|
2689
2697
|
onPaste: H,
|
|
2690
2698
|
placeholder: Q ? "" : l,
|
|
@@ -2694,67 +2702,67 @@ function pn({
|
|
|
2694
2702
|
}
|
|
2695
2703
|
),
|
|
2696
2704
|
Q && /* @__PURE__ */ e.jsxs("div", { className: "ds-prompt-input__anim", "aria-hidden": "true", children: [
|
|
2697
|
-
/* @__PURE__ */ e.jsx("span", { className: "ds-prompt-input__anim-text", children:
|
|
2705
|
+
/* @__PURE__ */ e.jsx("span", { className: "ds-prompt-input__anim-text", children: le.displayed }),
|
|
2698
2706
|
/* @__PURE__ */ e.jsx("span", { className: "ds-prompt-input__anim-cursor" })
|
|
2699
2707
|
] }),
|
|
2700
|
-
u && u.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__images", children: u.map((
|
|
2701
|
-
/* @__PURE__ */ e.jsx("img", { src:
|
|
2708
|
+
u && u.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__images", children: u.map((g, L) => /* @__PURE__ */ e.jsxs("div", { className: "ds-prompt-input__image-thumb", children: [
|
|
2709
|
+
/* @__PURE__ */ e.jsx("img", { src: g.preview, alt: "" }),
|
|
2702
2710
|
/* @__PURE__ */ e.jsx(
|
|
2703
2711
|
"button",
|
|
2704
2712
|
{
|
|
2705
2713
|
className: "ds-prompt-input__image-remove",
|
|
2706
|
-
onClick: () =>
|
|
2714
|
+
onClick: () => h == null ? void 0 : h(L),
|
|
2707
2715
|
"aria-label": "Remove image",
|
|
2708
2716
|
type: "button",
|
|
2709
2717
|
children: /* @__PURE__ */ e.jsx(ee, { size: 12, strokeWidth: 2 })
|
|
2710
2718
|
}
|
|
2711
2719
|
)
|
|
2712
2720
|
] }, L)) }),
|
|
2713
|
-
K.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__warnings", children: K.map((
|
|
2714
|
-
/* @__PURE__ */ e.jsx("span", { children:
|
|
2721
|
+
K.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__warnings", children: K.map((g) => /* @__PURE__ */ e.jsxs("div", { className: "ds-prompt-input__warning", role: "alert", children: [
|
|
2722
|
+
/* @__PURE__ */ e.jsx("span", { children: g.msg }),
|
|
2715
2723
|
/* @__PURE__ */ e.jsx(
|
|
2716
2724
|
"button",
|
|
2717
2725
|
{
|
|
2718
2726
|
type: "button",
|
|
2719
2727
|
className: "ds-prompt-input__warning-close",
|
|
2720
|
-
onClick: () => v(
|
|
2728
|
+
onClick: () => v(g.id),
|
|
2721
2729
|
"aria-label": "Dismiss",
|
|
2722
2730
|
children: /* @__PURE__ */ e.jsx(ee, { size: C[1], strokeWidth: 1.5 })
|
|
2723
2731
|
}
|
|
2724
2732
|
)
|
|
2725
|
-
] },
|
|
2726
|
-
d && d.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__attachments", children: d.map((
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2733
|
+
] }, g.id)) }),
|
|
2734
|
+
d && d.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__attachments", children: d.map((g, L) => /* @__PURE__ */ e.jsx(pe, { size: "xs", children: /* @__PURE__ */ e.jsxs("span", { className: "ds-prompt-input__badge-content", children: [
|
|
2735
|
+
g.uploading ? /* @__PURE__ */ e.jsx(ft, { size: C[1], strokeWidth: 1.5, className: "spin" }) : /* @__PURE__ */ e.jsx(ze, { size: C[1], strokeWidth: 1.5 }),
|
|
2736
|
+
g.filename,
|
|
2737
|
+
g.uploading ? /* @__PURE__ */ e.jsx("span", { className: "ds-prompt-input__uploading", children: "Uploading..." }) : /* @__PURE__ */ e.jsx(
|
|
2730
2738
|
"button",
|
|
2731
2739
|
{
|
|
2732
2740
|
type: "button",
|
|
2733
2741
|
className: "ds-prompt-input__remove-btn",
|
|
2734
|
-
onClick: () =>
|
|
2742
|
+
onClick: () => p == null ? void 0 : p(L),
|
|
2735
2743
|
children: /* @__PURE__ */ e.jsx(ee, { size: C[1], strokeWidth: 1.5 })
|
|
2736
2744
|
}
|
|
2737
2745
|
)
|
|
2738
2746
|
] }) }, L)) }),
|
|
2739
2747
|
/* @__PURE__ */ e.jsxs("div", { className: "ds-prompt-input__toolbar", children: [
|
|
2740
2748
|
Pe && /* @__PURE__ */ e.jsx(
|
|
2741
|
-
|
|
2749
|
+
oe,
|
|
2742
2750
|
{
|
|
2743
2751
|
variant: "ghost",
|
|
2744
2752
|
size: "xs",
|
|
2745
2753
|
icon: /* @__PURE__ */ e.jsx(ze, { size: C[2], strokeWidth: 1.5 }),
|
|
2746
2754
|
"aria-label": "Attach files",
|
|
2747
2755
|
onClick: () => {
|
|
2748
|
-
var
|
|
2749
|
-
return (
|
|
2756
|
+
var g;
|
|
2757
|
+
return (g = M.current) == null ? void 0 : g.click();
|
|
2750
2758
|
}
|
|
2751
2759
|
}
|
|
2752
2760
|
),
|
|
2753
|
-
|
|
2761
|
+
_,
|
|
2754
2762
|
y,
|
|
2755
2763
|
/* @__PURE__ */ e.jsx("div", { className: "ds-prompt-input__spacer" }),
|
|
2756
2764
|
o ? /* @__PURE__ */ e.jsx(
|
|
2757
|
-
|
|
2765
|
+
oe,
|
|
2758
2766
|
{
|
|
2759
2767
|
variant: "primary",
|
|
2760
2768
|
size: "xs",
|
|
@@ -2763,7 +2771,7 @@ function pn({
|
|
|
2763
2771
|
"aria-label": "Stop"
|
|
2764
2772
|
}
|
|
2765
2773
|
) : /* @__PURE__ */ e.jsx(
|
|
2766
|
-
|
|
2774
|
+
oe,
|
|
2767
2775
|
{
|
|
2768
2776
|
variant: "primary",
|
|
2769
2777
|
size: "xs",
|
|
@@ -2791,33 +2799,33 @@ function hn({
|
|
|
2791
2799
|
className: l = "",
|
|
2792
2800
|
...c
|
|
2793
2801
|
}) {
|
|
2794
|
-
const [d, u] =
|
|
2802
|
+
const [d, u] = B(!1), m = R(null), x = R(null), p = R(null), [h, w] = B({}), b = t.filter((j) => !a || j.name === "auto" ? !0 : (qe[j.tier] ?? 1) >= (qe[a] ?? 1)), $ = b.find((j) => j.name === "auto"), N = b.filter((j) => j.name !== "auto"), _ = t.find((j) => j.name === s), S = new Set(N.map((j) => j.tier).filter(Boolean)).size > 1;
|
|
2795
2803
|
P(() => {
|
|
2796
2804
|
if (!d) return;
|
|
2797
2805
|
const j = 320, F = () => {
|
|
2798
2806
|
var A;
|
|
2799
|
-
const
|
|
2800
|
-
if (!
|
|
2801
|
-
const v = window.innerHeight -
|
|
2802
|
-
|
|
2807
|
+
const I = (A = x.current) == null ? void 0 : A.getBoundingClientRect();
|
|
2808
|
+
if (!I) return;
|
|
2809
|
+
const v = window.innerHeight - I.bottom, k = v < j + 8 && I.top > v;
|
|
2810
|
+
w({
|
|
2803
2811
|
position: "fixed",
|
|
2804
2812
|
zIndex: "var(--z-dropdown, 500)",
|
|
2805
|
-
left:
|
|
2806
|
-
...k ? { bottom: window.innerHeight -
|
|
2813
|
+
left: I.left,
|
|
2814
|
+
...k ? { bottom: window.innerHeight - I.top + 4, top: "auto" } : { top: I.bottom + 4, bottom: "auto" }
|
|
2807
2815
|
});
|
|
2808
2816
|
};
|
|
2809
2817
|
F(), window.addEventListener("scroll", F, !0), window.addEventListener("resize", F);
|
|
2810
|
-
const K = (
|
|
2818
|
+
const K = (I) => {
|
|
2811
2819
|
var v, k;
|
|
2812
|
-
!((v =
|
|
2813
|
-
}, V = (
|
|
2814
|
-
|
|
2820
|
+
!((v = m.current) != null && v.contains(I.target)) && !((k = p.current) != null && k.contains(I.target)) && u(!1);
|
|
2821
|
+
}, V = (I) => {
|
|
2822
|
+
I.key === "Escape" && u(!1);
|
|
2815
2823
|
};
|
|
2816
2824
|
return document.addEventListener("mousedown", K), document.addEventListener("keydown", V), () => {
|
|
2817
2825
|
window.removeEventListener("scroll", F, !0), window.removeEventListener("resize", F), document.removeEventListener("mousedown", K), document.removeEventListener("keydown", V);
|
|
2818
2826
|
};
|
|
2819
2827
|
}, [d]);
|
|
2820
|
-
const
|
|
2828
|
+
const D = (j) => {
|
|
2821
2829
|
n == null || n(j), u(!1);
|
|
2822
2830
|
}, M = (j) => /* @__PURE__ */ e.jsxs(
|
|
2823
2831
|
"button",
|
|
@@ -2827,21 +2835,21 @@ function hn({
|
|
|
2827
2835
|
"ds-model-picker__item",
|
|
2828
2836
|
j.name === s && "ds-model-picker__item--active"
|
|
2829
2837
|
].filter(Boolean).join(" "),
|
|
2830
|
-
onClick: () =>
|
|
2838
|
+
onClick: () => D(j.name),
|
|
2831
2839
|
children: [
|
|
2832
2840
|
j.icon ? /* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__item-icon", children: j.icon }) : /* @__PURE__ */ e.jsx(Fe, { size: 12, strokeWidth: 1.5, className: "ds-model-picker__item-icon" }),
|
|
2833
2841
|
/* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__item-name", children: j.displayName || j.name }),
|
|
2834
|
-
S && j.tier && /* @__PURE__ */ e.jsx(
|
|
2842
|
+
S && j.tier && /* @__PURE__ */ e.jsx(pe, { size: "xs", variant: Ge[j.tier] || "default", children: j.tier })
|
|
2835
2843
|
]
|
|
2836
2844
|
},
|
|
2837
2845
|
j.name
|
|
2838
|
-
), W = () => !i || !S ?
|
|
2839
|
-
const F =
|
|
2846
|
+
), W = () => !i || !S ? N.map(M) : ["fast", "standard", "premium"].flatMap((j) => {
|
|
2847
|
+
const F = N.filter((K) => K.tier === j);
|
|
2840
2848
|
return F.length ? [
|
|
2841
2849
|
/* @__PURE__ */ e.jsx("div", { className: "ds-model-picker__group-label", "data-tier": j, children: j.charAt(0).toUpperCase() + j.slice(1) }, `lbl-${j}`),
|
|
2842
2850
|
...F.map(M)
|
|
2843
2851
|
] : [];
|
|
2844
|
-
}), z = d && /* @__PURE__ */ e.jsxs("div", { ref:
|
|
2852
|
+
}), z = d && /* @__PURE__ */ e.jsxs("div", { ref: p, className: "ds-model-picker__menu ds-scrollable", "data-ds-portal": "", style: h, children: [
|
|
2845
2853
|
o && $ && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
2846
2854
|
/* @__PURE__ */ e.jsxs(
|
|
2847
2855
|
"button",
|
|
@@ -2852,41 +2860,41 @@ function hn({
|
|
|
2852
2860
|
"ds-model-picker__item--auto",
|
|
2853
2861
|
s === "auto" && "ds-model-picker__item--active"
|
|
2854
2862
|
].filter(Boolean).join(" "),
|
|
2855
|
-
onClick: () =>
|
|
2863
|
+
onClick: () => D("auto"),
|
|
2856
2864
|
children: [
|
|
2857
2865
|
/* @__PURE__ */ e.jsx(ht, { size: 12, strokeWidth: 1.5, className: "ds-model-picker__item-icon" }),
|
|
2858
2866
|
/* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__item-name", children: "Auto (smart routing)" })
|
|
2859
2867
|
]
|
|
2860
2868
|
}
|
|
2861
2869
|
),
|
|
2862
|
-
|
|
2870
|
+
N.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "ds-model-picker__separator" })
|
|
2863
2871
|
] }),
|
|
2864
2872
|
W()
|
|
2865
2873
|
] });
|
|
2866
2874
|
return /* @__PURE__ */ e.jsxs(
|
|
2867
2875
|
"div",
|
|
2868
2876
|
{
|
|
2869
|
-
ref:
|
|
2877
|
+
ref: m,
|
|
2870
2878
|
className: ["ds-model-picker", l].filter(Boolean).join(" "),
|
|
2871
2879
|
...c,
|
|
2872
2880
|
children: [
|
|
2873
2881
|
/* @__PURE__ */ e.jsxs(
|
|
2874
2882
|
"button",
|
|
2875
2883
|
{
|
|
2876
|
-
ref:
|
|
2884
|
+
ref: x,
|
|
2877
2885
|
type: "button",
|
|
2878
2886
|
className: "ds-model-picker__trigger",
|
|
2879
2887
|
onClick: () => u((j) => !j),
|
|
2880
2888
|
"aria-haspopup": "listbox",
|
|
2881
2889
|
"aria-expanded": d,
|
|
2882
2890
|
children: [
|
|
2883
|
-
|
|
2884
|
-
/* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__trigger-name", children: (
|
|
2885
|
-
S && (
|
|
2891
|
+
_ != null && _.icon ? /* @__PURE__ */ e.jsx("span", { children: _.icon }) : /* @__PURE__ */ e.jsx(Fe, { size: 12, strokeWidth: 1.5 }),
|
|
2892
|
+
/* @__PURE__ */ e.jsx("span", { className: "ds-model-picker__trigger-name", children: (_ == null ? void 0 : _.displayName) || (_ == null ? void 0 : _.name) || s }),
|
|
2893
|
+
S && (_ == null ? void 0 : _.tier) && /* @__PURE__ */ e.jsx(pe, { size: "xs", variant: Ge[_.tier] || "default", children: _.tier })
|
|
2886
2894
|
]
|
|
2887
2895
|
}
|
|
2888
2896
|
),
|
|
2889
|
-
typeof document < "u" &&
|
|
2897
|
+
typeof document < "u" && re.createPortal(z, document.body)
|
|
2890
2898
|
]
|
|
2891
2899
|
}
|
|
2892
2900
|
);
|
|
@@ -2911,22 +2919,22 @@ function xn({
|
|
|
2911
2919
|
maxVisible: r = 5,
|
|
2912
2920
|
onSourceClick: a
|
|
2913
2921
|
}) {
|
|
2914
|
-
const [o, i] =
|
|
2915
|
-
return s === "compact" ? /* @__PURE__ */ e.jsxs("div", { className:
|
|
2916
|
-
d.map((
|
|
2917
|
-
const
|
|
2922
|
+
const [o, i] = B(!1), l = Kt(t), c = l.length > r, d = o ? l : l.slice(0, r), u = t.some((x) => x.snippet), m = ["ds-sources-panel", s === "compact" && "ds-sources-panel--compact"].filter(Boolean).join(" ");
|
|
2923
|
+
return s === "compact" ? /* @__PURE__ */ e.jsxs("div", { className: m, children: [
|
|
2924
|
+
d.map((x) => {
|
|
2925
|
+
const p = x.items.map((w) => w.page).filter(Boolean), h = !!a;
|
|
2918
2926
|
return /* @__PURE__ */ e.jsxs(
|
|
2919
2927
|
"div",
|
|
2920
2928
|
{
|
|
2921
|
-
className: `ds-sources-panel__compact-row${
|
|
2922
|
-
onClick:
|
|
2929
|
+
className: `ds-sources-panel__compact-row${h ? " ds-sources-panel__compact-row--clickable" : ""}`,
|
|
2930
|
+
onClick: h ? () => a(x.items[0]) : void 0,
|
|
2923
2931
|
children: [
|
|
2924
2932
|
/* @__PURE__ */ e.jsx(xt, { size: C[1], strokeWidth: 1.5, className: "ds-sources-panel__compact-icon" }),
|
|
2925
|
-
/* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__filename", children:
|
|
2926
|
-
|
|
2933
|
+
/* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__filename", children: x.filename }),
|
|
2934
|
+
p.length > 0 && /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__pages", children: Te(p) })
|
|
2927
2935
|
]
|
|
2928
2936
|
},
|
|
2929
|
-
|
|
2937
|
+
x.filename
|
|
2930
2938
|
);
|
|
2931
2939
|
}),
|
|
2932
2940
|
c && !o && /* @__PURE__ */ e.jsxs("button", { className: "ds-sources-panel__more", onClick: () => i(!0), children: [
|
|
@@ -2934,37 +2942,37 @@ function xn({
|
|
|
2934
2942
|
l.length - r,
|
|
2935
2943
|
" more sources"
|
|
2936
2944
|
] })
|
|
2937
|
-
] }) : /* @__PURE__ */ e.jsxs("div", { className:
|
|
2945
|
+
] }) : /* @__PURE__ */ e.jsxs("div", { className: m, children: [
|
|
2938
2946
|
n && /* @__PURE__ */ e.jsx("div", { className: "ds-sources-panel__title", children: n }),
|
|
2939
|
-
d.map((
|
|
2940
|
-
const
|
|
2947
|
+
d.map((x) => {
|
|
2948
|
+
const p = x.items.map((w) => w.page).filter(Boolean), h = !!a;
|
|
2941
2949
|
return u ? /* @__PURE__ */ e.jsx(
|
|
2942
2950
|
Be,
|
|
2943
2951
|
{
|
|
2944
|
-
title: /* @__PURE__ */ e.jsx(Gt, { filename:
|
|
2952
|
+
title: /* @__PURE__ */ e.jsx(Gt, { filename: x.filename, pages: p }),
|
|
2945
2953
|
padding: "s",
|
|
2946
|
-
children:
|
|
2954
|
+
children: x.items.map((w, b) => /* @__PURE__ */ e.jsx(
|
|
2947
2955
|
"div",
|
|
2948
2956
|
{
|
|
2949
|
-
className: `ds-sources-panel__snippet${
|
|
2950
|
-
onClick:
|
|
2951
|
-
children:
|
|
2957
|
+
className: `ds-sources-panel__snippet${h ? " ds-sources-panel__snippet--clickable" : ""}`,
|
|
2958
|
+
onClick: h ? () => a(w) : void 0,
|
|
2959
|
+
children: w.snippet ?? `p. ${w.page}`
|
|
2952
2960
|
},
|
|
2953
|
-
|
|
2961
|
+
b
|
|
2954
2962
|
))
|
|
2955
2963
|
},
|
|
2956
|
-
|
|
2964
|
+
x.filename
|
|
2957
2965
|
) : /* @__PURE__ */ e.jsxs(
|
|
2958
2966
|
"div",
|
|
2959
2967
|
{
|
|
2960
|
-
className: `ds-sources-panel__row${
|
|
2961
|
-
onClick:
|
|
2968
|
+
className: `ds-sources-panel__row${h ? " ds-sources-panel__row--clickable" : ""}`,
|
|
2969
|
+
onClick: h ? () => a(x.items[0]) : void 0,
|
|
2962
2970
|
children: [
|
|
2963
|
-
/* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__filename", children:
|
|
2964
|
-
|
|
2971
|
+
/* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__filename", children: x.filename }),
|
|
2972
|
+
p.length > 0 && /* @__PURE__ */ e.jsx("span", { className: "ds-sources-panel__pages", children: Te(p) })
|
|
2965
2973
|
]
|
|
2966
2974
|
},
|
|
2967
|
-
|
|
2975
|
+
x.filename
|
|
2968
2976
|
);
|
|
2969
2977
|
}),
|
|
2970
2978
|
c && !o && /* @__PURE__ */ e.jsxs("button", { className: "ds-sources-panel__more", onClick: () => i(!0), children: [
|
|
@@ -3070,8 +3078,8 @@ function bn({
|
|
|
3070
3078
|
return /* @__PURE__ */ e.jsxs("div", { className: i, children: [
|
|
3071
3079
|
o && /* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__title", children: o }),
|
|
3072
3080
|
/* @__PURE__ */ e.jsxs("div", { className: "ds-diff-view__body ds-scrollable", style: l, children: [
|
|
3073
|
-
/* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__split-col ds-scrollable", children: c.map((u,
|
|
3074
|
-
/* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__split-col ds-scrollable", children: d.map((u,
|
|
3081
|
+
/* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__split-col ds-scrollable", children: c.map((u, m) => /* @__PURE__ */ e.jsx(ye, { line: u, lineNumbers: r }, m)) }),
|
|
3082
|
+
/* @__PURE__ */ e.jsx("div", { className: "ds-diff-view__split-col ds-scrollable", children: d.map((u, m) => /* @__PURE__ */ e.jsx(ye, { line: u, lineNumbers: r }, m)) })
|
|
3075
3083
|
] })
|
|
3076
3084
|
] });
|
|
3077
3085
|
}
|
|
@@ -3237,16 +3245,16 @@ function gn({ children: t, axis: s = "y", style: n, className: r = "", ...a }) {
|
|
|
3237
3245
|
}
|
|
3238
3246
|
);
|
|
3239
3247
|
}
|
|
3240
|
-
const ke = 280, es = 22, ts = 14,
|
|
3248
|
+
const ke = 280, es = 22, ts = 14, de = 8, Ne = 6, ss = 200;
|
|
3241
3249
|
function ns(t) {
|
|
3242
3250
|
return t ? typeof t == "function" ? t() : typeof t == "string" ? document.querySelector(t) : null : null;
|
|
3243
3251
|
}
|
|
3244
3252
|
function rs(t, s, n, r) {
|
|
3245
3253
|
const a = window.innerWidth, o = window.innerHeight;
|
|
3246
|
-
if (o - t.bottom >= s + r +
|
|
3247
|
-
if (t.top >= s + r +
|
|
3248
|
-
if (a - t.right >= n + r +
|
|
3249
|
-
if (t.left >= n + r +
|
|
3254
|
+
if (o - t.bottom >= s + r + de) return "bottom";
|
|
3255
|
+
if (t.top >= s + r + de) return "top";
|
|
3256
|
+
if (a - t.right >= n + r + de) return "right";
|
|
3257
|
+
if (t.left >= n + r + de) return "left";
|
|
3250
3258
|
const i = Math.max(t.top, o - t.bottom, a - t.right, t.left);
|
|
3251
3259
|
return i === o - t.bottom ? "bottom" : i === t.top ? "top" : i === a - t.right ? "right" : "left";
|
|
3252
3260
|
}
|
|
@@ -3266,7 +3274,7 @@ function as(t, s, n, r, a) {
|
|
|
3266
3274
|
default:
|
|
3267
3275
|
l = s.top + s.height / 2 - n / 2, c = s.right + a;
|
|
3268
3276
|
}
|
|
3269
|
-
const d = Math.max(
|
|
3277
|
+
const d = Math.max(de, Math.min(o - r - de, c)), u = Math.max(de, Math.min(i - n - de, l));
|
|
3270
3278
|
return { top: u, left: d, arrowOffset: c - d, arrowOffsetY: l - u };
|
|
3271
3279
|
}
|
|
3272
3280
|
function yn({
|
|
@@ -3281,18 +3289,18 @@ function yn({
|
|
|
3281
3289
|
labelNext: c = "Next",
|
|
3282
3290
|
labelBack: d = "Back",
|
|
3283
3291
|
labelSkip: u = "Skip tour",
|
|
3284
|
-
labelFinish:
|
|
3285
|
-
statePrimary:
|
|
3286
|
-
stateBack:
|
|
3292
|
+
labelFinish: m = "Done",
|
|
3293
|
+
statePrimary: x = "idle",
|
|
3294
|
+
stateBack: p = "idle"
|
|
3287
3295
|
}) {
|
|
3288
|
-
const
|
|
3289
|
-
|
|
3290
|
-
const [
|
|
3291
|
-
const
|
|
3292
|
-
if (!
|
|
3293
|
-
const v = ns(
|
|
3296
|
+
const h = R(null), w = R(t), b = R(s), $ = R(l);
|
|
3297
|
+
w.current = t, b.current = s, $.current = l;
|
|
3298
|
+
const [N, _] = B(!1), [y, S] = B({ position: "fixed", visibility: "hidden", width: ke }), [D, M] = B("bottom"), [W, z] = B(null), j = R(!1), F = t[s], K = s === t.length - 1, V = ce(() => {
|
|
3299
|
+
const I = w.current[b.current];
|
|
3300
|
+
if (!I || !h.current) return;
|
|
3301
|
+
const v = ns(I.target);
|
|
3294
3302
|
if (!v) return;
|
|
3295
|
-
const k = v.getBoundingClientRect(), U =
|
|
3303
|
+
const k = v.getBoundingClientRect(), U = h.current.getBoundingClientRect().height || 160, G = ke, E = $.current ? es : ts, f = I.position || rs(k, U, G, E), { top: T, left: O, arrowOffset: Y, arrowOffsetY: te } = as(f, k, U, G, E);
|
|
3296
3304
|
M(f), S({
|
|
3297
3305
|
position: "fixed",
|
|
3298
3306
|
top: T,
|
|
@@ -3310,41 +3318,41 @@ function yn({
|
|
|
3310
3318
|
}, []);
|
|
3311
3319
|
return P(() => {
|
|
3312
3320
|
window.addEventListener("scroll", V, !0), window.addEventListener("resize", V);
|
|
3313
|
-
const
|
|
3314
|
-
V(),
|
|
3321
|
+
const I = requestAnimationFrame(() => {
|
|
3322
|
+
V(), _(!0), j.current = !0;
|
|
3315
3323
|
});
|
|
3316
3324
|
return () => {
|
|
3317
|
-
cancelAnimationFrame(
|
|
3325
|
+
cancelAnimationFrame(I), window.removeEventListener("scroll", V, !0), window.removeEventListener("resize", V);
|
|
3318
3326
|
};
|
|
3319
3327
|
}, []), P(() => {
|
|
3320
3328
|
if (!j.current) return;
|
|
3321
|
-
|
|
3322
|
-
const
|
|
3329
|
+
_(!1);
|
|
3330
|
+
const I = setTimeout(() => {
|
|
3323
3331
|
S((v) => ({ ...v, visibility: "hidden" })), requestAnimationFrame(() => {
|
|
3324
|
-
V(),
|
|
3332
|
+
V(), _(!0);
|
|
3325
3333
|
});
|
|
3326
3334
|
}, ss + 20);
|
|
3327
|
-
return () => clearTimeout(
|
|
3335
|
+
return () => clearTimeout(I);
|
|
3328
3336
|
}, [s]), P(() => {
|
|
3329
|
-
|
|
3330
|
-
}, [
|
|
3331
|
-
const
|
|
3337
|
+
N && h.current && h.current.focus({ preventScroll: !0 });
|
|
3338
|
+
}, [N]), P(() => {
|
|
3339
|
+
const I = (v) => {
|
|
3332
3340
|
v.key === "Escape" && a();
|
|
3333
3341
|
};
|
|
3334
|
-
return document.addEventListener("keydown",
|
|
3342
|
+
return document.addEventListener("keydown", I), () => document.removeEventListener("keydown", I);
|
|
3335
3343
|
}, [a]), P(() => {
|
|
3336
|
-
if (!
|
|
3337
|
-
const
|
|
3338
|
-
if (v.key !== "Tab" || !
|
|
3344
|
+
if (!N) return;
|
|
3345
|
+
const I = (v) => {
|
|
3346
|
+
if (v.key !== "Tab" || !h.current) return;
|
|
3339
3347
|
const k = Array.from(
|
|
3340
|
-
|
|
3348
|
+
h.current.querySelectorAll('button:not([disabled]), [href], [tabindex]:not([tabindex="-1"])')
|
|
3341
3349
|
);
|
|
3342
3350
|
if (!k.length) return;
|
|
3343
3351
|
const A = k[0], U = k[k.length - 1];
|
|
3344
3352
|
v.shiftKey && document.activeElement === A ? (v.preventDefault(), U.focus()) : !v.shiftKey && document.activeElement === U && (v.preventDefault(), A.focus());
|
|
3345
3353
|
};
|
|
3346
|
-
return document.addEventListener("keydown",
|
|
3347
|
-
}, [
|
|
3354
|
+
return document.addEventListener("keydown", I), () => document.removeEventListener("keydown", I);
|
|
3355
|
+
}, [N]), !F || typeof document > "u" ? null : re.createPortal(
|
|
3348
3356
|
/* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
3349
3357
|
W && /* @__PURE__ */ e.jsx(
|
|
3350
3358
|
"div",
|
|
@@ -3353,7 +3361,7 @@ function yn({
|
|
|
3353
3361
|
"ds-coachmark__spotlight",
|
|
3354
3362
|
i && "ds-coachmark__spotlight--overlay",
|
|
3355
3363
|
!l && "ds-coachmark__spotlight--no-ring",
|
|
3356
|
-
|
|
3364
|
+
N && "ds-coachmark__spotlight--visible"
|
|
3357
3365
|
].filter(Boolean).join(" "),
|
|
3358
3366
|
style: W,
|
|
3359
3367
|
"aria-hidden": "true"
|
|
@@ -3362,7 +3370,7 @@ function yn({
|
|
|
3362
3370
|
/* @__PURE__ */ e.jsxs(
|
|
3363
3371
|
"div",
|
|
3364
3372
|
{
|
|
3365
|
-
ref:
|
|
3373
|
+
ref: h,
|
|
3366
3374
|
"data-ds-portal": "",
|
|
3367
3375
|
role: "dialog",
|
|
3368
3376
|
"aria-modal": "false",
|
|
@@ -3370,8 +3378,8 @@ function yn({
|
|
|
3370
3378
|
"aria-label": F.title ?? `Step ${s + 1} of ${t.length}`,
|
|
3371
3379
|
className: [
|
|
3372
3380
|
"ds-coachmark__bubble",
|
|
3373
|
-
`ds-coachmark__bubble--${
|
|
3374
|
-
|
|
3381
|
+
`ds-coachmark__bubble--${D}`,
|
|
3382
|
+
N && "ds-coachmark__bubble--visible"
|
|
3375
3383
|
].filter(Boolean).join(" "),
|
|
3376
3384
|
style: y,
|
|
3377
3385
|
tabIndex: -1,
|
|
@@ -3395,8 +3403,8 @@ function yn({
|
|
|
3395
3403
|
t.length
|
|
3396
3404
|
] }),
|
|
3397
3405
|
/* @__PURE__ */ e.jsxs("div", { className: "ds-coachmark__footer-nav", children: [
|
|
3398
|
-
s > 0 && /* @__PURE__ */ e.jsx(
|
|
3399
|
-
/* @__PURE__ */ e.jsx(
|
|
3406
|
+
s > 0 && /* @__PURE__ */ e.jsx(oe, { variant: "secondary", size: "s", state: p, onClick: r, children: d }),
|
|
3407
|
+
/* @__PURE__ */ e.jsx(oe, { variant: "primary", size: "s", state: x, onClick: K ? o : n, children: K ? m : c })
|
|
3400
3408
|
] })
|
|
3401
3409
|
] })
|
|
3402
3410
|
]
|
|
@@ -3407,7 +3415,7 @@ function yn({
|
|
|
3407
3415
|
);
|
|
3408
3416
|
}
|
|
3409
3417
|
function kn(t, s = {}) {
|
|
3410
|
-
const { storageKey: n } = s, [r, a] =
|
|
3418
|
+
const { storageKey: n } = s, [r, a] = B(0), [o, i] = B(!1), l = () => n && typeof localStorage < "u" && localStorage.getItem(n) === "done", c = ce(() => {
|
|
3411
3419
|
i(!1), n && typeof localStorage < "u" && localStorage.setItem(n, "done");
|
|
3412
3420
|
}, [n]);
|
|
3413
3421
|
return {
|
|
@@ -3423,7 +3431,7 @@ function kn(t, s = {}) {
|
|
|
3423
3431
|
};
|
|
3424
3432
|
}
|
|
3425
3433
|
function En() {
|
|
3426
|
-
const t = R(null), s =
|
|
3434
|
+
const t = R(null), s = ce(() => {
|
|
3427
3435
|
const n = t.current;
|
|
3428
3436
|
if (!n) return;
|
|
3429
3437
|
n.classList.remove("ds-shake"), n.offsetWidth, n.classList.add("ds-shake");
|
|
@@ -3439,11 +3447,11 @@ export {
|
|
|
3439
3447
|
bs as Alert,
|
|
3440
3448
|
nn as AnimatedNumber,
|
|
3441
3449
|
Ss as Avatar,
|
|
3442
|
-
|
|
3450
|
+
pe as Badge,
|
|
3443
3451
|
en as Banner,
|
|
3444
3452
|
Ns as BottomSheet,
|
|
3445
3453
|
Cs as Breadcrumb,
|
|
3446
|
-
|
|
3454
|
+
oe as Button,
|
|
3447
3455
|
ms as Card,
|
|
3448
3456
|
fn as ChatMessage,
|
|
3449
3457
|
Ts as Checkbox,
|