@donkit-ai/design-system 1.0.5 → 1.0.7

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.es.js CHANGED
@@ -1,7 +1,7 @@
1
- import A, { useState as I, useRef as L, useEffect as B } from "react";
1
+ import A, { useState as T, useRef as L, useEffect as B } from "react";
2
2
  import C 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 T = {
4
+ const S = {
5
5
  1: 16,
6
6
  2: 20,
7
7
  3: 24,
@@ -22,23 +22,23 @@ var le;
22
22
  function ye() {
23
23
  if (le) return G;
24
24
  le = 1;
25
- var t = Symbol.for("react.transitional.element"), e = Symbol.for("react.fragment");
26
- function s(c, n, a) {
27
- var l = null;
28
- if (a !== void 0 && (l = "" + a), n.key !== void 0 && (l = "" + n.key), "key" in n) {
25
+ var s = Symbol.for("react.transitional.element"), e = Symbol.for("react.fragment");
26
+ function r(c, n, a) {
27
+ var i = null;
28
+ if (a !== void 0 && (i = "" + a), n.key !== void 0 && (i = "" + n.key), "key" in n) {
29
29
  a = {};
30
- for (var i in n)
31
- i !== "key" && (a[i] = n[i]);
30
+ for (var l in n)
31
+ l !== "key" && (a[l] = n[l]);
32
32
  } else a = n;
33
33
  return n = a.ref, {
34
- $$typeof: t,
34
+ $$typeof: s,
35
35
  type: c,
36
- key: l,
36
+ key: i,
37
37
  ref: n !== void 0 ? n : null,
38
38
  props: a
39
39
  };
40
40
  }
41
- return G.Fragment = e, G.jsx = s, G.jsxs = s, G;
41
+ return G.Fragment = e, G.jsx = r, G.jsxs = r, G;
42
42
  }
43
43
  var q = {};
44
44
  /**
@@ -53,7 +53,7 @@ var q = {};
53
53
  var ie;
54
54
  function Ee() {
55
55
  return ie || (ie = 1, process.env.NODE_ENV !== "production" && function() {
56
- function t(o) {
56
+ function s(o) {
57
57
  if (o == null) return null;
58
58
  if (typeof o == "function")
59
59
  return o.$$typeof === D ? null : o.displayName || o.name || null;
@@ -61,11 +61,11 @@ function Ee() {
61
61
  switch (o) {
62
62
  case k:
63
63
  return "Fragment";
64
- case S:
64
+ case g:
65
65
  return "Profiler";
66
66
  case $:
67
67
  return "StrictMode";
68
- case g:
68
+ case I:
69
69
  return "Suspense";
70
70
  case P:
71
71
  return "SuspenseList";
@@ -86,11 +86,11 @@ function Ee() {
86
86
  var h = o.render;
87
87
  return o = o.displayName, o || (o = h.displayName || h.name || "", o = o !== "" ? "ForwardRef(" + o + ")" : "ForwardRef"), o;
88
88
  case M:
89
- return h = o.displayName || null, h !== null ? h : t(o.type) || "Memo";
89
+ return h = o.displayName || null, h !== null ? h : s(o.type) || "Memo";
90
90
  case U:
91
91
  h = o._payload, o = o._init;
92
92
  try {
93
- return t(o(h));
93
+ return s(o(h));
94
94
  } catch {
95
95
  }
96
96
  }
@@ -99,7 +99,7 @@ function Ee() {
99
99
  function e(o) {
100
100
  return "" + o;
101
101
  }
102
- function s(o) {
102
+ function r(o) {
103
103
  try {
104
104
  e(o);
105
105
  var h = !1;
@@ -121,7 +121,7 @@ function Ee() {
121
121
  if (typeof o == "object" && o !== null && o.$$typeof === U)
122
122
  return "<...>";
123
123
  try {
124
- var h = t(o);
124
+ var h = s(o);
125
125
  return h ? "<" + h + ">" : "<...>";
126
126
  } catch {
127
127
  return "<...>";
@@ -134,14 +134,14 @@ function Ee() {
134
134
  function a() {
135
135
  return Error("react-stack-top-frame");
136
136
  }
137
- function l(o) {
137
+ function i(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 i(o, h) {
144
+ function l(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)",
@@ -154,7 +154,7 @@ function Ee() {
154
154
  });
155
155
  }
156
156
  function p() {
157
- var o = t(this.type);
157
+ var o = s(this.type);
158
158
  return ne[o] || (ne[o] = !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
  )), o = this.props.ref, o !== void 0 ? o : null;
@@ -206,7 +206,7 @@ function Ee() {
206
206
  );
207
207
  else u(E);
208
208
  if (X.call(h, "key")) {
209
- E = t(o);
209
+ E = s(o);
210
210
  var Y = Object.keys(h).filter(function(xe) {
211
211
  return xe !== "key";
212
212
  });
@@ -223,12 +223,12 @@ React keys must be passed directly to JSX without using spread:
223
223
  E
224
224
  ), ce[E + y] = !0);
225
225
  }
226
- if (E = null, N !== void 0 && (s(N), E = "" + N), l(h) && (s(h.key), E = "" + h.key), "key" in h) {
226
+ if (E = null, N !== void 0 && (r(N), E = "" + N), i(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 && i(
231
+ return E && l(
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"), S = Symbol.for("react.profiler"), m = Symbol.for("react.consumer"), _ = Symbol.for("react.context"), R = Symbol.for("react.forward_ref"), g = 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() {
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 = {
@@ -282,30 +282,30 @@ React keys must be passed directly to JSX without using spread:
282
282
  }()), q;
283
283
  }
284
284
  process.env.NODE_ENV === "production" ? ee.exports = ye() : ee.exports = Ee();
285
- var r = ee.exports;
285
+ var t = ee.exports;
286
286
  function ke({
287
- children: t,
287
+ children: s,
288
288
  variant: e = "primary",
289
- size: s = "m",
289
+ size: r = "m",
290
290
  fullWidth: c = !1,
291
291
  icon: n,
292
292
  disabled: a = !1,
293
- onClick: l,
294
- type: i = "button",
293
+ onClick: i,
294
+ type: l = "button",
295
295
  href: p,
296
296
  "aria-label": f,
297
297
  ...d
298
298
  }) {
299
- const u = n && !t, x = [
299
+ const u = n && !s, x = [
300
300
  "ds-button",
301
301
  `ds-button--${e}`,
302
- `ds-button--${s}`,
302
+ `ds-button--${r}`,
303
303
  c && "ds-button--full",
304
304
  u && "ds-button--icon-only"
305
- ].filter(Boolean).join(" "), b = /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
306
- n && !u && /* @__PURE__ */ r.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: n }),
307
- t,
308
- u && /* @__PURE__ */ r.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: n })
305
+ ].filter(Boolean).join(" "), b = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
306
+ n && !u && /* @__PURE__ */ t.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: n }),
307
+ s,
308
+ u && /* @__PURE__ */ t.jsx("span", { className: "ds-button__icon", "aria-hidden": "true", children: n })
309
309
  ] });
