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