@donkit-ai/design-system 1.3.9 → 1.3.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/high-contrast.css +92 -0
- package/dist/index.cjs.js +4 -4
- package/dist/index.d.ts +12 -0
- package/dist/index.es.js +269 -229
- package/dist/light.css +79 -0
- package/dist/tokens.css +1 -1
- package/package.json +8 -4
package/dist/index.es.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import L, { useState as k, useRef as E, useEffect as D, useLayoutEffect as
|
|
2
|
-
import { Check as
|
|
3
|
-
import
|
|
4
|
-
const
|
|
1
|
+
import L, { useState as k, useRef as E, useEffect as D, useLayoutEffect as ke, useId as Ee } from "react";
|
|
2
|
+
import { Check as re, X as ee, ChevronDown as ne, Minus as $e, Plus as ge, XCircle as de, AlertTriangle as ue, CheckCircle as fe, Info as me, ChevronUp as Re, ChevronsUpDown as Te, ChevronLeft as Ie, ChevronRight as je, Copy as Se, Brain as Ae } from "lucide-react";
|
|
3
|
+
import ae from "react-dom";
|
|
4
|
+
const S = {
|
|
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 ce = { exports: {} }, te = {};
|
|
12
12
|
/**
|
|
13
13
|
* @license React
|
|
14
14
|
* react-jsx-runtime.production.js
|
|
@@ -19,7 +19,7 @@ var ie = { exports: {} }, te = {};
|
|
|
19
19
|
* LICENSE file in the root directory of this source tree.
|
|
20
20
|
*/
|
|
21
21
|
var pe;
|
|
22
|
-
function
|
|
22
|
+
function De() {
|
|
23
23
|
if (pe) return te;
|
|
24
24
|
pe = 1;
|
|
25
25
|
var s = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
|
|
@@ -51,7 +51,7 @@ var se = {};
|
|
|
51
51
|
* LICENSE file in the root directory of this source tree.
|
|
52
52
|
*/
|
|
53
53
|
var he;
|
|
54
|
-
function
|
|
54
|
+
function Pe() {
|
|
55
55
|
return he || (he = 1, process.env.NODE_ENV !== "production" && function() {
|
|
56
56
|
function s(c) {
|
|
57
57
|
if (c == null) return null;
|
|
@@ -59,7 +59,7 @@ function De() {
|
|
|
59
59
|
return c.$$typeof === G ? null : c.displayName || c.name || null;
|
|
60
60
|
if (typeof c == "string") return c;
|
|
61
61
|
switch (c) {
|
|
62
|
-
case
|
|
62
|
+
case $:
|
|
63
63
|
return "Fragment";
|
|
64
64
|
case B:
|
|
65
65
|
return "Profiler";
|
|
@@ -78,19 +78,19 @@ function De() {
|
|
|
78
78
|
), c.$$typeof) {
|
|
79
79
|
case w:
|
|
80
80
|
return "Portal";
|
|
81
|
-
case
|
|
81
|
+
case g:
|
|
82
82
|
return c.displayName || "Context";
|
|
83
83
|
case T:
|
|
84
84
|
return (c._context.displayName || "Context") + ".Consumer";
|
|
85
|
-
case z:
|
|
86
|
-
var b = c.render;
|
|
87
|
-
return c = c.displayName, c || (c = b.displayName || b.name || "", c = c !== "" ? "ForwardRef(" + c + ")" : "ForwardRef"), c;
|
|
88
|
-
case M:
|
|
89
|
-
return b = c.displayName || null, b !== null ? b : s(c.type) || "Memo";
|
|
90
85
|
case F:
|
|
91
|
-
|
|
86
|
+
var x = c.render;
|
|
87
|
+
return c = c.displayName, c || (c = x.displayName || x.name || "", c = c !== "" ? "ForwardRef(" + c + ")" : "ForwardRef"), c;
|
|
88
|
+
case M:
|
|
89
|
+
return x = c.displayName || null, x !== null ? x : s(c.type) || "Memo";
|
|
90
|
+
case W:
|
|
91
|
+
x = c._payload, c = c._init;
|
|
92
92
|
try {
|
|
93
|
-
return s(c(
|
|
93
|
+
return s(c(x));
|
|
94
94
|
} catch {
|
|
95
95
|
}
|
|
96
96
|
}
|
|
@@ -102,27 +102,27 @@ function De() {
|
|
|
102
102
|
function r(c) {
|
|
103
103
|
try {
|
|
104
104
|
t(c);
|
|
105
|
-
var
|
|
105
|
+
var x = !1;
|
|
106
106
|
} catch {
|
|
107
|
-
|
|
107
|
+
x = !0;
|
|
108
108
|
}
|
|
109
|
-
if (
|
|
110
|
-
|
|
111
|
-
var y =
|
|
109
|
+
if (x) {
|
|
110
|
+
x = console;
|
|
111
|
+
var y = x.error, I = typeof Symbol == "function" && Symbol.toStringTag && c[Symbol.toStringTag] || c.constructor.name || "Object";
|
|
112
112
|
return y.call(
|
|
113
|
-
|
|
113
|
+
x,
|
|
114
114
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
115
115
|
I
|
|
116
116
|
), t(c);
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
119
|
function o(c) {
|
|
120
|
-
if (c ===
|
|
121
|
-
if (typeof c == "object" && c !== null && c.$$typeof ===
|
|
120
|
+
if (c === $) return "<>";
|
|
121
|
+
if (typeof c == "object" && c !== null && c.$$typeof === W)
|
|
122
122
|
return "<...>";
|
|
123
123
|
try {
|
|
124
|
-
var
|
|
125
|
-
return
|
|
124
|
+
var x = s(c);
|
|
125
|
+
return x ? "<" + x + ">" : "<...>";
|
|
126
126
|
} catch {
|
|
127
127
|
return "<...>";
|
|
128
128
|
}
|
|
@@ -136,16 +136,16 @@ function De() {
|
|
|
136
136
|
}
|
|
137
137
|
function i(c) {
|
|
138
138
|
if (C.call(c, "key")) {
|
|
139
|
-
var
|
|
140
|
-
if (
|
|
139
|
+
var x = Object.getOwnPropertyDescriptor(c, "key").get;
|
|
140
|
+
if (x && x.isReactWarning) return !1;
|
|
141
141
|
}
|
|
142
142
|
return c.key !== void 0;
|
|
143
143
|
}
|
|
144
|
-
function l(c,
|
|
144
|
+
function l(c, x) {
|
|
145
145
|
function y() {
|
|
146
146
|
R || (R = !0, console.error(
|
|
147
147
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
148
|
-
|
|
148
|
+
x
|
|
149
149
|
));
|
|
150
150
|
}
|
|
151
151
|
y.isReactWarning = !0, Object.defineProperty(c, "key", {
|
|
@@ -159,15 +159,15 @@ function De() {
|
|
|
159
159
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
160
160
|
)), c = this.props.ref, c !== void 0 ? c : null;
|
|
161
161
|
}
|
|
162
|
-
function u(c,
|
|
163
|
-
var
|
|
162
|
+
function u(c, x, y, I, K, X) {
|
|
163
|
+
var A = y.ref;
|
|
164
164
|
return c = {
|
|
165
165
|
$$typeof: _,
|
|
166
166
|
type: c,
|
|
167
|
-
key:
|
|
167
|
+
key: x,
|
|
168
168
|
props: y,
|
|
169
169
|
_owner: I
|
|
170
|
-
}, (
|
|
170
|
+
}, (A !== void 0 ? A : null) !== null ? Object.defineProperty(c, "ref", {
|
|
171
171
|
enumerable: !1,
|
|
172
172
|
get: m
|
|
173
173
|
}) : Object.defineProperty(c, "ref", { enumerable: !1, value: null }), c._store = {}, Object.defineProperty(c._store, "validated", {
|
|
@@ -192,25 +192,25 @@ function De() {
|
|
|
192
192
|
value: X
|
|
193
193
|
}), Object.freeze && (Object.freeze(c.props), Object.freeze(c)), c;
|
|
194
194
|
}
|
|
195
|
-
function p(c,
|
|
196
|
-
var
|
|
197
|
-
if (
|
|
195
|
+
function p(c, x, y, I, K, X) {
|
|
196
|
+
var A = x.children;
|
|
197
|
+
if (A !== void 0)
|
|
198
198
|
if (I)
|
|
199
|
-
if (h(
|
|
200
|
-
for (I = 0; I <
|
|
201
|
-
f(
|
|
202
|
-
Object.freeze && Object.freeze(
|
|
199
|
+
if (h(A)) {
|
|
200
|
+
for (I = 0; I < A.length; I++)
|
|
201
|
+
f(A[I]);
|
|
202
|
+
Object.freeze && Object.freeze(A);
|
|
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 f(
|
|
208
|
-
if (C.call(
|
|
209
|
-
|
|
210
|
-
var J = Object.keys(
|
|
211
|
-
return
|
|
207
|
+
else f(A);
|
|
208
|
+
if (C.call(x, "key")) {
|
|
209
|
+
A = s(c);
|
|
210
|
+
var J = Object.keys(x).filter(function(ye) {
|
|
211
|
+
return ye !== "key";
|
|
212
212
|
});
|
|
213
|
-
I = 0 < J.length ? "{key: someKey, " + J.join(": ..., ") + ": ...}" : "{key: someKey}", j[
|
|
213
|
+
I = 0 < J.length ? "{key: someKey, " + J.join(": ..., ") + ": ...}" : "{key: someKey}", j[A + I] || (J = 0 < J.length ? "{" + J.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} />
|
|
@@ -218,22 +218,22 @@ React keys must be passed directly to JSX without using spread:
|
|
|
218
218
|
let props = %s;
|
|
219
219
|
<%s key={someKey} {...props} />`,
|
|
220
220
|
I,
|
|
221
|
-
|
|
221
|
+
A,
|
|
222
222
|
J,
|
|
223
|
-
|
|
224
|
-
), j[
|
|
223
|
+
A
|
|
224
|
+
), j[A + I] = !0);
|
|
225
225
|
}
|
|
226
|
-
if (
|
|
226
|
+
if (A = null, y !== void 0 && (r(y), A = "" + y), i(x) && (r(x.key), A = "" + x.key), "key" in x) {
|
|
227
227
|
y = {};
|
|
228
|
-
for (var
|
|
229
|
-
|
|
230
|
-
} else y =
|
|
231
|
-
return
|
|
228
|
+
for (var oe in x)
|
|
229
|
+
oe !== "key" && (y[oe] = x[oe]);
|
|
230
|
+
} else y = x;
|
|
231
|
+
return A && l(
|
|
232
232
|
y,
|
|
233
233
|
typeof c == "function" ? c.displayName || c.name || "Unknown" : c
|
|
234
234
|
), u(
|
|
235
235
|
c,
|
|
236
|
-
|
|
236
|
+
A,
|
|
237
237
|
y,
|
|
238
238
|
a(),
|
|
239
239
|
K,
|
|
@@ -241,12 +241,12 @@ React keys must be passed directly to JSX without using spread:
|
|
|
241
241
|
);
|
|
242
242
|
}
|
|
243
243
|
function f(c) {
|
|
244
|
-
|
|
244
|
+
b(c) ? c._store && (c._store.validated = 1) : typeof c == "object" && c !== null && c.$$typeof === W && (c._payload.status === "fulfilled" ? b(c._payload.value) && c._payload.value._store && (c._payload.value._store.validated = 1) : c._store && (c._store.validated = 1));
|
|
245
245
|
}
|
|
246
|
-
function
|
|
246
|
+
function b(c) {
|
|
247
247
|
return typeof c == "object" && c !== null && c.$$typeof === _;
|
|
248
248
|
}
|
|
249
|
-
var d = L, _ = Symbol.for("react.transitional.element"), w = Symbol.for("react.portal"),
|
|
249
|
+
var d = L, _ = Symbol.for("react.transitional.element"), w = Symbol.for("react.portal"), $ = Symbol.for("react.fragment"), N = Symbol.for("react.strict_mode"), B = Symbol.for("react.profiler"), T = Symbol.for("react.consumer"), g = Symbol.for("react.context"), F = Symbol.for("react.forward_ref"), O = Symbol.for("react.suspense"), q = Symbol.for("react.suspense_list"), M = Symbol.for("react.memo"), W = Symbol.for("react.lazy"), V = Symbol.for("react.activity"), G = Symbol.for("react.client.reference"), H = d.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, C = Object.prototype.hasOwnProperty, h = Array.isArray, v = console.createTask ? console.createTask : function() {
|
|
250
250
|
return null;
|
|
251
251
|
};
|
|
252
252
|
d = {
|
|
@@ -254,36 +254,36 @@ React keys must be passed directly to JSX without using spread:
|
|
|
254
254
|
return c();
|
|
255
255
|
}
|
|
256
256
|
};
|
|
257
|
-
var R, P = {},
|
|
257
|
+
var R, P = {}, z = d.react_stack_bottom_frame.bind(
|
|
258
258
|
d,
|
|
259
259
|
n
|
|
260
260
|
)(), U = v(o(n)), j = {};
|
|
261
|
-
se.Fragment =
|
|
261
|
+
se.Fragment = $, se.jsx = function(c, x, y) {
|
|
262
262
|
var I = 1e4 > H.recentlyCreatedOwnerStacks++;
|
|
263
263
|
return p(
|
|
264
264
|
c,
|
|
265
|
-
|
|
265
|
+
x,
|
|
266
266
|
y,
|
|
267
267
|
!1,
|
|
268
|
-
I ? Error("react-stack-top-frame") :
|
|
268
|
+
I ? Error("react-stack-top-frame") : z,
|
|
269
269
|
I ? v(o(c)) : U
|
|
270
270
|
);
|
|
271
|
-
}, se.jsxs = function(c,
|
|
271
|
+
}, se.jsxs = function(c, x, y) {
|
|
272
272
|
var I = 1e4 > H.recentlyCreatedOwnerStacks++;
|
|
273
273
|
return p(
|
|
274
274
|
c,
|
|
275
|
-
|
|
275
|
+
x,
|
|
276
276
|
y,
|
|
277
277
|
!0,
|
|
278
|
-
I ? Error("react-stack-top-frame") :
|
|
278
|
+
I ? Error("react-stack-top-frame") : z,
|
|
279
279
|
I ? v(o(c)) : U
|
|
280
280
|
);
|
|
281
281
|
};
|
|
282
282
|
}()), se;
|
|
283
283
|
}
|
|
284
|
-
process.env.NODE_ENV === "production" ?
|
|
285
|
-
var e =
|
|
286
|
-
function
|
|
284
|
+
process.env.NODE_ENV === "production" ? ce.exports = De() : ce.exports = Pe();
|
|
285
|
+
var e = ce.exports;
|
|
286
|
+
function Be({ size: s = "m", color: t = "default", className: r = "", ...o }) {
|
|
287
287
|
return /* @__PURE__ */ e.jsx(
|
|
288
288
|
"span",
|
|
289
289
|
{
|
|
@@ -294,7 +294,7 @@ function Pe({ size: s = "m", color: t = "default", className: r = "", ...o }) {
|
|
|
294
294
|
}
|
|
295
295
|
);
|
|
296
296
|
}
|
|
297
|
-
const
|
|
297
|
+
const Oe = { xs: 12, s: 14, m: 16, l: 20 };
|
|
298
298
|
function _e({
|
|
299
299
|
children: s,
|
|
300
300
|
variant: t = "primary",
|
|
@@ -309,14 +309,14 @@ function _e({
|
|
|
309
309
|
"aria-label": p,
|
|
310
310
|
...f
|
|
311
311
|
}) {
|
|
312
|
-
const
|
|
312
|
+
const b = a && !s, d = i === "loading", _ = i === "success", w = i === "error", $ = d || _ || w, N = r === "xs" ? "s" : "m", B = Oe[r] ?? 16, T = d ? /* @__PURE__ */ e.jsx(Be, { size: N }) : _ ? /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(re, { size: B, strokeWidth: 2.5 }) }) : w ? /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(ee, { size: B, strokeWidth: 2.5 }) }) : null, g = [
|
|
313
313
|
"ds-button",
|
|
314
314
|
`ds-button--${t}`,
|
|
315
315
|
`ds-button--${r}`,
|
|
316
316
|
o && "ds-button--full",
|
|
317
|
-
|
|
318
|
-
].filter(Boolean).join(" "),
|
|
319
|
-
|
|
317
|
+
b && "ds-button--icon-only"
|
|
318
|
+
].filter(Boolean).join(" "), F = i !== "idle" ? i : void 0, O = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
319
|
+
$ ? T : a && /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: a }),
|
|
320
320
|
s
|
|
321
321
|
] });
|
|
322
322
|
if (u) {
|
|
@@ -330,13 +330,13 @@ function _e({
|
|
|
330
330
|
return /* @__PURE__ */ e.jsx(
|
|
331
331
|
"a",
|
|
332
332
|
{
|
|
333
|
-
className:
|
|
333
|
+
className: g,
|
|
334
334
|
href: n || d ? void 0 : u,
|
|
335
335
|
onClick: q,
|
|
336
336
|
"aria-label": p,
|
|
337
337
|
"aria-disabled": n || d ? "true" : void 0,
|
|
338
338
|
"aria-busy": d ? "true" : void 0,
|
|
339
|
-
"data-state":
|
|
339
|
+
"data-state": F,
|
|
340
340
|
...f,
|
|
341
341
|
children: O
|
|
342
342
|
}
|
|
@@ -346,12 +346,12 @@ function _e({
|
|
|
346
346
|
"button",
|
|
347
347
|
{
|
|
348
348
|
type: m,
|
|
349
|
-
className:
|
|
349
|
+
className: g,
|
|
350
350
|
disabled: n,
|
|
351
351
|
onClick: d ? void 0 : l,
|
|
352
352
|
"aria-label": p,
|
|
353
353
|
"aria-busy": d ? "true" : void 0,
|
|
354
|
-
"data-state":
|
|
354
|
+
"data-state": F,
|
|
355
355
|
...f,
|
|
356
356
|
children: O
|
|
357
357
|
}
|
|
@@ -370,7 +370,7 @@ function lt({
|
|
|
370
370
|
id: u,
|
|
371
371
|
...p
|
|
372
372
|
}) {
|
|
373
|
-
const f = u || `input-${L.useId()}`,
|
|
373
|
+
const f = u || `input-${L.useId()}`, b = r ? `${f}-hint` : void 0, d = t ? `${f}-error` : void 0, _ = d || b;
|
|
374
374
|
return /* @__PURE__ */ e.jsxs("div", { className: `ds-input-wrapper ${o ? "ds-input-wrapper--full" : ""} ${m ? "ds-input-wrapper--disabled" : ""} ${t ? "ds-input-wrapper--error" : ""}`, children: [
|
|
375
375
|
s && /* @__PURE__ */ e.jsx("label", { className: "ds-input-label", htmlFor: f, children: s }),
|
|
376
376
|
/* @__PURE__ */ e.jsxs("div", { className: "ds-input-container", children: [
|
|
@@ -398,7 +398,7 @@ function lt({
|
|
|
398
398
|
}
|
|
399
399
|
)
|
|
400
400
|
] }),
|
|
401
|
-
r && !t && /* @__PURE__ */ e.jsx("span", { id:
|
|
401
|
+
r && !t && /* @__PURE__ */ e.jsx("span", { id: b, className: "ds-input-hint", children: r }),
|
|
402
402
|
/* @__PURE__ */ e.jsx("div", { className: "ds-input-error-wrap", children: /* @__PURE__ */ e.jsx("div", { className: "ds-input-error-inner", children: t && /* @__PURE__ */ e.jsx("span", { id: d, className: "ds-input-error", role: "alert", children: t }) }) })
|
|
403
403
|
] });
|
|
404
404
|
}
|
|
@@ -414,7 +414,7 @@ function dt({
|
|
|
414
414
|
rows: m = 3,
|
|
415
415
|
...u
|
|
416
416
|
}) {
|
|
417
|
-
const p = i || `textarea-${L.useId()}`, f = r ? `${p}-hint` : void 0,
|
|
417
|
+
const p = i || `textarea-${L.useId()}`, f = r ? `${p}-hint` : void 0, b = t ? `${p}-error` : void 0, d = b || f;
|
|
418
418
|
return /* @__PURE__ */ e.jsxs("div", { className: `ds-textarea-wrapper ${o ? "ds-textarea-wrapper--full" : ""} ${n ? "ds-textarea-wrapper--disabled" : ""}`, children: [
|
|
419
419
|
s && /* @__PURE__ */ e.jsx("label", { className: "ds-textarea-label", htmlFor: p, children: s }),
|
|
420
420
|
/* @__PURE__ */ e.jsx(
|
|
@@ -430,7 +430,7 @@ function dt({
|
|
|
430
430
|
}
|
|
431
431
|
),
|
|
432
432
|
r && !t && /* @__PURE__ */ e.jsx("span", { id: f, className: "ds-textarea-hint", children: r }),
|
|
433
|
-
t && /* @__PURE__ */ e.jsx("span", { id:
|
|
433
|
+
t && /* @__PURE__ */ e.jsx("span", { id: b, className: "ds-textarea-error", role: "alert", children: t })
|
|
434
434
|
] });
|
|
435
435
|
}
|
|
436
436
|
function ut({
|
|
@@ -446,23 +446,23 @@ function ut({
|
|
|
446
446
|
id: u,
|
|
447
447
|
...p
|
|
448
448
|
}) {
|
|
449
|
-
const [f,
|
|
450
|
-
d || (_(!0),
|
|
449
|
+
const [f, b] = k(!1), [d, _] = k(!1), [w, $] = k({}), [N, B] = k("down"), [T, g] = k(-1), F = E(null), O = E(null), q = E(null), M = E(null), W = u || `select-${L.useId()}`, V = `${W}-label`, G = n ? `${W}-error` : void 0, H = 150, C = (j = !1) => {
|
|
450
|
+
d || (_(!0), g(-1), M.current = setTimeout(() => {
|
|
451
451
|
var c;
|
|
452
|
-
|
|
452
|
+
b(!1), _(!1), j && ((c = q.current) == null || c.focus());
|
|
453
453
|
}, H));
|
|
454
454
|
}, h = (j) => {
|
|
455
455
|
clearTimeout(M.current), _(!1);
|
|
456
|
-
const c = j !== void 0 ? j : Math.max(o.findIndex((
|
|
457
|
-
|
|
456
|
+
const c = j !== void 0 ? j : Math.max(o.findIndex((x) => x.value === t), 0);
|
|
457
|
+
g(c), b(!0);
|
|
458
458
|
};
|
|
459
459
|
D(() => () => clearTimeout(M.current), []);
|
|
460
460
|
const v = () => {
|
|
461
461
|
var X;
|
|
462
|
-
const j = (X =
|
|
462
|
+
const j = (X = F.current) == null ? void 0 : X.getBoundingClientRect();
|
|
463
463
|
if (!j) return;
|
|
464
|
-
const c = window.innerHeight,
|
|
465
|
-
B(K ? "up" : "down"),
|
|
464
|
+
const c = window.innerHeight, x = c - j.bottom, y = j.top, K = x < 300 && y > x;
|
|
465
|
+
B(K ? "up" : "down"), $(
|
|
466
466
|
K ? { bottom: c - j.top + 4, left: j.left, width: j.width } : { top: j.bottom + 4, left: j.left, width: j.width }
|
|
467
467
|
);
|
|
468
468
|
};
|
|
@@ -473,7 +473,7 @@ function ut({
|
|
|
473
473
|
};
|
|
474
474
|
}, [f]), D(() => {
|
|
475
475
|
const j = (c) => {
|
|
476
|
-
|
|
476
|
+
F.current && !F.current.contains(c.target) && O.current && !O.current.contains(c.target) && C();
|
|
477
477
|
};
|
|
478
478
|
return document.addEventListener("mousedown", j), () => document.removeEventListener("mousedown", j);
|
|
479
479
|
}, [d]), D(() => {
|
|
@@ -484,16 +484,16 @@ function ut({
|
|
|
484
484
|
const R = (j) => {
|
|
485
485
|
switch (j.key) {
|
|
486
486
|
case "ArrowDown":
|
|
487
|
-
j.preventDefault(), f ?
|
|
487
|
+
j.preventDefault(), f ? g((c) => Math.min(c + 1, o.length - 1)) : h();
|
|
488
488
|
break;
|
|
489
489
|
case "ArrowUp":
|
|
490
|
-
j.preventDefault(), f ?
|
|
490
|
+
j.preventDefault(), f ? g((c) => Math.max(c - 1, 0)) : h(o.length - 1);
|
|
491
491
|
break;
|
|
492
492
|
case "Home":
|
|
493
|
-
f && (j.preventDefault(),
|
|
493
|
+
f && (j.preventDefault(), g(0));
|
|
494
494
|
break;
|
|
495
495
|
case "End":
|
|
496
|
-
f && (j.preventDefault(),
|
|
496
|
+
f && (j.preventDefault(), g(o.length - 1));
|
|
497
497
|
break;
|
|
498
498
|
case "Enter":
|
|
499
499
|
case " ":
|
|
@@ -506,7 +506,7 @@ function ut({
|
|
|
506
506
|
f && C(!1);
|
|
507
507
|
break;
|
|
508
508
|
}
|
|
509
|
-
}, P = o.find((j) => j.value === t),
|
|
509
|
+
}, P = o.find((j) => j.value === t), z = l === "xs" ? S[1] : l === "small" ? S[2] : S[3], U = f && /* @__PURE__ */ e.jsx(
|
|
510
510
|
"div",
|
|
511
511
|
{
|
|
512
512
|
ref: O,
|
|
@@ -523,7 +523,7 @@ function ut({
|
|
|
523
523
|
children: o.map((j, c) => /* @__PURE__ */ e.jsx(
|
|
524
524
|
"button",
|
|
525
525
|
{
|
|
526
|
-
id: `${
|
|
526
|
+
id: `${W}-opt-${c}`,
|
|
527
527
|
type: "button",
|
|
528
528
|
role: "option",
|
|
529
529
|
tabIndex: -1,
|
|
@@ -545,16 +545,16 @@ function ut({
|
|
|
545
545
|
);
|
|
546
546
|
return /* @__PURE__ */ e.jsxs("div", { className: `ds-select-wrapper ${i ? "ds-select-wrapper--full" : ""} ${m ? "ds-select-wrapper--disabled" : ""}`, children: [
|
|
547
547
|
s && /* @__PURE__ */ e.jsx("label", { id: V, className: "ds-select-label", children: s }),
|
|
548
|
-
/* @__PURE__ */ e.jsx("div", { className: "ds-select-container", ref:
|
|
548
|
+
/* @__PURE__ */ e.jsx("div", { className: "ds-select-container", ref: F, children: /* @__PURE__ */ e.jsxs(
|
|
549
549
|
"button",
|
|
550
550
|
{
|
|
551
551
|
ref: q,
|
|
552
552
|
type: "button",
|
|
553
|
-
id:
|
|
553
|
+
id: W,
|
|
554
554
|
role: "combobox",
|
|
555
555
|
"aria-haspopup": "listbox",
|
|
556
556
|
"aria-expanded": f,
|
|
557
|
-
"aria-activedescendant": f && T >= 0 ? `${
|
|
557
|
+
"aria-activedescendant": f && T >= 0 ? `${W}-opt-${T}` : void 0,
|
|
558
558
|
"aria-labelledby": s ? V : void 0,
|
|
559
559
|
"aria-invalid": n ? "true" : "false",
|
|
560
560
|
"aria-describedby": G,
|
|
@@ -568,9 +568,9 @@ function ut({
|
|
|
568
568
|
children: [
|
|
569
569
|
/* @__PURE__ */ e.jsx("span", { className: P ? "" : "ds-select-placeholder", children: (P == null ? void 0 : P.label) || a }),
|
|
570
570
|
/* @__PURE__ */ e.jsx(
|
|
571
|
-
|
|
571
|
+
ne,
|
|
572
572
|
{
|
|
573
|
-
size:
|
|
573
|
+
size: z,
|
|
574
574
|
strokeWidth: 1.5,
|
|
575
575
|
className: `ds-select-icon ${f && N === "down" ? "ds-select-icon--open" : ""} ${f && N === "up" ? "ds-select-icon--up" : ""}`,
|
|
576
576
|
"aria-hidden": "true"
|
|
@@ -580,7 +580,7 @@ function ut({
|
|
|
580
580
|
}
|
|
581
581
|
) }),
|
|
582
582
|
n && /* @__PURE__ */ e.jsx("span", { id: G, className: "ds-select-error", role: "alert", children: n }),
|
|
583
|
-
typeof document < "u" &&
|
|
583
|
+
typeof document < "u" && ae.createPortal(U, document.body)
|
|
584
584
|
] });
|
|
585
585
|
}
|
|
586
586
|
function ft({
|
|
@@ -600,7 +600,7 @@ function ft({
|
|
|
600
600
|
if (l) return;
|
|
601
601
|
const N = Math.min(Number(t) + n, a);
|
|
602
602
|
r == null || r(N);
|
|
603
|
-
},
|
|
603
|
+
}, b = () => {
|
|
604
604
|
if (l) return;
|
|
605
605
|
const N = Math.max(Number(t) - n, o);
|
|
606
606
|
r == null || r(N);
|
|
@@ -613,8 +613,8 @@ function ft({
|
|
|
613
613
|
}
|
|
614
614
|
const T = Number(B);
|
|
615
615
|
if (!isNaN(T)) {
|
|
616
|
-
const
|
|
617
|
-
r == null || r(
|
|
616
|
+
const g = Math.min(Math.max(T, o), a);
|
|
617
|
+
r == null || r(g);
|
|
618
618
|
}
|
|
619
619
|
}, _ = [
|
|
620
620
|
"ds-stepper-wrapper",
|
|
@@ -624,7 +624,7 @@ function ft({
|
|
|
624
624
|
"ds-stepper",
|
|
625
625
|
`ds-stepper--${i}`,
|
|
626
626
|
l && "ds-stepper--disabled"
|
|
627
|
-
].filter(Boolean).join(" "),
|
|
627
|
+
].filter(Boolean).join(" "), $ = i === "xs" ? S[1] : i === "small" ? S[2] : S[3];
|
|
628
628
|
return /* @__PURE__ */ e.jsxs("div", { className: _, children: [
|
|
629
629
|
s && /* @__PURE__ */ e.jsx("label", { className: "ds-stepper-label", children: s }),
|
|
630
630
|
/* @__PURE__ */ e.jsxs("div", { className: w, children: [
|
|
@@ -633,10 +633,10 @@ function ft({
|
|
|
633
633
|
{
|
|
634
634
|
type: "button",
|
|
635
635
|
className: "ds-stepper-button ds-stepper-button--minus",
|
|
636
|
-
onClick:
|
|
636
|
+
onClick: b,
|
|
637
637
|
disabled: l || t <= o,
|
|
638
638
|
"aria-label": "Decrease",
|
|
639
|
-
children: /* @__PURE__ */ e.jsx(
|
|
639
|
+
children: /* @__PURE__ */ e.jsx($e, { size: $, strokeWidth: 1.5 })
|
|
640
640
|
}
|
|
641
641
|
),
|
|
642
642
|
/* @__PURE__ */ e.jsx(
|
|
@@ -661,7 +661,7 @@ function ft({
|
|
|
661
661
|
onClick: f,
|
|
662
662
|
disabled: l || t >= a,
|
|
663
663
|
"aria-label": "Increase",
|
|
664
|
-
children: /* @__PURE__ */ e.jsx(ge, { size:
|
|
664
|
+
children: /* @__PURE__ */ e.jsx(ge, { size: $, strokeWidth: 1.5 })
|
|
665
665
|
}
|
|
666
666
|
)
|
|
667
667
|
] }),
|
|
@@ -669,7 +669,7 @@ function ft({
|
|
|
669
669
|
u && /* @__PURE__ */ e.jsx("div", { className: "ds-stepper-error", children: u })
|
|
670
670
|
] });
|
|
671
671
|
}
|
|
672
|
-
function
|
|
672
|
+
function Le({
|
|
673
673
|
children: s,
|
|
674
674
|
padding: t = "m",
|
|
675
675
|
variant: r = "info",
|
|
@@ -705,7 +705,7 @@ function Oe({
|
|
|
705
705
|
}
|
|
706
706
|
);
|
|
707
707
|
}
|
|
708
|
-
const f = u && a ? "button" : "div",
|
|
708
|
+
const f = u && a ? "button" : "div", b = u && a ? {
|
|
709
709
|
type: "button",
|
|
710
710
|
onClick: a,
|
|
711
711
|
disabled: i
|
|
@@ -715,7 +715,7 @@ function Oe({
|
|
|
715
715
|
{
|
|
716
716
|
className: p,
|
|
717
717
|
role: u && !a ? "article" : void 0,
|
|
718
|
-
...
|
|
718
|
+
...b,
|
|
719
719
|
...l,
|
|
720
720
|
children: s
|
|
721
721
|
}
|
|
@@ -730,19 +730,19 @@ function pt({ children: s, ...t }) {
|
|
|
730
730
|
function ht({ children: s, ...t }) {
|
|
731
731
|
return /* @__PURE__ */ e.jsx("h3", { className: "ds-h3", ...t, children: s });
|
|
732
732
|
}
|
|
733
|
-
function
|
|
733
|
+
function bt({ children: s, ...t }) {
|
|
734
734
|
return /* @__PURE__ */ e.jsx("h4", { className: "ds-h4", ...t, children: s });
|
|
735
735
|
}
|
|
736
|
-
function
|
|
736
|
+
function xt({ children: s, secondary: t = !1, ...r }) {
|
|
737
737
|
return /* @__PURE__ */ e.jsx("p", { className: `ds-p1 ${t ? "ds-p1--secondary" : ""}`, ...r, children: s });
|
|
738
738
|
}
|
|
739
|
-
function
|
|
739
|
+
function Me({ children: s, secondary: t = !1, ...r }) {
|
|
740
740
|
return /* @__PURE__ */ e.jsx("p", { className: `ds-p2 ${t ? "ds-p2--secondary" : ""}`, ...r, children: s });
|
|
741
741
|
}
|
|
742
|
-
function
|
|
742
|
+
function we({ children: s, secondary: t = !1, ...r }) {
|
|
743
743
|
return /* @__PURE__ */ e.jsx("p", { className: `ds-p3 ${t ? "ds-p3--secondary" : ""}`, ...r, children: s });
|
|
744
744
|
}
|
|
745
|
-
function
|
|
745
|
+
function ie({
|
|
746
746
|
children: s,
|
|
747
747
|
variant: t = "default",
|
|
748
748
|
size: r = "m",
|
|
@@ -756,7 +756,7 @@ function oe({
|
|
|
756
756
|
].filter(Boolean).join(" "), i = o || (["info", "success", "warning", "error"].includes(t) ? "status" : void 0);
|
|
757
757
|
return /* @__PURE__ */ e.jsx("span", { className: n, role: i, ...a, children: s });
|
|
758
758
|
}
|
|
759
|
-
const
|
|
759
|
+
const We = {
|
|
760
760
|
info: me,
|
|
761
761
|
success: fe,
|
|
762
762
|
warning: ue,
|
|
@@ -770,9 +770,9 @@ function vt({
|
|
|
770
770
|
role: a,
|
|
771
771
|
...n
|
|
772
772
|
}) {
|
|
773
|
-
const i =
|
|
773
|
+
const i = We[t], l = a || (t === "error" ? "alert" : "status");
|
|
774
774
|
return /* @__PURE__ */ e.jsxs("div", { className: `ds-alert ds-alert--${t} ${r ? "" : "ds-alert--no-title"}`, role: l, ...n, children: [
|
|
775
|
-
i && /* @__PURE__ */ e.jsx("div", { className: "ds-alert__icon", children: /* @__PURE__ */ e.jsx(i, { size:
|
|
775
|
+
i && /* @__PURE__ */ e.jsx("div", { className: "ds-alert__icon", children: /* @__PURE__ */ e.jsx(i, { size: S[3], strokeWidth: 1.5 }) }),
|
|
776
776
|
/* @__PURE__ */ e.jsxs("div", { className: "ds-alert__content", children: [
|
|
777
777
|
r && /* @__PURE__ */ e.jsx("div", { className: "ds-alert__title", children: r }),
|
|
778
778
|
s && /* @__PURE__ */ e.jsx("div", { className: "ds-alert__message", children: s })
|
|
@@ -784,12 +784,12 @@ function vt({
|
|
|
784
784
|
className: "ds-alert__close",
|
|
785
785
|
onClick: o,
|
|
786
786
|
"aria-label": "Close alert",
|
|
787
|
-
children: /* @__PURE__ */ e.jsx(ee, { size:
|
|
787
|
+
children: /* @__PURE__ */ e.jsx(ee, { size: S[3], strokeWidth: 1.5 })
|
|
788
788
|
}
|
|
789
789
|
)
|
|
790
790
|
] });
|
|
791
791
|
}
|
|
792
|
-
const
|
|
792
|
+
const ze = 200;
|
|
793
793
|
function jt({
|
|
794
794
|
children: s,
|
|
795
795
|
title: t,
|
|
@@ -800,7 +800,7 @@ function jt({
|
|
|
800
800
|
const n = E(null), i = L.useId(), [l, m] = k(!1), u = () => {
|
|
801
801
|
!r || l || (m(!0), setTimeout(() => {
|
|
802
802
|
m(!1), r();
|
|
803
|
-
},
|
|
803
|
+
}, ze));
|
|
804
804
|
};
|
|
805
805
|
D(() => {
|
|
806
806
|
const d = (w) => {
|
|
@@ -812,7 +812,7 @@ function jt({
|
|
|
812
812
|
document.removeEventListener("keydown", d), document.removeEventListener("mousedown", _);
|
|
813
813
|
};
|
|
814
814
|
}, [r, l]);
|
|
815
|
-
const p = L.Children.toArray(s), f = p.find((d) => (d == null ? void 0 : d.type) ===
|
|
815
|
+
const p = L.Children.toArray(s), f = p.find((d) => (d == null ? void 0 : d.type) === be), b = p.filter((d) => (d == null ? void 0 : d.type) !== be);
|
|
816
816
|
return /* @__PURE__ */ e.jsx("div", { className: ["ds-modal-overlay", l && "ds-modal-overlay--closing"].filter(Boolean).join(" "), ...a, children: /* @__PURE__ */ e.jsxs(
|
|
817
817
|
"div",
|
|
818
818
|
{
|
|
@@ -829,22 +829,22 @@ function jt({
|
|
|
829
829
|
{
|
|
830
830
|
variant: "ghost",
|
|
831
831
|
size: "small",
|
|
832
|
-
icon: /* @__PURE__ */ e.jsx(ee, { size:
|
|
832
|
+
icon: /* @__PURE__ */ e.jsx(ee, { size: S[2], strokeWidth: 1.5 }),
|
|
833
833
|
onClick: u,
|
|
834
834
|
"aria-label": "Close modal"
|
|
835
835
|
}
|
|
836
836
|
)
|
|
837
837
|
] }),
|
|
838
|
-
/* @__PURE__ */ e.jsx("div", { className: "ds-modal__body", children:
|
|
838
|
+
/* @__PURE__ */ e.jsx("div", { className: "ds-modal__body", children: b }),
|
|
839
839
|
f
|
|
840
840
|
]
|
|
841
841
|
}
|
|
842
842
|
) });
|
|
843
843
|
}
|
|
844
|
-
function
|
|
844
|
+
function be({ children: s }) {
|
|
845
845
|
return /* @__PURE__ */ e.jsx("div", { className: "ds-modal__footer", children: s });
|
|
846
846
|
}
|
|
847
|
-
function
|
|
847
|
+
function Fe({
|
|
848
848
|
children: s,
|
|
849
849
|
title: t = "Code",
|
|
850
850
|
defaultExpanded: r = !1,
|
|
@@ -854,7 +854,7 @@ function ze({
|
|
|
854
854
|
className: i = "",
|
|
855
855
|
...l
|
|
856
856
|
}) {
|
|
857
|
-
const [m, u] = k(r), p = o !== void 0, f = p ? o : m,
|
|
857
|
+
const [m, u] = k(r), p = o !== void 0, f = p ? o : m, b = () => {
|
|
858
858
|
p ? a == null || a(!o) : u((_) => !_);
|
|
859
859
|
}, d = [
|
|
860
860
|
"ds-code-accordion",
|
|
@@ -868,14 +868,14 @@ function ze({
|
|
|
868
868
|
{
|
|
869
869
|
type: "button",
|
|
870
870
|
className: "ds-code-accordion__header",
|
|
871
|
-
onClick:
|
|
871
|
+
onClick: b,
|
|
872
872
|
"aria-expanded": f,
|
|
873
873
|
children: [
|
|
874
874
|
/* @__PURE__ */ e.jsx("span", { className: "ds-code-accordion__title", children: t }),
|
|
875
875
|
/* @__PURE__ */ e.jsx(
|
|
876
|
-
|
|
876
|
+
ne,
|
|
877
877
|
{
|
|
878
|
-
size:
|
|
878
|
+
size: S[2],
|
|
879
879
|
strokeWidth: 1.5,
|
|
880
880
|
className: `ds-code-accordion__icon ${f ? "ds-code-accordion__icon--expanded" : ""}`
|
|
881
881
|
}
|
|
@@ -887,7 +887,7 @@ function ze({
|
|
|
887
887
|
] });
|
|
888
888
|
}
|
|
889
889
|
function _t({ children: s, block: t = !1, collapsible: r = !1, title: o = "Code", defaultExpanded: a = !1, ...n }) {
|
|
890
|
-
return t ? r ? /* @__PURE__ */ e.jsx(
|
|
890
|
+
return t ? r ? /* @__PURE__ */ e.jsx(Fe, { title: o, defaultExpanded: a, ...n, children: s }) : /* @__PURE__ */ e.jsx("pre", { className: "ds-code-block", ...n, children: /* @__PURE__ */ e.jsx("code", { children: s }) }) : /* @__PURE__ */ e.jsx("code", { className: "ds-code-inline", ...n, children: s });
|
|
891
891
|
}
|
|
892
892
|
function wt({ href: s, children: t, onClick: r, target: o, rel: a, ...n }) {
|
|
893
893
|
const l = o === "_blank" ? a ? `${a} noopener noreferrer` : "noopener noreferrer" : a;
|
|
@@ -919,7 +919,7 @@ function yt({ children: s, selected: t = !1, onClick: r, size: o = "m", variant:
|
|
|
919
919
|
s
|
|
920
920
|
] });
|
|
921
921
|
if (l) {
|
|
922
|
-
const
|
|
922
|
+
const b = (d) => {
|
|
923
923
|
if (n) {
|
|
924
924
|
d.preventDefault();
|
|
925
925
|
return;
|
|
@@ -934,7 +934,7 @@ function yt({ children: s, selected: t = !1, onClick: r, size: o = "m", variant:
|
|
|
934
934
|
"aria-disabled": n ? "true" : void 0,
|
|
935
935
|
className: p,
|
|
936
936
|
href: n ? void 0 : l,
|
|
937
|
-
onClick:
|
|
937
|
+
onClick: b,
|
|
938
938
|
...m,
|
|
939
939
|
children: f
|
|
940
940
|
}
|
|
@@ -954,22 +954,22 @@ function yt({ children: s, selected: t = !1, onClick: r, size: o = "m", variant:
|
|
|
954
954
|
);
|
|
955
955
|
}
|
|
956
956
|
function kt({ options: s, value: t, onChange: r, size: o = "m", disabled: a = !1 }) {
|
|
957
|
-
const n = E(null), i = E(null), [l, m] = k(!1), u = E(!1), p = E(null), f = E(null),
|
|
957
|
+
const n = E(null), i = E(null), [l, m] = k(!1), u = E(!1), p = E(null), f = E(null), b = () => {
|
|
958
958
|
if (!n.current) return;
|
|
959
959
|
const d = n.current.querySelector(`[data-value="${t}"]`);
|
|
960
960
|
if (!d) return;
|
|
961
|
-
const _ = n.current.getBoundingClientRect(), w = d.getBoundingClientRect(),
|
|
962
|
-
i.current ? (i.current.style.transition = u.current ? "left var(--transition-normal), width var(--transition-normal)" : "none", i.current.style.left =
|
|
961
|
+
const _ = n.current.getBoundingClientRect(), w = d.getBoundingClientRect(), $ = w.left - _.left, N = w.width;
|
|
962
|
+
i.current ? (i.current.style.transition = u.current ? "left var(--transition-normal), width var(--transition-normal)" : "none", i.current.style.left = $ + "px", i.current.style.width = N + "px", u.current = !1) : (m(!0), requestAnimationFrame(() => {
|
|
963
963
|
if (!i.current || !n.current) return;
|
|
964
964
|
const B = n.current.querySelector(`[data-value="${t}"]`);
|
|
965
965
|
if (!B) return;
|
|
966
|
-
const T = n.current.getBoundingClientRect(),
|
|
967
|
-
i.current.style.transition = "none", i.current.style.left =
|
|
966
|
+
const T = n.current.getBoundingClientRect(), g = B.getBoundingClientRect();
|
|
967
|
+
i.current.style.transition = "none", i.current.style.left = g.left - T.left + "px", i.current.style.width = g.width + "px";
|
|
968
968
|
}));
|
|
969
969
|
};
|
|
970
|
-
return f.current =
|
|
970
|
+
return f.current = b, ke(() => {
|
|
971
971
|
const d = p.current !== t;
|
|
972
|
-
p.current = t, u.current = l && d,
|
|
972
|
+
p.current = t, u.current = l && d, b();
|
|
973
973
|
}), D(() => {
|
|
974
974
|
if (!n.current) return;
|
|
975
975
|
const d = new ResizeObserver(() => {
|
|
@@ -1026,12 +1026,12 @@ function Ce({
|
|
|
1026
1026
|
}) {
|
|
1027
1027
|
const [l, m] = k(r), u = o !== void 0, p = u ? o : l, f = () => {
|
|
1028
1028
|
u ? a == null || a(!o) : m((d) => !d);
|
|
1029
|
-
},
|
|
1029
|
+
}, b = [
|
|
1030
1030
|
"ds-accordion",
|
|
1031
1031
|
`ds-accordion--${n}`,
|
|
1032
1032
|
p && "ds-accordion--expanded"
|
|
1033
1033
|
].filter(Boolean).join(" ");
|
|
1034
|
-
return /* @__PURE__ */ e.jsxs("div", { className:
|
|
1034
|
+
return /* @__PURE__ */ e.jsxs("div", { className: b, ...i, children: [
|
|
1035
1035
|
/* @__PURE__ */ e.jsxs(
|
|
1036
1036
|
"button",
|
|
1037
1037
|
{
|
|
@@ -1042,9 +1042,9 @@ function Ce({
|
|
|
1042
1042
|
children: [
|
|
1043
1043
|
/* @__PURE__ */ e.jsx("span", { className: "ds-accordion__title", children: t }),
|
|
1044
1044
|
/* @__PURE__ */ e.jsx(
|
|
1045
|
-
|
|
1045
|
+
ne,
|
|
1046
1046
|
{
|
|
1047
|
-
size:
|
|
1047
|
+
size: S[2],
|
|
1048
1048
|
strokeWidth: 1.5,
|
|
1049
1049
|
className: `ds-accordion__icon ${p ? "ds-accordion__icon--expanded" : ""}`
|
|
1050
1050
|
}
|
|
@@ -1088,15 +1088,15 @@ function Ue(s, t, r) {
|
|
|
1088
1088
|
return n === s.top ? "top" : n === a - s.bottom ? "bottom" : n === o - s.right ? "right" : "left";
|
|
1089
1089
|
}
|
|
1090
1090
|
function Et({ children: s, content: t, position: r, ...o }) {
|
|
1091
|
-
const [a, n] = k(!1), [i, l] = k({ visibility: "hidden" }), [m, u] = k(r || "top"), p = E(null), f = E(null),
|
|
1091
|
+
const [a, n] = k(!1), [i, l] = k({ visibility: "hidden" }), [m, u] = k(r || "top"), p = E(null), f = E(null), b = E(!1), d = () => {
|
|
1092
1092
|
if (!p.current || !f.current) return;
|
|
1093
|
-
const w = p.current.getBoundingClientRect(),
|
|
1093
|
+
const w = p.current.getBoundingClientRect(), $ = f.current.getBoundingClientRect(), N = r || Ue(w, $.height, $.width), { top: B, left: T, arrowOffset: g } = Ve(N, w, $);
|
|
1094
1094
|
u(N), l({
|
|
1095
1095
|
position: "fixed",
|
|
1096
1096
|
top: B,
|
|
1097
1097
|
left: T,
|
|
1098
1098
|
visibility: "visible",
|
|
1099
|
-
"--arrow-offset": `${
|
|
1099
|
+
"--arrow-offset": `${g}px`
|
|
1100
1100
|
});
|
|
1101
1101
|
};
|
|
1102
1102
|
if (D(() => {
|
|
@@ -1108,8 +1108,8 @@ function Et({ children: s, content: t, position: r, ...o }) {
|
|
|
1108
1108
|
};
|
|
1109
1109
|
}, [a, r]), D(() => {
|
|
1110
1110
|
if (!a) return;
|
|
1111
|
-
const w = (
|
|
1112
|
-
p.current && !p.current.contains(
|
|
1111
|
+
const w = ($) => {
|
|
1112
|
+
p.current && !p.current.contains($.target) && n(!1);
|
|
1113
1113
|
};
|
|
1114
1114
|
return document.addEventListener("touchstart", w), () => document.removeEventListener("touchstart", w);
|
|
1115
1115
|
}, [a]), !t) return s;
|
|
@@ -1129,23 +1129,23 @@ function Et({ children: s, content: t, position: r, ...o }) {
|
|
|
1129
1129
|
ref: p,
|
|
1130
1130
|
className: "ds-tooltip-wrapper",
|
|
1131
1131
|
onMouseEnter: () => {
|
|
1132
|
-
|
|
1132
|
+
b.current || n(!0);
|
|
1133
1133
|
},
|
|
1134
1134
|
onMouseLeave: () => {
|
|
1135
|
-
|
|
1135
|
+
b.current || n(!1);
|
|
1136
1136
|
},
|
|
1137
1137
|
onTouchStart: () => {
|
|
1138
|
-
|
|
1138
|
+
b.current = !0, n((w) => !w);
|
|
1139
1139
|
},
|
|
1140
1140
|
...o,
|
|
1141
1141
|
children: [
|
|
1142
1142
|
s,
|
|
1143
|
-
typeof document < "u" &&
|
|
1143
|
+
typeof document < "u" && ae.createPortal(_, document.body)
|
|
1144
1144
|
]
|
|
1145
1145
|
}
|
|
1146
1146
|
);
|
|
1147
1147
|
}
|
|
1148
|
-
function
|
|
1148
|
+
function $t({
|
|
1149
1149
|
checked: s = !1,
|
|
1150
1150
|
onChange: t,
|
|
1151
1151
|
size: r = "m",
|
|
@@ -1176,7 +1176,7 @@ function gt({
|
|
|
1176
1176
|
a && /* @__PURE__ */ e.jsx("span", { className: "ds-toggle__label", children: a })
|
|
1177
1177
|
] });
|
|
1178
1178
|
}
|
|
1179
|
-
function
|
|
1179
|
+
function gt({
|
|
1180
1180
|
checked: s = !1,
|
|
1181
1181
|
onChange: t,
|
|
1182
1182
|
size: r = "m",
|
|
@@ -1204,7 +1204,7 @@ function $t({
|
|
|
1204
1204
|
}
|
|
1205
1205
|
),
|
|
1206
1206
|
/* @__PURE__ */ e.jsx("span", { className: "ds-checkbox__box", children: s && /* @__PURE__ */ e.jsx(
|
|
1207
|
-
|
|
1207
|
+
re,
|
|
1208
1208
|
{
|
|
1209
1209
|
size: u,
|
|
1210
1210
|
strokeWidth: 2.5,
|
|
@@ -1334,10 +1334,10 @@ function It({
|
|
|
1334
1334
|
}
|
|
1335
1335
|
);
|
|
1336
1336
|
}
|
|
1337
|
-
function
|
|
1337
|
+
function St({ children: s, ...t }) {
|
|
1338
1338
|
return /* @__PURE__ */ e.jsx("thead", { ...t, children: s });
|
|
1339
1339
|
}
|
|
1340
|
-
function
|
|
1340
|
+
function At({ children: s, ...t }) {
|
|
1341
1341
|
return /* @__PURE__ */ e.jsx("tbody", { ...t, children: s });
|
|
1342
1342
|
}
|
|
1343
1343
|
function Dt({ children: s, interactive: t, selected: r, subheader: o, className: a = "", onClick: n, ...i }) {
|
|
@@ -1361,7 +1361,7 @@ function Pt({ children: s, colSpan: t = 999, ...r }) {
|
|
|
1361
1361
|
return /* @__PURE__ */ e.jsx("tr", { className: "ds-table-row ds-table-row--subheader", ...r, children: /* @__PURE__ */ e.jsx("td", { colSpan: t, children: s }) });
|
|
1362
1362
|
}
|
|
1363
1363
|
function Bt({ children: s, align: t = "left", sortDir: r, onSort: o, width: a, className: n = "", style: i = {}, ...l }) {
|
|
1364
|
-
const m = !!o || r !== void 0, u = r === "asc" ?
|
|
1364
|
+
const m = !!o || r !== void 0, u = r === "asc" ? Re : r === "desc" ? ne : Te;
|
|
1365
1365
|
return /* @__PURE__ */ e.jsx(
|
|
1366
1366
|
"th",
|
|
1367
1367
|
{
|
|
@@ -1435,7 +1435,7 @@ function Mt({
|
|
|
1435
1435
|
style: m,
|
|
1436
1436
|
...u
|
|
1437
1437
|
}) {
|
|
1438
|
-
const p = L.useId(), f = n ?? p,
|
|
1438
|
+
const p = L.useId(), f = n ?? p, b = `${f}-hint`, d = `${f}-error`;
|
|
1439
1439
|
return /* @__PURE__ */ e.jsxs(
|
|
1440
1440
|
"div",
|
|
1441
1441
|
{
|
|
@@ -1448,13 +1448,13 @@ function Mt({
|
|
|
1448
1448
|
children: [
|
|
1449
1449
|
s && /* @__PURE__ */ e.jsx("label", { className: "ds-field-label", htmlFor: f, children: s }),
|
|
1450
1450
|
/* @__PURE__ */ e.jsx("div", { className: "ds-field-control", children: i }),
|
|
1451
|
-
t && !r && /* @__PURE__ */ e.jsx("p", { className: "ds-field-hint", id:
|
|
1451
|
+
t && !r && /* @__PURE__ */ e.jsx("p", { className: "ds-field-hint", id: b, children: t }),
|
|
1452
1452
|
r && /* @__PURE__ */ e.jsx("p", { className: "ds-field-error", id: d, role: "alert", children: r })
|
|
1453
1453
|
]
|
|
1454
1454
|
}
|
|
1455
1455
|
);
|
|
1456
1456
|
}
|
|
1457
|
-
function
|
|
1457
|
+
function Wt({ label: s, value: t, delta: r, size: o = "m", inline: a = !1, className: n = "", style: i, ...l }) {
|
|
1458
1458
|
const m = r != null && r.startsWith("+") ? "up" : r != null && r.startsWith("-") ? "down" : "neutral";
|
|
1459
1459
|
return /* @__PURE__ */ e.jsxs(
|
|
1460
1460
|
"div",
|
|
@@ -1475,7 +1475,7 @@ function Ft({ label: s, value: t, delta: r, size: o = "m", inline: a = !1, class
|
|
|
1475
1475
|
}
|
|
1476
1476
|
);
|
|
1477
1477
|
}
|
|
1478
|
-
function
|
|
1478
|
+
function zt({
|
|
1479
1479
|
children: s,
|
|
1480
1480
|
separator: t = "/",
|
|
1481
1481
|
"aria-label": r = "Breadcrumb",
|
|
@@ -1498,7 +1498,7 @@ function Wt({
|
|
|
1498
1498
|
}
|
|
1499
1499
|
);
|
|
1500
1500
|
}
|
|
1501
|
-
function
|
|
1501
|
+
function Ft({
|
|
1502
1502
|
page: s,
|
|
1503
1503
|
total: t,
|
|
1504
1504
|
onChange: r,
|
|
@@ -1524,7 +1524,7 @@ function zt({
|
|
|
1524
1524
|
onClick: () => r == null ? void 0 : r(s - 1),
|
|
1525
1525
|
disabled: s <= 1,
|
|
1526
1526
|
"aria-label": "Previous page",
|
|
1527
|
-
children: /* @__PURE__ */ e.jsx(
|
|
1527
|
+
children: /* @__PURE__ */ e.jsx(Ie, { size: 16 })
|
|
1528
1528
|
}
|
|
1529
1529
|
),
|
|
1530
1530
|
m.map(
|
|
@@ -1584,7 +1584,7 @@ function Ct({
|
|
|
1584
1584
|
document.removeEventListener("keydown", d), document.removeEventListener("mousedown", _);
|
|
1585
1585
|
};
|
|
1586
1586
|
}, [r, l]);
|
|
1587
|
-
const p = L.Children.toArray(s), f = p.find((d) => (d == null ? void 0 : d.type) ===
|
|
1587
|
+
const p = L.Children.toArray(s), f = p.find((d) => (d == null ? void 0 : d.type) === xe), b = p.filter((d) => (d == null ? void 0 : d.type) !== xe);
|
|
1588
1588
|
return /* @__PURE__ */ e.jsx(
|
|
1589
1589
|
"div",
|
|
1590
1590
|
{
|
|
@@ -1602,9 +1602,9 @@ function Ct({
|
|
|
1602
1602
|
children: [
|
|
1603
1603
|
/* @__PURE__ */ e.jsxs("header", { className: "ds-drawer-header", children: [
|
|
1604
1604
|
t && /* @__PURE__ */ e.jsx("h3", { id: i, className: "ds-drawer-title", children: t }),
|
|
1605
|
-
r && /* @__PURE__ */ e.jsx("button", { className: "ds-drawer-close", onClick: u, "aria-label": "Close drawer", children: /* @__PURE__ */ e.jsx(ee, { size:
|
|
1605
|
+
r && /* @__PURE__ */ e.jsx("button", { className: "ds-drawer-close", onClick: u, "aria-label": "Close drawer", children: /* @__PURE__ */ e.jsx(ee, { size: S[2], strokeWidth: 1.5 }) })
|
|
1606
1606
|
] }),
|
|
1607
|
-
/* @__PURE__ */ e.jsx("div", { className: "ds-drawer-body", children:
|
|
1607
|
+
/* @__PURE__ */ e.jsx("div", { className: "ds-drawer-body", children: b }),
|
|
1608
1608
|
f
|
|
1609
1609
|
]
|
|
1610
1610
|
}
|
|
@@ -1612,7 +1612,7 @@ function Ct({
|
|
|
1612
1612
|
}
|
|
1613
1613
|
);
|
|
1614
1614
|
}
|
|
1615
|
-
function
|
|
1615
|
+
function xe({ children: s }) {
|
|
1616
1616
|
return /* @__PURE__ */ e.jsx("footer", { className: "ds-drawer-footer", children: s });
|
|
1617
1617
|
}
|
|
1618
1618
|
const Je = {
|
|
@@ -1638,7 +1638,7 @@ function Vt({
|
|
|
1638
1638
|
role: m,
|
|
1639
1639
|
...i,
|
|
1640
1640
|
children: [
|
|
1641
|
-
l && /* @__PURE__ */ e.jsx("span", { className: "ds-banner-icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(l, { size:
|
|
1641
|
+
l && /* @__PURE__ */ e.jsx("span", { className: "ds-banner-icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(l, { size: S[2], strokeWidth: 1.5 }) }),
|
|
1642
1642
|
/* @__PURE__ */ e.jsx("span", { className: "ds-banner-text", children: s }),
|
|
1643
1643
|
r && /* @__PURE__ */ e.jsx(
|
|
1644
1644
|
"button",
|
|
@@ -1656,7 +1656,7 @@ function Vt({
|
|
|
1656
1656
|
className: "ds-banner-dismiss",
|
|
1657
1657
|
onClick: a,
|
|
1658
1658
|
"aria-label": "Dismiss",
|
|
1659
|
-
children: /* @__PURE__ */ e.jsx(ee, { size:
|
|
1659
|
+
children: /* @__PURE__ */ e.jsx(ee, { size: S[2], strokeWidth: 1.5 })
|
|
1660
1660
|
}
|
|
1661
1661
|
)
|
|
1662
1662
|
]
|
|
@@ -1673,22 +1673,22 @@ function Ut({
|
|
|
1673
1673
|
style: i,
|
|
1674
1674
|
...l
|
|
1675
1675
|
}) {
|
|
1676
|
-
const [m, u] = k(!1), [p, f] = k(!1),
|
|
1677
|
-
if (
|
|
1676
|
+
const [m, u] = k(!1), [p, f] = k(!1), b = r !== void 0, d = b ? r : m, _ = E(null), w = E(null), $ = E(null), N = E(null), [B, T] = k({}), g = E(null), F = 150, O = () => {
|
|
1677
|
+
if (b)
|
|
1678
1678
|
o == null || o(!1);
|
|
1679
1679
|
else {
|
|
1680
1680
|
if (p) return;
|
|
1681
|
-
f(!0),
|
|
1681
|
+
f(!0), g.current = setTimeout(() => {
|
|
1682
1682
|
u(!1), f(!1);
|
|
1683
|
-
},
|
|
1683
|
+
}, F);
|
|
1684
1684
|
}
|
|
1685
1685
|
}, q = () => {
|
|
1686
1686
|
const h = !d;
|
|
1687
|
-
|
|
1687
|
+
b ? o == null || o(h) : h ? (clearTimeout(g.current), f(!1), u(!0)) : O();
|
|
1688
1688
|
}, M = () => {
|
|
1689
|
-
d || (
|
|
1689
|
+
d || (b ? o == null || o(!0) : (clearTimeout(g.current), f(!1), u(!0)));
|
|
1690
1690
|
};
|
|
1691
|
-
D(() => () => clearTimeout(
|
|
1691
|
+
D(() => () => clearTimeout(g.current), []), D(() => {
|
|
1692
1692
|
if (!d) return;
|
|
1693
1693
|
const h = () => {
|
|
1694
1694
|
var R;
|
|
@@ -1701,9 +1701,9 @@ function Ut({
|
|
|
1701
1701
|
window.removeEventListener("scroll", h, !0), window.removeEventListener("resize", h);
|
|
1702
1702
|
};
|
|
1703
1703
|
}, [d, a]);
|
|
1704
|
-
const
|
|
1704
|
+
const W = () => {
|
|
1705
1705
|
var v;
|
|
1706
|
-
const h = (v =
|
|
1706
|
+
const h = (v = $.current) == null ? void 0 : v.querySelector(
|
|
1707
1707
|
'button:not([disabled]), [href], [tabindex]:not([tabindex="-1"]), input, select, textarea'
|
|
1708
1708
|
);
|
|
1709
1709
|
h == null || h.focus();
|
|
@@ -1711,10 +1711,10 @@ function Ut({
|
|
|
1711
1711
|
D(() => {
|
|
1712
1712
|
if (!d) return;
|
|
1713
1713
|
const h = (R) => {
|
|
1714
|
-
var P,
|
|
1715
|
-
!((P = _.current) != null && P.contains(R.target)) && !((
|
|
1714
|
+
var P, z;
|
|
1715
|
+
!((P = _.current) != null && P.contains(R.target)) && !((z = w.current) != null && z.contains(R.target)) && O();
|
|
1716
1716
|
}, v = (R) => {
|
|
1717
|
-
R.key === "Escape" && (O(),
|
|
1717
|
+
R.key === "Escape" && (O(), W());
|
|
1718
1718
|
};
|
|
1719
1719
|
return document.addEventListener("mousedown", h), document.addEventListener("keydown", v), () => {
|
|
1720
1720
|
document.removeEventListener("mousedown", h), document.removeEventListener("keydown", v);
|
|
@@ -1738,14 +1738,14 @@ function Ut({
|
|
|
1738
1738
|
(R = P[P.length - 1]) == null || R.focus();
|
|
1739
1739
|
}
|
|
1740
1740
|
}, H = (h) => {
|
|
1741
|
-
var P,
|
|
1741
|
+
var P, z, U, j;
|
|
1742
1742
|
const v = V(), R = v.findIndex((c) => c === document.activeElement);
|
|
1743
1743
|
switch (h.key) {
|
|
1744
1744
|
case "ArrowDown":
|
|
1745
1745
|
h.preventDefault(), (P = v[Math.min(R + 1, v.length - 1)]) == null || P.focus();
|
|
1746
1746
|
break;
|
|
1747
1747
|
case "ArrowUp":
|
|
1748
|
-
h.preventDefault(), R <= 0 ?
|
|
1748
|
+
h.preventDefault(), R <= 0 ? W() : (z = v[R - 1]) == null || z.focus();
|
|
1749
1749
|
break;
|
|
1750
1750
|
case "Home":
|
|
1751
1751
|
h.preventDefault(), (U = v[0]) == null || U.focus();
|
|
@@ -1777,7 +1777,7 @@ function Ut({
|
|
|
1777
1777
|
h.label && /* @__PURE__ */ e.jsx("div", { className: "ds-dropdown__section-label", children: h.label }),
|
|
1778
1778
|
/* @__PURE__ */ e.jsx("div", { className: "ds-dropdown__section-content", children: h.content })
|
|
1779
1779
|
] }, v);
|
|
1780
|
-
const R = !!h.href, P = R ? "a" : "button",
|
|
1780
|
+
const R = !!h.href, P = R ? "a" : "button", z = R ? { href: h.disabled ? void 0 : h.href, "aria-disabled": h.disabled ? "true" : void 0 } : { type: "button", disabled: h.disabled };
|
|
1781
1781
|
return /* @__PURE__ */ e.jsxs(
|
|
1782
1782
|
P,
|
|
1783
1783
|
{
|
|
@@ -1786,7 +1786,7 @@ function Ut({
|
|
|
1786
1786
|
"ds-dropdown__item",
|
|
1787
1787
|
h.danger && "ds-dropdown__item--danger"
|
|
1788
1788
|
].filter(Boolean).join(" "),
|
|
1789
|
-
...
|
|
1789
|
+
...z,
|
|
1790
1790
|
onClick: () => {
|
|
1791
1791
|
var U;
|
|
1792
1792
|
(U = h.onClick) == null || U.call(h), O();
|
|
@@ -1813,14 +1813,14 @@ function Ut({
|
|
|
1813
1813
|
/* @__PURE__ */ e.jsx(
|
|
1814
1814
|
"div",
|
|
1815
1815
|
{
|
|
1816
|
-
ref:
|
|
1816
|
+
ref: $,
|
|
1817
1817
|
className: "ds-dropdown__trigger",
|
|
1818
1818
|
onClick: q,
|
|
1819
1819
|
onKeyDown: G,
|
|
1820
1820
|
children: s
|
|
1821
1821
|
}
|
|
1822
1822
|
),
|
|
1823
|
-
typeof document < "u" &&
|
|
1823
|
+
typeof document < "u" && ae.createPortal(C, document.body)
|
|
1824
1824
|
]
|
|
1825
1825
|
}
|
|
1826
1826
|
);
|
|
@@ -1927,15 +1927,15 @@ const ve = {
|
|
|
1927
1927
|
error: de
|
|
1928
1928
|
};
|
|
1929
1929
|
let Q = [];
|
|
1930
|
-
const
|
|
1931
|
-
function
|
|
1932
|
-
|
|
1930
|
+
const le = /* @__PURE__ */ new Set();
|
|
1931
|
+
function Ne() {
|
|
1932
|
+
le.forEach((s) => s([...Q]));
|
|
1933
1933
|
}
|
|
1934
1934
|
function st(s) {
|
|
1935
|
-
Q = [...Q, s],
|
|
1935
|
+
Q = [...Q, s], Ne();
|
|
1936
1936
|
}
|
|
1937
1937
|
function rt(s) {
|
|
1938
|
-
Q = Q.filter((t) => t.id !== s),
|
|
1938
|
+
Q = Q.filter((t) => t.id !== s), Ne();
|
|
1939
1939
|
}
|
|
1940
1940
|
function Kt() {
|
|
1941
1941
|
const s = (t, r = {}) => {
|
|
@@ -1967,7 +1967,7 @@ function nt({ data: s, onDismiss: t }) {
|
|
|
1967
1967
|
role: s.type === "error" ? "alert" : "status",
|
|
1968
1968
|
"aria-live": "polite",
|
|
1969
1969
|
children: [
|
|
1970
|
-
/* @__PURE__ */ e.jsx("div", { className: "ds-toast__icon", children: /* @__PURE__ */ e.jsx(i, { size:
|
|
1970
|
+
/* @__PURE__ */ e.jsx("div", { className: "ds-toast__icon", children: /* @__PURE__ */ e.jsx(i, { size: S[3], strokeWidth: 1.5 }) }),
|
|
1971
1971
|
/* @__PURE__ */ e.jsx("span", { className: "ds-toast__message", children: s.message }),
|
|
1972
1972
|
/* @__PURE__ */ e.jsx(
|
|
1973
1973
|
"button",
|
|
@@ -1975,7 +1975,7 @@ function nt({ data: s, onDismiss: t }) {
|
|
|
1975
1975
|
className: "ds-toast__close",
|
|
1976
1976
|
onClick: n,
|
|
1977
1977
|
"aria-label": "Закрыть",
|
|
1978
|
-
children: /* @__PURE__ */ e.jsx(ee, { size:
|
|
1978
|
+
children: /* @__PURE__ */ e.jsx(ee, { size: S[3], strokeWidth: 1.5 })
|
|
1979
1979
|
}
|
|
1980
1980
|
)
|
|
1981
1981
|
]
|
|
@@ -1984,15 +1984,15 @@ function nt({ data: s, onDismiss: t }) {
|
|
|
1984
1984
|
}
|
|
1985
1985
|
function Gt({ position: s = "bottom-right" }) {
|
|
1986
1986
|
const [t, r] = k(() => [...Q]);
|
|
1987
|
-
return D(() => (
|
|
1987
|
+
return D(() => (le.add(r), () => le.delete(r)), []), !t.length || typeof document > "u" ? null : ae.createPortal(
|
|
1988
1988
|
/* @__PURE__ */ e.jsx("div", { className: ["ds-toast-container", `ds-toast-container--${s}`].join(" "), children: t.map((o) => /* @__PURE__ */ e.jsx(nt, { data: o, onDismiss: rt }, o.id)) }),
|
|
1989
1989
|
document.body
|
|
1990
1990
|
);
|
|
1991
1991
|
}
|
|
1992
1992
|
const at = {
|
|
1993
|
-
running: /* @__PURE__ */ e.jsx(
|
|
1994
|
-
success: /* @__PURE__ */ e.jsx(
|
|
1995
|
-
error: /* @__PURE__ */ e.jsx(
|
|
1993
|
+
running: /* @__PURE__ */ e.jsx(ie, { size: "xs", variant: "info", children: "Running..." }),
|
|
1994
|
+
success: /* @__PURE__ */ e.jsx(ie, { size: "xs", variant: "success", children: "Done" }),
|
|
1995
|
+
error: /* @__PURE__ */ e.jsx(ie, { size: "xs", variant: "error", children: "Error" })
|
|
1996
1996
|
};
|
|
1997
1997
|
function Xt({
|
|
1998
1998
|
label: s,
|
|
@@ -2006,23 +2006,23 @@ function Xt({
|
|
|
2006
2006
|
children: m,
|
|
2007
2007
|
...u
|
|
2008
2008
|
}) {
|
|
2009
|
-
const f = `tc-body-${
|
|
2009
|
+
const f = `tc-body-${Ee().replace(/:/g, "")}`, [b, d] = k(a), _ = n !== void 0, w = _ ? n : b, $ = () => {
|
|
2010
2010
|
_ ? i == null || i(!n) : d((N) => !N);
|
|
2011
2011
|
};
|
|
2012
|
-
return /* @__PURE__ */ e.jsxs(
|
|
2012
|
+
return /* @__PURE__ */ e.jsxs(Le, { padding: l, ...u, children: [
|
|
2013
2013
|
/* @__PURE__ */ e.jsxs(
|
|
2014
2014
|
"button",
|
|
2015
2015
|
{
|
|
2016
2016
|
type: "button",
|
|
2017
2017
|
className: "ds-tool-card__header",
|
|
2018
|
-
onClick:
|
|
2018
|
+
onClick: $,
|
|
2019
2019
|
"aria-expanded": w,
|
|
2020
2020
|
"aria-controls": f,
|
|
2021
2021
|
children: [
|
|
2022
2022
|
/* @__PURE__ */ e.jsx(
|
|
2023
2023
|
je,
|
|
2024
2024
|
{
|
|
2025
|
-
size:
|
|
2025
|
+
size: S[1],
|
|
2026
2026
|
strokeWidth: 1.5,
|
|
2027
2027
|
className: `ds-tool-card__chevron${w ? " ds-tool-card__chevron--expanded" : ""}`
|
|
2028
2028
|
}
|
|
@@ -2054,7 +2054,7 @@ function Jt({
|
|
|
2054
2054
|
{
|
|
2055
2055
|
variant: "ghost",
|
|
2056
2056
|
size: t,
|
|
2057
|
-
icon: n ? /* @__PURE__ */ e.jsx(
|
|
2057
|
+
icon: n ? /* @__PURE__ */ e.jsx(re, { size: S[1], strokeWidth: 1.5 }) : /* @__PURE__ */ e.jsx(Se, { size: S[1], strokeWidth: 1.5 }),
|
|
2058
2058
|
"aria-label": o,
|
|
2059
2059
|
onClick: l,
|
|
2060
2060
|
...a
|
|
@@ -2072,62 +2072,102 @@ function Zt({ content: s, streaming: t = !1, ...r }) {
|
|
|
2072
2072
|
onToggle: a,
|
|
2073
2073
|
padding: "s",
|
|
2074
2074
|
title: /* @__PURE__ */ e.jsxs("div", { className: "ds-reasoning__title", children: [
|
|
2075
|
-
/* @__PURE__ */ e.jsx(Ae, { size:
|
|
2076
|
-
/* @__PURE__ */ e.jsx(
|
|
2075
|
+
/* @__PURE__ */ e.jsx(Ae, { size: S[1], strokeWidth: 1.5, className: "ds-reasoning__icon" }),
|
|
2076
|
+
/* @__PURE__ */ e.jsx(Me, { secondary: !0, children: "Thinking" })
|
|
2077
2077
|
] }),
|
|
2078
2078
|
...r,
|
|
2079
|
-
children: /* @__PURE__ */ e.jsxs(
|
|
2079
|
+
children: /* @__PURE__ */ e.jsxs(we, { secondary: !0, style: { whiteSpace: "pre-wrap" }, children: [
|
|
2080
2080
|
s,
|
|
2081
2081
|
t && /* @__PURE__ */ e.jsx("span", { className: "ds-reasoning__cursor" })
|
|
2082
2082
|
] })
|
|
2083
2083
|
}
|
|
2084
2084
|
);
|
|
2085
2085
|
}
|
|
2086
|
+
function Qt({
|
|
2087
|
+
count: s,
|
|
2088
|
+
current: t = 0,
|
|
2089
|
+
done: r = [],
|
|
2090
|
+
onChange: o,
|
|
2091
|
+
showCounter: a = !0,
|
|
2092
|
+
className: n = "",
|
|
2093
|
+
"aria-label": i = "Steps",
|
|
2094
|
+
...l
|
|
2095
|
+
}) {
|
|
2096
|
+
return /* @__PURE__ */ e.jsxs("div", { className: ["ds-step-indicator", n].filter(Boolean).join(" "), ...l, children: [
|
|
2097
|
+
/* @__PURE__ */ e.jsx("div", { className: "ds-step-indicator__dots", role: "tablist", "aria-label": i, children: Array.from({ length: s }, (m, u) => {
|
|
2098
|
+
const p = u === t, f = r.includes(u) && !p, b = o && (u <= t || r.includes(u)), d = [
|
|
2099
|
+
"ds-step-indicator__dot",
|
|
2100
|
+
p && "ds-step-indicator__dot--active",
|
|
2101
|
+
f && "ds-step-indicator__dot--done"
|
|
2102
|
+
].filter(Boolean).join(" ");
|
|
2103
|
+
return /* @__PURE__ */ e.jsx(
|
|
2104
|
+
"button",
|
|
2105
|
+
{
|
|
2106
|
+
type: "button",
|
|
2107
|
+
className: d,
|
|
2108
|
+
role: "tab",
|
|
2109
|
+
"aria-selected": p,
|
|
2110
|
+
"aria-label": `Step ${u + 1}`,
|
|
2111
|
+
disabled: !b || u === t,
|
|
2112
|
+
onClick: () => o == null ? void 0 : o(u),
|
|
2113
|
+
children: f ? /* @__PURE__ */ e.jsx(re, { size: 8, strokeWidth: 3 }) : null
|
|
2114
|
+
},
|
|
2115
|
+
u
|
|
2116
|
+
);
|
|
2117
|
+
}) }),
|
|
2118
|
+
a && /* @__PURE__ */ e.jsxs(we, { secondary: !0, className: "ds-step-indicator__counter", children: [
|
|
2119
|
+
t + 1,
|
|
2120
|
+
" / ",
|
|
2121
|
+
s
|
|
2122
|
+
] })
|
|
2123
|
+
] });
|
|
2124
|
+
}
|
|
2086
2125
|
export {
|
|
2087
2126
|
Ce as Accordion,
|
|
2088
2127
|
vt as Alert,
|
|
2089
2128
|
qt as AnimatedNumber,
|
|
2090
2129
|
Tt as Avatar,
|
|
2091
|
-
|
|
2130
|
+
ie as Badge,
|
|
2092
2131
|
Vt as Banner,
|
|
2093
|
-
|
|
2132
|
+
zt as Breadcrumb,
|
|
2094
2133
|
_e as Button,
|
|
2095
|
-
|
|
2096
|
-
|
|
2134
|
+
Le as Card,
|
|
2135
|
+
gt as Checkbox,
|
|
2097
2136
|
_t as Code,
|
|
2098
|
-
|
|
2137
|
+
Fe as CodeAccordion,
|
|
2099
2138
|
Jt as CopyButton,
|
|
2100
2139
|
Ct as Drawer,
|
|
2101
|
-
|
|
2140
|
+
xe as DrawerFooter,
|
|
2102
2141
|
Ut as Dropdown,
|
|
2103
2142
|
Lt as EmptyState,
|
|
2104
2143
|
Mt as FormField,
|
|
2105
2144
|
mt as H1,
|
|
2106
2145
|
pt as H2,
|
|
2107
2146
|
ht as H3,
|
|
2108
|
-
|
|
2147
|
+
bt as H4,
|
|
2109
2148
|
Ht as InView,
|
|
2110
2149
|
lt as Input,
|
|
2111
2150
|
wt as Link,
|
|
2112
2151
|
jt as Modal,
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2152
|
+
be as ModalFooter,
|
|
2153
|
+
xt as P1,
|
|
2154
|
+
Me as P2,
|
|
2155
|
+
we as P3,
|
|
2156
|
+
Ft as Pagination,
|
|
2118
2157
|
Yt as ProgressBar,
|
|
2119
2158
|
Rt as Radio,
|
|
2120
2159
|
Zt as ReasoningBlock,
|
|
2121
2160
|
kt as SegmentedControl,
|
|
2122
2161
|
ut as Select,
|
|
2123
2162
|
Ye as Skeleton,
|
|
2124
|
-
|
|
2125
|
-
|
|
2163
|
+
Be as Spinner,
|
|
2164
|
+
Wt as Stat,
|
|
2165
|
+
Qt as StepIndicator,
|
|
2126
2166
|
ft as Stepper,
|
|
2127
2167
|
yt as Tab,
|
|
2128
2168
|
It as Table,
|
|
2129
|
-
|
|
2130
|
-
|
|
2169
|
+
At as TableBody,
|
|
2170
|
+
St as TableHead,
|
|
2131
2171
|
Dt as TableRow,
|
|
2132
2172
|
Pt as TableSubheaderRow,
|
|
2133
2173
|
Nt as Tabs,
|
|
@@ -2135,10 +2175,10 @@ export {
|
|
|
2135
2175
|
dt as Textarea,
|
|
2136
2176
|
Bt as Th,
|
|
2137
2177
|
Gt as ToastContainer,
|
|
2138
|
-
|
|
2178
|
+
$t as Toggle,
|
|
2139
2179
|
Xt as ToolCallCard,
|
|
2140
2180
|
Et as Tooltip,
|
|
2141
|
-
|
|
2181
|
+
S as iconSizes,
|
|
2142
2182
|
et as useAnimatedNumber,
|
|
2143
2183
|
tt as useInView,
|
|
2144
2184
|
Kt as useToast
|