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