310
310
  if (p) {
311
311
  const j = (v) => {
@@ -313,9 +313,9 @@ function ke({
313
313
  v.preventDefault();
314
314
  return;
315
315
  }
316
- v.metaKey || v.ctrlKey || v.button === 1 || (v.preventDefault(), l == null || l(v));
316
+ v.metaKey || v.ctrlKey || v.button === 1 || (v.preventDefault(), i == null || i(v));
317
317
  };
318
- return /* @__PURE__ */ r.jsx(
318
+ return /* @__PURE__ */ t.jsx(
319
319
  "a",
320
320
  {
321
321
  className: x,
@@ -328,13 +328,13 @@ function ke({
328
328
  }
329
329
  );
330
330
  }
331
- return /* @__PURE__ */ r.jsx(
331
+ return /* @__PURE__ */ t.jsx(
332
332
  "button",
333
333
  {
334
- type: i,
334
+ type: l,
335
335
  className: x,
336
336
  disabled: a,
337
- onClick: l,
337
+ onClick: i,
338
338
  "aria-label": f,
339
339
  ...d,
340
340
  children: b
@@ -342,70 +342,70 @@ function ke({
342
342
  );
343
343
  }
344
344
  function De({
345
- label: t,
345
+ label: s,
346
346
  error: e,
347
- hint: s,
347
+ hint: r,
348
348
  fullWidth: c = !0,
349
349
  icon: n,
350
350
  iconRight: a,
351
- onIconRightClick: l,
352
- size: i = "m",
351
+ onIconRightClick: i,
352
+ size: l = "m",
353
353
  disabled: p,
354
354
  id: f,
355
355
  ...d
356
356
  }) {
357
- const u = f || `input-${A.useId()}`, x = s ? `${u}-hint` : void 0, b = e ? `${u}-error` : void 0, j = b || x;
358
- return /* @__PURE__ */ r.jsxs("div", { className: `ds-input-wrapper ${c ? "ds-input-wrapper--full" : ""} ${p ? "ds-input-wrapper--disabled" : ""}`, children: [
359
- t && /* @__PURE__ */ r.jsx("label", { className: "ds-input-label", htmlFor: u, children: t }),
360
- /* @__PURE__ */ r.jsxs("div", { className: "ds-input-container", children: [
361
- n && /* @__PURE__ */ r.jsx("span", { className: `ds-input-icon ds-input-icon--${i}`, "aria-hidden": "true", children: n }),
362
- /* @__PURE__ */ r.jsx(
357
+ const u = f || `input-${A.useId()}`, x = r ? `${u}-hint` : void 0, b = e ? `${u}-error` : void 0, j = b || x;
358
+ return /* @__PURE__ */ t.jsxs("div", { className: `ds-input-wrapper ${c ? "ds-input-wrapper--full" : ""} ${p ? "ds-input-wrapper--disabled" : ""}`, children: [
359
+ s && /* @__PURE__ */ t.jsx("label", { className: "ds-input-label", htmlFor: u, children: s }),
360
+ /* @__PURE__ */ t.jsxs("div", { className: "ds-input-container", children: [
361
+ n && /* @__PURE__ */ t.jsx("span", { className: `ds-input-icon ds-input-icon--${l}`, "aria-hidden": "true", children: n }),
362
+ /* @__PURE__ */ t.jsx(
363
363
  "input",
364
364
  {
365
365
  id: u,
366
- className: `ds-input ds-input--${i} ${n ? "ds-input--with-icon" : ""} ${a ? "ds-input--with-icon-right" : ""} ${e ? "ds-input--error" : ""}`,
366
+ className: `ds-input ds-input--${l} ${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,
370
370
  ...d
371
371
  }
372
372
  ),
373
- a && /* @__PURE__ */ r.jsx(
373
+ a && /* @__PURE__ */ t.jsx(
374
374
  "button",
375
375
  {
376
376
  type: "button",
377
- className: `ds-input-icon-right ds-input-icon-right--${i}`,
378
- onClick: l,
377
+ className: `ds-input-icon-right ds-input-icon-right--${l}`,
378
+ onClick: i,
379
379
  tabIndex: -1,
380
380
  "aria-label": "Toggle visibility",
381
381
  children: a
382
382
  }
383
383
  )
384
384
  ] }),
385
- s && !e && /* @__PURE__ */ r.jsx("span", { id: x, className: "ds-input-hint", children: s }),
386
- e && /* @__PURE__ */ r.jsx("span", { id: b, className: "ds-input-error", role: "alert", children: e })
385
+ r && !e && /* @__PURE__ */ t.jsx("span", { id: x, className: "ds-input-hint", children: r }),
386
+ e && /* @__PURE__ */ t.jsx("span", { id: b, className: "ds-input-error", role: "alert", children: e })
387
387
  ] });
388
388
  }
389
389
  function Me({
390
- label: t,
390
+ label: s,
391
391
  error: e,
392
- hint: s,
392
+ hint: r,
393
393
  fullWidth: c = !0,
394
394
  size: n = "m",
395
395
  disabled: a,
396
- id: l,
397
- resize: i = !0,
396
+ id: i,
397
+ resize: l = !0,
398
398
  rows: p = 3,
399
399
  ...f
400
400
  }) {
401
- const d = l || `textarea-${A.useId()}`, u = s ? `${d}-hint` : void 0, x = e ? `${d}-error` : void 0, b = x || u;
402
- return /* @__PURE__ */ r.jsxs("div", { className: `ds-textarea-wrapper ${c ? "ds-textarea-wrapper--full" : ""} ${a ? "ds-textarea-wrapper--disabled" : ""}`, children: [
403
- t && /* @__PURE__ */ r.jsx("label", { className: "ds-textarea-label", htmlFor: d, children: t }),
404
- /* @__PURE__ */ r.jsx(
401
+ const d = i || `textarea-${A.useId()}`, u = r ? `${d}-hint` : void 0, x = e ? `${d}-error` : void 0, b = x || u;
402
+ return /* @__PURE__ */ t.jsxs("div", { className: `ds-textarea-wrapper ${c ? "ds-textarea-wrapper--full" : ""} ${a ? "ds-textarea-wrapper--disabled" : ""}`, children: [
403
+ s && /* @__PURE__ */ t.jsx("label", { className: "ds-textarea-label", htmlFor: d, children: s }),
404
+ /* @__PURE__ */ t.jsx(
405
405
  "textarea",
406
406
  {
407
407
  id: d,
408
- className: `ds-textarea ds-textarea--${n} ${e ? "ds-textarea--error" : ""} ${i ? "" : "ds-textarea--no-resize"}`,
408
+ className: `ds-textarea ds-textarea--${n} ${e ? "ds-textarea--error" : ""} ${l ? "" : "ds-textarea--no-resize"}`,
409
409
  disabled: a,
410
410
  "aria-invalid": e ? "true" : "false",
411
411
  "aria-describedby": b,
@@ -413,24 +413,24 @@ function Me({
413
413
  ...f
414
414
  }
415
415
  ),
416
- s && !e && /* @__PURE__ */ r.jsx("span", { id: u, className: "ds-textarea-hint", children: s }),
417
- e && /* @__PURE__ */ r.jsx("span", { id: x, className: "ds-textarea-error", role: "alert", children: e })
416
+ r && !e && /* @__PURE__ */ t.jsx("span", { id: u, className: "ds-textarea-hint", children: r }),
417
+ e && /* @__PURE__ */ t.jsx("span", { id: x, className: "ds-textarea-error", role: "alert", children: e })
418
418
  ] });
419
419
  }
420
420
  function Fe({
421
- label: t,
421
+ label: s,
422
422
  value: e,
423
- onChange: s,
423
+ onChange: r,
424
424
  options: c = [],
425
425
  placeholder: n = "Select option",
426
426
  error: a,
427
- fullWidth: l = !0,
428
- size: i = "m",
427
+ fullWidth: i = !0,
428
+ size: l = "m",
429
429
  disabled: p = !1,
430
430
  id: f,
431
431
  ...d
432
432
  }) {
433
- const [u, x] = I(!1), [b, j] = I({}), [v, k] = I("down"), $ = L(null), S = L(null), m = f || `select-${A.useId()}`, _ = `${m}-label`, R = a ? `${m}-error` : void 0, g = () => {
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;
@@ -441,32 +441,32 @@ function Fe({
441
441
  };
442
442
  B(() => {
443
443
  if (u)
444
- return g(), window.addEventListener("scroll", g, !0), window.addEventListener("resize", g), () => {
445
- window.removeEventListener("scroll", g, !0), window.removeEventListener("resize", g);
444
+ return I(), window.addEventListener("scroll", I, !0), window.addEventListener("resize", I), () => {
445
+ window.removeEventListener("scroll", I, !0), window.removeEventListener("resize", I);
446
446
  };
447
447
  }, [u]), B(() => {
448
448
  const w = (D) => {
449
- $.current && !$.current.contains(D.target) && S.current && !S.current.contains(D.target) && x(!1);
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 = c.find((w) => w.value === e), M = i === "xs" ? T[1] : i === "small" ? T[2] : T[3], U = u && /* @__PURE__ */ r.jsx(
453
+ const P = c.find((w) => w.value === e), M = l === "xs" ? S[1] : l === "small" ? S[2] : S[3], U = u && /* @__PURE__ */ t.jsx(
454
454
  "div",
455
455
  {
456
- ref: S,
456
+ ref: g,
457
457
  role: "listbox",
458
- "aria-labelledby": t ? _ : void 0,
459
- className: `ds-select-dropdown ds-select-dropdown--${i} ds-select-dropdown--${v}`,
458
+ "aria-labelledby": s ? _ : void 0,
459
+ className: `ds-select-dropdown ds-select-dropdown--${l} ds-select-dropdown--${v}`,
460
460
  style: b,
461
- children: c.map((w) => /* @__PURE__ */ r.jsx(
461
+ children: c.map((w) => /* @__PURE__ */ t.jsx(
462
462
  "button",
463
463
  {
464
464
  type: "button",
465
465
  role: "option",
466
466
  "aria-selected": e === w.value,
467
- className: `ds-select-option ds-select-option--${i} ${e === w.value ? "ds-select-option--selected" : ""}`,
467
+ className: `ds-select-option ds-select-option--${l} ${e === w.value ? "ds-select-option--selected" : ""}`,
468
468
  onClick: () => {
469
- s == null || s(w.value), x(!1);
469
+ r == null || r(w.value), x(!1);
470
470
  },
471
471
  children: w.label
472
472
  },
@@ -474,9 +474,9 @@ function Fe({
474
474
  ))
475
475
  }
476
476
  );
477
- return /* @__PURE__ */ r.jsxs("div", { className: `ds-select-wrapper ${l ? "ds-select-wrapper--full" : ""} ${p ? "ds-select-wrapper--disabled" : ""}`, children: [
478
- t && /* @__PURE__ */ r.jsx("label", { id: _, className: "ds-select-label", children: t }),
479
- /* @__PURE__ */ r.jsx("div", { className: "ds-select-container", ref: $, children: /* @__PURE__ */ r.jsxs(
477
+ return /* @__PURE__ */ t.jsxs("div", { className: `ds-select-wrapper ${i ? "ds-select-wrapper--full" : ""} ${p ? "ds-select-wrapper--disabled" : ""}`, children: [
478
+ s && /* @__PURE__ */ t.jsx("label", { id: _, className: "ds-select-label", children: s }),
479
+ /* @__PURE__ */ t.jsx("div", { className: "ds-select-container", ref: $, children: /* @__PURE__ */ t.jsxs(
480
480
  "button",
481
481
  {
482
482
  type: "button",
@@ -484,16 +484,16 @@ function Fe({
484
484
  role: "combobox",
485
485
  "aria-haspopup": "listbox",
486
486
  "aria-expanded": u,
487
- "aria-labelledby": t ? _ : void 0,
487
+ "aria-labelledby": s ? _ : void 0,
488
488
  "aria-invalid": a ? "true" : "false",
489
489
  "aria-describedby": R,
490
- className: `ds-select-trigger ds-select-trigger--${i} ${a ? "ds-select-trigger--error" : ""}`,
490
+ className: `ds-select-trigger ds-select-trigger--${l} ${a ? "ds-select-trigger--error" : ""}`,
491
491
  onClick: () => !p && x(!u),
492
492
  disabled: p,
493
493
  ...d,
494
494
  children: [
495
- /* @__PURE__ */ r.jsx("span", { className: P ? "" : "ds-select-placeholder", children: (P == null ? void 0 : P.label) || n }),
496
- /* @__PURE__ */ r.jsx(
495
+ /* @__PURE__ */ t.jsx("span", { className: P ? "" : "ds-select-placeholder", children: (P == null ? void 0 : P.label) || n }),
496
+ /* @__PURE__ */ t.jsx(
497
497
  K,
498
498
  {
499
499
  size: M,
@@ -505,67 +505,67 @@ function Fe({
505
505
  ]
506
506
  }
507
507
  ) }),
508
- a && /* @__PURE__ */ r.jsx("span", { id: R, className: "ds-select-error", role: "alert", children: a }),
508
+ a && /* @__PURE__ */ t.jsx("span", { id: R, className: "ds-select-error", role: "alert", children: a }),
509
509
  typeof document < "u" && C.createPortal(U, document.body)
510
510
  ] });
511
511
  }
512
512
  function We({
513
- label: t,
513
+ label: s,
514
514
  value: e = 0,
515
- onChange: s,
515
+ onChange: r,
516
516
  min: c = 0,
517
517
  max: n = 100,
518
518
  step: a = 1,
519
- size: l = "m",
520
- disabled: i = !1,
519
+ size: i = "m",
520
+ disabled: l = !1,
521
521
  hint: p,
522
522
  error: f,
523
523
  ...d
524
524
  }) {
525
525
  const u = () => {
526
- if (i) return;
526
+ if (l) return;
527
527
  const $ = Math.min(Number(e) + a, n);
528
- s == null || s($);
528
+ r == null || r($);
529
529
  }, x = () => {
530
- if (i) return;
530
+ if (l) return;
531
531
  const $ = Math.max(Number(e) - a, c);
532
- s == null || s($);
532
+ r == null || r($);
533
533
  }, b = ($) => {
534
- if (i) return;
535
- const S = $.target.value;
536
- if (S === "") {
537
- s == null || s(c);
534
+ if (l) return;
535
+ const g = $.target.value;
536
+ if (g === "") {
537
+ r == null || r(c);
538
538
  return;
539
539
  }
540
- const m = Number(S);
540
+ const m = Number(g);
541
541
  if (!isNaN(m)) {
542
542
  const _ = Math.min(Math.max(m, c), n);
543
- s == null || s(_);
543
+ r == null || r(_);
544
544
  }
545
545
  }, j = [
546
546
  "ds-stepper-wrapper",
547
- i && "ds-stepper-wrapper--disabled",
547
+ l && "ds-stepper-wrapper--disabled",
548
548
  f && "ds-stepper-wrapper--error"
549
549
  ].filter(Boolean).join(" "), v = [
550
550
  "ds-stepper",
551
- `ds-stepper--${l}`,
552
- i && "ds-stepper--disabled"
553
- ].filter(Boolean).join(" "), k = l === "xs" ? T[1] : l === "small" ? T[2] : T[3];
554
- return /* @__PURE__ */ r.jsxs("div", { className: j, children: [
555
- t && /* @__PURE__ */ r.jsx("label", { className: "ds-stepper-label", children: t }),
556
- /* @__PURE__ */ r.jsxs("div", { className: v, children: [
557
- /* @__PURE__ */ r.jsx(
551
+ `ds-stepper--${i}`,
552
+ l && "ds-stepper--disabled"
553
+ ].filter(Boolean).join(" "), k = i === "xs" ? S[1] : i === "small" ? S[2] : S[3];
554
+ return /* @__PURE__ */ t.jsxs("div", { className: j, children: [
555
+ s && /* @__PURE__ */ t.jsx("label", { className: "ds-stepper-label", children: s }),
556
+ /* @__PURE__ */ t.jsxs("div", { className: v, children: [
557
+ /* @__PURE__ */ t.jsx(
558
558
  "button",
559
559
  {
560
560
  type: "button",
561
561
  className: "ds-stepper-button ds-stepper-button--minus",
562
562
  onClick: x,
563
- disabled: i || e <= c,
563
+ disabled: l || e <= c,
564
564
  "aria-label": "Decrease",
565
- children: /* @__PURE__ */ r.jsx(ve, { size: k, strokeWidth: 1.5 })
565
+ children: /* @__PURE__ */ t.jsx(ve, { size: k, strokeWidth: 1.5 })
566
566
  }
567
567
  ),
568
- /* @__PURE__ */ r.jsx(
568
+ /* @__PURE__ */ t.jsx(
569
569
  "input",
570
570
  {
571
571
  type: "number",
@@ -575,112 +575,112 @@ function We({
575
575
  min: c,
576
576
  max: n,
577
577
  step: a,
578
- disabled: i,
578
+ disabled: l,
579
579
  ...d
580
580
  }
581
581
  ),
582
- /* @__PURE__ */ r.jsx(
582
+ /* @__PURE__ */ t.jsx(
583
583
  "button",
584
584
  {
585
585
  type: "button",
586
586
  className: "ds-stepper-button ds-stepper-button--plus",
587
587
  onClick: u,
588
- disabled: i || e >= n,
588
+ disabled: l || e >= n,
589
589
  "aria-label": "Increase",
590
- children: /* @__PURE__ */ r.jsx(je, { size: k, strokeWidth: 1.5 })
590
+ children: /* @__PURE__ */ t.jsx(je, { size: k, strokeWidth: 1.5 })
591
591
  }
592
592
  )
593
593
  ] }),
594
- p && !f && /* @__PURE__ */ r.jsx("div", { className: "ds-stepper-hint", children: p }),
595
- f && /* @__PURE__ */ r.jsx("div", { className: "ds-stepper-error", children: f })
594
+ p && !f && /* @__PURE__ */ t.jsx("div", { className: "ds-stepper-hint", children: p }),
595
+ f && /* @__PURE__ */ t.jsx("div", { className: "ds-stepper-error", children: f })
596
596
  ] });
597
597
  }
598
598
  function Ye({
599
- children: t,
599
+ children: s,
600
600
  padding: e = "m",
601
- variant: s = "info",
601
+ variant: r = "info",
602
602
  hover: c = !1,
603
603
  // deprecated, use variant="interactive"
604
604
  onClick: n,
605
605
  href: a,
606
- disabled: l = !1,
607
- ...i
606
+ disabled: i = !1,
607
+ ...l
608
608
  }) {
609
- const f = (c ? "interactive" : s) === "interactive" || n || a, d = [
609
+ const f = (c ? "interactive" : r) === "interactive" || n || a, d = [
610
610
  "ds-card",
611
611
  `ds-card--${e}`,
612
612
  f && "ds-card--interactive"
613
613
  ].filter(Boolean).join(" ");
614
614
  if (a) {
615
615
  const b = (j) => {
616
- if (l) {
616
+ if (i) {
617
617
  j.preventDefault();
618
618
  return;
619
619
  }
620
620
  j.metaKey || j.ctrlKey || j.button === 1 || (j.preventDefault(), n == null || n(j));
621
621
  };
622
- return /* @__PURE__ */ r.jsx(
622
+ return /* @__PURE__ */ t.jsx(
623
623
  "a",
624
624
  {
625
625
  className: d,
626
- href: l ? void 0 : a,
626
+ href: i ? void 0 : a,
627
627
  onClick: b,
628
- "aria-disabled": l ? "true" : void 0,
629
- ...i,
630
- children: t
628
+ "aria-disabled": i ? "true" : void 0,
629
+ ...l,
630
+ children: s
631
631
  }
632
632
  );
633
633
  }
634
634
  const u = f && n ? "button" : "div", x = f && n ? {
635
635
  type: "button",
636
636
  onClick: n,
637
- disabled: l
637
+ disabled: i
638
638
  } : {};
639
- return /* @__PURE__ */ r.jsx(
639
+ return /* @__PURE__ */ t.jsx(
640
640
  u,
641
641
  {
642
642
  className: d,
643
643
  role: f && !n ? "article" : void 0,
644
644
  ...x,
645
- ...i,
646
- children: t
645
+ ...l,
646
+ children: s
647
647
  }
648
648
  );
649
649
  }
650
- function ze({ children: t, ...e }) {
651
- return /* @__PURE__ */ r.jsx("h1", { className: "ds-h1", ...e, children: t });
650
+ function ze({ children: s, ...e }) {
651
+ return /* @__PURE__ */ t.jsx("h1", { className: "ds-h1", ...e, children: s });
652
652
  }
653
- function Ve({ children: t, ...e }) {
654
- return /* @__PURE__ */ r.jsx("h2", { className: "ds-h2", ...e, children: t });
653
+ function Ve({ children: s, ...e }) {
654
+ return /* @__PURE__ */ t.jsx("h2", { className: "ds-h2", ...e, children: s });
655
655
  }
656
- function Ue({ children: t, ...e }) {
657
- return /* @__PURE__ */ r.jsx("h3", { className: "ds-h3", ...e, children: t });
656
+ function Ue({ children: s, ...e }) {
657
+ return /* @__PURE__ */ t.jsx("h3", { className: "ds-h3", ...e, children: s });
658
658
  }
659
- function He({ children: t, ...e }) {
660
- return /* @__PURE__ */ r.jsx("h4", { className: "ds-h4", ...e, children: t });
659
+ function He({ children: s, ...e }) {
660
+ return /* @__PURE__ */ t.jsx("h4", { className: "ds-h4", ...e, children: s });
661
661
  }
662
- function Ge({ children: t, secondary: e = !1, ...s }) {
663
- return /* @__PURE__ */ r.jsx("p", { className: `ds-p1 ${e ? "ds-p1--secondary" : ""}`, ...s, children: t });
662
+ function Ge({ children: s, secondary: e = !1, ...r }) {
663
+ return /* @__PURE__ */ t.jsx("p", { className: `ds-p1 ${e ? "ds-p1--secondary" : ""}`, ...r, children: s });
664
664
  }
665
- function qe({ children: t, secondary: e = !1, ...s }) {
666
- return /* @__PURE__ */ r.jsx("p", { className: `ds-p2 ${e ? "ds-p2--secondary" : ""}`, ...s, children: t });
665
+ function qe({ children: s, secondary: e = !1, ...r }) {
666
+ return /* @__PURE__ */ t.jsx("p", { className: `ds-p2 ${e ? "ds-p2--secondary" : ""}`, ...r, children: s });
667
667
  }
668
- function Xe({ children: t, secondary: e = !1, ...s }) {
669
- return /* @__PURE__ */ r.jsx("p", { className: `ds-p3 ${e ? "ds-p3--secondary" : ""}`, ...s, children: t });
668
+ function Xe({ children: s, secondary: e = !1, ...r }) {
669
+ return /* @__PURE__ */ t.jsx("p", { className: `ds-p3 ${e ? "ds-p3--secondary" : ""}`, ...r, children: s });
670
670
  }
671
671
  function Je({
672
- children: t,
672
+ children: s,
673
673
  variant: e = "default",
674
- size: s = "m",
674
+ size: r = "m",
675
675
  role: c,
676
676
  ...n
677
677
  }) {
678
678
  const a = [
679
679
  "ds-badge",
680
680
  `ds-badge--${e}`,
681
- `ds-badge--${s}`
682
- ].filter(Boolean).join(" "), l = c || (["info", "success", "warning", "error"].includes(e) ? "status" : void 0);
683
- return /* @__PURE__ */ r.jsx("span", { className: a, role: l, ...n, children: t });
681
+ `ds-badge--${r}`
682
+ ].filter(Boolean).join(" "), i = c || (["info", "success", "warning", "error"].includes(e) ? "status" : void 0);
683
+ return /* @__PURE__ */ t.jsx("span", { className: a, role: i, ...n, children: s });
684
684
  }
685
685
  const $e = {
686
686
  info: be,
@@ -689,101 +689,101 @@ const $e = {
689
689
  error: fe
690
690
  };
691
691
  function Ce({
692
- children: t,
692
+ children: s,
693
693
  variant: e = "info",
694
- title: s,
694
+ title: r,
695
695
  onClose: c,
696
696
  role: n,
697
697
  ...a
698
698
  }) {
699
- const l = $e[e], i = n || (e === "error" ? "alert" : "status");
700
- return /* @__PURE__ */ r.jsxs("div", { className: `ds-alert ds-alert--${e} ${s ? "" : "ds-alert--no-title"}`, role: i, ...a, children: [
701
- l && /* @__PURE__ */ r.jsx("div", { className: "ds-alert__icon", children: /* @__PURE__ */ r.jsx(l, { size: T[3], strokeWidth: 1.5 }) }),
702
- /* @__PURE__ */ r.jsxs("div", { className: "ds-alert__content", children: [
703
- s && /* @__PURE__ */ r.jsx("div", { className: "ds-alert__title", children: s }),
704
- t && /* @__PURE__ */ r.jsx("div", { className: "ds-alert__message", children: t })
699
+ const i = $e[e], l = n || (e === "error" ? "alert" : "status");
700
+ return /* @__PURE__ */ t.jsxs("div", { className: `ds-alert ds-alert--${e} ${r ? "" : "ds-alert--no-title"}`, role: l, ...a, children: [
701
+ i && /* @__PURE__ */ t.jsx("div", { className: "ds-alert__icon", children: /* @__PURE__ */ t.jsx(i, { size: S[3], strokeWidth: 1.5 }) }),
702
+ /* @__PURE__ */ t.jsxs("div", { className: "ds-alert__content", children: [
703
+ r && /* @__PURE__ */ t.jsx("div", { className: "ds-alert__title", children: r }),
704
+ s && /* @__PURE__ */ t.jsx("div", { className: "ds-alert__message", children: s })
705
705
  ] }),
706
- c && /* @__PURE__ */ r.jsx(
706
+ c && /* @__PURE__ */ t.jsx(
707
707
  "button",
708
708
  {
709
709
  type: "button",
710
710
  className: "ds-alert__close",
711
711
  onClick: c,
712
712
  "aria-label": "Close alert",
713
- children: /* @__PURE__ */ r.jsx(se, { size: T[3], strokeWidth: 1.5 })
713
+ children: /* @__PURE__ */ t.jsx(se, { size: S[3], strokeWidth: 1.5 })
714
714
  }
715
715
  )
716
716
  ] });
717
717
  }
718
718
  function Ke({
719
- children: t,
719
+ children: s,
720
720
  title: e,
721
- onClose: s,
721
+ onClose: r,
722
722
  size: c = "m",
723
723
  ...n
724
724
  }) {
725
- const a = L(null), l = A.useId();
725
+ const a = L(null), i = A.useId();
726
726
  B(() => {
727
727
  const d = (x) => {
728
- x.key === "Escape" && (s == null || s());
728
+ x.key === "Escape" && (r == null || r());
729
729
  }, u = (x) => {
730
- a.current && !a.current.contains(x.target) && (s == null || s());
730
+ a.current && !a.current.contains(x.target) && (r == null || r());
731
731
  };
732
732
  return document.addEventListener("keydown", d), document.addEventListener("mousedown", u), () => {
733
733
  document.removeEventListener("keydown", d), document.removeEventListener("mousedown", u);
734
734
  };
735
- }, [s]);
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
- return /* @__PURE__ */ r.jsx("div", { className: "ds-modal-overlay", ...n, children: /* @__PURE__ */ r.jsxs(
735
+ }, [r]);
736
+ const l = A.Children.toArray(s), p = l.find((d) => (d == null ? void 0 : d.type) === de), f = l.filter((d) => (d == null ? void 0 : d.type) !== de);
737
+ return /* @__PURE__ */ t.jsx("div", { className: "ds-modal-overlay", ...n, children: /* @__PURE__ */ t.jsxs(
738
738
  "div",
739
739
  {
740
740
  className: `ds-modal ds-modal--${c}`,
741
741
  ref: a,
742
742
  role: "dialog",
743
743
  "aria-modal": "true",
744
- "aria-labelledby": e ? l : void 0,
744
+ "aria-labelledby": e ? i : void 0,
745
745
  children: [
746
- (e || s) && /* @__PURE__ */ r.jsxs("div", { className: "ds-modal__header", children: [
747
- e && /* @__PURE__ */ r.jsx("h3", { id: l, className: "ds-modal__title", children: e }),
748
- s && /* @__PURE__ */ r.jsx(
746
+ (e || r) && /* @__PURE__ */ t.jsxs("div", { className: "ds-modal__header", children: [
747
+ e && /* @__PURE__ */ t.jsx("h3", { id: i, className: "ds-modal__title", children: e }),
748
+ r && /* @__PURE__ */ t.jsx(
749
749
  ke,
750
750
  {
751
751
  variant: "ghost",
752
752
  size: "small",
753
- icon: /* @__PURE__ */ r.jsx(se, { size: T[2], strokeWidth: 1.5 }),
754
- onClick: s,
753
+ icon: /* @__PURE__ */ t.jsx(se, { size: S[2], strokeWidth: 1.5 }),
754
+ onClick: r,
755
755
  "aria-label": "Close modal"
756
756
  }
757
757
  )
758
758
  ] }),
759
- /* @__PURE__ */ r.jsx("div", { className: "ds-modal__body", children: f }),
759
+ /* @__PURE__ */ t.jsx("div", { className: "ds-modal__body", children: f }),
760
760
  p
761
761
  ]
762
762
  }
763
763
  ) });
764
764
  }
765
- function de({ children: t }) {
766
- return /* @__PURE__ */ r.jsx("div", { className: "ds-modal__footer", children: t });
765
+ function de({ children: s }) {
766
+ return /* @__PURE__ */ t.jsx("div", { className: "ds-modal__footer", children: s });
767
767
  }
768
768
  function Re({
769
- children: t,
769
+ children: s,
770
770
  title: e = "Code",
771
- defaultExpanded: s = !1,
771
+ defaultExpanded: r = !1,
772
772
  expanded: c,
773
773
  onToggle: n,
774
774
  padding: a = "s",
775
- className: l = "",
776
- ...i
775
+ className: i = "",
776
+ ...l
777
777
  }) {
778
- const [p, f] = I(s), d = c !== void 0, u = d ? c : p, x = () => {
778
+ const [p, f] = T(r), d = c !== void 0, u = d ? c : p, x = () => {
779
779
  d ? n == null || n(!c) : f((j) => !j);
780
780
  }, b = [
781
781
  "ds-code-accordion",
782
782
  `ds-code-accordion--${a}`,
783
- l
783
+ i
784
784
  ].filter(Boolean).join(" ");
785
- return /* @__PURE__ */ r.jsxs("div", { className: b, ...i, children: [
786
- /* @__PURE__ */ r.jsxs(
785
+ return /* @__PURE__ */ t.jsxs("div", { className: b, ...l, children: [
786
+ /* @__PURE__ */ t.jsxs(
787
787
  "button",
788
788
  {
789
789
  type: "button",
@@ -791,11 +791,11 @@ function Re({
791
791
  onClick: x,
792
792
  "aria-expanded": u,
793
793
  children: [
794
- /* @__PURE__ */ r.jsx("span", { className: "ds-code-accordion__title", children: e }),
795
- /* @__PURE__ */ r.jsx(
794
+ /* @__PURE__ */ t.jsx("span", { className: "ds-code-accordion__title", children: e }),
795
+ /* @__PURE__ */ t.jsx(
796
796
  K,
797
797
  {
798
- size: T[2],
798
+ size: S[2],
799
799
  strokeWidth: 1.5,
800
800
  className: `ds-code-accordion__icon ${u ? "ds-code-accordion__icon--expanded" : ""}`
801
801
  }
@@ -803,70 +803,70 @@ function Re({
803
803
  ]
804
804
  }
805
805
  ),
806
- u && /* @__PURE__ */ r.jsx("pre", { className: "ds-code-accordion__content", children: /* @__PURE__ */ r.jsx("code", { children: t }) })
806
+ u && /* @__PURE__ */ t.jsx("pre", { className: "ds-code-accordion__content", children: /* @__PURE__ */ t.jsx("code", { children: s }) })
807
807
  ] });
808
808
  }
809
- function Ze({ children: t, block: e = !1, collapsible: s = !1, title: c = "Code", defaultExpanded: n = !1, ...a }) {
810
- return e ? s ? /* @__PURE__ */ r.jsx(Re, { title: c, defaultExpanded: n, ...a, children: t }) : /* @__PURE__ */ r.jsx("pre", { className: "ds-code-block", ...a, children: /* @__PURE__ */ r.jsx("code", { children: t }) }) : /* @__PURE__ */ r.jsx("code", { className: "ds-code-inline", ...a, children: t });
809
+ function Ze({ children: s, block: e = !1, collapsible: r = !1, title: c = "Code", defaultExpanded: n = !1, ...a }) {
810
+ return e ? r ? /* @__PURE__ */ t.jsx(Re, { title: c, defaultExpanded: n, ...a, children: s }) : /* @__PURE__ */ t.jsx("pre", { className: "ds-code-block", ...a, children: /* @__PURE__ */ t.jsx("code", { children: s }) }) : /* @__PURE__ */ t.jsx("code", { className: "ds-code-inline", ...a, children: s });
811
811
  }
812
- function Qe({ href: t, children: e, onClick: s, target: c, rel: n, ...a }) {
813
- const i = c === "_blank" ? n ? `${n} noopener noreferrer` : "noopener noreferrer" : n;
814
- return /* @__PURE__ */ r.jsx(
812
+ function Qe({ href: s, children: e, onClick: r, target: c, rel: n, ...a }) {
813
+ const l = c === "_blank" ? n ? `${n} noopener noreferrer` : "noopener noreferrer" : n;
814
+ return /* @__PURE__ */ t.jsx(
815
815
  "a",
816
816
  {
817
- href: t,
817
+ href: s,
818
818
  className: "ds-link",
819
- onClick: s,
819
+ onClick: r,
820
820
  target: c,
821
- rel: i,
821
+ rel: l,
822
822
  ...a,
823
823
  children: e
824
824
  }
825
825
  );
826
826
  }
827
- function et({ children: t, size: e = "m", variant: s = "ghost", ...c }) {
828
- return /* @__PURE__ */ r.jsx("div", { className: "ds-tabs", role: "tablist", ...c, children: A.Children.map(t, (n) => A.isValidElement(n) ? A.cloneElement(n, { size: e, variant: s }) : n) });
827
+ function et({ children: s, size: e = "m", variant: r = "ghost", ...c }) {
828
+ return /* @__PURE__ */ t.jsx("div", { className: "ds-tabs", role: "tablist", ...c, children: A.Children.map(s, (n) => A.isValidElement(n) ? A.cloneElement(n, { size: e, variant: r }) : n) });
829
829
  }
830
- function tt({ children: t, selected: e = !1, onClick: s, size: c = "m", variant: n = "ghost", disabled: a = !1, icon: l, href: i, ...p }) {
831
- const f = l && !t, d = [
830
+ function tt({ children: s, selected: e = !1, onClick: r, size: c = "m", variant: n = "ghost", disabled: a = !1, icon: i, href: l, ...p }) {
831
+ const f = i && !s, d = [
832
832
  "ds-tab",
833
833
  `ds-tab--${c}`,
834
834
  `ds-tab--${n}`,
835
835
  e && "ds-tab--selected",
836
836
  f && "ds-tab--icon-only"
837
- ].filter(Boolean).join(" "), u = /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
838
- l && /* @__PURE__ */ r.jsx("span", { className: "ds-tab-icon", children: l }),
839
- t
837
+ ].filter(Boolean).join(" "), u = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
838
+ i && /* @__PURE__ */ t.jsx("span", { className: "ds-tab-icon", children: i }),
839
+ s
840
840
  ] });
841
- if (i) {
841
+ if (l) {
842
842
  const x = (b) => {
843
843
  if (a) {
844
844
  b.preventDefault();
845
845
  return;
846
846
  }
847
- b.metaKey || b.ctrlKey || b.button === 1 || (b.preventDefault(), s == null || s(b));
847
+ b.metaKey || b.ctrlKey || b.button === 1 || (b.preventDefault(), r == null || r(b));
848
848
  };
849
- return /* @__PURE__ */ r.jsx(
849
+ return /* @__PURE__ */ t.jsx(
850
850
  "a",
851
851
  {
852
852
  role: "tab",
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 : i,
856
+ href: a ? void 0 : l,
857
857
  onClick: x,
858
858
  ...p,
859
859
  children: u
860
860
  }
861
861
  );
862
862
  }
863
- return /* @__PURE__ */ r.jsx(
863
+ return /* @__PURE__ */ t.jsx(
864
864
  "button",
865
865
  {
866
866
  role: "tab",
867
867
  "aria-selected": e,
868
868
  className: d,
869
- onClick: s,
869
+ onClick: r,
870
870
  disabled: a,
871
871
  ...p,
872
872
  children: u
@@ -874,22 +874,22 @@ function tt({ children: t, selected: e = !1, onClick: s, size: c = "m", variant:
874
874
  );
875
875
  }
876
876
  function st({
877
- children: t,
877
+ children: s,
878
878
  title: e,
879
- defaultExpanded: s = !1,
879
+ defaultExpanded: r = !1,
880
880
  expanded: c,
881
881
  onToggle: n,
882
882
  padding: a = "m",
883
- ...l
883
+ ...i
884
884
  }) {
885
- const [i, p] = I(s), f = c !== void 0, d = f ? c : i, u = () => {
885
+ const [l, p] = T(r), f = c !== void 0, d = f ? c : l, u = () => {
886
886
  f ? n == null || n(!c) : p((b) => !b);
887
887
  }, x = [
888
888
  "ds-accordion",
889
889
  `ds-accordion--${a}`
890
890
  ].filter(Boolean).join(" ");
891
- return /* @__PURE__ */ r.jsxs("div", { className: x, ...l, children: [
892
- /* @__PURE__ */ r.jsxs(
891
+ return /* @__PURE__ */ t.jsxs("div", { className: x, ...i, children: [
892
+ /* @__PURE__ */ t.jsxs(
893
893
  "button",
894
894
  {
895
895
  type: "button",
@@ -897,11 +897,11 @@ function st({
897
897
  onClick: u,
898
898
  "aria-expanded": d,
899
899
  children: [
900
- /* @__PURE__ */ r.jsx("span", { className: "ds-accordion__title", children: e }),
901
- /* @__PURE__ */ r.jsx(
900
+ /* @__PURE__ */ t.jsx("span", { className: "ds-accordion__title", children: e }),
901
+ /* @__PURE__ */ t.jsx(
902
902
  K,
903
903
  {
904
- size: T[2],
904
+ size: S[2],
905
905
  strokeWidth: 1.5,
906
906
  className: `ds-accordion__icon ${d ? "ds-accordion__icon--expanded" : ""}`
907
907
  }
@@ -909,48 +909,48 @@ function st({
909
909
  ]
910
910
  }
911
911
  ),
912
- d && /* @__PURE__ */ r.jsx("div", { className: "ds-accordion__content", children: t })
912
+ d && /* @__PURE__ */ t.jsx("div", { className: "ds-accordion__content", children: s })
913
913
  ] });
914
914
  }
915
915
  const O = 8, z = 8;
916
- function Te(t, e, s) {
916
+ function Te(s, e, r) {
917
917
  const c = window.innerWidth;
918
918
  let n, a;
919
- switch (t) {
919
+ switch (s) {
920
920
  case "top":
921
- n = e.top - s.height - O, a = e.left + e.width / 2 - s.width / 2;
921
+ n = e.top - r.height - O, a = e.left + e.width / 2 - r.width / 2;
922
922
  break;
923
923
  case "bottom":
924
- n = e.bottom + O, a = e.left + e.width / 2 - s.width / 2;
924
+ n = e.bottom + O, a = e.left + e.width / 2 - r.width / 2;
925
925
  break;
926
926
  case "left":
927
- n = e.top + e.height / 2 - s.height / 2, a = e.left - s.width - O;
927
+ n = e.top + e.height / 2 - r.height / 2, a = e.left - r.width - O;
928
928
  break;
929
929
  case "right":
930
- n = e.top + e.height / 2 - s.height / 2, a = e.right + O;
930
+ n = e.top + e.height / 2 - r.height / 2, a = e.right + O;
931
931
  break;
932
932
  default:
933
933
  n = e.bottom + O, a = e.left;
934
934
  }
935
- const l = Math.max(z, Math.min(c - s.width - z, a)), i = a - l;
936
- return { top: n, left: l, arrowOffset: i };
935
+ const i = Math.max(z, Math.min(c - r.width - z, a)), l = a - i;
936
+ return { top: n, left: i, arrowOffset: l };
937
937
  }
938
- function Se(t, e, s) {
938
+ function Se(s, e, r) {
939
939
  const c = window.innerWidth, n = window.innerHeight;
940
- if (t.top >= e + O + z) return "top";
941
- if (n - t.bottom >= e + O + z) return "bottom";
942
- if (c - t.right >= s + O + z) return "right";
943
- if (t.left >= s + O + z) return "left";
944
- const a = Math.max(t.top, n - t.bottom, t.left, c - t.right);
945
- return a === t.top ? "top" : a === n - t.bottom ? "bottom" : a === c - t.right ? "right" : "left";
940
+ if (s.top >= e + O + z) return "top";
941
+ if (n - s.bottom >= e + O + z) return "bottom";
942
+ if (c - s.right >= r + O + z) return "right";
943
+ if (s.left >= r + O + z) return "left";
944
+ const a = Math.max(s.top, n - s.bottom, s.left, c - s.right);
945
+ return a === s.top ? "top" : a === n - s.bottom ? "bottom" : a === c - s.right ? "right" : "left";
946
946
  }
947
- function rt({ children: t, content: e, position: s, ...c }) {
948
- const [n, a] = I(!1), [l, i] = I({ visibility: "hidden" }), [p, f] = I(s || "top"), d = L(null), u = L(null), x = L(!1), b = () => {
947
+ function rt({ children: s, content: e, position: r, ...c }) {
948
+ const [n, a] = T(!1), [i, l] = 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(), $ = s || Se(v, k.height, k.width), { top: S, left: m, arrowOffset: _ } = Te($, v, k);
951
- f($), i({
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($), l({
952
952
  position: "fixed",
953
- top: S,
953
+ top: g,
954
954
  left: m,
955
955
  visibility: "visible",
956
956
  "--arrow-offset": `${_}px`
@@ -958,29 +958,29 @@ function rt({ children: t, content: e, position: s, ...c }) {
958
958
  };
959
959
  if (B(() => {
960
960
  if (!n) return;
961
- i({ position: "fixed", visibility: "hidden" });
961
+ l({ 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);
965
965
  };
966
- }, [n, s]), B(() => {
966
+ }, [n, r]), B(() => {
967
967
  if (!n) return;
968
968
  const v = (k) => {
969
969
  d.current && !d.current.contains(k.target) && a(!1);
970
970
  };
971
971
  return document.addEventListener("touchstart", v), () => document.removeEventListener("touchstart", v);
972
- }, [n]), !e) return t;
973
- const j = n && /* @__PURE__ */ r.jsx(
972
+ }, [n]), !e) return s;
973
+ const j = n && /* @__PURE__ */ t.jsx(
974
974
  "div",
975
975
  {
976
976
  ref: u,
977
977
  className: `ds-tooltip ds-tooltip--${p}`,
978
978
  role: "tooltip",
979
- style: l,
979
+ style: i,
980
980
  children: e
981
981
  }
982
982
  );
983
- return /* @__PURE__ */ r.jsxs(
983
+ return /* @__PURE__ */ t.jsxs(
984
984
  "div",
985
985
  {
986
986
  ref: d,
@@ -996,71 +996,71 @@ function rt({ children: t, content: e, position: s, ...c }) {
996
996
  },
997
997
  ...c,
998
998
  children: [
999
- t,
999
+ s,
1000
1000
  typeof document < "u" && C.createPortal(j, document.body)
1001
1001
  ]
1002
1002
  }
1003
1003
  );
1004
1004
  }
1005
1005
  function nt({
1006
- checked: t = !1,
1006
+ checked: s = !1,
1007
1007
  onChange: e,
1008
- size: s = "m",
1008
+ size: r = "m",
1009
1009
  disabled: c = !1,
1010
1010
  label: n,
1011
1011
  id: a,
1012
- ...l
1012
+ ...i
1013
1013
  }) {
1014
- const i = a || `toggle-${A.useId()}`, p = [
1014
+ const l = a || `toggle-${A.useId()}`, p = [
1015
1015
  "ds-toggle",
1016
- `ds-toggle--${s}`,
1016
+ `ds-toggle--${r}`,
1017
1017
  c && "ds-toggle--disabled"
1018
1018
  ].filter(Boolean).join(" ");
1019
- return /* @__PURE__ */ r.jsxs("label", { className: p, htmlFor: i, children: [
1020
- /* @__PURE__ */ r.jsx(
1019
+ return /* @__PURE__ */ t.jsxs("label", { className: p, htmlFor: l, children: [
1020
+ /* @__PURE__ */ t.jsx(
1021
1021
  "input",
1022
1022
  {
1023
1023
  type: "checkbox",
1024
- id: i,
1024
+ id: l,
1025
1025
  className: "ds-toggle__input",
1026
- checked: t,
1026
+ checked: s,
1027
1027
  onChange: (f) => e == null ? void 0 : e(f.target.checked),
1028
1028
  disabled: c,
1029
- ...l
1029
+ ...i
1030
1030
  }
1031
1031
  ),
1032
- /* @__PURE__ */ r.jsx("span", { className: "ds-toggle__track", children: /* @__PURE__ */ r.jsx("span", { className: "ds-toggle__thumb" }) }),
1033
- n && /* @__PURE__ */ r.jsx("span", { className: "ds-toggle__label", children: n })
1032
+ /* @__PURE__ */ t.jsx("span", { className: "ds-toggle__track", children: /* @__PURE__ */ t.jsx("span", { className: "ds-toggle__thumb" }) }),
1033
+ n && /* @__PURE__ */ t.jsx("span", { className: "ds-toggle__label", children: n })
1034
1034
  ] });
1035
1035
  }
1036
1036
  function at({
1037
- checked: t = !1,
1037
+ checked: s = !1,
1038
1038
  onChange: e,
1039
- size: s = "m",
1039
+ size: r = "m",
1040
1040
  disabled: c = !1,
1041
1041
  label: n,
1042
1042
  id: a,
1043
- ...l
1043
+ ...i
1044
1044
  }) {
1045
- const i = a || `checkbox-${A.useId()}`, p = [
1045
+ const l = a || `checkbox-${A.useId()}`, p = [
1046
1046
  "ds-checkbox",
1047
- `ds-checkbox--${s}`,
1047
+ `ds-checkbox--${r}`,
1048
1048
  c && "ds-checkbox--disabled"
1049
- ].filter(Boolean).join(" "), f = s === "xs" ? 10 : s === "small" ? 14 : s === "large" ? 20 : 16;
1050
- return /* @__PURE__ */ r.jsxs("label", { className: p, htmlFor: i, children: [
1051
- /* @__PURE__ */ r.jsx(
1049
+ ].filter(Boolean).join(" "), f = r === "xs" ? 10 : r === "small" ? 14 : r === "large" ? 20 : 16;
1050
+ return /* @__PURE__ */ t.jsxs("label", { className: p, htmlFor: l, children: [
1051
+ /* @__PURE__ */ t.jsx(
1052
1052
  "input",
1053
1053
  {
1054
1054
  type: "checkbox",
1055
- id: i,
1055
+ id: l,
1056
1056
  className: "ds-checkbox__input",
1057
- checked: t,
1057
+ checked: s,
1058
1058
  onChange: (d) => e == null ? void 0 : e(d.target.checked),
1059
1059
  disabled: c,
1060
- ...l
1060
+ ...i
1061
1061
  }
1062
1062
  ),
1063
- /* @__PURE__ */ r.jsx("span", { className: "ds-checkbox__box", children: t && /* @__PURE__ */ r.jsx(
1063
+ /* @__PURE__ */ t.jsx("span", { className: "ds-checkbox__box", children: s && /* @__PURE__ */ t.jsx(
1064
1064
  _e,
1065
1065
  {
1066
1066
  size: f,
@@ -1068,211 +1068,211 @@ function at({
1068
1068
  className: "ds-checkbox__icon"
1069
1069
  }
1070
1070
  ) }),
1071
- n && /* @__PURE__ */ r.jsx("span", { className: "ds-checkbox__label", children: n })
1071
+ n && /* @__PURE__ */ t.jsx("span", { className: "ds-checkbox__label", children: n })
1072
1072
  ] });
1073
1073
  }
1074
1074
  function ot({
1075
- checked: t = !1,
1075
+ checked: s = !1,
1076
1076
  onChange: e,
1077
- size: s = "m",
1077
+ size: r = "m",
1078
1078
  disabled: c = !1,
1079
1079
  label: n,
1080
1080
  name: a,
1081
- value: l,
1082
- id: i,
1081
+ value: i,
1082
+ id: l,
1083
1083
  ...p
1084
1084
  }) {
1085
- const f = i || `radio-${A.useId()}`, d = [
1085
+ const f = l || `radio-${A.useId()}`, d = [
1086
1086
  "ds-radio",
1087
- `ds-radio--${s}`,
1087
+ `ds-radio--${r}`,
1088
1088
  c && "ds-radio--disabled"
1089
1089
  ].filter(Boolean).join(" ");
1090
- return /* @__PURE__ */ r.jsxs("label", { className: d, htmlFor: f, children: [
1091
- /* @__PURE__ */ r.jsx(
1090
+ return /* @__PURE__ */ t.jsxs("label", { className: d, htmlFor: f, children: [
1091
+ /* @__PURE__ */ t.jsx(
1092
1092
  "input",
1093
1093
  {
1094
1094
  type: "radio",
1095
1095
  id: f,
1096
1096
  className: "ds-radio__input",
1097
- checked: t,
1097
+ checked: s,
1098
1098
  onChange: (u) => e == null ? void 0 : e(u.target.checked),
1099
1099
  disabled: c,
1100
1100
  name: a,
1101
- value: l,
1101
+ value: i,
1102
1102
  ...p
1103
1103
  }
1104
1104
  ),
1105
- /* @__PURE__ */ r.jsx("span", { className: "ds-radio__circle", children: /* @__PURE__ */ r.jsx("span", { className: "ds-radio__dot" }) }),
1106
- n && /* @__PURE__ */ r.jsx("span", { className: "ds-radio__label", children: n })
1105
+ /* @__PURE__ */ t.jsx("span", { className: "ds-radio__circle", children: /* @__PURE__ */ t.jsx("span", { className: "ds-radio__dot" }) }),
1106
+ n && /* @__PURE__ */ t.jsx("span", { className: "ds-radio__label", children: n })
1107
1107
  ] });
1108
1108
  }
1109
- function ct({ size: t = "m", color: e = "default", className: s = "", ...c }) {
1110
- return /* @__PURE__ */ r.jsx(
1109
+ function ct({ size: s = "m", color: e = "default", className: r = "", ...c }) {
1110
+ return /* @__PURE__ */ t.jsx(
1111
1111
  "span",
1112
1112
  {
1113
- className: ["ds-spinner", `ds-spinner--${t}`, `ds-spinner--${e}`, s].filter(Boolean).join(" "),
1113
+ className: ["ds-spinner", `ds-spinner--${s}`, `ds-spinner--${e}`, r].filter(Boolean).join(" "),
1114
1114
  role: "status",
1115
1115
  "aria-label": "Loading",
1116
1116
  ...c
1117
1117
  }
1118
1118
  );
1119
1119
  }
1120
- function lt({ width: t, height: e, shape: s = "rect", className: c = "", style: n = {}, ...a }) {
1121
- return /* @__PURE__ */ r.jsx(
1120
+ function lt({ width: s, height: e, shape: r = "rect", className: c = "", style: n = {}, ...a }) {
1121
+ return /* @__PURE__ */ t.jsx(
1122
1122
  "span",
1123
1123
  {
1124
- className: ["ds-skeleton", `ds-skeleton--${s}`, c].filter(Boolean).join(" "),
1125
- style: { width: t, height: e, ...n },
1124
+ className: ["ds-skeleton", `ds-skeleton--${r}`, c].filter(Boolean).join(" "),
1125
+ style: { width: s, height: e, ...n },
1126
1126
  "aria-hidden": "true",
1127
1127
  ...a
1128
1128
  }
1129
1129
  );
1130
1130
  }
1131
- function ge(t) {
1131
+ function ge(s) {
1132
1132
  let e = 2166136261;
1133
- for (let s = 0; s < t.length; s++)
1134
- e ^= t.charCodeAt(s), e = Math.imul(e, 16777619) >>> 0;
1133
+ for (let r = 0; r < s.length; r++)
1134
+ e ^= s.charCodeAt(r), e = Math.imul(e, 16777619) >>> 0;
1135
1135
  return e % 360;
1136
1136
  }
1137
- function it({ seed: t, icon: e, size: s = 32, className: c = "", style: n = {}, ...a }) {
1138
- const l = ge(t ?? "");
1139
- return /* @__PURE__ */ r.jsx(
1137
+ function it({ seed: s, icon: e, src: r, size: c = 32, className: n = "", style: a = {}, ...i }) {
1138
+ const l = ge(s ?? ""), [p, f] = T(!1);
1139
+ return /* @__PURE__ */ t.jsx(
1140
1140
  "div",
1141
1141
  {
1142
- className: ["ds-avatar", c].filter(Boolean).join(" "),
1143
- style: { width: s, height: s, "--ds-avatar-h": l, ...n },
1142
+ className: ["ds-avatar", n].filter(Boolean).join(" "),
1143
+ style: { width: c, height: c, "--ds-avatar-h": l, ...a },
1144
1144
  "aria-hidden": "true",
1145
- ...a,
1146
- children: e
1145
+ ...i,
1146
+ children: r && !p ? /* @__PURE__ */ t.jsx("img", { src: r, alt: "", onError: () => f(!0) }) : e
1147
1147
  }
1148
1148
  );
1149
1149
  }
1150
1150
  function dt({
1151
- children: t,
1151
+ children: s,
1152
1152
  size: e = "compact",
1153
- stickyTop: s,
1153
+ stickyTop: r,
1154
1154
  maxHeight: c,
1155
1155
  className: n = "",
1156
1156
  style: a = {},
1157
- ...l
1157
+ ...i
1158
1158
  }) {
1159
- const i = {
1159
+ const l = {
1160
1160
  ...c ? { maxHeight: c } : {},
1161
- ...s !== void 0 ? { "--ds-table-sticky-top": typeof s == "number" ? `${s}px` : s } : {},
1161
+ ...r !== void 0 ? { "--ds-table-sticky-top": typeof r == "number" ? `${r}px` : r } : {},
1162
1162
  ...a
1163
1163
  };
1164
- return /* @__PURE__ */ r.jsx(
1164
+ return /* @__PURE__ */ t.jsx(
1165
1165
  "div",
1166
1166
  {
1167
1167
  className: ["ds-table-wrap", c ? "ds-table-wrap--scroll" : ""].filter(Boolean).join(" "),
1168
- style: i,
1169
- children: /* @__PURE__ */ r.jsx(
1168
+ style: l,
1169
+ children: /* @__PURE__ */ t.jsx(
1170
1170
  "table",
1171
1171
  {
1172
1172
  className: ["ds-table", `ds-table--${e}`, n].filter(Boolean).join(" "),
1173
- ...l,
1174
- children: t
1173
+ ...i,
1174
+ children: s
1175
1175
  }
1176
1176
  )
1177
1177
  }
1178
1178
  );
1179
1179
  }
1180
- function ut({ children: t, ...e }) {
1181
- return /* @__PURE__ */ r.jsx("thead", { ...e, children: t });
1180
+ function ut({ children: s, ...e }) {
1181
+ return /* @__PURE__ */ t.jsx("thead", { ...e, children: s });
1182
1182
  }
1183
- function ft({ children: t, ...e }) {
1184
- return /* @__PURE__ */ r.jsx("tbody", { ...e, children: t });
1183
+ function ft({ children: s, ...e }) {
1184
+ return /* @__PURE__ */ t.jsx("tbody", { ...e, children: s });
1185
1185
  }
1186
- function mt({ children: t, interactive: e, selected: s, className: c = "", onClick: n, ...a }) {
1187
- return /* @__PURE__ */ r.jsx(
1186
+ function mt({ children: s, interactive: e, selected: r, className: c = "", onClick: n, ...a }) {
1187
+ return /* @__PURE__ */ t.jsx(
1188
1188
  "tr",
1189
1189
  {
1190
1190
  className: [
1191
1191
  "ds-table-row",
1192
1192
  e || n ? "ds-table-row--interactive" : "",
1193
- s ? "ds-table-row--selected" : "",
1193
+ r ? "ds-table-row--selected" : "",
1194
1194
  c
1195
1195
  ].filter(Boolean).join(" "),
1196
1196
  onClick: n,
1197
1197
  ...a,
1198
- children: t
1198
+ children: s
1199
1199
  }
1200
1200
  );
1201
1201
  }
1202
- function pt({ children: t, align: e = "left", sortDir: s, onSort: c, width: n, className: a = "", style: l = {}, ...i }) {
1203
- const p = !!c || s !== void 0, f = s === "asc" ? we : s === "desc" ? K : Ne;
1204
- return /* @__PURE__ */ r.jsx(
1202
+ function pt({ children: s, align: e = "left", sortDir: r, onSort: c, width: n, className: a = "", style: i = {}, ...l }) {
1203
+ const p = !!c || r !== void 0, f = r === "asc" ? we : r === "desc" ? K : Ne;
1204
+ return /* @__PURE__ */ t.jsx(
1205
1205
  "th",
1206
1206
  {
1207
1207
  className: [
1208
1208
  "ds-th",
1209
1209
  p ? "ds-th--sortable" : "",
1210
- s ? "ds-th--sorted" : "",
1210
+ r ? "ds-th--sorted" : "",
1211
1211
  e !== "left" ? `ds-table-cell--${e}` : "",
1212
1212
  a
1213
1213
  ].filter(Boolean).join(" "),
1214
1214
  onClick: c,
1215
- style: { width: n, ...l },
1216
- ...i,
1217
- children: p ? /* @__PURE__ */ r.jsxs("span", { className: "ds-th__inner", children: [
1218
- t,
1219
- /* @__PURE__ */ r.jsx("span", { className: "ds-th__sort-icon", children: /* @__PURE__ */ r.jsx(f, { size: 11, strokeWidth: 2.5 }) })
1220
- ] }) : t
1215
+ style: { width: n, ...i },
1216
+ ...l,
1217
+ children: p ? /* @__PURE__ */ t.jsxs("span", { className: "ds-th__inner", children: [
1218
+ s,
1219
+ /* @__PURE__ */ t.jsx("span", { className: "ds-th__sort-icon", children: /* @__PURE__ */ t.jsx(f, { size: 11, strokeWidth: 2.5 }) })
1220
+ ] }) : s
1221
1221
  }
1222
1222
  );
1223
1223
  }
1224
- function bt({ children: t, align: e = "left", secondary: s, muted: c, truncate: n, nowrap: a, className: l = "", ...i }) {
1225
- return /* @__PURE__ */ r.jsx(
1224
+ function bt({ children: s, align: e = "left", secondary: r, muted: c, truncate: n, nowrap: a, className: i = "", ...l }) {
1225
+ return /* @__PURE__ */ t.jsx(
1226
1226
  "td",
1227
1227
  {
1228
1228
  className: [
1229
1229
  "ds-td",
1230
1230
  e !== "left" ? `ds-table-cell--${e}` : "",
1231
- s ? "ds-table-cell--secondary" : "",
1231
+ r ? "ds-table-cell--secondary" : "",
1232
1232
  c ? "ds-table-cell--muted" : "",
1233
1233
  n ? "ds-table-cell--truncate" : "",
1234
1234
  a ? "ds-table-cell--nowrap" : "",
1235
- l
1235
+ i
1236
1236
  ].filter(Boolean).join(" "),
1237
- ...i,
1238
- children: t
1237
+ ...l,
1238
+ children: s
1239
1239
  }
1240
1240
  );
1241
1241
  }
1242
1242
  function ht({
1243
- icon: t,
1243
+ icon: s,
1244
1244
  title: e,
1245
- description: s,
1245
+ description: r,
1246
1246
  action: c,
1247
1247
  size: n = "m",
1248
1248
  className: a = "",
1249
- ...l
1249
+ ...i
1250
1250
  }) {
1251
- return /* @__PURE__ */ r.jsxs(
1251
+ return /* @__PURE__ */ t.jsxs(
1252
1252
  "div",
1253
1253
  {
1254
1254
  className: ["ds-empty-state", `ds-empty-state--${n}`, a].filter(Boolean).join(" "),
1255
- ...l,
1255
+ ...i,
1256
1256
  children: [
1257
- t && /* @__PURE__ */ r.jsx("div", { className: "ds-empty-state__icon", children: t }),
1258
- /* @__PURE__ */ r.jsx("div", { className: "ds-empty-state__title", children: e }),
1259
- s && /* @__PURE__ */ r.jsx("div", { className: "ds-empty-state__description", children: s }),
1260
- c && /* @__PURE__ */ r.jsx("div", { className: "ds-empty-state__action", children: c })
1257
+ s && /* @__PURE__ */ t.jsx("div", { className: "ds-empty-state__icon", children: s }),
1258
+ /* @__PURE__ */ t.jsx("div", { className: "ds-empty-state__title", children: e }),
1259
+ r && /* @__PURE__ */ t.jsx("div", { className: "ds-empty-state__description", children: r }),
1260
+ c && /* @__PURE__ */ t.jsx("div", { className: "ds-empty-state__action", children: c })
1261
1261
  ]
1262
1262
  }
1263
1263
  );
1264
1264
  }
1265
1265
  function xt({
1266
- trigger: t,
1266
+ trigger: s,
1267
1267
  items: e = [],
1268
- open: s,
1268
+ open: r,
1269
1269
  onOpenChange: c,
1270
1270
  align: n = "left",
1271
1271
  className: a = "",
1272
- style: l,
1273
- ...i
1272
+ style: i,
1273
+ ...l
1274
1274
  }) {
1275
- const [p, f] = I(!1), d = s !== void 0, u = d ? s : p, x = L(null), b = L(null), [j, v] = I({}), k = () => {
1275
+ const [p, f] = T(!1), d = r !== void 0, u = d ? r : p, x = L(null), b = L(null), [j, v] = T({}), k = () => {
1276
1276
  d ? c == null || c(!1) : f(!1);
1277
1277
  }, $ = () => {
1278
1278
  const m = !u;
@@ -1293,8 +1293,8 @@ function xt({
1293
1293
  }, [u, n]), B(() => {
1294
1294
  if (!u) return;
1295
1295
  const m = (R) => {
1296
- var g, P;
1297
- !((g = x.current) != null && g.contains(R.target)) && !((P = b.current) != null && P.contains(R.target)) && k();
1296
+ var I, P;
1297
+ !((I = x.current) != null && I.contains(R.target)) && !((P = b.current) != null && P.contains(R.target)) && k();
1298
1298
  }, _ = (R) => {
1299
1299
  R.key === "Escape" && k();
1300
1300
  };
@@ -1302,7 +1302,7 @@ function xt({
1302
1302
  document.removeEventListener("mousedown", m), document.removeEventListener("keydown", _);
1303
1303
  };
1304
1304
  }, [u]);
1305
- const S = u && /* @__PURE__ */ r.jsx(
1305
+ const g = u && /* @__PURE__ */ t.jsx(
1306
1306
  "div",
1307
1307
  {
1308
1308
  ref: b,
@@ -1310,15 +1310,15 @@ function xt({
1310
1310
  style: j,
1311
1311
  children: e.map((m, _) => {
1312
1312
  if (m.separator)
1313
- return /* @__PURE__ */ r.jsx("div", { className: "ds-dropdown__separator" }, _);
1313
+ return /* @__PURE__ */ t.jsx("div", { className: "ds-dropdown__separator" }, _);
1314
1314
  if (m.type === "section")
1315
- return /* @__PURE__ */ r.jsxs("div", { className: "ds-dropdown__section", children: [
1316
- m.label && /* @__PURE__ */ r.jsx("div", { className: "ds-dropdown__section-label", children: m.label }),
1317
- /* @__PURE__ */ r.jsx("div", { className: "ds-dropdown__section-content", children: m.content })
1315
+ return /* @__PURE__ */ t.jsxs("div", { className: "ds-dropdown__section", children: [
1316
+ m.label && /* @__PURE__ */ t.jsx("div", { className: "ds-dropdown__section-label", children: m.label }),
1317
+ /* @__PURE__ */ t.jsx("div", { className: "ds-dropdown__section-content", children: m.content })
1318
1318
  ] }, _);
1319
- const R = !!m.href, g = R ? "a" : "button", P = R ? { href: m.disabled ? void 0 : m.href, "aria-disabled": m.disabled ? "true" : void 0 } : { type: "button", disabled: m.disabled };
1320
- return /* @__PURE__ */ r.jsxs(
1321
- g,
1319
+ const R = !!m.href, I = R ? "a" : "button", P = R ? { href: m.disabled ? void 0 : m.href, "aria-disabled": m.disabled ? "true" : void 0 } : { type: "button", disabled: m.disabled };
1320
+ return /* @__PURE__ */ t.jsxs(
1321
+ I,
1322
1322
  {
1323
1323
  className: [
1324
1324
  "ds-dropdown__item",
@@ -1330,9 +1330,9 @@ function xt({
1330
1330
  (M = m.onClick) == null || M.call(m), k();
1331
1331
  },
1332
1332
  children: [
1333
- m.icon && /* @__PURE__ */ r.jsx("span", { className: "ds-dropdown__item-icon", children: m.icon }),
1334
- /* @__PURE__ */ r.jsx("span", { className: "ds-dropdown__item-label", children: m.label }),
1335
- m.shortcut && /* @__PURE__ */ r.jsx("span", { className: "ds-dropdown__item-shortcut", children: m.shortcut })
1333
+ m.icon && /* @__PURE__ */ t.jsx("span", { className: "ds-dropdown__item-icon", children: m.icon }),
1334
+ /* @__PURE__ */ t.jsx("span", { className: "ds-dropdown__item-label", children: m.label }),
1335
+ m.shortcut && /* @__PURE__ */ t.jsx("span", { className: "ds-dropdown__item-shortcut", children: m.shortcut })
1336
1336
  ]
1337
1337
  },
1338
1338
  _
@@ -1340,16 +1340,16 @@ function xt({
1340
1340
  })
1341
1341
  }
1342
1342
  );
1343
- return /* @__PURE__ */ r.jsxs(
1343
+ return /* @__PURE__ */ t.jsxs(
1344
1344
  "div",
1345
1345
  {
1346
1346
  ref: x,
1347
1347
  className: ["ds-dropdown", a].filter(Boolean).join(" "),
1348
- style: l,
1349
- ...i,
1348
+ style: i,
1349
+ ...l,
1350
1350
  children: [
1351
- /* @__PURE__ */ r.jsx("div", { className: "ds-dropdown__trigger", onClick: $, children: t }),
1352
- typeof document < "u" && C.createPortal(S, document.body)
1351
+ /* @__PURE__ */ t.jsx("div", { className: "ds-dropdown__trigger", onClick: $, children: s }),
1352
+ typeof document < "u" && C.createPortal(g, document.body)
1353
1353
  ]
1354
1354
  }
1355
1355
  );
@@ -1363,63 +1363,63 @@ const ue = {
1363
1363
  let V = [];
1364
1364
  const te = /* @__PURE__ */ new Set();
1365
1365
  function he() {
1366
- te.forEach((t) => t([...V]));
1366
+ te.forEach((s) => s([...V]));
1367
1367
  }
1368
- function Ae(t) {
1369
- V = [...V, t], he();
1368
+ function Ie(s) {
1369
+ V = [...V, s], he();
1370
1370
  }
1371
- function Ie(t) {
1372
- V = V.filter((e) => e.id !== t), he();
1371
+ function Ae(s) {
1372
+ V = V.filter((e) => e.id !== s), he();
1373
1373
  }
1374
1374
  function vt() {
1375
- const t = (e, s = {}) => {
1376
- Ae({
1375
+ const s = (e, r = {}) => {
1376
+ Ie({
1377
1377
  id: `${Date.now()}-${Math.random()}`,
1378
1378
  message: e,
1379
1379
  type: "default",
1380
1380
  duration: 4e3,
1381
- ...s
1381
+ ...r
1382
1382
  });
1383
1383
  };
1384
- return t.success = (e, s) => t(e, { ...s, type: "success" }), t.error = (e, s) => t(e, { ...s, type: "error" }), t.warning = (e, s) => t(e, { ...s, type: "warning" }), { toast: t };
1384
+ return s.success = (e, r) => s(e, { ...r, type: "success" }), s.error = (e, r) => s(e, { ...r, type: "error" }), s.warning = (e, r) => s(e, { ...r, type: "warning" }), { toast: s };
1385
1385
  }
1386
- function Pe({ data: t, onDismiss: e }) {
1387
- const [s, c] = I(!1), n = L(null);
1388
- B(() => (requestAnimationFrame(() => c(!0)), t.duration > 0 && (n.current = setTimeout(() => a(), t.duration)), () => clearTimeout(n.current)), []);
1386
+ function Pe({ data: s, onDismiss: e }) {
1387
+ const [r, c] = T(!1), n = L(null);
1388
+ B(() => (requestAnimationFrame(() => c(!0)), s.duration > 0 && (n.current = setTimeout(() => a(), s.duration)), () => clearTimeout(n.current)), []);
1389
1389
  function a() {
1390
- c(!1), setTimeout(() => e(t.id), 250);
1390
+ c(!1), setTimeout(() => e(s.id), 250);
1391
1391
  }
1392
- const l = ue[t.type] ?? ue.default;
1393
- return /* @__PURE__ */ r.jsxs(
1392
+ const i = ue[s.type] ?? ue.default;
1393
+ return /* @__PURE__ */ t.jsxs(
1394
1394
  "div",
1395
1395
  {
1396
1396
  className: [
1397
1397
  "ds-toast",
1398
- `ds-toast--${t.type}`,
1399
- s && "ds-toast--visible"
1398
+ `ds-toast--${s.type}`,
1399
+ r && "ds-toast--visible"
1400
1400
  ].filter(Boolean).join(" "),
1401
- role: t.type === "error" ? "alert" : "status",
1401
+ role: s.type === "error" ? "alert" : "status",
1402
1402
  "aria-live": "polite",
1403
1403
  children: [
1404
- /* @__PURE__ */ r.jsx("div", { className: "ds-toast__icon", children: /* @__PURE__ */ r.jsx(l, { size: T[3], strokeWidth: 1.5 }) }),
1405
- /* @__PURE__ */ r.jsx("span", { className: "ds-toast__message", children: t.message }),
1406
- /* @__PURE__ */ r.jsx(
1404
+ /* @__PURE__ */ t.jsx("div", { className: "ds-toast__icon", children: /* @__PURE__ */ t.jsx(i, { size: S[3], strokeWidth: 1.5 }) }),
1405
+ /* @__PURE__ */ t.jsx("span", { className: "ds-toast__message", children: s.message }),
1406
+ /* @__PURE__ */ t.jsx(
1407
1407
  "button",
1408
1408
  {
1409
1409
  className: "ds-toast__close",
1410
1410
  onClick: a,
1411
1411
  "aria-label": "Закрыть",
1412
- children: /* @__PURE__ */ r.jsx(se, { size: T[3], strokeWidth: 1.5 })
1412
+ children: /* @__PURE__ */ t.jsx(se, { size: S[3], strokeWidth: 1.5 })
1413
1413
  }
1414
1414
  )
1415
1415
  ]
1416
1416
  }
1417
1417
  );
1418
1418
  }
1419
- function jt({ position: t = "bottom-right" }) {
1420
- const [e, s] = I(() => [...V]);
1421
- return B(() => (te.add(s), () => te.delete(s)), []), !e.length || typeof document > "u" ? null : C.createPortal(
1422
- /* @__PURE__ */ r.jsx("div", { className: ["ds-toast-container", `ds-toast-container--${t}`].join(" "), children: e.map((c) => /* @__PURE__ */ r.jsx(Pe, { data: c, onDismiss: Ie }, c.id)) }),
1419
+ function jt({ position: s = "bottom-right" }) {
1420
+ const [e, r] = T(() => [...V]);
1421
+ return B(() => (te.add(r), () => te.delete(r)), []), !e.length || typeof document > "u" ? null : C.createPortal(
1422
+ /* @__PURE__ */ t.jsx("div", { className: ["ds-toast-container", `ds-toast-container--${s}`].join(" "), children: e.map((c) => /* @__PURE__ */ t.jsx(Pe, { data: c, onDismiss: Ae }, c.id)) }),
1423
1423
  document.body
1424
1424
  );
1425
1425
  }
@@ -1463,6 +1463,6 @@ export {
1463
1463
  jt as ToastContainer,
1464
1464
  nt as Toggle,
1465
1465
  rt as Tooltip,
1466
- T as iconSizes,
1466
+ S as iconSizes,
1467
1467
  vt as useToast
1468
1468
  };