@donkit-ai/design-system 1.1.1 → 1.1.2
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 +3 -3
- package/dist/index.es.js +157 -152
- package/dist/tokens.css +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import A, { useState as T, useRef as L, useEffect as B } from "react";
|
|
2
2
|
import J from "react-dom";
|
|
3
3
|
import { ChevronDown as K, Minus as ve, Plus as je, XCircle as fe, AlertTriangle as me, CheckCircle as pe, Info as be, X as se, Check as _e, ChevronUp as we, ChevronsUpDown as Ne } from "lucide-react";
|
|
4
|
-
const
|
|
4
|
+
const S = {
|
|
5
5
|
1: 16,
|
|
6
6
|
2: 20,
|
|
7
7
|
3: 24,
|
|
@@ -24,16 +24,16 @@ function ye() {
|
|
|
24
24
|
ce = 1;
|
|
25
25
|
var t = Symbol.for("react.transitional.element"), e = Symbol.for("react.fragment");
|
|
26
26
|
function r(l, n, a) {
|
|
27
|
-
var
|
|
28
|
-
if (a !== void 0 && (
|
|
27
|
+
var c = null;
|
|
28
|
+
if (a !== void 0 && (c = "" + a), n.key !== void 0 && (c = "" + n.key), "key" in n) {
|
|
29
29
|
a = {};
|
|
30
|
-
for (var
|
|
31
|
-
|
|
30
|
+
for (var i in n)
|
|
31
|
+
i !== "key" && (a[i] = n[i]);
|
|
32
32
|
} else a = n;
|
|
33
33
|
return n = a.ref, {
|
|
34
34
|
$$typeof: t,
|
|
35
35
|
type: l,
|
|
36
|
-
key:
|
|
36
|
+
key: c,
|
|
37
37
|
ref: n !== void 0 ? n : null,
|
|
38
38
|
props: a
|
|
39
39
|
};
|
|
@@ -61,7 +61,7 @@ function Ee() {
|
|
|
61
61
|
switch (o) {
|
|
62
62
|
case k:
|
|
63
63
|
return "Fragment";
|
|
64
|
-
case
|
|
64
|
+
case g:
|
|
65
65
|
return "Profiler";
|
|
66
66
|
case $:
|
|
67
67
|
return "StrictMode";
|
|
@@ -134,14 +134,14 @@ function Ee() {
|
|
|
134
134
|
function a() {
|
|
135
135
|
return Error("react-stack-top-frame");
|
|
136
136
|
}
|
|
137
|
-
function
|
|
137
|
+
function c(o) {
|
|
138
138
|
if (X.call(o, "key")) {
|
|
139
139
|
var h = Object.getOwnPropertyDescriptor(o, "key").get;
|
|
140
140
|
if (h && h.isReactWarning) return !1;
|
|
141
141
|
}
|
|
142
142
|
return o.key !== void 0;
|
|
143
143
|
}
|
|
144
|
-
function
|
|
144
|
+
function i(o, h) {
|
|
145
145
|
function N() {
|
|
146
146
|
H || (H = !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)",
|
|
@@ -223,12 +223,12 @@ React keys must be passed directly to JSX without using spread:
|
|
|
223
223
|
E
|
|
224
224
|
), le[E + y] = !0);
|
|
225
225
|
}
|
|
226
|
-
if (E = null, N !== void 0 && (r(N), E = "" + N),
|
|
226
|
+
if (E = null, N !== void 0 && (r(N), E = "" + N), c(h) && (r(h.key), E = "" + h.key), "key" in h) {
|
|
227
227
|
N = {};
|
|
228
228
|
for (var Q in h)
|
|
229
229
|
Q !== "key" && (N[Q] = h[Q]);
|
|
230
230
|
} else N = h;
|
|
231
|
-
return E &&
|
|
231
|
+
return E && i(
|
|
232
232
|
N,
|
|
233
233
|
typeof o == "function" ? o.displayName || o.name || "Unknown" : o
|
|
234
234
|
), f(
|
|
@@ -246,7 +246,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
246
246
|
function x(o) {
|
|
247
247
|
return typeof o == "object" && o !== null && o.$$typeof === j;
|
|
248
248
|
}
|
|
249
|
-
var b = A, j = Symbol.for("react.transitional.element"), v = Symbol.for("react.portal"), k = Symbol.for("react.fragment"), $ = Symbol.for("react.strict_mode"),
|
|
249
|
+
var b = A, j = Symbol.for("react.transitional.element"), v = Symbol.for("react.portal"), k = Symbol.for("react.fragment"), $ = Symbol.for("react.strict_mode"), g = Symbol.for("react.profiler"), m = Symbol.for("react.consumer"), _ = Symbol.for("react.context"), R = Symbol.for("react.forward_ref"), I = Symbol.for("react.suspense"), P = Symbol.for("react.suspense_list"), M = Symbol.for("react.memo"), U = Symbol.for("react.lazy"), w = Symbol.for("react.activity"), D = Symbol.for("react.client.reference"), F = b.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, X = Object.prototype.hasOwnProperty, re = Array.isArray, W = console.createTask ? console.createTask : function() {
|
|
250
250
|
return null;
|
|
251
251
|
};
|
|
252
252
|
b = {
|
|
@@ -290,8 +290,8 @@ function ke({
|
|
|
290
290
|
fullWidth: l = !1,
|
|
291
291
|
icon: n,
|
|
292
292
|
disabled: a = !1,
|
|
293
|
-
onClick:
|
|
294
|
-
type:
|
|
293
|
+
onClick: c,
|
|
294
|
+
type: i = "button",
|
|
295
295
|
href: p,
|
|
296
296
|
"aria-label": f,
|
|
297
297
|
...d
|
|
@@ -313,7 +313,7 @@ function ke({
|
|
|
313
313
|
v.preventDefault();
|
|
314
314
|
return;
|
|
315
315
|
}
|
|
316
|
-
v.metaKey || v.ctrlKey || v.button === 1 || (v.preventDefault(),
|
|
316
|
+
v.metaKey || v.ctrlKey || v.button === 1 || (v.preventDefault(), c == null || c(v));
|
|
317
317
|
};
|
|
318
318
|
return /* @__PURE__ */ s.jsx(
|
|
319
319
|
"a",
|
|
@@ -331,10 +331,10 @@ function ke({
|
|
|
331
331
|
return /* @__PURE__ */ s.jsx(
|
|
332
332
|
"button",
|
|
333
333
|
{
|
|
334
|
-
type:
|
|
334
|
+
type: i,
|
|
335
335
|
className: x,
|
|
336
336
|
disabled: a,
|
|
337
|
-
onClick:
|
|
337
|
+
onClick: c,
|
|
338
338
|
"aria-label": f,
|
|
339
339
|
...d,
|
|
340
340
|
children: b
|
|
@@ -348,8 +348,8 @@ function Me({
|
|
|
348
348
|
fullWidth: l = !0,
|
|
349
349
|
icon: n,
|
|
350
350
|
iconRight: a,
|
|
351
|
-
onIconRightClick:
|
|
352
|
-
size:
|
|
351
|
+
onIconRightClick: c,
|
|
352
|
+
size: i = "m",
|
|
353
353
|
disabled: p,
|
|
354
354
|
id: f,
|
|
355
355
|
...d
|
|
@@ -358,12 +358,12 @@ function Me({
|
|
|
358
358
|
return /* @__PURE__ */ s.jsxs("div", { className: `ds-input-wrapper ${l ? "ds-input-wrapper--full" : ""} ${p ? "ds-input-wrapper--disabled" : ""}`, children: [
|
|
359
359
|
t && /* @__PURE__ */ s.jsx("label", { className: "ds-input-label", htmlFor: u, children: t }),
|
|
360
360
|
/* @__PURE__ */ s.jsxs("div", { className: "ds-input-container", children: [
|
|
361
|
-
n && /* @__PURE__ */ s.jsx("span", { className: `ds-input-icon ds-input-icon--${
|
|
361
|
+
n && /* @__PURE__ */ s.jsx("span", { className: `ds-input-icon ds-input-icon--${i}`, "aria-hidden": "true", children: n }),
|
|
362
362
|
/* @__PURE__ */ s.jsx(
|
|
363
363
|
"input",
|
|
364
364
|
{
|
|
365
365
|
id: u,
|
|
366
|
-
className: `ds-input ds-input--${
|
|
366
|
+
className: `ds-input ds-input--${i} ${n ? "ds-input--with-icon" : ""} ${a ? "ds-input--with-icon-right" : ""} ${e ? "ds-input--error" : ""}`,
|
|
367
367
|
disabled: p,
|
|
368
368
|
"aria-invalid": e ? "true" : "false",
|
|
369
369
|
"aria-describedby": j,
|
|
@@ -374,8 +374,8 @@ function Me({
|
|
|
374
374
|
"button",
|
|
375
375
|
{
|
|
376
376
|
type: "button",
|
|
377
|
-
className: `ds-input-icon-right ds-input-icon-right--${
|
|
378
|
-
onClick:
|
|
377
|
+
className: `ds-input-icon-right ds-input-icon-right--${i}`,
|
|
378
|
+
onClick: c,
|
|
379
379
|
tabIndex: -1,
|
|
380
380
|
"aria-label": "Toggle visibility",
|
|
381
381
|
children: a
|
|
@@ -393,19 +393,19 @@ function Fe({
|
|
|
393
393
|
fullWidth: l = !0,
|
|
394
394
|
size: n = "m",
|
|
395
395
|
disabled: a,
|
|
396
|
-
id:
|
|
397
|
-
resize:
|
|
396
|
+
id: c,
|
|
397
|
+
resize: i = !0,
|
|
398
398
|
rows: p = 3,
|
|
399
399
|
...f
|
|
400
400
|
}) {
|
|
401
|
-
const d =
|
|
401
|
+
const d = c || `textarea-${A.useId()}`, u = r ? `${d}-hint` : void 0, x = e ? `${d}-error` : void 0, b = x || u;
|
|
402
402
|
return /* @__PURE__ */ s.jsxs("div", { className: `ds-textarea-wrapper ${l ? "ds-textarea-wrapper--full" : ""} ${a ? "ds-textarea-wrapper--disabled" : ""}`, children: [
|
|
403
403
|
t && /* @__PURE__ */ s.jsx("label", { className: "ds-textarea-label", htmlFor: d, children: t }),
|
|
404
404
|
/* @__PURE__ */ s.jsx(
|
|
405
405
|
"textarea",
|
|
406
406
|
{
|
|
407
407
|
id: d,
|
|
408
|
-
className: `ds-textarea ds-textarea--${n} ${e ? "ds-textarea--error" : ""} ${
|
|
408
|
+
className: `ds-textarea ds-textarea--${n} ${e ? "ds-textarea--error" : ""} ${i ? "" : "ds-textarea--no-resize"}`,
|
|
409
409
|
disabled: a,
|
|
410
410
|
"aria-invalid": e ? "true" : "false",
|
|
411
411
|
"aria-describedby": b,
|
|
@@ -424,13 +424,13 @@ function We({
|
|
|
424
424
|
options: l = [],
|
|
425
425
|
placeholder: n = "Select option",
|
|
426
426
|
error: a,
|
|
427
|
-
fullWidth:
|
|
428
|
-
size:
|
|
427
|
+
fullWidth: c = !0,
|
|
428
|
+
size: i = "m",
|
|
429
429
|
disabled: p = !1,
|
|
430
430
|
id: f,
|
|
431
431
|
...d
|
|
432
432
|
}) {
|
|
433
|
-
const [u, x] = T(!1), [b, j] = T({}), [v, k] = T("down"), $ = L(null),
|
|
433
|
+
const [u, x] = T(!1), [b, j] = T({}), [v, k] = T("down"), $ = L(null), g = L(null), m = f || `select-${A.useId()}`, _ = `${m}-label`, R = a ? `${m}-error` : void 0, I = () => {
|
|
434
434
|
var H;
|
|
435
435
|
const w = (H = $.current) == null ? void 0 : H.getBoundingClientRect();
|
|
436
436
|
if (!w) return;
|
|
@@ -446,17 +446,17 @@ function We({
|
|
|
446
446
|
};
|
|
447
447
|
}, [u]), B(() => {
|
|
448
448
|
const w = (D) => {
|
|
449
|
-
$.current && !$.current.contains(D.target) &&
|
|
449
|
+
$.current && !$.current.contains(D.target) && g.current && !g.current.contains(D.target) && x(!1);
|
|
450
450
|
};
|
|
451
451
|
return document.addEventListener("mousedown", w), () => document.removeEventListener("mousedown", w);
|
|
452
452
|
}, []);
|
|
453
|
-
const P = l.find((w) => w.value === e), M =
|
|
453
|
+
const P = l.find((w) => w.value === e), M = i === "xs" ? S[1] : i === "small" ? S[2] : S[3], U = u && /* @__PURE__ */ s.jsx(
|
|
454
454
|
"div",
|
|
455
455
|
{
|
|
456
|
-
ref:
|
|
456
|
+
ref: g,
|
|
457
457
|
role: "listbox",
|
|
458
458
|
"aria-labelledby": t ? _ : void 0,
|
|
459
|
-
className: `ds-select-dropdown ds-select-dropdown--${
|
|
459
|
+
className: `ds-select-dropdown ds-select-dropdown--${i} ds-select-dropdown--${v}`,
|
|
460
460
|
style: b,
|
|
461
461
|
children: l.map((w) => /* @__PURE__ */ s.jsx(
|
|
462
462
|
"button",
|
|
@@ -464,7 +464,7 @@ function We({
|
|
|
464
464
|
type: "button",
|
|
465
465
|
role: "option",
|
|
466
466
|
"aria-selected": e === w.value,
|
|
467
|
-
className: `ds-select-option ds-select-option--${
|
|
467
|
+
className: `ds-select-option ds-select-option--${i} ${e === w.value ? "ds-select-option--selected" : ""}`,
|
|
468
468
|
onClick: () => {
|
|
469
469
|
r == null || r(w.value), x(!1);
|
|
470
470
|
},
|
|
@@ -474,7 +474,7 @@ function We({
|
|
|
474
474
|
))
|
|
475
475
|
}
|
|
476
476
|
);
|
|
477
|
-
return /* @__PURE__ */ s.jsxs("div", { className: `ds-select-wrapper ${
|
|
477
|
+
return /* @__PURE__ */ s.jsxs("div", { className: `ds-select-wrapper ${c ? "ds-select-wrapper--full" : ""} ${p ? "ds-select-wrapper--disabled" : ""}`, children: [
|
|
478
478
|
t && /* @__PURE__ */ s.jsx("label", { id: _, className: "ds-select-label", children: t }),
|
|
479
479
|
/* @__PURE__ */ s.jsx("div", { className: "ds-select-container", ref: $, children: /* @__PURE__ */ s.jsxs(
|
|
480
480
|
"button",
|
|
@@ -487,7 +487,7 @@ function We({
|
|
|
487
487
|
"aria-labelledby": t ? _ : void 0,
|
|
488
488
|
"aria-invalid": a ? "true" : "false",
|
|
489
489
|
"aria-describedby": R,
|
|
490
|
-
className: `ds-select-trigger ds-select-trigger--${
|
|
490
|
+
className: `ds-select-trigger ds-select-trigger--${i} ${a ? "ds-select-trigger--error" : ""}`,
|
|
491
491
|
onClick: () => !p && x(!u),
|
|
492
492
|
disabled: p,
|
|
493
493
|
...d,
|
|
@@ -516,41 +516,41 @@ function Ye({
|
|
|
516
516
|
min: l = 0,
|
|
517
517
|
max: n = 100,
|
|
518
518
|
step: a = 1,
|
|
519
|
-
size:
|
|
520
|
-
disabled:
|
|
519
|
+
size: c = "m",
|
|
520
|
+
disabled: i = !1,
|
|
521
521
|
hint: p,
|
|
522
522
|
error: f,
|
|
523
523
|
...d
|
|
524
524
|
}) {
|
|
525
525
|
const u = () => {
|
|
526
|
-
if (
|
|
526
|
+
if (i) return;
|
|
527
527
|
const $ = Math.min(Number(e) + a, n);
|
|
528
528
|
r == null || r($);
|
|
529
529
|
}, x = () => {
|
|
530
|
-
if (
|
|
530
|
+
if (i) return;
|
|
531
531
|
const $ = Math.max(Number(e) - a, l);
|
|
532
532
|
r == null || r($);
|
|
533
533
|
}, b = ($) => {
|
|
534
|
-
if (
|
|
535
|
-
const
|
|
536
|
-
if (
|
|
534
|
+
if (i) return;
|
|
535
|
+
const g = $.target.value;
|
|
536
|
+
if (g === "") {
|
|
537
537
|
r == null || r(l);
|
|
538
538
|
return;
|
|
539
539
|
}
|
|
540
|
-
const m = Number(
|
|
540
|
+
const m = Number(g);
|
|
541
541
|
if (!isNaN(m)) {
|
|
542
542
|
const _ = Math.min(Math.max(m, l), n);
|
|
543
543
|
r == null || r(_);
|
|
544
544
|
}
|
|
545
545
|
}, j = [
|
|
546
546
|
"ds-stepper-wrapper",
|
|
547
|
-
|
|
547
|
+
i && "ds-stepper-wrapper--disabled",
|
|
548
548
|
f && "ds-stepper-wrapper--error"
|
|
549
549
|
].filter(Boolean).join(" "), v = [
|
|
550
550
|
"ds-stepper",
|
|
551
|
-
`ds-stepper--${
|
|
552
|
-
|
|
553
|
-
].filter(Boolean).join(" "), k =
|
|
551
|
+
`ds-stepper--${c}`,
|
|
552
|
+
i && "ds-stepper--disabled"
|
|
553
|
+
].filter(Boolean).join(" "), k = c === "xs" ? S[1] : c === "small" ? S[2] : S[3];
|
|
554
554
|
return /* @__PURE__ */ s.jsxs("div", { className: j, children: [
|
|
555
555
|
t && /* @__PURE__ */ s.jsx("label", { className: "ds-stepper-label", children: t }),
|
|
556
556
|
/* @__PURE__ */ s.jsxs("div", { className: v, children: [
|
|
@@ -560,7 +560,7 @@ function Ye({
|
|
|
560
560
|
type: "button",
|
|
561
561
|
className: "ds-stepper-button ds-stepper-button--minus",
|
|
562
562
|
onClick: x,
|
|
563
|
-
disabled:
|
|
563
|
+
disabled: i || e <= l,
|
|
564
564
|
"aria-label": "Decrease",
|
|
565
565
|
children: /* @__PURE__ */ s.jsx(ve, { size: k, strokeWidth: 1.5 })
|
|
566
566
|
}
|
|
@@ -575,7 +575,7 @@ function Ye({
|
|
|
575
575
|
min: l,
|
|
576
576
|
max: n,
|
|
577
577
|
step: a,
|
|
578
|
-
disabled:
|
|
578
|
+
disabled: i,
|
|
579
579
|
...d
|
|
580
580
|
}
|
|
581
581
|
),
|
|
@@ -585,7 +585,7 @@ function Ye({
|
|
|
585
585
|
type: "button",
|
|
586
586
|
className: "ds-stepper-button ds-stepper-button--plus",
|
|
587
587
|
onClick: u,
|
|
588
|
-
disabled:
|
|
588
|
+
disabled: i || e >= n,
|
|
589
589
|
"aria-label": "Increase",
|
|
590
590
|
children: /* @__PURE__ */ s.jsx(je, { size: k, strokeWidth: 1.5 })
|
|
591
591
|
}
|
|
@@ -603,8 +603,8 @@ function ze({
|
|
|
603
603
|
// deprecated, use variant="interactive"
|
|
604
604
|
onClick: n,
|
|
605
605
|
href: a,
|
|
606
|
-
disabled:
|
|
607
|
-
...
|
|
606
|
+
disabled: c = !1,
|
|
607
|
+
...i
|
|
608
608
|
}) {
|
|
609
609
|
const f = (l ? "interactive" : r) === "interactive" || n || a, d = [
|
|
610
610
|
"ds-card",
|
|
@@ -613,7 +613,7 @@ function ze({
|
|
|
613
613
|
].filter(Boolean).join(" ");
|
|
614
614
|
if (a) {
|
|
615
615
|
const b = (j) => {
|
|
616
|
-
if (
|
|
616
|
+
if (c) {
|
|
617
617
|
j.preventDefault();
|
|
618
618
|
return;
|
|
619
619
|
}
|
|
@@ -623,10 +623,10 @@ function ze({
|
|
|
623
623
|
"a",
|
|
624
624
|
{
|
|
625
625
|
className: d,
|
|
626
|
-
href:
|
|
626
|
+
href: c ? void 0 : a,
|
|
627
627
|
onClick: b,
|
|
628
|
-
"aria-disabled":
|
|
629
|
-
...
|
|
628
|
+
"aria-disabled": c ? "true" : void 0,
|
|
629
|
+
...i,
|
|
630
630
|
children: t
|
|
631
631
|
}
|
|
632
632
|
);
|
|
@@ -634,7 +634,7 @@ function ze({
|
|
|
634
634
|
const u = f && n ? "button" : "div", x = f && n ? {
|
|
635
635
|
type: "button",
|
|
636
636
|
onClick: n,
|
|
637
|
-
disabled:
|
|
637
|
+
disabled: c
|
|
638
638
|
} : {};
|
|
639
639
|
return /* @__PURE__ */ s.jsx(
|
|
640
640
|
u,
|
|
@@ -642,7 +642,7 @@ function ze({
|
|
|
642
642
|
className: d,
|
|
643
643
|
role: f && !n ? "article" : void 0,
|
|
644
644
|
...x,
|
|
645
|
-
...
|
|
645
|
+
...i,
|
|
646
646
|
children: t
|
|
647
647
|
}
|
|
648
648
|
);
|
|
@@ -679,8 +679,8 @@ function Je({
|
|
|
679
679
|
"ds-badge",
|
|
680
680
|
`ds-badge--${e}`,
|
|
681
681
|
`ds-badge--${r}`
|
|
682
|
-
].filter(Boolean).join(" "),
|
|
683
|
-
return /* @__PURE__ */ s.jsx("span", { className: a, role:
|
|
682
|
+
].filter(Boolean).join(" "), c = l || (["info", "success", "warning", "error"].includes(e) ? "status" : void 0);
|
|
683
|
+
return /* @__PURE__ */ s.jsx("span", { className: a, role: c, ...n, children: t });
|
|
684
684
|
}
|
|
685
685
|
const $e = {
|
|
686
686
|
info: be,
|
|
@@ -696,9 +696,9 @@ function Ke({
|
|
|
696
696
|
role: n,
|
|
697
697
|
...a
|
|
698
698
|
}) {
|
|
699
|
-
const
|
|
700
|
-
return /* @__PURE__ */ s.jsxs("div", { className: `ds-alert ds-alert--${e} ${r ? "" : "ds-alert--no-title"}`, role:
|
|
701
|
-
|
|
699
|
+
const c = $e[e], i = n || (e === "error" ? "alert" : "status");
|
|
700
|
+
return /* @__PURE__ */ s.jsxs("div", { className: `ds-alert ds-alert--${e} ${r ? "" : "ds-alert--no-title"}`, role: i, ...a, children: [
|
|
701
|
+
c && /* @__PURE__ */ s.jsx("div", { className: "ds-alert__icon", children: /* @__PURE__ */ s.jsx(c, { size: S[3], strokeWidth: 1.5 }) }),
|
|
702
702
|
/* @__PURE__ */ s.jsxs("div", { className: "ds-alert__content", children: [
|
|
703
703
|
r && /* @__PURE__ */ s.jsx("div", { className: "ds-alert__title", children: r }),
|
|
704
704
|
t && /* @__PURE__ */ s.jsx("div", { className: "ds-alert__message", children: t })
|
|
@@ -710,7 +710,7 @@ function Ke({
|
|
|
710
710
|
className: "ds-alert__close",
|
|
711
711
|
onClick: l,
|
|
712
712
|
"aria-label": "Close alert",
|
|
713
|
-
children: /* @__PURE__ */ s.jsx(se, { size:
|
|
713
|
+
children: /* @__PURE__ */ s.jsx(se, { size: S[3], strokeWidth: 1.5 })
|
|
714
714
|
}
|
|
715
715
|
)
|
|
716
716
|
] });
|
|
@@ -722,7 +722,7 @@ function Ze({
|
|
|
722
722
|
size: l = "m",
|
|
723
723
|
...n
|
|
724
724
|
}) {
|
|
725
|
-
const a = L(null),
|
|
725
|
+
const a = L(null), c = A.useId();
|
|
726
726
|
B(() => {
|
|
727
727
|
const d = (x) => {
|
|
728
728
|
x.key === "Escape" && (r == null || r());
|
|
@@ -733,7 +733,7 @@ function Ze({
|
|
|
733
733
|
document.removeEventListener("keydown", d), document.removeEventListener("mousedown", u);
|
|
734
734
|
};
|
|
735
735
|
}, [r]);
|
|
736
|
-
const
|
|
736
|
+
const i = A.Children.toArray(t), p = i.find((d) => (d == null ? void 0 : d.type) === de), f = i.filter((d) => (d == null ? void 0 : d.type) !== de);
|
|
737
737
|
return /* @__PURE__ */ s.jsx("div", { className: "ds-modal-overlay", ...n, children: /* @__PURE__ */ s.jsxs(
|
|
738
738
|
"div",
|
|
739
739
|
{
|
|
@@ -741,16 +741,16 @@ function Ze({
|
|
|
741
741
|
ref: a,
|
|
742
742
|
role: "dialog",
|
|
743
743
|
"aria-modal": "true",
|
|
744
|
-
"aria-labelledby": e ?
|
|
744
|
+
"aria-labelledby": e ? c : void 0,
|
|
745
745
|
children: [
|
|
746
746
|
(e || r) && /* @__PURE__ */ s.jsxs("div", { className: "ds-modal__header", children: [
|
|
747
|
-
e && /* @__PURE__ */ s.jsx("h3", { id:
|
|
747
|
+
e && /* @__PURE__ */ s.jsx("h3", { id: c, className: "ds-modal__title", children: e }),
|
|
748
748
|
r && /* @__PURE__ */ s.jsx(
|
|
749
749
|
ke,
|
|
750
750
|
{
|
|
751
751
|
variant: "ghost",
|
|
752
752
|
size: "small",
|
|
753
|
-
icon: /* @__PURE__ */ s.jsx(se, { size:
|
|
753
|
+
icon: /* @__PURE__ */ s.jsx(se, { size: S[2], strokeWidth: 1.5 }),
|
|
754
754
|
onClick: r,
|
|
755
755
|
"aria-label": "Close modal"
|
|
756
756
|
}
|
|
@@ -772,17 +772,17 @@ function Re({
|
|
|
772
772
|
expanded: l,
|
|
773
773
|
onToggle: n,
|
|
774
774
|
padding: a = "s",
|
|
775
|
-
className:
|
|
776
|
-
...
|
|
775
|
+
className: c = "",
|
|
776
|
+
...i
|
|
777
777
|
}) {
|
|
778
778
|
const [p, f] = T(r), d = l !== void 0, u = d ? l : p, x = () => {
|
|
779
779
|
d ? n == null || n(!l) : f((j) => !j);
|
|
780
780
|
}, b = [
|
|
781
781
|
"ds-code-accordion",
|
|
782
782
|
`ds-code-accordion--${a}`,
|
|
783
|
-
|
|
783
|
+
c
|
|
784
784
|
].filter(Boolean).join(" ");
|
|
785
|
-
return /* @__PURE__ */ s.jsxs("div", { className: b, ...
|
|
785
|
+
return /* @__PURE__ */ s.jsxs("div", { className: b, ...i, children: [
|
|
786
786
|
/* @__PURE__ */ s.jsxs(
|
|
787
787
|
"button",
|
|
788
788
|
{
|
|
@@ -795,7 +795,7 @@ function Re({
|
|
|
795
795
|
/* @__PURE__ */ s.jsx(
|
|
796
796
|
K,
|
|
797
797
|
{
|
|
798
|
-
size:
|
|
798
|
+
size: S[2],
|
|
799
799
|
strokeWidth: 1.5,
|
|
800
800
|
className: `ds-code-accordion__icon ${u ? "ds-code-accordion__icon--expanded" : ""}`
|
|
801
801
|
}
|
|
@@ -810,7 +810,7 @@ function Qe({ children: t, block: e = !1, collapsible: r = !1, title: l = "Code"
|
|
|
810
810
|
return e ? r ? /* @__PURE__ */ s.jsx(Re, { title: l, defaultExpanded: n, ...a, children: t }) : /* @__PURE__ */ s.jsx("pre", { className: "ds-code-block", ...a, children: /* @__PURE__ */ s.jsx("code", { children: t }) }) : /* @__PURE__ */ s.jsx("code", { className: "ds-code-inline", ...a, children: t });
|
|
811
811
|
}
|
|
812
812
|
function et({ href: t, children: e, onClick: r, target: l, rel: n, ...a }) {
|
|
813
|
-
const
|
|
813
|
+
const i = l === "_blank" ? n ? `${n} noopener noreferrer` : "noopener noreferrer" : n;
|
|
814
814
|
return /* @__PURE__ */ s.jsx(
|
|
815
815
|
"a",
|
|
816
816
|
{
|
|
@@ -818,7 +818,7 @@ function et({ href: t, children: e, onClick: r, target: l, rel: n, ...a }) {
|
|
|
818
818
|
className: "ds-link",
|
|
819
819
|
onClick: r,
|
|
820
820
|
target: l,
|
|
821
|
-
rel:
|
|
821
|
+
rel: i,
|
|
822
822
|
...a,
|
|
823
823
|
children: e
|
|
824
824
|
}
|
|
@@ -827,18 +827,18 @@ function et({ href: t, children: e, onClick: r, target: l, rel: n, ...a }) {
|
|
|
827
827
|
function tt({ children: t, size: e = "m", variant: r = "ghost", ...l }) {
|
|
828
828
|
return /* @__PURE__ */ s.jsx("div", { className: "ds-tabs", role: "tablist", ...l, children: A.Children.map(t, (n) => A.isValidElement(n) ? A.cloneElement(n, { size: e, variant: r }) : n) });
|
|
829
829
|
}
|
|
830
|
-
function st({ children: t, selected: e = !1, onClick: r, size: l = "m", variant: n = "ghost", disabled: a = !1, icon:
|
|
831
|
-
const f =
|
|
830
|
+
function st({ children: t, selected: e = !1, onClick: r, size: l = "m", variant: n = "ghost", disabled: a = !1, icon: c, href: i, ...p }) {
|
|
831
|
+
const f = c && !t, d = [
|
|
832
832
|
"ds-tab",
|
|
833
833
|
`ds-tab--${l}`,
|
|
834
834
|
`ds-tab--${n}`,
|
|
835
835
|
e && "ds-tab--selected",
|
|
836
836
|
f && "ds-tab--icon-only"
|
|
837
837
|
].filter(Boolean).join(" "), u = /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
838
|
-
|
|
838
|
+
c && /* @__PURE__ */ s.jsx("span", { className: "ds-tab-icon", children: c }),
|
|
839
839
|
t
|
|
840
840
|
] });
|
|
841
|
-
if (
|
|
841
|
+
if (i) {
|
|
842
842
|
const x = (b) => {
|
|
843
843
|
if (a) {
|
|
844
844
|
b.preventDefault();
|
|
@@ -853,7 +853,7 @@ function st({ children: t, selected: e = !1, onClick: r, size: l = "m", variant:
|
|
|
853
853
|
"aria-current": e ? "page" : void 0,
|
|
854
854
|
"aria-disabled": a ? "true" : void 0,
|
|
855
855
|
className: d,
|
|
856
|
-
href: a ? void 0 :
|
|
856
|
+
href: a ? void 0 : i,
|
|
857
857
|
onClick: x,
|
|
858
858
|
...p,
|
|
859
859
|
children: u
|
|
@@ -880,15 +880,15 @@ function rt({
|
|
|
880
880
|
expanded: l,
|
|
881
881
|
onToggle: n,
|
|
882
882
|
padding: a = "m",
|
|
883
|
-
...
|
|
883
|
+
...c
|
|
884
884
|
}) {
|
|
885
|
-
const [
|
|
885
|
+
const [i, p] = T(r), f = l !== void 0, d = f ? l : i, u = () => {
|
|
886
886
|
f ? n == null || n(!l) : p((b) => !b);
|
|
887
887
|
}, x = [
|
|
888
888
|
"ds-accordion",
|
|
889
889
|
`ds-accordion--${a}`
|
|
890
890
|
].filter(Boolean).join(" ");
|
|
891
|
-
return /* @__PURE__ */ s.jsxs("div", { className: x, ...
|
|
891
|
+
return /* @__PURE__ */ s.jsxs("div", { className: x, ...c, children: [
|
|
892
892
|
/* @__PURE__ */ s.jsxs(
|
|
893
893
|
"button",
|
|
894
894
|
{
|
|
@@ -901,7 +901,7 @@ function rt({
|
|
|
901
901
|
/* @__PURE__ */ s.jsx(
|
|
902
902
|
K,
|
|
903
903
|
{
|
|
904
|
-
size:
|
|
904
|
+
size: S[2],
|
|
905
905
|
strokeWidth: 1.5,
|
|
906
906
|
className: `ds-accordion__icon ${d ? "ds-accordion__icon--expanded" : ""}`
|
|
907
907
|
}
|
|
@@ -932,10 +932,10 @@ function Te(t, e, r) {
|
|
|
932
932
|
default:
|
|
933
933
|
n = e.bottom + O, a = e.left;
|
|
934
934
|
}
|
|
935
|
-
const
|
|
936
|
-
return { top: n, left:
|
|
935
|
+
const c = Math.max(z, Math.min(l - r.width - z, a)), i = a - c;
|
|
936
|
+
return { top: n, left: c, arrowOffset: i };
|
|
937
937
|
}
|
|
938
|
-
function
|
|
938
|
+
function Se(t, e, r) {
|
|
939
939
|
const l = window.innerWidth, n = window.innerHeight;
|
|
940
940
|
if (t.top >= e + O + z) return "top";
|
|
941
941
|
if (n - t.bottom >= e + O + z) return "bottom";
|
|
@@ -945,12 +945,12 @@ function ge(t, e, r) {
|
|
|
945
945
|
return a === t.top ? "top" : a === n - t.bottom ? "bottom" : a === l - t.right ? "right" : "left";
|
|
946
946
|
}
|
|
947
947
|
function nt({ children: t, content: e, position: r, ...l }) {
|
|
948
|
-
const [n, a] = T(!1), [
|
|
948
|
+
const [n, a] = T(!1), [c, i] = T({ visibility: "hidden" }), [p, f] = T(r || "top"), d = L(null), u = L(null), x = L(!1), b = () => {
|
|
949
949
|
if (!d.current || !u.current) return;
|
|
950
|
-
const v = d.current.getBoundingClientRect(), k = u.current.getBoundingClientRect(), $ = r ||
|
|
951
|
-
f($),
|
|
950
|
+
const v = d.current.getBoundingClientRect(), k = u.current.getBoundingClientRect(), $ = r || Se(v, k.height, k.width), { top: g, left: m, arrowOffset: _ } = Te($, v, k);
|
|
951
|
+
f($), i({
|
|
952
952
|
position: "fixed",
|
|
953
|
-
top:
|
|
953
|
+
top: g,
|
|
954
954
|
left: m,
|
|
955
955
|
visibility: "visible",
|
|
956
956
|
"--arrow-offset": `${_}px`
|
|
@@ -958,7 +958,7 @@ function nt({ children: t, content: e, position: r, ...l }) {
|
|
|
958
958
|
};
|
|
959
959
|
if (B(() => {
|
|
960
960
|
if (!n) return;
|
|
961
|
-
|
|
961
|
+
i({ position: "fixed", visibility: "hidden" });
|
|
962
962
|
const v = requestAnimationFrame(b);
|
|
963
963
|
return window.addEventListener("scroll", b, !0), window.addEventListener("resize", b), () => {
|
|
964
964
|
cancelAnimationFrame(v), window.removeEventListener("scroll", b, !0), window.removeEventListener("resize", b);
|
|
@@ -976,7 +976,7 @@ function nt({ children: t, content: e, position: r, ...l }) {
|
|
|
976
976
|
ref: u,
|
|
977
977
|
className: `ds-tooltip ds-tooltip--${p}`,
|
|
978
978
|
role: "tooltip",
|
|
979
|
-
style:
|
|
979
|
+
style: c,
|
|
980
980
|
children: e
|
|
981
981
|
}
|
|
982
982
|
);
|
|
@@ -1009,24 +1009,24 @@ function at({
|
|
|
1009
1009
|
disabled: l = !1,
|
|
1010
1010
|
label: n,
|
|
1011
1011
|
id: a,
|
|
1012
|
-
...
|
|
1012
|
+
...c
|
|
1013
1013
|
}) {
|
|
1014
|
-
const
|
|
1014
|
+
const i = a || `toggle-${A.useId()}`, p = [
|
|
1015
1015
|
"ds-toggle",
|
|
1016
1016
|
`ds-toggle--${r}`,
|
|
1017
1017
|
l && "ds-toggle--disabled"
|
|
1018
1018
|
].filter(Boolean).join(" ");
|
|
1019
|
-
return /* @__PURE__ */ s.jsxs("label", { className: p, htmlFor:
|
|
1019
|
+
return /* @__PURE__ */ s.jsxs("label", { className: p, htmlFor: i, children: [
|
|
1020
1020
|
/* @__PURE__ */ s.jsx(
|
|
1021
1021
|
"input",
|
|
1022
1022
|
{
|
|
1023
1023
|
type: "checkbox",
|
|
1024
|
-
id:
|
|
1024
|
+
id: i,
|
|
1025
1025
|
className: "ds-toggle__input",
|
|
1026
1026
|
checked: t,
|
|
1027
1027
|
onChange: (f) => e == null ? void 0 : e(f.target.checked),
|
|
1028
1028
|
disabled: l,
|
|
1029
|
-
...
|
|
1029
|
+
...c
|
|
1030
1030
|
}
|
|
1031
1031
|
),
|
|
1032
1032
|
/* @__PURE__ */ s.jsx("span", { className: "ds-toggle__track", children: /* @__PURE__ */ s.jsx("span", { className: "ds-toggle__thumb" }) }),
|
|
@@ -1040,24 +1040,24 @@ function ot({
|
|
|
1040
1040
|
disabled: l = !1,
|
|
1041
1041
|
label: n,
|
|
1042
1042
|
id: a,
|
|
1043
|
-
...
|
|
1043
|
+
...c
|
|
1044
1044
|
}) {
|
|
1045
|
-
const
|
|
1045
|
+
const i = a || `checkbox-${A.useId()}`, p = [
|
|
1046
1046
|
"ds-checkbox",
|
|
1047
1047
|
`ds-checkbox--${r}`,
|
|
1048
1048
|
l && "ds-checkbox--disabled"
|
|
1049
1049
|
].filter(Boolean).join(" "), f = r === "xs" ? 10 : r === "small" ? 14 : r === "large" ? 20 : 16;
|
|
1050
|
-
return /* @__PURE__ */ s.jsxs("label", { className: p, htmlFor:
|
|
1050
|
+
return /* @__PURE__ */ s.jsxs("label", { className: p, htmlFor: i, children: [
|
|
1051
1051
|
/* @__PURE__ */ s.jsx(
|
|
1052
1052
|
"input",
|
|
1053
1053
|
{
|
|
1054
1054
|
type: "checkbox",
|
|
1055
|
-
id:
|
|
1055
|
+
id: i,
|
|
1056
1056
|
className: "ds-checkbox__input",
|
|
1057
1057
|
checked: t,
|
|
1058
1058
|
onChange: (d) => e == null ? void 0 : e(d.target.checked),
|
|
1059
1059
|
disabled: l,
|
|
1060
|
-
...
|
|
1060
|
+
...c
|
|
1061
1061
|
}
|
|
1062
1062
|
),
|
|
1063
1063
|
/* @__PURE__ */ s.jsx("span", { className: "ds-checkbox__box", children: t && /* @__PURE__ */ s.jsx(
|
|
@@ -1078,11 +1078,11 @@ function lt({
|
|
|
1078
1078
|
disabled: l = !1,
|
|
1079
1079
|
label: n,
|
|
1080
1080
|
name: a,
|
|
1081
|
-
value:
|
|
1082
|
-
id:
|
|
1081
|
+
value: c,
|
|
1082
|
+
id: i,
|
|
1083
1083
|
...p
|
|
1084
1084
|
}) {
|
|
1085
|
-
const f =
|
|
1085
|
+
const f = i || `radio-${A.useId()}`, d = [
|
|
1086
1086
|
"ds-radio",
|
|
1087
1087
|
`ds-radio--${r}`,
|
|
1088
1088
|
l && "ds-radio--disabled"
|
|
@@ -1098,7 +1098,7 @@ function lt({
|
|
|
1098
1098
|
onChange: (u) => e == null ? void 0 : e(u.target.checked),
|
|
1099
1099
|
disabled: l,
|
|
1100
1100
|
name: a,
|
|
1101
|
-
value:
|
|
1101
|
+
value: c,
|
|
1102
1102
|
...p
|
|
1103
1103
|
}
|
|
1104
1104
|
),
|
|
@@ -1128,7 +1128,7 @@ function it({ width: t, height: e, shape: r = "rect", className: l = "", style:
|
|
|
1128
1128
|
}
|
|
1129
1129
|
);
|
|
1130
1130
|
}
|
|
1131
|
-
function
|
|
1131
|
+
function ge(t) {
|
|
1132
1132
|
let e = 2166136261;
|
|
1133
1133
|
for (let r = 0; r < t.length; r++)
|
|
1134
1134
|
e ^= t.charCodeAt(r), e = Math.imul(e, 16777619) >>> 0;
|
|
@@ -1139,15 +1139,15 @@ function Ie(t) {
|
|
|
1139
1139
|
const e = t.trim().split(/\s+/);
|
|
1140
1140
|
return e.length >= 2 ? (e[0][0] + e[1][0]).toUpperCase() : t[0].toUpperCase();
|
|
1141
1141
|
}
|
|
1142
|
-
function dt({ seed: t, icon: e, src: r, size: l = 32, className: n = "", style: a = {}, ...
|
|
1143
|
-
const
|
|
1142
|
+
function dt({ seed: t, icon: e, src: r, size: l = 32, className: n = "", style: a = {}, ...c }) {
|
|
1143
|
+
const i = ge(t ?? ""), [p, f] = T(!1), d = e ?? /* @__PURE__ */ s.jsx("span", { className: "ds-avatar__initials", children: Ie(t) });
|
|
1144
1144
|
return /* @__PURE__ */ s.jsx(
|
|
1145
1145
|
"div",
|
|
1146
1146
|
{
|
|
1147
1147
|
className: ["ds-avatar", n].filter(Boolean).join(" "),
|
|
1148
|
-
style: { width: l, height: l, "--ds-avatar-h":
|
|
1148
|
+
style: { width: l, height: l, "--ds-avatar-h": i, ...a },
|
|
1149
1149
|
"aria-hidden": "true",
|
|
1150
|
-
...
|
|
1150
|
+
...c,
|
|
1151
1151
|
children: r && !p ? /* @__PURE__ */ s.jsx("img", { src: r, alt: "", onError: () => f(!0) }) : d
|
|
1152
1152
|
}
|
|
1153
1153
|
);
|
|
@@ -1159,9 +1159,9 @@ function ut({
|
|
|
1159
1159
|
maxHeight: l,
|
|
1160
1160
|
className: n = "",
|
|
1161
1161
|
style: a = {},
|
|
1162
|
-
...
|
|
1162
|
+
...c
|
|
1163
1163
|
}) {
|
|
1164
|
-
const
|
|
1164
|
+
const i = {
|
|
1165
1165
|
...l ? { maxHeight: l } : {},
|
|
1166
1166
|
...r !== void 0 ? { "--ds-table-sticky-top": typeof r == "number" ? `${r}px` : r } : {},
|
|
1167
1167
|
...a
|
|
@@ -1170,12 +1170,12 @@ function ut({
|
|
|
1170
1170
|
"div",
|
|
1171
1171
|
{
|
|
1172
1172
|
className: ["ds-table-wrap", l ? "ds-table-wrap--scroll" : ""].filter(Boolean).join(" "),
|
|
1173
|
-
style:
|
|
1173
|
+
style: i,
|
|
1174
1174
|
children: /* @__PURE__ */ s.jsx(
|
|
1175
1175
|
"table",
|
|
1176
1176
|
{
|
|
1177
1177
|
className: ["ds-table", `ds-table--${e}`, n].filter(Boolean).join(" "),
|
|
1178
|
-
...
|
|
1178
|
+
...c,
|
|
1179
1179
|
children: t
|
|
1180
1180
|
}
|
|
1181
1181
|
)
|
|
@@ -1188,23 +1188,27 @@ function ft({ children: t, ...e }) {
|
|
|
1188
1188
|
function mt({ children: t, ...e }) {
|
|
1189
1189
|
return /* @__PURE__ */ s.jsx("tbody", { ...e, children: t });
|
|
1190
1190
|
}
|
|
1191
|
-
function pt({ children: t, interactive: e, selected: r,
|
|
1191
|
+
function pt({ children: t, interactive: e, selected: r, subheader: l, className: n = "", onClick: a, ...c }) {
|
|
1192
1192
|
return /* @__PURE__ */ s.jsx(
|
|
1193
1193
|
"tr",
|
|
1194
1194
|
{
|
|
1195
1195
|
className: [
|
|
1196
1196
|
"ds-table-row",
|
|
1197
|
-
e ||
|
|
1197
|
+
e || a ? "ds-table-row--interactive" : "",
|
|
1198
1198
|
r ? "ds-table-row--selected" : "",
|
|
1199
|
-
l
|
|
1199
|
+
l ? "ds-table-row--subheader" : "",
|
|
1200
|
+
n
|
|
1200
1201
|
].filter(Boolean).join(" "),
|
|
1201
|
-
onClick:
|
|
1202
|
-
...
|
|
1202
|
+
onClick: a,
|
|
1203
|
+
...c,
|
|
1203
1204
|
children: t
|
|
1204
1205
|
}
|
|
1205
1206
|
);
|
|
1206
1207
|
}
|
|
1207
|
-
function bt({ children: t,
|
|
1208
|
+
function bt({ children: t, colSpan: e = 999, ...r }) {
|
|
1209
|
+
return /* @__PURE__ */ s.jsx("tr", { className: "ds-table-row ds-table-row--subheader", ...r, children: /* @__PURE__ */ s.jsx("td", { colSpan: e, children: t }) });
|
|
1210
|
+
}
|
|
1211
|
+
function ht({ children: t, align: e = "left", sortDir: r, onSort: l, width: n, className: a = "", style: c = {}, ...i }) {
|
|
1208
1212
|
const p = !!l || r !== void 0, f = r === "asc" ? we : r === "desc" ? K : Ne;
|
|
1209
1213
|
return /* @__PURE__ */ s.jsx(
|
|
1210
1214
|
"th",
|
|
@@ -1217,8 +1221,8 @@ function bt({ children: t, align: e = "left", sortDir: r, onSort: l, width: n, c
|
|
|
1217
1221
|
a
|
|
1218
1222
|
].filter(Boolean).join(" "),
|
|
1219
1223
|
onClick: l,
|
|
1220
|
-
style: { width: n, ...
|
|
1221
|
-
...
|
|
1224
|
+
style: { width: n, ...c },
|
|
1225
|
+
...i,
|
|
1222
1226
|
children: p ? /* @__PURE__ */ s.jsxs("span", { className: "ds-th__inner", children: [
|
|
1223
1227
|
t,
|
|
1224
1228
|
/* @__PURE__ */ s.jsx("span", { className: "ds-th__sort-icon", children: /* @__PURE__ */ s.jsx(f, { size: 11, strokeWidth: 2.5 }) })
|
|
@@ -1226,7 +1230,7 @@ function bt({ children: t, align: e = "left", sortDir: r, onSort: l, width: n, c
|
|
|
1226
1230
|
}
|
|
1227
1231
|
);
|
|
1228
1232
|
}
|
|
1229
|
-
function
|
|
1233
|
+
function xt({ children: t, align: e = "left", secondary: r, muted: l, truncate: n, nowrap: a, className: c = "", ...i }) {
|
|
1230
1234
|
return /* @__PURE__ */ s.jsx(
|
|
1231
1235
|
"td",
|
|
1232
1236
|
{
|
|
@@ -1237,27 +1241,27 @@ function ht({ children: t, align: e = "left", secondary: r, muted: l, truncate:
|
|
|
1237
1241
|
l ? "ds-table-cell--muted" : "",
|
|
1238
1242
|
n ? "ds-table-cell--truncate" : "",
|
|
1239
1243
|
a ? "ds-table-cell--nowrap" : "",
|
|
1240
|
-
|
|
1244
|
+
c
|
|
1241
1245
|
].filter(Boolean).join(" "),
|
|
1242
|
-
...
|
|
1246
|
+
...i,
|
|
1243
1247
|
children: t
|
|
1244
1248
|
}
|
|
1245
1249
|
);
|
|
1246
1250
|
}
|
|
1247
|
-
function
|
|
1251
|
+
function vt({
|
|
1248
1252
|
icon: t,
|
|
1249
1253
|
title: e,
|
|
1250
1254
|
description: r,
|
|
1251
1255
|
action: l,
|
|
1252
1256
|
size: n = "m",
|
|
1253
1257
|
className: a = "",
|
|
1254
|
-
...
|
|
1258
|
+
...c
|
|
1255
1259
|
}) {
|
|
1256
1260
|
return /* @__PURE__ */ s.jsxs(
|
|
1257
1261
|
"div",
|
|
1258
1262
|
{
|
|
1259
1263
|
className: ["ds-empty-state", `ds-empty-state--${n}`, a].filter(Boolean).join(" "),
|
|
1260
|
-
...
|
|
1264
|
+
...c,
|
|
1261
1265
|
children: [
|
|
1262
1266
|
t && /* @__PURE__ */ s.jsx("div", { className: "ds-empty-state__icon", children: t }),
|
|
1263
1267
|
/* @__PURE__ */ s.jsx("div", { className: "ds-empty-state__title", children: e }),
|
|
@@ -1267,15 +1271,15 @@ function xt({
|
|
|
1267
1271
|
}
|
|
1268
1272
|
);
|
|
1269
1273
|
}
|
|
1270
|
-
function
|
|
1274
|
+
function jt({
|
|
1271
1275
|
trigger: t,
|
|
1272
1276
|
items: e = [],
|
|
1273
1277
|
open: r,
|
|
1274
1278
|
onOpenChange: l,
|
|
1275
1279
|
align: n = "left",
|
|
1276
1280
|
className: a = "",
|
|
1277
|
-
style:
|
|
1278
|
-
...
|
|
1281
|
+
style: c,
|
|
1282
|
+
...i
|
|
1279
1283
|
}) {
|
|
1280
1284
|
const [p, f] = T(!1), d = r !== void 0, u = d ? r : p, x = L(null), b = L(null), [j, v] = T({}), k = () => {
|
|
1281
1285
|
d ? l == null || l(!1) : f(!1);
|
|
@@ -1307,7 +1311,7 @@ function vt({
|
|
|
1307
1311
|
document.removeEventListener("mousedown", m), document.removeEventListener("keydown", _);
|
|
1308
1312
|
};
|
|
1309
1313
|
}, [u]);
|
|
1310
|
-
const
|
|
1314
|
+
const g = u && /* @__PURE__ */ s.jsx(
|
|
1311
1315
|
"div",
|
|
1312
1316
|
{
|
|
1313
1317
|
ref: b,
|
|
@@ -1350,11 +1354,11 @@ function vt({
|
|
|
1350
1354
|
{
|
|
1351
1355
|
ref: x,
|
|
1352
1356
|
className: ["ds-dropdown", a].filter(Boolean).join(" "),
|
|
1353
|
-
style:
|
|
1354
|
-
...
|
|
1357
|
+
style: c,
|
|
1358
|
+
...i,
|
|
1355
1359
|
children: [
|
|
1356
1360
|
/* @__PURE__ */ s.jsx("div", { className: "ds-dropdown__trigger", onClick: $, children: t }),
|
|
1357
|
-
typeof document < "u" && J.createPortal(
|
|
1361
|
+
typeof document < "u" && J.createPortal(g, document.body)
|
|
1358
1362
|
]
|
|
1359
1363
|
}
|
|
1360
1364
|
);
|
|
@@ -1376,7 +1380,7 @@ function Ae(t) {
|
|
|
1376
1380
|
function Pe(t) {
|
|
1377
1381
|
V = V.filter((e) => e.id !== t), he();
|
|
1378
1382
|
}
|
|
1379
|
-
function
|
|
1383
|
+
function _t() {
|
|
1380
1384
|
const t = (e, r = {}) => {
|
|
1381
1385
|
Ae({
|
|
1382
1386
|
id: `${Date.now()}-${Math.random()}`,
|
|
@@ -1394,7 +1398,7 @@ function Oe({ data: t, onDismiss: e }) {
|
|
|
1394
1398
|
function a() {
|
|
1395
1399
|
l(!1), setTimeout(() => e(t.id), 250);
|
|
1396
1400
|
}
|
|
1397
|
-
const
|
|
1401
|
+
const c = ue[t.type] ?? ue.default;
|
|
1398
1402
|
return /* @__PURE__ */ s.jsxs(
|
|
1399
1403
|
"div",
|
|
1400
1404
|
{
|
|
@@ -1406,7 +1410,7 @@ function Oe({ data: t, onDismiss: e }) {
|
|
|
1406
1410
|
role: t.type === "error" ? "alert" : "status",
|
|
1407
1411
|
"aria-live": "polite",
|
|
1408
1412
|
children: [
|
|
1409
|
-
/* @__PURE__ */ s.jsx("div", { className: "ds-toast__icon", children: /* @__PURE__ */ s.jsx(
|
|
1413
|
+
/* @__PURE__ */ s.jsx("div", { className: "ds-toast__icon", children: /* @__PURE__ */ s.jsx(c, { size: S[3], strokeWidth: 1.5 }) }),
|
|
1410
1414
|
/* @__PURE__ */ s.jsx("span", { className: "ds-toast__message", children: t.message }),
|
|
1411
1415
|
/* @__PURE__ */ s.jsx(
|
|
1412
1416
|
"button",
|
|
@@ -1414,14 +1418,14 @@ function Oe({ data: t, onDismiss: e }) {
|
|
|
1414
1418
|
className: "ds-toast__close",
|
|
1415
1419
|
onClick: a,
|
|
1416
1420
|
"aria-label": "Закрыть",
|
|
1417
|
-
children: /* @__PURE__ */ s.jsx(se, { size:
|
|
1421
|
+
children: /* @__PURE__ */ s.jsx(se, { size: S[3], strokeWidth: 1.5 })
|
|
1418
1422
|
}
|
|
1419
1423
|
)
|
|
1420
1424
|
]
|
|
1421
1425
|
}
|
|
1422
1426
|
);
|
|
1423
1427
|
}
|
|
1424
|
-
function
|
|
1428
|
+
function wt({ position: t = "bottom-right" }) {
|
|
1425
1429
|
const [e, r] = T(() => [...V]);
|
|
1426
1430
|
return B(() => (te.add(r), () => te.delete(r)), []), !e.length || typeof document > "u" ? null : J.createPortal(
|
|
1427
1431
|
/* @__PURE__ */ s.jsx("div", { className: ["ds-toast-container", `ds-toast-container--${t}`].join(" "), children: e.map((l) => /* @__PURE__ */ s.jsx(Oe, { data: l, onDismiss: Pe }, l.id)) }),
|
|
@@ -1438,8 +1442,8 @@ export {
|
|
|
1438
1442
|
ot as Checkbox,
|
|
1439
1443
|
Qe as Code,
|
|
1440
1444
|
Re as CodeAccordion,
|
|
1441
|
-
|
|
1442
|
-
|
|
1445
|
+
jt as Dropdown,
|
|
1446
|
+
vt as EmptyState,
|
|
1443
1447
|
Ve as H1,
|
|
1444
1448
|
Ue as H2,
|
|
1445
1449
|
He as H3,
|
|
@@ -1461,13 +1465,14 @@ export {
|
|
|
1461
1465
|
mt as TableBody,
|
|
1462
1466
|
ft as TableHead,
|
|
1463
1467
|
pt as TableRow,
|
|
1468
|
+
bt as TableSubheaderRow,
|
|
1464
1469
|
tt as Tabs,
|
|
1465
|
-
|
|
1470
|
+
xt as Td,
|
|
1466
1471
|
Fe as Textarea,
|
|
1467
|
-
|
|
1468
|
-
|
|
1472
|
+
ht as Th,
|
|
1473
|
+
wt as ToastContainer,
|
|
1469
1474
|
at as Toggle,
|
|
1470
1475
|
nt as Tooltip,
|
|
1471
|
-
|
|
1472
|
-
|
|
1476
|
+
S as iconSizes,
|
|
1477
|
+
_t as useToast
|
|
1473
1478
|
};
|