@donkit-ai/design-system 1.3.7 → 1.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +4 -4
- package/dist/index.d.ts +11 -0
- package/dist/index.es.js +296 -271
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import L, { useState as
|
|
2
|
-
import { Check as
|
|
1
|
+
import L, { useState as g, useRef as k, useEffect as P, useLayoutEffect as ye, useId as ke } from "react";
|
|
2
|
+
import { Check as le, X as ee, ChevronDown as re, Minus as Ee, Plus as $e, XCircle as de, AlertTriangle as ue, CheckCircle as fe, Info as me, ChevronUp as ge, ChevronsUpDown as Re, ChevronLeft as Te, ChevronRight as je, Copy as Ie } from "lucide-react";
|
|
3
3
|
import ne from "react-dom";
|
|
4
|
-
const
|
|
4
|
+
const S = {
|
|
5
5
|
1: 16,
|
|
6
6
|
2: 20,
|
|
7
7
|
3: 24,
|
|
@@ -18,10 +18,10 @@ var ie = { exports: {} }, te = {};
|
|
|
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 pe;
|
|
22
|
+
function Ae() {
|
|
23
|
+
if (pe) return te;
|
|
24
|
+
pe = 1;
|
|
25
25
|
var s = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
|
|
26
26
|
function r(o, a, n) {
|
|
27
27
|
var i = null;
|
|
@@ -50,16 +50,16 @@ var se = {};
|
|
|
50
50
|
* This source code is licensed under the MIT license found in the
|
|
51
51
|
* LICENSE file in the root directory of this source tree.
|
|
52
52
|
*/
|
|
53
|
-
var
|
|
54
|
-
function
|
|
55
|
-
return
|
|
53
|
+
var he;
|
|
54
|
+
function Se() {
|
|
55
|
+
return he || (he = 1, process.env.NODE_ENV !== "production" && function() {
|
|
56
56
|
function s(c) {
|
|
57
57
|
if (c == null) return null;
|
|
58
58
|
if (typeof c == "function")
|
|
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 E:
|
|
63
63
|
return "Fragment";
|
|
64
64
|
case B:
|
|
65
65
|
return "Profiler";
|
|
@@ -82,7 +82,7 @@ function Ie() {
|
|
|
82
82
|
return c.displayName || "Context";
|
|
83
83
|
case T:
|
|
84
84
|
return (c._context.displayName || "Context") + ".Consumer";
|
|
85
|
-
case
|
|
85
|
+
case W:
|
|
86
86
|
var x = c.render;
|
|
87
87
|
return c = c.displayName, c || (c = x.displayName || x.name || "", c = c !== "" ? "ForwardRef(" + c + ")" : "ForwardRef"), c;
|
|
88
88
|
case M:
|
|
@@ -117,7 +117,7 @@ function Ie() {
|
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
119
|
function o(c) {
|
|
120
|
-
if (c ===
|
|
120
|
+
if (c === E) return "<>";
|
|
121
121
|
if (typeof c == "object" && c !== null && c.$$typeof === F)
|
|
122
122
|
return "<...>";
|
|
123
123
|
try {
|
|
@@ -135,7 +135,7 @@ function Ie() {
|
|
|
135
135
|
return Error("react-stack-top-frame");
|
|
136
136
|
}
|
|
137
137
|
function i(c) {
|
|
138
|
-
if (
|
|
138
|
+
if (z.call(c, "key")) {
|
|
139
139
|
var x = Object.getOwnPropertyDescriptor(c, "key").get;
|
|
140
140
|
if (x && x.isReactWarning) return !1;
|
|
141
141
|
}
|
|
@@ -143,7 +143,7 @@ function Ie() {
|
|
|
143
143
|
}
|
|
144
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
|
));
|
|
@@ -155,7 +155,7 @@ function Ie() {
|
|
|
155
155
|
}
|
|
156
156
|
function m() {
|
|
157
157
|
var c = s(this.type);
|
|
158
|
-
return
|
|
158
|
+
return D[c] || (D[c] = !0, console.error(
|
|
159
159
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
160
160
|
)), c = this.props.ref, c !== void 0 ? c : null;
|
|
161
161
|
}
|
|
@@ -205,10 +205,10 @@ function Ie() {
|
|
|
205
205
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
206
206
|
);
|
|
207
207
|
else f(A);
|
|
208
|
-
if (
|
|
208
|
+
if (z.call(x, "key")) {
|
|
209
209
|
A = s(c);
|
|
210
|
-
var J = Object.keys(x).filter(function(
|
|
211
|
-
return
|
|
210
|
+
var J = Object.keys(x).filter(function(Ne) {
|
|
211
|
+
return Ne !== "key";
|
|
212
212
|
});
|
|
213
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:
|
|
@@ -246,7 +246,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
246
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"), E = Symbol.for("react.fragment"), N = Symbol.for("react.strict_mode"), B = Symbol.for("react.profiler"), T = Symbol.for("react.consumer"), $ = Symbol.for("react.context"), W = Symbol.for("react.forward_ref"), O = Symbol.for("react.suspense"), q = Symbol.for("react.suspense_list"), M = Symbol.for("react.memo"), F = 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, z = Object.prototype.hasOwnProperty, h = Array.isArray, v = console.createTask ? console.createTask : function() {
|
|
250
250
|
return null;
|
|
251
251
|
};
|
|
252
252
|
d = {
|
|
@@ -254,18 +254,18 @@ React keys must be passed directly to JSX without using spread:
|
|
|
254
254
|
return c();
|
|
255
255
|
}
|
|
256
256
|
};
|
|
257
|
-
var
|
|
257
|
+
var R, D = {}, C = 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 = E, 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") : C,
|
|
269
269
|
I ? v(o(c)) : U
|
|
270
270
|
);
|
|
271
271
|
}, se.jsxs = function(c, x, y) {
|
|
@@ -275,15 +275,15 @@ React keys must be passed directly to JSX without using spread:
|
|
|
275
275
|
x,
|
|
276
276
|
y,
|
|
277
277
|
!0,
|
|
278
|
-
I ? Error("react-stack-top-frame") :
|
|
278
|
+
I ? Error("react-stack-top-frame") : C,
|
|
279
279
|
I ? v(o(c)) : U
|
|
280
280
|
);
|
|
281
281
|
};
|
|
282
282
|
}()), se;
|
|
283
283
|
}
|
|
284
|
-
process.env.NODE_ENV === "production" ? ie.exports =
|
|
284
|
+
process.env.NODE_ENV === "production" ? ie.exports = Ae() : ie.exports = Se();
|
|
285
285
|
var e = ie.exports;
|
|
286
|
-
function
|
|
286
|
+
function De({ size: s = "m", color: t = "default", className: r = "", ...o }) {
|
|
287
287
|
return /* @__PURE__ */ e.jsx(
|
|
288
288
|
"span",
|
|
289
289
|
{
|
|
@@ -294,8 +294,8 @@ function Ae({ size: s = "m", color: t = "default", className: r = "", ...o }) {
|
|
|
294
294
|
}
|
|
295
295
|
);
|
|
296
296
|
}
|
|
297
|
-
const
|
|
298
|
-
function
|
|
297
|
+
const Pe = { xs: 12, s: 14, m: 16, l: 20 };
|
|
298
|
+
function _e({
|
|
299
299
|
children: s,
|
|
300
300
|
variant: t = "primary",
|
|
301
301
|
size: r = "m",
|
|
@@ -309,14 +309,14 @@ function De({
|
|
|
309
309
|
"aria-label": p,
|
|
310
310
|
...f
|
|
311
311
|
}) {
|
|
312
|
-
const b = a && !s, d = i === "loading", _ = i === "success", w = i === "error",
|
|
312
|
+
const b = a && !s, d = i === "loading", _ = i === "success", w = i === "error", E = d || _ || w, N = r === "xs" ? "s" : "m", B = Pe[r] ?? 16, T = d ? /* @__PURE__ */ e.jsx(De, { size: N }) : _ ? /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(le, { 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, $ = [
|
|
313
313
|
"ds-button",
|
|
314
314
|
`ds-button--${t}`,
|
|
315
315
|
`ds-button--${r}`,
|
|
316
316
|
o && "ds-button--full",
|
|
317
317
|
b && "ds-button--icon-only"
|
|
318
|
-
].filter(Boolean).join(" "),
|
|
319
|
-
|
|
318
|
+
].filter(Boolean).join(" "), W = i !== "idle" ? i : void 0, O = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
319
|
+
E ? T : a && /* @__PURE__ */ e.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: a }),
|
|
320
320
|
s
|
|
321
321
|
] });
|
|
322
322
|
if (u) {
|
|
@@ -336,7 +336,7 @@ function De({
|
|
|
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": W,
|
|
340
340
|
...f,
|
|
341
341
|
children: O
|
|
342
342
|
}
|
|
@@ -351,13 +351,13 @@ function De({
|
|
|
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": W,
|
|
355
355
|
...f,
|
|
356
356
|
children: O
|
|
357
357
|
}
|
|
358
358
|
);
|
|
359
359
|
}
|
|
360
|
-
function
|
|
360
|
+
function at({
|
|
361
361
|
label: s,
|
|
362
362
|
error: t,
|
|
363
363
|
hint: r,
|
|
@@ -402,7 +402,7 @@ function nt({
|
|
|
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
|
}
|
|
405
|
-
function
|
|
405
|
+
function ot({
|
|
406
406
|
label: s,
|
|
407
407
|
error: t,
|
|
408
408
|
hint: r,
|
|
@@ -433,7 +433,7 @@ function at({
|
|
|
433
433
|
t && /* @__PURE__ */ e.jsx("span", { id: b, className: "ds-textarea-error", role: "alert", children: t })
|
|
434
434
|
] });
|
|
435
435
|
}
|
|
436
|
-
function
|
|
436
|
+
function it({
|
|
437
437
|
label: s,
|
|
438
438
|
value: t,
|
|
439
439
|
onChange: r,
|
|
@@ -446,7 +446,7 @@ function ot({
|
|
|
446
446
|
id: u,
|
|
447
447
|
...p
|
|
448
448
|
}) {
|
|
449
|
-
const [f, b] =
|
|
449
|
+
const [f, b] = g(!1), [d, _] = g(!1), [w, E] = g({}), [N, B] = g("down"), [T, $] = g(-1), W = k(null), O = k(null), q = k(null), M = k(null), F = u || `select-${L.useId()}`, V = `${F}-label`, G = n ? `${F}-error` : void 0, H = 150, z = (j = !1) => {
|
|
450
450
|
d || (_(!0), $(-1), M.current = setTimeout(() => {
|
|
451
451
|
var c;
|
|
452
452
|
b(!1), _(!1), j && ((c = q.current) == null || c.focus());
|
|
@@ -456,32 +456,32 @@ function ot({
|
|
|
456
456
|
const c = j !== void 0 ? j : Math.max(o.findIndex((x) => x.value === t), 0);
|
|
457
457
|
$(c), b(!0);
|
|
458
458
|
};
|
|
459
|
-
|
|
459
|
+
P(() => () => clearTimeout(M.current), []);
|
|
460
460
|
const v = () => {
|
|
461
461
|
var X;
|
|
462
|
-
const j = (X =
|
|
462
|
+
const j = (X = W.current) == null ? void 0 : X.getBoundingClientRect();
|
|
463
463
|
if (!j) return;
|
|
464
464
|
const c = window.innerHeight, x = c - j.bottom, y = j.top, K = x < 300 && y > x;
|
|
465
|
-
B(K ? "up" : "down"),
|
|
465
|
+
B(K ? "up" : "down"), E(
|
|
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
|
};
|
|
469
|
-
|
|
469
|
+
P(() => {
|
|
470
470
|
if (f)
|
|
471
471
|
return v(), window.addEventListener("scroll", v, !0), window.addEventListener("resize", v), () => {
|
|
472
472
|
window.removeEventListener("scroll", v, !0), window.removeEventListener("resize", v);
|
|
473
473
|
};
|
|
474
|
-
}, [f]),
|
|
474
|
+
}, [f]), P(() => {
|
|
475
475
|
const j = (c) => {
|
|
476
|
-
|
|
476
|
+
W.current && !W.current.contains(c.target) && O.current && !O.current.contains(c.target) && z();
|
|
477
477
|
};
|
|
478
478
|
return document.addEventListener("mousedown", j), () => document.removeEventListener("mousedown", j);
|
|
479
|
-
}, [d]),
|
|
479
|
+
}, [d]), P(() => {
|
|
480
480
|
var c;
|
|
481
481
|
if (!f || T < 0 || !O.current) return;
|
|
482
482
|
(c = O.current.querySelectorAll(".ds-select-option")[T]) == null || c.scrollIntoView({ block: "nearest" });
|
|
483
483
|
}, [T, f]);
|
|
484
|
-
const
|
|
484
|
+
const R = (j) => {
|
|
485
485
|
switch (j.key) {
|
|
486
486
|
case "ArrowDown":
|
|
487
487
|
j.preventDefault(), f ? $((c) => Math.min(c + 1, o.length - 1)) : h();
|
|
@@ -497,16 +497,16 @@ function ot({
|
|
|
497
497
|
break;
|
|
498
498
|
case "Enter":
|
|
499
499
|
case " ":
|
|
500
|
-
j.preventDefault(), f ? T >= 0 && (r == null || r(o[T].value),
|
|
500
|
+
j.preventDefault(), f ? T >= 0 && (r == null || r(o[T].value), z(!0)) : h();
|
|
501
501
|
break;
|
|
502
502
|
case "Escape":
|
|
503
|
-
f && (j.preventDefault(),
|
|
503
|
+
f && (j.preventDefault(), z(!0));
|
|
504
504
|
break;
|
|
505
505
|
case "Tab":
|
|
506
|
-
f &&
|
|
506
|
+
f && z(!1);
|
|
507
507
|
break;
|
|
508
508
|
}
|
|
509
|
-
},
|
|
509
|
+
}, D = o.find((j) => j.value === t), C = l === "xs" ? S[1] : l === "small" ? S[2] : S[3], U = f && /* @__PURE__ */ e.jsx(
|
|
510
510
|
"div",
|
|
511
511
|
{
|
|
512
512
|
ref: O,
|
|
@@ -535,7 +535,7 @@ function ot({
|
|
|
535
535
|
c === T && "ds-select-option--active"
|
|
536
536
|
].filter(Boolean).join(" "),
|
|
537
537
|
onClick: () => {
|
|
538
|
-
r == null || r(j.value),
|
|
538
|
+
r == null || r(j.value), z(!0);
|
|
539
539
|
},
|
|
540
540
|
children: j.label
|
|
541
541
|
},
|
|
@@ -545,7 +545,7 @@ function ot({
|
|
|
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: W, children: /* @__PURE__ */ e.jsxs(
|
|
549
549
|
"button",
|
|
550
550
|
{
|
|
551
551
|
ref: q,
|
|
@@ -560,17 +560,17 @@ function ot({
|
|
|
560
560
|
"aria-describedby": G,
|
|
561
561
|
className: `ds-select-trigger ds-select-trigger--${l} ${n ? "ds-select-trigger--error" : ""}`,
|
|
562
562
|
onClick: () => {
|
|
563
|
-
m || (f ?
|
|
563
|
+
m || (f ? z() : h());
|
|
564
564
|
},
|
|
565
|
-
onKeyDown:
|
|
565
|
+
onKeyDown: R,
|
|
566
566
|
disabled: m,
|
|
567
567
|
...p,
|
|
568
568
|
children: [
|
|
569
|
-
/* @__PURE__ */ e.jsx("span", { className:
|
|
569
|
+
/* @__PURE__ */ e.jsx("span", { className: D ? "" : "ds-select-placeholder", children: (D == null ? void 0 : D.label) || a }),
|
|
570
570
|
/* @__PURE__ */ e.jsx(
|
|
571
571
|
re,
|
|
572
572
|
{
|
|
573
|
-
size:
|
|
573
|
+
size: C,
|
|
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"
|
|
@@ -583,7 +583,7 @@ function ot({
|
|
|
583
583
|
typeof document < "u" && ne.createPortal(U, document.body)
|
|
584
584
|
] });
|
|
585
585
|
}
|
|
586
|
-
function
|
|
586
|
+
function ct({
|
|
587
587
|
label: s,
|
|
588
588
|
value: t = 0,
|
|
589
589
|
onChange: r,
|
|
@@ -624,7 +624,7 @@ function it({
|
|
|
624
624
|
"ds-stepper",
|
|
625
625
|
`ds-stepper--${i}`,
|
|
626
626
|
l && "ds-stepper--disabled"
|
|
627
|
-
].filter(Boolean).join(" "),
|
|
627
|
+
].filter(Boolean).join(" "), E = 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: [
|
|
@@ -636,7 +636,7 @@ function it({
|
|
|
636
636
|
onClick: b,
|
|
637
637
|
disabled: l || t <= o,
|
|
638
638
|
"aria-label": "Decrease",
|
|
639
|
-
children: /* @__PURE__ */ e.jsx(Ee, { size:
|
|
639
|
+
children: /* @__PURE__ */ e.jsx(Ee, { size: E, strokeWidth: 1.5 })
|
|
640
640
|
}
|
|
641
641
|
),
|
|
642
642
|
/* @__PURE__ */ e.jsx(
|
|
@@ -661,7 +661,7 @@ function it({
|
|
|
661
661
|
onClick: f,
|
|
662
662
|
disabled: l || t >= a,
|
|
663
663
|
"aria-label": "Increase",
|
|
664
|
-
children: /* @__PURE__ */ e.jsx(
|
|
664
|
+
children: /* @__PURE__ */ e.jsx($e, { size: E, strokeWidth: 1.5 })
|
|
665
665
|
}
|
|
666
666
|
)
|
|
667
667
|
] }),
|
|
@@ -669,7 +669,7 @@ function it({
|
|
|
669
669
|
u && /* @__PURE__ */ e.jsx("div", { className: "ds-stepper-error", children: u })
|
|
670
670
|
] });
|
|
671
671
|
}
|
|
672
|
-
function
|
|
672
|
+
function Be({
|
|
673
673
|
children: s,
|
|
674
674
|
padding: t = "m",
|
|
675
675
|
variant: r = "info",
|
|
@@ -721,25 +721,25 @@ function Pe({
|
|
|
721
721
|
}
|
|
722
722
|
);
|
|
723
723
|
}
|
|
724
|
-
function
|
|
724
|
+
function lt({ children: s, ...t }) {
|
|
725
725
|
return /* @__PURE__ */ e.jsx("h1", { className: "ds-h1", ...t, children: s });
|
|
726
726
|
}
|
|
727
|
-
function
|
|
727
|
+
function dt({ children: s, ...t }) {
|
|
728
728
|
return /* @__PURE__ */ e.jsx("h2", { className: "ds-h2", ...t, children: s });
|
|
729
729
|
}
|
|
730
|
-
function
|
|
730
|
+
function ut({ children: s, ...t }) {
|
|
731
731
|
return /* @__PURE__ */ e.jsx("h3", { className: "ds-h3", ...t, children: s });
|
|
732
732
|
}
|
|
733
|
-
function
|
|
733
|
+
function ft({ children: s, ...t }) {
|
|
734
734
|
return /* @__PURE__ */ e.jsx("h4", { className: "ds-h4", ...t, children: s });
|
|
735
735
|
}
|
|
736
|
-
function
|
|
736
|
+
function mt({ 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 pt({ 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 ht({ 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
745
|
function oe({
|
|
@@ -756,13 +756,13 @@ 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
|
|
760
|
-
info:
|
|
761
|
-
success:
|
|
762
|
-
warning:
|
|
763
|
-
error:
|
|
759
|
+
const Oe = {
|
|
760
|
+
info: me,
|
|
761
|
+
success: fe,
|
|
762
|
+
warning: ue,
|
|
763
|
+
error: de
|
|
764
764
|
};
|
|
765
|
-
function
|
|
765
|
+
function bt({
|
|
766
766
|
children: s,
|
|
767
767
|
variant: t = "info",
|
|
768
768
|
title: r,
|
|
@@ -770,9 +770,9 @@ function ht({
|
|
|
770
770
|
role: a,
|
|
771
771
|
...n
|
|
772
772
|
}) {
|
|
773
|
-
const i =
|
|
773
|
+
const i = Oe[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,25 +784,25 @@ function ht({
|
|
|
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
|
|
793
|
-
function
|
|
792
|
+
const Le = 200;
|
|
793
|
+
function xt({
|
|
794
794
|
children: s,
|
|
795
795
|
title: t,
|
|
796
796
|
onClose: r,
|
|
797
797
|
size: o = "m",
|
|
798
798
|
...a
|
|
799
799
|
}) {
|
|
800
|
-
const n =
|
|
800
|
+
const n = k(null), i = L.useId(), [l, m] = g(!1), u = () => {
|
|
801
801
|
!r || l || (m(!0), setTimeout(() => {
|
|
802
802
|
m(!1), r();
|
|
803
|
-
},
|
|
803
|
+
}, Le));
|
|
804
804
|
};
|
|
805
|
-
|
|
805
|
+
P(() => {
|
|
806
806
|
const d = (w) => {
|
|
807
807
|
w.key === "Escape" && u();
|
|
808
808
|
}, _ = (w) => {
|
|
@@ -812,7 +812,7 @@ function bt({
|
|
|
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
|
{
|
|
@@ -825,11 +825,11 @@ function bt({
|
|
|
825
825
|
(t || r) && /* @__PURE__ */ e.jsxs("div", { className: "ds-modal__header", children: [
|
|
826
826
|
t && /* @__PURE__ */ e.jsx("h3", { id: i, className: "ds-modal__title", children: t }),
|
|
827
827
|
r && /* @__PURE__ */ e.jsx(
|
|
828
|
-
|
|
828
|
+
_e,
|
|
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
|
}
|
|
@@ -841,10 +841,10 @@ function bt({
|
|
|
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 Me({
|
|
848
848
|
children: s,
|
|
849
849
|
title: t = "Code",
|
|
850
850
|
defaultExpanded: r = !1,
|
|
@@ -854,7 +854,7 @@ function Le({
|
|
|
854
854
|
className: i = "",
|
|
855
855
|
...l
|
|
856
856
|
}) {
|
|
857
|
-
const [m, u] =
|
|
857
|
+
const [m, u] = g(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",
|
|
@@ -875,7 +875,7 @@ function Le({
|
|
|
875
875
|
/* @__PURE__ */ e.jsx(
|
|
876
876
|
re,
|
|
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
|
}
|
|
@@ -886,10 +886,10 @@ function Le({
|
|
|
886
886
|
/* @__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", children: /* @__PURE__ */ e.jsx("code", { children: s }) }) }) })
|
|
887
887
|
] });
|
|
888
888
|
}
|
|
889
|
-
function
|
|
890
|
-
return t ? r ? /* @__PURE__ */ e.jsx(
|
|
889
|
+
function vt({ children: s, block: t = !1, collapsible: r = !1, title: o = "Code", defaultExpanded: a = !1, ...n }) {
|
|
890
|
+
return t ? r ? /* @__PURE__ */ e.jsx(Me, { 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
|
-
function
|
|
892
|
+
function jt({ href: s, children: t, onClick: r, target: o, rel: a, ...n }) {
|
|
893
893
|
const l = o === "_blank" ? a ? `${a} noopener noreferrer` : "noopener noreferrer" : a;
|
|
894
894
|
return /* @__PURE__ */ e.jsx(
|
|
895
895
|
"a",
|
|
@@ -904,10 +904,10 @@ function vt({ href: s, children: t, onClick: r, target: o, rel: a, ...n }) {
|
|
|
904
904
|
}
|
|
905
905
|
);
|
|
906
906
|
}
|
|
907
|
-
function
|
|
907
|
+
function _t({ children: s, size: t = "m", variant: r = "ghost", ...o }) {
|
|
908
908
|
return /* @__PURE__ */ e.jsx("div", { className: "ds-tabs", role: "tablist", ...o, children: L.Children.map(s, (a) => L.isValidElement(a) ? L.cloneElement(a, { size: t, variant: r }) : a) });
|
|
909
909
|
}
|
|
910
|
-
function
|
|
910
|
+
function wt({ children: s, selected: t = !1, onClick: r, size: o = "m", variant: a = "ghost", disabled: n = !1, icon: i, href: l, ...m }) {
|
|
911
911
|
const u = i && !s, p = [
|
|
912
912
|
"ds-tab",
|
|
913
913
|
`ds-tab--${o}`,
|
|
@@ -953,13 +953,13 @@ function _t({ children: s, selected: t = !1, onClick: r, size: o = "m", variant:
|
|
|
953
953
|
}
|
|
954
954
|
);
|
|
955
955
|
}
|
|
956
|
-
function
|
|
957
|
-
const n =
|
|
956
|
+
function Nt({ options: s, value: t, onChange: r, size: o = "m", disabled: a = !1 }) {
|
|
957
|
+
const n = k(null), i = k(null), [l, m] = g(!1), u = k(!1), p = k(null), f = k(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(), E = 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 = E + "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;
|
|
@@ -967,10 +967,10 @@ function wt({ options: s, value: t, onChange: r, size: o = "m", disabled: a = !1
|
|
|
967
967
|
i.current.style.transition = "none", i.current.style.left = $.left - T.left + "px", i.current.style.width = $.width + "px";
|
|
968
968
|
}));
|
|
969
969
|
};
|
|
970
|
-
return f.current = b,
|
|
970
|
+
return f.current = b, ye(() => {
|
|
971
971
|
const d = p.current !== t;
|
|
972
972
|
p.current = t, u.current = l && d, b();
|
|
973
|
-
}),
|
|
973
|
+
}), P(() => {
|
|
974
974
|
if (!n.current) return;
|
|
975
975
|
const d = new ResizeObserver(() => {
|
|
976
976
|
u.current = !1, f.current();
|
|
@@ -1015,7 +1015,7 @@ function wt({ options: s, value: t, onChange: r, size: o = "m", disabled: a = !1
|
|
|
1015
1015
|
}
|
|
1016
1016
|
);
|
|
1017
1017
|
}
|
|
1018
|
-
function
|
|
1018
|
+
function yt({
|
|
1019
1019
|
children: s,
|
|
1020
1020
|
title: t,
|
|
1021
1021
|
defaultExpanded: r = !1,
|
|
@@ -1024,7 +1024,7 @@ function Nt({
|
|
|
1024
1024
|
padding: n = "m",
|
|
1025
1025
|
...i
|
|
1026
1026
|
}) {
|
|
1027
|
-
const [l, m] =
|
|
1027
|
+
const [l, m] = g(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",
|
|
@@ -1044,7 +1044,7 @@ function Nt({
|
|
|
1044
1044
|
/* @__PURE__ */ e.jsx(
|
|
1045
1045
|
re,
|
|
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
|
}
|
|
@@ -1056,7 +1056,7 @@ function Nt({
|
|
|
1056
1056
|
] });
|
|
1057
1057
|
}
|
|
1058
1058
|
const Y = 8, Z = 8;
|
|
1059
|
-
function
|
|
1059
|
+
function Fe(s, t, r) {
|
|
1060
1060
|
const o = window.innerWidth;
|
|
1061
1061
|
let a, n;
|
|
1062
1062
|
switch (s) {
|
|
@@ -1078,7 +1078,7 @@ function Me(s, t, r) {
|
|
|
1078
1078
|
const i = Math.max(Z, Math.min(o - r.width - Z, n)), l = n - i;
|
|
1079
1079
|
return { top: a, left: i, arrowOffset: l };
|
|
1080
1080
|
}
|
|
1081
|
-
function
|
|
1081
|
+
function Ce(s, t, r) {
|
|
1082
1082
|
const o = window.innerWidth, a = window.innerHeight;
|
|
1083
1083
|
if (s.top >= t + Y + Z) return "top";
|
|
1084
1084
|
if (a - s.bottom >= t + Y + Z) return "bottom";
|
|
@@ -1087,10 +1087,10 @@ function Fe(s, t, r) {
|
|
|
1087
1087
|
const n = Math.max(s.top, a - s.bottom, s.left, o - s.right);
|
|
1088
1088
|
return n === s.top ? "top" : n === a - s.bottom ? "bottom" : n === o - s.right ? "right" : "left";
|
|
1089
1089
|
}
|
|
1090
|
-
function
|
|
1091
|
-
const [a, n] =
|
|
1090
|
+
function kt({ children: s, content: t, position: r, ...o }) {
|
|
1091
|
+
const [a, n] = g(!1), [i, l] = g({ visibility: "hidden" }), [m, u] = g(r || "top"), p = k(null), f = k(null), b = k(!1), d = () => {
|
|
1092
1092
|
if (!p.current || !f.current) return;
|
|
1093
|
-
const w = p.current.getBoundingClientRect(),
|
|
1093
|
+
const w = p.current.getBoundingClientRect(), E = f.current.getBoundingClientRect(), N = r || Ce(w, E.height, E.width), { top: B, left: T, arrowOffset: $ } = Fe(N, w, E);
|
|
1094
1094
|
u(N), l({
|
|
1095
1095
|
position: "fixed",
|
|
1096
1096
|
top: B,
|
|
@@ -1099,17 +1099,17 @@ function yt({ children: s, content: t, position: r, ...o }) {
|
|
|
1099
1099
|
"--arrow-offset": `${$}px`
|
|
1100
1100
|
});
|
|
1101
1101
|
};
|
|
1102
|
-
if (
|
|
1102
|
+
if (P(() => {
|
|
1103
1103
|
if (!a) return;
|
|
1104
1104
|
l({ position: "fixed", visibility: "hidden" });
|
|
1105
1105
|
const w = requestAnimationFrame(d);
|
|
1106
1106
|
return window.addEventListener("scroll", d, !0), window.addEventListener("resize", d), () => {
|
|
1107
1107
|
cancelAnimationFrame(w), window.removeEventListener("scroll", d, !0), window.removeEventListener("resize", d);
|
|
1108
1108
|
};
|
|
1109
|
-
}, [a, r]),
|
|
1109
|
+
}, [a, r]), P(() => {
|
|
1110
1110
|
if (!a) return;
|
|
1111
|
-
const w = (
|
|
1112
|
-
p.current && !p.current.contains(
|
|
1111
|
+
const w = (E) => {
|
|
1112
|
+
p.current && !p.current.contains(E.target) && n(!1);
|
|
1113
1113
|
};
|
|
1114
1114
|
return document.addEventListener("touchstart", w), () => document.removeEventListener("touchstart", w);
|
|
1115
1115
|
}, [a]), !t) return s;
|
|
@@ -1176,7 +1176,7 @@ function Et({
|
|
|
1176
1176
|
a && /* @__PURE__ */ e.jsx("span", { className: "ds-toggle__label", children: a })
|
|
1177
1177
|
] });
|
|
1178
1178
|
}
|
|
1179
|
-
function
|
|
1179
|
+
function $t({
|
|
1180
1180
|
checked: s = !1,
|
|
1181
1181
|
onChange: t,
|
|
1182
1182
|
size: r = "m",
|
|
@@ -1204,7 +1204,7 @@ function kt({
|
|
|
1204
1204
|
}
|
|
1205
1205
|
),
|
|
1206
1206
|
/* @__PURE__ */ e.jsx("span", { className: "ds-checkbox__box", children: s && /* @__PURE__ */ e.jsx(
|
|
1207
|
-
|
|
1207
|
+
le,
|
|
1208
1208
|
{
|
|
1209
1209
|
size: u,
|
|
1210
1210
|
strokeWidth: 2.5,
|
|
@@ -1214,7 +1214,7 @@ function kt({
|
|
|
1214
1214
|
a && /* @__PURE__ */ e.jsx("span", { className: "ds-checkbox__label", children: a })
|
|
1215
1215
|
] });
|
|
1216
1216
|
}
|
|
1217
|
-
function
|
|
1217
|
+
function gt({
|
|
1218
1218
|
checked: s = !1,
|
|
1219
1219
|
onChange: t,
|
|
1220
1220
|
size: r = "m",
|
|
@@ -1280,19 +1280,19 @@ function ze({ lines: s = 1, lastLineWidth: t = "70%", gap: r, className: o = "",
|
|
|
1280
1280
|
);
|
|
1281
1281
|
}
|
|
1282
1282
|
We.Text = ze;
|
|
1283
|
-
function
|
|
1283
|
+
function Ve(s) {
|
|
1284
1284
|
let t = 2166136261;
|
|
1285
1285
|
for (let r = 0; r < s.length; r++)
|
|
1286
1286
|
t ^= s.charCodeAt(r), t = Math.imul(t, 16777619) >>> 0;
|
|
1287
1287
|
return t % 360;
|
|
1288
1288
|
}
|
|
1289
|
-
function
|
|
1289
|
+
function Ue(s) {
|
|
1290
1290
|
if (!s) return "";
|
|
1291
1291
|
const t = s.trim().split(/\s+/);
|
|
1292
1292
|
return t.length >= 2 ? (t[0][0] + t[1][0]).toUpperCase() : s[0].toUpperCase();
|
|
1293
1293
|
}
|
|
1294
|
-
function
|
|
1295
|
-
const l =
|
|
1294
|
+
function Rt({ seed: s, icon: t, src: r, size: o = 32, className: a = "", style: n = {}, ...i }) {
|
|
1295
|
+
const l = Ve(s ?? ""), [m, u] = g(!1), p = t ?? /* @__PURE__ */ e.jsx("span", { className: "ds-avatar__initials", children: Ue(s) });
|
|
1296
1296
|
return /* @__PURE__ */ e.jsx(
|
|
1297
1297
|
"div",
|
|
1298
1298
|
{
|
|
@@ -1304,7 +1304,7 @@ function gt({ seed: s, icon: t, src: r, size: o = 32, className: a = "", style:
|
|
|
1304
1304
|
}
|
|
1305
1305
|
);
|
|
1306
1306
|
}
|
|
1307
|
-
function
|
|
1307
|
+
function Tt({
|
|
1308
1308
|
children: s,
|
|
1309
1309
|
size: t = "compact",
|
|
1310
1310
|
stickyTop: r,
|
|
@@ -1334,13 +1334,13 @@ function Rt({
|
|
|
1334
1334
|
}
|
|
1335
1335
|
);
|
|
1336
1336
|
}
|
|
1337
|
-
function
|
|
1337
|
+
function It({ 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
|
-
function
|
|
1343
|
+
function St({ children: s, interactive: t, selected: r, subheader: o, className: a = "", onClick: n, ...i }) {
|
|
1344
1344
|
return /* @__PURE__ */ e.jsx(
|
|
1345
1345
|
"tr",
|
|
1346
1346
|
{
|
|
@@ -1357,11 +1357,11 @@ function At({ children: s, interactive: t, selected: r, subheader: o, className:
|
|
|
1357
1357
|
}
|
|
1358
1358
|
);
|
|
1359
1359
|
}
|
|
1360
|
-
function
|
|
1360
|
+
function Dt({ 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
|
-
function
|
|
1364
|
-
const m = !!o || r !== void 0, u = r === "asc" ?
|
|
1363
|
+
function Pt({ 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" ? ge : r === "desc" ? re : Re;
|
|
1365
1365
|
return /* @__PURE__ */ e.jsx(
|
|
1366
1366
|
"th",
|
|
1367
1367
|
{
|
|
@@ -1382,7 +1382,7 @@ function Dt({ children: s, align: t = "left", sortDir: r, onSort: o, width: a, c
|
|
|
1382
1382
|
}
|
|
1383
1383
|
);
|
|
1384
1384
|
}
|
|
1385
|
-
function
|
|
1385
|
+
function Bt({ children: s, align: t = "left", secondary: r, muted: o, truncate: a, nowrap: n, className: i = "", ...l }) {
|
|
1386
1386
|
return /* @__PURE__ */ e.jsx(
|
|
1387
1387
|
"td",
|
|
1388
1388
|
{
|
|
@@ -1400,7 +1400,7 @@ function Pt({ children: s, align: t = "left", secondary: r, muted: o, truncate:
|
|
|
1400
1400
|
}
|
|
1401
1401
|
);
|
|
1402
1402
|
}
|
|
1403
|
-
function
|
|
1403
|
+
function Ot({
|
|
1404
1404
|
icon: s,
|
|
1405
1405
|
title: t,
|
|
1406
1406
|
description: r,
|
|
@@ -1423,7 +1423,7 @@ function Bt({
|
|
|
1423
1423
|
}
|
|
1424
1424
|
);
|
|
1425
1425
|
}
|
|
1426
|
-
function
|
|
1426
|
+
function Lt({
|
|
1427
1427
|
label: s,
|
|
1428
1428
|
hint: t,
|
|
1429
1429
|
error: r,
|
|
@@ -1454,7 +1454,7 @@ function Ot({
|
|
|
1454
1454
|
}
|
|
1455
1455
|
);
|
|
1456
1456
|
}
|
|
1457
|
-
function
|
|
1457
|
+
function Mt({ 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 Lt({ label: s, value: t, delta: r, size: o = "m", inline: a = !1, class
|
|
|
1475
1475
|
}
|
|
1476
1476
|
);
|
|
1477
1477
|
}
|
|
1478
|
-
function
|
|
1478
|
+
function Ft({
|
|
1479
1479
|
children: s,
|
|
1480
1480
|
separator: t = "/",
|
|
1481
1481
|
"aria-label": r = "Breadcrumb",
|
|
@@ -1498,7 +1498,7 @@ function Mt({
|
|
|
1498
1498
|
}
|
|
1499
1499
|
);
|
|
1500
1500
|
}
|
|
1501
|
-
function
|
|
1501
|
+
function Ct({
|
|
1502
1502
|
page: s,
|
|
1503
1503
|
total: t,
|
|
1504
1504
|
onChange: r,
|
|
@@ -1508,7 +1508,7 @@ function Ft({
|
|
|
1508
1508
|
style: i,
|
|
1509
1509
|
...l
|
|
1510
1510
|
}) {
|
|
1511
|
-
const m =
|
|
1511
|
+
const m = Ye(s, t, o);
|
|
1512
1512
|
return /* @__PURE__ */ e.jsxs(
|
|
1513
1513
|
"nav",
|
|
1514
1514
|
{
|
|
@@ -1524,7 +1524,7 @@ function Ft({
|
|
|
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(Te, { size: 16 })
|
|
1528
1528
|
}
|
|
1529
1529
|
),
|
|
1530
1530
|
m.map(
|
|
@@ -1554,14 +1554,14 @@ function Ft({
|
|
|
1554
1554
|
}
|
|
1555
1555
|
);
|
|
1556
1556
|
}
|
|
1557
|
-
function
|
|
1557
|
+
function Ye(s, t, r) {
|
|
1558
1558
|
if (t <= 7) return Array.from({ length: t }, (i, l) => l + 1);
|
|
1559
1559
|
const o = Math.max(2, s - r), a = Math.min(t - 1, s + r), n = [1];
|
|
1560
1560
|
o > 2 && n.push("…");
|
|
1561
1561
|
for (let i = o; i <= a; i++) n.push(i);
|
|
1562
1562
|
return a < t - 1 && n.push("…"), n.push(t), n;
|
|
1563
1563
|
}
|
|
1564
|
-
const
|
|
1564
|
+
const qe = 200;
|
|
1565
1565
|
function Wt({
|
|
1566
1566
|
children: s,
|
|
1567
1567
|
title: t,
|
|
@@ -1569,12 +1569,12 @@ function Wt({
|
|
|
1569
1569
|
side: o = "right",
|
|
1570
1570
|
...a
|
|
1571
1571
|
}) {
|
|
1572
|
-
const n =
|
|
1572
|
+
const n = k(null), i = L.useId(), [l, m] = g(!1), u = () => {
|
|
1573
1573
|
!r || l || (m(!0), setTimeout(() => {
|
|
1574
1574
|
m(!1), r();
|
|
1575
|
-
},
|
|
1575
|
+
}, qe));
|
|
1576
1576
|
};
|
|
1577
|
-
|
|
1577
|
+
P(() => {
|
|
1578
1578
|
const d = (w) => {
|
|
1579
1579
|
w.key === "Escape" && u();
|
|
1580
1580
|
}, _ = (w) => {
|
|
@@ -1584,7 +1584,7 @@ function Wt({
|
|
|
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,7 +1602,7 @@ function Wt({
|
|
|
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
1607
|
/* @__PURE__ */ e.jsx("div", { className: "ds-drawer-body", children: b }),
|
|
1608
1608
|
f
|
|
@@ -1612,14 +1612,14 @@ function Wt({
|
|
|
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
|
-
const
|
|
1619
|
-
info:
|
|
1620
|
-
success:
|
|
1621
|
-
warning:
|
|
1622
|
-
error:
|
|
1618
|
+
const He = {
|
|
1619
|
+
info: me,
|
|
1620
|
+
success: fe,
|
|
1621
|
+
warning: ue,
|
|
1622
|
+
error: de
|
|
1623
1623
|
};
|
|
1624
1624
|
function zt({
|
|
1625
1625
|
children: s,
|
|
@@ -1630,7 +1630,7 @@ function zt({
|
|
|
1630
1630
|
role: n,
|
|
1631
1631
|
...i
|
|
1632
1632
|
}) {
|
|
1633
|
-
const l =
|
|
1633
|
+
const l = He[t], m = n || (t === "error" ? "alert" : "status");
|
|
1634
1634
|
return /* @__PURE__ */ e.jsxs(
|
|
1635
1635
|
"div",
|
|
1636
1636
|
{
|
|
@@ -1638,7 +1638,7 @@ function zt({
|
|
|
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,14 +1656,14 @@ function zt({
|
|
|
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
|
]
|
|
1663
1663
|
}
|
|
1664
1664
|
);
|
|
1665
1665
|
}
|
|
1666
|
-
function
|
|
1666
|
+
function Vt({
|
|
1667
1667
|
trigger: s,
|
|
1668
1668
|
items: t = [],
|
|
1669
1669
|
open: r,
|
|
@@ -1673,14 +1673,14 @@ function Ct({
|
|
|
1673
1673
|
style: i,
|
|
1674
1674
|
...l
|
|
1675
1675
|
}) {
|
|
1676
|
-
const [m, u] =
|
|
1676
|
+
const [m, u] = g(!1), [p, f] = g(!1), b = r !== void 0, d = b ? r : m, _ = k(null), w = k(null), E = k(null), N = k(null), [B, T] = g({}), $ = k(null), W = 150, O = () => {
|
|
1677
1677
|
if (b)
|
|
1678
1678
|
o == null || o(!1);
|
|
1679
1679
|
else {
|
|
1680
1680
|
if (p) return;
|
|
1681
1681
|
f(!0), $.current = setTimeout(() => {
|
|
1682
1682
|
u(!1), f(!1);
|
|
1683
|
-
},
|
|
1683
|
+
}, W);
|
|
1684
1684
|
}
|
|
1685
1685
|
}, q = () => {
|
|
1686
1686
|
const h = !d;
|
|
@@ -1688,11 +1688,11 @@ function Ct({
|
|
|
1688
1688
|
}, M = () => {
|
|
1689
1689
|
d || (b ? o == null || o(!0) : (clearTimeout($.current), f(!1), u(!0)));
|
|
1690
1690
|
};
|
|
1691
|
-
|
|
1691
|
+
P(() => () => clearTimeout($.current), []), P(() => {
|
|
1692
1692
|
if (!d) return;
|
|
1693
1693
|
const h = () => {
|
|
1694
|
-
var
|
|
1695
|
-
const v = (
|
|
1694
|
+
var R;
|
|
1695
|
+
const v = (R = _.current) == null ? void 0 : R.getBoundingClientRect();
|
|
1696
1696
|
v && T(
|
|
1697
1697
|
a === "right" ? { top: v.bottom + 4, right: window.innerWidth - v.right } : { top: v.bottom + 4, left: v.left }
|
|
1698
1698
|
);
|
|
@@ -1703,23 +1703,23 @@ function Ct({
|
|
|
1703
1703
|
}, [d, a]);
|
|
1704
1704
|
const F = () => {
|
|
1705
1705
|
var v;
|
|
1706
|
-
const h = (v =
|
|
1706
|
+
const h = (v = E.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();
|
|
1710
1710
|
};
|
|
1711
|
-
|
|
1711
|
+
P(() => {
|
|
1712
1712
|
if (!d) return;
|
|
1713
|
-
const h = (
|
|
1714
|
-
var
|
|
1715
|
-
!((
|
|
1716
|
-
}, v = (
|
|
1717
|
-
|
|
1713
|
+
const h = (R) => {
|
|
1714
|
+
var D, C;
|
|
1715
|
+
!((D = _.current) != null && D.contains(R.target)) && !((C = w.current) != null && C.contains(R.target)) && O();
|
|
1716
|
+
}, v = (R) => {
|
|
1717
|
+
R.key === "Escape" && (O(), F());
|
|
1718
1718
|
};
|
|
1719
1719
|
return document.addEventListener("mousedown", h), document.addEventListener("keydown", v), () => {
|
|
1720
1720
|
document.removeEventListener("mousedown", h), document.removeEventListener("keydown", v);
|
|
1721
1721
|
};
|
|
1722
|
-
}, [d]),
|
|
1722
|
+
}, [d]), P(() => {
|
|
1723
1723
|
if (!d || !N.current || !w.current) return;
|
|
1724
1724
|
const h = V(), v = N.current === "last" ? h[h.length - 1] : h[0];
|
|
1725
1725
|
v == null || v.focus(), N.current = null;
|
|
@@ -1727,25 +1727,25 @@ function Ct({
|
|
|
1727
1727
|
const V = () => w.current ? [...w.current.querySelectorAll(
|
|
1728
1728
|
'button:not([disabled]), a[href]:not([aria-disabled="true"]), [tabindex]:not([tabindex="-1"])'
|
|
1729
1729
|
)] : [], G = (h) => {
|
|
1730
|
-
var v,
|
|
1730
|
+
var v, R;
|
|
1731
1731
|
if (h.key === "ArrowDown")
|
|
1732
1732
|
h.preventDefault(), d ? (v = V()[0]) == null || v.focus() : (N.current = "first", M());
|
|
1733
1733
|
else if (h.key === "ArrowUp")
|
|
1734
1734
|
if (h.preventDefault(), !d)
|
|
1735
1735
|
N.current = "last", M();
|
|
1736
1736
|
else {
|
|
1737
|
-
const
|
|
1738
|
-
(
|
|
1737
|
+
const D = V();
|
|
1738
|
+
(R = D[D.length - 1]) == null || R.focus();
|
|
1739
1739
|
}
|
|
1740
1740
|
}, H = (h) => {
|
|
1741
|
-
var
|
|
1742
|
-
const v = V(),
|
|
1741
|
+
var D, C, U, j;
|
|
1742
|
+
const v = V(), R = v.findIndex((c) => c === document.activeElement);
|
|
1743
1743
|
switch (h.key) {
|
|
1744
1744
|
case "ArrowDown":
|
|
1745
|
-
h.preventDefault(), (
|
|
1745
|
+
h.preventDefault(), (D = v[Math.min(R + 1, v.length - 1)]) == null || D.focus();
|
|
1746
1746
|
break;
|
|
1747
1747
|
case "ArrowUp":
|
|
1748
|
-
h.preventDefault(),
|
|
1748
|
+
h.preventDefault(), R <= 0 ? F() : (C = v[R - 1]) == null || C.focus();
|
|
1749
1749
|
break;
|
|
1750
1750
|
case "Home":
|
|
1751
1751
|
h.preventDefault(), (U = v[0]) == null || U.focus();
|
|
@@ -1757,7 +1757,7 @@ function Ct({
|
|
|
1757
1757
|
O();
|
|
1758
1758
|
break;
|
|
1759
1759
|
}
|
|
1760
|
-
},
|
|
1760
|
+
}, z = d && /* @__PURE__ */ e.jsx(
|
|
1761
1761
|
"div",
|
|
1762
1762
|
{
|
|
1763
1763
|
ref: w,
|
|
@@ -1777,16 +1777,16 @@ function Ct({
|
|
|
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
|
|
1780
|
+
const R = !!h.href, D = R ? "a" : "button", C = 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
|
+
D,
|
|
1783
1783
|
{
|
|
1784
1784
|
role: "menuitem",
|
|
1785
1785
|
className: [
|
|
1786
1786
|
"ds-dropdown__item",
|
|
1787
1787
|
h.danger && "ds-dropdown__item--danger"
|
|
1788
1788
|
].filter(Boolean).join(" "),
|
|
1789
|
-
...
|
|
1789
|
+
...C,
|
|
1790
1790
|
onClick: () => {
|
|
1791
1791
|
var U;
|
|
1792
1792
|
(U = h.onClick) == null || U.call(h), O();
|
|
@@ -1813,19 +1813,19 @@ function Ct({
|
|
|
1813
1813
|
/* @__PURE__ */ e.jsx(
|
|
1814
1814
|
"div",
|
|
1815
1815
|
{
|
|
1816
|
-
ref:
|
|
1816
|
+
ref: E,
|
|
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" && ne.createPortal(
|
|
1823
|
+
typeof document < "u" && ne.createPortal(z, document.body)
|
|
1824
1824
|
]
|
|
1825
1825
|
}
|
|
1826
1826
|
);
|
|
1827
1827
|
}
|
|
1828
|
-
function
|
|
1828
|
+
function Ut({
|
|
1829
1829
|
value: s = 0,
|
|
1830
1830
|
size: t = "m",
|
|
1831
1831
|
variant: r = "default",
|
|
@@ -1862,11 +1862,11 @@ function Vt({
|
|
|
1862
1862
|
}
|
|
1863
1863
|
);
|
|
1864
1864
|
}
|
|
1865
|
-
const
|
|
1866
|
-
function
|
|
1867
|
-
const [r, o] =
|
|
1868
|
-
return
|
|
1869
|
-
if (
|
|
1865
|
+
const Ke = (s) => 1 - Math.pow(1 - s, 3), Ge = () => typeof window < "u" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
1866
|
+
function Xe(s, { duration: t = 600 } = {}) {
|
|
1867
|
+
const [r, o] = g(s), a = k(s), n = k(null);
|
|
1868
|
+
return P(() => {
|
|
1869
|
+
if (Ge()) {
|
|
1870
1870
|
o(s), a.current = s;
|
|
1871
1871
|
return;
|
|
1872
1872
|
}
|
|
@@ -1876,24 +1876,24 @@ function Ge(s, { duration: t = 600 } = {}) {
|
|
|
1876
1876
|
const u = (p) => {
|
|
1877
1877
|
m || (m = p);
|
|
1878
1878
|
const f = Math.min((p - m) / t, 1);
|
|
1879
|
-
o(i + l *
|
|
1879
|
+
o(i + l * Ke(f)), f < 1 ? n.current = requestAnimationFrame(u) : a.current = s;
|
|
1880
1880
|
};
|
|
1881
1881
|
return n.current = requestAnimationFrame(u), () => cancelAnimationFrame(n.current);
|
|
1882
1882
|
}, [s, t]), r;
|
|
1883
1883
|
}
|
|
1884
|
-
function
|
|
1884
|
+
function Yt({
|
|
1885
1885
|
value: s,
|
|
1886
1886
|
duration: t = 600,
|
|
1887
1887
|
decimals: r = 0,
|
|
1888
1888
|
prefix: o = "",
|
|
1889
1889
|
suffix: a = ""
|
|
1890
1890
|
}) {
|
|
1891
|
-
const i =
|
|
1891
|
+
const i = Xe(s, { duration: t }).toFixed(r);
|
|
1892
1892
|
return `${o}${i}${a}`;
|
|
1893
1893
|
}
|
|
1894
|
-
function
|
|
1895
|
-
const o =
|
|
1896
|
-
return
|
|
1894
|
+
function Je({ threshold: s = 0.1, rootMargin: t = "0px", once: r = !1 } = {}) {
|
|
1895
|
+
const o = k(null), [a, n] = g(!1);
|
|
1896
|
+
return P(() => {
|
|
1897
1897
|
const i = o.current;
|
|
1898
1898
|
if (!i) return;
|
|
1899
1899
|
const l = new IntersectionObserver(
|
|
@@ -1905,7 +1905,7 @@ function Xe({ threshold: s = 0.1, rootMargin: t = "0px", once: r = !1 } = {}) {
|
|
|
1905
1905
|
return l.observe(i), () => l.disconnect();
|
|
1906
1906
|
}, [s, t, r]), { ref: o, inView: a };
|
|
1907
1907
|
}
|
|
1908
|
-
function
|
|
1908
|
+
function qt({
|
|
1909
1909
|
children: s,
|
|
1910
1910
|
as: t = "div",
|
|
1911
1911
|
once: r = !1,
|
|
@@ -1915,31 +1915,31 @@ function Yt({
|
|
|
1915
1915
|
onLeave: i,
|
|
1916
1916
|
...l
|
|
1917
1917
|
}) {
|
|
1918
|
-
const { ref: m, inView: u } =
|
|
1919
|
-
return
|
|
1918
|
+
const { ref: m, inView: u } = Je({ threshold: o, rootMargin: a, once: r }), p = k(!1);
|
|
1919
|
+
return P(() => {
|
|
1920
1920
|
u && !p.current && (n == null || n()), !u && p.current && (i == null || i()), p.current = u;
|
|
1921
1921
|
}, [u]), /* @__PURE__ */ e.jsx(t, { ref: m, ...l, children: typeof s == "function" ? s(u) : s });
|
|
1922
1922
|
}
|
|
1923
|
-
const
|
|
1924
|
-
default:
|
|
1925
|
-
success:
|
|
1926
|
-
warning:
|
|
1927
|
-
error:
|
|
1923
|
+
const ve = {
|
|
1924
|
+
default: me,
|
|
1925
|
+
success: fe,
|
|
1926
|
+
warning: ue,
|
|
1927
|
+
error: de
|
|
1928
1928
|
};
|
|
1929
1929
|
let Q = [];
|
|
1930
1930
|
const ce = /* @__PURE__ */ new Set();
|
|
1931
|
-
function
|
|
1931
|
+
function we() {
|
|
1932
1932
|
ce.forEach((s) => s([...Q]));
|
|
1933
1933
|
}
|
|
1934
|
-
function Je(s) {
|
|
1935
|
-
Q = [...Q, s], _e();
|
|
1936
|
-
}
|
|
1937
1934
|
function Ze(s) {
|
|
1938
|
-
Q = Q
|
|
1935
|
+
Q = [...Q, s], we();
|
|
1936
|
+
}
|
|
1937
|
+
function Qe(s) {
|
|
1938
|
+
Q = Q.filter((t) => t.id !== s), we();
|
|
1939
1939
|
}
|
|
1940
|
-
function
|
|
1940
|
+
function Ht() {
|
|
1941
1941
|
const s = (t, r = {}) => {
|
|
1942
|
-
|
|
1942
|
+
Ze({
|
|
1943
1943
|
id: `${Date.now()}-${Math.random()}`,
|
|
1944
1944
|
message: t,
|
|
1945
1945
|
type: "default",
|
|
@@ -1949,13 +1949,13 @@ function qt() {
|
|
|
1949
1949
|
};
|
|
1950
1950
|
return s.success = (t, r) => s(t, { ...r, type: "success" }), s.error = (t, r) => s(t, { ...r, type: "error" }), s.warning = (t, r) => s(t, { ...r, type: "warning" }), { toast: s };
|
|
1951
1951
|
}
|
|
1952
|
-
function
|
|
1953
|
-
const [r, o] =
|
|
1954
|
-
|
|
1952
|
+
function et({ data: s, onDismiss: t }) {
|
|
1953
|
+
const [r, o] = g(!1), a = k(null);
|
|
1954
|
+
P(() => (requestAnimationFrame(() => o(!0)), s.duration > 0 && (a.current = setTimeout(() => n(), s.duration)), () => clearTimeout(a.current)), []);
|
|
1955
1955
|
function n() {
|
|
1956
1956
|
o(!1), setTimeout(() => t(s.id), 250);
|
|
1957
1957
|
}
|
|
1958
|
-
const i =
|
|
1958
|
+
const i = ve[s.type] ?? ve.default;
|
|
1959
1959
|
return /* @__PURE__ */ e.jsxs(
|
|
1960
1960
|
"div",
|
|
1961
1961
|
{
|
|
@@ -1967,7 +1967,7 @@ function Qe({ 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,26 +1975,26 @@ function Qe({ 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
|
]
|
|
1982
1982
|
}
|
|
1983
1983
|
);
|
|
1984
1984
|
}
|
|
1985
|
-
function
|
|
1986
|
-
const [t, r] =
|
|
1987
|
-
return
|
|
1988
|
-
/* @__PURE__ */ e.jsx("div", { className: ["ds-toast-container", `ds-toast-container--${s}`].join(" "), children: t.map((o) => /* @__PURE__ */ e.jsx(
|
|
1985
|
+
function Kt({ position: s = "bottom-right" }) {
|
|
1986
|
+
const [t, r] = g(() => [...Q]);
|
|
1987
|
+
return P(() => (ce.add(r), () => ce.delete(r)), []), !t.length || typeof document > "u" ? null : ne.createPortal(
|
|
1988
|
+
/* @__PURE__ */ e.jsx("div", { className: ["ds-toast-container", `ds-toast-container--${s}`].join(" "), children: t.map((o) => /* @__PURE__ */ e.jsx(et, { data: o, onDismiss: Qe }, o.id)) }),
|
|
1989
1989
|
document.body
|
|
1990
1990
|
);
|
|
1991
1991
|
}
|
|
1992
|
-
const
|
|
1992
|
+
const tt = {
|
|
1993
1993
|
running: /* @__PURE__ */ e.jsx(oe, { size: "xs", variant: "info", children: "Running..." }),
|
|
1994
1994
|
success: /* @__PURE__ */ e.jsx(oe, { size: "xs", variant: "success", children: "Done" }),
|
|
1995
1995
|
error: /* @__PURE__ */ e.jsx(oe, { size: "xs", variant: "error", children: "Error" })
|
|
1996
1996
|
};
|
|
1997
|
-
function
|
|
1997
|
+
function Gt({
|
|
1998
1998
|
label: s,
|
|
1999
1999
|
status: t = "idle",
|
|
2000
2000
|
icon: r,
|
|
@@ -2006,30 +2006,30 @@ function Kt({
|
|
|
2006
2006
|
children: m,
|
|
2007
2007
|
...u
|
|
2008
2008
|
}) {
|
|
2009
|
-
const f = `tc-body-${
|
|
2009
|
+
const f = `tc-body-${ke().replace(/:/g, "")}`, [b, d] = g(a), _ = n !== void 0, w = _ ? n : b, E = () => {
|
|
2010
2010
|
_ ? i == null || i(!n) : d((N) => !N);
|
|
2011
2011
|
};
|
|
2012
|
-
return /* @__PURE__ */ e.jsxs(
|
|
2012
|
+
return /* @__PURE__ */ e.jsxs(Be, { 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: E,
|
|
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
|
}
|
|
2029
2029
|
),
|
|
2030
2030
|
r && /* @__PURE__ */ e.jsx("span", { className: "ds-tool-card__icon", children: r }),
|
|
2031
2031
|
/* @__PURE__ */ e.jsx("span", { className: "ds-tool-card__label", children: s }),
|
|
2032
|
-
|
|
2032
|
+
tt[t],
|
|
2033
2033
|
o
|
|
2034
2034
|
]
|
|
2035
2035
|
}
|
|
@@ -2037,61 +2037,86 @@ function Kt({
|
|
|
2037
2037
|
w && /* @__PURE__ */ e.jsx("div", { id: f, className: "ds-tool-card__body", children: m })
|
|
2038
2038
|
] });
|
|
2039
2039
|
}
|
|
2040
|
+
function Xt({
|
|
2041
|
+
text: s,
|
|
2042
|
+
size: t = "xs",
|
|
2043
|
+
timeout: r = 2e3,
|
|
2044
|
+
"aria-label": o = "Copy to clipboard",
|
|
2045
|
+
...a
|
|
2046
|
+
}) {
|
|
2047
|
+
const [n, i] = g(!1), l = () => {
|
|
2048
|
+
navigator.clipboard.writeText(s).then(() => {
|
|
2049
|
+
i(!0), setTimeout(() => i(!1), r);
|
|
2050
|
+
});
|
|
2051
|
+
};
|
|
2052
|
+
return /* @__PURE__ */ e.jsx(
|
|
2053
|
+
_e,
|
|
2054
|
+
{
|
|
2055
|
+
variant: "ghost",
|
|
2056
|
+
size: t,
|
|
2057
|
+
icon: n ? /* @__PURE__ */ e.jsx(le, { size: S[1], strokeWidth: 1.5 }) : /* @__PURE__ */ e.jsx(Ie, { size: S[1], strokeWidth: 1.5 }),
|
|
2058
|
+
"aria-label": o,
|
|
2059
|
+
onClick: l,
|
|
2060
|
+
...a
|
|
2061
|
+
}
|
|
2062
|
+
);
|
|
2063
|
+
}
|
|
2040
2064
|
export {
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2065
|
+
yt as Accordion,
|
|
2066
|
+
bt as Alert,
|
|
2067
|
+
Yt as AnimatedNumber,
|
|
2068
|
+
Rt as Avatar,
|
|
2045
2069
|
oe as Badge,
|
|
2046
2070
|
zt as Banner,
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2071
|
+
Ft as Breadcrumb,
|
|
2072
|
+
_e as Button,
|
|
2073
|
+
Be as Card,
|
|
2074
|
+
$t as Checkbox,
|
|
2075
|
+
vt as Code,
|
|
2076
|
+
Me as CodeAccordion,
|
|
2077
|
+
Xt as CopyButton,
|
|
2053
2078
|
Wt as Drawer,
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2079
|
+
xe as DrawerFooter,
|
|
2080
|
+
Vt as Dropdown,
|
|
2081
|
+
Ot as EmptyState,
|
|
2082
|
+
Lt as FormField,
|
|
2083
|
+
lt as H1,
|
|
2084
|
+
dt as H2,
|
|
2085
|
+
ut as H3,
|
|
2086
|
+
ft as H4,
|
|
2087
|
+
qt as InView,
|
|
2088
|
+
at as Input,
|
|
2089
|
+
jt as Link,
|
|
2090
|
+
xt as Modal,
|
|
2091
|
+
be as ModalFooter,
|
|
2092
|
+
mt as P1,
|
|
2093
|
+
pt as P2,
|
|
2094
|
+
ht as P3,
|
|
2095
|
+
Ct as Pagination,
|
|
2096
|
+
Ut as ProgressBar,
|
|
2097
|
+
gt as Radio,
|
|
2098
|
+
Nt as SegmentedControl,
|
|
2099
|
+
it as Select,
|
|
2075
2100
|
We as Skeleton,
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2101
|
+
De as Spinner,
|
|
2102
|
+
Mt as Stat,
|
|
2103
|
+
ct as Stepper,
|
|
2104
|
+
wt as Tab,
|
|
2105
|
+
Tt as Table,
|
|
2106
|
+
At as TableBody,
|
|
2107
|
+
It as TableHead,
|
|
2108
|
+
St as TableRow,
|
|
2109
|
+
Dt as TableSubheaderRow,
|
|
2110
|
+
_t as Tabs,
|
|
2111
|
+
Bt as Td,
|
|
2112
|
+
ot as Textarea,
|
|
2113
|
+
Pt as Th,
|
|
2114
|
+
Kt as ToastContainer,
|
|
2090
2115
|
Et as Toggle,
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2116
|
+
Gt as ToolCallCard,
|
|
2117
|
+
kt as Tooltip,
|
|
2118
|
+
S as iconSizes,
|
|
2119
|
+
Xe as useAnimatedNumber,
|
|
2120
|
+
Je as useInView,
|
|
2121
|
+
Ht as useToast
|
|
2097
2122
|
};
|