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