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